diff --git a/src/ckanext-mappreview/.coveragerc b/src/ckanext-mappreview/.coveragerc
new file mode 100644
index 000000000..895e29130
--- /dev/null
+++ b/src/ckanext-mappreview/.coveragerc
@@ -0,0 +1,5 @@
+[report]
+omit =
+ */site-packages/*
+ */python?.?/*
+ ckan/*
diff --git a/src/ckanext-mappreview/.github/workflows/test.yml b/src/ckanext-mappreview/.github/workflows/test.yml
new file mode 100644
index 000000000..b7cab86e6
--- /dev/null
+++ b/src/ckanext-mappreview/.github/workflows/test.yml
@@ -0,0 +1,48 @@
+name: Tests
+on: [push, pull_request]
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ container:
+ # The CKAN version tag of the Solr and Postgres containers should match
+ # the one of the container the tests run on.
+ # You can switch this base image with a custom image tailored to your project
+ image: ckan/ckan-dev:2.10
+ services:
+ solr:
+ image: ckan/ckan-solr:2.10-solr9
+ postgres:
+ image: ckan/ckan-postgres-dev:2.10
+ env:
+ POSTGRES_USER: postgres
+ POSTGRES_PASSWORD: postgres
+ POSTGRES_DB: postgres
+ options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
+ redis:
+ image: redis:3
+
+ env:
+ CKAN_SQLALCHEMY_URL: postgresql://ckan_default:pass@postgres/ckan_test
+ CKAN_DATASTORE_WRITE_URL: postgresql://datastore_write:pass@postgres/datastore_test
+ CKAN_DATASTORE_READ_URL: postgresql://datastore_read:pass@postgres/datastore_test
+ CKAN_SOLR_URL: http://solr:8983/solr/ckan
+ CKAN_REDIS_URL: redis://redis:6379/1
+
+ steps:
+ - uses: actions/checkout@v4
+ - name: Install requirements
+ # Install any extra requirements your extension has here (dev requirements, other extensions etc)
+ run: |
+ pip install -r requirements.txt
+ pip install -r dev-requirements.txt
+ pip install -e .
+ - name: Setup extension
+ # Extra initialization steps
+ run: |
+ # Replace default path to CKAN core config file with the one on the container
+ sed -i -e 's/use = config:.*/use = config:\/srv\/app\/src\/ckan\/test-core.ini/' test.ini
+
+ ckan -c test.ini db init
+ - name: Run tests
+ run: pytest --ckan-ini=test.ini --cov=ckanext.mappreview --disable-warnings ckanext/mappreview
+
diff --git a/src/ckanext-mappreview/.gitignore b/src/ckanext-mappreview/.gitignore
new file mode 100644
index 000000000..8570dc5c5
--- /dev/null
+++ b/src/ckanext-mappreview/.gitignore
@@ -0,0 +1,42 @@
+.ropeproject
+node_modules
+bower_components
+
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+env/
+build/
+develop-eggs/
+dist/
+sdist/
+*.egg-info/
+.installed.cfg
+*.egg
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.coverage
+.cache
+nosetests.xml
+coverage.xml
+
+# Sphinx documentation
+docs/_build/
diff --git a/src/ckanext-mappreview/LICENSE b/src/ckanext-mappreview/LICENSE
new file mode 100644
index 000000000..58777e31a
--- /dev/null
+++ b/src/ckanext-mappreview/LICENSE
@@ -0,0 +1,661 @@
+GNU AFFERO GENERAL PUBLIC LICENSE
+ Version 3, 19 November 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU Affero General Public License is a free, copyleft license for
+software and other kinds of works, specifically designed to ensure
+cooperation with the community in the case of network server software.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+our General Public Licenses are intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ Developers that use our General Public Licenses protect your rights
+with two steps: (1) assert copyright on the software, and (2) offer
+you this License which gives you legal permission to copy, distribute
+and/or modify the software.
+
+ A secondary benefit of defending all users' freedom is that
+improvements made in alternate versions of the program, if they
+receive widespread use, become available for other developers to
+incorporate. Many developers of free software are heartened and
+encouraged by the resulting cooperation. However, in the case of
+software used on network servers, this result may fail to come about.
+The GNU General Public License permits making a modified version and
+letting the public access it on a server without ever releasing its
+source code to the public.
+
+ The GNU Affero General Public License is designed specifically to
+ensure that, in such cases, the modified source code becomes available
+to the community. It requires the operator of a network server to
+provide the source code of the modified version running there to the
+users of that server. Therefore, public use of a modified version, on
+a publicly accessible server, gives the public access to the source
+code of the modified version.
+
+ An older license, called the Affero General Public License and
+published by Affero, was designed to accomplish similar goals. This is
+a different license, not a version of the Affero GPL, but Affero has
+released a new version of the Affero GPL which permits relicensing under
+this license.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU Affero General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Remote Network Interaction; Use with the GNU General Public License.
+
+ Notwithstanding any other provision of this License, if you modify the
+Program, your modified version must prominently offer all users
+interacting with it remotely through a computer network (if your version
+supports such interaction) an opportunity to receive the Corresponding
+Source of your version by providing access to the Corresponding Source
+from a network server at no charge, through some standard or customary
+means of facilitating copying of software. This Corresponding Source
+shall include the Corresponding Source for any work covered by version 3
+of the GNU General Public License that is incorporated pursuant to the
+following paragraph.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the work with which it is combined will remain governed by version
+3 of the GNU General Public License.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU Affero General Public License from time to time. Such new versions
+will be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU Affero General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU Affero General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU Affero General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (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
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If your software can interact with users remotely through a computer
+network, you should also make sure that it provides a way for users to
+get its source. For example, if your program is a web application, its
+interface could display a "Source" link that leads users to an archive
+of the code. There are many ways you could offer source, and different
+solutions will be better for different programs; see section 13 for the
+specific requirements.
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU AGPL, see
+ .
diff --git a/src/ckanext-mappreview/MANIFEST.in b/src/ckanext-mappreview/MANIFEST.in
new file mode 100644
index 000000000..2244507c1
--- /dev/null
+++ b/src/ckanext-mappreview/MANIFEST.in
@@ -0,0 +1,5 @@
+include README.rst
+include LICENSE
+include requirements.txt
+recursive-include ckanext/mappreview *.html *.json *.js *.less *.css *.mo *.yml
+recursive-include ckanext/mappreview/migration *.ini *.py *.mako
diff --git a/src/ckanext-mappreview/README.md b/src/ckanext-mappreview/README.md
new file mode 100644
index 000000000..8ea055065
--- /dev/null
+++ b/src/ckanext-mappreview/README.md
@@ -0,0 +1,123 @@
+[![Tests](https://github.com/stamen/ckanext-mappreview/workflows/Tests/badge.svg?branch=main)](https://github.com/stamen/ckanext-mappreview/actions)
+
+# ckanext-mappreview
+
+**TODO:** Put a description of your extension here: What does it do? What features does it have? Consider including some screenshots or embedding a video!
+
+
+## Requirements
+
+**TODO:** For example, you might want to mention here which versions of CKAN this
+extension works with.
+
+If your extension works across different versions you can add the following table:
+
+Compatibility with core CKAN versions:
+
+| CKAN version | Compatible? |
+| --------------- | ------------- |
+| 2.6 and earlier | not tested |
+| 2.7 | not tested |
+| 2.8 | not tested |
+| 2.9 | not tested |
+
+Suggested values:
+
+* "yes"
+* "not tested" - I can't think of a reason why it wouldn't work
+* "not yet" - there is an intention to get it working
+* "no"
+
+
+## Installation
+
+**TODO:** Add any additional install steps to the list below.
+ For example installing any non-Python dependencies or adding any required
+ config settings.
+
+To install ckanext-mappreview:
+
+1. Activate your CKAN virtual environment, for example:
+
+ . /usr/lib/ckan/default/bin/activate
+
+2. Clone the source and install it on the virtualenv
+
+ git clone https://github.com/stamen/ckanext-mappreview.git
+ cd ckanext-mappreview
+ pip install -e .
+ pip install -r requirements.txt
+
+3. Add `mappreview` to the `ckan.plugins` setting in your CKAN
+ config file (by default the config file is located at
+ `/etc/ckan/default/ckan.ini`).
+
+4. Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu:
+
+ sudo service apache2 reload
+
+
+## Config settings
+
+None at present
+
+**TODO:** Document any optional config settings here. For example:
+
+ # The minimum number of hours to wait before re-checking a resource
+ # (optional, default: 24).
+ ckanext.mappreview.some_setting = some_default_value
+
+
+## Developer installation
+
+To install ckanext-mappreview for development, activate your CKAN virtualenv and
+do:
+
+ git clone https://github.com/stamen/ckanext-mappreview.git
+ cd ckanext-mappreview
+ python setup.py develop
+ pip install -r dev-requirements.txt
+
+
+## Tests
+
+To run the tests, do:
+
+ pytest --ckan-ini=test.ini
+
+
+## Releasing a new version of ckanext-mappreview
+
+If ckanext-mappreview should be available on PyPI you can follow these steps to publish a new version:
+
+1. Update the version number in the `setup.py` file. See [PEP 440](http://legacy.python.org/dev/peps/pep-0440/#public-version-identifiers) for how to choose version numbers.
+
+2. Make sure you have the latest version of necessary packages:
+
+ pip install --upgrade setuptools wheel twine
+
+3. Create a source and binary distributions of the new version:
+
+ python setup.py sdist bdist_wheel && twine check dist/*
+
+ Fix any errors you get.
+
+4. Upload the source distribution to PyPI:
+
+ twine upload dist/*
+
+5. Commit any outstanding changes:
+
+ git commit -a
+ git push
+
+6. Tag the new release of the project on GitHub with the version number from
+ the `setup.py` file. For example if the version number in `setup.py` is
+ 0.0.1 then do:
+
+ git tag 0.0.1
+ git push --tags
+
+## License
+
+[AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)
diff --git a/src/ckanext-mappreview/ckanext/__init__.py b/src/ckanext-mappreview/ckanext/__init__.py
new file mode 100644
index 000000000..ed48ed012
--- /dev/null
+++ b/src/ckanext-mappreview/ckanext/__init__.py
@@ -0,0 +1,9 @@
+# encoding: utf-8
+
+# this is a namespace package
+try:
+ import pkg_resources
+ pkg_resources.declare_namespace(__name__)
+except ImportError:
+ import pkgutil
+ __path__ = pkgutil.extend_path(__path__, __name__)
diff --git a/src/ckanext-mappreview/ckanext/mappreview/__init__.py b/src/ckanext-mappreview/ckanext/mappreview/__init__.py
new file mode 100644
index 000000000..e69de29bb
diff --git a/src/ckanext-mappreview/ckanext/mappreview/assets/.gitignore b/src/ckanext-mappreview/ckanext/mappreview/assets/.gitignore
new file mode 100644
index 000000000..e69de29bb
diff --git a/src/ckanext-mappreview/ckanext/mappreview/assets/css/mappreview.css b/src/ckanext-mappreview/ckanext/mappreview/assets/css/mappreview.css
new file mode 100644
index 000000000..ebe6e4b4d
--- /dev/null
+++ b/src/ckanext-mappreview/ckanext/mappreview/assets/css/mappreview.css
@@ -0,0 +1,9 @@
+.mappreview .map {
+ height: 500px;
+ width: 100%;
+}
+
+.mappreview .mappreview-mapboxgl-popup .mapboxgl-popup-content {
+ max-height: 200px;
+ overflow-y: auto;
+}
diff --git a/src/ckanext-mappreview/ckanext/mappreview/assets/css/vendor/mapbox-gl-legend.css b/src/ckanext-mappreview/ckanext/mappreview/assets/css/vendor/mapbox-gl-legend.css
new file mode 100644
index 000000000..a4b285c8b
--- /dev/null
+++ b/src/ckanext-mappreview/ckanext/mappreview/assets/css/vendor/mapbox-gl-legend.css
@@ -0,0 +1,87 @@
+.mapboxgl-legend-list
+{
+ display: none;
+}
+
+.mapboxgl-legend-list{
+ overflow-y:scroll;
+ max-height: calc(100vh * 0.7);
+}
+
+.mapboxgl-ctrl-group .mapboxgl-legend-list button
+{
+ background: none;
+ border: none;
+ cursor: pointer;
+ display: block;
+ /* padding: 8px 8px 6px; */
+ /* text-align: right; */
+ /* width: 100%; */
+ height: auto;
+}
+
+.mapboxgl-legend-list button.active
+{
+ font-weight: bold;
+}
+
+.mapboxgl-legend-list button:hover
+{
+ background-color: rgba(0, 0, 0, 0.05);
+}
+
+.mapboxgl-legend-list button + button
+{
+ border-top: 1px solid #ddd;
+}
+
+.mapboxgl-legend-switcher
+{
+ background: url('data:image/svg+xml;charset=UTF-8, ');
+ background-position: center;
+ background-repeat: no-repeat;
+ background-size: 70%;
+}
+
+table.legend-table{
+ border-collapse:collapse;
+ margin:0 auto;
+ }
+td.legend-table-td,th.legend-table-th{
+ border:1px solid #ffffff;
+ margin: 10px;
+ padding:2px;
+ text-align: left;
+}
+
+.mapboxgl-legend-close-button{
+ position: absolute;
+ right: 0;
+ top: 0;
+ border: 0;
+ border-radius: 0 3px 0 0;
+ cursor: pointer;
+ background-color: transparent;
+ font-size: 13px;
+ padding-top: 5px;
+ padding-right: 5px;
+}
+
+.mapboxgl-legend-title-label{
+ font-size: 14px;
+ font-weight: bold;
+ margin: 5px;
+}
+
+.mapboxgl-legend-onlyRendered-checkbox{
+ margin: 5px;
+}
+
+.mapboxgl-legend-onlyRendered-label{
+ font-size: 14px;
+ margin: 5px;
+}
+
+td.legend-table-td > svg{
+ height: 17px;
+}
\ No newline at end of file
diff --git a/src/ckanext-mappreview/ckanext/mappreview/assets/css/vendor/mapbox-gl.css b/src/ckanext-mappreview/ckanext/mappreview/assets/css/vendor/mapbox-gl.css
new file mode 100644
index 000000000..90c70f21b
--- /dev/null
+++ b/src/ckanext-mappreview/ckanext/mappreview/assets/css/vendor/mapbox-gl.css
@@ -0,0 +1 @@
+.mapboxgl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.mapboxgl-canvas{left:0;position:absolute;top:0}.mapboxgl-map:-webkit-full-screen{height:100%;width:100%}.mapboxgl-canary{background-color:salmon}.mapboxgl-canvas-container.mapboxgl-interactive,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass{cursor:grab;-webkit-user-select:none;user-select:none}.mapboxgl-canvas-container.mapboxgl-interactive.mapboxgl-track-pointer{cursor:pointer}.mapboxgl-canvas-container.mapboxgl-interactive:active,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass:active{cursor:grabbing}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate .mapboxgl-canvas{touch-action:pan-x pan-y}.mapboxgl-canvas-container.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-drag-pan .mapboxgl-canvas{touch-action:pinch-zoom}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan .mapboxgl-canvas{touch-action:none}.mapboxgl-ctrl-bottom-left,.mapboxgl-ctrl-bottom-right,.mapboxgl-ctrl-top-left,.mapboxgl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.mapboxgl-ctrl-top-left{left:0;top:0}.mapboxgl-ctrl-top-right{right:0;top:0}.mapboxgl-ctrl-bottom-left{bottom:0;left:0}.mapboxgl-ctrl-bottom-right{bottom:0;right:0}.mapboxgl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.mapboxgl-ctrl-top-left .mapboxgl-ctrl{float:left;margin:10px 0 0 10px}.mapboxgl-ctrl-top-right .mapboxgl-ctrl{float:right;margin:10px 10px 0 0}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl{float:left;margin:0 0 10px 10px}.mapboxgl-ctrl-bottom-right .mapboxgl-ctrl{float:right;margin:0 10px 10px 0}.mapboxgl-ctrl-group{background:#fff;border-radius:4px}.mapboxgl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (-ms-high-contrast:active){.mapboxgl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.mapboxgl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:0;overflow:hidden;padding:0;width:29px}.mapboxgl-ctrl-group button+button{border-top:1px solid #ddd}.mapboxgl-ctrl button .mapboxgl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (-ms-high-contrast:active){.mapboxgl-ctrl-icon{background-color:transparent}.mapboxgl-ctrl-group button+button{border-top:1px solid ButtonText}}.mapboxgl-ctrl-attrib-button:focus,.mapboxgl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.mapboxgl-ctrl button:disabled{cursor:not-allowed}.mapboxgl-ctrl button:disabled .mapboxgl-ctrl-icon{opacity:.25}.mapboxgl-ctrl-group button:first-child{border-radius:4px 4px 0 0}.mapboxgl-ctrl-group button:last-child{border-radius:0 0 4px 4px}.mapboxgl-ctrl-group button:only-child{border-radius:inherit}.mapboxgl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.mapboxgl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.mapboxgl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23000' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23000' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E")}}.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23000' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23000' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E")}}.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath id='south' d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath id='south' d='M10.5 16l4 8 4-8h-8z' fill='%23999'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23000' viewBox='0 0 29 29'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath id='south' d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E")}}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' display='none'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23aaa'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' fill='%23f00'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' display='none'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e58978'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' display='none'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2' display='none'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' display='none'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e54e33'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2' display='none'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' display='none'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-waiting .mapboxgl-ctrl-icon{animation:mapboxgl-spin 2s linear infinite}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' display='none'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23999'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' fill='%23f00'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' display='none'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e58978'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' display='none'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2' display='none'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' display='none'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e54e33'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2' display='none'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' display='none'/%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23000'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' display='none'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23666'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' fill='%23f00'/%3E%3C/svg%3E")}}@keyframes mapboxgl-spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}a.mapboxgl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill-rule='evenodd' viewBox='0 0 88 23'%3E%3Cdefs%3E%3Cpath id='logo' d='M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z'/%3E%3Cpath id='text' d='M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 01.3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 01-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z'/%3E%3C/defs%3E%3Cmask id='clip'%3E%3Crect x='0' y='0' width='100%25' height='100%25' fill='white'/%3E%3Cuse xlink:href='%23logo'/%3E%3Cuse xlink:href='%23text'/%3E%3C/mask%3E%3Cg id='outline' opacity='0.3' stroke='%23000' stroke-width='3'%3E%3Ccircle mask='url(%23clip)' cx='11.5' cy='11.5' r='9.25'/%3E%3Cuse xlink:href='%23text' mask='url(%23clip)'/%3E%3C/g%3E%3Cg id='fill' opacity='0.9' fill='%23fff'%3E%3Cuse xlink:href='%23logo'/%3E%3Cuse xlink:href='%23text'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.mapboxgl-ctrl-logo.mapboxgl-compact{width:23px}@media (-ms-high-contrast:active){a.mapboxgl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill-rule='evenodd' viewBox='0 0 88 23'%3E%3Cdefs%3E%3Cpath id='logo' d='M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z'/%3E%3Cpath id='text' d='M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 01.3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 01-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z'/%3E%3C/defs%3E%3Cmask id='clip'%3E%3Crect x='0' y='0' width='100%25' height='100%25' fill='white'/%3E%3Cuse xlink:href='%23logo'/%3E%3Cuse xlink:href='%23text'/%3E%3C/mask%3E%3Cg id='outline' opacity='1' stroke='%23000' stroke-width='3'%3E%3Ccircle mask='url(%23clip)' cx='11.5' cy='11.5' r='9.25'/%3E%3Cuse xlink:href='%23text' mask='url(%23clip)'/%3E%3C/g%3E%3Cg id='fill' opacity='1' fill='%23fff'%3E%3Cuse xlink:href='%23logo'/%3E%3Cuse xlink:href='%23text'/%3E%3C/g%3E%3C/svg%3E")}}@media (-ms-high-contrast:black-on-white){a.mapboxgl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill-rule='evenodd' viewBox='0 0 88 23'%3E%3Cdefs%3E%3Cpath id='logo' d='M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z'/%3E%3Cpath id='text' d='M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 01.3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 01-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z'/%3E%3C/defs%3E%3Cmask id='clip'%3E%3Crect x='0' y='0' width='100%25' height='100%25' fill='white'/%3E%3Cuse xlink:href='%23logo'/%3E%3Cuse xlink:href='%23text'/%3E%3C/mask%3E%3Cg id='outline' opacity='1' stroke='%23fff' stroke-width='3' fill='%23fff'%3E%3Ccircle mask='url(%23clip)' cx='11.5' cy='11.5' r='9.25'/%3E%3Cuse xlink:href='%23text' mask='url(%23clip)'/%3E%3C/g%3E%3Cg id='fill' opacity='1' fill='%23000'%3E%3Cuse xlink:href='%23logo'/%3E%3Cuse xlink:href='%23text'/%3E%3C/g%3E%3C/svg%3E")}}.mapboxgl-ctrl.mapboxgl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.mapboxgl-ctrl-attrib.mapboxgl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.mapboxgl-ctrl-attrib.mapboxgl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact-show,.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner{display:none}.mapboxgl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:0;position:absolute;right:0;top:0;width:24px}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl-attrib-button,.mapboxgl-ctrl-top-left .mapboxgl-ctrl-attrib-button{left:0}.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-button,.mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-inner{display:block}.mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.mapboxgl-ctrl-bottom-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;right:0}.mapboxgl-ctrl-top-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{right:0;top:0}.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{left:0;top:0}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;left:0}}@media screen and (-ms-high-contrast:active){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd' fill='%23fff'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (-ms-high-contrast:black-on-white){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.mapboxgl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.mapboxgl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.mapboxgl-ctrl-attrib .mapbox-improve-map{font-weight:700;margin-left:2px}.mapboxgl-attrib-empty{display:none}.mapboxgl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px;white-space:nowrap}.mapboxgl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.mapboxgl-popup-anchor-top,.mapboxgl-popup-anchor-top-left,.mapboxgl-popup-anchor-top-right{flex-direction:column}.mapboxgl-popup-anchor-bottom,.mapboxgl-popup-anchor-bottom-left,.mapboxgl-popup-anchor-bottom-right{flex-direction:column-reverse}.mapboxgl-popup-anchor-left{flex-direction:row}.mapboxgl-popup-anchor-right{flex-direction:row-reverse}.mapboxgl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.mapboxgl-popup-anchor-top .mapboxgl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.mapboxgl-popup-anchor-left .mapboxgl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.mapboxgl-popup-anchor-right .mapboxgl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.mapboxgl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.mapboxgl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.mapboxgl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:10px 10px 15px;pointer-events:auto;position:relative}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-content{border-top-left-radius:0}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-content{border-top-right-radius:0}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-content{border-bottom-left-radius:0}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-content{border-bottom-right-radius:0}.mapboxgl-popup-track-pointer{display:none}.mapboxgl-popup-track-pointer *{pointer-events:none;user-select:none}.mapboxgl-map:hover .mapboxgl-popup-track-pointer{display:flex}.mapboxgl-map:active .mapboxgl-popup-track-pointer{display:none}.mapboxgl-marker{left:0;opacity:1;position:absolute;top:0;transition:opacity .2s;will-change:transform}.mapboxgl-user-location-dot,.mapboxgl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.mapboxgl-user-location-dot:before{animation:mapboxgl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.mapboxgl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading{height:0;width:0}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:after,.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:before{border-bottom:7.5px solid #4aa1eb;content:"";position:absolute}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:before{border-left:7.5px solid transparent;transform:translateY(-28px) skewY(-20deg)}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:after{border-right:7.5px solid transparent;transform:translate(7.5px,-28px) skewY(20deg)}@keyframes mapboxgl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.mapboxgl-user-location-dot-stale{background-color:#aaa}.mapboxgl-user-location-dot-stale:after{display:none}.mapboxgl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.mapboxgl-crosshair,.mapboxgl-crosshair .mapboxgl-interactive,.mapboxgl-crosshair .mapboxgl-interactive:active{cursor:crosshair}.mapboxgl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}@media print{.mapbox-improve-map{display:none}}.mapboxgl-scroll-zoom-blocker,.mapboxgl-touch-pan-blocker{align-items:center;background:rgba(0,0,0,.7);color:#fff;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif;height:100%;justify-content:center;left:0;opacity:0;pointer-events:none;position:absolute;text-align:center;top:0;transition:opacity .75s ease-in-out;transition-delay:1s;width:100%}.mapboxgl-scroll-zoom-blocker-show,.mapboxgl-touch-pan-blocker-show{opacity:1;transition:opacity .1s ease-in-out}.mapboxgl-canvas-container.mapboxgl-touch-pan-blocker-override.mapboxgl-scrollable-page,.mapboxgl-canvas-container.mapboxgl-touch-pan-blocker-override.mapboxgl-scrollable-page .mapboxgl-canvas{touch-action:pan-x pan-y}
\ No newline at end of file
diff --git a/src/ckanext-mappreview/ckanext/mappreview/assets/js/mappreview.js b/src/ckanext-mappreview/ckanext/mappreview/assets/js/mappreview.js
new file mode 100644
index 000000000..47999707f
--- /dev/null
+++ b/src/ckanext-mappreview/ckanext/mappreview/assets/js/mappreview.js
@@ -0,0 +1,145 @@
+ckan.module("mappreview", function ($, _) {
+ "use strict";
+ return {
+ options: {
+ debug: false,
+ },
+
+ initialize: function () {
+ mapboxgl.accessToken = 'pk.eyJ1Ijoic3RhbWVuIiwiYSI6ImNtMWkzNm16ZzBsZDYya3B4anI5cG9tN3kifQ.i91AOKPswRy5EA1zi7PO-w';
+ const map = new mapboxgl.Map({
+ container: 'map',
+ center: [-122.420679, 37.772537],
+ zoom: 13,
+ style: 'mapbox://styles/mapbox/light-v11',
+ bounds: [-79.365234,23.120154,-76.453857,25.849337],
+ });
+
+ const sources = [
+ { id: 'airport', url: '/data/recreation/airport.geojson' },
+ { id: 'dredged-ports', url: '/data/recreation/dredged-ports.geojson' },
+ { id: 'beaches', url: '/data/recreation/beaches.geojson' },
+ { id: 'roads-simple', url: '/data/recreation/roads-simple.geojson' },
+ { id: 'roads-simple-buf', url: '/data/recreation/roads-simple-buf.geojson' },
+ { id: 'bonefish', url: '/data/recreation/bonefish.geojson' },
+ { id: 'andros-aoi', url: '/data/recreation/andros-aoi.geojson' },
+ ];
+
+ map.on('load', () => {
+ sources.forEach((source) => {
+ map.addSource(source.id, {
+ type: 'geojson',
+ data: source.url,
+ });
+ });
+
+ map.addLayer({
+ id: 'andros-aoi',
+ type: 'fill',
+ source: 'andros-aoi',
+ paint: {
+ 'fill-color': '#0088ff',
+ 'fill-opacity': 0.2,
+ },
+ });
+
+ map.addLayer({
+ id: 'bonefish',
+ type: 'fill',
+ source: 'bonefish',
+ paint: {
+ 'fill-color': '#ff44ef',
+ 'fill-opacity': 0.2,
+ },
+ });
+
+ map.addLayer({
+ id: 'roads-simple-buf',
+ type: 'fill',
+ source: 'roads-simple-buf',
+ paint: {
+ 'fill-color': '#91522d',
+ 'fill-opacity': 0.5,
+ },
+ });
+
+ map.addLayer({
+ id: 'beaches',
+ type: 'line',
+ source: 'beaches',
+ paint: {
+ 'line-color': 'brown',
+ 'line-opacity': 1,
+ 'line-width': 2,
+ },
+ });
+
+ map.addLayer({
+ id: 'roads-simple',
+ type: 'line',
+ source: 'roads-simple',
+ paint: {
+ 'line-color': 'black',
+ 'line-opacity': 0.5,
+ 'line-width': 0.5,
+ },
+ });
+
+ map.addLayer({
+ id: 'airport',
+ type: 'circle',
+ source: 'airport',
+ paint: {
+ 'circle-color': '#ff0000',
+ 'circle-radius': 5,
+ },
+ });
+
+ map.addLayer({
+ id: 'dredged-ports',
+ type: 'circle',
+ source: 'dredged-ports',
+ paint: {
+ 'circle-color': '#00ff00',
+ 'circle-radius': 5,
+ },
+ });
+
+ const targets = {
+ 'andros-aoi': 'Andros AOI',
+ 'bonefish': 'Bonefish',
+ 'beaches': 'Beaches',
+ 'roads-simple': 'Roads',
+ 'roads-simple-buf': 'Roads Buffer',
+ 'dredged-ports': 'Dredged Ports',
+ 'airport': 'Airport',
+ };
+
+ map.addControl(new MapboxLegendControl(targets, {
+ showDefault: false,
+ showCheckbox: true,
+ onlyRendered: false,
+ reverseOrder: true
+ }), 'top-right');
+ });
+
+ map.on('click', sources.map(s => s.id), (e) => {
+ console.log(e.features);
+ let content = '';
+
+ e.features.forEach(f => {
+ content += `${f.layer.id}
+
+ ${Object.keys(f.properties).map(k => `${k}: ${f.properties[k]} `).join('')}
+ `;
+ });
+
+ const popup = new mapboxgl.Popup({ className: 'mappreview-mapboxgl-popup' })
+ .setLngLat(e.lngLat)
+ .setMaxWidth("300px")
+ .setHTML(content)
+ .addTo(map);
+ });
+ },
+ };
+});
diff --git a/src/ckanext-mappreview/ckanext/mappreview/assets/js/vendor/mapbox-gl-legend.js b/src/ckanext-mappreview/ckanext/mappreview/assets/js/vendor/mapbox-gl-legend.js
new file mode 100644
index 000000000..d57bfca8b
--- /dev/null
+++ b/src/ckanext-mappreview/ckanext/mappreview/assets/js/vendor/mapbox-gl-legend.js
@@ -0,0 +1,2 @@
+/*! For license information please see mapbox-gl-legend.js.LICENSE.txt */
+!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("mapboxgl"));else if("function"==typeof define&&define.amd)define(["mapboxgl"],t);else{var o="object"==typeof exports?t(require("mapboxgl")):t(e.mapboxgl);for(var r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(self,(e=>(()=>{var t={335:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>Lo});var r={$version:8,$root:{version:{required:!0,type:"enum",values:[8],doc:"Style specification version number. Must be 8.",example:8},name:{type:"string",doc:"A human-readable name for the style.",example:"Bright"},metadata:{type:"*",doc:"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},center:{type:"array",value:"number",doc:"Default map center in longitude and latitude. The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:[-73.9749,40.7736]},zoom:{type:"number",doc:"Default zoom level. The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:12.5},bearing:{type:"number",default:0,period:360,units:"degrees",doc:'Default bearing, in degrees. The bearing is the compass direction that is "up"; for example, a bearing of 90° orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).',example:29},pitch:{type:"number",default:0,units:"degrees",doc:"Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:50},light:{type:"light",doc:"The global light source.",example:{anchor:"viewport",color:"white",intensity:.4}},terrain:{type:"terrain",doc:"A global modifier that elevates layers and markers based on a DEM data source."},fog:{type:"fog",doc:"A global effect that fades layers and markers based on their distance to the camera. The fog can be used to approximate the effect of atmosphere on distant objects and enhance the depth perception of the map when used with terrain or 3D features. Note: fog is renamed to atmosphere in the Android and iOS SDKs and planned to be changed in GL-JS v.3.0.0."},sources:{required:!0,type:"sources",doc:"Data source specifications.",example:{"mapbox-streets":{type:"vector",url:"mapbox://mapbox.mapbox-streets-v6"}}},sprite:{type:"string",doc:"A base URL for retrieving the sprite image and metadata. The extensions `.png`, `.json` and scale factor `@2x.png` will be automatically appended. This property is required if any layer uses the `background-pattern`, `fill-pattern`, `line-pattern`, `fill-extrusion-pattern`, or `icon-image` properties. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://sprites/mapbox/bright-v8"},glyphs:{type:"string",doc:"A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include `{fontstack}` and `{range}` tokens. This property is required if any layer uses the `text-field` layout property. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},transition:{type:"transition",doc:"A global transition definition to use as a default across properties, to be used for timing transitions between one value and the next when no property-specific transition is set. Collision-based symbol fading is controlled independently of the style's `transition` property.",example:{duration:300,delay:0}},projection:{type:"projection",doc:"The projection the map should be rendered in. Supported projections are Mercator, Globe, Albers, Equal Earth, Equirectangular (WGS84), Lambert conformal conic, Natural Earth, and Winkel Tripel. Terrain, sky and fog are supported by only Mercator and globe. CustomLayerInterface is not supported outside of Mercator.",example:{name:"albers",center:[-154,50],parallels:[55,65]}},layers:{required:!0,type:"array",value:"layer",doc:"Layers will be drawn in the order of this array.",example:[{id:"water",source:"mapbox-streets","source-layer":"water",type:"fill",paint:{"fill-color":"#00ffff"}}]}},sources:{"*":{type:"source",doc:"Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided."}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{doc:"A vector tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{: }`. If specified as a string for a vector tile source, the same property is used across all its source layers."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster:{type:{required:!0,type:"enum",values:{raster:{doc:"A raster tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{doc:"A RGB-encoded raster DEM source"}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},encoding:{type:"enum",values:{terrarium:{doc:"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info."},mapbox:{doc:"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info."}},default:"mapbox",doc:"The encoding used by this source. Mapbox Terrain RGB is used by default"},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{doc:"A GeoJSON data source."}},doc:"The data type of the GeoJSON source."},data:{type:"*",doc:"A URL to a GeoJSON file, or inline GeoJSON."},maxzoom:{type:"number",default:18,doc:"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},buffer:{type:"number",default:128,maximum:512,minimum:0,doc:"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance."},filter:{type:"*",doc:"An expression for filtering features prior to processing them for rendering."},tolerance:{type:"number",default:.375,doc:"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)."},cluster:{type:"boolean",default:!1,doc:"If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new `Point` features in the source with additional properties:\n * `cluster` Is `true` if the point is a cluster \n * `cluster_id` A unqiue id for the cluster to be used in conjunction with the [cluster inspection methods](https://www.mapbox.com/mapbox-gl-js/api/#geojsonsource#getclusterexpansionzoom)\n * `point_count` Number of original points grouped into this cluster\n * `point_count_abbreviated` An abbreviated point count"},clusterRadius:{type:"number",default:50,minimum:0,doc:"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile."},clusterMaxZoom:{type:"number",doc:"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered). Clusters are re-evaluated at integer zoom levels so setting clusterMaxZoom to 14 means the clusters will be displayed until z15."},clusterMinPoints:{type:"number",doc:"Minimum number of points necessary to form a cluster if clustering is enabled. Defaults to `2`."},clusterProperties:{type:"*",doc:'An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form `{"property_name": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `"+"` or `"max"`) — it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\n\nExample: `{"sum": ["+", ["get", "scalerank"]]}`.\n\nFor more advanced use cases, in place of `operator`, you can use a custom reduce expression that references a special `["accumulated"]` value, e.g.:\n`{"sum": [["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]]}`'},lineMetrics:{type:"boolean",default:!1,doc:"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values."},generateId:{type:"boolean",default:!1,doc:"Whether to generate ids for the geojson features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{: }`."}},source_video:{type:{required:!0,type:"enum",values:{video:{doc:"A video data source."}},doc:"The data type of the video source."},urls:{required:!0,type:"array",value:"string",doc:"URLs to video content in order of preferred format."},coordinates:{required:!0,doc:"Corners of video specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},source_image:{type:{required:!0,type:"enum",values:{image:{doc:"An image data source."}},doc:"The data type of the image source."},url:{required:!0,type:"string",doc:"URL that points to an image."},coordinates:{required:!0,doc:"Corners of image specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},layer:{id:{type:"string",doc:"Unique layer name.",required:!0},type:{type:"enum",values:{fill:{doc:"A filled polygon with an optional stroked border.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},line:{doc:"A stroked line.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},symbol:{doc:"An icon or a text label.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},circle:{doc:"A filled circle.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},heatmap:{doc:"A heatmap.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"fill-extrusion":{doc:"An extruded (3D) polygon.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},raster:{doc:"Raster map textures such as satellite imagery.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},hillshade:{doc:"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},background:{doc:"The background color or pattern of the map.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},sky:{doc:"A spherical dome around the map that is always rendered behind all other layers.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}}},doc:"Rendering type of this layer.",required:!0},metadata:{type:"*",doc:"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},source:{type:"string",doc:"Name of a source description to be used for this layer. Required for all layer types except `background`."},"source-layer":{type:"string",doc:"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources."},minzoom:{type:"number",minimum:0,maximum:24,doc:"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden."},maxzoom:{type:"number",minimum:0,maximum:24,doc:"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden."},filter:{type:"filter",doc:'An expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `["feature-state", ...]` expression is not supported in filter expressions. The `["pitch"]` and `["distance-from-center"]` expressions are supported only for filter expressions on the symbol layer.'},layout:{type:"layout",doc:"Layout properties for the layer."},paint:{type:"paint",doc:"Default paint properties for this layer."}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],layout_background:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_sky:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"},"data-driven styling":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},"property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{doc:"A cap with a squared-off end which is drawn to the exact endpoint of the line."},round:{doc:"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},square:{doc:"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."}},default:"butt",doc:"The display of line endings.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{doc:"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."},round:{doc:"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},miter:{doc:"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet."}},default:"miter",doc:"The display of lines when joining.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,doc:"Used to automatically convert miter joins to bevel joins for sharp angles.",requires:[{"line-join":"miter"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,doc:"Used to automatically convert round joins to miter joins for shallow angles.",requires:[{"line-join":"round"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{doc:"The label is placed at the point where the geometry is located."},line:{doc:"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries."},"line-center":{doc:"The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries."}},default:"point",doc:"Label placement relative to its geometry.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`line-center` value":{js:"0.47.0",android:"6.4.0",ios:"4.3.0",macos:"0.10.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",doc:"Distance between two symbol anchors.",requires:[{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,doc:"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.","sdk-support":{"basic functionality":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"},"data-driven styling":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},"viewport-y":{doc:"Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},source:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data."}},default:"auto",doc:"Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key`.","sdk-support":{"basic functionality":{js:"0.49.0",android:"6.6.0",ios:"4.5.0",macos:"0.12.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,doc:"If true, the icon will be visible even if it collides with other previously drawn symbols.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the icon.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,doc:"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line."},viewport:{doc:"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",doc:"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{doc:"The icon is displayed at its intrinsic aspect ratio."},width:{doc:"The icon is scaled in the x-dimension to fit the width of the text."},height:{doc:"The icon is scaled in the y-dimension to fit the height of the text."},both:{doc:"The icon is scaled in both x- and y-dimensions."}},default:"none",doc:"Scales the icon to fit around the associated text.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"stretchable icons":{js:"1.6.0",android:"9.2.0",ios:"5.8.0",macos:"0.15.0"}},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",doc:"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",doc:"Name of image in sprite to use for drawing an image background.",tokens:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the icon clockwise.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the icon bounding box used for detecting symbol collisions.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,doc:"If true, the icon may be flipped to prevent it from being rendered upside-down.",requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],doc:"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{doc:"The center of the icon is placed closest to the anchor."},left:{doc:"The left side of the icon is placed closest to the anchor."},right:{doc:"The right side of the icon is placed closest to the anchor."},top:{doc:"The top of the icon is placed closest to the anchor."},bottom:{doc:"The bottom of the icon is placed closest to the anchor."},"top-left":{doc:"The top left corner of the icon is placed closest to the anchor."},"top-right":{doc:"The top right corner of the icon is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the icon is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the icon is placed closest to the anchor."}},default:"center",doc:"Part of the icon placed closest to the anchor.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{doc:"The icon is aligned to the plane of the map."},viewport:{doc:"The icon is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `icon-rotation-alignment`."}},default:"auto",doc:"Orientation of icon when map is pitched.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{doc:"The text is aligned to the plane of the map."},viewport:{doc:"The text is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `text-rotation-alignment`."}},default:"auto",doc:"Orientation of text when map is pitched.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line."},viewport:{doc:"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,doc:"Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options. SDF images are not supported in formatted text and will be ignored.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.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"],doc:"Font stack to use for displaying text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",doc:"Font size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",doc:"The maximum line width for text wrapping.",requires:["text-field",{"symbol-placement":["point"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",doc:"Text leading value for multi-line text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{type:"number",default:0,units:"ems",doc:"Text tracking amount.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{doc:"The text is aligned towards the anchor position."},left:{doc:"The text is aligned to the left."},center:{doc:"The text is centered."},right:{doc:"The text is aligned to the right."}},default:"center",doc:"Text justification options.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},auto:{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,doc:"Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"},"data-driven styling":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},requires:["text-field",{"symbol-placement":["point"]}],doc:"To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` or the two-dimensional `text-offset`.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},default:"center",doc:"Part of the text placed closest to the anchor.",requires:["text-field",{"!":"text-variable-anchor"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",doc:"Maximum angle change between adjacent characters.",requires:["text-field",{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{doc:"If a text's language supports horizontal writing mode, symbols would be laid out horizontally."},vertical:{doc:"If a text's language supports vertical writing mode, symbols would be laid out vertically."}},doc:"The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. For symbol with point placement, the order of elements in an array define priority order for the placement of an orientation variant. For symbol with line placement, the default text writing mode is either ['horizontal', 'vertical'] or ['vertical', 'horizontal'], the order doesn't affect the placement.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"1.3.0",android:"8.3.0",ios:"5.3.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the text clockwise.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the text bounding box used for detecting symbol collisions.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,doc:"If true, the text may be flipped vertically to prevent it from being rendered upside-down.",requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{doc:"The text is not altered."},uppercase:{doc:"Forces all letters to be displayed in uppercase."},lowercase:{doc:"Forces all letters to be displayed in lowercase."}},default:"none",doc:"Specifies how to capitalize text, similar to the CSS `text-transform` property.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",doc:"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,doc:"If true, the text will be visible even if it collides with other previously drawn symbols.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,doc:"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.",requires:["text-field","icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},filter:{type:"array",value:"*",doc:"A filter selects specific features from a layer."},filter_symbol:{type:"boolean",doc:'Expression which determines whether or not to display a symbol. Symbols support dynamic filtering, meaning this expression can use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature","pitch","distance-from-center"]}},filter_fill:{type:"boolean",doc:'Expression which determines whether or not to display a polygon. Fill layer does NOT support dynamic filtering, meaning this expression can NOT use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_line:{type:"boolean",doc:'Expression which determines whether or not to display a Polygon or LineString. Line layer does NOT support dynamic filtering, meaning this expression can NOT use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_circle:{type:"boolean",doc:'Expression which determines whether or not to display a circle. Circle layer does NOT support dynamic filtering, meaning this expression can NOT use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},"filter_fill-extrusion":{type:"boolean",doc:'Expression which determines whether or not to display a Polygon. Fill-extrusion layer does NOT support dynamic filtering, meaning this expression can NOT use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_heatmap:{type:"boolean",doc:'Expression used to determine whether a point is being displayed or not. Heatmap layer does NOT support dynamic filtering, meaning this expression can NOT use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_operator:{type:"enum",values:{"==":{doc:'`["==", key, value]` equality: `feature[key] = value`'},"!=":{doc:'`["!=", key, value]` inequality: `feature[key] ≠ value`'},">":{doc:'`[">", key, value]` greater than: `feature[key] > value`'},">=":{doc:'`[">=", key, value]` greater than or equal: `feature[key] ≥ value`'},"<":{doc:'`["<", key, value]` less than: `feature[key] < value`'},"<=":{doc:'`["<=", key, value]` less than or equal: `feature[key] ≤ value`'},in:{doc:'`["in", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`'},"!in":{doc:'`["!in", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`'},all:{doc:'`["all", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`'},any:{doc:'`["any", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`'},none:{doc:'`["none", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`'},has:{doc:'`["has", key]` `feature[key]` exists'},"!has":{doc:'`["!has", key]` `feature[key]` does not exist'},within:{doc:'`["within", object]` feature geometry is within object geometry'}},doc:"The filter operator."},geometry_type:{type:"enum",values:{Point:{doc:"Filter to point geometries."},LineString:{doc:"Filter to line geometries."},Polygon:{doc:"Filter to polygon geometries."}},doc:"The geometry type for the filter to select."},function:{expression:{type:"expression",doc:"An expression."},stops:{type:"array",doc:"An array of stops.",value:"function_stop"},base:{type:"number",default:1,minimum:0,doc:"The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly."},property:{type:"string",doc:"The name of a feature property to use as the function input.",default:"$zoom"},type:{type:"enum",values:{identity:{doc:"Return the input value as the output value."},exponential:{doc:"Generate an output by interpolating between stops just less than and just greater than the function input."},interval:{doc:"Return the output value of the stop just less than the function input."},categorical:{doc:"Return the output value of the stop equal to the function input."}},doc:"The interpolation strategy to use in function evaluation.",default:"exponential"},colorSpace:{type:"enum",values:{rgb:{doc:"Use the RGB color space to interpolate color values"},lab:{doc:"Use the LAB color space to interpolate color values."},hcl:{doc:"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually."}},doc:"The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.",default:"rgb"},default:{type:"*",required:!1,doc:"A value to serve as a fallback function result when a value isn't otherwise available. It is used in the following circumstances:\n* In categorical functions, when the feature value does not match any of the stop domain values.\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.\n* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a `circle-color` property but the feature property value is not a string or not a valid color).\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\nIf no default is provided, the style property's default is used in these circumstances."}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2,doc:"Zoom level and value pair."},expression:{type:"array",value:"*",minimum:1,doc:"An expression defines a function that can be used for data-driven style properties or feature filters."},expression_name:{doc:"",type:"enum",values:{let:{doc:'Binds expressions to named variables, which can then be referenced in the result expression using ["var", "variable_name"].',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},var:{doc:'References variable bound using "let".',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},literal:{doc:"Provides a literal array or object value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},array:{doc:"Asserts that the input is an array (optionally with a specific item type and length). If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},at:{doc:"Retrieves an item from an array.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},in:{doc:"Determines whether an item exists in an array or a substring exists in a string. In the specific case when the second and third arguments are string literals, you must wrap at least one of them in a [`literal`](#types-literal) expression to hint correct interpretation to the [type system](#type-system).",group:"Lookup","sdk-support":{"basic functionality":{js:"1.6.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"index-of":{doc:"Returns the first position at which an item can be found in an array or a substring can be found in a string, or `-1` if the input cannot be found. Accepts an optional index from where to begin the search.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},slice:{doc:"Returns an item from an array or a substring from a string from a specified start index, or between a start index and an end index if set. The return value is inclusive of the start index but not of the end index.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},case:{doc:"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},match:{doc:'Selects the output for which the label value matches the input value, or the fallback value if no match is found. The input can be any expression (for example, `["get", "building_type"]`). Each label must be unique, and must be either:\n - a single literal value; or\n - an array of literal values, the values of which must be all strings or all numbers (for example `[100, 101]` or `["c", "b"]`).\n\nThe input matches if any of the values in the array matches using strict equality, similar to the `"in"` operator.\nIf the input type does not match the type of the labels, the result will be the fallback value.',group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},coalesce:{doc:"Evaluates each expression in turn until the first valid value is obtained. Invalid values are `null` and [`'image'`](#types-image) expressions that are unavailable in the style. If all values are invalid, `coalesce` returns the first value listed.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},step:{doc:'Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first output if the input is less than the first stop.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},interpolate:{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array`, or `color`.\n\nInterpolation types:\n- `["linear"]`: Interpolates linearly between the pair of stops just less than and just greater than the input.\n- `["exponential", base]`: Interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\n- `["cubic-bezier", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"interpolate-hcl":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the Hue-Chroma-Luminance color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},"interpolate-lab":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the CIELAB color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},ln2:{doc:"Returns mathematical constant ln(2).",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},pi:{doc:"Returns the mathematical constant pi.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},e:{doc:"Returns the mathematical constant e.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},typeof:{doc:"Returns a string describing the type of the given value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},string:{doc:"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},number:{doc:"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},boolean:{doc:"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},object:{doc:"Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},collator:{doc:"Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.",group:"Types","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},format:{doc:'Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`\'image\'`](#types-image) expression. Strings may be followed by a style override object that supports the following properties:\n- `"text-font"`: Overrides the font stack specified by the root layout property.\n- `"text-color"`: Overrides the color specified by the root paint property.\n- `"font-scale"`: Applies a scaling factor on `text-size` as specified by the root layout property.',group:"Types","sdk-support":{"basic functionality":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-font":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"font-scale":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-color":{js:"1.3.0",android:"7.3.0",ios:"4.10.0",macos:"0.14.0"},image:{js:"1.6.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},image:{doc:"Returns a [`ResolvedImage`](/mapbox-gl-js/style-spec/types/#resolvedimage) for use in [`icon-image`](/mapbox-gl-js/style-spec/layers/#layout-symbol-icon-image), `*-pattern` entries, and as a section in the [`'format'`](#types-format) expression. A [`'coalesce'`](#coalesce) expression containing `image` expressions will evaluate to the first listed image that is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `'image'` argument.",group:"Types","sdk-support":{"basic functionality":{js:"1.4.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},"number-format":{doc:"Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.",group:"Types","sdk-support":{"basic functionality":{js:"0.54.0",android:"8.4.0",ios:"5.4.0",macos:"0.15.0"}}},"to-string":{doc:'Converts the input value to a string. If the input is `null`, the result is `""`. If the input is a [`boolean`](#types-boolean), the result is `"true"` or `"false"`. If the input is a number, it is converted to a string as specified by the ["NumberToString" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a [`color`](#color), it is converted to a string of the form `"rgba(r,g,b,a)"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. If the input is an [`\'image\'`](#types-image) expression, `\'to-string\'` returns the image name. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-number":{doc:'Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the ["ToNumber Applied to the String Type" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-boolean":{doc:"Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-rgba":{doc:"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-color":{doc:"Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgb:{doc:"Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgba:{doc:"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},get:{doc:"Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns `null` if the requested property is missing.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},has:{doc:"Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},length:{doc:"Returns the length of an array or string.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},properties:{doc:'Returns the feature properties object. Note that in some cases, it may be more efficient to use `["get", "property_name"]` directly.',group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"feature-state":{doc:"Retrieves a property value from the current feature's state. Returns `null` if the requested property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. Features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. Note that [\"feature-state\"] can only be used with paint properties that support data-driven styling.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.46.0"}}},"geometry-type":{doc:"Returns the feature's geometry type: `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`. `Multi*` feature types are only returned in GeoJSON sources. When working with vector tile sources, use the singular forms.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},id:{doc:"Returns the feature's id, if it has one.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},zoom:{doc:'Returns the current zoom level. Note that in style layout and paint properties, ["zoom"] may only appear as the input to a top-level "step" or "interpolate" expression.',group:"Camera","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},pitch:{doc:'Returns the current pitch in degrees. `["pitch"]` may only be used in the `filter` expression for a `symbol` layer.',group:"Camera","sdk-support":{"basic functionality":{js:"2.6.0"}}},"distance-from-center":{doc:'Returns the distance of a `symbol` instance from the center of the map. The distance is measured in pixels divided by the height of the map container. It measures 0 at the center, decreases towards the camera and increase away from the camera. For example, if the height of the map is 1000px, a value of -1 means 1000px away from the center towards the camera, and a value of 1 means a distance of 1000px away from the camera from the center. `["distance-from-center"]` may only be used in the `filter` expression for a `symbol` layer.',group:"Camera","sdk-support":{"basic functionality":{js:"2.6.0"}}},"heatmap-density":{doc:"Returns the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.",group:"Heatmap","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"line-progress":{doc:"Returns the progress along a gradient line. Can only be used in the `line-gradient` property.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.6.0",macos:"0.12.0"}}},"sky-radial-progress":{doc:"Returns the distance of a point on the sky from the sun position. Returns 0 at sun position and 1 when the distance reaches `sky-gradient-radius`. Can only be used in the `sky-gradient` property.",group:"sky","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}},accumulated:{doc:"Returns the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.53.0",android:"8.4.0",ios:"5.5.0",macos:"0.15.0"}}},"+":{doc:"Returns the sum of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"*":{doc:"Returns the product of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"-":{doc:"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"/":{doc:"Returns the result of floating point division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"%":{doc:"Returns the remainder after integer division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"^":{doc:"Returns the result of raising the first input to the power specified by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sqrt:{doc:"Returns the square root of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log10:{doc:"Returns the base-ten logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ln:{doc:"Returns the natural logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log2:{doc:"Returns the base-two logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sin:{doc:"Returns the sine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},cos:{doc:"Returns the cosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},tan:{doc:"Returns the tangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},asin:{doc:"Returns the arcsine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},acos:{doc:"Returns the arccosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},atan:{doc:"Returns the arctangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},min:{doc:"Returns the minimum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},max:{doc:"Returns the maximum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},round:{doc:'Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `["round", -1.5]` evaluates to -2.',group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},abs:{doc:"Returns the absolute value of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ceil:{doc:"Returns the smallest integer that is greater than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},floor:{doc:"Returns the largest integer that is less than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},distance:{doc:"Returns the shortest distance in meters between the evaluated feature and the input geometry. The input value can be a valid GeoJSON of type `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Distance values returned may vary in precision due to loss in precision from encoding geometries, particularly below zoom level 13.",group:"Math","sdk-support":{"basic functionality":{android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}}},"==":{doc:"Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"!=":{doc:"Returns `true` if the input values are not equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">":{doc:"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<":{doc:"Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">=":{doc:"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<=":{doc:"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},all:{doc:"Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},any:{doc:"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"!":{doc:"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},within:{doc:"Returns `true` if the evaluated feature is fully contained inside a boundary of the input geometry, `false` otherwise. The input value can be a valid GeoJSON of type `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Supported features for evaluation:\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\n- `LineString`: Returns `false` if any part of a line falls outside the boundary, the line intersects the boundary, or a line's endpoint is on the boundary.",group:"Decision","sdk-support":{"basic functionality":{js:"1.9.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"is-supported-script":{doc:"Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in Mapbox GL JS).",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.6.0"}}},upcase:{doc:"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},downcase:{doc:"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},concat:{doc:"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"resolved-locale":{doc:"Returns the IETF language tag of the locale being used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}}}},fog:{range:{type:"array",default:[.5,10],minimum:-20,maximum:20,length:2,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"The start and end distance range in which fog fades from fully transparent to fully opaque. The distance to the point at the center of the map is defined as zero, so that negative range values are closer to the camera, and positive values are farther away.",example:[.5,10],"sdk-support":{"basic functionality":{js:"2.3.0",android:"10.6.0",ios:"10.6.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The color of the atmosphere region immediately below the horizon and within the `range` and above the horizon and within `horizon-blend`. Using opacity is recommended only for smoothly transitioning fog on/off as anything less than 100% opacity results in more tiles loaded and drawn.","sdk-support":{"basic functionality":{js:"2.3.0",android:"10.6.0",ios:"10.6.0"}}},"high-color":{type:"color","property-type":"data-constant",default:"#245cdf",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The color of the atmosphere region above the horizon, `high-color` extends further above the horizon than the `color` property and its spread can be controlled with `horizon-blend`. The opacity can be set to `0` to remove the high atmosphere color contribution.","sdk-support":{"basic functionality":{js:"2.9.0",android:"10.6.0",ios:"10.6.0"}}},"space-color":{type:"color","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The color of the region above the horizon and after the end of the `horizon-blend` contribution. The opacity can be set to `0` to have a transparent background.","sdk-support":{"basic functionality":{js:"2.9.0",android:"10.6.0",ios:"10.6.0"}}},"horizon-blend":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,.2,7,.1],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Horizon blend applies a smooth fade from the color of the atmosphere to the color of space. A value of zero leaves a sharp transition from atmosphere to space. Increasing the value blends the color of atmosphere into increasingly high angles of the sky.","sdk-support":{"basic functionality":{js:"2.3.0",android:"10.6.0",ios:"10.6.0"}}},"star-intensity":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],5,.35,6,0],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"A value controlling the star intensity where `0` will show no stars and `1` will show stars at their maximum intensity.","sdk-support":{"basic functionality":{js:"2.9.0",android:"10.6.0",ios:"10.6.0"}}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{doc:"The position of the light source is aligned to the rotation of the map."},viewport:{doc:"The position of the light source is aligned to the rotation of the viewport."}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},doc:"Whether extruded geometries are lit relative to the map or viewport.",example:"map","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).",example:[1.5,90,80],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Color tint for lighting extruded geometries.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},projection:{name:{type:"enum",values:{albers:{doc:"An Albers equal-area projection centered on the continental United States. You can configure the projection for a different region by setting `center` and `parallels` properties. You may want to set max bounds to constrain the map to the relevant region."},equalEarth:{doc:"An Equal Earth projection."},equirectangular:{doc:"An Equirectangular projection. This projection is very similar to the Plate Carrée projection."},lambertConformalConic:{doc:"A Lambert conformal conic projection. You can configure the projection for a region by setting `center` and `parallels` properties. You may want to set max bounds to constrain the map to the relevant region."},mercator:{doc:"The Mercator projection is the default projection."},naturalEarth:{doc:"A Natural Earth projection."},winkelTripel:{doc:"A Winkel Tripel projection."},globe:{doc:"A globe projection."}},default:"mercator",doc:"The name of the projection to be used for rendering the map.",required:!0,"sdk-support":{"basic functionality":{js:"2.6.0"}}},center:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-180,-90],maximum:[180,90],transition:!1,doc:"The reference longitude and latitude of the projection. `center` takes the form of [lng, lat]. This property is only configurable for conic projections (Albers and Lambert Conformal Conic). All other projections are centered on [0, 0].",example:[-96,37.5],requires:[{name:["albers","lambertConformalConic"]}],"sdk-support":{"basic functionality":{js:"2.6.0"}}},parallels:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-90,-90],maximum:[90,90],transition:!1,doc:"The standard parallels of the projection, denoting the desired latitude range with minimal distortion. `parallels` takes the form of [lat0, lat1]. This property is only configurable for conic projections (Albers and Lambert Conformal Conic).",example:[29.5,45.5],requires:[{name:["albers","lambertConformalConic"]}],"sdk-support":{"basic functionality":{js:"2.6.0"}}}},terrain:{source:{type:"string",doc:"Name of a source of `raster_dem` type to be used for terrain elevation.",required:!0,"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value.",requires:["source"],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,doc:"Whether or not the fill should be antialiased.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",doc:"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.",transition:!0,requires:[{"!":"fill-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",doc:"The outline color of the fill. Matches the value of `fill-color` if unspecified.",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.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",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{doc:"The fill is translated relative to the map."},viewport:{doc:"The fill is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-translate`.",default:"map",requires:["fill-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.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,doc:"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",doc:"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},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",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{doc:"The fill extrusion is translated relative to the map."},viewport:{doc:"The fill extrusion is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-extrusion-translate`.",default:"map",requires:["fill-extrusion-translate"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude this layer.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.",transition:!0,requires:["fill-extrusion-height"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,doc:"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.",transition:!1,"sdk-support":{"basic functionality":{js:"0.50.0",android:"7.0.0",ios:"4.7.0",macos:"0.13.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",doc:"The opacity at which the line will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",doc:"The color with which the line will be drawn.",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.23.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{doc:"The line is translated relative to the map."},viewport:{doc:"The line is translated relative to the viewport."}},doc:"Controls the frame of reference for `line-translate`.",default:"map",requires:["line-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",doc:"Stroke thickness.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,doc:"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,doc:"The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.12.1",android:"3.0.0",ios:"3.1.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Blur applied to the line, in pixels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",doc:"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",doc:'Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.',transition:!1,requires:[{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.4.0",macos:"0.11.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{type:"array",value:"number",doc:"The line part between [trim-start, trim-end] will be marked as transparent to make a route vanishing effect. The line trim-off offset is based on the whole line range [0.0, 1.0].",length:2,default:[0,0],minimum:[0,0],maximum:[1,1],transition:!1,requires:[{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"2.9.0",android:"10.5.0",ios:"10.5.0",macos:"10.5.0"}},"property-type":"constant"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",doc:"Circle radius.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",doc:"The fill color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,doc:"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",doc:"The opacity at which the circle will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.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",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{doc:"The circle is translated relative to the map."},viewport:{doc:"The circle is translated relative to the viewport."}},doc:"Controls the frame of reference for `circle-translate`.",default:"map",requires:["circle-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{doc:"Circles are scaled according to their apparent distance to the camera."},viewport:{doc:"Circles are not scaled."}},default:"map",doc:"Controls the scaling behavior of the circle when the map is pitched.","sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{doc:"The circle is aligned to the plane of the map."},viewport:{doc:"The circle is aligned to the plane of the viewport."}},default:"viewport",doc:"Orientation of circle when map is pitched.","sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.","sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",doc:"The stroke color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",doc:"The opacity of the circle's stroke.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.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",doc:"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed. `queryRenderedFeatures` on heatmap layers will return points within this radius.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,doc:"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,doc:"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.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"],doc:'Defines the color of each pixel based on its density value in a heatmap. Should be an expression that uses `["heatmap-density"]` as input.',transition:!1,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",doc:"The global opacity at which the heatmap layer will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{doc:"The opacity at which the icon will be drawn.",type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,doc:"The color of the icon. This can only be used with [SDF icons](/help/troubleshooting/using-recolorable-images-in-mapbox-maps/).",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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,doc:"The color of the icon's halo. Icon halos can only be used with [SDF icons](/help/troubleshooting/using-recolorable-images-in-mapbox-maps/).",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"Distance of halo to the icon outline.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"Fade out the halo towards the outside.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{doc:"Icons are translated relative to the map."},viewport:{doc:"Icons are translated relative to the viewport."}},doc:"Controls the frame of reference for `icon-translate`.",default:"map",requires:["icon-image","icon-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",doc:"The opacity at which the text will be drawn.",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",doc:"The color with which the text will be drawn.",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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,doc:"The color of the text's halo, which helps it stand out from backgrounds.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"The halo's fadeout distance towards the outside.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},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",doc:"Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{doc:"The text is translated relative to the map."},viewport:{doc:"The text is translated relative to the viewport."}},doc:"Controls the frame of reference for `text-translate`.",default:"map",requires:["text-field","text-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",doc:"The opacity at which the image will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",doc:"Rotates hues around the color wheel.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the minimum brightness.",default:0,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the maximum brightness.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",doc:"Increase or reduce the saturation of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",doc:"Increase or reduce the contrast of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",doc:"The resampling/interpolation method to use for overscaling, also known as texture magnification filter",values:{linear:{doc:"(Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled"},nearest:{doc:"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled"}},default:"linear","sdk-support":{"basic functionality":{js:"0.47.0",android:"6.3.0",ios:"4.2.0",macos:"0.9.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",doc:"Fade duration when a new tile is added.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,doc:"The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.",transition:!1,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{doc:"The hillshade illumination is relative to the north direction."},viewport:{doc:"The hillshade illumination is relative to the top of the viewport."}},default:"viewport",doc:"Direction of light source when map is rotated.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",doc:"Intensity of the hillshade",default:.5,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",doc:"The shading color of areas that face away from the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",doc:"The shading color of areas that faces towards the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",doc:"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",doc:"The color with which the background will be drawn.",transition:!0,requires:[{"!":"background-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity at which the background will be drawn.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{doc:"Renders the sky with a gradient that can be configured with `sky-gradient-radius` and `sky-gradient`."},atmosphere:{doc:"Renders the sky with a simulated atmospheric scattering algorithm, the sun direction can be attached to the light position or explicitly set through `sky-atmosphere-sun`."}},default:"atmosphere",doc:"The type of the sky","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,doc:"Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0° is directly above, at zenith, and 90° at the horizon. When this property is ommitted, the sun center is directly inherited from the light position.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,doc:"Intensity of the sun as a light source in the atmosphere (on a scale from 0 to a 100). Setting higher values will brighten up the sky.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,doc:"Position of the gradient center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the gradient center relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0° is directly above, at zenith, and 90° at the horizon.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,doc:"The angular distance (measured in degrees) from `sky-gradient-center` up to which the gradient extends. A value of 180 causes the gradient to wrap around to the opposite direction from `sky-gradient-center`.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],doc:"Defines a radial color gradient with which to color the sky. The color values can be interpolated with an expression using `sky-radial-progress`. The range [0, 1] for the interpolant covers a radial distance (in degrees) of [0, `sky-gradient-radius`] centered at the position specified by `sky-gradient-center`.",transition:!1,requires:[{"sky-type":"gradient"}],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",doc:"A color applied to the atmosphere sun halo. The alpha channel describes how strongly the sun halo is represented in an atmosphere sky layer.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",doc:"A color used to tweak the main atmospheric scattering coefficients. Using white applies the default coefficients giving the natural blue color to the atmosphere. This color affects how heavily the corresponding wavelength is represented during scattering. The alpha channel describes the density of the atmosphere, with 1 maximum density and 0 no density.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"data-constant"},"sky-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire sky layer.",transition:!0,"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds",doc:"Time allotted for transitions to complete."},delay:{type:"number",default:0,minimum:0,units:"milliseconds",doc:"Length of time before a transition begins."}},"property-type":{"data-driven":{type:"property-type",doc:"Property is interpolable and can be represented using a property expression."},"cross-faded":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms."},"cross-faded-data-driven":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms. It can be represented using a property expression."},"color-ramp":{type:"property-type",doc:"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation."},"data-constant":{type:"property-type",doc:"Property is interpolable but cannot be represented using a property expression."},constant:{type:"property-type",doc:"Property is constant across all zoom levels and property values."}},promoteId:{"*":{type:"string",doc:"A name of a feature property to use as ID for feature state."}}},i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){var t={exports:{}};return e(t,t.exports),t.exports}var a=n((function(e,t){!function(o){var r=t&&!t.nodeType&&t,n=e&&!e.nodeType&&e,a="object"==typeof i&&i;a.global!==a&&a.window!==a&&a.self!==a||(o=a);var s,l,u=2147483647,c=36,p=/^xn--/,d=/[^\x20-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,y=String.fromCharCode;function g(e){throw RangeError(f[e])}function b(e,t){for(var o=e.length,r=[];o--;)r[o]=t(e[o]);return r}function v(e,t){var o=e.split("@"),r="";return o.length>1&&(r=o[0]+"@",e=o[1]),r+b((e=e.replace(h,".")).split("."),t).join(".")}function x(e){for(var t,o,r=[],i=0,n=e.length;i=55296&&t<=56319&&i65535&&(t+=y((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+y(e)})).join("")}function k(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function j(e,t,o){var r=0;for(e=o?m(e/700):e>>1,e+=m(e/t);e>455;r+=c)e=m(e/35);return m(r+36*e/(e+38))}function T(e){var t,o,r,i,n,a,s,l,p,d,h,f=[],y=e.length,b=0,v=128,x=72;for((o=e.lastIndexOf("-"))<0&&(o=0),r=0;r=128&&g("not-basic"),f.push(e.charCodeAt(r));for(i=o>0?o+1:0;i=y&&g("invalid-input"),((l=(h=e.charCodeAt(i++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:c)>=c||l>m((u-b)/a))&&g("overflow"),b+=l*a,!(l<(p=s<=x?1:s>=x+26?26:s-x));s+=c)a>m(u/(d=c-p))&&g("overflow"),a*=d;x=j(b-n,t=f.length+1,0==n),m(b/t)>u-v&&g("overflow"),v+=m(b/t),b%=t,f.splice(b++,0,v)}return w(f)}function z(e){var t,o,r,i,n,a,s,l,p,d,h,f,b,v,w,T=[];for(f=(e=x(e)).length,t=128,o=0,n=72,a=0;a=t&&hm((u-o)/(b=r+1))&&g("overflow"),o+=(s-t)*b,t=s,a=0;au&&g("overflow"),h==t){for(l=o,p=c;!(l<(d=p<=n?1:p>=n+26?26:p-n));p+=c)w=l-d,v=c-d,T.push(y(k(d+w%v,0))),l=m(w/v);T.push(y(k(l,0))),n=j(o,b,r==i),o=0,++r}++o,++t}return T.join("")}if(s={version:"1.3.2",ucs2:{decode:x,encode:w},decode:T,encode:z,toASCII:function(e){return v(e,(function(e){return d.test(e)?"xn--"+z(e):e}))},toUnicode:function(e){return v(e,(function(e){return p.test(e)?T(e.slice(4).toLowerCase()):e}))}},r&&n)if(e.exports==r)n.exports=s;else for(l in s)s.hasOwnProperty(l)&&(r[l]=s[l]);else o.punycode=s}(i)})),s=function(e){return"string"==typeof e},l=function(e){return"object"==typeof e&&null!==e},u=function(e){return null===e};function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var p=function(e,t,o,r){t=t||"&",o=o||"=";var i={};if("string"!=typeof e||0===e.length)return i;var n=/\+/g;e=e.split(t);var a=1e3;r&&"number"==typeof r.maxKeys&&(a=r.maxKeys);var s=e.length;a>0&&s>a&&(s=a);for(var l=0;l=0?(u=f.substr(0,m),p=f.substr(m+1)):(u=f,p=""),d=decodeURIComponent(u),h=decodeURIComponent(p),c(i,d)?Array.isArray(i[d])?i[d].push(h):i[d]=[i[d],h]:i[d]=h}return i},d=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},h=function(e,t,o,r){return t=t||"&",o=o||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(r){var i=encodeURIComponent(d(r))+o;return Array.isArray(e[r])?e[r].map((function(e){return i+encodeURIComponent(d(e))})).join(t):i+encodeURIComponent(d(e[r]))})).join(t):r?encodeURIComponent(d(r))+o+encodeURIComponent(d(e)):""},f=n((function(e,t){t.decode=t.parse=p,t.encode=t.stringify=h}));function m(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var y=/^([a-z0-9.+-]+:)/i,g=/:[0-9]*$/,b=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,v=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),x=["'"].concat(v),w=["%","/","?",";","#"].concat(x),k=["/","?","#"],j=/^[+a-z0-9A-Z_-]{0,63}$/,T=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,z={javascript:!0,"javascript:":!0},_={javascript:!0,"javascript:":!0},A={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function C(e,...t){for(const o of t)for(const t in o)e[t]=o[t];return e}m.prototype.parse=function(e,t,o){if(!s(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),i=-1!==r&&r127?I+="x":I+=R[q];if(!I.match(j)){var D=S.slice(0,v),L=S.slice(v+1),M=R.match(T);M&&(D.push(M[1]),L.unshift(M[2])),L.length&&(l="/"+L.join(".")+l),this.hostname=D.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),E||(this.hostname=a.toASCII(this.hostname));var P=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+P,this.href+=this.host,E&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==l[0]&&(l="/"+l))}if(!z[p])for(v=0,O=x.length;v0)&&o.host.split("@"))&&(o.auth=S.shift(),o.host=o.hostname=S.shift())),o.search=e.search,o.query=e.query,u(o.pathname)&&u(o.search)||(o.path=(o.pathname?o.pathname:"")+(o.search?o.search:"")),o.href=o.format(),o;if(!k.length)return o.pathname=null,o.search?o.path="/"+o.search:o.path=null,o.href=o.format(),o;for(var T=k.slice(-1)[0],z=(o.host||e.host||k.length>1)&&("."===T||".."===T)||""===T,C=0,E=k.length;E>=0;E--)"."===(T=k[E])?k.splice(E,1):".."===T?(k.splice(E,1),C++):C&&(k.splice(E,1),C--);if(!x&&!w)for(;C--;C)k.unshift("..");!x||""===k[0]||k[0]&&"/"===k[0].charAt(0)||k.unshift(""),z&&"/"!==k.join("/").substr(-1)&&k.push("");var S,O=""===k[0]||k[0]&&"/"===k[0].charAt(0);return j&&(o.hostname=o.host=O?"":k.length?k.shift():"",(S=!!(o.host&&o.host.indexOf("@")>0)&&o.host.split("@"))&&(o.auth=S.shift(),o.host=o.hostname=S.shift())),(x=x||o.host&&k.length)&&!O&&k.unshift(""),k.length?o.pathname=k.join("/"):(o.pathname=null,o.path=null),u(o.pathname)&&u(o.search)||(o.path=(o.pathname?o.pathname:"")+(o.search?o.search:"")),o.auth=e.auth||o.auth,o.slashes=o.slashes||e.slashes,o.href=o.format(),o},m.prototype.parseHost=function(){var e=this.host,t=g.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};class E extends Error{constructor(e,t){super(t),this.message=t,this.key=e}}var S=E;class O{constructor(e,t=[]){this.parent=e,this.bindings={};for(const[e,o]of t)this.bindings[e]=o}concat(e){return new O(this,e)}get(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.`)}has(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)}}var R=O;const I={kind:"null"},q={kind:"number"},N={kind:"string"},D={kind:"boolean"},L={kind:"color"},M={kind:"object"},P={kind:"value"},F={kind:"collator"},$={kind:"formatted"},U={kind:"resolvedImage"};function B(e,t){return{kind:"array",itemType:e,N:t}}function J(e){if("array"===e.kind){const t=J(e.itemType);return"number"==typeof e.N?`array<${t}, ${e.N}>`:"value"===e.itemType.kind?"array":`array<${t}>`}return e.kind}const W=[I,q,N,D,L,$,M,B(P),U];function G(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!G(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(const e of W)if(!G(e,t))return null}return`Expected ${J(e)} but found ${J(t)} instead.`}function H(e,t){return t.some((t=>t.kind===e.kind))}function V(e,t){return t.some((t=>"null"===t?null===e:"array"===t?Array.isArray(e):"object"===t?e&&!Array.isArray(e)&&"object"==typeof e:t===typeof e))}var Z=n((function(e,t){var o={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 n(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,o){return o<0?o+=1:o>1&&(o-=1),6*o<1?e+(t-e)*o*6:2*o<1?t:3*o<2?e+(t-e)*(2/3-o)*6:e}try{t.parseCSSColor=function(e){var t,i=e.replace(/ /g,"").toLowerCase();if(i in o)return o[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("("),u=i.indexOf(")");if(-1!==l&&u+1===i.length){var c=i.substr(0,l),p=i.substr(l+1,u-(l+1)).split(","),d=1;switch(c){case"rgba":if(4!==p.length)return null;d=a(p.pop());case"rgb":return 3!==p.length?null:[n(p[0]),n(p[1]),n(p[2]),d];case"hsla":if(4!==p.length)return null;d=a(p.pop());case"hsl":if(3!==p.length)return null;var h=(parseFloat(p[0])%360+360)%360/360,f=a(p[1]),m=a(p[2]),y=m<=.5?m*(f+1):m+f-m*f,g=2*m-y;return[r(255*s(g,y,h+1/3)),r(255*s(g,y,h)),r(255*s(g,y,h-1/3)),d];default:return null}}return null}}catch(e){}}));class X{constructor(e,t,o,r=1){this.r=e,this.g=t,this.b=o,this.a=r}static parse(e){if(!e)return;if(e instanceof X)return e;if("string"!=typeof e)return;const t=Z.parseCSSColor(e);return t?new X(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3]):void 0}toString(){const[e,t,o,r]=this.toArray();return`rgba(${Math.round(e)},${Math.round(t)},${Math.round(o)},${r})`}toArray(){const{r:e,g:t,b:o,a:r}=this;return 0===r?[0,0,0,0]:[255*e/r,255*t/r,255*o/r,r]}toArray01(){const{r:e,g:t,b:o,a:r}=this;return 0===r?[0,0,0,0]:[e/r,t/r,o/r,r]}toArray01PremultipliedAlpha(){const{r:e,g:t,b:o,a:r}=this;return[e,t,o,r]}}X.black=new X(0,0,0,1),X.white=new X(1,1,1,1),X.transparent=new X(0,0,0,0),X.red=new X(1,0,0,1),X.blue=new X(0,0,1,1);var Y=X;class K{constructor(e,t,o){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=o,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Q{constructor(e,t,o,r,i){this.text=e.normalize?e.normalize():e,this.image=t,this.scale=o,this.fontStack=r,this.textColor=i}}class ee{constructor(e){this.sections=e}static fromString(e){return new ee([new Q(e,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some((e=>0!==e.text.length||e.image&&0!==e.image.name.length))}static factory(e){return e instanceof ee?e:ee.fromString(e)}toString(){return 0===this.sections.length?"":this.sections.map((e=>e.text)).join("")}serialize(){const e=["format"];for(const t of this.sections){if(t.image){e.push(["image",t.image.name]);continue}e.push(t.text);const o={};t.fontStack&&(o["text-font"]=["literal",t.fontStack.split(",")]),t.scale&&(o["font-scale"]=t.scale),t.textColor&&(o["text-color"]=["rgba"].concat(t.textColor.toArray())),e.push(o)}return e}}class te{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new te({name:e,available:!1}):null}serialize(){return["image",this.name]}}function oe(e,t,o,r){return"number"==typeof e&&e>=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof o&&o>=0&&o<=255?void 0===r||"number"==typeof r&&r>=0&&r<=1?null:`Invalid rgba value [${[e,t,o,r].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof r?[e,t,o,r]:[e,t,o]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function re(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 Y)return!0;if(e instanceof K)return!0;if(e instanceof ee)return!0;if(e instanceof te)return!0;if(Array.isArray(e)){for(const t of e)if(!re(t))return!1;return!0}if("object"==typeof e){for(const t in e)if(!re(e[t]))return!1;return!0}return!1}function ie(e){if(null===e)return I;if("string"==typeof e)return N;if("boolean"==typeof e)return D;if("number"==typeof e)return q;if(e instanceof Y)return L;if(e instanceof K)return F;if(e instanceof ee)return $;if(e instanceof te)return U;if(Array.isArray(e)){const t=e.length;let o;for(const t of e){const e=ie(t);if(o){if(o===e)continue;o=P;break}o=e}return B(o||P,t)}return M}function ne(e){const t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof Y||e instanceof ee||e instanceof te?e.toString():JSON.stringify(e)}class ae{constructor(e,t){this.type=e,this.value=t}static parse(e,t){if(2!==e.length)return t.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!re(e[1]))return t.error("invalid value");const o=e[1];let r=ie(o);const i=t.expectedType;return"array"!==r.kind||0!==r.N||!i||"array"!==i.kind||"number"==typeof i.N&&0!==i.N||(r=i),new ae(r,o)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof Y?["rgba"].concat(this.value.toArray()):this.value instanceof ee?this.value.serialize():this.value}}var se=ae,le=class{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}};const ue={string:N,number:q,boolean:D,object:M};class ce{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let o,r=1;const i=e[0];if("array"===i){let i,n;if(e.length>2){const o=e[1];if("string"!=typeof o||!(o in ue)||"object"===o)return t.error('The item type argument of "array" must be one of string, number, boolean',1);i=ue[o],r++}else i=P;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);n=e[2],r++}o=B(i,n)}else o=ue[i];const n=[];for(;re.outputDefined()))}serialize(){const e=this.type,t=[e.kind];if("array"===e.kind){const o=e.itemType;if("string"===o.kind||"number"===o.kind||"boolean"===o.kind){t.push(o.kind);const r=e.N;("number"==typeof r||this.args.length>1)&&t.push(r)}}return t.concat(this.args.map((e=>e.serialize())))}}var pe=ce;class de{constructor(e){this.type=$,this.sections=e}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const o=e[1];if(!Array.isArray(o)&&"object"==typeof o)return t.error("First argument must be an image or text section.");const r=[];let i=!1;for(let o=1;o<=e.length-1;++o){const n=e[o];if(i&&"object"==typeof n&&!Array.isArray(n)){i=!1;let e=null;if(n["font-scale"]&&(e=t.parse(n["font-scale"],1,q),!e))return null;let o=null;if(n["text-font"]&&(o=t.parse(n["text-font"],1,B(N)),!o))return null;let a=null;if(n["text-color"]&&(a=t.parse(n["text-color"],1,L),!a))return null;const s=r[r.length-1];s.scale=e,s.font=o,s.textColor=a}else{const n=t.parse(e[o],1,P);if(!n)return null;const a=n.type.kind;if("string"!==a&&"value"!==a&&"null"!==a&&"resolvedImage"!==a)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,r.push({content:n,scale:null,font:null,textColor:null})}}return new de(r)}evaluate(e){return new ee(this.sections.map((t=>{const o=t.content.evaluate(e);return ie(o)===U?new Q("",o,null,null,null):new Q(ne(o),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)})))}eachChild(e){for(const t of this.sections)e(t.content),t.scale&&e(t.scale),t.font&&e(t.font),t.textColor&&e(t.textColor)}outputDefined(){return!1}serialize(){const e=["format"];for(const t of this.sections){e.push(t.content.serialize());const o={};t.scale&&(o["font-scale"]=t.scale.serialize()),t.font&&(o["text-font"]=t.font.serialize()),t.textColor&&(o["text-color"]=t.textColor.serialize()),e.push(o)}return e}}class he{constructor(e){this.type=U,this.input=e}static parse(e,t){if(2!==e.length)return t.error("Expected two arguments.");const o=t.parse(e[1],1,N);return o?new he(o):t.error("No image name provided.")}evaluate(e){const t=this.input.evaluate(e),o=te.fromString(t);return o&&e.availableImages&&(o.available=e.availableImages.indexOf(t)>-1),o}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){return["image",this.input.serialize()]}}const fe={"to-boolean":D,"to-color":L,"to-number":q,"to-string":N};class me{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const o=e[0];if(("to-boolean"===o||"to-string"===o)&&2!==e.length)return t.error("Expected one argument.");const r=fe[o],i=[];for(let o=1;o4?`Invalid rbga value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:oe(t[0],t[1],t[2],t[3]),!o))return new Y(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new le(o||`Could not parse color from value '${"string"==typeof t?t:String(JSON.stringify(t))}'`)}if("number"===this.type.kind){let t=null;for(const o of this.args){if(t=o.evaluate(e),null===t)return 0;const r=Number(t);if(!isNaN(r))return r}throw new le(`Could not convert ${JSON.stringify(t)} to number.`)}return"formatted"===this.type.kind?ee.fromString(ne(this.args[0].evaluate(e))):"resolvedImage"===this.type.kind?te.fromString(ne(this.args[0].evaluate(e))):ne(this.args[0].evaluate(e))}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every((e=>e.outputDefined()))}serialize(){if("formatted"===this.type.kind)return new de([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new he(this.args[0]).serialize();const e=[`to-${this.type.kind}`];return this.eachChild((t=>{e.push(t.serialize())})),e}}var ye=me;const ge=["Unknown","Point","LineString","Polygon"];var be=class{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null}id(){return this.feature&&"id"in this.feature&&this.feature.id?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?ge[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){const e=this.featureDistanceData.center,t=this.featureDistanceData.scale,{x:o,y:r}=this.featureTileCoord,i=o*t-e[0],n=r*t-e[1];return this.featureDistanceData.bearing[0]*i+this.featureDistanceData.bearing[1]*n}return 0}parseColor(e){let t=this._parseColorCache[e];return t||(t=this._parseColorCache[e]=Y.parse(e)),t}};class ve{constructor(e,t,o,r){this.name=e,this.type=t,this._evaluate=o,this.args=r}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map((e=>e.serialize())))}static parse(e,t){const o=e[0],r=ve.definitions[o];if(!r)return t.error(`Unknown expression "${o}". If you wanted a literal array, use ["literal", [...]].`,0);const i=Array.isArray(r)?r[0]:r.type,n=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,a=n.filter((([t])=>!Array.isArray(t)||t.length===e.length-1));let s=null;for(const[r,n]of a){s=new He(t.registry,t.path,null,t.scope);const a=[];let l=!1;for(let t=1;t{return t=e,Array.isArray(t)?`(${t.map(J).join(", ")})`:`(${J(t.type)}...)`;var t})).join(" | "),r=[];for(let o=1;o=t[2]||e[1]<=t[1]||e[3]>=t[3])}function ze(e,t){const o=(180+e[0])/360,r=(i=e[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i*Math.PI/360)))/360);var i;const n=Math.pow(2,t.z);return[Math.round(o*n*ke),Math.round(r*n*ke)]}function _e(e,t,o){const r=e[0]-t[0],i=e[1]-t[1],n=e[0]-o[0],a=e[1]-o[1];return r*a-n*i==0&&r*n<=0&&i*a<=0}function Ae(e,t){let o=!1;for(let a=0,s=t.length;ar[1]!=n[1]>r[1]&&r[0]<(n[0]-i[0])*(r[1]-i[1])/(n[1]-i[1])+i[0]&&(o=!o)}}var r,i,n;return o}function Ce(e,t){for(let o=0;o0&&p<0||c<0&&p>0}function Se(e,t,o,r){const i=[t[0]-e[0],t[1]-e[1]];return 0!=(n=[r[0]-o[0],r[1]-o[1]])[0]*(a=i)[1]-n[1]*a[0]&&!(!Ee(e,t,o,r)||!Ee(o,r,e,t));var n,a}function Oe(e,t,o){for(const r of o)for(let o=0;oo[2]){const t=.5*r;let i=e[0]-o[0]>t?-r:o[0]-e[0]>t?r:0;0===i&&(i=e[0]-o[2]>t?-r:o[2]-e[0]>t?r:0),e[0]+=i}je(t,e)}function Le(e,t,o,r){const i=Math.pow(2,r.z)*ke,n=[r.x*ke,r.y*ke],a=[];if(!e)return a;for(const r of e)for(const e of r){const r=[e.x+n[0],e.y+n[1]];De(r,t,o,i),a.push(r)}return a}function Me(e,t,o,r){const i=Math.pow(2,r.z)*ke,n=[r.x*ke,r.y*ke],a=[];if(!e)return a;for(const o of e){const e=[];for(const r of o){const o=[r.x+n[0],r.y+n[1]];je(t,o),e.push(o)}a.push(e)}if(t[2]-t[0]<=i/2){(s=t)[0]=s[1]=1/0,s[2]=s[3]=-1/0;for(const e of a)for(const r of e)De(r,t,o,i)}var s;return a}class Pe{constructor(e,t){this.type=D,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(re(e[1])){const t=e[1];if("FeatureCollection"===t.type)for(let e=0;e{t&&!$e(e)&&(t=!1)})),t}function Ue(e){if(e instanceof xe&&"feature-state"===e.name)return!1;let t=!0;return e.eachChild((e=>{t&&!Ue(e)&&(t=!1)})),t}function Be(e,t){if(e instanceof xe&&t.indexOf(e.name)>=0)return!1;let o=!0;return e.eachChild((e=>{o&&!Be(e,t)&&(o=!1)})),o}class Je{constructor(e,t){this.type=t.type,this.name=e,this.boundExpression=t}static parse(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");const o=e[1];return t.scope.has(o)?new Je(o,t.scope.get(o)):t.error(`Unknown variable "${o}". Make sure "${o}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}var We=Je;class Ge{constructor(e,t=[],o,r=new R,i=[]){this.registry=e,this.path=t,this.key=t.map((e=>`[${e}]`)).join(""),this.scope=r,this.errors=i,this.expectedType=o}parse(e,t,o,r,i={}){return t?this.concat(t,o,r)._parse(e,i):this._parse(e,i)}_parse(e,t){function o(e,t,o){return"assert"===o?new pe(t,[e]):"coerce"===o?new ye(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", []].');const 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;const i=this.registry[r];if(i){let r=i.parse(e,this);if(!r)return null;if(this.expectedType){const e=this.expectedType,i=r.type;if("string"!==e.kind&&"number"!==e.kind&&"boolean"!==e.kind&&"object"!==e.kind&&"array"!==e.kind||"value"!==i.kind)if("color"!==e.kind&&"formatted"!==e.kind&&"resolvedImage"!==e.kind||"value"!==i.kind&&"string"!==i.kind){if(this.checkSubtype(e,i))return null}else r=o(r,e,t.typeAnnotation||"coerce");else r=o(r,e,t.typeAnnotation||"assert")}if(!(r instanceof se)&&"resolvedImage"!==r.type.kind&&Ve(r)){const e=new be;try{r=new se(r.type,r.evaluate(e))}catch(e){return this.error(e.message),null}}return r}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.`)}concat(e,t,o){const r="number"==typeof e?this.path.concat(e):this.path,i=o?this.scope.concat(o):this.scope;return new Ge(this.registry,r,t||null,i,this.errors)}error(e,...t){const o=`${this.key}${t.map((e=>`[${e}]`)).join("")}`;this.errors.push(new S(o,e))}checkSubtype(e,t){const o=G(e,t);return o&&this.error(o),o}}var He=Ge;function Ve(e){if(e instanceof We)return Ve(e.boundExpression);if(e instanceof xe&&"error"===e.name)return!1;if(e instanceof we)return!1;if(e instanceof Fe)return!1;const t=e instanceof ye||e instanceof pe;let o=!0;return e.eachChild((e=>{o=t?o&&Ve(e):o&&e instanceof se})),!!o&&$e(e)&&Be(e,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"])}function Ze(e,t){const o=e.length-1;let r,i,n=0,a=o,s=0;for(;n<=a;)if(s=Math.floor((n+a)/2),r=e[s],i=e[s+1],r<=t){if(s===o||tt))throw new le("Input is not a number.");a=s-1}return 0}class Xe{constructor(e,t,o){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(const[e,t]of o)this.labels.push(e),this.outputs.push(t)}static parse(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.");const o=t.parse(e[1],1,q);if(!o)return null;const r=[];let i=null;t.expectedType&&"value"!==t.expectedType.kind&&(i=t.expectedType);for(let o=1;o=n)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',s);const u=t.parse(a,l,i);if(!u)return null;i=i||u.type,r.push([n,u])}return new Xe(i,o,r)}evaluate(e){const t=this.labels,o=this.outputs;if(1===t.length)return o[0].evaluate(e);const r=this.input.evaluate(e);if(r<=t[0])return o[0].evaluate(e);const i=t.length;return r>=t[i-1]?o[i-1].evaluate(e):o[Ze(t,r)].evaluate(e)}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every((e=>e.outputDefined()))}serialize(){const e=["step",this.input.serialize()];for(let t=0;t0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e}}var Ye=Xe,Ke=Qe;function Qe(e,t,o,r){this.cx=3*e,this.bx=3*(o-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=o,this.p2y=r}function et(e,t,o){return e*(1-o)+t*o}Qe.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e},Qe.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e},Qe.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},Qe.prototype.solveCurveX=function(e,t){var o,r,i,n,a;for(void 0===t&&(t=1e-6),i=e,a=0;a<8;a++){if(n=this.sampleCurveX(i)-e,Math.abs(n)(r=1))return r;for(;on?o=i:r=i,i=.5*(r-o)+o}return i},Qe.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var tt=Object.freeze({__proto__:null,number:et,color:function(e,t,o){return new Y(et(e.r,t.r,o),et(e.g,t.g,o),et(e.b,t.b,o),et(e.a,t.a,o))},array:function(e,t,o){return e.map(((e,r)=>et(e,t[r],o)))}});const ot=.95047,rt=1.08883,it=4/29,nt=6/29,at=3*nt*nt,st=Math.PI/180,lt=180/Math.PI;function ut(e){return e>.008856451679035631?Math.pow(e,1/3):e/at+it}function ct(e){return e>nt?e*e*e:at*(e-it)}function pt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function dt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function ht(e){const t=dt(e.r),o=dt(e.g),r=dt(e.b),i=ut((.4124564*t+.3575761*o+.1804375*r)/ot),n=ut((.2126729*t+.7151522*o+.072175*r)/1);return{l:116*n-16,a:500*(i-n),b:200*(n-ut((.0193339*t+.119192*o+.9503041*r)/rt)),alpha:e.a}}function ft(e){let t=(e.l+16)/116,o=isNaN(e.a)?t:t+e.a/500,r=isNaN(e.b)?t:t-e.b/200;return t=1*ct(t),o=ot*ct(o),r=rt*ct(r),new Y(pt(3.2404542*o-1.5371385*t-.4985314*r),pt(-.969266*o+1.8760108*t+.041556*r),pt(.0556434*o-.2040259*t+1.0572252*r),e.alpha)}function mt(e,t,o){const r=t-e;return e+o*(r>180||r<-180?r-360*Math.round(r/360):r)}const yt={forward:ht,reverse:ft,interpolate:function(e,t,o){return{l:et(e.l,t.l,o),a:et(e.a,t.a,o),b:et(e.b,t.b,o),alpha:et(e.alpha,t.alpha,o)}}},gt={forward:function(e){const{l:t,a:o,b:r}=ht(e),i=Math.atan2(r,o)*lt;return{h:i<0?i+360:i,c:Math.sqrt(o*o+r*r),l:t,alpha:e.a}},reverse:function(e){const t=e.h*st,o=e.c;return ft({l:e.l,a:Math.cos(t)*o,b:Math.sin(t)*o,alpha:e.alpha})},interpolate:function(e,t,o){return{h:mt(e.h,t.h,o),c:et(e.c,t.c,o),l:et(e.l,t.l,o),alpha:et(e.alpha,t.alpha,o)}}};var bt=Object.freeze({__proto__:null,lab:yt,hcl:gt});class vt{constructor(e,t,o,r,i){this.type=e,this.operator=t,this.interpolation=o,this.input=r,this.labels=[],this.outputs=[];for(const[e,t]of i)this.labels.push(e),this.outputs.push(t)}static interpolationFactor(e,t,o,r){let i=0;if("exponential"===e.name)i=xt(t,e.base,o,r);else if("linear"===e.name)i=xt(t,1,o,r);else if("cubic-bezier"===e.name){const n=e.controlPoints;i=new Ke(n[0],n[1],n[2],n[3]).solve(xt(t,1,o,r))}return i}static parse(e,t){let[o,r,i,...n]=e;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]){const e=r[1];if("number"!=typeof e)return t.error("Exponential interpolation requires a numeric base.",1,1);r={name:"exponential",base:e}}else{if("cubic-bezier"!==r[0])return t.error(`Unknown interpolation type ${String(r[0])}`,1,0);{const e=r.slice(1);if(4!==e.length||e.some((e=>"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:e}}}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,q),!i)return null;const a=[];let s=null;"interpolate-hcl"===o||"interpolate-lab"===o?s=L:t.expectedType&&"value"!==t.expectedType.kind&&(s=t.expectedType);for(let e=0;e=o)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',i);const u=t.parse(r,l,s);if(!u)return null;s=s||u.type,a.push([o,u])}return"number"===s.kind||"color"===s.kind||"array"===s.kind&&"number"===s.itemType.kind&&"number"==typeof s.N?new vt(s,o,r,i,a):t.error(`Type ${J(s)} is not interpolatable.`)}evaluate(e){const t=this.labels,o=this.outputs;if(1===t.length)return o[0].evaluate(e);const r=this.input.evaluate(e);if(r<=t[0])return o[0].evaluate(e);const i=t.length;if(r>=t[i-1])return o[i-1].evaluate(e);const n=Ze(t,r),a=t[n],s=t[n+1],l=vt.interpolationFactor(this.interpolation,r,a,s),u=o[n].evaluate(e),c=o[n+1].evaluate(e);return"interpolate"===this.operator?tt[this.type.kind.toLowerCase()](u,c,l):"interpolate-hcl"===this.operator?gt.reverse(gt.interpolate(gt.forward(u),gt.forward(c),l)):yt.reverse(yt.interpolate(yt.forward(u),yt.forward(c),l))}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every((e=>e.outputDefined()))}serialize(){let 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);const t=[this.operator,e,this.input.serialize()];for(let e=0;eG(r,e.type)));return new kt(n?P:o,i)}evaluate(e){let t,o=null,r=0;for(const i of this.args){if(r++,o=i.evaluate(e),o&&o instanceof te&&!o.available&&(t||(t=o),o=null,r===this.args.length))return t;if(null!==o)break}return o}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every((e=>e.outputDefined()))}serialize(){const e=["coalesce"];return this.eachChild((t=>{e.push(t.serialize())})),e}}var jt=kt;class Tt{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const t of this.bindings)e(t[1]);e(this.result)}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const o=[];for(let r=1;r=o.length)throw new le(`Array index out of bounds: ${t} > ${o.length-1}.`);if(t!==Math.floor(t))throw new le(`Array index must be an integer, but found ${t} instead.`);return o[t]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}var At=_t;class Ct{constructor(e,t){this.type=D,this.needle=e,this.haystack=t}static parse(e,t){if(3!==e.length)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const o=t.parse(e[1],1,P),r=t.parse(e[2],2,P);return o&&r?H(o.type,[D,N,q,I,P])?new Ct(o,r):t.error(`Expected first argument to be of type boolean, string, number or null, but found ${J(o.type)} instead`):null}evaluate(e){const t=this.needle.evaluate(e),o=this.haystack.evaluate(e);if(null==o)return!1;if(!V(t,["boolean","string","number","null"]))throw new le(`Expected first argument to be of type boolean, string, number or null, but found ${J(ie(t))} instead.`);if(!V(o,["string","array"]))throw new le(`Expected second argument to be of type array or string, but found ${J(ie(o))} instead.`);return o.indexOf(t)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}var Et=Ct;class St{constructor(e,t,o){this.type=q,this.needle=e,this.haystack=t,this.fromIndex=o}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const o=t.parse(e[1],1,P),r=t.parse(e[2],2,P);if(!o||!r)return null;if(!H(o.type,[D,N,q,I,P]))return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${J(o.type)} instead`);if(4===e.length){const i=t.parse(e[3],3,q);return i?new St(o,r,i):null}return new St(o,r)}evaluate(e){const t=this.needle.evaluate(e),o=this.haystack.evaluate(e);if(!V(t,["boolean","string","number","null"]))throw new le(`Expected first argument to be of type boolean, string, number or null, but found ${J(ie(t))} instead.`);if(!V(o,["string","array"]))throw new le(`Expected second argument to be of type array or string, but found ${J(ie(o))} instead.`);if(this.fromIndex){const r=this.fromIndex.evaluate(e);return o.indexOf(t,r)}return o.indexOf(t)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}serialize(){if(null!=this.fromIndex&&void 0!==this.fromIndex){const e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}var Ot=St;class Rt{constructor(e,t,o,r,i,n){this.inputType=e,this.type=t,this.input=o,this.cases=r,this.outputs=i,this.otherwise=n}static parse(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.");let o,r;t.expectedType&&"value"!==t.expectedType.kind&&(r=t.expectedType);const i={},n=[];for(let a=2;aNumber.MAX_SAFE_INTEGER)return u.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof e&&Math.floor(e)!==e)return u.error("Numeric branch labels must be integer values.");if(o){if(u.checkSubtype(o,ie(e)))return null}else o=ie(e);if(void 0!==i[String(e)])return u.error("Branch labels must be unique.");i[String(e)]=n.length}const c=t.parse(l,a,r);if(!c)return null;r=r||c.type,n.push(c)}const a=t.parse(e[1],1,P);if(!a)return null;const s=t.parse(e[e.length-1],e.length-1,r);return s?"value"!==a.type.kind&&t.concat(1).checkSubtype(o,a.type)?null:new Rt(o,r,a,i,n,s):null}evaluate(e){const t=this.input.evaluate(e);return(ie(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every((e=>e.outputDefined()))&&this.otherwise.outputDefined()}serialize(){const e=["match",this.input.serialize()],t=Object.keys(this.cases).sort(),o=[],r={};for(const e of t){const t=r[this.cases[e]];void 0===t?(r[this.cases[e]]=o.length,o.push([this.cases[e],[e]])):o[t][1].push(e)}const i=e=>"number"===this.inputType.kind?Number(e):e;for(const[t,r]of o)1===r.length?e.push(i(r[0])):e.push(r.map(i)),e.push(this.outputs[t].serialize());return e.push(this.otherwise.serialize()),e}}var It=Rt;class qt{constructor(e,t,o){this.type=e,this.branches=t,this.otherwise=o}static parse(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.");let o;t.expectedType&&"value"!==t.expectedType.kind&&(o=t.expectedType);const r=[];for(let i=1;it.outputDefined()))&&this.otherwise.outputDefined()}serialize(){const e=["case"];return this.eachChild((t=>{e.push(t.serialize())})),e}}var Nt=qt;class Dt{constructor(e,t,o,r){this.type=e,this.input=t,this.beginIndex=o,this.endIndex=r}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const o=t.parse(e[1],1,P),r=t.parse(e[2],2,q);if(!o||!r)return null;if(!H(o.type,[B(P),N,P]))return t.error(`Expected first argument to be of type array or string, but found ${J(o.type)} instead`);if(4===e.length){const i=t.parse(e[3],3,q);return i?new Dt(o.type,o,r,i):null}return new Dt(o.type,o,r)}evaluate(e){const t=this.input.evaluate(e),o=this.beginIndex.evaluate(e);if(!V(t,["string","array"]))throw new le(`Expected first argument to be of type array or string, but found ${J(ie(t))} instead.`);if(this.endIndex){const r=this.endIndex.evaluate(e);return t.slice(o,r)}return t.slice(o)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}serialize(){if(null!=this.endIndex&&void 0!==this.endIndex){const e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}var Lt=Dt;function Mt(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 Pt(e,t,o,r){return 0===r.compare(t,o)}function Ft(e,t,o){const r="=="!==e&&"!="!==e;return class i{constructor(e,t,o){this.type=D,this.lhs=e,this.rhs=t,this.collator=o,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}static parse(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");const o=e[0];let n=t.parse(e[1],1,P);if(!n)return null;if(!Mt(o,n.type))return t.concat(1).error(`"${o}" comparisons are not supported for type '${J(n.type)}'.`);let a=t.parse(e[2],2,P);if(!a)return null;if(!Mt(o,a.type))return t.concat(2).error(`"${o}" comparisons are not supported for type '${J(a.type)}'.`);if(n.type.kind!==a.type.kind&&"value"!==n.type.kind&&"value"!==a.type.kind)return t.error(`Cannot compare types '${J(n.type)}' and '${J(a.type)}'.`);r&&("value"===n.type.kind&&"value"!==a.type.kind?n=new pe(a.type,[n]):"value"!==n.type.kind&&"value"===a.type.kind&&(a=new pe(n.type,[a])));let s=null;if(4===e.length){if("string"!==n.type.kind&&"string"!==a.type.kind&&"value"!==n.type.kind&&"value"!==a.type.kind)return t.error("Cannot use collator to compare non-string types.");if(s=t.parse(e[3],3,F),!s)return null}return new i(n,a,s)}evaluate(i){const n=this.lhs.evaluate(i),a=this.rhs.evaluate(i);if(r&&this.hasUntypedArgument){const t=ie(n),o=ie(a);if(t.kind!==o.kind||"string"!==t.kind&&"number"!==t.kind)throw new le(`Expected arguments for "${e}" to be (string, string) or (number, number), but found (${t.kind}, ${o.kind}) instead.`)}if(this.collator&&!r&&this.hasUntypedArgument){const e=ie(n),o=ie(a);if("string"!==e.kind||"string"!==o.kind)return t(i,n,a)}return this.collator?o(i,n,a,this.collator.evaluate(i)):t(i,n,a)}eachChild(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)}outputDefined(){return!0}serialize(){const t=[e];return this.eachChild((e=>{t.push(e.serialize())})),t}}}const $t=Ft("==",(function(e,t,o){return t===o}),Pt),Ut=Ft("!=",(function(e,t,o){return t!==o}),(function(e,t,o,r){return!Pt(0,t,o,r)})),Bt=Ft("<",(function(e,t,o){return t",(function(e,t,o){return t>o}),(function(e,t,o,r){return r.compare(t,o)>0})),Wt=Ft("<=",(function(e,t,o){return t<=o}),(function(e,t,o,r){return r.compare(t,o)<=0})),Gt=Ft(">=",(function(e,t,o){return t>=o}),(function(e,t,o,r){return r.compare(t,o)>=0}));class Ht{constructor(e,t,o,r,i){this.type=N,this.number=e,this.locale=t,this.currency=o,this.minFractionDigits=r,this.maxFractionDigits=i}static parse(e,t){if(3!==e.length)return t.error("Expected two arguments.");const o=t.parse(e[1],1,q);if(!o)return null;const r=e[2];if("object"!=typeof r||Array.isArray(r))return t.error("NumberFormat options argument must be an object.");let i=null;if(r.locale&&(i=t.parse(r.locale,1,N),!i))return null;let n=null;if(r.currency&&(n=t.parse(r.currency,1,N),!n))return null;let a=null;if(r["min-fraction-digits"]&&(a=t.parse(r["min-fraction-digits"],1,q),!a))return null;let s=null;return r["max-fraction-digits"]&&(s=t.parse(r["max-fraction-digits"],1,q),!s)?null:new Ht(o,i,n,a,s)}evaluate(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))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const 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]}}class Vt{constructor(e){this.type=q,this.input=e}static parse(e,t){if(2!==e.length)return t.error(`Expected 1 argument, but found ${e.length-1} instead.`);const o=t.parse(e[1],1);return o?"array"!==o.type.kind&&"string"!==o.type.kind&&"value"!==o.type.kind?t.error(`Expected argument of type string or array, but found ${J(o.type)} instead.`):new Vt(o):null}evaluate(e){const t=this.input.evaluate(e);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new le(`Expected value to be of type string or array, but found ${J(ie(t))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){const e=["length"];return this.eachChild((t=>{e.push(t.serialize())})),e}}const Zt={"==":$t,"!=":Ut,">":Jt,"<":Bt,">=":Gt,"<=":Wt,array:pe,at:At,boolean:pe,case:Nt,coalesce:jt,collator:we,format:de,image:he,in:Et,"index-of":Ot,interpolate:wt,"interpolate-hcl":wt,"interpolate-lab":wt,length:Vt,let:zt,literal:se,match:It,number:pe,"number-format":Ht,object:pe,slice:Lt,step:Ye,string:pe,"to-boolean":ye,"to-color":ye,"to-number":ye,"to-string":ye,var:We,within:Fe};function Xt(e,[t,o,r,i]){t=t.evaluate(e),o=o.evaluate(e),r=r.evaluate(e);const n=i?i.evaluate(e):1,a=oe(t,o,r,n);if(a)throw new le(a);return new Y(t/255*n,o/255*n,r/255*n,n)}function Yt(e,t){return e in t}function Kt(e,t){const o=t[e];return void 0===o?null:o}function Qt(e){return{type:e}}xe.register(Zt,{error:[{kind:"error"},[N],(e,[t])=>{throw new le(t.evaluate(e))}],typeof:[N,[P],(e,[t])=>J(ie(t.evaluate(e)))],"to-rgba":[B(q,4),[L],(e,[t])=>t.evaluate(e).toArray()],rgb:[L,[q,q,q],Xt],rgba:[L,[q,q,q,q],Xt],has:{type:D,overloads:[[[N],(e,[t])=>Yt(t.evaluate(e),e.properties())],[[N,M],(e,[t,o])=>Yt(t.evaluate(e),o.evaluate(e))]]},get:{type:P,overloads:[[[N],(e,[t])=>Kt(t.evaluate(e),e.properties())],[[N,M],(e,[t,o])=>Kt(t.evaluate(e),o.evaluate(e))]]},"feature-state":[P,[N],(e,[t])=>Kt(t.evaluate(e),e.featureState||{})],properties:[M,[],e=>e.properties()],"geometry-type":[N,[],e=>e.geometryType()],id:[P,[],e=>e.id()],zoom:[q,[],e=>e.globals.zoom],pitch:[q,[],e=>e.globals.pitch||0],"distance-from-center":[q,[],e=>e.distanceFromCenter()],"heatmap-density":[q,[],e=>e.globals.heatmapDensity||0],"line-progress":[q,[],e=>e.globals.lineProgress||0],"sky-radial-progress":[q,[],e=>e.globals.skyRadialProgress||0],accumulated:[P,[],e=>void 0===e.globals.accumulated?null:e.globals.accumulated],"+":[q,Qt(q),(e,t)=>{let o=0;for(const r of t)o+=r.evaluate(e);return o}],"*":[q,Qt(q),(e,t)=>{let o=1;for(const r of t)o*=r.evaluate(e);return o}],"-":{type:q,overloads:[[[q,q],(e,[t,o])=>t.evaluate(e)-o.evaluate(e)],[[q],(e,[t])=>-t.evaluate(e)]]},"/":[q,[q,q],(e,[t,o])=>t.evaluate(e)/o.evaluate(e)],"%":[q,[q,q],(e,[t,o])=>t.evaluate(e)%o.evaluate(e)],ln2:[q,[],()=>Math.LN2],pi:[q,[],()=>Math.PI],e:[q,[],()=>Math.E],"^":[q,[q,q],(e,[t,o])=>Math.pow(t.evaluate(e),o.evaluate(e))],sqrt:[q,[q],(e,[t])=>Math.sqrt(t.evaluate(e))],log10:[q,[q],(e,[t])=>Math.log(t.evaluate(e))/Math.LN10],ln:[q,[q],(e,[t])=>Math.log(t.evaluate(e))],log2:[q,[q],(e,[t])=>Math.log(t.evaluate(e))/Math.LN2],sin:[q,[q],(e,[t])=>Math.sin(t.evaluate(e))],cos:[q,[q],(e,[t])=>Math.cos(t.evaluate(e))],tan:[q,[q],(e,[t])=>Math.tan(t.evaluate(e))],asin:[q,[q],(e,[t])=>Math.asin(t.evaluate(e))],acos:[q,[q],(e,[t])=>Math.acos(t.evaluate(e))],atan:[q,[q],(e,[t])=>Math.atan(t.evaluate(e))],min:[q,Qt(q),(e,t)=>Math.min(...t.map((t=>t.evaluate(e))))],max:[q,Qt(q),(e,t)=>Math.max(...t.map((t=>t.evaluate(e))))],abs:[q,[q],(e,[t])=>Math.abs(t.evaluate(e))],round:[q,[q],(e,[t])=>{const o=t.evaluate(e);return o<0?-Math.round(-o):Math.round(o)}],floor:[q,[q],(e,[t])=>Math.floor(t.evaluate(e))],ceil:[q,[q],(e,[t])=>Math.ceil(t.evaluate(e))],"filter-==":[D,[N,P],(e,[t,o])=>e.properties()[t.value]===o.value],"filter-id-==":[D,[P],(e,[t])=>e.id()===t.value],"filter-type-==":[D,[N],(e,[t])=>e.geometryType()===t.value],"filter-<":[D,[N,P],(e,[t,o])=>{const r=e.properties()[t.value],i=o.value;return typeof r==typeof i&&r{const o=e.id(),r=t.value;return typeof o==typeof r&&o":[D,[N,P],(e,[t,o])=>{const r=e.properties()[t.value],i=o.value;return typeof r==typeof i&&r>i}],"filter-id->":[D,[P],(e,[t])=>{const o=e.id(),r=t.value;return typeof o==typeof r&&o>r}],"filter-<=":[D,[N,P],(e,[t,o])=>{const r=e.properties()[t.value],i=o.value;return typeof r==typeof i&&r<=i}],"filter-id-<=":[D,[P],(e,[t])=>{const o=e.id(),r=t.value;return typeof o==typeof r&&o<=r}],"filter->=":[D,[N,P],(e,[t,o])=>{const r=e.properties()[t.value],i=o.value;return typeof r==typeof i&&r>=i}],"filter-id->=":[D,[P],(e,[t])=>{const o=e.id(),r=t.value;return typeof o==typeof r&&o>=r}],"filter-has":[D,[P],(e,[t])=>t.value in e.properties()],"filter-has-id":[D,[],e=>null!==e.id()&&void 0!==e.id()],"filter-type-in":[D,[B(N)],(e,[t])=>t.value.indexOf(e.geometryType())>=0],"filter-id-in":[D,[B(P)],(e,[t])=>t.value.indexOf(e.id())>=0],"filter-in-small":[D,[N,B(P)],(e,[t,o])=>o.value.indexOf(e.properties()[t.value])>=0],"filter-in-large":[D,[N,B(P)],(e,[t,o])=>function(e,t,o,r){for(;o<=r;){const i=o+r>>1;if(t[i]===e)return!0;t[i]>e?r=i-1:o=i+1}return!1}(e.properties()[t.value],o.value,0,o.value.length-1)],all:{type:D,overloads:[[[D,D],(e,[t,o])=>t.evaluate(e)&&o.evaluate(e)],[Qt(D),(e,t)=>{for(const o of t)if(!o.evaluate(e))return!1;return!0}]]},any:{type:D,overloads:[[[D,D],(e,[t,o])=>t.evaluate(e)||o.evaluate(e)],[Qt(D),(e,t)=>{for(const o of t)if(o.evaluate(e))return!0;return!1}]]},"!":[D,[D],(e,[t])=>!t.evaluate(e)],"is-supported-script":[D,[N],(e,[t])=>{const o=e.globals&&e.globals.isSupportedScript;return!o||o(t.evaluate(e))}],upcase:[N,[N],(e,[t])=>t.evaluate(e).toUpperCase()],downcase:[N,[N],(e,[t])=>t.evaluate(e).toLowerCase()],concat:[N,Qt(P),(e,t)=>t.map((t=>ne(t.evaluate(e)))).join("")],"resolved-locale":[N,[F],(e,[t])=>t.evaluate(e).resolvedLocale()]});var eo=Zt;function to(e){return{result:"success",value:e}}function oo(e){return{result:"error",value:e}}function ro(e){return!!e.expression&&e.expression.interpolated}function io(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function no(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function ao(e){return e}function so(e,t){const o="color"===t.type,r=e.stops&&"object"==typeof e.stops[0][0],i=r||void 0!==e.property,n=r||!i,a=e.type||(ro(t)?"exponential":"interval");if(o&&((e=C({},e)).stops&&(e.stops=e.stops.map((e=>[e[0],Y.parse(e[1])]))),e.default?e.default=Y.parse(e.default):e.default=Y.parse(t.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!bt[e.colorSpace])throw new Error(`Unknown color space: ${e.colorSpace}`);let s,l,u;if("exponential"===a)s=po;else if("interval"===a)s=co;else if("categorical"===a){s=uo,l=Object.create(null);for(const t of e.stops)l[t[0]]=t[1];u=typeof e.stops[0][0]}else{if("identity"!==a)throw new Error(`Unknown function type "${a}"`);s=ho}if(r){const o={},r=[];for(let t=0;te[0])),evaluate:({zoom:o},r)=>po({stops:i,base:e.base},t,o).evaluate(o,r)}}if(n){const o="exponential"===a?{name:"exponential",base:void 0!==e.base?e.base:1}:null;return{kind:"camera",interpolationType:o,interpolationFactor:wt.interpolationFactor.bind(void 0,o),zoomStops:e.stops.map((e=>e[0])),evaluate:({zoom:o})=>s(e,t,o,l,u)}}return{kind:"source",evaluate(o,r){const i=r&&r.properties?r.properties[e.property]:void 0;return void 0===i?lo(e.default,t.default):s(e,t,i,l,u)}}}function lo(e,t,o){return void 0!==e?e:void 0!==t?t:void 0!==o?o:void 0}function uo(e,t,o,r,i){return lo(typeof o===i?r[o]:void 0,e.default,t.default)}function co(e,t,o){if("number"!==io(o))return lo(e.default,t.default);const r=e.stops.length;if(1===r)return e.stops[0][1];if(o<=e.stops[0][0])return e.stops[0][1];if(o>=e.stops[r-1][0])return e.stops[r-1][1];const i=Ze(e.stops.map((e=>e[0])),o);return e.stops[i][1]}function po(e,t,o){const r=void 0!==e.base?e.base:1;if("number"!==io(o))return lo(e.default,t.default);const i=e.stops.length;if(1===i)return e.stops[0][1];if(o<=e.stops[0][0])return e.stops[0][1];if(o>=e.stops[i-1][0])return e.stops[i-1][1];const n=Ze(e.stops.map((e=>e[0])),o),a=function(e,t,o,r){const i=r-o,n=e-o;return 0===i?0:1===t?n/i:(Math.pow(t,n)-1)/(Math.pow(t,i)-1)}(o,r,e.stops[n][0],e.stops[n+1][0]),s=e.stops[n][1],l=e.stops[n+1][1];let u=tt[t.type]||ao;if(e.colorSpace&&"rgb"!==e.colorSpace){const t=bt[e.colorSpace];u=(e,o)=>t.reverse(t.interpolate(t.forward(e),t.forward(o),a))}return"function"==typeof s.evaluate?{evaluate(...e){const t=s.evaluate.apply(void 0,e),o=l.evaluate.apply(void 0,e);if(void 0!==t&&void 0!==o)return u(t,o,a)}}:u(s,l,a)}function ho(e,t,o){return"color"===t.type?o=Y.parse(o):"formatted"===t.type?o=ee.fromString(o.toString()):"resolvedImage"===t.type?o=te.fromString(o.toString()):io(o)===t.type||"enum"===t.type&&t.values[o]||(o=void 0),lo(o,e.default,t.default)}class fo{constructor(e,t){var o;this.expression=e,this._warningHistory={},this._evaluator=new be,this._defaultValue=t?"color"===(o=t).type&&(no(o.default)||Array.isArray(o.default))?new Y(0,0,0,0):"color"===o.type?Y.parse(o.default)||null:void 0===o.default?null:o.default:null,this._enumValues=t&&"enum"===t.type?t.values:null}evaluateWithoutErrorHandling(e,t,o,r,i,n,a,s){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=o,this._evaluator.canonical=r||null,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=n,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=s||null,this.expression.evaluate(this._evaluator)}evaluate(e,t,o,r,i,n,a,s){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=o||null,this._evaluator.canonical=r||null,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=n||null,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=s||null;try{const e=this.expression.evaluate(this._evaluator);if(null==e||"number"==typeof e&&e!=e)return this._defaultValue;if(this._enumValues&&!(e in this._enumValues))throw new le(`Expected value to be one of ${Object.keys(this._enumValues).map((e=>JSON.stringify(e))).join(", ")}, but found ${JSON.stringify(e)} instead.`);return e}catch(e){return this._warningHistory[e.message]||(this._warningHistory[e.message]=!0,"undefined"!=typeof console&&console.warn(e.message)),this._defaultValue}}}function mo(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in eo}function yo(e,t){const o=new He(eo,[],t?function(e){const t={color:L,string:N,number:q,enum:N,boolean:D,formatted:$,resolvedImage:U};return"array"===e.type?B(t[e.value]||P,e.length):t[e.type]}(t):void 0),r=o.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return r?to(new fo(r,t)):oo(o.errors)}class go{constructor(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!Ue(t.expression)}evaluateWithoutErrorHandling(e,t,o,r,i,n){return this._styleExpression.evaluateWithoutErrorHandling(e,t,o,r,i,n)}evaluate(e,t,o,r,i,n){return this._styleExpression.evaluate(e,t,o,r,i,n)}}class bo{constructor(e,t,o,r){this.kind=e,this.zoomStops=o,this._styleExpression=t,this.isStateDependent="camera"!==e&&!Ue(t.expression),this.interpolationType=r}evaluateWithoutErrorHandling(e,t,o,r,i,n){return this._styleExpression.evaluateWithoutErrorHandling(e,t,o,r,i,n)}evaluate(e,t,o,r,i,n){return this._styleExpression.evaluate(e,t,o,r,i,n)}interpolationFactor(e,t,o){return this.interpolationType?wt.interpolationFactor(this.interpolationType,e,t,o):0}}function vo(e,t){if("error"===(e=yo(e,t)).result)return e;const o=e.value.expression,r=$e(o);if(!r&&("data-driven"!==(i=t)["property-type"]&&"cross-faded-data-driven"!==i["property-type"]))return oo([new S("","data expressions not supported")]);var i;const n=Be(o,["zoom","pitch","distance-from-center"]);if(!n&&!function(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}(t))return oo([new S("","zoom expressions not supported")]);const a=wo(o);if(!a&&!n)return oo([new S("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(a instanceof S)return oo([a]);if(a instanceof wt&&!ro(t))return oo([new S("",'"interpolate" expressions cannot be used with this property')]);if(!a)return to(new go(r?"constant":"source",e.value));const s=a instanceof wt?a.interpolation:void 0;return to(new bo(r?"camera":"composite",e.value,a.labels,s))}class xo{constructor(e,t){this._parameters=e,this._specification=t,C(this,so(this._parameters,this._specification))}static deserialize(e){return new xo(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function wo(e){let t=null;if(e instanceof zt)t=wo(e.result);else if(e instanceof jt){for(const o of e.args)if(t=wo(o),t)break}else(e instanceof Ye||e instanceof wt)&&e.input instanceof xe&&"zoom"===e.input.name&&(t=e);return t instanceof S||e.eachChild((e=>{const o=wo(e);o instanceof S?t=o:!t&&o?t=new S("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&o&&t!==o&&(t=new S("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),t}function ko(e){return"object"==typeof e?["literal",e]:e}function jo(e){switch(e.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function To(e,t){const o=ko(function(e,t){return void 0!==e?e:void 0!==t?t:void 0}(e.default,t.default));return void 0===o&&"resolvedImage"===t.type?"":o}function zo(e,t,o){const r=Co(e,t),i=["get",e.property];if("categorical"===r&&"boolean"==typeof o[0][0]){const r=["case"];for(const e of o)r.push(["==",i,e[0]],e[1]);return r.push(To(e,t)),r}if("categorical"===r){const r=["match",i];for(const e of o)Ao(r,e[0],e[1],!1);return r.push(To(e,t)),r}if("interval"===r){const t=["step",["number",i]];for(const e of o)Ao(t,e[0],e[1],!0);return _o(t),void 0===e.default?t:["case",["==",["typeof",i],"number"],t,ko(e.default)]}if("exponential"===r){const t=void 0!==e.base?e.base:1,r=[jo(e),1===t?["linear"]:["exponential",t],["number",i]];for(const e of o)Ao(r,e[0],e[1],!1);return void 0===e.default?r:["case",["==",["typeof",i],"number"],r,ko(e.default)]}throw new Error(`Unknown property function type ${r}`)}function _o(e){"step"===e[0]&&3===e.length&&(e.push(0),e.push(e[3]))}function Ao(e,t,o,r){e.length>3&&t===e[e.length-2]||(r&&2===e.length||e.push(t),e.push(o))}function Co(e,t){return e.type?e.type:t.expression.interpolated?"exponential":"interval"}function Eo(e){const t=["concat"],o=/{([^{}]+)}/g;let r=0;for(let i=o.exec(e);null!==i;i=o.exec(e)){const n=e.slice(r,o.lastIndex-i[0].length);r=o.lastIndex,n.length>0&&t.push(n),t.push(["get",i[1]])}if(1===t.length)return e;if(r",">=","<","<=","to-boolean"]),n((function(e,t){var o=function(){var e=function(e,t,o,r){for(o=o||{},r=e.length;r--;o[e[r]]=t);return o},t=[1,12],o=[1,13],r=[1,9],i=[1,10],n=[1,11],a=[1,14],s=[1,15],l=[14,18,22,24],u=[18,22],c=[22,24],p={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(e,t,o,r,i,n,a){var s=n.length-1;switch(i){case 1:this.$=new String(e.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b")),this.$.__line__=this._$.first_line;break;case 2:this.$=new Number(e),this.$.__line__=this._$.first_line;break;case 3:this.$=null;break;case 4:this.$=new Boolean(!0),this.$.__line__=this._$.first_line;break;case 5:this.$=new Boolean(!1),this.$.__line__=this._$.first_line;break;case 6:return this.$=n[s-1];case 13:this.$={},Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 14:case 19:this.$=n[s-1],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 15:this.$=[n[s-2],n[s]];break;case 16:this.$={},this.$[n[s][0]]=n[s][1];break;case 17:this.$=n[s-2],n[s-2][n[s][0]]=n[s][1];break;case 18:this.$=[],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 20:this.$=[n[s]];break;case 21:this.$=n[s-2],n[s-2].push(n[s])}},table:[{3:5,4:t,5:6,6:o,7:3,8:r,9:4,10:i,11:n,12:1,13:2,15:7,16:8,17:a,23:s},{1:[3]},{14:[1,16]},e(l,[2,7]),e(l,[2,8]),e(l,[2,9]),e(l,[2,10]),e(l,[2,11]),e(l,[2,12]),e(l,[2,3]),e(l,[2,4]),e(l,[2,5]),e([14,18,21,22,24],[2,1]),e(l,[2,2]),{3:20,4:t,18:[1,17],19:18,20:19},{3:5,4:t,5:6,6:o,7:3,8:r,9:4,10:i,11:n,13:23,15:7,16:8,17:a,23:s,24:[1,21],25:22},{1:[2,6]},e(l,[2,13]),{18:[1,24],22:[1,25]},e(u,[2,16]),{21:[1,26]},e(l,[2,18]),{22:[1,28],24:[1,27]},e(c,[2,20]),e(l,[2,14]),{3:20,4:t,20:29},{3:5,4:t,5:6,6:o,7:3,8:r,9:4,10:i,11:n,13:30,15:7,16:8,17:a,23:s},e(l,[2,19]),{3:5,4:t,5:6,6:o,7:3,8:r,9:4,10:i,11:n,13:31,15:7,16:8,17:a,23:s},e(u,[2,17]),e(u,[2,15]),e(c,[2,21])],defaultActions:{16:[2,6]},parseError:function(e,t){if(!t.recoverable)throw new Error(e);this.trace(e)},parse:function(e){var t=this,o=[0],r=[null],i=[],n=this.table,a="",s=0,l=0,u=2,c=1,p=i.slice.call(arguments,1),d=Object.create(this.lexer),h={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(h.yy[f]=this.yy[f]);d.setInput(e,h.yy),h.yy.lexer=d,h.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var m=d.yylloc;i.push(m);var y=d.options&&d.options.ranges;function g(){var e;return"number"!=typeof(e=d.lex()||c)&&(e=t.symbols_[e]||e),e}"function"==typeof h.yy.parseError?this.parseError=h.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,v,x,w,k,j,T,z,_={};;){if(v=o[o.length-1],this.defaultActions[v]?x=this.defaultActions[v]:(null==b&&(b=g()),x=n[v]&&n[v][b]),void 0===x||!x.length||!x[0]){var A="";for(k in z=[],n[v])this.terminals_[k]&&k>u&&z.push("'"+this.terminals_[k]+"'");A=d.showPosition?"Parse error on line "+(s+1)+":\n"+d.showPosition()+"\nExpecting "+z.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==c?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(A,{text:d.match,token:this.terminals_[b]||b,line:d.yylineno,loc:m,expected:z})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+b);switch(x[0]){case 1:o.push(b),r.push(d.yytext),i.push(d.yylloc),o.push(x[1]),b=null,l=d.yyleng,a=d.yytext,s=d.yylineno,m=d.yylloc;break;case 2:if(j=this.productions_[x[1]][1],_.$=r[r.length-j],_._$={first_line:i[i.length-(j||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(j||1)].first_column,last_column:i[i.length-1].last_column},y&&(_._$.range=[i[i.length-(j||1)].range[0],i[i.length-1].range[1]]),void 0!==(w=this.performAction.apply(_,[a,l,s,h.yy,x[1],r,i].concat(p))))return w;j&&(o=o.slice(0,-1*j*2),r=r.slice(0,-1*j),i=i.slice(0,-1*j)),o.push(this.productions_[x[1]][0]),r.push(_.$),i.push(_._$),T=n[o[o.length-2]][o[o.length-1]],o.push(T);break;case 3:return!0}}return!0}},d=function(){var e={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,o=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);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),o.length-1&&(this.yylineno-=o.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===r.length?this.yylloc.first_column:0)+r[r.length-o.length].length-o[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[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(e.length>20?"...":"")+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)+(e.length>20?"...":"")).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 o,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.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],o=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var n in i)this[n]=i[n];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,o,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),n=0;nt[0].length)){if(t=o,r=n,this.options.backtrack_lexer){if(!1!==(e=this.test_match(o,i[n])))return e;if(this._backtrack){t=!1;continue}return!1}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 this.conditionStack.length-1>0?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]].rules:this.conditions.INITIAL.rules},topState:function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,o,r){switch(o){case 0:break;case 1:return 6;case 2:return t.yytext=t.yytext.substr(1,t.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return e}();function h(){this.yy={}}return p.lexer=d,h.prototype=p,p.Parser=h,new h}();t.parser=o,t.Parser=o.Parser,t.parse=function(){return o.parse.apply(o,arguments)}})),new Set(["vector","raster","raster-dem"]);const So={StyleExpression:fo,isExpression:mo,isExpressionFilter:function e(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(const o of t.slice(1))if(!e(o)&&"boolean"!=typeof o)return!1;return!0;default:return!0}},createExpression:yo,createPropertyExpression:vo,normalizePropertyExpression:function(e,t){if(no(e))return new xo(e,t);if(mo(e)){const o=vo(e,t);if("error"===o.result)throw new Error(o.value.map((e=>`${e.key}: ${e.message}`)).join(", "));return o.value}{let o=e;return"string"==typeof e&&"color"===t.type&&(o=Y.parse(e)),{kind:"constant",evaluate:()=>o}}},ZoomConstantExpression:go,ZoomDependentExpression:bo,StylePropertyFunction:xo},Oo={convertFunction:function(e,t){let o=e.stops;if(!o)return function(e,t){const o=["get",e.property];if(void 0===e.default)return"string"===t.type?["string",o]:o;if("enum"===t.type)return["match",o,Object.keys(t.values),o,e.default];{const r=["color"===t.type?"to-color":t.type,o,ko(e.default)];return"array"===t.type&&r.splice(1,0,t.value,t.length||null),r}}(e,t);const r=o&&"object"==typeof o[0][0],i=r||void 0!==e.property,n=r||!i;return o=o.map((e=>!i&&t.tokens&&"string"==typeof e[1]?[e[0],Eo(e[1])]:[e[0],ko(e[1])])),r?function(e,t,o){const r={},i={},n=[];for(let t=0;t{e.exports=o(609)},448:(e,t,o)=>{"use strict";var r=o(867),i=o(26),n=o(372),a=o(327),s=o(97),l=o(109),u=o(985),c=o(874),p=o(648),d=o(644),h=o(205);e.exports=function(e){return new Promise((function(t,o){var f,m=e.data,y=e.headers,g=e.responseType;function b(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}r.isFormData(m)&&r.isStandardBrowserEnv()&&delete y["Content-Type"];var v=new XMLHttpRequest;if(e.auth){var x=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";y.Authorization="Basic "+btoa(x+":"+w)}var k=s(e.baseURL,e.url);function j(){if(v){var r="getAllResponseHeaders"in v?l(v.getAllResponseHeaders()):null,n={data:g&&"text"!==g&&"json"!==g?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:r,config:e,request:v};i((function(e){t(e),b()}),(function(e){o(e),b()}),n),v=null}}if(v.open(e.method.toUpperCase(),a(k,e.params,e.paramsSerializer),!0),v.timeout=e.timeout,"onloadend"in v?v.onloadend=j:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(j)},v.onabort=function(){v&&(o(new p("Request aborted",p.ECONNABORTED,e,v)),v=null)},v.onerror=function(){o(new p("Network Error",p.ERR_NETWORK,e,v,v)),v=null},v.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||c;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),o(new p(t,r.clarifyTimeoutError?p.ETIMEDOUT:p.ECONNABORTED,e,v)),v=null},r.isStandardBrowserEnv()){var T=(e.withCredentials||u(k))&&e.xsrfCookieName?n.read(e.xsrfCookieName):void 0;T&&(y[e.xsrfHeaderName]=T)}"setRequestHeader"in v&&r.forEach(y,(function(e,t){void 0===m&&"content-type"===t.toLowerCase()?delete y[t]:v.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(v.withCredentials=!!e.withCredentials),g&&"json"!==g&&(v.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&v.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&v.upload&&v.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(f=function(e){v&&(o(!e||e&&e.type?new d:e),v.abort(),v=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f))),m||(m=null);var z=h(k);z&&-1===["http","https","file"].indexOf(z)?o(new p("Unsupported protocol "+z+":",p.ERR_BAD_REQUEST,e)):v.send(m)}))}},609:(e,t,o)=>{"use strict";var r=o(867),i=o(849),n=o(321),a=o(185),s=function e(t){var o=new n(t),s=i(n.prototype.request,o);return r.extend(s,n.prototype,o),r.extend(s,o),s.create=function(o){return e(a(t,o))},s}(o(546));s.Axios=n,s.CanceledError=o(644),s.CancelToken=o(972),s.isCancel=o(502),s.VERSION=o(288).version,s.toFormData=o(675),s.AxiosError=o(648),s.Cancel=s.CanceledError,s.all=function(e){return Promise.all(e)},s.spread=o(713),s.isAxiosError=o(268),e.exports=s,e.exports.default=s},972:(e,t,o)=>{"use strict";var r=o(644);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 o=this;this.promise.then((function(e){if(o._listeners){var t,r=o._listeners.length;for(t=0;t{"use strict";var r=o(648);function i(e){r.call(this,null==e?"canceled":e,r.ERR_CANCELED),this.name="CanceledError"}o(867).inherits(i,r,{__CANCEL__:!0}),e.exports=i},502:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,o)=>{"use strict";var r=o(867),i=o(327),n=o(782),a=o(572),s=o(185),l=o(97),u=o(875),c=u.validators;function p(e){this.defaults=e,this.interceptors={request:new n,response:new n}}p.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var o=t.transitional;void 0!==o&&u.assertOptions(o,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var r=[],i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var n,l=[];if(this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)})),!i){var p=[a,void 0];for(Array.prototype.unshift.apply(p,r),p=p.concat(l),n=Promise.resolve(t);p.length;)n=n.then(p.shift(),p.shift());return n}for(var d=t;r.length;){var h=r.shift(),f=r.shift();try{d=h(d)}catch(e){f(e);break}}try{n=a(d)}catch(e){return Promise.reject(e)}for(;l.length;)n=n.then(l.shift(),l.shift());return n},p.prototype.getUri=function(e){e=s(this.defaults,e);var t=l(e.baseURL,e.url);return i(t,e.params,e.paramsSerializer)},r.forEach(["delete","get","head","options"],(function(e){p.prototype[e]=function(t,o){return this.request(s(o||{},{method:e,url:t,data:(o||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){function t(t){return function(o,r,i){return this.request(s(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:o,data:r}))}}p.prototype[e]=t(),p.prototype[e+"Form"]=t(!0)})),e.exports=p},648:(e,t,o)=>{"use strict";var r=o(867);function i(e,t,o,r,i){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),o&&(this.config=o),r&&(this.request=r),i&&(this.response=i)}r.inherits(i,Error,{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,status:this.response&&this.response.status?this.response.status:null}}});var n=i.prototype,a={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){a[e]={value:e}})),Object.defineProperties(i,a),Object.defineProperty(n,"isAxiosError",{value:!0}),i.from=function(e,t,o,a,s,l){var u=Object.create(n);return r.toFlatObject(e,u,(function(e){return e!==Error.prototype})),i.call(u,e.message,t,o,a,s),u.name=e.name,l&&Object.assign(u,l),u},e.exports=i},782:(e,t,o)=>{"use strict";var r=o(867);function i(){this.handlers=[]}i.prototype.use=function(e,t,o){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!o&&o.synchronous,runWhen:o?o.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},97:(e,t,o)=>{"use strict";var r=o(793),i=o(303);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},572:(e,t,o)=>{"use strict";var r=o(867),i=o(527),n=o(502),a=o(546),s=o(644);function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s}e.exports=function(e){return l(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 l(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return n(t)||(l(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},185:(e,t,o)=>{"use strict";var r=o(867);e.exports=function(e,t){t=t||{};var o={};function i(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 n(o){return r.isUndefined(t[o])?r.isUndefined(e[o])?void 0:i(void 0,e[o]):i(e[o],t[o])}function a(e){if(!r.isUndefined(t[e]))return i(void 0,t[e])}function s(o){return r.isUndefined(t[o])?r.isUndefined(e[o])?void 0:i(void 0,e[o]):i(void 0,t[o])}function l(o){return o in t?i(e[o],t[o]):o in e?i(void 0,e[o]):void 0}var u={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=u[e]||n,i=t(e);r.isUndefined(i)&&t!==l||(o[e]=i)})),o}},26:(e,t,o)=>{"use strict";var r=o(648);e.exports=function(e,t,o){var i=o.config.validateStatus;o.status&&i&&!i(o.status)?t(new r("Request failed with status code "+o.status,[r.ERR_BAD_REQUEST,r.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o)):e(o)}},527:(e,t,o)=>{"use strict";var r=o(867),i=o(546);e.exports=function(e,t,o){var n=this||i;return r.forEach(o,(function(o){e=o.call(n,e,t)})),e}},546:(e,t,o)=>{"use strict";var r=o(867),i=o(16),n=o(648),a=o(874),s=o(675),l={"Content-Type":"application/x-www-form-urlencoded"};function u(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,p={transitional:a,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(c=o(448)),c),transformRequest:[function(e,t){if(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))return e;if(r.isArrayBufferView(e))return e.buffer;if(r.isURLSearchParams(e))return u(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var o,n=r.isObject(e),a=t&&t["Content-Type"];if((o=r.isFileList(e))||n&&"multipart/form-data"===a){var l=this.env&&this.env.FormData;return s(o?{"files[]":e}:e,l&&new l)}return n||"application/json"===a?(u(t,"application/json"),function(e,t,o){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||p.transitional,o=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,a=!o&&"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 n.from(e,n.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:o(623)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){p.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){p.headers[e]=r.merge(l)})),e.exports=p},874:e=>{"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},288:e=>{e.exports={version:"0.27.2"}},849:e=>{"use strict";e.exports=function(e,t){return function(){for(var o=new Array(arguments.length),r=0;r{"use strict";var r=o(867);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,o){if(!t)return e;var n;if(o)n=o(t);else if(r.isURLSearchParams(t))n=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))})))})),n=a.join("&")}if(n){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}},303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},372:(e,t,o)=>{"use strict";var r=o(867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,o,i,n,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(o)&&s.push("expires="+new Date(o).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(n)&&s.push("domain="+n),!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(){}}},793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},268:(e,t,o)=>{"use strict";var r=o(867);e.exports=function(e){return r.isObject(e)&&!0===e.isAxiosError}},985:(e,t,o)=>{"use strict";var r=o(867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");function i(e){var r=e;return t&&(o.setAttribute("href",r),r=o.href),o.setAttribute("href",r),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}return e=i(window.location.href),function(t){var o=r.isString(t)?i(t):t;return o.protocol===e.protocol&&o.host===e.host}}():function(){return!0}},16:(e,t,o)=>{"use strict";var r=o(867);e.exports=function(e,t){r.forEach(e,(function(o,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=o,delete e[r])}))}},623:e=>{e.exports=null},109:(e,t,o)=>{"use strict";var r=o(867),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,o,n,a={};return e?(r.forEach(e.split("\n"),(function(e){if(n=e.indexOf(":"),t=r.trim(e.substr(0,n)).toLowerCase(),o=r.trim(e.substr(n+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([o]):a[t]?a[t]+", "+o:o}})),a):a}},205:e=>{"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},675:(e,t,o)=>{"use strict";var r=o(867);e.exports=function(e,t){t=t||new FormData;var o=[];function i(e){return null===e?"":r.isDate(e)?e.toISOString():r.isArrayBuffer(e)||r.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(n,a){if(r.isPlainObject(n)||r.isArray(n)){if(-1!==o.indexOf(n))throw Error("Circular reference detected in "+a);o.push(n),r.forEach(n,(function(o,n){if(!r.isUndefined(o)){var s,l=a?a+"."+n:n;if(o&&!a&&"object"==typeof o)if(r.endsWith(n,"{}"))o=JSON.stringify(o);else if(r.endsWith(n,"[]")&&(s=r.toArray(o)))return void s.forEach((function(e){!r.isUndefined(e)&&t.append(l,i(e))}));e(o,l)}})),o.pop()}else t.append(a,i(n))}(e),t}},875:(e,t,o)=>{"use strict";var r=o(288).version,i=o(648),n={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){n[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}}));var a={};n.transitional=function(e,t,o){function n(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(o?". "+o:"")}return function(o,r,s){if(!1===e)throw new i(n(r," has been removed"+(t?" in "+t:"")),i.ERR_DEPRECATED);return t&&!a[r]&&(a[r]=!0,console.warn(n(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(o,r,s)}},e.exports={assertOptions:function(e,t,o){if("object"!=typeof e)throw new i("options must be an object",i.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),n=r.length;n-- >0;){var a=r[n],s=t[a];if(s){var l=e[a],u=void 0===l||s(l,a,e);if(!0!==u)throw new i("option "+a+" must be "+u,i.ERR_BAD_OPTION_VALUE)}else if(!0!==o)throw new i("Unknown option "+a,i.ERR_BAD_OPTION)}},validators:n}},867:(e,t,o)=>{"use strict";var r,i=o(849),n=Object.prototype.toString,a=(r=Object.create(null),function(e){var t=n.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())});function s(e){return e=e.toLowerCase(),function(t){return a(t)===e}}function l(e){return Array.isArray(e)}function u(e){return void 0===e}var c=s("ArrayBuffer");function p(e){return null!==e&&"object"==typeof e}function d(e){if("object"!==a(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var h=s("Date"),f=s("File"),m=s("Blob"),y=s("FileList");function g(e){return"[object Function]"===n.call(e)}var b=s("URLSearchParams");function v(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),l(e))for(var o=0,r=e.length;o0;)a[n=r[i]]||(t[n]=e[n],a[n]=!0);e=Object.getPrototypeOf(e)}while(e&&(!o||o(e,t))&&e!==Object.prototype);return t},kindOf:a,kindOfTest:s,endsWith:function(e,t,o){e=String(e),(void 0===o||o>e.length)&&(o=e.length),o-=t.length;var r=e.indexOf(t,o);return-1!==r&&r===o},toArray:function(e){if(!e)return null;var t=e.length;if(u(t))return null;for(var o=new Array(t);t-- >0;)o[t]=e[t];return o},isTypedArray:w,isFileList:y}},620:function(e,t,o){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MapboxLegendControl=void 0;var i=o(770);Object.defineProperty(t,"MapboxLegendControl",{enumerable:!0,get:function(){return r(i).default}})},770:function(e,t,o){"use strict";var r=this&&this.__awaiter||function(e,t,o,r){return new(o||(o=Promise))((function(i,n){function a(e){try{l(r.next(e))}catch(e){n(e)}}function s(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=o(640),a=i(o(335)),s=i(o(669));t.default=class{constructor(e,t){this.uncheckedLayers={},this.options={showDefault:!0,showCheckbox:!0,reverseOrder:!0,onlyRendered:!0,accesstoken:void 0,title:void 0},this.sprite={image:HTMLImageElement,json:JSON},this.targets=e,t&&(this.options=Object.assign(this.options,t)),this.onlyRendered=this.options.onlyRendered,this.onDocumentClick=this.onDocumentClick.bind(this)}getDefaultPosition(){return"top-right"}changeLayerVisibility(e,t){var o,r;t?(this.uncheckedLayers[e]&&delete this.uncheckedLayers[e],null===(o=this.map)||void 0===o||o.setLayoutProperty(e,"visibility","visible")):(this.uncheckedLayers[e]=e,null===(r=this.map)||void 0===r||r.setLayoutProperty(e,"visibility","none"));const i=document.getElementsByName(e);for(let e in i)"number"!=typeof i[e]&&(i[e].checked=t)}createLayerCheckbox(e){var t;if(!this.options.showCheckbox)return;const o=this,r=document.createElement("TD");r.className="legend-table-td";const i=document.createElement("input");i.setAttribute("type","checkbox"),i.setAttribute("name",e.id),i.setAttribute("value",e.id);const n=null===(t=this.map)||void 0===t?void 0:t.getLayoutProperty(e.id,"visibility");if(n){let t=!0;switch(n){case"none":t=!1;break;case"visible":t=!0,i.checked=!0}o.changeLayerVisibility(e.id,t)}else i.checked=!0;return i.addEventListener("click",(function(e){var t,r;const i=null===(t=e.target)||void 0===t?void 0:t.value,n=null===(r=e.target)||void 0===r?void 0:r.checked;o.changeLayerVisibility(i,n)})),r.appendChild(i),r}getLayerLegend(e){const t=this.map,o=null==t?void 0:t.getZoom(),r=this.sprite;let i=(0,a.default)({sprite:r,zoom:o,layer:e});var n=document.createElement("TR");const s=this.createLayerCheckbox(e);s&&n.appendChild(s);var l=document.createElement("TD");if(l.className="legend-table-td",i)switch(i.element){case"div":if(i.attributes.style.backgroundImage&&!["url(undefined)","url(null)"].includes(i.attributes.style.backgroundImage)){var u=document.createElement("img");u.src=i.attributes.style.backgroundImage.replace("url(","").replace(")",""),u.alt=e.id,u.style.cssText="height: 17px;",l.appendChild(u)}l.style.backgroundColor=i.attributes.style.backgroundColor,l.style.backgroundPosition=i.attributes.style.backgroundPosition,l.style.backgroundSize=i.attributes.style.backgroundSize,l.style.backgroundRepeat=i.attributes.style.backgroundRepeat,l.style.opacity=i.attributes.style.opacity;break;case"svg":let t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.style.cssText="height: 17px;",t.setAttributeNS(null,"version","1.1"),Object.keys(i.attributes).forEach((e=>{t.setAttribute(e,i.attributes[e]);let o=document.createElementNS("http://www.w3.org/2000/svg","g");i.children.forEach((e=>{var t=document.createElementNS("http://www.w3.org/2000/svg",e.element);Object.keys(e.attributes).forEach((o=>{t.setAttributeNS(null,o,e.attributes[o])})),o.appendChild(t)})),t.appendChild(o)})),document.createElement("label").textContent=this.targets&&this.targets[e.id]?this.targets[e.id]:e.id,l.appendChild(t);break;default:return void console.log(i.element)}else{const t=document.createElementNS("http://www.w3.org/2000/svg","svg"),o=document.createElementNS("http://www.w3.org/2000/svg","path"),r=document.createElementNS("http://www.w3.org/2000/svg","path");t.setAttribute("fill","none"),t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("stroke","black"),t.classList.add("post-icon"),o.setAttribute("d","M21,0H3A3,3,0,0,0,0,3V21a3,3,0,0,0,3,3H21a3,3,0,0,0,3-3V3A3,3,0,0,0,21,0ZM3,2H21a1,1,0,0,1,1,1V15.86L14.18,9.35a5.06,5.06,0,0,0-6.39-.06L2,13.92V3A1,1,0,0,1,3,2ZM21,22H3a1,1,0,0,1-1-1V16.48l7-5.63a3.06,3.06,0,0,1,3.86,0L22,18.47V21A1,1,0,0,1,21,22Z"),o.setAttribute("stroke-linecap","round"),o.setAttribute("stroke-linejoin","round"),o.setAttribute("stroke-width","2"),r.setAttribute("d","M18,9a3,3,0,1,0-3-3A3,3,0,0,0,18,9Zm0-4a1,1,0,1,1-1,1A1,1,0,0,1,18,5Z"),r.setAttribute("stroke-linecap","round"),r.setAttribute("stroke-linejoin","round"),r.setAttribute("stroke-width","2"),t.appendChild(o),t.appendChild(r),document.createElement("label").textContent=this.targets&&this.targets[e.id]?this.targets[e.id]:e.id,l.appendChild(t)}var c=document.createElement("TD");c.className="legend-table-td";let p=document.createElement("label");return p.textContent=this.targets&&this.targets[e.id]?this.targets[e.id]:e.id,c.appendChild(p),n.appendChild(l),n.appendChild(c),n}updateLegendControl(){const e=this.map,t={};if(e){const o=e.queryRenderedFeatures();for(let e of o)t[e.layer.id]=e.layer}let o=null==e?void 0:e.getStyle().layers;if(o){for(this.legendTable||(this.legendTable=document.createElement("TABLE"),this.legendTable.className="legend-table",this.legendContainer.appendChild(this.legendTable));this.legendTable.firstChild;)this.legendTable.removeChild(this.legendTable.firstChild);this.options.reverseOrder&&(o=o.reverse()),o.forEach((e=>{if(t[e.id]&&this.uncheckedLayers[e.id]?delete this.uncheckedLayers[e.id]:this.uncheckedLayers[e.id]&&(t[e.id]=e),void 0===this.targets||this.targets&&0===Object.keys(this.targets).length||this.targets&&Object.keys(this.targets).map((e=>e)).includes(e.id)){if(this.onlyRendered&&!t[e.id])return;const o=this.getLayerLegend(e);if(!o)return;this.legendTable.appendChild(o)}}))}}onAdd(e){this.map=e,this.controlContainer=document.createElement("div"),this.controlContainer.classList.add("mapboxgl-ctrl"),this.controlContainer.classList.add("mapboxgl-ctrl-group"),this.legendContainer=document.createElement("div"),this.legendContainer.classList.add("mapboxgl-legend-list"),this.legendButton=document.createElement("button"),this.legendButton.classList.add("mapboxgl-ctrl-icon"),this.legendButton.classList.add("mapboxgl-legend-switcher"),this.legendButton.addEventListener("click",(()=>{this.legendButton.style.display="none",this.legendContainer.style.display="block"})),document.addEventListener("click",this.onDocumentClick),this.controlContainer.appendChild(this.legendButton),this.controlContainer.appendChild(this.legendContainer),this.closeButton=document.createElement("button"),this.closeButton.textContent="x",this.closeButton.classList.add("mapboxgl-legend-close-button"),this.closeButton.addEventListener("click",(()=>{this.legendButton.style.display="block",this.legendContainer.style.display="none"})),this.legendContainer.appendChild(this.closeButton);const t=document.createElement("label");t.classList.add("mapboxgl-legend-title-label"),t.textContent=this.options.title||"Legend",this.legendContainer.appendChild(t),this.legendContainer.appendChild(document.createElement("br"));const o=document.createElement("input");o.setAttribute("type","checkbox");const i="mapboxgl-legend-onlyrendered-checkbox-"+100*Math.random();o.setAttribute("id",i),o.classList.add("mapboxgl-legend-onlyRendered-checkbox"),o.checked=this.onlyRendered;const a=this;o.addEventListener("click",(function(e){var t;const o=null===(t=e.target)||void 0===t?void 0:t.checked;a.onlyRendered=!!o,a.updateLegendControl()})),this.legendContainer.appendChild(o);const s=document.createElement("label");s.classList.add("mapboxgl-legend-onlyRendered-label"),s.textContent="Only rendered",s.htmlFor=i,this.legendContainer.appendChild(s),this.legendContainer.appendChild(document.createElement("br")),this.map.on("moveend",(e=>{this.updateLegendControl()}));const l=()=>r(this,void 0,void 0,(function*(){if(e.loaded()){let t=e.getStyle().sprite,o="";t&&t.includes("mapbox://")&&(t=t.replace(/mapbox:\/\//g,n.baseApiUrl).replace(/sprites/g,"/styles/v1"),t=`${t}/sprite`,o=`?access_token=${this.options.accesstoken||n.accessToken}`);const r=Promise.all([this.loadImage(`${t}@2x.png${o}`),this.loadJson(`${t}.json${o}`)]);yield r.then((([e,t])=>{this.setSprite(e,t)})),this.updateLegendControl(),e.off("idle",l)}}));return this.map.on("idle",l),this.options&&1==this.options.showDefault&&(this.legendContainer.style.display="block",this.legendButton.style.display="none"),this.controlContainer}onRemove(){this.controlContainer&&this.controlContainer.parentNode&&this.map&&this.legendButton&&(this.legendButton.removeEventListener("click",this.onDocumentClick),this.controlContainer.parentNode.removeChild(this.controlContainer),document.removeEventListener("click",this.onDocumentClick),this.map=void 0)}redraw(){this.updateLegendControl()}onDocumentClick(e){this.controlContainer&&!this.controlContainer.contains(e.target)&&this.legendContainer&&this.legendButton&&this.options&&!0!==this.options.showDefault&&(this.legendContainer.style.display="none",this.legendButton.style.display="block")}setSprite(e,t){this.sprite={image:e,json:t}}loadImage(e){let t=!1;const o=new Promise(((o,r)=>{const i=new Image;i.crossOrigin="Anonymous",i.onload=()=>{t||o(i)},i.onerror=e=>{t||r(e)},i.src=e}));return o.cancel=()=>{t=!0},o}loadJson(e){return s.default.get(e,{responseType:"json"}).then((e=>e.data))}}},640:t=>{"use strict";t.exports=e}},o={};function r(e){var i=o[e];if(void 0!==i)return i.exports;var n=o[e]={exports:{}};return t[e].call(n.exports,n,n.exports,r),n.exports}return r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r(620)})()));
\ No newline at end of file
diff --git a/src/ckanext-mappreview/ckanext/mappreview/assets/js/vendor/mapbox-gl.js b/src/ckanext-mappreview/ckanext/mappreview/assets/js/vendor/mapbox-gl.js
new file mode 100644
index 000000000..129c99698
--- /dev/null
+++ b/src/ckanext-mappreview/ckanext/mappreview/assets/js/vendor/mapbox-gl.js
@@ -0,0 +1,105 @@
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).mapboxgl=t()}(this,function(){"use strict";var a,n,o;function e(e,t){var i,r;a?n?(i="self.onerror = function() { console.error('An error occurred while parsing the WebWorker bundle. This is most likely due to improper transpilation by Babel; please see https://docs.mapbox.com/mapbox-gl-js/guides/install/#transpiling'); }; var sharedChunk = {}; ("+a+")(sharedChunk); ("+n+")(sharedChunk); self.onerror = null;",a(r={}),o=t(r),"undefined"!=typeof window&&window&&window.URL&&window.URL.createObjectURL&&(o.workerUrl=window.URL.createObjectURL(new Blob([i],{type:"text/javascript"})))):n=t:a=t}return e(0,function(Te){var P="3.6.0";let z;const o={API_URL:"https://api.mapbox.com",get API_URL_REGEX(){if(null==z){var t=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;try{z=null!=process.env.API_URL_REGEX?new RegExp(process.env.API_URL_REGEX):t}catch(e){z=t}}return z},get API_TILEJSON_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/v[0-9]*\/.*\.json.*$)/i},get API_SPRITE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*\/sprite.*\..*$)/i},get API_FONTS_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/fonts\/v[0-9]*\/)(.*\.pbf.*$)/i},get API_STYLE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*$)/i},get API_CDN_URL_REGEX(){return/^((https?:)?\/\/)?api\.mapbox\.c(n|om)(\/mapbox-gl-js\/)(.*$)/i},get EVENTS_URL(){if(!o.API_URL)return null;try{var e=new URL(o.API_URL);return"api.mapbox.cn"===e.hostname?"https://events.mapbox.cn/events/v2":"api.mapbox.com"===e.hostname?"https://events.mapbox.com/events/v2":null}catch(e){return null}},SESSION_PATH:"/map-sessions/v1",FEEDBACK_URL:"https://apps.mapbox.com/feedback",TILE_URL_VERSION:"v4",RASTER_URL_PREFIX:"raster/v1",RASTERARRAYS_URL_PREFIX:"rasterarrays/v1",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,DEFAULT_STYLE:"mapbox://styles/mapbox/standard",MAX_PARALLEL_IMAGE_REQUESTS:16,DRACO_URL:"https://api.mapbox.com/mapbox-gl-js/draco_decoder_gltf_v1.5.6.wasm",MESHOPT_URL:"https://api.mapbox.com/mapbox-gl-js/meshopt_base_v0.20.wasm",MESHOPT_SIMD_URL:"https://api.mapbox.com/mapbox-gl-js/meshopt_simd_v0.20.wasm",GLYPHS_URL:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf",TILES3D_URL_PREFIX:"3dtiles/v1"};function L(e){return o.API_URL_REGEX.test(e)}function k(e){return 0===e.indexOf("mapbox:")}function O(e){return o.API_CDN_URL_REGEX.test(e)}function B(e){return o.API_SPRITE_REGEX.test(e)}function F(e){return o.API_STYLE_REGEX.test(e)&&!B(e)}const N={create:"create",load:"load",fullLoad:"fullLoad"},V={mark(e){performance.mark(e)},measure(e,t,i){performance.measure(e,t,i)}};function U(e){const t=e.name.split("?")[0];return O(t)&&t.includes("mapbox-gl.js")?"javascript":O(t)&&t.includes("mapbox-gl.css")?"css":(e=t,o.API_FONTS_REGEX.test(e)?"fontRange":B(t)?"sprite":F(t)?"style":(e=t,o.API_TILEJSON_REGEX.test(e)?"tilejson":"other"))}function j(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $={},Z={},W=(Object.defineProperty(Z,"__esModule",{value:!0}),Z.setMatrixArrayType=function(e){Z.ARRAY_TYPE=H=e},Z.toRadian=function(e){return e*X},Z.equals=function(e,t){return Math.abs(e-t)<=W*Math.max(1,Math.abs(e),Math.abs(t))},Z.RANDOM=Z.ARRAY_TYPE=Z.EPSILON=void 0,1e-6),H=(Z.EPSILON=W,"undefined"!=typeof Float32Array?Float32Array:Array),e=(Z.ARRAY_TYPE=H,Math.random),X=(Z.RANDOM=e,Math.PI/180),e=(Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)}),{});function Y(e){return(Y="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)}Object.defineProperty(e,"__esModule",{value:!0}),e.create=function(){var e=new J.ARRAY_TYPE(4);return J.ARRAY_TYPE!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e},e.clone=function(e){var t=new J.ARRAY_TYPE(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},e.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},e.identity=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e},e.fromValues=function(e,t,i,r){var a=new J.ARRAY_TYPE(4);return a[0]=e,a[1]=t,a[2]=i,a[3]=r,a},e.set=function(e,t,i,r,a){return e[0]=t,e[1]=i,e[2]=r,e[3]=a,e},e.transpose=function(e,t){var i;return e===t?(i=t[1],e[1]=t[2],e[2]=i):(e[0]=t[0],e[1]=t[2],e[2]=t[1],e[3]=t[3]),e},e.invert=function(e,t){var i=t[0],r=t[1],a=t[2],t=t[3],n=i*t-a*r;return n?(e[0]=t*(n=1/n),e[1]=-r*n,e[2]=-a*n,e[3]=i*n,e):null},e.adjoint=function(e,t){var i=t[0];return e[0]=t[3],e[1]=-t[1],e[2]=-t[2],e[3]=i,e},e.determinant=function(e){return e[0]*e[3]-e[2]*e[1]},e.multiply=Q,e.rotate=function(e,t,i){var r=t[0],a=t[1],n=t[2],t=t[3],o=Math.sin(i),i=Math.cos(i);return e[0]=r*i+n*o,e[1]=a*i+t*o,e[2]=r*-o+n*i,e[3]=a*-o+t*i,e},e.scale=function(e,t,i){var r=t[1],a=t[2],n=t[3],o=i[0],i=i[1];return e[0]=t[0]*o,e[1]=r*o,e[2]=a*i,e[3]=n*i,e},e.fromRotation=function(e,t){var i=Math.sin(t),t=Math.cos(t);return e[0]=t,e[1]=i,e[2]=-i,e[3]=t,e},e.fromScaling=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e},e.str=function(e){return"mat2("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},e.frob=function(e){return Math.hypot(e[0],e[1],e[2],e[3])},e.LDU=function(e,t,i,r){return e[2]=r[2]/r[0],i[0]=r[0],i[1]=r[1],i[3]=r[3]-e[2]*i[1],[e,t,i]},e.add=function(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e},e.subtract=ee,e.exactEquals=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]},e.equals=function(e,t){var i=e[0],r=e[1],a=e[2],e=e[3],n=t[0],o=t[1],s=t[2],t=t[3];return Math.abs(i-n)<=J.EPSILON*Math.max(1,Math.abs(i),Math.abs(n))&&Math.abs(r-o)<=J.EPSILON*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(a-s)<=J.EPSILON*Math.max(1,Math.abs(a),Math.abs(s))&&Math.abs(e-t)<=J.EPSILON*Math.max(1,Math.abs(e),Math.abs(t))},e.multiplyScalar=function(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e},e.multiplyScalarAndAdd=function(e,t,i,r){return e[0]=t[0]+i[0]*r,e[1]=t[1]+i[1]*r,e[2]=t[2]+i[2]*r,e[3]=t[3]+i[3]*r,e},e.sub=e.mul=void 0;var J=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==Y(e)&&"function"!=typeof e)return{default:e};var t=K(void 0);if(t&&t.has(e))return t.get(e);var i,r,a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&((r=n?Object.getOwnPropertyDescriptor(e,i):null)&&(r.get||r.set)?Object.defineProperty(a,i,r):a[i]=e[i]);return a.default=e,t&&t.set(e,a),a}(Z);function K(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(K=function(e){return e?i:t})(e)}function Q(e,t,i){var r=t[0],a=t[1],n=t[2],t=t[3],o=i[0],s=i[1],l=i[2],i=i[3];return e[0]=r*o+n*s,e[1]=a*o+t*s,e[2]=r*l+n*i,e[3]=a*l+t*i,e}function ee(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e[3]=t[3]-i[3],e}e.mul=Q,e.sub=ee;var t={};function te(e){return(te="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)}Object.defineProperty(t,"__esModule",{value:!0}),t.create=function(){var e=new ie.ARRAY_TYPE(6);return ie.ARRAY_TYPE!=Float32Array&&(e[1]=0,e[2]=0,e[4]=0,e[5]=0),e[0]=1,e[3]=1,e},t.clone=function(e){var t=new ie.ARRAY_TYPE(6);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},t.copy=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},t.identity=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e},t.fromValues=function(e,t,i,r,a,n){var o=new ie.ARRAY_TYPE(6);return o[0]=e,o[1]=t,o[2]=i,o[3]=r,o[4]=a,o[5]=n,o},t.set=function(e,t,i,r,a,n,o){return e[0]=t,e[1]=i,e[2]=r,e[3]=a,e[4]=n,e[5]=o,e},t.invert=function(e,t){var i=t[0],r=t[1],a=t[2],n=t[3],o=t[4],t=t[5],s=i*n-r*a;return s?(e[0]=n*(s=1/s),e[1]=-r*s,e[2]=-a*s,e[3]=i*s,e[4]=(a*t-n*o)*s,e[5]=(r*o-i*t)*s,e):null},t.determinant=function(e){return e[0]*e[3]-e[1]*e[2]},t.multiply=ae,t.rotate=function(e,t,i){var r=t[0],a=t[1],n=t[2],o=t[3],s=t[4],t=t[5],l=Math.sin(i),i=Math.cos(i);return e[0]=r*i+n*l,e[1]=a*i+o*l,e[2]=r*-l+n*i,e[3]=a*-l+o*i,e[4]=s,e[5]=t,e},t.scale=function(e,t,i){var r=t[1],a=t[2],n=t[3],o=t[4],s=t[5],l=i[0],i=i[1];return e[0]=t[0]*l,e[1]=r*l,e[2]=a*i,e[3]=n*i,e[4]=o,e[5]=s,e},t.translate=function(e,t,i){var r=t[0],a=t[1],n=t[2],o=t[3],s=t[4],t=t[5],l=i[0],i=i[1];return e[0]=r,e[1]=a,e[2]=n,e[3]=o,e[4]=r*l+n*i+s,e[5]=a*l+o*i+t,e},t.fromRotation=function(e,t){var i=Math.sin(t),t=Math.cos(t);return e[0]=t,e[1]=i,e[2]=-i,e[3]=t,e[4]=0,e[5]=0,e},t.fromScaling=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e[4]=0,e[5]=0,e},t.fromTranslation=function(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=t[0],e[5]=t[1],e},t.str=function(e){return"mat2d("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+")"},t.frob=function(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],1)},t.add=function(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e[4]=t[4]+i[4],e[5]=t[5]+i[5],e},t.subtract=ne,t.multiplyScalar=function(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*i,e[5]=t[5]*i,e},t.multiplyScalarAndAdd=function(e,t,i,r){return e[0]=t[0]+i[0]*r,e[1]=t[1]+i[1]*r,e[2]=t[2]+i[2]*r,e[3]=t[3]+i[3]*r,e[4]=t[4]+i[4]*r,e[5]=t[5]+i[5]*r,e},t.exactEquals=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]},t.equals=function(e,t){var i=e[0],r=e[1],a=e[2],n=e[3],o=e[4],e=e[5],s=t[0],l=t[1],c=t[2],h=t[3],u=t[4],t=t[5];return Math.abs(i-s)<=ie.EPSILON*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(r-l)<=ie.EPSILON*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(a-c)<=ie.EPSILON*Math.max(1,Math.abs(a),Math.abs(c))&&Math.abs(n-h)<=ie.EPSILON*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(o-u)<=ie.EPSILON*Math.max(1,Math.abs(o),Math.abs(u))&&Math.abs(e-t)<=ie.EPSILON*Math.max(1,Math.abs(e),Math.abs(t))},t.sub=t.mul=void 0;var ie=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==te(e)&&"function"!=typeof e)return{default:e};var t=re(void 0);if(t&&t.has(e))return t.get(e);var i,r,a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&((r=n?Object.getOwnPropertyDescriptor(e,i):null)&&(r.get||r.set)?Object.defineProperty(a,i,r):a[i]=e[i]);return a.default=e,t&&t.set(e,a),a}(Z);function re(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(re=function(e){return e?i:t})(e)}function ae(e,t,i){var r=t[0],a=t[1],n=t[2],o=t[3],s=t[4],t=t[5],l=i[0],c=i[1],h=i[2],u=i[3],d=i[4],i=i[5];return e[0]=r*l+n*c,e[1]=a*l+o*c,e[2]=r*h+n*u,e[3]=a*h+o*u,e[4]=r*d+n*i+s,e[5]=a*d+o*i+t,e}function ne(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e[3]=t[3]-i[3],e[4]=t[4]-i[4],e[5]=t[5]-i[5],e}t.mul=ae,t.sub=ne;var i={};function oe(e){return(oe="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)}Object.defineProperty(i,"__esModule",{value:!0}),i.create=function(){var e=new se.ARRAY_TYPE(9);return se.ARRAY_TYPE!=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},i.fromMat4=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e},i.clone=function(e){var t=new se.ARRAY_TYPE(9);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},i.copy=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},i.fromValues=function(e,t,i,r,a,n,o,s,l){var c=new se.ARRAY_TYPE(9);return c[0]=e,c[1]=t,c[2]=i,c[3]=r,c[4]=a,c[5]=n,c[6]=o,c[7]=s,c[8]=l,c},i.set=function(e,t,i,r,a,n,o,s,l,c){return e[0]=t,e[1]=i,e[2]=r,e[3]=a,e[4]=n,e[5]=o,e[6]=s,e[7]=l,e[8]=c,e},i.identity=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},i.transpose=function(e,t){var i,r,a;return e===t?(i=t[1],r=t[2],a=t[5],e[1]=t[3],e[2]=t[6],e[3]=i,e[5]=t[7],e[6]=r,e[7]=a):(e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8]),e},i.invert=function(e,t){var i=t[0],r=t[1],a=t[2],n=t[3],o=t[4],s=t[5],l=t[6],c=t[7],t=t[8],h=t*o-s*c,u=-t*n+s*l,d=c*n-o*l,p=i*h+r*u+a*d;return p?(e[0]=h*(p=1/p),e[1]=(-t*r+a*c)*p,e[2]=(s*r-a*o)*p,e[3]=u*p,e[4]=(t*i-a*l)*p,e[5]=(-s*i+a*n)*p,e[6]=d*p,e[7]=(-c*i+r*l)*p,e[8]=(o*i-r*n)*p,e):null},i.adjoint=function(e,t){var i=t[0],r=t[1],a=t[2],n=t[3],o=t[4],s=t[5],l=t[6],c=t[7],t=t[8];return e[0]=o*t-s*c,e[1]=a*c-r*t,e[2]=r*s-a*o,e[3]=s*l-n*t,e[4]=i*t-a*l,e[5]=a*n-i*s,e[6]=n*c-o*l,e[7]=r*l-i*c,e[8]=i*o-r*n,e},i.determinant=function(e){var t=e[3],i=e[4],r=e[5],a=e[6],n=e[7],o=e[8];return e[0]*(o*i-r*n)+e[1]*(-o*t+r*a)+e[2]*(n*t-i*a)},i.multiply=ce,i.translate=function(e,t,i){var r=t[0],a=t[1],n=t[2],o=t[3],s=t[4],l=t[5],c=t[6],h=t[7],t=t[8],u=i[0],i=i[1];return e[0]=r,e[1]=a,e[2]=n,e[3]=o,e[4]=s,e[5]=l,e[6]=u*r+i*o+c,e[7]=u*a+i*s+h,e[8]=u*n+i*l+t,e},i.rotate=function(e,t,i){var r=t[0],a=t[1],n=t[2],o=t[3],s=t[4],l=t[5],c=t[6],h=t[7],t=t[8],u=Math.sin(i),i=Math.cos(i);return e[0]=i*r+u*o,e[1]=i*a+u*s,e[2]=i*n+u*l,e[3]=i*o-u*r,e[4]=i*s-u*a,e[5]=i*l-u*n,e[6]=c,e[7]=h,e[8]=t,e},i.scale=function(e,t,i){var r=i[0],i=i[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},i.fromTranslation=function(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=t[0],e[7]=t[1],e[8]=1,e},i.fromRotation=function(e,t){var i=Math.sin(t),t=Math.cos(t);return e[0]=t,e[1]=i,e[2]=0,e[3]=-i,e[4]=t,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},i.fromScaling=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=t[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},i.fromMat2d=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e},i.fromQuat=function(e,t){var i=t[0],r=t[1],a=t[2],t=t[3],n=i+i,o=r+r,s=a+a,i=i*n,l=r*n,r=r*o,c=a*n,h=a*o,a=a*s,n=t*n,o=t*o,t=t*s;return e[0]=1-r-a,e[3]=l-t,e[6]=c+o,e[1]=l+t,e[4]=1-i-a,e[7]=h-n,e[2]=c-o,e[5]=h+n,e[8]=1-i-r,e},i.normalFromMat4=function(e,t){var i=t[0],r=t[1],a=t[2],n=t[3],o=t[4],s=t[5],l=t[6],c=t[7],h=t[8],u=t[9],d=t[10],p=t[11],f=t[12],m=t[13],_=t[14],t=t[15],g=i*s-r*o,y=i*l-a*o,x=i*c-n*o,v=r*l-a*s,b=r*c-n*s,w=a*c-n*l,T=h*m-u*f,E=h*_-d*f,h=h*t-p*f,S=u*_-d*m,u=u*t-p*m,d=d*t-p*_,p=g*d-y*u+x*S+v*h-b*E+w*T;return p?(e[0]=(s*d-l*u+c*S)*(p=1/p),e[1]=(l*h-o*d-c*E)*p,e[2]=(o*u-s*h+c*T)*p,e[3]=(a*u-r*d-n*S)*p,e[4]=(i*d-a*h+n*E)*p,e[5]=(r*h-i*u-n*T)*p,e[6]=(m*w-_*b+t*v)*p,e[7]=(_*x-f*w-t*y)*p,e[8]=(f*b-m*x+t*g)*p,e):null},i.projection=function(e,t,i){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/i,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e},i.str=function(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"},i.frob=function(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},i.add=function(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e[3]=t[3]+i[3],e[4]=t[4]+i[4],e[5]=t[5]+i[5],e[6]=t[6]+i[6],e[7]=t[7]+i[7],e[8]=t[8]+i[8],e},i.subtract=he,i.multiplyScalar=function(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*i,e},i.multiplyScalarAndAdd=function(e,t,i,r){return e[0]=t[0]+i[0]*r,e[1]=t[1]+i[1]*r,e[2]=t[2]+i[2]*r,e[3]=t[3]+i[3]*r,e[4]=t[4]+i[4]*r,e[5]=t[5]+i[5]*r,e[6]=t[6]+i[6]*r,e[7]=t[7]+i[7]*r,e[8]=t[8]+i[8]*r,e},i.exactEquals=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]},i.equals=function(e,t){var i=e[0],r=e[1],a=e[2],n=e[3],o=e[4],s=e[5],l=e[6],c=e[7],e=e[8],h=t[0],u=t[1],d=t[2],p=t[3],f=t[4],m=t[5],_=t[6],g=t[7],t=t[8];return Math.abs(i-h)<=se.EPSILON*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(r-u)<=se.EPSILON*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(a-d)<=se.EPSILON*Math.max(1,Math.abs(a),Math.abs(d))&&Math.abs(n-p)<=se.EPSILON*Math.max(1,Math.abs(n),Math.abs(p))&&Math.abs(o-f)<=se.EPSILON*Math.max(1,Math.abs(o),Math.abs(f))&&Math.abs(s-m)<=se.EPSILON*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(l-_)<=se.EPSILON*Math.max(1,Math.abs(l),Math.abs(_))&&Math.abs(c-g)<=se.EPSILON*Math.max(1,Math.abs(c),Math.abs(g))&&Math.abs(e-t)<=se.EPSILON*Math.max(1,Math.abs(e),Math.abs(t))},i.sub=i.mul=void 0;var se=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==oe(e)&&"function"!=typeof e)return{default:e};var t=le(void 0);if(t&&t.has(e))return t.get(e);var i,r,a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&((r=n?Object.getOwnPropertyDescriptor(e,i):null)&&(r.get||r.set)?Object.defineProperty(a,i,r):a[i]=e[i]);return a.default=e,t&&t.set(e,a),a}(Z);function le(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(le=function(e){return e?i:t})(e)}function ce(e,t,i){var r=t[0],a=t[1],n=t[2],o=t[3],s=t[4],l=t[5],c=t[6],h=t[7],t=t[8],u=i[0],d=i[1],p=i[2],f=i[3],m=i[4],_=i[5],g=i[6],y=i[7],i=i[8];return e[0]=u*r+d*o+p*c,e[1]=u*a+d*s+p*h,e[2]=u*n+d*l+p*t,e[3]=f*r+m*o+_*c,e[4]=f*a+m*s+_*h,e[5]=f*n+m*l+_*t,e[6]=g*r+y*o+i*c,e[7]=g*a+y*s+i*h,e[8]=g*n+y*l+i*t,e}function he(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e[3]=t[3]-i[3],e[4]=t[4]-i[4],e[5]=t[5]-i[5],e[6]=t[6]-i[6],e[7]=t[7]-i[7],e[8]=t[8]-i[8],e}i.mul=ce,i.sub=he;var r={};function de(e){return(de="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)}Object.defineProperty(r,"__esModule",{value:!0}),r.create=function(){var e=new D.ARRAY_TYPE(16);return D.ARRAY_TYPE!=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},r.clone=function(e){var t=new D.ARRAY_TYPE(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},r.copy=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},r.fromValues=function(e,t,i,r,a,n,o,s,l,c,h,u,d,p,f,m){var _=new D.ARRAY_TYPE(16);return _[0]=e,_[1]=t,_[2]=i,_[3]=r,_[4]=a,_[5]=n,_[6]=o,_[7]=s,_[8]=l,_[9]=c,_[10]=h,_[11]=u,_[12]=d,_[13]=p,_[14]=f,_[15]=m,_},r.set=function(e,t,i,r,a,n,o,s,l,c,h,u,d,p,f,m,_){return e[0]=t,e[1]=i,e[2]=r,e[3]=a,e[4]=n,e[5]=o,e[6]=s,e[7]=l,e[8]=c,e[9]=h,e[10]=u,e[11]=d,e[12]=p,e[13]=f,e[14]=m,e[15]=_,e},r.identity=fe,r.transpose=function(e,t){var i,r,a,n,o,s;return e===t?(i=t[1],r=t[2],a=t[3],n=t[6],o=t[7],s=t[11],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=i,e[6]=t[9],e[7]=t[13],e[8]=r,e[9]=n,e[11]=t[14],e[12]=a,e[13]=o,e[14]=s):(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]),e},r.invert=function(e,t){var i=t[0],r=t[1],a=t[2],n=t[3],o=t[4],s=t[5],l=t[6],c=t[7],h=t[8],u=t[9],d=t[10],p=t[11],f=t[12],m=t[13],_=t[14],t=t[15],g=i*s-r*o,y=i*l-a*o,x=i*c-n*o,v=r*l-a*s,b=r*c-n*s,w=a*c-n*l,T=h*m-u*f,E=h*_-d*f,S=h*t-p*f,M=u*_-d*m,I=u*t-p*m,A=d*t-p*_,C=g*A-y*I+x*M+v*S-b*E+w*T;return C?(e[0]=(s*A-l*I+c*M)*(C=1/C),e[1]=(a*I-r*A-n*M)*C,e[2]=(m*w-_*b+t*v)*C,e[3]=(d*b-u*w-p*v)*C,e[4]=(l*S-o*A-c*E)*C,e[5]=(i*A-a*S+n*E)*C,e[6]=(_*x-f*w-t*y)*C,e[7]=(h*w-d*x+p*y)*C,e[8]=(o*I-s*S+c*T)*C,e[9]=(r*S-i*I-n*T)*C,e[10]=(f*b-m*x+t*g)*C,e[11]=(u*x-h*b-p*g)*C,e[12]=(s*E-o*M-l*T)*C,e[13]=(i*M-r*E+a*T)*C,e[14]=(m*y-f*v-_*g)*C,e[15]=(h*v-u*y+d*g)*C,e):null},r.adjoint=function(e,t){var i=t[0],r=t[1],a=t[2],n=t[3],o=t[4],s=t[5],l=t[6],c=t[7],h=t[8],u=t[9],d=t[10],p=t[11],f=t[12],m=t[13],_=t[14],t=t[15];return e[0]=s*(d*t-p*_)-u*(l*t-c*_)+m*(l*p-c*d),e[1]=-(r*(d*t-p*_)-u*(a*t-n*_)+m*(a*p-n*d)),e[2]=r*(l*t-c*_)-s*(a*t-n*_)+m*(a*c-n*l),e[3]=-(r*(l*p-c*d)-s*(a*p-n*d)+u*(a*c-n*l)),e[4]=-(o*(d*t-p*_)-h*(l*t-c*_)+f*(l*p-c*d)),e[5]=i*(d*t-p*_)-h*(a*t-n*_)+f*(a*p-n*d),e[6]=-(i*(l*t-c*_)-o*(a*t-n*_)+f*(a*c-n*l)),e[7]=i*(l*p-c*d)-o*(a*p-n*d)+h*(a*c-n*l),e[8]=o*(u*t-p*m)-h*(s*t-c*m)+f*(s*p-c*u),e[9]=-(i*(u*t-p*m)-h*(r*t-n*m)+f*(r*p-n*u)),e[10]=i*(s*t-c*m)-o*(r*t-n*m)+f*(r*c-n*s),e[11]=-(i*(s*p-c*u)-o*(r*p-n*u)+h*(r*c-n*s)),e[12]=-(o*(u*_-d*m)-h*(s*_-l*m)+f*(s*d-l*u)),e[13]=i*(u*_-d*m)-h*(r*_-a*m)+f*(r*d-a*u),e[14]=-(i*(s*_-l*m)-o*(r*_-a*m)+f*(r*l-a*s)),e[15]=i*(s*d-l*u)-o*(r*d-a*u)+h*(r*l-a*s),e},r.determinant=function(e){var t=e[0],i=e[1],r=e[2],a=e[3],n=e[4],o=e[5],s=e[6],l=e[7],c=e[8],h=e[9],u=e[10],d=e[11],p=e[12],f=e[13],m=e[14],e=e[15];return(t*o-i*n)*(u*e-d*m)-(t*s-r*n)*(h*e-d*f)+(t*l-a*n)*(h*m-u*f)+(i*s-r*o)*(c*e-d*p)-(i*l-a*o)*(c*m-u*p)+(r*l-a*s)*(c*f-h*p)},r.multiply=me,r.translate=function(e,t,i){var r,a,n,o,s,l,c,h,u,d,p,f,m=i[0],_=i[1],i=i[2];return t===e?(e[12]=t[0]*m+t[4]*_+t[8]*i+t[12],e[13]=t[1]*m+t[5]*_+t[9]*i+t[13],e[14]=t[2]*m+t[6]*_+t[10]*i+t[14],e[15]=t[3]*m+t[7]*_+t[11]*i+t[15]):(a=t[1],n=t[2],o=t[3],s=t[4],l=t[5],c=t[6],h=t[7],u=t[8],d=t[9],p=t[10],f=t[11],e[0]=r=t[0],e[1]=a,e[2]=n,e[3]=o,e[4]=s,e[5]=l,e[6]=c,e[7]=h,e[8]=u,e[9]=d,e[10]=p,e[11]=f,e[12]=r*m+s*_+u*i+t[12],e[13]=a*m+l*_+d*i+t[13],e[14]=n*m+c*_+p*i+t[14],e[15]=o*m+h*_+f*i+t[15]),e},r.scale=function(e,t,i){var r=i[0],a=i[1],i=i[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]*a,e[5]=t[5]*a,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=t[11]*i,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},r.rotate=function(e,t,i,r){var a,n,o,s,l,c,h,u,d,p,f,m,_,g,y,x,v,b,w,T,E=r[0],S=r[1],r=r[2],M=Math.hypot(E,S,r);return MXe.EPSILON?(e[0]=t[0]/r,e[1]=t[1]/r,e[2]=t[2]/r):(e[0]=1,e[1]=0,e[2]=0),i},a.getAngle=function(e,t){e=st(e,t);return Math.acos(2*e*e-1)},a.multiply=tt,a.rotateX=function(e,t,i){i*=.5;var r=t[0],a=t[1],n=t[2],t=t[3],o=Math.sin(i),i=Math.cos(i);return e[0]=r*i+t*o,e[1]=a*i+n*o,e[2]=n*i-a*o,e[3]=t*i-r*o,e},a.rotateY=function(e,t,i){i*=.5;var r=t[0],a=t[1],n=t[2],t=t[3],o=Math.sin(i),i=Math.cos(i);return e[0]=r*i-n*o,e[1]=a*i+t*o,e[2]=n*i+r*o,e[3]=t*i-a*o,e},a.rotateZ=function(e,t,i){i*=.5;var r=t[0],a=t[1],n=t[2],t=t[3],o=Math.sin(i),i=Math.cos(i);return e[0]=r*i+a*o,e[1]=a*i-r*o,e[2]=n*i+t*o,e[3]=t*i-n*o,e},a.calculateW=function(e,t){var i=t[0],r=t[1],t=t[2];return e[0]=i,e[1]=r,e[2]=t,e[3]=Math.sqrt(Math.abs(1-i*i-r*r-t*t)),e},a.exp=it,a.ln=rt,a.pow=function(e,t,i){return rt(e,t),ot(e,e,i),it(e,e),e},a.slerp=at,a.random=function(e){var t=Xe.RANDOM(),i=Xe.RANDOM(),r=Xe.RANDOM(),a=Math.sqrt(1-t),t=Math.sqrt(t);return e[0]=a*Math.sin(2*Math.PI*i),e[1]=a*Math.cos(2*Math.PI*i),e[2]=t*Math.sin(2*Math.PI*r),e[3]=t*Math.cos(2*Math.PI*r),e},a.invert=function(e,t){var i=t[0],r=t[1],a=t[2],t=t[3],n=i*i+r*r+a*a+t*t,n=n?1/n:0;return e[0]=-i*n,e[1]=-r*n,e[2]=-a*n,e[3]=t*n,e},a.conjugate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e},a.fromMat3=nt,a.fromEuler=function(e,t,i,r){var a=.5*Math.PI/180,a=(t*=a,i*=a,r*=a,Math.sin(t)),t=Math.cos(t),n=Math.sin(i),i=Math.cos(i),o=Math.sin(r),r=Math.cos(r);return e[0]=a*i*r-t*n*o,e[1]=t*n*r+a*i*o,e[2]=t*i*o-a*n*r,e[3]=t*i*r+a*n*o,e},a.str=function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},a.setAxes=a.sqlerp=a.rotationTo=a.equals=a.exactEquals=a.normalize=a.sqrLen=a.squaredLength=a.len=a.length=a.lerp=a.dot=a.scale=a.mul=a.add=a.set=a.copy=a.fromValues=a.clone=void 0;var Xe=Ke(Z),l=Ke(i),Ye=Ke(n),c=Ke(s);function Je(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(Je=function(e){return e?i:t})(e)}function Ke(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==He(e)&&"function"!=typeof e)return{default:e};t=Je(t);if(t&&t.has(e))return t.get(e);var i,r,a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&((r=n?Object.getOwnPropertyDescriptor(e,i):null)&&(r.get||r.set)?Object.defineProperty(a,i,r):a[i]=e[i]);return a.default=e,t&&t.set(e,a),a}function Qe(){var e=new Xe.ARRAY_TYPE(4);return Xe.ARRAY_TYPE!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function et(e,t,i){i*=.5;var r=Math.sin(i);return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=Math.cos(i),e}function tt(e,t,i){var r=t[0],a=t[1],n=t[2],t=t[3],o=i[0],s=i[1],l=i[2],i=i[3];return e[0]=r*i+t*o+a*l-n*s,e[1]=a*i+t*s+n*o-r*l,e[2]=n*i+t*l+r*s-a*o,e[3]=t*i-r*o-a*s-n*l,e}function it(e,t){var i=t[0],r=t[1],a=t[2],t=t[3],n=Math.sqrt(i*i+r*r+a*a),t=Math.exp(t),o=0Xe.EPSILON?(o=Math.acos(o),a=Math.sin(o),n=Math.sin((1-r)*o)/a,Math.sin(r*o)/a):(n=1-r,r),e[0]=n*s+o*h,e[1]=n*l+o*u,e[2]=n*c+o*d,e[3]=n*t+o*i,e}function nt(e,t){var i,r,a,n=t[0]+t[4]+t[8];return 0t[n=0]&&(n=1),i=((n=t[8]>t[3*n+n]?2:n)+1)%3,r=(n+2)%3,a=Math.sqrt(t[3*n+n]-t[3*i+i]-t[3*r+r]+1),e[n]=.5*a,e[3]=(t[3*i+r]-t[3*r+i])*(a=.5/a),e[i]=(t[3*i+n]+t[3*n+i])*a,e[r]=(t[3*r+n]+t[3*n+r])*a),e}a.clone=c.clone,a.fromValues=c.fromValues,a.copy=c.copy,a.set=c.set,a.add=c.add,a.mul=tt;var ot=c.scale,st=(a.scale=ot,c.dot),h=(a.dot=st,a.lerp=c.lerp,c.length),h=(a.length=h,a.len=h,c.squaredLength),lt=(a.squaredLength=h,a.sqrLen=h,c.normalize);a.normalize=lt,a.exactEquals=c.exactEquals,a.equals=c.equals;var ct,ht,ut;ct=Ye.create(),ht=Ye.fromValues(1,0,0),ut=Ye.fromValues(0,1,0);a.rotationTo=function(e,t,i){var r=Ye.dot(t,i);return r<-.999999?(Ye.cross(ct,ht,t),Ye.len(ct)<1e-6&&Ye.cross(ct,ut,t),Ye.normalize(ct,ct),et(e,ct,Math.PI),e):.999999{t(e,(e,t)=>{e&&(o=e),n[i]=t,0==--a&&r(o,n)})})}function ti(e){const t=[];for(const i in e)t.push(e[i]);return t}function ii(e,...t){for(const i of t)for(const t in i)e[t]=i[t];return e}let ri=1;function ai(){return ri++}function ni(){return function e(t){return t?(t^Math.random()*(16>>t/4)).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,e)}()}function oi(e){return e<=1?1:Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function si(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 li(e,t){e.forEach(e=>{t[e]&&(t[e]=t[e].bind(t))})}function ci(e,t){return-1!==e.indexOf(t,e.length-t.length)}function hi(e,t,i){const r={};for(const i in e)r[i]=t.call(this,e[i],i,e);return r}function ui(e,t,i){const r={};for(const i in e)t.call(this,e[i],i,e)&&(r[i]=e[i]);return r}function di(e){return Array.isArray(e)?e.map(di):"object"==typeof e&&e?hi(e,di):e}const pi={};function fi(e){pi[e]||("undefined"!=typeof console&&console.warn(e),pi[e]=!0)}function mi(e,t,i){return(i.y-e.y)*(t.x-e.x)>(t.y-e.y)*(i.x-e.x)}function _i([e,t,i]){var r=x(t+90),a=x(i);return{x:e*Math.cos(r)*Math.sin(a),y:e*Math.sin(r)*Math.sin(a),z:e*Math.cos(a),azimuthal:t,polar:i}}function gi(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}function yi(e){const n={};if(e.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(e,t,i,r)=>{const a=i||r;return n[t]=!a||a.toLowerCase(),""}),n["max-age"]){const e=parseInt(n["max-age"],10);isNaN(e)?delete n["max-age"]:n["max-age"]=e}return n}let xi,vi,bi,wi,Ti,Ei,Si=null;function Mi(e){try{const t=self[e];return t.setItem("_mapbox_test_",1),t.removeItem("_mapbox_test_"),!0}catch(e){return!1}}function Ii(e,t){return[e[4*t],e[4*t+1],e[4*t+2],e[4*t+3]]}function Ai(e,t,i,r){for(;t>1;e[a]>1;e[a]<=r?t=1+a:i=a}return t}function Pi(e){return 0void 0!==wi?wi:performance.now(),setNow(e){wi=e},restoreNow(){wi=void 0},frame(e){const t=requestAnimationFrame(e);return{cancel:()=>cancelAnimationFrame(t)}},getImageData(e,t=0){var{width:i,height:r}=e;const a=(Ti=Ti||document.createElement("canvas")).getContext("2d",{willReadFrequently:!0});if(a)return(i>Ti.width||r>Ti.height)&&(Ti.width=i,Ti.height=r),a.clearRect(-t,-t,i+2*t,r+2*t),a.drawImage(e,0,0,i,r),a.getImageData(-t,-t,i+2*t,r+2*t);throw new Error("failed to create canvas 2d context")},resolveURL:e=>((vi=vi||document.createElement("a")).href=e,vi.href),get devicePixelRatio(){return window.devicePixelRatio},get prefersReducedMotion(){return!!window.matchMedia&&(bi=null==bi?window.matchMedia("(prefers-reduced-motion: reduce)"):bi).matches},hasCanvasFingerprintNoise(){if(void 0!==Ei)return Ei;if(!Di())return Ei=!1;const t=new OffscreenCanvas(85,1),i=t.getContext("2d",{willReadFrequently:!0});let r=0;for(let e=0;e{if(!n){if(e&&"SecurityError"!==e.message&&fi(e.toString()),t&&i)return f(t);const r=Date.now();fetch(u).then(e=>{if(e.ok){const o=d?e.clone():null;return f(e,o,r)}return s(new Qi(e.statusText,e.status,o.url))}).catch(e=>{"AbortError"!==e.name&&s(new Error(e.message+" "+o.url))})}},f=(t,i,r)=>{("arrayBuffer"===o.type?t.arrayBuffer():"json"===o.type?t.json():t.text()).then(e=>{n||(i&&r&&function(e,a,t){if(Gi(),Vi){var i=yi(a.headers.get("Cache-Control")||"");if(!i["no-store"]){const o={status:a.status,statusText:a.statusText,headers:new Headers};a.headers.forEach((e,t)=>o.headers.set(t,e)),i["max-age"]&&o.headers.set("Expires",new Date(t+1e3*i["max-age"]).toUTCString());i=o.headers.get("Expires");if(i&&!(new Date(i).getTime()-t<42e4)){let r=ki(e.url,{persistentParams:Ni});if(206===a.status){const a=e.headers.get("Range");if(!a)return;o.status=200,r=Li(r,{range:a})}var n=a,i=e=>{const t=new Response(200!==(i=a.status)&&404!==i&&[101,103,204,205,304].includes(i)?null:e,o);var i;Gi(),Vi&&Vi.then(e=>e.put(r,t)).catch(e=>fi(e.message))};if(void 0===Ui)try{new Response(new ReadableStream),Ui=!0}catch(n){Ui=!1}Ui?i(n.body):n.blob().then(i)}}}}(u,i,r),a=!0,s(null,e,t.headers.get("Cache-Control"),t.headers.get("Expires")))}).catch(e=>{n||s(new Error(e.message))})};return d?(l=u,c=p,Gi(),Vi?Vi.then(i=>{let r=ki(l.url,{persistentParams:Ni});var e=l.headers.get("Range");e&&(r=Li(r,{range:e})),i.match(r).then(e=>{var t=function(e){if(!e)return!1;var t=new Date(e.headers.get("Expires")||0),e=yi(e.headers.get("Cache-Control")||"");return t>Date.now()&&!e["no-cache"]}(e);i.delete(r),t&&i.put(r,e.clone()),c(null,e,t)}).catch(c)}).catch(c):c(null)):p(null,null),{cancel:()=>{n=!0,a||h.abort()}};return}if(gi()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,t,void 0,!0)}var i;{var r=e,a=t;const n=new XMLHttpRequest;n.open(r.method||"GET",r.url,!0),"arrayBuffer"===r.type&&(n.responseType="arraybuffer");for(const a in r.headers)n.setRequestHeader(a,r.headers[a]);return"json"===r.type&&(n.responseType="text",n.setRequestHeader("Accept","application/json")),n.withCredentials="include"===r.credentials,n.onerror=()=>{a(new Error(n.statusText))},n.onload=()=>{if((200<=n.status&&n.status<300||0===n.status)&&null!==n.response){let e=n.response;if("json"===r.type)try{e=JSON.parse(n.response)}catch(e){return a(e)}a(null,e,n.getResponseHeader("Cache-Control"),n.getResponseHeader("Expires"))}else a(new Qi(n.statusText,n.status,r.url))},n.send(r.body),{cancel:()=>n.abort()}}}function tr(e,t){return er(ii(e,{type:"arrayBuffer"}),t)}const ir=gi()?()=>self.worker&&self.worker.referrer:()=>("blob:"===location.protocol?parent:self).location.href;const rr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let ar,nr;ar=[],nr=0;function or(e,s){if($i.supported&&(e.headers||(e.headers={}),e.headers.accept="image/webp,*/*"),nr>=o.MAX_PARALLEL_IMAGE_REQUESTS){const i={requestParameters:e,callback:s,cancelled:!1,cancel(){this.cancelled=!0}};return ar.push(i),i}nr++;let i=!1;const l=()=>{if(!i)for(i=!0,nr--;ar.length&&nr{if(l(),e)s(e);else if(t)if(self.createImageBitmap)n=(e,t)=>s(e,t,i,r),e=new Blob([new Uint8Array(t)],{type:"image/png"}),createImageBitmap(e).then(e=>{n(null,e)}).catch(e=>{n(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.`))});else{e=t;var a=(e,t)=>s(e,t,i,r);const o=new Image;o.onload=()=>{a(null,o),URL.revokeObjectURL(o.src),o.onload=null,requestAnimationFrame(()=>{o.src=rr})},o.onerror=()=>a(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.")),t=new Blob([new Uint8Array(e)],{type:"image/png"}),o.src=e.byteLength?URL.createObjectURL(t):rr}var n});return{cancel:()=>{t.cancel(),l()}}}const sr="NO_ACCESS_TOKEN",lr=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function cr(e){const t=e.match(lr);if(t)return{protocol:t[1],authority:t[2],path:t[3]||"/",params:t[4]?t[4].split("&"):[]};throw new Error("Unable to parse URL object")}function hr(e){var t=e.params.length?"?"+e.params.join("&"):"";return e.protocol+"://"+e.authority+e.path+t}const ur="mapbox.eventData";function dr(e){if(!e)return null;var t=e.split(".");if(!t||3!==t.length)return null;try{return JSON.parse(decodeURIComponent(atob(t[1]).split("").map(e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)).join("")))}catch(e){return null}}class pr{constructor(e){this.type=e,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null}getStorageKey(e){var t=dr(o.ACCESS_TOKEN),t=t&&t.u?btoa(encodeURIComponent(t.u).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(Number("0x"+t)))):o.ACCESS_TOKEN||"";return e?ur+`.${e}:`+t:ur+":"+t}fetchEventData(){const e=Mi("localStorage"),t=this.getStorageKey(),i=this.getStorageKey("uuid");if(e)try{const e=localStorage.getItem(t);e&&(this.eventData=JSON.parse(e));var r=localStorage.getItem(i);r&&(this.anonId=r)}catch(e){fi("Unable to read from LocalStorage")}}saveEventData(){var e=Mi("localStorage"),t=this.getStorageKey(),i=this.getStorageKey("uuid"),r=this.anonId;if(e&&r)try{localStorage.setItem(i,r),1<=Object.keys(this.eventData).length&&localStorage.setItem(t,JSON.stringify(this.eventData))}catch(e){fi("Unable to write to LocalStorage")}}processRequests(e){}postEvent(e,t,i,r){if(o.EVENTS_URL){const a=cr(o.EVENTS_URL);a.params.push("access_token="+(r||o.ACCESS_TOKEN||""));var e={event:this.type,created:new Date(e).toISOString()},t=t?ii(e,t):e,e={url:hr(a),headers:{"Content-Type":"text/plain"},body:JSON.stringify([t])};this.pendingRequest=(t=e,e=e=>{this.pendingRequest=null,i(e),this.saveEventData(),this.processRequests(r)},er(ii(t,{method:"POST"}),e))}}queueRequest(e,t){this.queue.push(e),this.processRequests(t)}}const fr=new class extends pr{constructor(e){super("appUserTurnstile"),this._customAccessToken=e}postTurnstileEvent(e,t){o.EVENTS_URL&&o.ACCESS_TOKEN&&Array.isArray(e)&&e.some(e=>k(e)||L(e))&&this.queueRequest(Date.now(),t)}processRequests(t){if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();const i=dr(o.ACCESS_TOKEN),r=i?i.u:o.ACCESS_TOKEN;let e=r!==this.eventData.tokenU;si(this.anonId)||(this.anonId=ni(),e=!0);const a=this.queue.shift();if(this.eventData.lastSuccess){const t=new Date(this.eventData.lastSuccess),P=new Date(a),i=(a-this.eventData.lastSuccess)/864e5;e=e||1<=i||i<-1||t.getDate()!==P.getDate()}else e=!0;e?this.postEvent(a,{sdkIdentifier:"mapbox-gl-js",sdkVersion:P,skuId:"01","enabled.telemetry":!1,userId:this.anonId},e=>{e||(this.eventData.lastSuccess=a,this.eventData.tokenU=r)},t):this.processRequests()}}},mr=fr.postTurnstileEvent.bind(fr),_r=new class extends pr{constructor(){super("map.load"),this.success={},this.skuToken=""}postMapLoadEvent(e,t,i,r){this.skuToken=t,this.errorCb=r,o.EVENTS_URL&&(i||o.ACCESS_TOKEN?this.queueRequest({id:e,timestamp:Date.now()},i):this.errorCb(new Error(sr)))}processRequests(e){if(!this.pendingRequest&&0!==this.queue.length){const{id:t,timestamp:i}=this.queue.shift();t&&this.success[t]||(this.anonId||this.fetchEventData(),si(this.anonId)||(this.anonId=ni()),this.postEvent(i,{sdkIdentifier:"mapbox-gl-js",sdkVersion:P,skuId:"01",skuToken:this.skuToken,userId:this.anonId},e=>{e?this.errorCb(e):t&&(this.success[t]=!0)},e))}}remove(){this.errorCb=null}},gr=_r.postMapLoadEvent.bind(_r),yr=new class extends pr{constructor(){super("style.load"),this.eventIdPerMapInstanceMap=new Map,this.mapInstanceIdMap=new WeakMap}getMapInstanceId(e){let t=this.mapInstanceIdMap.get(e);return t||(t=ni(),this.mapInstanceIdMap.set(e,t)),t}getEventId(e){var t=this.eventIdPerMapInstanceMap.get(e)||0;return this.eventIdPerMapInstanceMap.set(e,t+1),t}postStyleLoadEvent(e,t){var{map:t,style:i,importedStyles:r}=t;if(o.EVENTS_URL&&(e||o.ACCESS_TOKEN)){const a=this.getMapInstanceId(t),n={mapInstanceId:a,eventId:this.getEventId(a),style:i};r.length&&(n.importedStyles=r),this.queueRequest({timestamp:Date.now(),payload:n},e)}}processRequests(e){var t,i;this.pendingRequest||0===this.queue.length||({timestamp:t,payload:i}=this.queue.shift(),this.postEvent(t,i,()=>{},e))}},xr=yr.postStyleLoadEvent.bind(yr),vr=new class extends pr{constructor(){super("gljs.performance")}postPerformanceEvent(e,t){o.EVENTS_URL&&(e||o.ACCESS_TOKEN)&&this.queueRequest({timestamp:Date.now(),performanceData:t},e)}processRequests(e){if(!this.pendingRequest&&0!==this.queue.length){var{timestamp:t,performanceData:i}=this.queue.shift(),i=function(e){const t=performance.getEntriesByType("resource"),i=performance.getEntriesByType("mark"),r=function(e){const t={};if(e)for(const r in e)if("other"!==r)for(const a of e[r]){const e=r+"ResolveRangeMin",n=r+"ResolveRangeMax",o=r+"RequestCount",s=r+"RequestCachedCount";t[e]=Math.min(t[e]||1/0,a.startTime),t[n]=Math.max(t[n]||-1/0,a.responseEnd);var i=e=>{void 0===t[e]&&(t[e]=0),++t[e]};void 0!==a.transferSize&&0===a.transferSize&&i(s),i(o)}return t}(function(e,t){const i={};if(e)for(const r of e){const e=t(r);void 0===i[e]&&(i[e]=[]),i[e].push(r)}return i}(t,U)),a=window.devicePixelRatio,n=navigator.connection||navigator.mozConnection||navigator.webkitConnection,o=n?n.effectiveType:void 0,s={counters:[],metadata:[],attributes:[]},l=(e,t,i)=>{null!=i&&e.push({name:t,value:i.toString()})};for(const e in r)l(s.counters,e,r[e]);if(e.interactionRange[0]!==1/0&&e.interactionRange[1]!==-1/0&&(l(s.counters,"interactionRangeMin",e.interactionRange[0]),l(s.counters,"interactionRangeMax",e.interactionRange[1])),i)for(const e of Object.keys(N)){const P=N[e],t=i.find(e=>e.name===P);t&&l(s.counters,P,t.startTime)}return l(s.counters,"visibilityHidden",e.visibilityHidden),l(s.attributes,"style",function(e){if(e)for(const i of e){const e=i.name.split("?")[0];if(F(e)){var t=e.split("/").slice(-2);if(2===t.length)return`mapbox://styles/${t[0]}/`+t[1]}}}(t)),l(s.attributes,"terrainEnabled",e.terrainEnabled?"true":"false"),l(s.attributes,"fogEnabled",e.fogEnabled?"true":"false"),l(s.attributes,"projection",e.projection),l(s.attributes,"zoom",e.zoom),l(s.metadata,"devicePixelRatio",a),l(s.metadata,"connectionEffectiveType",o),l(s.metadata,"navigatorUserAgent",navigator.userAgent),l(s.metadata,"screenWidth",window.screen.width),l(s.metadata,"screenHeight",window.screen.height),l(s.metadata,"windowWidth",window.innerWidth),l(s.metadata,"windowHeight",window.innerHeight),l(s.metadata,"mapWidth",e.width/a),l(s.metadata,"mapHeight",e.height/a),l(s.metadata,"webglRenderer",e.renderer),l(s.metadata,"webglVendor",e.vendor),l(s.metadata,"sdkVersion",P),l(s.metadata,"sdkIdentifier","mapbox-gl-js"),s}(i);for(const e of i.metadata);for(const e of i.counters);for(const e of i.attributes);this.postEvent(t,i,()=>{},e)}}},br=vr.postPerformanceEvent.bind(vr),wr=new class extends pr{constructor(){super("map.auth"),this.success={},this.skuToken=""}getSession(e,t,i,r){if(o.API_URL&&o.SESSION_PATH){const n=cr(o.API_URL+o.SESSION_PATH);n.params.push("sku="+(t||"")),n.params.push("access_token="+(r||o.ACCESS_TOKEN||""));var a,t={url:hr(n),headers:{"Content-Type":"text/plain"}};this.pendingRequest=(t=t,a=e=>{this.pendingRequest=null,i(e),this.saveEventData(),this.processRequests(r)},er(ii(t,{method:"GET"}),a))}}getSessionAPI(e,t,i,r){this.skuToken=t,this.errorCb=r,o.SESSION_PATH&&o.API_URL&&(i||o.ACCESS_TOKEN?this.queueRequest({id:e,timestamp:Date.now()},i):this.errorCb(new Error(sr)))}processRequests(e){if(!this.pendingRequest&&0!==this.queue.length){const{id:t,timestamp:i}=this.queue.shift();t&&this.success[t]||this.getSession(i,this.skuToken,e=>{e?this.errorCb(e):t&&(this.success[t]=!0)},e)}}remove(){this.errorCb=null}},Tr=wr.getSessionAPI.bind(wr),Er=new Set;function Sr(e,t){for(var i,r,a,n=e.length-(i=3&e.length),o=t,s=3432918353,l=461845907,c=0;c>>16)*s&65535)<<16)&4294967295)<<15|a>>>17))*l+(((a>>>16)*l&65535)<<16)&4294967295)<<13|o>>>19))+((5*(o>>>16)&65535)<<16)&4294967295))+((58964+(r>>>16)&65535)<<16);switch(a=0,i){case 3:a^=(255&e.charCodeAt(c+2))<<16;case 2:a^=(255&e.charCodeAt(c+1))<<8;case 1:o^=a=(65535&(a=(a=(65535&(a^=255&e.charCodeAt(c)))*s+(((a>>>16)*s&65535)<<16)&4294967295)<<15|a>>>17))*l+(((a>>>16)*l&65535)<<16)&4294967295}return o=2246822507*(65535&(o=(o^=e.length)^o>>>16))+((2246822507*(o>>>16)&65535)<<16)&4294967295,((o=3266489909*(65535&(o^=o>>>13))+((3266489909*(o>>>16)&65535)<<16)&4294967295)^o>>>16)>>>0}var i={exports:{}},l={exports:function(e,t){for(var i,r=e.length,a=t^r,n=0;4<=r;)i=1540483477*(65535&(i=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+((1540483477*(i>>>16)&65535)<<16),a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16)^1540483477*(65535&(i^=i>>>24))+((1540483477*(i>>>16)&65535)<<16),r-=4,++n;switch(r){case 3:a^=(255&e.charCodeAt(n+2))<<16;case 2:a^=(255&e.charCodeAt(n+1))<<8;case 1:a=1540483477*(65535&(a^=255&e.charCodeAt(n)))+((1540483477*(a>>>16)&65535)<<16)}return((a=1540483477*(65535&(a^=a>>>13))+((1540483477*(a>>>16)&65535)<<16))^a>>>15)>>>0}}.exports,Mr=(i.exports=Sr,i.exports.murmur3=Sr,i.exports.murmur2=l,j(i.exports));class Ir{constructor(e,...t){ii(this,t[0]||{}),this.type=e}}class Ar extends Ir{constructor(e,t={}){super("error",ii({error:e},t))}}function Cr(e,t,i){i[e]&&-1!==i[e].indexOf(t)||(i[e]=i[e]||[],i[e].push(t))}function Pr(e,t,i){i&&i[e]&&(-1!==(t=i[e].indexOf(t))&&i[e].splice(t,1))}class zr{on(e,t){return this._listeners=this._listeners||{},Cr(e,t,this._listeners),this}off(e,t){return Pr(e,t,this._listeners),Pr(e,t,this._oneTimeListeners),this}once(t,e){return e?(this._oneTimeListeners=this._oneTimeListeners||{},Cr(t,e,this._oneTimeListeners),this):new Promise(e=>this.once(t,e))}fire(e,t){const i="string"==typeof e?new Ir(e,t):e,r=i.type;if(this.listens(r)){const e=(i.target=this)._listeners&&this._listeners[r]?this._listeners[r].slice():[];for(const t of e)t.call(this,i);const t=this._oneTimeListeners&&this._oneTimeListeners[r]?this._oneTimeListeners[r].slice():[];for(const e of t)Pr(r,e,this._oneTimeListeners),e.call(this,i);const a=this._eventedParent;a&&(ii(i,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),a.fire(i))}else i instanceof Ar&&console.error(i.error);return this}listens(e){return!!(this._listeners&&this._listeners[e]&&0>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===e.length&&0<=(t=parseInt(e.substr(1),16))&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var t=e.indexOf("("),i=e.indexOf(")");if(-1!==t&&i+1===e.length){var r=e.substr(0,t),a=e.substr(t+1,i-(t+1)).split(","),n=1;switch(r){case"rgba":if(4!==a.length)return null;n=kr(a.pop());case"rgb":return 3!==a.length?null:[Lr(a[0]),Lr(a[1]),Lr(a[2]),n];case"hsla":if(4!==a.length)return null;n=kr(a.pop());case"hsl":if(3!==a.length)return null;var o=(parseFloat(a[0])%360+360)%360/360,s=kr(a[1]),l=kr(a[2]),s=l<=.5?l*(s+1):l+s-l*s,l=2*l-s;return[Rr(255*Or(l,s,o+1/3)),Rr(255*Or(l,s,o)),Rr(255*Or(l,s,o-1/3)),n];default:return null}}return null}}catch(Te){}class g{constructor(e,t,i,r=1){this.r=e,this.g=t,this.b=i,this.a=r}static parse(e){if(e)return e instanceof g?e:"string"==typeof e&&(e=Te.G(e))?new g(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3]):void 0}toString(){var[e,t,i,r]=0===this.a?[0,0,0,0]:[255*this.r/this.a,255*this.g/this.a,255*this.b/this.a,this.a];return`rgba(${Math.round(e)},${Math.round(t)},${Math.round(i)},${r})`}toRenderColor(e){var{r:t,g:i,b:r,a}=this;return new Br(e,t,i,r,a)}}class Br{constructor(e,t,i,r,a){if(e){var n=e.image.height,o=n*n,s=(t=0===a?0:t/a*(n-1),i=0===a?0:i/a*(n-1),r=0===a?0:r/a*(n-1),Math.floor(t)),l=Math.floor(i),c=Math.floor(r),h=Math.ceil(t),u=Math.ceil(i),d=Math.ceil(r),p=t-s,f=i-l,m=r-c,e=e.image.data,_=4*(s+l*o+c*n),g=4*(s+l*o+d*n),y=4*(s+u*o+c*n),s=4*(s+u*o+d*n),x=4*(h+l*o+c*n),l=4*(h+l*o+d*n),c=4*(h+u*o+c*n),h=4*(h+u*o+d*n);if(_<0||h>=e.length)throw new Error("out of range");this.r=b(b(b(e[_],e[g],m),b(e[y],e[s],m),f),b(b(e[x],e[l],m),b(e[c],e[h],m),f),p)/255*a,this.g=b(b(b(e[1+_],e[1+g],m),b(e[1+y],e[1+s],m),f),b(b(e[1+x],e[1+l],m),b(e[1+c],e[1+h],m),f),p)/255*a,this.b=b(b(b(e[2+_],e[2+g],m),b(e[2+y],e[2+s],m),f),b(b(e[2+x],e[2+l],m),b(e[2+c],e[2+h],m),f),p)/255*a,this.a=a}else this.r=t,this.g=i,this.b=r,this.a=a}toArray(){var{r:e,g:t,b:i,a:r}=this;return 0===r?[0,0,0,0]:[255*e/r,255*t/r,255*i/r,r]}toArray01(){var{r:e,g:t,b:i,a:r}=this;return 0===r?[0,0,0,0]:[e/r,t/r,i/r,r]}toArray01Scaled(e){var{r:t,g:i,b:r,a}=this;return 0===a?[0,0,0]:[t/a*e,i/a*e,r/a*e]}toArray01PremultipliedAlpha(){var{r:e,g:t,b:i,a:r}=this;return[e,t,i,r]}toArray01Linear(){var{r:e,g:t,b:i,a:r}=this;return 0===r?[0,0,0,0]:[Math.pow(e/r,2.2),Math.pow(t/r,2.2),Math.pow(i/r,2.2),r]}}function b(e,t,i){return e*(1-i)+t*i}function Fr(e,i,r){return e.map((e,t)=>b(e,i[t],r))}g.black=new g(0,0,0,1),g.white=new g(1,1,1,1),g.transparent=new g(0,0,0,0),g.red=new g(1,0,0,1),g.blue=new g(0,0,1,1);var Nr=Object.freeze({__proto__:null,array:Fr,color:function(e,t,i){return new g(b(e.r,t.r,i),b(e.g,t.g,i),b(e.b,t.b,i),b(e.a,t.a,i))},number:b});function Vr(e,...t){for(const i of t)for(const t in i)e[t]=i[t];return e}class Ur extends Error{constructor(e,t){super(t),this.message=t,this.key=e}}class jr{constructor(e,t=[]){this.parent=e,this.bindings={};for(const[e,i]of t)this.bindings[e]=i}concat(e){return new jr(this,e)}get(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.")}has(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)}}const Gr={kind:"null"},u={kind:"number"},d={kind:"string"},p={kind:"boolean"},qr={kind:"color"},$r={kind:"object"},f={kind:"value"},Zr={kind:"collator"},Wr={kind:"formatted"},Hr={kind:"resolvedImage"};function Xr(e,t){return{kind:"array",itemType:e,N:t}}function Yr(e){var t;return"array"===e.kind?(t=Yr(e.itemType),"number"==typeof e.N?`array<${t}, ${e.N}>`:"value"===e.itemType.kind?"array":`array<${t}>`):e.kind}const Jr=[Gr,u,d,p,qr,Wr,$r,Xr(f),Hr];function Kr(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!Kr(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(const e of Jr)if(!Kr(e,t))return null}return`Expected ${Yr(e)} but found ${Yr(t)} instead.`}function Qr(t,e){return e.some(e=>e.kind===t.kind)}function ea(t,e){return e.some(e=>"null"===e?null===t:"array"===e?Array.isArray(t):"object"===e?t&&!Array.isArray(t)&&"object"==typeof t:e===typeof t)}class ta{constructor(e,t,i){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=i,this.collator=new Intl.Collator(this.locale||[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale||[]).resolvedOptions().locale}}class ia{constructor(e,t,i,r,a){this.text=e.normalize?e.normalize():e,this.image=t,this.scale=i,this.fontStack=r,this.textColor=a}}class ra{constructor(e){this.sections=e}static fromString(e){return new ra([new ia(e,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some(e=>0!==e.text.length||e.image&&0!==e.image.namePrimary.length)}static factory(e){return e instanceof ra?e:ra.fromString(e)}toString(){return 0===this.sections.length?"":this.sections.map(e=>e.text).join("")}serialize(){const e=["format"];for(const t of this.sections)if(t.image)e.push(["image",t.image.namePrimary]);else{e.push(t.text);const i={};t.fontStack&&(i["text-font"]=["literal",t.fontStack.split(",")]),t.scale&&(i["font-scale"]=t.scale),t.textColor&&(i["text-color"]=["rgba"].concat(t.textColor.toRenderColor(null).toArray())),e.push(i)}return e}}class aa{constructor(e){this.namePrimary=e.namePrimary,e.nameSecondary&&(this.nameSecondary=e.nameSecondary),this.available=e.available}toString(){return this.nameSecondary?`[${this.namePrimary},${this.nameSecondary}]`:this.namePrimary}static fromString(e,t){return e?new aa({namePrimary:e,nameSecondary:t,available:!1}):null}serialize(){return this.nameSecondary?["image",this.namePrimary,this.nameSecondary]:["image",this.namePrimary]}}function na(e,t,i,r){return"number"==typeof e&&0<=e&&e<=255&&"number"==typeof t&&0<=t&&t<=255&&"number"==typeof i&&0<=i&&i<=255?void 0===r||"number"==typeof r&&0<=r&&r<=1?null:`Invalid rgba value [${[e,t,i,r].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof r?[e,t,i,r]:[e,t,i]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function oa(e){if(null===e)return 1;if("string"==typeof e)return 1;if("boolean"==typeof e)return 1;if("number"==typeof e)return 1;if(e instanceof g)return 1;if(e instanceof ta)return 1;if(e instanceof ra)return 1;if(e instanceof aa)return 1;if(Array.isArray(e)){for(const t of e)if(!oa(t))return;return 1}if("object"==typeof e){for(const i in e)if(!oa(e[i]))return;return 1}}function sa(t){if(null===t)return Gr;if("string"==typeof t)return d;if("boolean"==typeof t)return p;if("number"==typeof t)return u;if(t instanceof g)return qr;if(t instanceof ta)return Zr;if(t instanceof ra)return Wr;if(t instanceof aa)return Hr;if(Array.isArray(t)){var i=t.length;let e;for(const r of t){const t=sa(r);if(e){if(e===t)continue;e=f;break}e=t}return Xr(e||f,i)}return $r}function la(e){var t=typeof e;return null===e?"":"string"==t||"number"==t||"boolean"==t?String(e):e instanceof g||e instanceof ra||e instanceof aa?e.toString():JSON.stringify(e)}class ca{constructor(e,t){this.type=e,this.value=t}static parse(e,t){if(2!==e.length)return t.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!oa(e[1]))return t.error("invalid value");e=e[1];let i=sa(e);t=t.expectedType;return"array"!==i.kind||0!==i.N||!t||"array"!==t.kind||"number"==typeof t.N&&0!==t.N||(i=t),new ca(i,e)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof g?["rgba"].concat(this.value.toRenderColor(null).toArray()):this.value instanceof ra?this.value.serialize():this.value}}class ha{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}}const ua={string:d,number:u,boolean:p,object:$r};class da{constructor(e,t){this.type=e,this.args=t}static parse(i,r){if(i.length<2)return r.error("Expected at least one argument.");let a,n=1;var e=i[0];if("array"===e){let e,t;if(2e.outputDefined())}serialize(){const e=this.type,t=[e.kind];var i;return"array"!==e.kind||"string"!==(i=e.itemType).kind&&"number"!==i.kind&&"boolean"!==i.kind||(t.push(i.kind),("number"==typeof(i=e.N)||1e.serialize()))}}class pa{constructor(e){this.type=Wr,this.sections=e}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");var e=t[1];if(!Array.isArray(e)&&"object"==typeof e)return r.error("First argument must be an image or text section.");const a=[];let n=!1;for(let e=1;e<=t.length-1;++e){var o=t[e];if(n&&"object"==typeof o&&!Array.isArray(o)){n=!1;let e=null;if(o["font-scale"]&&!(e=r.parse(o["font-scale"],1,u)))return null;let t=null;if(o["text-font"]&&!(t=r.parse(o["text-font"],1,Xr(d))))return null;let i=null;if(o["text-color"]&&!(i=r.parse(o["text-color"],1,qr)))return null;const s=a[a.length-1];s.scale=e,s.font=t,s.textColor=i}else{o=r.parse(t[e],1,f);if(!o)return null;var i=o.type.kind;if("string"!==i&&"value"!==i&&"null"!==i&&"resolvedImage"!==i)return r.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");n=!0,a.push({content:o,scale:null,font:null,textColor:null})}}return new pa(a)}evaluate(i){return new ra(this.sections.map(e=>{var t=e.content.evaluate(i);return sa(t)===Hr?new ia("",t,null,null,null):new ia(la(t),null,e.scale?e.scale.evaluate(i):null,e.font?e.font.evaluate(i).join(","):null,e.textColor?e.textColor.evaluate(i):null)}))}eachChild(e){for(const t of this.sections)e(t.content),t.scale&&e(t.scale),t.font&&e(t.font),t.textColor&&e(t.textColor)}outputDefined(){return!1}serialize(){const e=["format"];for(const t of this.sections){e.push(t.content.serialize());const i={};t.scale&&(i["font-scale"]=t.scale.serialize()),t.font&&(i["text-font"]=t.font.serialize()),t.textColor&&(i["text-color"]=t.textColor.serialize()),e.push(i)}return e}}class fa{constructor(e,t){this.type=Hr,this.inputPrimary=e,this.inputSecondary=t}static parse(e,t){if(e.length<2)return t.error("Expected two or more arguments.");var i=t.parse(e[1],1,d);if(!i)return t.error("No image name provided.");if(2===e.length)return new fa(i);e=t.parse(e[2],1,d);return e?new fa(i,e):t.error("Secondary image variant is not a string.")}evaluate(e){const t=aa.fromString(this.inputPrimary.evaluate(e),this.inputSecondary?this.inputSecondary.evaluate(e):void 0);return t&&e.availableImages&&(t.available=-1e.evaluate(i)):la(this.args[0].evaluate(i));{let e=null;for(const n of this.args){if(null===(e=n.evaluate(i)))return 0;var t=Number(e);if(!isNaN(t))return t}throw new ha(`Could not convert ${JSON.stringify(e)} to number.`)}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){if("formatted"===this.type.kind)return new pa([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new fa(this.args[0]).serialize();const t="array"===this.type.kind?[]:["to-"+this.type.kind];return this.eachChild(e=>{t.push(e.serialize())}),t}}const ya=["Unknown","Point","LineString","Polygon"];class xa{constructor(e,t){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null,this.scope=e,this.options=t}id(){return this.feature&&void 0!==this.feature.id?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?ya[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}measureLight(e){return this.globals.brightness||0}distanceFromCenter(){var e,t,i,r;return this.featureTileCoord&&this.featureDistanceData?(e=this.featureDistanceData.center,t=this.featureDistanceData.scale,{x:i,y:r}=this.featureTileCoord,this.featureDistanceData.bearing[0]*(i*t-e[0])+this.featureDistanceData.bearing[1]*(r*t-e[1])):0}parseColor(e){let t=this._parseColorCache[e];return t=t||(this._parseColorCache[e]=g.parse(e))}getConfig(e){return this.options?this.options.get(e):null}}class va{constructor(e,t,i,r,a){this.name=e,this.type=t,this._evaluate=i,this.args=r,this._overloadIndex=a}evaluate(e){if(!this._evaluate){const e=va.definitions[this.name];this._evaluate=Array.isArray(e)?e[2]:e.overloads[this._overloadIndex][1]}return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map(e=>e.serialize()))}static parse(i,r){const a=i[0],n=va.definitions[a];if(!n)return r.error(`Unknown expression "${a}". If you wanted a literal array, use ["literal", [...]].`,0);const o=Array.isArray(n)?n[0]:n.type,s=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,l=[];let c=null,e=-1;for(const[n,h]of s)if(!Array.isArray(n)||n.length===i.length-1){l.push(n),e++,c=new En(r.registry,r.path,null,r.scope,void 0,r._scope,r.options);const s=[];let t=!1;for(let e=1;ee)).map(ba).join(" | "),n=[];for(let e=1;e=t[2]||e[1]<=t[1]||e[3]>=t[3])}function Ia(r,i,a=!1){let n=!1;for(let e=0,t=i.length;er[1]!=l[1]>r[1]&&r[0]<(l[0]-s[0])*(r[1]-s[1])/(l[1]-s[1])+s[0]&&(n=!n)}}var c,h,u,d;return n}function Aa(e,t,i,r){var a=r[0]-i[0],r=r[1]-i[1],e=(e[0]-i[0])*r-a*(e[1]-i[1]),r=(t[0]-i[0])*r-a*(t[1]-i[1]);return 0r[2]){const i=.5*a;let e=t[0]-r[0]>i?-a:r[0]-t[0]>i?a:0;0===e&&(e=t[0]-r[2]>i?-a:r[2]-t[0]>i?a:0),t[0]+=e}Sa(i,t)}function ka(e,t,i,r){const a=Math.pow(2,r.z)*Pa,n=[r.x*Pa,r.y*Pa],o=[];if(!e)return o;for(const r of e)for(const e of r){const r=[e.x+n[0],e.y+n[1]];La(r,t,i,a),o.push(r)}return o}function Oa(e,t,i,r){const a=Math.pow(2,r.z)*Pa,n=[r.x*Pa,r.y*Pa],o=[];if(!e)return o;for(const i of e){const e=[];for(const r of i){const i=[r.x+n[0],r.y+n[1]];Sa(t,i),e.push(i)}o.push(e)}if(t[2]-t[0]<=a/2){(r=t)[0]=r[1]=1/0,r[2]=r[3]=-1/0;for(const e of o)for(const r of e)La(r,t,i,a)}return o}class Ba{constructor(e,t){this.type=p,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(oa(e[1])){const t=e[1];if("FeatureCollection"===t.type)for(let e=0;ei)return qa(a,n,(i-(r-o))/o)}return t[t.length-1]}pointToSegmentDistance(e,t,i){let[r,a]=t,n=$a(i[0]-r)*this.kx,o=(i[1]-a)*this.ky;if(0!==n||0!==o){const t=($a(e[0]-r)*this.kx*n+(e[1]-a)*this.ky*o)/(n*n+o*o);1a.index||r.index===a.index&&r.t>a.t){const e=r;r=a,a=e}const n=[r.point],o=r.index+1,s=a.index;!Ga(i[o],n[0])&&o<=s&&n.push(i[o]);for(let e=o+1;e<=s;e++)n.push(i[e]);return Ga(i[s],a.point)||n.push(a.point),n}lineSliceAlong(t,i,r){let a=0;const n=[];for(let e=0;et&&0===n.length&&n.push(qa(o,s,(t-(a-l))/l)),a>=i)return n.push(qa(o,s,(i-(a-l))/l)),n;a>t&&n.push(s)}return n}bufferPoint(e,t){var i=t/this.ky,t=t/this.kx;return[e[0]-t,e[1]-i,e[0]+t,e[1]+i]}bufferBBox(e,t){var i=t/this.ky,t=t/this.kx;return[e[0]-t,e[1]-i,e[2]+t,e[3]+i]}insideBBox(e,t){return 0<=$a(e[0]-t[0])&&$a(e[0]-t[2])<=0&&e[1]>=t[1]&&e[1]<=t[3]}}function Ga(e,t){return e[0]===t[0]&&e[1]===t[1]}function qa(e,t,i){var r=$a(t[0]-e[0]);return[e[0]+r*i,e[1]+(t[1]-e[1])*i]}function $a(e){for(;e<-180;)e+=360;for(;180e>1)-1;0<=e;e--)this._down(e)}push(e){this.data.push(e),this._up(this.length++)}pop(){var e,t;if(0!==this.length)return e=this.data[0],t=this.data.pop(),0<--this.length&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){const{data:t,compare:i}=this,r=t[e];for(;0>1,n=t[a];if(0<=i(r,n))break;t[e]=n,e=a}t[e]=r}_down(t){const{data:i,compare:r}=this,e=this.length>>1,a=i[t];for(;t=e[0]&&e[1]e[1])return[null,null];var i=Ja(e);if(t){if(2===i)return[e,null];const t=Math.floor(i/2);return[[e[0],e[0]+t],[e[0]+t,e[1]]]}{if(1===i)return[e,null];const t=Math.floor(i/2)-1;return[[e[0],e[0]+t],[e[0]+t+1,e[1]]]}}function en(t,i){var r=[1/0,1/0,-1/0,-1/0];if(!Ka(i,t.length))return r;for(let e=i[0];e<=i[1];++e)Sa(r,t[e]);return r}function tn(i){var r=[1/0,1/0,-1/0,-1/0];for(let t=0;tt[2]&&(r=e[0]-t[2]),e[1]>t[3]&&(a=e[1]-t[3]),e[3]=n)){var c=a.range1;if(Ja(c)<=s){if(!Ka(c,t.length))return NaN;if(e){const e=function(a,n,t,o){if(!Ka(n,a.length))return NaN;for(let e=n[0];e<=n[1];++e)if(Ia(a[e],t,!0))return 0;let s=1/0;for(let r=n[0];r=o)){var h=n.range1,u=n.range2;if(Ja(h)<=l&&Ja(u)<=c){if(!Ka(h,e.length)||!Ka(u,i.length))return NaN;if(t&&r?o=Math.min(o,function(i,e,r,a,n){if(!Ka(e,i.length)||!Ka(a,r.length))return NaN;let o=1/0;for(let t=e[0];t=n)&&(n=Math.min(n,un(e,t,a,!0,r,n)),0===n))return n;return n}function pn(e,t,i,r,a=1/0){let n=a;var o=en(e,[0,e.length-1]);for(const a of i)if(!(n!==1/0&&rn(o,tn(a),r)>=n)){const i=hn(e,t,a,r,n);if(isNaN(i))return i;if(0===(n=Math.min(n,i)))return n}return n}function fn(e){return"Point"===e||"MultiPoint"===e||"LineString"===e||"MultiLineString"===e||"Polygon"===e||"MultiPolygon"===e}class mn{constructor(e,t){this.type=u,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'distance' expression requires either one argument, but found ' ${e.length-1} instead.`);if(oa(e[1])){const t=e[1];if("FeatureCollection"===t.type){for(let e=0;e=o)return o;if(Ma(s,i)){if(ln(e,t))return 0}else if(ln(t,e))return 0;let l=o;for(const o of e)for(let r=0,e=o.length,a=e-1;r"number"==typeof e?gn(e,o,s,l):e))),void 0!==a&&void 0!==h&&n&&!n.includes(h)&&(h=c,r&&(h=_n(r,h))),h=r&&r!==this.type||void 0!==h&&sa(h)!==this.type?_n(this.type.kind,h):h}eachChild(){}outputDefined(){return!1}serialize(){const e=["config",this.key];return this.scope&&e.concat(this.key),e}}function xn(e){if(e instanceof va){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 Ba)return!1;if(e instanceof mn)return!1;let t=!0;return e.eachChild(e=>{t&&!xn(e)&&(t=!1)}),t}function vn(e){if(e instanceof va&&"feature-state"===e.name)return!1;let t=!0;return e.eachChild(e=>{t&&!vn(e)&&(t=!1)}),t}function bn(e){if(e instanceof yn)return new Set([e.key]);let t=new Set;return e.eachChild(e=>{t=new Set([...t,...bn(e)])}),t}function wn(e,t){if(e instanceof va&&0<=t.indexOf(e.name))return!1;let i=!0;return e.eachChild(e=>{i&&!wn(e,t)&&(i=!1)}),i}class Tn{constructor(e,t){this.type=t.type,this.name=e,this.boundExpression=t}static parse(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");e=e[1];return t.scope.has(e)?new Tn(e,t.scope.get(e)):t.error(`Unknown variable "${e}". Make sure "${e}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}var En=class Ry{constructor(e,t=[],i,r=new jr,a=[],n,o){this.registry=e,this.path=t,this.key=t.map(e=>`[${e}]`).join(""),this.scope=r,this.errors=a,this.expectedType=i,this._scope=n,this.options=o}parse(e,t,i,r,a={}){return(t||i?this.concat(t,i,r):this)._parse(e,a)}_parse(t,i){function r(e,t,i){return"assert"===i?new da(t,[e]):"coerce"===i?new ga(t,[e]):e}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const a="string"==typeof t[0]?this.registry[t[0]]:void 0;if(a){let e=a.parse(t,this);if(!e)return null;if(this.expectedType){const t=this.expectedType,n=e.type;if("string"!==t.kind&&"number"!==t.kind&&"boolean"!==t.kind&&"object"!==t.kind&&"array"!==t.kind||"value"!==n.kind)if("color"!==t.kind&&"formatted"!==t.kind&&"resolvedImage"!==t.kind||"value"!==n.kind&&"string"!==n.kind){if(this.checkSubtype(t,n))return null}else e=r(e,t,i.typeAnnotation||"coerce");else e=r(e,t,i.typeAnnotation||"assert")}if(!(e instanceof ca)&&"resolvedImage"!==e.type.kind&&function t(e){if(e instanceof Tn)return t(e.boundExpression);if(e instanceof va&&"error"===e.name)return!1;if(e instanceof wa)return!1;if(e instanceof Ba)return!1;if(e instanceof mn)return!1;if(e instanceof yn)return!1;const i=e instanceof ga||e instanceof da;let r=!0;return e.eachChild(e=>{r=i?r&&t(e):r&&e instanceof ca}),!!r&&xn(e)&&wn(e,["zoom","heatmap-density","line-progress","raster-value","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center","measure-light","raster-particle-speed"])}(e)){const t=new xa(this._scope,this.options);try{e=new ca(e.type,e.evaluate(t))}catch(t){return this.error(t.message),null}}return e}return ga.parse(["to-array",t],this)}return this.error(void 0===t?"'undefined' value invalid. Use null instead.":"object"==typeof t?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof t} instead.`)}concat(e,t,i){return e="number"==typeof e?this.path.concat(e):this.path,i=i?this.scope.concat(i):this.scope,new Ry(this.registry,e,t||null,i,this.errors,this._scope,this.options)}error(e,...t){t=""+this.key+t.map(e=>`[${e}]`).join(""),this.errors.push(new Ur(t,e))}checkSubtype(e,t){return(e=Kr(e,t))&&this.error(e),e}};function Sn(e,t){var i=e.length-1;let r,a,n=0,o=i,s;for(;n<=o;)if(r=e[s=Math.floor((n+o)/2)],a=e[s+1],r<=t){if(s===i||t=n)return i.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',s);s=i.parse(o,l,a);if(!s)return null;a=a||s.type,r.push([n,s])}return new Mn(a,e,r)}evaluate(e){const t=this.labels,i=this.outputs;if(1===t.length)return i[0].evaluate(e);var r=this.input.evaluate(e);if(r<=t[0])return i[0].evaluate(e);var a=t.length;return(r>=t[a-1]?i[a-1]:i[Sn(t,r)]).evaluate(e)}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){const t=["step",this.input.serialize()];for(let e=0;ePn?Math.pow(e,1/3):e/Cn+In}function Ln(e){return e>An?e*e*e:Cn*(e-In)}function kn(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function On(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Bn(e){var t=On(e.r),i=On(e.g),r=On(e.b),a=Rn((.4124564*t+.3575761*i+.1804375*r)/.95047),n=Rn(.2126729*t+.7151522*i+.072175*r);return{l:116*n-16,a:500*(a-n),b:200*(n-Rn((.0193339*t+.119192*i+.9503041*r)/1.08883)),alpha:e.a}}function Fn(e){let t=(e.l+16)/116,i=isNaN(e.a)?t:t+e.a/500,r=isNaN(e.b)?t:t-e.b/200;return t=+Ln(t),i=.95047*Ln(i),r=1.08883*Ln(r),new g(kn(3.2404542*i-1.5371385*t-.4985314*r),kn(-.969266*i+1.8760108*t+.041556*r),kn(.0556434*i-.2040259*t+1.0572252*r),e.alpha)}const Nn={forward:Bn,reverse:Fn,interpolate:function(e,t,i){return{l:b(e.l,t.l,i),a:b(e.a,t.a,i),b:b(e.b,t.b,i),alpha:b(e.alpha,t.alpha,i)}}},Vn={forward:function(e){var{l:t,a:i,b:r}=Bn(e),a=Math.atan2(r,i)*Dn;return{h:a<0?360+a:a,c:Math.sqrt(i*i+r*r),l:t,alpha:e.a}},reverse:function(e){var t=e.h*zn,i=e.c;return Fn({l:e.l,a:Math.cos(t)*i,b:Math.sin(t)*i,alpha:e.alpha})},interpolate:function(e,t,i){return{h:(r=e.h,a=t.h,r+i*(180<(a-=r)||a<-180?a-360*Math.round(a/360):a)),c:b(e.c,t.c,i),l:b(e.l,t.l,i),alpha:b(e.alpha,t.alpha,i)};var r,a}};var Un=Object.freeze({__proto__:null,hcl:Vn,lab:Nn});class jn{constructor(e,t,i,r,a){this.type=e,this.operator=t,this.interpolation=i,this.input=r,this.labels=[],this.outputs=[];for(const[e,t]of a)this.labels.push(e),this.outputs.push(t)}static interpolationFactor(e,t,i,r){let a=0;return"exponential"===e.name?a=Gn(t,e.base,i,r):"linear"===e.name?a=Gn(t,1,i,r):"cubic-bezier"===e.name&&(e=e.controlPoints,a=new Gt(e[0],e[1],e[2],e[3]).solve(Gn(t,1,i,r))),a}static parse(e,t){let[i,r,a,...n]=e;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]){const e=r[1];if("number"!=typeof e)return t.error("Exponential interpolation requires a numeric base.",1,1);r={name:"exponential",base:e}}else{if("cubic-bezier"!==r[0])return t.error("Unknown interpolation type "+String(r[0]),1,0);{const e=r.slice(1);if(4!==e.length||e.some(e=>"number"!=typeof e||e<0||1=i)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',a);var l=t.parse(r,c,s);if(!l)return null;s=s||l.type,o.push([i,l])}return"number"===s.kind||"color"===s.kind||"array"===s.kind&&"number"===s.itemType.kind&&"number"==typeof s.N?new jn(s,i,r,a,o):t.error(`Type ${Yr(s)} is not interpolatable.`)}evaluate(e){const t=this.labels,i=this.outputs;if(1===t.length)return i[0].evaluate(e);var r=this.input.evaluate(e);if(r<=t[0])return i[0].evaluate(e);var a=t.length;if(r>=t[a-1])return i[a-1].evaluate(e);var a=Sn(t,r),r=jn.interpolationFactor(this.interpolation,r,t[a],t[a+1]),n=i[a].evaluate(e),a=i[a+1].evaluate(e);return"interpolate"===this.operator?Nr[this.type.kind.toLowerCase()](n,a,r):"interpolate-hcl"===this.operator?Vn.reverse(Vn.interpolate(Vn.forward(n),Vn.forward(a),r)):Nn.reverse(Nn.interpolate(Nn.forward(n),Nn.forward(a),r))}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){var 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);const t=[this.operator,e,this.input.serialize()];for(let e=0;eKr(r,e.type));return new qn(e?f:i,a)}evaluate(e){let t,i=null,r=0;for(const a of this.args){if(r++,(i=a.evaluate(e))&&i instanceof aa&&!i.available&&(t=t||i,i=null,r===this.args.length))return t;if(null!==i)break}return i}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const t=["coalesce"];return this.eachChild(e=>{t.push(e.serialize())}),t}}class $n{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const t of this.bindings)e(t[1]);e(this.result)}static parse(t,i){if(t.length<4)return i.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const r=[];for(let e=1;e{t.push(e.serialize())}),t}}}c=Hn("==",function(e,t,i){return t===i},Wn),n=Hn("!=",function(e,t,i){return t!==i},function(e,t,i,r){return!Wn(0,t,i,r)}),r=Hn("<",function(e,t,i){return t",function(e,t,i){return i>>15,1|t);return(((e=e+Math.imul(e^e>>>7,61|e)^e)^e>>>14)>>>0)/4294967296}}const Yn={"==":c,"!=":n,">":s,"<":r,">=":Hn(">=",function(e,t,i){return i<=t},function(e,t,i,r){return 0<=r.compare(t,i)}),"<=":$,array:da,at:class Ly{constructor(e,t,i){this.type=e,this.index=t,this.input=i}static parse(e,t){if(3!==e.length)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);var i=t.parse(e[1],1,u),e=t.parse(e[2],2,Xr(t.expectedType||f));return i&&e?new Ly(e.type.itemType,i,e):null}evaluate(e){var t=this.index.evaluate(e),e=this.input.evaluate(e);if(t<0)throw new ha(`Array index out of bounds: ${t} < 0.`);if(t>=e.length)throw new ha(`Array index out of bounds: ${t} > ${e.length-1}.`);if(t!==Math.floor(t))throw new ha(`Array index must be an integer, but found ${t} instead.`);return e[t]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}},boolean:da,case:class ky{constructor(e,t,i){this.type=e,this.branches=t,this.otherwise=i}static parse(t,i){if(t.length<4)return i.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return i.error("Expected an odd number of arguments.");let r;i.expectedType&&"value"!==i.expectedType.kind&&(r=i.expectedType);const a=[];for(let e=1;ee.outputDefined())&&this.otherwise.outputDefined()}serialize(){const t=["case"];return this.eachChild(e=>{t.push(e.serialize())}),t}},coalesce:qn,collator:wa,format:pa,image:fa,in:class Oy{constructor(e,t){this.type=p,this.needle=e,this.haystack=t}static parse(e,t){if(3!==e.length)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);var i=t.parse(e[1],1,f),e=t.parse(e[2],2,f);return i&&e?Qr(i.type,[p,d,u,Gr,f])?new Oy(i,e):t.error(`Expected first argument to be of type boolean, string, number or null, but found ${Yr(i.type)} instead`):null}evaluate(e){const t=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(null==i)return!1;if(!ea(t,["boolean","string","number","null"]))throw new ha(`Expected first argument to be of type boolean, string, number or null, but found ${Yr(sa(t))} instead.`);if(ea(i,["string","array"]))return 0<=i.indexOf(t);throw new ha(`Expected second argument to be of type array or string, but found ${Yr(sa(i))} instead.`)}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}},"index-of":class By{constructor(e,t,i){this.type=u,this.needle=e,this.haystack=t,this.fromIndex=i}static parse(e,t){if(e.length<=2||5<=e.length)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);var i=t.parse(e[1],1,f),r=t.parse(e[2],2,f);return i&&r?Qr(i.type,[p,d,u,Gr,f])?4===e.length?(e=t.parse(e[3],3,u))?new By(i,r,e):null:new By(i,r):t.error(`Expected first argument to be of type boolean, string, number or null, but found ${Yr(i.type)} instead`):null}evaluate(e){const t=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!ea(t,["boolean","string","number","null"]))throw new ha(`Expected first argument to be of type boolean, string, number or null, but found ${Yr(sa(t))} instead.`);if(ea(i,["string","array"]))return this.fromIndex?(e=this.fromIndex.evaluate(e),i.indexOf(t,e)):i.indexOf(t);throw new ha(`Expected second argument to be of type array or string, but found ${Yr(sa(i))} instead.`)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}serialize(){var e;return null!=this.fromIndex&&void 0!==this.fromIndex?(e=this.fromIndex.serialize(),["index-of",this.needle.serialize(),this.haystack.serialize(),e]):["index-of",this.needle.serialize(),this.haystack.serialize()]}},interpolate:jn,"interpolate-hcl":jn,"interpolate-lab":jn,length:class Fy{constructor(e){this.type=u,this.input=e}static parse(e,t){return 2!==e.length?t.error(`Expected 1 argument, but found ${e.length-1} instead.`):(e=t.parse(e[1],1))?"array"!==e.type.kind&&"string"!==e.type.kind&&"value"!==e.type.kind?t.error(`Expected argument of type string or array, but found ${Yr(e.type)} instead.`):new Fy(e):null}evaluate(e){if("string"==typeof(e=this.input.evaluate(e)))return e.length;if(Array.isArray(e))return e.length;throw new ha(`Expected value to be of type string or array, but found ${Yr(sa(e))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){const t=["length"];return this.eachChild(e=>{t.push(e.serialize())}),t}},let:$n,literal:ca,match:class Ny{constructor(e,t,i,r,a,n){this.inputType=e,this.type=t,this.input=i,this.cases=r,this.outputs=a,this.otherwise=n}static parse(i,r){if(i.length<5)return r.error(`Expected at least 4 arguments, but found only ${i.length-1}.`);if(i.length%2!=1)return r.error("Expected an even number of arguments.");let a,n;r.expectedType&&"value"!==r.expectedType.kind&&(n=r.expectedType);const o={},s=[];for(let t=2;tNumber.MAX_SAFE_INTEGER)return c.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof i&&Math.floor(i)!==i)return c.error("Numeric branch labels must be integer values.");if(a){if(c.checkSubtype(a,sa(i)))return null}else a=sa(i);if(void 0!==o[String(i)])return c.error("Branch labels must be unique.");o[String(i)]=s.length}if(!(l=r.parse(l,t,n)))return null;n=n||l.type,s.push(l)}var e=r.parse(i[1],1,f);if(!e)return null;var t=r.parse(i[i.length-1],i.length-1,n);return!t||"value"!==e.type.kind&&r.concat(1).checkSubtype(a,e.type)?null:new Ny(a,n,e,o,s,t)}evaluate(e){var t=this.input.evaluate(e);return(sa(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["match",this.input.serialize()],t=Object.keys(this.cases).sort(),i=[],r={};for(const e of t){const t=r[this.cases[e]];void 0===t?(r[this.cases[e]]=i.length,i.push([this.cases[e],[e]])):i[t][1].push(e)}var a=e=>"number"===this.inputType.kind?Number(e):e;for(const[t,r]of i)e.push(1===r.length?a(r[0]):r.map(a)),e.push(this.outputs[t].serialize());return e.push(this.otherwise.serialize()),e}},number:da,"number-format":class Vy{constructor(e,t,i,r,a,n){this.type=d,this.number=e,this.locale=t,this.currency=i,this.unit=r,this.minFractionDigits=a,this.maxFractionDigits=n}static parse(e,t){if(3!==e.length)return t.error("Expected two arguments.");var i=t.parse(e[1],1,u);if(!i)return null;if("object"!=typeof(e=e[2])||Array.isArray(e))return t.error("NumberFormat options argument must be an object.");let r=null;if(e.locale&&!(r=t.parse(e.locale,1,d)))return null;let a=null;if(e.currency&&!(a=t.parse(e.currency,1,d)))return null;let n=null;if(e.unit&&!(n=t.parse(e.unit,1,d)))return null;let o=null;if(e["min-fraction-digits"]&&!(o=t.parse(e["min-fraction-digits"],1,u)))return null;let s=null;return e["max-fraction-digits"]&&!(s=t.parse(e["max-fraction-digits"],1,u))?null:new Vy(i,r,a,n,o,s)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:(this.currency?"currency":this.unit&&"unit")||"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.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))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.unit&&(e.unit=this.unit.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]}},object:da,slice:class Uy{constructor(e,t,i,r){this.type=e,this.input=t,this.beginIndex=i,this.endIndex=r}static parse(e,t){if(e.length<=2||5<=e.length)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);var i=t.parse(e[1],1,f),r=t.parse(e[2],2,u);return i&&r?Qr(i.type,[Xr(f),d,f])?4===e.length?(e=t.parse(e[3],3,u))?new Uy(i.type,i,r,e):null:new Uy(i.type,i,r):t.error(`Expected first argument to be of type array or string, but found ${Yr(i.type)} instead`):null}evaluate(e){const t=this.input.evaluate(e),i=this.beginIndex.evaluate(e);if(ea(t,["string","array"]))return this.endIndex?(e=this.endIndex.evaluate(e),t.slice(i,e)):t.slice(i);throw new ha(`Expected first argument to be of type array or string, but found ${Yr(sa(t))} instead.`)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}serialize(){var e;return null!=this.endIndex&&void 0!==this.endIndex?(e=this.endIndex.serialize(),["slice",this.input.serialize(),this.beginIndex.serialize(),e]):["slice",this.input.serialize(),this.beginIndex.serialize()]}},step:Mn,string:da,"to-boolean":ga,"to-color":ga,"to-number":ga,"to-string":ga,var:Tn,within:Ba,distance:mn,config:yn};function Jn(e,[t,i,r,a]){t=t.evaluate(e),i=i.evaluate(e),r=r.evaluate(e);a=a?a.evaluate(e):1,e=na(t,i,r,a);if(e)throw new ha(e);return new g(t/255*a,i/255*a,r/255*a,a)}function Kn(e,[t,i,r,a]){t=t.evaluate(e),i=i.evaluate(e),r=r.evaluate(e);var n,a=a?a.evaluate(e):1,o=(e=i,n=r,o=a,"number"==typeof(s=t)&&0<=s&&s<=360?"number"==typeof e&&0<=e&&e<=100&&"number"==typeof n&&0<=n&&n<=100?void 0===o||"number"==typeof o&&0<=o&&o<=1?null:`Invalid hsla value [${[s,e,n,o].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid hsla value [${("number"==typeof o?[s,e,n,o]:[s,e,n]).join(", ")}]: 's', and 'l' must be between 0 and 100.`:`Invalid hsla value [${("number"==typeof o?[s,e,n,o]:[s,e,n]).join(", ")}]: 'h' must be between 0 and 360.`);if(o)throw new ha(o);var s=`hsla(${t}, ${i}%, ${r}%, ${a})`,e=g.parse(s);if(e)return e;throw new ha("Failed to parse HSLA color: "+s)}function Qn(e,t){t=t[e];return void 0===t?null:t}function eo(e){return{type:e}}function to(e){return{result:"success",value:e}}function io(e){return{result:"error",value:e}}function ro(e,t){return!!e&&!!e.parameters&&-1=e.stops[t-1][0])return e.stops[t-1][1];t=Sn(e.stops.map(e=>e[0]),i);return e.stops[t][1]}function fo(e,i,t){var r=void 0!==e.base?e.base:1;if("number"!==ma(t))return ho(e.default,i.default);var a,n=e.stops.length;if(1===n)return e.stops[0][1];if(t<=e.stops[0][0])return e.stops[0][1];if(t>=e.stops[n-1][0])return e.stops[n-1][1];const o=Sn(e.stops.map(e=>e[0]),t),s=(n=t,t=r,r=e.stops[o][0],a=e.stops[o+1][0]-r,n-=r,0==a?0:1===t?n/a:(Math.pow(t,n)-1)/(Math.pow(t,a)-1)),l=e.stops[o][1],c=e.stops[o+1][1];let h=Nr[i.type]||co;if(e.colorSpace&&"rgb"!==e.colorSpace){const i=Un[e.colorSpace];h=(e,t)=>i.reverse(i.interpolate(i.forward(e),i.forward(t),s))}return"function"==typeof l.evaluate?{evaluate(...e){var t=l.evaluate.apply(void 0,e),e=c.evaluate.apply(void 0,e);if(void 0!==t&&void 0!==e)return h(t,e,s)}}:h(l,c,s)}function mo(e,t,i){return"color"===t.type?i=g.parse(i):"formatted"===t.type?i=ra.fromString(i.toString()):"resolvedImage"===t.type?i=aa.fromString(i.toString()):ma(i)===t.type||"enum"===t.type&&t.values[i]||(i=void 0),ho(i,e.default,t.default)}va.register(Yn,{error:[{kind:"error"},[d],(e,[t])=>{throw new ha(t.evaluate(e))}],typeof:[d,[f],(e,[t])=>Yr(sa(t.evaluate(e)))],"to-rgba":[Xr(u,4),[qr],(e,[t])=>t.evaluate(e).toRenderColor(null).toArray()],rgb:[qr,[u,u,u],Jn],rgba:[qr,[u,u,u,u],Jn],hsl:[qr,[u,u,u],Kn],hsla:[qr,[u,u,u,u],Kn],has:{type:p,overloads:[[[d],(e,[t])=>t.evaluate(e)in e.properties()],[[d,$r],(e,[t,i])=>t.evaluate(e)in i.evaluate(e)]]},get:{type:f,overloads:[[[d],(e,[t])=>Qn(t.evaluate(e),e.properties())],[[d,$r],(e,[t,i])=>Qn(t.evaluate(e),i.evaluate(e))]]},"feature-state":[f,[d],(e,[t])=>Qn(t.evaluate(e),e.featureState||{})],properties:[$r,[],e=>e.properties()],"geometry-type":[d,[],e=>e.geometryType()],id:[f,[],e=>e.id()],zoom:[u,[],e=>e.globals.zoom],pitch:[u,[],e=>e.globals.pitch||0],"distance-from-center":[u,[],e=>e.distanceFromCenter()],"measure-light":[u,[d],(e,[t])=>e.measureLight(t.evaluate(e))],"heatmap-density":[u,[],e=>e.globals.heatmapDensity||0],"line-progress":[u,[],e=>e.globals.lineProgress||0],"raster-value":[u,[],e=>e.globals.rasterValue||0],"raster-particle-speed":[u,[],e=>e.globals.rasterParticleSpeed||0],"sky-radial-progress":[u,[],e=>e.globals.skyRadialProgress||0],accumulated:[f,[],e=>void 0===e.globals.accumulated?null:e.globals.accumulated],"+":[u,eo(u),(e,t)=>{let i=0;for(const r of t)i+=r.evaluate(e);return i}],"*":[u,eo(u),(e,t)=>{let i=1;for(const r of t)i*=r.evaluate(e);return i}],"-":{type:u,overloads:[[[u,u],(e,[t,i])=>t.evaluate(e)-i.evaluate(e)],[[u],(e,[t])=>-t.evaluate(e)]]},"/":[u,[u,u],(e,[t,i])=>t.evaluate(e)/i.evaluate(e)],"%":[u,[u,u],(e,[t,i])=>t.evaluate(e)%i.evaluate(e)],ln2:[u,[],()=>Math.LN2],pi:[u,[],()=>Math.PI],e:[u,[],()=>Math.E],"^":[u,[u,u],(e,[t,i])=>Math.pow(t.evaluate(e),i.evaluate(e))],sqrt:[u,[u],(e,[t])=>Math.sqrt(t.evaluate(e))],log10:[u,[u],(e,[t])=>Math.log(t.evaluate(e))/Math.LN10],ln:[u,[u],(e,[t])=>Math.log(t.evaluate(e))],log2:[u,[u],(e,[t])=>Math.log(t.evaluate(e))/Math.LN2],sin:[u,[u],(e,[t])=>Math.sin(t.evaluate(e))],cos:[u,[u],(e,[t])=>Math.cos(t.evaluate(e))],tan:[u,[u],(e,[t])=>Math.tan(t.evaluate(e))],asin:[u,[u],(e,[t])=>Math.asin(t.evaluate(e))],acos:[u,[u],(e,[t])=>Math.acos(t.evaluate(e))],atan:[u,[u],(e,[t])=>Math.atan(t.evaluate(e))],min:[u,eo(u),(t,e)=>Math.min(...e.map(e=>e.evaluate(t)))],max:[u,eo(u),(t,e)=>Math.max(...e.map(e=>e.evaluate(t)))],abs:[u,[u],(e,[t])=>Math.abs(t.evaluate(e))],round:[u,[u],(e,[t])=>{t=t.evaluate(e);return t<0?-Math.round(-t):Math.round(t)}],floor:[u,[u],(e,[t])=>Math.floor(t.evaluate(e))],ceil:[u,[u],(e,[t])=>Math.ceil(t.evaluate(e))],"filter-==":[p,[d,f],(e,[t,i])=>e.properties()[t.value]===i.value],"filter-id-==":[p,[f],(e,[t])=>e.id()===t.value],"filter-type-==":[p,[d],(e,[t])=>e.geometryType()===t.value],"filter-<":[p,[d,f],(e,[t,i])=>{e=e.properties()[t.value],t=i.value;return typeof e==typeof t&&e{e=e.id(),t=t.value;return typeof e==typeof t&&e":[p,[d,f],(e,[t,i])=>{e=e.properties()[t.value],t=i.value;return typeof e==typeof t&&t":[p,[f],(e,[t])=>{e=e.id(),t=t.value;return typeof e==typeof t&&t{e=e.properties()[t.value],t=i.value;return typeof e==typeof t&&e<=t}],"filter-id-<=":[p,[f],(e,[t])=>{e=e.id(),t=t.value;return typeof e==typeof t&&e<=t}],"filter->=":[p,[d,f],(e,[t,i])=>{e=e.properties()[t.value],t=i.value;return typeof e==typeof t&&t<=e}],"filter-id->=":[p,[f],(e,[t])=>{e=e.id(),t=t.value;return typeof e==typeof t&&t<=e}],"filter-has":[p,[f],(e,[t])=>t.value in e.properties()],"filter-has-id":[p,[],e=>null!==e.id()&&void 0!==e.id()],"filter-type-in":[p,[Xr(d)],(e,[t])=>0<=t.value.indexOf(e.geometryType())],"filter-id-in":[p,[Xr(f)],(e,[t])=>0<=t.value.indexOf(e.id())],"filter-in-small":[p,[d,Xr(f)],(e,[t,i])=>0<=i.value.indexOf(e.properties()[t.value])],"filter-in-large":[p,[d,Xr(f)],(e,[t,i])=>{for(var r=e.properties()[t.value],a=i.value,n=0,o=i.value.length-1;n<=o;){var s=n+o>>1;if(a[s]===r)return!0;a[s]>r?o=s-1:n=1+s}return!1}],all:{type:p,overloads:[[[p,p],(e,[t,i])=>t.evaluate(e)&&i.evaluate(e)],[eo(p),(e,t)=>{for(const i of t)if(!i.evaluate(e))return!1;return!0}]]},any:{type:p,overloads:[[[p,p],(e,[t,i])=>t.evaluate(e)||i.evaluate(e)],[eo(p),(e,t)=>{for(const i of t)if(i.evaluate(e))return!0;return!1}]]},"!":[p,[p],(e,[t])=>!t.evaluate(e)],"is-supported-script":[p,[d],(e,[t])=>{const i=e.globals&&e.globals.isSupportedScript;return!i||i(t.evaluate(e))}],upcase:[d,[d],(e,[t])=>t.evaluate(e).toUpperCase()],downcase:[d,[d],(e,[t])=>t.evaluate(e).toLowerCase()],concat:[d,eo(f),(t,e)=>e.map(e=>la(e.evaluate(t))).join("")],"resolved-locale":[d,[Zr],(e,[t])=>t.evaluate(e).resolvedLocale()],random:[u,[u,u,f],(t,e)=>{var[e,i,r]=e.map(e=>e.evaluate(t));if(iJSON.stringify(e)).join(", ")}, but found ${JSON.stringify(e)} instead.`)}catch(e){return this._warningHistory[e.message]||(this._warningHistory[e.message]=!0,"undefined"!=typeof console&&console.warn(`Failed to evaluate expression "${JSON.stringify(this.expression.serialize())}". `+e.message)),this._defaultValue}}}function go(e){return Array.isArray(e)&&0{const t=i(e);t instanceof Ur?r=t:r&&t&&r!==t&&(r=new Ur("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),r}(i);return i||a||o?i instanceof Ur?io([i]):i instanceof jn&&!so(t)?io([new Ur("",'"interpolate" expressions cannot be used with this property')]):to(i?new vo(r?"camera":"composite",e.value,i.labels,i instanceof jn?i.interpolation:void 0,n):new xo(r?"constant":"source",e.value,n)):io([new Ur("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression, or in the properties of atmosphere.')])}class wo{constructor(e,t){this._parameters=e,this._specification=t,Vr(this,function e(i,r){const t="color"===r.type,a=i.stops&&"object"==typeof i.stops[0][0],n=a||!(a||void 0!==i.property),o=i.type||(so(r)?"exponential":"interval");if(t&&((i=Vr({},i)).stops&&(i.stops=i.stops.map(e=>[e[0],g.parse(e[1])])),i.default=g.parse(i.default||r.default)),i.colorSpace&&"rgb"!==i.colorSpace&&!Un[i.colorSpace])throw new Error("Unknown color space: "+i.colorSpace);let s,l,c;if("exponential"===o)s=fo;else if("interval"===o)s=po;else if("categorical"===o){s=uo,l=Object.create(null);for(const r of i.stops)l[r[0]]=r[1];c=typeof i.stops[0][0]}else{if("identity"!==o)throw new Error(`Unknown function type "${o}"`);s=mo}if(a){const t={},a=[];for(let e=0;ee[0]),evaluate:({zoom:e},t)=>fo({stops:n,base:i.base},r,e).evaluate(e,t)}}if(n){const t="exponential"===o?{name:"exponential",base:void 0!==i.base?i.base:1}:null;return{kind:"camera",interpolationType:t,interpolationFactor:jn.interpolationFactor.bind(void 0,t),zoomStops:i.stops.map(e=>e[0]),evaluate:({zoom:e})=>s(i,r,e,l,c)}}return{kind:"source",evaluate(e,t){return void 0===(t=t&&t.properties?t.properties[i.property]:void 0)?ho(i.default,r.default):s(i,r,t,l,c)}}}(this._parameters,this._specification))}static deserialize(e){return new wo(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}var t=Eo,To=3;function Eo(e,t,i){var r=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;var a=new Int32Array(this.arrayBuffer);e=a[0],this.d=(t=a[1])+2*(i=a[2]);for(var n=0;n=h[0+d]&&r>=h[1+d])?(o[p]=!0,n.push(c[p])):o[p]=!1)}},Eo.prototype._forEachCell=function(e,t,i,r,a,n,o,s){for(var l=this._convertToCellCoord(e),c=this._convertToCellCoord(t),h=this._convertToCellCoord(i),u=this._convertToCellCoord(r),d=l;d<=h;d++)for(var p=c;p<=u;p++){var f=this.d*p+d;if((!s||s(this._convertFromCellCoord(d),this._convertFromCellCoord(p),this._convertFromCellCoord(d+1),this._convertFromCellCoord(p+1)))&&a.call(this,e,t,i,r,f,n,o,s))return}},Eo.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},Eo.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},Eo.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=To+this.cells.length+1+1,i=0,r=0;r128<=e&&e<=255,Arabic:e=>1536<=e&&e<=1791,"Arabic Supplement":e=>1872<=e&&e<=1919,"Arabic Extended-A":e=>2208<=e&&e<=2303,"Hangul Jamo":e=>4352<=e&&e<=4607,"Unified Canadian Aboriginal Syllabics":e=>5120<=e&&e<=5759,Khmer:e=>6016<=e&&e<=6143,"Unified Canadian Aboriginal Syllabics Extended":e=>6320<=e&&e<=6399,"General Punctuation":e=>8192<=e&&e<=8303,"Letterlike Symbols":e=>8448<=e&&e<=8527,"Number Forms":e=>8528<=e&&e<=8591,"Miscellaneous Technical":e=>8960<=e&&e<=9215,"Control Pictures":e=>9216<=e&&e<=9279,"Optical Character Recognition":e=>9280<=e&&e<=9311,"Enclosed Alphanumerics":e=>9312<=e&&e<=9471,"Geometric Shapes":e=>9632<=e&&e<=9727,"Miscellaneous Symbols":e=>9728<=e&&e<=9983,"Miscellaneous Symbols and Arrows":e=>11008<=e&&e<=11263,"CJK Radicals Supplement":e=>11904<=e&&e<=12031,"Kangxi Radicals":e=>12032<=e&&e<=12255,"Ideographic Description Characters":e=>12272<=e&&e<=12287,"CJK Symbols and Punctuation":e=>12288<=e&&e<=12351,Hiragana:e=>12352<=e&&e<=12447,Katakana:e=>12448<=e&&e<=12543,Bopomofo:e=>12544<=e&&e<=12591,"Hangul Compatibility Jamo":e=>12592<=e&&e<=12687,Kanbun:e=>12688<=e&&e<=12703,"Bopomofo Extended":e=>12704<=e&&e<=12735,"CJK Strokes":e=>12736<=e&&e<=12783,"Katakana Phonetic Extensions":e=>12784<=e&&e<=12799,"Enclosed CJK Letters and Months":e=>12800<=e&&e<=13055,"CJK Compatibility":e=>13056<=e&&e<=13311,"CJK Unified Ideographs Extension A":e=>13312<=e&&e<=19903,"Yijing Hexagram Symbols":e=>19904<=e&&e<=19967,"CJK Unified Ideographs":e=>19968<=e&&e<=40959,"Yi Syllables":e=>40960<=e&&e<=42127,"Yi Radicals":e=>42128<=e&&e<=42191,"Hangul Jamo Extended-A":e=>43360<=e&&e<=43391,"Hangul Syllables":e=>44032<=e&&e<=55215,"Hangul Jamo Extended-B":e=>55216<=e&&e<=55295,"Private Use Area":e=>57344<=e&&e<=63743,"CJK Compatibility Ideographs":e=>63744<=e&&e<=64255,"Arabic Presentation Forms-A":e=>64336<=e&&e<=65023,"Vertical Forms":e=>65040<=e&&e<=65055,"CJK Compatibility Forms":e=>65072<=e&&e<=65103,"Small Form Variants":e=>65104<=e&&e<=65135,"Arabic Presentation Forms-B":e=>65136<=e&&e<=65279,"Halfwidth and Fullwidth Forms":e=>65280<=e&&e<=65519,"CJK Unified Ideographs Extension B":e=>131072<=e&&e<=173791};function zo(e){for(const t of e)if(Ro(t.charCodeAt(0)))return!0;return!1}function Do(e){for(const i of e)if(t=i.charCodeAt(0),q.Arabic(t)||q["Arabic Supplement"](t)||q["Arabic Extended-A"](t)||q["Arabic Presentation Forms-A"](t)||q["Arabic Presentation Forms-B"](t))return;var t;return 1}function Ro(e){return 746===e||747===e||!(e<4352)&&(q["Bopomofo Extended"](e)||q.Bopomofo(e)||q["CJK Compatibility Forms"](e)&&!(65097<=e&&e<=65103)||q["CJK Compatibility Ideographs"](e)||q["CJK Compatibility"](e)||q["CJK Radicals Supplement"](e)||q["CJK Strokes"](e)||!(!q["CJK Symbols and Punctuation"](e)||12296<=e&&e<=12305||12308<=e&&e<=12319||12336===e)||q["CJK Unified Ideographs Extension A"](e)||q["CJK Unified Ideographs"](e)||q["Enclosed CJK Letters and Months"](e)||q["Hangul Compatibility Jamo"](e)||q["Hangul Jamo Extended-A"](e)||q["Hangul Jamo Extended-B"](e)||q["Hangul Jamo"](e)||q["Hangul Syllables"](e)||q.Hiragana(e)||q["Ideographic Description Characters"](e)||q.Kanbun(e)||q["Kangxi Radicals"](e)||q["Katakana Phonetic Extensions"](e)||q.Katakana(e)&&12540!==e||!(!q["Halfwidth and Fullwidth Forms"](e)||65288===e||65289===e||65293===e||65306<=e&&e<=65310||65339===e||65341===e||65343===e||65371<=e&&e<=65503||65507===e||65512<=e&&e<=65519)||!(!q["Small Form Variants"](e)||65112<=e&&e<=65118||65123<=e&&e<=65126)||q["Unified Canadian Aboriginal Syllabics"](e)||q["Unified Canadian Aboriginal Syllabics Extended"](e)||q["Vertical Forms"](e)||q["Yijing Hexagram Symbols"](e)||q["Yi Syllables"](e)||q["Yi Radicals"](e))}function Lo(e){return!(Ro(e)||(e=e,q["Latin-1 Supplement"](e)&&(167===e||169===e||174===e||177===e||188===e||189===e||190===e||215===e||247===e)||q["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)||q["Letterlike Symbols"](e)||q["Number Forms"](e)||q["Miscellaneous Technical"](e)&&(8960<=e&&e<=8967||8972<=e&&e<=8991||8996<=e&&e<=9e3||9003===e||9085<=e&&e<=9114||9150<=e&&e<=9165||9167===e||9169<=e&&e<=9179||9186<=e&&e<=9215)||q["Control Pictures"](e)&&9251!==e||q["Optical Character Recognition"](e)||q["Enclosed Alphanumerics"](e)||q["Geometric Shapes"](e)||q["Miscellaneous Symbols"](e)&&!(9754<=e&&e<=9759)||q["Miscellaneous Symbols and Arrows"](e)&&(11026<=e&&e<=11055||11088<=e&&e<=11097||11192<=e&&e<=11243)||q["CJK Symbols and Punctuation"](e)||q.Katakana(e)||q["Private Use Area"](e)||q["CJK Compatibility Forms"](e)||q["Small Form Variants"](e)||q["Halfwidth and Fullwidth Forms"](e)||8734===e||8756===e||8757===e||9984<=e&&e<=10087||10102<=e&&e<=10131||65532===e||65533===e))}function ko(e){return 1424<=e&&e<=2303||q["Arabic Presentation Forms-A"](e)||q["Arabic Presentation Forms-B"](e)}const Oo="deferred",Bo="loading",Fo="loaded";let No=null,Vo="unavailable",Uo=null;function jo(e){e&&"string"==typeof e&&-1{e?jo(e):(Vo=Fo,Go())})}const Zo=new zr,Wo={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>Vo===Fo||null!=Wo.applyArabicShaping,isLoading:()=>Vo===Bo,setState(e){Vo=e.pluginStatus,Uo=e.pluginURL},isParsed:()=>null!=Wo.applyArabicShaping&&null!=Wo.processBidirectionalText&&null!=Wo.processStyledBidirectionalText,getPluginURL:()=>Uo};class I{constructor(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.transition=t.transition,this.pitch=t.pitch,this.brightness=t.brightness):(this.now=0,this.fadeDuration=0,this.transition={},this.pitch=0,this.brightness=0)}isSupportedScript(e){var t,i,r=Wo.isLoaded();for(const a of e)if(t=a.charCodeAt(0),i=r,!i&&ko(t)||2304<=t&&t<=3583||3840<=t&&t<=4255||q.Khmer(t))return!1;return!0}}class Ho{constructor(e,t,i,r){this.property=e,this.value=t,this.expression=function(t,i,e,r){if(lo(t))return new wo(t,i);if(go(t)||Array.isArray(t)&&0e.key+": "+e.message).join(", "));return a.value}{let e=t;return"string"==typeof t&&"color"===i.type&&(e=g.parse(t)),{kind:"constant",configDependencies:new Set,evaluate:()=>e}}}(void 0===t?e.specification.default:t,e.specification,i,r)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}possiblyEvaluate(e,t,i){return this.property.possiblyEvaluate(this,e,t,i)}}class Xo{constructor(e,t,i){this.property=e,this.value=new Ho(e,void 0,t,i)}transitioned(e,t){return new Jo(this.property,this.value,t,ii({},e.transition,this.transition),e.now)}untransitioned(){return new Jo(this.property,this.value,null,{},0)}}class Yo{constructor(e,t,i){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues),this._scope=t,this._options=i,this.configDependencies=new Set}getValue(e){return di(this._values[e].value.value)}setValue(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new Xo(this._values[e].property,this._scope,this._options)),this._values[e].value=new Ho(this._values[e].property,null===t?void 0:di(t),this._scope,this._options),this._values[e].value.expression.configDependencies&&(this.configDependencies=new Set([...this.configDependencies,...this._values[e].value.expression.configDependencies]))}setTransitionOrValue(e,t){t&&(this._options=t);const i=this._properties.properties;if(e)for(const t in e){var r=e[t];if(ci(t,"-transition")){const e=t.slice(0,-11);i[e]&&this.setTransition(e,r)}else i.hasOwnProperty(t)&&this.setValue(t,r)}}getTransition(e){return di(this._values[e].transition)}setTransition(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new Xo(this._values[e].property)),this._values[e].transition=di(t)||void 0}serialize(){const e={};for(const i of Object.keys(this._values)){var t=this.getValue(i),t=(void 0!==t&&(e[i]=t),this.getTransition(i));void 0!==t&&(e[i+"-transition"]=t)}return e}transitioned(e,t){const i=new Ko(this._properties);for(const r of Object.keys(this._values))i._values[r]=this._values[r].transitioned(e,t._values[r]);return i}untransitioned(){const e=new Ko(this._properties);for(const t of Object.keys(this._values))e._values[t]=this._values[t].untransitioned();return e}}class Jo{constructor(e,t,i,r,a){var n=r.delay||0,o=r.duration||0;a=a||0,this.property=e,this.value=t,this.begin=a+n,this.end=this.begin+o,e.specification.transition&&(r.delay||r.duration)&&(this.prior=i)}possiblyEvaluate(e,t,i){const r=e.now||0,a=this.value.possiblyEvaluate(e,t,i),n=this.prior;if(n){if(r>this.end)return this.prior=null,a;if(this.value.isDataDriven())return this.prior=null,a;if(r":1,">=":1,"<":1,"<=":1,"in":1,"!in":1,"all":1,"any":1,"none":1,"has":1,"!has":1}},"geometry_type":{"type":"enum","values":{"Point":1,"LineString":1,"Polygon":1}},"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":1,"exponential":1,"interval":1,"categorical":1},"default":"exponential"},"colorSpace":{"type":"enum","values":{"rgb":1,"lab":1,"hcl":1},"default":"rgb"},"default":{"type":"*","required":false}},"function_stop":{"type":"array","minimum":0,"maximum":24,"value":["number","color"],"length":2},"expression":{"type":"array","value":"*","minimum":1},"fog":{"range":{"type":"array","default":[0.5,10],"minimum":-20,"maximum":20,"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"high-color":{"type":"color","property-type":"data-constant","default":"#245cdf","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"space-color":{"type":"color","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"horizon-blend":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,0.2,7,0.1],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"star-intensity":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],5,0.35,6,0],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"vertical-range":{"type":"array","default":[0,0],"minimum":0,"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}}},"camera":{"camera-projection":{"type":"enum","values":{"perspective":1,"orthographic":1},"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"default":"perspective","property-type":"data-constant"}},"colorTheme":{"data":{"type":"string","property-type":"data-constant","expression":{}}},"light":{"anchor":{"type":"enum","default":"viewport","values":{"map":1,"viewport":1},"property-type":"data-constant","expression":{"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"projection":{"name":{"type":"enum","values":{"albers":1,"equalEarth":1,"equirectangular":1,"lambertConformalConic":1,"mercator":1,"naturalEarth":1,"winkelTripel":1,"globe":1},"default":"mercator","required":true},"center":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-180,-90],"maximum":[180,90]},"parallels":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-90,-90],"maximum":[90,90]}},"terrain":{"source":{"type":"string","required":true},"exaggeration":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1000,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"paint":["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_raster-particle","paint_hillshade","paint_background","paint_sky","paint_model"],"paint_fill":{"fill-antialias":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-outline-color":{"type":"color","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-extrusion-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-height":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant","type":"number","private":true,"default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant","type":"number","private":true,"default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-wall-radius":{"property-type":"data-constant","type":"number","experimental":true,"default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-ground-radius":{"property-type":"data-constant","type":"number","experimental":true,"default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-ground-attenuation":{"property-type":"data-constant","type":"number","experimental":true,"default":0.69,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-flood-light-color":{"property-type":"data-constant","type":"color","experimental":true,"default":"#ffffff","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"fill-extrusion-flood-light-intensity":{"property-type":"data-constant","type":"number","experimental":true,"default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"fill-extrusion-flood-light-wall-radius":{"property-type":"data-driven","type":"number","experimental":true,"default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state"]}},"fill-extrusion-flood-light-ground-radius":{"property-type":"data-driven","type":"number","experimental":true,"default":0,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state"]}},"fill-extrusion-flood-light-ground-attenuation":{"property-type":"data-constant","type":"number","experimental":true,"default":0.69,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-vertical-scale":{"property-type":"data-constant","type":"number","experimental":true,"default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-rounded-roof":{"property-type":"data-constant","type":"boolean","default":true,"experimental":true,"expression":{"parameters":["zoom"]}},"fill-extrusion-cutoff-fade-range":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{},"property-type":"data-constant"},"fill-extrusion-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"fill-extrusion-line-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-extrusion-line-alignment":{"type":"enum","values":{"inside":1,"outside":1,"center":1},"default":"center","property-type":"data-constant"}},"paint_line":{"line-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"line-width":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-gap-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-offset":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-dasharray":{"type":"array","value":"number","minimum":0,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{"type":"color","expression":{"interpolated":true,"parameters":["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{"type":"array","value":"number","length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1],"property-type":"constant"},"line-trim-fade-range":{"type":"array","value":"number","experimental":true,"length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1],"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"line-trim-color":{"type":"color","experimental":true,"default":"transparent","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"line-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"line-border-width":{"type":"number","private":true,"default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-border-color":{"type":"color","private":true,"default":"rgba(0, 0, 0, 0)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-occlusion-opacity":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"property-type":"data-constant"}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-blur":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1},"default":"viewport","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-stroke-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-stroke-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_heatmap":{"heatmap-radius":{"type":"number","default":30,"minimum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"heatmap-weight":{"type":"number","default":1,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"heatmap-intensity":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"heatmap-color":{"type":"color","default":["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",0.1,"royalblue",0.3,"cyan",0.5,"lime",0.7,"yellow",1,"red"],"expression":{"interpolated":true,"parameters":["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_symbol":{"icon-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-occlusion-opacity":{"type":"number","minimum":0,"maximum":1,"default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-emissive-strength":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-driven"},"text-emissive-strength":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-driven"},"icon-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-image-cross-fade":{"type":"number","property-type":"data-driven","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"transition":true},"text-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-occlusion-opacity":{"type":"number","minimum":0,"maximum":1,"default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-color":{"type":"color","default":"#000000","transition":true,"overridable":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-color-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"expression":{},"property-type":"data-constant"},"icon-color-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"expression":{},"property-type":"data-constant"},"icon-color-brightness-min":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{},"property-type":"data-constant"},"icon-color-brightness-max":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{},"property-type":"data-constant"}},"paint_raster":{"raster-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-color":{"type":"color","expression":{"interpolated":true,"parameters":["raster-value"]},"property-type":"color-ramp"},"raster-color-mix":{"type":"array","default":[0.2126,0.7152,0.0722,0],"length":4,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-color-range":{"type":"array","length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-hue-rotate":{"type":"number","default":0,"period":360,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{"type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-resampling":{"type":"enum","values":{"linear":1,"nearest":1},"default":"linear","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"raster-array-band":{"type":"string","required":false,"experimental":true,"property-type":"data-constant"},"raster-elevation":{"type":"number","default":0,"minimum":0,"transition":true,"experimental":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_raster-particle":{"raster-particle-array-band":{"type":"string","required":false,"property-type":"data-constant"},"raster-particle-count":{"type":"number","default":512,"minimum":1,"property-type":"data-constant"},"raster-particle-color":{"type":"color","expression":{"interpolated":true,"parameters":["raster-particle-speed"]},"property-type":"color-ramp"},"raster-particle-max-speed":{"type":"number","default":1,"minimum":1,"property-type":"data-constant"},"raster-particle-speed-factor":{"type":"number","default":0.2,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-particle-fade-opacity-factor":{"type":"number","default":0.98,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-particle-reset-rate-factor":{"type":"number","default":0.8,"minimum":0,"maximum":1,"property-type":"data-constant"},"raster-particle-elevation":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_hillshade":{"hillshade-illumination-direction":{"type":"number","default":335,"minimum":0,"maximum":359,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"viewport","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{"type":"number","default":0.5,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"hillshade-highlight-color":{"type":"color","default":"#FFFFFF","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"hillshade-accent-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"hillshade-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_background":{"background-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"background-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"background-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_sky":{"sky-type":{"type":"enum","values":{"gradient":1,"atmosphere":1},"default":"atmosphere","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{"type":"array","value":"number","length":2,"minimum":[0,0],"maximum":[360,180],"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{"type":"number","default":10,"minimum":0,"maximum":100,"property-type":"data-constant"},"sky-gradient-center":{"type":"array","value":"number","default":[0,0],"length":2,"minimum":[0,0],"maximum":[360,180],"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{"type":"number","default":90,"minimum":0,"maximum":180,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient":{"type":"color","default":["interpolate",["linear"],["sky-radial-progress"],0.8,"#87ceeb",1,"white"],"expression":{"interpolated":true,"parameters":["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{"type":"color","default":"white","property-type":"data-constant"},"sky-atmosphere-color":{"type":"color","default":"white","property-type":"data-constant"},"sky-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_model":{"model-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"model-rotation":{"type":"array","value":"number","length":3,"default":[0,0,0],"period":360,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-scale":{"type":"array","value":"number","length":3,"default":[1,1,1],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-translation":{"type":"array","value":"number","length":3,"default":[0,0,0],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-color":{"type":"color","default":"#ffffff","property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light","zoom"]},"transition":true},"model-color-mix-intensity":{"type":"number","property-type":"data-driven","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-type":{"type":"enum","values":{"common-3d":1,"location-indicator":1},"default":"common-3d","property-type":"data-constant"},"model-cast-shadows":{"type":"boolean","default":true,"property-type":"data-constant"},"model-receive-shadows":{"type":"boolean","default":true,"property-type":"data-constant"},"model-ambient-occlusion-intensity":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant","transition":true},"model-emissive-strength":{"type":"number","property-type":"data-driven","default":0,"minimum":0,"maximum":5,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-roughness":{"type":"number","default":1,"minimum":0,"maximum":1,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state"]},"transition":true},"model-height-based-emissive-strength-multiplier":{"type":"array","default":[1,1,1,1,0],"length":5,"value":"number","property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-cutoff-fade-range":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{},"property-type":"data-constant"},"model-front-cutoff":{"type":"array","private":true,"value":"number","property-type":"data-constant","expression":{"interpolated":true,"parameters":["zoom"]},"length":3,"default":[0,0,1],"minimum":[0,0,0],"maximum":[1,1,1]}},"transition":{"duration":{"type":"number","default":300,"minimum":0},"delay":{"type":"number","default":0,"minimum":0}},"property-type":{"data-driven":{"type":"property-type"},"color-ramp":{"type":"property-type"},"data-constant":{"type":"property-type"},"constant":{"type":"property-type"}},"promoteId":{"*":{"type":"string"}}}');function rs(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}function as(e){if(Array.isArray(e))return e.map(as);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){const t={};for(const i in e)t[i]=as(e[i]);return t}return rs(e)}function ns(e){if(!0===e||!1===e)return!0;if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return 2<=e.length&&"$id"!==e[1]&&"$type"!==e[1];case"in":return 3<=e.length&&("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(const t of e.slice(1))if(!ns(t)&&"boolean"!=typeof t)return!1;return!0;default:return!0}}function os(n,e="fill"){if(null==n)return{filter:()=>!0,needGeometry:!1,needFeature:!1};var t=n=ns(n)?n:hs(n);let i=!0;try{i=function(e){if(!ss(e))return e;e=as(e);return function t(i){let r=!1;const a=[];if("case"===i[0]){for(let e=1;et(e))}(e)}(t)}catch(n){console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.
+This is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md
+and paste the contents of this message in the report.
+Thank you!
+Filter Expression:
+${JSON.stringify(t,null,2)}
+ `)}const r=w["filter_"+e],a=yo(i,r);if("error"===a.result)throw new Error(a.value.map(e=>e.key+": "+e.message).join(", "));e=(e,t,i)=>a.value.evaluate(e,t,{},i);let o=null,s=null;if(i!==t){const n=yo(t,r);if("error"===n.result)throw new Error(n.value.map(e=>e.key+": "+e.message).join(", "));o=(e,t,i,r,a)=>n.value.evaluate(e,t,{},i,void 0,void 0,r,a),s=!xn(n.value.expression)}return{filter:e,dynamicFilter:o||void 0,needGeometry:function t(i){if(!Array.isArray(i))return!1;if("within"===i[0]||"distance"===i[0])return!0;for(let e=1;e",">=","<","<=","to-boolean"]);function cs(e,t){return e"===i||"<="===i||">="===i?us(e[1],e[2],i):"any"===i?(t=e.slice(1),["any"].concat(t.map(hs))):"all"===i?["all"].concat(e.slice(1).map(hs)):"none"===i?["all"].concat(e.slice(1).map(hs).map(fs)):"in"===i?ds(e[1],e.slice(2)):"!in"===i?fs(ds(e[1],e.slice(2))):"has"===i?ps(e[1]):"!has"!==i||fs(ps(e[1]))}function us(e,t,i){switch(e){case"$type":return["filter-type-"+i,t];case"$id":return["filter-id-"+i,t];default:return["filter-"+i,e,t]}}function ds(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 200typeof e!=typeof t[0])?["filter-in-large",e,["literal",t.sort(cs)]]:["filter-in-small",e,["literal",t]]}}function ps(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function fs(e){return["!",e]}function ms(e,t){return t?e+""+t:e}const _s="-transition",gs=new Set(["fill","line","background","hillshade","raster"]);class ys extends zr{constructor(e,t,i,r,a){if(super(),this.id=e.id,this.fqid=ms(this.id,i),this.type=e.type,this.scope=i,this.lut=r,this.options=a,this._featureFilter={filter:()=>!0,needGeometry:!1,needFeature:!1},this._filterCompiled=!1,this.configDependencies=new Set,"custom"!==e.type&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&"sky"!==e.type&&"slot"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),e.slot&&(this.slot=e.slot),t.layout&&(this._unevaluatedLayout=new Qo(t.layout,this.scope,a),this.configDependencies=new Set([...this.configDependencies,...this._unevaluatedLayout.configDependencies])),t.paint)){this._transitionablePaint=new Yo(t.paint,this.scope,a);for(const t in e.paint)this.setPaintProperty(t,e.paint[t]);for(const t in e.layout)this.setLayoutProperty(t,e.layout[t]);this.configDependencies=new Set([...this.configDependencies,...this._transitionablePaint.configDependencies]),this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new ts(t.paint)}}onAdd(e){}onRemove(e){}isDraped(e){return gs.has(this.type)}getLayoutProperty(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)}setLayoutProperty(e,t){if("custom"===this.type&&"visibility"===e)this.visibility=t;else{const i=this._unevaluatedLayout;i._properties.properties[e]&&(i.setValue(e,t),this.configDependencies=new Set([...this.configDependencies,...i.configDependencies]),"visibility"===e&&this.possiblyEvaluateVisibility())}}possiblyEvaluateVisibility(){this.visibility=this._unevaluatedLayout._values.visibility.possiblyEvaluate({zoom:0})}getPaintProperty(e){return ci(e,_s)?this._transitionablePaint.getTransition(e.slice(0,-11)):this._transitionablePaint.getValue(e)}setPaintProperty(e,t){const i=this._transitionablePaint,r=i._properties.properties;if(ci(e,_s)){const a=e.slice(0,-11);return r[a]&&i.setTransition(a,t||void 0),!1}if(!r[e])return!1;const a=i._values[e],n=a.value.isDataDriven(),o=a.value,s=(i.setValue(e,t),this.configDependencies=new Set([...this.configDependencies,...i.configDependencies]),this._handleSpecialPaintPropertyUpdate(e),i._values[e].value),l=s.isDataDriven(),c=ci(e,"pattern")||"line-dasharray"===e;return l||n||c||this._handleOverridablePaintPropertyUpdate(e,o,s)}_handleSpecialPaintPropertyUpdate(e){}getProgramIds(){return null}getDefaultProgramParams(e,t,i){return null}_handleOverridablePaintPropertyUpdate(e,t,i){return!1}isHidden(e){return!!(this.minzoom&&e=this.maxzoom)||"none"===this.visibility}updateTransitions(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(e,t){this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,t)}serialize(){return ui({id:this.id,type:this.type,slot:this.slot,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()},(e,t)=>!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length))}is3D(){return!1}isSky(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}hasShadowPass(){return!1}canCastShadows(){return!1}hasLightBeamPass(){return!1}cutoffRange(){return 0}tileCoverLift(){return 0}resize(){}isStateDependent(){for(const t in this.paint._values){var e=this.paint.get(t);if(e instanceof es&&ao(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1}compileFilter(){this._filterCompiled||(this._featureFilter=os(this.filter),this._filterCompiled=!0)}invalidateCompiledFilter(){this._filterCompiled=!1}dynamicFilter(){return this._featureFilter.dynamicFilter}dynamicFilterNeedsFeature(){return this._featureFilter.needFeature}getLayerRenderingStats(){return this._stats}resetLayerRenderingStats(e){this._stats&&("shadow"===e.renderPass?this._stats.numRenderedVerticesInShadowPass=0:this._stats.numRenderedVerticesInTransparentPass=0)}queryRadius(e){}queryIntersectsFeature(e,t,i,r,a,n,o,s,l){}queryIntersectsMatchingFeature(e,t,i,r){}}const xs={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class vs{constructor(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}}class T{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(e,t){return e._trim(),t&&(e.isTransferred=!0,t.add(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}}static deserialize(e){const t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(e){this.reserve(e),this.length=e}reserve(e){e>this.capacity&&(this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement),e=this.uint8,this._refreshViews(),e&&this.uint8.set(e))}_refreshViews(){throw new Error("StructArray#_refreshViews() must be implemented by each concrete StructArray layout")}emplace(){throw new Error("StructArray#emplace() must be implemented by each concrete StructArray layout")}emplaceBack(){throw new Error("StructArray#emplaceBack() must be implemented by each concrete StructArray layout")}destroy(){this.int8=this.uint8=this.int16=this.uint16=this.int32=this.uint32=this.float32=null,this.arrayBuffer=null}}function E(e,a=1){let n=0,o=0;return{members:e.map(e=>{var t=xs[e.type].BYTES_PER_ELEMENT,i=n=bs(n,Math.max(a,t)),r=e.components||1;return o=Math.max(o,t),n+=t*r,{name:e.name,type:e.type,components:r,offset:i}}),size:bs(n,Math.max(o,a)),alignment:a}}function bs(e,t){return Math.ceil(e/t)*t}class ws extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)}emplace(e,t,i){var r=2*e;return this.int16[0+r]=t,this.int16[1+r]=i,e}}ws.prototype.bytesPerElement=4,m(ws,"StructArrayLayout2i4");class Ts extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,i){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i)}emplace(e,t,i,r){var a=3*e;return this.int16[0+a]=t,this.int16[1+a]=i,this.int16[2+a]=r,e}}Ts.prototype.bytesPerElement=6,m(Ts,"StructArrayLayout3i6");class Es extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,i,r){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,r)}emplace(e,t,i,r,a){var n=4*e;return this.int16[0+n]=t,this.int16[1+n]=i,this.int16[2+n]=r,this.int16[3+n]=a,e}}Es.prototype.bytesPerElement=8,m(Es,"StructArrayLayout4i8");class Ss extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,i,r,a){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i,r,a)}emplace(e,t,i,r,a,n){var o=5*e;return this.int16[0+o]=t,this.int16[1+o]=i,this.int16[2+o]=r,this.int16[3+o]=a,this.int16[4+o]=n,e}}Ss.prototype.bytesPerElement=10,m(Ss,"StructArrayLayout5i10");class Ms extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,i,r,a,n,o){var s=this.length;return this.resize(s+1),this.emplace(s,e,t,i,r,a,n,o)}emplace(e,t,i,r,a,n,o,s){var l=6*e,c=12*e,h=3*e;return this.int16[0+l]=t,this.int16[1+l]=i,this.uint8[4+c]=r,this.uint8[5+c]=a,this.uint8[6+c]=n,this.uint8[7+c]=o,this.float32[2+h]=s,e}}Ms.prototype.bytesPerElement=12,m(Ms,"StructArrayLayout2i4ub1f12");class Is extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,i,r){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,r)}emplace(e,t,i,r,a){var n=4*e;return this.float32[0+n]=t,this.float32[1+n]=i,this.float32[2+n]=r,this.float32[3+n]=a,e}}Is.prototype.bytesPerElement=16,m(Is,"StructArrayLayout4f16");class As extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,i){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i)}emplace(e,t,i,r){var a=3*e;return this.float32[0+a]=t,this.float32[1+a]=i,this.float32[2+a]=r,e}}As.prototype.bytesPerElement=12,m(As,"StructArrayLayout3f12");class Cs extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,i,r,a){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i,r,a)}emplace(e,t,i,r,a,n){var o=6*e,s=3*e;return this.uint16[0+o]=t,this.uint16[1+o]=i,this.uint16[2+o]=r,this.uint16[3+o]=a,this.float32[2+s]=n,e}}Cs.prototype.bytesPerElement=12,m(Cs,"StructArrayLayout4ui1f12");class Ps extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,i,r){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,r)}emplace(e,t,i,r,a){var n=4*e;return this.uint16[0+n]=t,this.uint16[1+n]=i,this.uint16[2+n]=r,this.uint16[3+n]=a,e}}Ps.prototype.bytesPerElement=8,m(Ps,"StructArrayLayout4ui8");class zs extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,i,r,a,n){var o=this.length;return this.resize(o+1),this.emplace(o,e,t,i,r,a,n)}emplace(e,t,i,r,a,n,o){var s=6*e;return this.int16[0+s]=t,this.int16[1+s]=i,this.int16[2+s]=r,this.int16[3+s]=a,this.int16[4+s]=n,this.int16[5+s]=o,e}}zs.prototype.bytesPerElement=12,m(zs,"StructArrayLayout6i12");class Ds extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,i,r,a,n,o,s,l,c,h,u){var d=this.length;return this.resize(d+1),this.emplace(d,e,t,i,r,a,n,o,s,l,c,h,u)}emplace(e,t,i,r,a,n,o,s,l,c,h,u,d){var p=12*e;return this.int16[0+p]=t,this.int16[1+p]=i,this.int16[2+p]=r,this.int16[3+p]=a,this.uint16[4+p]=n,this.uint16[5+p]=o,this.uint16[6+p]=s,this.uint16[7+p]=l,this.int16[8+p]=c,this.int16[9+p]=h,this.int16[10+p]=u,this.int16[11+p]=d,e}}Ds.prototype.bytesPerElement=24,m(Ds,"StructArrayLayout4i4ui4i24");class Rs extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,i,r,a,n){var o=this.length;return this.resize(o+1),this.emplace(o,e,t,i,r,a,n)}emplace(e,t,i,r,a,n,o){var s=10*e,l=5*e;return this.int16[0+s]=t,this.int16[1+s]=i,this.int16[2+s]=r,this.float32[2+l]=a,this.float32[3+l]=n,this.float32[4+l]=o,e}}Rs.prototype.bytesPerElement=20,m(Rs,"StructArrayLayout3i3f20");class Ls extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint32[+e+0]=t,e}}Ls.prototype.bytesPerElement=4,m(Ls,"StructArrayLayout1ul4");class ks extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)}emplace(e,t,i){var r=2*e;return this.uint16[0+r]=t,this.uint16[1+r]=i,e}}ks.prototype.bytesPerElement=4,m(ks,"StructArrayLayout2ui4");class Os extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,i,r,a,n,o,s,l,c,h,u,d){var p=this.length;return this.resize(p+1),this.emplace(p,e,t,i,r,a,n,o,s,l,c,h,u,d)}emplace(e,t,i,r,a,n,o,s,l,c,h,u,d,p){var f=20*e,m=10*e;return this.int16[0+f]=t,this.int16[1+f]=i,this.int16[2+f]=r,this.int16[3+f]=a,this.int16[4+f]=n,this.float32[3+m]=o,this.float32[4+m]=s,this.float32[5+m]=l,this.float32[6+m]=c,this.int16[14+f]=h,this.uint32[8+m]=u,this.uint16[18+f]=d,this.uint16[19+f]=p,e}}Os.prototype.bytesPerElement=40,m(Os,"StructArrayLayout5i4f1i1ul2ui40");class Bs extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,i,r,a,n,o){var s=this.length;return this.resize(s+1),this.emplace(s,e,t,i,r,a,n,o)}emplace(e,t,i,r,a,n,o,s){var l=8*e;return this.int16[0+l]=t,this.int16[1+l]=i,this.int16[2+l]=r,this.int16[4+l]=a,this.int16[5+l]=n,this.int16[6+l]=o,this.int16[7+l]=s,e}}Bs.prototype.bytesPerElement=16,m(Bs,"StructArrayLayout3i2i2i16");class Fs extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,i,r,a){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i,r,a)}emplace(e,t,i,r,a,n){var o=4*e,s=8*e;return this.float32[0+o]=t,this.float32[1+o]=i,this.float32[2+o]=r,this.int16[6+s]=a,this.int16[7+s]=n,e}}Fs.prototype.bytesPerElement=16,m(Fs,"StructArrayLayout2f1f2i16");class Ns extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,i,r){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,r)}emplace(e,t,i,r,a){var n=12*e,o=3*e;return this.uint8[0+n]=t,this.uint8[1+n]=i,this.float32[1+o]=r,this.float32[2+o]=a,e}}Ns.prototype.bytesPerElement=12,m(Ns,"StructArrayLayout2ub2f12");class Vs extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,i){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,i)}emplace(e,t,i,r){var a=3*e;return this.uint16[0+a]=t,this.uint16[1+a]=i,this.uint16[2+a]=r,e}}Vs.prototype.bytesPerElement=6,m(Vs,"StructArrayLayout3ui6");class Us extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e,t,i,r,a,n,o,s,l,c,h,u,d,p,f,m,_,g,y,x,v){var b=this.length;return this.resize(b+1),this.emplace(b,e,t,i,r,a,n,o,s,l,c,h,u,d,p,f,m,_,g,y,x,v)}emplace(e,t,i,r,a,n,o,s,l,c,h,u,d,p,f,m,_,g,y,x,v,b){var w=30*e,T=15*e,E=60*e;return this.int16[0+w]=t,this.int16[1+w]=i,this.int16[2+w]=r,this.float32[2+T]=a,this.float32[3+T]=n,this.uint16[8+w]=o,this.uint16[9+w]=s,this.uint32[5+T]=l,this.uint32[6+T]=c,this.uint32[7+T]=h,this.uint16[16+w]=u,this.uint16[17+w]=d,this.uint16[18+w]=p,this.float32[10+T]=f,this.float32[11+T]=m,this.uint8[48+E]=_,this.uint8[49+E]=g,this.uint8[50+E]=y,this.uint32[13+T]=x,this.int16[28+w]=v,this.uint8[58+E]=b,e}}Us.prototype.bytesPerElement=60,m(Us,"StructArrayLayout3i2f2ui3ul3ui2f3ub1ul1i1ub60");class js extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e,t,i,r,a,n,o,s,l,c,h,u,d,p,f,m,_,g,y,x,v,b,w,T,E,S,M,I,A,C,P,z){var D=this.length;return this.resize(D+1),this.emplace(D,e,t,i,r,a,n,o,s,l,c,h,u,d,p,f,m,_,g,y,x,v,b,w,T,E,S,M,I,A,C,P,z)}emplace(e,t,i,r,a,n,o,s,l,c,h,u,d,p,f,m,_,g,y,x,v,b,w,T,E,S,M,I,A,C,P,z,D){var R=20*e,L=40*e,k=80*e;return this.float32[0+R]=t,this.float32[1+R]=i,this.int16[4+L]=r,this.int16[5+L]=a,this.int16[6+L]=n,this.int16[7+L]=o,this.int16[8+L]=s,this.int16[9+L]=l,this.int16[10+L]=c,this.int16[11+L]=h,this.int16[12+L]=u,this.uint16[13+L]=d,this.uint16[14+L]=p,this.uint16[15+L]=f,this.uint16[16+L]=m,this.uint16[17+L]=_,this.uint16[18+L]=g,this.uint16[19+L]=y,this.uint16[20+L]=x,this.uint16[21+L]=v,this.uint16[22+L]=b,this.uint16[23+L]=w,this.uint16[24+L]=T,this.uint16[25+L]=E,this.uint16[26+L]=S,this.uint16[27+L]=M,this.uint32[14+R]=I,this.float32[15+R]=A,this.float32[16+R]=C,this.float32[17+R]=P,this.float32[18+R]=z,this.uint8[76+k]=D,e}}js.prototype.bytesPerElement=80,m(js,"StructArrayLayout2f9i15ui1ul4f1ub80");class Gs extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.float32[+e+0]=t,e}}Gs.prototype.bytesPerElement=4,m(Gs,"StructArrayLayout1f4");class qs extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,i,r,a){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,i,r,a)}emplace(e,t,i,r,a,n){var o=5*e;return this.float32[0+o]=t,this.float32[1+o]=i,this.float32[2+o]=r,this.float32[3+o]=a,this.float32[4+o]=n,e}}qs.prototype.bytesPerElement=20,m(qs,"StructArrayLayout5f20");class $s extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,i,r,a,n,o){var s=this.length;return this.resize(s+1),this.emplace(s,e,t,i,r,a,n,o)}emplace(e,t,i,r,a,n,o,s){var l=7*e;return this.float32[0+l]=t,this.float32[1+l]=i,this.float32[2+l]=r,this.float32[3+l]=a,this.float32[4+l]=n,this.float32[5+l]=o,this.float32[6+l]=s,e}}$s.prototype.bytesPerElement=28,m($s,"StructArrayLayout7f28");class Zs extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,i,r){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,i,r)}emplace(e,t,i,r,a){var n=6*e;return this.uint32[3*e+0]=t,this.uint16[2+n]=i,this.uint16[3+n]=r,this.uint16[4+n]=a,e}}Zs.prototype.bytesPerElement=12,m(Zs,"StructArrayLayout1ul3ui12");class Ws extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint16[+e+0]=t,e}}Ws.prototype.bytesPerElement=2,m(Ws,"StructArrayLayout1ui2");class Hs extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t){var i=this.length;return this.resize(i+1),this.emplace(i,e,t)}emplace(e,t,i){var r=2*e;return this.float32[0+r]=t,this.float32[1+r]=i,e}}Hs.prototype.bytesPerElement=8,m(Hs,"StructArrayLayout2f8");class Xs extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,i,r,a,n,o,s,l,c,h,u,d,p,f,m){var _=this.length;return this.resize(_+1),this.emplace(_,e,t,i,r,a,n,o,s,l,c,h,u,d,p,f,m)}emplace(e,t,i,r,a,n,o,s,l,c,h,u,d,p,f,m,_){var g=16*e;return this.float32[0+g]=t,this.float32[1+g]=i,this.float32[2+g]=r,this.float32[3+g]=a,this.float32[4+g]=n,this.float32[5+g]=o,this.float32[6+g]=s,this.float32[7+g]=l,this.float32[8+g]=c,this.float32[9+g]=h,this.float32[10+g]=u,this.float32[11+g]=d,this.float32[12+g]=p,this.float32[13+g]=f,this.float32[14+g]=m,this.float32[15+g]=_,e}}Xs.prototype.bytesPerElement=64,m(Xs,"StructArrayLayout16f64");class Ys extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,i,r,a,n,o){var s=this.length;return this.resize(s+1),this.emplace(s,e,t,i,r,a,n,o)}emplace(e,t,i,r,a,n,o,s){var l=10*e,c=5*e;return this.uint16[0+l]=t,this.uint16[1+l]=i,this.uint16[2+l]=r,this.uint16[3+l]=a,this.float32[2+c]=n,this.float32[3+c]=o,this.float32[4+c]=s,e}}Ys.prototype.bytesPerElement=20,m(Ys,"StructArrayLayout4ui3f20");class Js extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.int16[+e+0]=t,e}}Js.prototype.bytesPerElement=2,m(Js,"StructArrayLayout1i2");class Ks extends T{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer)}emplaceBack(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint8[+e+0]=t,e}}Ks.prototype.bytesPerElement=1,m(Ks,"StructArrayLayout1ub1");class Qs extends vs{get projectedAnchorX(){return this._structArray.int16[this._pos2+0]}get projectedAnchorY(){return this._structArray.int16[this._pos2+1]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+2]}get tileAnchorX(){return this._structArray.int16[this._pos2+3]}get tileAnchorY(){return this._structArray.int16[this._pos2+4]}get x1(){return this._structArray.float32[this._pos4+3]}get y1(){return this._structArray.float32[this._pos4+4]}get x2(){return this._structArray.float32[this._pos4+5]}get y2(){return this._structArray.float32[this._pos4+6]}get padding(){return this._structArray.int16[this._pos2+14]}get featureIndex(){return this._structArray.uint32[this._pos4+8]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+18]}get bucketIndex(){return this._structArray.uint16[this._pos2+19]}}Qs.prototype.size=40;class el extends Os{get(e){return new Qs(this,e)}}m(el,"CollisionBoxArray");class tl extends vs{get projectedAnchorX(){return this._structArray.int16[this._pos2+0]}get projectedAnchorY(){return this._structArray.int16[this._pos2+1]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+2]}get tileAnchorX(){return this._structArray.float32[this._pos4+2]}get tileAnchorY(){return this._structArray.float32[this._pos4+3]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+8]}get numGlyphs(){return this._structArray.uint16[this._pos2+9]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+5]}get lineStartIndex(){return this._structArray.uint32[this._pos4+6]}get lineLength(){return this._structArray.uint32[this._pos4+7]}get segment(){return this._structArray.uint16[this._pos2+16]}get lowerSize(){return this._structArray.uint16[this._pos2+17]}get upperSize(){return this._structArray.uint16[this._pos2+18]}get lineOffsetX(){return this._structArray.float32[this._pos4+10]}get lineOffsetY(){return this._structArray.float32[this._pos4+11]}get writingMode(){return this._structArray.uint8[this._pos1+48]}get placedOrientation(){return this._structArray.uint8[this._pos1+49]}set placedOrientation(e){this._structArray.uint8[this._pos1+49]=e}get hidden(){return this._structArray.uint8[this._pos1+50]}set hidden(e){this._structArray.uint8[this._pos1+50]=e}get crossTileID(){return this._structArray.uint32[this._pos4+13]}set crossTileID(e){this._structArray.uint32[this._pos4+13]=e}get associatedIconIndex(){return this._structArray.int16[this._pos2+28]}get flipState(){return this._structArray.uint8[this._pos1+58]}set flipState(e){this._structArray.uint8[this._pos1+58]=e}}tl.prototype.size=60;class il extends Us{get(e){return new tl(this,e)}}m(il,"PlacedSymbolArray");class rl extends vs{get tileAnchorX(){return this._structArray.float32[this._pos4+0]}get tileAnchorY(){return this._structArray.float32[this._pos4+1]}get projectedAnchorX(){return this._structArray.int16[this._pos2+4]}get projectedAnchorY(){return this._structArray.int16[this._pos2+5]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+6]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+7]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+8]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+9]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+10]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+11]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+12]}get key(){return this._structArray.uint16[this._pos2+13]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+14]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+15]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+16]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+17]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+18]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+19]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+20]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+21]}get featureIndex(){return this._structArray.uint16[this._pos2+22]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+23]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+24]}get numIconVertices(){return this._structArray.uint16[this._pos2+25]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+26]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+27]}get crossTileID(){return this._structArray.uint32[this._pos4+14]}set crossTileID(e){this._structArray.uint32[this._pos4+14]=e}get textOffset0(){return this._structArray.float32[this._pos4+15]}get textOffset1(){return this._structArray.float32[this._pos4+16]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+17]}get zOffset(){return this._structArray.float32[this._pos4+18]}set zOffset(e){this._structArray.float32[this._pos4+18]=e}get hasIconTextFit(){return this._structArray.uint8[this._pos1+76]}}rl.prototype.size=80;class al extends js{get(e){return new rl(this,e)}}m(al,"SymbolInstanceArray");class nl extends Gs{getoffsetX(e){return this.float32[+e+0]}}m(nl,"GlyphOffsetArray");class ol extends ws{getx(e){return this.int16[2*e+0]}gety(e){return this.int16[2*e+1]}}m(ol,"SymbolLineVertexArray");class sl extends vs{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}get layoutVertexArrayOffset(){return this._structArray.uint16[this._pos2+4]}}sl.prototype.size=12;class ll extends Zs{get(e){return new sl(this,e)}}m(ll,"FeatureIndexArray");class cl extends ks{geta_centroid_pos0(e){return this.uint16[2*e+0]}geta_centroid_pos1(e){return this.uint16[2*e+1]}}m(cl,"FillExtrusionCentroidArray");class hl extends vs{get a_join_normal_inside_polygon0(){return this._structArray.int16[this._pos2+0]}get a_join_normal_inside_polygon1(){return this._structArray.int16[this._pos2+1]}get a_join_normal_inside_polygon2(){return this._structArray.int16[this._pos2+2]}get a_join_normal_inside_polygon3(){return this._structArray.int16[this._pos2+3]}}hl.prototype.size=8;class ul extends Es{get(e){return new hl(this,e)}}m(ul,"FillExtrusionWallArray");const dl=E([{name:"a_pos",components:2,type:"Int16"}],4),pl=E([{name:"a_pos_3",components:3,type:"Int16"},{name:"a_pos_normal_3",components:3,type:"Int16"}]);class R{constructor(e=[]){this.segments=e}_prepareSegment(e,t,i,r){let a=this.segments[this.segments.length-1];return e>R.MAX_VERTEX_ARRAY_LENGTH&&fi(`Max vertices per segment is ${R.MAX_VERTEX_ARRAY_LENGTH}: bucket requested `+e),(!a||a.vertexLength+e>R.MAX_VERTEX_ARRAY_LENGTH||a.sortKey!==r)&&(a={vertexOffset:t,primitiveOffset:i,vertexLength:0,primitiveLength:0},void 0!==r&&(a.sortKey=r),this.segments.push(a)),a}prepareSegment(e,t,i,r){return this._prepareSegment(e,t.length,i.length,r)}get(){return this.segments}destroy(){for(const e of this.segments)for(const t in e.vaos)e.vaos[t].destroy()}static simpleSegment(e,t,i,r){return new R([{vertexOffset:e,primitiveOffset:t,vertexLength:i,primitiveLength:r,vaos:{},sortKey:0}])}}function fl(e,t){return 256*(e=S(Math.floor(e),0,255))+S(Math.floor(t),0,255)}R.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,m(R,"SegmentVector");const ml=E([{name:"a_pattern",components:4,type:"Uint16"},{name:"a_pixel_ratio",components:1,type:"Float32"}]),_l=E([{name:"a_dash",components:4,type:"Uint16"}]);class gl{constructor(){this.ids=[],this.uniqueIds=[],this.positions=[],this.indexed=!1}add(e,t,i,r){this.ids.push(yl(e)),this.positions.push(t,i,r)}eachPosition(e,t){var i=yl(e);let r=0,a=this.ids.length-1;for(;r>1;this.ids[e]>=i?a=e:r=1+e}for(;this.ids[r]===i;)t(this.positions[3*r],this.positions[3*r+1],this.positions[3*r+2]),r++}static serialize(e,t){var i=new Float64Array(e.ids),e=new Uint32Array(e.positions);return function i(r,a,n,o){for(;n>1];let e=n-1,t=o+1;for(;;){for(;e++,r[e]s;);if(e>=t)break;xl(r,e,t),xl(a,3*e,3*t),xl(a,3*e+1,3*t+1),xl(a,3*e+2,3*t+2)}t-n"u_"+e),this.type=i,this.context=r}setUniform(e,t,i,r,a){const n=r.constantOr(this.value);t.set(e,a,n instanceof g?n.toRenderColor(this.context.lut):n)}getBinding(e,t){return new("color"===this.type?Ml:wl)(e)}}class Ll{constructor(e,t){this.uniformNames=t.map(e=>"u_"+e),this.pattern=null,this.pixelRatio=1}setConstantPatternPositions(e){this.pixelRatio=e.pixelRatio||1,this.pattern=e.tl.concat(e.br)}setUniform(e,t,i,r,a){var n="u_pattern"===a||"u_dash"===a?this.pattern:"u_pixel_ratio"===a?this.pixelRatio:null;n&&t.set(e,a,n)}getBinding(e,t){return new("u_pattern"===t||"u_dash"===t?Sl:wl)(e)}}class kl{constructor(e,t,i,r){this.expression=e,this.type=i,this.maxValue=0,this.paintVertexAttributes=t.map(e=>({name:"a_"+e,type:"Float32",components:"color"===i?2:1,offset:0})),this.paintVertexArray=new r}populatePaintArray(e,t,i,r,a,n,o){var s=this.paintVertexArray.length,n=this.expression.evaluate(new I(0,{brightness:n}),t,{},a,r,o);this.paintVertexArray.resize(e),this._setPaintValue(s,e,n,this.context)}updatePaintArray(e,t,i,r,a,n,o){o=this.expression.evaluate({zoom:0,brightness:o},i,r,void 0,a);this._setPaintValue(e,t,o,this.context)}_setPaintValue(t,i,r,e){if("color"===this.type){var a=Dl(r.toRenderColor(e.lut));for(let e=t;e`u_${e}_t`),this.type=i,this.useIntegerZoom=r,this.context=a,this.maxValue=0,this.paintVertexAttributes=t.map(e=>({name:"a_"+e,type:"Float32",components:"color"===i?4:2,offset:0})),this.paintVertexArray=new n}populatePaintArray(e,t,i,r,a,n,o){var s=this.expression.evaluate(new I(this.context.zoom,{brightness:n}),t,{},a,r,o),n=this.expression.evaluate(new I(this.context.zoom+1,{brightness:n}),t,{},a,r,o),t=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(t,e,s,n,this.context)}updatePaintArray(e,t,i,r,a,n,o){var s=this.expression.evaluate({zoom:this.context.zoom,brightness:o},i,r,void 0,a),o=this.expression.evaluate({zoom:this.context.zoom+1,brightness:o},i,r,void 0,a);this._setPaintValue(e,t,s,o,this.context)}_setPaintValue(t,i,r,a,e){if("color"===this.type){const a=Dl(r.toRenderColor(e.lut)),n=Dl(r.toRenderColor(e.lut));for(let e=t;e!0){this.binders={},this._buffers=[],this.context=t;const r=[];for(const h in e.paint._values){var a=e.paint.get(h);if(i(h)&&(a instanceof es&&ao(a.property.specification))){n=h,o=e.type;var n=Vl[n]||[n.replace(o+"-","").replace(/-/g,"_")],o=a.value,s=a.property.specification.type,a=!!a.property.useIntegerZoom,l="line-dasharray"===h||h.endsWith("pattern"),c="line-dasharray"===h&&"constant"!==e.layout.get("line-cap").value.kind;if("constant"!==o.kind||c)if("source"===o.kind||c||l){const t=Gl(h,s,"source");this.binders[h]=l?new Bl(o,n,s,t,e.id):new kl(o,n,s,t),r.push("/a_"+h)}else{const e=Gl(h,s,"composite");this.binders[h]=new Ol(o,n,s,a,t,e),r.push("/z_"+h)}else this.binders[h]=l?new Ll(o.value,n):new Rl(o.value,n,s,t),r.push("/u_"+h)}}var n,o;this.cacheKey=r.sort().join("")}getMaxValue(e){e=this.binders[e];return e instanceof kl||e instanceof Ol?e.maxValue:0}populatePaintArrays(e,t,i,r,a,n,o){for(const s in this.binders){const l=this.binders[s];l.context=this.context,(l instanceof kl||l instanceof Ol||l instanceof Bl)&&l.populatePaintArray(e,t,i,r,a,n,o)}}setConstantPatternPositions(e){for(const t in this.binders){const i=this.binders[t];i instanceof Ll&&i.setConstantPatternPositions(e)}}updatePaintArrays(e,t,i,r,a,n,o,s){let l=!1;const c=Object.keys(e),h=0!==c.length,u=h?c:t.uniqueIds;this.context.lut=a.lut;for(const c in this.binders){const p=this.binders[c];if(p.context=this.context,(p instanceof kl||p instanceof Ol||p instanceof Bl)&&(!0===p.expression.isStateDependent||!1===p.expression.isLightConstant)){var d=a.paint.get(c);p.expression=d.value;for(const i of u){const a=e[i.toString()];t.eachPosition(i,(e,t,i)=>{e=r.feature(e);p.updatePaintArray(t,i,e,a,n,o,s)})}if(!h)for(const t of i.uniqueIds){const a=e[t.toString()];i.eachPosition(t,(e,t,i)=>{e=r.feature(e);p.updatePaintArray(t,i,e,a,n,o,s)})}l=!0}}return l}defines(){const e=[];for(const t in this.binders){const i=this.binders[t];(i instanceof Rl||i instanceof Ll)&&e.push(...i.uniformNames.map(e=>"#define HAS_UNIFORM_"+e))}return e}getBinderAttributes(){const t=[];for(const e in this.binders){var i=this.binders[e];if(i instanceof kl||i instanceof Ol||i instanceof Bl)for(let e=0;e!0){this.programConfigurations={};for(const r of e)this.programConfigurations[r.id]=new Fl(r,t,i);this.needsUpload=!1,this._featureMap=new gl,this._featureMapWithoutIds=new gl,this._bufferOffset=0,this._idlessCounter=0}populatePaintArrays(e,t,i,r,a,n,o,s){for(const i in this.programConfigurations)this.programConfigurations[i].populatePaintArrays(e,t,r,a,n,o,s);void 0!==t.id?this._featureMap.add(t.id,i,this._bufferOffset,e):(this._featureMapWithoutIds.add(this._idlessCounter,i,this._bufferOffset,e),this._idlessCounter+=1),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,i,r,a,n){for(const o of i)this.needsUpload=this.programConfigurations[o.id].updatePaintArrays(e,this._featureMap,this._featureMapWithoutIds,t,o,r,a,n||0)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(const t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(const e in this.programConfigurations)this.programConfigurations[e].destroy()}}const Vl={"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-occlusion-opacity":["occlusion_opacity"],"icon-occlusion-opacity":["occlusion_opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-emissive-strength":["emissive_strength"],"icon-emissive-strength":["emissive_strength"],"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","pixel_ratio"],"fill-pattern":["pattern","pixel_ratio"],"fill-extrusion-pattern":["pattern","pixel_ratio"],"line-dasharray":["dash"]};const Ul={"line-pattern":{source:Cs,composite:Cs},"fill-pattern":{source:Cs,composite:Cs},"fill-extrusion-pattern":{source:Cs,composite:Cs},"line-dasharray":{source:Ps,composite:Ps}},jl={color:{source:Hs,composite:Is},number:{source:Gs,composite:Hs}};function Gl(e,t,i){e=Ul[e];return e&&e[i]||jl[t][i]}m(Rl,"ConstantBinder"),m(Ll,"PatternConstantBinder"),m(kl,"SourceExpressionBinder"),m(Bl,"PatternCompositeBinder"),m(Ol,"CompositeExpressionBinder"),m(Fl,"ProgramConfiguration",{omit:["_buffers"]}),m(Nl,"ProgramConfigurationSet");const ql=ue/Math.PI/2,$l=5,Zl=6,Wl=16383,Hl=[64,32,16],Xl=-ql,Yl=ql;function Jl(e,t,i,r=ql){return i=x(i),[e*Math.sin(i)*r,-t*r,e*Math.cos(i)*r]}function Kl(e,t,i){return Jl(Math.cos(x(e)),Math.sin(x(e)),t,i)}const Ql=6371008.8,ec=2*Math.PI*Ql;class M{constructor(e,t){if(isNaN(e)||isNaN(t))throw new Error(`Invalid LngLat object: (${e}, ${t})`);if(this.lng=+e,this.lat=+t,90, lat: }, an object {lon: , lat: }, or an array of [, ]");return new M(Number("lng"in e?e.lng:e.lon),Number(e.lat))}}class tc{constructor(e,t){if(e)if(t)this.setSouthWest(e).setNorthEast(t);else if(4===e.length){const t=e;this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]])}else{const t=e;this.setSouthWest(t[0]).setNorthEast(t[1])}}setNorthEast(e){return this._ne=e instanceof M?new M(e.lng,e.lat):M.convert(e),this}setSouthWest(e){return this._sw=e instanceof M?new M(e.lng,e.lat):M.convert(e),this}extend(e){const t=this._sw,i=this._ne;let r,a;if(e instanceof M)r=e,a=e;else{if(!(e instanceof tc))return Array.isArray(e)?4===e.length||e.every(Array.isArray)?this.extend(tc.convert(e)):this.extend(M.convert(e)):"object"==typeof e&&null!==e&&e.hasOwnProperty("lat")&&(e.hasOwnProperty("lon")||e.hasOwnProperty("lng"))?this.extend(M.convert(e)):this;if(r=e._sw,a=e._ne,!r||!a)return this}return t||i?(t.lng=Math.min(r.lng,t.lng),t.lat=Math.min(r.lat,t.lat),i.lng=Math.max(a.lng,i.lng),i.lat=Math.max(a.lat,i.lat)):(this._sw=new M(r.lng,r.lat),this._ne=new M(a.lng,a.lat)),this}getCenter(){return new M((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new M(this.getWest(),this.getNorth())}getSouthEast(){return new M(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(e){var{lng:e,lat:t}=M.convert(e);let i=this._sw.lng<=e&&e<=this._ne.lng;return this._sw.lng>this._ne.lng&&(i=this._sw.lng>=e&&e>=this._ne.lng),this._sw.lat<=t&&t<=this._ne.lat&&i}static convert(e){return!e||e instanceof tc?e:new tc(e)}}a={};function ic(e,t,i){var r=rc(256*e,256*(t=Math.pow(2,i)-t-1),i),e=rc(256*(e+1),256*(t+1),i);return r[0]+","+r[1]+","+e[0]+","+e[1]}function rc(e,t,i){i=2*Math.PI*6378137/256/Math.pow(2,i);return[e*i-2*Math.PI*6378137/2,t*i-2*Math.PI*6378137/2]}(l=a).getURL=function(e,t,i,r,a,n){return n=n||{},e+"?"+["bbox="+ic(i,r,a),"format="+(n.format||"image/png"),"service="+(n.service||"WMS"),"version="+(n.version||"1.1.1"),"request="+(n.request||"GetMap"),"srs="+(n.srs||"EPSG:3857"),"width="+(n.width||256),"height="+(n.height||256),"layers="+t].join("&")},l.getTileBBox=ic,l.getMercCoords=rc,Object.defineProperty(l,"__esModule",{value:!0});var ac=a;class nc{constructor(e,t,i){this.z=e,this.x=t,this.y=i,this.key=lc(0,e,e,t,i)}equals(e){return this.z===e.z&&this.x===e.x&&this.y===e.y}url(e,t){var i=ac.getTileBBox(this.x,this.y,this.z),r=function(t,i,r){let a,n="";for(let e=t;0this.canonical.z?new sc(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new sc(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)}calculateScaledKey(e,t=!0){if(this.overscaledZ===e&&t)return this.key;if(e>this.canonical.z)return lc(this.wrap*+t,e,this.canonical.z,this.canonical.x,this.canonical.y);var i=this.canonical.z-e;return lc(this.wrap*+t,e,e,this.canonical.x>>i,this.canonical.y>>i)}isChildOf(e){if(e.wrap!==this.wrap)return!1;var t=this.canonical.z-e.canonical.z;return 0===e.overscaledZ||e.overscaledZ>t&&e.canonical.y===this.canonical.y>>t}children(e){if(this.overscaledZ>=e)return[new sc(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,t=2*this.canonical.x,i=2*this.canonical.y;return[new sc(e,this.wrap,e,t,i),new sc(e,this.wrap,e,1+t,i),new sc(e,this.wrap,e,t,1+i),new sc(e,this.wrap,e,1+t,1+i)]}isLessThan(e){return this.wrape.wrap)&&(this.overscaledZe.overscaledZ)&&(this.canonical.xe.canonical.x)&&this.canonical.y{let t=e.canonical.x-1,i=e.wrap;return t<0&&(t=(1<{let t=e.canonical.x+1,i=e.wrap;return t===1<new sc(e.overscaledZ,e.wrap,e.canonical.z,e.canonical.x,(0===e.canonical.y?1<new sc(e.overscaledZ,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y===(1<=c?(e(t,i,r,_,g,o,y,l,c),e(t,_,g,a,n,y,s,l,c)):t.push(s)}(s,n,o,c,h,a,l,i,r),n=c,o=h,a=l}return s}function Sc(t,i){let r=t[0];var a=[r];for(let e=1;e{var t=mc((r.x+e.x/n)/o),i=_c((r.y+e.y/n)/o),t=d.project(t,i);e.x=(t.x*c-h)*n,e.y=(t.y*c-u)*n};for(let e=0;e=n||i.y<0||i.y>=n||(p(i),t.push(i));a[e]=t}}for(const t of a)for(const r of t)e=r,s=o,l=void 0,l=Math.round(e.x*s),s=Math.round(e.y*s),e.x=S(l,Ic,Mc),e.y=S(s,Ic,Mc),(le.x+1||se.y+1)&&fi("Geometry exceeds allowed extent, reduce your vector tile buffer size");var e,s,l;return a}function Cc(e,t){return{type:e.type,id:e.id,properties:e.properties,geometry:t?Ac(e):[]}}function Pc(e,t,i,r,a){e.emplaceBack(2*t+(r+1)/2,2*i+(a+1)/2)}function zc(e,t,i){e.emplaceBack(t.x,t.y,t.z,16384*i[0],16384*i[1],16384*i[2])}class Dc{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.fqid),this.index=e.index,this.hasPattern=!1,this.projection=e.projection,this.layoutVertexArray=new ws,this.indexArray=new Vs,this.segments=new R,this.programConfigurations=new Nl(e.layers,{zoom:e.zoom,lut:e.lut}),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}updateFootprints(e,t){}populate(e,t,i,r){const a=this.layers[0],n=[];let o=null;"circle"===a.type&&(o=a.layout.get("circle-sort-key"));for(const{feature:t,id:a,index:l,sourceLayerIndex:c}of e){const e=this.layers[0]._featureFilter.needGeometry,h=Cc(t,e);var s;this.layers[0]._featureFilter.filter(new I(this.zoom),h,i)&&(s=o?o.evaluate(h,{},i):void 0,s={id:a,properties:t.properties,type:t.type,sourceLayerIndex:c,index:l,geometry:e?h.geometry:Ac(t,i,r),patterns:{},sortKey:s},n.push(s))}o&&n.sort((e,t)=>e.sortKey-t.sortKey);let l=null;"globe"===r.projection.name&&(this.globeExtVertexArray=new zs,l=r.projection);for(const r of n){const{geometry:a,index:n,sourceLayerIndex:o}=r,u=e[n].feature;this.addFeature(r,a,n,t.availableImages,i,l,t.brightness),t.featureIndex.insert(u,a,n,o,this.index)}}update(e,t,i,r,a){var n=0!==Object.keys(e).length;n&&!this.stateDependentLayers.length||this.programConfigurations.updatePaintArrays(e,t,n?this.stateDependentLayers:this.layers,i,r,a)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,dl.members),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.globeExtVertexArray&&(this.globeExtVertexBuffer=e.createVertexBuffer(this.globeExtVertexArray,pl.members))),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.globeExtVertexBuffer&&this.globeExtVertexBuffer.destroy())}addFeature(e,t,i,r,a,n,o){for(const i of t)for(const t of i){const i=t.x,r=t.y;if(!(i<0||i>=ue||r<0||r>=ue)){if(n){const e=n.projectTilePoint(i,r,a),t=n.upVector(a,i,r),o=this.globeExtVertexArray;zc(o,e,t),zc(o,e,t),zc(o,e,t),zc(o,e,t)}const o=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),s=o.vertexLength;Pc(this.layoutVertexArray,i,r,-1,-1),Pc(this.layoutVertexArray,i,r,1,-1),Pc(this.layoutVertexArray,i,r,1,1),Pc(this.layoutVertexArray,i,r,-1,1),this.indexArray.emplaceBack(s,s+1,s+2),this.indexArray.emplaceBack(s,s+2,s+3),o.vertexLength+=4,o.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,i,{},r,a,o)}}function Rc(t,i){for(let e=0;ea.y!=s.y>a.y&&a.x<(s.x-o.x)*(a.y-o.y)/(s.y-o.y)+o.x&&(l=!l);return l}function Nc(i,r){let a=!1;for(let e=0,t=i.length-1;er.y!=o.y>r.y&&r.x<(o.x-n.x)*(r.y-n.y)/(o.y-n.y)+n.x&&(a=!a)}return a}function Vc(t,e,i,r,a){for(const n of t)if(e<=n.x&&i<=n.y&&r>=n.x&&a>=n.y)return!0;const n=[new G(e,i),new G(e,a),new G(r,a),new G(r,i)];if(2a.x&&t.x>a.x||e.ya.y&&t.y>a.y)return;r=mi(e,t,i[0]);return r!==mi(e,t,i[1])||r!==mi(e,t,i[2])||r!==mi(e,t,i[3])}(t[e],t[e+1],n))return!0;return!1}function Uc(e,t,i,r,a,n){let o=t.y-e.y,s=e.x-t.x;if(n=n||0){const e=o*o+s*s;if(0==e)return 1;const t=Math.sqrt(e);o/=t,s/=t}return!((i.x-e.x)*o+(i.y-e.y)*s-n<0||(r.x-e.x)*o+(r.y-e.y)*s-n<0||(a.x-e.x)*o+(a.y-e.y)*s-n<0)}function jc(e,t,i,r,a,n,o){return!(Uc(e,t,r,a,n,o)||Uc(t,i,r,a,n,o)||Uc(i,e,r,a,n,o)||Uc(r,a,e,t,i,o)||Uc(a,n,e,t,i,o)||Uc(n,r,e,t,i,o))}function Gc(e,t,i){var r=t.paint.get(e).value;return"constant"===r.kind?r.value:i.programConfigurations.get(t.id).getMaxValue(e)}function qc(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function $c(t,e,i,r,a){if(!e[0]&&!e[1])return t;const n=G.convert(e)._mult(a),o=("viewport"===i&&n._rotate(-r),[]);for(let e=0;ei[1])return 0}return 1}function Qc(t,i){let r=0;const a=[0,0,0,0];for(let e=0;et.max[e]||t.min[e]>this.max[e])return!1;return!0}intersectsAabbXY(e){return!(this.min[0]>e.max[0]||e.min[0]>this.max[0]||this.min[1]>e.max[1]||e.min[1]>this.max[1])}encapsulate(t){for(let e=0;e<3;e++)this.min[e]=Math.min(this.min[e],t.min[e]),this.max[e]=Math.max(this.max[e],t.max[e])}encapsulatePoint(t){for(let e=0;e<3;e++)this.min[e]=Math.min(this.min[e],t[e]),this.max[e]=Math.max(this.max[e],t[e])}closestPoint(e){return[Math.max(Math.min(this.max[0],e[0]),this.min[0]),Math.max(Math.min(this.max[1],e[1]),this.min[1]),Math.max(Math.min(this.max[2],e[2]),this.min[2])]}}m(A,"Aabb");const eh=E([{type:"Float32",name:"a_globe_pos",components:3},{type:"Float32",name:"a_uv",components:2}]),th=eh["members"],ih=E([{name:"a_pos_3",components:3,type:"Int16"}]);var rh=E([{name:"a_pos",type:"Int16",components:2}]);function ah(e){return e*ql/Ql}const nh=[new A([Xl,Xl,Xl],[Yl,Yl,Yl]),new A([Xl,Xl,Xl],[0,0,Yl]),new A([0,Xl,Xl],[Yl,0,Yl]),new A([Xl,0,Xl],[0,Yl,Yl]),new A([0,0,Xl],[Yl,Yl,Yl])];function oh(e,t,i,r=!0){var a=Te.$.scale([],e._camera.position,e.worldSize),t=[t,i,1,1],i=(Te.aB.transformMat4(t,t,e.pixelMatrixInverse),Te.aB.scale(t,t,1/t[3]),Te.$.sub([],t,a)),i=Te.$.normalize([],i),t=e.globeMatrix,n=[t[12],t[13],t[14]],o=Te.$.sub([],n,a),s=Te.$.length(o),l=Te.$.normalize([],o),c=e.worldSize/(2*Math.PI),l=Te.$.dot(l,i),h=Math.asin(c/s);if(hMath.abs(u))_=0<=m?1:3;else{_=0<=u?0:2;const e=[n[4]*a,n[5]*a,n[6]*a],t=-Math.sin(x(0<=u?o.getSouth():o.getNorth()))*ql;Te.$.scaleAndAdd(r,r,e,t)}var p=s[_],u=s[(_+1)%4],r=new sh(p,u,r),g=[lh(r,0)||p[0],lh(r,1)||p[1],lh(r,2)||p[2]],y=Eh(e.zoom);if(0Math.PI/2*1.01}const Ih=85*Zt,Ah=Math.cos(Ih),Ch=Math.sin(Ih),Ph=Te.ae.create(),zh=e=>{const t=[];return"map"===e.paint.get("circle-pitch-alignment")&&t.push("PITCH_WITH_MAP"),"map"===e.paint.get("circle-pitch-scale")&&t.push("SCALE_WITH_MAP"),t};function Dh(e,t,i,r,a,n,o,s,l){if(n&&e.queryGeometry.isAboveHorizon)return!1;n&&(l*=e.pixelToTileUnitsFactor);var c=e.tileID.canonical,h=i.projection.upVectorScale(c,i.center.lat,i.worldSize).metersToTile;for(const f of t)for(const t of f){const m=t.add(s),_=a&&i.elevation?i.elevation.exaggeration()*a.getElevationAt(m.x,m.y,!0):0,g=i.projection.projectTilePoint(m.x,m.y,c);if(0<_){const Te=i.projection.upVector(c,m.x,m.y);g.x+=Te[0]*h*_,g.y+=Te[1]*h*_,g.z+=Te[2]*h*_}var u=n?m:function(e,t,i,r){e=Te.aB.transformMat4([],[e,t,i,1],r);return new G(e[0]/e[3],e[1]/e[3])}(g.x,g.y,g.z,r),d=n?e.tilespaceRays.map(e=>{var t=_,i=Te.$.create();return Rh[2]=t,e.intersectsPlane(Rh,Lh,i),new G(i[0],i[1])}):e.queryGeometry.screenGeometry,p=Te.aB.transformMat4([],[g.x,g.y,g.z,1],r);if(!o&&n?l*=p[3]/i.cameraToCenterDistance:o&&!n&&(l*=i.cameraToCenterDistance/p[3]),n){const Te=_c((t.y/ue+c.y)/(1<t.width||n.height>t.height||r.x>t.width-n.width||r.y>t.height-n.height)throw new RangeError("out of range source coordinates for image copy");if(n.width>i.width||n.height>i.height||a.x>i.width-n.width||a.y>i.height-n.height)throw new RangeError("out of range destination coordinates for image copy");const h=t.data,u=i.data,d=4===o&&e;for(let e=0;e{r[a.evaluationKey]=i;i=a.expression.evaluate(r);i&&(o.data[e+t+0]=Math.floor(255*i.r/i.a),o.data[e+t+1]=Math.floor(255*i.g/i.a),o.data[e+t+2]=Math.floor(255*i.b/i.a),o.data[e+t+3]=Math.floor(255*i.a))};if(a.clips)for(let i=0,r=0;i=i.next.y&&i.next.y!==i.y){const e=i.x+(a-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(e<=r&&e>o&&(o=e,n=i.x=i.x&&i.x>=h&&r!==i.x&&tu(an.x||i.x===n.x&&(s=n,l=i,iu(s.prev,s,l.prev)<0&&iu(l.next,s,s.next)<0)))&&(n=i,d=t)}}while((i=i.next)!==c);return n}(e,t);if(!i)return t;t=lu(i,e);return Jh(t,t.next),Jh(i,i.next)}(n[e],t);return t}(r,e,i,a)),r.length>80*a){s=1/0,l=1/0;let t=-1/0,i=-1/0;for(let e=a;et&&(t=a),n>i&&(i=n)}c=0!==(c=Math.max(t-s,i-l))?32767/c:0}return Kh(i,o,a,s,l,c,0),o}function Yh(t,o,i,r,e){let a;if(e===0=o;e-=r)a=cu(e/r|0,t[e],t[e+1],a);return a&&ru(a,a.next)&&(hu(a),a=a.next),a}function Jh(e,t){if(!e)return e;t=t||e;let i,r=e;do{if(i=!1,r.steiner||!ru(r,r.next)&&0!==iu(r.prev,r,r.next))r=r.next;else{if(hu(r),(r=t=r.prev)===r.next)break;i=!0}}while(i||r!==t);return t}function Kh(t,i,r,a,n,o,s){if(t){if(!s&&o){var l=t;var c=a;var h=n;var u=o;let e=l;for(;0===e.z&&(e.z=eu(e.x,e.y,c,h,u)),e.prevZ=e.prev,e.nextZ=e.next,(e=e.next)!==l;);e.prevZ.nextZ=null,e.prevZ=null;{var d=e;let o,s=1;do{let r,a=d,n=d=null;for(o=0;a;){o++;let t=a,i=0;for(let e=0;e=g&&v&&v.z<=y;){if(x.x>=p&&x.x<=m&&x.y>=f&&x.y<=_&&x!==a&&x!==o&&tu(s,h,l,u,c,d,x.x,x.y)&&0<=iu(x.prev,x,x.next))return;if(x=x.prevZ,v.x>=p&&v.x<=m&&v.y>=f&&v.y<=_&&v!==a&&v!==o&&tu(s,h,l,u,c,d,v.x,v.y)&&0<=iu(v.prev,v,v.next))return;v=v.nextZ}for(;x&&x.z>=g;){if(x.x>=p&&x.x<=m&&x.y>=f&&x.y<=_&&x!==a&&x!==o&&tu(s,h,l,u,c,d,x.x,x.y)&&0<=iu(x.prev,x,x.next))return;x=x.prevZ}for(;v&&v.z<=y;){if(v.x>=p&&v.x<=m&&v.y>=f&&v.y<=_&&v!==a&&v!==o&&tu(s,h,l,u,c,d,v.x,v.y)&&0<=iu(v.prev,v,v.next))return;v=v.nextZ}return 1}(t,a,n,o):function(e){var t=e.prev,i=e,e=e.next;if(0<=iu(t,i,e))return;var r=t.x,a=i.x,n=e.x,o=t.y,s=i.y,l=e.y,c=r=c&&p.x<=u&&p.y>=h&&p.y<=d&&tu(r,o,a,s,n,l,p.x,p.y)&&0<=iu(p.prev,p,p.next))return;p=p.next}return 1}(t))i.push(p.i,t.i,f.i),hu(t),t=f.next,e=f.next;else if((t=f)===e){s?1===s?Kh(t=function(e,t){let i=e;do{var r=i.prev,a=i.next.next;!ru(r,a)&&au(r,i,i.next,a)&&su(r,a)&&su(a,r)&&(t.push(r.i,i.i,a.i),hu(i),hu(i.next),i=e=a),i=i.next}while(i!==e);return Jh(i)}(Jh(t),i),i,r,a,n,o,2):2===s&&function(e,t,i,r,a,n){let o=e;do{let e=o.next.next;for(;e!==o.prev;){var s;if(o.i!==e.i&&function(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let i=e;do{if(i.i!==e.i&&i.next.i!==e.i&&i.i!==t.i&&i.next.i!==t.i&&au(i,i.next,e,t))return 1}while((i=i.next)!==e)}(e,t)&&(su(e,t)&&su(t,e)&&function(e,t){let i=e,r=!1;for(var a=(e.x+t.x)/2,n=(e.y+t.y)/2;i.y>n!=i.next.y>n&&i.next.y!==i.y&&a<(i.next.x-i.x)*(n-i.y)/(i.next.y-i.y)+i.x&&(r=!r),(i=i.next)!==e;);return r}(e,t)&&(iu(e.prev,e,t.prev)||iu(e,t.prev,t))||ru(e,t)&&0=Math.min(e.x,i.x)&&t.y<=Math.max(e.y,i.y)&&t.y>=Math.min(e.y,i.y)}function ou(e){return 0e.fqid),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new ws,this.indexArray=new Vs,this.indexArray2=new ks,this.programConfigurations=new Nl(e.layers,{zoom:e.zoom,lut:e.lut}),this.segments=new R,this.segments2=new R,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id),this.projection=e.projection}updateFootprints(e,t){}populate(e,t,i,r){this.hasPattern=fu("fill",this.layers,t);const a=this.layers[0].layout.get("fill-sort-key"),n=[];for(var{feature:o,id:s,index:l,sourceLayerIndex:c}of e){const e=this.layers[0]._featureFilter.needGeometry,u=Cc(o,e);var h;this.layers[0]._featureFilter.filter(new I(this.zoom),u,i)&&(h=a?a.evaluate(u,{},i,t.availableImages):void 0,s={id:s,properties:o.properties,type:o.type,sourceLayerIndex:c,index:l,geometry:e?u.geometry:Ac(o,i,r),patterns:{},sortKey:h},n.push(s))}a&&n.sort((e,t)=>e.sortKey-t.sortKey);for(const r of n){const{geometry:a,index:n,sourceLayerIndex:d}=r;if(this.hasPattern){const e=mu("fill",this.layers,r,this.zoom,t);this.patternFeatures.push(e)}else this.addFeature(r,a,n,i,{},t.availableImages,t.brightness);t.featureIndex.insert(e[n].feature,a,n,d,this.index)}}update(e,t,i,r,a){var n=0!==Object.keys(e).length;n&&!this.stateDependentLayers.length||this.programConfigurations.updatePaintArrays(e,t,n?this.stateDependentLayers:this.layers,i,r,a)}addFeatures(e,t,i,r,a,n){for(const e of this.patternFeatures)this.addFeature(e,e.geometry,e.index,t,i,r,n)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Hh),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(t,i,r,a,n,o=[],s){for(const t of du(i,500)){let e=0;for(const r of t)e+=r.length;const r=this.segments.prepareSegment(e,this.layoutVertexArray,this.indexArray),a=r.vertexLength,n=[],o=[];for(const i of t)if(0!==i.length){i!==t[0]&&o.push(n.length/2);const r=this.segments2.prepareSegment(i.length,this.layoutVertexArray,this.indexArray2),a=r.vertexLength;this.layoutVertexArray.emplaceBack(i[0].x,i[0].y),this.indexArray2.emplaceBack(a+i.length-1,a),n.push(i[0].x),n.push(i[0].y);for(let e=1;ee.cellIdx-t.cellIdx||e.triIdx-t.triIdx);let e=0;for(;ethis.max.x||this.min.x>e.x||e.y>this.max.y||this.min.y>e.y)){const i=wu(e.x-this.min.x,this.xScale,this.cellsX),r=wu(e.y-this.min.y,this.yScale,this.cellsY),a=this.cells[r*this.cellsX+i];if(a){this._lazyInitLookup();for(let e=0;ethis.max.x||this.min.x>i.x||e.y>this.max.y||this.min.y>i.y)){this._lazyInitLookup();const a=wu(e.x-this.min.x,this.xScale,this.cellsX),n=wu(i.x-this.min.x,this.xScale,this.cellsX),o=wu(e.y-this.min.y,this.yScale,this.cellsY),s=wu(i.y-this.min.y,this.yScale,this.cellsY);for(let t=o;t<=s;t++)for(let e=a;e<=n;e++){const a=this.cells[t*this.cellsX+e];if(a)for(let e=0;ee.fqid),this.index=e.index,this.hasPattern=!1,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id),this.footprints=[]}updateFootprints(e,t){for(const i of this.footprints)t.push({footprint:i,id:e})}populate(e,t,i,r){const a=[];for(const{feature:t,id:o,index:s,sourceLayerIndex:l}of e){const e=this.layers[0]._featureFilter.needGeometry,c=Cc(t,e);var n;this.layers[0]._featureFilter.filter(new I(this.zoom),c,i)&&(n={id:o,properties:t.properties,type:t.type,sourceLayerIndex:l,index:s,geometry:e?c.geometry:Ac(t,i,r),patterns:{}},a.push(n))}for(const r of a){const{geometry:a,index:h,sourceLayerIndex:u}=r;this.addFeature(r,a,h,i,{},t.availableImages,t.brightness),t.featureIndex.insert(e[h].feature,a,h,u,this.index)}}isEmpty(){return 0===this.footprints.length}uploadPending(){return!1}upload(e){}update(e,t,i,r,a){}destroy(){}addFeature(e,t,i,r,a,n=0,o){for(const e of du(t,2)){const t=[],i=[],r=[],a=new G(1/0,1/0),n=new G(-1/0,-1/0);for(const o of e)if(0!==o.length){o!==e[0]&&r.push(i.length/2);for(let e=0;e>3),n--,1===a||2===a)o+=e.readSVarint(),s+=e.readSVarint(),1===a&&(t&&l.push(t),t=[]),t.push(new zu(o,s));else{if(7!==a)throw new Error("unknown command "+a);t&&t.push(t[0].clone())}return t&&l.push(t),l},Du.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t,i=e.readVarint()+e.pos,r=1,a=0,n=0,o=0,s=1/0,l=-1/0,c=1/0,h=-1/0;e.pos>3),a--,1===r||2===r)(n+=e.readSVarint())>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}(i))}ku.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];e=this._pbf.readVarint()+this._pbf.pos;return new Lu(this._pbf,e,this.extent,this._keys,this._values)};var Bu=s;function Fu(e,t,i){3===e&&(e=new Bu(i,i.readVarint()+i.pos)).length&&(t[e.name]=e)}var Nu=c.VectorTile=function(e,t){this.layers=e.readFields(Fu,{},t)},r=c.VectorTileFeature=n;c.VectorTileLayer=s;class Vu extends G{constructor(e,t,i){super(e,t),this.z=i}}class Uu extends Vu{constructor(e,t,i,r){super(e,t,i),this.w=r}}function ju(t,i,r,a){const n=[],o=0===a?(e,t,i,r,a,n)=>{e.push(new G(n,i+(n-t)/(r-t)*(a-i)))}:(e,t,i,r,a,n)=>{e.push(new G(t+(n-i)/(a-i)*(r-t),n))};for(const e of t){const t=[];for(const n of e)if(!(n.length<=2)){const f=[];for(let e=0;e=t[a]&&(e=r,t=i),e[a]n&&Gu(e,t,a,n),e[a]o&&Gu(t,e,a,o)}}const $u=Number.MAX_SAFE_INTEGER;function Zu(e,t,i,r){return e.ordere===a));var a}function Wu(e,t){return e.x-t.x||e.y-t.y}function Hu(e,t){return 0===Wu(e.min,t.min)&&0===Wu(e.max,t.max)}function Xu(e,t){return!(e.min.x>t.max.x||e.max.xt.max.y||e.max.ya[i])return null}else{var c=1/o[i];let e=(r[i]-n[i])*c,t=(a[i]-n[i])*c;if(e>t){const r=e;e=t,t=r}if(e>s&&(s=e),tl)return null}return s}function rd(e,t,i,r,a,n,o,s,l,c,h){var r=r-e,a=a-t,n=n-i,o=o-e,s=s-t,l=l-i,u=h[1]*l-h[2]*s,d=h[2]*o-h[0]*l,p=h[0]*s-h[1]*o,f=r*u+a*d+n*p;if(Math.abs(f)<1e-15)return null;f=1/f,e=c[0]-e,t=c[1]-t,c=c[2]-i,i=(e*u+t*d+c*p)*f;if(i<0||1{var r=r?1:0,n=(e+1)*i-r,o=t*i,t=(t+1)*i-r;a[0]=e*i,a[1]=o,a[2]=n,a[3]=t};let o=new td(r);var s=[];for(let e=0;e=a[2])return i}}else{let r=0;for(let i=0;i=h[u[e]]&&(u.splice(e,0,i),t=!0);t||(u[r]=i),r++}}for(let e=0;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)}static pack(e,t){const i=[0,0,0,0],r=dd.getUnpackVector(t);t=Math.floor((e+r[3])/r[2]);return i[2]=t%256,t=Math.floor(t/256),i[1]=t%256,t=Math.floor(t/256),i[0]=t,i}getPixels(){return new Uh({width:this.stride,height:this.stride},this.pixels)}backfillBorder(i,e,t){if(this.dim!==i.dim)throw new Error("dem dimension mismatch");let r=e*this.dim,a=e*this.dim+this.dim,n=t*this.dim,o=t*this.dim+this.dim;switch(e){case-1:r=a-1;break;case 1:a=r+1}switch(t){case-1:n=o-1;break;case 1:o=n+1}var s=-e*this.dim,l=-t*this.dim;for(let t=n;te.max.x&&(e.max.x=t.x,r=!0),t.ye.max.y&&(e.max.y=t.y,r=!0),((0===t.x||t.x===ue)&&t.x===i.x)!=((0===t.y||t.y===ue)&&t.y===i.y)&&this.processBorderOverlap(t,i),r&&this.checkBorderIntersection(t,i)}checkBorderIntersection(e,t){t.x<0!=e.x<0&&this.addBorderIntersection(0,b(t.y,e.y,(0-t.x)/(e.x-t.x))),t.x>ue!=e.x>ue&&this.addBorderIntersection(1,b(t.y,e.y,(ue-t.x)/(e.x-t.x))),t.y<0!=e.y<0&&this.addBorderIntersection(2,b(t.x,e.x,(0-t.y)/(e.y-t.y))),t.y>ue!=e.y>ue&&this.addBorderIntersection(3,b(t.x,e.x,(ue-t.y)/(e.y-t.y)))}addBorderIntersection(e,t){this.borders||(this.borders=[[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE]]);const i=this.borders[e];ti[1]&&(i[1]=t)}processBorderOverlap(e,t){var i;e.x===t.x?e.y!==t.y&&(i=0===e.x?0:1,this.addBorderIntersection(i,t.y),this.addBorderIntersection(i,e.y)):(i=0===e.y?2:3,this.addBorderIntersection(i,t.x),this.addBorderIntersection(i,e.x))}centroid(){return 0===this.accCount?new G(0,0):new G(Math.floor(Math.max(0,this.acc.x)/this.accCount),Math.floor(Math.max(0,this.acc.y)/this.accCount))}intersectsCount(){return this.borders?this.borders.reduce((e,t)=>e+ +(t[0]!==Number.MAX_VALUE),0):0}}function Cd(e,t){var i=e.add(t)._unit(),i=S(e.x*i.x+e.y*i.y,-1,1),i=Math.acos(i);return Math.min(4,Math.max(-4,Math.tan(i)))/4*xd*(e.x*t.y-e.y*t.x<0?-1:1)}const Pd=[e=>e.x<0,e=>e.x>ue,e=>e.y<0,e=>e.y>ue];class zd{constructor(e){this.vertexArray=new Ss,this.indexArray=new Vs,this.programConfigurations=new Nl(e.layers,{zoom:e.zoom,lut:e.lut},e=>gd.includes(e)),this._segments=new R,this.hiddenByLandmarkVertexArray=new Ks,this._segmentToGroundQuads={},this._segmentToGroundQuads[0]=[],this._segmentToRegionTriCounts={},this._segmentToRegionTriCounts[0]=[0,0,0,0,0],this.regionSegments={},this.regionSegments[4]=new R}getDefaultSegment(){return this.regionSegments[4]}hasData(){return 0!==this.vertexArray.length}addData(r,a,n,o=!1){var s=r.length;if(2e.region-t.region);for(let e=0;ee+t,0);let i=0;for(let t=0;t<=4;t++){const n=s[t];if(0!==n){let e=this.regionSegments[t];e=e||(this.regionSegments[t]=new R);var r={vertexOffset:o.vertexOffset,primitiveOffset:o.primitiveOffset+i,vertexLength:o.vertexLength,primitiveLength:n};e.get().push(r)}i+=n}for(let e=0;ee.fqid),this.index=e.index,this.hasPattern=!1,this.edgeRadius=0,this.projection=e.projection,this.activeReplacements=[],this.replacementUpdateTime=0,this.centroidData=[],this.footprintIndices=new Vs,this.footprintVertices=new ws,this.footprintSegments=[],this.layoutVertexArray=new Es,this.centroidVertexArray=new cl,this.wallVertexArray=new ul,this.indexArray=new Vs,this.programConfigurations=new Nl(e.layers,{zoom:e.zoom,lut:e.lut},e=>_d.includes(e)),this.segments=new R,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id),this.groundEffect=new zd(e),this.maxHeight=0,this.partLookup={},this.triangleSubSegments=[],this.polygonSegments=[]}updateFootprints(e,t){}populate(e,t,i,r){this.features=[],this.hasPattern=fu("fill-extrusion",this.layers,t),this.featuresOnBorder=[],this.borderFeatureIndices=[[],[],[],[]],this.borderDoneWithNeighborZ=[-1,-1,-1,-1],this.tileToMeter=wc(i),this.edgeRadius=this.layers[0].layout.get("fill-extrusion-edge-radius")/this.tileToMeter,this.wallMode=0!==this.layers[0].paint.get("fill-extrusion-line-width").constantOr(1);for(var{feature:a,id:n,index:o,sourceLayerIndex:s}of e){const e=this.layers[0]._featureFilter.needGeometry,c=Cc(a,e);if(this.layers[0]._featureFilter.filter(new I(this.zoom),c,i)){var l={id:n,sourceLayerIndex:s,index:o,geometry:e?c.geometry:Ac(a,i,r),properties:a.properties,type:a.type,patterns:{}},n=this.layoutVertexArray.length;if(this.hasPattern)this.features.push(mu("fill-extrusion",this.layers,l,this.zoom,t));else if(this.wallMode)for(const e of l.geometry)this.addFeature(l,[e],o,i,{},t.availableImages,r,t.brightness);else this.addFeature(l,l.geometry,o,i,{},t.availableImages,r,t.brightness);t.featureIndex.insert(a,l.geometry,o,s,this.index,n)}}this.sortBorders(),"mercator"===this.projection.name&&this.splitToSubtiles(),this.groundEffect.prepareBorderSegments(),this.polygonSegments.length=0}addFeatures(e,t,i,r,a,n){for(const e of this.features){var o=e["geometry"];if(this.wallMode)for(const s of o)this.addFeature(e,[s],e.index,t,i,r,a,n);else this.addFeature(e,o,e.index,t,i,r,a,n)}this.sortBorders(),"mercator"===this.projection.name&&this.splitToSubtiles()}update(e,t,i,r,a){var n=0!==Object.keys(e).length;n&&!this.stateDependentLayers.length||(n=n?this.stateDependentLayers:this.layers,this.programConfigurations.updatePaintArrays(e,t,n,i,r,a),this.groundEffect.update(e,t,n,i,r,a))}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload||this.groundEffect.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Pu),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.wallVertexBuffer=e.createVertexBuffer(this.wallVertexArray,Iu.members),this.layoutVertexExtArray&&(this.layoutVertexExtBuffer=e.createVertexBuffer(this.layoutVertexExtArray,Cu.members,!0)),this.groundEffect.upload(e)),this.groundEffect.uploadPaintProperties(e),this.programConfigurations.upload(e),this.uploaded=!0}uploadCentroid(e){this.groundEffect.uploadHiddenByLandmark(e),this.needsCentroidUpdate&&(!this.centroidVertexBuffer&&0{const a=new G(e.x,e.y),n=new G(e.x,e.y);a.x-=t.x*r,a.y-=t.y*r,n.x-=t.x*Math.max(i,1),n.y-=t.y*Math.max(i,1),l.push(t),o.push(a),s.push(n)};if("miter"===(e="miter"===e&&2e<(t.length-1)/2||e===t.length-1,t=this.wallMode?[d]:du(d,500);for(let e=t.length-1;0<=e;e--){const d=t[e];(0===d.length||(i=d[0]).every(e=>e.x<=0)||i.every(e=>e.x>=ue)||i.every(e=>e.y<=0)||i.every(e=>e.y>=ue))&&t.splice(e,1)}var i;let e;if(v)e=Vd(t,a,f);else{e=[];for(const u of t)e.push({polygon:u,bounds:a})}var A,C,P,z,D,R,L=b?this.edgeRadius:0,n=0{if(0===e.length)return!1;e=e[e.length-1];return t.x===e.x&&t.y===e.y};for(const{polygon:u,bounds:d}of e){let h=0,e=0;for(const d of u)b&&!d[0].equals(d[d.length-1])&&d.push(d[0]),e+=b?d.length-1:d.length;const _=this.segments.prepareSegment((b?5:4)*e,this.layoutVertexArray,this.indexArray),g=(T.footprintSegIdx<0&&(T.footprintSegIdx=this.footprintSegments.length),T.polygonSegIdx<0&&(T.polygonSegIdx=this.polygonSegments.length),{triangleArrayOffset:this.indexArray.length,triangleCount:0,triangleSegIdx:this.segments.segments.length-1}),r=new Md;if(r.vertexOffset=this.footprintVertices.length,r.indexOffset=3*this.footprintIndices.length,r.ringIndices=[],b){const m=[],g=[];h=_.vertexLength;for(let e=0;ethis.featuresOnBorder[e].borders[i][0]-this.featuresOnBorder[t].borders[i][0])}splitToSubtiles(){const a=[];for(let t=0;tue),l=2*s+(+(o.min.x+o.max.x>ue)^s);for(let e=0;ee.triangleSegmentIdx===t.triangleSegmentIdx?e.subtile-t.subtile:e.triangleSegmentIdx-t.triangleSegmentIdx);let o=0,s=0,l=0;for(const n of a){if(n.triangleSegmentIdx!==o)break;l++}const c=a.length;for(;s!==a.length;){o=a[s].triangleSegmentIdx;let t=0,i=s,r=s;for(let e=i;e[e[0]*(1-i[0])+t[0]*i[0],e[1]*(1-i[1])+t[1]*i[1]],d=[],p=[];for(const e of this.triangleSubSegments){d[0]=e.min.x/ue,d[1]=e.min.y/ue,p[0]=e.max.x/ue,p[1]=e.max.y/ue;const t=u(c,h,d),o=u(c,h,p);if(0===new A([t[0],t[1],a],[o[0],o[1],n]).intersectsPrecise(i))l&&(r.segments.push(l),l=void 0);else{const s=e.segment;l&&l.vertexOffset!==s.vertexOffset&&(r.segments.push(l),l=void 0),l?(l.vertexLength+=s.vertexLength,l.primitiveLength+=s.primitiveLength):l={vertexOffset:s.vertexOffset,primitiveLength:s.primitiveLength,vertexLength:s.vertexLength,primitiveOffset:s.primitiveOffset,sortKey:void 0,vaos:{}}}}return l&&r.segments.push(l),r}encodeCentroid(e,t){var e=e.centroid(),t=t.span(),i=Math.min(7,Math.round(t.x*this.tileToMeter/10)),t=Math.min(7,Math.round(t.y*this.tileToMeter/10));return new G(S(e.x,1,ue-1)<<3|i,S(e.y,1,ue-1)<<3|t)}encodeBorderCentroid(e){if(!e.borders)return new G(0,0);var t=e.borders,i=Number.MAX_VALUE;if(t[0][0]!==i||t[1][0]!==i){const e=t[0][0]!==i?0:1;return new G(6|(t[0][0]!==i?0:65528),(t[e][0]+t[e][1])/2<<3|6)}{const e=t[2][0]!==i?2:3;return new G((t[e][0]+t[e][1])/2<<3|6,6|(t[2][0]!==i?0:65528))}}showCentroid(e){const t=this.centroidData[e.centroidDataIndex];t.flags&=bd,t.centroidXY.x=0,t.centroidXY.y=0,this.writeCentroidToBuffer(t)}writeCentroidToBuffer(e){this.groundEffect.updateHiddenByLandmark(e);var t=e.vertexArrayOffset,i=e.vertexCount+e.vertexArrayOffset,r=e.flags&bd?vd:e.centroidXY,e=this.centroidVertexArray.geta_centroid_pos0(t);if(this.centroidVertexArray.geta_centroid_pos1(t)!==r.y||e!==r.x){for(let e=t;er.max.x||r.min.x>i.max.x||i.min.y>r.max.y||r.min.y>i.max.y))for(let e=0;en.max.x||n.min.x>e||t>n.max.y||n.min.y>t||this.footprintContainsPoint(e,t,n)&&n&&n.height>i&&(i=n.height,this.partLookup[a]=n,r=!!(n.flags&bd));if(i!==Number.NEGATIVE_INFINITY)return{height:i,hidden:r};this.partLookup[a]=void 0}}function Rd(e,t){t=e.add(t)._unit();return e.x*t.x+e.y*t.y}function Ld(e,t,i,r,a){var n=Math.sqrt(1-r*r);return Math.min(e.dist(t)/3,t.dist(i)/3,a*n/r)}function kd(e,t,i){return e.xi[1].x&&t.x>i[1].x||e.yi[1].y&&t.y>i[1].y}function Od(e,t){return e.xt[1].x||e.yt[1].y}function Bd(e,t,i){if(e.x<0||e.x>=ue||t.x<0||t.x>=ue||i.x<0||i.x>=ue)return!1;const r=i.sub(t),a=r.perp(),n=e.sub(t);return-.866<(r.x*n.x+r.y*n.y)/Math.sqrt((r.x*r.x+r.y*r.y)*(n.x*n.x+n.y*n.y))&&a.x*n.x+a.y*n.y<0}function Fd(e,t,i){t=t?2|e:-3&e;return i?1|t:-2&t}function Nd(){var e=Math.PI/32,e=Math.tan(e),t=Ql;return t*Math.sqrt(1+2*e*e)-t}function Vd(t,i,r){const a=1<{if(0===e)return.5*(t+i);{const e=_c((r.y+t/ue)/a);return(pc(.5*(_c((r.y+i/ue)/a)+e))*a-r.y)*ue}};const f=[];if(!c.length||!u||!d)return f;const m=(e,t)=>{for(const i of e)f.push({polygon:i,bounds:t})},_=Math.ceil(Math.log2(u)),g=Math.ceil(Math.log2(d)),y=_-g,x=[];for(let e=0;eh+1?v.push({polygons:e,bounds:c,depth:h+1}):m(e,c)}if(b.length){const c=[new G(0===u?y:d.x,1===u?y:d.y),f];x.length>h+1?v.push({polygons:b,bounds:c,depth:h+1}):m(b,c)}}return f}}let Ud,jd;function Gd(e,t){return e.x*t.x+e.y*t.y}function qd(i,r){if(1===i.length){let e=0;const a=r[e++];let t;for(;!t||a.equals(t);)if(!(t=r[e++]))return 1/0;for(;ethis.height)return fi("LineAtlas out of space"),null;0===t.length&&t.push(1);let o=0;for(let e=0;ee.fqid),this.index=e.index,this.projection=e.projection,this.hasPattern=!1,this.hasZOffset=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(e=>{this.gradients[e.id]={}}),this.layoutVertexArray=new Ms,this.layoutVertexArray2=new Is,this.patternVertexArray=new As,this.indexArray=new Vs,this.programConfigurations=new Nl(e.layers,{zoom:e.zoom,lut:e.lut}),this.segments=new R,this.maxLineLength=0,this.zOffsetVertexArray=new Gs,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id),this.tessellationStep=e.tessellationStep||ue/64}updateFootprints(e,t){}populate(e,t,i,r){this.hasPattern=fu("line",this.layers,t);const a=this.layers[0].layout.get("line-sort-key"),n=this.layers[0].layout.get("line-z-offset"),o=(this.hasZOffset=!n.isConstant()||!!n.constantOr(0),[]);for(const{feature:t,id:n,index:l,sourceLayerIndex:c}of e){const e=this.layers[0]._featureFilter.needGeometry,h=Cc(t,e);var s;this.layers[0]._featureFilter.filter(new I(this.zoom),h,i)&&(s=a?a.evaluate(h,{},i):void 0,s={id:n,properties:t.properties,type:t.type,sourceLayerIndex:c,index:l,geometry:e?h.geometry:Ac(t,i,r),patterns:{},sortKey:s},o.push(s))}a&&o.sort((e,t)=>e.sortKey-t.sortKey);const{lineAtlas:l,featureIndex:c}=t,h=this.addConstantDashes(l);for(const r of o){const{geometry:a,index:n,sourceLayerIndex:o}=r;if(h&&this.addFeatureDashes(r,l),this.hasPattern){const e=mu("line",this.layers,r,this.zoom,t);this.patternFeatures.push(e)}else this.addFeature(r,a,n,i,l.positions,t.availableImages,t.brightness);c.insert(e[n].feature,a,n,o,this.index)}}addConstantDashes(e){let t=!1;for(const a of this.layers){var i=a.paint.get("line-dasharray").value,r=a.layout.get("line-cap").value;if("constant"!==i.kind||"constant"!==r.kind)t=!0;else{const t=r.value,n=i.value;n&&e.addDash(n,t)}}return t}addFeatureDashes(i,r){var a=this.zoom;for(const n of this.layers){const o=n.paint.get("line-dasharray").value,s=n.layout.get("line-cap").value;if("constant"!==o.kind||"constant"!==s.kind){let e,t;if("constant"===o.kind){if(!(e=o.value))continue}else e=o.evaluate({zoom:a},i);t="constant"===s.kind?s.value:s.evaluate({zoom:a},i),r.addDash(e,t),i.patterns[n.id]=r.getKey(e,t)}}}update(e,t,i,r,a){var n=0!==Object.keys(e).length;n&&!this.stateDependentLayers.length||this.programConfigurations.updatePaintArrays(e,t,n?this.stateDependentLayers:this.layers,i,r,a)}addFeatures(e,t,i,r,a,n){for(const e of this.patternFeatures)this.addFeature(e,e.geometry,e.index,t,i,r,n)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,Xd)),0!==this.patternVertexArray.length&&(this.patternVertexBuffer=e.createVertexBuffer(this.patternVertexArray,Jd)),!this.zOffsetVertexBuffer&&0b){const c=r.dist(a);if(c>2*w){const h=r.sub(r.sub(a)._mult(w/c)._round());this.updateDistance(a,h),this.addCurrentVertex(h,o,0,0,T,l),a=h}}if(E&&"round"===e&&(I2*w){const h=r.add(n.sub(r)._mult(w/c)._round());this.updateDistance(r,h),this.addCurrentVertex(h,s,0,0,T,l),r=h}}}}}addVerticesTo(t,e,i,r,a,n,o,s,l,c){var h=(e.w-t.w)/this.tessellationStep|0;if(1i||e.yi}let pp,fp;function mp(e,t,i){return t*(ue/(e.tileSize*Math.pow(2,i-e.tileID.overscaledZ)))}function _p(e,t){return 1/mp(e,1,t.tileZoom)}function gp(e,t,i,r){return e.translatePosMatrix(r||t.tileID.projMatrix,t,i.paint.get("line-translate"),i.paint.get("line-translate-anchor"))}m(up,"LineBucket",{omit:["layers","patternFeatures","currentVertex","currentVertexIsOutside"]});const yp=e=>{const t=[];xp(e)&&t.push("RENDER_LINE_DASH"),e.paint.get("line-gradient")&&t.push("RENDER_LINE_GRADIENT");var i=e.paint.get("line-trim-offset"),i=(0===i[0]&&0===i[1]||t.push("RENDER_LINE_TRIM_OFFSET"),0!==e.paint.get("line-border-width").constantOr(1)&&t.push("RENDER_LINE_BORDER"),"none"===e.layout.get("line-join").constantOr("miter")),e=!!e.paint.get("line-pattern").constantOr(1);return i&&e&&t.push("LINE_JOIN_NONE"),t};function xp(e){e=e.paint.get("line-dasharray").value;return e.value||"constant"!==e.kind}class vp{constructor(t){this._stringToNumber={},this._numberToString=[];for(let e=0;e>1,h=-7,u=i?a-1:0,d=i?-1:1,a=e[t+u];for(u+=d,n=a&(1<<-h)-1,a>>=-h,h+=s;0>=-h,h+=r;0>1,u=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:n-1,p=r?1:-1,n=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(r=Math.pow(2,-o))<1&&(o--,r*=2),2<=(t+=1<=o+h?u/r:u*Math.pow(2,1-h))*r&&(o++,r/=2),c<=o+h?(s=0,o=c):1<=o+h?(s=(t*r-1)*Math.pow(2,a),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,a),o=0));8<=a;e[i+d]=255&s,d+=p,s/=256,a-=8);for(o=o<>>0):4294967296*(t>>>0)+(e>>>0)}function Ip(e,t,i){var r=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));i.realloc(r);for(var a=i.pos-1;e<=a;a--)i.buf[a+r]=i.buf[a]}function Ap(e,t){for(var i=0;i>>8,e[i+2]=t>>>16,e[i+3]=t>>>24}function Np(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}C.prototype={destroy:function(){this.buf=null},readFields:function(e,t,i){for(i=i||this.length;this.pos>3,n=this.pos;this.type=7&r,e(a,t,this),this.pos===n&&this.skip(r)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=Bp(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=Np(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=Bp(this.buf,this.pos)+Bp(this.buf,this.pos+4)*wp;return this.pos+=8,e},readSFixed64:function(){var e=Bp(this.buf,this.pos)+Np(this.buf,this.pos+4)*wp;return this.pos+=8,e},readFloat:function(){var e=bp.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=bp.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t=this.buf,i=127&(r=t[this.pos++]);{if(r<128)return i;if(i|=(127&(r=t[this.pos++]))<<7,r<128)return i;if(i|=(127&(r=t[this.pos++]))<<14,r<128)return i;if(i|=(127&(r=t[this.pos++]))<<21,r<128)return i;var r=i|=(15&t[this.pos])<<28;t=e;var a,e=(i=this).buf,n=(112&(a=e[i.pos++]))>>4;if(a<128)return Mp(r,n,t);if(n|=(127&(a=e[i.pos++]))<<3,a<128)return Mp(r,n,t);if(n|=(127&(a=e[i.pos++]))<<10,a<128)return Mp(r,n,t);if(n|=(127&(a=e[i.pos++]))<<17,a<128)return Mp(r,n,t);if(n|=(127&(a=e[i.pos++]))<<24,a<128)return Mp(r,n,t);if(n|=(1&(a=e[i.pos++]))<<31,a<128)return Mp(r,n,t);throw new Error("Expected varint not more than 10 bytes")}},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,t=this.readVarint()+this.pos,i=this.pos;if(12<=(this.pos=t)-i&&Ep)return e=this.buf,Ep.decode(e.subarray(i,t));for(var r=this.buf,a=t,n="",o=i;o>>10&1023|55296),u=56320|1023&u),n+=String.fromCharCode(u),o+=d}return n},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!==C.Bytes)return e.push(this.readVarint(t));var i=Sp(this);for(e=e||[];this.pos>>=7,a.buf[a.pos++]=127&r|128,r>>>=7,a.buf[a.pos++]=127&r|128,r>>>=7,a.buf[a.pos++]=127&r|128,a.buf[a.pos]=127&(r>>>=7),i=(7&(a=t))<<4,(n=n).buf[n.pos++]|=i|((a>>>=3)?128:0),a&&(n.buf[n.pos++]=127&a|((a>>>=7)?128:0),a&&(n.buf[n.pos++]=127&a|((a>>>=7)?128:0),a&&(n.buf[n.pos++]=127&a|((a>>>=7)?128:0),a&&(n.buf[n.pos++]=127&a|((a>>>=7)?128:0),a&&(n.buf[n.pos++]=127&a)))))}else this.realloc(4),this.buf[this.pos++]=127&e|(127>>=7)|(127>>=7)|(127>>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,e=(this.pos=function(e,t,i){for(var r,a,n=0;n>6|192:(r<65536?e[i++]=r>>12|224:(e[i++]=r>>18|240,e[i++]=r>>12&63|128),e[i++]=r>>6&63|128),e[i++]=63&r|128)}return i}(this.buf,e,this.pos),this.pos-t);128<=e&&Ip(t,e,this),this.pos=t-1,this.writeVarint(e),this.pos+=e},writeFloat:function(e){this.realloc(4),bp.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),bp.write(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 i=0;iVc(l.bufferedTilespaceGeometry,e,t,i,r));a.sort(Zp);let h=null;c.elevation&&0(a=a||Ac(e,this.tileID.canonical,n.tileTransform),t.queryIntersectsFeature(l,e,i,a,this.z,n.transform,n.pixelPosMatrix,h,r)))}}return u}loadMatchingFeature(t,e,i,r,a,n,o,s,l){const{featureIndex:c,bucketIndex:h,sourceLayerIndex:u,layoutVertexArrayOffset:d}=e,p=this.bucketLayerIDs[h];if(!r||function(t,i){for(let e=0;e{const i=r instanceof ts?r.get(t):null;return i&&i.evaluate?i.evaluate(a,n,o):i})}function Zp(e,t){return t-e}m(qp,"FeatureIndex",{omit:["rawTileData","sourceLayerCoder"]});var Wp=24;const Hp=128;function Xp(i,r){const a=r["expression"];if("constant"===a.kind)return{kind:"constant",layoutSize:a.evaluate(new I(i+1))};if("source"===a.kind)return{kind:"source"};{const{zoomStops:r,interpolationType:s}=a;let e=0;for(;e":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂","←":"↑","→":"↓"};const Qp=3;function ef(e,t,i){t.glyphs=[],1===e&&i.readMessage(tf,t)}function tf(e,t,i){if(3===e){const{id:e,bitmap:r,width:a,height:n,left:o,top:s,advance:l}=i.readMessage(rf,{});t.glyphs.push({id:e,bitmap:new Nh({width:a+2*Qp,height:n+2*Qp},r),metrics:{width:a,height:n,left:o,top:s,advance:l}})}else 4===e?t.ascender=i.readSVarint():5===e&&(t.descender=i.readSVarint())}function rf(e,t,i){1===e?t.id=i.readVarint():2===e?t.bitmap=i.readBytes():3===e?t.width=i.readVarint():4===e?t.height=i.readVarint():5===e?t.left=i.readSVarint():6===e?t.top=i.readSVarint():7===e&&(t.advance=i.readVarint())}const af=Qp,nf={horizontal:1,vertical:2,horizontalOnly:3};class of{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(e,t){const i=new of;return i.scale=e||1,i.fontStack=t,i}static forImage(e){const t=new of;return t.imageName=e,t}}class sf{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(t,i){const r=new sf;for(let e=0;e=t&&cf[this.text.charCodeAt(e)];e--)i--;this.text=this.text.substring(t,i),this.sectionIndex=this.sectionIndex.slice(t,i)}substring(e,t){const i=new sf;return i.text=this.text.substring(e,t),i.sectionIndex=this.sectionIndex.slice(e,t),i.sections=this.sections,i}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((e,t)=>Math.max(e,this.sections[t].scale),0)}addTextSection(t,e){this.text+=t.text,this.sections.push(of.forText(t.scale,t.fontStack||e));var i=this.sections.length-1;for(let e=0;eh&&(h=S)}else{const v=w[I.fontStack];if(!v)continue;v[D]&&(r=v[D]);const T=b[I.fontStack];if(!T)continue;const S=T.glyphs[D];if(!S)continue;if(i=S.metrics,n=8203!==D?Wp:0,p){const v=void 0!==T.ascender?Math.abs(T.ascender):0,b=void 0!==T.descender?Math.abs(T.descender):0,w=(v+b)*t;l-i/2;){if(--o<0)return;s-=e[o].dist(n),n=e[o]}s+=e[o].dist(e[o+1]),o++;const l=[];let c=0;for(;sr;)c-=l.shift().angleDelta;if(c>a)return;o++,s+=t.dist(i)}return 1}function xf(t){let i=0;for(let e=0;e=o&&t.x>=o||(e.x>=o?e=new G(o,e.y+(o-e.x)/(t.x-e.x)*(t.y-e.y))._round():t.x>=o&&(t=new G(o,e.y+(o-e.x)/(t.x-e.x)*(t.y-e.y))._round()),e.y>=s&&t.y>=s||(e.y>=s?e=new G(e.x+(s-e.y)/(t.y-e.y)*(t.x-e.x),s)._round():t.y>=s&&(t=new G(e.x+(s-e.y)/(t.y-e.y)*(t.x-e.x),s)._round()),r&&e.equals(r[r.length-1])||(r=[e],l.push(r)),r.push(t)))))}}return l}function Ef(e){let t=0,i=0;for(const r of e)t+=r.w*r.h,i=Math.max(i,r.w);e.sort((e,t)=>t.h-e.h);const r=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),i),h:1/0}];let a=0,n=0;for(const t of e)for(let e=r.length-1;0<=e;e--){const i=r[e];if(!(t.w>i.w||t.h>i.h)){if(t.x=i.x,t.y=i.y,n=Math.max(n,t.y+t.h),a=Math.max(a,t.x+t.w),t.w===i.w&&t.h===i.h){const t=r.pop();et.hasImage(e,i)),t.dispatchRenderCallbacks(this.haveRenderCallbacks,i);for(const r in t.getUpdatedImages(i))this.patchUpdatedImage(this.iconPositions[r],t.getImage(r,i),e),this.patchUpdatedImage(this.patternPositions[r],t.getImage(r,i),e)}patchUpdatedImage(e,t,i){var r,a;e&&t&&e.version!==t.version&&(e.version=t.version,[e,r]=e.tl,a=!!Object.keys(this.patternPositions).length,i.update(t.data,{useMipmap:a},{x:e,y:r}))}}m(Mf,"ImagePosition"),m(If,"ImageAtlas");const Af=1e20;function Cf(t,i,r,a,n,o,s,l,c){for(let e=i;e{let o=this.entries[i],e=(o=o||(this.entries[i]={glyphs:{},requests:{},ranges:{},ascender:void 0,descender:void 0})).glyphs[a];if(void 0!==e)n(null,{stack:i,id:a,glyph:e});else{if(e=this._tinySDF(o,i,a))return o.glyphs[a]=e,void n(null,{stack:i,id:a,glyph:e});const s=Math.floor(a/256);if(65535<256*s)n(new Error("glyphs > 65535 not supported"));else if(o.ranges[s])n(null,{stack:i,id:a,glyph:e});else{let r=o.requests[s];r||(r=o.requests[s]=[],Rf.loadGlyphRange(i,s,l,this.requestManager,(e,t)=>{if(t){o.ascender=t.ascender,o.descender=t.descender;for(const e in t.glyphs)this._doesCharSupportLocalGlyph(+e)||(o.glyphs[+e]=t.glyphs[+e]);o.ranges[s]=!0}for(const i of r)i(e,t);delete o.requests[s]})),r.push((e,t)=>{e?n(e):t&&n(null,{stack:i,id:a,glyph:t.glyphs[a]||null})})}}},(e,t)=>{if(e)a(e);else if(t){const e={};for(const{stack:a,id:i,glyph:r}of t)void 0===e[a]&&(e[a]={}),void 0===e[a].glyphs&&(e[a].glyphs={}),e[a].glyphs[i]=r&&{id:r.id,bitmap:r.bitmap.clone(),metrics:r.metrics},e[a].ascender=this.entries[a].ascender,e[a].descender=this.entries[a].descender;a(null,e)}})}_doesCharSupportLocalGlyph(e){return this.localGlyphMode!==Df.none&&(this.localGlyphMode===Df.all?!!this.localFontFamily:!!this.localFontFamily&&(q["CJK Unified Ideographs"](e)||q["Hangul Syllables"](e)||q.Hiragana(e)||q.Katakana(e)||q["CJK Symbols and Punctuation"](e)||q["CJK Unified Ideographs Extension A"](e)||q["CJK Unified Ideographs Extension B"](e)))}_tinySDF(i,r,e){var a=this.localFontFamily;if(a&&this._doesCharSupportLocalGlyph(e)){let t=i.tinySDF;if(!t){let e="400";/bold/i.test(r)?e="900":/medium/i.test(r)?e="500":/light/i.test(r)&&(e="200"),(t=i.tinySDF=new Rf.TinySDF({fontFamily:a,fontWeight:e,fontSize:24*zf,buffer:3*zf,radius:8*zf})).fontWeight=e}if(this.localGlyphs[t.fontWeight][e])return this.localGlyphs[t.fontWeight][e];var r=String.fromCodePoint(e),{data:i,width:a,height:r,glyphWidth:n,glyphHeight:o,glyphLeft:s,glyphTop:l,glyphAdvance:c}=t.draw(r);return this.localGlyphs[t.fontWeight][e]={id:e,bitmap:new Nh({width:a,height:r},i),metrics:{width:n/zf,height:o/zf,left:s/zf,top:l/zf-27,advance:c/zf,localGlyph:!0}}}}}Rf.loadGlyphRange=function(e,t,i,r,a){var t=256*t,n=255+t,r=r.transformRequest(r.normalizeGlyphsURL(i).replace("{fontstack}",e).replace("{range}",t+"-"+n),Ki.Glyphs);tr(r,(e,t)=>{if(e)a(e);else if(t){const e={},i=new Vp(t).readFields(ef,{});for(const t of i.glyphs)e[t.id]=t;a(null,{glyphs:e,ascender:i.ascender,descender:i.descender})}})},Rf.TinySDF=class{constructor({fontSize:e=24,buffer:t=3,radius:i=8,cutoff:r=.25,fontFamily:a="sans-serif",fontWeight:n="normal",fontStyle:o="normal"}={}){this.buffer=t,this.cutoff=r,this.radius=i;const s=this.size=e+4*t,l=this._createCanvas(s),c=this.ctx=l.getContext("2d",{willReadFrequently:!0});c.font=o+` ${n} ${e}px `+a,c.textBaseline="alphabetic",c.textAlign="left",c.fillStyle="black",this.gridOuter=new Float64Array(s*s),this.gridInner=new Float64Array(s*s),this.f=new Float64Array(s),this.z=new Float64Array(s+1),this.v=new Uint16Array(s)}_createCanvas(e){const t=document.createElement("canvas");return t.width=t.height=e,t}draw(i){const{width:t,actualBoundingBoxAscent:r,actualBoundingBoxDescent:a,actualBoundingBoxLeft:e,actualBoundingBoxRight:n}=this.ctx.measureText(i),o=Math.ceil(r),s=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(n-e))),l=Math.min(this.size-this.buffer,o+Math.ceil(a)),c=s+2*this.buffer,h=l+2*this.buffer,u=Math.max(c*h,0),d=new Uint8ClampedArray(u),p={data:d,width:c,height:h,glyphWidth:s,glyphHeight:l,glyphTop:o,glyphLeft:0,glyphAdvance:t};if(0===s||0===l)return p;const{ctx:f,buffer:m,gridInner:_,gridOuter:g}=this;f.clearRect(m,m,s,l),f.fillText(i,m,m+o);var y=f.getImageData(m,m,s,l);g.fill(Af,0,u),_.fill(0,0,u);for(let t=0;te+t[1]-t[0],I=a.reduce(o,0),A=n.reduce(o,0),s=e-I,l=r-A;let C=0,P=I,z=0,D=A,R=0,L=s,k=0,O=l;if(T.content&&t){const v=T.content;C=Of(a,0,v[0]),z=Of(n,0,v[1]),P=Of(a,v[0],v[2]),D=Of(n,v[1],v[3]),R=v[0]-C,k=v[1]-z,L=v[2]-v[0]-P,O=v[3]-v[1]-D}var c=(e,t,i,r)=>{const a=(e.stretch-C)/P*S+v.left,n=e.fixed-R-L*e.stretch/I,o=(t.stretch-z)/D*M+v.top,s=t.fixed-k-O*t.stretch/A,l=(i.stretch-C)/P*S+v.left,c=i.fixed-R-L*i.stretch/I,h=(r.stretch-z)/D*M+v.top,u=r.fixed-k-O*r.stretch/A,d=new G(a,o),p=new G(l,o),f=new G(l,h),m=new G(a,h),_=new G(n/E,s/E),g=new G(c/E,u/E),y=b*Math.PI/180;if(y){const v=Math.sin(y),b=Math.cos(y),w=[b,-v,v,b];d._matMult(w),p._matMult(w),m._matMult(w),f._matMult(w)}var e=e.stretch+e.fixed,i=i.stretch+i.fixed,t=t.stretch+t.fixed,r=r.stretch+r.fixed,x=v.imageSecondary;return{tl:d,tr:p,bl:m,br:f,texPrimary:{x:T.paddedRect.x+Lf+e,y:T.paddedRect.y+Lf+t,w:i-e,h:r-t},texSecondary:x?{x:x.paddedRect.x+Lf+e,y:x.paddedRect.y+Lf+t,w:i-e,h:r-t}:void 0,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:_,pixelOffsetBR:g,minFontScaleX:L/E/S,minFontScaleY:O/E/M,isSDF:w}};if(t&&(T.stretchX||T.stretchY)){const v=Bf(a,s,I),b=Bf(n,l,A);for(let e=0;er.y!=l.y>r.y&&r.x<(l.x-s.x)*(r.y-s.y)/(l.y-s.y)+s.x&&(a=!a),n=Math.min(n,Bc(r,s,l))}}return(a?1:-1)*Math.sqrt(n)}(this.p,r),this.max=this.d+this.h*Math.SQRT2}}const Vf=Number.POSITIVE_INFINITY,Uf=Math.sqrt(2);function jf(e,[t,i]){let r=0,a=0;if(i===Vf){const i=(t=t<0?0:t)/Uf;switch(e){case"top-right":case"top-left":a=i-7;break;case"bottom-right":case"bottom-left":a=7-i;break;case"bottom":a=7-t;break;case"top":a=t-7}switch(e){case"top-right":case"bottom-right":r=-i;break;case"top-left":case"bottom-left":r=i;break;case"left":r=t;break;case"right":r=-t}}else{switch(t=Math.abs(t),i=Math.abs(i),e){case"top-right":case"top-left":case"top":a=i-7;break;case"bottom-right":case"bottom-left":case"bottom":a=7-i}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,a]}function Gf(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"}function qf(W,H,X,Y,J,K,e,t,Q,ee,te,ie,i,re,ae){let r=K.textMaxSize.evaluate(H,{},ie);void 0===r&&(r=e);const a=W.layers[0].layout,ne=a.get("icon-offset").evaluate(H,{},ie),n=Hf(X.horizontal)||X.vertical,o="globe"===i.name,s=Wp,l=e/s,c=W.tilePixelRatio*r/s,h=(e=W.overscaling,18>=1),Math.max(ue/(512*e),1)*a.get("symbol-spacing")),oe=a.get("text-padding")*W.tilePixelRatio,se=a.get("icon-padding")*W.tilePixelRatio,u=x(a.get("text-max-angle")),le="map"===a.get("text-rotation-alignment")&&"point"!==a.get("symbol-placement"),ce="map"===a.get("icon-rotation-alignment")&&"point"!==a.get("symbol-placement"),d=a.get("symbol-placement"),p=h/2;var e=a.get("icon-text-fit").evaluate(H,{},ie),f=a.get("icon-text-fit-padding").evaluate(H,{},ie),m="none"!==e;let he;!1===W.hasAnyIconTextFit&&m&&(W.hasAnyIconTextFit=!0),Y&&m&&(W.allowVerticalPlacement&&X.vertical&&(he=_f(Y,X.vertical,e,f,ne,l)),n&&(Y=_f(Y,n,e,f,ne,l)));var _=(g,y,x)=>{if(!(y.x<0||y.x>=ue||y.y<0||y.y>=ue)){let _=null;if(o){const{x:W,y:H,z:X}=i.projectTilePoint(y.x,y.y,x);_={anchor:new gf(W,H,X,0,void 0),up:i.upVector(x,y.x,y.y)}}{var v=W;var b=y;var w=_;var T=g;var E=X;var S=Y;var M=J;var I=he;var A=W.layers[0];var C=W.collisionBoxArray;var P=H.index;var z=H.sourceLayerIndex;var D=W.index;var R=oe;var L=le;var k=Q;x=se;y=ce;g=ne;var O=H;var B=K;var F=ee;var N=te;var V=ie;var U=re;var j=ae;var G=v.addToLineVertexArray(b,T);let e,t,i,r,a,n,o,s=0,l=0,c=0,h=0,u=-1,d=-1;var q={};let p=Mr("");var $=w?w.anchor:b,Z="none"!==A.layout.get("icon-text-fit").evaluate(O,{},V);let f=0,m=0;if(void 0===A._unevaluatedLayout.getValue("text-radial-offset")?[f,m]=A.layout.get("text-offset").evaluate(O,{},V).map(e=>e*Wp):(f=A.layout.get("text-radial-offset").evaluate(O,{},V)*Wp,m=Vf),v.allowVerticalPlacement&&E.vertical){const v=E.vertical;if(L)n=Yf(v),I&&(o=Yf(I));else{const w=A.layout.get("text-rotate").evaluate(O,{},V)+90;i=Xf(C,$,b,P,z,D,v,R,w,k),I&&(r=Xf(C,$,b,P,z,D,I,x,w))}}if(S){const T=A.layout.get("icon-rotate").evaluate(O,{},V),E=kf(S,T,F,Z),M=I?kf(I,T,F,Z):void 0,R=(t=Xf(C,$,b,P,z,D,S,x,T),s=4*E.length,v.iconSizeData);let e=null;"source"===R.kind?(e=[Hp*A.layout.get("icon-size").evaluate(O,{},V)])[0]>Zf&&fi(`${v.layerIds[0]}: Value for "icon-size" is >= ${$f}. Reduce your "icon-size".`):"composite"===R.kind&&(((e=[Hp*B.compositeIconSizes[0].evaluate(O,{},V),Hp*B.compositeIconSizes[1].evaluate(O,{},V)])[0]>Zf||e[1]>Zf)&&fi(`${v.layerIds[0]}: Value for "icon-size" is >= ${$f}. Reduce your "icon-size".`)),v.addSymbols(v.icon,E,e,g,y,O,!1,w,b,G.lineStartIndex,G.lineLength,-1,N,V,U,j),u=v.icon.placedSymbolArray.length-1,M&&(l=4*M.length,v.addSymbols(v.icon,M,e,g,y,O,nf.vertical,w,b,G.lineStartIndex,G.lineLength,-1,N,V,U,j),d=v.icon.placedSymbolArray.length-1)}for(const T in E.horizontal){const S=E.horizontal[T],I=(e||(p=Mr(S.text),L?a=Yf(S):e=Xf(C,$,b,P,z,D,S,R,A.layout.get("text-rotate").evaluate(O,{},V),k)),1===S.positionedLines.length);if(c+=Wf(v,w,b,S,M,A,L,O,k,G,E.vertical?nf.horizontal:nf.horizontalOnly,I?Object.keys(E.horizontal):[T],q,u,B,N,V,U),I)break}E.vertical&&(h+=Wf(v,w,b,E.vertical,M,A,L,O,k,G,nf.vertical,["vertical"],q,d,B,N,V,U));T=(e,t)=>e?Math.max(e,t):t,I=T(a,-1),I=T(n,I),F=-1<(I=T(o,I))?1:0;65535<=v.glyphOffsetArray.length&&fi("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==O.sortKey&&v.addToSortKeyRanges(v.symbolInstances.length,O.sortKey),v.symbolInstances.emplaceBack(b.x,b.y,$.x,$.y,$.z,0<=q.right?q.right:-1,0<=q.center?q.center:-1,0<=q.left?q.left:-1,0<=q.vertical?q.vertical:-1,u,d,p,void 0!==e?e:v.collisionBoxArray.length,void 0!==e?e+1:v.collisionBoxArray.length,void 0!==i?i:v.collisionBoxArray.length,void 0!==i?i+1:v.collisionBoxArray.length,void 0!==t?t:v.collisionBoxArray.length,void 0!==t?t+1:v.collisionBoxArray.length,r||v.collisionBoxArray.length,r?r+1:v.collisionBoxArray.length,P,c,h,s,l,F,0,f,m,I,0,Z?1:0)}}};if("line"===d)for(const J of Tf(H.geometry,0,0,ue,ue)){const H=wf(J,h,u,X.vertical||n,Y,s,c,W.overscaling,ue);for(const X of H)n&&function(t,e,i,r){const a=t.compareText;if(e in a){const t=a[e];for(let e=t.length-1;0<=e;e--)if(r.dist(t[e])u)return c=(u-l)/n,h=b(r.x,a.x,c),c=b(r.y,a.y,c),h=new gf(h,c,0,a.angleTo(r),e),!o||yf(t,h,s,o,i)?h:void 0;l+=n}}(W,u,X.vertical||n,Y,s,c);H&&_(W,H,ie)}}else if("Polygon"===H.type)for(const W of du(H.geometry,0)){const H=function(i,t,e=!1){let r=1/0,a=1/0,n=-1/0,o=-1/0;var s=i[0];for(let e=0;en)&&(n=t.x),(!e||t.y>o)&&(o=t.y)}var l=Math.min(n-r,o-a);let c=l/2;const h=new Za([],Ff);if(0===l)return new G(r,a);for(let t=r;tu.d||!u.d)&&(u=r,e&&console.log("found best %d after %d probes",Math.round(1e4*r.d)/1e4,d)),r.max-u.d<=t||(c=r.h/2,h.push(new Nf(r.p.x-c,r.p.y-c,c,i)),h.push(new Nf(r.p.x+c,r.p.y-c,c,i)),h.push(new Nf(r.p.x-c,r.p.y+c,c,i)),h.push(new Nf(r.p.x+c,r.p.y+c,c,i)),d+=4)}return e&&(console.log("num probes: "+d),console.log("best distance: "+u.d)),u.p}(W,16);_(W[0],new gf(H.x,H.y,0,0,void 0),ie)}else if("LineString"===H.type)for(const W of H.geometry)_(W,new gf(W[0].x,W[0].y,0,0,void 0),ie);else if("Point"===H.type)for(const W of H.geometry)for(const H of W)_([H],new gf(H.x,H.y,0,0,void 0),ie)}const $f=255,Zf=$f*Hp;function Wf(e,t,i,r,a,n,o,s,l,c,h,u,d,p,f,m,_,g){r=function(u,d,p,f,e,m,_){const g=[];if(0===u.positionedLines.length)return g;var t,y=p.layout.get("text-rotate").evaluate(e,{})*Math.PI/180,x=(p=d[0],e=d[1],0<(t=p*e)?[p,-e]:t<0?[-p,e]:0===p?[e,p]:[e,-p]);let i=Math.abs(u.top-u.bottom);for(const A of u.positionedLines)i-=A.lineOffset;var r,a,n,o,s,l=u.positionedLines.length,c=i/l;let v=u.top-d[1];for(let e=0;eZf&&fi(`${e.layerIds[0]}: Value for "text-size" is >= ${$f}. Reduce your "text-size".`):"composite"===a.kind&&((y=[Hp*f.compositeTextSizes[0].evaluate(s,{},_),Hp*f.compositeTextSizes[1].evaluate(s,{},_)])[0]>Zf||y[1]>Zf)&&fi(`${e.layerIds[0]}: Value for "text-size" is >= ${$f}. Reduce your "text-size".`),e.addSymbols(e.text,r,y,l,o,s,h,t,i,c.lineStartIndex,c.lineLength,p,m,_,g,!1);for(const t of u)d[t]=e.text.placedSymbolArray.length-1;return 4*r.length}function Hf(e){for(const t in e)return e[t];return null}function Xf(t,i,r,a,n,e,o,s,l,c){let h=o.top,u=o.bottom,d=o.left,p=o.right;o=o.collisionPadding;if(o&&(d-=o[0],h-=o[1],p+=o[2],u+=o[3]),l){const t=new G(d,h),i=new G(p,h),r=new G(d,u),a=new G(p,u),n=x(l);let e=new G(0,0);c&&(e=new G(c[0],c[1])),t._rotateAround(n,e),i._rotateAround(n,e),r._rotateAround(n,e),a._rotateAround(n,e),d=Math.min(t.x,i.x,r.x,a.x),p=Math.max(t.x,i.x,r.x,a.x),h=Math.min(t.y,i.y,r.y,a.y),u=Math.max(t.y,i.y,r.y,a.y)}return t.emplaceBack(i.x,i.y,i.z,r.x,r.y,d,h,p,u,s,a,n,e),t.length-1}function Yf(e){e.collisionPadding&&(e.top-=e.collisionPadding[1],e.bottom+=e.collisionPadding[3]);e=e.bottom-e.top;return 0m&&(_(e,l,i,r,o,s),_(l,t,o,s,a,n))}_(c,s,i,a,r,a),_(s,o,r,a,r,e),_(o,n,r,e,i,e),_(n,c,i,e,i,a),u-=m,d-=m,p+=m,f+=m;l=1/Math.max(p-u,f-d);return{scale:l,x:u*l,y:d*l,x2:p*l,y2:f*l,projection:h}}function Qf(e,{x:t,y:i},r=0){return new G(((t-r)*e.scale-e.x)*ue,(i*e.scale-e.y)*ue)}const em=Te.ae.identity(new Float32Array(16));class tm{constructor(e){this.spec=e,this.name=e.name,this.wrap=!1,this.requiresDraping=!1,this.supportsWorldCopies=!1,this.supportsTerrain=!1,this.supportsFog=!1,this.supportsFreeCamera=!1,this.zAxisUnit="meters",this.isReprojectedInTileSpace=!0,this.unsupportedLayers=["custom"],this.center=[0,0],this.range=[3.5,7]}project(e,t){return{x:0,y:0,z:0}}unproject(e,t){return new M(0,0)}projectTilePoint(e,t,i){return{x:e,y:t,z:0}}locationPoint(e,t,i=!0){return e._coordinatePoint(e.locationCoordinate(t),i)}pixelsPerMeter(e,t){return fc(1,e)*t}pixelSpaceConversion(e,t,i){return 1}farthestPixelDistance(e){return Jf(e,e.pixelsPerMeter)}pointCoordinate(e,t,i,r){var a=e.horizonLineFromTop(!1),t=new G(t,Math.max(a,i));return e.rayIntersectionCoordinate(e.pointRayIntersection(t,r))}pointCoordinate3D(e,t,i){i=new G(t,i);if(e.elevation)return e.elevation.pointCoordinate(i);{const t=this.pointCoordinate(e,i.x,i.y,0);return[t.x,t.y,t.z]}}isPointAboveHorizon(e,t){if(e.elevation&&e.elevation.visibleDemTiles.length)return!this.pointCoordinate3D(e,t.x,t.y);e=e.horizonLineFromTop();return t.yhm-1e-6&&(t=hm-1e-6),r/Math.pow(um(t),i)),a=t*Math.sin(i*e),r=r-t*Math.cos(i*e),a=.5*(a/Math.PI+.5),r=.5*(r/Math.PI+.5);return{x:a,y:this.southernCenter?r:1-r,z:0}}unproject(e,t){e=(2*e-.5)*Math.PI;var{n:i,f:r}=this,t=r-(t=(2*(1-(t=this.southernCenter?1-t:t))-.5)*Math.PI),a=Math.sign(t),n=Math.sign(i)*Math.sqrt(e*e+t*t);let o=Math.atan2(e,Math.abs(t))*a;t*i<0&&(o-=Math.PI*Math.sign(e)*a);t=S(Ht(o/i)+this.center[0],-180,180),e=S(Ht(2*Math.atan(Math.pow(r/n,1/i))-hm),-yc,yc);return new M(t,this.southernCenter?-e:e)}}class pm extends tm{constructor(e){super(e),this.wrap=!0,this.supportsWorldCopies=!0,this.supportsTerrain=!0,this.supportsFog=!0,this.supportsFreeCamera=!0,this.isReprojectedInTileSpace=!1,this.unsupportedLayers=[],this.range=null}project(e,t){return{x:dc(e),y:pc(t),z:0}}unproject(e,t){e=mc(e),t=_c(t);return new M(e,t)}}const fm=x(yc);class mm extends tm{project(e,t){var i=(t=x(t))*t,r=i*i;return{x:.5*((e=x(e))*(.8707-.131979*i+r*(r*(.003971*i-.001529*r)-.013791))/Math.PI+.5),y:1-.5*(t*(1.007226+i*(.015085+r*(.028874*i-.044475-.005916*r)))/Math.PI+1),z:0}}unproject(e,t){e=(2*e-.5)*Math.PI;let i=t=(2*(1-t)-1)*Math.PI,r=25,a,n=i*i;do{const e=(n=i*i)*n;a=(i*(1.007226+n*(.015085+e*(.028874*n-.044475-.005916*e)))-t)/(1.007226+n*(.045255+e*(.259866*n-.311325-.005916*11*e))),i=S(i-a,-fm,fm)}while(1e-6n||Math.abs(s)>n)&&0<--a);return new M(Ht(i),Ht(r))}}class ym extends tm{constructor(e){super(e),this.center=e.center||[0,0],this.parallels=e.parallels||[0,0],this.cosPhi=Math.max(.01,Math.cos(x(this.parallels[0]))),this.scale=1/(2*Math.max(Math.PI*this.cosPhi,1/this.cosPhi)),this.wrap=!0,this.supportsWorldCopies=!0}project(e,t){var{scale:i,cosPhi:r}=this;return{x:x(e)*r*i+.5,y:-Math.sin(x(t))/r*i+.5,z:0}}unproject(e,t){var{scale:i,cosPhi:r}=this,t=-(t-.5)/i,e=S(Ht((e-.5)/i)/r,-180,180),i=Math.asin(S(t*r,-1,1)),t=S(Ht(i),-yc,yc);return new M(e,t)}}class xm extends pm{constructor(e){super(e),this.requiresDraping=!0,this.supportsWorldCopies=!1,this.supportsFog=!0,this.zAxisUnit="pixels",this.unsupportedLayers=["debug"],this.range=[3,5]}projectTilePoint(e,t,i){e=_h(e,t,i),t=xh(ch(i));return Te.$.transformMat4(e,e,t),{x:e[0],y:e[1],z:e[2]}}locationPoint(e,t){var i=Kl(t.lat,t.lng),r=Te.$.normalize([],i),t=e.elevation?e.elevation.getAtPointOrZero(e.locationCoordinate(t),e._centerAltitude):e._centerAltitude,t=1/uc(0)*ue*t,r=(Te.$.scaleAndAdd(i,i,r,t),Te.ae.identity(new Float64Array(16)));return Te.ae.multiply(r,e.pixelMatrix,e.globeMatrix),Te.$.transformMat4(i,i,r),new G(i[0],i[1])}pixelsPerMeter(e,t){return 1/uc(0)*t}pixelSpaceConversion(e,t,i){var r=fc(1,e)*t,r=b(1/uc(45)*t,r,i);return this.pixelsPerMeter(e,t)/r}createTileMatrix(e,t,i){i=vh(ch(i.canonical));return Te.ae.multiply(new Float64Array(16),e.globeMatrix,i)}createInversionMatrix(e,t){var i=e["center"],t=xh(ch(t));return Te.ae.rotateY(t,t,x(i.lng)),Te.ae.rotateX(t,t,x(i.lat)),Te.ae.scale(t,t,[e._pixelsPerMercatorPixel,e._pixelsPerMercatorPixel,1]),Float32Array.from(t)}pointCoordinate(e,t,i,r){return oh(e,t,i,!0)||new Tc(0,0)}pointCoordinate3D(e,t,i){e=this.pointCoordinate(e,t,i,0);return[e.x,e.y,e.z]}isPointAboveHorizon(e,t){return!oh(e,t.x,t.y,!1)}farthestPixelDistance(e){var t=function(e,t){const i=e.cameraToCenterDistance,r=e._centerAltitude*t,a=e._camera,n=e._camera.forward(),o=Te.$.add([],Te.$.scale([],n,-i),[0,0,r]),s=e.worldSize/(2*Math.PI),l=[0,0,-s],c=e.width/e.height,h=Math.tan(e.fovAboveCenter),u=Te.$.scale([],a.up(),h),d=Te.$.scale([],a.right(),h*c),p=Te.$.normalize([],Te.$.add([],Te.$.add([],n,u),d)),f=[];let m;if(new Xc(o,p).closestPointOnSphere(l,s,f)){const t=Te.$.add([],f,l),i=Te.$.sub([],t,o);m=Math.cos(e.fovAboveCenter)*Te.$.length(i)}else{const e=Te.$.sub([],o,l),t=Te.$.sub([],l,o),i=(Te.$.normalize(t,t),Te.$.length(e)-s),r=(m=Math.sqrt(i*(i+2*s)),Math.acos(m/(s+i))-Math.acos(Te.$.dot(n,t)));m*=Math.cos(r)}return 1.01*m}(e,this.pixelsPerMeter(e.center.lat,e.worldSize)),i=Eh(e.zoom);if(0e.fqid),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.fullyClipped=!1,this.hasAnyIconTextFit=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Te.ae.identity([]),this.placementViewportMatrix=Te.ae.identity([]);var t=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Xp(this.zoom,t["text-size"]),this.iconSizeData=Xp(this.zoom,t["icon-size"]);const i=this.layers[0].layout,r=i.get("symbol-sort-key"),a=i.get("symbol-z-order");this.canOverlap=i.get("text-allow-overlap")||i.get("icon-allow-overlap")||i.get("text-ignore-placement")||i.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==a&&void 0!==r.constantOr(1),this.sortFeaturesByY=("viewport-y"===a||"auto"===a&&!this.sortFeaturesByKey)&&this.canOverlap,this.writingModes=i.get("text-writing-mode").map(e=>nf[e]),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id),this.sourceID=e.sourceID,this.projection=e.projection,this.hasAnyZOffset=!1,this.zOffsetSortDirty=!1,this.zOffsetBuffersNeedUpload=i.get("symbol-z-elevate"),this.activeReplacements=[],this.replacementUpdateTime=0}createArrays(){this.text=new Am(new Nl(this.layers,{zoom:this.zoom,lut:this.lut},e=>/^text/.test(e))),this.icon=new Am(new Nl(this.layers,{zoom:this.zoom,lut:this.lut},e=>/^icon/.test(e))),this.glyphOffsetArray=new nl,this.lineVertexArray=new ol,this.symbolInstances=new al}calculateGlyphDependencies(t,i,e,r,a){for(let e=0;e{e=_h(e.x,e.y,a,1),t=_h(t.x,t.y,a,1);return Te.$.dot(e,t){e.text=function(e,t){t=i.layout.get("text-transform").evaluate(t,{});return"uppercase"===t?e=e.toLocaleUpperCase():"lowercase"===t&&(e=e.toLocaleLowerCase()),e=Wo.applyArabicShaping?Wo.applyArabicShaping(e):e}(e.text,t)}),e}(i,o,v))}if(p){const Te=o.getValueAndResolveTokens("icon-image",v,a,y);t=Te instanceof aa?Te:aa.fromString(Te)}if(e||t){var m=this.sortFeaturesByKey?f.evaluate(v,{},a):void 0;if(this.features.push({id:h,text:e,icon:t,index:u,sourceLayerIndex:x,geometry:v.geometry,properties:r.properties,type:bm[r.type],sortKey:m}),t&&(_[t.namePrimary]=!0,t.nameSecondary&&(_[t.nameSecondary]=!0)),e){const Te=c.evaluate(v,{},a).join(","),i="map"===s.get("text-rotation-alignment")&&"point"!==s.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&0<=this.writingModes.indexOf(nf.vertical);for(const r of e.sections)if(r.image)_[r.image.namePrimary]=!0;else{const a=zo(e.toString()),n=r.fontStack||Te,o=g[n]=g[n]||{};this.calculateGlyphDependencies(r.text,o,i,this.allowVerticalPlacement,a)}}}}}"line"===s.get("symbol-placement")&&(this.features=function(t){const a={},n={},o=[];let i=0;function r(e){o.push(t[e]),i++}function s(e,t,i){var r=n[e];return delete n[e],n[t]=r,o[r].geometry[0].pop(),o[r].geometry[0]=o[r].geometry[0].concat(i[0]),r}function l(e,t,i){var r=a[t];return delete a[t],a[e]=r,o[r].geometry[0].shift(),o[r].geometry[0]=i[0].concat(o[r].geometry[0]),r}function c(e,t,i){i=i?t[0][t[0].length-1]:t[0][0];return`${e}:${i.x}:`+i.y}for(let e=0;ee.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((e,t)=>e.sortKey-t.sortKey)}}update(e,t,i,r,a){var n=0!==Object.keys(e).length;n&&!this.stateDependentLayers.length||(n=n?this.stateDependentLayers:this.layers,this.text.programConfigurations.updatePaintArrays(e,t,n,i,r,a),this.icon.programConfigurations.updatePaintArrays(e,t,n,i,r,a))}updateZOffset(){const t=(t,i,r)=>{(a+=i)>t.length&&t.resize(a);for(let e=-i;e<0;e++)t.emplace(e+a,r)},i=(t,i,r)=>{(n+=i)>t.length&&t.resize(n);for(let e=-i;e<0;e++)t.emplace(e+n,r)};if(!this.zOffsetBuffersNeedUpload)return;this.zOffsetBuffersNeedUpload=!1;let a=0,n=0;for(let e=0;er[e]-r[t]||a[t]-a[e]),n}getSortedIndexesByZOffset(){if(!this.zOffsetSortDirty)return this.symbolInstanceIndexesSortedZOffset;if(!this.symbolInstanceIndexesSortedZOffset){this.symbolInstanceIndexesSortedZOffset=[];for(let e=0;ethis.symbolInstances.get(t).zOffset-this.symbolInstances.get(e).zOffset)}addToSortKeyRanges(e,t){const i=this.sortKeyRanges[this.sortKeyRanges.length-1];i&&i.sortKey===t?i.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:t,symbolInstanceStart:e,symbolInstanceEnd:e+1})}sortFeatures(e){if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(1>=1);){const Te=t+r>>1,F=i+a>>1;1&e?(r=t,a=i,t=n,i=o):(t=r,i=a,r=n,a=o),n=Te,o=F}const F=4*s;Rm[0+F]=t,Rm[1+F]=i,Rm[2+F]=r,Rm[3+F]=a}const Lm=new Uint16Array(2178),km=new Uint8Array(1089),Om=new Uint16Array(1089);function Bm(e){return 0===e?-.03125:32===e?.03125:0}var Fm=E([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Nm{constructor(e,t,i,r){this.id=Nm.uniqueIdxCounter,Nm.uniqueIdxCounter++;const a=(this.context=e).gl;this.buffer=a.createBuffer(),this.dynamicDraw=Boolean(i),this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),a.bufferData(a.ELEMENT_ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?a.DYNAMIC_DRAW:a.STATIC_DRAW),this.dynamicDraw||r||t.destroy()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(e){this.id=Nm.uniqueIdxCounter,Nm.uniqueIdxCounter++;const t=this.context.gl;this.context.unbindVAO(),this.bind(),t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}Nm.uniqueIdxCounter=0;class Vm{constructor(e,t,i){this.func=e,this.mask=t,this.range=i}}Vm.ReadOnly=!1,Vm.ReadWrite=!0,Vm.disabled=new Vm(519,Vm.ReadOnly,[0,1]);class Um{constructor(e,t,i,r,a,n){this.test=e,this.ref=t,this.mask=i,this.fail=r,this.depthFail=a,this.pass=n}}Um.disabled=new Um({func:519,mask:0},0,0,7680,7680,7680);class jm{constructor(e,t,i,r){this.blendFunction=e,this.blendColor=t,this.mask=i,this.blendEquation=r}}jm.disabled=new jm(jm.Replace=[1,0,1,0],g.transparent,[!1,!1,!1,!1]),jm.unblended=new jm(jm.Replace,g.transparent,[!0,!0,!0,!0]),jm.alphaBlended=new jm([1,771,1,771],g.transparent,[!0,!0,!0,!0]),jm.alphaBlendedNonPremultiplied=new jm([770,771,770,771],g.transparent,[!0,!0,!0,!0]),jm.multiply=new jm([774,0,774,0],g.transparent,[!0,!0,!0,!0]);class Gm{constructor(e,t,i){this.enable=e,this.mode=t,this.frontFace=i}}Gm.disabled=new Gm(!1,1029,2305),Gm.backCCW=new Gm(!0,1029,2305),Gm.backCW=new Gm(!0,1029,2304),Gm.frontCW=new Gm(!0,1028,2304),Gm.frontCCW=new Gm(!0,1028,2305);l=E([{name:"a_index",type:"Int16",components:1}]);const qm={type:2,extent:ue,loadGeometry:()=>[[new G(0,0),new G(ue+1,0),new G(ue+1,ue+1),new G(0,ue+1),new G(0,0)]]};class $m{constructor(e,t,i,r,a){this.tileID=e,this.uid=ri++,this.uses=0,this.tileSize=t,this.tileZoom=i,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.isRaster=a,r&&r.style&&(this._lastUpdatedBrightness=r.style.getBrightness()),this.expiredRequestCount=0,this.state="loading",r&&r.transform&&(this.projection=r.transform.projection)}registerFadeDuration(e){e+=this.timeAdded;et.getLayer(e)).filter(Boolean);if(0!==e.length){r.layers=e,r.stateDependentLayerIds&&(r.stateDependentLayers=r.stateDependentLayerIds.map(t=>e.filter(e=>e.id===t)[0]));for(const t of e)i[t.fqid]=r}}return i}(e.buckets,t.style),this.hasSymbolBuckets=!1;for(const e in this.buckets){const t=this.buckets[e];if(t instanceof Pm){if(this.hasSymbolBuckets=!0,!i)break;t.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const e in this.buckets){const t=this.buckets[e];if(t instanceof Pm&&t.hasRTLText){this.hasRTLText=!0,Wo.isLoading()||Wo.isLoaded()||"deferred"!==Vo||$o();break}}this.queryPadding=0;for(const e in this.buckets){const i=this.buckets[e],a=t.style.getOwnLayer(e);var r;a&&(r=a.queryRadius(i),this.queryPadding=Math.max(this.queryPadding,r))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage),e.lineAtlas&&(this.lineAtlas=e.lineAtlas),this._lastUpdatedBrightness=e.brightness}else this.collisionBoxArray=new el}unloadVectorData(){if(this.hasData()){for(const e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlas&&(this.imageAtlas=null),this.lineAtlas&&(this.lineAtlas=null),this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.lineAtlasTexture&&this.lineAtlasTexture.destroy(),this._tileBoundsBuffer&&(this._tileBoundsBuffer.destroy(),this._tileBoundsIndexBuffer.destroy(),this._tileBoundsSegments.destroy(),this._tileBoundsBuffer=null),this._tileDebugBuffer&&(this._tileDebugBuffer.destroy(),this._tileDebugSegments.destroy(),this._tileDebugBuffer=null),this._tileDebugIndexBuffer&&(this._tileDebugIndexBuffer.destroy(),this._tileDebugIndexBuffer=null),this._globeTileDebugBorderBuffer&&(this._globeTileDebugBorderBuffer.destroy(),this._globeTileDebugBorderBuffer=null),this._tileDebugTextBuffer&&(this._tileDebugTextBuffer.destroy(),this._tileDebugTextSegments.destroy(),this._tileDebugTextIndexBuffer.destroy(),this._tileDebugTextBuffer=null),this._globeTileDebugTextBuffer&&(this._globeTileDebugTextBuffer.destroy(),this._globeTileDebugTextBuffer=null),this.latestFeatureIndex=null,this.state="unloaded"}}getBucket(e){return this.buckets[e.fqid]}upload(e){for(const t in this.buckets){const i=this.buckets[t];i.uploadPending()&&i.upload(e)}const t=e.gl,i=this.imageAtlas;var r;i&&!i.uploaded&&(r=!!Object.keys(i.patternPositions).length,this.imageAtlasTexture=new zm(e,i.image,t.RGBA,{useMipmap:r}),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new zm(e,this.glyphAtlasImage,t.R8),this.glyphAtlasImage=null),this.lineAtlas&&!this.lineAtlas.uploaded&&(this.lineAtlasTexture=new zm(e,this.lineAtlas.image,t.R8),this.lineAtlas.uploaded=!0)}prepare(e,t,i){this.imageAtlas&&this.imageAtlasTexture&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture,i),t&&this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&(e=t.style.getBrightness(),!this._lastUpdatedBrightness&&!e||this._lastUpdatedBrightness&&e&&Math.abs(this._lastUpdatedBrightness-e)<.001||(this._lastUpdatedBrightness=e,this.updateBuckets(void 0,t)))}queryRenderedFeatures(e,t,i,r,a,n,o,s){return this.latestFeatureIndex&&(this.latestFeatureIndex.rawTileData||this.latestFeatureIndex.is3DTile)?this.latestFeatureIndex.query({tileResult:r,pixelPosMatrix:o,transform:n,params:a,tileTransform:this.tileTransform},e,t,i):{}}querySourceFeatures(t,e){const i=this.latestFeatureIndex;if(i&&i.rawTileData){const r=i.loadVTLayers(),a=e?e.sourceLayer:"",n=r._geojsonTileLayer||r[a];if(n){const o=os(e&&e.filter),{z:s,x:l,y:c}=this.tileID.canonical,h={z:s,x:l,y:c};for(let e=0;et?e=!1:i&&!(this.expirationTime>1,c=n+l>>1,h=s+c-n,t=c+a-s,d=33*n+a,p=33*l+o,f=33*c+s,m=16<=Math.hypot((Lm[2*d+0]+Lm[2*p+0])/2-Lm[2*f+0],(Lm[2*d+1]+Lm[2*p+1])/2-Lm[2*f+1]);km[f]=km[f]||(m?1:0),e<1022&&(km[f]=km[f]||km[33*(n+t>>1)+(a+h>>1)]||km[33*(l+t>>1)+(o+h>>1)])}const o=new Es,l=new Vs;let s=0;function c(e,t){var i=33*t+e;return 0===Om[i]&&(o.emplaceBack(Lm[2*i+0],Lm[2*i+1],e*ue/32,t*ue/32),Om[i]=++s),Om[i]-1}function h(e,t,i,r,a,n){const o=e+i>>1,s=t+r>>1;if(1{var n=(e-t)/(a-1),o=(r-i)/(a-1),s=f.length;for(let e=0;eh*e+t);for(let e=0;e>1|(21845&u_)<<1;h_[u_]=((65280&(d_=(61680&(d_=(52428&d_)>>2|(13107&d_)<<2))>>4|(3855&d_)<<4))>>8|(255&d_)<<8)>>1}for(var p_=function(e,t,i){for(var r=e.length,a=0,n=new r_(t);a>l]=c;return s},f_=new i_(288),u_=0;u_<144;++u_)f_[u_]=8;for(u_=144;u_<256;++u_)f_[u_]=9;for(u_=256;u_<280;++u_)f_[u_]=7;for(u_=280;u_<288;++u_)f_[u_]=8;var m_=new i_(32);for(u_=0;u_<32;++u_)m_[u_]=5;function __(e){for(var t=e[0],i=1;it&&(t=e[i]);return t}function g_(e,t,i){var r=t/8|0;return(e[r]|e[1+r]<<8)>>(7&t)&i}function y_(e,t){var i=t/8|0;return(e[i]|e[1+i]<<8|e[2+i]<<16)>>(7&t)}function x_(e,t,i){if((t=new Error(t||w_[e])).code=e,Error.captureStackTrace&&Error.captureStackTrace(t,x_),i)return t;throw t}var v_=p_(f_,9),b_=p_(m_,5),w_=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],n=new i_(0),s="undefined"!=typeof TextDecoder&&new TextDecoder;try{s.decode(n,{stream:!0})}catch(Te){}const T_={gzip_data:"gzip"};class E_ extends Error{constructor(e){super(e),this.name="MRTError"}}const S_={0:"uint32",1:"uint32",2:"uint16",3:"uint8"},M_={uint32:1,uint16:2,uint8:4},I_={uint32:Uint32Array,uint16:Uint16Array,uint8:Uint8Array};let A_,C_;class P_{constructor(e=5){this.x=NaN,this.y=NaN,this.z=NaN,this.layers={},this._cacheSize=e}getLayer(e){var t=this.layers[e];if(t)return t;throw new E_(`Layer '${e}' not found`)}getHeaderLength(e){const t=new Uint8Array(e),i=new DataView(e);if(13!==t[0])throw new E_("File is not a valid MRT.");return i.getUint32(1,!0)}parseHeader(e){const t=new Uint8Array(e),i=this.getHeaderLength(e);if(t.length= ${i} but got buffer of length `+t.length);var r=new A_(t.subarray(0,i)).readFields(Zm,{header_length:0,x:0,y:0,z:0,layers:[]},void 0);if(!isNaN(this.x)&&(this.x!==r.x||this.y!==r.y||this.z!==r.z))throw new E_(`Invalid attempt to parse header ${r.z}/${r.x}/${r.y} for tile ${this.z}/${this.x}/`+this.y);this.x=r.x,this.y=r.y,this.z=r.z;for(const e of r.layers)this.layers[e.name]=new z_(e,{cacheSize:this._cacheSize});return this}createDecodingTask(e){const i=[],r=this.getLayer(e.layerName);for(var t of e.blockIndices){const n=r.dataIndex[t],o=n.first_byte-e.firstByte,s=n.last_byte-e.firstByte;var a;r._blocksInProgress.has(t)||(a={layerName:r.name,firstByte:o,lastByte:s,pixelFormat:r.pixelFormat,blockIndex:t,blockShape:[n.bands.length].concat(r.bandShape),buffer:r.buffer,codec:n.codec.codec,filters:n.filters.map(e=>e.filter)},r._blocksInProgress.add(t),i.push(a))}return new D_(i,()=>{i.forEach(e=>r._blocksInProgress.delete(e.blockIndex))},(e,t)=>{if(i.forEach(e=>r._blocksInProgress.delete(e.blockIndex)),e)throw e;t.forEach(e=>{this.getLayer(e.layerName).processDecodedData(e)})})}}class z_{constructor({version:e,name:t,units:i,tilesize:r,pixel_format:a,buffer:n,data_index:o},s){if(this.version=e,1!==this.version)throw new E_("Cannot parse raster layer encoded with MRT version "+e);this.name=t,this.units=i,this.tileSize=r,this.buffer=n,this.pixelFormat=S_[a],this.dataIndex=o,this.bandShape=[r+2*n,r+2*n,M_[this.pixelFormat]],this._decodedBlocks=new e_(s?s.cacheSize:5),this._blocksInProgress=new Set}get dimension(){return M_[this.pixelFormat]}get cacheSize(){return this._decodedBlocks.capacity}getBandList(){return this.dataIndex.map(({bands:e})=>e).flat()}processDecodedData(e){var t=e.blockIndex.toString();this._decodedBlocks.get(t)||this._decodedBlocks.put(t,e.data)}getBlockForBand(e){let t=0;switch(typeof e){case"string":for(var[i,r]of this.dataIndex.entries()){for(var[a,n]of r.bands.entries())if(n===e)return{bandIndex:t+a,blockIndex:i,blockBandIndex:a};t+=r.bands.length}break;case"number":for(var[o,s]of this.dataIndex.entries()){if(e>=t&ðis.cacheSize)throw new E_(`Number of blocks to decode (${a.size}) exceeds cache size (${this.cacheSize}).`);return{layerName:this.name,firstByte:t,lastByte:i,blockIndices:r}}hasBand(e){e=this.getBlockForBand(e).blockIndex;return 0<=e}hasDataForBand(e){const t=this.getBlockForBand(e)["blockIndex"];return 0<=t&&!!this._decodedBlocks.get(t.toString())}getBandView(e){const{blockIndex:t,blockBandIndex:i}=this.getBlockForBand(e),r=this._decodedBlocks.get(t.toString());if(!r)throw new E_(`Data for band ${JSON.stringify(e)} of layer "${this.name}" not decoded.`);var e=this.dataIndex[t],a=this.bandShape.reduce((e,t)=>e*t,1),n=i*a,n=r.subarray(n,n+a);return{data:n,bytes:new Uint8Array(n.buffer).subarray(n.byteOffset,n.byteOffset+n.byteLength),tileSize:this.tileSize,buffer:this.buffer,pixelFormat:this.pixelFormat,dimension:this.dimension,offset:0!==e.offset?e.offset:e.deprecated_offset,scale:0!==e.scale?e.scale:e.deprecated_scale}}}P_.setPbf=function(e){A_=e};class D_{constructor(e,t,i){this.tasks=e,this._onCancel=t,this._onComplete=i,this._finalized=!1}cancel(){this._finalized||(this._onCancel(),this._finalized=!0)}complete(e,t){this._finalized||(this._onComplete(e,t),this._finalized=!0)}}P_.performDecoding=function(e,t){const l=new Uint8Array(e);return Promise.all(t.tasks.map(e=>{const{layerName:t,firstByte:i,lastByte:r,pixelFormat:u,blockShape:d,blockIndex:p,filters:f,codec:a}=e,n=l.subarray(i,r+1),o=new Uint32Array(d[0]*d[1]*d[2]);let s;if("gzip_data"!==a)throw new E_("Unhandled codec: "+a);return(s=function(e,t){if(!globalThis.DecompressionStream&&"gzip_data"===t)return Promise.resolve(((i=function(e){31==e[0]&&139==e[1]&&8==e[2]||x_(6,"invalid gzip data");var t=e[3],i=10;4&t&&(i+=2+(e[10]|e[11]<<8));for(var r=(t>>3&1)+(t>>4&1);0r.length&&x_(6,"invalid gzip data"),function(e,t,i){var r=e.length;if(!r||t.f&&!t.l)return i||new i_(0);var a=!i,n=a||2!=t.i,o=t.i;a&&(i=new i_(3*r));function s(e){var t=i.length;t>4)<16)w[E++]=S;else{var I=0,A=0;for(16==S?(A=3+g_(e,h,3),h+=2,I=w[E-1]):17==S?(A=3+g_(e,h,7),h+=3):18==S&&(A=11+g_(e,h,127),h+=7);A--;)w[E++]=I}}var g=w.subarray(0,y),C=w.subarray(y),f=__(g),m=__(C),d=p_(g,f),p=p_(C,m)}else x_(1);if(_>4;if((h+=15&I)>_){o&&x_(0);break}if(I||x_(2),z<256)i[u++]=z;else{if(256==z){P=h,d=null;break}var D,R=z-254,z=(264>4;if(z||x_(3),h+=15&z,C=c_[L],3a.length)&&(l=a.length),new i_(a.subarray(0,l))):i.subarray(0,u)}(r.subarray(i,-8),{i:2},new i_(((i=r)[(r=i.length)-4]|i[r-3]<<8|i[r-2]<<16|i[r-1]<<24)>>>0))));var i=T_[t];if(!i)throw new Error("Unhandled codec: "+t);var r=new globalThis.DecompressionStream(i);return new Response(new Blob([e]).stream().pipeThrough(r)).arrayBuffer().then(e=>new Uint8Array(e))}(n,a).then(e=>{var e=new A_(e),t=o;return e.readFields(Km,t),new I_[u](o.buffer)})).then(i=>{for(let e=f.length-1;0<=e;e--)switch(f[e]){case"delta_filter":{r=void 0;a=void 0;n=void 0;o=void 0;s=void 0;l=void 0;c=void 0;var r=i;var a=d;if(4!==a.length)throw new Error(`Expected data of dimension 4 but got ${a.length}.`);let t=a[3];for(let e=2;1<=e;e--){var n=1===e?1:0,o=2===e?1:0;for(let e=0;e