diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..496ee2ca6a2f08396a4076fe43dedf3dc0da8b6d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.DS_Store
\ No newline at end of file
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000000000000000000000000000000000000..c336e61470c04225875f9c8f9fc6945776b809ad
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,14 @@
+image: alpine:latest
+
+stages:
+ - deploy
+
+pages:
+ stage: deploy
+ script:
+ - echo "Deploying to https://transfer.hft-stuttgart.de/pages/$CI_PROJECT_PATH/"
+ artifacts:
+ paths:
+ - public
+ only:
+ - master
diff --git a/public/app.config.json b/public/app.config.json
new file mode 100644
index 0000000000000000000000000000000000000000..035a1ce3b0d8818311e0fbe4bd5647a1f86b7bfb
--- /dev/null
+++ b/public/app.config.json
@@ -0,0 +1,9 @@
+{
+ "_id": "8e48e340-60fa-49fe-b79c-c03b9ca8da64",
+ "name": "Space4iCity",
+ "description": "Space4iCity project application",
+ "properties": {},
+ "modules": [
+ "configs/1be4e880-c1d9-4392-9278-261142556a98.json"
+ ]
+}
\ No newline at end of file
diff --git a/public/assets/@mdi/font/LICENSE b/public/assets/@mdi/font/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..0bc81147ab924149873d16c716c1d2d7146ad271
--- /dev/null
+++ b/public/assets/@mdi/font/LICENSE
@@ -0,0 +1,20 @@
+Pictogrammers Free License
+--------------------------
+
+This icon collection is released as free, open source, and GPL friendly by
+the [Pictogrammers](http://pictogrammers.com/) icon group. You may use it
+for commercial projects, open source projects, or anything really.
+
+# Icons: Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0)
+Some of the icons are redistributed under the Apache 2.0 license. All other
+icons are either redistributed under their respective licenses or are
+distributed under the Apache 2.0 license.
+
+# Fonts: Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0)
+All web and desktop fonts are distributed under the Apache 2.0 license. Web
+and desktop fonts contain some icons that are redistributed under the Apache
+2.0 license. All other icons are either redistributed under their respective
+licenses or are distributed under the Apache 2.0 license.
+
+# Code: MIT (https://opensource.org/licenses/MIT)
+The MIT license applies to all non-font and non-icon files.
diff --git a/public/assets/@mdi/font/README.md b/public/assets/@mdi/font/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..2ffefd6c471860f040cb44e3aa9ec93c99979baf
--- /dev/null
+++ b/public/assets/@mdi/font/README.md
@@ -0,0 +1,25 @@
+> *Note:* Please use the main [MaterialDesign](https://github.com/Templarian/MaterialDesign/issues) repo to report issues. This repo is for distribution of the Webfont files only.
+
+# Webfont - Material Design Icons
+
+Webfont distribution for the [Material Design Icons](https://materialdesignicons.com).
+
+```
+npm install @mdi/font
+```
+
+> Package built with [@mdi/font-build](https://github.com/Templarian/MaterialDesign-Font-Build).
+
+## Related Packages
+
+[NPM @MDI Organization](https://npmjs.com/org/mdi)
+
+- JavaScript/Typescript: [MaterialDesign-JS](https://github.com/Templarian/MaterialDesign-JS)
+- SVG: [MaterialDesign-SVG](https://github.com/Templarian/MaterialDesign-SVG)
+- Font-Build [MaterialDesign-Font-Build](https://github.com/Templarian/MaterialDesign-Font-Build)
+- Desktop Font: [MaterialDesign-Font](https://github.com/Templarian/MaterialDesign-Font)
+
+## Learn More
+
+- [MaterialDesignIcons.com](https://materialdesignicons.com)
+- https://github.com/Templarian/MaterialDesign
diff --git a/public/assets/@mdi/font/css/materialdesignicons.min-680621ca.css b/public/assets/@mdi/font/css/materialdesignicons.min-680621ca.css
new file mode 100644
index 0000000000000000000000000000000000000000..a4d51068ceb350b850287db0791ec1fcd126c772
--- /dev/null
+++ b/public/assets/@mdi/font/css/materialdesignicons.min-680621ca.css
@@ -0,0 +1,3 @@
+@font-face{font-family:"Material Design Icons";src:url("../fonts/materialdesignicons-webfont.woff2?v=7.4.47") format("woff2");font-weight:normal;font-style:normal}.mdi:before,.mdi-set{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.mdi-ab-testing::before{content:"\F01C9"}.mdi-abacus::before{content:"\F16E0"}.mdi-abjad-arabic::before{content:"\F1328"}.mdi-abjad-hebrew::before{content:"\F1329"}.mdi-abugida-devanagari::before{content:"\F132A"}.mdi-abugida-thai::before{content:"\F132B"}.mdi-access-point::before{content:"\F0003"}.mdi-access-point-check::before{content:"\F1538"}.mdi-access-point-minus::before{content:"\F1539"}.mdi-access-point-network::before{content:"\F0002"}.mdi-access-point-network-off::before{content:"\F0BE1"}.mdi-access-point-off::before{content:"\F1511"}.mdi-access-point-plus::before{content:"\F153A"}.mdi-access-point-remove::before{content:"\F153B"}.mdi-account::before{content:"\F0004"}.mdi-account-alert::before{content:"\F0005"}.mdi-account-alert-outline::before{content:"\F0B50"}.mdi-account-arrow-down::before{content:"\F1868"}.mdi-account-arrow-down-outline::before{content:"\F1869"}.mdi-account-arrow-left::before{content:"\F0B51"}.mdi-account-arrow-left-outline::before{content:"\F0B52"}.mdi-account-arrow-right::before{content:"\F0B53"}.mdi-account-arrow-right-outline::before{content:"\F0B54"}.mdi-account-arrow-up::before{content:"\F1867"}.mdi-account-arrow-up-outline::before{content:"\F186A"}.mdi-account-badge::before{content:"\F1B0A"}.mdi-account-badge-outline::before{content:"\F1B0B"}.mdi-account-box::before{content:"\F0006"}.mdi-account-box-edit-outline::before{content:"\F1CC8"}.mdi-account-box-minus-outline::before{content:"\F1CC9"}.mdi-account-box-multiple::before{content:"\F0934"}.mdi-account-box-multiple-outline::before{content:"\F100A"}.mdi-account-box-outline::before{content:"\F0007"}.mdi-account-box-plus-outline::before{content:"\F1CCA"}.mdi-account-cancel::before{content:"\F12DF"}.mdi-account-cancel-outline::before{content:"\F12E0"}.mdi-account-card::before{content:"\F1BA4"}.mdi-account-card-outline::before{content:"\F1BA5"}.mdi-account-cash::before{content:"\F1097"}.mdi-account-cash-outline::before{content:"\F1098"}.mdi-account-check::before{content:"\F0008"}.mdi-account-check-outline::before{content:"\F0BE2"}.mdi-account-child::before{content:"\F0A89"}.mdi-account-child-circle::before{content:"\F0A8A"}.mdi-account-child-outline::before{content:"\F10C8"}.mdi-account-circle::before{content:"\F0009"}.mdi-account-circle-outline::before{content:"\F0B55"}.mdi-account-clock::before{content:"\F0B56"}.mdi-account-clock-outline::before{content:"\F0B57"}.mdi-account-cog::before{content:"\F1370"}.mdi-account-cog-outline::before{content:"\F1371"}.mdi-account-convert::before{content:"\F000A"}.mdi-account-convert-outline::before{content:"\F1301"}.mdi-account-cowboy-hat::before{content:"\F0E9B"}.mdi-account-cowboy-hat-outline::before{content:"\F17F3"}.mdi-account-credit-card::before{content:"\F1BA6"}.mdi-account-credit-card-outline::before{content:"\F1BA7"}.mdi-account-details::before{content:"\F0631"}.mdi-account-details-outline::before{content:"\F1372"}.mdi-account-edit::before{content:"\F06BC"}.mdi-account-edit-outline::before{content:"\F0FFB"}.mdi-account-eye::before{content:"\F0420"}.mdi-account-eye-outline::before{content:"\F127B"}.mdi-account-file::before{content:"\F1CA7"}.mdi-account-file-outline::before{content:"\F1CA8"}.mdi-account-file-text::before{content:"\F1CA9"}.mdi-account-file-text-outline::before{content:"\F1CAA"}.mdi-account-filter::before{content:"\F0936"}.mdi-account-filter-outline::before{content:"\F0F9D"}.mdi-account-group::before{content:"\F0849"}.mdi-account-group-outline::before{content:"\F0B58"}.mdi-account-hard-hat::before{content:"\F05B5"}.mdi-account-hard-hat-outline::before{content:"\F1A1F"}.mdi-account-heart::before{content:"\F0899"}.mdi-account-heart-outline::before{content:"\F0BE3"}.mdi-account-injury::before{content:"\F1815"}.mdi-account-injury-outline::before{content:"\F1816"}.mdi-account-key::before{content:"\F000B"}.mdi-account-key-outline::before{content:"\F0BE4"}.mdi-account-lock::before{content:"\F115E"}.mdi-account-lock-open::before{content:"\F1960"}.mdi-account-lock-open-outline::before{content:"\F1961"}.mdi-account-lock-outline::before{content:"\F115F"}.mdi-account-minus::before{content:"\F000D"}.mdi-account-minus-outline::before{content:"\F0AEC"}.mdi-account-multiple::before{content:"\F000E"}.mdi-account-multiple-check::before{content:"\F08C5"}.mdi-account-multiple-check-outline::before{content:"\F11FE"}.mdi-account-multiple-minus::before{content:"\F05D3"}.mdi-account-multiple-minus-outline::before{content:"\F0BE5"}.mdi-account-multiple-outline::before{content:"\F000F"}.mdi-account-multiple-plus::before{content:"\F0010"}.mdi-account-multiple-plus-outline::before{content:"\F0800"}.mdi-account-multiple-remove::before{content:"\F120A"}.mdi-account-multiple-remove-outline::before{content:"\F120B"}.mdi-account-music::before{content:"\F0803"}.mdi-account-music-outline::before{content:"\F0CE9"}.mdi-account-network::before{content:"\F0011"}.mdi-account-network-off::before{content:"\F1AF1"}.mdi-account-network-off-outline::before{content:"\F1AF2"}.mdi-account-network-outline::before{content:"\F0BE6"}.mdi-account-off::before{content:"\F0012"}.mdi-account-off-outline::before{content:"\F0BE7"}.mdi-account-outline::before{content:"\F0013"}.mdi-account-plus::before{content:"\F0014"}.mdi-account-plus-outline::before{content:"\F0801"}.mdi-account-question::before{content:"\F0B59"}.mdi-account-question-outline::before{content:"\F0B5A"}.mdi-account-reactivate::before{content:"\F152B"}.mdi-account-reactivate-outline::before{content:"\F152C"}.mdi-account-remove::before{content:"\F0015"}.mdi-account-remove-outline::before{content:"\F0AED"}.mdi-account-school::before{content:"\F1A20"}.mdi-account-school-outline::before{content:"\F1A21"}.mdi-account-search::before{content:"\F0016"}.mdi-account-search-outline::before{content:"\F0935"}.mdi-account-settings::before{content:"\F0630"}.mdi-account-settings-outline::before{content:"\F10C9"}.mdi-account-star::before{content:"\F0017"}.mdi-account-star-outline::before{content:"\F0BE8"}.mdi-account-supervisor::before{content:"\F0A8B"}.mdi-account-supervisor-circle::before{content:"\F0A8C"}.mdi-account-supervisor-circle-outline::before{content:"\F14EC"}.mdi-account-supervisor-outline::before{content:"\F112D"}.mdi-account-switch::before{content:"\F0019"}.mdi-account-switch-outline::before{content:"\F04CB"}.mdi-account-sync::before{content:"\F191B"}.mdi-account-sync-outline::before{content:"\F191C"}.mdi-account-tag::before{content:"\F1C1B"}.mdi-account-tag-outline::before{content:"\F1C1C"}.mdi-account-tie::before{content:"\F0CE3"}.mdi-account-tie-hat::before{content:"\F1898"}.mdi-account-tie-hat-outline::before{content:"\F1899"}.mdi-account-tie-outline::before{content:"\F10CA"}.mdi-account-tie-voice::before{content:"\F1308"}.mdi-account-tie-voice-off::before{content:"\F130A"}.mdi-account-tie-voice-off-outline::before{content:"\F130B"}.mdi-account-tie-voice-outline::before{content:"\F1309"}.mdi-account-tie-woman::before{content:"\F1A8C"}.mdi-account-voice::before{content:"\F05CB"}.mdi-account-voice-off::before{content:"\F0ED4"}.mdi-account-wrench::before{content:"\F189A"}.mdi-account-wrench-outline::before{content:"\F189B"}.mdi-adjust::before{content:"\F001A"}.mdi-advertisements::before{content:"\F192A"}.mdi-advertisements-off::before{content:"\F192B"}.mdi-air-conditioner::before{content:"\F001B"}.mdi-air-filter::before{content:"\F0D43"}.mdi-air-horn::before{content:"\F0DAC"}.mdi-air-humidifier::before{content:"\F1099"}.mdi-air-humidifier-off::before{content:"\F1466"}.mdi-air-purifier::before{content:"\F0D44"}.mdi-air-purifier-off::before{content:"\F1B57"}.mdi-airbag::before{content:"\F0BE9"}.mdi-airballoon::before{content:"\F001C"}.mdi-airballoon-outline::before{content:"\F100B"}.mdi-airplane::before{content:"\F001D"}.mdi-airplane-alert::before{content:"\F187A"}.mdi-airplane-check::before{content:"\F187B"}.mdi-airplane-clock::before{content:"\F187C"}.mdi-airplane-cog::before{content:"\F187D"}.mdi-airplane-edit::before{content:"\F187E"}.mdi-airplane-landing::before{content:"\F05D4"}.mdi-airplane-marker::before{content:"\F187F"}.mdi-airplane-minus::before{content:"\F1880"}.mdi-airplane-off::before{content:"\F001E"}.mdi-airplane-plus::before{content:"\F1881"}.mdi-airplane-remove::before{content:"\F1882"}.mdi-airplane-search::before{content:"\F1883"}.mdi-airplane-settings::before{content:"\F1884"}.mdi-airplane-takeoff::before{content:"\F05D5"}.mdi-airport::before{content:"\F084B"}.mdi-alarm::before{content:"\F0020"}.mdi-alarm-bell::before{content:"\F078E"}.mdi-alarm-check::before{content:"\F0021"}.mdi-alarm-light::before{content:"\F078F"}.mdi-alarm-light-off::before{content:"\F171E"}.mdi-alarm-light-off-outline::before{content:"\F171F"}.mdi-alarm-light-outline::before{content:"\F0BEA"}.mdi-alarm-multiple::before{content:"\F0022"}.mdi-alarm-note::before{content:"\F0E71"}.mdi-alarm-note-off::before{content:"\F0E72"}.mdi-alarm-off::before{content:"\F0023"}.mdi-alarm-panel::before{content:"\F15C4"}.mdi-alarm-panel-outline::before{content:"\F15C5"}.mdi-alarm-plus::before{content:"\F0024"}.mdi-alarm-snooze::before{content:"\F068E"}.mdi-album::before{content:"\F0025"}.mdi-alert::before{content:"\F0026"}.mdi-alert-box::before{content:"\F0027"}.mdi-alert-box-outline::before{content:"\F0CE4"}.mdi-alert-circle::before{content:"\F0028"}.mdi-alert-circle-check::before{content:"\F11ED"}.mdi-alert-circle-check-outline::before{content:"\F11EE"}.mdi-alert-circle-outline::before{content:"\F05D6"}.mdi-alert-decagram::before{content:"\F06BD"}.mdi-alert-decagram-outline::before{content:"\F0CE5"}.mdi-alert-minus::before{content:"\F14BB"}.mdi-alert-minus-outline::before{content:"\F14BE"}.mdi-alert-octagon::before{content:"\F0029"}.mdi-alert-octagon-outline::before{content:"\F0CE6"}.mdi-alert-octagram::before{content:"\F0767"}.mdi-alert-octagram-outline::before{content:"\F0CE7"}.mdi-alert-outline::before{content:"\F002A"}.mdi-alert-plus::before{content:"\F14BA"}.mdi-alert-plus-outline::before{content:"\F14BD"}.mdi-alert-remove::before{content:"\F14BC"}.mdi-alert-remove-outline::before{content:"\F14BF"}.mdi-alert-rhombus::before{content:"\F11CE"}.mdi-alert-rhombus-outline::before{content:"\F11CF"}.mdi-alien::before{content:"\F089A"}.mdi-alien-outline::before{content:"\F10CB"}.mdi-align-horizontal-center::before{content:"\F11C3"}.mdi-align-horizontal-distribute::before{content:"\F1962"}.mdi-align-horizontal-left::before{content:"\F11C2"}.mdi-align-horizontal-right::before{content:"\F11C4"}.mdi-align-vertical-bottom::before{content:"\F11C5"}.mdi-align-vertical-center::before{content:"\F11C6"}.mdi-align-vertical-distribute::before{content:"\F1963"}.mdi-align-vertical-top::before{content:"\F11C7"}.mdi-all-inclusive::before{content:"\F06BE"}.mdi-all-inclusive-box::before{content:"\F188D"}.mdi-all-inclusive-box-outline::before{content:"\F188E"}.mdi-allergy::before{content:"\F1258"}.mdi-alpha::before{content:"\F002B"}.mdi-alpha-a::before{content:"\F0AEE"}.mdi-alpha-a-box::before{content:"\F0B08"}.mdi-alpha-a-box-outline::before{content:"\F0BEB"}.mdi-alpha-a-circle::before{content:"\F0BEC"}.mdi-alpha-a-circle-outline::before{content:"\F0BED"}.mdi-alpha-b::before{content:"\F0AEF"}.mdi-alpha-b-box::before{content:"\F0B09"}.mdi-alpha-b-box-outline::before{content:"\F0BEE"}.mdi-alpha-b-circle::before{content:"\F0BEF"}.mdi-alpha-b-circle-outline::before{content:"\F0BF0"}.mdi-alpha-c::before{content:"\F0AF0"}.mdi-alpha-c-box::before{content:"\F0B0A"}.mdi-alpha-c-box-outline::before{content:"\F0BF1"}.mdi-alpha-c-circle::before{content:"\F0BF2"}.mdi-alpha-c-circle-outline::before{content:"\F0BF3"}.mdi-alpha-d::before{content:"\F0AF1"}.mdi-alpha-d-box::before{content:"\F0B0B"}.mdi-alpha-d-box-outline::before{content:"\F0BF4"}.mdi-alpha-d-circle::before{content:"\F0BF5"}.mdi-alpha-d-circle-outline::before{content:"\F0BF6"}.mdi-alpha-e::before{content:"\F0AF2"}.mdi-alpha-e-box::before{content:"\F0B0C"}.mdi-alpha-e-box-outline::before{content:"\F0BF7"}.mdi-alpha-e-circle::before{content:"\F0BF8"}.mdi-alpha-e-circle-outline::before{content:"\F0BF9"}.mdi-alpha-f::before{content:"\F0AF3"}.mdi-alpha-f-box::before{content:"\F0B0D"}.mdi-alpha-f-box-outline::before{content:"\F0BFA"}.mdi-alpha-f-circle::before{content:"\F0BFB"}.mdi-alpha-f-circle-outline::before{content:"\F0BFC"}.mdi-alpha-g::before{content:"\F0AF4"}.mdi-alpha-g-box::before{content:"\F0B0E"}.mdi-alpha-g-box-outline::before{content:"\F0BFD"}.mdi-alpha-g-circle::before{content:"\F0BFE"}.mdi-alpha-g-circle-outline::before{content:"\F0BFF"}.mdi-alpha-h::before{content:"\F0AF5"}.mdi-alpha-h-box::before{content:"\F0B0F"}.mdi-alpha-h-box-outline::before{content:"\F0C00"}.mdi-alpha-h-circle::before{content:"\F0C01"}.mdi-alpha-h-circle-outline::before{content:"\F0C02"}.mdi-alpha-i::before{content:"\F0AF6"}.mdi-alpha-i-box::before{content:"\F0B10"}.mdi-alpha-i-box-outline::before{content:"\F0C03"}.mdi-alpha-i-circle::before{content:"\F0C04"}.mdi-alpha-i-circle-outline::before{content:"\F0C05"}.mdi-alpha-j::before{content:"\F0AF7"}.mdi-alpha-j-box::before{content:"\F0B11"}.mdi-alpha-j-box-outline::before{content:"\F0C06"}.mdi-alpha-j-circle::before{content:"\F0C07"}.mdi-alpha-j-circle-outline::before{content:"\F0C08"}.mdi-alpha-k::before{content:"\F0AF8"}.mdi-alpha-k-box::before{content:"\F0B12"}.mdi-alpha-k-box-outline::before{content:"\F0C09"}.mdi-alpha-k-circle::before{content:"\F0C0A"}.mdi-alpha-k-circle-outline::before{content:"\F0C0B"}.mdi-alpha-l::before{content:"\F0AF9"}.mdi-alpha-l-box::before{content:"\F0B13"}.mdi-alpha-l-box-outline::before{content:"\F0C0C"}.mdi-alpha-l-circle::before{content:"\F0C0D"}.mdi-alpha-l-circle-outline::before{content:"\F0C0E"}.mdi-alpha-m::before{content:"\F0AFA"}.mdi-alpha-m-box::before{content:"\F0B14"}.mdi-alpha-m-box-outline::before{content:"\F0C0F"}.mdi-alpha-m-circle::before{content:"\F0C10"}.mdi-alpha-m-circle-outline::before{content:"\F0C11"}.mdi-alpha-n::before{content:"\F0AFB"}.mdi-alpha-n-box::before{content:"\F0B15"}.mdi-alpha-n-box-outline::before{content:"\F0C12"}.mdi-alpha-n-circle::before{content:"\F0C13"}.mdi-alpha-n-circle-outline::before{content:"\F0C14"}.mdi-alpha-o::before{content:"\F0AFC"}.mdi-alpha-o-box::before{content:"\F0B16"}.mdi-alpha-o-box-outline::before{content:"\F0C15"}.mdi-alpha-o-circle::before{content:"\F0C16"}.mdi-alpha-o-circle-outline::before{content:"\F0C17"}.mdi-alpha-p::before{content:"\F0AFD"}.mdi-alpha-p-box::before{content:"\F0B17"}.mdi-alpha-p-box-outline::before{content:"\F0C18"}.mdi-alpha-p-circle::before{content:"\F0C19"}.mdi-alpha-p-circle-outline::before{content:"\F0C1A"}.mdi-alpha-q::before{content:"\F0AFE"}.mdi-alpha-q-box::before{content:"\F0B18"}.mdi-alpha-q-box-outline::before{content:"\F0C1B"}.mdi-alpha-q-circle::before{content:"\F0C1C"}.mdi-alpha-q-circle-outline::before{content:"\F0C1D"}.mdi-alpha-r::before{content:"\F0AFF"}.mdi-alpha-r-box::before{content:"\F0B19"}.mdi-alpha-r-box-outline::before{content:"\F0C1E"}.mdi-alpha-r-circle::before{content:"\F0C1F"}.mdi-alpha-r-circle-outline::before{content:"\F0C20"}.mdi-alpha-s::before{content:"\F0B00"}.mdi-alpha-s-box::before{content:"\F0B1A"}.mdi-alpha-s-box-outline::before{content:"\F0C21"}.mdi-alpha-s-circle::before{content:"\F0C22"}.mdi-alpha-s-circle-outline::before{content:"\F0C23"}.mdi-alpha-t::before{content:"\F0B01"}.mdi-alpha-t-box::before{content:"\F0B1B"}.mdi-alpha-t-box-outline::before{content:"\F0C24"}.mdi-alpha-t-circle::before{content:"\F0C25"}.mdi-alpha-t-circle-outline::before{content:"\F0C26"}.mdi-alpha-u::before{content:"\F0B02"}.mdi-alpha-u-box::before{content:"\F0B1C"}.mdi-alpha-u-box-outline::before{content:"\F0C27"}.mdi-alpha-u-circle::before{content:"\F0C28"}.mdi-alpha-u-circle-outline::before{content:"\F0C29"}.mdi-alpha-v::before{content:"\F0B03"}.mdi-alpha-v-box::before{content:"\F0B1D"}.mdi-alpha-v-box-outline::before{content:"\F0C2A"}.mdi-alpha-v-circle::before{content:"\F0C2B"}.mdi-alpha-v-circle-outline::before{content:"\F0C2C"}.mdi-alpha-w::before{content:"\F0B04"}.mdi-alpha-w-box::before{content:"\F0B1E"}.mdi-alpha-w-box-outline::before{content:"\F0C2D"}.mdi-alpha-w-circle::before{content:"\F0C2E"}.mdi-alpha-w-circle-outline::before{content:"\F0C2F"}.mdi-alpha-x::before{content:"\F0B05"}.mdi-alpha-x-box::before{content:"\F0B1F"}.mdi-alpha-x-box-outline::before{content:"\F0C30"}.mdi-alpha-x-circle::before{content:"\F0C31"}.mdi-alpha-x-circle-outline::before{content:"\F0C32"}.mdi-alpha-y::before{content:"\F0B06"}.mdi-alpha-y-box::before{content:"\F0B20"}.mdi-alpha-y-box-outline::before{content:"\F0C33"}.mdi-alpha-y-circle::before{content:"\F0C34"}.mdi-alpha-y-circle-outline::before{content:"\F0C35"}.mdi-alpha-z::before{content:"\F0B07"}.mdi-alpha-z-box::before{content:"\F0B21"}.mdi-alpha-z-box-outline::before{content:"\F0C36"}.mdi-alpha-z-circle::before{content:"\F0C37"}.mdi-alpha-z-circle-outline::before{content:"\F0C38"}.mdi-alphabet-aurebesh::before{content:"\F132C"}.mdi-alphabet-cyrillic::before{content:"\F132D"}.mdi-alphabet-greek::before{content:"\F132E"}.mdi-alphabet-latin::before{content:"\F132F"}.mdi-alphabet-piqad::before{content:"\F1330"}.mdi-alphabet-tengwar::before{content:"\F1337"}.mdi-alphabetical::before{content:"\F002C"}.mdi-alphabetical-off::before{content:"\F100C"}.mdi-alphabetical-variant::before{content:"\F100D"}.mdi-alphabetical-variant-off::before{content:"\F100E"}.mdi-altimeter::before{content:"\F05D7"}.mdi-ambulance::before{content:"\F002F"}.mdi-ammunition::before{content:"\F0CE8"}.mdi-ampersand::before{content:"\F0A8D"}.mdi-amplifier::before{content:"\F0030"}.mdi-amplifier-off::before{content:"\F11B5"}.mdi-anchor::before{content:"\F0031"}.mdi-android::before{content:"\F0032"}.mdi-android-studio::before{content:"\F0034"}.mdi-angle-acute::before{content:"\F0937"}.mdi-angle-obtuse::before{content:"\F0938"}.mdi-angle-right::before{content:"\F0939"}.mdi-angular::before{content:"\F06B2"}.mdi-angularjs::before{content:"\F06BF"}.mdi-animation::before{content:"\F05D8"}.mdi-animation-outline::before{content:"\F0A8F"}.mdi-animation-play::before{content:"\F093A"}.mdi-animation-play-outline::before{content:"\F0A90"}.mdi-ansible::before{content:"\F109A"}.mdi-antenna::before{content:"\F1119"}.mdi-anvil::before{content:"\F089B"}.mdi-apache-kafka::before{content:"\F100F"}.mdi-api::before{content:"\F109B"}.mdi-api-off::before{content:"\F1257"}.mdi-apple::before{content:"\F0035"}.mdi-apple-finder::before{content:"\F0036"}.mdi-apple-icloud::before{content:"\F0038"}.mdi-apple-ios::before{content:"\F0037"}.mdi-apple-keyboard-caps::before{content:"\F0632"}.mdi-apple-keyboard-command::before{content:"\F0633"}.mdi-apple-keyboard-control::before{content:"\F0634"}.mdi-apple-keyboard-option::before{content:"\F0635"}.mdi-apple-keyboard-shift::before{content:"\F0636"}.mdi-apple-safari::before{content:"\F0039"}.mdi-application::before{content:"\F08C6"}.mdi-application-array::before{content:"\F10F5"}.mdi-application-array-outline::before{content:"\F10F6"}.mdi-application-braces::before{content:"\F10F7"}.mdi-application-braces-outline::before{content:"\F10F8"}.mdi-application-brackets::before{content:"\F0C8B"}.mdi-application-brackets-outline::before{content:"\F0C8C"}.mdi-application-cog::before{content:"\F0675"}.mdi-application-cog-outline::before{content:"\F1577"}.mdi-application-edit::before{content:"\F00AE"}.mdi-application-edit-outline::before{content:"\F0619"}.mdi-application-export::before{content:"\F0DAD"}.mdi-application-import::before{content:"\F0DAE"}.mdi-application-outline::before{content:"\F0614"}.mdi-application-parentheses::before{content:"\F10F9"}.mdi-application-parentheses-outline::before{content:"\F10FA"}.mdi-application-settings::before{content:"\F0B60"}.mdi-application-settings-outline::before{content:"\F1555"}.mdi-application-variable::before{content:"\F10FB"}.mdi-application-variable-outline::before{content:"\F10FC"}.mdi-approximately-equal::before{content:"\F0F9E"}.mdi-approximately-equal-box::before{content:"\F0F9F"}.mdi-apps::before{content:"\F003B"}.mdi-apps-box::before{content:"\F0D46"}.mdi-arch::before{content:"\F08C7"}.mdi-archive::before{content:"\F003C"}.mdi-archive-alert::before{content:"\F14FD"}.mdi-archive-alert-outline::before{content:"\F14FE"}.mdi-archive-arrow-down::before{content:"\F1259"}.mdi-archive-arrow-down-outline::before{content:"\F125A"}.mdi-archive-arrow-up::before{content:"\F125B"}.mdi-archive-arrow-up-outline::before{content:"\F125C"}.mdi-archive-cancel::before{content:"\F174B"}.mdi-archive-cancel-outline::before{content:"\F174C"}.mdi-archive-check::before{content:"\F174D"}.mdi-archive-check-outline::before{content:"\F174E"}.mdi-archive-clock::before{content:"\F174F"}.mdi-archive-clock-outline::before{content:"\F1750"}.mdi-archive-cog::before{content:"\F1751"}.mdi-archive-cog-outline::before{content:"\F1752"}.mdi-archive-edit::before{content:"\F1753"}.mdi-archive-edit-outline::before{content:"\F1754"}.mdi-archive-eye::before{content:"\F1755"}.mdi-archive-eye-outline::before{content:"\F1756"}.mdi-archive-lock::before{content:"\F1757"}.mdi-archive-lock-open::before{content:"\F1758"}.mdi-archive-lock-open-outline::before{content:"\F1759"}.mdi-archive-lock-outline::before{content:"\F175A"}.mdi-archive-marker::before{content:"\F175B"}.mdi-archive-marker-outline::before{content:"\F175C"}.mdi-archive-minus::before{content:"\F175D"}.mdi-archive-minus-outline::before{content:"\F175E"}.mdi-archive-music::before{content:"\F175F"}.mdi-archive-music-outline::before{content:"\F1760"}.mdi-archive-off::before{content:"\F1761"}.mdi-archive-off-outline::before{content:"\F1762"}.mdi-archive-outline::before{content:"\F120E"}.mdi-archive-plus::before{content:"\F1763"}.mdi-archive-plus-outline::before{content:"\F1764"}.mdi-archive-refresh::before{content:"\F1765"}.mdi-archive-refresh-outline::before{content:"\F1766"}.mdi-archive-remove::before{content:"\F1767"}.mdi-archive-remove-outline::before{content:"\F1768"}.mdi-archive-search::before{content:"\F1769"}.mdi-archive-search-outline::before{content:"\F176A"}.mdi-archive-settings::before{content:"\F176B"}.mdi-archive-settings-outline::before{content:"\F176C"}.mdi-archive-star::before{content:"\F176D"}.mdi-archive-star-outline::before{content:"\F176E"}.mdi-archive-sync::before{content:"\F176F"}.mdi-archive-sync-outline::before{content:"\F1770"}.mdi-arm-flex::before{content:"\F0FD7"}.mdi-arm-flex-outline::before{content:"\F0FD6"}.mdi-arrange-bring-forward::before{content:"\F003D"}.mdi-arrange-bring-to-front::before{content:"\F003E"}.mdi-arrange-send-backward::before{content:"\F003F"}.mdi-arrange-send-to-back::before{content:"\F0040"}.mdi-arrow-all::before{content:"\F0041"}.mdi-arrow-bottom-left::before{content:"\F0042"}.mdi-arrow-bottom-left-bold-box::before{content:"\F1964"}.mdi-arrow-bottom-left-bold-box-outline::before{content:"\F1965"}.mdi-arrow-bottom-left-bold-outline::before{content:"\F09B7"}.mdi-arrow-bottom-left-thick::before{content:"\F09B8"}.mdi-arrow-bottom-left-thin::before{content:"\F19B6"}.mdi-arrow-bottom-left-thin-circle-outline::before{content:"\F1596"}.mdi-arrow-bottom-right::before{content:"\F0043"}.mdi-arrow-bottom-right-bold-box::before{content:"\F1966"}.mdi-arrow-bottom-right-bold-box-outline::before{content:"\F1967"}.mdi-arrow-bottom-right-bold-outline::before{content:"\F09B9"}.mdi-arrow-bottom-right-thick::before{content:"\F09BA"}.mdi-arrow-bottom-right-thin::before{content:"\F19B7"}.mdi-arrow-bottom-right-thin-circle-outline::before{content:"\F1595"}.mdi-arrow-collapse::before{content:"\F0615"}.mdi-arrow-collapse-all::before{content:"\F0044"}.mdi-arrow-collapse-down::before{content:"\F0792"}.mdi-arrow-collapse-horizontal::before{content:"\F084C"}.mdi-arrow-collapse-left::before{content:"\F0793"}.mdi-arrow-collapse-right::before{content:"\F0794"}.mdi-arrow-collapse-up::before{content:"\F0795"}.mdi-arrow-collapse-vertical::before{content:"\F084D"}.mdi-arrow-decision::before{content:"\F09BB"}.mdi-arrow-decision-auto::before{content:"\F09BC"}.mdi-arrow-decision-auto-outline::before{content:"\F09BD"}.mdi-arrow-decision-outline::before{content:"\F09BE"}.mdi-arrow-down::before{content:"\F0045"}.mdi-arrow-down-bold::before{content:"\F072E"}.mdi-arrow-down-bold-box::before{content:"\F072F"}.mdi-arrow-down-bold-box-outline::before{content:"\F0730"}.mdi-arrow-down-bold-circle::before{content:"\F0047"}.mdi-arrow-down-bold-circle-outline::before{content:"\F0048"}.mdi-arrow-down-bold-hexagon-outline::before{content:"\F0049"}.mdi-arrow-down-bold-outline::before{content:"\F09BF"}.mdi-arrow-down-box::before{content:"\F06C0"}.mdi-arrow-down-circle::before{content:"\F0CDB"}.mdi-arrow-down-circle-outline::before{content:"\F0CDC"}.mdi-arrow-down-drop-circle::before{content:"\F004A"}.mdi-arrow-down-drop-circle-outline::before{content:"\F004B"}.mdi-arrow-down-left::before{content:"\F17A1"}.mdi-arrow-down-left-bold::before{content:"\F17A2"}.mdi-arrow-down-right::before{content:"\F17A3"}.mdi-arrow-down-right-bold::before{content:"\F17A4"}.mdi-arrow-down-thick::before{content:"\F0046"}.mdi-arrow-down-thin::before{content:"\F19B3"}.mdi-arrow-down-thin-circle-outline::before{content:"\F1599"}.mdi-arrow-expand::before{content:"\F0616"}.mdi-arrow-expand-all::before{content:"\F004C"}.mdi-arrow-expand-down::before{content:"\F0796"}.mdi-arrow-expand-horizontal::before{content:"\F084E"}.mdi-arrow-expand-left::before{content:"\F0797"}.mdi-arrow-expand-right::before{content:"\F0798"}.mdi-arrow-expand-up::before{content:"\F0799"}.mdi-arrow-expand-vertical::before{content:"\F084F"}.mdi-arrow-horizontal-lock::before{content:"\F115B"}.mdi-arrow-left::before{content:"\F004D"}.mdi-arrow-left-bold::before{content:"\F0731"}.mdi-arrow-left-bold-box::before{content:"\F0732"}.mdi-arrow-left-bold-box-outline::before{content:"\F0733"}.mdi-arrow-left-bold-circle::before{content:"\F004F"}.mdi-arrow-left-bold-circle-outline::before{content:"\F0050"}.mdi-arrow-left-bold-hexagon-outline::before{content:"\F0051"}.mdi-arrow-left-bold-outline::before{content:"\F09C0"}.mdi-arrow-left-bottom::before{content:"\F17A5"}.mdi-arrow-left-bottom-bold::before{content:"\F17A6"}.mdi-arrow-left-box::before{content:"\F06C1"}.mdi-arrow-left-circle::before{content:"\F0CDD"}.mdi-arrow-left-circle-outline::before{content:"\F0CDE"}.mdi-arrow-left-drop-circle::before{content:"\F0052"}.mdi-arrow-left-drop-circle-outline::before{content:"\F0053"}.mdi-arrow-left-right::before{content:"\F0E73"}.mdi-arrow-left-right-bold::before{content:"\F0E74"}.mdi-arrow-left-right-bold-outline::before{content:"\F09C1"}.mdi-arrow-left-thick::before{content:"\F004E"}.mdi-arrow-left-thin::before{content:"\F19B1"}.mdi-arrow-left-thin-circle-outline::before{content:"\F159A"}.mdi-arrow-left-top::before{content:"\F17A7"}.mdi-arrow-left-top-bold::before{content:"\F17A8"}.mdi-arrow-oscillating::before{content:"\F1C91"}.mdi-arrow-oscillating-off::before{content:"\F1C92"}.mdi-arrow-projectile::before{content:"\F1840"}.mdi-arrow-projectile-multiple::before{content:"\F183F"}.mdi-arrow-right::before{content:"\F0054"}.mdi-arrow-right-bold::before{content:"\F0734"}.mdi-arrow-right-bold-box::before{content:"\F0735"}.mdi-arrow-right-bold-box-outline::before{content:"\F0736"}.mdi-arrow-right-bold-circle::before{content:"\F0056"}.mdi-arrow-right-bold-circle-outline::before{content:"\F0057"}.mdi-arrow-right-bold-hexagon-outline::before{content:"\F0058"}.mdi-arrow-right-bold-outline::before{content:"\F09C2"}.mdi-arrow-right-bottom::before{content:"\F17A9"}.mdi-arrow-right-bottom-bold::before{content:"\F17AA"}.mdi-arrow-right-box::before{content:"\F06C2"}.mdi-arrow-right-circle::before{content:"\F0CDF"}.mdi-arrow-right-circle-outline::before{content:"\F0CE0"}.mdi-arrow-right-drop-circle::before{content:"\F0059"}.mdi-arrow-right-drop-circle-outline::before{content:"\F005A"}.mdi-arrow-right-thick::before{content:"\F0055"}.mdi-arrow-right-thin::before{content:"\F19B0"}.mdi-arrow-right-thin-circle-outline::before{content:"\F1598"}.mdi-arrow-right-top::before{content:"\F17AB"}.mdi-arrow-right-top-bold::before{content:"\F17AC"}.mdi-arrow-split-horizontal::before{content:"\F093B"}.mdi-arrow-split-vertical::before{content:"\F093C"}.mdi-arrow-top-left::before{content:"\F005B"}.mdi-arrow-top-left-bold-box::before{content:"\F1968"}.mdi-arrow-top-left-bold-box-outline::before{content:"\F1969"}.mdi-arrow-top-left-bold-outline::before{content:"\F09C3"}.mdi-arrow-top-left-bottom-right::before{content:"\F0E75"}.mdi-arrow-top-left-bottom-right-bold::before{content:"\F0E76"}.mdi-arrow-top-left-thick::before{content:"\F09C4"}.mdi-arrow-top-left-thin::before{content:"\F19B5"}.mdi-arrow-top-left-thin-circle-outline::before{content:"\F1593"}.mdi-arrow-top-right::before{content:"\F005C"}.mdi-arrow-top-right-bold-box::before{content:"\F196A"}.mdi-arrow-top-right-bold-box-outline::before{content:"\F196B"}.mdi-arrow-top-right-bold-outline::before{content:"\F09C5"}.mdi-arrow-top-right-bottom-left::before{content:"\F0E77"}.mdi-arrow-top-right-bottom-left-bold::before{content:"\F0E78"}.mdi-arrow-top-right-thick::before{content:"\F09C6"}.mdi-arrow-top-right-thin::before{content:"\F19B4"}.mdi-arrow-top-right-thin-circle-outline::before{content:"\F1594"}.mdi-arrow-u-down-left::before{content:"\F17AD"}.mdi-arrow-u-down-left-bold::before{content:"\F17AE"}.mdi-arrow-u-down-right::before{content:"\F17AF"}.mdi-arrow-u-down-right-bold::before{content:"\F17B0"}.mdi-arrow-u-left-bottom::before{content:"\F17B1"}.mdi-arrow-u-left-bottom-bold::before{content:"\F17B2"}.mdi-arrow-u-left-top::before{content:"\F17B3"}.mdi-arrow-u-left-top-bold::before{content:"\F17B4"}.mdi-arrow-u-right-bottom::before{content:"\F17B5"}.mdi-arrow-u-right-bottom-bold::before{content:"\F17B6"}.mdi-arrow-u-right-top::before{content:"\F17B7"}.mdi-arrow-u-right-top-bold::before{content:"\F17B8"}.mdi-arrow-u-up-left::before{content:"\F17B9"}.mdi-arrow-u-up-left-bold::before{content:"\F17BA"}.mdi-arrow-u-up-right::before{content:"\F17BB"}.mdi-arrow-u-up-right-bold::before{content:"\F17BC"}.mdi-arrow-up::before{content:"\F005D"}.mdi-arrow-up-bold::before{content:"\F0737"}.mdi-arrow-up-bold-box::before{content:"\F0738"}.mdi-arrow-up-bold-box-outline::before{content:"\F0739"}.mdi-arrow-up-bold-circle::before{content:"\F005F"}.mdi-arrow-up-bold-circle-outline::before{content:"\F0060"}.mdi-arrow-up-bold-hexagon-outline::before{content:"\F0061"}.mdi-arrow-up-bold-outline::before{content:"\F09C7"}.mdi-arrow-up-box::before{content:"\F06C3"}.mdi-arrow-up-circle::before{content:"\F0CE1"}.mdi-arrow-up-circle-outline::before{content:"\F0CE2"}.mdi-arrow-up-down::before{content:"\F0E79"}.mdi-arrow-up-down-bold::before{content:"\F0E7A"}.mdi-arrow-up-down-bold-outline::before{content:"\F09C8"}.mdi-arrow-up-drop-circle::before{content:"\F0062"}.mdi-arrow-up-drop-circle-outline::before{content:"\F0063"}.mdi-arrow-up-left::before{content:"\F17BD"}.mdi-arrow-up-left-bold::before{content:"\F17BE"}.mdi-arrow-up-right::before{content:"\F17BF"}.mdi-arrow-up-right-bold::before{content:"\F17C0"}.mdi-arrow-up-thick::before{content:"\F005E"}.mdi-arrow-up-thin::before{content:"\F19B2"}.mdi-arrow-up-thin-circle-outline::before{content:"\F1597"}.mdi-arrow-vertical-lock::before{content:"\F115C"}.mdi-artboard::before{content:"\F1B9A"}.mdi-artstation::before{content:"\F0B5B"}.mdi-aspect-ratio::before{content:"\F0A24"}.mdi-assistant::before{content:"\F0064"}.mdi-asterisk::before{content:"\F06C4"}.mdi-asterisk-circle-outline::before{content:"\F1A27"}.mdi-at::before{content:"\F0065"}.mdi-atlassian::before{content:"\F0804"}.mdi-atm::before{content:"\F0D47"}.mdi-atom::before{content:"\F0768"}.mdi-atom-variant::before{content:"\F0E7B"}.mdi-attachment::before{content:"\F0066"}.mdi-attachment-check::before{content:"\F1AC1"}.mdi-attachment-lock::before{content:"\F19C4"}.mdi-attachment-minus::before{content:"\F1AC2"}.mdi-attachment-off::before{content:"\F1AC3"}.mdi-attachment-plus::before{content:"\F1AC4"}.mdi-attachment-remove::before{content:"\F1AC5"}.mdi-atv::before{content:"\F1B70"}.mdi-audio-input-rca::before{content:"\F186B"}.mdi-audio-input-stereo-minijack::before{content:"\F186C"}.mdi-audio-input-xlr::before{content:"\F186D"}.mdi-audio-video::before{content:"\F093D"}.mdi-audio-video-off::before{content:"\F11B6"}.mdi-augmented-reality::before{content:"\F0850"}.mdi-aurora::before{content:"\F1BB9"}.mdi-auto-download::before{content:"\F137E"}.mdi-auto-fix::before{content:"\F0068"}.mdi-auto-mode::before{content:"\F1C20"}.mdi-auto-upload::before{content:"\F0069"}.mdi-autorenew::before{content:"\F006A"}.mdi-autorenew-off::before{content:"\F19E7"}.mdi-av-timer::before{content:"\F006B"}.mdi-awning::before{content:"\F1B87"}.mdi-awning-outline::before{content:"\F1B88"}.mdi-aws::before{content:"\F0E0F"}.mdi-axe::before{content:"\F08C8"}.mdi-axe-battle::before{content:"\F1842"}.mdi-axis::before{content:"\F0D48"}.mdi-axis-arrow::before{content:"\F0D49"}.mdi-axis-arrow-info::before{content:"\F140E"}.mdi-axis-arrow-lock::before{content:"\F0D4A"}.mdi-axis-lock::before{content:"\F0D4B"}.mdi-axis-x-arrow::before{content:"\F0D4C"}.mdi-axis-x-arrow-lock::before{content:"\F0D4D"}.mdi-axis-x-rotate-clockwise::before{content:"\F0D4E"}.mdi-axis-x-rotate-counterclockwise::before{content:"\F0D4F"}.mdi-axis-x-y-arrow-lock::before{content:"\F0D50"}.mdi-axis-y-arrow::before{content:"\F0D51"}.mdi-axis-y-arrow-lock::before{content:"\F0D52"}.mdi-axis-y-rotate-clockwise::before{content:"\F0D53"}.mdi-axis-y-rotate-counterclockwise::before{content:"\F0D54"}.mdi-axis-z-arrow::before{content:"\F0D55"}.mdi-axis-z-arrow-lock::before{content:"\F0D56"}.mdi-axis-z-rotate-clockwise::before{content:"\F0D57"}.mdi-axis-z-rotate-counterclockwise::before{content:"\F0D58"}.mdi-babel::before{content:"\F0A25"}.mdi-baby::before{content:"\F006C"}.mdi-baby-bottle::before{content:"\F0F39"}.mdi-baby-bottle-outline::before{content:"\F0F3A"}.mdi-baby-buggy::before{content:"\F13E0"}.mdi-baby-buggy-off::before{content:"\F1AF3"}.mdi-baby-carriage::before{content:"\F068F"}.mdi-baby-carriage-off::before{content:"\F0FA0"}.mdi-baby-face::before{content:"\F0E7C"}.mdi-baby-face-outline::before{content:"\F0E7D"}.mdi-backburger::before{content:"\F006D"}.mdi-backspace::before{content:"\F006E"}.mdi-backspace-outline::before{content:"\F0B5C"}.mdi-backspace-reverse::before{content:"\F0E7E"}.mdi-backspace-reverse-outline::before{content:"\F0E7F"}.mdi-backup-restore::before{content:"\F006F"}.mdi-bacteria::before{content:"\F0ED5"}.mdi-bacteria-outline::before{content:"\F0ED6"}.mdi-badge-account::before{content:"\F0DA7"}.mdi-badge-account-alert::before{content:"\F0DA8"}.mdi-badge-account-alert-outline::before{content:"\F0DA9"}.mdi-badge-account-horizontal::before{content:"\F0E0D"}.mdi-badge-account-horizontal-outline::before{content:"\F0E0E"}.mdi-badge-account-outline::before{content:"\F0DAA"}.mdi-badminton::before{content:"\F0851"}.mdi-bag-carry-on::before{content:"\F0F3B"}.mdi-bag-carry-on-check::before{content:"\F0D65"}.mdi-bag-carry-on-off::before{content:"\F0F3C"}.mdi-bag-checked::before{content:"\F0F3D"}.mdi-bag-personal::before{content:"\F0E10"}.mdi-bag-personal-off::before{content:"\F0E11"}.mdi-bag-personal-off-outline::before{content:"\F0E12"}.mdi-bag-personal-outline::before{content:"\F0E13"}.mdi-bag-personal-plus::before{content:"\F1CA4"}.mdi-bag-personal-plus-outline::before{content:"\F1CA5"}.mdi-bag-personal-tag::before{content:"\F1B0C"}.mdi-bag-personal-tag-outline::before{content:"\F1B0D"}.mdi-bag-suitcase::before{content:"\F158B"}.mdi-bag-suitcase-off::before{content:"\F158D"}.mdi-bag-suitcase-off-outline::before{content:"\F158E"}.mdi-bag-suitcase-outline::before{content:"\F158C"}.mdi-baguette::before{content:"\F0F3E"}.mdi-balcony::before{content:"\F1817"}.mdi-balloon::before{content:"\F0A26"}.mdi-ballot::before{content:"\F09C9"}.mdi-ballot-outline::before{content:"\F09CA"}.mdi-ballot-recount::before{content:"\F0C39"}.mdi-ballot-recount-outline::before{content:"\F0C3A"}.mdi-bandage::before{content:"\F0DAF"}.mdi-bank::before{content:"\F0070"}.mdi-bank-check::before{content:"\F1655"}.mdi-bank-circle::before{content:"\F1C03"}.mdi-bank-circle-outline::before{content:"\F1C04"}.mdi-bank-minus::before{content:"\F0DB0"}.mdi-bank-off::before{content:"\F1656"}.mdi-bank-off-outline::before{content:"\F1657"}.mdi-bank-outline::before{content:"\F0E80"}.mdi-bank-plus::before{content:"\F0DB1"}.mdi-bank-remove::before{content:"\F0DB2"}.mdi-bank-transfer::before{content:"\F0A27"}.mdi-bank-transfer-in::before{content:"\F0A28"}.mdi-bank-transfer-out::before{content:"\F0A29"}.mdi-barcode::before{content:"\F0071"}.mdi-barcode-off::before{content:"\F1236"}.mdi-barcode-scan::before{content:"\F0072"}.mdi-barley::before{content:"\F0073"}.mdi-barley-off::before{content:"\F0B5D"}.mdi-barn::before{content:"\F0B5E"}.mdi-barrel::before{content:"\F0074"}.mdi-barrel-outline::before{content:"\F1A28"}.mdi-baseball::before{content:"\F0852"}.mdi-baseball-bat::before{content:"\F0853"}.mdi-baseball-diamond::before{content:"\F15EC"}.mdi-baseball-diamond-outline::before{content:"\F15ED"}.mdi-baseball-outline::before{content:"\F1C5A"}.mdi-bash::before{content:"\F1183"}.mdi-basket::before{content:"\F0076"}.mdi-basket-check::before{content:"\F18E5"}.mdi-basket-check-outline::before{content:"\F18E6"}.mdi-basket-fill::before{content:"\F0077"}.mdi-basket-minus::before{content:"\F1523"}.mdi-basket-minus-outline::before{content:"\F1524"}.mdi-basket-off::before{content:"\F1525"}.mdi-basket-off-outline::before{content:"\F1526"}.mdi-basket-outline::before{content:"\F1181"}.mdi-basket-plus::before{content:"\F1527"}.mdi-basket-plus-outline::before{content:"\F1528"}.mdi-basket-remove::before{content:"\F1529"}.mdi-basket-remove-outline::before{content:"\F152A"}.mdi-basket-unfill::before{content:"\F0078"}.mdi-basketball::before{content:"\F0806"}.mdi-basketball-hoop::before{content:"\F0C3B"}.mdi-basketball-hoop-outline::before{content:"\F0C3C"}.mdi-bat::before{content:"\F0B5F"}.mdi-bathtub::before{content:"\F1818"}.mdi-bathtub-outline::before{content:"\F1819"}.mdi-battery::before{content:"\F0079"}.mdi-battery-10::before{content:"\F007A"}.mdi-battery-10-bluetooth::before{content:"\F093E"}.mdi-battery-20::before{content:"\F007B"}.mdi-battery-20-bluetooth::before{content:"\F093F"}.mdi-battery-30::before{content:"\F007C"}.mdi-battery-30-bluetooth::before{content:"\F0940"}.mdi-battery-40::before{content:"\F007D"}.mdi-battery-40-bluetooth::before{content:"\F0941"}.mdi-battery-50::before{content:"\F007E"}.mdi-battery-50-bluetooth::before{content:"\F0942"}.mdi-battery-60::before{content:"\F007F"}.mdi-battery-60-bluetooth::before{content:"\F0943"}.mdi-battery-70::before{content:"\F0080"}.mdi-battery-70-bluetooth::before{content:"\F0944"}.mdi-battery-80::before{content:"\F0081"}.mdi-battery-80-bluetooth::before{content:"\F0945"}.mdi-battery-90::before{content:"\F0082"}.mdi-battery-90-bluetooth::before{content:"\F0946"}.mdi-battery-alert::before{content:"\F0083"}.mdi-battery-alert-bluetooth::before{content:"\F0947"}.mdi-battery-alert-variant::before{content:"\F10CC"}.mdi-battery-alert-variant-outline::before{content:"\F10CD"}.mdi-battery-arrow-down::before{content:"\F17DE"}.mdi-battery-arrow-down-outline::before{content:"\F17DF"}.mdi-battery-arrow-up::before{content:"\F17E0"}.mdi-battery-arrow-up-outline::before{content:"\F17E1"}.mdi-battery-bluetooth::before{content:"\F0948"}.mdi-battery-bluetooth-variant::before{content:"\F0949"}.mdi-battery-charging::before{content:"\F0084"}.mdi-battery-charging-10::before{content:"\F089C"}.mdi-battery-charging-100::before{content:"\F0085"}.mdi-battery-charging-20::before{content:"\F0086"}.mdi-battery-charging-30::before{content:"\F0087"}.mdi-battery-charging-40::before{content:"\F0088"}.mdi-battery-charging-50::before{content:"\F089D"}.mdi-battery-charging-60::before{content:"\F0089"}.mdi-battery-charging-70::before{content:"\F089E"}.mdi-battery-charging-80::before{content:"\F008A"}.mdi-battery-charging-90::before{content:"\F008B"}.mdi-battery-charging-high::before{content:"\F12A6"}.mdi-battery-charging-low::before{content:"\F12A4"}.mdi-battery-charging-medium::before{content:"\F12A5"}.mdi-battery-charging-outline::before{content:"\F089F"}.mdi-battery-charging-wireless::before{content:"\F0807"}.mdi-battery-charging-wireless-10::before{content:"\F0808"}.mdi-battery-charging-wireless-20::before{content:"\F0809"}.mdi-battery-charging-wireless-30::before{content:"\F080A"}.mdi-battery-charging-wireless-40::before{content:"\F080B"}.mdi-battery-charging-wireless-50::before{content:"\F080C"}.mdi-battery-charging-wireless-60::before{content:"\F080D"}.mdi-battery-charging-wireless-70::before{content:"\F080E"}.mdi-battery-charging-wireless-80::before{content:"\F080F"}.mdi-battery-charging-wireless-90::before{content:"\F0810"}.mdi-battery-charging-wireless-alert::before{content:"\F0811"}.mdi-battery-charging-wireless-outline::before{content:"\F0812"}.mdi-battery-check::before{content:"\F17E2"}.mdi-battery-check-outline::before{content:"\F17E3"}.mdi-battery-clock::before{content:"\F19E5"}.mdi-battery-clock-outline::before{content:"\F19E6"}.mdi-battery-heart::before{content:"\F120F"}.mdi-battery-heart-outline::before{content:"\F1210"}.mdi-battery-heart-variant::before{content:"\F1211"}.mdi-battery-high::before{content:"\F12A3"}.mdi-battery-lock::before{content:"\F179C"}.mdi-battery-lock-open::before{content:"\F179D"}.mdi-battery-low::before{content:"\F12A1"}.mdi-battery-medium::before{content:"\F12A2"}.mdi-battery-minus::before{content:"\F17E4"}.mdi-battery-minus-outline::before{content:"\F17E5"}.mdi-battery-minus-variant::before{content:"\F008C"}.mdi-battery-negative::before{content:"\F008D"}.mdi-battery-off::before{content:"\F125D"}.mdi-battery-off-outline::before{content:"\F125E"}.mdi-battery-outline::before{content:"\F008E"}.mdi-battery-plus::before{content:"\F17E6"}.mdi-battery-plus-outline::before{content:"\F17E7"}.mdi-battery-plus-variant::before{content:"\F008F"}.mdi-battery-positive::before{content:"\F0090"}.mdi-battery-remove::before{content:"\F17E8"}.mdi-battery-remove-outline::before{content:"\F17E9"}.mdi-battery-sync::before{content:"\F1834"}.mdi-battery-sync-outline::before{content:"\F1835"}.mdi-battery-unknown::before{content:"\F0091"}.mdi-battery-unknown-bluetooth::before{content:"\F094A"}.mdi-beach::before{content:"\F0092"}.mdi-beaker::before{content:"\F0CEA"}.mdi-beaker-alert::before{content:"\F1229"}.mdi-beaker-alert-outline::before{content:"\F122A"}.mdi-beaker-check::before{content:"\F122B"}.mdi-beaker-check-outline::before{content:"\F122C"}.mdi-beaker-minus::before{content:"\F122D"}.mdi-beaker-minus-outline::before{content:"\F122E"}.mdi-beaker-outline::before{content:"\F0690"}.mdi-beaker-plus::before{content:"\F122F"}.mdi-beaker-plus-outline::before{content:"\F1230"}.mdi-beaker-question::before{content:"\F1231"}.mdi-beaker-question-outline::before{content:"\F1232"}.mdi-beaker-remove::before{content:"\F1233"}.mdi-beaker-remove-outline::before{content:"\F1234"}.mdi-bed::before{content:"\F02E3"}.mdi-bed-clock::before{content:"\F1B94"}.mdi-bed-double::before{content:"\F0FD4"}.mdi-bed-double-outline::before{content:"\F0FD3"}.mdi-bed-empty::before{content:"\F08A0"}.mdi-bed-king::before{content:"\F0FD2"}.mdi-bed-king-outline::before{content:"\F0FD1"}.mdi-bed-outline::before{content:"\F0099"}.mdi-bed-queen::before{content:"\F0FD0"}.mdi-bed-queen-outline::before{content:"\F0FDB"}.mdi-bed-single::before{content:"\F106D"}.mdi-bed-single-outline::before{content:"\F106E"}.mdi-bee::before{content:"\F0FA1"}.mdi-bee-flower::before{content:"\F0FA2"}.mdi-beehive-off-outline::before{content:"\F13ED"}.mdi-beehive-outline::before{content:"\F10CE"}.mdi-beekeeper::before{content:"\F14E2"}.mdi-beer::before{content:"\F0098"}.mdi-beer-outline::before{content:"\F130C"}.mdi-bell::before{content:"\F009A"}.mdi-bell-alert::before{content:"\F0D59"}.mdi-bell-alert-outline::before{content:"\F0E81"}.mdi-bell-badge::before{content:"\F116B"}.mdi-bell-badge-outline::before{content:"\F0178"}.mdi-bell-cancel::before{content:"\F13E7"}.mdi-bell-cancel-outline::before{content:"\F13E8"}.mdi-bell-check::before{content:"\F11E5"}.mdi-bell-check-outline::before{content:"\F11E6"}.mdi-bell-circle::before{content:"\F0D5A"}.mdi-bell-circle-outline::before{content:"\F0D5B"}.mdi-bell-cog::before{content:"\F1A29"}.mdi-bell-cog-outline::before{content:"\F1A2A"}.mdi-bell-minus::before{content:"\F13E9"}.mdi-bell-minus-outline::before{content:"\F13EA"}.mdi-bell-off::before{content:"\F009B"}.mdi-bell-off-outline::before{content:"\F0A91"}.mdi-bell-outline::before{content:"\F009C"}.mdi-bell-plus::before{content:"\F009D"}.mdi-bell-plus-outline::before{content:"\F0A92"}.mdi-bell-remove::before{content:"\F13EB"}.mdi-bell-remove-outline::before{content:"\F13EC"}.mdi-bell-ring::before{content:"\F009E"}.mdi-bell-ring-outline::before{content:"\F009F"}.mdi-bell-sleep::before{content:"\F00A0"}.mdi-bell-sleep-outline::before{content:"\F0A93"}.mdi-bench::before{content:"\F1C21"}.mdi-bench-back::before{content:"\F1C22"}.mdi-beta::before{content:"\F00A1"}.mdi-betamax::before{content:"\F09CB"}.mdi-biathlon::before{content:"\F0E14"}.mdi-bicycle::before{content:"\F109C"}.mdi-bicycle-basket::before{content:"\F1235"}.mdi-bicycle-cargo::before{content:"\F189C"}.mdi-bicycle-electric::before{content:"\F15B4"}.mdi-bicycle-penny-farthing::before{content:"\F15E9"}.mdi-bike::before{content:"\F00A3"}.mdi-bike-fast::before{content:"\F111F"}.mdi-bike-pedal::before{content:"\F1C23"}.mdi-bike-pedal-clipless::before{content:"\F1C24"}.mdi-bike-pedal-mountain::before{content:"\F1C25"}.mdi-billboard::before{content:"\F1010"}.mdi-billiards::before{content:"\F0B61"}.mdi-billiards-rack::before{content:"\F0B62"}.mdi-binoculars::before{content:"\F00A5"}.mdi-bio::before{content:"\F00A6"}.mdi-biohazard::before{content:"\F00A7"}.mdi-bird::before{content:"\F15C6"}.mdi-bitbucket::before{content:"\F00A8"}.mdi-bitcoin::before{content:"\F0813"}.mdi-black-mesa::before{content:"\F00A9"}.mdi-blender::before{content:"\F0CEB"}.mdi-blender-outline::before{content:"\F181A"}.mdi-blender-software::before{content:"\F00AB"}.mdi-blinds::before{content:"\F00AC"}.mdi-blinds-horizontal::before{content:"\F1A2B"}.mdi-blinds-horizontal-closed::before{content:"\F1A2C"}.mdi-blinds-open::before{content:"\F1011"}.mdi-blinds-vertical::before{content:"\F1A2D"}.mdi-blinds-vertical-closed::before{content:"\F1A2E"}.mdi-block-helper::before{content:"\F00AD"}.mdi-blood-bag::before{content:"\F0CEC"}.mdi-bluetooth::before{content:"\F00AF"}.mdi-bluetooth-audio::before{content:"\F00B0"}.mdi-bluetooth-connect::before{content:"\F00B1"}.mdi-bluetooth-off::before{content:"\F00B2"}.mdi-bluetooth-settings::before{content:"\F00B3"}.mdi-bluetooth-transfer::before{content:"\F00B4"}.mdi-blur::before{content:"\F00B5"}.mdi-blur-linear::before{content:"\F00B6"}.mdi-blur-off::before{content:"\F00B7"}.mdi-blur-radial::before{content:"\F00B8"}.mdi-bolt::before{content:"\F0DB3"}.mdi-bomb::before{content:"\F0691"}.mdi-bomb-off::before{content:"\F06C5"}.mdi-bone::before{content:"\F00B9"}.mdi-bone-off::before{content:"\F19E0"}.mdi-book::before{content:"\F00BA"}.mdi-book-account::before{content:"\F13AD"}.mdi-book-account-outline::before{content:"\F13AE"}.mdi-book-alert::before{content:"\F167C"}.mdi-book-alert-outline::before{content:"\F167D"}.mdi-book-alphabet::before{content:"\F061D"}.mdi-book-arrow-down::before{content:"\F167E"}.mdi-book-arrow-down-outline::before{content:"\F167F"}.mdi-book-arrow-left::before{content:"\F1680"}.mdi-book-arrow-left-outline::before{content:"\F1681"}.mdi-book-arrow-right::before{content:"\F1682"}.mdi-book-arrow-right-outline::before{content:"\F1683"}.mdi-book-arrow-up::before{content:"\F1684"}.mdi-book-arrow-up-outline::before{content:"\F1685"}.mdi-book-cancel::before{content:"\F1686"}.mdi-book-cancel-outline::before{content:"\F1687"}.mdi-book-check::before{content:"\F14F3"}.mdi-book-check-outline::before{content:"\F14F4"}.mdi-book-clock::before{content:"\F1688"}.mdi-book-clock-outline::before{content:"\F1689"}.mdi-book-cog::before{content:"\F168A"}.mdi-book-cog-outline::before{content:"\F168B"}.mdi-book-cross::before{content:"\F00A2"}.mdi-book-edit::before{content:"\F168C"}.mdi-book-edit-outline::before{content:"\F168D"}.mdi-book-education::before{content:"\F16C9"}.mdi-book-education-outline::before{content:"\F16CA"}.mdi-book-heart::before{content:"\F1A1D"}.mdi-book-heart-outline::before{content:"\F1A1E"}.mdi-book-information-variant::before{content:"\F106F"}.mdi-book-lock::before{content:"\F079A"}.mdi-book-lock-open::before{content:"\F079B"}.mdi-book-lock-open-outline::before{content:"\F168E"}.mdi-book-lock-outline::before{content:"\F168F"}.mdi-book-marker::before{content:"\F1690"}.mdi-book-marker-outline::before{content:"\F1691"}.mdi-book-minus::before{content:"\F05D9"}.mdi-book-minus-multiple::before{content:"\F0A94"}.mdi-book-minus-multiple-outline::before{content:"\F090B"}.mdi-book-minus-outline::before{content:"\F1692"}.mdi-book-multiple::before{content:"\F00BB"}.mdi-book-multiple-outline::before{content:"\F0436"}.mdi-book-music::before{content:"\F0067"}.mdi-book-music-outline::before{content:"\F1693"}.mdi-book-off::before{content:"\F1694"}.mdi-book-off-outline::before{content:"\F1695"}.mdi-book-open::before{content:"\F00BD"}.mdi-book-open-blank-variant::before{content:"\F00BE"}.mdi-book-open-blank-variant-outline::before{content:"\F1CCB"}.mdi-book-open-outline::before{content:"\F0B63"}.mdi-book-open-page-variant::before{content:"\F05DA"}.mdi-book-open-page-variant-outline::before{content:"\F15D6"}.mdi-book-open-variant::before{content:"\F14F7"}.mdi-book-open-variant-outline::before{content:"\F1CCC"}.mdi-book-outline::before{content:"\F0B64"}.mdi-book-play::before{content:"\F0E82"}.mdi-book-play-outline::before{content:"\F0E83"}.mdi-book-plus::before{content:"\F05DB"}.mdi-book-plus-multiple::before{content:"\F0A95"}.mdi-book-plus-multiple-outline::before{content:"\F0ADE"}.mdi-book-plus-outline::before{content:"\F1696"}.mdi-book-refresh::before{content:"\F1697"}.mdi-book-refresh-outline::before{content:"\F1698"}.mdi-book-remove::before{content:"\F0A97"}.mdi-book-remove-multiple::before{content:"\F0A96"}.mdi-book-remove-multiple-outline::before{content:"\F04CA"}.mdi-book-remove-outline::before{content:"\F1699"}.mdi-book-search::before{content:"\F0E84"}.mdi-book-search-outline::before{content:"\F0E85"}.mdi-book-settings::before{content:"\F169A"}.mdi-book-settings-outline::before{content:"\F169B"}.mdi-book-sync::before{content:"\F169C"}.mdi-book-sync-outline::before{content:"\F16C8"}.mdi-book-variant::before{content:"\F00BF"}.mdi-bookmark::before{content:"\F00C0"}.mdi-bookmark-box::before{content:"\F1B75"}.mdi-bookmark-box-multiple::before{content:"\F196C"}.mdi-bookmark-box-multiple-outline::before{content:"\F196D"}.mdi-bookmark-box-outline::before{content:"\F1B76"}.mdi-bookmark-check::before{content:"\F00C1"}.mdi-bookmark-check-outline::before{content:"\F137B"}.mdi-bookmark-minus::before{content:"\F09CC"}.mdi-bookmark-minus-outline::before{content:"\F09CD"}.mdi-bookmark-multiple::before{content:"\F0E15"}.mdi-bookmark-multiple-outline::before{content:"\F0E16"}.mdi-bookmark-music::before{content:"\F00C2"}.mdi-bookmark-music-outline::before{content:"\F1379"}.mdi-bookmark-off::before{content:"\F09CE"}.mdi-bookmark-off-outline::before{content:"\F09CF"}.mdi-bookmark-outline::before{content:"\F00C3"}.mdi-bookmark-plus::before{content:"\F00C5"}.mdi-bookmark-plus-outline::before{content:"\F00C4"}.mdi-bookmark-remove::before{content:"\F00C6"}.mdi-bookmark-remove-outline::before{content:"\F137A"}.mdi-bookshelf::before{content:"\F125F"}.mdi-boom-gate::before{content:"\F0E86"}.mdi-boom-gate-alert::before{content:"\F0E87"}.mdi-boom-gate-alert-outline::before{content:"\F0E88"}.mdi-boom-gate-arrow-down::before{content:"\F0E89"}.mdi-boom-gate-arrow-down-outline::before{content:"\F0E8A"}.mdi-boom-gate-arrow-up::before{content:"\F0E8C"}.mdi-boom-gate-arrow-up-outline::before{content:"\F0E8D"}.mdi-boom-gate-outline::before{content:"\F0E8B"}.mdi-boom-gate-up::before{content:"\F17F9"}.mdi-boom-gate-up-outline::before{content:"\F17FA"}.mdi-boombox::before{content:"\F05DC"}.mdi-boomerang::before{content:"\F10CF"}.mdi-bootstrap::before{content:"\F06C6"}.mdi-border-all::before{content:"\F00C7"}.mdi-border-all-variant::before{content:"\F08A1"}.mdi-border-bottom::before{content:"\F00C8"}.mdi-border-bottom-variant::before{content:"\F08A2"}.mdi-border-color::before{content:"\F00C9"}.mdi-border-horizontal::before{content:"\F00CA"}.mdi-border-inside::before{content:"\F00CB"}.mdi-border-left::before{content:"\F00CC"}.mdi-border-left-variant::before{content:"\F08A3"}.mdi-border-none::before{content:"\F00CD"}.mdi-border-none-variant::before{content:"\F08A4"}.mdi-border-outside::before{content:"\F00CE"}.mdi-border-radius::before{content:"\F1AF4"}.mdi-border-right::before{content:"\F00CF"}.mdi-border-right-variant::before{content:"\F08A5"}.mdi-border-style::before{content:"\F00D0"}.mdi-border-top::before{content:"\F00D1"}.mdi-border-top-variant::before{content:"\F08A6"}.mdi-border-vertical::before{content:"\F00D2"}.mdi-bottle-soda::before{content:"\F1070"}.mdi-bottle-soda-classic::before{content:"\F1071"}.mdi-bottle-soda-classic-outline::before{content:"\F1363"}.mdi-bottle-soda-outline::before{content:"\F1072"}.mdi-bottle-tonic::before{content:"\F112E"}.mdi-bottle-tonic-outline::before{content:"\F112F"}.mdi-bottle-tonic-plus::before{content:"\F1130"}.mdi-bottle-tonic-plus-outline::before{content:"\F1131"}.mdi-bottle-tonic-skull::before{content:"\F1132"}.mdi-bottle-tonic-skull-outline::before{content:"\F1133"}.mdi-bottle-wine::before{content:"\F0854"}.mdi-bottle-wine-outline::before{content:"\F1310"}.mdi-bow-arrow::before{content:"\F1841"}.mdi-bow-tie::before{content:"\F0678"}.mdi-bowl::before{content:"\F028E"}.mdi-bowl-mix::before{content:"\F0617"}.mdi-bowl-mix-outline::before{content:"\F02E4"}.mdi-bowl-outline::before{content:"\F02A9"}.mdi-bowling::before{content:"\F00D3"}.mdi-box::before{content:"\F00D4"}.mdi-box-cutter::before{content:"\F00D5"}.mdi-box-cutter-off::before{content:"\F0B4A"}.mdi-box-shadow::before{content:"\F0637"}.mdi-boxing-glove::before{content:"\F0B65"}.mdi-braille::before{content:"\F09D0"}.mdi-brain::before{content:"\F09D1"}.mdi-bread-slice::before{content:"\F0CEE"}.mdi-bread-slice-outline::before{content:"\F0CEF"}.mdi-bridge::before{content:"\F0618"}.mdi-briefcase::before{content:"\F00D6"}.mdi-briefcase-account::before{content:"\F0CF0"}.mdi-briefcase-account-outline::before{content:"\F0CF1"}.mdi-briefcase-arrow-left-right::before{content:"\F1A8D"}.mdi-briefcase-arrow-left-right-outline::before{content:"\F1A8E"}.mdi-briefcase-arrow-up-down::before{content:"\F1A8F"}.mdi-briefcase-arrow-up-down-outline::before{content:"\F1A90"}.mdi-briefcase-check::before{content:"\F00D7"}.mdi-briefcase-check-outline::before{content:"\F131E"}.mdi-briefcase-clock::before{content:"\F10D0"}.mdi-briefcase-clock-outline::before{content:"\F10D1"}.mdi-briefcase-download::before{content:"\F00D8"}.mdi-briefcase-download-outline::before{content:"\F0C3D"}.mdi-briefcase-edit::before{content:"\F0A98"}.mdi-briefcase-edit-outline::before{content:"\F0C3E"}.mdi-briefcase-eye::before{content:"\F17D9"}.mdi-briefcase-eye-outline::before{content:"\F17DA"}.mdi-briefcase-minus::before{content:"\F0A2A"}.mdi-briefcase-minus-outline::before{content:"\F0C3F"}.mdi-briefcase-off::before{content:"\F1658"}.mdi-briefcase-off-outline::before{content:"\F1659"}.mdi-briefcase-outline::before{content:"\F0814"}.mdi-briefcase-plus::before{content:"\F0A2B"}.mdi-briefcase-plus-outline::before{content:"\F0C40"}.mdi-briefcase-remove::before{content:"\F0A2C"}.mdi-briefcase-remove-outline::before{content:"\F0C41"}.mdi-briefcase-search::before{content:"\F0A2D"}.mdi-briefcase-search-outline::before{content:"\F0C42"}.mdi-briefcase-upload::before{content:"\F00D9"}.mdi-briefcase-upload-outline::before{content:"\F0C43"}.mdi-briefcase-variant::before{content:"\F1494"}.mdi-briefcase-variant-off::before{content:"\F165A"}.mdi-briefcase-variant-off-outline::before{content:"\F165B"}.mdi-briefcase-variant-outline::before{content:"\F1495"}.mdi-brightness-1::before{content:"\F00DA"}.mdi-brightness-2::before{content:"\F00DB"}.mdi-brightness-3::before{content:"\F00DC"}.mdi-brightness-4::before{content:"\F00DD"}.mdi-brightness-5::before{content:"\F00DE"}.mdi-brightness-6::before{content:"\F00DF"}.mdi-brightness-7::before{content:"\F00E0"}.mdi-brightness-auto::before{content:"\F00E1"}.mdi-brightness-percent::before{content:"\F0CF2"}.mdi-broadcast::before{content:"\F1720"}.mdi-broadcast-off::before{content:"\F1721"}.mdi-broom::before{content:"\F00E2"}.mdi-brush::before{content:"\F00E3"}.mdi-brush-off::before{content:"\F1771"}.mdi-brush-outline::before{content:"\F1A0D"}.mdi-brush-variant::before{content:"\F1813"}.mdi-bucket::before{content:"\F1415"}.mdi-bucket-outline::before{content:"\F1416"}.mdi-buffet::before{content:"\F0578"}.mdi-bug::before{content:"\F00E4"}.mdi-bug-check::before{content:"\F0A2E"}.mdi-bug-check-outline::before{content:"\F0A2F"}.mdi-bug-outline::before{content:"\F0A30"}.mdi-bug-pause::before{content:"\F1AF5"}.mdi-bug-pause-outline::before{content:"\F1AF6"}.mdi-bug-play::before{content:"\F1AF7"}.mdi-bug-play-outline::before{content:"\F1AF8"}.mdi-bug-stop::before{content:"\F1AF9"}.mdi-bug-stop-outline::before{content:"\F1AFA"}.mdi-bugle::before{content:"\F0DB4"}.mdi-bulkhead-light::before{content:"\F1A2F"}.mdi-bulldozer::before{content:"\F0B22"}.mdi-bullet::before{content:"\F0CF3"}.mdi-bulletin-board::before{content:"\F00E5"}.mdi-bullhorn::before{content:"\F00E6"}.mdi-bullhorn-outline::before{content:"\F0B23"}.mdi-bullhorn-variant::before{content:"\F196E"}.mdi-bullhorn-variant-outline::before{content:"\F196F"}.mdi-bullseye::before{content:"\F05DD"}.mdi-bullseye-arrow::before{content:"\F08C9"}.mdi-bulma::before{content:"\F12E7"}.mdi-bunk-bed::before{content:"\F1302"}.mdi-bunk-bed-outline::before{content:"\F0097"}.mdi-bus::before{content:"\F00E7"}.mdi-bus-alert::before{content:"\F0A99"}.mdi-bus-articulated-end::before{content:"\F079C"}.mdi-bus-articulated-front::before{content:"\F079D"}.mdi-bus-clock::before{content:"\F08CA"}.mdi-bus-double-decker::before{content:"\F079E"}.mdi-bus-electric::before{content:"\F191D"}.mdi-bus-marker::before{content:"\F1212"}.mdi-bus-multiple::before{content:"\F0F3F"}.mdi-bus-school::before{content:"\F079F"}.mdi-bus-side::before{content:"\F07A0"}.mdi-bus-sign::before{content:"\F1CC1"}.mdi-bus-stop::before{content:"\F1012"}.mdi-bus-stop-covered::before{content:"\F1013"}.mdi-bus-stop-uncovered::before{content:"\F1014"}.mdi-bus-wrench::before{content:"\F1CC2"}.mdi-butterfly::before{content:"\F1589"}.mdi-butterfly-outline::before{content:"\F158A"}.mdi-button-cursor::before{content:"\F1B4F"}.mdi-button-pointer::before{content:"\F1B50"}.mdi-cabin-a-frame::before{content:"\F188C"}.mdi-cable-data::before{content:"\F1394"}.mdi-cached::before{content:"\F00E8"}.mdi-cactus::before{content:"\F0DB5"}.mdi-cake::before{content:"\F00E9"}.mdi-cake-layered::before{content:"\F00EA"}.mdi-cake-variant::before{content:"\F00EB"}.mdi-cake-variant-outline::before{content:"\F17F0"}.mdi-calculator::before{content:"\F00EC"}.mdi-calculator-variant::before{content:"\F0A9A"}.mdi-calculator-variant-outline::before{content:"\F15A6"}.mdi-calendar::before{content:"\F00ED"}.mdi-calendar-account::before{content:"\F0ED7"}.mdi-calendar-account-outline::before{content:"\F0ED8"}.mdi-calendar-alert::before{content:"\F0A31"}.mdi-calendar-alert-outline::before{content:"\F1B62"}.mdi-calendar-arrow-left::before{content:"\F1134"}.mdi-calendar-arrow-right::before{content:"\F1135"}.mdi-calendar-badge::before{content:"\F1B9D"}.mdi-calendar-badge-outline::before{content:"\F1B9E"}.mdi-calendar-blank::before{content:"\F00EE"}.mdi-calendar-blank-multiple::before{content:"\F1073"}.mdi-calendar-blank-outline::before{content:"\F0B66"}.mdi-calendar-check::before{content:"\F00EF"}.mdi-calendar-check-outline::before{content:"\F0C44"}.mdi-calendar-clock::before{content:"\F00F0"}.mdi-calendar-clock-outline::before{content:"\F16E1"}.mdi-calendar-collapse-horizontal::before{content:"\F189D"}.mdi-calendar-collapse-horizontal-outline::before{content:"\F1B63"}.mdi-calendar-cursor::before{content:"\F157B"}.mdi-calendar-cursor-outline::before{content:"\F1B64"}.mdi-calendar-edit::before{content:"\F08A7"}.mdi-calendar-edit-outline::before{content:"\F1B65"}.mdi-calendar-end::before{content:"\F166C"}.mdi-calendar-end-outline::before{content:"\F1B66"}.mdi-calendar-expand-horizontal::before{content:"\F189E"}.mdi-calendar-expand-horizontal-outline::before{content:"\F1B67"}.mdi-calendar-export::before{content:"\F0B24"}.mdi-calendar-export-outline::before{content:"\F1B68"}.mdi-calendar-filter::before{content:"\F1A32"}.mdi-calendar-filter-outline::before{content:"\F1A33"}.mdi-calendar-heart::before{content:"\F09D2"}.mdi-calendar-heart-outline::before{content:"\F1B69"}.mdi-calendar-import::before{content:"\F0B25"}.mdi-calendar-import-outline::before{content:"\F1B6A"}.mdi-calendar-lock::before{content:"\F1641"}.mdi-calendar-lock-open::before{content:"\F1B5B"}.mdi-calendar-lock-open-outline::before{content:"\F1B5C"}.mdi-calendar-lock-outline::before{content:"\F1642"}.mdi-calendar-minus::before{content:"\F0D5C"}.mdi-calendar-minus-outline::before{content:"\F1B6B"}.mdi-calendar-month::before{content:"\F0E17"}.mdi-calendar-month-outline::before{content:"\F0E18"}.mdi-calendar-multiple::before{content:"\F00F1"}.mdi-calendar-multiple-check::before{content:"\F00F2"}.mdi-calendar-multiselect::before{content:"\F0A32"}.mdi-calendar-multiselect-outline::before{content:"\F1B55"}.mdi-calendar-outline::before{content:"\F0B67"}.mdi-calendar-plus::before{content:"\F00F3"}.mdi-calendar-plus-outline::before{content:"\F1B6C"}.mdi-calendar-question::before{content:"\F0692"}.mdi-calendar-question-outline::before{content:"\F1B6D"}.mdi-calendar-range::before{content:"\F0679"}.mdi-calendar-range-outline::before{content:"\F0B68"}.mdi-calendar-refresh::before{content:"\F01E1"}.mdi-calendar-refresh-outline::before{content:"\F0203"}.mdi-calendar-remove::before{content:"\F00F4"}.mdi-calendar-remove-outline::before{content:"\F0C45"}.mdi-calendar-search::before{content:"\F094C"}.mdi-calendar-search-outline::before{content:"\F1B6E"}.mdi-calendar-star::before{content:"\F09D3"}.mdi-calendar-star-four-points::before{content:"\F1C1F"}.mdi-calendar-star-outline::before{content:"\F1B53"}.mdi-calendar-start::before{content:"\F166D"}.mdi-calendar-start-outline::before{content:"\F1B6F"}.mdi-calendar-sync::before{content:"\F0E8E"}.mdi-calendar-sync-outline::before{content:"\F0E8F"}.mdi-calendar-text::before{content:"\F00F5"}.mdi-calendar-text-outline::before{content:"\F0C46"}.mdi-calendar-today::before{content:"\F00F6"}.mdi-calendar-today-outline::before{content:"\F1A30"}.mdi-calendar-week::before{content:"\F0A33"}.mdi-calendar-week-begin::before{content:"\F0A34"}.mdi-calendar-week-begin-outline::before{content:"\F1A31"}.mdi-calendar-week-outline::before{content:"\F1A34"}.mdi-calendar-weekend::before{content:"\F0ED9"}.mdi-calendar-weekend-outline::before{content:"\F0EDA"}.mdi-call-made::before{content:"\F00F7"}.mdi-call-merge::before{content:"\F00F8"}.mdi-call-missed::before{content:"\F00F9"}.mdi-call-received::before{content:"\F00FA"}.mdi-call-split::before{content:"\F00FB"}.mdi-camcorder::before{content:"\F00FC"}.mdi-camcorder-off::before{content:"\F00FF"}.mdi-camera::before{content:"\F0100"}.mdi-camera-account::before{content:"\F08CB"}.mdi-camera-burst::before{content:"\F0693"}.mdi-camera-control::before{content:"\F0B69"}.mdi-camera-document::before{content:"\F1871"}.mdi-camera-document-off::before{content:"\F1872"}.mdi-camera-enhance::before{content:"\F0101"}.mdi-camera-enhance-outline::before{content:"\F0B6A"}.mdi-camera-flip::before{content:"\F15D9"}.mdi-camera-flip-outline::before{content:"\F15DA"}.mdi-camera-front::before{content:"\F0102"}.mdi-camera-front-variant::before{content:"\F0103"}.mdi-camera-gopro::before{content:"\F07A1"}.mdi-camera-image::before{content:"\F08CC"}.mdi-camera-iris::before{content:"\F0104"}.mdi-camera-lock::before{content:"\F1A14"}.mdi-camera-lock-open::before{content:"\F1C0D"}.mdi-camera-lock-open-outline::before{content:"\F1C0E"}.mdi-camera-lock-outline::before{content:"\F1A15"}.mdi-camera-marker::before{content:"\F19A7"}.mdi-camera-marker-outline::before{content:"\F19A8"}.mdi-camera-metering-center::before{content:"\F07A2"}.mdi-camera-metering-matrix::before{content:"\F07A3"}.mdi-camera-metering-partial::before{content:"\F07A4"}.mdi-camera-metering-spot::before{content:"\F07A5"}.mdi-camera-off::before{content:"\F05DF"}.mdi-camera-off-outline::before{content:"\F19BF"}.mdi-camera-outline::before{content:"\F0D5D"}.mdi-camera-party-mode::before{content:"\F0105"}.mdi-camera-plus::before{content:"\F0EDB"}.mdi-camera-plus-outline::before{content:"\F0EDC"}.mdi-camera-rear::before{content:"\F0106"}.mdi-camera-rear-variant::before{content:"\F0107"}.mdi-camera-retake::before{content:"\F0E19"}.mdi-camera-retake-outline::before{content:"\F0E1A"}.mdi-camera-switch::before{content:"\F0108"}.mdi-camera-switch-outline::before{content:"\F084A"}.mdi-camera-timer::before{content:"\F0109"}.mdi-camera-wireless::before{content:"\F0DB6"}.mdi-camera-wireless-outline::before{content:"\F0DB7"}.mdi-campfire::before{content:"\F0EDD"}.mdi-cancel::before{content:"\F073A"}.mdi-candelabra::before{content:"\F17D2"}.mdi-candelabra-fire::before{content:"\F17D3"}.mdi-candle::before{content:"\F05E2"}.mdi-candy::before{content:"\F1970"}.mdi-candy-off::before{content:"\F1971"}.mdi-candy-off-outline::before{content:"\F1972"}.mdi-candy-outline::before{content:"\F1973"}.mdi-candycane::before{content:"\F010A"}.mdi-cannabis::before{content:"\F07A6"}.mdi-cannabis-off::before{content:"\F166E"}.mdi-caps-lock::before{content:"\F0A9B"}.mdi-car::before{content:"\F010B"}.mdi-car-2-plus::before{content:"\F1015"}.mdi-car-3-plus::before{content:"\F1016"}.mdi-car-arrow-left::before{content:"\F13B2"}.mdi-car-arrow-right::before{content:"\F13B3"}.mdi-car-back::before{content:"\F0E1B"}.mdi-car-battery::before{content:"\F010C"}.mdi-car-brake-abs::before{content:"\F0C47"}.mdi-car-brake-alert::before{content:"\F0C48"}.mdi-car-brake-fluid-level::before{content:"\F1909"}.mdi-car-brake-hold::before{content:"\F0D5E"}.mdi-car-brake-low-pressure::before{content:"\F190A"}.mdi-car-brake-parking::before{content:"\F0D5F"}.mdi-car-brake-retarder::before{content:"\F1017"}.mdi-car-brake-temperature::before{content:"\F190B"}.mdi-car-brake-worn-linings::before{content:"\F190C"}.mdi-car-child-seat::before{content:"\F0FA3"}.mdi-car-clock::before{content:"\F1974"}.mdi-car-clutch::before{content:"\F1018"}.mdi-car-cog::before{content:"\F13CC"}.mdi-car-connected::before{content:"\F010D"}.mdi-car-convertible::before{content:"\F07A7"}.mdi-car-coolant-level::before{content:"\F1019"}.mdi-car-cruise-control::before{content:"\F0D60"}.mdi-car-defrost-front::before{content:"\F0D61"}.mdi-car-defrost-rear::before{content:"\F0D62"}.mdi-car-door::before{content:"\F0B6B"}.mdi-car-door-lock::before{content:"\F109D"}.mdi-car-door-lock-open::before{content:"\F1C81"}.mdi-car-electric::before{content:"\F0B6C"}.mdi-car-electric-outline::before{content:"\F15B5"}.mdi-car-emergency::before{content:"\F160F"}.mdi-car-esp::before{content:"\F0C49"}.mdi-car-estate::before{content:"\F07A8"}.mdi-car-hatchback::before{content:"\F07A9"}.mdi-car-info::before{content:"\F11BE"}.mdi-car-key::before{content:"\F0B6D"}.mdi-car-lifted-pickup::before{content:"\F152D"}.mdi-car-light-alert::before{content:"\F190D"}.mdi-car-light-dimmed::before{content:"\F0C4A"}.mdi-car-light-fog::before{content:"\F0C4B"}.mdi-car-light-high::before{content:"\F0C4C"}.mdi-car-limousine::before{content:"\F08CD"}.mdi-car-multiple::before{content:"\F0B6E"}.mdi-car-off::before{content:"\F0E1C"}.mdi-car-outline::before{content:"\F14ED"}.mdi-car-parking-lights::before{content:"\F0D63"}.mdi-car-pickup::before{content:"\F07AA"}.mdi-car-search::before{content:"\F1B8D"}.mdi-car-search-outline::before{content:"\F1B8E"}.mdi-car-seat::before{content:"\F0FA4"}.mdi-car-seat-cooler::before{content:"\F0FA5"}.mdi-car-seat-heater::before{content:"\F0FA6"}.mdi-car-select::before{content:"\F1879"}.mdi-car-settings::before{content:"\F13CD"}.mdi-car-shift-pattern::before{content:"\F0F40"}.mdi-car-side::before{content:"\F07AB"}.mdi-car-speed-limiter::before{content:"\F190E"}.mdi-car-sports::before{content:"\F07AC"}.mdi-car-tire-alert::before{content:"\F0C4D"}.mdi-car-traction-control::before{content:"\F0D64"}.mdi-car-turbocharger::before{content:"\F101A"}.mdi-car-wash::before{content:"\F010E"}.mdi-car-windshield::before{content:"\F101B"}.mdi-car-windshield-outline::before{content:"\F101C"}.mdi-car-wireless::before{content:"\F1878"}.mdi-car-wrench::before{content:"\F1814"}.mdi-carabiner::before{content:"\F14C0"}.mdi-caravan::before{content:"\F07AD"}.mdi-card::before{content:"\F0B6F"}.mdi-card-account-details::before{content:"\F05D2"}.mdi-card-account-details-outline::before{content:"\F0DAB"}.mdi-card-account-details-star::before{content:"\F02A3"}.mdi-card-account-details-star-outline::before{content:"\F06DB"}.mdi-card-account-mail::before{content:"\F018E"}.mdi-card-account-mail-outline::before{content:"\F0E98"}.mdi-card-account-phone::before{content:"\F0E99"}.mdi-card-account-phone-outline::before{content:"\F0E9A"}.mdi-card-bulleted::before{content:"\F0B70"}.mdi-card-bulleted-off::before{content:"\F0B71"}.mdi-card-bulleted-off-outline::before{content:"\F0B72"}.mdi-card-bulleted-outline::before{content:"\F0B73"}.mdi-card-bulleted-settings::before{content:"\F0B74"}.mdi-card-bulleted-settings-outline::before{content:"\F0B75"}.mdi-card-minus::before{content:"\F1600"}.mdi-card-minus-outline::before{content:"\F1601"}.mdi-card-multiple::before{content:"\F17F1"}.mdi-card-multiple-outline::before{content:"\F17F2"}.mdi-card-off::before{content:"\F1602"}.mdi-card-off-outline::before{content:"\F1603"}.mdi-card-outline::before{content:"\F0B76"}.mdi-card-plus::before{content:"\F11FF"}.mdi-card-plus-outline::before{content:"\F1200"}.mdi-card-remove::before{content:"\F1604"}.mdi-card-remove-outline::before{content:"\F1605"}.mdi-card-search::before{content:"\F1074"}.mdi-card-search-outline::before{content:"\F1075"}.mdi-card-text::before{content:"\F0B77"}.mdi-card-text-outline::before{content:"\F0B78"}.mdi-cards::before{content:"\F0638"}.mdi-cards-club::before{content:"\F08CE"}.mdi-cards-club-outline::before{content:"\F189F"}.mdi-cards-diamond::before{content:"\F08CF"}.mdi-cards-diamond-outline::before{content:"\F101D"}.mdi-cards-heart::before{content:"\F08D0"}.mdi-cards-heart-outline::before{content:"\F18A0"}.mdi-cards-outline::before{content:"\F0639"}.mdi-cards-playing::before{content:"\F18A1"}.mdi-cards-playing-club::before{content:"\F18A2"}.mdi-cards-playing-club-multiple::before{content:"\F18A3"}.mdi-cards-playing-club-multiple-outline::before{content:"\F18A4"}.mdi-cards-playing-club-outline::before{content:"\F18A5"}.mdi-cards-playing-diamond::before{content:"\F18A6"}.mdi-cards-playing-diamond-multiple::before{content:"\F18A7"}.mdi-cards-playing-diamond-multiple-outline::before{content:"\F18A8"}.mdi-cards-playing-diamond-outline::before{content:"\F18A9"}.mdi-cards-playing-heart::before{content:"\F18AA"}.mdi-cards-playing-heart-multiple::before{content:"\F18AB"}.mdi-cards-playing-heart-multiple-outline::before{content:"\F18AC"}.mdi-cards-playing-heart-outline::before{content:"\F18AD"}.mdi-cards-playing-outline::before{content:"\F063A"}.mdi-cards-playing-spade::before{content:"\F18AE"}.mdi-cards-playing-spade-multiple::before{content:"\F18AF"}.mdi-cards-playing-spade-multiple-outline::before{content:"\F18B0"}.mdi-cards-playing-spade-outline::before{content:"\F18B1"}.mdi-cards-spade::before{content:"\F08D1"}.mdi-cards-spade-outline::before{content:"\F18B2"}.mdi-cards-variant::before{content:"\F06C7"}.mdi-carrot::before{content:"\F010F"}.mdi-cart::before{content:"\F0110"}.mdi-cart-arrow-down::before{content:"\F0D66"}.mdi-cart-arrow-right::before{content:"\F0C4E"}.mdi-cart-arrow-up::before{content:"\F0D67"}.mdi-cart-check::before{content:"\F15EA"}.mdi-cart-heart::before{content:"\F18E0"}.mdi-cart-minus::before{content:"\F0D68"}.mdi-cart-off::before{content:"\F066B"}.mdi-cart-outline::before{content:"\F0111"}.mdi-cart-percent::before{content:"\F1BAE"}.mdi-cart-plus::before{content:"\F0112"}.mdi-cart-remove::before{content:"\F0D69"}.mdi-cart-variant::before{content:"\F15EB"}.mdi-case-sensitive-alt::before{content:"\F0113"}.mdi-cash::before{content:"\F0114"}.mdi-cash-100::before{content:"\F0115"}.mdi-cash-check::before{content:"\F14EE"}.mdi-cash-clock::before{content:"\F1A91"}.mdi-cash-edit::before{content:"\F1CAB"}.mdi-cash-fast::before{content:"\F185C"}.mdi-cash-lock::before{content:"\F14EA"}.mdi-cash-lock-open::before{content:"\F14EB"}.mdi-cash-marker::before{content:"\F0DB8"}.mdi-cash-minus::before{content:"\F1260"}.mdi-cash-multiple::before{content:"\F0116"}.mdi-cash-off::before{content:"\F1C79"}.mdi-cash-plus::before{content:"\F1261"}.mdi-cash-refund::before{content:"\F0A9C"}.mdi-cash-register::before{content:"\F0CF4"}.mdi-cash-remove::before{content:"\F1262"}.mdi-cash-sync::before{content:"\F1A92"}.mdi-cassette::before{content:"\F09D4"}.mdi-cast::before{content:"\F0118"}.mdi-cast-audio::before{content:"\F101E"}.mdi-cast-audio-variant::before{content:"\F1749"}.mdi-cast-connected::before{content:"\F0119"}.mdi-cast-education::before{content:"\F0E1D"}.mdi-cast-off::before{content:"\F078A"}.mdi-cast-variant::before{content:"\F001F"}.mdi-castle::before{content:"\F011A"}.mdi-cat::before{content:"\F011B"}.mdi-cctv::before{content:"\F07AE"}.mdi-cctv-off::before{content:"\F185F"}.mdi-ceiling-fan::before{content:"\F1797"}.mdi-ceiling-fan-light::before{content:"\F1798"}.mdi-ceiling-light::before{content:"\F0769"}.mdi-ceiling-light-multiple::before{content:"\F18DD"}.mdi-ceiling-light-multiple-outline::before{content:"\F18DE"}.mdi-ceiling-light-outline::before{content:"\F17C7"}.mdi-cellphone::before{content:"\F011C"}.mdi-cellphone-arrow-down::before{content:"\F09D5"}.mdi-cellphone-arrow-down-variant::before{content:"\F19C5"}.mdi-cellphone-basic::before{content:"\F011E"}.mdi-cellphone-charging::before{content:"\F1397"}.mdi-cellphone-check::before{content:"\F17FD"}.mdi-cellphone-cog::before{content:"\F0951"}.mdi-cellphone-dock::before{content:"\F011F"}.mdi-cellphone-information::before{content:"\F0F41"}.mdi-cellphone-key::before{content:"\F094E"}.mdi-cellphone-link::before{content:"\F0121"}.mdi-cellphone-link-off::before{content:"\F0122"}.mdi-cellphone-lock::before{content:"\F094F"}.mdi-cellphone-marker::before{content:"\F183A"}.mdi-cellphone-message::before{content:"\F08D3"}.mdi-cellphone-message-off::before{content:"\F10D2"}.mdi-cellphone-nfc::before{content:"\F0E90"}.mdi-cellphone-nfc-off::before{content:"\F12D8"}.mdi-cellphone-off::before{content:"\F0950"}.mdi-cellphone-play::before{content:"\F101F"}.mdi-cellphone-remove::before{content:"\F094D"}.mdi-cellphone-screenshot::before{content:"\F0A35"}.mdi-cellphone-settings::before{content:"\F0123"}.mdi-cellphone-sound::before{content:"\F0952"}.mdi-cellphone-text::before{content:"\F08D2"}.mdi-cellphone-wireless::before{content:"\F0815"}.mdi-centos::before{content:"\F111A"}.mdi-certificate::before{content:"\F0124"}.mdi-certificate-outline::before{content:"\F1188"}.mdi-chair-rolling::before{content:"\F0F48"}.mdi-chair-school::before{content:"\F0125"}.mdi-chandelier::before{content:"\F1793"}.mdi-charity::before{content:"\F0C4F"}.mdi-charity-search::before{content:"\F1C82"}.mdi-chart-arc::before{content:"\F0126"}.mdi-chart-areaspline::before{content:"\F0127"}.mdi-chart-areaspline-variant::before{content:"\F0E91"}.mdi-chart-bar::before{content:"\F0128"}.mdi-chart-bar-stacked::before{content:"\F076A"}.mdi-chart-bell-curve::before{content:"\F0C50"}.mdi-chart-bell-curve-cumulative::before{content:"\F0FA7"}.mdi-chart-box::before{content:"\F154D"}.mdi-chart-box-multiple::before{content:"\F1CCD"}.mdi-chart-box-multiple-outline::before{content:"\F1CCE"}.mdi-chart-box-outline::before{content:"\F154E"}.mdi-chart-box-plus-outline::before{content:"\F154F"}.mdi-chart-bubble::before{content:"\F05E3"}.mdi-chart-donut::before{content:"\F07AF"}.mdi-chart-donut-variant::before{content:"\F07B0"}.mdi-chart-gantt::before{content:"\F066C"}.mdi-chart-histogram::before{content:"\F0129"}.mdi-chart-line::before{content:"\F012A"}.mdi-chart-line-stacked::before{content:"\F076B"}.mdi-chart-line-variant::before{content:"\F07B1"}.mdi-chart-multiline::before{content:"\F08D4"}.mdi-chart-multiple::before{content:"\F1213"}.mdi-chart-pie::before{content:"\F012B"}.mdi-chart-pie-outline::before{content:"\F1BDF"}.mdi-chart-ppf::before{content:"\F1380"}.mdi-chart-sankey::before{content:"\F11DF"}.mdi-chart-sankey-variant::before{content:"\F11E0"}.mdi-chart-scatter-plot::before{content:"\F0E92"}.mdi-chart-scatter-plot-hexbin::before{content:"\F066D"}.mdi-chart-timeline::before{content:"\F066E"}.mdi-chart-timeline-variant::before{content:"\F0E93"}.mdi-chart-timeline-variant-shimmer::before{content:"\F15B6"}.mdi-chart-tree::before{content:"\F0E94"}.mdi-chart-waterfall::before{content:"\F1918"}.mdi-chat::before{content:"\F0B79"}.mdi-chat-alert::before{content:"\F0B7A"}.mdi-chat-alert-outline::before{content:"\F12C9"}.mdi-chat-minus::before{content:"\F1410"}.mdi-chat-minus-outline::before{content:"\F1413"}.mdi-chat-outline::before{content:"\F0EDE"}.mdi-chat-plus::before{content:"\F140F"}.mdi-chat-plus-outline::before{content:"\F1412"}.mdi-chat-processing::before{content:"\F0B7B"}.mdi-chat-processing-outline::before{content:"\F12CA"}.mdi-chat-question::before{content:"\F1738"}.mdi-chat-question-outline::before{content:"\F1739"}.mdi-chat-remove::before{content:"\F1411"}.mdi-chat-remove-outline::before{content:"\F1414"}.mdi-chat-sleep::before{content:"\F12D1"}.mdi-chat-sleep-outline::before{content:"\F12D2"}.mdi-check::before{content:"\F012C"}.mdi-check-all::before{content:"\F012D"}.mdi-check-bold::before{content:"\F0E1E"}.mdi-check-circle::before{content:"\F05E0"}.mdi-check-circle-outline::before{content:"\F05E1"}.mdi-check-decagram::before{content:"\F0791"}.mdi-check-decagram-outline::before{content:"\F1740"}.mdi-check-network::before{content:"\F0C53"}.mdi-check-network-outline::before{content:"\F0C54"}.mdi-check-outline::before{content:"\F0855"}.mdi-check-underline::before{content:"\F0E1F"}.mdi-check-underline-circle::before{content:"\F0E20"}.mdi-check-underline-circle-outline::before{content:"\F0E21"}.mdi-checkbook::before{content:"\F0A9D"}.mdi-checkbook-arrow-left::before{content:"\F1C1D"}.mdi-checkbook-arrow-right::before{content:"\F1C1E"}.mdi-checkbox-blank::before{content:"\F012E"}.mdi-checkbox-blank-badge::before{content:"\F1176"}.mdi-checkbox-blank-badge-outline::before{content:"\F0117"}.mdi-checkbox-blank-circle::before{content:"\F012F"}.mdi-checkbox-blank-circle-outline::before{content:"\F0130"}.mdi-checkbox-blank-off::before{content:"\F12EC"}.mdi-checkbox-blank-off-outline::before{content:"\F12ED"}.mdi-checkbox-blank-outline::before{content:"\F0131"}.mdi-checkbox-intermediate::before{content:"\F0856"}.mdi-checkbox-intermediate-variant::before{content:"\F1B54"}.mdi-checkbox-marked::before{content:"\F0132"}.mdi-checkbox-marked-circle::before{content:"\F0133"}.mdi-checkbox-marked-circle-auto-outline::before{content:"\F1C26"}.mdi-checkbox-marked-circle-minus-outline::before{content:"\F1C27"}.mdi-checkbox-marked-circle-outline::before{content:"\F0134"}.mdi-checkbox-marked-circle-plus-outline::before{content:"\F1927"}.mdi-checkbox-marked-outline::before{content:"\F0135"}.mdi-checkbox-multiple-blank::before{content:"\F0136"}.mdi-checkbox-multiple-blank-circle::before{content:"\F063B"}.mdi-checkbox-multiple-blank-circle-outline::before{content:"\F063C"}.mdi-checkbox-multiple-blank-outline::before{content:"\F0137"}.mdi-checkbox-multiple-marked::before{content:"\F0138"}.mdi-checkbox-multiple-marked-circle::before{content:"\F063D"}.mdi-checkbox-multiple-marked-circle-outline::before{content:"\F063E"}.mdi-checkbox-multiple-marked-outline::before{content:"\F0139"}.mdi-checkbox-multiple-outline::before{content:"\F0C51"}.mdi-checkbox-outline::before{content:"\F0C52"}.mdi-checkerboard::before{content:"\F013A"}.mdi-checkerboard-minus::before{content:"\F1202"}.mdi-checkerboard-plus::before{content:"\F1201"}.mdi-checkerboard-remove::before{content:"\F1203"}.mdi-cheese::before{content:"\F12B9"}.mdi-cheese-off::before{content:"\F13EE"}.mdi-chef-hat::before{content:"\F0B7C"}.mdi-chemical-weapon::before{content:"\F013B"}.mdi-chess-bishop::before{content:"\F085C"}.mdi-chess-king::before{content:"\F0857"}.mdi-chess-knight::before{content:"\F0858"}.mdi-chess-pawn::before{content:"\F0859"}.mdi-chess-queen::before{content:"\F085A"}.mdi-chess-rook::before{content:"\F085B"}.mdi-chevron-double-down::before{content:"\F013C"}.mdi-chevron-double-left::before{content:"\F013D"}.mdi-chevron-double-right::before{content:"\F013E"}.mdi-chevron-double-up::before{content:"\F013F"}.mdi-chevron-down::before{content:"\F0140"}.mdi-chevron-down-box::before{content:"\F09D6"}.mdi-chevron-down-box-outline::before{content:"\F09D7"}.mdi-chevron-down-circle::before{content:"\F0B26"}.mdi-chevron-down-circle-outline::before{content:"\F0B27"}.mdi-chevron-left::before{content:"\F0141"}.mdi-chevron-left-box::before{content:"\F09D8"}.mdi-chevron-left-box-outline::before{content:"\F09D9"}.mdi-chevron-left-circle::before{content:"\F0B28"}.mdi-chevron-left-circle-outline::before{content:"\F0B29"}.mdi-chevron-right::before{content:"\F0142"}.mdi-chevron-right-box::before{content:"\F09DA"}.mdi-chevron-right-box-outline::before{content:"\F09DB"}.mdi-chevron-right-circle::before{content:"\F0B2A"}.mdi-chevron-right-circle-outline::before{content:"\F0B2B"}.mdi-chevron-triple-down::before{content:"\F0DB9"}.mdi-chevron-triple-left::before{content:"\F0DBA"}.mdi-chevron-triple-right::before{content:"\F0DBB"}.mdi-chevron-triple-up::before{content:"\F0DBC"}.mdi-chevron-up::before{content:"\F0143"}.mdi-chevron-up-box::before{content:"\F09DC"}.mdi-chevron-up-box-outline::before{content:"\F09DD"}.mdi-chevron-up-circle::before{content:"\F0B2C"}.mdi-chevron-up-circle-outline::before{content:"\F0B2D"}.mdi-chili-alert::before{content:"\F17EA"}.mdi-chili-alert-outline::before{content:"\F17EB"}.mdi-chili-hot::before{content:"\F07B2"}.mdi-chili-hot-outline::before{content:"\F17EC"}.mdi-chili-medium::before{content:"\F07B3"}.mdi-chili-medium-outline::before{content:"\F17ED"}.mdi-chili-mild::before{content:"\F07B4"}.mdi-chili-mild-outline::before{content:"\F17EE"}.mdi-chili-off::before{content:"\F1467"}.mdi-chili-off-outline::before{content:"\F17EF"}.mdi-chip::before{content:"\F061A"}.mdi-church::before{content:"\F0144"}.mdi-church-outline::before{content:"\F1B02"}.mdi-cigar::before{content:"\F1189"}.mdi-cigar-off::before{content:"\F141B"}.mdi-circle::before{content:"\F0765"}.mdi-circle-box::before{content:"\F15DC"}.mdi-circle-box-outline::before{content:"\F15DD"}.mdi-circle-double::before{content:"\F0E95"}.mdi-circle-edit-outline::before{content:"\F08D5"}.mdi-circle-expand::before{content:"\F0E96"}.mdi-circle-half::before{content:"\F1395"}.mdi-circle-half-full::before{content:"\F1396"}.mdi-circle-medium::before{content:"\F09DE"}.mdi-circle-multiple::before{content:"\F0B38"}.mdi-circle-multiple-outline::before{content:"\F0695"}.mdi-circle-off-outline::before{content:"\F10D3"}.mdi-circle-opacity::before{content:"\F1853"}.mdi-circle-outline::before{content:"\F0766"}.mdi-circle-slice-1::before{content:"\F0A9E"}.mdi-circle-slice-2::before{content:"\F0A9F"}.mdi-circle-slice-3::before{content:"\F0AA0"}.mdi-circle-slice-4::before{content:"\F0AA1"}.mdi-circle-slice-5::before{content:"\F0AA2"}.mdi-circle-slice-6::before{content:"\F0AA3"}.mdi-circle-slice-7::before{content:"\F0AA4"}.mdi-circle-slice-8::before{content:"\F0AA5"}.mdi-circle-small::before{content:"\F09DF"}.mdi-circular-saw::before{content:"\F0E22"}.mdi-city::before{content:"\F0146"}.mdi-city-switch::before{content:"\F1C28"}.mdi-city-variant::before{content:"\F0A36"}.mdi-city-variant-outline::before{content:"\F0A37"}.mdi-clipboard::before{content:"\F0147"}.mdi-clipboard-account::before{content:"\F0148"}.mdi-clipboard-account-outline::before{content:"\F0C55"}.mdi-clipboard-alert::before{content:"\F0149"}.mdi-clipboard-alert-outline::before{content:"\F0CF7"}.mdi-clipboard-arrow-down::before{content:"\F014A"}.mdi-clipboard-arrow-down-outline::before{content:"\F0C56"}.mdi-clipboard-arrow-left::before{content:"\F014B"}.mdi-clipboard-arrow-left-outline::before{content:"\F0CF8"}.mdi-clipboard-arrow-right::before{content:"\F0CF9"}.mdi-clipboard-arrow-right-outline::before{content:"\F0CFA"}.mdi-clipboard-arrow-up::before{content:"\F0C57"}.mdi-clipboard-arrow-up-outline::before{content:"\F0C58"}.mdi-clipboard-check::before{content:"\F014E"}.mdi-clipboard-check-multiple::before{content:"\F1263"}.mdi-clipboard-check-multiple-outline::before{content:"\F1264"}.mdi-clipboard-check-outline::before{content:"\F08A8"}.mdi-clipboard-clock::before{content:"\F16E2"}.mdi-clipboard-clock-outline::before{content:"\F16E3"}.mdi-clipboard-edit::before{content:"\F14E5"}.mdi-clipboard-edit-outline::before{content:"\F14E6"}.mdi-clipboard-file::before{content:"\F1265"}.mdi-clipboard-file-outline::before{content:"\F1266"}.mdi-clipboard-flow::before{content:"\F06C8"}.mdi-clipboard-flow-outline::before{content:"\F1117"}.mdi-clipboard-list::before{content:"\F10D4"}.mdi-clipboard-list-outline::before{content:"\F10D5"}.mdi-clipboard-minus::before{content:"\F1618"}.mdi-clipboard-minus-outline::before{content:"\F1619"}.mdi-clipboard-multiple::before{content:"\F1267"}.mdi-clipboard-multiple-outline::before{content:"\F1268"}.mdi-clipboard-off::before{content:"\F161A"}.mdi-clipboard-off-outline::before{content:"\F161B"}.mdi-clipboard-outline::before{content:"\F014C"}.mdi-clipboard-play::before{content:"\F0C59"}.mdi-clipboard-play-multiple::before{content:"\F1269"}.mdi-clipboard-play-multiple-outline::before{content:"\F126A"}.mdi-clipboard-play-outline::before{content:"\F0C5A"}.mdi-clipboard-plus::before{content:"\F0751"}.mdi-clipboard-plus-outline::before{content:"\F131F"}.mdi-clipboard-pulse::before{content:"\F085D"}.mdi-clipboard-pulse-outline::before{content:"\F085E"}.mdi-clipboard-remove::before{content:"\F161C"}.mdi-clipboard-remove-outline::before{content:"\F161D"}.mdi-clipboard-search::before{content:"\F161E"}.mdi-clipboard-search-outline::before{content:"\F161F"}.mdi-clipboard-text::before{content:"\F014D"}.mdi-clipboard-text-clock::before{content:"\F18F9"}.mdi-clipboard-text-clock-outline::before{content:"\F18FA"}.mdi-clipboard-text-multiple::before{content:"\F126B"}.mdi-clipboard-text-multiple-outline::before{content:"\F126C"}.mdi-clipboard-text-off::before{content:"\F1620"}.mdi-clipboard-text-off-outline::before{content:"\F1621"}.mdi-clipboard-text-outline::before{content:"\F0A38"}.mdi-clipboard-text-play::before{content:"\F0C5B"}.mdi-clipboard-text-play-outline::before{content:"\F0C5C"}.mdi-clipboard-text-search::before{content:"\F1622"}.mdi-clipboard-text-search-outline::before{content:"\F1623"}.mdi-clippy::before{content:"\F014F"}.mdi-clock::before{content:"\F0954"}.mdi-clock-alert::before{content:"\F0955"}.mdi-clock-alert-outline::before{content:"\F05CE"}.mdi-clock-check::before{content:"\F0FA8"}.mdi-clock-check-outline::before{content:"\F0FA9"}.mdi-clock-digital::before{content:"\F0E97"}.mdi-clock-edit::before{content:"\F19BA"}.mdi-clock-edit-outline::before{content:"\F19BB"}.mdi-clock-end::before{content:"\F0151"}.mdi-clock-fast::before{content:"\F0152"}.mdi-clock-in::before{content:"\F0153"}.mdi-clock-minus::before{content:"\F1863"}.mdi-clock-minus-outline::before{content:"\F1864"}.mdi-clock-out::before{content:"\F0154"}.mdi-clock-outline::before{content:"\F0150"}.mdi-clock-plus::before{content:"\F1861"}.mdi-clock-plus-outline::before{content:"\F1862"}.mdi-clock-remove::before{content:"\F1865"}.mdi-clock-remove-outline::before{content:"\F1866"}.mdi-clock-star-four-points::before{content:"\F1C29"}.mdi-clock-star-four-points-outline::before{content:"\F1C2A"}.mdi-clock-start::before{content:"\F0155"}.mdi-clock-time-eight::before{content:"\F1446"}.mdi-clock-time-eight-outline::before{content:"\F1452"}.mdi-clock-time-eleven::before{content:"\F1449"}.mdi-clock-time-eleven-outline::before{content:"\F1455"}.mdi-clock-time-five::before{content:"\F1443"}.mdi-clock-time-five-outline::before{content:"\F144F"}.mdi-clock-time-four::before{content:"\F1442"}.mdi-clock-time-four-outline::before{content:"\F144E"}.mdi-clock-time-nine::before{content:"\F1447"}.mdi-clock-time-nine-outline::before{content:"\F1453"}.mdi-clock-time-one::before{content:"\F143F"}.mdi-clock-time-one-outline::before{content:"\F144B"}.mdi-clock-time-seven::before{content:"\F1445"}.mdi-clock-time-seven-outline::before{content:"\F1451"}.mdi-clock-time-six::before{content:"\F1444"}.mdi-clock-time-six-outline::before{content:"\F1450"}.mdi-clock-time-ten::before{content:"\F1448"}.mdi-clock-time-ten-outline::before{content:"\F1454"}.mdi-clock-time-three::before{content:"\F1441"}.mdi-clock-time-three-outline::before{content:"\F144D"}.mdi-clock-time-twelve::before{content:"\F144A"}.mdi-clock-time-twelve-outline::before{content:"\F1456"}.mdi-clock-time-two::before{content:"\F1440"}.mdi-clock-time-two-outline::before{content:"\F144C"}.mdi-close::before{content:"\F0156"}.mdi-close-box::before{content:"\F0157"}.mdi-close-box-multiple::before{content:"\F0C5D"}.mdi-close-box-multiple-outline::before{content:"\F0C5E"}.mdi-close-box-outline::before{content:"\F0158"}.mdi-close-circle::before{content:"\F0159"}.mdi-close-circle-multiple::before{content:"\F062A"}.mdi-close-circle-multiple-outline::before{content:"\F0883"}.mdi-close-circle-outline::before{content:"\F015A"}.mdi-close-network::before{content:"\F015B"}.mdi-close-network-outline::before{content:"\F0C5F"}.mdi-close-octagon::before{content:"\F015C"}.mdi-close-octagon-outline::before{content:"\F015D"}.mdi-close-outline::before{content:"\F06C9"}.mdi-close-thick::before{content:"\F1398"}.mdi-closed-caption::before{content:"\F015E"}.mdi-closed-caption-outline::before{content:"\F0DBD"}.mdi-cloud::before{content:"\F015F"}.mdi-cloud-alert::before{content:"\F09E0"}.mdi-cloud-alert-outline::before{content:"\F1BE0"}.mdi-cloud-arrow-down::before{content:"\F1BE1"}.mdi-cloud-arrow-down-outline::before{content:"\F1BE2"}.mdi-cloud-arrow-left::before{content:"\F1BE3"}.mdi-cloud-arrow-left-outline::before{content:"\F1BE4"}.mdi-cloud-arrow-right::before{content:"\F1BE5"}.mdi-cloud-arrow-right-outline::before{content:"\F1BE6"}.mdi-cloud-arrow-up::before{content:"\F1BE7"}.mdi-cloud-arrow-up-outline::before{content:"\F1BE8"}.mdi-cloud-braces::before{content:"\F07B5"}.mdi-cloud-cancel::before{content:"\F1BE9"}.mdi-cloud-cancel-outline::before{content:"\F1BEA"}.mdi-cloud-check::before{content:"\F1BEB"}.mdi-cloud-check-outline::before{content:"\F1BEC"}.mdi-cloud-check-variant::before{content:"\F0160"}.mdi-cloud-check-variant-outline::before{content:"\F12CC"}.mdi-cloud-circle::before{content:"\F0161"}.mdi-cloud-circle-outline::before{content:"\F1BED"}.mdi-cloud-clock::before{content:"\F1BEE"}.mdi-cloud-clock-outline::before{content:"\F1BEF"}.mdi-cloud-cog::before{content:"\F1BF0"}.mdi-cloud-cog-outline::before{content:"\F1BF1"}.mdi-cloud-download::before{content:"\F0162"}.mdi-cloud-download-outline::before{content:"\F0B7D"}.mdi-cloud-key::before{content:"\F1CA1"}.mdi-cloud-key-outline::before{content:"\F1CA2"}.mdi-cloud-lock::before{content:"\F11F1"}.mdi-cloud-lock-open::before{content:"\F1BF2"}.mdi-cloud-lock-open-outline::before{content:"\F1BF3"}.mdi-cloud-lock-outline::before{content:"\F11F2"}.mdi-cloud-minus::before{content:"\F1BF4"}.mdi-cloud-minus-outline::before{content:"\F1BF5"}.mdi-cloud-off::before{content:"\F1BF6"}.mdi-cloud-off-outline::before{content:"\F0164"}.mdi-cloud-outline::before{content:"\F0163"}.mdi-cloud-percent::before{content:"\F1A35"}.mdi-cloud-percent-outline::before{content:"\F1A36"}.mdi-cloud-plus::before{content:"\F1BF7"}.mdi-cloud-plus-outline::before{content:"\F1BF8"}.mdi-cloud-print::before{content:"\F0165"}.mdi-cloud-print-outline::before{content:"\F0166"}.mdi-cloud-question::before{content:"\F0A39"}.mdi-cloud-question-outline::before{content:"\F1BF9"}.mdi-cloud-refresh::before{content:"\F1BFA"}.mdi-cloud-refresh-outline::before{content:"\F1BFB"}.mdi-cloud-refresh-variant::before{content:"\F052A"}.mdi-cloud-refresh-variant-outline::before{content:"\F1BFC"}.mdi-cloud-remove::before{content:"\F1BFD"}.mdi-cloud-remove-outline::before{content:"\F1BFE"}.mdi-cloud-search::before{content:"\F0956"}.mdi-cloud-search-outline::before{content:"\F0957"}.mdi-cloud-sync::before{content:"\F063F"}.mdi-cloud-sync-outline::before{content:"\F12D6"}.mdi-cloud-tags::before{content:"\F07B6"}.mdi-cloud-upload::before{content:"\F0167"}.mdi-cloud-upload-outline::before{content:"\F0B7E"}.mdi-clouds::before{content:"\F1B95"}.mdi-clover::before{content:"\F0816"}.mdi-clover-outline::before{content:"\F1C62"}.mdi-coach-lamp::before{content:"\F1020"}.mdi-coach-lamp-variant::before{content:"\F1A37"}.mdi-coat-rack::before{content:"\F109E"}.mdi-code-array::before{content:"\F0168"}.mdi-code-block-braces::before{content:"\F1C83"}.mdi-code-block-brackets::before{content:"\F1C84"}.mdi-code-block-parentheses::before{content:"\F1C85"}.mdi-code-block-tags::before{content:"\F1C86"}.mdi-code-braces::before{content:"\F0169"}.mdi-code-braces-box::before{content:"\F10D6"}.mdi-code-brackets::before{content:"\F016A"}.mdi-code-equal::before{content:"\F016B"}.mdi-code-greater-than::before{content:"\F016C"}.mdi-code-greater-than-or-equal::before{content:"\F016D"}.mdi-code-json::before{content:"\F0626"}.mdi-code-less-than::before{content:"\F016E"}.mdi-code-less-than-or-equal::before{content:"\F016F"}.mdi-code-not-equal::before{content:"\F0170"}.mdi-code-not-equal-variant::before{content:"\F0171"}.mdi-code-parentheses::before{content:"\F0172"}.mdi-code-parentheses-box::before{content:"\F10D7"}.mdi-code-string::before{content:"\F0173"}.mdi-code-tags::before{content:"\F0174"}.mdi-code-tags-check::before{content:"\F0694"}.mdi-codepen::before{content:"\F0175"}.mdi-coffee::before{content:"\F0176"}.mdi-coffee-maker::before{content:"\F109F"}.mdi-coffee-maker-check::before{content:"\F1931"}.mdi-coffee-maker-check-outline::before{content:"\F1932"}.mdi-coffee-maker-outline::before{content:"\F181B"}.mdi-coffee-off::before{content:"\F0FAA"}.mdi-coffee-off-outline::before{content:"\F0FAB"}.mdi-coffee-outline::before{content:"\F06CA"}.mdi-coffee-to-go::before{content:"\F0177"}.mdi-coffee-to-go-outline::before{content:"\F130E"}.mdi-coffin::before{content:"\F0B7F"}.mdi-cog::before{content:"\F0493"}.mdi-cog-box::before{content:"\F0494"}.mdi-cog-clockwise::before{content:"\F11DD"}.mdi-cog-counterclockwise::before{content:"\F11DE"}.mdi-cog-off::before{content:"\F13CE"}.mdi-cog-off-outline::before{content:"\F13CF"}.mdi-cog-outline::before{content:"\F08BB"}.mdi-cog-pause::before{content:"\F1933"}.mdi-cog-pause-outline::before{content:"\F1934"}.mdi-cog-play::before{content:"\F1935"}.mdi-cog-play-outline::before{content:"\F1936"}.mdi-cog-refresh::before{content:"\F145E"}.mdi-cog-refresh-outline::before{content:"\F145F"}.mdi-cog-stop::before{content:"\F1937"}.mdi-cog-stop-outline::before{content:"\F1938"}.mdi-cog-sync::before{content:"\F1460"}.mdi-cog-sync-outline::before{content:"\F1461"}.mdi-cog-transfer::before{content:"\F105B"}.mdi-cog-transfer-outline::before{content:"\F105C"}.mdi-cogs::before{content:"\F08D6"}.mdi-collage::before{content:"\F0640"}.mdi-collapse-all::before{content:"\F0AA6"}.mdi-collapse-all-outline::before{content:"\F0AA7"}.mdi-color-helper::before{content:"\F0179"}.mdi-comma::before{content:"\F0E23"}.mdi-comma-box::before{content:"\F0E2B"}.mdi-comma-box-outline::before{content:"\F0E24"}.mdi-comma-circle::before{content:"\F0E25"}.mdi-comma-circle-outline::before{content:"\F0E26"}.mdi-comment::before{content:"\F017A"}.mdi-comment-account::before{content:"\F017B"}.mdi-comment-account-outline::before{content:"\F017C"}.mdi-comment-alert::before{content:"\F017D"}.mdi-comment-alert-outline::before{content:"\F017E"}.mdi-comment-arrow-left::before{content:"\F09E1"}.mdi-comment-arrow-left-outline::before{content:"\F09E2"}.mdi-comment-arrow-right::before{content:"\F09E3"}.mdi-comment-arrow-right-outline::before{content:"\F09E4"}.mdi-comment-bookmark::before{content:"\F15AE"}.mdi-comment-bookmark-outline::before{content:"\F15AF"}.mdi-comment-check::before{content:"\F017F"}.mdi-comment-check-outline::before{content:"\F0180"}.mdi-comment-edit::before{content:"\F11BF"}.mdi-comment-edit-outline::before{content:"\F12C4"}.mdi-comment-eye::before{content:"\F0A3A"}.mdi-comment-eye-outline::before{content:"\F0A3B"}.mdi-comment-flash::before{content:"\F15B0"}.mdi-comment-flash-outline::before{content:"\F15B1"}.mdi-comment-minus::before{content:"\F15DF"}.mdi-comment-minus-outline::before{content:"\F15E0"}.mdi-comment-multiple::before{content:"\F085F"}.mdi-comment-multiple-outline::before{content:"\F0181"}.mdi-comment-off::before{content:"\F15E1"}.mdi-comment-off-outline::before{content:"\F15E2"}.mdi-comment-outline::before{content:"\F0182"}.mdi-comment-plus::before{content:"\F09E5"}.mdi-comment-plus-outline::before{content:"\F0183"}.mdi-comment-processing::before{content:"\F0184"}.mdi-comment-processing-outline::before{content:"\F0185"}.mdi-comment-question::before{content:"\F0817"}.mdi-comment-question-outline::before{content:"\F0186"}.mdi-comment-quote::before{content:"\F1021"}.mdi-comment-quote-outline::before{content:"\F1022"}.mdi-comment-remove::before{content:"\F05DE"}.mdi-comment-remove-outline::before{content:"\F0187"}.mdi-comment-search::before{content:"\F0A3C"}.mdi-comment-search-outline::before{content:"\F0A3D"}.mdi-comment-text::before{content:"\F0188"}.mdi-comment-text-multiple::before{content:"\F0860"}.mdi-comment-text-multiple-outline::before{content:"\F0861"}.mdi-comment-text-outline::before{content:"\F0189"}.mdi-compare::before{content:"\F018A"}.mdi-compare-horizontal::before{content:"\F1492"}.mdi-compare-remove::before{content:"\F18B3"}.mdi-compare-vertical::before{content:"\F1493"}.mdi-compass::before{content:"\F018B"}.mdi-compass-off::before{content:"\F0B80"}.mdi-compass-off-outline::before{content:"\F0B81"}.mdi-compass-outline::before{content:"\F018C"}.mdi-compass-rose::before{content:"\F1382"}.mdi-compost::before{content:"\F1A38"}.mdi-cone::before{content:"\F194C"}.mdi-cone-off::before{content:"\F194D"}.mdi-connection::before{content:"\F1616"}.mdi-console::before{content:"\F018D"}.mdi-console-line::before{content:"\F07B7"}.mdi-console-network::before{content:"\F08A9"}.mdi-console-network-outline::before{content:"\F0C60"}.mdi-consolidate::before{content:"\F10D8"}.mdi-contactless-payment::before{content:"\F0D6A"}.mdi-contactless-payment-circle::before{content:"\F0321"}.mdi-contactless-payment-circle-outline::before{content:"\F0408"}.mdi-contacts::before{content:"\F06CB"}.mdi-contacts-outline::before{content:"\F05B8"}.mdi-contain::before{content:"\F0A3E"}.mdi-contain-end::before{content:"\F0A3F"}.mdi-contain-start::before{content:"\F0A40"}.mdi-content-copy::before{content:"\F018F"}.mdi-content-cut::before{content:"\F0190"}.mdi-content-duplicate::before{content:"\F0191"}.mdi-content-paste::before{content:"\F0192"}.mdi-content-save::before{content:"\F0193"}.mdi-content-save-alert::before{content:"\F0F42"}.mdi-content-save-alert-outline::before{content:"\F0F43"}.mdi-content-save-all::before{content:"\F0194"}.mdi-content-save-all-outline::before{content:"\F0F44"}.mdi-content-save-check::before{content:"\F18EA"}.mdi-content-save-check-outline::before{content:"\F18EB"}.mdi-content-save-cog::before{content:"\F145B"}.mdi-content-save-cog-outline::before{content:"\F145C"}.mdi-content-save-edit::before{content:"\F0CFB"}.mdi-content-save-edit-outline::before{content:"\F0CFC"}.mdi-content-save-minus::before{content:"\F1B43"}.mdi-content-save-minus-outline::before{content:"\F1B44"}.mdi-content-save-move::before{content:"\F0E27"}.mdi-content-save-move-outline::before{content:"\F0E28"}.mdi-content-save-off::before{content:"\F1643"}.mdi-content-save-off-outline::before{content:"\F1644"}.mdi-content-save-outline::before{content:"\F0818"}.mdi-content-save-plus::before{content:"\F1B41"}.mdi-content-save-plus-outline::before{content:"\F1B42"}.mdi-content-save-settings::before{content:"\F061B"}.mdi-content-save-settings-outline::before{content:"\F0B2E"}.mdi-contrast::before{content:"\F0195"}.mdi-contrast-box::before{content:"\F0196"}.mdi-contrast-circle::before{content:"\F0197"}.mdi-controller::before{content:"\F02B4"}.mdi-controller-classic::before{content:"\F0B82"}.mdi-controller-classic-outline::before{content:"\F0B83"}.mdi-controller-off::before{content:"\F02B5"}.mdi-cookie::before{content:"\F0198"}.mdi-cookie-alert::before{content:"\F16D0"}.mdi-cookie-alert-outline::before{content:"\F16D1"}.mdi-cookie-check::before{content:"\F16D2"}.mdi-cookie-check-outline::before{content:"\F16D3"}.mdi-cookie-clock::before{content:"\F16E4"}.mdi-cookie-clock-outline::before{content:"\F16E5"}.mdi-cookie-cog::before{content:"\F16D4"}.mdi-cookie-cog-outline::before{content:"\F16D5"}.mdi-cookie-edit::before{content:"\F16E6"}.mdi-cookie-edit-outline::before{content:"\F16E7"}.mdi-cookie-lock::before{content:"\F16E8"}.mdi-cookie-lock-outline::before{content:"\F16E9"}.mdi-cookie-minus::before{content:"\F16DA"}.mdi-cookie-minus-outline::before{content:"\F16DB"}.mdi-cookie-off::before{content:"\F16EA"}.mdi-cookie-off-outline::before{content:"\F16EB"}.mdi-cookie-outline::before{content:"\F16DE"}.mdi-cookie-plus::before{content:"\F16D6"}.mdi-cookie-plus-outline::before{content:"\F16D7"}.mdi-cookie-refresh::before{content:"\F16EC"}.mdi-cookie-refresh-outline::before{content:"\F16ED"}.mdi-cookie-remove::before{content:"\F16D8"}.mdi-cookie-remove-outline::before{content:"\F16D9"}.mdi-cookie-settings::before{content:"\F16DC"}.mdi-cookie-settings-outline::before{content:"\F16DD"}.mdi-coolant-temperature::before{content:"\F03C8"}.mdi-copyleft::before{content:"\F1939"}.mdi-copyright::before{content:"\F05E6"}.mdi-cordova::before{content:"\F0958"}.mdi-corn::before{content:"\F07B8"}.mdi-corn-off::before{content:"\F13EF"}.mdi-cosine-wave::before{content:"\F1479"}.mdi-counter::before{content:"\F0199"}.mdi-countertop::before{content:"\F181C"}.mdi-countertop-outline::before{content:"\F181D"}.mdi-cow::before{content:"\F019A"}.mdi-cow-off::before{content:"\F18FC"}.mdi-cpu-32-bit::before{content:"\F0EDF"}.mdi-cpu-64-bit::before{content:"\F0EE0"}.mdi-cradle::before{content:"\F198B"}.mdi-cradle-outline::before{content:"\F1991"}.mdi-crane::before{content:"\F0862"}.mdi-creation::before{content:"\F0674"}.mdi-creation-outline::before{content:"\F1C2B"}.mdi-creative-commons::before{content:"\F0D6B"}.mdi-credit-card::before{content:"\F0FEF"}.mdi-credit-card-check::before{content:"\F13D0"}.mdi-credit-card-check-outline::before{content:"\F13D1"}.mdi-credit-card-chip::before{content:"\F190F"}.mdi-credit-card-chip-outline::before{content:"\F1910"}.mdi-credit-card-clock::before{content:"\F0EE1"}.mdi-credit-card-clock-outline::before{content:"\F0EE2"}.mdi-credit-card-edit::before{content:"\F17D7"}.mdi-credit-card-edit-outline::before{content:"\F17D8"}.mdi-credit-card-fast::before{content:"\F1911"}.mdi-credit-card-fast-outline::before{content:"\F1912"}.mdi-credit-card-lock::before{content:"\F18E7"}.mdi-credit-card-lock-outline::before{content:"\F18E8"}.mdi-credit-card-marker::before{content:"\F06A8"}.mdi-credit-card-marker-outline::before{content:"\F0DBE"}.mdi-credit-card-minus::before{content:"\F0FAC"}.mdi-credit-card-minus-outline::before{content:"\F0FAD"}.mdi-credit-card-multiple::before{content:"\F0FF0"}.mdi-credit-card-multiple-outline::before{content:"\F019C"}.mdi-credit-card-off::before{content:"\F0FF1"}.mdi-credit-card-off-outline::before{content:"\F05E4"}.mdi-credit-card-outline::before{content:"\F019B"}.mdi-credit-card-plus::before{content:"\F0FF2"}.mdi-credit-card-plus-outline::before{content:"\F0676"}.mdi-credit-card-refresh::before{content:"\F1645"}.mdi-credit-card-refresh-outline::before{content:"\F1646"}.mdi-credit-card-refund::before{content:"\F0FF3"}.mdi-credit-card-refund-outline::before{content:"\F0AA8"}.mdi-credit-card-remove::before{content:"\F0FAE"}.mdi-credit-card-remove-outline::before{content:"\F0FAF"}.mdi-credit-card-scan::before{content:"\F0FF4"}.mdi-credit-card-scan-outline::before{content:"\F019D"}.mdi-credit-card-search::before{content:"\F1647"}.mdi-credit-card-search-outline::before{content:"\F1648"}.mdi-credit-card-settings::before{content:"\F0FF5"}.mdi-credit-card-settings-outline::before{content:"\F08D7"}.mdi-credit-card-sync::before{content:"\F1649"}.mdi-credit-card-sync-outline::before{content:"\F164A"}.mdi-credit-card-wireless::before{content:"\F0802"}.mdi-credit-card-wireless-off::before{content:"\F057A"}.mdi-credit-card-wireless-off-outline::before{content:"\F057B"}.mdi-credit-card-wireless-outline::before{content:"\F0D6C"}.mdi-cricket::before{content:"\F0D6D"}.mdi-crop::before{content:"\F019E"}.mdi-crop-free::before{content:"\F019F"}.mdi-crop-landscape::before{content:"\F01A0"}.mdi-crop-portrait::before{content:"\F01A1"}.mdi-crop-rotate::before{content:"\F0696"}.mdi-crop-square::before{content:"\F01A2"}.mdi-cross::before{content:"\F0953"}.mdi-cross-bolnisi::before{content:"\F0CED"}.mdi-cross-celtic::before{content:"\F0CF5"}.mdi-cross-outline::before{content:"\F0CF6"}.mdi-crosshairs::before{content:"\F01A3"}.mdi-crosshairs-gps::before{content:"\F01A4"}.mdi-crosshairs-off::before{content:"\F0F45"}.mdi-crosshairs-question::before{content:"\F1136"}.mdi-crowd::before{content:"\F1975"}.mdi-crown::before{content:"\F01A5"}.mdi-crown-circle::before{content:"\F17DC"}.mdi-crown-circle-outline::before{content:"\F17DD"}.mdi-crown-outline::before{content:"\F11D0"}.mdi-cryengine::before{content:"\F0959"}.mdi-crystal-ball::before{content:"\F0B2F"}.mdi-cube::before{content:"\F01A6"}.mdi-cube-off::before{content:"\F141C"}.mdi-cube-off-outline::before{content:"\F141D"}.mdi-cube-outline::before{content:"\F01A7"}.mdi-cube-scan::before{content:"\F0B84"}.mdi-cube-send::before{content:"\F01A8"}.mdi-cube-unfolded::before{content:"\F01A9"}.mdi-cup::before{content:"\F01AA"}.mdi-cup-off::before{content:"\F05E5"}.mdi-cup-off-outline::before{content:"\F137D"}.mdi-cup-outline::before{content:"\F130F"}.mdi-cup-water::before{content:"\F01AB"}.mdi-cupboard::before{content:"\F0F46"}.mdi-cupboard-outline::before{content:"\F0F47"}.mdi-cupcake::before{content:"\F095A"}.mdi-curling::before{content:"\F0863"}.mdi-currency-bdt::before{content:"\F0864"}.mdi-currency-brl::before{content:"\F0B85"}.mdi-currency-btc::before{content:"\F01AC"}.mdi-currency-cny::before{content:"\F07BA"}.mdi-currency-eth::before{content:"\F07BB"}.mdi-currency-eur::before{content:"\F01AD"}.mdi-currency-eur-off::before{content:"\F1315"}.mdi-currency-fra::before{content:"\F1A39"}.mdi-currency-gbp::before{content:"\F01AE"}.mdi-currency-ils::before{content:"\F0C61"}.mdi-currency-inr::before{content:"\F01AF"}.mdi-currency-jpy::before{content:"\F07BC"}.mdi-currency-krw::before{content:"\F07BD"}.mdi-currency-kzt::before{content:"\F0865"}.mdi-currency-mnt::before{content:"\F1512"}.mdi-currency-ngn::before{content:"\F01B0"}.mdi-currency-php::before{content:"\F09E6"}.mdi-currency-rial::before{content:"\F0E9C"}.mdi-currency-rub::before{content:"\F01B1"}.mdi-currency-rupee::before{content:"\F1976"}.mdi-currency-sign::before{content:"\F07BE"}.mdi-currency-thb::before{content:"\F1C05"}.mdi-currency-try::before{content:"\F01B2"}.mdi-currency-twd::before{content:"\F07BF"}.mdi-currency-uah::before{content:"\F1B9B"}.mdi-currency-usd::before{content:"\F01C1"}.mdi-currency-usd-off::before{content:"\F067A"}.mdi-current-ac::before{content:"\F1480"}.mdi-current-dc::before{content:"\F095C"}.mdi-cursor-default::before{content:"\F01C0"}.mdi-cursor-default-click::before{content:"\F0CFD"}.mdi-cursor-default-click-outline::before{content:"\F0CFE"}.mdi-cursor-default-gesture::before{content:"\F1127"}.mdi-cursor-default-gesture-outline::before{content:"\F1128"}.mdi-cursor-default-outline::before{content:"\F01BF"}.mdi-cursor-move::before{content:"\F01BE"}.mdi-cursor-pointer::before{content:"\F01BD"}.mdi-cursor-text::before{content:"\F05E7"}.mdi-curtains::before{content:"\F1846"}.mdi-curtains-closed::before{content:"\F1847"}.mdi-cylinder::before{content:"\F194E"}.mdi-cylinder-off::before{content:"\F194F"}.mdi-dance-ballroom::before{content:"\F15FB"}.mdi-dance-pole::before{content:"\F1578"}.mdi-data-matrix::before{content:"\F153C"}.mdi-data-matrix-edit::before{content:"\F153D"}.mdi-data-matrix-minus::before{content:"\F153E"}.mdi-data-matrix-plus::before{content:"\F153F"}.mdi-data-matrix-remove::before{content:"\F1540"}.mdi-data-matrix-scan::before{content:"\F1541"}.mdi-database::before{content:"\F01BC"}.mdi-database-alert::before{content:"\F163A"}.mdi-database-alert-outline::before{content:"\F1624"}.mdi-database-arrow-down::before{content:"\F163B"}.mdi-database-arrow-down-outline::before{content:"\F1625"}.mdi-database-arrow-left::before{content:"\F163C"}.mdi-database-arrow-left-outline::before{content:"\F1626"}.mdi-database-arrow-right::before{content:"\F163D"}.mdi-database-arrow-right-outline::before{content:"\F1627"}.mdi-database-arrow-up::before{content:"\F163E"}.mdi-database-arrow-up-outline::before{content:"\F1628"}.mdi-database-check::before{content:"\F0AA9"}.mdi-database-check-outline::before{content:"\F1629"}.mdi-database-clock::before{content:"\F163F"}.mdi-database-clock-outline::before{content:"\F162A"}.mdi-database-cog::before{content:"\F164B"}.mdi-database-cog-outline::before{content:"\F164C"}.mdi-database-edit::before{content:"\F0B86"}.mdi-database-edit-outline::before{content:"\F162B"}.mdi-database-export::before{content:"\F095E"}.mdi-database-export-outline::before{content:"\F162C"}.mdi-database-eye::before{content:"\F191F"}.mdi-database-eye-off::before{content:"\F1920"}.mdi-database-eye-off-outline::before{content:"\F1921"}.mdi-database-eye-outline::before{content:"\F1922"}.mdi-database-import::before{content:"\F095D"}.mdi-database-import-outline::before{content:"\F162D"}.mdi-database-lock::before{content:"\F0AAA"}.mdi-database-lock-outline::before{content:"\F162E"}.mdi-database-marker::before{content:"\F12F6"}.mdi-database-marker-outline::before{content:"\F162F"}.mdi-database-minus::before{content:"\F01BB"}.mdi-database-minus-outline::before{content:"\F1630"}.mdi-database-off::before{content:"\F1640"}.mdi-database-off-outline::before{content:"\F1631"}.mdi-database-outline::before{content:"\F1632"}.mdi-database-plus::before{content:"\F01BA"}.mdi-database-plus-outline::before{content:"\F1633"}.mdi-database-refresh::before{content:"\F05C2"}.mdi-database-refresh-outline::before{content:"\F1634"}.mdi-database-remove::before{content:"\F0D00"}.mdi-database-remove-outline::before{content:"\F1635"}.mdi-database-search::before{content:"\F0866"}.mdi-database-search-outline::before{content:"\F1636"}.mdi-database-settings::before{content:"\F0D01"}.mdi-database-settings-outline::before{content:"\F1637"}.mdi-database-sync::before{content:"\F0CFF"}.mdi-database-sync-outline::before{content:"\F1638"}.mdi-death-star::before{content:"\F08D8"}.mdi-death-star-variant::before{content:"\F08D9"}.mdi-deathly-hallows::before{content:"\F0B87"}.mdi-debian::before{content:"\F08DA"}.mdi-debug-step-into::before{content:"\F01B9"}.mdi-debug-step-out::before{content:"\F01B8"}.mdi-debug-step-over::before{content:"\F01B7"}.mdi-decagram::before{content:"\F076C"}.mdi-decagram-outline::before{content:"\F076D"}.mdi-decimal::before{content:"\F10A1"}.mdi-decimal-comma::before{content:"\F10A2"}.mdi-decimal-comma-decrease::before{content:"\F10A3"}.mdi-decimal-comma-increase::before{content:"\F10A4"}.mdi-decimal-decrease::before{content:"\F01B6"}.mdi-decimal-increase::before{content:"\F01B5"}.mdi-delete::before{content:"\F01B4"}.mdi-delete-alert::before{content:"\F10A5"}.mdi-delete-alert-outline::before{content:"\F10A6"}.mdi-delete-circle::before{content:"\F0683"}.mdi-delete-circle-outline::before{content:"\F0B88"}.mdi-delete-clock::before{content:"\F1556"}.mdi-delete-clock-outline::before{content:"\F1557"}.mdi-delete-empty::before{content:"\F06CC"}.mdi-delete-empty-outline::before{content:"\F0E9D"}.mdi-delete-forever::before{content:"\F05E8"}.mdi-delete-forever-outline::before{content:"\F0B89"}.mdi-delete-off::before{content:"\F10A7"}.mdi-delete-off-outline::before{content:"\F10A8"}.mdi-delete-outline::before{content:"\F09E7"}.mdi-delete-restore::before{content:"\F0819"}.mdi-delete-sweep::before{content:"\F05E9"}.mdi-delete-sweep-outline::before{content:"\F0C62"}.mdi-delete-variant::before{content:"\F01B3"}.mdi-delta::before{content:"\F01C2"}.mdi-desk::before{content:"\F1239"}.mdi-desk-lamp::before{content:"\F095F"}.mdi-desk-lamp-off::before{content:"\F1B1F"}.mdi-desk-lamp-on::before{content:"\F1B20"}.mdi-deskphone::before{content:"\F01C3"}.mdi-desktop-classic::before{content:"\F07C0"}.mdi-desktop-tower::before{content:"\F01C5"}.mdi-desktop-tower-monitor::before{content:"\F0AAB"}.mdi-details::before{content:"\F01C6"}.mdi-dev-to::before{content:"\F0D6E"}.mdi-developer-board::before{content:"\F0697"}.mdi-deviantart::before{content:"\F01C7"}.mdi-devices::before{content:"\F0FB0"}.mdi-dharmachakra::before{content:"\F094B"}.mdi-diabetes::before{content:"\F1126"}.mdi-dialpad::before{content:"\F061C"}.mdi-diameter::before{content:"\F0C63"}.mdi-diameter-outline::before{content:"\F0C64"}.mdi-diameter-variant::before{content:"\F0C65"}.mdi-diamond::before{content:"\F0B8A"}.mdi-diamond-outline::before{content:"\F0B8B"}.mdi-diamond-stone::before{content:"\F01C8"}.mdi-diaper-outline::before{content:"\F1CCF"}.mdi-dice-1::before{content:"\F01CA"}.mdi-dice-1-outline::before{content:"\F114A"}.mdi-dice-2::before{content:"\F01CB"}.mdi-dice-2-outline::before{content:"\F114B"}.mdi-dice-3::before{content:"\F01CC"}.mdi-dice-3-outline::before{content:"\F114C"}.mdi-dice-4::before{content:"\F01CD"}.mdi-dice-4-outline::before{content:"\F114D"}.mdi-dice-5::before{content:"\F01CE"}.mdi-dice-5-outline::before{content:"\F114E"}.mdi-dice-6::before{content:"\F01CF"}.mdi-dice-6-outline::before{content:"\F114F"}.mdi-dice-d10::before{content:"\F1153"}.mdi-dice-d10-outline::before{content:"\F076F"}.mdi-dice-d12::before{content:"\F1154"}.mdi-dice-d12-outline::before{content:"\F0867"}.mdi-dice-d20::before{content:"\F1155"}.mdi-dice-d20-outline::before{content:"\F05EA"}.mdi-dice-d4::before{content:"\F1150"}.mdi-dice-d4-outline::before{content:"\F05EB"}.mdi-dice-d6::before{content:"\F1151"}.mdi-dice-d6-outline::before{content:"\F05ED"}.mdi-dice-d8::before{content:"\F1152"}.mdi-dice-d8-outline::before{content:"\F05EC"}.mdi-dice-multiple::before{content:"\F076E"}.mdi-dice-multiple-outline::before{content:"\F1156"}.mdi-digital-ocean::before{content:"\F1237"}.mdi-dip-switch::before{content:"\F07C1"}.mdi-directions::before{content:"\F01D0"}.mdi-directions-fork::before{content:"\F0641"}.mdi-disc::before{content:"\F05EE"}.mdi-disc-alert::before{content:"\F01D1"}.mdi-disc-player::before{content:"\F0960"}.mdi-dishwasher::before{content:"\F0AAC"}.mdi-dishwasher-alert::before{content:"\F11B8"}.mdi-dishwasher-off::before{content:"\F11B9"}.mdi-disqus::before{content:"\F01D2"}.mdi-distribute-horizontal-center::before{content:"\F11C9"}.mdi-distribute-horizontal-left::before{content:"\F11C8"}.mdi-distribute-horizontal-right::before{content:"\F11CA"}.mdi-distribute-vertical-bottom::before{content:"\F11CB"}.mdi-distribute-vertical-center::before{content:"\F11CC"}.mdi-distribute-vertical-top::before{content:"\F11CD"}.mdi-diversify::before{content:"\F1877"}.mdi-diving::before{content:"\F1977"}.mdi-diving-flippers::before{content:"\F0DBF"}.mdi-diving-helmet::before{content:"\F0DC0"}.mdi-diving-scuba::before{content:"\F1B77"}.mdi-diving-scuba-flag::before{content:"\F0DC2"}.mdi-diving-scuba-mask::before{content:"\F0DC1"}.mdi-diving-scuba-tank::before{content:"\F0DC3"}.mdi-diving-scuba-tank-multiple::before{content:"\F0DC4"}.mdi-diving-snorkel::before{content:"\F0DC5"}.mdi-division::before{content:"\F01D4"}.mdi-division-box::before{content:"\F01D5"}.mdi-dlna::before{content:"\F0A41"}.mdi-dna::before{content:"\F0684"}.mdi-dns::before{content:"\F01D6"}.mdi-dns-outline::before{content:"\F0B8C"}.mdi-dock-bottom::before{content:"\F10A9"}.mdi-dock-left::before{content:"\F10AA"}.mdi-dock-right::before{content:"\F10AB"}.mdi-dock-top::before{content:"\F1513"}.mdi-dock-window::before{content:"\F10AC"}.mdi-docker::before{content:"\F0868"}.mdi-doctor::before{content:"\F0A42"}.mdi-dog::before{content:"\F0A43"}.mdi-dog-service::before{content:"\F0AAD"}.mdi-dog-side::before{content:"\F0A44"}.mdi-dog-side-off::before{content:"\F16EE"}.mdi-dolby::before{content:"\F06B3"}.mdi-dolly::before{content:"\F0E9E"}.mdi-dolphin::before{content:"\F18B4"}.mdi-domain::before{content:"\F01D7"}.mdi-domain-off::before{content:"\F0D6F"}.mdi-domain-plus::before{content:"\F10AD"}.mdi-domain-remove::before{content:"\F10AE"}.mdi-domain-switch::before{content:"\F1C2C"}.mdi-dome-light::before{content:"\F141E"}.mdi-domino-mask::before{content:"\F1023"}.mdi-donkey::before{content:"\F07C2"}.mdi-door::before{content:"\F081A"}.mdi-door-closed::before{content:"\F081B"}.mdi-door-closed-cancel::before{content:"\F1C93"}.mdi-door-closed-lock::before{content:"\F10AF"}.mdi-door-open::before{content:"\F081C"}.mdi-door-sliding::before{content:"\F181E"}.mdi-door-sliding-lock::before{content:"\F181F"}.mdi-door-sliding-open::before{content:"\F1820"}.mdi-doorbell::before{content:"\F12E6"}.mdi-doorbell-video::before{content:"\F0869"}.mdi-dot-net::before{content:"\F0AAE"}.mdi-dots-circle::before{content:"\F1978"}.mdi-dots-grid::before{content:"\F15FC"}.mdi-dots-hexagon::before{content:"\F15FF"}.mdi-dots-horizontal::before{content:"\F01D8"}.mdi-dots-horizontal-circle::before{content:"\F07C3"}.mdi-dots-horizontal-circle-outline::before{content:"\F0B8D"}.mdi-dots-square::before{content:"\F15FD"}.mdi-dots-triangle::before{content:"\F15FE"}.mdi-dots-vertical::before{content:"\F01D9"}.mdi-dots-vertical-circle::before{content:"\F07C4"}.mdi-dots-vertical-circle-outline::before{content:"\F0B8E"}.mdi-download::before{content:"\F01DA"}.mdi-download-box::before{content:"\F1462"}.mdi-download-box-outline::before{content:"\F1463"}.mdi-download-circle::before{content:"\F1464"}.mdi-download-circle-outline::before{content:"\F1465"}.mdi-download-lock::before{content:"\F1320"}.mdi-download-lock-outline::before{content:"\F1321"}.mdi-download-multiple::before{content:"\F09E9"}.mdi-download-multiple-outline::before{content:"\F1CD0"}.mdi-download-network::before{content:"\F06F4"}.mdi-download-network-outline::before{content:"\F0C66"}.mdi-download-off::before{content:"\F10B0"}.mdi-download-off-outline::before{content:"\F10B1"}.mdi-download-outline::before{content:"\F0B8F"}.mdi-drag::before{content:"\F01DB"}.mdi-drag-horizontal::before{content:"\F01DC"}.mdi-drag-horizontal-variant::before{content:"\F12F0"}.mdi-drag-variant::before{content:"\F0B90"}.mdi-drag-vertical::before{content:"\F01DD"}.mdi-drag-vertical-variant::before{content:"\F12F1"}.mdi-drama-masks::before{content:"\F0D02"}.mdi-draw::before{content:"\F0F49"}.mdi-draw-pen::before{content:"\F19B9"}.mdi-drawing::before{content:"\F01DE"}.mdi-drawing-box::before{content:"\F01DF"}.mdi-dresser::before{content:"\F0F4A"}.mdi-dresser-outline::before{content:"\F0F4B"}.mdi-drone::before{content:"\F01E2"}.mdi-dropbox::before{content:"\F01E3"}.mdi-drupal::before{content:"\F01E4"}.mdi-duck::before{content:"\F01E5"}.mdi-dumbbell::before{content:"\F01E6"}.mdi-dump-truck::before{content:"\F0C67"}.mdi-ear-hearing::before{content:"\F07C5"}.mdi-ear-hearing-loop::before{content:"\F1AEE"}.mdi-ear-hearing-off::before{content:"\F0A45"}.mdi-earbuds::before{content:"\F184F"}.mdi-earbuds-off::before{content:"\F1850"}.mdi-earbuds-off-outline::before{content:"\F1851"}.mdi-earbuds-outline::before{content:"\F1852"}.mdi-earth::before{content:"\F01E7"}.mdi-earth-arrow-down::before{content:"\F1C87"}.mdi-earth-arrow-left::before{content:"\F1C88"}.mdi-earth-arrow-right::before{content:"\F1311"}.mdi-earth-arrow-up::before{content:"\F1C89"}.mdi-earth-box::before{content:"\F06CD"}.mdi-earth-box-minus::before{content:"\F1407"}.mdi-earth-box-off::before{content:"\F06CE"}.mdi-earth-box-plus::before{content:"\F1406"}.mdi-earth-box-remove::before{content:"\F1408"}.mdi-earth-minus::before{content:"\F1404"}.mdi-earth-off::before{content:"\F01E8"}.mdi-earth-plus::before{content:"\F1403"}.mdi-earth-remove::before{content:"\F1405"}.mdi-egg::before{content:"\F0AAF"}.mdi-egg-easter::before{content:"\F0AB0"}.mdi-egg-fried::before{content:"\F184A"}.mdi-egg-off::before{content:"\F13F0"}.mdi-egg-off-outline::before{content:"\F13F1"}.mdi-egg-outline::before{content:"\F13F2"}.mdi-eiffel-tower::before{content:"\F156B"}.mdi-eight-track::before{content:"\F09EA"}.mdi-eject::before{content:"\F01EA"}.mdi-eject-circle::before{content:"\F1B23"}.mdi-eject-circle-outline::before{content:"\F1B24"}.mdi-eject-outline::before{content:"\F0B91"}.mdi-electric-switch::before{content:"\F0E9F"}.mdi-electric-switch-closed::before{content:"\F10D9"}.mdi-electron-framework::before{content:"\F1024"}.mdi-elephant::before{content:"\F07C6"}.mdi-elevation-decline::before{content:"\F01EB"}.mdi-elevation-rise::before{content:"\F01EC"}.mdi-elevator::before{content:"\F01ED"}.mdi-elevator-down::before{content:"\F12C2"}.mdi-elevator-passenger::before{content:"\F1381"}.mdi-elevator-passenger-off::before{content:"\F1979"}.mdi-elevator-passenger-off-outline::before{content:"\F197A"}.mdi-elevator-passenger-outline::before{content:"\F197B"}.mdi-elevator-up::before{content:"\F12C1"}.mdi-ellipse::before{content:"\F0EA0"}.mdi-ellipse-outline::before{content:"\F0EA1"}.mdi-email::before{content:"\F01EE"}.mdi-email-alert::before{content:"\F06CF"}.mdi-email-alert-outline::before{content:"\F0D42"}.mdi-email-arrow-left::before{content:"\F10DA"}.mdi-email-arrow-left-outline::before{content:"\F10DB"}.mdi-email-arrow-right::before{content:"\F10DC"}.mdi-email-arrow-right-outline::before{content:"\F10DD"}.mdi-email-box::before{content:"\F0D03"}.mdi-email-check::before{content:"\F0AB1"}.mdi-email-check-outline::before{content:"\F0AB2"}.mdi-email-edit::before{content:"\F0EE3"}.mdi-email-edit-outline::before{content:"\F0EE4"}.mdi-email-fast::before{content:"\F186F"}.mdi-email-fast-outline::before{content:"\F1870"}.mdi-email-heart-outline::before{content:"\F1C5B"}.mdi-email-lock::before{content:"\F01F1"}.mdi-email-lock-outline::before{content:"\F1B61"}.mdi-email-mark-as-unread::before{content:"\F0B92"}.mdi-email-minus::before{content:"\F0EE5"}.mdi-email-minus-outline::before{content:"\F0EE6"}.mdi-email-multiple::before{content:"\F0EE7"}.mdi-email-multiple-outline::before{content:"\F0EE8"}.mdi-email-newsletter::before{content:"\F0FB1"}.mdi-email-off::before{content:"\F13E3"}.mdi-email-off-outline::before{content:"\F13E4"}.mdi-email-open::before{content:"\F01EF"}.mdi-email-open-heart-outline::before{content:"\F1C5C"}.mdi-email-open-multiple::before{content:"\F0EE9"}.mdi-email-open-multiple-outline::before{content:"\F0EEA"}.mdi-email-open-outline::before{content:"\F05EF"}.mdi-email-outline::before{content:"\F01F0"}.mdi-email-plus::before{content:"\F09EB"}.mdi-email-plus-outline::before{content:"\F09EC"}.mdi-email-remove::before{content:"\F1661"}.mdi-email-remove-outline::before{content:"\F1662"}.mdi-email-seal::before{content:"\F195B"}.mdi-email-seal-outline::before{content:"\F195C"}.mdi-email-search::before{content:"\F0961"}.mdi-email-search-outline::before{content:"\F0962"}.mdi-email-sync::before{content:"\F12C7"}.mdi-email-sync-outline::before{content:"\F12C8"}.mdi-email-variant::before{content:"\F05F0"}.mdi-ember::before{content:"\F0B30"}.mdi-emby::before{content:"\F06B4"}.mdi-emoticon::before{content:"\F0C68"}.mdi-emoticon-angry::before{content:"\F0C69"}.mdi-emoticon-angry-outline::before{content:"\F0C6A"}.mdi-emoticon-confused::before{content:"\F10DE"}.mdi-emoticon-confused-outline::before{content:"\F10DF"}.mdi-emoticon-cool::before{content:"\F0C6B"}.mdi-emoticon-cool-outline::before{content:"\F01F3"}.mdi-emoticon-cry::before{content:"\F0C6C"}.mdi-emoticon-cry-outline::before{content:"\F0C6D"}.mdi-emoticon-dead::before{content:"\F0C6E"}.mdi-emoticon-dead-outline::before{content:"\F069B"}.mdi-emoticon-devil::before{content:"\F0C6F"}.mdi-emoticon-devil-outline::before{content:"\F01F4"}.mdi-emoticon-excited::before{content:"\F0C70"}.mdi-emoticon-excited-outline::before{content:"\F069C"}.mdi-emoticon-frown::before{content:"\F0F4C"}.mdi-emoticon-frown-outline::before{content:"\F0F4D"}.mdi-emoticon-happy::before{content:"\F0C71"}.mdi-emoticon-happy-outline::before{content:"\F01F5"}.mdi-emoticon-kiss::before{content:"\F0C72"}.mdi-emoticon-kiss-outline::before{content:"\F0C73"}.mdi-emoticon-lol::before{content:"\F1214"}.mdi-emoticon-lol-outline::before{content:"\F1215"}.mdi-emoticon-minus::before{content:"\F1CB2"}.mdi-emoticon-minus-outline::before{content:"\F1CB3"}.mdi-emoticon-neutral::before{content:"\F0C74"}.mdi-emoticon-neutral-outline::before{content:"\F01F6"}.mdi-emoticon-outline::before{content:"\F01F2"}.mdi-emoticon-plus::before{content:"\F1CB4"}.mdi-emoticon-plus-outline::before{content:"\F1CB5"}.mdi-emoticon-poop::before{content:"\F01F7"}.mdi-emoticon-poop-outline::before{content:"\F0C75"}.mdi-emoticon-remove::before{content:"\F1CB6"}.mdi-emoticon-remove-outline::before{content:"\F1CB7"}.mdi-emoticon-sad::before{content:"\F0C76"}.mdi-emoticon-sad-outline::before{content:"\F01F8"}.mdi-emoticon-sick::before{content:"\F157C"}.mdi-emoticon-sick-outline::before{content:"\F157D"}.mdi-emoticon-tongue::before{content:"\F01F9"}.mdi-emoticon-tongue-outline::before{content:"\F0C77"}.mdi-emoticon-wink::before{content:"\F0C78"}.mdi-emoticon-wink-outline::before{content:"\F0C79"}.mdi-engine::before{content:"\F01FA"}.mdi-engine-off::before{content:"\F0A46"}.mdi-engine-off-outline::before{content:"\F0A47"}.mdi-engine-outline::before{content:"\F01FB"}.mdi-epsilon::before{content:"\F10E0"}.mdi-equal::before{content:"\F01FC"}.mdi-equal-box::before{content:"\F01FD"}.mdi-equalizer::before{content:"\F0EA2"}.mdi-equalizer-outline::before{content:"\F0EA3"}.mdi-eraser::before{content:"\F01FE"}.mdi-eraser-variant::before{content:"\F0642"}.mdi-escalator::before{content:"\F01FF"}.mdi-escalator-box::before{content:"\F1399"}.mdi-escalator-down::before{content:"\F12C0"}.mdi-escalator-up::before{content:"\F12BF"}.mdi-eslint::before{content:"\F0C7A"}.mdi-et::before{content:"\F0AB3"}.mdi-ethereum::before{content:"\F086A"}.mdi-ethernet::before{content:"\F0200"}.mdi-ethernet-cable::before{content:"\F0201"}.mdi-ethernet-cable-off::before{content:"\F0202"}.mdi-ethernet-off::before{content:"\F1CD1"}.mdi-ev-plug-ccs1::before{content:"\F1519"}.mdi-ev-plug-ccs2::before{content:"\F151A"}.mdi-ev-plug-chademo::before{content:"\F151B"}.mdi-ev-plug-tesla::before{content:"\F151C"}.mdi-ev-plug-type1::before{content:"\F151D"}.mdi-ev-plug-type2::before{content:"\F151E"}.mdi-ev-station::before{content:"\F05F1"}.mdi-evernote::before{content:"\F0204"}.mdi-excavator::before{content:"\F1025"}.mdi-exclamation::before{content:"\F0205"}.mdi-exclamation-thick::before{content:"\F1238"}.mdi-exit-run::before{content:"\F0A48"}.mdi-exit-to-app::before{content:"\F0206"}.mdi-expand-all::before{content:"\F0AB4"}.mdi-expand-all-outline::before{content:"\F0AB5"}.mdi-expansion-card::before{content:"\F08AE"}.mdi-expansion-card-variant::before{content:"\F0FB2"}.mdi-exponent::before{content:"\F0963"}.mdi-exponent-box::before{content:"\F0964"}.mdi-export::before{content:"\F0207"}.mdi-export-variant::before{content:"\F0B93"}.mdi-eye::before{content:"\F0208"}.mdi-eye-arrow-left::before{content:"\F18FD"}.mdi-eye-arrow-left-outline::before{content:"\F18FE"}.mdi-eye-arrow-right::before{content:"\F18FF"}.mdi-eye-arrow-right-outline::before{content:"\F1900"}.mdi-eye-check::before{content:"\F0D04"}.mdi-eye-check-outline::before{content:"\F0D05"}.mdi-eye-circle::before{content:"\F0B94"}.mdi-eye-circle-outline::before{content:"\F0B95"}.mdi-eye-closed::before{content:"\F1CA3"}.mdi-eye-lock::before{content:"\F1C06"}.mdi-eye-lock-open::before{content:"\F1C07"}.mdi-eye-lock-open-outline::before{content:"\F1C08"}.mdi-eye-lock-outline::before{content:"\F1C09"}.mdi-eye-minus::before{content:"\F1026"}.mdi-eye-minus-outline::before{content:"\F1027"}.mdi-eye-off::before{content:"\F0209"}.mdi-eye-off-outline::before{content:"\F06D1"}.mdi-eye-outline::before{content:"\F06D0"}.mdi-eye-plus::before{content:"\F086B"}.mdi-eye-plus-outline::before{content:"\F086C"}.mdi-eye-refresh::before{content:"\F197C"}.mdi-eye-refresh-outline::before{content:"\F197D"}.mdi-eye-remove::before{content:"\F15E3"}.mdi-eye-remove-outline::before{content:"\F15E4"}.mdi-eye-settings::before{content:"\F086D"}.mdi-eye-settings-outline::before{content:"\F086E"}.mdi-eyedropper::before{content:"\F020A"}.mdi-eyedropper-minus::before{content:"\F13DD"}.mdi-eyedropper-off::before{content:"\F13DF"}.mdi-eyedropper-plus::before{content:"\F13DC"}.mdi-eyedropper-remove::before{content:"\F13DE"}.mdi-eyedropper-variant::before{content:"\F020B"}.mdi-face-agent::before{content:"\F0D70"}.mdi-face-man::before{content:"\F0643"}.mdi-face-man-outline::before{content:"\F0B96"}.mdi-face-man-profile::before{content:"\F0644"}.mdi-face-man-shimmer::before{content:"\F15CC"}.mdi-face-man-shimmer-outline::before{content:"\F15CD"}.mdi-face-mask::before{content:"\F1586"}.mdi-face-mask-outline::before{content:"\F1587"}.mdi-face-recognition::before{content:"\F0C7B"}.mdi-face-woman::before{content:"\F1077"}.mdi-face-woman-outline::before{content:"\F1078"}.mdi-face-woman-profile::before{content:"\F1076"}.mdi-face-woman-shimmer::before{content:"\F15CE"}.mdi-face-woman-shimmer-outline::before{content:"\F15CF"}.mdi-facebook::before{content:"\F020C"}.mdi-facebook-gaming::before{content:"\F07DD"}.mdi-facebook-messenger::before{content:"\F020E"}.mdi-facebook-workplace::before{content:"\F0B31"}.mdi-factory::before{content:"\F020F"}.mdi-family-tree::before{content:"\F160E"}.mdi-fan::before{content:"\F0210"}.mdi-fan-alert::before{content:"\F146C"}.mdi-fan-auto::before{content:"\F171D"}.mdi-fan-chevron-down::before{content:"\F146D"}.mdi-fan-chevron-up::before{content:"\F146E"}.mdi-fan-clock::before{content:"\F1A3A"}.mdi-fan-minus::before{content:"\F1470"}.mdi-fan-off::before{content:"\F081D"}.mdi-fan-plus::before{content:"\F146F"}.mdi-fan-remove::before{content:"\F1471"}.mdi-fan-speed-1::before{content:"\F1472"}.mdi-fan-speed-2::before{content:"\F1473"}.mdi-fan-speed-3::before{content:"\F1474"}.mdi-fast-forward::before{content:"\F0211"}.mdi-fast-forward-10::before{content:"\F0D71"}.mdi-fast-forward-15::before{content:"\F193A"}.mdi-fast-forward-30::before{content:"\F0D06"}.mdi-fast-forward-45::before{content:"\F1B12"}.mdi-fast-forward-5::before{content:"\F11F8"}.mdi-fast-forward-60::before{content:"\F160B"}.mdi-fast-forward-outline::before{content:"\F06D2"}.mdi-faucet::before{content:"\F1B29"}.mdi-faucet-variant::before{content:"\F1B2A"}.mdi-fax::before{content:"\F0212"}.mdi-feather::before{content:"\F06D3"}.mdi-feature-search::before{content:"\F0A49"}.mdi-feature-search-outline::before{content:"\F0A4A"}.mdi-fedora::before{content:"\F08DB"}.mdi-fence::before{content:"\F179A"}.mdi-fence-electric::before{content:"\F17F6"}.mdi-fencing::before{content:"\F14C1"}.mdi-ferris-wheel::before{content:"\F0EA4"}.mdi-ferry::before{content:"\F0213"}.mdi-file::before{content:"\F0214"}.mdi-file-account::before{content:"\F073B"}.mdi-file-account-outline::before{content:"\F1028"}.mdi-file-alert::before{content:"\F0A4B"}.mdi-file-alert-outline::before{content:"\F0A4C"}.mdi-file-arrow-left-right::before{content:"\F1A93"}.mdi-file-arrow-left-right-outline::before{content:"\F1A94"}.mdi-file-arrow-up-down::before{content:"\F1A95"}.mdi-file-arrow-up-down-outline::before{content:"\F1A96"}.mdi-file-cabinet::before{content:"\F0AB6"}.mdi-file-cad::before{content:"\F0EEB"}.mdi-file-cad-box::before{content:"\F0EEC"}.mdi-file-cancel::before{content:"\F0DC6"}.mdi-file-cancel-outline::before{content:"\F0DC7"}.mdi-file-certificate::before{content:"\F1186"}.mdi-file-certificate-outline::before{content:"\F1187"}.mdi-file-chart::before{content:"\F0215"}.mdi-file-chart-check::before{content:"\F19C6"}.mdi-file-chart-check-outline::before{content:"\F19C7"}.mdi-file-chart-outline::before{content:"\F1029"}.mdi-file-check::before{content:"\F0216"}.mdi-file-check-outline::before{content:"\F0E29"}.mdi-file-clock::before{content:"\F12E1"}.mdi-file-clock-outline::before{content:"\F12E2"}.mdi-file-cloud::before{content:"\F0217"}.mdi-file-cloud-outline::before{content:"\F102A"}.mdi-file-code::before{content:"\F022E"}.mdi-file-code-outline::before{content:"\F102B"}.mdi-file-cog::before{content:"\F107B"}.mdi-file-cog-outline::before{content:"\F107C"}.mdi-file-compare::before{content:"\F08AA"}.mdi-file-delimited::before{content:"\F0218"}.mdi-file-delimited-outline::before{content:"\F0EA5"}.mdi-file-document::before{content:"\F0219"}.mdi-file-document-alert::before{content:"\F1A97"}.mdi-file-document-alert-outline::before{content:"\F1A98"}.mdi-file-document-arrow-right::before{content:"\F1C0F"}.mdi-file-document-arrow-right-outline::before{content:"\F1C10"}.mdi-file-document-check::before{content:"\F1A99"}.mdi-file-document-check-outline::before{content:"\F1A9A"}.mdi-file-document-edit::before{content:"\F0DC8"}.mdi-file-document-edit-outline::before{content:"\F0DC9"}.mdi-file-document-minus::before{content:"\F1A9B"}.mdi-file-document-minus-outline::before{content:"\F1A9C"}.mdi-file-document-multiple::before{content:"\F1517"}.mdi-file-document-multiple-outline::before{content:"\F1518"}.mdi-file-document-outline::before{content:"\F09EE"}.mdi-file-document-plus::before{content:"\F1A9D"}.mdi-file-document-plus-outline::before{content:"\F1A9E"}.mdi-file-document-refresh::before{content:"\F1C7A"}.mdi-file-document-refresh-outline::before{content:"\F1C7B"}.mdi-file-document-remove::before{content:"\F1A9F"}.mdi-file-document-remove-outline::before{content:"\F1AA0"}.mdi-file-download::before{content:"\F0965"}.mdi-file-download-outline::before{content:"\F0966"}.mdi-file-edit::before{content:"\F11E7"}.mdi-file-edit-outline::before{content:"\F11E8"}.mdi-file-excel::before{content:"\F021B"}.mdi-file-excel-box::before{content:"\F021C"}.mdi-file-excel-box-outline::before{content:"\F102C"}.mdi-file-excel-outline::before{content:"\F102D"}.mdi-file-export::before{content:"\F021D"}.mdi-file-export-outline::before{content:"\F102E"}.mdi-file-eye::before{content:"\F0DCA"}.mdi-file-eye-outline::before{content:"\F0DCB"}.mdi-file-find::before{content:"\F021E"}.mdi-file-find-outline::before{content:"\F0B97"}.mdi-file-gif-box::before{content:"\F0D78"}.mdi-file-hidden::before{content:"\F0613"}.mdi-file-image::before{content:"\F021F"}.mdi-file-image-marker::before{content:"\F1772"}.mdi-file-image-marker-outline::before{content:"\F1773"}.mdi-file-image-minus::before{content:"\F193B"}.mdi-file-image-minus-outline::before{content:"\F193C"}.mdi-file-image-outline::before{content:"\F0EB0"}.mdi-file-image-plus::before{content:"\F193D"}.mdi-file-image-plus-outline::before{content:"\F193E"}.mdi-file-image-remove::before{content:"\F193F"}.mdi-file-image-remove-outline::before{content:"\F1940"}.mdi-file-import::before{content:"\F0220"}.mdi-file-import-outline::before{content:"\F102F"}.mdi-file-jpg-box::before{content:"\F0225"}.mdi-file-key::before{content:"\F1184"}.mdi-file-key-outline::before{content:"\F1185"}.mdi-file-link::before{content:"\F1177"}.mdi-file-link-outline::before{content:"\F1178"}.mdi-file-lock::before{content:"\F0221"}.mdi-file-lock-open::before{content:"\F19C8"}.mdi-file-lock-open-outline::before{content:"\F19C9"}.mdi-file-lock-outline::before{content:"\F1030"}.mdi-file-marker::before{content:"\F1774"}.mdi-file-marker-outline::before{content:"\F1775"}.mdi-file-minus::before{content:"\F1AA1"}.mdi-file-minus-outline::before{content:"\F1AA2"}.mdi-file-move::before{content:"\F0AB9"}.mdi-file-move-outline::before{content:"\F1031"}.mdi-file-multiple::before{content:"\F0222"}.mdi-file-multiple-outline::before{content:"\F1032"}.mdi-file-music::before{content:"\F0223"}.mdi-file-music-outline::before{content:"\F0E2A"}.mdi-file-outline::before{content:"\F0224"}.mdi-file-pdf-box::before{content:"\F0226"}.mdi-file-percent::before{content:"\F081E"}.mdi-file-percent-outline::before{content:"\F1033"}.mdi-file-phone::before{content:"\F1179"}.mdi-file-phone-outline::before{content:"\F117A"}.mdi-file-plus::before{content:"\F0752"}.mdi-file-plus-outline::before{content:"\F0EED"}.mdi-file-png-box::before{content:"\F0E2D"}.mdi-file-powerpoint::before{content:"\F0227"}.mdi-file-powerpoint-box::before{content:"\F0228"}.mdi-file-powerpoint-box-outline::before{content:"\F1034"}.mdi-file-powerpoint-outline::before{content:"\F1035"}.mdi-file-presentation-box::before{content:"\F0229"}.mdi-file-question::before{content:"\F086F"}.mdi-file-question-outline::before{content:"\F1036"}.mdi-file-refresh::before{content:"\F0918"}.mdi-file-refresh-outline::before{content:"\F0541"}.mdi-file-remove::before{content:"\F0B98"}.mdi-file-remove-outline::before{content:"\F1037"}.mdi-file-replace::before{content:"\F0B32"}.mdi-file-replace-outline::before{content:"\F0B33"}.mdi-file-restore::before{content:"\F0670"}.mdi-file-restore-outline::before{content:"\F1038"}.mdi-file-rotate-left::before{content:"\F1A3B"}.mdi-file-rotate-left-outline::before{content:"\F1A3C"}.mdi-file-rotate-right::before{content:"\F1A3D"}.mdi-file-rotate-right-outline::before{content:"\F1A3E"}.mdi-file-search::before{content:"\F0C7C"}.mdi-file-search-outline::before{content:"\F0C7D"}.mdi-file-send::before{content:"\F022A"}.mdi-file-send-outline::before{content:"\F1039"}.mdi-file-settings::before{content:"\F1079"}.mdi-file-settings-outline::before{content:"\F107A"}.mdi-file-sign::before{content:"\F19C3"}.mdi-file-star::before{content:"\F103A"}.mdi-file-star-four-points::before{content:"\F1C2D"}.mdi-file-star-four-points-outline::before{content:"\F1C2E"}.mdi-file-star-outline::before{content:"\F103B"}.mdi-file-swap::before{content:"\F0FB4"}.mdi-file-swap-outline::before{content:"\F0FB5"}.mdi-file-sync::before{content:"\F1216"}.mdi-file-sync-outline::before{content:"\F1217"}.mdi-file-table::before{content:"\F0C7E"}.mdi-file-table-box::before{content:"\F10E1"}.mdi-file-table-box-multiple::before{content:"\F10E2"}.mdi-file-table-box-multiple-outline::before{content:"\F10E3"}.mdi-file-table-box-outline::before{content:"\F10E4"}.mdi-file-table-outline::before{content:"\F0C7F"}.mdi-file-tree::before{content:"\F0645"}.mdi-file-tree-outline::before{content:"\F13D2"}.mdi-file-undo::before{content:"\F08DC"}.mdi-file-undo-outline::before{content:"\F103C"}.mdi-file-upload::before{content:"\F0A4D"}.mdi-file-upload-outline::before{content:"\F0A4E"}.mdi-file-video::before{content:"\F022B"}.mdi-file-video-outline::before{content:"\F0E2C"}.mdi-file-word::before{content:"\F022C"}.mdi-file-word-box::before{content:"\F022D"}.mdi-file-word-box-outline::before{content:"\F103D"}.mdi-file-word-outline::before{content:"\F103E"}.mdi-file-xml-box::before{content:"\F1B4B"}.mdi-film::before{content:"\F022F"}.mdi-filmstrip::before{content:"\F0230"}.mdi-filmstrip-box::before{content:"\F0332"}.mdi-filmstrip-box-multiple::before{content:"\F0D18"}.mdi-filmstrip-off::before{content:"\F0231"}.mdi-filter::before{content:"\F0232"}.mdi-filter-check::before{content:"\F18EC"}.mdi-filter-check-outline::before{content:"\F18ED"}.mdi-filter-cog::before{content:"\F1AA3"}.mdi-filter-cog-outline::before{content:"\F1AA4"}.mdi-filter-menu::before{content:"\F10E5"}.mdi-filter-menu-outline::before{content:"\F10E6"}.mdi-filter-minus::before{content:"\F0EEE"}.mdi-filter-minus-outline::before{content:"\F0EEF"}.mdi-filter-multiple::before{content:"\F1A3F"}.mdi-filter-multiple-outline::before{content:"\F1A40"}.mdi-filter-off::before{content:"\F14EF"}.mdi-filter-off-outline::before{content:"\F14F0"}.mdi-filter-outline::before{content:"\F0233"}.mdi-filter-plus::before{content:"\F0EF0"}.mdi-filter-plus-outline::before{content:"\F0EF1"}.mdi-filter-remove::before{content:"\F0234"}.mdi-filter-remove-outline::before{content:"\F0235"}.mdi-filter-settings::before{content:"\F1AA5"}.mdi-filter-settings-outline::before{content:"\F1AA6"}.mdi-filter-variant::before{content:"\F0236"}.mdi-filter-variant-minus::before{content:"\F1112"}.mdi-filter-variant-plus::before{content:"\F1113"}.mdi-filter-variant-remove::before{content:"\F103F"}.mdi-finance::before{content:"\F081F"}.mdi-find-replace::before{content:"\F06D4"}.mdi-fingerprint::before{content:"\F0237"}.mdi-fingerprint-off::before{content:"\F0EB1"}.mdi-fire::before{content:"\F0238"}.mdi-fire-alert::before{content:"\F15D7"}.mdi-fire-circle::before{content:"\F1807"}.mdi-fire-extinguisher::before{content:"\F0EF2"}.mdi-fire-hydrant::before{content:"\F1137"}.mdi-fire-hydrant-alert::before{content:"\F1138"}.mdi-fire-hydrant-off::before{content:"\F1139"}.mdi-fire-off::before{content:"\F1722"}.mdi-fire-station::before{content:"\F1CC3"}.mdi-fire-truck::before{content:"\F08AB"}.mdi-firebase::before{content:"\F0967"}.mdi-firefox::before{content:"\F0239"}.mdi-fireplace::before{content:"\F0E2E"}.mdi-fireplace-off::before{content:"\F0E2F"}.mdi-firewire::before{content:"\F05BE"}.mdi-firework::before{content:"\F0E30"}.mdi-firework-off::before{content:"\F1723"}.mdi-fish::before{content:"\F023A"}.mdi-fish-off::before{content:"\F13F3"}.mdi-fishbowl::before{content:"\F0EF3"}.mdi-fishbowl-outline::before{content:"\F0EF4"}.mdi-fit-to-page::before{content:"\F0EF5"}.mdi-fit-to-page-outline::before{content:"\F0EF6"}.mdi-fit-to-screen::before{content:"\F18F4"}.mdi-fit-to-screen-outline::before{content:"\F18F5"}.mdi-flag::before{content:"\F023B"}.mdi-flag-checkered::before{content:"\F023C"}.mdi-flag-minus::before{content:"\F0B99"}.mdi-flag-minus-outline::before{content:"\F10B2"}.mdi-flag-off::before{content:"\F18EE"}.mdi-flag-off-outline::before{content:"\F18EF"}.mdi-flag-outline::before{content:"\F023D"}.mdi-flag-plus::before{content:"\F0B9A"}.mdi-flag-plus-outline::before{content:"\F10B3"}.mdi-flag-remove::before{content:"\F0B9B"}.mdi-flag-remove-outline::before{content:"\F10B4"}.mdi-flag-triangle::before{content:"\F023F"}.mdi-flag-variant::before{content:"\F0240"}.mdi-flag-variant-minus::before{content:"\F1BB4"}.mdi-flag-variant-minus-outline::before{content:"\F1BB5"}.mdi-flag-variant-off::before{content:"\F1BB0"}.mdi-flag-variant-off-outline::before{content:"\F1BB1"}.mdi-flag-variant-outline::before{content:"\F023E"}.mdi-flag-variant-plus::before{content:"\F1BB2"}.mdi-flag-variant-plus-outline::before{content:"\F1BB3"}.mdi-flag-variant-remove::before{content:"\F1BB6"}.mdi-flag-variant-remove-outline::before{content:"\F1BB7"}.mdi-flare::before{content:"\F0D72"}.mdi-flash::before{content:"\F0241"}.mdi-flash-alert::before{content:"\F0EF7"}.mdi-flash-alert-outline::before{content:"\F0EF8"}.mdi-flash-auto::before{content:"\F0242"}.mdi-flash-off::before{content:"\F0243"}.mdi-flash-off-outline::before{content:"\F1B45"}.mdi-flash-outline::before{content:"\F06D5"}.mdi-flash-red-eye::before{content:"\F067B"}.mdi-flash-triangle::before{content:"\F1B1D"}.mdi-flash-triangle-outline::before{content:"\F1B1E"}.mdi-flashlight::before{content:"\F0244"}.mdi-flashlight-off::before{content:"\F0245"}.mdi-flask::before{content:"\F0093"}.mdi-flask-empty::before{content:"\F0094"}.mdi-flask-empty-minus::before{content:"\F123A"}.mdi-flask-empty-minus-outline::before{content:"\F123B"}.mdi-flask-empty-off::before{content:"\F13F4"}.mdi-flask-empty-off-outline::before{content:"\F13F5"}.mdi-flask-empty-outline::before{content:"\F0095"}.mdi-flask-empty-plus::before{content:"\F123C"}.mdi-flask-empty-plus-outline::before{content:"\F123D"}.mdi-flask-empty-remove::before{content:"\F123E"}.mdi-flask-empty-remove-outline::before{content:"\F123F"}.mdi-flask-minus::before{content:"\F1240"}.mdi-flask-minus-outline::before{content:"\F1241"}.mdi-flask-off::before{content:"\F13F6"}.mdi-flask-off-outline::before{content:"\F13F7"}.mdi-flask-outline::before{content:"\F0096"}.mdi-flask-plus::before{content:"\F1242"}.mdi-flask-plus-outline::before{content:"\F1243"}.mdi-flask-remove::before{content:"\F1244"}.mdi-flask-remove-outline::before{content:"\F1245"}.mdi-flask-round-bottom::before{content:"\F124B"}.mdi-flask-round-bottom-empty::before{content:"\F124C"}.mdi-flask-round-bottom-empty-outline::before{content:"\F124D"}.mdi-flask-round-bottom-outline::before{content:"\F124E"}.mdi-fleur-de-lis::before{content:"\F1303"}.mdi-flip-horizontal::before{content:"\F10E7"}.mdi-flip-to-back::before{content:"\F0247"}.mdi-flip-to-front::before{content:"\F0248"}.mdi-flip-vertical::before{content:"\F10E8"}.mdi-floor-lamp::before{content:"\F08DD"}.mdi-floor-lamp-dual::before{content:"\F1040"}.mdi-floor-lamp-dual-outline::before{content:"\F17CE"}.mdi-floor-lamp-outline::before{content:"\F17C8"}.mdi-floor-lamp-torchiere::before{content:"\F1747"}.mdi-floor-lamp-torchiere-outline::before{content:"\F17D6"}.mdi-floor-lamp-torchiere-variant::before{content:"\F1041"}.mdi-floor-lamp-torchiere-variant-outline::before{content:"\F17CF"}.mdi-floor-plan::before{content:"\F0821"}.mdi-floppy::before{content:"\F0249"}.mdi-floppy-variant::before{content:"\F09EF"}.mdi-flower::before{content:"\F024A"}.mdi-flower-outline::before{content:"\F09F0"}.mdi-flower-pollen::before{content:"\F1885"}.mdi-flower-pollen-outline::before{content:"\F1886"}.mdi-flower-poppy::before{content:"\F0D08"}.mdi-flower-tulip::before{content:"\F09F1"}.mdi-flower-tulip-outline::before{content:"\F09F2"}.mdi-focus-auto::before{content:"\F0F4E"}.mdi-focus-field::before{content:"\F0F4F"}.mdi-focus-field-horizontal::before{content:"\F0F50"}.mdi-focus-field-vertical::before{content:"\F0F51"}.mdi-folder::before{content:"\F024B"}.mdi-folder-account::before{content:"\F024C"}.mdi-folder-account-outline::before{content:"\F0B9C"}.mdi-folder-alert::before{content:"\F0DCC"}.mdi-folder-alert-outline::before{content:"\F0DCD"}.mdi-folder-arrow-down::before{content:"\F19E8"}.mdi-folder-arrow-down-outline::before{content:"\F19E9"}.mdi-folder-arrow-left::before{content:"\F19EA"}.mdi-folder-arrow-left-outline::before{content:"\F19EB"}.mdi-folder-arrow-left-right::before{content:"\F19EC"}.mdi-folder-arrow-left-right-outline::before{content:"\F19ED"}.mdi-folder-arrow-right::before{content:"\F19EE"}.mdi-folder-arrow-right-outline::before{content:"\F19EF"}.mdi-folder-arrow-up::before{content:"\F19F0"}.mdi-folder-arrow-up-down::before{content:"\F19F1"}.mdi-folder-arrow-up-down-outline::before{content:"\F19F2"}.mdi-folder-arrow-up-outline::before{content:"\F19F3"}.mdi-folder-cancel::before{content:"\F19F4"}.mdi-folder-cancel-outline::before{content:"\F19F5"}.mdi-folder-check::before{content:"\F197E"}.mdi-folder-check-outline::before{content:"\F197F"}.mdi-folder-clock::before{content:"\F0ABA"}.mdi-folder-clock-outline::before{content:"\F0ABB"}.mdi-folder-cog::before{content:"\F107F"}.mdi-folder-cog-outline::before{content:"\F1080"}.mdi-folder-download::before{content:"\F024D"}.mdi-folder-download-outline::before{content:"\F10E9"}.mdi-folder-edit::before{content:"\F08DE"}.mdi-folder-edit-outline::before{content:"\F0DCE"}.mdi-folder-eye::before{content:"\F178A"}.mdi-folder-eye-outline::before{content:"\F178B"}.mdi-folder-file::before{content:"\F19F6"}.mdi-folder-file-outline::before{content:"\F19F7"}.mdi-folder-google-drive::before{content:"\F024E"}.mdi-folder-heart::before{content:"\F10EA"}.mdi-folder-heart-outline::before{content:"\F10EB"}.mdi-folder-hidden::before{content:"\F179E"}.mdi-folder-home::before{content:"\F10B5"}.mdi-folder-home-outline::before{content:"\F10B6"}.mdi-folder-image::before{content:"\F024F"}.mdi-folder-information::before{content:"\F10B7"}.mdi-folder-information-outline::before{content:"\F10B8"}.mdi-folder-key::before{content:"\F08AC"}.mdi-folder-key-network::before{content:"\F08AD"}.mdi-folder-key-network-outline::before{content:"\F0C80"}.mdi-folder-key-outline::before{content:"\F10EC"}.mdi-folder-lock::before{content:"\F0250"}.mdi-folder-lock-open::before{content:"\F0251"}.mdi-folder-lock-open-outline::before{content:"\F1AA7"}.mdi-folder-lock-outline::before{content:"\F1AA8"}.mdi-folder-marker::before{content:"\F126D"}.mdi-folder-marker-outline::before{content:"\F126E"}.mdi-folder-minus::before{content:"\F1B49"}.mdi-folder-minus-outline::before{content:"\F1B4A"}.mdi-folder-move::before{content:"\F0252"}.mdi-folder-move-outline::before{content:"\F1246"}.mdi-folder-multiple::before{content:"\F0253"}.mdi-folder-multiple-image::before{content:"\F0254"}.mdi-folder-multiple-outline::before{content:"\F0255"}.mdi-folder-multiple-plus::before{content:"\F147E"}.mdi-folder-multiple-plus-outline::before{content:"\F147F"}.mdi-folder-music::before{content:"\F1359"}.mdi-folder-music-outline::before{content:"\F135A"}.mdi-folder-network::before{content:"\F0870"}.mdi-folder-network-outline::before{content:"\F0C81"}.mdi-folder-off::before{content:"\F19F8"}.mdi-folder-off-outline::before{content:"\F19F9"}.mdi-folder-open::before{content:"\F0770"}.mdi-folder-open-outline::before{content:"\F0DCF"}.mdi-folder-outline::before{content:"\F0256"}.mdi-folder-play::before{content:"\F19FA"}.mdi-folder-play-outline::before{content:"\F19FB"}.mdi-folder-plus::before{content:"\F0257"}.mdi-folder-plus-outline::before{content:"\F0B9D"}.mdi-folder-pound::before{content:"\F0D09"}.mdi-folder-pound-outline::before{content:"\F0D0A"}.mdi-folder-question::before{content:"\F19CA"}.mdi-folder-question-outline::before{content:"\F19CB"}.mdi-folder-refresh::before{content:"\F0749"}.mdi-folder-refresh-outline::before{content:"\F0542"}.mdi-folder-remove::before{content:"\F0258"}.mdi-folder-remove-outline::before{content:"\F0B9E"}.mdi-folder-search::before{content:"\F0968"}.mdi-folder-search-outline::before{content:"\F0969"}.mdi-folder-settings::before{content:"\F107D"}.mdi-folder-settings-outline::before{content:"\F107E"}.mdi-folder-star::before{content:"\F069D"}.mdi-folder-star-multiple::before{content:"\F13D3"}.mdi-folder-star-multiple-outline::before{content:"\F13D4"}.mdi-folder-star-outline::before{content:"\F0B9F"}.mdi-folder-swap::before{content:"\F0FB6"}.mdi-folder-swap-outline::before{content:"\F0FB7"}.mdi-folder-sync::before{content:"\F0D0B"}.mdi-folder-sync-outline::before{content:"\F0D0C"}.mdi-folder-table::before{content:"\F12E3"}.mdi-folder-table-outline::before{content:"\F12E4"}.mdi-folder-text::before{content:"\F0C82"}.mdi-folder-text-outline::before{content:"\F0C83"}.mdi-folder-upload::before{content:"\F0259"}.mdi-folder-upload-outline::before{content:"\F10ED"}.mdi-folder-wrench::before{content:"\F19FC"}.mdi-folder-wrench-outline::before{content:"\F19FD"}.mdi-folder-zip::before{content:"\F06EB"}.mdi-folder-zip-outline::before{content:"\F07B9"}.mdi-font-awesome::before{content:"\F003A"}.mdi-food::before{content:"\F025A"}.mdi-food-apple::before{content:"\F025B"}.mdi-food-apple-outline::before{content:"\F0C84"}.mdi-food-croissant::before{content:"\F07C8"}.mdi-food-drumstick::before{content:"\F141F"}.mdi-food-drumstick-off::before{content:"\F1468"}.mdi-food-drumstick-off-outline::before{content:"\F1469"}.mdi-food-drumstick-outline::before{content:"\F1420"}.mdi-food-fork-drink::before{content:"\F05F2"}.mdi-food-halal::before{content:"\F1572"}.mdi-food-hot-dog::before{content:"\F184B"}.mdi-food-kosher::before{content:"\F1573"}.mdi-food-off::before{content:"\F05F3"}.mdi-food-off-outline::before{content:"\F1915"}.mdi-food-outline::before{content:"\F1916"}.mdi-food-steak::before{content:"\F146A"}.mdi-food-steak-off::before{content:"\F146B"}.mdi-food-takeout-box::before{content:"\F1836"}.mdi-food-takeout-box-outline::before{content:"\F1837"}.mdi-food-turkey::before{content:"\F171C"}.mdi-food-variant::before{content:"\F025C"}.mdi-food-variant-off::before{content:"\F13E5"}.mdi-foot-print::before{content:"\F0F52"}.mdi-football::before{content:"\F025D"}.mdi-football-australian::before{content:"\F025E"}.mdi-football-helmet::before{content:"\F025F"}.mdi-forest::before{content:"\F1897"}.mdi-forest-outline::before{content:"\F1C63"}.mdi-forklift::before{content:"\F07C9"}.mdi-form-dropdown::before{content:"\F1400"}.mdi-form-select::before{content:"\F1401"}.mdi-form-textarea::before{content:"\F1095"}.mdi-form-textbox::before{content:"\F060E"}.mdi-form-textbox-lock::before{content:"\F135D"}.mdi-form-textbox-password::before{content:"\F07F5"}.mdi-format-align-bottom::before{content:"\F0753"}.mdi-format-align-center::before{content:"\F0260"}.mdi-format-align-justify::before{content:"\F0261"}.mdi-format-align-left::before{content:"\F0262"}.mdi-format-align-middle::before{content:"\F0754"}.mdi-format-align-right::before{content:"\F0263"}.mdi-format-align-top::before{content:"\F0755"}.mdi-format-annotation-minus::before{content:"\F0ABC"}.mdi-format-annotation-plus::before{content:"\F0646"}.mdi-format-bold::before{content:"\F0264"}.mdi-format-clear::before{content:"\F0265"}.mdi-format-color-fill::before{content:"\F0266"}.mdi-format-color-highlight::before{content:"\F0E31"}.mdi-format-color-marker-cancel::before{content:"\F1313"}.mdi-format-color-text::before{content:"\F069E"}.mdi-format-columns::before{content:"\F08DF"}.mdi-format-float-center::before{content:"\F0267"}.mdi-format-float-left::before{content:"\F0268"}.mdi-format-float-none::before{content:"\F0269"}.mdi-format-float-right::before{content:"\F026A"}.mdi-format-font::before{content:"\F06D6"}.mdi-format-font-size-decrease::before{content:"\F09F3"}.mdi-format-font-size-increase::before{content:"\F09F4"}.mdi-format-header-1::before{content:"\F026B"}.mdi-format-header-2::before{content:"\F026C"}.mdi-format-header-3::before{content:"\F026D"}.mdi-format-header-4::before{content:"\F026E"}.mdi-format-header-5::before{content:"\F026F"}.mdi-format-header-6::before{content:"\F0270"}.mdi-format-header-decrease::before{content:"\F0271"}.mdi-format-header-equal::before{content:"\F0272"}.mdi-format-header-increase::before{content:"\F0273"}.mdi-format-header-pound::before{content:"\F0274"}.mdi-format-horizontal-align-center::before{content:"\F061E"}.mdi-format-horizontal-align-left::before{content:"\F061F"}.mdi-format-horizontal-align-right::before{content:"\F0620"}.mdi-format-indent-decrease::before{content:"\F0275"}.mdi-format-indent-increase::before{content:"\F0276"}.mdi-format-italic::before{content:"\F0277"}.mdi-format-letter-case::before{content:"\F0B34"}.mdi-format-letter-case-lower::before{content:"\F0B35"}.mdi-format-letter-case-upper::before{content:"\F0B36"}.mdi-format-letter-ends-with::before{content:"\F0FB8"}.mdi-format-letter-matches::before{content:"\F0FB9"}.mdi-format-letter-spacing::before{content:"\F1956"}.mdi-format-letter-spacing-variant::before{content:"\F1AFB"}.mdi-format-letter-starts-with::before{content:"\F0FBA"}.mdi-format-line-height::before{content:"\F1AFC"}.mdi-format-line-spacing::before{content:"\F0278"}.mdi-format-line-style::before{content:"\F05C8"}.mdi-format-line-weight::before{content:"\F05C9"}.mdi-format-list-bulleted::before{content:"\F0279"}.mdi-format-list-bulleted-square::before{content:"\F0DD0"}.mdi-format-list-bulleted-triangle::before{content:"\F0EB2"}.mdi-format-list-bulleted-type::before{content:"\F027A"}.mdi-format-list-checkbox::before{content:"\F096A"}.mdi-format-list-checks::before{content:"\F0756"}.mdi-format-list-group::before{content:"\F1860"}.mdi-format-list-group-plus::before{content:"\F1B56"}.mdi-format-list-numbered::before{content:"\F027B"}.mdi-format-list-numbered-rtl::before{content:"\F0D0D"}.mdi-format-list-text::before{content:"\F126F"}.mdi-format-overline::before{content:"\F0EB3"}.mdi-format-page-break::before{content:"\F06D7"}.mdi-format-page-split::before{content:"\F1917"}.mdi-format-paint::before{content:"\F027C"}.mdi-format-paragraph::before{content:"\F027D"}.mdi-format-paragraph-spacing::before{content:"\F1AFD"}.mdi-format-pilcrow::before{content:"\F06D8"}.mdi-format-pilcrow-arrow-left::before{content:"\F0286"}.mdi-format-pilcrow-arrow-right::before{content:"\F0285"}.mdi-format-quote-close::before{content:"\F027E"}.mdi-format-quote-close-outline::before{content:"\F11A8"}.mdi-format-quote-open::before{content:"\F0757"}.mdi-format-quote-open-outline::before{content:"\F11A7"}.mdi-format-rotate-90::before{content:"\F06AA"}.mdi-format-section::before{content:"\F069F"}.mdi-format-size::before{content:"\F027F"}.mdi-format-strikethrough::before{content:"\F0280"}.mdi-format-strikethrough-variant::before{content:"\F0281"}.mdi-format-subscript::before{content:"\F0282"}.mdi-format-superscript::before{content:"\F0283"}.mdi-format-text::before{content:"\F0284"}.mdi-format-text-rotation-angle-down::before{content:"\F0FBB"}.mdi-format-text-rotation-angle-up::before{content:"\F0FBC"}.mdi-format-text-rotation-down::before{content:"\F0D73"}.mdi-format-text-rotation-down-vertical::before{content:"\F0FBD"}.mdi-format-text-rotation-none::before{content:"\F0D74"}.mdi-format-text-rotation-up::before{content:"\F0FBE"}.mdi-format-text-rotation-vertical::before{content:"\F0FBF"}.mdi-format-text-variant::before{content:"\F0E32"}.mdi-format-text-variant-outline::before{content:"\F150F"}.mdi-format-text-wrapping-clip::before{content:"\F0D0E"}.mdi-format-text-wrapping-overflow::before{content:"\F0D0F"}.mdi-format-text-wrapping-wrap::before{content:"\F0D10"}.mdi-format-textbox::before{content:"\F0D11"}.mdi-format-title::before{content:"\F05F4"}.mdi-format-underline::before{content:"\F0287"}.mdi-format-underline-wavy::before{content:"\F18E9"}.mdi-format-vertical-align-bottom::before{content:"\F0621"}.mdi-format-vertical-align-center::before{content:"\F0622"}.mdi-format-vertical-align-top::before{content:"\F0623"}.mdi-format-wrap-inline::before{content:"\F0288"}.mdi-format-wrap-square::before{content:"\F0289"}.mdi-format-wrap-tight::before{content:"\F028A"}.mdi-format-wrap-top-bottom::before{content:"\F028B"}.mdi-forum::before{content:"\F028C"}.mdi-forum-minus::before{content:"\F1AA9"}.mdi-forum-minus-outline::before{content:"\F1AAA"}.mdi-forum-outline::before{content:"\F0822"}.mdi-forum-plus::before{content:"\F1AAB"}.mdi-forum-plus-outline::before{content:"\F1AAC"}.mdi-forum-remove::before{content:"\F1AAD"}.mdi-forum-remove-outline::before{content:"\F1AAE"}.mdi-forward::before{content:"\F028D"}.mdi-forwardburger::before{content:"\F0D75"}.mdi-fountain::before{content:"\F096B"}.mdi-fountain-pen::before{content:"\F0D12"}.mdi-fountain-pen-tip::before{content:"\F0D13"}.mdi-fraction-one-half::before{content:"\F1992"}.mdi-freebsd::before{content:"\F08E0"}.mdi-french-fries::before{content:"\F1957"}.mdi-frequently-asked-questions::before{content:"\F0EB4"}.mdi-fridge::before{content:"\F0290"}.mdi-fridge-alert::before{content:"\F11B1"}.mdi-fridge-alert-outline::before{content:"\F11B2"}.mdi-fridge-bottom::before{content:"\F0292"}.mdi-fridge-industrial::before{content:"\F15EE"}.mdi-fridge-industrial-alert::before{content:"\F15EF"}.mdi-fridge-industrial-alert-outline::before{content:"\F15F0"}.mdi-fridge-industrial-off::before{content:"\F15F1"}.mdi-fridge-industrial-off-outline::before{content:"\F15F2"}.mdi-fridge-industrial-outline::before{content:"\F15F3"}.mdi-fridge-off::before{content:"\F11AF"}.mdi-fridge-off-outline::before{content:"\F11B0"}.mdi-fridge-outline::before{content:"\F028F"}.mdi-fridge-top::before{content:"\F0291"}.mdi-fridge-variant::before{content:"\F15F4"}.mdi-fridge-variant-alert::before{content:"\F15F5"}.mdi-fridge-variant-alert-outline::before{content:"\F15F6"}.mdi-fridge-variant-off::before{content:"\F15F7"}.mdi-fridge-variant-off-outline::before{content:"\F15F8"}.mdi-fridge-variant-outline::before{content:"\F15F9"}.mdi-fruit-cherries::before{content:"\F1042"}.mdi-fruit-cherries-off::before{content:"\F13F8"}.mdi-fruit-citrus::before{content:"\F1043"}.mdi-fruit-citrus-off::before{content:"\F13F9"}.mdi-fruit-grapes::before{content:"\F1044"}.mdi-fruit-grapes-outline::before{content:"\F1045"}.mdi-fruit-pear::before{content:"\F1A0E"}.mdi-fruit-pineapple::before{content:"\F1046"}.mdi-fruit-watermelon::before{content:"\F1047"}.mdi-fuel::before{content:"\F07CA"}.mdi-fuel-cell::before{content:"\F18B5"}.mdi-fullscreen::before{content:"\F0293"}.mdi-fullscreen-exit::before{content:"\F0294"}.mdi-function::before{content:"\F0295"}.mdi-function-variant::before{content:"\F0871"}.mdi-furigana-horizontal::before{content:"\F1081"}.mdi-furigana-vertical::before{content:"\F1082"}.mdi-fuse::before{content:"\F0C85"}.mdi-fuse-alert::before{content:"\F142D"}.mdi-fuse-blade::before{content:"\F0C86"}.mdi-fuse-off::before{content:"\F142C"}.mdi-gamepad::before{content:"\F0296"}.mdi-gamepad-circle::before{content:"\F0E33"}.mdi-gamepad-circle-down::before{content:"\F0E34"}.mdi-gamepad-circle-left::before{content:"\F0E35"}.mdi-gamepad-circle-outline::before{content:"\F0E36"}.mdi-gamepad-circle-right::before{content:"\F0E37"}.mdi-gamepad-circle-up::before{content:"\F0E38"}.mdi-gamepad-down::before{content:"\F0E39"}.mdi-gamepad-left::before{content:"\F0E3A"}.mdi-gamepad-outline::before{content:"\F1919"}.mdi-gamepad-right::before{content:"\F0E3B"}.mdi-gamepad-round::before{content:"\F0E3C"}.mdi-gamepad-round-down::before{content:"\F0E3D"}.mdi-gamepad-round-left::before{content:"\F0E3E"}.mdi-gamepad-round-outline::before{content:"\F0E3F"}.mdi-gamepad-round-right::before{content:"\F0E40"}.mdi-gamepad-round-up::before{content:"\F0E41"}.mdi-gamepad-square::before{content:"\F0EB5"}.mdi-gamepad-square-outline::before{content:"\F0EB6"}.mdi-gamepad-up::before{content:"\F0E42"}.mdi-gamepad-variant::before{content:"\F0297"}.mdi-gamepad-variant-outline::before{content:"\F0EB7"}.mdi-gamma::before{content:"\F10EE"}.mdi-gantry-crane::before{content:"\F0DD1"}.mdi-garage::before{content:"\F06D9"}.mdi-garage-alert::before{content:"\F0872"}.mdi-garage-alert-variant::before{content:"\F12D5"}.mdi-garage-lock::before{content:"\F17FB"}.mdi-garage-open::before{content:"\F06DA"}.mdi-garage-open-variant::before{content:"\F12D4"}.mdi-garage-variant::before{content:"\F12D3"}.mdi-garage-variant-lock::before{content:"\F17FC"}.mdi-gas-burner::before{content:"\F1A1B"}.mdi-gas-cylinder::before{content:"\F0647"}.mdi-gas-station::before{content:"\F0298"}.mdi-gas-station-in-use::before{content:"\F1CC4"}.mdi-gas-station-in-use-outline::before{content:"\F1CC5"}.mdi-gas-station-off::before{content:"\F1409"}.mdi-gas-station-off-outline::before{content:"\F140A"}.mdi-gas-station-outline::before{content:"\F0EB8"}.mdi-gate::before{content:"\F0299"}.mdi-gate-alert::before{content:"\F17F8"}.mdi-gate-and::before{content:"\F08E1"}.mdi-gate-arrow-left::before{content:"\F17F7"}.mdi-gate-arrow-right::before{content:"\F1169"}.mdi-gate-buffer::before{content:"\F1AFE"}.mdi-gate-nand::before{content:"\F08E2"}.mdi-gate-nor::before{content:"\F08E3"}.mdi-gate-not::before{content:"\F08E4"}.mdi-gate-open::before{content:"\F116A"}.mdi-gate-or::before{content:"\F08E5"}.mdi-gate-xnor::before{content:"\F08E6"}.mdi-gate-xor::before{content:"\F08E7"}.mdi-gatsby::before{content:"\F0E43"}.mdi-gauge::before{content:"\F029A"}.mdi-gauge-empty::before{content:"\F0873"}.mdi-gauge-full::before{content:"\F0874"}.mdi-gauge-low::before{content:"\F0875"}.mdi-gavel::before{content:"\F029B"}.mdi-gender-female::before{content:"\F029C"}.mdi-gender-male::before{content:"\F029D"}.mdi-gender-male-female::before{content:"\F029E"}.mdi-gender-male-female-variant::before{content:"\F113F"}.mdi-gender-non-binary::before{content:"\F1140"}.mdi-gender-transgender::before{content:"\F029F"}.mdi-generator-mobile::before{content:"\F1C8A"}.mdi-generator-portable::before{content:"\F1C8B"}.mdi-generator-stationary::before{content:"\F1C8C"}.mdi-gentoo::before{content:"\F08E8"}.mdi-gesture::before{content:"\F07CB"}.mdi-gesture-double-tap::before{content:"\F073C"}.mdi-gesture-pinch::before{content:"\F0ABD"}.mdi-gesture-spread::before{content:"\F0ABE"}.mdi-gesture-swipe::before{content:"\F0D76"}.mdi-gesture-swipe-down::before{content:"\F073D"}.mdi-gesture-swipe-horizontal::before{content:"\F0ABF"}.mdi-gesture-swipe-left::before{content:"\F073E"}.mdi-gesture-swipe-right::before{content:"\F073F"}.mdi-gesture-swipe-up::before{content:"\F0740"}.mdi-gesture-swipe-vertical::before{content:"\F0AC0"}.mdi-gesture-tap::before{content:"\F0741"}.mdi-gesture-tap-box::before{content:"\F12A9"}.mdi-gesture-tap-button::before{content:"\F12A8"}.mdi-gesture-tap-hold::before{content:"\F0D77"}.mdi-gesture-two-double-tap::before{content:"\F0742"}.mdi-gesture-two-tap::before{content:"\F0743"}.mdi-ghost::before{content:"\F02A0"}.mdi-ghost-off::before{content:"\F09F5"}.mdi-ghost-off-outline::before{content:"\F165C"}.mdi-ghost-outline::before{content:"\F165D"}.mdi-gift::before{content:"\F0E44"}.mdi-gift-off::before{content:"\F16EF"}.mdi-gift-off-outline::before{content:"\F16F0"}.mdi-gift-open::before{content:"\F16F1"}.mdi-gift-open-outline::before{content:"\F16F2"}.mdi-gift-outline::before{content:"\F02A1"}.mdi-git::before{content:"\F02A2"}.mdi-github::before{content:"\F02A4"}.mdi-gitlab::before{content:"\F0BA0"}.mdi-glass-cocktail::before{content:"\F0356"}.mdi-glass-cocktail-off::before{content:"\F15E6"}.mdi-glass-flute::before{content:"\F02A5"}.mdi-glass-fragile::before{content:"\F1873"}.mdi-glass-mug::before{content:"\F02A6"}.mdi-glass-mug-off::before{content:"\F15E7"}.mdi-glass-mug-variant::before{content:"\F1116"}.mdi-glass-mug-variant-off::before{content:"\F15E8"}.mdi-glass-pint-outline::before{content:"\F130D"}.mdi-glass-stange::before{content:"\F02A7"}.mdi-glass-tulip::before{content:"\F02A8"}.mdi-glass-wine::before{content:"\F0876"}.mdi-glasses::before{content:"\F02AA"}.mdi-globe-light::before{content:"\F066F"}.mdi-globe-light-outline::before{content:"\F12D7"}.mdi-globe-model::before{content:"\F08E9"}.mdi-gmail::before{content:"\F02AB"}.mdi-gnome::before{content:"\F02AC"}.mdi-go-kart::before{content:"\F0D79"}.mdi-go-kart-track::before{content:"\F0D7A"}.mdi-gog::before{content:"\F0BA1"}.mdi-gold::before{content:"\F124F"}.mdi-golf::before{content:"\F0823"}.mdi-golf-cart::before{content:"\F11A4"}.mdi-golf-tee::before{content:"\F1083"}.mdi-gondola::before{content:"\F0686"}.mdi-goodreads::before{content:"\F0D7B"}.mdi-google::before{content:"\F02AD"}.mdi-google-ads::before{content:"\F0C87"}.mdi-google-analytics::before{content:"\F07CC"}.mdi-google-assistant::before{content:"\F07CD"}.mdi-google-cardboard::before{content:"\F02AE"}.mdi-google-chrome::before{content:"\F02AF"}.mdi-google-circles::before{content:"\F02B0"}.mdi-google-circles-communities::before{content:"\F02B1"}.mdi-google-circles-extended::before{content:"\F02B2"}.mdi-google-circles-group::before{content:"\F02B3"}.mdi-google-classroom::before{content:"\F02C0"}.mdi-google-cloud::before{content:"\F11F6"}.mdi-google-downasaur::before{content:"\F1362"}.mdi-google-drive::before{content:"\F02B6"}.mdi-google-earth::before{content:"\F02B7"}.mdi-google-fit::before{content:"\F096C"}.mdi-google-glass::before{content:"\F02B8"}.mdi-google-hangouts::before{content:"\F02C9"}.mdi-google-keep::before{content:"\F06DC"}.mdi-google-lens::before{content:"\F09F6"}.mdi-google-maps::before{content:"\F05F5"}.mdi-google-my-business::before{content:"\F1048"}.mdi-google-nearby::before{content:"\F02B9"}.mdi-google-play::before{content:"\F02BC"}.mdi-google-plus::before{content:"\F02BD"}.mdi-google-podcast::before{content:"\F0EB9"}.mdi-google-spreadsheet::before{content:"\F09F7"}.mdi-google-street-view::before{content:"\F0C88"}.mdi-google-translate::before{content:"\F02BF"}.mdi-gradient-horizontal::before{content:"\F174A"}.mdi-gradient-vertical::before{content:"\F06A0"}.mdi-grain::before{content:"\F0D7C"}.mdi-graph::before{content:"\F1049"}.mdi-graph-outline::before{content:"\F104A"}.mdi-graphql::before{content:"\F0877"}.mdi-grass::before{content:"\F1510"}.mdi-grave-stone::before{content:"\F0BA2"}.mdi-grease-pencil::before{content:"\F0648"}.mdi-greater-than::before{content:"\F096D"}.mdi-greater-than-or-equal::before{content:"\F096E"}.mdi-greenhouse::before{content:"\F002D"}.mdi-grid::before{content:"\F02C1"}.mdi-grid-large::before{content:"\F0758"}.mdi-grid-off::before{content:"\F02C2"}.mdi-grill::before{content:"\F0E45"}.mdi-grill-outline::before{content:"\F118A"}.mdi-group::before{content:"\F02C3"}.mdi-guitar-acoustic::before{content:"\F0771"}.mdi-guitar-electric::before{content:"\F02C4"}.mdi-guitar-pick::before{content:"\F02C5"}.mdi-guitar-pick-outline::before{content:"\F02C6"}.mdi-guy-fawkes-mask::before{content:"\F0825"}.mdi-gymnastics::before{content:"\F1A41"}.mdi-hail::before{content:"\F0AC1"}.mdi-hair-dryer::before{content:"\F10EF"}.mdi-hair-dryer-outline::before{content:"\F10F0"}.mdi-halloween::before{content:"\F0BA3"}.mdi-hamburger::before{content:"\F0685"}.mdi-hamburger-check::before{content:"\F1776"}.mdi-hamburger-minus::before{content:"\F1777"}.mdi-hamburger-off::before{content:"\F1778"}.mdi-hamburger-plus::before{content:"\F1779"}.mdi-hamburger-remove::before{content:"\F177A"}.mdi-hammer::before{content:"\F08EA"}.mdi-hammer-screwdriver::before{content:"\F1322"}.mdi-hammer-sickle::before{content:"\F1887"}.mdi-hammer-wrench::before{content:"\F1323"}.mdi-hand-back-left::before{content:"\F0E46"}.mdi-hand-back-left-off::before{content:"\F1830"}.mdi-hand-back-left-off-outline::before{content:"\F1832"}.mdi-hand-back-left-outline::before{content:"\F182C"}.mdi-hand-back-right::before{content:"\F0E47"}.mdi-hand-back-right-off::before{content:"\F1831"}.mdi-hand-back-right-off-outline::before{content:"\F1833"}.mdi-hand-back-right-outline::before{content:"\F182D"}.mdi-hand-clap::before{content:"\F194B"}.mdi-hand-clap-off::before{content:"\F1A42"}.mdi-hand-coin::before{content:"\F188F"}.mdi-hand-coin-outline::before{content:"\F1890"}.mdi-hand-cycle::before{content:"\F1B9C"}.mdi-hand-extended::before{content:"\F18B6"}.mdi-hand-extended-outline::before{content:"\F18B7"}.mdi-hand-front-left::before{content:"\F182B"}.mdi-hand-front-left-outline::before{content:"\F182E"}.mdi-hand-front-right::before{content:"\F0A4F"}.mdi-hand-front-right-outline::before{content:"\F182F"}.mdi-hand-heart::before{content:"\F10F1"}.mdi-hand-heart-outline::before{content:"\F157E"}.mdi-hand-okay::before{content:"\F0A50"}.mdi-hand-peace::before{content:"\F0A51"}.mdi-hand-peace-variant::before{content:"\F0A52"}.mdi-hand-pointing-down::before{content:"\F0A53"}.mdi-hand-pointing-left::before{content:"\F0A54"}.mdi-hand-pointing-right::before{content:"\F02C7"}.mdi-hand-pointing-up::before{content:"\F0A55"}.mdi-hand-saw::before{content:"\F0E48"}.mdi-hand-wash::before{content:"\F157F"}.mdi-hand-wash-outline::before{content:"\F1580"}.mdi-hand-water::before{content:"\F139F"}.mdi-hand-wave::before{content:"\F1821"}.mdi-hand-wave-outline::before{content:"\F1822"}.mdi-handball::before{content:"\F0F53"}.mdi-handcuffs::before{content:"\F113E"}.mdi-hands-pray::before{content:"\F0579"}.mdi-handshake::before{content:"\F1218"}.mdi-handshake-outline::before{content:"\F15A1"}.mdi-hanger::before{content:"\F02C8"}.mdi-hard-hat::before{content:"\F096F"}.mdi-harddisk::before{content:"\F02CA"}.mdi-harddisk-plus::before{content:"\F104B"}.mdi-harddisk-remove::before{content:"\F104C"}.mdi-hat-fedora::before{content:"\F0BA4"}.mdi-hazard-lights::before{content:"\F0C89"}.mdi-hdmi-port::before{content:"\F1BB8"}.mdi-hdr::before{content:"\F0D7D"}.mdi-hdr-off::before{content:"\F0D7E"}.mdi-head::before{content:"\F135E"}.mdi-head-alert::before{content:"\F1338"}.mdi-head-alert-outline::before{content:"\F1339"}.mdi-head-check::before{content:"\F133A"}.mdi-head-check-outline::before{content:"\F133B"}.mdi-head-cog::before{content:"\F133C"}.mdi-head-cog-outline::before{content:"\F133D"}.mdi-head-dots-horizontal::before{content:"\F133E"}.mdi-head-dots-horizontal-outline::before{content:"\F133F"}.mdi-head-flash::before{content:"\F1340"}.mdi-head-flash-outline::before{content:"\F1341"}.mdi-head-heart::before{content:"\F1342"}.mdi-head-heart-outline::before{content:"\F1343"}.mdi-head-lightbulb::before{content:"\F1344"}.mdi-head-lightbulb-outline::before{content:"\F1345"}.mdi-head-minus::before{content:"\F1346"}.mdi-head-minus-outline::before{content:"\F1347"}.mdi-head-outline::before{content:"\F135F"}.mdi-head-plus::before{content:"\F1348"}.mdi-head-plus-outline::before{content:"\F1349"}.mdi-head-question::before{content:"\F134A"}.mdi-head-question-outline::before{content:"\F134B"}.mdi-head-remove::before{content:"\F134C"}.mdi-head-remove-outline::before{content:"\F134D"}.mdi-head-snowflake::before{content:"\F134E"}.mdi-head-snowflake-outline::before{content:"\F134F"}.mdi-head-sync::before{content:"\F1350"}.mdi-head-sync-outline::before{content:"\F1351"}.mdi-headphones::before{content:"\F02CB"}.mdi-headphones-bluetooth::before{content:"\F0970"}.mdi-headphones-box::before{content:"\F02CC"}.mdi-headphones-off::before{content:"\F07CE"}.mdi-headphones-settings::before{content:"\F02CD"}.mdi-headset::before{content:"\F02CE"}.mdi-headset-dock::before{content:"\F02CF"}.mdi-headset-off::before{content:"\F02D0"}.mdi-heart::before{content:"\F02D1"}.mdi-heart-box::before{content:"\F02D2"}.mdi-heart-box-outline::before{content:"\F02D3"}.mdi-heart-broken::before{content:"\F02D4"}.mdi-heart-broken-outline::before{content:"\F0D14"}.mdi-heart-circle::before{content:"\F0971"}.mdi-heart-circle-outline::before{content:"\F0972"}.mdi-heart-cog::before{content:"\F1663"}.mdi-heart-cog-outline::before{content:"\F1664"}.mdi-heart-flash::before{content:"\F0EF9"}.mdi-heart-half::before{content:"\F06DF"}.mdi-heart-half-full::before{content:"\F06DE"}.mdi-heart-half-outline::before{content:"\F06E0"}.mdi-heart-minus::before{content:"\F142F"}.mdi-heart-minus-outline::before{content:"\F1432"}.mdi-heart-multiple::before{content:"\F0A56"}.mdi-heart-multiple-outline::before{content:"\F0A57"}.mdi-heart-off::before{content:"\F0759"}.mdi-heart-off-outline::before{content:"\F1434"}.mdi-heart-outline::before{content:"\F02D5"}.mdi-heart-plus::before{content:"\F142E"}.mdi-heart-plus-outline::before{content:"\F1431"}.mdi-heart-pulse::before{content:"\F05F6"}.mdi-heart-remove::before{content:"\F1430"}.mdi-heart-remove-outline::before{content:"\F1433"}.mdi-heart-search::before{content:"\F1C8D"}.mdi-heart-settings::before{content:"\F1665"}.mdi-heart-settings-outline::before{content:"\F1666"}.mdi-heat-pump::before{content:"\F1A43"}.mdi-heat-pump-outline::before{content:"\F1A44"}.mdi-heat-wave::before{content:"\F1A45"}.mdi-heating-coil::before{content:"\F1AAF"}.mdi-helicopter::before{content:"\F0AC2"}.mdi-help::before{content:"\F02D6"}.mdi-help-box::before{content:"\F078B"}.mdi-help-box-multiple::before{content:"\F1C0A"}.mdi-help-box-multiple-outline::before{content:"\F1C0B"}.mdi-help-box-outline::before{content:"\F1C0C"}.mdi-help-circle::before{content:"\F02D7"}.mdi-help-circle-outline::before{content:"\F0625"}.mdi-help-network::before{content:"\F06F5"}.mdi-help-network-outline::before{content:"\F0C8A"}.mdi-help-rhombus::before{content:"\F0BA5"}.mdi-help-rhombus-outline::before{content:"\F0BA6"}.mdi-hexadecimal::before{content:"\F12A7"}.mdi-hexagon::before{content:"\F02D8"}.mdi-hexagon-multiple::before{content:"\F06E1"}.mdi-hexagon-multiple-outline::before{content:"\F10F2"}.mdi-hexagon-outline::before{content:"\F02D9"}.mdi-hexagon-slice-1::before{content:"\F0AC3"}.mdi-hexagon-slice-2::before{content:"\F0AC4"}.mdi-hexagon-slice-3::before{content:"\F0AC5"}.mdi-hexagon-slice-4::before{content:"\F0AC6"}.mdi-hexagon-slice-5::before{content:"\F0AC7"}.mdi-hexagon-slice-6::before{content:"\F0AC8"}.mdi-hexagram::before{content:"\F0AC9"}.mdi-hexagram-outline::before{content:"\F0ACA"}.mdi-high-definition::before{content:"\F07CF"}.mdi-high-definition-box::before{content:"\F0878"}.mdi-highway::before{content:"\F05F7"}.mdi-hiking::before{content:"\F0D7F"}.mdi-history::before{content:"\F02DA"}.mdi-hockey-puck::before{content:"\F0879"}.mdi-hockey-sticks::before{content:"\F087A"}.mdi-hololens::before{content:"\F02DB"}.mdi-home::before{content:"\F02DC"}.mdi-home-account::before{content:"\F0826"}.mdi-home-alert::before{content:"\F087B"}.mdi-home-alert-outline::before{content:"\F15D0"}.mdi-home-analytics::before{content:"\F0EBA"}.mdi-home-assistant::before{content:"\F07D0"}.mdi-home-automation::before{content:"\F07D1"}.mdi-home-battery::before{content:"\F1901"}.mdi-home-battery-outline::before{content:"\F1902"}.mdi-home-circle::before{content:"\F07D2"}.mdi-home-circle-outline::before{content:"\F104D"}.mdi-home-city::before{content:"\F0D15"}.mdi-home-city-outline::before{content:"\F0D16"}.mdi-home-clock::before{content:"\F1A12"}.mdi-home-clock-outline::before{content:"\F1A13"}.mdi-home-edit::before{content:"\F1159"}.mdi-home-edit-outline::before{content:"\F115A"}.mdi-home-export-outline::before{content:"\F0F9B"}.mdi-home-flood::before{content:"\F0EFA"}.mdi-home-floor-0::before{content:"\F0DD2"}.mdi-home-floor-1::before{content:"\F0D80"}.mdi-home-floor-2::before{content:"\F0D81"}.mdi-home-floor-3::before{content:"\F0D82"}.mdi-home-floor-a::before{content:"\F0D83"}.mdi-home-floor-b::before{content:"\F0D84"}.mdi-home-floor-g::before{content:"\F0D85"}.mdi-home-floor-l::before{content:"\F0D86"}.mdi-home-floor-negative-1::before{content:"\F0DD3"}.mdi-home-group::before{content:"\F0DD4"}.mdi-home-group-minus::before{content:"\F19C1"}.mdi-home-group-plus::before{content:"\F19C0"}.mdi-home-group-remove::before{content:"\F19C2"}.mdi-home-heart::before{content:"\F0827"}.mdi-home-import-outline::before{content:"\F0F9C"}.mdi-home-lightbulb::before{content:"\F1251"}.mdi-home-lightbulb-outline::before{content:"\F1252"}.mdi-home-lightning-bolt::before{content:"\F1903"}.mdi-home-lightning-bolt-outline::before{content:"\F1904"}.mdi-home-lock::before{content:"\F08EB"}.mdi-home-lock-open::before{content:"\F08EC"}.mdi-home-map-marker::before{content:"\F05F8"}.mdi-home-minus::before{content:"\F0974"}.mdi-home-minus-outline::before{content:"\F13D5"}.mdi-home-modern::before{content:"\F02DD"}.mdi-home-off::before{content:"\F1A46"}.mdi-home-off-outline::before{content:"\F1A47"}.mdi-home-outline::before{content:"\F06A1"}.mdi-home-percent::before{content:"\F1C7C"}.mdi-home-percent-outline::before{content:"\F1C7D"}.mdi-home-plus::before{content:"\F0975"}.mdi-home-plus-outline::before{content:"\F13D6"}.mdi-home-remove::before{content:"\F1247"}.mdi-home-remove-outline::before{content:"\F13D7"}.mdi-home-roof::before{content:"\F112B"}.mdi-home-search::before{content:"\F13B0"}.mdi-home-search-outline::before{content:"\F13B1"}.mdi-home-silo::before{content:"\F1BA0"}.mdi-home-silo-outline::before{content:"\F1BA1"}.mdi-home-sound-in::before{content:"\F1C2F"}.mdi-home-sound-in-outline::before{content:"\F1C30"}.mdi-home-sound-out::before{content:"\F1C31"}.mdi-home-sound-out-outline::before{content:"\F1C32"}.mdi-home-switch::before{content:"\F1794"}.mdi-home-switch-outline::before{content:"\F1795"}.mdi-home-thermometer::before{content:"\F0F54"}.mdi-home-thermometer-outline::before{content:"\F0F55"}.mdi-home-variant::before{content:"\F02DE"}.mdi-home-variant-outline::before{content:"\F0BA7"}.mdi-hook::before{content:"\F06E2"}.mdi-hook-off::before{content:"\F06E3"}.mdi-hoop-house::before{content:"\F0E56"}.mdi-hops::before{content:"\F02DF"}.mdi-horizontal-rotate-clockwise::before{content:"\F10F3"}.mdi-horizontal-rotate-counterclockwise::before{content:"\F10F4"}.mdi-horse::before{content:"\F15BF"}.mdi-horse-human::before{content:"\F15C0"}.mdi-horse-variant::before{content:"\F15C1"}.mdi-horse-variant-fast::before{content:"\F186E"}.mdi-horseshoe::before{content:"\F0A58"}.mdi-hospital::before{content:"\F0FF6"}.mdi-hospital-box::before{content:"\F02E0"}.mdi-hospital-box-outline::before{content:"\F0FF7"}.mdi-hospital-building::before{content:"\F02E1"}.mdi-hospital-marker::before{content:"\F02E2"}.mdi-hot-tub::before{content:"\F0828"}.mdi-hours-12::before{content:"\F1C94"}.mdi-hours-24::before{content:"\F1478"}.mdi-hub::before{content:"\F1C95"}.mdi-hub-outline::before{content:"\F1C96"}.mdi-hubspot::before{content:"\F0D17"}.mdi-hulu::before{content:"\F0829"}.mdi-human::before{content:"\F02E6"}.mdi-human-baby-changing-table::before{content:"\F138B"}.mdi-human-cane::before{content:"\F1581"}.mdi-human-capacity-decrease::before{content:"\F159B"}.mdi-human-capacity-increase::before{content:"\F159C"}.mdi-human-child::before{content:"\F02E7"}.mdi-human-dolly::before{content:"\F1980"}.mdi-human-edit::before{content:"\F14E8"}.mdi-human-female::before{content:"\F0649"}.mdi-human-female-boy::before{content:"\F0A59"}.mdi-human-female-dance::before{content:"\F15C9"}.mdi-human-female-female::before{content:"\F0A5A"}.mdi-human-female-female-child::before{content:"\F1C8E"}.mdi-human-female-girl::before{content:"\F0A5B"}.mdi-human-greeting::before{content:"\F17C4"}.mdi-human-greeting-proximity::before{content:"\F159D"}.mdi-human-greeting-variant::before{content:"\F064A"}.mdi-human-handsdown::before{content:"\F064B"}.mdi-human-handsup::before{content:"\F064C"}.mdi-human-male::before{content:"\F064D"}.mdi-human-male-board::before{content:"\F0890"}.mdi-human-male-board-poll::before{content:"\F0846"}.mdi-human-male-boy::before{content:"\F0A5C"}.mdi-human-male-child::before{content:"\F138C"}.mdi-human-male-female::before{content:"\F02E8"}.mdi-human-male-female-child::before{content:"\F1823"}.mdi-human-male-girl::before{content:"\F0A5D"}.mdi-human-male-height::before{content:"\F0EFB"}.mdi-human-male-height-variant::before{content:"\F0EFC"}.mdi-human-male-male::before{content:"\F0A5E"}.mdi-human-male-male-child::before{content:"\F1C8F"}.mdi-human-non-binary::before{content:"\F1848"}.mdi-human-pregnant::before{content:"\F05CF"}.mdi-human-queue::before{content:"\F1571"}.mdi-human-scooter::before{content:"\F11E9"}.mdi-human-walker::before{content:"\F1B71"}.mdi-human-wheelchair::before{content:"\F138D"}.mdi-human-white-cane::before{content:"\F1981"}.mdi-humble-bundle::before{content:"\F0744"}.mdi-hvac::before{content:"\F1352"}.mdi-hvac-off::before{content:"\F159E"}.mdi-hydraulic-oil-level::before{content:"\F1324"}.mdi-hydraulic-oil-temperature::before{content:"\F1325"}.mdi-hydro-power::before{content:"\F12E5"}.mdi-hydrogen-station::before{content:"\F1894"}.mdi-ice-cream::before{content:"\F082A"}.mdi-ice-cream-off::before{content:"\F0E52"}.mdi-ice-pop::before{content:"\F0EFD"}.mdi-id-card::before{content:"\F0FC0"}.mdi-identifier::before{content:"\F0EFE"}.mdi-ideogram-cjk::before{content:"\F1331"}.mdi-ideogram-cjk-variant::before{content:"\F1332"}.mdi-image::before{content:"\F02E9"}.mdi-image-album::before{content:"\F02EA"}.mdi-image-area::before{content:"\F02EB"}.mdi-image-area-close::before{content:"\F02EC"}.mdi-image-auto-adjust::before{content:"\F0FC1"}.mdi-image-broken::before{content:"\F02ED"}.mdi-image-broken-variant::before{content:"\F02EE"}.mdi-image-check::before{content:"\F1B25"}.mdi-image-check-outline::before{content:"\F1B26"}.mdi-image-edit::before{content:"\F11E3"}.mdi-image-edit-outline::before{content:"\F11E4"}.mdi-image-filter-black-white::before{content:"\F02F0"}.mdi-image-filter-center-focus::before{content:"\F02F1"}.mdi-image-filter-center-focus-strong::before{content:"\F0EFF"}.mdi-image-filter-center-focus-strong-outline::before{content:"\F0F00"}.mdi-image-filter-center-focus-weak::before{content:"\F02F2"}.mdi-image-filter-drama::before{content:"\F02F3"}.mdi-image-filter-drama-outline::before{content:"\F1BFF"}.mdi-image-filter-frames::before{content:"\F02F4"}.mdi-image-filter-hdr::before{content:"\F02F5"}.mdi-image-filter-hdr-outline::before{content:"\F1C64"}.mdi-image-filter-none::before{content:"\F02F6"}.mdi-image-filter-tilt-shift::before{content:"\F02F7"}.mdi-image-filter-vintage::before{content:"\F02F8"}.mdi-image-frame::before{content:"\F0E49"}.mdi-image-lock::before{content:"\F1AB0"}.mdi-image-lock-outline::before{content:"\F1AB1"}.mdi-image-marker::before{content:"\F177B"}.mdi-image-marker-outline::before{content:"\F177C"}.mdi-image-minus::before{content:"\F1419"}.mdi-image-minus-outline::before{content:"\F1B47"}.mdi-image-move::before{content:"\F09F8"}.mdi-image-multiple::before{content:"\F02F9"}.mdi-image-multiple-outline::before{content:"\F02EF"}.mdi-image-off::before{content:"\F082B"}.mdi-image-off-outline::before{content:"\F11D1"}.mdi-image-outline::before{content:"\F0976"}.mdi-image-plus::before{content:"\F087C"}.mdi-image-plus-outline::before{content:"\F1B46"}.mdi-image-refresh::before{content:"\F19FE"}.mdi-image-refresh-outline::before{content:"\F19FF"}.mdi-image-remove::before{content:"\F1418"}.mdi-image-remove-outline::before{content:"\F1B48"}.mdi-image-search::before{content:"\F0977"}.mdi-image-search-outline::before{content:"\F0978"}.mdi-image-size-select-actual::before{content:"\F0C8D"}.mdi-image-size-select-large::before{content:"\F0C8E"}.mdi-image-size-select-small::before{content:"\F0C8F"}.mdi-image-sync::before{content:"\F1A00"}.mdi-image-sync-outline::before{content:"\F1A01"}.mdi-image-text::before{content:"\F160D"}.mdi-import::before{content:"\F02FA"}.mdi-inbox::before{content:"\F0687"}.mdi-inbox-arrow-down::before{content:"\F02FB"}.mdi-inbox-arrow-down-outline::before{content:"\F1270"}.mdi-inbox-arrow-up::before{content:"\F03D1"}.mdi-inbox-arrow-up-outline::before{content:"\F1271"}.mdi-inbox-full::before{content:"\F1272"}.mdi-inbox-full-outline::before{content:"\F1273"}.mdi-inbox-multiple::before{content:"\F08B0"}.mdi-inbox-multiple-outline::before{content:"\F0BA8"}.mdi-inbox-outline::before{content:"\F1274"}.mdi-inbox-remove::before{content:"\F159F"}.mdi-inbox-remove-outline::before{content:"\F15A0"}.mdi-incognito::before{content:"\F05F9"}.mdi-incognito-circle::before{content:"\F1421"}.mdi-incognito-circle-off::before{content:"\F1422"}.mdi-incognito-off::before{content:"\F0075"}.mdi-induction::before{content:"\F184C"}.mdi-infinity::before{content:"\F06E4"}.mdi-information::before{content:"\F02FC"}.mdi-information-box::before{content:"\F1C65"}.mdi-information-box-outline::before{content:"\F1C66"}.mdi-information-off::before{content:"\F178C"}.mdi-information-off-outline::before{content:"\F178D"}.mdi-information-outline::before{content:"\F02FD"}.mdi-information-slab-box::before{content:"\F1C67"}.mdi-information-slab-box-outline::before{content:"\F1C68"}.mdi-information-slab-circle::before{content:"\F1C69"}.mdi-information-slab-circle-outline::before{content:"\F1C6A"}.mdi-information-slab-symbol::before{content:"\F1C6B"}.mdi-information-symbol::before{content:"\F1C6C"}.mdi-information-variant::before{content:"\F064E"}.mdi-information-variant-box::before{content:"\F1C6D"}.mdi-information-variant-box-outline::before{content:"\F1C6E"}.mdi-information-variant-circle::before{content:"\F1C6F"}.mdi-information-variant-circle-outline::before{content:"\F1C70"}.mdi-instagram::before{content:"\F02FE"}.mdi-instrument-triangle::before{content:"\F104E"}.mdi-integrated-circuit-chip::before{content:"\F1913"}.mdi-invert-colors::before{content:"\F0301"}.mdi-invert-colors-off::before{content:"\F0E4A"}.mdi-invoice::before{content:"\F1CD2"}.mdi-invoice-arrow-left::before{content:"\F1CD3"}.mdi-invoice-arrow-left-outline::before{content:"\F1CD4"}.mdi-invoice-arrow-right::before{content:"\F1CD5"}.mdi-invoice-arrow-right-outline::before{content:"\F1CD6"}.mdi-invoice-check::before{content:"\F1CD7"}.mdi-invoice-check-outline::before{content:"\F1CD8"}.mdi-invoice-clock::before{content:"\F1CD9"}.mdi-invoice-clock-outline::before{content:"\F1CDA"}.mdi-invoice-edit::before{content:"\F1CDB"}.mdi-invoice-edit-outline::before{content:"\F1CDC"}.mdi-invoice-export-outline::before{content:"\F1CDD"}.mdi-invoice-fast::before{content:"\F1CDE"}.mdi-invoice-fast-outline::before{content:"\F1CDF"}.mdi-invoice-import::before{content:"\F1CE0"}.mdi-invoice-import-outline::before{content:"\F1CE1"}.mdi-invoice-list::before{content:"\F1CE2"}.mdi-invoice-list-outline::before{content:"\F1CE3"}.mdi-invoice-minus::before{content:"\F1CE4"}.mdi-invoice-minus-outline::before{content:"\F1CE5"}.mdi-invoice-multiple::before{content:"\F1CE6"}.mdi-invoice-multiple-outline::before{content:"\F1CE7"}.mdi-invoice-outline::before{content:"\F1CE8"}.mdi-invoice-plus::before{content:"\F1CE9"}.mdi-invoice-plus-outline::before{content:"\F1CEA"}.mdi-invoice-remove::before{content:"\F1CEB"}.mdi-invoice-remove-outline::before{content:"\F1CEC"}.mdi-invoice-send::before{content:"\F1CED"}.mdi-invoice-send-outline::before{content:"\F1CEE"}.mdi-invoice-text::before{content:"\F1CEF"}.mdi-invoice-text-arrow-left::before{content:"\F1CF0"}.mdi-invoice-text-arrow-left-outline::before{content:"\F1CF1"}.mdi-invoice-text-arrow-right::before{content:"\F1CF2"}.mdi-invoice-text-arrow-right-outline::before{content:"\F1CF3"}.mdi-invoice-text-check::before{content:"\F1CF4"}.mdi-invoice-text-check-outline::before{content:"\F1CF5"}.mdi-invoice-text-clock::before{content:"\F1CF6"}.mdi-invoice-text-clock-outline::before{content:"\F1CF7"}.mdi-invoice-text-edit::before{content:"\F1CF8"}.mdi-invoice-text-edit-outline::before{content:"\F1CF9"}.mdi-invoice-text-fast::before{content:"\F1CFA"}.mdi-invoice-text-fast-outline::before{content:"\F1CFB"}.mdi-invoice-text-minus::before{content:"\F1CFC"}.mdi-invoice-text-minus-outline::before{content:"\F1CFD"}.mdi-invoice-text-multiple::before{content:"\F1CFE"}.mdi-invoice-text-multiple-outline::before{content:"\F1CFF"}.mdi-invoice-text-outline::before{content:"\F1D00"}.mdi-invoice-text-plus::before{content:"\F1D01"}.mdi-invoice-text-plus-outline::before{content:"\F1D02"}.mdi-invoice-text-remove::before{content:"\F1D03"}.mdi-invoice-text-remove-outline::before{content:"\F1D04"}.mdi-invoice-text-send::before{content:"\F1D05"}.mdi-invoice-text-send-outline::before{content:"\F1D06"}.mdi-iobroker::before{content:"\F12E8"}.mdi-ip::before{content:"\F0A5F"}.mdi-ip-network::before{content:"\F0A60"}.mdi-ip-network-outline::before{content:"\F0C90"}.mdi-ip-outline::before{content:"\F1982"}.mdi-ipod::before{content:"\F0C91"}.mdi-iron::before{content:"\F1824"}.mdi-iron-board::before{content:"\F1838"}.mdi-iron-outline::before{content:"\F1825"}.mdi-island::before{content:"\F104F"}.mdi-island-variant::before{content:"\F1CC6"}.mdi-iv-bag::before{content:"\F10B9"}.mdi-jabber::before{content:"\F0DD5"}.mdi-jeepney::before{content:"\F0302"}.mdi-jellyfish::before{content:"\F0F01"}.mdi-jellyfish-outline::before{content:"\F0F02"}.mdi-jira::before{content:"\F0303"}.mdi-jquery::before{content:"\F087D"}.mdi-jsfiddle::before{content:"\F0304"}.mdi-jump-rope::before{content:"\F12FF"}.mdi-kabaddi::before{content:"\F0D87"}.mdi-kangaroo::before{content:"\F1558"}.mdi-karate::before{content:"\F082C"}.mdi-kayaking::before{content:"\F08AF"}.mdi-keg::before{content:"\F0305"}.mdi-kettle::before{content:"\F05FA"}.mdi-kettle-alert::before{content:"\F1317"}.mdi-kettle-alert-outline::before{content:"\F1318"}.mdi-kettle-off::before{content:"\F131B"}.mdi-kettle-off-outline::before{content:"\F131C"}.mdi-kettle-outline::before{content:"\F0F56"}.mdi-kettle-pour-over::before{content:"\F173C"}.mdi-kettle-steam::before{content:"\F1319"}.mdi-kettle-steam-outline::before{content:"\F131A"}.mdi-kettlebell::before{content:"\F1300"}.mdi-key::before{content:"\F0306"}.mdi-key-alert::before{content:"\F1983"}.mdi-key-alert-outline::before{content:"\F1984"}.mdi-key-arrow-right::before{content:"\F1312"}.mdi-key-chain::before{content:"\F1574"}.mdi-key-chain-variant::before{content:"\F1575"}.mdi-key-change::before{content:"\F0307"}.mdi-key-link::before{content:"\F119F"}.mdi-key-minus::before{content:"\F0308"}.mdi-key-outline::before{content:"\F0DD6"}.mdi-key-plus::before{content:"\F0309"}.mdi-key-remove::before{content:"\F030A"}.mdi-key-star::before{content:"\F119E"}.mdi-key-variant::before{content:"\F030B"}.mdi-key-wireless::before{content:"\F0FC2"}.mdi-keyboard::before{content:"\F030C"}.mdi-keyboard-backspace::before{content:"\F030D"}.mdi-keyboard-caps::before{content:"\F030E"}.mdi-keyboard-close::before{content:"\F030F"}.mdi-keyboard-close-outline::before{content:"\F1C00"}.mdi-keyboard-esc::before{content:"\F12B7"}.mdi-keyboard-f1::before{content:"\F12AB"}.mdi-keyboard-f10::before{content:"\F12B4"}.mdi-keyboard-f11::before{content:"\F12B5"}.mdi-keyboard-f12::before{content:"\F12B6"}.mdi-keyboard-f2::before{content:"\F12AC"}.mdi-keyboard-f3::before{content:"\F12AD"}.mdi-keyboard-f4::before{content:"\F12AE"}.mdi-keyboard-f5::before{content:"\F12AF"}.mdi-keyboard-f6::before{content:"\F12B0"}.mdi-keyboard-f7::before{content:"\F12B1"}.mdi-keyboard-f8::before{content:"\F12B2"}.mdi-keyboard-f9::before{content:"\F12B3"}.mdi-keyboard-off::before{content:"\F0310"}.mdi-keyboard-off-outline::before{content:"\F0E4B"}.mdi-keyboard-outline::before{content:"\F097B"}.mdi-keyboard-return::before{content:"\F0311"}.mdi-keyboard-settings::before{content:"\F09F9"}.mdi-keyboard-settings-outline::before{content:"\F09FA"}.mdi-keyboard-space::before{content:"\F1050"}.mdi-keyboard-tab::before{content:"\F0312"}.mdi-keyboard-tab-reverse::before{content:"\F0325"}.mdi-keyboard-variant::before{content:"\F0313"}.mdi-khanda::before{content:"\F10FD"}.mdi-kickstarter::before{content:"\F0745"}.mdi-kite::before{content:"\F1985"}.mdi-kite-outline::before{content:"\F1986"}.mdi-kitesurfing::before{content:"\F1744"}.mdi-klingon::before{content:"\F135B"}.mdi-knife::before{content:"\F09FB"}.mdi-knife-military::before{content:"\F09FC"}.mdi-knob::before{content:"\F1B96"}.mdi-koala::before{content:"\F173F"}.mdi-kodi::before{content:"\F0314"}.mdi-kubernetes::before{content:"\F10FE"}.mdi-label::before{content:"\F0315"}.mdi-label-multiple::before{content:"\F1375"}.mdi-label-multiple-outline::before{content:"\F1376"}.mdi-label-off::before{content:"\F0ACB"}.mdi-label-off-outline::before{content:"\F0ACC"}.mdi-label-outline::before{content:"\F0316"}.mdi-label-percent::before{content:"\F12EA"}.mdi-label-percent-outline::before{content:"\F12EB"}.mdi-label-variant::before{content:"\F0ACD"}.mdi-label-variant-outline::before{content:"\F0ACE"}.mdi-ladder::before{content:"\F15A2"}.mdi-ladybug::before{content:"\F082D"}.mdi-lambda::before{content:"\F0627"}.mdi-lamp::before{content:"\F06B5"}.mdi-lamp-outline::before{content:"\F17D0"}.mdi-lamps::before{content:"\F1576"}.mdi-lamps-outline::before{content:"\F17D1"}.mdi-lan::before{content:"\F0317"}.mdi-lan-check::before{content:"\F12AA"}.mdi-lan-connect::before{content:"\F0318"}.mdi-lan-disconnect::before{content:"\F0319"}.mdi-lan-pending::before{content:"\F031A"}.mdi-land-fields::before{content:"\F1AB2"}.mdi-land-plots::before{content:"\F1AB3"}.mdi-land-plots-circle::before{content:"\F1AB4"}.mdi-land-plots-circle-variant::before{content:"\F1AB5"}.mdi-land-plots-marker::before{content:"\F1C5D"}.mdi-land-rows-horizontal::before{content:"\F1AB6"}.mdi-land-rows-vertical::before{content:"\F1AB7"}.mdi-landslide::before{content:"\F1A48"}.mdi-landslide-outline::before{content:"\F1A49"}.mdi-language-c::before{content:"\F0671"}.mdi-language-cpp::before{content:"\F0672"}.mdi-language-csharp::before{content:"\F031B"}.mdi-language-css3::before{content:"\F031C"}.mdi-language-fortran::before{content:"\F121A"}.mdi-language-go::before{content:"\F07D3"}.mdi-language-haskell::before{content:"\F0C92"}.mdi-language-html5::before{content:"\F031D"}.mdi-language-java::before{content:"\F0B37"}.mdi-language-javascript::before{content:"\F031E"}.mdi-language-kotlin::before{content:"\F1219"}.mdi-language-lua::before{content:"\F08B1"}.mdi-language-markdown::before{content:"\F0354"}.mdi-language-markdown-outline::before{content:"\F0F5B"}.mdi-language-php::before{content:"\F031F"}.mdi-language-python::before{content:"\F0320"}.mdi-language-r::before{content:"\F07D4"}.mdi-language-ruby::before{content:"\F0D2D"}.mdi-language-ruby-on-rails::before{content:"\F0ACF"}.mdi-language-rust::before{content:"\F1617"}.mdi-language-swift::before{content:"\F06E5"}.mdi-language-typescript::before{content:"\F06E6"}.mdi-language-xaml::before{content:"\F0673"}.mdi-laptop::before{content:"\F0322"}.mdi-laptop-account::before{content:"\F1A4A"}.mdi-laptop-off::before{content:"\F06E7"}.mdi-laravel::before{content:"\F0AD0"}.mdi-laser-pointer::before{content:"\F1484"}.mdi-lasso::before{content:"\F0F03"}.mdi-lastpass::before{content:"\F0446"}.mdi-latitude::before{content:"\F0F57"}.mdi-launch::before{content:"\F0327"}.mdi-lava-lamp::before{content:"\F07D5"}.mdi-layers::before{content:"\F0328"}.mdi-layers-edit::before{content:"\F1892"}.mdi-layers-minus::before{content:"\F0E4C"}.mdi-layers-off::before{content:"\F0329"}.mdi-layers-off-outline::before{content:"\F09FD"}.mdi-layers-outline::before{content:"\F09FE"}.mdi-layers-plus::before{content:"\F0E4D"}.mdi-layers-remove::before{content:"\F0E4E"}.mdi-layers-search::before{content:"\F1206"}.mdi-layers-search-outline::before{content:"\F1207"}.mdi-layers-triple::before{content:"\F0F58"}.mdi-layers-triple-outline::before{content:"\F0F59"}.mdi-lead-pencil::before{content:"\F064F"}.mdi-leaf::before{content:"\F032A"}.mdi-leaf-circle::before{content:"\F1905"}.mdi-leaf-circle-outline::before{content:"\F1906"}.mdi-leaf-maple::before{content:"\F0C93"}.mdi-leaf-maple-off::before{content:"\F12DA"}.mdi-leaf-off::before{content:"\F12D9"}.mdi-leak::before{content:"\F0DD7"}.mdi-leak-off::before{content:"\F0DD8"}.mdi-lectern::before{content:"\F1AF0"}.mdi-led-off::before{content:"\F032B"}.mdi-led-on::before{content:"\F032C"}.mdi-led-outline::before{content:"\F032D"}.mdi-led-strip::before{content:"\F07D6"}.mdi-led-strip-variant::before{content:"\F1051"}.mdi-led-strip-variant-off::before{content:"\F1A4B"}.mdi-led-variant-off::before{content:"\F032E"}.mdi-led-variant-on::before{content:"\F032F"}.mdi-led-variant-outline::before{content:"\F0330"}.mdi-leek::before{content:"\F117D"}.mdi-less-than::before{content:"\F097C"}.mdi-less-than-or-equal::before{content:"\F097D"}.mdi-library::before{content:"\F0331"}.mdi-library-outline::before{content:"\F1A22"}.mdi-library-shelves::before{content:"\F0BA9"}.mdi-license::before{content:"\F0FC3"}.mdi-lifebuoy::before{content:"\F087E"}.mdi-light-flood-down::before{content:"\F1987"}.mdi-light-flood-up::before{content:"\F1988"}.mdi-light-recessed::before{content:"\F179B"}.mdi-light-switch::before{content:"\F097E"}.mdi-light-switch-off::before{content:"\F1A24"}.mdi-lightbulb::before{content:"\F0335"}.mdi-lightbulb-alert::before{content:"\F19E1"}.mdi-lightbulb-alert-outline::before{content:"\F19E2"}.mdi-lightbulb-auto::before{content:"\F1800"}.mdi-lightbulb-auto-outline::before{content:"\F1801"}.mdi-lightbulb-cfl::before{content:"\F1208"}.mdi-lightbulb-cfl-off::before{content:"\F1209"}.mdi-lightbulb-cfl-spiral::before{content:"\F1275"}.mdi-lightbulb-cfl-spiral-off::before{content:"\F12C3"}.mdi-lightbulb-fluorescent-tube::before{content:"\F1804"}.mdi-lightbulb-fluorescent-tube-outline::before{content:"\F1805"}.mdi-lightbulb-group::before{content:"\F1253"}.mdi-lightbulb-group-off::before{content:"\F12CD"}.mdi-lightbulb-group-off-outline::before{content:"\F12CE"}.mdi-lightbulb-group-outline::before{content:"\F1254"}.mdi-lightbulb-multiple::before{content:"\F1255"}.mdi-lightbulb-multiple-off::before{content:"\F12CF"}.mdi-lightbulb-multiple-off-outline::before{content:"\F12D0"}.mdi-lightbulb-multiple-outline::before{content:"\F1256"}.mdi-lightbulb-night::before{content:"\F1A4C"}.mdi-lightbulb-night-outline::before{content:"\F1A4D"}.mdi-lightbulb-off::before{content:"\F0E4F"}.mdi-lightbulb-off-outline::before{content:"\F0E50"}.mdi-lightbulb-on::before{content:"\F06E8"}.mdi-lightbulb-on-10::before{content:"\F1A4E"}.mdi-lightbulb-on-20::before{content:"\F1A4F"}.mdi-lightbulb-on-30::before{content:"\F1A50"}.mdi-lightbulb-on-40::before{content:"\F1A51"}.mdi-lightbulb-on-50::before{content:"\F1A52"}.mdi-lightbulb-on-60::before{content:"\F1A53"}.mdi-lightbulb-on-70::before{content:"\F1A54"}.mdi-lightbulb-on-80::before{content:"\F1A55"}.mdi-lightbulb-on-90::before{content:"\F1A56"}.mdi-lightbulb-on-outline::before{content:"\F06E9"}.mdi-lightbulb-outline::before{content:"\F0336"}.mdi-lightbulb-question::before{content:"\F19E3"}.mdi-lightbulb-question-outline::before{content:"\F19E4"}.mdi-lightbulb-spot::before{content:"\F17F4"}.mdi-lightbulb-spot-off::before{content:"\F17F5"}.mdi-lightbulb-variant::before{content:"\F1802"}.mdi-lightbulb-variant-outline::before{content:"\F1803"}.mdi-lighthouse::before{content:"\F09FF"}.mdi-lighthouse-on::before{content:"\F0A00"}.mdi-lightning-bolt::before{content:"\F140B"}.mdi-lightning-bolt-circle::before{content:"\F0820"}.mdi-lightning-bolt-outline::before{content:"\F140C"}.mdi-line-scan::before{content:"\F0624"}.mdi-lingerie::before{content:"\F1476"}.mdi-link::before{content:"\F0337"}.mdi-link-box::before{content:"\F0D1A"}.mdi-link-box-outline::before{content:"\F0D1B"}.mdi-link-box-variant::before{content:"\F0D1C"}.mdi-link-box-variant-outline::before{content:"\F0D1D"}.mdi-link-circle::before{content:"\F1CAC"}.mdi-link-circle-outline::before{content:"\F1CAD"}.mdi-link-edit::before{content:"\F1CAE"}.mdi-link-lock::before{content:"\F10BA"}.mdi-link-off::before{content:"\F0338"}.mdi-link-plus::before{content:"\F0C94"}.mdi-link-variant::before{content:"\F0339"}.mdi-link-variant-minus::before{content:"\F10FF"}.mdi-link-variant-off::before{content:"\F033A"}.mdi-link-variant-plus::before{content:"\F1100"}.mdi-link-variant-remove::before{content:"\F1101"}.mdi-linkedin::before{content:"\F033B"}.mdi-linux::before{content:"\F033D"}.mdi-linux-mint::before{content:"\F08ED"}.mdi-lipstick::before{content:"\F13B5"}.mdi-liquid-spot::before{content:"\F1826"}.mdi-liquor::before{content:"\F191E"}.mdi-list-box::before{content:"\F1B7B"}.mdi-list-box-outline::before{content:"\F1B7C"}.mdi-list-status::before{content:"\F15AB"}.mdi-litecoin::before{content:"\F0A61"}.mdi-loading::before{content:"\F0772"}.mdi-location-enter::before{content:"\F0FC4"}.mdi-location-exit::before{content:"\F0FC5"}.mdi-lock::before{content:"\F033E"}.mdi-lock-alert::before{content:"\F08EE"}.mdi-lock-alert-outline::before{content:"\F15D1"}.mdi-lock-check::before{content:"\F139A"}.mdi-lock-check-outline::before{content:"\F16A8"}.mdi-lock-clock::before{content:"\F097F"}.mdi-lock-minus::before{content:"\F16A9"}.mdi-lock-minus-outline::before{content:"\F16AA"}.mdi-lock-off::before{content:"\F1671"}.mdi-lock-off-outline::before{content:"\F1672"}.mdi-lock-open::before{content:"\F033F"}.mdi-lock-open-alert::before{content:"\F139B"}.mdi-lock-open-alert-outline::before{content:"\F15D2"}.mdi-lock-open-check::before{content:"\F139C"}.mdi-lock-open-check-outline::before{content:"\F16AB"}.mdi-lock-open-minus::before{content:"\F16AC"}.mdi-lock-open-minus-outline::before{content:"\F16AD"}.mdi-lock-open-outline::before{content:"\F0340"}.mdi-lock-open-plus::before{content:"\F16AE"}.mdi-lock-open-plus-outline::before{content:"\F16AF"}.mdi-lock-open-remove::before{content:"\F16B0"}.mdi-lock-open-remove-outline::before{content:"\F16B1"}.mdi-lock-open-variant::before{content:"\F0FC6"}.mdi-lock-open-variant-outline::before{content:"\F0FC7"}.mdi-lock-outline::before{content:"\F0341"}.mdi-lock-pattern::before{content:"\F06EA"}.mdi-lock-percent::before{content:"\F1C12"}.mdi-lock-percent-open::before{content:"\F1C13"}.mdi-lock-percent-open-outline::before{content:"\F1C14"}.mdi-lock-percent-open-variant::before{content:"\F1C15"}.mdi-lock-percent-open-variant-outline::before{content:"\F1C16"}.mdi-lock-percent-outline::before{content:"\F1C17"}.mdi-lock-plus::before{content:"\F05FB"}.mdi-lock-plus-outline::before{content:"\F16B2"}.mdi-lock-question::before{content:"\F08EF"}.mdi-lock-remove::before{content:"\F16B3"}.mdi-lock-remove-outline::before{content:"\F16B4"}.mdi-lock-reset::before{content:"\F0773"}.mdi-lock-smart::before{content:"\F08B2"}.mdi-locker::before{content:"\F07D7"}.mdi-locker-multiple::before{content:"\F07D8"}.mdi-login::before{content:"\F0342"}.mdi-login-variant::before{content:"\F05FC"}.mdi-logout::before{content:"\F0343"}.mdi-logout-variant::before{content:"\F05FD"}.mdi-longitude::before{content:"\F0F5A"}.mdi-looks::before{content:"\F0344"}.mdi-lotion::before{content:"\F1582"}.mdi-lotion-outline::before{content:"\F1583"}.mdi-lotion-plus::before{content:"\F1584"}.mdi-lotion-plus-outline::before{content:"\F1585"}.mdi-loupe::before{content:"\F0345"}.mdi-lumx::before{content:"\F0346"}.mdi-lungs::before{content:"\F1084"}.mdi-mace::before{content:"\F1843"}.mdi-magazine-pistol::before{content:"\F0324"}.mdi-magazine-rifle::before{content:"\F0323"}.mdi-magic-staff::before{content:"\F1844"}.mdi-magnet::before{content:"\F0347"}.mdi-magnet-on::before{content:"\F0348"}.mdi-magnify::before{content:"\F0349"}.mdi-magnify-close::before{content:"\F0980"}.mdi-magnify-expand::before{content:"\F1874"}.mdi-magnify-minus::before{content:"\F034A"}.mdi-magnify-minus-cursor::before{content:"\F0A62"}.mdi-magnify-minus-outline::before{content:"\F06EC"}.mdi-magnify-plus::before{content:"\F034B"}.mdi-magnify-plus-cursor::before{content:"\F0A63"}.mdi-magnify-plus-outline::before{content:"\F06ED"}.mdi-magnify-remove-cursor::before{content:"\F120C"}.mdi-magnify-remove-outline::before{content:"\F120D"}.mdi-magnify-scan::before{content:"\F1276"}.mdi-mail::before{content:"\F0EBB"}.mdi-mailbox::before{content:"\F06EE"}.mdi-mailbox-open::before{content:"\F0D88"}.mdi-mailbox-open-outline::before{content:"\F0D89"}.mdi-mailbox-open-up::before{content:"\F0D8A"}.mdi-mailbox-open-up-outline::before{content:"\F0D8B"}.mdi-mailbox-outline::before{content:"\F0D8C"}.mdi-mailbox-up::before{content:"\F0D8D"}.mdi-mailbox-up-outline::before{content:"\F0D8E"}.mdi-manjaro::before{content:"\F160A"}.mdi-map::before{content:"\F034D"}.mdi-map-check::before{content:"\F0EBC"}.mdi-map-check-outline::before{content:"\F0EBD"}.mdi-map-clock::before{content:"\F0D1E"}.mdi-map-clock-outline::before{content:"\F0D1F"}.mdi-map-legend::before{content:"\F0A01"}.mdi-map-marker::before{content:"\F034E"}.mdi-map-marker-account::before{content:"\F18E3"}.mdi-map-marker-account-outline::before{content:"\F18E4"}.mdi-map-marker-alert::before{content:"\F0F05"}.mdi-map-marker-alert-outline::before{content:"\F0F06"}.mdi-map-marker-check::before{content:"\F0C95"}.mdi-map-marker-check-outline::before{content:"\F12FB"}.mdi-map-marker-circle::before{content:"\F034F"}.mdi-map-marker-distance::before{content:"\F08F0"}.mdi-map-marker-down::before{content:"\F1102"}.mdi-map-marker-left::before{content:"\F12DB"}.mdi-map-marker-left-outline::before{content:"\F12DD"}.mdi-map-marker-minus::before{content:"\F0650"}.mdi-map-marker-minus-outline::before{content:"\F12F9"}.mdi-map-marker-multiple::before{content:"\F0350"}.mdi-map-marker-multiple-outline::before{content:"\F1277"}.mdi-map-marker-off::before{content:"\F0351"}.mdi-map-marker-off-outline::before{content:"\F12FD"}.mdi-map-marker-outline::before{content:"\F07D9"}.mdi-map-marker-path::before{content:"\F0D20"}.mdi-map-marker-plus::before{content:"\F0651"}.mdi-map-marker-plus-outline::before{content:"\F12F8"}.mdi-map-marker-question::before{content:"\F0F07"}.mdi-map-marker-question-outline::before{content:"\F0F08"}.mdi-map-marker-radius::before{content:"\F0352"}.mdi-map-marker-radius-outline::before{content:"\F12FC"}.mdi-map-marker-remove::before{content:"\F0F09"}.mdi-map-marker-remove-outline::before{content:"\F12FA"}.mdi-map-marker-remove-variant::before{content:"\F0F0A"}.mdi-map-marker-right::before{content:"\F12DC"}.mdi-map-marker-right-outline::before{content:"\F12DE"}.mdi-map-marker-star::before{content:"\F1608"}.mdi-map-marker-star-outline::before{content:"\F1609"}.mdi-map-marker-up::before{content:"\F1103"}.mdi-map-minus::before{content:"\F0981"}.mdi-map-outline::before{content:"\F0982"}.mdi-map-plus::before{content:"\F0983"}.mdi-map-search::before{content:"\F0984"}.mdi-map-search-outline::before{content:"\F0985"}.mdi-mapbox::before{content:"\F0BAA"}.mdi-margin::before{content:"\F0353"}.mdi-marker::before{content:"\F0652"}.mdi-marker-cancel::before{content:"\F0DD9"}.mdi-marker-check::before{content:"\F0355"}.mdi-mastodon::before{content:"\F0AD1"}.mdi-material-design::before{content:"\F0986"}.mdi-material-ui::before{content:"\F0357"}.mdi-math-compass::before{content:"\F0358"}.mdi-math-cos::before{content:"\F0C96"}.mdi-math-integral::before{content:"\F0FC8"}.mdi-math-integral-box::before{content:"\F0FC9"}.mdi-math-log::before{content:"\F1085"}.mdi-math-norm::before{content:"\F0FCA"}.mdi-math-norm-box::before{content:"\F0FCB"}.mdi-math-sin::before{content:"\F0C97"}.mdi-math-tan::before{content:"\F0C98"}.mdi-matrix::before{content:"\F0628"}.mdi-medal::before{content:"\F0987"}.mdi-medal-outline::before{content:"\F1326"}.mdi-medical-bag::before{content:"\F06EF"}.mdi-medical-cotton-swab::before{content:"\F1AB8"}.mdi-medication::before{content:"\F1B14"}.mdi-medication-outline::before{content:"\F1B15"}.mdi-meditation::before{content:"\F117B"}.mdi-memory::before{content:"\F035B"}.mdi-memory-arrow-down::before{content:"\F1CA6"}.mdi-menorah::before{content:"\F17D4"}.mdi-menorah-fire::before{content:"\F17D5"}.mdi-menu::before{content:"\F035C"}.mdi-menu-close::before{content:"\F1C90"}.mdi-menu-down::before{content:"\F035D"}.mdi-menu-down-outline::before{content:"\F06B6"}.mdi-menu-left::before{content:"\F035E"}.mdi-menu-left-outline::before{content:"\F0A02"}.mdi-menu-open::before{content:"\F0BAB"}.mdi-menu-right::before{content:"\F035F"}.mdi-menu-right-outline::before{content:"\F0A03"}.mdi-menu-swap::before{content:"\F0A64"}.mdi-menu-swap-outline::before{content:"\F0A65"}.mdi-menu-up::before{content:"\F0360"}.mdi-menu-up-outline::before{content:"\F06B7"}.mdi-merge::before{content:"\F0F5C"}.mdi-message::before{content:"\F0361"}.mdi-message-alert::before{content:"\F0362"}.mdi-message-alert-outline::before{content:"\F0A04"}.mdi-message-arrow-left::before{content:"\F12F2"}.mdi-message-arrow-left-outline::before{content:"\F12F3"}.mdi-message-arrow-right::before{content:"\F12F4"}.mdi-message-arrow-right-outline::before{content:"\F12F5"}.mdi-message-badge::before{content:"\F1941"}.mdi-message-badge-outline::before{content:"\F1942"}.mdi-message-bookmark::before{content:"\F15AC"}.mdi-message-bookmark-outline::before{content:"\F15AD"}.mdi-message-bulleted::before{content:"\F06A2"}.mdi-message-bulleted-off::before{content:"\F06A3"}.mdi-message-check::before{content:"\F1B8A"}.mdi-message-check-outline::before{content:"\F1B8B"}.mdi-message-cog::before{content:"\F06F1"}.mdi-message-cog-outline::before{content:"\F1172"}.mdi-message-draw::before{content:"\F0363"}.mdi-message-fast::before{content:"\F19CC"}.mdi-message-fast-outline::before{content:"\F19CD"}.mdi-message-flash::before{content:"\F15A9"}.mdi-message-flash-outline::before{content:"\F15AA"}.mdi-message-image::before{content:"\F0364"}.mdi-message-image-outline::before{content:"\F116C"}.mdi-message-lock::before{content:"\F0FCC"}.mdi-message-lock-outline::before{content:"\F116D"}.mdi-message-minus::before{content:"\F116E"}.mdi-message-minus-outline::before{content:"\F116F"}.mdi-message-off::before{content:"\F164D"}.mdi-message-off-outline::before{content:"\F164E"}.mdi-message-outline::before{content:"\F0365"}.mdi-message-plus::before{content:"\F0653"}.mdi-message-plus-outline::before{content:"\F10BB"}.mdi-message-processing::before{content:"\F0366"}.mdi-message-processing-outline::before{content:"\F1170"}.mdi-message-question::before{content:"\F173A"}.mdi-message-question-outline::before{content:"\F173B"}.mdi-message-reply::before{content:"\F0367"}.mdi-message-reply-outline::before{content:"\F173D"}.mdi-message-reply-text::before{content:"\F0368"}.mdi-message-reply-text-outline::before{content:"\F173E"}.mdi-message-settings::before{content:"\F06F0"}.mdi-message-settings-outline::before{content:"\F1171"}.mdi-message-star::before{content:"\F069A"}.mdi-message-star-outline::before{content:"\F1250"}.mdi-message-text::before{content:"\F0369"}.mdi-message-text-clock::before{content:"\F1173"}.mdi-message-text-clock-outline::before{content:"\F1174"}.mdi-message-text-fast::before{content:"\F19CE"}.mdi-message-text-fast-outline::before{content:"\F19CF"}.mdi-message-text-lock::before{content:"\F0FCD"}.mdi-message-text-lock-outline::before{content:"\F1175"}.mdi-message-text-outline::before{content:"\F036A"}.mdi-message-video::before{content:"\F036B"}.mdi-meteor::before{content:"\F0629"}.mdi-meter-electric::before{content:"\F1A57"}.mdi-meter-electric-outline::before{content:"\F1A58"}.mdi-meter-gas::before{content:"\F1A59"}.mdi-meter-gas-outline::before{content:"\F1A5A"}.mdi-metronome::before{content:"\F07DA"}.mdi-metronome-tick::before{content:"\F07DB"}.mdi-micro-sd::before{content:"\F07DC"}.mdi-microphone::before{content:"\F036C"}.mdi-microphone-message::before{content:"\F050A"}.mdi-microphone-message-off::before{content:"\F050B"}.mdi-microphone-minus::before{content:"\F08B3"}.mdi-microphone-off::before{content:"\F036D"}.mdi-microphone-outline::before{content:"\F036E"}.mdi-microphone-plus::before{content:"\F08B4"}.mdi-microphone-question::before{content:"\F1989"}.mdi-microphone-question-outline::before{content:"\F198A"}.mdi-microphone-settings::before{content:"\F036F"}.mdi-microphone-variant::before{content:"\F0370"}.mdi-microphone-variant-off::before{content:"\F0371"}.mdi-microscope::before{content:"\F0654"}.mdi-microsoft::before{content:"\F0372"}.mdi-microsoft-access::before{content:"\F138E"}.mdi-microsoft-azure::before{content:"\F0805"}.mdi-microsoft-azure-devops::before{content:"\F0FD5"}.mdi-microsoft-bing::before{content:"\F00A4"}.mdi-microsoft-dynamics-365::before{content:"\F0988"}.mdi-microsoft-edge::before{content:"\F01E9"}.mdi-microsoft-excel::before{content:"\F138F"}.mdi-microsoft-internet-explorer::before{content:"\F0300"}.mdi-microsoft-office::before{content:"\F03C6"}.mdi-microsoft-onedrive::before{content:"\F03CA"}.mdi-microsoft-onenote::before{content:"\F0747"}.mdi-microsoft-outlook::before{content:"\F0D22"}.mdi-microsoft-powerpoint::before{content:"\F1390"}.mdi-microsoft-sharepoint::before{content:"\F1391"}.mdi-microsoft-teams::before{content:"\F02BB"}.mdi-microsoft-visual-studio::before{content:"\F0610"}.mdi-microsoft-visual-studio-code::before{content:"\F0A1E"}.mdi-microsoft-windows::before{content:"\F05B3"}.mdi-microsoft-windows-classic::before{content:"\F0A21"}.mdi-microsoft-word::before{content:"\F1392"}.mdi-microsoft-xbox::before{content:"\F05B9"}.mdi-microsoft-xbox-controller::before{content:"\F05BA"}.mdi-microsoft-xbox-controller-battery-alert::before{content:"\F074B"}.mdi-microsoft-xbox-controller-battery-charging::before{content:"\F0A22"}.mdi-microsoft-xbox-controller-battery-empty::before{content:"\F074C"}.mdi-microsoft-xbox-controller-battery-full::before{content:"\F074D"}.mdi-microsoft-xbox-controller-battery-low::before{content:"\F074E"}.mdi-microsoft-xbox-controller-battery-medium::before{content:"\F074F"}.mdi-microsoft-xbox-controller-battery-unknown::before{content:"\F0750"}.mdi-microsoft-xbox-controller-menu::before{content:"\F0E6F"}.mdi-microsoft-xbox-controller-off::before{content:"\F05BB"}.mdi-microsoft-xbox-controller-view::before{content:"\F0E70"}.mdi-microwave::before{content:"\F0C99"}.mdi-microwave-off::before{content:"\F1423"}.mdi-middleware::before{content:"\F0F5D"}.mdi-middleware-outline::before{content:"\F0F5E"}.mdi-midi::before{content:"\F08F1"}.mdi-midi-port::before{content:"\F08F2"}.mdi-mine::before{content:"\F0DDA"}.mdi-minecraft::before{content:"\F0373"}.mdi-mini-sd::before{content:"\F0A05"}.mdi-minidisc::before{content:"\F0A06"}.mdi-minus::before{content:"\F0374"}.mdi-minus-box::before{content:"\F0375"}.mdi-minus-box-multiple::before{content:"\F1141"}.mdi-minus-box-multiple-outline::before{content:"\F1142"}.mdi-minus-box-outline::before{content:"\F06F2"}.mdi-minus-circle::before{content:"\F0376"}.mdi-minus-circle-multiple::before{content:"\F035A"}.mdi-minus-circle-multiple-outline::before{content:"\F0AD3"}.mdi-minus-circle-off::before{content:"\F1459"}.mdi-minus-circle-off-outline::before{content:"\F145A"}.mdi-minus-circle-outline::before{content:"\F0377"}.mdi-minus-network::before{content:"\F0378"}.mdi-minus-network-outline::before{content:"\F0C9A"}.mdi-minus-thick::before{content:"\F1639"}.mdi-mirror::before{content:"\F11FD"}.mdi-mirror-rectangle::before{content:"\F179F"}.mdi-mirror-variant::before{content:"\F17A0"}.mdi-mixed-martial-arts::before{content:"\F0D8F"}.mdi-mixed-reality::before{content:"\F087F"}.mdi-molecule::before{content:"\F0BAC"}.mdi-molecule-co::before{content:"\F12FE"}.mdi-molecule-co2::before{content:"\F07E4"}.mdi-monitor::before{content:"\F0379"}.mdi-monitor-account::before{content:"\F1A5B"}.mdi-monitor-arrow-down::before{content:"\F19D0"}.mdi-monitor-arrow-down-variant::before{content:"\F19D1"}.mdi-monitor-cellphone::before{content:"\F0989"}.mdi-monitor-cellphone-star::before{content:"\F098A"}.mdi-monitor-dashboard::before{content:"\F0A07"}.mdi-monitor-edit::before{content:"\F12C6"}.mdi-monitor-eye::before{content:"\F13B4"}.mdi-monitor-lock::before{content:"\F0DDB"}.mdi-monitor-multiple::before{content:"\F037A"}.mdi-monitor-off::before{content:"\F0D90"}.mdi-monitor-screenshot::before{content:"\F0E51"}.mdi-monitor-share::before{content:"\F1483"}.mdi-monitor-shimmer::before{content:"\F1104"}.mdi-monitor-small::before{content:"\F1876"}.mdi-monitor-speaker::before{content:"\F0F5F"}.mdi-monitor-speaker-off::before{content:"\F0F60"}.mdi-monitor-star::before{content:"\F0DDC"}.mdi-monitor-vertical::before{content:"\F1C33"}.mdi-moon-first-quarter::before{content:"\F0F61"}.mdi-moon-full::before{content:"\F0F62"}.mdi-moon-last-quarter::before{content:"\F0F63"}.mdi-moon-new::before{content:"\F0F64"}.mdi-moon-waning-crescent::before{content:"\F0F65"}.mdi-moon-waning-gibbous::before{content:"\F0F66"}.mdi-moon-waxing-crescent::before{content:"\F0F67"}.mdi-moon-waxing-gibbous::before{content:"\F0F68"}.mdi-moped::before{content:"\F1086"}.mdi-moped-electric::before{content:"\F15B7"}.mdi-moped-electric-outline::before{content:"\F15B8"}.mdi-moped-outline::before{content:"\F15B9"}.mdi-more::before{content:"\F037B"}.mdi-mortar-pestle::before{content:"\F1748"}.mdi-mortar-pestle-plus::before{content:"\F03F1"}.mdi-mosque::before{content:"\F0D45"}.mdi-mosque-outline::before{content:"\F1827"}.mdi-mother-heart::before{content:"\F1314"}.mdi-mother-nurse::before{content:"\F0D21"}.mdi-motion::before{content:"\F15B2"}.mdi-motion-outline::before{content:"\F15B3"}.mdi-motion-pause::before{content:"\F1590"}.mdi-motion-pause-outline::before{content:"\F1592"}.mdi-motion-play::before{content:"\F158F"}.mdi-motion-play-outline::before{content:"\F1591"}.mdi-motion-sensor::before{content:"\F0D91"}.mdi-motion-sensor-off::before{content:"\F1435"}.mdi-motorbike::before{content:"\F037C"}.mdi-motorbike-electric::before{content:"\F15BA"}.mdi-motorbike-off::before{content:"\F1B16"}.mdi-mouse::before{content:"\F037D"}.mdi-mouse-bluetooth::before{content:"\F098B"}.mdi-mouse-left-click::before{content:"\F1D07"}.mdi-mouse-left-click-outline::before{content:"\F1D08"}.mdi-mouse-move-down::before{content:"\F1550"}.mdi-mouse-move-up::before{content:"\F1551"}.mdi-mouse-move-vertical::before{content:"\F1552"}.mdi-mouse-off::before{content:"\F037E"}.mdi-mouse-outline::before{content:"\F1D09"}.mdi-mouse-right-click::before{content:"\F1D0A"}.mdi-mouse-right-click-outline::before{content:"\F1D0B"}.mdi-mouse-scroll-wheel::before{content:"\F1D0C"}.mdi-mouse-variant::before{content:"\F037F"}.mdi-mouse-variant-off::before{content:"\F0380"}.mdi-move-resize::before{content:"\F0655"}.mdi-move-resize-variant::before{content:"\F0656"}.mdi-movie::before{content:"\F0381"}.mdi-movie-check::before{content:"\F16F3"}.mdi-movie-check-outline::before{content:"\F16F4"}.mdi-movie-cog::before{content:"\F16F5"}.mdi-movie-cog-outline::before{content:"\F16F6"}.mdi-movie-edit::before{content:"\F1122"}.mdi-movie-edit-outline::before{content:"\F1123"}.mdi-movie-filter::before{content:"\F1124"}.mdi-movie-filter-outline::before{content:"\F1125"}.mdi-movie-minus::before{content:"\F16F7"}.mdi-movie-minus-outline::before{content:"\F16F8"}.mdi-movie-off::before{content:"\F16F9"}.mdi-movie-off-outline::before{content:"\F16FA"}.mdi-movie-open::before{content:"\F0FCE"}.mdi-movie-open-check::before{content:"\F16FB"}.mdi-movie-open-check-outline::before{content:"\F16FC"}.mdi-movie-open-cog::before{content:"\F16FD"}.mdi-movie-open-cog-outline::before{content:"\F16FE"}.mdi-movie-open-edit::before{content:"\F16FF"}.mdi-movie-open-edit-outline::before{content:"\F1700"}.mdi-movie-open-minus::before{content:"\F1701"}.mdi-movie-open-minus-outline::before{content:"\F1702"}.mdi-movie-open-off::before{content:"\F1703"}.mdi-movie-open-off-outline::before{content:"\F1704"}.mdi-movie-open-outline::before{content:"\F0FCF"}.mdi-movie-open-play::before{content:"\F1705"}.mdi-movie-open-play-outline::before{content:"\F1706"}.mdi-movie-open-plus::before{content:"\F1707"}.mdi-movie-open-plus-outline::before{content:"\F1708"}.mdi-movie-open-remove::before{content:"\F1709"}.mdi-movie-open-remove-outline::before{content:"\F170A"}.mdi-movie-open-settings::before{content:"\F170B"}.mdi-movie-open-settings-outline::before{content:"\F170C"}.mdi-movie-open-star::before{content:"\F170D"}.mdi-movie-open-star-outline::before{content:"\F170E"}.mdi-movie-outline::before{content:"\F0DDD"}.mdi-movie-play::before{content:"\F170F"}.mdi-movie-play-outline::before{content:"\F1710"}.mdi-movie-plus::before{content:"\F1711"}.mdi-movie-plus-outline::before{content:"\F1712"}.mdi-movie-remove::before{content:"\F1713"}.mdi-movie-remove-outline::before{content:"\F1714"}.mdi-movie-roll::before{content:"\F07DE"}.mdi-movie-search::before{content:"\F11D2"}.mdi-movie-search-outline::before{content:"\F11D3"}.mdi-movie-settings::before{content:"\F1715"}.mdi-movie-settings-outline::before{content:"\F1716"}.mdi-movie-star::before{content:"\F1717"}.mdi-movie-star-outline::before{content:"\F1718"}.mdi-mower::before{content:"\F166F"}.mdi-mower-bag::before{content:"\F1670"}.mdi-mower-bag-on::before{content:"\F1B60"}.mdi-mower-on::before{content:"\F1B5F"}.mdi-muffin::before{content:"\F098C"}.mdi-multicast::before{content:"\F1893"}.mdi-multimedia::before{content:"\F1B97"}.mdi-multiplication::before{content:"\F0382"}.mdi-multiplication-box::before{content:"\F0383"}.mdi-mushroom::before{content:"\F07DF"}.mdi-mushroom-off::before{content:"\F13FA"}.mdi-mushroom-off-outline::before{content:"\F13FB"}.mdi-mushroom-outline::before{content:"\F07E0"}.mdi-music::before{content:"\F075A"}.mdi-music-accidental-double-flat::before{content:"\F0F69"}.mdi-music-accidental-double-sharp::before{content:"\F0F6A"}.mdi-music-accidental-flat::before{content:"\F0F6B"}.mdi-music-accidental-natural::before{content:"\F0F6C"}.mdi-music-accidental-sharp::before{content:"\F0F6D"}.mdi-music-box::before{content:"\F0384"}.mdi-music-box-multiple::before{content:"\F0333"}.mdi-music-box-multiple-outline::before{content:"\F0F04"}.mdi-music-box-outline::before{content:"\F0385"}.mdi-music-circle::before{content:"\F0386"}.mdi-music-circle-outline::before{content:"\F0AD4"}.mdi-music-clef-alto::before{content:"\F0F6E"}.mdi-music-clef-bass::before{content:"\F0F6F"}.mdi-music-clef-treble::before{content:"\F0F70"}.mdi-music-note::before{content:"\F0387"}.mdi-music-note-bluetooth::before{content:"\F05FE"}.mdi-music-note-bluetooth-off::before{content:"\F05FF"}.mdi-music-note-eighth::before{content:"\F0388"}.mdi-music-note-eighth-dotted::before{content:"\F0F71"}.mdi-music-note-half::before{content:"\F0389"}.mdi-music-note-half-dotted::before{content:"\F0F72"}.mdi-music-note-minus::before{content:"\F1B89"}.mdi-music-note-off::before{content:"\F038A"}.mdi-music-note-off-outline::before{content:"\F0F73"}.mdi-music-note-outline::before{content:"\F0F74"}.mdi-music-note-plus::before{content:"\F0DDE"}.mdi-music-note-quarter::before{content:"\F038B"}.mdi-music-note-quarter-dotted::before{content:"\F0F75"}.mdi-music-note-sixteenth::before{content:"\F038C"}.mdi-music-note-sixteenth-dotted::before{content:"\F0F76"}.mdi-music-note-whole::before{content:"\F038D"}.mdi-music-note-whole-dotted::before{content:"\F0F77"}.mdi-music-off::before{content:"\F075B"}.mdi-music-rest-eighth::before{content:"\F0F78"}.mdi-music-rest-half::before{content:"\F0F79"}.mdi-music-rest-quarter::before{content:"\F0F7A"}.mdi-music-rest-sixteenth::before{content:"\F0F7B"}.mdi-music-rest-whole::before{content:"\F0F7C"}.mdi-mustache::before{content:"\F15DE"}.mdi-nail::before{content:"\F0DDF"}.mdi-nas::before{content:"\F08F3"}.mdi-nativescript::before{content:"\F0880"}.mdi-nature::before{content:"\F038E"}.mdi-nature-outline::before{content:"\F1C71"}.mdi-nature-people::before{content:"\F038F"}.mdi-nature-people-outline::before{content:"\F1C72"}.mdi-navigation::before{content:"\F0390"}.mdi-navigation-outline::before{content:"\F1607"}.mdi-navigation-variant::before{content:"\F18F0"}.mdi-navigation-variant-outline::before{content:"\F18F1"}.mdi-near-me::before{content:"\F05CD"}.mdi-necklace::before{content:"\F0F0B"}.mdi-needle::before{content:"\F0391"}.mdi-needle-off::before{content:"\F19D2"}.mdi-netflix::before{content:"\F0746"}.mdi-network::before{content:"\F06F3"}.mdi-network-off::before{content:"\F0C9B"}.mdi-network-off-outline::before{content:"\F0C9C"}.mdi-network-outline::before{content:"\F0C9D"}.mdi-network-pos::before{content:"\F1ACB"}.mdi-network-strength-1::before{content:"\F08F4"}.mdi-network-strength-1-alert::before{content:"\F08F5"}.mdi-network-strength-2::before{content:"\F08F6"}.mdi-network-strength-2-alert::before{content:"\F08F7"}.mdi-network-strength-3::before{content:"\F08F8"}.mdi-network-strength-3-alert::before{content:"\F08F9"}.mdi-network-strength-4::before{content:"\F08FA"}.mdi-network-strength-4-alert::before{content:"\F08FB"}.mdi-network-strength-4-cog::before{content:"\F191A"}.mdi-network-strength-off::before{content:"\F08FC"}.mdi-network-strength-off-outline::before{content:"\F08FD"}.mdi-network-strength-outline::before{content:"\F08FE"}.mdi-new-box::before{content:"\F0394"}.mdi-newspaper::before{content:"\F0395"}.mdi-newspaper-check::before{content:"\F1943"}.mdi-newspaper-minus::before{content:"\F0F0C"}.mdi-newspaper-plus::before{content:"\F0F0D"}.mdi-newspaper-remove::before{content:"\F1944"}.mdi-newspaper-variant::before{content:"\F1001"}.mdi-newspaper-variant-multiple::before{content:"\F1002"}.mdi-newspaper-variant-multiple-outline::before{content:"\F1003"}.mdi-newspaper-variant-outline::before{content:"\F1004"}.mdi-nfc::before{content:"\F0396"}.mdi-nfc-search-variant::before{content:"\F0E53"}.mdi-nfc-tap::before{content:"\F0397"}.mdi-nfc-variant::before{content:"\F0398"}.mdi-nfc-variant-off::before{content:"\F0E54"}.mdi-ninja::before{content:"\F0774"}.mdi-nintendo-game-boy::before{content:"\F1393"}.mdi-nintendo-switch::before{content:"\F07E1"}.mdi-nintendo-wii::before{content:"\F05AB"}.mdi-nintendo-wiiu::before{content:"\F072D"}.mdi-nix::before{content:"\F1105"}.mdi-nodejs::before{content:"\F0399"}.mdi-noodles::before{content:"\F117E"}.mdi-not-equal::before{content:"\F098D"}.mdi-not-equal-variant::before{content:"\F098E"}.mdi-note::before{content:"\F039A"}.mdi-note-alert::before{content:"\F177D"}.mdi-note-alert-outline::before{content:"\F177E"}.mdi-note-check::before{content:"\F177F"}.mdi-note-check-outline::before{content:"\F1780"}.mdi-note-edit::before{content:"\F1781"}.mdi-note-edit-outline::before{content:"\F1782"}.mdi-note-minus::before{content:"\F164F"}.mdi-note-minus-outline::before{content:"\F1650"}.mdi-note-multiple::before{content:"\F06B8"}.mdi-note-multiple-outline::before{content:"\F06B9"}.mdi-note-off::before{content:"\F1783"}.mdi-note-off-outline::before{content:"\F1784"}.mdi-note-outline::before{content:"\F039B"}.mdi-note-plus::before{content:"\F039C"}.mdi-note-plus-outline::before{content:"\F039D"}.mdi-note-remove::before{content:"\F1651"}.mdi-note-remove-outline::before{content:"\F1652"}.mdi-note-search::before{content:"\F1653"}.mdi-note-search-outline::before{content:"\F1654"}.mdi-note-text::before{content:"\F039E"}.mdi-note-text-outline::before{content:"\F11D7"}.mdi-notebook::before{content:"\F082E"}.mdi-notebook-check::before{content:"\F14F5"}.mdi-notebook-check-outline::before{content:"\F14F6"}.mdi-notebook-edit::before{content:"\F14E7"}.mdi-notebook-edit-outline::before{content:"\F14E9"}.mdi-notebook-heart::before{content:"\F1A0B"}.mdi-notebook-heart-outline::before{content:"\F1A0C"}.mdi-notebook-minus::before{content:"\F1610"}.mdi-notebook-minus-outline::before{content:"\F1611"}.mdi-notebook-multiple::before{content:"\F0E55"}.mdi-notebook-outline::before{content:"\F0EBF"}.mdi-notebook-plus::before{content:"\F1612"}.mdi-notebook-plus-outline::before{content:"\F1613"}.mdi-notebook-remove::before{content:"\F1614"}.mdi-notebook-remove-outline::before{content:"\F1615"}.mdi-notification-clear-all::before{content:"\F039F"}.mdi-npm::before{content:"\F06F7"}.mdi-nuke::before{content:"\F06A4"}.mdi-null::before{content:"\F07E2"}.mdi-numeric::before{content:"\F03A0"}.mdi-numeric-0::before{content:"\F0B39"}.mdi-numeric-0-box::before{content:"\F03A1"}.mdi-numeric-0-box-multiple::before{content:"\F0F0E"}.mdi-numeric-0-box-multiple-outline::before{content:"\F03A2"}.mdi-numeric-0-box-outline::before{content:"\F03A3"}.mdi-numeric-0-circle::before{content:"\F0C9E"}.mdi-numeric-0-circle-outline::before{content:"\F0C9F"}.mdi-numeric-1::before{content:"\F0B3A"}.mdi-numeric-1-box::before{content:"\F03A4"}.mdi-numeric-1-box-multiple::before{content:"\F0F0F"}.mdi-numeric-1-box-multiple-outline::before{content:"\F03A5"}.mdi-numeric-1-box-outline::before{content:"\F03A6"}.mdi-numeric-1-circle::before{content:"\F0CA0"}.mdi-numeric-1-circle-outline::before{content:"\F0CA1"}.mdi-numeric-10::before{content:"\F0FE9"}.mdi-numeric-10-box::before{content:"\F0F7D"}.mdi-numeric-10-box-multiple::before{content:"\F0FEA"}.mdi-numeric-10-box-multiple-outline::before{content:"\F0FEB"}.mdi-numeric-10-box-outline::before{content:"\F0F7E"}.mdi-numeric-10-circle::before{content:"\F0FEC"}.mdi-numeric-10-circle-outline::before{content:"\F0FED"}.mdi-numeric-2::before{content:"\F0B3B"}.mdi-numeric-2-box::before{content:"\F03A7"}.mdi-numeric-2-box-multiple::before{content:"\F0F10"}.mdi-numeric-2-box-multiple-outline::before{content:"\F03A8"}.mdi-numeric-2-box-outline::before{content:"\F03A9"}.mdi-numeric-2-circle::before{content:"\F0CA2"}.mdi-numeric-2-circle-outline::before{content:"\F0CA3"}.mdi-numeric-3::before{content:"\F0B3C"}.mdi-numeric-3-box::before{content:"\F03AA"}.mdi-numeric-3-box-multiple::before{content:"\F0F11"}.mdi-numeric-3-box-multiple-outline::before{content:"\F03AB"}.mdi-numeric-3-box-outline::before{content:"\F03AC"}.mdi-numeric-3-circle::before{content:"\F0CA4"}.mdi-numeric-3-circle-outline::before{content:"\F0CA5"}.mdi-numeric-4::before{content:"\F0B3D"}.mdi-numeric-4-box::before{content:"\F03AD"}.mdi-numeric-4-box-multiple::before{content:"\F0F12"}.mdi-numeric-4-box-multiple-outline::before{content:"\F03B2"}.mdi-numeric-4-box-outline::before{content:"\F03AE"}.mdi-numeric-4-circle::before{content:"\F0CA6"}.mdi-numeric-4-circle-outline::before{content:"\F0CA7"}.mdi-numeric-5::before{content:"\F0B3E"}.mdi-numeric-5-box::before{content:"\F03B1"}.mdi-numeric-5-box-multiple::before{content:"\F0F13"}.mdi-numeric-5-box-multiple-outline::before{content:"\F03AF"}.mdi-numeric-5-box-outline::before{content:"\F03B0"}.mdi-numeric-5-circle::before{content:"\F0CA8"}.mdi-numeric-5-circle-outline::before{content:"\F0CA9"}.mdi-numeric-6::before{content:"\F0B3F"}.mdi-numeric-6-box::before{content:"\F03B3"}.mdi-numeric-6-box-multiple::before{content:"\F0F14"}.mdi-numeric-6-box-multiple-outline::before{content:"\F03B4"}.mdi-numeric-6-box-outline::before{content:"\F03B5"}.mdi-numeric-6-circle::before{content:"\F0CAA"}.mdi-numeric-6-circle-outline::before{content:"\F0CAB"}.mdi-numeric-7::before{content:"\F0B40"}.mdi-numeric-7-box::before{content:"\F03B6"}.mdi-numeric-7-box-multiple::before{content:"\F0F15"}.mdi-numeric-7-box-multiple-outline::before{content:"\F03B7"}.mdi-numeric-7-box-outline::before{content:"\F03B8"}.mdi-numeric-7-circle::before{content:"\F0CAC"}.mdi-numeric-7-circle-outline::before{content:"\F0CAD"}.mdi-numeric-8::before{content:"\F0B41"}.mdi-numeric-8-box::before{content:"\F03B9"}.mdi-numeric-8-box-multiple::before{content:"\F0F16"}.mdi-numeric-8-box-multiple-outline::before{content:"\F03BA"}.mdi-numeric-8-box-outline::before{content:"\F03BB"}.mdi-numeric-8-circle::before{content:"\F0CAE"}.mdi-numeric-8-circle-outline::before{content:"\F0CAF"}.mdi-numeric-9::before{content:"\F0B42"}.mdi-numeric-9-box::before{content:"\F03BC"}.mdi-numeric-9-box-multiple::before{content:"\F0F17"}.mdi-numeric-9-box-multiple-outline::before{content:"\F03BD"}.mdi-numeric-9-box-outline::before{content:"\F03BE"}.mdi-numeric-9-circle::before{content:"\F0CB0"}.mdi-numeric-9-circle-outline::before{content:"\F0CB1"}.mdi-numeric-9-plus::before{content:"\F0FEE"}.mdi-numeric-9-plus-box::before{content:"\F03BF"}.mdi-numeric-9-plus-box-multiple::before{content:"\F0F18"}.mdi-numeric-9-plus-box-multiple-outline::before{content:"\F03C0"}.mdi-numeric-9-plus-box-outline::before{content:"\F03C1"}.mdi-numeric-9-plus-circle::before{content:"\F0CB2"}.mdi-numeric-9-plus-circle-outline::before{content:"\F0CB3"}.mdi-numeric-negative-1::before{content:"\F1052"}.mdi-numeric-off::before{content:"\F19D3"}.mdi-numeric-positive-1::before{content:"\F15CB"}.mdi-nut::before{content:"\F06F8"}.mdi-nutrition::before{content:"\F03C2"}.mdi-nuxt::before{content:"\F1106"}.mdi-oar::before{content:"\F067C"}.mdi-ocarina::before{content:"\F0DE0"}.mdi-oci::before{content:"\F12E9"}.mdi-ocr::before{content:"\F113A"}.mdi-octagon::before{content:"\F03C3"}.mdi-octagon-outline::before{content:"\F03C4"}.mdi-octagram::before{content:"\F06F9"}.mdi-octagram-edit::before{content:"\F1C34"}.mdi-octagram-edit-outline::before{content:"\F1C35"}.mdi-octagram-minus::before{content:"\F1C36"}.mdi-octagram-minus-outline::before{content:"\F1C37"}.mdi-octagram-outline::before{content:"\F0775"}.mdi-octagram-plus::before{content:"\F1C38"}.mdi-octagram-plus-outline::before{content:"\F1C39"}.mdi-octahedron::before{content:"\F1950"}.mdi-octahedron-off::before{content:"\F1951"}.mdi-odnoklassniki::before{content:"\F03C5"}.mdi-offer::before{content:"\F121B"}.mdi-office-building::before{content:"\F0991"}.mdi-office-building-cog::before{content:"\F1949"}.mdi-office-building-cog-outline::before{content:"\F194A"}.mdi-office-building-marker::before{content:"\F1520"}.mdi-office-building-marker-outline::before{content:"\F1521"}.mdi-office-building-minus::before{content:"\F1BAA"}.mdi-office-building-minus-outline::before{content:"\F1BAB"}.mdi-office-building-outline::before{content:"\F151F"}.mdi-office-building-plus::before{content:"\F1BA8"}.mdi-office-building-plus-outline::before{content:"\F1BA9"}.mdi-office-building-remove::before{content:"\F1BAC"}.mdi-office-building-remove-outline::before{content:"\F1BAD"}.mdi-oil::before{content:"\F03C7"}.mdi-oil-lamp::before{content:"\F0F19"}.mdi-oil-level::before{content:"\F1053"}.mdi-oil-temperature::before{content:"\F0FF8"}.mdi-om::before{content:"\F0973"}.mdi-omega::before{content:"\F03C9"}.mdi-one-up::before{content:"\F0BAD"}.mdi-onepassword::before{content:"\F0881"}.mdi-opacity::before{content:"\F05CC"}.mdi-open-in-app::before{content:"\F03CB"}.mdi-open-in-new::before{content:"\F03CC"}.mdi-open-source-initiative::before{content:"\F0BAE"}.mdi-openid::before{content:"\F03CD"}.mdi-opera::before{content:"\F03CE"}.mdi-orbit::before{content:"\F0018"}.mdi-orbit-variant::before{content:"\F15DB"}.mdi-order-alphabetical-ascending::before{content:"\F020D"}.mdi-order-alphabetical-descending::before{content:"\F0D07"}.mdi-order-bool-ascending::before{content:"\F02BE"}.mdi-order-bool-ascending-variant::before{content:"\F098F"}.mdi-order-bool-descending::before{content:"\F1384"}.mdi-order-bool-descending-variant::before{content:"\F0990"}.mdi-order-numeric-ascending::before{content:"\F0545"}.mdi-order-numeric-descending::before{content:"\F0546"}.mdi-origin::before{content:"\F0B43"}.mdi-ornament::before{content:"\F03CF"}.mdi-ornament-variant::before{content:"\F03D0"}.mdi-outdoor-lamp::before{content:"\F1054"}.mdi-overscan::before{content:"\F1005"}.mdi-owl::before{content:"\F03D2"}.mdi-pac-man::before{content:"\F0BAF"}.mdi-package::before{content:"\F03D3"}.mdi-package-check::before{content:"\F1B51"}.mdi-package-down::before{content:"\F03D4"}.mdi-package-up::before{content:"\F03D5"}.mdi-package-variant::before{content:"\F03D6"}.mdi-package-variant-closed::before{content:"\F03D7"}.mdi-package-variant-closed-check::before{content:"\F1B52"}.mdi-package-variant-closed-minus::before{content:"\F19D4"}.mdi-package-variant-closed-plus::before{content:"\F19D5"}.mdi-package-variant-closed-remove::before{content:"\F19D6"}.mdi-package-variant-minus::before{content:"\F19D7"}.mdi-package-variant-plus::before{content:"\F19D8"}.mdi-package-variant-remove::before{content:"\F19D9"}.mdi-page-first::before{content:"\F0600"}.mdi-page-last::before{content:"\F0601"}.mdi-page-layout-body::before{content:"\F06FA"}.mdi-page-layout-footer::before{content:"\F06FB"}.mdi-page-layout-header::before{content:"\F06FC"}.mdi-page-layout-header-footer::before{content:"\F0F7F"}.mdi-page-layout-sidebar-left::before{content:"\F06FD"}.mdi-page-layout-sidebar-right::before{content:"\F06FE"}.mdi-page-next::before{content:"\F0BB0"}.mdi-page-next-outline::before{content:"\F0BB1"}.mdi-page-previous::before{content:"\F0BB2"}.mdi-page-previous-outline::before{content:"\F0BB3"}.mdi-pail::before{content:"\F1417"}.mdi-pail-minus::before{content:"\F1437"}.mdi-pail-minus-outline::before{content:"\F143C"}.mdi-pail-off::before{content:"\F1439"}.mdi-pail-off-outline::before{content:"\F143E"}.mdi-pail-outline::before{content:"\F143A"}.mdi-pail-plus::before{content:"\F1436"}.mdi-pail-plus-outline::before{content:"\F143B"}.mdi-pail-remove::before{content:"\F1438"}.mdi-pail-remove-outline::before{content:"\F143D"}.mdi-palette::before{content:"\F03D8"}.mdi-palette-advanced::before{content:"\F03D9"}.mdi-palette-outline::before{content:"\F0E0C"}.mdi-palette-swatch::before{content:"\F08B5"}.mdi-palette-swatch-outline::before{content:"\F135C"}.mdi-palette-swatch-variant::before{content:"\F195A"}.mdi-palm-tree::before{content:"\F1055"}.mdi-pan::before{content:"\F0BB4"}.mdi-pan-bottom-left::before{content:"\F0BB5"}.mdi-pan-bottom-right::before{content:"\F0BB6"}.mdi-pan-down::before{content:"\F0BB7"}.mdi-pan-horizontal::before{content:"\F0BB8"}.mdi-pan-left::before{content:"\F0BB9"}.mdi-pan-right::before{content:"\F0BBA"}.mdi-pan-top-left::before{content:"\F0BBB"}.mdi-pan-top-right::before{content:"\F0BBC"}.mdi-pan-up::before{content:"\F0BBD"}.mdi-pan-vertical::before{content:"\F0BBE"}.mdi-panda::before{content:"\F03DA"}.mdi-pandora::before{content:"\F03DB"}.mdi-panorama::before{content:"\F03DC"}.mdi-panorama-fisheye::before{content:"\F03DD"}.mdi-panorama-horizontal::before{content:"\F1928"}.mdi-panorama-horizontal-outline::before{content:"\F03DE"}.mdi-panorama-outline::before{content:"\F198C"}.mdi-panorama-sphere::before{content:"\F198D"}.mdi-panorama-sphere-outline::before{content:"\F198E"}.mdi-panorama-variant::before{content:"\F198F"}.mdi-panorama-variant-outline::before{content:"\F1990"}.mdi-panorama-vertical::before{content:"\F1929"}.mdi-panorama-vertical-outline::before{content:"\F03DF"}.mdi-panorama-wide-angle::before{content:"\F195F"}.mdi-panorama-wide-angle-outline::before{content:"\F03E0"}.mdi-paper-cut-vertical::before{content:"\F03E1"}.mdi-paper-roll::before{content:"\F1157"}.mdi-paper-roll-outline::before{content:"\F1158"}.mdi-paperclip::before{content:"\F03E2"}.mdi-paperclip-check::before{content:"\F1AC6"}.mdi-paperclip-lock::before{content:"\F19DA"}.mdi-paperclip-minus::before{content:"\F1AC7"}.mdi-paperclip-off::before{content:"\F1AC8"}.mdi-paperclip-plus::before{content:"\F1AC9"}.mdi-paperclip-remove::before{content:"\F1ACA"}.mdi-parachute::before{content:"\F0CB4"}.mdi-parachute-outline::before{content:"\F0CB5"}.mdi-paragliding::before{content:"\F1745"}.mdi-parking::before{content:"\F03E3"}.mdi-party-popper::before{content:"\F1056"}.mdi-passport::before{content:"\F07E3"}.mdi-passport-alert::before{content:"\F1CB8"}.mdi-passport-biometric::before{content:"\F0DE1"}.mdi-passport-cancel::before{content:"\F1CB9"}.mdi-passport-check::before{content:"\F1CBA"}.mdi-passport-minus::before{content:"\F1CBB"}.mdi-passport-plus::before{content:"\F1CBC"}.mdi-passport-remove::before{content:"\F1CBD"}.mdi-pasta::before{content:"\F1160"}.mdi-patio-heater::before{content:"\F0F80"}.mdi-patreon::before{content:"\F0882"}.mdi-pause::before{content:"\F03E4"}.mdi-pause-box::before{content:"\F00BC"}.mdi-pause-box-outline::before{content:"\F1B7A"}.mdi-pause-circle::before{content:"\F03E5"}.mdi-pause-circle-outline::before{content:"\F03E6"}.mdi-pause-octagon::before{content:"\F03E7"}.mdi-pause-octagon-outline::before{content:"\F03E8"}.mdi-paw::before{content:"\F03E9"}.mdi-paw-off::before{content:"\F0657"}.mdi-paw-off-outline::before{content:"\F1676"}.mdi-paw-outline::before{content:"\F1675"}.mdi-peace::before{content:"\F0884"}.mdi-peanut::before{content:"\F0FFC"}.mdi-peanut-off::before{content:"\F0FFD"}.mdi-peanut-off-outline::before{content:"\F0FFF"}.mdi-peanut-outline::before{content:"\F0FFE"}.mdi-pen::before{content:"\F03EA"}.mdi-pen-lock::before{content:"\F0DE2"}.mdi-pen-minus::before{content:"\F0DE3"}.mdi-pen-off::before{content:"\F0DE4"}.mdi-pen-plus::before{content:"\F0DE5"}.mdi-pen-remove::before{content:"\F0DE6"}.mdi-pencil::before{content:"\F03EB"}.mdi-pencil-box::before{content:"\F03EC"}.mdi-pencil-box-multiple::before{content:"\F1144"}.mdi-pencil-box-multiple-outline::before{content:"\F1145"}.mdi-pencil-box-outline::before{content:"\F03ED"}.mdi-pencil-circle::before{content:"\F06FF"}.mdi-pencil-circle-outline::before{content:"\F0776"}.mdi-pencil-lock::before{content:"\F03EE"}.mdi-pencil-lock-outline::before{content:"\F0DE7"}.mdi-pencil-minus::before{content:"\F0DE8"}.mdi-pencil-minus-outline::before{content:"\F0DE9"}.mdi-pencil-off::before{content:"\F03EF"}.mdi-pencil-off-outline::before{content:"\F0DEA"}.mdi-pencil-outline::before{content:"\F0CB6"}.mdi-pencil-plus::before{content:"\F0DEB"}.mdi-pencil-plus-outline::before{content:"\F0DEC"}.mdi-pencil-remove::before{content:"\F0DED"}.mdi-pencil-remove-outline::before{content:"\F0DEE"}.mdi-pencil-ruler::before{content:"\F1353"}.mdi-pencil-ruler-outline::before{content:"\F1C11"}.mdi-penguin::before{content:"\F0EC0"}.mdi-pentagon::before{content:"\F0701"}.mdi-pentagon-outline::before{content:"\F0700"}.mdi-pentagram::before{content:"\F1667"}.mdi-percent::before{content:"\F03F0"}.mdi-percent-box::before{content:"\F1A02"}.mdi-percent-box-outline::before{content:"\F1A03"}.mdi-percent-circle::before{content:"\F1A04"}.mdi-percent-circle-outline::before{content:"\F1A05"}.mdi-percent-outline::before{content:"\F1278"}.mdi-periodic-table::before{content:"\F08B6"}.mdi-perspective-less::before{content:"\F0D23"}.mdi-perspective-more::before{content:"\F0D24"}.mdi-ph::before{content:"\F17C5"}.mdi-phone::before{content:"\F03F2"}.mdi-phone-alert::before{content:"\F0F1A"}.mdi-phone-alert-outline::before{content:"\F118E"}.mdi-phone-bluetooth::before{content:"\F03F3"}.mdi-phone-bluetooth-outline::before{content:"\F118F"}.mdi-phone-cancel::before{content:"\F10BC"}.mdi-phone-cancel-outline::before{content:"\F1190"}.mdi-phone-check::before{content:"\F11A9"}.mdi-phone-check-outline::before{content:"\F11AA"}.mdi-phone-classic::before{content:"\F0602"}.mdi-phone-classic-off::before{content:"\F1279"}.mdi-phone-clock::before{content:"\F19DB"}.mdi-phone-dial::before{content:"\F1559"}.mdi-phone-dial-outline::before{content:"\F155A"}.mdi-phone-forward::before{content:"\F03F4"}.mdi-phone-forward-outline::before{content:"\F1191"}.mdi-phone-hangup::before{content:"\F03F5"}.mdi-phone-hangup-outline::before{content:"\F1192"}.mdi-phone-in-talk::before{content:"\F03F6"}.mdi-phone-in-talk-outline::before{content:"\F1182"}.mdi-phone-incoming::before{content:"\F03F7"}.mdi-phone-incoming-outgoing::before{content:"\F1B3F"}.mdi-phone-incoming-outgoing-outline::before{content:"\F1B40"}.mdi-phone-incoming-outline::before{content:"\F1193"}.mdi-phone-lock::before{content:"\F03F8"}.mdi-phone-lock-outline::before{content:"\F1194"}.mdi-phone-log::before{content:"\F03F9"}.mdi-phone-log-outline::before{content:"\F1195"}.mdi-phone-message::before{content:"\F1196"}.mdi-phone-message-outline::before{content:"\F1197"}.mdi-phone-minus::before{content:"\F0658"}.mdi-phone-minus-outline::before{content:"\F1198"}.mdi-phone-missed::before{content:"\F03FA"}.mdi-phone-missed-outline::before{content:"\F11A5"}.mdi-phone-off::before{content:"\F0DEF"}.mdi-phone-off-outline::before{content:"\F11A6"}.mdi-phone-outgoing::before{content:"\F03FB"}.mdi-phone-outgoing-outline::before{content:"\F1199"}.mdi-phone-outline::before{content:"\F0DF0"}.mdi-phone-paused::before{content:"\F03FC"}.mdi-phone-paused-outline::before{content:"\F119A"}.mdi-phone-plus::before{content:"\F0659"}.mdi-phone-plus-outline::before{content:"\F119B"}.mdi-phone-refresh::before{content:"\F1993"}.mdi-phone-refresh-outline::before{content:"\F1994"}.mdi-phone-remove::before{content:"\F152F"}.mdi-phone-remove-outline::before{content:"\F1530"}.mdi-phone-return::before{content:"\F082F"}.mdi-phone-return-outline::before{content:"\F119C"}.mdi-phone-ring::before{content:"\F11AB"}.mdi-phone-ring-outline::before{content:"\F11AC"}.mdi-phone-rotate-landscape::before{content:"\F0885"}.mdi-phone-rotate-portrait::before{content:"\F0886"}.mdi-phone-settings::before{content:"\F03FD"}.mdi-phone-settings-outline::before{content:"\F119D"}.mdi-phone-sync::before{content:"\F1995"}.mdi-phone-sync-outline::before{content:"\F1996"}.mdi-phone-voip::before{content:"\F03FE"}.mdi-pi::before{content:"\F03FF"}.mdi-pi-box::before{content:"\F0400"}.mdi-pi-hole::before{content:"\F0DF1"}.mdi-piano::before{content:"\F067D"}.mdi-piano-off::before{content:"\F0698"}.mdi-pickaxe::before{content:"\F08B7"}.mdi-picture-in-picture-bottom-right::before{content:"\F0E57"}.mdi-picture-in-picture-bottom-right-outline::before{content:"\F0E58"}.mdi-picture-in-picture-top-right::before{content:"\F0E59"}.mdi-picture-in-picture-top-right-outline::before{content:"\F0E5A"}.mdi-pier::before{content:"\F0887"}.mdi-pier-crane::before{content:"\F0888"}.mdi-pig::before{content:"\F0401"}.mdi-pig-variant::before{content:"\F1006"}.mdi-pig-variant-outline::before{content:"\F1678"}.mdi-piggy-bank::before{content:"\F1007"}.mdi-piggy-bank-outline::before{content:"\F1679"}.mdi-pill::before{content:"\F0402"}.mdi-pill-multiple::before{content:"\F1B4C"}.mdi-pill-off::before{content:"\F1A5C"}.mdi-pillar::before{content:"\F0702"}.mdi-pin::before{content:"\F0403"}.mdi-pin-off::before{content:"\F0404"}.mdi-pin-off-outline::before{content:"\F0930"}.mdi-pin-outline::before{content:"\F0931"}.mdi-pine-tree::before{content:"\F0405"}.mdi-pine-tree-box::before{content:"\F0406"}.mdi-pine-tree-fire::before{content:"\F141A"}.mdi-pine-tree-variant::before{content:"\F1C73"}.mdi-pine-tree-variant-outline::before{content:"\F1C74"}.mdi-pinterest::before{content:"\F0407"}.mdi-pinwheel::before{content:"\F0AD5"}.mdi-pinwheel-outline::before{content:"\F0AD6"}.mdi-pipe::before{content:"\F07E5"}.mdi-pipe-disconnected::before{content:"\F07E6"}.mdi-pipe-leak::before{content:"\F0889"}.mdi-pipe-valve::before{content:"\F184D"}.mdi-pipe-wrench::before{content:"\F1354"}.mdi-pirate::before{content:"\F0A08"}.mdi-pistol::before{content:"\F0703"}.mdi-piston::before{content:"\F088A"}.mdi-pitchfork::before{content:"\F1553"}.mdi-pizza::before{content:"\F0409"}.mdi-plane-car::before{content:"\F1AFF"}.mdi-plane-train::before{content:"\F1B00"}.mdi-play::before{content:"\F040A"}.mdi-play-box::before{content:"\F127A"}.mdi-play-box-edit-outline::before{content:"\F1C3A"}.mdi-play-box-lock::before{content:"\F1A16"}.mdi-play-box-lock-open::before{content:"\F1A17"}.mdi-play-box-lock-open-outline::before{content:"\F1A18"}.mdi-play-box-lock-outline::before{content:"\F1A19"}.mdi-play-box-multiple::before{content:"\F0D19"}.mdi-play-box-multiple-outline::before{content:"\F13E6"}.mdi-play-box-outline::before{content:"\F040B"}.mdi-play-circle::before{content:"\F040C"}.mdi-play-circle-outline::before{content:"\F040D"}.mdi-play-network::before{content:"\F088B"}.mdi-play-network-outline::before{content:"\F0CB7"}.mdi-play-outline::before{content:"\F0F1B"}.mdi-play-pause::before{content:"\F040E"}.mdi-play-protected-content::before{content:"\F040F"}.mdi-play-speed::before{content:"\F08FF"}.mdi-playlist-check::before{content:"\F05C7"}.mdi-playlist-edit::before{content:"\F0900"}.mdi-playlist-minus::before{content:"\F0410"}.mdi-playlist-music::before{content:"\F0CB8"}.mdi-playlist-music-outline::before{content:"\F0CB9"}.mdi-playlist-play::before{content:"\F0411"}.mdi-playlist-plus::before{content:"\F0412"}.mdi-playlist-remove::before{content:"\F0413"}.mdi-playlist-star::before{content:"\F0DF2"}.mdi-plex::before{content:"\F06BA"}.mdi-pliers::before{content:"\F19A4"}.mdi-plus::before{content:"\F0415"}.mdi-plus-box::before{content:"\F0416"}.mdi-plus-box-multiple::before{content:"\F0334"}.mdi-plus-box-multiple-outline::before{content:"\F1143"}.mdi-plus-box-outline::before{content:"\F0704"}.mdi-plus-circle::before{content:"\F0417"}.mdi-plus-circle-multiple::before{content:"\F034C"}.mdi-plus-circle-multiple-outline::before{content:"\F0418"}.mdi-plus-circle-outline::before{content:"\F0419"}.mdi-plus-lock::before{content:"\F1A5D"}.mdi-plus-lock-open::before{content:"\F1A5E"}.mdi-plus-minus::before{content:"\F0992"}.mdi-plus-minus-box::before{content:"\F0993"}.mdi-plus-minus-variant::before{content:"\F14C9"}.mdi-plus-network::before{content:"\F041A"}.mdi-plus-network-outline::before{content:"\F0CBA"}.mdi-plus-outline::before{content:"\F0705"}.mdi-plus-thick::before{content:"\F11EC"}.mdi-pocket::before{content:"\F1CBE"}.mdi-podcast::before{content:"\F0994"}.mdi-podium::before{content:"\F0D25"}.mdi-podium-bronze::before{content:"\F0D26"}.mdi-podium-gold::before{content:"\F0D27"}.mdi-podium-silver::before{content:"\F0D28"}.mdi-point-of-sale::before{content:"\F0D92"}.mdi-pokeball::before{content:"\F041D"}.mdi-pokemon-go::before{content:"\F0A09"}.mdi-poker-chip::before{content:"\F0830"}.mdi-polaroid::before{content:"\F041E"}.mdi-police-badge::before{content:"\F1167"}.mdi-police-badge-outline::before{content:"\F1168"}.mdi-police-station::before{content:"\F1839"}.mdi-poll::before{content:"\F041F"}.mdi-polo::before{content:"\F14C3"}.mdi-polymer::before{content:"\F0421"}.mdi-pool::before{content:"\F0606"}.mdi-pool-thermometer::before{content:"\F1A5F"}.mdi-popcorn::before{content:"\F0422"}.mdi-post::before{content:"\F1008"}.mdi-post-lamp::before{content:"\F1A60"}.mdi-post-outline::before{content:"\F1009"}.mdi-postage-stamp::before{content:"\F0CBB"}.mdi-pot::before{content:"\F02E5"}.mdi-pot-mix::before{content:"\F065B"}.mdi-pot-mix-outline::before{content:"\F0677"}.mdi-pot-outline::before{content:"\F02FF"}.mdi-pot-steam::before{content:"\F065A"}.mdi-pot-steam-outline::before{content:"\F0326"}.mdi-pound::before{content:"\F0423"}.mdi-pound-box::before{content:"\F0424"}.mdi-pound-box-outline::before{content:"\F117F"}.mdi-power::before{content:"\F0425"}.mdi-power-cycle::before{content:"\F0901"}.mdi-power-off::before{content:"\F0902"}.mdi-power-on::before{content:"\F0903"}.mdi-power-plug::before{content:"\F06A5"}.mdi-power-plug-battery::before{content:"\F1C3B"}.mdi-power-plug-battery-outline::before{content:"\F1C3C"}.mdi-power-plug-off::before{content:"\F06A6"}.mdi-power-plug-off-outline::before{content:"\F1424"}.mdi-power-plug-outline::before{content:"\F1425"}.mdi-power-settings::before{content:"\F0426"}.mdi-power-sleep::before{content:"\F0904"}.mdi-power-socket::before{content:"\F0427"}.mdi-power-socket-au::before{content:"\F0905"}.mdi-power-socket-ch::before{content:"\F0FB3"}.mdi-power-socket-de::before{content:"\F1107"}.mdi-power-socket-eu::before{content:"\F07E7"}.mdi-power-socket-fr::before{content:"\F1108"}.mdi-power-socket-it::before{content:"\F14FF"}.mdi-power-socket-jp::before{content:"\F1109"}.mdi-power-socket-uk::before{content:"\F07E8"}.mdi-power-socket-us::before{content:"\F07E9"}.mdi-power-standby::before{content:"\F0906"}.mdi-powershell::before{content:"\F0A0A"}.mdi-prescription::before{content:"\F0706"}.mdi-presentation::before{content:"\F0428"}.mdi-presentation-play::before{content:"\F0429"}.mdi-pretzel::before{content:"\F1562"}.mdi-printer::before{content:"\F042A"}.mdi-printer-3d::before{content:"\F042B"}.mdi-printer-3d-nozzle::before{content:"\F0E5B"}.mdi-printer-3d-nozzle-alert::before{content:"\F11C0"}.mdi-printer-3d-nozzle-alert-outline::before{content:"\F11C1"}.mdi-printer-3d-nozzle-heat::before{content:"\F18B8"}.mdi-printer-3d-nozzle-heat-outline::before{content:"\F18B9"}.mdi-printer-3d-nozzle-off::before{content:"\F1B19"}.mdi-printer-3d-nozzle-off-outline::before{content:"\F1B1A"}.mdi-printer-3d-nozzle-outline::before{content:"\F0E5C"}.mdi-printer-3d-off::before{content:"\F1B0E"}.mdi-printer-alert::before{content:"\F042C"}.mdi-printer-check::before{content:"\F1146"}.mdi-printer-eye::before{content:"\F1458"}.mdi-printer-off::before{content:"\F0E5D"}.mdi-printer-off-outline::before{content:"\F1785"}.mdi-printer-outline::before{content:"\F1786"}.mdi-printer-pos::before{content:"\F1057"}.mdi-printer-pos-alert::before{content:"\F1BBC"}.mdi-printer-pos-alert-outline::before{content:"\F1BBD"}.mdi-printer-pos-cancel::before{content:"\F1BBE"}.mdi-printer-pos-cancel-outline::before{content:"\F1BBF"}.mdi-printer-pos-check::before{content:"\F1BC0"}.mdi-printer-pos-check-outline::before{content:"\F1BC1"}.mdi-printer-pos-cog::before{content:"\F1BC2"}.mdi-printer-pos-cog-outline::before{content:"\F1BC3"}.mdi-printer-pos-edit::before{content:"\F1BC4"}.mdi-printer-pos-edit-outline::before{content:"\F1BC5"}.mdi-printer-pos-minus::before{content:"\F1BC6"}.mdi-printer-pos-minus-outline::before{content:"\F1BC7"}.mdi-printer-pos-network::before{content:"\F1BC8"}.mdi-printer-pos-network-outline::before{content:"\F1BC9"}.mdi-printer-pos-off::before{content:"\F1BCA"}.mdi-printer-pos-off-outline::before{content:"\F1BCB"}.mdi-printer-pos-outline::before{content:"\F1BCC"}.mdi-printer-pos-pause::before{content:"\F1BCD"}.mdi-printer-pos-pause-outline::before{content:"\F1BCE"}.mdi-printer-pos-play::before{content:"\F1BCF"}.mdi-printer-pos-play-outline::before{content:"\F1BD0"}.mdi-printer-pos-plus::before{content:"\F1BD1"}.mdi-printer-pos-plus-outline::before{content:"\F1BD2"}.mdi-printer-pos-refresh::before{content:"\F1BD3"}.mdi-printer-pos-refresh-outline::before{content:"\F1BD4"}.mdi-printer-pos-remove::before{content:"\F1BD5"}.mdi-printer-pos-remove-outline::before{content:"\F1BD6"}.mdi-printer-pos-star::before{content:"\F1BD7"}.mdi-printer-pos-star-outline::before{content:"\F1BD8"}.mdi-printer-pos-stop::before{content:"\F1BD9"}.mdi-printer-pos-stop-outline::before{content:"\F1BDA"}.mdi-printer-pos-sync::before{content:"\F1BDB"}.mdi-printer-pos-sync-outline::before{content:"\F1BDC"}.mdi-printer-pos-wrench::before{content:"\F1BDD"}.mdi-printer-pos-wrench-outline::before{content:"\F1BDE"}.mdi-printer-search::before{content:"\F1457"}.mdi-printer-settings::before{content:"\F0707"}.mdi-printer-wireless::before{content:"\F0A0B"}.mdi-priority-high::before{content:"\F0603"}.mdi-priority-low::before{content:"\F0604"}.mdi-professional-hexagon::before{content:"\F042D"}.mdi-progress-alert::before{content:"\F0CBC"}.mdi-progress-check::before{content:"\F0995"}.mdi-progress-clock::before{content:"\F0996"}.mdi-progress-close::before{content:"\F110A"}.mdi-progress-download::before{content:"\F0997"}.mdi-progress-helper::before{content:"\F1BA2"}.mdi-progress-pencil::before{content:"\F1787"}.mdi-progress-question::before{content:"\F1522"}.mdi-progress-star::before{content:"\F1788"}.mdi-progress-star-four-points::before{content:"\F1C3D"}.mdi-progress-tag::before{content:"\F1D0D"}.mdi-progress-upload::before{content:"\F0998"}.mdi-progress-wrench::before{content:"\F0CBD"}.mdi-projector::before{content:"\F042E"}.mdi-projector-off::before{content:"\F1A23"}.mdi-projector-screen::before{content:"\F042F"}.mdi-projector-screen-off::before{content:"\F180D"}.mdi-projector-screen-off-outline::before{content:"\F180E"}.mdi-projector-screen-outline::before{content:"\F1724"}.mdi-projector-screen-variant::before{content:"\F180F"}.mdi-projector-screen-variant-off::before{content:"\F1810"}.mdi-projector-screen-variant-off-outline::before{content:"\F1811"}.mdi-projector-screen-variant-outline::before{content:"\F1812"}.mdi-propane-tank::before{content:"\F1357"}.mdi-propane-tank-outline::before{content:"\F1358"}.mdi-protocol::before{content:"\F0FD8"}.mdi-publish::before{content:"\F06A7"}.mdi-publish-off::before{content:"\F1945"}.mdi-pulse::before{content:"\F0430"}.mdi-pump::before{content:"\F1402"}.mdi-pump-off::before{content:"\F1B22"}.mdi-pumpkin::before{content:"\F0BBF"}.mdi-purse::before{content:"\F0F1C"}.mdi-purse-outline::before{content:"\F0F1D"}.mdi-puzzle::before{content:"\F0431"}.mdi-puzzle-check::before{content:"\F1426"}.mdi-puzzle-check-outline::before{content:"\F1427"}.mdi-puzzle-edit::before{content:"\F14D3"}.mdi-puzzle-edit-outline::before{content:"\F14D9"}.mdi-puzzle-heart::before{content:"\F14D4"}.mdi-puzzle-heart-outline::before{content:"\F14DA"}.mdi-puzzle-minus::before{content:"\F14D1"}.mdi-puzzle-minus-outline::before{content:"\F14D7"}.mdi-puzzle-outline::before{content:"\F0A66"}.mdi-puzzle-plus::before{content:"\F14D0"}.mdi-puzzle-plus-outline::before{content:"\F14D6"}.mdi-puzzle-remove::before{content:"\F14D2"}.mdi-puzzle-remove-outline::before{content:"\F14D8"}.mdi-puzzle-star::before{content:"\F14D5"}.mdi-puzzle-star-outline::before{content:"\F14DB"}.mdi-pyramid::before{content:"\F1952"}.mdi-pyramid-off::before{content:"\F1953"}.mdi-qi::before{content:"\F0999"}.mdi-qqchat::before{content:"\F0605"}.mdi-qrcode::before{content:"\F0432"}.mdi-qrcode-edit::before{content:"\F08B8"}.mdi-qrcode-minus::before{content:"\F118C"}.mdi-qrcode-plus::before{content:"\F118B"}.mdi-qrcode-remove::before{content:"\F118D"}.mdi-qrcode-scan::before{content:"\F0433"}.mdi-quadcopter::before{content:"\F0434"}.mdi-quality-high::before{content:"\F0435"}.mdi-quality-low::before{content:"\F0A0C"}.mdi-quality-medium::before{content:"\F0A0D"}.mdi-queue-first-in-last-out::before{content:"\F1CAF"}.mdi-quora::before{content:"\F0D29"}.mdi-rabbit::before{content:"\F0907"}.mdi-rabbit-variant::before{content:"\F1A61"}.mdi-rabbit-variant-outline::before{content:"\F1A62"}.mdi-racing-helmet::before{content:"\F0D93"}.mdi-racquetball::before{content:"\F0D94"}.mdi-radar::before{content:"\F0437"}.mdi-radiator::before{content:"\F0438"}.mdi-radiator-disabled::before{content:"\F0AD7"}.mdi-radiator-off::before{content:"\F0AD8"}.mdi-radio::before{content:"\F0439"}.mdi-radio-am::before{content:"\F0CBE"}.mdi-radio-fm::before{content:"\F0CBF"}.mdi-radio-handheld::before{content:"\F043A"}.mdi-radio-off::before{content:"\F121C"}.mdi-radio-tower::before{content:"\F043B"}.mdi-radioactive::before{content:"\F043C"}.mdi-radioactive-circle::before{content:"\F185D"}.mdi-radioactive-circle-outline::before{content:"\F185E"}.mdi-radioactive-off::before{content:"\F0EC1"}.mdi-radiobox-blank::before{content:"\F043D"}.mdi-radiobox-indeterminate-variant::before{content:"\F1C5E"}.mdi-radiobox-marked::before{content:"\F043E"}.mdi-radiology-box::before{content:"\F14C5"}.mdi-radiology-box-outline::before{content:"\F14C6"}.mdi-radius::before{content:"\F0CC0"}.mdi-radius-outline::before{content:"\F0CC1"}.mdi-railroad-light::before{content:"\F0F1E"}.mdi-rake::before{content:"\F1544"}.mdi-raspberry-pi::before{content:"\F043F"}.mdi-raw::before{content:"\F1A0F"}.mdi-raw-off::before{content:"\F1A10"}.mdi-ray-end::before{content:"\F0440"}.mdi-ray-end-arrow::before{content:"\F0441"}.mdi-ray-start::before{content:"\F0442"}.mdi-ray-start-arrow::before{content:"\F0443"}.mdi-ray-start-end::before{content:"\F0444"}.mdi-ray-start-vertex-end::before{content:"\F15D8"}.mdi-ray-vertex::before{content:"\F0445"}.mdi-razor-double-edge::before{content:"\F1997"}.mdi-razor-single-edge::before{content:"\F1998"}.mdi-react::before{content:"\F0708"}.mdi-read::before{content:"\F0447"}.mdi-receipt::before{content:"\F0824"}.mdi-receipt-clock::before{content:"\F1C3E"}.mdi-receipt-clock-outline::before{content:"\F1C3F"}.mdi-receipt-outline::before{content:"\F04F7"}.mdi-receipt-send::before{content:"\F1C40"}.mdi-receipt-send-outline::before{content:"\F1C41"}.mdi-receipt-text::before{content:"\F0449"}.mdi-receipt-text-arrow-left::before{content:"\F1C42"}.mdi-receipt-text-arrow-left-outline::before{content:"\F1C43"}.mdi-receipt-text-arrow-right::before{content:"\F1C44"}.mdi-receipt-text-arrow-right-outline::before{content:"\F1C45"}.mdi-receipt-text-check::before{content:"\F1A63"}.mdi-receipt-text-check-outline::before{content:"\F1A64"}.mdi-receipt-text-clock::before{content:"\F1C46"}.mdi-receipt-text-clock-outline::before{content:"\F1C47"}.mdi-receipt-text-edit::before{content:"\F1C48"}.mdi-receipt-text-edit-outline::before{content:"\F1C49"}.mdi-receipt-text-minus::before{content:"\F1A65"}.mdi-receipt-text-minus-outline::before{content:"\F1A66"}.mdi-receipt-text-outline::before{content:"\F19DC"}.mdi-receipt-text-plus::before{content:"\F1A67"}.mdi-receipt-text-plus-outline::before{content:"\F1A68"}.mdi-receipt-text-remove::before{content:"\F1A69"}.mdi-receipt-text-remove-outline::before{content:"\F1A6A"}.mdi-receipt-text-send::before{content:"\F1C4A"}.mdi-receipt-text-send-outline::before{content:"\F1C4B"}.mdi-record::before{content:"\F044A"}.mdi-record-circle::before{content:"\F0EC2"}.mdi-record-circle-outline::before{content:"\F0EC3"}.mdi-record-player::before{content:"\F099A"}.mdi-record-rec::before{content:"\F044B"}.mdi-rectangle::before{content:"\F0E5E"}.mdi-rectangle-outline::before{content:"\F0E5F"}.mdi-recycle::before{content:"\F044C"}.mdi-recycle-variant::before{content:"\F139D"}.mdi-reddit::before{content:"\F044D"}.mdi-redhat::before{content:"\F111B"}.mdi-redo::before{content:"\F044E"}.mdi-redo-variant::before{content:"\F044F"}.mdi-reflect-horizontal::before{content:"\F0A0E"}.mdi-reflect-vertical::before{content:"\F0A0F"}.mdi-refresh::before{content:"\F0450"}.mdi-refresh-auto::before{content:"\F18F2"}.mdi-refresh-circle::before{content:"\F1377"}.mdi-regex::before{content:"\F0451"}.mdi-registered-trademark::before{content:"\F0A67"}.mdi-reiterate::before{content:"\F1588"}.mdi-relation-many-to-many::before{content:"\F1496"}.mdi-relation-many-to-one::before{content:"\F1497"}.mdi-relation-many-to-one-or-many::before{content:"\F1498"}.mdi-relation-many-to-only-one::before{content:"\F1499"}.mdi-relation-many-to-zero-or-many::before{content:"\F149A"}.mdi-relation-many-to-zero-or-one::before{content:"\F149B"}.mdi-relation-one-or-many-to-many::before{content:"\F149C"}.mdi-relation-one-or-many-to-one::before{content:"\F149D"}.mdi-relation-one-or-many-to-one-or-many::before{content:"\F149E"}.mdi-relation-one-or-many-to-only-one::before{content:"\F149F"}.mdi-relation-one-or-many-to-zero-or-many::before{content:"\F14A0"}.mdi-relation-one-or-many-to-zero-or-one::before{content:"\F14A1"}.mdi-relation-one-to-many::before{content:"\F14A2"}.mdi-relation-one-to-one::before{content:"\F14A3"}.mdi-relation-one-to-one-or-many::before{content:"\F14A4"}.mdi-relation-one-to-only-one::before{content:"\F14A5"}.mdi-relation-one-to-zero-or-many::before{content:"\F14A6"}.mdi-relation-one-to-zero-or-one::before{content:"\F14A7"}.mdi-relation-only-one-to-many::before{content:"\F14A8"}.mdi-relation-only-one-to-one::before{content:"\F14A9"}.mdi-relation-only-one-to-one-or-many::before{content:"\F14AA"}.mdi-relation-only-one-to-only-one::before{content:"\F14AB"}.mdi-relation-only-one-to-zero-or-many::before{content:"\F14AC"}.mdi-relation-only-one-to-zero-or-one::before{content:"\F14AD"}.mdi-relation-zero-or-many-to-many::before{content:"\F14AE"}.mdi-relation-zero-or-many-to-one::before{content:"\F14AF"}.mdi-relation-zero-or-many-to-one-or-many::before{content:"\F14B0"}.mdi-relation-zero-or-many-to-only-one::before{content:"\F14B1"}.mdi-relation-zero-or-many-to-zero-or-many::before{content:"\F14B2"}.mdi-relation-zero-or-many-to-zero-or-one::before{content:"\F14B3"}.mdi-relation-zero-or-one-to-many::before{content:"\F14B4"}.mdi-relation-zero-or-one-to-one::before{content:"\F14B5"}.mdi-relation-zero-or-one-to-one-or-many::before{content:"\F14B6"}.mdi-relation-zero-or-one-to-only-one::before{content:"\F14B7"}.mdi-relation-zero-or-one-to-zero-or-many::before{content:"\F14B8"}.mdi-relation-zero-or-one-to-zero-or-one::before{content:"\F14B9"}.mdi-relative-scale::before{content:"\F0452"}.mdi-reload::before{content:"\F0453"}.mdi-reload-alert::before{content:"\F110B"}.mdi-reminder::before{content:"\F088C"}.mdi-remote::before{content:"\F0454"}.mdi-remote-desktop::before{content:"\F08B9"}.mdi-remote-off::before{content:"\F0EC4"}.mdi-remote-tv::before{content:"\F0EC5"}.mdi-remote-tv-off::before{content:"\F0EC6"}.mdi-rename::before{content:"\F1C18"}.mdi-rename-box::before{content:"\F0455"}.mdi-rename-box-outline::before{content:"\F1C19"}.mdi-rename-outline::before{content:"\F1C1A"}.mdi-reorder-horizontal::before{content:"\F0688"}.mdi-reorder-vertical::before{content:"\F0689"}.mdi-repeat::before{content:"\F0456"}.mdi-repeat-off::before{content:"\F0457"}.mdi-repeat-once::before{content:"\F0458"}.mdi-repeat-variant::before{content:"\F0547"}.mdi-replay::before{content:"\F0459"}.mdi-reply::before{content:"\F045A"}.mdi-reply-all::before{content:"\F045B"}.mdi-reply-all-outline::before{content:"\F0F1F"}.mdi-reply-circle::before{content:"\F11AE"}.mdi-reply-outline::before{content:"\F0F20"}.mdi-reproduction::before{content:"\F045C"}.mdi-resistor::before{content:"\F0B44"}.mdi-resistor-nodes::before{content:"\F0B45"}.mdi-resize::before{content:"\F0A68"}.mdi-resize-bottom-right::before{content:"\F045D"}.mdi-responsive::before{content:"\F045E"}.mdi-restart::before{content:"\F0709"}.mdi-restart-alert::before{content:"\F110C"}.mdi-restart-off::before{content:"\F0D95"}.mdi-restore::before{content:"\F099B"}.mdi-restore-alert::before{content:"\F110D"}.mdi-rewind::before{content:"\F045F"}.mdi-rewind-10::before{content:"\F0D2A"}.mdi-rewind-15::before{content:"\F1946"}.mdi-rewind-30::before{content:"\F0D96"}.mdi-rewind-45::before{content:"\F1B13"}.mdi-rewind-5::before{content:"\F11F9"}.mdi-rewind-60::before{content:"\F160C"}.mdi-rewind-outline::before{content:"\F070A"}.mdi-rhombus::before{content:"\F070B"}.mdi-rhombus-medium::before{content:"\F0A10"}.mdi-rhombus-medium-outline::before{content:"\F14DC"}.mdi-rhombus-outline::before{content:"\F070C"}.mdi-rhombus-split::before{content:"\F0A11"}.mdi-rhombus-split-outline::before{content:"\F14DD"}.mdi-ribbon::before{content:"\F0460"}.mdi-rice::before{content:"\F07EA"}.mdi-rickshaw::before{content:"\F15BB"}.mdi-rickshaw-electric::before{content:"\F15BC"}.mdi-ring::before{content:"\F07EB"}.mdi-rivet::before{content:"\F0E60"}.mdi-road::before{content:"\F0461"}.mdi-road-variant::before{content:"\F0462"}.mdi-robber::before{content:"\F1058"}.mdi-robot::before{content:"\F06A9"}.mdi-robot-angry::before{content:"\F169D"}.mdi-robot-angry-outline::before{content:"\F169E"}.mdi-robot-confused::before{content:"\F169F"}.mdi-robot-confused-outline::before{content:"\F16A0"}.mdi-robot-dead::before{content:"\F16A1"}.mdi-robot-dead-outline::before{content:"\F16A2"}.mdi-robot-excited::before{content:"\F16A3"}.mdi-robot-excited-outline::before{content:"\F16A4"}.mdi-robot-happy::before{content:"\F1719"}.mdi-robot-happy-outline::before{content:"\F171A"}.mdi-robot-industrial::before{content:"\F0B46"}.mdi-robot-industrial-outline::before{content:"\F1A1A"}.mdi-robot-love::before{content:"\F16A5"}.mdi-robot-love-outline::before{content:"\F16A6"}.mdi-robot-mower::before{content:"\F11F7"}.mdi-robot-mower-outline::before{content:"\F11F3"}.mdi-robot-off::before{content:"\F16A7"}.mdi-robot-off-outline::before{content:"\F167B"}.mdi-robot-outline::before{content:"\F167A"}.mdi-robot-vacuum::before{content:"\F070D"}.mdi-robot-vacuum-alert::before{content:"\F1B5D"}.mdi-robot-vacuum-off::before{content:"\F1C01"}.mdi-robot-vacuum-variant::before{content:"\F0908"}.mdi-robot-vacuum-variant-alert::before{content:"\F1B5E"}.mdi-robot-vacuum-variant-off::before{content:"\F1C02"}.mdi-rocket::before{content:"\F0463"}.mdi-rocket-launch::before{content:"\F14DE"}.mdi-rocket-launch-outline::before{content:"\F14DF"}.mdi-rocket-outline::before{content:"\F13AF"}.mdi-rodent::before{content:"\F1327"}.mdi-roller-shade::before{content:"\F1A6B"}.mdi-roller-shade-closed::before{content:"\F1A6C"}.mdi-roller-skate::before{content:"\F0D2B"}.mdi-roller-skate-off::before{content:"\F0145"}.mdi-rollerblade::before{content:"\F0D2C"}.mdi-rollerblade-off::before{content:"\F002E"}.mdi-rollupjs::before{content:"\F0BC0"}.mdi-rolodex::before{content:"\F1AB9"}.mdi-rolodex-outline::before{content:"\F1ABA"}.mdi-roman-numeral-1::before{content:"\F1088"}.mdi-roman-numeral-10::before{content:"\F1091"}.mdi-roman-numeral-2::before{content:"\F1089"}.mdi-roman-numeral-3::before{content:"\F108A"}.mdi-roman-numeral-4::before{content:"\F108B"}.mdi-roman-numeral-5::before{content:"\F108C"}.mdi-roman-numeral-6::before{content:"\F108D"}.mdi-roman-numeral-7::before{content:"\F108E"}.mdi-roman-numeral-8::before{content:"\F108F"}.mdi-roman-numeral-9::before{content:"\F1090"}.mdi-room-service::before{content:"\F088D"}.mdi-room-service-outline::before{content:"\F0D97"}.mdi-rotate-360::before{content:"\F1999"}.mdi-rotate-3d::before{content:"\F0EC7"}.mdi-rotate-3d-variant::before{content:"\F0464"}.mdi-rotate-left::before{content:"\F0465"}.mdi-rotate-left-variant::before{content:"\F0466"}.mdi-rotate-orbit::before{content:"\F0D98"}.mdi-rotate-right::before{content:"\F0467"}.mdi-rotate-right-variant::before{content:"\F0468"}.mdi-rounded-corner::before{content:"\F0607"}.mdi-router::before{content:"\F11E2"}.mdi-router-network::before{content:"\F1087"}.mdi-router-network-wireless::before{content:"\F1C97"}.mdi-router-wireless::before{content:"\F0469"}.mdi-router-wireless-off::before{content:"\F15A3"}.mdi-router-wireless-settings::before{content:"\F0A69"}.mdi-routes::before{content:"\F046A"}.mdi-routes-clock::before{content:"\F1059"}.mdi-rowing::before{content:"\F0608"}.mdi-rss::before{content:"\F046B"}.mdi-rss-box::before{content:"\F046C"}.mdi-rss-off::before{content:"\F0F21"}.mdi-rug::before{content:"\F1475"}.mdi-rugby::before{content:"\F0D99"}.mdi-ruler::before{content:"\F046D"}.mdi-ruler-square::before{content:"\F0CC2"}.mdi-ruler-square-compass::before{content:"\F0EBE"}.mdi-run::before{content:"\F070E"}.mdi-run-fast::before{content:"\F046E"}.mdi-rv-truck::before{content:"\F11D4"}.mdi-sack::before{content:"\F0D2E"}.mdi-sack-outline::before{content:"\F1C4C"}.mdi-sack-percent::before{content:"\F0D2F"}.mdi-safe::before{content:"\F0A6A"}.mdi-safe-square::before{content:"\F127C"}.mdi-safe-square-outline::before{content:"\F127D"}.mdi-safety-goggles::before{content:"\F0D30"}.mdi-sail-boat::before{content:"\F0EC8"}.mdi-sail-boat-sink::before{content:"\F1AEF"}.mdi-sale::before{content:"\F046F"}.mdi-sale-outline::before{content:"\F1A06"}.mdi-salesforce::before{content:"\F088E"}.mdi-sass::before{content:"\F07EC"}.mdi-satellite::before{content:"\F0470"}.mdi-satellite-uplink::before{content:"\F0909"}.mdi-satellite-variant::before{content:"\F0471"}.mdi-sausage::before{content:"\F08BA"}.mdi-sausage-off::before{content:"\F1789"}.mdi-saw-blade::before{content:"\F0E61"}.mdi-sawtooth-wave::before{content:"\F147A"}.mdi-saxophone::before{content:"\F0609"}.mdi-scale::before{content:"\F0472"}.mdi-scale-balance::before{content:"\F05D1"}.mdi-scale-bathroom::before{content:"\F0473"}.mdi-scale-off::before{content:"\F105A"}.mdi-scale-unbalanced::before{content:"\F19B8"}.mdi-scan-helper::before{content:"\F13D8"}.mdi-scanner::before{content:"\F06AB"}.mdi-scanner-off::before{content:"\F090A"}.mdi-scatter-plot::before{content:"\F0EC9"}.mdi-scatter-plot-outline::before{content:"\F0ECA"}.mdi-scent::before{content:"\F1958"}.mdi-scent-off::before{content:"\F1959"}.mdi-school::before{content:"\F0474"}.mdi-school-outline::before{content:"\F1180"}.mdi-scissors-cutting::before{content:"\F0A6B"}.mdi-scooter::before{content:"\F15BD"}.mdi-scooter-electric::before{content:"\F15BE"}.mdi-scoreboard::before{content:"\F127E"}.mdi-scoreboard-outline::before{content:"\F127F"}.mdi-screen-rotation::before{content:"\F0475"}.mdi-screen-rotation-lock::before{content:"\F0478"}.mdi-screw-flat-top::before{content:"\F0DF3"}.mdi-screw-lag::before{content:"\F0DF4"}.mdi-screw-machine-flat-top::before{content:"\F0DF5"}.mdi-screw-machine-round-top::before{content:"\F0DF6"}.mdi-screw-round-top::before{content:"\F0DF7"}.mdi-screwdriver::before{content:"\F0476"}.mdi-script::before{content:"\F0BC1"}.mdi-script-outline::before{content:"\F0477"}.mdi-script-text::before{content:"\F0BC2"}.mdi-script-text-key::before{content:"\F1725"}.mdi-script-text-key-outline::before{content:"\F1726"}.mdi-script-text-outline::before{content:"\F0BC3"}.mdi-script-text-play::before{content:"\F1727"}.mdi-script-text-play-outline::before{content:"\F1728"}.mdi-sd::before{content:"\F0479"}.mdi-seal::before{content:"\F047A"}.mdi-seal-variant::before{content:"\F0FD9"}.mdi-search-web::before{content:"\F070F"}.mdi-seat::before{content:"\F0CC3"}.mdi-seat-flat::before{content:"\F047B"}.mdi-seat-flat-angled::before{content:"\F047C"}.mdi-seat-individual-suite::before{content:"\F047D"}.mdi-seat-legroom-extra::before{content:"\F047E"}.mdi-seat-legroom-normal::before{content:"\F047F"}.mdi-seat-legroom-reduced::before{content:"\F0480"}.mdi-seat-outline::before{content:"\F0CC4"}.mdi-seat-passenger::before{content:"\F1249"}.mdi-seat-recline-extra::before{content:"\F0481"}.mdi-seat-recline-normal::before{content:"\F0482"}.mdi-seatbelt::before{content:"\F0CC5"}.mdi-security::before{content:"\F0483"}.mdi-security-network::before{content:"\F0484"}.mdi-seed::before{content:"\F0E62"}.mdi-seed-off::before{content:"\F13FD"}.mdi-seed-off-outline::before{content:"\F13FE"}.mdi-seed-outline::before{content:"\F0E63"}.mdi-seed-plus::before{content:"\F1A6D"}.mdi-seed-plus-outline::before{content:"\F1A6E"}.mdi-seesaw::before{content:"\F15A4"}.mdi-segment::before{content:"\F0ECB"}.mdi-select::before{content:"\F0485"}.mdi-select-all::before{content:"\F0486"}.mdi-select-arrow-down::before{content:"\F1B59"}.mdi-select-arrow-up::before{content:"\F1B58"}.mdi-select-color::before{content:"\F0D31"}.mdi-select-compare::before{content:"\F0AD9"}.mdi-select-drag::before{content:"\F0A6C"}.mdi-select-group::before{content:"\F0F82"}.mdi-select-inverse::before{content:"\F0487"}.mdi-select-marker::before{content:"\F1280"}.mdi-select-multiple::before{content:"\F1281"}.mdi-select-multiple-marker::before{content:"\F1282"}.mdi-select-off::before{content:"\F0488"}.mdi-select-place::before{content:"\F0FDA"}.mdi-select-remove::before{content:"\F17C1"}.mdi-select-search::before{content:"\F1204"}.mdi-selection::before{content:"\F0489"}.mdi-selection-drag::before{content:"\F0A6D"}.mdi-selection-ellipse::before{content:"\F0D32"}.mdi-selection-ellipse-arrow-inside::before{content:"\F0F22"}.mdi-selection-ellipse-remove::before{content:"\F17C2"}.mdi-selection-marker::before{content:"\F1283"}.mdi-selection-multiple::before{content:"\F1285"}.mdi-selection-multiple-marker::before{content:"\F1284"}.mdi-selection-off::before{content:"\F0777"}.mdi-selection-remove::before{content:"\F17C3"}.mdi-selection-search::before{content:"\F1205"}.mdi-semantic-web::before{content:"\F1316"}.mdi-send::before{content:"\F048A"}.mdi-send-check::before{content:"\F1161"}.mdi-send-check-outline::before{content:"\F1162"}.mdi-send-circle::before{content:"\F0DF8"}.mdi-send-circle-outline::before{content:"\F0DF9"}.mdi-send-clock::before{content:"\F1163"}.mdi-send-clock-outline::before{content:"\F1164"}.mdi-send-lock::before{content:"\F07ED"}.mdi-send-lock-outline::before{content:"\F1166"}.mdi-send-outline::before{content:"\F1165"}.mdi-send-variant::before{content:"\F1C4D"}.mdi-send-variant-clock::before{content:"\F1C7E"}.mdi-send-variant-clock-outline::before{content:"\F1C7F"}.mdi-send-variant-outline::before{content:"\F1C4E"}.mdi-serial-port::before{content:"\F065C"}.mdi-server::before{content:"\F048B"}.mdi-server-minus::before{content:"\F048C"}.mdi-server-minus-outline::before{content:"\F1C98"}.mdi-server-network::before{content:"\F048D"}.mdi-server-network-off::before{content:"\F048E"}.mdi-server-network-outline::before{content:"\F1C99"}.mdi-server-off::before{content:"\F048F"}.mdi-server-outline::before{content:"\F1C9A"}.mdi-server-plus::before{content:"\F0490"}.mdi-server-plus-outline::before{content:"\F1C9B"}.mdi-server-remove::before{content:"\F0491"}.mdi-server-security::before{content:"\F0492"}.mdi-set-all::before{content:"\F0778"}.mdi-set-center::before{content:"\F0779"}.mdi-set-center-right::before{content:"\F077A"}.mdi-set-left::before{content:"\F077B"}.mdi-set-left-center::before{content:"\F077C"}.mdi-set-left-right::before{content:"\F077D"}.mdi-set-merge::before{content:"\F14E0"}.mdi-set-none::before{content:"\F077E"}.mdi-set-right::before{content:"\F077F"}.mdi-set-split::before{content:"\F14E1"}.mdi-set-square::before{content:"\F145D"}.mdi-set-top-box::before{content:"\F099F"}.mdi-settings-helper::before{content:"\F0A6E"}.mdi-shaker::before{content:"\F110E"}.mdi-shaker-outline::before{content:"\F110F"}.mdi-shape::before{content:"\F0831"}.mdi-shape-circle-plus::before{content:"\F065D"}.mdi-shape-outline::before{content:"\F0832"}.mdi-shape-oval-plus::before{content:"\F11FA"}.mdi-shape-plus::before{content:"\F0495"}.mdi-shape-plus-outline::before{content:"\F1C4F"}.mdi-shape-polygon-plus::before{content:"\F065E"}.mdi-shape-rectangle-plus::before{content:"\F065F"}.mdi-shape-square-plus::before{content:"\F0660"}.mdi-shape-square-rounded-plus::before{content:"\F14FA"}.mdi-share::before{content:"\F0496"}.mdi-share-all::before{content:"\F11F4"}.mdi-share-all-outline::before{content:"\F11F5"}.mdi-share-circle::before{content:"\F11AD"}.mdi-share-off::before{content:"\F0F23"}.mdi-share-off-outline::before{content:"\F0F24"}.mdi-share-outline::before{content:"\F0932"}.mdi-share-variant::before{content:"\F0497"}.mdi-share-variant-outline::before{content:"\F1514"}.mdi-shark::before{content:"\F18BA"}.mdi-shark-fin::before{content:"\F1673"}.mdi-shark-fin-outline::before{content:"\F1674"}.mdi-shark-off::before{content:"\F18BB"}.mdi-sheep::before{content:"\F0CC6"}.mdi-shield::before{content:"\F0498"}.mdi-shield-account::before{content:"\F088F"}.mdi-shield-account-outline::before{content:"\F0A12"}.mdi-shield-account-variant::before{content:"\F15A7"}.mdi-shield-account-variant-outline::before{content:"\F15A8"}.mdi-shield-airplane::before{content:"\F06BB"}.mdi-shield-airplane-outline::before{content:"\F0CC7"}.mdi-shield-alert::before{content:"\F0ECC"}.mdi-shield-alert-outline::before{content:"\F0ECD"}.mdi-shield-bug::before{content:"\F13DA"}.mdi-shield-bug-outline::before{content:"\F13DB"}.mdi-shield-car::before{content:"\F0F83"}.mdi-shield-check::before{content:"\F0565"}.mdi-shield-check-outline::before{content:"\F0CC8"}.mdi-shield-cross::before{content:"\F0CC9"}.mdi-shield-cross-outline::before{content:"\F0CCA"}.mdi-shield-crown::before{content:"\F18BC"}.mdi-shield-crown-outline::before{content:"\F18BD"}.mdi-shield-edit::before{content:"\F11A0"}.mdi-shield-edit-outline::before{content:"\F11A1"}.mdi-shield-half::before{content:"\F1360"}.mdi-shield-half-full::before{content:"\F0780"}.mdi-shield-home::before{content:"\F068A"}.mdi-shield-home-outline::before{content:"\F0CCB"}.mdi-shield-key::before{content:"\F0BC4"}.mdi-shield-key-outline::before{content:"\F0BC5"}.mdi-shield-link-variant::before{content:"\F0D33"}.mdi-shield-link-variant-outline::before{content:"\F0D34"}.mdi-shield-lock::before{content:"\F099D"}.mdi-shield-lock-open::before{content:"\F199A"}.mdi-shield-lock-open-outline::before{content:"\F199B"}.mdi-shield-lock-outline::before{content:"\F0CCC"}.mdi-shield-moon::before{content:"\F1828"}.mdi-shield-moon-outline::before{content:"\F1829"}.mdi-shield-off::before{content:"\F099E"}.mdi-shield-off-outline::before{content:"\F099C"}.mdi-shield-outline::before{content:"\F0499"}.mdi-shield-plus::before{content:"\F0ADA"}.mdi-shield-plus-outline::before{content:"\F0ADB"}.mdi-shield-refresh::before{content:"\F00AA"}.mdi-shield-refresh-outline::before{content:"\F01E0"}.mdi-shield-remove::before{content:"\F0ADC"}.mdi-shield-remove-outline::before{content:"\F0ADD"}.mdi-shield-search::before{content:"\F0D9A"}.mdi-shield-star::before{content:"\F113B"}.mdi-shield-star-outline::before{content:"\F113C"}.mdi-shield-sun::before{content:"\F105D"}.mdi-shield-sun-outline::before{content:"\F105E"}.mdi-shield-sword::before{content:"\F18BE"}.mdi-shield-sword-outline::before{content:"\F18BF"}.mdi-shield-sync::before{content:"\F11A2"}.mdi-shield-sync-outline::before{content:"\F11A3"}.mdi-shimmer::before{content:"\F1545"}.mdi-ship-wheel::before{content:"\F0833"}.mdi-shipping-pallet::before{content:"\F184E"}.mdi-shoe-ballet::before{content:"\F15CA"}.mdi-shoe-cleat::before{content:"\F15C7"}.mdi-shoe-formal::before{content:"\F0B47"}.mdi-shoe-heel::before{content:"\F0B48"}.mdi-shoe-print::before{content:"\F0DFA"}.mdi-shoe-sneaker::before{content:"\F15C8"}.mdi-shopping::before{content:"\F049A"}.mdi-shopping-music::before{content:"\F049B"}.mdi-shopping-outline::before{content:"\F11D5"}.mdi-shopping-search::before{content:"\F0F84"}.mdi-shopping-search-outline::before{content:"\F1A6F"}.mdi-shore::before{content:"\F14F9"}.mdi-shovel::before{content:"\F0710"}.mdi-shovel-off::before{content:"\F0711"}.mdi-shower::before{content:"\F09A0"}.mdi-shower-head::before{content:"\F09A1"}.mdi-shredder::before{content:"\F049C"}.mdi-shuffle::before{content:"\F049D"}.mdi-shuffle-disabled::before{content:"\F049E"}.mdi-shuffle-variant::before{content:"\F049F"}.mdi-shuriken::before{content:"\F137F"}.mdi-sickle::before{content:"\F18C0"}.mdi-sigma::before{content:"\F04A0"}.mdi-sigma-lower::before{content:"\F062B"}.mdi-sign-caution::before{content:"\F04A1"}.mdi-sign-direction::before{content:"\F0781"}.mdi-sign-direction-minus::before{content:"\F1000"}.mdi-sign-direction-plus::before{content:"\F0FDC"}.mdi-sign-direction-remove::before{content:"\F0FDD"}.mdi-sign-language::before{content:"\F1B4D"}.mdi-sign-language-outline::before{content:"\F1B4E"}.mdi-sign-pole::before{content:"\F14F8"}.mdi-sign-real-estate::before{content:"\F1118"}.mdi-sign-text::before{content:"\F0782"}.mdi-sign-yield::before{content:"\F1BAF"}.mdi-signal::before{content:"\F04A2"}.mdi-signal-2g::before{content:"\F0712"}.mdi-signal-3g::before{content:"\F0713"}.mdi-signal-4g::before{content:"\F0714"}.mdi-signal-5g::before{content:"\F0A6F"}.mdi-signal-cellular-1::before{content:"\F08BC"}.mdi-signal-cellular-2::before{content:"\F08BD"}.mdi-signal-cellular-3::before{content:"\F08BE"}.mdi-signal-cellular-outline::before{content:"\F08BF"}.mdi-signal-distance-variant::before{content:"\F0E64"}.mdi-signal-hspa::before{content:"\F0715"}.mdi-signal-hspa-plus::before{content:"\F0716"}.mdi-signal-off::before{content:"\F0783"}.mdi-signal-variant::before{content:"\F060A"}.mdi-signature::before{content:"\F0DFB"}.mdi-signature-freehand::before{content:"\F0DFC"}.mdi-signature-image::before{content:"\F0DFD"}.mdi-signature-text::before{content:"\F0DFE"}.mdi-silo::before{content:"\F1B9F"}.mdi-silo-outline::before{content:"\F0B49"}.mdi-silverware::before{content:"\F04A3"}.mdi-silverware-clean::before{content:"\F0FDE"}.mdi-silverware-fork::before{content:"\F04A4"}.mdi-silverware-fork-knife::before{content:"\F0A70"}.mdi-silverware-spoon::before{content:"\F04A5"}.mdi-silverware-variant::before{content:"\F04A6"}.mdi-sim::before{content:"\F04A7"}.mdi-sim-alert::before{content:"\F04A8"}.mdi-sim-alert-outline::before{content:"\F15D3"}.mdi-sim-off::before{content:"\F04A9"}.mdi-sim-off-outline::before{content:"\F15D4"}.mdi-sim-outline::before{content:"\F15D5"}.mdi-simple-icons::before{content:"\F131D"}.mdi-sina-weibo::before{content:"\F0ADF"}.mdi-sine-wave::before{content:"\F095B"}.mdi-sitemap::before{content:"\F04AA"}.mdi-sitemap-outline::before{content:"\F199C"}.mdi-size-l::before{content:"\F13A6"}.mdi-size-m::before{content:"\F13A5"}.mdi-size-s::before{content:"\F13A4"}.mdi-size-xl::before{content:"\F13A7"}.mdi-size-xs::before{content:"\F13A3"}.mdi-size-xxl::before{content:"\F13A8"}.mdi-size-xxs::before{content:"\F13A2"}.mdi-size-xxxl::before{content:"\F13A9"}.mdi-skate::before{content:"\F0D35"}.mdi-skate-off::before{content:"\F0699"}.mdi-skateboard::before{content:"\F14C2"}.mdi-skateboarding::before{content:"\F0501"}.mdi-skew-less::before{content:"\F0D36"}.mdi-skew-more::before{content:"\F0D37"}.mdi-ski::before{content:"\F1304"}.mdi-ski-cross-country::before{content:"\F1305"}.mdi-ski-water::before{content:"\F1306"}.mdi-skip-backward::before{content:"\F04AB"}.mdi-skip-backward-outline::before{content:"\F0F25"}.mdi-skip-forward::before{content:"\F04AC"}.mdi-skip-forward-outline::before{content:"\F0F26"}.mdi-skip-next::before{content:"\F04AD"}.mdi-skip-next-circle::before{content:"\F0661"}.mdi-skip-next-circle-outline::before{content:"\F0662"}.mdi-skip-next-outline::before{content:"\F0F27"}.mdi-skip-previous::before{content:"\F04AE"}.mdi-skip-previous-circle::before{content:"\F0663"}.mdi-skip-previous-circle-outline::before{content:"\F0664"}.mdi-skip-previous-outline::before{content:"\F0F28"}.mdi-skull::before{content:"\F068C"}.mdi-skull-crossbones::before{content:"\F0BC6"}.mdi-skull-crossbones-outline::before{content:"\F0BC7"}.mdi-skull-outline::before{content:"\F0BC8"}.mdi-skull-scan::before{content:"\F14C7"}.mdi-skull-scan-outline::before{content:"\F14C8"}.mdi-skype::before{content:"\F04AF"}.mdi-skype-business::before{content:"\F04B0"}.mdi-slack::before{content:"\F04B1"}.mdi-slash-forward::before{content:"\F0FDF"}.mdi-slash-forward-box::before{content:"\F0FE0"}.mdi-sledding::before{content:"\F041B"}.mdi-sleep::before{content:"\F04B2"}.mdi-sleep-off::before{content:"\F04B3"}.mdi-slide::before{content:"\F15A5"}.mdi-slope-downhill::before{content:"\F0DFF"}.mdi-slope-uphill::before{content:"\F0E00"}.mdi-slot-machine::before{content:"\F1114"}.mdi-slot-machine-outline::before{content:"\F1115"}.mdi-smart-card::before{content:"\F10BD"}.mdi-smart-card-off::before{content:"\F18F7"}.mdi-smart-card-off-outline::before{content:"\F18F8"}.mdi-smart-card-outline::before{content:"\F10BE"}.mdi-smart-card-reader::before{content:"\F10BF"}.mdi-smart-card-reader-outline::before{content:"\F10C0"}.mdi-smog::before{content:"\F0A71"}.mdi-smoke::before{content:"\F1799"}.mdi-smoke-detector::before{content:"\F0392"}.mdi-smoke-detector-alert::before{content:"\F192E"}.mdi-smoke-detector-alert-outline::before{content:"\F192F"}.mdi-smoke-detector-off::before{content:"\F1809"}.mdi-smoke-detector-off-outline::before{content:"\F180A"}.mdi-smoke-detector-outline::before{content:"\F1808"}.mdi-smoke-detector-variant::before{content:"\F180B"}.mdi-smoke-detector-variant-alert::before{content:"\F1930"}.mdi-smoke-detector-variant-off::before{content:"\F180C"}.mdi-smoking::before{content:"\F04B4"}.mdi-smoking-off::before{content:"\F04B5"}.mdi-smoking-pipe::before{content:"\F140D"}.mdi-smoking-pipe-off::before{content:"\F1428"}.mdi-snail::before{content:"\F1677"}.mdi-snake::before{content:"\F150E"}.mdi-snapchat::before{content:"\F04B6"}.mdi-snowboard::before{content:"\F1307"}.mdi-snowflake::before{content:"\F0717"}.mdi-snowflake-alert::before{content:"\F0F29"}.mdi-snowflake-check::before{content:"\F1A70"}.mdi-snowflake-melt::before{content:"\F12CB"}.mdi-snowflake-off::before{content:"\F14E3"}.mdi-snowflake-thermometer::before{content:"\F1A71"}.mdi-snowflake-variant::before{content:"\F0F2A"}.mdi-snowman::before{content:"\F04B7"}.mdi-snowmobile::before{content:"\F06DD"}.mdi-snowshoeing::before{content:"\F1A72"}.mdi-soccer::before{content:"\F04B8"}.mdi-soccer-field::before{content:"\F0834"}.mdi-social-distance-2-meters::before{content:"\F1579"}.mdi-social-distance-6-feet::before{content:"\F157A"}.mdi-sofa::before{content:"\F04B9"}.mdi-sofa-outline::before{content:"\F156D"}.mdi-sofa-single::before{content:"\F156E"}.mdi-sofa-single-outline::before{content:"\F156F"}.mdi-solar-panel::before{content:"\F0D9B"}.mdi-solar-panel-large::before{content:"\F0D9C"}.mdi-solar-power::before{content:"\F0A72"}.mdi-solar-power-variant::before{content:"\F1A73"}.mdi-solar-power-variant-outline::before{content:"\F1A74"}.mdi-soldering-iron::before{content:"\F1092"}.mdi-solid::before{content:"\F068D"}.mdi-sony-playstation::before{content:"\F0414"}.mdi-sort::before{content:"\F04BA"}.mdi-sort-alphabetical-ascending::before{content:"\F05BD"}.mdi-sort-alphabetical-ascending-variant::before{content:"\F1148"}.mdi-sort-alphabetical-descending::before{content:"\F05BF"}.mdi-sort-alphabetical-descending-variant::before{content:"\F1149"}.mdi-sort-alphabetical-variant::before{content:"\F04BB"}.mdi-sort-ascending::before{content:"\F04BC"}.mdi-sort-bool-ascending::before{content:"\F1385"}.mdi-sort-bool-ascending-variant::before{content:"\F1386"}.mdi-sort-bool-descending::before{content:"\F1387"}.mdi-sort-bool-descending-variant::before{content:"\F1388"}.mdi-sort-calendar-ascending::before{content:"\F1547"}.mdi-sort-calendar-descending::before{content:"\F1548"}.mdi-sort-clock-ascending::before{content:"\F1549"}.mdi-sort-clock-ascending-outline::before{content:"\F154A"}.mdi-sort-clock-descending::before{content:"\F154B"}.mdi-sort-clock-descending-outline::before{content:"\F154C"}.mdi-sort-descending::before{content:"\F04BD"}.mdi-sort-numeric-ascending::before{content:"\F1389"}.mdi-sort-numeric-ascending-variant::before{content:"\F090D"}.mdi-sort-numeric-descending::before{content:"\F138A"}.mdi-sort-numeric-descending-variant::before{content:"\F0AD2"}.mdi-sort-numeric-variant::before{content:"\F04BE"}.mdi-sort-reverse-variant::before{content:"\F033C"}.mdi-sort-variant::before{content:"\F04BF"}.mdi-sort-variant-lock::before{content:"\F0CCD"}.mdi-sort-variant-lock-open::before{content:"\F0CCE"}.mdi-sort-variant-off::before{content:"\F1ABB"}.mdi-sort-variant-remove::before{content:"\F1147"}.mdi-soundbar::before{content:"\F17DB"}.mdi-soundcloud::before{content:"\F04C0"}.mdi-source-branch::before{content:"\F062C"}.mdi-source-branch-check::before{content:"\F14CF"}.mdi-source-branch-minus::before{content:"\F14CB"}.mdi-source-branch-plus::before{content:"\F14CA"}.mdi-source-branch-refresh::before{content:"\F14CD"}.mdi-source-branch-remove::before{content:"\F14CC"}.mdi-source-branch-sync::before{content:"\F14CE"}.mdi-source-commit::before{content:"\F0718"}.mdi-source-commit-end::before{content:"\F0719"}.mdi-source-commit-end-local::before{content:"\F071A"}.mdi-source-commit-local::before{content:"\F071B"}.mdi-source-commit-next-local::before{content:"\F071C"}.mdi-source-commit-start::before{content:"\F071D"}.mdi-source-commit-start-next-local::before{content:"\F071E"}.mdi-source-fork::before{content:"\F04C1"}.mdi-source-merge::before{content:"\F062D"}.mdi-source-pull::before{content:"\F04C2"}.mdi-source-repository::before{content:"\F0CCF"}.mdi-source-repository-multiple::before{content:"\F0CD0"}.mdi-soy-sauce::before{content:"\F07EE"}.mdi-soy-sauce-off::before{content:"\F13FC"}.mdi-spa::before{content:"\F0CD1"}.mdi-spa-outline::before{content:"\F0CD2"}.mdi-space-invaders::before{content:"\F0BC9"}.mdi-space-station::before{content:"\F1383"}.mdi-spade::before{content:"\F0E65"}.mdi-speaker::before{content:"\F04C3"}.mdi-speaker-bluetooth::before{content:"\F09A2"}.mdi-speaker-message::before{content:"\F1B11"}.mdi-speaker-multiple::before{content:"\F0D38"}.mdi-speaker-off::before{content:"\F04C4"}.mdi-speaker-pause::before{content:"\F1B73"}.mdi-speaker-play::before{content:"\F1B72"}.mdi-speaker-stop::before{content:"\F1B74"}.mdi-speaker-wireless::before{content:"\F071F"}.mdi-spear::before{content:"\F1845"}.mdi-speedometer::before{content:"\F04C5"}.mdi-speedometer-medium::before{content:"\F0F85"}.mdi-speedometer-slow::before{content:"\F0F86"}.mdi-spellcheck::before{content:"\F04C6"}.mdi-sphere::before{content:"\F1954"}.mdi-sphere-off::before{content:"\F1955"}.mdi-spider::before{content:"\F11EA"}.mdi-spider-outline::before{content:"\F1C75"}.mdi-spider-thread::before{content:"\F11EB"}.mdi-spider-web::before{content:"\F0BCA"}.mdi-spirit-level::before{content:"\F14F1"}.mdi-spoon-sugar::before{content:"\F1429"}.mdi-spotify::before{content:"\F04C7"}.mdi-spotlight::before{content:"\F04C8"}.mdi-spotlight-beam::before{content:"\F04C9"}.mdi-spray::before{content:"\F0665"}.mdi-spray-bottle::before{content:"\F0AE0"}.mdi-sprinkler::before{content:"\F105F"}.mdi-sprinkler-fire::before{content:"\F199D"}.mdi-sprinkler-variant::before{content:"\F1060"}.mdi-sprout::before{content:"\F0E66"}.mdi-sprout-outline::before{content:"\F0E67"}.mdi-square::before{content:"\F0764"}.mdi-square-circle::before{content:"\F1500"}.mdi-square-circle-outline::before{content:"\F1C50"}.mdi-square-edit-outline::before{content:"\F090C"}.mdi-square-medium::before{content:"\F0A13"}.mdi-square-medium-outline::before{content:"\F0A14"}.mdi-square-off::before{content:"\F12EE"}.mdi-square-off-outline::before{content:"\F12EF"}.mdi-square-opacity::before{content:"\F1854"}.mdi-square-outline::before{content:"\F0763"}.mdi-square-root::before{content:"\F0784"}.mdi-square-root-box::before{content:"\F09A3"}.mdi-square-rounded::before{content:"\F14FB"}.mdi-square-rounded-badge::before{content:"\F1A07"}.mdi-square-rounded-badge-outline::before{content:"\F1A08"}.mdi-square-rounded-outline::before{content:"\F14FC"}.mdi-square-small::before{content:"\F0A15"}.mdi-square-wave::before{content:"\F147B"}.mdi-squeegee::before{content:"\F0AE1"}.mdi-ssh::before{content:"\F08C0"}.mdi-stack-exchange::before{content:"\F060B"}.mdi-stack-overflow::before{content:"\F04CC"}.mdi-stackpath::before{content:"\F0359"}.mdi-stadium::before{content:"\F0FF9"}.mdi-stadium-outline::before{content:"\F1B03"}.mdi-stadium-variant::before{content:"\F0720"}.mdi-stairs::before{content:"\F04CD"}.mdi-stairs-box::before{content:"\F139E"}.mdi-stairs-down::before{content:"\F12BE"}.mdi-stairs-up::before{content:"\F12BD"}.mdi-stamper::before{content:"\F0D39"}.mdi-standard-definition::before{content:"\F07EF"}.mdi-star::before{content:"\F04CE"}.mdi-star-box::before{content:"\F0A73"}.mdi-star-box-multiple::before{content:"\F1286"}.mdi-star-box-multiple-outline::before{content:"\F1287"}.mdi-star-box-outline::before{content:"\F0A74"}.mdi-star-check::before{content:"\F1566"}.mdi-star-check-outline::before{content:"\F156A"}.mdi-star-circle::before{content:"\F04CF"}.mdi-star-circle-outline::before{content:"\F09A4"}.mdi-star-cog::before{content:"\F1668"}.mdi-star-cog-outline::before{content:"\F1669"}.mdi-star-crescent::before{content:"\F0979"}.mdi-star-david::before{content:"\F097A"}.mdi-star-face::before{content:"\F09A5"}.mdi-star-four-points::before{content:"\F0AE2"}.mdi-star-four-points-box::before{content:"\F1C51"}.mdi-star-four-points-box-outline::before{content:"\F1C52"}.mdi-star-four-points-circle::before{content:"\F1C53"}.mdi-star-four-points-circle-outline::before{content:"\F1C54"}.mdi-star-four-points-outline::before{content:"\F0AE3"}.mdi-star-four-points-small::before{content:"\F1C55"}.mdi-star-half::before{content:"\F0246"}.mdi-star-half-full::before{content:"\F04D0"}.mdi-star-minus::before{content:"\F1564"}.mdi-star-minus-outline::before{content:"\F1568"}.mdi-star-off::before{content:"\F04D1"}.mdi-star-off-outline::before{content:"\F155B"}.mdi-star-outline::before{content:"\F04D2"}.mdi-star-plus::before{content:"\F1563"}.mdi-star-plus-outline::before{content:"\F1567"}.mdi-star-remove::before{content:"\F1565"}.mdi-star-remove-outline::before{content:"\F1569"}.mdi-star-settings::before{content:"\F166A"}.mdi-star-settings-outline::before{content:"\F166B"}.mdi-star-shooting::before{content:"\F1741"}.mdi-star-shooting-outline::before{content:"\F1742"}.mdi-star-three-points::before{content:"\F0AE4"}.mdi-star-three-points-outline::before{content:"\F0AE5"}.mdi-state-machine::before{content:"\F11EF"}.mdi-steam::before{content:"\F04D3"}.mdi-steering::before{content:"\F04D4"}.mdi-steering-off::before{content:"\F090E"}.mdi-step-backward::before{content:"\F04D5"}.mdi-step-backward-2::before{content:"\F04D6"}.mdi-step-forward::before{content:"\F04D7"}.mdi-step-forward-2::before{content:"\F04D8"}.mdi-stethoscope::before{content:"\F04D9"}.mdi-sticker::before{content:"\F1364"}.mdi-sticker-alert::before{content:"\F1365"}.mdi-sticker-alert-outline::before{content:"\F1366"}.mdi-sticker-check::before{content:"\F1367"}.mdi-sticker-check-outline::before{content:"\F1368"}.mdi-sticker-circle-outline::before{content:"\F05D0"}.mdi-sticker-emoji::before{content:"\F0785"}.mdi-sticker-minus::before{content:"\F1369"}.mdi-sticker-minus-outline::before{content:"\F136A"}.mdi-sticker-outline::before{content:"\F136B"}.mdi-sticker-plus::before{content:"\F136C"}.mdi-sticker-plus-outline::before{content:"\F136D"}.mdi-sticker-remove::before{content:"\F136E"}.mdi-sticker-remove-outline::before{content:"\F136F"}.mdi-sticker-text::before{content:"\F178E"}.mdi-sticker-text-outline::before{content:"\F178F"}.mdi-stocking::before{content:"\F04DA"}.mdi-stomach::before{content:"\F1093"}.mdi-stool::before{content:"\F195D"}.mdi-stool-outline::before{content:"\F195E"}.mdi-stop::before{content:"\F04DB"}.mdi-stop-circle::before{content:"\F0666"}.mdi-stop-circle-outline::before{content:"\F0667"}.mdi-storage-tank::before{content:"\F1A75"}.mdi-storage-tank-outline::before{content:"\F1A76"}.mdi-store::before{content:"\F04DC"}.mdi-store-24-hour::before{content:"\F04DD"}.mdi-store-alert::before{content:"\F18C1"}.mdi-store-alert-outline::before{content:"\F18C2"}.mdi-store-check::before{content:"\F18C3"}.mdi-store-check-outline::before{content:"\F18C4"}.mdi-store-clock::before{content:"\F18C5"}.mdi-store-clock-outline::before{content:"\F18C6"}.mdi-store-cog::before{content:"\F18C7"}.mdi-store-cog-outline::before{content:"\F18C8"}.mdi-store-edit::before{content:"\F18C9"}.mdi-store-edit-outline::before{content:"\F18CA"}.mdi-store-marker::before{content:"\F18CB"}.mdi-store-marker-outline::before{content:"\F18CC"}.mdi-store-minus::before{content:"\F165E"}.mdi-store-minus-outline::before{content:"\F18CD"}.mdi-store-off::before{content:"\F18CE"}.mdi-store-off-outline::before{content:"\F18CF"}.mdi-store-outline::before{content:"\F1361"}.mdi-store-plus::before{content:"\F165F"}.mdi-store-plus-outline::before{content:"\F18D0"}.mdi-store-remove::before{content:"\F1660"}.mdi-store-remove-outline::before{content:"\F18D1"}.mdi-store-search::before{content:"\F18D2"}.mdi-store-search-outline::before{content:"\F18D3"}.mdi-store-settings::before{content:"\F18D4"}.mdi-store-settings-outline::before{content:"\F18D5"}.mdi-storefront::before{content:"\F07C7"}.mdi-storefront-check::before{content:"\F1B7D"}.mdi-storefront-check-outline::before{content:"\F1B7E"}.mdi-storefront-edit::before{content:"\F1B7F"}.mdi-storefront-edit-outline::before{content:"\F1B80"}.mdi-storefront-minus::before{content:"\F1B83"}.mdi-storefront-minus-outline::before{content:"\F1B84"}.mdi-storefront-outline::before{content:"\F10C1"}.mdi-storefront-plus::before{content:"\F1B81"}.mdi-storefront-plus-outline::before{content:"\F1B82"}.mdi-storefront-remove::before{content:"\F1B85"}.mdi-storefront-remove-outline::before{content:"\F1B86"}.mdi-stove::before{content:"\F04DE"}.mdi-strategy::before{content:"\F11D6"}.mdi-stretch-to-page::before{content:"\F0F2B"}.mdi-stretch-to-page-outline::before{content:"\F0F2C"}.mdi-string-lights::before{content:"\F12BA"}.mdi-string-lights-off::before{content:"\F12BB"}.mdi-subdirectory-arrow-left::before{content:"\F060C"}.mdi-subdirectory-arrow-right::before{content:"\F060D"}.mdi-submarine::before{content:"\F156C"}.mdi-subtitles::before{content:"\F0A16"}.mdi-subtitles-outline::before{content:"\F0A17"}.mdi-subway::before{content:"\F06AC"}.mdi-subway-alert-variant::before{content:"\F0D9D"}.mdi-subway-variant::before{content:"\F04DF"}.mdi-summit::before{content:"\F0786"}.mdi-sun-angle::before{content:"\F1B27"}.mdi-sun-angle-outline::before{content:"\F1B28"}.mdi-sun-clock::before{content:"\F1A77"}.mdi-sun-clock-outline::before{content:"\F1A78"}.mdi-sun-compass::before{content:"\F19A5"}.mdi-sun-snowflake::before{content:"\F1796"}.mdi-sun-snowflake-variant::before{content:"\F1A79"}.mdi-sun-thermometer::before{content:"\F18D6"}.mdi-sun-thermometer-outline::before{content:"\F18D7"}.mdi-sun-wireless::before{content:"\F17FE"}.mdi-sun-wireless-outline::before{content:"\F17FF"}.mdi-sunglasses::before{content:"\F04E0"}.mdi-surfing::before{content:"\F1746"}.mdi-surround-sound::before{content:"\F05C5"}.mdi-surround-sound-2-0::before{content:"\F07F0"}.mdi-surround-sound-2-1::before{content:"\F1729"}.mdi-surround-sound-3-1::before{content:"\F07F1"}.mdi-surround-sound-5-1::before{content:"\F07F2"}.mdi-surround-sound-5-1-2::before{content:"\F172A"}.mdi-surround-sound-7-1::before{content:"\F07F3"}.mdi-svg::before{content:"\F0721"}.mdi-swap-horizontal::before{content:"\F04E1"}.mdi-swap-horizontal-bold::before{content:"\F0BCD"}.mdi-swap-horizontal-circle::before{content:"\F0FE1"}.mdi-swap-horizontal-circle-outline::before{content:"\F0FE2"}.mdi-swap-horizontal-hidden::before{content:"\F1D0E"}.mdi-swap-horizontal-variant::before{content:"\F08C1"}.mdi-swap-vertical::before{content:"\F04E2"}.mdi-swap-vertical-bold::before{content:"\F0BCE"}.mdi-swap-vertical-circle::before{content:"\F0FE3"}.mdi-swap-vertical-circle-outline::before{content:"\F0FE4"}.mdi-swap-vertical-variant::before{content:"\F08C2"}.mdi-swim::before{content:"\F04E3"}.mdi-switch::before{content:"\F04E4"}.mdi-sword::before{content:"\F04E5"}.mdi-sword-cross::before{content:"\F0787"}.mdi-syllabary-hangul::before{content:"\F1333"}.mdi-syllabary-hiragana::before{content:"\F1334"}.mdi-syllabary-katakana::before{content:"\F1335"}.mdi-syllabary-katakana-halfwidth::before{content:"\F1336"}.mdi-symbol::before{content:"\F1501"}.mdi-symfony::before{content:"\F0AE6"}.mdi-synagogue::before{content:"\F1B04"}.mdi-synagogue-outline::before{content:"\F1B05"}.mdi-sync::before{content:"\F04E6"}.mdi-sync-alert::before{content:"\F04E7"}.mdi-sync-circle::before{content:"\F1378"}.mdi-sync-off::before{content:"\F04E8"}.mdi-tab::before{content:"\F04E9"}.mdi-tab-minus::before{content:"\F0B4B"}.mdi-tab-plus::before{content:"\F075C"}.mdi-tab-remove::before{content:"\F0B4C"}.mdi-tab-search::before{content:"\F199E"}.mdi-tab-unselected::before{content:"\F04EA"}.mdi-table::before{content:"\F04EB"}.mdi-table-account::before{content:"\F13B9"}.mdi-table-alert::before{content:"\F13BA"}.mdi-table-arrow-down::before{content:"\F13BB"}.mdi-table-arrow-left::before{content:"\F13BC"}.mdi-table-arrow-right::before{content:"\F13BD"}.mdi-table-arrow-up::before{content:"\F13BE"}.mdi-table-border::before{content:"\F0A18"}.mdi-table-cancel::before{content:"\F13BF"}.mdi-table-chair::before{content:"\F1061"}.mdi-table-check::before{content:"\F13C0"}.mdi-table-clock::before{content:"\F13C1"}.mdi-table-cog::before{content:"\F13C2"}.mdi-table-column::before{content:"\F0835"}.mdi-table-column-plus-after::before{content:"\F04EC"}.mdi-table-column-plus-before::before{content:"\F04ED"}.mdi-table-column-remove::before{content:"\F04EE"}.mdi-table-column-width::before{content:"\F04EF"}.mdi-table-edit::before{content:"\F04F0"}.mdi-table-eye::before{content:"\F1094"}.mdi-table-eye-off::before{content:"\F13C3"}.mdi-table-filter::before{content:"\F1B8C"}.mdi-table-furniture::before{content:"\F05BC"}.mdi-table-headers-eye::before{content:"\F121D"}.mdi-table-headers-eye-off::before{content:"\F121E"}.mdi-table-heart::before{content:"\F13C4"}.mdi-table-key::before{content:"\F13C5"}.mdi-table-large::before{content:"\F04F1"}.mdi-table-large-plus::before{content:"\F0F87"}.mdi-table-large-remove::before{content:"\F0F88"}.mdi-table-lock::before{content:"\F13C6"}.mdi-table-merge-cells::before{content:"\F09A6"}.mdi-table-minus::before{content:"\F13C7"}.mdi-table-multiple::before{content:"\F13C8"}.mdi-table-network::before{content:"\F13C9"}.mdi-table-of-contents::before{content:"\F0836"}.mdi-table-off::before{content:"\F13CA"}.mdi-table-picnic::before{content:"\F1743"}.mdi-table-pivot::before{content:"\F183C"}.mdi-table-plus::before{content:"\F0A75"}.mdi-table-question::before{content:"\F1B21"}.mdi-table-refresh::before{content:"\F13A0"}.mdi-table-remove::before{content:"\F0A76"}.mdi-table-row::before{content:"\F0837"}.mdi-table-row-height::before{content:"\F04F2"}.mdi-table-row-plus-after::before{content:"\F04F3"}.mdi-table-row-plus-before::before{content:"\F04F4"}.mdi-table-row-remove::before{content:"\F04F5"}.mdi-table-search::before{content:"\F090F"}.mdi-table-settings::before{content:"\F0838"}.mdi-table-split-cell::before{content:"\F142A"}.mdi-table-star::before{content:"\F13CB"}.mdi-table-sync::before{content:"\F13A1"}.mdi-table-tennis::before{content:"\F0E68"}.mdi-tablet::before{content:"\F04F6"}.mdi-tablet-cellphone::before{content:"\F09A7"}.mdi-tablet-dashboard::before{content:"\F0ECE"}.mdi-taco::before{content:"\F0762"}.mdi-tag::before{content:"\F04F9"}.mdi-tag-arrow-down::before{content:"\F172B"}.mdi-tag-arrow-down-outline::before{content:"\F172C"}.mdi-tag-arrow-left::before{content:"\F172D"}.mdi-tag-arrow-left-outline::before{content:"\F172E"}.mdi-tag-arrow-right::before{content:"\F172F"}.mdi-tag-arrow-right-outline::before{content:"\F1730"}.mdi-tag-arrow-up::before{content:"\F1731"}.mdi-tag-arrow-up-outline::before{content:"\F1732"}.mdi-tag-check::before{content:"\F1A7A"}.mdi-tag-check-outline::before{content:"\F1A7B"}.mdi-tag-edit::before{content:"\F1C9C"}.mdi-tag-edit-outline::before{content:"\F1C9D"}.mdi-tag-faces::before{content:"\F04FA"}.mdi-tag-heart::before{content:"\F068B"}.mdi-tag-heart-outline::before{content:"\F0BCF"}.mdi-tag-hidden::before{content:"\F1C76"}.mdi-tag-minus::before{content:"\F0910"}.mdi-tag-minus-outline::before{content:"\F121F"}.mdi-tag-multiple::before{content:"\F04FB"}.mdi-tag-multiple-outline::before{content:"\F12F7"}.mdi-tag-off::before{content:"\F1220"}.mdi-tag-off-outline::before{content:"\F1221"}.mdi-tag-outline::before{content:"\F04FC"}.mdi-tag-plus::before{content:"\F0722"}.mdi-tag-plus-outline::before{content:"\F1222"}.mdi-tag-remove::before{content:"\F0723"}.mdi-tag-remove-outline::before{content:"\F1223"}.mdi-tag-search::before{content:"\F1907"}.mdi-tag-search-outline::before{content:"\F1908"}.mdi-tag-text::before{content:"\F1224"}.mdi-tag-text-outline::before{content:"\F04FD"}.mdi-tailwind::before{content:"\F13FF"}.mdi-tally-mark-1::before{content:"\F1ABC"}.mdi-tally-mark-2::before{content:"\F1ABD"}.mdi-tally-mark-3::before{content:"\F1ABE"}.mdi-tally-mark-4::before{content:"\F1ABF"}.mdi-tally-mark-5::before{content:"\F1AC0"}.mdi-tangram::before{content:"\F04F8"}.mdi-tank::before{content:"\F0D3A"}.mdi-tanker-truck::before{content:"\F0FE5"}.mdi-tape-drive::before{content:"\F16DF"}.mdi-tape-measure::before{content:"\F0B4D"}.mdi-target::before{content:"\F04FE"}.mdi-target-account::before{content:"\F0BD0"}.mdi-target-variant::before{content:"\F0A77"}.mdi-taxi::before{content:"\F04FF"}.mdi-tea::before{content:"\F0D9E"}.mdi-tea-outline::before{content:"\F0D9F"}.mdi-teamviewer::before{content:"\F0500"}.mdi-teddy-bear::before{content:"\F18FB"}.mdi-telescope::before{content:"\F0B4E"}.mdi-television::before{content:"\F0502"}.mdi-television-ambient-light::before{content:"\F1356"}.mdi-television-box::before{content:"\F0839"}.mdi-television-classic::before{content:"\F07F4"}.mdi-television-classic-off::before{content:"\F083A"}.mdi-television-guide::before{content:"\F0503"}.mdi-television-off::before{content:"\F083B"}.mdi-television-pause::before{content:"\F0F89"}.mdi-television-play::before{content:"\F0ECF"}.mdi-television-shimmer::before{content:"\F1110"}.mdi-television-speaker::before{content:"\F1B1B"}.mdi-television-speaker-off::before{content:"\F1B1C"}.mdi-television-stop::before{content:"\F0F8A"}.mdi-temperature-celsius::before{content:"\F0504"}.mdi-temperature-fahrenheit::before{content:"\F0505"}.mdi-temperature-kelvin::before{content:"\F0506"}.mdi-temple-buddhist::before{content:"\F1B06"}.mdi-temple-buddhist-outline::before{content:"\F1B07"}.mdi-temple-hindu::before{content:"\F1B08"}.mdi-temple-hindu-outline::before{content:"\F1B09"}.mdi-tennis::before{content:"\F0DA0"}.mdi-tennis-ball::before{content:"\F0507"}.mdi-tennis-ball-outline::before{content:"\F1C5F"}.mdi-tent::before{content:"\F0508"}.mdi-terraform::before{content:"\F1062"}.mdi-terrain::before{content:"\F0509"}.mdi-test-tube::before{content:"\F0668"}.mdi-test-tube-empty::before{content:"\F0911"}.mdi-test-tube-off::before{content:"\F0912"}.mdi-text::before{content:"\F09A8"}.mdi-text-account::before{content:"\F1570"}.mdi-text-box::before{content:"\F021A"}.mdi-text-box-check::before{content:"\F0EA6"}.mdi-text-box-check-outline::before{content:"\F0EA7"}.mdi-text-box-edit::before{content:"\F1A7C"}.mdi-text-box-edit-outline::before{content:"\F1A7D"}.mdi-text-box-minus::before{content:"\F0EA8"}.mdi-text-box-minus-outline::before{content:"\F0EA9"}.mdi-text-box-multiple::before{content:"\F0AB7"}.mdi-text-box-multiple-outline::before{content:"\F0AB8"}.mdi-text-box-outline::before{content:"\F09ED"}.mdi-text-box-plus::before{content:"\F0EAA"}.mdi-text-box-plus-outline::before{content:"\F0EAB"}.mdi-text-box-remove::before{content:"\F0EAC"}.mdi-text-box-remove-outline::before{content:"\F0EAD"}.mdi-text-box-search::before{content:"\F0EAE"}.mdi-text-box-search-outline::before{content:"\F0EAF"}.mdi-text-long::before{content:"\F09AA"}.mdi-text-recognition::before{content:"\F113D"}.mdi-text-search::before{content:"\F13B8"}.mdi-text-search-variant::before{content:"\F1A7E"}.mdi-text-shadow::before{content:"\F0669"}.mdi-text-short::before{content:"\F09A9"}.mdi-texture::before{content:"\F050C"}.mdi-texture-box::before{content:"\F0FE6"}.mdi-theater::before{content:"\F050D"}.mdi-theme-light-dark::before{content:"\F050E"}.mdi-thermometer::before{content:"\F050F"}.mdi-thermometer-alert::before{content:"\F0E01"}.mdi-thermometer-auto::before{content:"\F1B0F"}.mdi-thermometer-bluetooth::before{content:"\F1895"}.mdi-thermometer-check::before{content:"\F1A7F"}.mdi-thermometer-chevron-down::before{content:"\F0E02"}.mdi-thermometer-chevron-up::before{content:"\F0E03"}.mdi-thermometer-high::before{content:"\F10C2"}.mdi-thermometer-lines::before{content:"\F0510"}.mdi-thermometer-low::before{content:"\F10C3"}.mdi-thermometer-minus::before{content:"\F0E04"}.mdi-thermometer-off::before{content:"\F1531"}.mdi-thermometer-plus::before{content:"\F0E05"}.mdi-thermometer-probe::before{content:"\F1B2B"}.mdi-thermometer-probe-off::before{content:"\F1B2C"}.mdi-thermometer-water::before{content:"\F1A80"}.mdi-thermostat::before{content:"\F0393"}.mdi-thermostat-auto::before{content:"\F1B17"}.mdi-thermostat-box::before{content:"\F0891"}.mdi-thermostat-box-auto::before{content:"\F1B18"}.mdi-thermostat-cog::before{content:"\F1C80"}.mdi-thought-bubble::before{content:"\F07F6"}.mdi-thought-bubble-outline::before{content:"\F07F7"}.mdi-thumb-down::before{content:"\F0511"}.mdi-thumb-down-outline::before{content:"\F0512"}.mdi-thumb-up::before{content:"\F0513"}.mdi-thumb-up-outline::before{content:"\F0514"}.mdi-thumbs-up-down::before{content:"\F0515"}.mdi-thumbs-up-down-outline::before{content:"\F1914"}.mdi-ticket::before{content:"\F0516"}.mdi-ticket-account::before{content:"\F0517"}.mdi-ticket-confirmation::before{content:"\F0518"}.mdi-ticket-confirmation-outline::before{content:"\F13AA"}.mdi-ticket-outline::before{content:"\F0913"}.mdi-ticket-percent::before{content:"\F0724"}.mdi-ticket-percent-outline::before{content:"\F142B"}.mdi-tie::before{content:"\F0519"}.mdi-tilde::before{content:"\F0725"}.mdi-tilde-off::before{content:"\F18F3"}.mdi-timelapse::before{content:"\F051A"}.mdi-timeline::before{content:"\F0BD1"}.mdi-timeline-alert::before{content:"\F0F95"}.mdi-timeline-alert-outline::before{content:"\F0F98"}.mdi-timeline-check::before{content:"\F1532"}.mdi-timeline-check-outline::before{content:"\F1533"}.mdi-timeline-clock::before{content:"\F11FB"}.mdi-timeline-clock-outline::before{content:"\F11FC"}.mdi-timeline-minus::before{content:"\F1534"}.mdi-timeline-minus-outline::before{content:"\F1535"}.mdi-timeline-outline::before{content:"\F0BD2"}.mdi-timeline-plus::before{content:"\F0F96"}.mdi-timeline-plus-outline::before{content:"\F0F97"}.mdi-timeline-question::before{content:"\F0F99"}.mdi-timeline-question-outline::before{content:"\F0F9A"}.mdi-timeline-remove::before{content:"\F1536"}.mdi-timeline-remove-outline::before{content:"\F1537"}.mdi-timeline-text::before{content:"\F0BD3"}.mdi-timeline-text-outline::before{content:"\F0BD4"}.mdi-timer::before{content:"\F13AB"}.mdi-timer-10::before{content:"\F051C"}.mdi-timer-3::before{content:"\F051D"}.mdi-timer-alert::before{content:"\F1ACC"}.mdi-timer-alert-outline::before{content:"\F1ACD"}.mdi-timer-cancel::before{content:"\F1ACE"}.mdi-timer-cancel-outline::before{content:"\F1ACF"}.mdi-timer-check::before{content:"\F1AD0"}.mdi-timer-check-outline::before{content:"\F1AD1"}.mdi-timer-cog::before{content:"\F1925"}.mdi-timer-cog-outline::before{content:"\F1926"}.mdi-timer-edit::before{content:"\F1AD2"}.mdi-timer-edit-outline::before{content:"\F1AD3"}.mdi-timer-lock::before{content:"\F1AD4"}.mdi-timer-lock-open::before{content:"\F1AD5"}.mdi-timer-lock-open-outline::before{content:"\F1AD6"}.mdi-timer-lock-outline::before{content:"\F1AD7"}.mdi-timer-marker::before{content:"\F1AD8"}.mdi-timer-marker-outline::before{content:"\F1AD9"}.mdi-timer-minus::before{content:"\F1ADA"}.mdi-timer-minus-outline::before{content:"\F1ADB"}.mdi-timer-music::before{content:"\F1ADC"}.mdi-timer-music-outline::before{content:"\F1ADD"}.mdi-timer-off::before{content:"\F13AC"}.mdi-timer-off-outline::before{content:"\F051E"}.mdi-timer-outline::before{content:"\F051B"}.mdi-timer-pause::before{content:"\F1ADE"}.mdi-timer-pause-outline::before{content:"\F1ADF"}.mdi-timer-play::before{content:"\F1AE0"}.mdi-timer-play-outline::before{content:"\F1AE1"}.mdi-timer-plus::before{content:"\F1AE2"}.mdi-timer-plus-outline::before{content:"\F1AE3"}.mdi-timer-refresh::before{content:"\F1AE4"}.mdi-timer-refresh-outline::before{content:"\F1AE5"}.mdi-timer-remove::before{content:"\F1AE6"}.mdi-timer-remove-outline::before{content:"\F1AE7"}.mdi-timer-sand::before{content:"\F051F"}.mdi-timer-sand-complete::before{content:"\F199F"}.mdi-timer-sand-empty::before{content:"\F06AD"}.mdi-timer-sand-full::before{content:"\F078C"}.mdi-timer-sand-paused::before{content:"\F19A0"}.mdi-timer-settings::before{content:"\F1923"}.mdi-timer-settings-outline::before{content:"\F1924"}.mdi-timer-star::before{content:"\F1AE8"}.mdi-timer-star-outline::before{content:"\F1AE9"}.mdi-timer-stop::before{content:"\F1AEA"}.mdi-timer-stop-outline::before{content:"\F1AEB"}.mdi-timer-sync::before{content:"\F1AEC"}.mdi-timer-sync-outline::before{content:"\F1AED"}.mdi-timetable::before{content:"\F0520"}.mdi-tire::before{content:"\F1896"}.mdi-toaster::before{content:"\F1063"}.mdi-toaster-off::before{content:"\F11B7"}.mdi-toaster-oven::before{content:"\F0CD3"}.mdi-toggle-switch::before{content:"\F0521"}.mdi-toggle-switch-off::before{content:"\F0522"}.mdi-toggle-switch-off-outline::before{content:"\F0A19"}.mdi-toggle-switch-outline::before{content:"\F0A1A"}.mdi-toggle-switch-variant::before{content:"\F1A25"}.mdi-toggle-switch-variant-off::before{content:"\F1A26"}.mdi-toilet::before{content:"\F09AB"}.mdi-toolbox::before{content:"\F09AC"}.mdi-toolbox-outline::before{content:"\F09AD"}.mdi-tools::before{content:"\F1064"}.mdi-tooltip::before{content:"\F0523"}.mdi-tooltip-account::before{content:"\F000C"}.mdi-tooltip-cellphone::before{content:"\F183B"}.mdi-tooltip-check::before{content:"\F155C"}.mdi-tooltip-check-outline::before{content:"\F155D"}.mdi-tooltip-edit::before{content:"\F0524"}.mdi-tooltip-edit-outline::before{content:"\F12C5"}.mdi-tooltip-image::before{content:"\F0525"}.mdi-tooltip-image-outline::before{content:"\F0BD5"}.mdi-tooltip-minus::before{content:"\F155E"}.mdi-tooltip-minus-outline::before{content:"\F155F"}.mdi-tooltip-outline::before{content:"\F0526"}.mdi-tooltip-plus::before{content:"\F0BD6"}.mdi-tooltip-plus-outline::before{content:"\F0527"}.mdi-tooltip-question::before{content:"\F1BBA"}.mdi-tooltip-question-outline::before{content:"\F1BBB"}.mdi-tooltip-remove::before{content:"\F1560"}.mdi-tooltip-remove-outline::before{content:"\F1561"}.mdi-tooltip-text::before{content:"\F0528"}.mdi-tooltip-text-outline::before{content:"\F0BD7"}.mdi-tooth::before{content:"\F08C3"}.mdi-tooth-outline::before{content:"\F0529"}.mdi-toothbrush::before{content:"\F1129"}.mdi-toothbrush-electric::before{content:"\F112C"}.mdi-toothbrush-paste::before{content:"\F112A"}.mdi-torch::before{content:"\F1606"}.mdi-tortoise::before{content:"\F0D3B"}.mdi-toslink::before{content:"\F12B8"}.mdi-touch-text-outline::before{content:"\F1C60"}.mdi-tournament::before{content:"\F09AE"}.mdi-tow-truck::before{content:"\F083C"}.mdi-tower-beach::before{content:"\F0681"}.mdi-tower-fire::before{content:"\F0682"}.mdi-town-hall::before{content:"\F1875"}.mdi-toy-brick::before{content:"\F1288"}.mdi-toy-brick-marker::before{content:"\F1289"}.mdi-toy-brick-marker-outline::before{content:"\F128A"}.mdi-toy-brick-minus::before{content:"\F128B"}.mdi-toy-brick-minus-outline::before{content:"\F128C"}.mdi-toy-brick-outline::before{content:"\F128D"}.mdi-toy-brick-plus::before{content:"\F128E"}.mdi-toy-brick-plus-outline::before{content:"\F128F"}.mdi-toy-brick-remove::before{content:"\F1290"}.mdi-toy-brick-remove-outline::before{content:"\F1291"}.mdi-toy-brick-search::before{content:"\F1292"}.mdi-toy-brick-search-outline::before{content:"\F1293"}.mdi-track-light::before{content:"\F0914"}.mdi-track-light-off::before{content:"\F1B01"}.mdi-trackpad::before{content:"\F07F8"}.mdi-trackpad-lock::before{content:"\F0933"}.mdi-tractor::before{content:"\F0892"}.mdi-tractor-variant::before{content:"\F14C4"}.mdi-trademark::before{content:"\F0A78"}.mdi-traffic-cone::before{content:"\F137C"}.mdi-traffic-light::before{content:"\F052B"}.mdi-traffic-light-outline::before{content:"\F182A"}.mdi-train::before{content:"\F052C"}.mdi-train-bus::before{content:"\F1CC7"}.mdi-train-car::before{content:"\F0BD8"}.mdi-train-car-autorack::before{content:"\F1B2D"}.mdi-train-car-box::before{content:"\F1B2E"}.mdi-train-car-box-full::before{content:"\F1B2F"}.mdi-train-car-box-open::before{content:"\F1B30"}.mdi-train-car-caboose::before{content:"\F1B31"}.mdi-train-car-centerbeam::before{content:"\F1B32"}.mdi-train-car-centerbeam-full::before{content:"\F1B33"}.mdi-train-car-container::before{content:"\F1B34"}.mdi-train-car-flatbed::before{content:"\F1B35"}.mdi-train-car-flatbed-car::before{content:"\F1B36"}.mdi-train-car-flatbed-tank::before{content:"\F1B37"}.mdi-train-car-gondola::before{content:"\F1B38"}.mdi-train-car-gondola-full::before{content:"\F1B39"}.mdi-train-car-hopper::before{content:"\F1B3A"}.mdi-train-car-hopper-covered::before{content:"\F1B3B"}.mdi-train-car-hopper-full::before{content:"\F1B3C"}.mdi-train-car-intermodal::before{content:"\F1B3D"}.mdi-train-car-passenger::before{content:"\F1733"}.mdi-train-car-passenger-door::before{content:"\F1734"}.mdi-train-car-passenger-door-open::before{content:"\F1735"}.mdi-train-car-passenger-variant::before{content:"\F1736"}.mdi-train-car-tank::before{content:"\F1B3E"}.mdi-train-variant::before{content:"\F08C4"}.mdi-tram::before{content:"\F052D"}.mdi-tram-side::before{content:"\F0FE7"}.mdi-transcribe::before{content:"\F052E"}.mdi-transcribe-close::before{content:"\F052F"}.mdi-transfer::before{content:"\F1065"}.mdi-transfer-down::before{content:"\F0DA1"}.mdi-transfer-left::before{content:"\F0DA2"}.mdi-transfer-right::before{content:"\F0530"}.mdi-transfer-up::before{content:"\F0DA3"}.mdi-transit-connection::before{content:"\F0D3C"}.mdi-transit-connection-horizontal::before{content:"\F1546"}.mdi-transit-connection-variant::before{content:"\F0D3D"}.mdi-transit-detour::before{content:"\F0F8B"}.mdi-transit-skip::before{content:"\F1515"}.mdi-transit-transfer::before{content:"\F06AE"}.mdi-transition::before{content:"\F0915"}.mdi-transition-masked::before{content:"\F0916"}.mdi-translate::before{content:"\F05CA"}.mdi-translate-off::before{content:"\F0E06"}.mdi-translate-variant::before{content:"\F1B99"}.mdi-transmission-tower::before{content:"\F0D3E"}.mdi-transmission-tower-export::before{content:"\F192C"}.mdi-transmission-tower-import::before{content:"\F192D"}.mdi-transmission-tower-off::before{content:"\F19DD"}.mdi-trash-can::before{content:"\F0A79"}.mdi-trash-can-outline::before{content:"\F0A7A"}.mdi-tray::before{content:"\F1294"}.mdi-tray-alert::before{content:"\F1295"}.mdi-tray-arrow-down::before{content:"\F0120"}.mdi-tray-arrow-up::before{content:"\F011D"}.mdi-tray-full::before{content:"\F1296"}.mdi-tray-minus::before{content:"\F1297"}.mdi-tray-plus::before{content:"\F1298"}.mdi-tray-remove::before{content:"\F1299"}.mdi-treasure-chest::before{content:"\F0726"}.mdi-treasure-chest-outline::before{content:"\F1C77"}.mdi-tree::before{content:"\F0531"}.mdi-tree-outline::before{content:"\F0E69"}.mdi-trello::before{content:"\F0532"}.mdi-trending-down::before{content:"\F0533"}.mdi-trending-neutral::before{content:"\F0534"}.mdi-trending-up::before{content:"\F0535"}.mdi-triangle::before{content:"\F0536"}.mdi-triangle-down::before{content:"\F1C56"}.mdi-triangle-down-outline::before{content:"\F1C57"}.mdi-triangle-outline::before{content:"\F0537"}.mdi-triangle-small-down::before{content:"\F1A09"}.mdi-triangle-small-up::before{content:"\F1A0A"}.mdi-triangle-wave::before{content:"\F147C"}.mdi-triforce::before{content:"\F0BD9"}.mdi-trophy::before{content:"\F0538"}.mdi-trophy-award::before{content:"\F0539"}.mdi-trophy-broken::before{content:"\F0DA4"}.mdi-trophy-outline::before{content:"\F053A"}.mdi-trophy-variant::before{content:"\F053B"}.mdi-trophy-variant-outline::before{content:"\F053C"}.mdi-truck::before{content:"\F053D"}.mdi-truck-alert::before{content:"\F19DE"}.mdi-truck-alert-outline::before{content:"\F19DF"}.mdi-truck-cargo-container::before{content:"\F18D8"}.mdi-truck-check::before{content:"\F0CD4"}.mdi-truck-check-outline::before{content:"\F129A"}.mdi-truck-delivery::before{content:"\F053E"}.mdi-truck-delivery-outline::before{content:"\F129B"}.mdi-truck-fast::before{content:"\F0788"}.mdi-truck-fast-outline::before{content:"\F129C"}.mdi-truck-flatbed::before{content:"\F1891"}.mdi-truck-minus::before{content:"\F19AE"}.mdi-truck-minus-outline::before{content:"\F19BD"}.mdi-truck-off-road::before{content:"\F1C9E"}.mdi-truck-off-road-off::before{content:"\F1C9F"}.mdi-truck-outline::before{content:"\F129D"}.mdi-truck-plus::before{content:"\F19AD"}.mdi-truck-plus-outline::before{content:"\F19BC"}.mdi-truck-remove::before{content:"\F19AF"}.mdi-truck-remove-outline::before{content:"\F19BE"}.mdi-truck-snowflake::before{content:"\F19A6"}.mdi-truck-trailer::before{content:"\F0727"}.mdi-trumpet::before{content:"\F1096"}.mdi-tshirt-crew::before{content:"\F0A7B"}.mdi-tshirt-crew-outline::before{content:"\F053F"}.mdi-tshirt-v::before{content:"\F0A7C"}.mdi-tshirt-v-outline::before{content:"\F0540"}.mdi-tsunami::before{content:"\F1A81"}.mdi-tumble-dryer::before{content:"\F0917"}.mdi-tumble-dryer-alert::before{content:"\F11BA"}.mdi-tumble-dryer-off::before{content:"\F11BB"}.mdi-tune::before{content:"\F062E"}.mdi-tune-variant::before{content:"\F1542"}.mdi-tune-vertical::before{content:"\F066A"}.mdi-tune-vertical-variant::before{content:"\F1543"}.mdi-tunnel::before{content:"\F183D"}.mdi-tunnel-outline::before{content:"\F183E"}.mdi-turbine::before{content:"\F1A82"}.mdi-turkey::before{content:"\F171B"}.mdi-turnstile::before{content:"\F0CD5"}.mdi-turnstile-outline::before{content:"\F0CD6"}.mdi-turtle::before{content:"\F0CD7"}.mdi-twitch::before{content:"\F0543"}.mdi-twitter::before{content:"\F0544"}.mdi-two-factor-authentication::before{content:"\F09AF"}.mdi-typewriter::before{content:"\F0F2D"}.mdi-ubisoft::before{content:"\F0BDA"}.mdi-ubuntu::before{content:"\F0548"}.mdi-ufo::before{content:"\F10C4"}.mdi-ufo-outline::before{content:"\F10C5"}.mdi-ultra-high-definition::before{content:"\F07F9"}.mdi-umbraco::before{content:"\F0549"}.mdi-umbrella::before{content:"\F054A"}.mdi-umbrella-beach::before{content:"\F188A"}.mdi-umbrella-beach-outline::before{content:"\F188B"}.mdi-umbrella-closed::before{content:"\F09B0"}.mdi-umbrella-closed-outline::before{content:"\F13E2"}.mdi-umbrella-closed-variant::before{content:"\F13E1"}.mdi-umbrella-outline::before{content:"\F054B"}.mdi-underwear-outline::before{content:"\F1D0F"}.mdi-undo::before{content:"\F054C"}.mdi-undo-variant::before{content:"\F054D"}.mdi-unfold-less-horizontal::before{content:"\F054E"}.mdi-unfold-less-vertical::before{content:"\F0760"}.mdi-unfold-more-horizontal::before{content:"\F054F"}.mdi-unfold-more-vertical::before{content:"\F0761"}.mdi-ungroup::before{content:"\F0550"}.mdi-unicode::before{content:"\F0ED0"}.mdi-unicorn::before{content:"\F15C2"}.mdi-unicorn-variant::before{content:"\F15C3"}.mdi-unicycle::before{content:"\F15E5"}.mdi-unity::before{content:"\F06AF"}.mdi-unreal::before{content:"\F09B1"}.mdi-update::before{content:"\F06B0"}.mdi-upload::before{content:"\F0552"}.mdi-upload-box::before{content:"\F1D10"}.mdi-upload-box-outline::before{content:"\F1D11"}.mdi-upload-circle::before{content:"\F1D12"}.mdi-upload-circle-outline::before{content:"\F1D13"}.mdi-upload-lock::before{content:"\F1373"}.mdi-upload-lock-outline::before{content:"\F1374"}.mdi-upload-multiple::before{content:"\F083D"}.mdi-upload-multiple-outline::before{content:"\F1D14"}.mdi-upload-network::before{content:"\F06F6"}.mdi-upload-network-outline::before{content:"\F0CD8"}.mdi-upload-off::before{content:"\F10C6"}.mdi-upload-off-outline::before{content:"\F10C7"}.mdi-upload-outline::before{content:"\F0E07"}.mdi-usb::before{content:"\F0553"}.mdi-usb-c-port::before{content:"\F1CBF"}.mdi-usb-flash-drive::before{content:"\F129E"}.mdi-usb-flash-drive-outline::before{content:"\F129F"}.mdi-usb-port::before{content:"\F11F0"}.mdi-vacuum::before{content:"\F19A1"}.mdi-vacuum-outline::before{content:"\F19A2"}.mdi-valve::before{content:"\F1066"}.mdi-valve-closed::before{content:"\F1067"}.mdi-valve-open::before{content:"\F1068"}.mdi-van-passenger::before{content:"\F07FA"}.mdi-van-utility::before{content:"\F07FB"}.mdi-vanish::before{content:"\F07FC"}.mdi-vanish-quarter::before{content:"\F1554"}.mdi-vanity-light::before{content:"\F11E1"}.mdi-variable::before{content:"\F0AE7"}.mdi-variable-box::before{content:"\F1111"}.mdi-vector-arrange-above::before{content:"\F0554"}.mdi-vector-arrange-below::before{content:"\F0555"}.mdi-vector-bezier::before{content:"\F0AE8"}.mdi-vector-circle::before{content:"\F0556"}.mdi-vector-circle-variant::before{content:"\F0557"}.mdi-vector-combine::before{content:"\F0558"}.mdi-vector-curve::before{content:"\F0559"}.mdi-vector-difference::before{content:"\F055A"}.mdi-vector-difference-ab::before{content:"\F055B"}.mdi-vector-difference-ba::before{content:"\F055C"}.mdi-vector-ellipse::before{content:"\F0893"}.mdi-vector-intersection::before{content:"\F055D"}.mdi-vector-line::before{content:"\F055E"}.mdi-vector-link::before{content:"\F0FE8"}.mdi-vector-point::before{content:"\F01C4"}.mdi-vector-point-edit::before{content:"\F09E8"}.mdi-vector-point-minus::before{content:"\F1B78"}.mdi-vector-point-plus::before{content:"\F1B79"}.mdi-vector-point-select::before{content:"\F055F"}.mdi-vector-polygon::before{content:"\F0560"}.mdi-vector-polygon-variant::before{content:"\F1856"}.mdi-vector-polyline::before{content:"\F0561"}.mdi-vector-polyline-edit::before{content:"\F1225"}.mdi-vector-polyline-minus::before{content:"\F1226"}.mdi-vector-polyline-plus::before{content:"\F1227"}.mdi-vector-polyline-remove::before{content:"\F1228"}.mdi-vector-radius::before{content:"\F074A"}.mdi-vector-rectangle::before{content:"\F05C6"}.mdi-vector-selection::before{content:"\F0562"}.mdi-vector-square::before{content:"\F0001"}.mdi-vector-square-close::before{content:"\F1857"}.mdi-vector-square-edit::before{content:"\F18D9"}.mdi-vector-square-minus::before{content:"\F18DA"}.mdi-vector-square-open::before{content:"\F1858"}.mdi-vector-square-plus::before{content:"\F18DB"}.mdi-vector-square-remove::before{content:"\F18DC"}.mdi-vector-triangle::before{content:"\F0563"}.mdi-vector-union::before{content:"\F0564"}.mdi-vhs::before{content:"\F0A1B"}.mdi-vibrate::before{content:"\F0566"}.mdi-vibrate-off::before{content:"\F0CD9"}.mdi-video::before{content:"\F0567"}.mdi-video-2d::before{content:"\F1A1C"}.mdi-video-3d::before{content:"\F07FD"}.mdi-video-3d-off::before{content:"\F13D9"}.mdi-video-3d-variant::before{content:"\F0ED1"}.mdi-video-4k-box::before{content:"\F083E"}.mdi-video-account::before{content:"\F0919"}.mdi-video-box::before{content:"\F00FD"}.mdi-video-box-off::before{content:"\F00FE"}.mdi-video-check::before{content:"\F1069"}.mdi-video-check-outline::before{content:"\F106A"}.mdi-video-high-definition::before{content:"\F152E"}.mdi-video-image::before{content:"\F091A"}.mdi-video-input-antenna::before{content:"\F083F"}.mdi-video-input-component::before{content:"\F0840"}.mdi-video-input-hdmi::before{content:"\F0841"}.mdi-video-input-scart::before{content:"\F0F8C"}.mdi-video-input-svideo::before{content:"\F0842"}.mdi-video-marker::before{content:"\F19A9"}.mdi-video-marker-outline::before{content:"\F19AA"}.mdi-video-minus::before{content:"\F09B2"}.mdi-video-minus-outline::before{content:"\F02BA"}.mdi-video-off::before{content:"\F0568"}.mdi-video-off-outline::before{content:"\F0BDB"}.mdi-video-outline::before{content:"\F0BDC"}.mdi-video-plus::before{content:"\F09B3"}.mdi-video-plus-outline::before{content:"\F01D3"}.mdi-video-stabilization::before{content:"\F091B"}.mdi-video-standard-definition::before{content:"\F1CA0"}.mdi-video-switch::before{content:"\F0569"}.mdi-video-switch-outline::before{content:"\F0790"}.mdi-video-vintage::before{content:"\F0A1C"}.mdi-video-wireless::before{content:"\F0ED2"}.mdi-video-wireless-outline::before{content:"\F0ED3"}.mdi-view-agenda::before{content:"\F056A"}.mdi-view-agenda-outline::before{content:"\F11D8"}.mdi-view-array::before{content:"\F056B"}.mdi-view-array-outline::before{content:"\F1485"}.mdi-view-carousel::before{content:"\F056C"}.mdi-view-carousel-outline::before{content:"\F1486"}.mdi-view-column::before{content:"\F056D"}.mdi-view-column-outline::before{content:"\F1487"}.mdi-view-comfy::before{content:"\F0E6A"}.mdi-view-comfy-outline::before{content:"\F1488"}.mdi-view-compact::before{content:"\F0E6B"}.mdi-view-compact-outline::before{content:"\F0E6C"}.mdi-view-dashboard::before{content:"\F056E"}.mdi-view-dashboard-edit::before{content:"\F1947"}.mdi-view-dashboard-edit-outline::before{content:"\F1948"}.mdi-view-dashboard-outline::before{content:"\F0A1D"}.mdi-view-dashboard-variant::before{content:"\F0843"}.mdi-view-dashboard-variant-outline::before{content:"\F1489"}.mdi-view-day::before{content:"\F056F"}.mdi-view-day-outline::before{content:"\F148A"}.mdi-view-gallery::before{content:"\F1888"}.mdi-view-gallery-outline::before{content:"\F1889"}.mdi-view-grid::before{content:"\F0570"}.mdi-view-grid-compact::before{content:"\F1C61"}.mdi-view-grid-outline::before{content:"\F11D9"}.mdi-view-grid-plus::before{content:"\F0F8D"}.mdi-view-grid-plus-outline::before{content:"\F11DA"}.mdi-view-headline::before{content:"\F0571"}.mdi-view-list::before{content:"\F0572"}.mdi-view-list-outline::before{content:"\F148B"}.mdi-view-module::before{content:"\F0573"}.mdi-view-module-outline::before{content:"\F148C"}.mdi-view-parallel::before{content:"\F0728"}.mdi-view-parallel-outline::before{content:"\F148D"}.mdi-view-quilt::before{content:"\F0574"}.mdi-view-quilt-outline::before{content:"\F148E"}.mdi-view-sequential::before{content:"\F0729"}.mdi-view-sequential-outline::before{content:"\F148F"}.mdi-view-split-horizontal::before{content:"\F0BCB"}.mdi-view-split-vertical::before{content:"\F0BCC"}.mdi-view-stream::before{content:"\F0575"}.mdi-view-stream-outline::before{content:"\F1490"}.mdi-view-week::before{content:"\F0576"}.mdi-view-week-outline::before{content:"\F1491"}.mdi-vimeo::before{content:"\F0577"}.mdi-violin::before{content:"\F060F"}.mdi-virtual-reality::before{content:"\F0894"}.mdi-virus::before{content:"\F13B6"}.mdi-virus-off::before{content:"\F18E1"}.mdi-virus-off-outline::before{content:"\F18E2"}.mdi-virus-outline::before{content:"\F13B7"}.mdi-vlc::before{content:"\F057C"}.mdi-voicemail::before{content:"\F057D"}.mdi-volcano::before{content:"\F1A83"}.mdi-volcano-outline::before{content:"\F1A84"}.mdi-volleyball::before{content:"\F09B4"}.mdi-volume-equal::before{content:"\F1B10"}.mdi-volume-high::before{content:"\F057E"}.mdi-volume-low::before{content:"\F057F"}.mdi-volume-medium::before{content:"\F0580"}.mdi-volume-minus::before{content:"\F075E"}.mdi-volume-mute::before{content:"\F075F"}.mdi-volume-off::before{content:"\F0581"}.mdi-volume-plus::before{content:"\F075D"}.mdi-volume-source::before{content:"\F1120"}.mdi-volume-variant-off::before{content:"\F0E08"}.mdi-volume-vibrate::before{content:"\F1121"}.mdi-vote::before{content:"\F0A1F"}.mdi-vote-outline::before{content:"\F0A20"}.mdi-vpn::before{content:"\F0582"}.mdi-vuejs::before{content:"\F0844"}.mdi-vuetify::before{content:"\F0E6D"}.mdi-walk::before{content:"\F0583"}.mdi-wall::before{content:"\F07FE"}.mdi-wall-fire::before{content:"\F1A11"}.mdi-wall-sconce::before{content:"\F091C"}.mdi-wall-sconce-flat::before{content:"\F091D"}.mdi-wall-sconce-flat-outline::before{content:"\F17C9"}.mdi-wall-sconce-flat-variant::before{content:"\F041C"}.mdi-wall-sconce-flat-variant-outline::before{content:"\F17CA"}.mdi-wall-sconce-outline::before{content:"\F17CB"}.mdi-wall-sconce-round::before{content:"\F0748"}.mdi-wall-sconce-round-outline::before{content:"\F17CC"}.mdi-wall-sconce-round-variant::before{content:"\F091E"}.mdi-wall-sconce-round-variant-outline::before{content:"\F17CD"}.mdi-wallet::before{content:"\F0584"}.mdi-wallet-bifold::before{content:"\F1C58"}.mdi-wallet-bifold-outline::before{content:"\F1C59"}.mdi-wallet-giftcard::before{content:"\F0585"}.mdi-wallet-membership::before{content:"\F0586"}.mdi-wallet-outline::before{content:"\F0BDD"}.mdi-wallet-plus::before{content:"\F0F8E"}.mdi-wallet-plus-outline::before{content:"\F0F8F"}.mdi-wallet-travel::before{content:"\F0587"}.mdi-wallpaper::before{content:"\F0E09"}.mdi-wan::before{content:"\F0588"}.mdi-wardrobe::before{content:"\F0F90"}.mdi-wardrobe-outline::before{content:"\F0F91"}.mdi-warehouse::before{content:"\F0F81"}.mdi-washing-machine::before{content:"\F072A"}.mdi-washing-machine-alert::before{content:"\F11BC"}.mdi-washing-machine-off::before{content:"\F11BD"}.mdi-watch::before{content:"\F0589"}.mdi-watch-export::before{content:"\F058A"}.mdi-watch-export-variant::before{content:"\F0895"}.mdi-watch-import::before{content:"\F058B"}.mdi-watch-import-variant::before{content:"\F0896"}.mdi-watch-variant::before{content:"\F0897"}.mdi-watch-vibrate::before{content:"\F06B1"}.mdi-watch-vibrate-off::before{content:"\F0CDA"}.mdi-water::before{content:"\F058C"}.mdi-water-alert::before{content:"\F1502"}.mdi-water-alert-outline::before{content:"\F1503"}.mdi-water-boiler::before{content:"\F0F92"}.mdi-water-boiler-alert::before{content:"\F11B3"}.mdi-water-boiler-auto::before{content:"\F1B98"}.mdi-water-boiler-off::before{content:"\F11B4"}.mdi-water-check::before{content:"\F1504"}.mdi-water-check-outline::before{content:"\F1505"}.mdi-water-circle::before{content:"\F1806"}.mdi-water-minus::before{content:"\F1506"}.mdi-water-minus-outline::before{content:"\F1507"}.mdi-water-off::before{content:"\F058D"}.mdi-water-off-outline::before{content:"\F1508"}.mdi-water-opacity::before{content:"\F1855"}.mdi-water-outline::before{content:"\F0E0A"}.mdi-water-percent::before{content:"\F058E"}.mdi-water-percent-alert::before{content:"\F1509"}.mdi-water-plus::before{content:"\F150A"}.mdi-water-plus-outline::before{content:"\F150B"}.mdi-water-polo::before{content:"\F12A0"}.mdi-water-pump::before{content:"\F058F"}.mdi-water-pump-off::before{content:"\F0F93"}.mdi-water-remove::before{content:"\F150C"}.mdi-water-remove-outline::before{content:"\F150D"}.mdi-water-sync::before{content:"\F17C6"}.mdi-water-thermometer::before{content:"\F1A85"}.mdi-water-thermometer-outline::before{content:"\F1A86"}.mdi-water-well::before{content:"\F106B"}.mdi-water-well-outline::before{content:"\F106C"}.mdi-waterfall::before{content:"\F1849"}.mdi-watering-can::before{content:"\F1481"}.mdi-watering-can-outline::before{content:"\F1482"}.mdi-watermark::before{content:"\F0612"}.mdi-wave::before{content:"\F0F2E"}.mdi-wave-arrow-down::before{content:"\F1CB0"}.mdi-wave-arrow-up::before{content:"\F1CB1"}.mdi-wave-undercurrent::before{content:"\F1CC0"}.mdi-waveform::before{content:"\F147D"}.mdi-waves::before{content:"\F078D"}.mdi-waves-arrow-left::before{content:"\F1859"}.mdi-waves-arrow-right::before{content:"\F185A"}.mdi-waves-arrow-up::before{content:"\F185B"}.mdi-waze::before{content:"\F0BDE"}.mdi-weather-cloudy::before{content:"\F0590"}.mdi-weather-cloudy-alert::before{content:"\F0F2F"}.mdi-weather-cloudy-arrow-right::before{content:"\F0E6E"}.mdi-weather-cloudy-clock::before{content:"\F18F6"}.mdi-weather-dust::before{content:"\F1B5A"}.mdi-weather-fog::before{content:"\F0591"}.mdi-weather-hail::before{content:"\F0592"}.mdi-weather-hazy::before{content:"\F0F30"}.mdi-weather-hurricane::before{content:"\F0898"}.mdi-weather-hurricane-outline::before{content:"\F1C78"}.mdi-weather-lightning::before{content:"\F0593"}.mdi-weather-lightning-rainy::before{content:"\F067E"}.mdi-weather-moonset::before{content:"\F1D15"}.mdi-weather-moonset-down::before{content:"\F1D16"}.mdi-weather-moonset-up::before{content:"\F1D17"}.mdi-weather-night::before{content:"\F0594"}.mdi-weather-night-partly-cloudy::before{content:"\F0F31"}.mdi-weather-partly-cloudy::before{content:"\F0595"}.mdi-weather-partly-lightning::before{content:"\F0F32"}.mdi-weather-partly-rainy::before{content:"\F0F33"}.mdi-weather-partly-snowy::before{content:"\F0F34"}.mdi-weather-partly-snowy-rainy::before{content:"\F0F35"}.mdi-weather-pouring::before{content:"\F0596"}.mdi-weather-rainy::before{content:"\F0597"}.mdi-weather-snowy::before{content:"\F0598"}.mdi-weather-snowy-heavy::before{content:"\F0F36"}.mdi-weather-snowy-rainy::before{content:"\F067F"}.mdi-weather-sunny::before{content:"\F0599"}.mdi-weather-sunny-alert::before{content:"\F0F37"}.mdi-weather-sunny-off::before{content:"\F14E4"}.mdi-weather-sunset::before{content:"\F059A"}.mdi-weather-sunset-down::before{content:"\F059B"}.mdi-weather-sunset-up::before{content:"\F059C"}.mdi-weather-tornado::before{content:"\F0F38"}.mdi-weather-windy::before{content:"\F059D"}.mdi-weather-windy-variant::before{content:"\F059E"}.mdi-web::before{content:"\F059F"}.mdi-web-box::before{content:"\F0F94"}.mdi-web-cancel::before{content:"\F1790"}.mdi-web-check::before{content:"\F0789"}.mdi-web-clock::before{content:"\F124A"}.mdi-web-minus::before{content:"\F10A0"}.mdi-web-off::before{content:"\F0A8E"}.mdi-web-plus::before{content:"\F0033"}.mdi-web-refresh::before{content:"\F1791"}.mdi-web-remove::before{content:"\F0551"}.mdi-web-sync::before{content:"\F1792"}.mdi-webcam::before{content:"\F05A0"}.mdi-webcam-off::before{content:"\F1737"}.mdi-webhook::before{content:"\F062F"}.mdi-webpack::before{content:"\F072B"}.mdi-webrtc::before{content:"\F1248"}.mdi-wechat::before{content:"\F0611"}.mdi-weight::before{content:"\F05A1"}.mdi-weight-gram::before{content:"\F0D3F"}.mdi-weight-kilogram::before{content:"\F05A2"}.mdi-weight-lifter::before{content:"\F115D"}.mdi-weight-pound::before{content:"\F09B5"}.mdi-whatsapp::before{content:"\F05A3"}.mdi-wheel-barrow::before{content:"\F14F2"}.mdi-wheelchair::before{content:"\F1A87"}.mdi-wheelchair-accessibility::before{content:"\F05A4"}.mdi-whistle::before{content:"\F09B6"}.mdi-whistle-outline::before{content:"\F12BC"}.mdi-white-balance-auto::before{content:"\F05A5"}.mdi-white-balance-incandescent::before{content:"\F05A6"}.mdi-white-balance-iridescent::before{content:"\F05A7"}.mdi-white-balance-sunny::before{content:"\F05A8"}.mdi-widgets::before{content:"\F072C"}.mdi-widgets-outline::before{content:"\F1355"}.mdi-wifi::before{content:"\F05A9"}.mdi-wifi-alert::before{content:"\F16B5"}.mdi-wifi-arrow-down::before{content:"\F16B6"}.mdi-wifi-arrow-left::before{content:"\F16B7"}.mdi-wifi-arrow-left-right::before{content:"\F16B8"}.mdi-wifi-arrow-right::before{content:"\F16B9"}.mdi-wifi-arrow-up::before{content:"\F16BA"}.mdi-wifi-arrow-up-down::before{content:"\F16BB"}.mdi-wifi-cancel::before{content:"\F16BC"}.mdi-wifi-check::before{content:"\F16BD"}.mdi-wifi-cog::before{content:"\F16BE"}.mdi-wifi-lock::before{content:"\F16BF"}.mdi-wifi-lock-open::before{content:"\F16C0"}.mdi-wifi-marker::before{content:"\F16C1"}.mdi-wifi-minus::before{content:"\F16C2"}.mdi-wifi-off::before{content:"\F05AA"}.mdi-wifi-plus::before{content:"\F16C3"}.mdi-wifi-refresh::before{content:"\F16C4"}.mdi-wifi-remove::before{content:"\F16C5"}.mdi-wifi-settings::before{content:"\F16C6"}.mdi-wifi-star::before{content:"\F0E0B"}.mdi-wifi-strength-1::before{content:"\F091F"}.mdi-wifi-strength-1-alert::before{content:"\F0920"}.mdi-wifi-strength-1-lock::before{content:"\F0921"}.mdi-wifi-strength-1-lock-open::before{content:"\F16CB"}.mdi-wifi-strength-2::before{content:"\F0922"}.mdi-wifi-strength-2-alert::before{content:"\F0923"}.mdi-wifi-strength-2-lock::before{content:"\F0924"}.mdi-wifi-strength-2-lock-open::before{content:"\F16CC"}.mdi-wifi-strength-3::before{content:"\F0925"}.mdi-wifi-strength-3-alert::before{content:"\F0926"}.mdi-wifi-strength-3-lock::before{content:"\F0927"}.mdi-wifi-strength-3-lock-open::before{content:"\F16CD"}.mdi-wifi-strength-4::before{content:"\F0928"}.mdi-wifi-strength-4-alert::before{content:"\F0929"}.mdi-wifi-strength-4-lock::before{content:"\F092A"}.mdi-wifi-strength-4-lock-open::before{content:"\F16CE"}.mdi-wifi-strength-alert-outline::before{content:"\F092B"}.mdi-wifi-strength-lock-open-outline::before{content:"\F16CF"}.mdi-wifi-strength-lock-outline::before{content:"\F092C"}.mdi-wifi-strength-off::before{content:"\F092D"}.mdi-wifi-strength-off-outline::before{content:"\F092E"}.mdi-wifi-strength-outline::before{content:"\F092F"}.mdi-wifi-sync::before{content:"\F16C7"}.mdi-wikipedia::before{content:"\F05AC"}.mdi-wind-power::before{content:"\F1A88"}.mdi-wind-power-outline::before{content:"\F1A89"}.mdi-wind-turbine::before{content:"\F0DA5"}.mdi-wind-turbine-alert::before{content:"\F19AB"}.mdi-wind-turbine-check::before{content:"\F19AC"}.mdi-window-close::before{content:"\F05AD"}.mdi-window-closed::before{content:"\F05AE"}.mdi-window-closed-variant::before{content:"\F11DB"}.mdi-window-maximize::before{content:"\F05AF"}.mdi-window-minimize::before{content:"\F05B0"}.mdi-window-open::before{content:"\F05B1"}.mdi-window-open-variant::before{content:"\F11DC"}.mdi-window-restore::before{content:"\F05B2"}.mdi-window-shutter::before{content:"\F111C"}.mdi-window-shutter-alert::before{content:"\F111D"}.mdi-window-shutter-auto::before{content:"\F1BA3"}.mdi-window-shutter-cog::before{content:"\F1A8A"}.mdi-window-shutter-open::before{content:"\F111E"}.mdi-window-shutter-settings::before{content:"\F1A8B"}.mdi-windsock::before{content:"\F15FA"}.mdi-wiper::before{content:"\F0AE9"}.mdi-wiper-wash::before{content:"\F0DA6"}.mdi-wiper-wash-alert::before{content:"\F18DF"}.mdi-wizard-hat::before{content:"\F1477"}.mdi-wordpress::before{content:"\F05B4"}.mdi-wrap::before{content:"\F05B6"}.mdi-wrap-disabled::before{content:"\F0BDF"}.mdi-wrench::before{content:"\F05B7"}.mdi-wrench-check::before{content:"\F1B8F"}.mdi-wrench-check-outline::before{content:"\F1B90"}.mdi-wrench-clock::before{content:"\F19A3"}.mdi-wrench-clock-outline::before{content:"\F1B93"}.mdi-wrench-cog::before{content:"\F1B91"}.mdi-wrench-cog-outline::before{content:"\F1B92"}.mdi-wrench-outline::before{content:"\F0BE0"}.mdi-xamarin::before{content:"\F0845"}.mdi-xml::before{content:"\F05C0"}.mdi-xmpp::before{content:"\F07FF"}.mdi-yahoo::before{content:"\F0B4F"}.mdi-yeast::before{content:"\F05C1"}.mdi-yin-yang::before{content:"\F0680"}.mdi-yoga::before{content:"\F117C"}.mdi-youtube::before{content:"\F05C3"}.mdi-youtube-gaming::before{content:"\F0848"}.mdi-youtube-studio::before{content:"\F0847"}.mdi-youtube-subscription::before{content:"\F0D40"}.mdi-youtube-tv::before{content:"\F0448"}.mdi-yurt::before{content:"\F1516"}.mdi-z-wave::before{content:"\F0AEA"}.mdi-zend::before{content:"\F0AEB"}.mdi-zigbee::before{content:"\F0D41"}.mdi-zip-box::before{content:"\F05C4"}.mdi-zip-box-outline::before{content:"\F0FFA"}.mdi-zip-disk::before{content:"\F0A23"}.mdi-zodiac-aquarius::before{content:"\F0A7D"}.mdi-zodiac-aries::before{content:"\F0A7E"}.mdi-zodiac-cancer::before{content:"\F0A7F"}.mdi-zodiac-capricorn::before{content:"\F0A80"}.mdi-zodiac-gemini::before{content:"\F0A81"}.mdi-zodiac-leo::before{content:"\F0A82"}.mdi-zodiac-libra::before{content:"\F0A83"}.mdi-zodiac-pisces::before{content:"\F0A84"}.mdi-zodiac-sagittarius::before{content:"\F0A85"}.mdi-zodiac-scorpio::before{content:"\F0A86"}.mdi-zodiac-taurus::before{content:"\F0A87"}.mdi-zodiac-virgo::before{content:"\F0A88"}.mdi-blank::before{content:"\F68C";visibility:hidden}.mdi-18px.mdi-set,.mdi-18px.mdi:before{font-size:18px}.mdi-24px.mdi-set,.mdi-24px.mdi:before{font-size:24px}.mdi-36px.mdi-set,.mdi-36px.mdi:before{font-size:36px}.mdi-48px.mdi-set,.mdi-48px.mdi:before{font-size:48px}.mdi-dark:before{color:rgba(0,0,0,0.54)}.mdi-dark.mdi-inactive:before{color:rgba(0,0,0,0.26)}.mdi-light:before{color:#fff}.mdi-light.mdi-inactive:before{color:rgba(255,255,255,0.3)}.mdi-rotate-45:before{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.mdi-rotate-90:before{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.mdi-rotate-135:before{-webkit-transform:rotate(135deg);-ms-transform:rotate(135deg);transform:rotate(135deg)}.mdi-rotate-180:before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.mdi-rotate-225:before{-webkit-transform:rotate(225deg);-ms-transform:rotate(225deg);transform:rotate(225deg)}.mdi-rotate-270:before{-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.mdi-rotate-315:before{-webkit-transform:rotate(315deg);-ms-transform:rotate(315deg);transform:rotate(315deg)}.mdi-flip-h:before{-webkit-transform:scaleX(-1);transform:scaleX(-1);filter:FlipH;-ms-filter:"FlipH"}.mdi-flip-v:before{-webkit-transform:scaleY(-1);transform:scaleY(-1);filter:FlipV;-ms-filter:"FlipV"}.mdi-spin:before{-webkit-animation:mdi-spin 2s infinite linear;animation:mdi-spin 2s infinite linear}@-webkit-keyframes mdi-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes mdi-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}
+
+/*# sourceMappingURL=materialdesignicons.min.css.map */
\ No newline at end of file
diff --git a/public/assets/@mdi/font/css/materialdesignicons.min.css.map b/public/assets/@mdi/font/css/materialdesignicons.min.css.map
new file mode 100644
index 0000000000000000000000000000000000000000..c179c667aeb8b33208c8ee15e23cc828fac5344f
--- /dev/null
+++ b/public/assets/@mdi/font/css/materialdesignicons.min.css.map
@@ -0,0 +1,16 @@
+{
+ "version": 3,
+ "file": "materialdesignicons.css",
+ "sources": [
+ "../scss/materialdesignicons.scss",
+ "../scss/_variables.scss",
+ "../scss/_functions.scss",
+ "../scss/_path.scss",
+ "../scss/_core.scss",
+ "../scss/_icons.scss",
+ "../scss/_extras.scss",
+ "../scss/_animated.scss"
+ ],
+ "names": [],
+ "mappings": "AGAA,UAAU,CACR,WAAW,CAAE,uBAAmB,CAChC,GAAG,CAAE,wDAAuE,CAC5E,GAAG,CAAE,+DAA8E,CAAC,2BAA2B,CAC7G,0DAAyE,CAAC,eAAe,CACzF,yDAAwE,CAAC,cAAc,CACvF,wDAAuE,CAAC,kBAAkB,CAC5F,WAAW,CAAE,MAAM,CACnB,UAAU,CAAE,MAAM,CCRpB,AAAA,IAAI,AAAA,OAAO,CACX,QAAQ,AAAgB,CACtB,OAAO,CAAE,YAAY,CACrB,IAAI,CAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAwB,CAAC,uBAAmB,CACvE,SAAS,CAAE,OAAO,CAClB,cAAc,CAAE,IAAI,CACpB,WAAW,CAAE,OAAO,CACpB,sBAAsB,CAAE,WAAW,CACnC,uBAAuB,CAAE,SAAS,CACnC,ACRG,AAAA,eAAe,AAAA,QAAQ,AAAa,CAChC,OAAO,CHAC,QAAmC,CGC9C,AAFD,AAAA,WAAW,AAAA,QAAQ,AAAiB,CAChC,OAAO,CHAC,QAAmC,CGC9C,AAFD,AAAA,iBAAiB,AAAA,QAAQ,AAAW,CAChC,OAAO,CHAC,QAAmC,CGC9C,AAFD,AAAA,iBAAiB,AAAA,QAAQ,AAAW,CAChC,OAAO,CHAC,QAAmC,CGC9C,AAFD,AAAA,uBAAuB,AAAA,QAAQ,AAAK,CAChC,OAAO,CHAC,QAAmC,CGC9C,AAFD,AAAA,iBAAiB,AAAA,QAAQ,AAAW,CAChC,OAAO,CHAC,QAAmC,CGC9C,AAFD,AAAA,iBAAi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S,CAAE,cAA4B,CAC1C,AAmBT,AAAA,WAAW,AAAA,OAAO,AAAgB,CAC9B,iBAAiB,CAAE,UAAU,CAC7B,SAAS,CAAE,UAAU,CACrB,MAAM,CAAE,KAAK,CACb,UAAU,CAAE,OAAO,CACtB,AACD,AAAA,WAAW,AAAA,OAAO,AAAgB,CAC9B,iBAAiB,CAAE,UAAU,CAC7B,SAAS,CAAE,UAAU,CACrB,MAAM,CAAE,KAAK,CACb,UAAU,CAAE,OAAO,CACtB,AC/DD,AAAA,SAAS,AAAA,OAAO,AAAgB,CAC5B,iBAAiB,CAAE,QAA4B,CAAC,EAAE,CAAC,QAAQ,CAAC,MAAM,CAC1D,SAAS,CAAE,QAA4B,CAAC,EAAE,CAAC,QAAQ,CAAC,MAAM,CACrE,AAED,kBAAkB,CAAlB,QAAkB,CACd,EAAE,CACA,iBAAiB,CAAE,YAAY,CACvB,SAAS,CAAE,YAAY,CAEjC,IAAI,CACF,iBAAiB,CAAE,cAAc,CACzB,SAAS,CAAE,cAAc,EAIvC,UAAU,CAAV,QAAU,CACN,EAAE,CACA,iBAAiB,CAAE,YAAY,CACvB,SAAS,CAAE,YAAY,CAEjC,IAAI,CACF,iBAAiB,CAAE,cAAc,CACzB,SAAS,CAAE,cAAc"
+}
\ No newline at end of file
diff --git a/public/assets/@mdi/font/fonts/materialdesignicons-webfont.woff2 b/public/assets/@mdi/font/fonts/materialdesignicons-webfont.woff2
new file mode 100644
index 0000000000000000000000000000000000000000..8c69b85f666bf3996d7e3194623bf53e774c44a3
Binary files /dev/null and b/public/assets/@mdi/font/fonts/materialdesignicons-webfont.woff2 differ
diff --git a/public/assets/cesium-68463534.js b/public/assets/cesium-68463534.js
new file mode 100644
index 0000000000000000000000000000000000000000..cc22b0813c4cf833393a5219fcd9f90ac0980fae
--- /dev/null
+++ b/public/assets/cesium-68463534.js
@@ -0,0 +1,170170 @@
+function _mergeNamespaces(e, t) {
+ for (var n = 0; n < t.length; n++) {
+ const i = t[n];
+ if (typeof i != "string" && !Array.isArray(i)) {
+ for (const r in i)
+ if (r !== "default" && !(r in e)) {
+ const o = Object.getOwnPropertyDescriptor(i, r);
+ o && Object.defineProperty(e, r, o.get ? o : {
+ enumerable: !0,
+ get: () => i[r]
+ });
+ }
+ }
+ }
+ return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }));
+}
+function defined(e) {
+ return e != null;
+}
+function DeveloperError(e) {
+ this.name = "DeveloperError", this.message = e;
+ let t;
+ try {
+ throw new Error();
+ } catch (n) {
+ t = n.stack;
+ }
+ this.stack = t;
+}
+defined(Object.create) && (DeveloperError.prototype = Object.create(Error.prototype), DeveloperError.prototype.constructor = DeveloperError);
+DeveloperError.prototype.toString = function() {
+ let e = `${this.name}: ${this.message}`;
+ return defined(this.stack) && (e += `
+${this.stack.toString()}`), e;
+};
+DeveloperError.throwInstantiationError = function() {
+ throw new DeveloperError(
+ "This function defines an interface and should not be called directly."
+ );
+};
+const Check = {};
+Check.typeOf = {};
+function getUndefinedErrorMessage(e) {
+ return `${e} is required, actual value was undefined`;
+}
+function getFailedTypeErrorMessage(e, t, n) {
+ return `Expected ${n} to be typeof ${t}, actual typeof was ${e}`;
+}
+Check.defined = function(e, t) {
+ if (!defined(t))
+ throw new DeveloperError(getUndefinedErrorMessage(e));
+};
+Check.typeOf.func = function(e, t) {
+ if (typeof t != "function")
+ throw new DeveloperError(
+ getFailedTypeErrorMessage(typeof t, "function", e)
+ );
+};
+Check.typeOf.string = function(e, t) {
+ if (typeof t != "string")
+ throw new DeveloperError(
+ getFailedTypeErrorMessage(typeof t, "string", e)
+ );
+};
+Check.typeOf.number = function(e, t) {
+ if (typeof t != "number")
+ throw new DeveloperError(
+ getFailedTypeErrorMessage(typeof t, "number", e)
+ );
+};
+Check.typeOf.number.lessThan = function(e, t, n) {
+ if (Check.typeOf.number(e, t), t >= n)
+ throw new DeveloperError(
+ `Expected ${e} to be less than ${n}, actual value was ${t}`
+ );
+};
+Check.typeOf.number.lessThanOrEquals = function(e, t, n) {
+ if (Check.typeOf.number(e, t), t > n)
+ throw new DeveloperError(
+ `Expected ${e} to be less than or equal to ${n}, actual value was ${t}`
+ );
+};
+Check.typeOf.number.greaterThan = function(e, t, n) {
+ if (Check.typeOf.number(e, t), t <= n)
+ throw new DeveloperError(
+ `Expected ${e} to be greater than ${n}, actual value was ${t}`
+ );
+};
+Check.typeOf.number.greaterThanOrEquals = function(e, t, n) {
+ if (Check.typeOf.number(e, t), t < n)
+ throw new DeveloperError(
+ `Expected ${e} to be greater than or equal to ${n}, actual value was ${t}`
+ );
+};
+Check.typeOf.object = function(e, t) {
+ if (typeof t != "object")
+ throw new DeveloperError(
+ getFailedTypeErrorMessage(typeof t, "object", e)
+ );
+};
+Check.typeOf.bool = function(e, t) {
+ if (typeof t != "boolean")
+ throw new DeveloperError(
+ getFailedTypeErrorMessage(typeof t, "boolean", e)
+ );
+};
+Check.typeOf.bigint = function(e, t) {
+ if (typeof t != "bigint")
+ throw new DeveloperError(
+ getFailedTypeErrorMessage(typeof t, "bigint", e)
+ );
+};
+Check.typeOf.number.equals = function(e, t, n, i) {
+ if (Check.typeOf.number(e, n), Check.typeOf.number(t, i), n !== i)
+ throw new DeveloperError(
+ `${e} must be equal to ${t}, the actual values are ${n} and ${i}`
+ );
+};
+function defaultValue(e, t) {
+ return e ?? t;
+}
+defaultValue.EMPTY_OBJECT = Object.freeze({});
+var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
+function getDefaultExportFromCjs(e) {
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
+}
+var MersenneTwister = function(e) {
+ e == null && (e = (/* @__PURE__ */ new Date()).getTime()), this.N = 624, this.M = 397, this.MATRIX_A = 2567483615, this.UPPER_MASK = 2147483648, this.LOWER_MASK = 2147483647, this.mt = new Array(this.N), this.mti = this.N + 1, e.constructor == Array ? this.init_by_array(e, e.length) : this.init_seed(e);
+};
+MersenneTwister.prototype.init_seed = function(e) {
+ for (this.mt[0] = e >>> 0, this.mti = 1; this.mti < this.N; this.mti++) {
+ var e = this.mt[this.mti - 1] ^ this.mt[this.mti - 1] >>> 30;
+ this.mt[this.mti] = (((e & 4294901760) >>> 16) * 1812433253 << 16) + (e & 65535) * 1812433253 + this.mti, this.mt[this.mti] >>>= 0;
+ }
+};
+MersenneTwister.prototype.init_by_array = function(e, t) {
+ var n, i, r;
+ for (this.init_seed(19650218), n = 1, i = 0, r = this.N > t ? this.N : t; r; r--) {
+ var o = this.mt[n - 1] ^ this.mt[n - 1] >>> 30;
+ this.mt[n] = (this.mt[n] ^ (((o & 4294901760) >>> 16) * 1664525 << 16) + (o & 65535) * 1664525) + e[i] + i, this.mt[n] >>>= 0, n++, i++, n >= this.N && (this.mt[0] = this.mt[this.N - 1], n = 1), i >= t && (i = 0);
+ }
+ for (r = this.N - 1; r; r--) {
+ var o = this.mt[n - 1] ^ this.mt[n - 1] >>> 30;
+ this.mt[n] = (this.mt[n] ^ (((o & 4294901760) >>> 16) * 1566083941 << 16) + (o & 65535) * 1566083941) - n, this.mt[n] >>>= 0, n++, n >= this.N && (this.mt[0] = this.mt[this.N - 1], n = 1);
+ }
+ this.mt[0] = 2147483648;
+};
+MersenneTwister.prototype.random_int = function() {
+ var e, t = new Array(0, this.MATRIX_A);
+ if (this.mti >= this.N) {
+ var n;
+ for (this.mti == this.N + 1 && this.init_seed(5489), n = 0; n < this.N - this.M; n++)
+ e = this.mt[n] & this.UPPER_MASK | this.mt[n + 1] & this.LOWER_MASK, this.mt[n] = this.mt[n + this.M] ^ e >>> 1 ^ t[e & 1];
+ for (; n < this.N - 1; n++)
+ e = this.mt[n] & this.UPPER_MASK | this.mt[n + 1] & this.LOWER_MASK, this.mt[n] = this.mt[n + (this.M - this.N)] ^ e >>> 1 ^ t[e & 1];
+ e = this.mt[this.N - 1] & this.UPPER_MASK | this.mt[0] & this.LOWER_MASK, this.mt[this.N - 1] = this.mt[this.M - 1] ^ e >>> 1 ^ t[e & 1], this.mti = 0;
+ }
+ return e = this.mt[this.mti++], e ^= e >>> 11, e ^= e << 7 & 2636928640, e ^= e << 15 & 4022730752, e ^= e >>> 18, e >>> 0;
+};
+MersenneTwister.prototype.random_int31 = function() {
+ return this.random_int() >>> 1;
+};
+MersenneTwister.prototype.random_incl = function() {
+ return this.random_int() * (1 / 4294967295);
+};
+MersenneTwister.prototype.random = function() {
+ return this.random_int() * (1 / 4294967296);
+};
+MersenneTwister.prototype.random_excl = function() {
+ return (this.random_int() + 0.5) * (1 / 4294967296);
+};
+MersenneTwister.prototype.random_long = function() {
+ var e = this.random_int() >>> 5, t = this.random_int() >>> 6;
+ return (e * 67108864 + t) * (1 / 9007199254740992);
+};
+var mersenneTwister = MersenneTwister;
+const MersenneTwister$1 = /* @__PURE__ */ getDefaultExportFromCjs(mersenneTwister), CesiumMath = {};
+CesiumMath.EPSILON1 = 0.1;
+CesiumMath.EPSILON2 = 0.01;
+CesiumMath.EPSILON3 = 1e-3;
+CesiumMath.EPSILON4 = 1e-4;
+CesiumMath.EPSILON5 = 1e-5;
+CesiumMath.EPSILON6 = 1e-6;
+CesiumMath.EPSILON7 = 1e-7;
+CesiumMath.EPSILON8 = 1e-8;
+CesiumMath.EPSILON9 = 1e-9;
+CesiumMath.EPSILON10 = 1e-10;
+CesiumMath.EPSILON11 = 1e-11;
+CesiumMath.EPSILON12 = 1e-12;
+CesiumMath.EPSILON13 = 1e-13;
+CesiumMath.EPSILON14 = 1e-14;
+CesiumMath.EPSILON15 = 1e-15;
+CesiumMath.EPSILON16 = 1e-16;
+CesiumMath.EPSILON17 = 1e-17;
+CesiumMath.EPSILON18 = 1e-18;
+CesiumMath.EPSILON19 = 1e-19;
+CesiumMath.EPSILON20 = 1e-20;
+CesiumMath.EPSILON21 = 1e-21;
+CesiumMath.GRAVITATIONALPARAMETER = 3986004418e5;
+CesiumMath.SOLAR_RADIUS = 6955e5;
+CesiumMath.LUNAR_RADIUS = 1737400;
+CesiumMath.SIXTY_FOUR_KILOBYTES = 64 * 1024;
+CesiumMath.FOUR_GIGABYTES = 4 * 1024 * 1024 * 1024;
+CesiumMath.sign = defaultValue(Math.sign, function(t) {
+ return t = +t, t === 0 || t !== t ? t : t > 0 ? 1 : -1;
+});
+CesiumMath.signNotZero = function(e) {
+ return e < 0 ? -1 : 1;
+};
+CesiumMath.toSNorm = function(e, t) {
+ return t = defaultValue(t, 255), Math.round(
+ (CesiumMath.clamp(e, -1, 1) * 0.5 + 0.5) * t
+ );
+};
+CesiumMath.fromSNorm = function(e, t) {
+ return t = defaultValue(t, 255), CesiumMath.clamp(e, 0, t) / t * 2 - 1;
+};
+CesiumMath.normalize = function(e, t, n) {
+ return n = Math.max(n - t, 0), n === 0 ? 0 : CesiumMath.clamp((e - t) / n, 0, 1);
+};
+CesiumMath.sinh = defaultValue(Math.sinh, function(t) {
+ return (Math.exp(t) - Math.exp(-t)) / 2;
+});
+CesiumMath.cosh = defaultValue(Math.cosh, function(t) {
+ return (Math.exp(t) + Math.exp(-t)) / 2;
+});
+CesiumMath.lerp = function(e, t, n) {
+ return (1 - n) * e + n * t;
+};
+CesiumMath.PI = Math.PI;
+CesiumMath.ONE_OVER_PI = 1 / Math.PI;
+CesiumMath.PI_OVER_TWO = Math.PI / 2;
+CesiumMath.PI_OVER_THREE = Math.PI / 3;
+CesiumMath.PI_OVER_FOUR = Math.PI / 4;
+CesiumMath.PI_OVER_SIX = Math.PI / 6;
+CesiumMath.THREE_PI_OVER_TWO = 3 * Math.PI / 2;
+CesiumMath.TWO_PI = 2 * Math.PI;
+CesiumMath.ONE_OVER_TWO_PI = 1 / (2 * Math.PI);
+CesiumMath.RADIANS_PER_DEGREE = Math.PI / 180;
+CesiumMath.DEGREES_PER_RADIAN = 180 / Math.PI;
+CesiumMath.RADIANS_PER_ARCSECOND = CesiumMath.RADIANS_PER_DEGREE / 3600;
+CesiumMath.toRadians = function(e) {
+ return e * CesiumMath.RADIANS_PER_DEGREE;
+};
+CesiumMath.toDegrees = function(e) {
+ return e * CesiumMath.DEGREES_PER_RADIAN;
+};
+CesiumMath.convertLongitudeRange = function(e) {
+ const t = CesiumMath.TWO_PI, n = e - Math.floor(e / t) * t;
+ return n < -Math.PI ? n + t : n >= Math.PI ? n - t : n;
+};
+CesiumMath.clampToLatitudeRange = function(e) {
+ return CesiumMath.clamp(
+ e,
+ -1 * CesiumMath.PI_OVER_TWO,
+ CesiumMath.PI_OVER_TWO
+ );
+};
+CesiumMath.negativePiToPi = function(e) {
+ return e >= -CesiumMath.PI && e <= CesiumMath.PI ? e : CesiumMath.zeroToTwoPi(e + CesiumMath.PI) - CesiumMath.PI;
+};
+CesiumMath.zeroToTwoPi = function(e) {
+ if (e >= 0 && e <= CesiumMath.TWO_PI)
+ return e;
+ const t = CesiumMath.mod(e, CesiumMath.TWO_PI);
+ return Math.abs(t) < CesiumMath.EPSILON14 && Math.abs(e) > CesiumMath.EPSILON14 ? CesiumMath.TWO_PI : t;
+};
+CesiumMath.mod = function(e, t) {
+ return CesiumMath.sign(e) === CesiumMath.sign(t) && Math.abs(e) < Math.abs(t) ? e : (e % t + t) % t;
+};
+CesiumMath.equalsEpsilon = function(e, t, n, i) {
+ n = defaultValue(n, 0), i = defaultValue(i, n);
+ const r = Math.abs(e - t);
+ return r <= i || r <= n * Math.max(Math.abs(e), Math.abs(t));
+};
+CesiumMath.lessThan = function(e, t, n) {
+ return e - t < -n;
+};
+CesiumMath.lessThanOrEquals = function(e, t, n) {
+ return e - t < n;
+};
+CesiumMath.greaterThan = function(e, t, n) {
+ return e - t > n;
+};
+CesiumMath.greaterThanOrEquals = function(e, t, n) {
+ return e - t > -n;
+};
+const factorials = [1];
+CesiumMath.factorial = function(e) {
+ const t = factorials.length;
+ if (e >= t) {
+ let n = factorials[t - 1];
+ for (let i = t; i <= e; i++) {
+ const r = n * i;
+ factorials.push(r), n = r;
+ }
+ }
+ return factorials[e];
+};
+CesiumMath.incrementWrap = function(e, t, n) {
+ return n = defaultValue(n, 0), ++e, e > t && (e = n), e;
+};
+CesiumMath.isPowerOfTwo = function(e) {
+ return e !== 0 && (e & e - 1) === 0;
+};
+CesiumMath.nextPowerOfTwo = function(e) {
+ return --e, e |= e >> 1, e |= e >> 2, e |= e >> 4, e |= e >> 8, e |= e >> 16, ++e, e;
+};
+CesiumMath.previousPowerOfTwo = function(e) {
+ return e |= e >> 1, e |= e >> 2, e |= e >> 4, e |= e >> 8, e |= e >> 16, e |= e >> 32, e = (e >>> 0) - (e >>> 1), e;
+};
+CesiumMath.clamp = function(e, t, n) {
+ return e < t ? t : e > n ? n : e;
+};
+let randomNumberGenerator$2 = new MersenneTwister$1();
+CesiumMath.setRandomNumberSeed = function(e) {
+ randomNumberGenerator$2 = new MersenneTwister$1(e);
+};
+CesiumMath.nextRandomNumber = function() {
+ return randomNumberGenerator$2.random();
+};
+CesiumMath.randomBetween = function(e, t) {
+ return CesiumMath.nextRandomNumber() * (t - e) + e;
+};
+CesiumMath.acosClamped = function(e) {
+ return Math.acos(CesiumMath.clamp(e, -1, 1));
+};
+CesiumMath.asinClamped = function(e) {
+ return Math.asin(CesiumMath.clamp(e, -1, 1));
+};
+CesiumMath.chordLength = function(e, t) {
+ return 2 * t * Math.sin(e * 0.5);
+};
+CesiumMath.logBase = function(e, t) {
+ return Math.log(e) / Math.log(t);
+};
+CesiumMath.cbrt = defaultValue(Math.cbrt, function(t) {
+ const n = Math.pow(Math.abs(t), 0.3333333333333333);
+ return t < 0 ? -n : n;
+});
+CesiumMath.log2 = defaultValue(Math.log2, function(t) {
+ return Math.log(t) * Math.LOG2E;
+});
+CesiumMath.fog = function(e, t) {
+ const n = e * t;
+ return 1 - Math.exp(-(n * n));
+};
+CesiumMath.fastApproximateAtan = function(e) {
+ return e * (-0.1784 * Math.abs(e) - 0.0663 * e * e + 1.0301);
+};
+CesiumMath.fastApproximateAtan2 = function(e, t) {
+ let n, i = Math.abs(e);
+ n = Math.abs(t);
+ const r = Math.max(i, n);
+ n = Math.min(i, n);
+ const o = n / r;
+ return i = CesiumMath.fastApproximateAtan(o), i = Math.abs(t) > Math.abs(e) ? CesiumMath.PI_OVER_TWO - i : i, i = e < 0 ? CesiumMath.PI - i : i, i = t < 0 ? -i : i, i;
+};
+function Cartesian3(e, t, n) {
+ this.x = defaultValue(e, 0), this.y = defaultValue(t, 0), this.z = defaultValue(n, 0);
+}
+Cartesian3.fromSpherical = function(e, t) {
+ defined(t) || (t = new Cartesian3());
+ const n = e.clock, i = e.cone, r = defaultValue(e.magnitude, 1), o = r * Math.sin(i);
+ return t.x = o * Math.cos(n), t.y = o * Math.sin(n), t.z = r * Math.cos(i), t;
+};
+Cartesian3.fromElements = function(e, t, n, i) {
+ return defined(i) ? (i.x = e, i.y = t, i.z = n, i) : new Cartesian3(e, t, n);
+};
+Cartesian3.clone = function(e, t) {
+ if (defined(e))
+ return defined(t) ? (t.x = e.x, t.y = e.y, t.z = e.z, t) : new Cartesian3(e.x, e.y, e.z);
+};
+Cartesian3.fromCartesian4 = Cartesian3.clone;
+Cartesian3.packedLength = 3;
+Cartesian3.pack = function(e, t, n) {
+ return n = defaultValue(n, 0), t[n++] = e.x, t[n++] = e.y, t[n] = e.z, t;
+};
+Cartesian3.unpack = function(e, t, n) {
+ return t = defaultValue(t, 0), defined(n) || (n = new Cartesian3()), n.x = e[t++], n.y = e[t++], n.z = e[t], n;
+};
+Cartesian3.packArray = function(e, t) {
+ const n = e.length, i = n * 3;
+ defined(t) ? !Array.isArray(t) && t.length !== i || t.length !== i && (t.length = i) : t = new Array(i);
+ for (let r = 0; r < n; ++r)
+ Cartesian3.pack(e[r], t, r * 3);
+ return t;
+};
+Cartesian3.unpackArray = function(e, t) {
+ const n = e.length;
+ defined(t) ? t.length = n / 3 : t = new Array(n / 3);
+ for (let i = 0; i < n; i += 3) {
+ const r = i / 3;
+ t[r] = Cartesian3.unpack(e, i, t[r]);
+ }
+ return t;
+};
+Cartesian3.fromArray = Cartesian3.unpack;
+Cartesian3.maximumComponent = function(e) {
+ return Math.max(e.x, e.y, e.z);
+};
+Cartesian3.minimumComponent = function(e) {
+ return Math.min(e.x, e.y, e.z);
+};
+Cartesian3.minimumByComponent = function(e, t, n) {
+ return n.x = Math.min(e.x, t.x), n.y = Math.min(e.y, t.y), n.z = Math.min(e.z, t.z), n;
+};
+Cartesian3.maximumByComponent = function(e, t, n) {
+ return n.x = Math.max(e.x, t.x), n.y = Math.max(e.y, t.y), n.z = Math.max(e.z, t.z), n;
+};
+Cartesian3.clamp = function(e, t, n, i) {
+ const r = CesiumMath.clamp(e.x, t.x, n.x), o = CesiumMath.clamp(e.y, t.y, n.y), s = CesiumMath.clamp(e.z, t.z, n.z);
+ return i.x = r, i.y = o, i.z = s, i;
+};
+Cartesian3.magnitudeSquared = function(e) {
+ return e.x * e.x + e.y * e.y + e.z * e.z;
+};
+Cartesian3.magnitude = function(e) {
+ return Math.sqrt(Cartesian3.magnitudeSquared(e));
+};
+const distanceScratch$3 = new Cartesian3();
+Cartesian3.distance = function(e, t) {
+ return Cartesian3.subtract(e, t, distanceScratch$3), Cartesian3.magnitude(distanceScratch$3);
+};
+Cartesian3.distanceSquared = function(e, t) {
+ return Cartesian3.subtract(e, t, distanceScratch$3), Cartesian3.magnitudeSquared(distanceScratch$3);
+};
+Cartesian3.normalize = function(e, t) {
+ const n = Cartesian3.magnitude(e);
+ return t.x = e.x / n, t.y = e.y / n, t.z = e.z / n, t;
+};
+Cartesian3.dot = function(e, t) {
+ return e.x * t.x + e.y * t.y + e.z * t.z;
+};
+Cartesian3.multiplyComponents = function(e, t, n) {
+ return n.x = e.x * t.x, n.y = e.y * t.y, n.z = e.z * t.z, n;
+};
+Cartesian3.divideComponents = function(e, t, n) {
+ return n.x = e.x / t.x, n.y = e.y / t.y, n.z = e.z / t.z, n;
+};
+Cartesian3.add = function(e, t, n) {
+ return n.x = e.x + t.x, n.y = e.y + t.y, n.z = e.z + t.z, n;
+};
+Cartesian3.subtract = function(e, t, n) {
+ return n.x = e.x - t.x, n.y = e.y - t.y, n.z = e.z - t.z, n;
+};
+Cartesian3.multiplyByScalar = function(e, t, n) {
+ return n.x = e.x * t, n.y = e.y * t, n.z = e.z * t, n;
+};
+Cartesian3.divideByScalar = function(e, t, n) {
+ return n.x = e.x / t, n.y = e.y / t, n.z = e.z / t, n;
+};
+Cartesian3.negate = function(e, t) {
+ return t.x = -e.x, t.y = -e.y, t.z = -e.z, t;
+};
+Cartesian3.abs = function(e, t) {
+ return t.x = Math.abs(e.x), t.y = Math.abs(e.y), t.z = Math.abs(e.z), t;
+};
+const lerpScratch$3 = new Cartesian3();
+Cartesian3.lerp = function(e, t, n, i) {
+ return Cartesian3.multiplyByScalar(t, n, lerpScratch$3), i = Cartesian3.multiplyByScalar(e, 1 - n, i), Cartesian3.add(lerpScratch$3, i, i);
+};
+const angleBetweenScratch$1 = new Cartesian3(), angleBetweenScratch2$1 = new Cartesian3();
+Cartesian3.angleBetween = function(e, t) {
+ Cartesian3.normalize(e, angleBetweenScratch$1), Cartesian3.normalize(t, angleBetweenScratch2$1);
+ const n = Cartesian3.dot(angleBetweenScratch$1, angleBetweenScratch2$1), i = Cartesian3.magnitude(
+ Cartesian3.cross(
+ angleBetweenScratch$1,
+ angleBetweenScratch2$1,
+ angleBetweenScratch$1
+ )
+ );
+ return Math.atan2(i, n);
+};
+const mostOrthogonalAxisScratch$2 = new Cartesian3();
+Cartesian3.mostOrthogonalAxis = function(e, t) {
+ const n = Cartesian3.normalize(e, mostOrthogonalAxisScratch$2);
+ return Cartesian3.abs(n, n), n.x <= n.y ? n.x <= n.z ? t = Cartesian3.clone(Cartesian3.UNIT_X, t) : t = Cartesian3.clone(Cartesian3.UNIT_Z, t) : n.y <= n.z ? t = Cartesian3.clone(Cartesian3.UNIT_Y, t) : t = Cartesian3.clone(Cartesian3.UNIT_Z, t), t;
+};
+Cartesian3.projectVector = function(e, t, n) {
+ const i = Cartesian3.dot(e, t) / Cartesian3.dot(t, t);
+ return Cartesian3.multiplyByScalar(t, i, n);
+};
+Cartesian3.equals = function(e, t) {
+ return e === t || defined(e) && defined(t) && e.x === t.x && e.y === t.y && e.z === t.z;
+};
+Cartesian3.equalsArray = function(e, t, n) {
+ return e.x === t[n] && e.y === t[n + 1] && e.z === t[n + 2];
+};
+Cartesian3.equalsEpsilon = function(e, t, n, i) {
+ return e === t || defined(e) && defined(t) && CesiumMath.equalsEpsilon(
+ e.x,
+ t.x,
+ n,
+ i
+ ) && CesiumMath.equalsEpsilon(
+ e.y,
+ t.y,
+ n,
+ i
+ ) && CesiumMath.equalsEpsilon(
+ e.z,
+ t.z,
+ n,
+ i
+ );
+};
+Cartesian3.cross = function(e, t, n) {
+ const i = e.x, r = e.y, o = e.z, s = t.x, c = t.y, l = t.z, d = r * l - o * c, f = o * s - i * l, h = i * c - r * s;
+ return n.x = d, n.y = f, n.z = h, n;
+};
+Cartesian3.midpoint = function(e, t, n) {
+ return n.x = (e.x + t.x) * 0.5, n.y = (e.y + t.y) * 0.5, n.z = (e.z + t.z) * 0.5, n;
+};
+Cartesian3.fromDegrees = function(e, t, n, i, r) {
+ return e = CesiumMath.toRadians(e), t = CesiumMath.toRadians(t), Cartesian3.fromRadians(e, t, n, i, r);
+};
+let scratchN = new Cartesian3(), scratchK = new Cartesian3();
+Cartesian3._ellipsoidRadiiSquared = new Cartesian3(
+ 6378137 * 6378137,
+ 6378137 * 6378137,
+ 6356752314245179e-9 * 6356752314245179e-9
+);
+Cartesian3.fromRadians = function(e, t, n, i, r) {
+ n = defaultValue(n, 0);
+ const o = defined(i) ? i.radiiSquared : Cartesian3._ellipsoidRadiiSquared, s = Math.cos(t);
+ scratchN.x = s * Math.cos(e), scratchN.y = s * Math.sin(e), scratchN.z = Math.sin(t), scratchN = Cartesian3.normalize(scratchN, scratchN), Cartesian3.multiplyComponents(o, scratchN, scratchK);
+ const c = Math.sqrt(Cartesian3.dot(scratchN, scratchK));
+ return scratchK = Cartesian3.divideByScalar(scratchK, c, scratchK), scratchN = Cartesian3.multiplyByScalar(scratchN, n, scratchN), defined(r) || (r = new Cartesian3()), Cartesian3.add(scratchK, scratchN, r);
+};
+Cartesian3.fromDegreesArray = function(e, t, n) {
+ const i = e.length;
+ defined(n) ? n.length = i / 2 : n = new Array(i / 2);
+ for (let r = 0; r < i; r += 2) {
+ const o = e[r], s = e[r + 1], c = r / 2;
+ n[c] = Cartesian3.fromDegrees(
+ o,
+ s,
+ 0,
+ t,
+ n[c]
+ );
+ }
+ return n;
+};
+Cartesian3.fromRadiansArray = function(e, t, n) {
+ const i = e.length;
+ defined(n) ? n.length = i / 2 : n = new Array(i / 2);
+ for (let r = 0; r < i; r += 2) {
+ const o = e[r], s = e[r + 1], c = r / 2;
+ n[c] = Cartesian3.fromRadians(
+ o,
+ s,
+ 0,
+ t,
+ n[c]
+ );
+ }
+ return n;
+};
+Cartesian3.fromDegreesArrayHeights = function(e, t, n) {
+ const i = e.length;
+ defined(n) ? n.length = i / 3 : n = new Array(i / 3);
+ for (let r = 0; r < i; r += 3) {
+ const o = e[r], s = e[r + 1], c = e[r + 2], l = r / 3;
+ n[l] = Cartesian3.fromDegrees(
+ o,
+ s,
+ c,
+ t,
+ n[l]
+ );
+ }
+ return n;
+};
+Cartesian3.fromRadiansArrayHeights = function(e, t, n) {
+ const i = e.length;
+ defined(n) ? n.length = i / 3 : n = new Array(i / 3);
+ for (let r = 0; r < i; r += 3) {
+ const o = e[r], s = e[r + 1], c = e[r + 2], l = r / 3;
+ n[l] = Cartesian3.fromRadians(
+ o,
+ s,
+ c,
+ t,
+ n[l]
+ );
+ }
+ return n;
+};
+Cartesian3.ZERO = Object.freeze(new Cartesian3(0, 0, 0));
+Cartesian3.ONE = Object.freeze(new Cartesian3(1, 1, 1));
+Cartesian3.UNIT_X = Object.freeze(new Cartesian3(1, 0, 0));
+Cartesian3.UNIT_Y = Object.freeze(new Cartesian3(0, 1, 0));
+Cartesian3.UNIT_Z = Object.freeze(new Cartesian3(0, 0, 1));
+Cartesian3.prototype.clone = function(e) {
+ return Cartesian3.clone(this, e);
+};
+Cartesian3.prototype.equals = function(e) {
+ return Cartesian3.equals(this, e);
+};
+Cartesian3.prototype.equalsEpsilon = function(e, t, n) {
+ return Cartesian3.equalsEpsilon(
+ this,
+ e,
+ t,
+ n
+ );
+};
+Cartesian3.prototype.toString = function() {
+ return `(${this.x}, ${this.y}, ${this.z})`;
+};
+function Cartesian4(e, t, n, i) {
+ this.x = defaultValue(e, 0), this.y = defaultValue(t, 0), this.z = defaultValue(n, 0), this.w = defaultValue(i, 0);
+}
+Cartesian4.fromElements = function(e, t, n, i, r) {
+ return defined(r) ? (r.x = e, r.y = t, r.z = n, r.w = i, r) : new Cartesian4(e, t, n, i);
+};
+Cartesian4.fromColor = function(e, t) {
+ return defined(t) ? (t.x = e.red, t.y = e.green, t.z = e.blue, t.w = e.alpha, t) : new Cartesian4(e.red, e.green, e.blue, e.alpha);
+};
+Cartesian4.clone = function(e, t) {
+ if (defined(e))
+ return defined(t) ? (t.x = e.x, t.y = e.y, t.z = e.z, t.w = e.w, t) : new Cartesian4(e.x, e.y, e.z, e.w);
+};
+Cartesian4.packedLength = 4;
+Cartesian4.pack = function(e, t, n) {
+ return n = defaultValue(n, 0), t[n++] = e.x, t[n++] = e.y, t[n++] = e.z, t[n] = e.w, t;
+};
+Cartesian4.unpack = function(e, t, n) {
+ return t = defaultValue(t, 0), defined(n) || (n = new Cartesian4()), n.x = e[t++], n.y = e[t++], n.z = e[t++], n.w = e[t], n;
+};
+Cartesian4.packArray = function(e, t) {
+ const n = e.length, i = n * 4;
+ defined(t) ? !Array.isArray(t) && t.length !== i || t.length !== i && (t.length = i) : t = new Array(i);
+ for (let r = 0; r < n; ++r)
+ Cartesian4.pack(e[r], t, r * 4);
+ return t;
+};
+Cartesian4.unpackArray = function(e, t) {
+ const n = e.length;
+ defined(t) ? t.length = n / 4 : t = new Array(n / 4);
+ for (let i = 0; i < n; i += 4) {
+ const r = i / 4;
+ t[r] = Cartesian4.unpack(e, i, t[r]);
+ }
+ return t;
+};
+Cartesian4.fromArray = Cartesian4.unpack;
+Cartesian4.maximumComponent = function(e) {
+ return Math.max(e.x, e.y, e.z, e.w);
+};
+Cartesian4.minimumComponent = function(e) {
+ return Math.min(e.x, e.y, e.z, e.w);
+};
+Cartesian4.minimumByComponent = function(e, t, n) {
+ return n.x = Math.min(e.x, t.x), n.y = Math.min(e.y, t.y), n.z = Math.min(e.z, t.z), n.w = Math.min(e.w, t.w), n;
+};
+Cartesian4.maximumByComponent = function(e, t, n) {
+ return n.x = Math.max(e.x, t.x), n.y = Math.max(e.y, t.y), n.z = Math.max(e.z, t.z), n.w = Math.max(e.w, t.w), n;
+};
+Cartesian4.clamp = function(e, t, n, i) {
+ const r = CesiumMath.clamp(e.x, t.x, n.x), o = CesiumMath.clamp(e.y, t.y, n.y), s = CesiumMath.clamp(e.z, t.z, n.z), c = CesiumMath.clamp(e.w, t.w, n.w);
+ return i.x = r, i.y = o, i.z = s, i.w = c, i;
+};
+Cartesian4.magnitudeSquared = function(e) {
+ return e.x * e.x + e.y * e.y + e.z * e.z + e.w * e.w;
+};
+Cartesian4.magnitude = function(e) {
+ return Math.sqrt(Cartesian4.magnitudeSquared(e));
+};
+const distanceScratch$2 = new Cartesian4();
+Cartesian4.distance = function(e, t) {
+ return Cartesian4.subtract(e, t, distanceScratch$2), Cartesian4.magnitude(distanceScratch$2);
+};
+Cartesian4.distanceSquared = function(e, t) {
+ return Cartesian4.subtract(e, t, distanceScratch$2), Cartesian4.magnitudeSquared(distanceScratch$2);
+};
+Cartesian4.normalize = function(e, t) {
+ const n = Cartesian4.magnitude(e);
+ return t.x = e.x / n, t.y = e.y / n, t.z = e.z / n, t.w = e.w / n, t;
+};
+Cartesian4.dot = function(e, t) {
+ return e.x * t.x + e.y * t.y + e.z * t.z + e.w * t.w;
+};
+Cartesian4.multiplyComponents = function(e, t, n) {
+ return n.x = e.x * t.x, n.y = e.y * t.y, n.z = e.z * t.z, n.w = e.w * t.w, n;
+};
+Cartesian4.divideComponents = function(e, t, n) {
+ return n.x = e.x / t.x, n.y = e.y / t.y, n.z = e.z / t.z, n.w = e.w / t.w, n;
+};
+Cartesian4.add = function(e, t, n) {
+ return n.x = e.x + t.x, n.y = e.y + t.y, n.z = e.z + t.z, n.w = e.w + t.w, n;
+};
+Cartesian4.subtract = function(e, t, n) {
+ return n.x = e.x - t.x, n.y = e.y - t.y, n.z = e.z - t.z, n.w = e.w - t.w, n;
+};
+Cartesian4.multiplyByScalar = function(e, t, n) {
+ return n.x = e.x * t, n.y = e.y * t, n.z = e.z * t, n.w = e.w * t, n;
+};
+Cartesian4.divideByScalar = function(e, t, n) {
+ return n.x = e.x / t, n.y = e.y / t, n.z = e.z / t, n.w = e.w / t, n;
+};
+Cartesian4.negate = function(e, t) {
+ return t.x = -e.x, t.y = -e.y, t.z = -e.z, t.w = -e.w, t;
+};
+Cartesian4.abs = function(e, t) {
+ return t.x = Math.abs(e.x), t.y = Math.abs(e.y), t.z = Math.abs(e.z), t.w = Math.abs(e.w), t;
+};
+const lerpScratch$2 = new Cartesian4();
+Cartesian4.lerp = function(e, t, n, i) {
+ return Cartesian4.multiplyByScalar(t, n, lerpScratch$2), i = Cartesian4.multiplyByScalar(e, 1 - n, i), Cartesian4.add(lerpScratch$2, i, i);
+};
+const mostOrthogonalAxisScratch$1 = new Cartesian4();
+Cartesian4.mostOrthogonalAxis = function(e, t) {
+ const n = Cartesian4.normalize(e, mostOrthogonalAxisScratch$1);
+ return Cartesian4.abs(n, n), n.x <= n.y ? n.x <= n.z ? n.x <= n.w ? t = Cartesian4.clone(Cartesian4.UNIT_X, t) : t = Cartesian4.clone(Cartesian4.UNIT_W, t) : n.z <= n.w ? t = Cartesian4.clone(Cartesian4.UNIT_Z, t) : t = Cartesian4.clone(Cartesian4.UNIT_W, t) : n.y <= n.z ? n.y <= n.w ? t = Cartesian4.clone(Cartesian4.UNIT_Y, t) : t = Cartesian4.clone(Cartesian4.UNIT_W, t) : n.z <= n.w ? t = Cartesian4.clone(Cartesian4.UNIT_Z, t) : t = Cartesian4.clone(Cartesian4.UNIT_W, t), t;
+};
+Cartesian4.equals = function(e, t) {
+ return e === t || defined(e) && defined(t) && e.x === t.x && e.y === t.y && e.z === t.z && e.w === t.w;
+};
+Cartesian4.equalsArray = function(e, t, n) {
+ return e.x === t[n] && e.y === t[n + 1] && e.z === t[n + 2] && e.w === t[n + 3];
+};
+Cartesian4.equalsEpsilon = function(e, t, n, i) {
+ return e === t || defined(e) && defined(t) && CesiumMath.equalsEpsilon(
+ e.x,
+ t.x,
+ n,
+ i
+ ) && CesiumMath.equalsEpsilon(
+ e.y,
+ t.y,
+ n,
+ i
+ ) && CesiumMath.equalsEpsilon(
+ e.z,
+ t.z,
+ n,
+ i
+ ) && CesiumMath.equalsEpsilon(
+ e.w,
+ t.w,
+ n,
+ i
+ );
+};
+Cartesian4.ZERO = Object.freeze(new Cartesian4(0, 0, 0, 0));
+Cartesian4.ONE = Object.freeze(new Cartesian4(1, 1, 1, 1));
+Cartesian4.UNIT_X = Object.freeze(new Cartesian4(1, 0, 0, 0));
+Cartesian4.UNIT_Y = Object.freeze(new Cartesian4(0, 1, 0, 0));
+Cartesian4.UNIT_Z = Object.freeze(new Cartesian4(0, 0, 1, 0));
+Cartesian4.UNIT_W = Object.freeze(new Cartesian4(0, 0, 0, 1));
+Cartesian4.prototype.clone = function(e) {
+ return Cartesian4.clone(this, e);
+};
+Cartesian4.prototype.equals = function(e) {
+ return Cartesian4.equals(this, e);
+};
+Cartesian4.prototype.equalsEpsilon = function(e, t, n) {
+ return Cartesian4.equalsEpsilon(
+ this,
+ e,
+ t,
+ n
+ );
+};
+Cartesian4.prototype.toString = function() {
+ return `(${this.x}, ${this.y}, ${this.z}, ${this.w})`;
+};
+const scratchF32Array = new Float32Array(1), scratchU8Array = new Uint8Array(scratchF32Array.buffer), testU32 = new Uint32Array([287454020]), testU8 = new Uint8Array(testU32.buffer), littleEndian = testU8[0] === 68;
+Cartesian4.packFloat = function(e, t) {
+ return defined(t) || (t = new Cartesian4()), scratchF32Array[0] = e, littleEndian ? (t.x = scratchU8Array[0], t.y = scratchU8Array[1], t.z = scratchU8Array[2], t.w = scratchU8Array[3]) : (t.x = scratchU8Array[3], t.y = scratchU8Array[2], t.z = scratchU8Array[1], t.w = scratchU8Array[0]), t;
+};
+Cartesian4.unpackFloat = function(e) {
+ return littleEndian ? (scratchU8Array[0] = e.x, scratchU8Array[1] = e.y, scratchU8Array[2] = e.z, scratchU8Array[3] = e.w) : (scratchU8Array[0] = e.w, scratchU8Array[1] = e.z, scratchU8Array[2] = e.y, scratchU8Array[3] = e.x), scratchF32Array[0];
+};
+function Matrix3(e, t, n, i, r, o, s, c, l) {
+ this[0] = defaultValue(e, 0), this[1] = defaultValue(i, 0), this[2] = defaultValue(s, 0), this[3] = defaultValue(t, 0), this[4] = defaultValue(r, 0), this[5] = defaultValue(c, 0), this[6] = defaultValue(n, 0), this[7] = defaultValue(o, 0), this[8] = defaultValue(l, 0);
+}
+Matrix3.packedLength = 9;
+Matrix3.pack = function(e, t, n) {
+ return n = defaultValue(n, 0), t[n++] = e[0], t[n++] = e[1], t[n++] = e[2], t[n++] = e[3], t[n++] = e[4], t[n++] = e[5], t[n++] = e[6], t[n++] = e[7], t[n++] = e[8], t;
+};
+Matrix3.unpack = function(e, t, n) {
+ return t = defaultValue(t, 0), defined(n) || (n = new Matrix3()), n[0] = e[t++], n[1] = e[t++], n[2] = e[t++], n[3] = e[t++], n[4] = e[t++], n[5] = e[t++], n[6] = e[t++], n[7] = e[t++], n[8] = e[t++], n;
+};
+Matrix3.packArray = function(e, t) {
+ const n = e.length, i = n * 9;
+ defined(t) ? !Array.isArray(t) && t.length !== i || t.length !== i && (t.length = i) : t = new Array(i);
+ for (let r = 0; r < n; ++r)
+ Matrix3.pack(e[r], t, r * 9);
+ return t;
+};
+Matrix3.unpackArray = function(e, t) {
+ const n = e.length;
+ defined(t) ? t.length = n / 9 : t = new Array(n / 9);
+ for (let i = 0; i < n; i += 9) {
+ const r = i / 9;
+ t[r] = Matrix3.unpack(e, i, t[r]);
+ }
+ return t;
+};
+Matrix3.clone = function(e, t) {
+ if (defined(e))
+ return defined(t) ? (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) : new Matrix3(
+ e[0],
+ e[3],
+ e[6],
+ e[1],
+ e[4],
+ e[7],
+ e[2],
+ e[5],
+ e[8]
+ );
+};
+Matrix3.fromArray = Matrix3.unpack;
+Matrix3.fromColumnMajorArray = function(e, t) {
+ return Matrix3.clone(e, t);
+};
+Matrix3.fromRowMajorArray = function(e, t) {
+ return defined(t) ? (t[0] = e[0], t[1] = e[3], t[2] = e[6], t[3] = e[1], t[4] = e[4], t[5] = e[7], t[6] = e[2], t[7] = e[5], t[8] = e[8], t) : new Matrix3(
+ e[0],
+ e[1],
+ e[2],
+ e[3],
+ e[4],
+ e[5],
+ e[6],
+ e[7],
+ e[8]
+ );
+};
+Matrix3.fromQuaternion = function(e, t) {
+ const n = e.x * e.x, i = e.x * e.y, r = e.x * e.z, o = e.x * e.w, s = e.y * e.y, c = e.y * e.z, l = e.y * e.w, d = e.z * e.z, f = e.z * e.w, h = e.w * e.w, p = n - s - d + h, m = 2 * (i - f), _ = 2 * (r + l), y = 2 * (i + f), C = -n + s - d + h, T = 2 * (c - o), x = 2 * (r - l), b = 2 * (c + o), S = -n - s + d + h;
+ return defined(t) ? (t[0] = p, t[1] = y, t[2] = x, t[3] = m, t[4] = C, t[5] = b, t[6] = _, t[7] = T, t[8] = S, t) : new Matrix3(p, m, _, y, C, T, x, b, S);
+};
+Matrix3.fromHeadingPitchRoll = function(e, t) {
+ const n = Math.cos(-e.pitch), i = Math.cos(-e.heading), r = Math.cos(e.roll), o = Math.sin(-e.pitch), s = Math.sin(-e.heading), c = Math.sin(e.roll), l = n * i, d = -r * s + c * o * i, f = c * s + r * o * i, h = n * s, p = r * i + c * o * s, m = -c * i + r * o * s, _ = -o, y = c * n, C = r * n;
+ return defined(t) ? (t[0] = l, t[1] = h, t[2] = _, t[3] = d, t[4] = p, t[5] = y, t[6] = f, t[7] = m, t[8] = C, t) : new Matrix3(l, d, f, h, p, m, _, y, C);
+};
+Matrix3.fromScale = function(e, t) {
+ return defined(t) ? (t[0] = e.x, t[1] = 0, t[2] = 0, t[3] = 0, t[4] = e.y, t[5] = 0, t[6] = 0, t[7] = 0, t[8] = e.z, t) : new Matrix3(e.x, 0, 0, 0, e.y, 0, 0, 0, e.z);
+};
+Matrix3.fromUniformScale = function(e, t) {
+ return defined(t) ? (t[0] = e, t[1] = 0, t[2] = 0, t[3] = 0, t[4] = e, t[5] = 0, t[6] = 0, t[7] = 0, t[8] = e, t) : new Matrix3(e, 0, 0, 0, e, 0, 0, 0, e);
+};
+Matrix3.fromCrossProduct = function(e, t) {
+ return defined(t) ? (t[0] = 0, t[1] = e.z, t[2] = -e.y, t[3] = -e.z, t[4] = 0, t[5] = e.x, t[6] = e.y, t[7] = -e.x, t[8] = 0, t) : new Matrix3(
+ 0,
+ -e.z,
+ e.y,
+ e.z,
+ 0,
+ -e.x,
+ -e.y,
+ e.x,
+ 0
+ );
+};
+Matrix3.fromRotationX = function(e, t) {
+ const n = Math.cos(e), i = Math.sin(e);
+ return defined(t) ? (t[0] = 1, t[1] = 0, t[2] = 0, t[3] = 0, t[4] = n, t[5] = i, t[6] = 0, t[7] = -i, t[8] = n, t) : new Matrix3(
+ 1,
+ 0,
+ 0,
+ 0,
+ n,
+ -i,
+ 0,
+ i,
+ n
+ );
+};
+Matrix3.fromRotationY = function(e, t) {
+ const n = Math.cos(e), i = Math.sin(e);
+ return defined(t) ? (t[0] = n, t[1] = 0, t[2] = -i, t[3] = 0, t[4] = 1, t[5] = 0, t[6] = i, t[7] = 0, t[8] = n, t) : new Matrix3(
+ n,
+ 0,
+ i,
+ 0,
+ 1,
+ 0,
+ -i,
+ 0,
+ n
+ );
+};
+Matrix3.fromRotationZ = function(e, t) {
+ const n = Math.cos(e), i = Math.sin(e);
+ return defined(t) ? (t[0] = n, t[1] = i, t[2] = 0, t[3] = -i, t[4] = n, t[5] = 0, t[6] = 0, t[7] = 0, t[8] = 1, t) : new Matrix3(
+ n,
+ -i,
+ 0,
+ i,
+ n,
+ 0,
+ 0,
+ 0,
+ 1
+ );
+};
+Matrix3.toArray = function(e, t) {
+ return defined(t) ? (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) : [
+ e[0],
+ e[1],
+ e[2],
+ e[3],
+ e[4],
+ e[5],
+ e[6],
+ e[7],
+ e[8]
+ ];
+};
+Matrix3.getElementIndex = function(e, t) {
+ return e * 3 + t;
+};
+Matrix3.getColumn = function(e, t, n) {
+ const i = t * 3, r = e[i], o = e[i + 1], s = e[i + 2];
+ return n.x = r, n.y = o, n.z = s, n;
+};
+Matrix3.setColumn = function(e, t, n, i) {
+ i = Matrix3.clone(e, i);
+ const r = t * 3;
+ return i[r] = n.x, i[r + 1] = n.y, i[r + 2] = n.z, i;
+};
+Matrix3.getRow = function(e, t, n) {
+ const i = e[t], r = e[t + 3], o = e[t + 6];
+ return n.x = i, n.y = r, n.z = o, n;
+};
+Matrix3.setRow = function(e, t, n, i) {
+ return i = Matrix3.clone(e, i), i[t] = n.x, i[t + 3] = n.y, i[t + 6] = n.z, i;
+};
+const scaleScratch1$2 = new Cartesian3();
+Matrix3.setScale = function(e, t, n) {
+ const i = Matrix3.getScale(e, scaleScratch1$2), r = t.x / i.x, o = t.y / i.y, s = t.z / i.z;
+ return n[0] = e[0] * r, n[1] = e[1] * r, n[2] = e[2] * r, n[3] = e[3] * o, n[4] = e[4] * o, n[5] = e[5] * o, n[6] = e[6] * s, n[7] = e[7] * s, n[8] = e[8] * s, n;
+};
+const scaleScratch2$2 = new Cartesian3();
+Matrix3.setUniformScale = function(e, t, n) {
+ const i = Matrix3.getScale(e, scaleScratch2$2), r = t / i.x, o = t / i.y, s = t / i.z;
+ return n[0] = e[0] * r, n[1] = e[1] * r, n[2] = e[2] * r, n[3] = e[3] * o, n[4] = e[4] * o, n[5] = e[5] * o, n[6] = e[6] * s, n[7] = e[7] * s, n[8] = e[8] * s, n;
+};
+const scratchColumn$2 = new Cartesian3();
+Matrix3.getScale = function(e, t) {
+ return t.x = Cartesian3.magnitude(
+ Cartesian3.fromElements(e[0], e[1], e[2], scratchColumn$2)
+ ), t.y = Cartesian3.magnitude(
+ Cartesian3.fromElements(e[3], e[4], e[5], scratchColumn$2)
+ ), t.z = Cartesian3.magnitude(
+ Cartesian3.fromElements(e[6], e[7], e[8], scratchColumn$2)
+ ), t;
+};
+const scaleScratch3$2 = new Cartesian3();
+Matrix3.getMaximumScale = function(e) {
+ return Matrix3.getScale(e, scaleScratch3$2), Cartesian3.maximumComponent(scaleScratch3$2);
+};
+const scaleScratch4$2 = new Cartesian3();
+Matrix3.setRotation = function(e, t, n) {
+ const i = Matrix3.getScale(e, scaleScratch4$2);
+ return n[0] = t[0] * i.x, n[1] = t[1] * i.x, n[2] = t[2] * i.x, n[3] = t[3] * i.y, n[4] = t[4] * i.y, n[5] = t[5] * i.y, n[6] = t[6] * i.z, n[7] = t[7] * i.z, n[8] = t[8] * i.z, n;
+};
+const scaleScratch5$2 = new Cartesian3();
+Matrix3.getRotation = function(e, t) {
+ const n = Matrix3.getScale(e, scaleScratch5$2);
+ return t[0] = e[0] / n.x, t[1] = e[1] / n.x, t[2] = e[2] / n.x, t[3] = e[3] / n.y, t[4] = e[4] / n.y, t[5] = e[5] / n.y, t[6] = e[6] / n.z, t[7] = e[7] / n.z, t[8] = e[8] / n.z, t;
+};
+Matrix3.multiply = function(e, t, n) {
+ const i = e[0] * t[0] + e[3] * t[1] + e[6] * t[2], r = e[1] * t[0] + e[4] * t[1] + e[7] * t[2], o = e[2] * t[0] + e[5] * t[1] + e[8] * t[2], s = e[0] * t[3] + e[3] * t[4] + e[6] * t[5], c = e[1] * t[3] + e[4] * t[4] + e[7] * t[5], l = e[2] * t[3] + e[5] * t[4] + e[8] * t[5], d = e[0] * t[6] + e[3] * t[7] + e[6] * t[8], f = e[1] * t[6] + e[4] * t[7] + e[7] * t[8], h = e[2] * t[6] + e[5] * t[7] + e[8] * t[8];
+ return n[0] = i, n[1] = r, n[2] = o, n[3] = s, n[4] = c, n[5] = l, n[6] = d, n[7] = f, n[8] = h, n;
+};
+Matrix3.add = function(e, t, n) {
+ return n[0] = e[0] + t[0], n[1] = e[1] + t[1], n[2] = e[2] + t[2], n[3] = e[3] + t[3], n[4] = e[4] + t[4], n[5] = e[5] + t[5], n[6] = e[6] + t[6], n[7] = e[7] + t[7], n[8] = e[8] + t[8], n;
+};
+Matrix3.subtract = function(e, t, n) {
+ return n[0] = e[0] - t[0], n[1] = e[1] - t[1], n[2] = e[2] - t[2], n[3] = e[3] - t[3], n[4] = e[4] - t[4], n[5] = e[5] - t[5], n[6] = e[6] - t[6], n[7] = e[7] - t[7], n[8] = e[8] - t[8], n;
+};
+Matrix3.multiplyByVector = function(e, t, n) {
+ const i = t.x, r = t.y, o = t.z, s = e[0] * i + e[3] * r + e[6] * o, c = e[1] * i + e[4] * r + e[7] * o, l = e[2] * i + e[5] * r + e[8] * o;
+ return n.x = s, n.y = c, n.z = l, n;
+};
+Matrix3.multiplyByScalar = function(e, t, n) {
+ return n[0] = e[0] * t, n[1] = e[1] * t, n[2] = e[2] * t, n[3] = e[3] * t, n[4] = e[4] * t, n[5] = e[5] * t, n[6] = e[6] * t, n[7] = e[7] * t, n[8] = e[8] * t, n;
+};
+Matrix3.multiplyByScale = function(e, t, n) {
+ return n[0] = e[0] * t.x, n[1] = e[1] * t.x, n[2] = e[2] * t.x, n[3] = e[3] * t.y, n[4] = e[4] * t.y, n[5] = e[5] * t.y, n[6] = e[6] * t.z, n[7] = e[7] * t.z, n[8] = e[8] * t.z, n;
+};
+Matrix3.multiplyByUniformScale = function(e, t, n) {
+ return n[0] = e[0] * t, n[1] = e[1] * t, n[2] = e[2] * t, n[3] = e[3] * t, n[4] = e[4] * t, n[5] = e[5] * t, n[6] = e[6] * t, n[7] = e[7] * t, n[8] = e[8] * t, n;
+};
+Matrix3.negate = function(e, t) {
+ 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;
+};
+Matrix3.transpose = function(e, t) {
+ const n = e[0], i = e[3], r = e[6], o = e[1], s = e[4], c = e[7], l = e[2], d = e[5], f = e[8];
+ return t[0] = n, t[1] = i, t[2] = r, t[3] = o, t[4] = s, t[5] = c, t[6] = l, t[7] = d, t[8] = f, t;
+};
+function computeFrobeniusNorm(e) {
+ let t = 0;
+ for (let n = 0; n < 9; ++n) {
+ const i = e[n];
+ t += i * i;
+ }
+ return Math.sqrt(t);
+}
+const rowVal = [1, 0, 0], colVal = [2, 2, 1];
+function offDiagonalFrobeniusNorm(e) {
+ let t = 0;
+ for (let n = 0; n < 3; ++n) {
+ const i = e[Matrix3.getElementIndex(colVal[n], rowVal[n])];
+ t += 2 * i * i;
+ }
+ return Math.sqrt(t);
+}
+function shurDecomposition(e, t) {
+ const n = CesiumMath.EPSILON15;
+ let i = 0, r = 1;
+ for (let d = 0; d < 3; ++d) {
+ const f = Math.abs(
+ e[Matrix3.getElementIndex(colVal[d], rowVal[d])]
+ );
+ f > i && (r = d, i = f);
+ }
+ let o = 1, s = 0;
+ const c = rowVal[r], l = colVal[r];
+ if (Math.abs(e[Matrix3.getElementIndex(l, c)]) > n) {
+ const d = e[Matrix3.getElementIndex(l, l)], f = e[Matrix3.getElementIndex(c, c)], h = e[Matrix3.getElementIndex(l, c)], p = (d - f) / 2 / h;
+ let m;
+ p < 0 ? m = -1 / (-p + Math.sqrt(1 + p * p)) : m = 1 / (p + Math.sqrt(1 + p * p)), o = 1 / Math.sqrt(1 + m * m), s = m * o;
+ }
+ return t = Matrix3.clone(Matrix3.IDENTITY, t), t[Matrix3.getElementIndex(c, c)] = t[Matrix3.getElementIndex(l, l)] = o, t[Matrix3.getElementIndex(l, c)] = s, t[Matrix3.getElementIndex(c, l)] = -s, t;
+}
+const jMatrix = new Matrix3(), jMatrixTranspose = new Matrix3();
+Matrix3.computeEigenDecomposition = function(e, t) {
+ const n = CesiumMath.EPSILON20, i = 10;
+ let r = 0, o = 0;
+ defined(t) || (t = {});
+ const s = t.unitary = Matrix3.clone(
+ Matrix3.IDENTITY,
+ t.unitary
+ ), c = t.diagonal = Matrix3.clone(e, t.diagonal), l = n * computeFrobeniusNorm(c);
+ for (; o < i && offDiagonalFrobeniusNorm(c) > l; )
+ shurDecomposition(c, jMatrix), Matrix3.transpose(jMatrix, jMatrixTranspose), Matrix3.multiply(c, jMatrix, c), Matrix3.multiply(jMatrixTranspose, c, c), Matrix3.multiply(s, jMatrix, s), ++r > 2 && (++o, r = 0);
+ return t;
+};
+Matrix3.abs = function(e, t) {
+ return t[0] = Math.abs(e[0]), t[1] = Math.abs(e[1]), t[2] = Math.abs(e[2]), t[3] = Math.abs(e[3]), t[4] = Math.abs(e[4]), t[5] = Math.abs(e[5]), t[6] = Math.abs(e[6]), t[7] = Math.abs(e[7]), t[8] = Math.abs(e[8]), t;
+};
+Matrix3.determinant = function(e) {
+ const t = e[0], n = e[3], i = e[6], r = e[1], o = e[4], s = e[7], c = e[2], l = e[5], d = e[8];
+ return t * (o * d - l * s) + r * (l * i - n * d) + c * (n * s - o * i);
+};
+Matrix3.inverse = function(e, t) {
+ const n = e[0], i = e[1], r = e[2], o = e[3], s = e[4], c = e[5], l = e[6], d = e[7], f = e[8], h = Matrix3.determinant(e);
+ t[0] = s * f - d * c, t[1] = d * r - i * f, t[2] = i * c - s * r, t[3] = l * c - o * f, t[4] = n * f - l * r, t[5] = o * r - n * c, t[6] = o * d - l * s, t[7] = l * i - n * d, t[8] = n * s - o * i;
+ const p = 1 / h;
+ return Matrix3.multiplyByScalar(t, p, t);
+};
+const scratchTransposeMatrix$1 = new Matrix3();
+Matrix3.inverseTranspose = function(e, t) {
+ return Matrix3.inverse(
+ Matrix3.transpose(e, scratchTransposeMatrix$1),
+ t
+ );
+};
+Matrix3.equals = function(e, t) {
+ return e === t || defined(e) && defined(t) && 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];
+};
+Matrix3.equalsEpsilon = function(e, t, n) {
+ return n = defaultValue(n, 0), e === t || defined(e) && defined(t) && Math.abs(e[0] - t[0]) <= n && Math.abs(e[1] - t[1]) <= n && Math.abs(e[2] - t[2]) <= n && Math.abs(e[3] - t[3]) <= n && Math.abs(e[4] - t[4]) <= n && Math.abs(e[5] - t[5]) <= n && Math.abs(e[6] - t[6]) <= n && Math.abs(e[7] - t[7]) <= n && Math.abs(e[8] - t[8]) <= n;
+};
+Matrix3.IDENTITY = Object.freeze(
+ new Matrix3(1, 0, 0, 0, 1, 0, 0, 0, 1)
+);
+Matrix3.ZERO = Object.freeze(
+ new Matrix3(0, 0, 0, 0, 0, 0, 0, 0, 0)
+);
+Matrix3.COLUMN0ROW0 = 0;
+Matrix3.COLUMN0ROW1 = 1;
+Matrix3.COLUMN0ROW2 = 2;
+Matrix3.COLUMN1ROW0 = 3;
+Matrix3.COLUMN1ROW1 = 4;
+Matrix3.COLUMN1ROW2 = 5;
+Matrix3.COLUMN2ROW0 = 6;
+Matrix3.COLUMN2ROW1 = 7;
+Matrix3.COLUMN2ROW2 = 8;
+Object.defineProperties(Matrix3.prototype, {
+ /**
+ * Gets the number of items in the collection.
+ * @memberof Matrix3.prototype
+ *
+ * @type {number}
+ */
+ length: {
+ get: function() {
+ return Matrix3.packedLength;
+ }
+ }
+});
+Matrix3.prototype.clone = function(e) {
+ return Matrix3.clone(this, e);
+};
+Matrix3.prototype.equals = function(e) {
+ return Matrix3.equals(this, e);
+};
+Matrix3.equalsArray = function(e, t, n) {
+ return e[0] === t[n] && e[1] === t[n + 1] && e[2] === t[n + 2] && e[3] === t[n + 3] && e[4] === t[n + 4] && e[5] === t[n + 5] && e[6] === t[n + 6] && e[7] === t[n + 7] && e[8] === t[n + 8];
+};
+Matrix3.prototype.equalsEpsilon = function(e, t) {
+ return Matrix3.equalsEpsilon(this, e, t);
+};
+Matrix3.prototype.toString = function() {
+ return `(${this[0]}, ${this[3]}, ${this[6]})
+(${this[1]}, ${this[4]}, ${this[7]})
+(${this[2]}, ${this[5]}, ${this[8]})`;
+};
+function RuntimeError(e) {
+ this.name = "RuntimeError", this.message = e;
+ let t;
+ try {
+ throw new Error();
+ } catch (n) {
+ t = n.stack;
+ }
+ this.stack = t;
+}
+defined(Object.create) && (RuntimeError.prototype = Object.create(Error.prototype), RuntimeError.prototype.constructor = RuntimeError);
+RuntimeError.prototype.toString = function() {
+ let e = `${this.name}: ${this.message}`;
+ return defined(this.stack) && (e += `
+${this.stack.toString()}`), e;
+};
+function Matrix4(e, t, n, i, r, o, s, c, l, d, f, h, p, m, _, y) {
+ this[0] = defaultValue(e, 0), this[1] = defaultValue(r, 0), this[2] = defaultValue(l, 0), this[3] = defaultValue(p, 0), this[4] = defaultValue(t, 0), this[5] = defaultValue(o, 0), this[6] = defaultValue(d, 0), this[7] = defaultValue(m, 0), this[8] = defaultValue(n, 0), this[9] = defaultValue(s, 0), this[10] = defaultValue(f, 0), this[11] = defaultValue(_, 0), this[12] = defaultValue(i, 0), this[13] = defaultValue(c, 0), this[14] = defaultValue(h, 0), this[15] = defaultValue(y, 0);
+}
+Matrix4.packedLength = 16;
+Matrix4.pack = function(e, t, n) {
+ return n = defaultValue(n, 0), t[n++] = e[0], t[n++] = e[1], t[n++] = e[2], t[n++] = e[3], t[n++] = e[4], t[n++] = e[5], t[n++] = e[6], t[n++] = e[7], t[n++] = e[8], t[n++] = e[9], t[n++] = e[10], t[n++] = e[11], t[n++] = e[12], t[n++] = e[13], t[n++] = e[14], t[n] = e[15], t;
+};
+Matrix4.unpack = function(e, t, n) {
+ return t = defaultValue(t, 0), defined(n) || (n = new Matrix4()), n[0] = e[t++], n[1] = e[t++], n[2] = e[t++], n[3] = e[t++], n[4] = e[t++], n[5] = e[t++], n[6] = e[t++], n[7] = e[t++], n[8] = e[t++], n[9] = e[t++], n[10] = e[t++], n[11] = e[t++], n[12] = e[t++], n[13] = e[t++], n[14] = e[t++], n[15] = e[t], n;
+};
+Matrix4.packArray = function(e, t) {
+ const n = e.length, i = n * 16;
+ defined(t) ? !Array.isArray(t) && t.length !== i || t.length !== i && (t.length = i) : t = new Array(i);
+ for (let r = 0; r < n; ++r)
+ Matrix4.pack(e[r], t, r * 16);
+ return t;
+};
+Matrix4.unpackArray = function(e, t) {
+ const n = e.length;
+ defined(t) ? t.length = n / 16 : t = new Array(n / 16);
+ for (let i = 0; i < n; i += 16) {
+ const r = i / 16;
+ t[r] = Matrix4.unpack(e, i, t[r]);
+ }
+ return t;
+};
+Matrix4.clone = function(e, t) {
+ if (defined(e))
+ return defined(t) ? (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) : new Matrix4(
+ e[0],
+ e[4],
+ e[8],
+ e[12],
+ e[1],
+ e[5],
+ e[9],
+ e[13],
+ e[2],
+ e[6],
+ e[10],
+ e[14],
+ e[3],
+ e[7],
+ e[11],
+ e[15]
+ );
+};
+Matrix4.fromArray = Matrix4.unpack;
+Matrix4.fromColumnMajorArray = function(e, t) {
+ return Matrix4.clone(e, t);
+};
+Matrix4.fromRowMajorArray = function(e, t) {
+ return defined(t) ? (t[0] = e[0], t[1] = e[4], t[2] = e[8], t[3] = e[12], t[4] = e[1], t[5] = e[5], t[6] = e[9], t[7] = e[13], t[8] = e[2], t[9] = e[6], t[10] = e[10], t[11] = e[14], t[12] = e[3], t[13] = e[7], t[14] = e[11], t[15] = e[15], t) : new Matrix4(
+ e[0],
+ e[1],
+ e[2],
+ e[3],
+ e[4],
+ e[5],
+ e[6],
+ e[7],
+ e[8],
+ e[9],
+ e[10],
+ e[11],
+ e[12],
+ e[13],
+ e[14],
+ e[15]
+ );
+};
+Matrix4.fromRotationTranslation = function(e, t, n) {
+ return t = defaultValue(t, Cartesian3.ZERO), defined(n) ? (n[0] = e[0], n[1] = e[1], n[2] = e[2], n[3] = 0, n[4] = e[3], n[5] = e[4], n[6] = e[5], n[7] = 0, n[8] = e[6], n[9] = e[7], n[10] = e[8], n[11] = 0, n[12] = t.x, n[13] = t.y, n[14] = t.z, n[15] = 1, n) : new Matrix4(
+ e[0],
+ e[3],
+ e[6],
+ t.x,
+ e[1],
+ e[4],
+ e[7],
+ t.y,
+ e[2],
+ e[5],
+ e[8],
+ t.z,
+ 0,
+ 0,
+ 0,
+ 1
+ );
+};
+Matrix4.fromTranslationQuaternionRotationScale = function(e, t, n, i) {
+ defined(i) || (i = new Matrix4());
+ const r = n.x, o = n.y, s = n.z, c = t.x * t.x, l = t.x * t.y, d = t.x * t.z, f = t.x * t.w, h = t.y * t.y, p = t.y * t.z, m = t.y * t.w, _ = t.z * t.z, y = t.z * t.w, C = t.w * t.w, T = c - h - _ + C, x = 2 * (l - y), b = 2 * (d + m), S = 2 * (l + y), E = -c + h - _ + C, A = 2 * (p - f), D = 2 * (d - m), P = 2 * (p + f), I = -c - h + _ + C;
+ return i[0] = T * r, i[1] = S * r, i[2] = D * r, i[3] = 0, i[4] = x * o, i[5] = E * o, i[6] = P * o, i[7] = 0, i[8] = b * s, i[9] = A * s, i[10] = I * s, i[11] = 0, i[12] = e.x, i[13] = e.y, i[14] = e.z, i[15] = 1, i;
+};
+Matrix4.fromTranslationRotationScale = function(e, t) {
+ return Matrix4.fromTranslationQuaternionRotationScale(
+ e.translation,
+ e.rotation,
+ e.scale,
+ t
+ );
+};
+Matrix4.fromTranslation = function(e, t) {
+ return Matrix4.fromRotationTranslation(Matrix3.IDENTITY, e, t);
+};
+Matrix4.fromScale = function(e, t) {
+ return defined(t) ? (t[0] = e.x, t[1] = 0, t[2] = 0, t[3] = 0, t[4] = 0, t[5] = e.y, t[6] = 0, t[7] = 0, t[8] = 0, t[9] = 0, t[10] = e.z, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, t) : new Matrix4(
+ e.x,
+ 0,
+ 0,
+ 0,
+ 0,
+ e.y,
+ 0,
+ 0,
+ 0,
+ 0,
+ e.z,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1
+ );
+};
+Matrix4.fromUniformScale = function(e, t) {
+ return defined(t) ? (t[0] = e, t[1] = 0, t[2] = 0, t[3] = 0, t[4] = 0, t[5] = e, t[6] = 0, t[7] = 0, t[8] = 0, t[9] = 0, t[10] = e, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, t) : new Matrix4(
+ e,
+ 0,
+ 0,
+ 0,
+ 0,
+ e,
+ 0,
+ 0,
+ 0,
+ 0,
+ e,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1
+ );
+};
+Matrix4.fromRotation = function(e, t) {
+ return defined(t) || (t = new Matrix4()), t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = 0, t[4] = e[3], t[5] = e[4], t[6] = e[5], t[7] = 0, t[8] = e[6], t[9] = e[7], t[10] = e[8], t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, t;
+};
+const fromCameraF = new Cartesian3(), fromCameraR = new Cartesian3(), fromCameraU = new Cartesian3();
+Matrix4.fromCamera = function(e, t) {
+ const n = e.position, i = e.direction, r = e.up;
+ Cartesian3.normalize(i, fromCameraF), Cartesian3.normalize(
+ Cartesian3.cross(fromCameraF, r, fromCameraR),
+ fromCameraR
+ ), Cartesian3.normalize(
+ Cartesian3.cross(fromCameraR, fromCameraF, fromCameraU),
+ fromCameraU
+ );
+ const o = fromCameraR.x, s = fromCameraR.y, c = fromCameraR.z, l = fromCameraF.x, d = fromCameraF.y, f = fromCameraF.z, h = fromCameraU.x, p = fromCameraU.y, m = fromCameraU.z, _ = n.x, y = n.y, C = n.z, T = o * -_ + s * -y + c * -C, x = h * -_ + p * -y + m * -C, b = l * _ + d * y + f * C;
+ return defined(t) ? (t[0] = o, t[1] = h, t[2] = -l, t[3] = 0, t[4] = s, t[5] = p, t[6] = -d, t[7] = 0, t[8] = c, t[9] = m, t[10] = -f, t[11] = 0, t[12] = T, t[13] = x, t[14] = b, t[15] = 1, t) : new Matrix4(
+ o,
+ s,
+ c,
+ T,
+ h,
+ p,
+ m,
+ x,
+ -l,
+ -d,
+ -f,
+ b,
+ 0,
+ 0,
+ 0,
+ 1
+ );
+};
+Matrix4.computePerspectiveFieldOfView = function(e, t, n, i, r) {
+ const s = 1 / Math.tan(e * 0.5), c = s / t, l = (i + n) / (n - i), d = 2 * i * n / (n - i);
+ return r[0] = c, r[1] = 0, r[2] = 0, r[3] = 0, r[4] = 0, r[5] = s, r[6] = 0, r[7] = 0, r[8] = 0, r[9] = 0, r[10] = l, r[11] = -1, r[12] = 0, r[13] = 0, r[14] = d, r[15] = 0, r;
+};
+Matrix4.computeOrthographicOffCenter = function(e, t, n, i, r, o, s) {
+ let c = 1 / (t - e), l = 1 / (i - n), d = 1 / (o - r);
+ const f = -(t + e) * c, h = -(i + n) * l, p = -(o + r) * d;
+ return c *= 2, l *= 2, d *= -2, s[0] = c, s[1] = 0, s[2] = 0, s[3] = 0, s[4] = 0, s[5] = l, s[6] = 0, s[7] = 0, s[8] = 0, s[9] = 0, s[10] = d, s[11] = 0, s[12] = f, s[13] = h, s[14] = p, s[15] = 1, s;
+};
+Matrix4.computePerspectiveOffCenter = function(e, t, n, i, r, o, s) {
+ const c = 2 * r / (t - e), l = 2 * r / (i - n), d = (t + e) / (t - e), f = (i + n) / (i - n), h = -(o + r) / (o - r), p = -1, m = -2 * o * r / (o - r);
+ return s[0] = c, s[1] = 0, s[2] = 0, s[3] = 0, s[4] = 0, s[5] = l, s[6] = 0, s[7] = 0, s[8] = d, s[9] = f, s[10] = h, s[11] = p, s[12] = 0, s[13] = 0, s[14] = m, s[15] = 0, s;
+};
+Matrix4.computeInfinitePerspectiveOffCenter = function(e, t, n, i, r, o) {
+ const s = 2 * r / (t - e), c = 2 * r / (i - n), l = (t + e) / (t - e), d = (i + n) / (i - n), f = -1, h = -1, p = -2 * r;
+ return o[0] = s, o[1] = 0, o[2] = 0, o[3] = 0, o[4] = 0, o[5] = c, o[6] = 0, o[7] = 0, o[8] = l, o[9] = d, o[10] = f, o[11] = h, o[12] = 0, o[13] = 0, o[14] = p, o[15] = 0, o;
+};
+Matrix4.computeViewportTransformation = function(e, t, n, i) {
+ defined(i) || (i = new Matrix4()), e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const r = defaultValue(e.x, 0), o = defaultValue(e.y, 0), s = defaultValue(e.width, 0), c = defaultValue(e.height, 0);
+ t = defaultValue(t, 0), n = defaultValue(n, 1);
+ const l = s * 0.5, d = c * 0.5, f = (n - t) * 0.5, h = l, p = d, m = f, _ = r + l, y = o + d, C = t + f, T = 1;
+ return i[0] = h, i[1] = 0, i[2] = 0, i[3] = 0, i[4] = 0, i[5] = p, i[6] = 0, i[7] = 0, i[8] = 0, i[9] = 0, i[10] = m, i[11] = 0, i[12] = _, i[13] = y, i[14] = C, i[15] = T, i;
+};
+Matrix4.computeView = function(e, t, n, i, r) {
+ return r[0] = i.x, r[1] = n.x, r[2] = -t.x, r[3] = 0, r[4] = i.y, r[5] = n.y, r[6] = -t.y, r[7] = 0, r[8] = i.z, r[9] = n.z, r[10] = -t.z, r[11] = 0, r[12] = -Cartesian3.dot(i, e), r[13] = -Cartesian3.dot(n, e), r[14] = Cartesian3.dot(t, e), r[15] = 1, r;
+};
+Matrix4.toArray = function(e, t) {
+ return defined(t) ? (t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t[4] = e[4], t[5] = e[5], t[6] = e[6], t[7] = e[7], t[8] = e[8], t[9] = e[9], t[10] = e[10], t[11] = e[11], t[12] = e[12], t[13] = e[13], t[14] = e[14], t[15] = e[15], t) : [
+ e[0],
+ e[1],
+ e[2],
+ e[3],
+ e[4],
+ e[5],
+ e[6],
+ e[7],
+ e[8],
+ e[9],
+ e[10],
+ e[11],
+ e[12],
+ e[13],
+ e[14],
+ e[15]
+ ];
+};
+Matrix4.getElementIndex = function(e, t) {
+ return e * 4 + t;
+};
+Matrix4.getColumn = function(e, t, n) {
+ const i = t * 4, r = e[i], o = e[i + 1], s = e[i + 2], c = e[i + 3];
+ return n.x = r, n.y = o, n.z = s, n.w = c, n;
+};
+Matrix4.setColumn = function(e, t, n, i) {
+ i = Matrix4.clone(e, i);
+ const r = t * 4;
+ return i[r] = n.x, i[r + 1] = n.y, i[r + 2] = n.z, i[r + 3] = n.w, i;
+};
+Matrix4.getRow = function(e, t, n) {
+ const i = e[t], r = e[t + 4], o = e[t + 8], s = e[t + 12];
+ return n.x = i, n.y = r, n.z = o, n.w = s, n;
+};
+Matrix4.setRow = function(e, t, n, i) {
+ return i = Matrix4.clone(e, i), i[t] = n.x, i[t + 4] = n.y, i[t + 8] = n.z, i[t + 12] = n.w, i;
+};
+Matrix4.setTranslation = function(e, t, n) {
+ return n[0] = e[0], n[1] = e[1], n[2] = e[2], n[3] = e[3], n[4] = e[4], n[5] = e[5], n[6] = e[6], n[7] = e[7], n[8] = e[8], n[9] = e[9], n[10] = e[10], n[11] = e[11], n[12] = t.x, n[13] = t.y, n[14] = t.z, n[15] = e[15], n;
+};
+const scaleScratch1$1 = new Cartesian3();
+Matrix4.setScale = function(e, t, n) {
+ const i = Matrix4.getScale(e, scaleScratch1$1), r = t.x / i.x, o = t.y / i.y, s = t.z / i.z;
+ return n[0] = e[0] * r, n[1] = e[1] * r, n[2] = e[2] * r, n[3] = e[3], n[4] = e[4] * o, n[5] = e[5] * o, n[6] = e[6] * o, n[7] = e[7], n[8] = e[8] * s, n[9] = e[9] * s, n[10] = e[10] * s, n[11] = e[11], n[12] = e[12], n[13] = e[13], n[14] = e[14], n[15] = e[15], n;
+};
+const scaleScratch2$1 = new Cartesian3();
+Matrix4.setUniformScale = function(e, t, n) {
+ const i = Matrix4.getScale(e, scaleScratch2$1), r = t / i.x, o = t / i.y, s = t / i.z;
+ return n[0] = e[0] * r, n[1] = e[1] * r, n[2] = e[2] * r, n[3] = e[3], n[4] = e[4] * o, n[5] = e[5] * o, n[6] = e[6] * o, n[7] = e[7], n[8] = e[8] * s, n[9] = e[9] * s, n[10] = e[10] * s, n[11] = e[11], n[12] = e[12], n[13] = e[13], n[14] = e[14], n[15] = e[15], n;
+};
+const scratchColumn$1 = new Cartesian3();
+Matrix4.getScale = function(e, t) {
+ return t.x = Cartesian3.magnitude(
+ Cartesian3.fromElements(e[0], e[1], e[2], scratchColumn$1)
+ ), t.y = Cartesian3.magnitude(
+ Cartesian3.fromElements(e[4], e[5], e[6], scratchColumn$1)
+ ), t.z = Cartesian3.magnitude(
+ Cartesian3.fromElements(e[8], e[9], e[10], scratchColumn$1)
+ ), t;
+};
+const scaleScratch3$1 = new Cartesian3();
+Matrix4.getMaximumScale = function(e) {
+ return Matrix4.getScale(e, scaleScratch3$1), Cartesian3.maximumComponent(scaleScratch3$1);
+};
+const scaleScratch4$1 = new Cartesian3();
+Matrix4.setRotation = function(e, t, n) {
+ const i = Matrix4.getScale(e, scaleScratch4$1);
+ return n[0] = t[0] * i.x, n[1] = t[1] * i.x, n[2] = t[2] * i.x, n[3] = e[3], n[4] = t[3] * i.y, n[5] = t[4] * i.y, n[6] = t[5] * i.y, n[7] = e[7], n[8] = t[6] * i.z, n[9] = t[7] * i.z, n[10] = t[8] * i.z, n[11] = e[11], n[12] = e[12], n[13] = e[13], n[14] = e[14], n[15] = e[15], n;
+};
+const scaleScratch5$1 = new Cartesian3();
+Matrix4.getRotation = function(e, t) {
+ const n = Matrix4.getScale(e, scaleScratch5$1);
+ return t[0] = e[0] / n.x, t[1] = e[1] / n.x, t[2] = e[2] / n.x, t[3] = e[4] / n.y, t[4] = e[5] / n.y, t[5] = e[6] / n.y, t[6] = e[8] / n.z, t[7] = e[9] / n.z, t[8] = e[10] / n.z, t;
+};
+Matrix4.multiply = function(e, t, n) {
+ const i = e[0], r = e[1], o = e[2], s = e[3], c = e[4], l = e[5], d = e[6], f = e[7], h = e[8], p = e[9], m = e[10], _ = e[11], y = e[12], C = e[13], T = e[14], x = e[15], b = t[0], S = t[1], E = t[2], A = t[3], D = t[4], P = t[5], I = t[6], M = t[7], R = t[8], L = t[9], g = t[10], w = t[11], O = t[12], N = t[13], F = t[14], B = t[15], V = i * b + c * S + h * E + y * A, U = r * b + l * S + p * E + C * A, k = o * b + d * S + m * E + T * A, $ = s * b + f * S + _ * E + x * A, G = i * D + c * P + h * I + y * M, q = r * D + l * P + p * I + C * M, z = o * D + d * P + m * I + T * M, H = s * D + f * P + _ * I + x * M, Q = i * R + c * L + h * g + y * w, ne = r * R + l * L + p * g + C * w, K = o * R + d * L + m * g + T * w, Z = s * R + f * L + _ * g + x * w, ee = i * O + c * N + h * F + y * B, oe = r * O + l * N + p * F + C * B, X = o * O + d * N + m * F + T * B, fe = s * O + f * N + _ * F + x * B;
+ return n[0] = V, n[1] = U, n[2] = k, n[3] = $, n[4] = G, n[5] = q, n[6] = z, n[7] = H, n[8] = Q, n[9] = ne, n[10] = K, n[11] = Z, n[12] = ee, n[13] = oe, n[14] = X, n[15] = fe, n;
+};
+Matrix4.add = function(e, t, n) {
+ return n[0] = e[0] + t[0], n[1] = e[1] + t[1], n[2] = e[2] + t[2], n[3] = e[3] + t[3], n[4] = e[4] + t[4], n[5] = e[5] + t[5], n[6] = e[6] + t[6], n[7] = e[7] + t[7], n[8] = e[8] + t[8], n[9] = e[9] + t[9], n[10] = e[10] + t[10], n[11] = e[11] + t[11], n[12] = e[12] + t[12], n[13] = e[13] + t[13], n[14] = e[14] + t[14], n[15] = e[15] + t[15], n;
+};
+Matrix4.subtract = function(e, t, n) {
+ return n[0] = e[0] - t[0], n[1] = e[1] - t[1], n[2] = e[2] - t[2], n[3] = e[3] - t[3], n[4] = e[4] - t[4], n[5] = e[5] - t[5], n[6] = e[6] - t[6], n[7] = e[7] - t[7], n[8] = e[8] - t[8], n[9] = e[9] - t[9], n[10] = e[10] - t[10], n[11] = e[11] - t[11], n[12] = e[12] - t[12], n[13] = e[13] - t[13], n[14] = e[14] - t[14], n[15] = e[15] - t[15], n;
+};
+Matrix4.multiplyTransformation = function(e, t, n) {
+ const i = e[0], r = e[1], o = e[2], s = e[4], c = e[5], l = e[6], d = e[8], f = e[9], h = e[10], p = e[12], m = e[13], _ = e[14], y = t[0], C = t[1], T = t[2], x = t[4], b = t[5], S = t[6], E = t[8], A = t[9], D = t[10], P = t[12], I = t[13], M = t[14], R = i * y + s * C + d * T, L = r * y + c * C + f * T, g = o * y + l * C + h * T, w = i * x + s * b + d * S, O = r * x + c * b + f * S, N = o * x + l * b + h * S, F = i * E + s * A + d * D, B = r * E + c * A + f * D, V = o * E + l * A + h * D, U = i * P + s * I + d * M + p, k = r * P + c * I + f * M + m, $ = o * P + l * I + h * M + _;
+ return n[0] = R, n[1] = L, n[2] = g, n[3] = 0, n[4] = w, n[5] = O, n[6] = N, n[7] = 0, n[8] = F, n[9] = B, n[10] = V, n[11] = 0, n[12] = U, n[13] = k, n[14] = $, n[15] = 1, n;
+};
+Matrix4.multiplyByMatrix3 = function(e, t, n) {
+ const i = e[0], r = e[1], o = e[2], s = e[4], c = e[5], l = e[6], d = e[8], f = e[9], h = e[10], p = t[0], m = t[1], _ = t[2], y = t[3], C = t[4], T = t[5], x = t[6], b = t[7], S = t[8], E = i * p + s * m + d * _, A = r * p + c * m + f * _, D = o * p + l * m + h * _, P = i * y + s * C + d * T, I = r * y + c * C + f * T, M = o * y + l * C + h * T, R = i * x + s * b + d * S, L = r * x + c * b + f * S, g = o * x + l * b + h * S;
+ return n[0] = E, n[1] = A, n[2] = D, n[3] = 0, n[4] = P, n[5] = I, n[6] = M, n[7] = 0, n[8] = R, n[9] = L, n[10] = g, n[11] = 0, n[12] = e[12], n[13] = e[13], n[14] = e[14], n[15] = e[15], n;
+};
+Matrix4.multiplyByTranslation = function(e, t, n) {
+ const i = t.x, r = t.y, o = t.z, s = i * e[0] + r * e[4] + o * e[8] + e[12], c = i * e[1] + r * e[5] + o * e[9] + e[13], l = i * e[2] + r * e[6] + o * e[10] + e[14];
+ return n[0] = e[0], n[1] = e[1], n[2] = e[2], n[3] = e[3], n[4] = e[4], n[5] = e[5], n[6] = e[6], n[7] = e[7], n[8] = e[8], n[9] = e[9], n[10] = e[10], n[11] = e[11], n[12] = s, n[13] = c, n[14] = l, n[15] = e[15], n;
+};
+Matrix4.multiplyByScale = function(e, t, n) {
+ const i = t.x, r = t.y, o = t.z;
+ return i === 1 && r === 1 && o === 1 ? Matrix4.clone(e, n) : (n[0] = i * e[0], n[1] = i * e[1], n[2] = i * e[2], n[3] = e[3], n[4] = r * e[4], n[5] = r * e[5], n[6] = r * e[6], n[7] = e[7], n[8] = o * e[8], n[9] = o * e[9], n[10] = o * e[10], n[11] = e[11], n[12] = e[12], n[13] = e[13], n[14] = e[14], n[15] = e[15], n);
+};
+Matrix4.multiplyByUniformScale = function(e, t, n) {
+ return n[0] = e[0] * t, n[1] = e[1] * t, n[2] = e[2] * t, n[3] = e[3], n[4] = e[4] * t, n[5] = e[5] * t, n[6] = e[6] * t, n[7] = e[7], n[8] = e[8] * t, n[9] = e[9] * t, n[10] = e[10] * t, n[11] = e[11], n[12] = e[12], n[13] = e[13], n[14] = e[14], n[15] = e[15], n;
+};
+Matrix4.multiplyByVector = function(e, t, n) {
+ const i = t.x, r = t.y, o = t.z, s = t.w, c = e[0] * i + e[4] * r + e[8] * o + e[12] * s, l = e[1] * i + e[5] * r + e[9] * o + e[13] * s, d = e[2] * i + e[6] * r + e[10] * o + e[14] * s, f = e[3] * i + e[7] * r + e[11] * o + e[15] * s;
+ return n.x = c, n.y = l, n.z = d, n.w = f, n;
+};
+Matrix4.multiplyByPointAsVector = function(e, t, n) {
+ const i = t.x, r = t.y, o = t.z, s = e[0] * i + e[4] * r + e[8] * o, c = e[1] * i + e[5] * r + e[9] * o, l = e[2] * i + e[6] * r + e[10] * o;
+ return n.x = s, n.y = c, n.z = l, n;
+};
+Matrix4.multiplyByPoint = function(e, t, n) {
+ const i = t.x, r = t.y, o = t.z, s = e[0] * i + e[4] * r + e[8] * o + e[12], c = e[1] * i + e[5] * r + e[9] * o + e[13], l = e[2] * i + e[6] * r + e[10] * o + e[14];
+ return n.x = s, n.y = c, n.z = l, n;
+};
+Matrix4.multiplyByScalar = function(e, t, n) {
+ return n[0] = e[0] * t, n[1] = e[1] * t, n[2] = e[2] * t, n[3] = e[3] * t, n[4] = e[4] * t, n[5] = e[5] * t, n[6] = e[6] * t, n[7] = e[7] * t, n[8] = e[8] * t, n[9] = e[9] * t, n[10] = e[10] * t, n[11] = e[11] * t, n[12] = e[12] * t, n[13] = e[13] * t, n[14] = e[14] * t, n[15] = e[15] * t, n;
+};
+Matrix4.negate = function(e, t) {
+ 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;
+};
+Matrix4.transpose = function(e, t) {
+ const n = e[1], i = e[2], r = e[3], o = e[6], s = e[7], c = e[11];
+ return t[0] = e[0], t[1] = e[4], t[2] = e[8], t[3] = e[12], t[4] = n, t[5] = e[5], t[6] = e[9], t[7] = e[13], t[8] = i, t[9] = o, t[10] = e[10], t[11] = e[14], t[12] = r, t[13] = s, t[14] = c, t[15] = e[15], t;
+};
+Matrix4.abs = function(e, t) {
+ return t[0] = Math.abs(e[0]), t[1] = Math.abs(e[1]), t[2] = Math.abs(e[2]), t[3] = Math.abs(e[3]), t[4] = Math.abs(e[4]), t[5] = Math.abs(e[5]), t[6] = Math.abs(e[6]), t[7] = Math.abs(e[7]), t[8] = Math.abs(e[8]), t[9] = Math.abs(e[9]), t[10] = Math.abs(e[10]), t[11] = Math.abs(e[11]), t[12] = Math.abs(e[12]), t[13] = Math.abs(e[13]), t[14] = Math.abs(e[14]), t[15] = Math.abs(e[15]), t;
+};
+Matrix4.equals = function(e, t) {
+ return e === t || defined(e) && defined(t) && // Translation
+ e[12] === t[12] && e[13] === t[13] && e[14] === t[14] && // Rotation/scale
+ e[0] === t[0] && e[1] === t[1] && e[2] === t[2] && e[4] === t[4] && e[5] === t[5] && e[6] === t[6] && e[8] === t[8] && e[9] === t[9] && e[10] === t[10] && // Bottom row
+ e[3] === t[3] && e[7] === t[7] && e[11] === t[11] && e[15] === t[15];
+};
+Matrix4.equalsEpsilon = function(e, t, n) {
+ return n = defaultValue(n, 0), e === t || defined(e) && defined(t) && Math.abs(e[0] - t[0]) <= n && Math.abs(e[1] - t[1]) <= n && Math.abs(e[2] - t[2]) <= n && Math.abs(e[3] - t[3]) <= n && Math.abs(e[4] - t[4]) <= n && Math.abs(e[5] - t[5]) <= n && Math.abs(e[6] - t[6]) <= n && Math.abs(e[7] - t[7]) <= n && Math.abs(e[8] - t[8]) <= n && Math.abs(e[9] - t[9]) <= n && Math.abs(e[10] - t[10]) <= n && Math.abs(e[11] - t[11]) <= n && Math.abs(e[12] - t[12]) <= n && Math.abs(e[13] - t[13]) <= n && Math.abs(e[14] - t[14]) <= n && Math.abs(e[15] - t[15]) <= n;
+};
+Matrix4.getTranslation = function(e, t) {
+ return t.x = e[12], t.y = e[13], t.z = e[14], t;
+};
+Matrix4.getMatrix3 = function(e, t) {
+ return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[4], t[4] = e[5], t[5] = e[6], t[6] = e[8], t[7] = e[9], t[8] = e[10], t;
+};
+const scratchInverseRotation = new Matrix3(), scratchMatrix3Zero = new Matrix3(), scratchBottomRow = new Cartesian4(), scratchExpectedBottomRow = new Cartesian4(0, 0, 0, 1);
+Matrix4.inverse = function(e, t) {
+ const n = e[0], i = e[4], r = e[8], o = e[12], s = e[1], c = e[5], l = e[9], d = e[13], f = e[2], h = e[6], p = e[10], m = e[14], _ = e[3], y = e[7], C = e[11], T = e[15];
+ let x = p * T, b = m * C, S = h * T, E = m * y, A = h * C, D = p * y, P = f * T, I = m * _, M = f * C, R = p * _, L = f * y, g = h * _;
+ const w = x * c + E * l + A * d - (b * c + S * l + D * d), O = b * s + P * l + R * d - (x * s + I * l + M * d), N = S * s + I * c + L * d - (E * s + P * c + g * d), F = D * s + M * c + g * l - (A * s + R * c + L * l), B = b * i + S * r + D * o - (x * i + E * r + A * o), V = x * n + I * r + M * o - (b * n + P * r + R * o), U = E * n + P * i + g * o - (S * n + I * i + L * o), k = A * n + R * i + L * r - (D * n + M * i + g * r);
+ x = r * d, b = o * l, S = i * d, E = o * c, A = i * l, D = r * c, P = n * d, I = o * s, M = n * l, R = r * s, L = n * c, g = i * s;
+ const $ = x * y + E * C + A * T - (b * y + S * C + D * T), G = b * _ + P * C + R * T - (x * _ + I * C + M * T), q = S * _ + I * y + L * T - (E * _ + P * y + g * T), z = D * _ + M * y + g * C - (A * _ + R * y + L * C), H = S * p + D * m + b * h - (A * m + x * h + E * p), Q = M * m + x * f + I * p - (P * p + R * m + b * f), ne = P * h + g * m + E * f - (L * m + S * f + I * h), K = L * p + A * f + R * h - (M * h + g * p + D * f);
+ let Z = n * w + i * O + r * N + o * F;
+ if (Math.abs(Z) < CesiumMath.EPSILON21) {
+ if (Matrix3.equalsEpsilon(
+ Matrix4.getMatrix3(e, scratchInverseRotation),
+ scratchMatrix3Zero,
+ CesiumMath.EPSILON7
+ ) && Cartesian4.equals(
+ Matrix4.getRow(e, 3, scratchBottomRow),
+ scratchExpectedBottomRow
+ ))
+ return t[0] = 0, t[1] = 0, t[2] = 0, t[3] = 0, t[4] = 0, t[5] = 0, t[6] = 0, t[7] = 0, t[8] = 0, t[9] = 0, t[10] = 0, t[11] = 0, t[12] = -e[12], t[13] = -e[13], t[14] = -e[14], t[15] = 1, t;
+ throw new RuntimeError(
+ "matrix is not invertible because its determinate is zero."
+ );
+ }
+ return Z = 1 / Z, t[0] = w * Z, t[1] = O * Z, t[2] = N * Z, t[3] = F * Z, t[4] = B * Z, t[5] = V * Z, t[6] = U * Z, t[7] = k * Z, t[8] = $ * Z, t[9] = G * Z, t[10] = q * Z, t[11] = z * Z, t[12] = H * Z, t[13] = Q * Z, t[14] = ne * Z, t[15] = K * Z, t;
+};
+Matrix4.inverseTransformation = function(e, t) {
+ const n = e[0], i = e[1], r = e[2], o = e[4], s = e[5], c = e[6], l = e[8], d = e[9], f = e[10], h = e[12], p = e[13], m = e[14], _ = -n * h - i * p - r * m, y = -o * h - s * p - c * m, C = -l * h - d * p - f * m;
+ return t[0] = n, t[1] = o, t[2] = l, t[3] = 0, t[4] = i, t[5] = s, t[6] = d, t[7] = 0, t[8] = r, t[9] = c, t[10] = f, t[11] = 0, t[12] = _, t[13] = y, t[14] = C, t[15] = 1, t;
+};
+const scratchTransposeMatrix = new Matrix4();
+Matrix4.inverseTranspose = function(e, t) {
+ return Matrix4.inverse(
+ Matrix4.transpose(e, scratchTransposeMatrix),
+ t
+ );
+};
+Matrix4.IDENTITY = Object.freeze(
+ new Matrix4(
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1
+ )
+);
+Matrix4.ZERO = Object.freeze(
+ new Matrix4(
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0
+ )
+);
+Matrix4.COLUMN0ROW0 = 0;
+Matrix4.COLUMN0ROW1 = 1;
+Matrix4.COLUMN0ROW2 = 2;
+Matrix4.COLUMN0ROW3 = 3;
+Matrix4.COLUMN1ROW0 = 4;
+Matrix4.COLUMN1ROW1 = 5;
+Matrix4.COLUMN1ROW2 = 6;
+Matrix4.COLUMN1ROW3 = 7;
+Matrix4.COLUMN2ROW0 = 8;
+Matrix4.COLUMN2ROW1 = 9;
+Matrix4.COLUMN2ROW2 = 10;
+Matrix4.COLUMN2ROW3 = 11;
+Matrix4.COLUMN3ROW0 = 12;
+Matrix4.COLUMN3ROW1 = 13;
+Matrix4.COLUMN3ROW2 = 14;
+Matrix4.COLUMN3ROW3 = 15;
+Object.defineProperties(Matrix4.prototype, {
+ /**
+ * Gets the number of items in the collection.
+ * @memberof Matrix4.prototype
+ *
+ * @type {number}
+ */
+ length: {
+ get: function() {
+ return Matrix4.packedLength;
+ }
+ }
+});
+Matrix4.prototype.clone = function(e) {
+ return Matrix4.clone(this, e);
+};
+Matrix4.prototype.equals = function(e) {
+ return Matrix4.equals(this, e);
+};
+Matrix4.equalsArray = function(e, t, n) {
+ return e[0] === t[n] && e[1] === t[n + 1] && e[2] === t[n + 2] && e[3] === t[n + 3] && e[4] === t[n + 4] && e[5] === t[n + 5] && e[6] === t[n + 6] && e[7] === t[n + 7] && e[8] === t[n + 8] && e[9] === t[n + 9] && e[10] === t[n + 10] && e[11] === t[n + 11] && e[12] === t[n + 12] && e[13] === t[n + 13] && e[14] === t[n + 14] && e[15] === t[n + 15];
+};
+Matrix4.prototype.equalsEpsilon = function(e, t) {
+ return Matrix4.equalsEpsilon(this, e, t);
+};
+Matrix4.prototype.toString = function() {
+ return `(${this[0]}, ${this[4]}, ${this[8]}, ${this[12]})
+(${this[1]}, ${this[5]}, ${this[9]}, ${this[13]})
+(${this[2]}, ${this[6]}, ${this[10]}, ${this[14]})
+(${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`;
+};
+const WebGLConstants = {
+ DEPTH_BUFFER_BIT: 256,
+ STENCIL_BUFFER_BIT: 1024,
+ COLOR_BUFFER_BIT: 16384,
+ POINTS: 0,
+ LINES: 1,
+ LINE_LOOP: 2,
+ LINE_STRIP: 3,
+ TRIANGLES: 4,
+ TRIANGLE_STRIP: 5,
+ TRIANGLE_FAN: 6,
+ ZERO: 0,
+ ONE: 1,
+ SRC_COLOR: 768,
+ ONE_MINUS_SRC_COLOR: 769,
+ SRC_ALPHA: 770,
+ ONE_MINUS_SRC_ALPHA: 771,
+ DST_ALPHA: 772,
+ ONE_MINUS_DST_ALPHA: 773,
+ DST_COLOR: 774,
+ ONE_MINUS_DST_COLOR: 775,
+ SRC_ALPHA_SATURATE: 776,
+ FUNC_ADD: 32774,
+ BLEND_EQUATION: 32777,
+ BLEND_EQUATION_RGB: 32777,
+ // same as BLEND_EQUATION
+ BLEND_EQUATION_ALPHA: 34877,
+ FUNC_SUBTRACT: 32778,
+ FUNC_REVERSE_SUBTRACT: 32779,
+ BLEND_DST_RGB: 32968,
+ BLEND_SRC_RGB: 32969,
+ BLEND_DST_ALPHA: 32970,
+ BLEND_SRC_ALPHA: 32971,
+ CONSTANT_COLOR: 32769,
+ ONE_MINUS_CONSTANT_COLOR: 32770,
+ CONSTANT_ALPHA: 32771,
+ ONE_MINUS_CONSTANT_ALPHA: 32772,
+ BLEND_COLOR: 32773,
+ ARRAY_BUFFER: 34962,
+ ELEMENT_ARRAY_BUFFER: 34963,
+ ARRAY_BUFFER_BINDING: 34964,
+ ELEMENT_ARRAY_BUFFER_BINDING: 34965,
+ STREAM_DRAW: 35040,
+ STATIC_DRAW: 35044,
+ DYNAMIC_DRAW: 35048,
+ BUFFER_SIZE: 34660,
+ BUFFER_USAGE: 34661,
+ CURRENT_VERTEX_ATTRIB: 34342,
+ FRONT: 1028,
+ BACK: 1029,
+ FRONT_AND_BACK: 1032,
+ CULL_FACE: 2884,
+ BLEND: 3042,
+ DITHER: 3024,
+ STENCIL_TEST: 2960,
+ DEPTH_TEST: 2929,
+ SCISSOR_TEST: 3089,
+ POLYGON_OFFSET_FILL: 32823,
+ SAMPLE_ALPHA_TO_COVERAGE: 32926,
+ SAMPLE_COVERAGE: 32928,
+ NO_ERROR: 0,
+ INVALID_ENUM: 1280,
+ INVALID_VALUE: 1281,
+ INVALID_OPERATION: 1282,
+ OUT_OF_MEMORY: 1285,
+ CW: 2304,
+ CCW: 2305,
+ LINE_WIDTH: 2849,
+ ALIASED_POINT_SIZE_RANGE: 33901,
+ ALIASED_LINE_WIDTH_RANGE: 33902,
+ CULL_FACE_MODE: 2885,
+ FRONT_FACE: 2886,
+ DEPTH_RANGE: 2928,
+ DEPTH_WRITEMASK: 2930,
+ DEPTH_CLEAR_VALUE: 2931,
+ DEPTH_FUNC: 2932,
+ STENCIL_CLEAR_VALUE: 2961,
+ STENCIL_FUNC: 2962,
+ STENCIL_FAIL: 2964,
+ STENCIL_PASS_DEPTH_FAIL: 2965,
+ STENCIL_PASS_DEPTH_PASS: 2966,
+ STENCIL_REF: 2967,
+ STENCIL_VALUE_MASK: 2963,
+ STENCIL_WRITEMASK: 2968,
+ STENCIL_BACK_FUNC: 34816,
+ STENCIL_BACK_FAIL: 34817,
+ STENCIL_BACK_PASS_DEPTH_FAIL: 34818,
+ STENCIL_BACK_PASS_DEPTH_PASS: 34819,
+ STENCIL_BACK_REF: 36003,
+ STENCIL_BACK_VALUE_MASK: 36004,
+ STENCIL_BACK_WRITEMASK: 36005,
+ VIEWPORT: 2978,
+ SCISSOR_BOX: 3088,
+ COLOR_CLEAR_VALUE: 3106,
+ COLOR_WRITEMASK: 3107,
+ UNPACK_ALIGNMENT: 3317,
+ PACK_ALIGNMENT: 3333,
+ MAX_TEXTURE_SIZE: 3379,
+ MAX_VIEWPORT_DIMS: 3386,
+ SUBPIXEL_BITS: 3408,
+ RED_BITS: 3410,
+ GREEN_BITS: 3411,
+ BLUE_BITS: 3412,
+ ALPHA_BITS: 3413,
+ DEPTH_BITS: 3414,
+ STENCIL_BITS: 3415,
+ POLYGON_OFFSET_UNITS: 10752,
+ POLYGON_OFFSET_FACTOR: 32824,
+ TEXTURE_BINDING_2D: 32873,
+ SAMPLE_BUFFERS: 32936,
+ SAMPLES: 32937,
+ SAMPLE_COVERAGE_VALUE: 32938,
+ SAMPLE_COVERAGE_INVERT: 32939,
+ COMPRESSED_TEXTURE_FORMATS: 34467,
+ DONT_CARE: 4352,
+ FASTEST: 4353,
+ NICEST: 4354,
+ GENERATE_MIPMAP_HINT: 33170,
+ BYTE: 5120,
+ UNSIGNED_BYTE: 5121,
+ SHORT: 5122,
+ UNSIGNED_SHORT: 5123,
+ INT: 5124,
+ UNSIGNED_INT: 5125,
+ FLOAT: 5126,
+ DEPTH_COMPONENT: 6402,
+ ALPHA: 6406,
+ RGB: 6407,
+ RGBA: 6408,
+ LUMINANCE: 6409,
+ LUMINANCE_ALPHA: 6410,
+ UNSIGNED_SHORT_4_4_4_4: 32819,
+ UNSIGNED_SHORT_5_5_5_1: 32820,
+ UNSIGNED_SHORT_5_6_5: 33635,
+ FRAGMENT_SHADER: 35632,
+ VERTEX_SHADER: 35633,
+ MAX_VERTEX_ATTRIBS: 34921,
+ MAX_VERTEX_UNIFORM_VECTORS: 36347,
+ MAX_VARYING_VECTORS: 36348,
+ MAX_COMBINED_TEXTURE_IMAGE_UNITS: 35661,
+ MAX_VERTEX_TEXTURE_IMAGE_UNITS: 35660,
+ MAX_TEXTURE_IMAGE_UNITS: 34930,
+ MAX_FRAGMENT_UNIFORM_VECTORS: 36349,
+ SHADER_TYPE: 35663,
+ DELETE_STATUS: 35712,
+ LINK_STATUS: 35714,
+ VALIDATE_STATUS: 35715,
+ ATTACHED_SHADERS: 35717,
+ ACTIVE_UNIFORMS: 35718,
+ ACTIVE_ATTRIBUTES: 35721,
+ SHADING_LANGUAGE_VERSION: 35724,
+ CURRENT_PROGRAM: 35725,
+ NEVER: 512,
+ LESS: 513,
+ EQUAL: 514,
+ LEQUAL: 515,
+ GREATER: 516,
+ NOTEQUAL: 517,
+ GEQUAL: 518,
+ ALWAYS: 519,
+ KEEP: 7680,
+ REPLACE: 7681,
+ INCR: 7682,
+ DECR: 7683,
+ INVERT: 5386,
+ INCR_WRAP: 34055,
+ DECR_WRAP: 34056,
+ VENDOR: 7936,
+ RENDERER: 7937,
+ VERSION: 7938,
+ NEAREST: 9728,
+ LINEAR: 9729,
+ NEAREST_MIPMAP_NEAREST: 9984,
+ LINEAR_MIPMAP_NEAREST: 9985,
+ NEAREST_MIPMAP_LINEAR: 9986,
+ LINEAR_MIPMAP_LINEAR: 9987,
+ TEXTURE_MAG_FILTER: 10240,
+ TEXTURE_MIN_FILTER: 10241,
+ TEXTURE_WRAP_S: 10242,
+ TEXTURE_WRAP_T: 10243,
+ TEXTURE_2D: 3553,
+ TEXTURE: 5890,
+ TEXTURE_CUBE_MAP: 34067,
+ TEXTURE_BINDING_CUBE_MAP: 34068,
+ TEXTURE_CUBE_MAP_POSITIVE_X: 34069,
+ TEXTURE_CUBE_MAP_NEGATIVE_X: 34070,
+ TEXTURE_CUBE_MAP_POSITIVE_Y: 34071,
+ TEXTURE_CUBE_MAP_NEGATIVE_Y: 34072,
+ TEXTURE_CUBE_MAP_POSITIVE_Z: 34073,
+ TEXTURE_CUBE_MAP_NEGATIVE_Z: 34074,
+ MAX_CUBE_MAP_TEXTURE_SIZE: 34076,
+ TEXTURE0: 33984,
+ TEXTURE1: 33985,
+ TEXTURE2: 33986,
+ TEXTURE3: 33987,
+ TEXTURE4: 33988,
+ TEXTURE5: 33989,
+ TEXTURE6: 33990,
+ TEXTURE7: 33991,
+ TEXTURE8: 33992,
+ TEXTURE9: 33993,
+ TEXTURE10: 33994,
+ TEXTURE11: 33995,
+ TEXTURE12: 33996,
+ TEXTURE13: 33997,
+ TEXTURE14: 33998,
+ TEXTURE15: 33999,
+ TEXTURE16: 34e3,
+ TEXTURE17: 34001,
+ TEXTURE18: 34002,
+ TEXTURE19: 34003,
+ TEXTURE20: 34004,
+ TEXTURE21: 34005,
+ TEXTURE22: 34006,
+ TEXTURE23: 34007,
+ TEXTURE24: 34008,
+ TEXTURE25: 34009,
+ TEXTURE26: 34010,
+ TEXTURE27: 34011,
+ TEXTURE28: 34012,
+ TEXTURE29: 34013,
+ TEXTURE30: 34014,
+ TEXTURE31: 34015,
+ ACTIVE_TEXTURE: 34016,
+ REPEAT: 10497,
+ CLAMP_TO_EDGE: 33071,
+ MIRRORED_REPEAT: 33648,
+ FLOAT_VEC2: 35664,
+ FLOAT_VEC3: 35665,
+ FLOAT_VEC4: 35666,
+ INT_VEC2: 35667,
+ INT_VEC3: 35668,
+ INT_VEC4: 35669,
+ BOOL: 35670,
+ BOOL_VEC2: 35671,
+ BOOL_VEC3: 35672,
+ BOOL_VEC4: 35673,
+ FLOAT_MAT2: 35674,
+ FLOAT_MAT3: 35675,
+ FLOAT_MAT4: 35676,
+ SAMPLER_2D: 35678,
+ SAMPLER_CUBE: 35680,
+ VERTEX_ATTRIB_ARRAY_ENABLED: 34338,
+ VERTEX_ATTRIB_ARRAY_SIZE: 34339,
+ VERTEX_ATTRIB_ARRAY_STRIDE: 34340,
+ VERTEX_ATTRIB_ARRAY_TYPE: 34341,
+ VERTEX_ATTRIB_ARRAY_NORMALIZED: 34922,
+ VERTEX_ATTRIB_ARRAY_POINTER: 34373,
+ VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: 34975,
+ IMPLEMENTATION_COLOR_READ_TYPE: 35738,
+ IMPLEMENTATION_COLOR_READ_FORMAT: 35739,
+ COMPILE_STATUS: 35713,
+ LOW_FLOAT: 36336,
+ MEDIUM_FLOAT: 36337,
+ HIGH_FLOAT: 36338,
+ LOW_INT: 36339,
+ MEDIUM_INT: 36340,
+ HIGH_INT: 36341,
+ FRAMEBUFFER: 36160,
+ RENDERBUFFER: 36161,
+ RGBA4: 32854,
+ RGB5_A1: 32855,
+ RGB565: 36194,
+ DEPTH_COMPONENT16: 33189,
+ STENCIL_INDEX: 6401,
+ STENCIL_INDEX8: 36168,
+ DEPTH_STENCIL: 34041,
+ RENDERBUFFER_WIDTH: 36162,
+ RENDERBUFFER_HEIGHT: 36163,
+ RENDERBUFFER_INTERNAL_FORMAT: 36164,
+ RENDERBUFFER_RED_SIZE: 36176,
+ RENDERBUFFER_GREEN_SIZE: 36177,
+ RENDERBUFFER_BLUE_SIZE: 36178,
+ RENDERBUFFER_ALPHA_SIZE: 36179,
+ RENDERBUFFER_DEPTH_SIZE: 36180,
+ RENDERBUFFER_STENCIL_SIZE: 36181,
+ FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: 36048,
+ FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: 36049,
+ FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: 36050,
+ FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: 36051,
+ COLOR_ATTACHMENT0: 36064,
+ DEPTH_ATTACHMENT: 36096,
+ STENCIL_ATTACHMENT: 36128,
+ DEPTH_STENCIL_ATTACHMENT: 33306,
+ NONE: 0,
+ FRAMEBUFFER_COMPLETE: 36053,
+ FRAMEBUFFER_INCOMPLETE_ATTACHMENT: 36054,
+ FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: 36055,
+ FRAMEBUFFER_INCOMPLETE_DIMENSIONS: 36057,
+ FRAMEBUFFER_UNSUPPORTED: 36061,
+ FRAMEBUFFER_BINDING: 36006,
+ RENDERBUFFER_BINDING: 36007,
+ MAX_RENDERBUFFER_SIZE: 34024,
+ INVALID_FRAMEBUFFER_OPERATION: 1286,
+ UNPACK_FLIP_Y_WEBGL: 37440,
+ UNPACK_PREMULTIPLY_ALPHA_WEBGL: 37441,
+ CONTEXT_LOST_WEBGL: 37442,
+ UNPACK_COLORSPACE_CONVERSION_WEBGL: 37443,
+ BROWSER_DEFAULT_WEBGL: 37444,
+ // WEBGL_compressed_texture_s3tc
+ COMPRESSED_RGB_S3TC_DXT1_EXT: 33776,
+ COMPRESSED_RGBA_S3TC_DXT1_EXT: 33777,
+ COMPRESSED_RGBA_S3TC_DXT3_EXT: 33778,
+ COMPRESSED_RGBA_S3TC_DXT5_EXT: 33779,
+ // WEBGL_compressed_texture_pvrtc
+ COMPRESSED_RGB_PVRTC_4BPPV1_IMG: 35840,
+ COMPRESSED_RGB_PVRTC_2BPPV1_IMG: 35841,
+ COMPRESSED_RGBA_PVRTC_4BPPV1_IMG: 35842,
+ COMPRESSED_RGBA_PVRTC_2BPPV1_IMG: 35843,
+ // WEBGL_compressed_texture_astc
+ COMPRESSED_RGBA_ASTC_4x4_WEBGL: 37808,
+ // WEBGL_compressed_texture_etc1
+ COMPRESSED_RGB_ETC1_WEBGL: 36196,
+ // EXT_texture_compression_bptc
+ COMPRESSED_RGBA_BPTC_UNORM: 36492,
+ // EXT_color_buffer_half_float
+ HALF_FLOAT_OES: 36193,
+ // Desktop OpenGL
+ DOUBLE: 5130,
+ // WebGL 2
+ READ_BUFFER: 3074,
+ UNPACK_ROW_LENGTH: 3314,
+ UNPACK_SKIP_ROWS: 3315,
+ UNPACK_SKIP_PIXELS: 3316,
+ PACK_ROW_LENGTH: 3330,
+ PACK_SKIP_ROWS: 3331,
+ PACK_SKIP_PIXELS: 3332,
+ COLOR: 6144,
+ DEPTH: 6145,
+ STENCIL: 6146,
+ RED: 6403,
+ RGB8: 32849,
+ RGBA8: 32856,
+ RGB10_A2: 32857,
+ TEXTURE_BINDING_3D: 32874,
+ UNPACK_SKIP_IMAGES: 32877,
+ UNPACK_IMAGE_HEIGHT: 32878,
+ TEXTURE_3D: 32879,
+ TEXTURE_WRAP_R: 32882,
+ MAX_3D_TEXTURE_SIZE: 32883,
+ UNSIGNED_INT_2_10_10_10_REV: 33640,
+ MAX_ELEMENTS_VERTICES: 33e3,
+ MAX_ELEMENTS_INDICES: 33001,
+ TEXTURE_MIN_LOD: 33082,
+ TEXTURE_MAX_LOD: 33083,
+ TEXTURE_BASE_LEVEL: 33084,
+ TEXTURE_MAX_LEVEL: 33085,
+ MIN: 32775,
+ MAX: 32776,
+ DEPTH_COMPONENT24: 33190,
+ MAX_TEXTURE_LOD_BIAS: 34045,
+ TEXTURE_COMPARE_MODE: 34892,
+ TEXTURE_COMPARE_FUNC: 34893,
+ CURRENT_QUERY: 34917,
+ QUERY_RESULT: 34918,
+ QUERY_RESULT_AVAILABLE: 34919,
+ STREAM_READ: 35041,
+ STREAM_COPY: 35042,
+ STATIC_READ: 35045,
+ STATIC_COPY: 35046,
+ DYNAMIC_READ: 35049,
+ DYNAMIC_COPY: 35050,
+ MAX_DRAW_BUFFERS: 34852,
+ DRAW_BUFFER0: 34853,
+ DRAW_BUFFER1: 34854,
+ DRAW_BUFFER2: 34855,
+ DRAW_BUFFER3: 34856,
+ DRAW_BUFFER4: 34857,
+ DRAW_BUFFER5: 34858,
+ DRAW_BUFFER6: 34859,
+ DRAW_BUFFER7: 34860,
+ DRAW_BUFFER8: 34861,
+ DRAW_BUFFER9: 34862,
+ DRAW_BUFFER10: 34863,
+ DRAW_BUFFER11: 34864,
+ DRAW_BUFFER12: 34865,
+ DRAW_BUFFER13: 34866,
+ DRAW_BUFFER14: 34867,
+ DRAW_BUFFER15: 34868,
+ MAX_FRAGMENT_UNIFORM_COMPONENTS: 35657,
+ MAX_VERTEX_UNIFORM_COMPONENTS: 35658,
+ SAMPLER_3D: 35679,
+ SAMPLER_2D_SHADOW: 35682,
+ FRAGMENT_SHADER_DERIVATIVE_HINT: 35723,
+ PIXEL_PACK_BUFFER: 35051,
+ PIXEL_UNPACK_BUFFER: 35052,
+ PIXEL_PACK_BUFFER_BINDING: 35053,
+ PIXEL_UNPACK_BUFFER_BINDING: 35055,
+ FLOAT_MAT2x3: 35685,
+ FLOAT_MAT2x4: 35686,
+ FLOAT_MAT3x2: 35687,
+ FLOAT_MAT3x4: 35688,
+ FLOAT_MAT4x2: 35689,
+ FLOAT_MAT4x3: 35690,
+ SRGB: 35904,
+ SRGB8: 35905,
+ SRGB8_ALPHA8: 35907,
+ COMPARE_REF_TO_TEXTURE: 34894,
+ RGBA32F: 34836,
+ RGB32F: 34837,
+ RGBA16F: 34842,
+ RGB16F: 34843,
+ VERTEX_ATTRIB_ARRAY_INTEGER: 35069,
+ MAX_ARRAY_TEXTURE_LAYERS: 35071,
+ MIN_PROGRAM_TEXEL_OFFSET: 35076,
+ MAX_PROGRAM_TEXEL_OFFSET: 35077,
+ MAX_VARYING_COMPONENTS: 35659,
+ TEXTURE_2D_ARRAY: 35866,
+ TEXTURE_BINDING_2D_ARRAY: 35869,
+ R11F_G11F_B10F: 35898,
+ UNSIGNED_INT_10F_11F_11F_REV: 35899,
+ RGB9_E5: 35901,
+ UNSIGNED_INT_5_9_9_9_REV: 35902,
+ TRANSFORM_FEEDBACK_BUFFER_MODE: 35967,
+ MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: 35968,
+ TRANSFORM_FEEDBACK_VARYINGS: 35971,
+ TRANSFORM_FEEDBACK_BUFFER_START: 35972,
+ TRANSFORM_FEEDBACK_BUFFER_SIZE: 35973,
+ TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: 35976,
+ RASTERIZER_DISCARD: 35977,
+ MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: 35978,
+ MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: 35979,
+ INTERLEAVED_ATTRIBS: 35980,
+ SEPARATE_ATTRIBS: 35981,
+ TRANSFORM_FEEDBACK_BUFFER: 35982,
+ TRANSFORM_FEEDBACK_BUFFER_BINDING: 35983,
+ RGBA32UI: 36208,
+ RGB32UI: 36209,
+ RGBA16UI: 36214,
+ RGB16UI: 36215,
+ RGBA8UI: 36220,
+ RGB8UI: 36221,
+ RGBA32I: 36226,
+ RGB32I: 36227,
+ RGBA16I: 36232,
+ RGB16I: 36233,
+ RGBA8I: 36238,
+ RGB8I: 36239,
+ RED_INTEGER: 36244,
+ RGB_INTEGER: 36248,
+ RGBA_INTEGER: 36249,
+ SAMPLER_2D_ARRAY: 36289,
+ SAMPLER_2D_ARRAY_SHADOW: 36292,
+ SAMPLER_CUBE_SHADOW: 36293,
+ UNSIGNED_INT_VEC2: 36294,
+ UNSIGNED_INT_VEC3: 36295,
+ UNSIGNED_INT_VEC4: 36296,
+ INT_SAMPLER_2D: 36298,
+ INT_SAMPLER_3D: 36299,
+ INT_SAMPLER_CUBE: 36300,
+ INT_SAMPLER_2D_ARRAY: 36303,
+ UNSIGNED_INT_SAMPLER_2D: 36306,
+ UNSIGNED_INT_SAMPLER_3D: 36307,
+ UNSIGNED_INT_SAMPLER_CUBE: 36308,
+ UNSIGNED_INT_SAMPLER_2D_ARRAY: 36311,
+ DEPTH_COMPONENT32F: 36012,
+ DEPTH32F_STENCIL8: 36013,
+ FLOAT_32_UNSIGNED_INT_24_8_REV: 36269,
+ FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: 33296,
+ FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: 33297,
+ FRAMEBUFFER_ATTACHMENT_RED_SIZE: 33298,
+ FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: 33299,
+ FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: 33300,
+ FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: 33301,
+ FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: 33302,
+ FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: 33303,
+ FRAMEBUFFER_DEFAULT: 33304,
+ UNSIGNED_INT_24_8: 34042,
+ DEPTH24_STENCIL8: 35056,
+ UNSIGNED_NORMALIZED: 35863,
+ DRAW_FRAMEBUFFER_BINDING: 36006,
+ // Same as FRAMEBUFFER_BINDING
+ READ_FRAMEBUFFER: 36008,
+ DRAW_FRAMEBUFFER: 36009,
+ READ_FRAMEBUFFER_BINDING: 36010,
+ RENDERBUFFER_SAMPLES: 36011,
+ FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: 36052,
+ MAX_COLOR_ATTACHMENTS: 36063,
+ COLOR_ATTACHMENT1: 36065,
+ COLOR_ATTACHMENT2: 36066,
+ COLOR_ATTACHMENT3: 36067,
+ COLOR_ATTACHMENT4: 36068,
+ COLOR_ATTACHMENT5: 36069,
+ COLOR_ATTACHMENT6: 36070,
+ COLOR_ATTACHMENT7: 36071,
+ COLOR_ATTACHMENT8: 36072,
+ COLOR_ATTACHMENT9: 36073,
+ COLOR_ATTACHMENT10: 36074,
+ COLOR_ATTACHMENT11: 36075,
+ COLOR_ATTACHMENT12: 36076,
+ COLOR_ATTACHMENT13: 36077,
+ COLOR_ATTACHMENT14: 36078,
+ COLOR_ATTACHMENT15: 36079,
+ FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: 36182,
+ MAX_SAMPLES: 36183,
+ HALF_FLOAT: 5131,
+ RG: 33319,
+ RG_INTEGER: 33320,
+ R8: 33321,
+ RG8: 33323,
+ R16F: 33325,
+ R32F: 33326,
+ RG16F: 33327,
+ RG32F: 33328,
+ R8I: 33329,
+ R8UI: 33330,
+ R16I: 33331,
+ R16UI: 33332,
+ R32I: 33333,
+ R32UI: 33334,
+ RG8I: 33335,
+ RG8UI: 33336,
+ RG16I: 33337,
+ RG16UI: 33338,
+ RG32I: 33339,
+ RG32UI: 33340,
+ VERTEX_ARRAY_BINDING: 34229,
+ R8_SNORM: 36756,
+ RG8_SNORM: 36757,
+ RGB8_SNORM: 36758,
+ RGBA8_SNORM: 36759,
+ SIGNED_NORMALIZED: 36764,
+ COPY_READ_BUFFER: 36662,
+ COPY_WRITE_BUFFER: 36663,
+ COPY_READ_BUFFER_BINDING: 36662,
+ // Same as COPY_READ_BUFFER
+ COPY_WRITE_BUFFER_BINDING: 36663,
+ // Same as COPY_WRITE_BUFFER
+ UNIFORM_BUFFER: 35345,
+ UNIFORM_BUFFER_BINDING: 35368,
+ UNIFORM_BUFFER_START: 35369,
+ UNIFORM_BUFFER_SIZE: 35370,
+ MAX_VERTEX_UNIFORM_BLOCKS: 35371,
+ MAX_FRAGMENT_UNIFORM_BLOCKS: 35373,
+ MAX_COMBINED_UNIFORM_BLOCKS: 35374,
+ MAX_UNIFORM_BUFFER_BINDINGS: 35375,
+ MAX_UNIFORM_BLOCK_SIZE: 35376,
+ MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: 35377,
+ MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: 35379,
+ UNIFORM_BUFFER_OFFSET_ALIGNMENT: 35380,
+ ACTIVE_UNIFORM_BLOCKS: 35382,
+ UNIFORM_TYPE: 35383,
+ UNIFORM_SIZE: 35384,
+ UNIFORM_BLOCK_INDEX: 35386,
+ UNIFORM_OFFSET: 35387,
+ UNIFORM_ARRAY_STRIDE: 35388,
+ UNIFORM_MATRIX_STRIDE: 35389,
+ UNIFORM_IS_ROW_MAJOR: 35390,
+ UNIFORM_BLOCK_BINDING: 35391,
+ UNIFORM_BLOCK_DATA_SIZE: 35392,
+ UNIFORM_BLOCK_ACTIVE_UNIFORMS: 35394,
+ UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: 35395,
+ UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: 35396,
+ UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: 35398,
+ INVALID_INDEX: 4294967295,
+ MAX_VERTEX_OUTPUT_COMPONENTS: 37154,
+ MAX_FRAGMENT_INPUT_COMPONENTS: 37157,
+ MAX_SERVER_WAIT_TIMEOUT: 37137,
+ OBJECT_TYPE: 37138,
+ SYNC_CONDITION: 37139,
+ SYNC_STATUS: 37140,
+ SYNC_FLAGS: 37141,
+ SYNC_FENCE: 37142,
+ SYNC_GPU_COMMANDS_COMPLETE: 37143,
+ UNSIGNALED: 37144,
+ SIGNALED: 37145,
+ ALREADY_SIGNALED: 37146,
+ TIMEOUT_EXPIRED: 37147,
+ CONDITION_SATISFIED: 37148,
+ WAIT_FAILED: 37149,
+ SYNC_FLUSH_COMMANDS_BIT: 1,
+ VERTEX_ATTRIB_ARRAY_DIVISOR: 35070,
+ ANY_SAMPLES_PASSED: 35887,
+ ANY_SAMPLES_PASSED_CONSERVATIVE: 36202,
+ SAMPLER_BINDING: 35097,
+ RGB10_A2UI: 36975,
+ INT_2_10_10_10_REV: 36255,
+ TRANSFORM_FEEDBACK: 36386,
+ TRANSFORM_FEEDBACK_PAUSED: 36387,
+ TRANSFORM_FEEDBACK_ACTIVE: 36388,
+ TRANSFORM_FEEDBACK_BINDING: 36389,
+ COMPRESSED_R11_EAC: 37488,
+ COMPRESSED_SIGNED_R11_EAC: 37489,
+ COMPRESSED_RG11_EAC: 37490,
+ COMPRESSED_SIGNED_RG11_EAC: 37491,
+ COMPRESSED_RGB8_ETC2: 37492,
+ COMPRESSED_SRGB8_ETC2: 37493,
+ COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2: 37494,
+ COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2: 37495,
+ COMPRESSED_RGBA8_ETC2_EAC: 37496,
+ COMPRESSED_SRGB8_ALPHA8_ETC2_EAC: 37497,
+ TEXTURE_IMMUTABLE_FORMAT: 37167,
+ MAX_ELEMENT_INDEX: 36203,
+ TEXTURE_IMMUTABLE_LEVELS: 33503,
+ // Extensions
+ MAX_TEXTURE_MAX_ANISOTROPY_EXT: 34047
+}, WebGLConstants$1 = Object.freeze(WebGLConstants), viewerPositionWCScratch = new Cartesian3();
+function AutomaticUniform(e) {
+ this._size = e.size, this._datatype = e.datatype, this.getValue = e.getValue;
+}
+const datatypeToGlsl = {};
+datatypeToGlsl[WebGLConstants$1.FLOAT] = "float";
+datatypeToGlsl[WebGLConstants$1.FLOAT_VEC2] = "vec2";
+datatypeToGlsl[WebGLConstants$1.FLOAT_VEC3] = "vec3";
+datatypeToGlsl[WebGLConstants$1.FLOAT_VEC4] = "vec4";
+datatypeToGlsl[WebGLConstants$1.INT] = "int";
+datatypeToGlsl[WebGLConstants$1.INT_VEC2] = "ivec2";
+datatypeToGlsl[WebGLConstants$1.INT_VEC3] = "ivec3";
+datatypeToGlsl[WebGLConstants$1.INT_VEC4] = "ivec4";
+datatypeToGlsl[WebGLConstants$1.BOOL] = "bool";
+datatypeToGlsl[WebGLConstants$1.BOOL_VEC2] = "bvec2";
+datatypeToGlsl[WebGLConstants$1.BOOL_VEC3] = "bvec3";
+datatypeToGlsl[WebGLConstants$1.BOOL_VEC4] = "bvec4";
+datatypeToGlsl[WebGLConstants$1.FLOAT_MAT2] = "mat2";
+datatypeToGlsl[WebGLConstants$1.FLOAT_MAT3] = "mat3";
+datatypeToGlsl[WebGLConstants$1.FLOAT_MAT4] = "mat4";
+datatypeToGlsl[WebGLConstants$1.SAMPLER_2D] = "sampler2D";
+datatypeToGlsl[WebGLConstants$1.SAMPLER_CUBE] = "samplerCube";
+AutomaticUniform.prototype.getDeclaration = function(e) {
+ let t = `uniform ${datatypeToGlsl[this._datatype]} ${e}`;
+ const n = this._size;
+ return n === 1 ? t += ";" : t += `[${n.toString()}];`, t;
+};
+const AutomaticUniforms = {
+ /**
+ * An automatic GLSL uniform containing the viewport's
+ * For best rendering performance, use the tightest possible bounding volume. Although
+ *
+ * When
+ * Draws the {@link DrawCommand#boundingVolume} for this command, assuming it is a sphere, when the command executes.
+ *
+ * Requires that the texture has a mipmap. The mip level is chosen by the view angle and screen-space size of the texture.
+ *
+ * Requires that the texture has a mipmap. The mip level is chosen by the view angle and screen-space size of the texture.
+ *
+ * This option provides a good balance of visual quality and speed when sampling from a mipmapped texture.
+ *
+ * Requires that the texture has a mipmap. The mip level is chosen by the view angle and screen-space size of the texture.
+ *
+ * This option provides a good balance of visual quality and speed when sampling from a mipmapped texture.
+ *
+ * Requires that the texture has a mipmap. The mip level is chosen by the view angle and screen-space size of the texture.
+ *
+ * All color values (diffuse, specular, emissive) are in linear color space.
+ * The conversion is described in
+ * {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}
+ * The conversion is described in
+ * {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}
+ *
+ * This uses standard position attributes,
+ * Use this version when passing in a custom pixel ratio. For example, passing in 1.0 will return meters per native device pixel.
+ *
+ * Use this version when scaling by pixel ratio.
+ *
+ * This function only handles the lighting calculations. Metallic/roughness
+ * and specular/glossy must be handled separately. See {@MaterialStageFS}
+ *
+ * The order of the coefficients is [L00, L1_1, L10, L11, L2_2, L2_1, L20, L21, L22].
+ *
+ * This technique, called GPU RTE, eliminates jittering artifacts when using large coordinates as
+ * described in {@link http://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}.
+ *
+ * There are also precision limitations in WebGL 1. highp int is still limited
+ * to 24 bits. Above the value of 2^24 = 16777216, precision loss may occur.
+ *
+ * An example use case for this function would be moving the vertex in window coordinates
+ * before converting back to clip coordinates. Use the original vertex clip coordinates.
+ *
+ * Use this when the vertex shader does not call {@link czm_vertexlogDepth}, for example, when
+ * ray-casting geometry using a full screen quad.
+ *
+ * Use this when the vertex shader calls {@link czm_vertexlogDepth}.
+ *
+ * x, y, width,
+ * and height properties in an vec4's x, y, z,
+ * and w components, respectively.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform vec4 czm_viewport;
+ *
+ * // Scale the window coordinate components to [0, 1] by dividing
+ * // by the viewport's width and height.
+ * vec2 v = gl_FragCoord.xy / czm_viewport.zw;
+ *
+ * @see Context#getViewport
+ */
+ czm_viewport: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_VEC4,
+ getValue: function(e) {
+ return e.viewportCartesian4;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 4x4 orthographic projection matrix that
+ * transforms window coordinates to clip coordinates. Clip coordinates is the
+ * coordinate system for a vertex shader's gl_Position output.
+ *
+ * This transform is useful when a vertex shader inputs or manipulates window coordinates
+ * as done by {@link BillboardCollection}.
+ *
+ * Do not confuse {@link czm_viewportTransformation} with czm_viewportOrthographic.
+ * The former transforms from normalized device coordinates to window coordinates; the later transforms
+ * from window coordinates to clip coordinates, and is often used to assign to gl_Position.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat4 czm_viewportOrthographic;
+ *
+ * // Example
+ * gl_Position = czm_viewportOrthographic * vec4(windowPosition, 0.0, 1.0);
+ *
+ * @see UniformState#viewportOrthographic
+ * @see czm_viewport
+ * @see czm_viewportTransformation
+ * @see BillboardCollection
+ */
+ czm_viewportOrthographic: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT4,
+ getValue: function(e) {
+ return e.viewportOrthographic;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 4x4 transformation matrix that
+ * transforms normalized device coordinates to window coordinates. The context's
+ * full viewport is used, and the depth range is assumed to be near = 0
+ * and far = 1.
+ *
+ * This transform is useful when there is a need to manipulate window coordinates
+ * in a vertex shader as done by {@link BillboardCollection}. In many cases,
+ * this matrix will not be used directly; instead, {@link czm_modelToWindowCoordinates}
+ * will be used to transform directly from model to window coordinates.
+ *
+ * Do not confuse czm_viewportTransformation with {@link czm_viewportOrthographic}.
+ * The former transforms from normalized device coordinates to window coordinates; the later transforms
+ * from window coordinates to clip coordinates, and is often used to assign to gl_Position.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat4 czm_viewportTransformation;
+ *
+ * // Use czm_viewportTransformation as part of the
+ * // transform from model to window coordinates.
+ * vec4 q = czm_modelViewProjection * positionMC; // model to clip coordinates
+ * q.xyz /= q.w; // clip to normalized device coordinates (ndc)
+ * q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // ndc to window coordinates
+ *
+ * @see UniformState#viewportTransformation
+ * @see czm_viewport
+ * @see czm_viewportOrthographic
+ * @see czm_modelToWindowCoordinates
+ * @see BillboardCollection
+ */
+ czm_viewportTransformation: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT4,
+ getValue: function(e) {
+ return e.viewportTransformation;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing the depth of the scene
+ * after the globe pass and then updated after the 3D Tiles pass.
+ * The depth is packed into an RGBA texture.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform sampler2D czm_globeDepthTexture;
+ *
+ * // Get the depth at the current fragment
+ * vec2 coords = gl_FragCoord.xy / czm_viewport.zw;
+ * float depth = czm_unpackDepth(texture(czm_globeDepthTexture, coords));
+ */
+ czm_globeDepthTexture: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.SAMPLER_2D,
+ getValue: function(e) {
+ return e.globeDepthTexture;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 4x4 model transformation matrix that
+ * transforms model coordinates to world coordinates.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat4 czm_model;
+ *
+ * // Example
+ * vec4 worldPosition = czm_model * modelPosition;
+ *
+ * @see UniformState#model
+ * @see czm_inverseModel
+ * @see czm_modelView
+ * @see czm_modelViewProjection
+ */
+ czm_model: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT4,
+ getValue: function(e) {
+ return e.model;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 4x4 model transformation matrix that
+ * transforms world coordinates to model coordinates.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat4 czm_inverseModel;
+ *
+ * // Example
+ * vec4 modelPosition = czm_inverseModel * worldPosition;
+ *
+ * @see UniformState#inverseModel
+ * @see czm_model
+ * @see czm_inverseModelView
+ */
+ czm_inverseModel: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT4,
+ getValue: function(e) {
+ return e.inverseModel;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 4x4 view transformation matrix that
+ * transforms world coordinates to eye coordinates.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat4 czm_view;
+ *
+ * // Example
+ * vec4 eyePosition = czm_view * worldPosition;
+ *
+ * @see UniformState#view
+ * @see czm_viewRotation
+ * @see czm_modelView
+ * @see czm_viewProjection
+ * @see czm_modelViewProjection
+ * @see czm_inverseView
+ */
+ czm_view: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT4,
+ getValue: function(e) {
+ return e.view;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 4x4 view transformation matrix that
+ * transforms 3D world coordinates to eye coordinates. In 3D mode, this is identical to
+ * {@link czm_view}, but in 2D and Columbus View it represents the view matrix
+ * as if the camera were at an equivalent location in 3D mode. This is useful for lighting
+ * 2D and Columbus View in the same way that 3D is lit.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat4 czm_view3D;
+ *
+ * // Example
+ * vec4 eyePosition3D = czm_view3D * worldPosition3D;
+ *
+ * @see UniformState#view3D
+ * @see czm_view
+ */
+ czm_view3D: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT4,
+ getValue: function(e) {
+ return e.view3D;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 3x3 view rotation matrix that
+ * transforms vectors in world coordinates to eye coordinates.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat3 czm_viewRotation;
+ *
+ * // Example
+ * vec3 eyeVector = czm_viewRotation * worldVector;
+ *
+ * @see UniformState#viewRotation
+ * @see czm_view
+ * @see czm_inverseView
+ * @see czm_inverseViewRotation
+ */
+ czm_viewRotation: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT3,
+ getValue: function(e) {
+ return e.viewRotation;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 3x3 view rotation matrix that
+ * transforms vectors in 3D world coordinates to eye coordinates. In 3D mode, this is identical to
+ * {@link czm_viewRotation}, but in 2D and Columbus View it represents the view matrix
+ * as if the camera were at an equivalent location in 3D mode. This is useful for lighting
+ * 2D and Columbus View in the same way that 3D is lit.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat3 czm_viewRotation3D;
+ *
+ * // Example
+ * vec3 eyeVector = czm_viewRotation3D * worldVector;
+ *
+ * @see UniformState#viewRotation3D
+ * @see czm_viewRotation
+ */
+ czm_viewRotation3D: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT3,
+ getValue: function(e) {
+ return e.viewRotation3D;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 4x4 transformation matrix that
+ * transforms from eye coordinates to world coordinates.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat4 czm_inverseView;
+ *
+ * // Example
+ * vec4 worldPosition = czm_inverseView * eyePosition;
+ *
+ * @see UniformState#inverseView
+ * @see czm_view
+ * @see czm_inverseNormal
+ */
+ czm_inverseView: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT4,
+ getValue: function(e) {
+ return e.inverseView;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 4x4 transformation matrix that
+ * transforms from 3D eye coordinates to world coordinates. In 3D mode, this is identical to
+ * {@link czm_inverseView}, but in 2D and Columbus View it represents the inverse view matrix
+ * as if the camera were at an equivalent location in 3D mode. This is useful for lighting
+ * 2D and Columbus View in the same way that 3D is lit.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat4 czm_inverseView3D;
+ *
+ * // Example
+ * vec4 worldPosition = czm_inverseView3D * eyePosition;
+ *
+ * @see UniformState#inverseView3D
+ * @see czm_inverseView
+ */
+ czm_inverseView3D: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT4,
+ getValue: function(e) {
+ return e.inverseView3D;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 3x3 rotation matrix that
+ * transforms vectors from eye coordinates to world coordinates.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat3 czm_inverseViewRotation;
+ *
+ * // Example
+ * vec4 worldVector = czm_inverseViewRotation * eyeVector;
+ *
+ * @see UniformState#inverseView
+ * @see czm_view
+ * @see czm_viewRotation
+ * @see czm_inverseViewRotation
+ */
+ czm_inverseViewRotation: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT3,
+ getValue: function(e) {
+ return e.inverseViewRotation;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 3x3 rotation matrix that
+ * transforms vectors from 3D eye coordinates to world coordinates. In 3D mode, this is identical to
+ * {@link czm_inverseViewRotation}, but in 2D and Columbus View it represents the inverse view matrix
+ * as if the camera were at an equivalent location in 3D mode. This is useful for lighting
+ * 2D and Columbus View in the same way that 3D is lit.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat3 czm_inverseViewRotation3D;
+ *
+ * // Example
+ * vec4 worldVector = czm_inverseViewRotation3D * eyeVector;
+ *
+ * @see UniformState#inverseView3D
+ * @see czm_inverseViewRotation
+ */
+ czm_inverseViewRotation3D: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT3,
+ getValue: function(e) {
+ return e.inverseViewRotation3D;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 4x4 projection transformation matrix that
+ * transforms eye coordinates to clip coordinates. Clip coordinates is the
+ * coordinate system for a vertex shader's gl_Position output.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat4 czm_projection;
+ *
+ * // Example
+ * gl_Position = czm_projection * eyePosition;
+ *
+ * @see UniformState#projection
+ * @see czm_viewProjection
+ * @see czm_modelViewProjection
+ * @see czm_infiniteProjection
+ */
+ czm_projection: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT4,
+ getValue: function(e) {
+ return e.projection;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 4x4 inverse projection transformation matrix that
+ * transforms from clip coordinates to eye coordinates. Clip coordinates is the
+ * coordinate system for a vertex shader's gl_Position output.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat4 czm_inverseProjection;
+ *
+ * // Example
+ * vec4 eyePosition = czm_inverseProjection * clipPosition;
+ *
+ * @see UniformState#inverseProjection
+ * @see czm_projection
+ */
+ czm_inverseProjection: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT4,
+ getValue: function(e) {
+ return e.inverseProjection;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 4x4 projection transformation matrix with the far plane at infinity,
+ * that transforms eye coordinates to clip coordinates. Clip coordinates is the
+ * coordinate system for a vertex shader's gl_Position output. An infinite far plane is used
+ * in algorithms like shadow volumes and GPU ray casting with proxy geometry to ensure that triangles
+ * are not clipped by the far plane.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat4 czm_infiniteProjection;
+ *
+ * // Example
+ * gl_Position = czm_infiniteProjection * eyePosition;
+ *
+ * @see UniformState#infiniteProjection
+ * @see czm_projection
+ * @see czm_modelViewInfiniteProjection
+ */
+ czm_infiniteProjection: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT4,
+ getValue: function(e) {
+ return e.infiniteProjection;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 4x4 model-view transformation matrix that
+ * transforms model coordinates to eye coordinates.
+ *
+ * Positions should be transformed to eye coordinates using czm_modelView and
+ * normals should be transformed using {@link czm_normal}.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat4 czm_modelView;
+ *
+ * // Example
+ * vec4 eyePosition = czm_modelView * modelPosition;
+ *
+ * // The above is equivalent to, but more efficient than:
+ * vec4 eyePosition = czm_view * czm_model * modelPosition;
+ *
+ * @see UniformState#modelView
+ * @see czm_model
+ * @see czm_view
+ * @see czm_modelViewProjection
+ * @see czm_normal
+ */
+ czm_modelView: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT4,
+ getValue: function(e) {
+ return e.modelView;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 4x4 model-view transformation matrix that
+ * transforms 3D model coordinates to eye coordinates. In 3D mode, this is identical to
+ * {@link czm_modelView}, but in 2D and Columbus View it represents the model-view matrix
+ * as if the camera were at an equivalent location in 3D mode. This is useful for lighting
+ * 2D and Columbus View in the same way that 3D is lit.
+ *
+ * Positions should be transformed to eye coordinates using czm_modelView3D and
+ * normals should be transformed using {@link czm_normal3D}.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat4 czm_modelView3D;
+ *
+ * // Example
+ * vec4 eyePosition = czm_modelView3D * modelPosition;
+ *
+ * // The above is equivalent to, but more efficient than:
+ * vec4 eyePosition = czm_view3D * czm_model * modelPosition;
+ *
+ * @see UniformState#modelView3D
+ * @see czm_modelView
+ */
+ czm_modelView3D: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT4,
+ getValue: function(e) {
+ return e.modelView3D;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 4x4 model-view transformation matrix that
+ * transforms model coordinates, relative to the eye, to eye coordinates. This is used
+ * in conjunction with {@link czm_translateRelativeToEye}.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat4 czm_modelViewRelativeToEye;
+ *
+ * // Example
+ * attribute vec3 positionHigh;
+ * attribute vec3 positionLow;
+ *
+ * void main()
+ * {
+ * vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
+ * gl_Position = czm_projection * (czm_modelViewRelativeToEye * p);
+ * }
+ *
+ * @see czm_modelViewProjectionRelativeToEye
+ * @see czm_translateRelativeToEye
+ * @see EncodedCartesian3
+ */
+ czm_modelViewRelativeToEye: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT4,
+ getValue: function(e) {
+ return e.modelViewRelativeToEye;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 4x4 transformation matrix that
+ * transforms from eye coordinates to model coordinates.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat4 czm_inverseModelView;
+ *
+ * // Example
+ * vec4 modelPosition = czm_inverseModelView * eyePosition;
+ *
+ * @see UniformState#inverseModelView
+ * @see czm_modelView
+ */
+ czm_inverseModelView: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT4,
+ getValue: function(e) {
+ return e.inverseModelView;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 4x4 transformation matrix that
+ * transforms from eye coordinates to 3D model coordinates. In 3D mode, this is identical to
+ * {@link czm_inverseModelView}, but in 2D and Columbus View it represents the inverse model-view matrix
+ * as if the camera were at an equivalent location in 3D mode. This is useful for lighting
+ * 2D and Columbus View in the same way that 3D is lit.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat4 czm_inverseModelView3D;
+ *
+ * // Example
+ * vec4 modelPosition = czm_inverseModelView3D * eyePosition;
+ *
+ * @see UniformState#inverseModelView
+ * @see czm_inverseModelView
+ * @see czm_modelView3D
+ */
+ czm_inverseModelView3D: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT4,
+ getValue: function(e) {
+ return e.inverseModelView3D;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 4x4 view-projection transformation matrix that
+ * transforms world coordinates to clip coordinates. Clip coordinates is the
+ * coordinate system for a vertex shader's gl_Position output.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat4 czm_viewProjection;
+ *
+ * // Example
+ * vec4 gl_Position = czm_viewProjection * czm_model * modelPosition;
+ *
+ * // The above is equivalent to, but more efficient than:
+ * gl_Position = czm_projection * czm_view * czm_model * modelPosition;
+ *
+ * @see UniformState#viewProjection
+ * @see czm_view
+ * @see czm_projection
+ * @see czm_modelViewProjection
+ * @see czm_inverseViewProjection
+ */
+ czm_viewProjection: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT4,
+ getValue: function(e) {
+ return e.viewProjection;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 4x4 view-projection transformation matrix that
+ * transforms clip coordinates to world coordinates. Clip coordinates is the
+ * coordinate system for a vertex shader's gl_Position output.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat4 czm_inverseViewProjection;
+ *
+ * // Example
+ * vec4 worldPosition = czm_inverseViewProjection * clipPosition;
+ *
+ * @see UniformState#inverseViewProjection
+ * @see czm_viewProjection
+ */
+ czm_inverseViewProjection: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT4,
+ getValue: function(e) {
+ return e.inverseViewProjection;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 4x4 model-view-projection transformation matrix that
+ * transforms model coordinates to clip coordinates. Clip coordinates is the
+ * coordinate system for a vertex shader's gl_Position output.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat4 czm_modelViewProjection;
+ *
+ * // Example
+ * vec4 gl_Position = czm_modelViewProjection * modelPosition;
+ *
+ * // The above is equivalent to, but more efficient than:
+ * gl_Position = czm_projection * czm_view * czm_model * modelPosition;
+ *
+ * @see UniformState#modelViewProjection
+ * @see czm_model
+ * @see czm_view
+ * @see czm_projection
+ * @see czm_modelView
+ * @see czm_viewProjection
+ * @see czm_modelViewInfiniteProjection
+ * @see czm_inverseModelViewProjection
+ */
+ czm_modelViewProjection: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT4,
+ getValue: function(e) {
+ return e.modelViewProjection;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 4x4 inverse model-view-projection transformation matrix that
+ * transforms clip coordinates to model coordinates. Clip coordinates is the
+ * coordinate system for a vertex shader's gl_Position output.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat4 czm_inverseModelViewProjection;
+ *
+ * // Example
+ * vec4 modelPosition = czm_inverseModelViewProjection * clipPosition;
+ *
+ * @see UniformState#modelViewProjection
+ * @see czm_modelViewProjection
+ */
+ czm_inverseModelViewProjection: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT4,
+ getValue: function(e) {
+ return e.inverseModelViewProjection;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 4x4 model-view-projection transformation matrix that
+ * transforms model coordinates, relative to the eye, to clip coordinates. Clip coordinates is the
+ * coordinate system for a vertex shader's gl_Position output. This is used in
+ * conjunction with {@link czm_translateRelativeToEye}.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat4 czm_modelViewProjectionRelativeToEye;
+ *
+ * // Example
+ * attribute vec3 positionHigh;
+ * attribute vec3 positionLow;
+ *
+ * void main()
+ * {
+ * vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
+ * gl_Position = czm_modelViewProjectionRelativeToEye * p;
+ * }
+ *
+ * @see czm_modelViewRelativeToEye
+ * @see czm_translateRelativeToEye
+ * @see EncodedCartesian3
+ */
+ czm_modelViewProjectionRelativeToEye: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT4,
+ getValue: function(e) {
+ return e.modelViewProjectionRelativeToEye;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 4x4 model-view-projection transformation matrix that
+ * transforms model coordinates to clip coordinates. Clip coordinates is the
+ * coordinate system for a vertex shader's gl_Position output. The projection matrix places
+ * the far plane at infinity. This is useful in algorithms like shadow volumes and GPU ray casting with
+ * proxy geometry to ensure that triangles are not clipped by the far plane.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat4 czm_modelViewInfiniteProjection;
+ *
+ * // Example
+ * vec4 gl_Position = czm_modelViewInfiniteProjection * modelPosition;
+ *
+ * // The above is equivalent to, but more efficient than:
+ * gl_Position = czm_infiniteProjection * czm_view * czm_model * modelPosition;
+ *
+ * @see UniformState#modelViewInfiniteProjection
+ * @see czm_model
+ * @see czm_view
+ * @see czm_infiniteProjection
+ * @see czm_modelViewProjection
+ */
+ czm_modelViewInfiniteProjection: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT4,
+ getValue: function(e) {
+ return e.modelViewInfiniteProjection;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform that indicates if the current camera is orthographic in 3D.
+ *
+ * @see UniformState#orthographicIn3D
+ */
+ czm_orthographicIn3D: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT,
+ getValue: function(e) {
+ return e.orthographicIn3D ? 1 : 0;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 3x3 normal transformation matrix that
+ * transforms normal vectors in model coordinates to eye coordinates.
+ *
+ * Positions should be transformed to eye coordinates using {@link czm_modelView} and
+ * normals should be transformed using czm_normal.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat3 czm_normal;
+ *
+ * // Example
+ * vec3 eyeNormal = czm_normal * normal;
+ *
+ * @see UniformState#normal
+ * @see czm_inverseNormal
+ * @see czm_modelView
+ */
+ czm_normal: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT3,
+ getValue: function(e) {
+ return e.normal;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 3x3 normal transformation matrix that
+ * transforms normal vectors in 3D model coordinates to eye coordinates.
+ * In 3D mode, this is identical to
+ * {@link czm_normal}, but in 2D and Columbus View it represents the normal transformation
+ * matrix as if the camera were at an equivalent location in 3D mode. This is useful for lighting
+ * 2D and Columbus View in the same way that 3D is lit.
+ *
+ * Positions should be transformed to eye coordinates using {@link czm_modelView3D} and
+ * normals should be transformed using czm_normal3D.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat3 czm_normal3D;
+ *
+ * // Example
+ * vec3 eyeNormal = czm_normal3D * normal;
+ *
+ * @see UniformState#normal3D
+ * @see czm_normal
+ */
+ czm_normal3D: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT3,
+ getValue: function(e) {
+ return e.normal3D;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 3x3 normal transformation matrix that
+ * transforms normal vectors in eye coordinates to model coordinates. This is
+ * the opposite of the transform provided by {@link czm_normal}.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat3 czm_inverseNormal;
+ *
+ * // Example
+ * vec3 normalMC = czm_inverseNormal * normalEC;
+ *
+ * @see UniformState#inverseNormal
+ * @see czm_normal
+ * @see czm_modelView
+ * @see czm_inverseView
+ */
+ czm_inverseNormal: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT3,
+ getValue: function(e) {
+ return e.inverseNormal;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 3x3 normal transformation matrix that
+ * transforms normal vectors in eye coordinates to 3D model coordinates. This is
+ * the opposite of the transform provided by {@link czm_normal}.
+ * In 3D mode, this is identical to
+ * {@link czm_inverseNormal}, but in 2D and Columbus View it represents the inverse normal transformation
+ * matrix as if the camera were at an equivalent location in 3D mode. This is useful for lighting
+ * 2D and Columbus View in the same way that 3D is lit.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat3 czm_inverseNormal3D;
+ *
+ * // Example
+ * vec3 normalMC = czm_inverseNormal3D * normalEC;
+ *
+ * @see UniformState#inverseNormal3D
+ * @see czm_inverseNormal
+ */
+ czm_inverseNormal3D: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT3,
+ getValue: function(e) {
+ return e.inverseNormal3D;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform containing the height in meters of the
+ * eye (camera) above or below the ellipsoid.
+ *
+ * @see UniformState#eyeHeight
+ */
+ czm_eyeHeight: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT,
+ getValue: function(e) {
+ return e.eyeHeight;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform containing height (x) and height squared (y)
+ * in meters of the eye (camera) above the 2D world plane. This uniform is only valid
+ * when the {@link SceneMode} is SCENE2D.
+ *
+ * @see UniformState#eyeHeight2D
+ */
+ czm_eyeHeight2D: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_VEC2,
+ getValue: function(e) {
+ return e.eyeHeight2D;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform containing the ellipsoid surface normal
+ * at the position below the eye (camera), in eye coordinates.
+ * This uniform is only valid when the {@link SceneMode} is SCENE3D.
+ */
+ czm_eyeEllipsoidNormalEC: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_VEC3,
+ getValue: function(e) {
+ return e.eyeEllipsoidNormalEC;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform containing the ellipsoid radii of curvature at the camera position.
+ * The .x component is the prime vertical radius of curvature (east-west direction)
+ * .y is the meridional radius of curvature (north-south direction)
+ * This uniform is only valid when the {@link SceneMode} is SCENE3D.
+ */
+ czm_eyeEllipsoidCurvature: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_VEC2,
+ getValue: function(e) {
+ return e.eyeEllipsoidCurvature;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform containing the transform from model coordinates
+ * to an east-north-up coordinate system centered at the position on the
+ * ellipsoid below the camera.
+ * This uniform is only valid when the {@link SceneMode} is SCENE3D.
+ */
+ czm_modelToEnu: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT4,
+ getValue: function(e) {
+ return e.modelToEnu;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform containing the the inverse of
+ * {@link AutomaticUniforms.czm_modelToEnu}.
+ * This uniform is only valid when the {@link SceneMode} is SCENE3D.
+ */
+ czm_enuToModel: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT4,
+ getValue: function(e) {
+ return e.enuToModel;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform containing the near distance (x) and the far distance (y)
+ * of the frustum defined by the camera. This is the largest possible frustum, not an individual
+ * frustum used for multi-frustum rendering.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform vec2 czm_entireFrustum;
+ *
+ * // Example
+ * float frustumLength = czm_entireFrustum.y - czm_entireFrustum.x;
+ *
+ * @see UniformState#entireFrustum
+ * @see czm_currentFrustum
+ */
+ czm_entireFrustum: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_VEC2,
+ getValue: function(e) {
+ return e.entireFrustum;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform containing the near distance (x) and the far distance (y)
+ * of the frustum defined by the camera. This is the individual
+ * frustum used for multi-frustum rendering.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform vec2 czm_currentFrustum;
+ *
+ * // Example
+ * float frustumLength = czm_currentFrustum.y - czm_currentFrustum.x;
+ *
+ * @see UniformState#currentFrustum
+ * @see czm_entireFrustum
+ */
+ czm_currentFrustum: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_VEC2,
+ getValue: function(e) {
+ return e.currentFrustum;
+ }
+ }),
+ /**
+ * The distances to the frustum planes. The top, bottom, left and right distances are
+ * the x, y, z, and w components, respectively.
+ */
+ czm_frustumPlanes: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_VEC4,
+ getValue: function(e) {
+ return e.frustumPlanes;
+ }
+ }),
+ /**
+ * Gets the far plane's distance from the near plane, plus 1.0.
+ */
+ czm_farDepthFromNearPlusOne: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT,
+ getValue: function(e) {
+ return e.farDepthFromNearPlusOne;
+ }
+ }),
+ /**
+ * Gets the log2 of {@link AutomaticUniforms#czm_farDepthFromNearPlusOne}.
+ */
+ czm_log2FarDepthFromNearPlusOne: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT,
+ getValue: function(e) {
+ return e.log2FarDepthFromNearPlusOne;
+ }
+ }),
+ /**
+ * Gets 1.0 divided by {@link AutomaticUniforms#czm_log2FarDepthFromNearPlusOne}.
+ */
+ czm_oneOverLog2FarDepthFromNearPlusOne: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT,
+ getValue: function(e) {
+ return e.oneOverLog2FarDepthFromNearPlusOne;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing the sun position in world coordinates.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform vec3 czm_sunPositionWC;
+ *
+ * @see UniformState#sunPositionWC
+ * @see czm_sunPositionColumbusView
+ * @see czm_sunDirectionWC
+ */
+ czm_sunPositionWC: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_VEC3,
+ getValue: function(e) {
+ return e.sunPositionWC;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing the sun position in Columbus view world coordinates.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform vec3 czm_sunPositionColumbusView;
+ *
+ * @see UniformState#sunPositionColumbusView
+ * @see czm_sunPositionWC
+ */
+ czm_sunPositionColumbusView: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_VEC3,
+ getValue: function(e) {
+ return e.sunPositionColumbusView;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing the normalized direction to the sun in eye coordinates.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform vec3 czm_sunDirectionEC;
+ *
+ * // Example
+ * float diffuse = max(dot(czm_sunDirectionEC, normalEC), 0.0);
+ *
+ * @see UniformState#sunDirectionEC
+ * @see czm_moonDirectionEC
+ * @see czm_sunDirectionWC
+ */
+ czm_sunDirectionEC: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_VEC3,
+ getValue: function(e) {
+ return e.sunDirectionEC;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing the normalized direction to the sun in world coordinates.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform vec3 czm_sunDirectionWC;
+ *
+ * // Example
+ * float diffuse = max(dot(czm_sunDirectionWC, normalWC), 0.0);
+ *
+ * @see UniformState#sunDirectionWC
+ * @see czm_sunPositionWC
+ * @see czm_sunDirectionEC
+ */
+ czm_sunDirectionWC: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_VEC3,
+ getValue: function(e) {
+ return e.sunDirectionWC;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing the normalized direction to the moon in eye coordinates.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform vec3 czm_moonDirectionEC;
+ *
+ * // Example
+ * float diffuse = max(dot(czm_moonDirectionEC, normalEC), 0.0);
+ *
+ * @see UniformState#moonDirectionEC
+ * @see czm_sunDirectionEC
+ */
+ czm_moonDirectionEC: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_VEC3,
+ getValue: function(e) {
+ return e.moonDirectionEC;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing the normalized direction to the scene's light source in eye coordinates.
+ * This is commonly used for directional lighting computations.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform vec3 czm_lightDirectionEC;
+ *
+ * // Example
+ * float diffuse = max(dot(czm_lightDirectionEC, normalEC), 0.0);
+ *
+ * @see UniformState#lightDirectionEC
+ * @see czm_lightDirectionWC
+ */
+ czm_lightDirectionEC: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_VEC3,
+ getValue: function(e) {
+ return e.lightDirectionEC;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing the normalized direction to the scene's light source in world coordinates.
+ * This is commonly used for directional lighting computations.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform vec3 czm_lightDirectionWC;
+ *
+ * // Example
+ * float diffuse = max(dot(czm_lightDirectionWC, normalWC), 0.0);
+ *
+ * @see UniformState#lightDirectionWC
+ * @see czm_lightDirectionEC
+ */
+ czm_lightDirectionWC: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_VEC3,
+ getValue: function(e) {
+ return e.lightDirectionWC;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform that represents the color of light emitted by the scene's light source. This
+ * is equivalent to the light color multiplied by the light intensity limited to a maximum luminance of 1.0
+ * suitable for non-HDR lighting.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform vec3 czm_lightColor;
+ *
+ * // Example
+ * vec3 diffuseColor = czm_lightColor * max(dot(czm_lightDirectionWC, normalWC), 0.0);
+ *
+ * @see UniformState#lightColor
+ * @see czm_lightColorHdr
+ */
+ czm_lightColor: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_VEC3,
+ getValue: function(e) {
+ return e.lightColor;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform that represents the high dynamic range color of light emitted by the scene's light
+ * source. This is equivalent to the light color multiplied by the light intensity suitable for HDR lighting.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform vec3 czm_lightColorHdr;
+ *
+ * // Example
+ * vec3 diffuseColor = czm_lightColorHdr * max(dot(czm_lightDirectionWC, normalWC), 0.0);
+ *
+ * @see UniformState#lightColorHdr
+ * @see czm_lightColor
+ */
+ czm_lightColorHdr: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_VEC3,
+ getValue: function(e) {
+ return e.lightColorHdr;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing the high bits of the camera position in model
+ * coordinates. This is used for GPU RTE to eliminate jittering artifacts when rendering
+ * as described in {@link http://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform vec3 czm_encodedCameraPositionMCHigh;
+ *
+ * @see czm_encodedCameraPositionMCLow
+ * @see czm_modelViewRelativeToEye
+ * @see czm_modelViewProjectionRelativeToEye
+ */
+ czm_encodedCameraPositionMCHigh: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_VEC3,
+ getValue: function(e) {
+ return e.encodedCameraPositionMCHigh;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing the low bits of the camera position in model
+ * coordinates. This is used for GPU RTE to eliminate jittering artifacts when rendering
+ * as described in {@linkhttp://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform vec3 czm_encodedCameraPositionMCLow;
+ *
+ * @see czm_encodedCameraPositionMCHigh
+ * @see czm_modelViewRelativeToEye
+ * @see czm_modelViewProjectionRelativeToEye
+ */
+ czm_encodedCameraPositionMCLow: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_VEC3,
+ getValue: function(e) {
+ return e.encodedCameraPositionMCLow;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing the position of the viewer (camera) in world coordinates.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform vec3 czm_viewerPositionWC;
+ */
+ czm_viewerPositionWC: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_VEC3,
+ getValue: function(e) {
+ return Matrix4.getTranslation(
+ e.inverseView,
+ viewerPositionWCScratch
+ );
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing the frame number. This uniform is automatically incremented
+ * every frame.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform float czm_frameNumber;
+ */
+ czm_frameNumber: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT,
+ getValue: function(e) {
+ return e.frameState.frameNumber;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing the current morph transition time between
+ * 2D/Columbus View and 3D, with 0.0 being 2D or Columbus View and 1.0 being 3D.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform float czm_morphTime;
+ *
+ * // Example
+ * vec4 p = czm_columbusViewMorph(position2D, position3D, czm_morphTime);
+ */
+ czm_morphTime: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT,
+ getValue: function(e) {
+ return e.frameState.morphTime;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing the current {@link SceneMode}, expressed
+ * as a float.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform float czm_sceneMode;
+ *
+ * // Example
+ * if (czm_sceneMode == czm_sceneMode2D)
+ * {
+ * eyeHeightSq = czm_eyeHeight2D.y;
+ * }
+ *
+ * @see czm_sceneMode2D
+ * @see czm_sceneModeColumbusView
+ * @see czm_sceneMode3D
+ * @see czm_sceneModeMorphing
+ */
+ czm_sceneMode: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT,
+ getValue: function(e) {
+ return e.frameState.mode;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing the current rendering pass.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform float czm_pass;
+ *
+ * // Example
+ * if ((czm_pass == czm_passTranslucent) && isOpaque())
+ * {
+ * gl_Position *= 0.0; // Cull opaque geometry in the translucent pass
+ * }
+ */
+ czm_pass: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT,
+ getValue: function(e) {
+ return e.pass;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing the current scene background color.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform vec4 czm_backgroundColor;
+ *
+ * // Example: If the given color's RGB matches the background color, invert it.
+ * vec4 adjustColorForContrast(vec4 color)
+ * {
+ * if (czm_backgroundColor.rgb == color.rgb)
+ * {
+ * color.rgb = vec3(1.0) - color.rgb;
+ * }
+ *
+ * return color;
+ * }
+ */
+ czm_backgroundColor: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_VEC4,
+ getValue: function(e) {
+ return e.backgroundColor;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform containing the BRDF look up texture used for image-based lighting computations.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform sampler2D czm_brdfLut;
+ *
+ * // Example: For a given roughness and NdotV value, find the material's BRDF information in the red and green channels
+ * float roughness = 0.5;
+ * float NdotV = dot(normal, view);
+ * vec2 brdfLut = texture(czm_brdfLut, vec2(NdotV, roughness)).rg;
+ */
+ czm_brdfLut: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.SAMPLER_2D,
+ getValue: function(e) {
+ return e.brdfLut;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform containing the environment map used within the scene.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform samplerCube czm_environmentMap;
+ *
+ * // Example: Create a perfect reflection of the environment map on a model
+ * float reflected = reflect(view, normal);
+ * vec4 reflectedColor = texture(czm_environmentMap, reflected);
+ */
+ czm_environmentMap: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.SAMPLER_CUBE,
+ getValue: function(e) {
+ return e.environmentMap;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform containing the specular environment cube map used within the scene.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform sampler2D czm_specularEnvironmentMaps;
+ */
+ czm_specularEnvironmentMaps: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.SAMPLER_2D,
+ getValue: function(e) {
+ return e.specularEnvironmentMaps;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform containing the maximum valid level-of-detail of the specular environment cube map used within the scene.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform float czm_specularEnvironmentMapsMaximumLOD;
+ */
+ czm_specularEnvironmentMapsMaximumLOD: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT,
+ getValue: function(e) {
+ return e.specularEnvironmentMapsMaximumLOD;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform containing the spherical harmonic coefficients used within the scene.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform vec3[9] czm_sphericalHarmonicCoefficients;
+ */
+ czm_sphericalHarmonicCoefficients: new AutomaticUniform({
+ size: 9,
+ datatype: WebGLConstants$1.FLOAT_VEC3,
+ getValue: function(e) {
+ return e.sphericalHarmonicCoefficients;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing a 3x3 rotation matrix that transforms
+ * from True Equator Mean Equinox (TEME) axes to the pseudo-fixed axes at the current scene time.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform mat3 czm_temeToPseudoFixed;
+ *
+ * // Example
+ * vec3 pseudoFixed = czm_temeToPseudoFixed * teme;
+ *
+ * @see UniformState#temeToPseudoFixedMatrix
+ * @see Transforms.computeTemeToPseudoFixedMatrix
+ */
+ czm_temeToPseudoFixed: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_MAT3,
+ getValue: function(e) {
+ return e.temeToPseudoFixedMatrix;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing the ratio of canvas coordinate space to canvas pixel space.
+ *
+ * @example
+ * uniform float czm_pixelRatio;
+ */
+ czm_pixelRatio: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT,
+ getValue: function(e) {
+ return e.pixelRatio;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform scalar used to mix a color with the fog color based on the distance to the camera.
+ *
+ * @see czm_fog
+ */
+ czm_fogDensity: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT,
+ getValue: function(e) {
+ return e.fogDensity;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform scalar used to set a minimum brightness when dynamic lighting is applied to fog.
+ *
+ * @see czm_fog
+ */
+ czm_fogMinimumBrightness: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT,
+ getValue: function(e) {
+ return e.fogMinimumBrightness;
+ }
+ }),
+ /**
+ * An automatic uniform representing the color shift for the atmosphere in HSB color space
+ *
+ * @example
+ * uniform vec3 czm_atmosphereHsbShift;
+ */
+ czm_atmosphereHsbShift: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_VEC3,
+ getValue: function(e) {
+ return e.atmosphereHsbShift;
+ }
+ }),
+ /**
+ * An automatic uniform representing the intensity of the light that is used for computing the atmosphere color
+ *
+ * @example
+ * uniform float czm_atmosphereLightIntensity;
+ */
+ czm_atmosphereLightIntensity: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT,
+ getValue: function(e) {
+ return e.atmosphereLightIntensity;
+ }
+ }),
+ /**
+ * An automatic uniform representing the Rayleigh scattering coefficient used when computing the atmosphere scattering
+ *
+ * @example
+ * uniform vec3 czm_atmosphereRayleighCoefficient;
+ */
+ czm_atmosphereRayleighCoefficient: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_VEC3,
+ getValue: function(e) {
+ return e.atmosphereRayleighCoefficient;
+ }
+ }),
+ /**
+ * An automatic uniform representing the Rayleigh scale height in meters used for computing atmosphere scattering.
+ *
+ * @example
+ * uniform vec3 czm_atmosphereRayleighScaleHeight;
+ */
+ czm_atmosphereRayleighScaleHeight: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT,
+ getValue: function(e) {
+ return e.atmosphereRayleighScaleHeight;
+ }
+ }),
+ /**
+ * An automatic uniform representing the Mie scattering coefficient used when computing atmosphere scattering.
+ *
+ * @example
+ * uniform vec3 czm_atmosphereMieCoefficient;
+ */
+ czm_atmosphereMieCoefficient: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_VEC3,
+ getValue: function(e) {
+ return e.atmosphereMieCoefficient;
+ }
+ }),
+ /**
+ * An automatic uniform storign the Mie scale height used when computing atmosphere scattering.
+ *
+ * @example
+ * uniform float czm_atmosphereMieScaleHeight;
+ */
+ czm_atmosphereMieScaleHeight: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT,
+ getValue: function(e) {
+ return e.atmosphereMieScaleHeight;
+ }
+ }),
+ /**
+ * An automatic uniform representing the anisotropy of the medium to consider for Mie scattering.
+ *
+ * @example
+ * uniform float czm_atmosphereAnisotropy;
+ */
+ czm_atmosphereMieAnisotropy: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT,
+ getValue: function(e) {
+ return e.atmosphereMieAnisotropy;
+ }
+ }),
+ /**
+ * An automatic uniform representing which light source to use for dynamic lighting
+ *
+ * @example
+ * uniform float czm_atmosphereDynamicLighting
+ */
+ czm_atmosphereDynamicLighting: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT,
+ getValue: function(e) {
+ return e.atmosphereDynamicLighting;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing the splitter position to use when rendering with a splitter.
+ * This will be in pixel coordinates relative to the canvas.
+ *
+ * @example
+ * // GLSL declaration
+ * uniform float czm_splitPosition;
+ */
+ czm_splitPosition: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT,
+ getValue: function(e) {
+ return e.splitPosition;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform scalar representing the geometric tolerance per meter
+ */
+ czm_geometricToleranceOverMeter: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT,
+ getValue: function(e) {
+ return e.geometricToleranceOverMeter;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform representing the distance from the camera at which to disable the depth test of billboards, labels and points
+ * to, for example, prevent clipping against terrain. When set to zero, the depth test should always be applied. When less than zero,
+ * the depth test should never be applied.
+ */
+ czm_minimumDisableDepthTestDistance: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT,
+ getValue: function(e) {
+ return e.minimumDisableDepthTestDistance;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform that will be the highlight color of unclassified 3D Tiles.
+ */
+ czm_invertClassificationColor: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_VEC4,
+ getValue: function(e) {
+ return e.invertClassificationColor;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform that is used for gamma correction.
+ */
+ czm_gamma: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT,
+ getValue: function(e) {
+ return e.gamma;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform that stores the ellipsoid radii.
+ */
+ czm_ellipsoidRadii: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_VEC3,
+ getValue: function(e) {
+ return e.ellipsoid.radii;
+ }
+ }),
+ /**
+ * An automatic GLSL uniform that stores the ellipsoid inverse radii.
+ */
+ czm_ellipsoidInverseRadii: new AutomaticUniform({
+ size: 1,
+ datatype: WebGLConstants$1.FLOAT_VEC3,
+ getValue: function(e) {
+ return e.ellipsoid.oneOverRadii;
+ }
+ })
+};
+function createGuid() {
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
+ const t = Math.random() * 16 | 0;
+ return (e === "x" ? t : t & 3 | 8).toString(16);
+ });
+}
+function returnTrue() {
+ return !0;
+}
+function destroyObject(e, t) {
+ function n() {
+ }
+ for (const i in e)
+ typeof e[i] == "function" && (e[i] = n);
+ e.isDestroyed = returnTrue;
+}
+const IndexDatatype = {
+ /**
+ * 8-bit unsigned byte corresponding to UNSIGNED_BYTE and the type
+ * of an element in Uint8Array.
+ *
+ * @type {number}
+ * @constant
+ */
+ UNSIGNED_BYTE: WebGLConstants$1.UNSIGNED_BYTE,
+ /**
+ * 16-bit unsigned short corresponding to UNSIGNED_SHORT and the type
+ * of an element in Uint16Array.
+ *
+ * @type {number}
+ * @constant
+ */
+ UNSIGNED_SHORT: WebGLConstants$1.UNSIGNED_SHORT,
+ /**
+ * 32-bit unsigned int corresponding to UNSIGNED_INT and the type
+ * of an element in Uint32Array.
+ *
+ * @type {number}
+ * @constant
+ */
+ UNSIGNED_INT: WebGLConstants$1.UNSIGNED_INT
+};
+IndexDatatype.getSizeInBytes = function(e) {
+ switch (e) {
+ case IndexDatatype.UNSIGNED_BYTE:
+ return Uint8Array.BYTES_PER_ELEMENT;
+ case IndexDatatype.UNSIGNED_SHORT:
+ return Uint16Array.BYTES_PER_ELEMENT;
+ case IndexDatatype.UNSIGNED_INT:
+ return Uint32Array.BYTES_PER_ELEMENT;
+ }
+};
+IndexDatatype.fromSizeInBytes = function(e) {
+ switch (e) {
+ case 2:
+ return IndexDatatype.UNSIGNED_SHORT;
+ case 4:
+ return IndexDatatype.UNSIGNED_INT;
+ case 1:
+ return IndexDatatype.UNSIGNED_BYTE;
+ }
+};
+IndexDatatype.validate = function(e) {
+ return defined(e) && (e === IndexDatatype.UNSIGNED_BYTE || e === IndexDatatype.UNSIGNED_SHORT || e === IndexDatatype.UNSIGNED_INT);
+};
+IndexDatatype.createTypedArray = function(e, t) {
+ return e >= CesiumMath.SIXTY_FOUR_KILOBYTES ? new Uint32Array(t) : new Uint16Array(t);
+};
+IndexDatatype.createTypedArrayFromArrayBuffer = function(e, t, n, i) {
+ return e >= CesiumMath.SIXTY_FOUR_KILOBYTES ? new Uint32Array(t, n, i) : new Uint16Array(t, n, i);
+};
+IndexDatatype.fromTypedArray = function(e) {
+ if (e instanceof Uint8Array)
+ return IndexDatatype.UNSIGNED_BYTE;
+ if (e instanceof Uint16Array)
+ return IndexDatatype.UNSIGNED_SHORT;
+ if (e instanceof Uint32Array)
+ return IndexDatatype.UNSIGNED_INT;
+};
+const IndexDatatype$1 = Object.freeze(IndexDatatype), BufferUsage = {
+ STREAM_DRAW: WebGLConstants$1.STREAM_DRAW,
+ STATIC_DRAW: WebGLConstants$1.STATIC_DRAW,
+ DYNAMIC_DRAW: WebGLConstants$1.DYNAMIC_DRAW,
+ validate: function(e) {
+ return e === BufferUsage.STREAM_DRAW || e === BufferUsage.STATIC_DRAW || e === BufferUsage.DYNAMIC_DRAW;
+ }
+}, BufferUsage$1 = Object.freeze(BufferUsage);
+function Buffer(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.context._gl, n = e.bufferTarget, i = e.typedArray;
+ let r = e.sizeInBytes;
+ const o = e.usage, s = defined(i);
+ s && (r = i.byteLength);
+ const c = t.createBuffer();
+ t.bindBuffer(n, c), t.bufferData(n, s ? i : r, o), t.bindBuffer(n, null), this._id = createGuid(), this._gl = t, this._webgl2 = e.context._webgl2, this._bufferTarget = n, this._sizeInBytes = r, this._usage = o, this._buffer = c, this.vertexArrayDestroyable = !0;
+}
+Buffer.createVertexBuffer = function(e) {
+ return new Buffer({
+ context: e.context,
+ bufferTarget: WebGLConstants$1.ARRAY_BUFFER,
+ typedArray: e.typedArray,
+ sizeInBytes: e.sizeInBytes,
+ usage: e.usage
+ });
+};
+Buffer.createIndexBuffer = function(e) {
+ const t = e.context, n = e.indexDatatype, i = IndexDatatype$1.getSizeInBytes(n), r = new Buffer({
+ context: t,
+ bufferTarget: WebGLConstants$1.ELEMENT_ARRAY_BUFFER,
+ typedArray: e.typedArray,
+ sizeInBytes: e.sizeInBytes,
+ usage: e.usage
+ }), o = r.sizeInBytes / i;
+ return Object.defineProperties(r, {
+ indexDatatype: {
+ get: function() {
+ return n;
+ }
+ },
+ bytesPerIndex: {
+ get: function() {
+ return i;
+ }
+ },
+ numberOfIndices: {
+ get: function() {
+ return o;
+ }
+ }
+ }), r;
+};
+Object.defineProperties(Buffer.prototype, {
+ sizeInBytes: {
+ get: function() {
+ return this._sizeInBytes;
+ }
+ },
+ usage: {
+ get: function() {
+ return this._usage;
+ }
+ }
+});
+Buffer.prototype._getBuffer = function() {
+ return this._buffer;
+};
+Buffer.prototype.copyFromArrayView = function(e, t) {
+ t = defaultValue(t, 0);
+ const n = this._gl, i = this._bufferTarget;
+ n.bindBuffer(i, this._buffer), n.bufferSubData(i, t, e), n.bindBuffer(i, null);
+};
+Buffer.prototype.copyFromBuffer = function(e, t, n, i) {
+ const r = WebGLConstants$1.COPY_READ_BUFFER, o = WebGLConstants$1.COPY_WRITE_BUFFER, s = this._gl;
+ s.bindBuffer(o, this._buffer), s.bindBuffer(r, e._buffer), s.copyBufferSubData(
+ r,
+ o,
+ t,
+ n,
+ i
+ ), s.bindBuffer(o, null), s.bindBuffer(r, null);
+};
+Buffer.prototype.getBufferData = function(e, t, n, i) {
+ t = defaultValue(t, 0), n = defaultValue(n, 0);
+ const r = this._gl, o = WebGLConstants$1.COPY_READ_BUFFER;
+ r.bindBuffer(o, this._buffer), r.getBufferSubData(
+ o,
+ t,
+ e,
+ n,
+ i
+ ), r.bindBuffer(o, null);
+};
+Buffer.prototype.isDestroyed = function() {
+ return !1;
+};
+Buffer.prototype.destroy = function() {
+ return this._gl.deleteBuffer(this._buffer), destroyObject(this);
+};
+let _supportsFullscreen;
+const _names = {
+ requestFullscreen: void 0,
+ exitFullscreen: void 0,
+ fullscreenEnabled: void 0,
+ fullscreenElement: void 0,
+ fullscreenchange: void 0,
+ fullscreenerror: void 0
+}, Fullscreen = {};
+Object.defineProperties(Fullscreen, {
+ /**
+ * The element that is currently fullscreen, if any. To simply check if the
+ * browser is in fullscreen mode or not, use {@link Fullscreen#fullscreen}.
+ * @memberof Fullscreen
+ * @type {object}
+ * @readonly
+ */
+ element: {
+ get: function() {
+ if (Fullscreen.supportsFullscreen())
+ return document[_names.fullscreenElement];
+ }
+ },
+ /**
+ * The name of the event on the document that is fired when fullscreen is
+ * entered or exited. This event name is intended for use with addEventListener.
+ * In your event handler, to determine if the browser is in fullscreen mode or not,
+ * use {@link Fullscreen#fullscreen}.
+ * @memberof Fullscreen
+ * @type {string}
+ * @readonly
+ */
+ changeEventName: {
+ get: function() {
+ if (Fullscreen.supportsFullscreen())
+ return _names.fullscreenchange;
+ }
+ },
+ /**
+ * The name of the event that is fired when a fullscreen error
+ * occurs. This event name is intended for use with addEventListener.
+ * @memberof Fullscreen
+ * @type {string}
+ * @readonly
+ */
+ errorEventName: {
+ get: function() {
+ if (Fullscreen.supportsFullscreen())
+ return _names.fullscreenerror;
+ }
+ },
+ /**
+ * Determine whether the browser will allow an element to be made fullscreen, or not.
+ * For example, by default, iframes cannot go fullscreen unless the containing page
+ * adds an "allowfullscreen" attribute (or prefixed equivalent).
+ * @memberof Fullscreen
+ * @type {boolean}
+ * @readonly
+ */
+ enabled: {
+ get: function() {
+ if (Fullscreen.supportsFullscreen())
+ return document[_names.fullscreenEnabled];
+ }
+ },
+ /**
+ * Determines if the browser is currently in fullscreen mode.
+ * @memberof Fullscreen
+ * @type {boolean}
+ * @readonly
+ */
+ fullscreen: {
+ get: function() {
+ if (Fullscreen.supportsFullscreen())
+ return Fullscreen.element !== null;
+ }
+ }
+});
+Fullscreen.supportsFullscreen = function() {
+ if (defined(_supportsFullscreen))
+ return _supportsFullscreen;
+ _supportsFullscreen = !1;
+ const e = document.body;
+ if (typeof e.requestFullscreen == "function")
+ return _names.requestFullscreen = "requestFullscreen", _names.exitFullscreen = "exitFullscreen", _names.fullscreenEnabled = "fullscreenEnabled", _names.fullscreenElement = "fullscreenElement", _names.fullscreenchange = "fullscreenchange", _names.fullscreenerror = "fullscreenerror", _supportsFullscreen = !0, _supportsFullscreen;
+ const t = ["webkit", "moz", "o", "ms", "khtml"];
+ let n;
+ for (let i = 0, r = t.length; i < r; ++i) {
+ const o = t[i];
+ n = `${o}RequestFullscreen`, typeof e[n] == "function" ? (_names.requestFullscreen = n, _supportsFullscreen = !0) : (n = `${o}RequestFullScreen`, typeof e[n] == "function" && (_names.requestFullscreen = n, _supportsFullscreen = !0)), n = `${o}ExitFullscreen`, typeof document[n] == "function" ? _names.exitFullscreen = n : (n = `${o}CancelFullScreen`, typeof document[n] == "function" && (_names.exitFullscreen = n)), n = `${o}FullscreenEnabled`, document[n] !== void 0 ? _names.fullscreenEnabled = n : (n = `${o}FullScreenEnabled`, document[n] !== void 0 && (_names.fullscreenEnabled = n)), n = `${o}FullscreenElement`, document[n] !== void 0 ? _names.fullscreenElement = n : (n = `${o}FullScreenElement`, document[n] !== void 0 && (_names.fullscreenElement = n)), n = `${o}fullscreenchange`, document[`on${n}`] !== void 0 && (o === "ms" && (n = "MSFullscreenChange"), _names.fullscreenchange = n), n = `${o}fullscreenerror`, document[`on${n}`] !== void 0 && (o === "ms" && (n = "MSFullscreenError"), _names.fullscreenerror = n);
+ }
+ return _supportsFullscreen;
+};
+Fullscreen.requestFullscreen = function(e, t) {
+ Fullscreen.supportsFullscreen() && e[_names.requestFullscreen]({ vrDisplay: t });
+};
+Fullscreen.exitFullscreen = function() {
+ Fullscreen.supportsFullscreen() && document[_names.exitFullscreen]();
+};
+Fullscreen._names = _names;
+let theNavigator;
+typeof navigator < "u" ? theNavigator = navigator : theNavigator = {};
+function extractVersion(e) {
+ const t = e.split(".");
+ for (let n = 0, i = t.length; n < i; ++n)
+ t[n] = parseInt(t[n], 10);
+ return t;
+}
+let isChromeResult, chromeVersionResult;
+function isChrome() {
+ if (!defined(isChromeResult) && (isChromeResult = !1, !isEdge())) {
+ const e = / Chrome\/([\.0-9]+)/.exec(theNavigator.userAgent);
+ e !== null && (isChromeResult = !0, chromeVersionResult = extractVersion(e[1]));
+ }
+ return isChromeResult;
+}
+function chromeVersion() {
+ return isChrome() && chromeVersionResult;
+}
+let isSafariResult, safariVersionResult;
+function isSafari() {
+ if (!defined(isSafariResult) && (isSafariResult = !1, !isChrome() && !isEdge() && / Safari\/[\.0-9]+/.test(theNavigator.userAgent))) {
+ const e = / Version\/([\.0-9]+)/.exec(theNavigator.userAgent);
+ e !== null && (isSafariResult = !0, safariVersionResult = extractVersion(e[1]));
+ }
+ return isSafariResult;
+}
+function safariVersion() {
+ return isSafari() && safariVersionResult;
+}
+let isWebkitResult, webkitVersionResult;
+function isWebkit() {
+ if (!defined(isWebkitResult)) {
+ isWebkitResult = !1;
+ const e = / AppleWebKit\/([\.0-9]+)(\+?)/.exec(theNavigator.userAgent);
+ e !== null && (isWebkitResult = !0, webkitVersionResult = extractVersion(e[1]), webkitVersionResult.isNightly = !!e[2]);
+ }
+ return isWebkitResult;
+}
+function webkitVersion() {
+ return isWebkit() && webkitVersionResult;
+}
+let isInternetExplorerResult, internetExplorerVersionResult;
+function isInternetExplorer() {
+ if (!defined(isInternetExplorerResult)) {
+ isInternetExplorerResult = !1;
+ let e;
+ theNavigator.appName === "Microsoft Internet Explorer" ? (e = /MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(theNavigator.userAgent), e !== null && (isInternetExplorerResult = !0, internetExplorerVersionResult = extractVersion(e[1]))) : theNavigator.appName === "Netscape" && (e = /Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(
+ theNavigator.userAgent
+ ), e !== null && (isInternetExplorerResult = !0, internetExplorerVersionResult = extractVersion(e[1])));
+ }
+ return isInternetExplorerResult;
+}
+function internetExplorerVersion() {
+ return isInternetExplorer() && internetExplorerVersionResult;
+}
+let isEdgeResult, edgeVersionResult;
+function isEdge() {
+ if (!defined(isEdgeResult)) {
+ isEdgeResult = !1;
+ const e = / Edg\/([\.0-9]+)/.exec(theNavigator.userAgent);
+ e !== null && (isEdgeResult = !0, edgeVersionResult = extractVersion(e[1]));
+ }
+ return isEdgeResult;
+}
+function edgeVersion() {
+ return isEdge() && edgeVersionResult;
+}
+let isFirefoxResult, firefoxVersionResult;
+function isFirefox() {
+ if (!defined(isFirefoxResult)) {
+ isFirefoxResult = !1;
+ const e = /Firefox\/([\.0-9]+)/.exec(theNavigator.userAgent);
+ e !== null && (isFirefoxResult = !0, firefoxVersionResult = extractVersion(e[1]));
+ }
+ return isFirefoxResult;
+}
+let isWindowsResult;
+function isWindows() {
+ return defined(isWindowsResult) || (isWindowsResult = /Windows/i.test(theNavigator.appVersion)), isWindowsResult;
+}
+let isIPadOrIOSResult;
+function isIPadOrIOS() {
+ return defined(isIPadOrIOSResult) || (isIPadOrIOSResult = navigator.platform === "iPhone" || navigator.platform === "iPod" || navigator.platform === "iPad"), isIPadOrIOSResult;
+}
+function firefoxVersion() {
+ return isFirefox() && firefoxVersionResult;
+}
+let hasPointerEvents;
+function supportsPointerEvents() {
+ return defined(hasPointerEvents) || (hasPointerEvents = typeof PointerEvent < "u" && (!defined(theNavigator.pointerEnabled) || theNavigator.pointerEnabled)), hasPointerEvents;
+}
+let imageRenderingValueResult, supportsImageRenderingPixelatedResult;
+function supportsImageRenderingPixelated() {
+ if (!defined(supportsImageRenderingPixelatedResult)) {
+ const e = document.createElement("canvas");
+ e.setAttribute(
+ "style",
+ "image-rendering: -moz-crisp-edges;image-rendering: pixelated;"
+ );
+ const t = e.style.imageRendering;
+ supportsImageRenderingPixelatedResult = defined(t) && t !== "", supportsImageRenderingPixelatedResult && (imageRenderingValueResult = t);
+ }
+ return supportsImageRenderingPixelatedResult;
+}
+function imageRenderingValue() {
+ return supportsImageRenderingPixelated() ? imageRenderingValueResult : void 0;
+}
+function supportsWebP() {
+ return supportsWebP._result;
+}
+supportsWebP._promise = void 0;
+supportsWebP._result = void 0;
+supportsWebP.initialize = function() {
+ return defined(supportsWebP._promise) || (supportsWebP._promise = new Promise((e) => {
+ const t = new Image();
+ t.onload = function() {
+ supportsWebP._result = t.width > 0 && t.height > 0, e(supportsWebP._result);
+ }, t.onerror = function() {
+ supportsWebP._result = !1, e(supportsWebP._result);
+ }, t.src = "data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA";
+ })), supportsWebP._promise;
+};
+Object.defineProperties(supportsWebP, {
+ initialized: {
+ get: function() {
+ return defined(supportsWebP._result);
+ }
+ }
+});
+const typedArrayTypes = [];
+typeof ArrayBuffer < "u" && (typedArrayTypes.push(
+ Int8Array,
+ Uint8Array,
+ Int16Array,
+ Uint16Array,
+ Int32Array,
+ Uint32Array,
+ Float32Array,
+ Float64Array
+), typeof Uint8ClampedArray < "u" && typedArrayTypes.push(Uint8ClampedArray), typeof Uint8ClampedArray < "u" && typedArrayTypes.push(Uint8ClampedArray), typeof BigInt64Array < "u" && typedArrayTypes.push(BigInt64Array), typeof BigUint64Array < "u" && typedArrayTypes.push(BigUint64Array));
+const FeatureDetection = {
+ isChrome,
+ chromeVersion,
+ isSafari,
+ safariVersion,
+ isWebkit,
+ webkitVersion,
+ isInternetExplorer,
+ internetExplorerVersion,
+ isEdge,
+ edgeVersion,
+ isFirefox,
+ firefoxVersion,
+ isWindows,
+ isIPadOrIOS,
+ hardwareConcurrency: defaultValue(theNavigator.hardwareConcurrency, 3),
+ supportsPointerEvents,
+ supportsImageRenderingPixelated,
+ supportsWebP,
+ imageRenderingValue,
+ typedArrayTypes
+};
+FeatureDetection.supportsBasis = function(e) {
+ return FeatureDetection.supportsWebAssembly() && e.context.supportsBasis;
+};
+FeatureDetection.supportsFullscreen = function() {
+ return Fullscreen.supportsFullscreen();
+};
+FeatureDetection.supportsTypedArrays = function() {
+ return typeof ArrayBuffer < "u";
+};
+FeatureDetection.supportsBigInt64Array = function() {
+ return typeof BigInt64Array < "u";
+};
+FeatureDetection.supportsBigUint64Array = function() {
+ return typeof BigUint64Array < "u";
+};
+FeatureDetection.supportsBigInt = function() {
+ return typeof BigInt < "u";
+};
+FeatureDetection.supportsWebWorkers = function() {
+ return typeof Worker < "u";
+};
+FeatureDetection.supportsWebAssembly = function() {
+ return typeof WebAssembly < "u";
+};
+FeatureDetection.supportsWebgl2 = function(e) {
+ return e.context.webgl2;
+};
+FeatureDetection.supportsEsmWebWorkers = function() {
+ return !isFirefox() || parseInt(firefoxVersionResult) >= 114;
+};
+function hue2rgb(e, t, n) {
+ return n < 0 && (n += 1), n > 1 && (n -= 1), n * 6 < 1 ? e + (t - e) * 6 * n : n * 2 < 1 ? t : n * 3 < 2 ? e + (t - e) * (2 / 3 - n) * 6 : e;
+}
+function Color(e, t, n, i) {
+ this.red = defaultValue(e, 1), this.green = defaultValue(t, 1), this.blue = defaultValue(n, 1), this.alpha = defaultValue(i, 1);
+}
+Color.fromCartesian4 = function(e, t) {
+ return defined(t) ? (t.red = e.x, t.green = e.y, t.blue = e.z, t.alpha = e.w, t) : new Color(e.x, e.y, e.z, e.w);
+};
+Color.fromBytes = function(e, t, n, i, r) {
+ return e = Color.byteToFloat(defaultValue(e, 255)), t = Color.byteToFloat(defaultValue(t, 255)), n = Color.byteToFloat(defaultValue(n, 255)), i = Color.byteToFloat(defaultValue(i, 255)), defined(r) ? (r.red = e, r.green = t, r.blue = n, r.alpha = i, r) : new Color(e, t, n, i);
+};
+Color.fromAlpha = function(e, t, n) {
+ return defined(n) ? (n.red = e.red, n.green = e.green, n.blue = e.blue, n.alpha = t, n) : new Color(e.red, e.green, e.blue, t);
+};
+let scratchArrayBuffer, scratchUint32Array, scratchUint8Array;
+FeatureDetection.supportsTypedArrays() && (scratchArrayBuffer = new ArrayBuffer(4), scratchUint32Array = new Uint32Array(scratchArrayBuffer), scratchUint8Array = new Uint8Array(scratchArrayBuffer));
+Color.fromRgba = function(e, t) {
+ return scratchUint32Array[0] = e, Color.fromBytes(
+ scratchUint8Array[0],
+ scratchUint8Array[1],
+ scratchUint8Array[2],
+ scratchUint8Array[3],
+ t
+ );
+};
+Color.fromHsl = function(e, t, n, i, r) {
+ e = defaultValue(e, 0) % 1, t = defaultValue(t, 0), n = defaultValue(n, 0), i = defaultValue(i, 1);
+ let o = n, s = n, c = n;
+ if (t !== 0) {
+ let l;
+ n < 0.5 ? l = n * (1 + t) : l = n + t - n * t;
+ const d = 2 * n - l;
+ o = hue2rgb(d, l, e + 1 / 3), s = hue2rgb(d, l, e), c = hue2rgb(d, l, e - 1 / 3);
+ }
+ return defined(r) ? (r.red = o, r.green = s, r.blue = c, r.alpha = i, r) : new Color(o, s, c, i);
+};
+Color.fromRandom = function(e, t) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ let n = e.red;
+ if (!defined(n)) {
+ const s = defaultValue(e.minimumRed, 0), c = defaultValue(e.maximumRed, 1);
+ n = s + CesiumMath.nextRandomNumber() * (c - s);
+ }
+ let i = e.green;
+ if (!defined(i)) {
+ const s = defaultValue(e.minimumGreen, 0), c = defaultValue(e.maximumGreen, 1);
+ i = s + CesiumMath.nextRandomNumber() * (c - s);
+ }
+ let r = e.blue;
+ if (!defined(r)) {
+ const s = defaultValue(e.minimumBlue, 0), c = defaultValue(e.maximumBlue, 1);
+ r = s + CesiumMath.nextRandomNumber() * (c - s);
+ }
+ let o = e.alpha;
+ if (!defined(o)) {
+ const s = defaultValue(e.minimumAlpha, 0), c = defaultValue(e.maximumAlpha, 1);
+ o = s + CesiumMath.nextRandomNumber() * (c - s);
+ }
+ return defined(t) ? (t.red = n, t.green = i, t.blue = r, t.alpha = o, t) : new Color(n, i, r, o);
+};
+const rgbaMatcher = /^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i, rrggbbaaMatcher = /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i, rgbParenthesesMatcher = /^rgba?\s*\(\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i, hslParenthesesMatcher = /^hsla?\s*\(\s*([0-9.]+)\s*[,\s]+\s*([0-9.]+%)\s*[,\s]+\s*([0-9.]+%)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i;
+Color.fromCssColorString = function(e, t) {
+ defined(t) || (t = new Color()), e = e.trim();
+ const n = Color[e.toUpperCase()];
+ if (defined(n))
+ return Color.clone(n, t), t;
+ let i = rgbaMatcher.exec(e);
+ return i !== null ? (t.red = parseInt(i[1], 16) / 15, t.green = parseInt(i[2], 16) / 15, t.blue = parseInt(i[3], 16) / 15, t.alpha = parseInt(defaultValue(i[4], "f"), 16) / 15, t) : (i = rrggbbaaMatcher.exec(e), i !== null ? (t.red = parseInt(i[1], 16) / 255, t.green = parseInt(i[2], 16) / 255, t.blue = parseInt(i[3], 16) / 255, t.alpha = parseInt(defaultValue(i[4], "ff"), 16) / 255, t) : (i = rgbParenthesesMatcher.exec(e), i !== null ? (t.red = parseFloat(i[1]) / (i[1].substr(-1) === "%" ? 100 : 255), t.green = parseFloat(i[2]) / (i[2].substr(-1) === "%" ? 100 : 255), t.blue = parseFloat(i[3]) / (i[3].substr(-1) === "%" ? 100 : 255), t.alpha = parseFloat(defaultValue(i[4], "1.0")), t) : (i = hslParenthesesMatcher.exec(e), i !== null ? Color.fromHsl(
+ parseFloat(i[1]) / 360,
+ parseFloat(i[2]) / 100,
+ parseFloat(i[3]) / 100,
+ parseFloat(defaultValue(i[4], "1.0")),
+ t
+ ) : (t = void 0, t))));
+};
+Color.packedLength = 4;
+Color.pack = function(e, t, n) {
+ return n = defaultValue(n, 0), t[n++] = e.red, t[n++] = e.green, t[n++] = e.blue, t[n] = e.alpha, t;
+};
+Color.unpack = function(e, t, n) {
+ return t = defaultValue(t, 0), defined(n) || (n = new Color()), n.red = e[t++], n.green = e[t++], n.blue = e[t++], n.alpha = e[t], n;
+};
+Color.byteToFloat = function(e) {
+ return e / 255;
+};
+Color.floatToByte = function(e) {
+ return e === 1 ? 255 : e * 256 | 0;
+};
+Color.clone = function(e, t) {
+ if (defined(e))
+ return defined(t) ? (t.red = e.red, t.green = e.green, t.blue = e.blue, t.alpha = e.alpha, t) : new Color(e.red, e.green, e.blue, e.alpha);
+};
+Color.equals = function(e, t) {
+ return e === t || //
+ defined(e) && //
+ defined(t) && //
+ e.red === t.red && //
+ e.green === t.green && //
+ e.blue === t.blue && //
+ e.alpha === t.alpha;
+};
+Color.equalsArray = function(e, t, n) {
+ return e.red === t[n] && e.green === t[n + 1] && e.blue === t[n + 2] && e.alpha === t[n + 3];
+};
+Color.prototype.clone = function(e) {
+ return Color.clone(this, e);
+};
+Color.prototype.equals = function(e) {
+ return Color.equals(this, e);
+};
+Color.prototype.equalsEpsilon = function(e, t) {
+ return this === e || //
+ defined(e) && //
+ Math.abs(this.red - e.red) <= t && //
+ Math.abs(this.green - e.green) <= t && //
+ Math.abs(this.blue - e.blue) <= t && //
+ Math.abs(this.alpha - e.alpha) <= t;
+};
+Color.prototype.toString = function() {
+ return `(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`;
+};
+Color.prototype.toCssColorString = function() {
+ const e = Color.floatToByte(this.red), t = Color.floatToByte(this.green), n = Color.floatToByte(this.blue);
+ return this.alpha === 1 ? `rgb(${e},${t},${n})` : `rgba(${e},${t},${n},${this.alpha})`;
+};
+Color.prototype.toCssHexString = function() {
+ let e = Color.floatToByte(this.red).toString(16);
+ e.length < 2 && (e = `0${e}`);
+ let t = Color.floatToByte(this.green).toString(16);
+ t.length < 2 && (t = `0${t}`);
+ let n = Color.floatToByte(this.blue).toString(16);
+ if (n.length < 2 && (n = `0${n}`), this.alpha < 1) {
+ let i = Color.floatToByte(this.alpha).toString(16);
+ return i.length < 2 && (i = `0${i}`), `#${e}${t}${n}${i}`;
+ }
+ return `#${e}${t}${n}`;
+};
+Color.prototype.toBytes = function(e) {
+ const t = Color.floatToByte(this.red), n = Color.floatToByte(this.green), i = Color.floatToByte(this.blue), r = Color.floatToByte(this.alpha);
+ return defined(e) ? (e[0] = t, e[1] = n, e[2] = i, e[3] = r, e) : [t, n, i, r];
+};
+Color.prototype.toRgba = function() {
+ return scratchUint8Array[0] = Color.floatToByte(this.red), scratchUint8Array[1] = Color.floatToByte(this.green), scratchUint8Array[2] = Color.floatToByte(this.blue), scratchUint8Array[3] = Color.floatToByte(this.alpha), scratchUint32Array[0];
+};
+Color.prototype.brighten = function(e, t) {
+ return e = 1 - e, t.red = 1 - (1 - this.red) * e, t.green = 1 - (1 - this.green) * e, t.blue = 1 - (1 - this.blue) * e, t.alpha = this.alpha, t;
+};
+Color.prototype.darken = function(e, t) {
+ return e = 1 - e, t.red = this.red * e, t.green = this.green * e, t.blue = this.blue * e, t.alpha = this.alpha, t;
+};
+Color.prototype.withAlpha = function(e, t) {
+ return Color.fromAlpha(this, e, t);
+};
+Color.add = function(e, t, n) {
+ return n.red = e.red + t.red, n.green = e.green + t.green, n.blue = e.blue + t.blue, n.alpha = e.alpha + t.alpha, n;
+};
+Color.subtract = function(e, t, n) {
+ return n.red = e.red - t.red, n.green = e.green - t.green, n.blue = e.blue - t.blue, n.alpha = e.alpha - t.alpha, n;
+};
+Color.multiply = function(e, t, n) {
+ return n.red = e.red * t.red, n.green = e.green * t.green, n.blue = e.blue * t.blue, n.alpha = e.alpha * t.alpha, n;
+};
+Color.divide = function(e, t, n) {
+ return n.red = e.red / t.red, n.green = e.green / t.green, n.blue = e.blue / t.blue, n.alpha = e.alpha / t.alpha, n;
+};
+Color.mod = function(e, t, n) {
+ return n.red = e.red % t.red, n.green = e.green % t.green, n.blue = e.blue % t.blue, n.alpha = e.alpha % t.alpha, n;
+};
+Color.lerp = function(e, t, n, i) {
+ return i.red = CesiumMath.lerp(e.red, t.red, n), i.green = CesiumMath.lerp(e.green, t.green, n), i.blue = CesiumMath.lerp(e.blue, t.blue, n), i.alpha = CesiumMath.lerp(e.alpha, t.alpha, n), i;
+};
+Color.multiplyByScalar = function(e, t, n) {
+ return n.red = e.red * t, n.green = e.green * t, n.blue = e.blue * t, n.alpha = e.alpha * t, n;
+};
+Color.divideByScalar = function(e, t, n) {
+ return n.red = e.red / t, n.green = e.green / t, n.blue = e.blue / t, n.alpha = e.alpha / t, n;
+};
+Color.ALICEBLUE = Object.freeze(Color.fromCssColorString("#F0F8FF"));
+Color.ANTIQUEWHITE = Object.freeze(Color.fromCssColorString("#FAEBD7"));
+Color.AQUA = Object.freeze(Color.fromCssColorString("#00FFFF"));
+Color.AQUAMARINE = Object.freeze(Color.fromCssColorString("#7FFFD4"));
+Color.AZURE = Object.freeze(Color.fromCssColorString("#F0FFFF"));
+Color.BEIGE = Object.freeze(Color.fromCssColorString("#F5F5DC"));
+Color.BISQUE = Object.freeze(Color.fromCssColorString("#FFE4C4"));
+Color.BLACK = Object.freeze(Color.fromCssColorString("#000000"));
+Color.BLANCHEDALMOND = Object.freeze(Color.fromCssColorString("#FFEBCD"));
+Color.BLUE = Object.freeze(Color.fromCssColorString("#0000FF"));
+Color.BLUEVIOLET = Object.freeze(Color.fromCssColorString("#8A2BE2"));
+Color.BROWN = Object.freeze(Color.fromCssColorString("#A52A2A"));
+Color.BURLYWOOD = Object.freeze(Color.fromCssColorString("#DEB887"));
+Color.CADETBLUE = Object.freeze(Color.fromCssColorString("#5F9EA0"));
+Color.CHARTREUSE = Object.freeze(Color.fromCssColorString("#7FFF00"));
+Color.CHOCOLATE = Object.freeze(Color.fromCssColorString("#D2691E"));
+Color.CORAL = Object.freeze(Color.fromCssColorString("#FF7F50"));
+Color.CORNFLOWERBLUE = Object.freeze(Color.fromCssColorString("#6495ED"));
+Color.CORNSILK = Object.freeze(Color.fromCssColorString("#FFF8DC"));
+Color.CRIMSON = Object.freeze(Color.fromCssColorString("#DC143C"));
+Color.CYAN = Object.freeze(Color.fromCssColorString("#00FFFF"));
+Color.DARKBLUE = Object.freeze(Color.fromCssColorString("#00008B"));
+Color.DARKCYAN = Object.freeze(Color.fromCssColorString("#008B8B"));
+Color.DARKGOLDENROD = Object.freeze(Color.fromCssColorString("#B8860B"));
+Color.DARKGRAY = Object.freeze(Color.fromCssColorString("#A9A9A9"));
+Color.DARKGREEN = Object.freeze(Color.fromCssColorString("#006400"));
+Color.DARKGREY = Color.DARKGRAY;
+Color.DARKKHAKI = Object.freeze(Color.fromCssColorString("#BDB76B"));
+Color.DARKMAGENTA = Object.freeze(Color.fromCssColorString("#8B008B"));
+Color.DARKOLIVEGREEN = Object.freeze(Color.fromCssColorString("#556B2F"));
+Color.DARKORANGE = Object.freeze(Color.fromCssColorString("#FF8C00"));
+Color.DARKORCHID = Object.freeze(Color.fromCssColorString("#9932CC"));
+Color.DARKRED = Object.freeze(Color.fromCssColorString("#8B0000"));
+Color.DARKSALMON = Object.freeze(Color.fromCssColorString("#E9967A"));
+Color.DARKSEAGREEN = Object.freeze(Color.fromCssColorString("#8FBC8F"));
+Color.DARKSLATEBLUE = Object.freeze(Color.fromCssColorString("#483D8B"));
+Color.DARKSLATEGRAY = Object.freeze(Color.fromCssColorString("#2F4F4F"));
+Color.DARKSLATEGREY = Color.DARKSLATEGRAY;
+Color.DARKTURQUOISE = Object.freeze(Color.fromCssColorString("#00CED1"));
+Color.DARKVIOLET = Object.freeze(Color.fromCssColorString("#9400D3"));
+Color.DEEPPINK = Object.freeze(Color.fromCssColorString("#FF1493"));
+Color.DEEPSKYBLUE = Object.freeze(Color.fromCssColorString("#00BFFF"));
+Color.DIMGRAY = Object.freeze(Color.fromCssColorString("#696969"));
+Color.DIMGREY = Color.DIMGRAY;
+Color.DODGERBLUE = Object.freeze(Color.fromCssColorString("#1E90FF"));
+Color.FIREBRICK = Object.freeze(Color.fromCssColorString("#B22222"));
+Color.FLORALWHITE = Object.freeze(Color.fromCssColorString("#FFFAF0"));
+Color.FORESTGREEN = Object.freeze(Color.fromCssColorString("#228B22"));
+Color.FUCHSIA = Object.freeze(Color.fromCssColorString("#FF00FF"));
+Color.GAINSBORO = Object.freeze(Color.fromCssColorString("#DCDCDC"));
+Color.GHOSTWHITE = Object.freeze(Color.fromCssColorString("#F8F8FF"));
+Color.GOLD = Object.freeze(Color.fromCssColorString("#FFD700"));
+Color.GOLDENROD = Object.freeze(Color.fromCssColorString("#DAA520"));
+Color.GRAY = Object.freeze(Color.fromCssColorString("#808080"));
+Color.GREEN = Object.freeze(Color.fromCssColorString("#008000"));
+Color.GREENYELLOW = Object.freeze(Color.fromCssColorString("#ADFF2F"));
+Color.GREY = Color.GRAY;
+Color.HONEYDEW = Object.freeze(Color.fromCssColorString("#F0FFF0"));
+Color.HOTPINK = Object.freeze(Color.fromCssColorString("#FF69B4"));
+Color.INDIANRED = Object.freeze(Color.fromCssColorString("#CD5C5C"));
+Color.INDIGO = Object.freeze(Color.fromCssColorString("#4B0082"));
+Color.IVORY = Object.freeze(Color.fromCssColorString("#FFFFF0"));
+Color.KHAKI = Object.freeze(Color.fromCssColorString("#F0E68C"));
+Color.LAVENDER = Object.freeze(Color.fromCssColorString("#E6E6FA"));
+Color.LAVENDAR_BLUSH = Object.freeze(Color.fromCssColorString("#FFF0F5"));
+Color.LAWNGREEN = Object.freeze(Color.fromCssColorString("#7CFC00"));
+Color.LEMONCHIFFON = Object.freeze(Color.fromCssColorString("#FFFACD"));
+Color.LIGHTBLUE = Object.freeze(Color.fromCssColorString("#ADD8E6"));
+Color.LIGHTCORAL = Object.freeze(Color.fromCssColorString("#F08080"));
+Color.LIGHTCYAN = Object.freeze(Color.fromCssColorString("#E0FFFF"));
+Color.LIGHTGOLDENRODYELLOW = Object.freeze(Color.fromCssColorString("#FAFAD2"));
+Color.LIGHTGRAY = Object.freeze(Color.fromCssColorString("#D3D3D3"));
+Color.LIGHTGREEN = Object.freeze(Color.fromCssColorString("#90EE90"));
+Color.LIGHTGREY = Color.LIGHTGRAY;
+Color.LIGHTPINK = Object.freeze(Color.fromCssColorString("#FFB6C1"));
+Color.LIGHTSEAGREEN = Object.freeze(Color.fromCssColorString("#20B2AA"));
+Color.LIGHTSKYBLUE = Object.freeze(Color.fromCssColorString("#87CEFA"));
+Color.LIGHTSLATEGRAY = Object.freeze(Color.fromCssColorString("#778899"));
+Color.LIGHTSLATEGREY = Color.LIGHTSLATEGRAY;
+Color.LIGHTSTEELBLUE = Object.freeze(Color.fromCssColorString("#B0C4DE"));
+Color.LIGHTYELLOW = Object.freeze(Color.fromCssColorString("#FFFFE0"));
+Color.LIME = Object.freeze(Color.fromCssColorString("#00FF00"));
+Color.LIMEGREEN = Object.freeze(Color.fromCssColorString("#32CD32"));
+Color.LINEN = Object.freeze(Color.fromCssColorString("#FAF0E6"));
+Color.MAGENTA = Object.freeze(Color.fromCssColorString("#FF00FF"));
+Color.MAROON = Object.freeze(Color.fromCssColorString("#800000"));
+Color.MEDIUMAQUAMARINE = Object.freeze(Color.fromCssColorString("#66CDAA"));
+Color.MEDIUMBLUE = Object.freeze(Color.fromCssColorString("#0000CD"));
+Color.MEDIUMORCHID = Object.freeze(Color.fromCssColorString("#BA55D3"));
+Color.MEDIUMPURPLE = Object.freeze(Color.fromCssColorString("#9370DB"));
+Color.MEDIUMSEAGREEN = Object.freeze(Color.fromCssColorString("#3CB371"));
+Color.MEDIUMSLATEBLUE = Object.freeze(Color.fromCssColorString("#7B68EE"));
+Color.MEDIUMSPRINGGREEN = Object.freeze(Color.fromCssColorString("#00FA9A"));
+Color.MEDIUMTURQUOISE = Object.freeze(Color.fromCssColorString("#48D1CC"));
+Color.MEDIUMVIOLETRED = Object.freeze(Color.fromCssColorString("#C71585"));
+Color.MIDNIGHTBLUE = Object.freeze(Color.fromCssColorString("#191970"));
+Color.MINTCREAM = Object.freeze(Color.fromCssColorString("#F5FFFA"));
+Color.MISTYROSE = Object.freeze(Color.fromCssColorString("#FFE4E1"));
+Color.MOCCASIN = Object.freeze(Color.fromCssColorString("#FFE4B5"));
+Color.NAVAJOWHITE = Object.freeze(Color.fromCssColorString("#FFDEAD"));
+Color.NAVY = Object.freeze(Color.fromCssColorString("#000080"));
+Color.OLDLACE = Object.freeze(Color.fromCssColorString("#FDF5E6"));
+Color.OLIVE = Object.freeze(Color.fromCssColorString("#808000"));
+Color.OLIVEDRAB = Object.freeze(Color.fromCssColorString("#6B8E23"));
+Color.ORANGE = Object.freeze(Color.fromCssColorString("#FFA500"));
+Color.ORANGERED = Object.freeze(Color.fromCssColorString("#FF4500"));
+Color.ORCHID = Object.freeze(Color.fromCssColorString("#DA70D6"));
+Color.PALEGOLDENROD = Object.freeze(Color.fromCssColorString("#EEE8AA"));
+Color.PALEGREEN = Object.freeze(Color.fromCssColorString("#98FB98"));
+Color.PALETURQUOISE = Object.freeze(Color.fromCssColorString("#AFEEEE"));
+Color.PALEVIOLETRED = Object.freeze(Color.fromCssColorString("#DB7093"));
+Color.PAPAYAWHIP = Object.freeze(Color.fromCssColorString("#FFEFD5"));
+Color.PEACHPUFF = Object.freeze(Color.fromCssColorString("#FFDAB9"));
+Color.PERU = Object.freeze(Color.fromCssColorString("#CD853F"));
+Color.PINK = Object.freeze(Color.fromCssColorString("#FFC0CB"));
+Color.PLUM = Object.freeze(Color.fromCssColorString("#DDA0DD"));
+Color.POWDERBLUE = Object.freeze(Color.fromCssColorString("#B0E0E6"));
+Color.PURPLE = Object.freeze(Color.fromCssColorString("#800080"));
+Color.RED = Object.freeze(Color.fromCssColorString("#FF0000"));
+Color.ROSYBROWN = Object.freeze(Color.fromCssColorString("#BC8F8F"));
+Color.ROYALBLUE = Object.freeze(Color.fromCssColorString("#4169E1"));
+Color.SADDLEBROWN = Object.freeze(Color.fromCssColorString("#8B4513"));
+Color.SALMON = Object.freeze(Color.fromCssColorString("#FA8072"));
+Color.SANDYBROWN = Object.freeze(Color.fromCssColorString("#F4A460"));
+Color.SEAGREEN = Object.freeze(Color.fromCssColorString("#2E8B57"));
+Color.SEASHELL = Object.freeze(Color.fromCssColorString("#FFF5EE"));
+Color.SIENNA = Object.freeze(Color.fromCssColorString("#A0522D"));
+Color.SILVER = Object.freeze(Color.fromCssColorString("#C0C0C0"));
+Color.SKYBLUE = Object.freeze(Color.fromCssColorString("#87CEEB"));
+Color.SLATEBLUE = Object.freeze(Color.fromCssColorString("#6A5ACD"));
+Color.SLATEGRAY = Object.freeze(Color.fromCssColorString("#708090"));
+Color.SLATEGREY = Color.SLATEGRAY;
+Color.SNOW = Object.freeze(Color.fromCssColorString("#FFFAFA"));
+Color.SPRINGGREEN = Object.freeze(Color.fromCssColorString("#00FF7F"));
+Color.STEELBLUE = Object.freeze(Color.fromCssColorString("#4682B4"));
+Color.TAN = Object.freeze(Color.fromCssColorString("#D2B48C"));
+Color.TEAL = Object.freeze(Color.fromCssColorString("#008080"));
+Color.THISTLE = Object.freeze(Color.fromCssColorString("#D8BFD8"));
+Color.TOMATO = Object.freeze(Color.fromCssColorString("#FF6347"));
+Color.TURQUOISE = Object.freeze(Color.fromCssColorString("#40E0D0"));
+Color.VIOLET = Object.freeze(Color.fromCssColorString("#EE82EE"));
+Color.WHEAT = Object.freeze(Color.fromCssColorString("#F5DEB3"));
+Color.WHITE = Object.freeze(Color.fromCssColorString("#FFFFFF"));
+Color.WHITESMOKE = Object.freeze(Color.fromCssColorString("#F5F5F5"));
+Color.YELLOW = Object.freeze(Color.fromCssColorString("#FFFF00"));
+Color.YELLOWGREEN = Object.freeze(Color.fromCssColorString("#9ACD32"));
+Color.TRANSPARENT = Object.freeze(new Color(0, 0, 0, 0));
+function ClearCommand(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this.color = e.color, this.depth = e.depth, this.stencil = e.stencil, this.renderState = e.renderState, this.framebuffer = e.framebuffer, this.owner = e.owner, this.pass = e.pass;
+}
+ClearCommand.ALL = Object.freeze(
+ new ClearCommand({
+ color: new Color(0, 0, 0, 0),
+ depth: 1,
+ stencil: 0
+ })
+);
+ClearCommand.prototype.execute = function(e, t) {
+ e.clear(this, t);
+};
+const Pass = {
+ // If you add/modify/remove Pass constants, also change the automatic GLSL constants
+ // that start with 'czm_pass'
+ //
+ // Commands are executed in order by pass up to the translucent pass.
+ // Translucent geometry needs special handling (sorting/OIT). The compute pass
+ // is executed first and the overlay pass is executed last. Both are not sorted
+ // by frustum.
+ ENVIRONMENT: 0,
+ COMPUTE: 1,
+ GLOBE: 2,
+ TERRAIN_CLASSIFICATION: 3,
+ CESIUM_3D_TILE: 4,
+ CESIUM_3D_TILE_CLASSIFICATION: 5,
+ CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW: 6,
+ OPAQUE: 7,
+ TRANSLUCENT: 8,
+ VOXELS: 9,
+ OVERLAY: 10,
+ NUMBER_OF_PASSES: 11
+}, Pass$1 = Object.freeze(Pass);
+function ComputeCommand(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this.vertexArray = e.vertexArray, this.fragmentShaderSource = e.fragmentShaderSource, this.shaderProgram = e.shaderProgram, this.uniformMap = e.uniformMap, this.outputTexture = e.outputTexture, this.preExecute = e.preExecute, this.postExecute = e.postExecute, this.canceled = e.canceled, this.persists = defaultValue(e.persists, !1), this.pass = Pass$1.COMPUTE, this.owner = e.owner;
+}
+ComputeCommand.prototype.execute = function(e) {
+ e.execute(this);
+};
+function Cartesian2(e, t) {
+ this.x = defaultValue(e, 0), this.y = defaultValue(t, 0);
+}
+Cartesian2.fromElements = function(e, t, n) {
+ return defined(n) ? (n.x = e, n.y = t, n) : new Cartesian2(e, t);
+};
+Cartesian2.clone = function(e, t) {
+ if (defined(e))
+ return defined(t) ? (t.x = e.x, t.y = e.y, t) : new Cartesian2(e.x, e.y);
+};
+Cartesian2.fromCartesian3 = Cartesian2.clone;
+Cartesian2.fromCartesian4 = Cartesian2.clone;
+Cartesian2.packedLength = 2;
+Cartesian2.pack = function(e, t, n) {
+ return n = defaultValue(n, 0), t[n++] = e.x, t[n] = e.y, t;
+};
+Cartesian2.unpack = function(e, t, n) {
+ return t = defaultValue(t, 0), defined(n) || (n = new Cartesian2()), n.x = e[t++], n.y = e[t], n;
+};
+Cartesian2.packArray = function(e, t) {
+ const n = e.length, i = n * 2;
+ defined(t) ? !Array.isArray(t) && t.length !== i || t.length !== i && (t.length = i) : t = new Array(i);
+ for (let r = 0; r < n; ++r)
+ Cartesian2.pack(e[r], t, r * 2);
+ return t;
+};
+Cartesian2.unpackArray = function(e, t) {
+ const n = e.length;
+ defined(t) ? t.length = n / 2 : t = new Array(n / 2);
+ for (let i = 0; i < n; i += 2) {
+ const r = i / 2;
+ t[r] = Cartesian2.unpack(e, i, t[r]);
+ }
+ return t;
+};
+Cartesian2.fromArray = Cartesian2.unpack;
+Cartesian2.maximumComponent = function(e) {
+ return Math.max(e.x, e.y);
+};
+Cartesian2.minimumComponent = function(e) {
+ return Math.min(e.x, e.y);
+};
+Cartesian2.minimumByComponent = function(e, t, n) {
+ return n.x = Math.min(e.x, t.x), n.y = Math.min(e.y, t.y), n;
+};
+Cartesian2.maximumByComponent = function(e, t, n) {
+ return n.x = Math.max(e.x, t.x), n.y = Math.max(e.y, t.y), n;
+};
+Cartesian2.clamp = function(e, t, n, i) {
+ const r = CesiumMath.clamp(e.x, t.x, n.x), o = CesiumMath.clamp(e.y, t.y, n.y);
+ return i.x = r, i.y = o, i;
+};
+Cartesian2.magnitudeSquared = function(e) {
+ return e.x * e.x + e.y * e.y;
+};
+Cartesian2.magnitude = function(e) {
+ return Math.sqrt(Cartesian2.magnitudeSquared(e));
+};
+const distanceScratch$1 = new Cartesian2();
+Cartesian2.distance = function(e, t) {
+ return Cartesian2.subtract(e, t, distanceScratch$1), Cartesian2.magnitude(distanceScratch$1);
+};
+Cartesian2.distanceSquared = function(e, t) {
+ return Cartesian2.subtract(e, t, distanceScratch$1), Cartesian2.magnitudeSquared(distanceScratch$1);
+};
+Cartesian2.normalize = function(e, t) {
+ const n = Cartesian2.magnitude(e);
+ return t.x = e.x / n, t.y = e.y / n, t;
+};
+Cartesian2.dot = function(e, t) {
+ return e.x * t.x + e.y * t.y;
+};
+Cartesian2.cross = function(e, t) {
+ return e.x * t.y - e.y * t.x;
+};
+Cartesian2.multiplyComponents = function(e, t, n) {
+ return n.x = e.x * t.x, n.y = e.y * t.y, n;
+};
+Cartesian2.divideComponents = function(e, t, n) {
+ return n.x = e.x / t.x, n.y = e.y / t.y, n;
+};
+Cartesian2.add = function(e, t, n) {
+ return n.x = e.x + t.x, n.y = e.y + t.y, n;
+};
+Cartesian2.subtract = function(e, t, n) {
+ return n.x = e.x - t.x, n.y = e.y - t.y, n;
+};
+Cartesian2.multiplyByScalar = function(e, t, n) {
+ return n.x = e.x * t, n.y = e.y * t, n;
+};
+Cartesian2.divideByScalar = function(e, t, n) {
+ return n.x = e.x / t, n.y = e.y / t, n;
+};
+Cartesian2.negate = function(e, t) {
+ return t.x = -e.x, t.y = -e.y, t;
+};
+Cartesian2.abs = function(e, t) {
+ return t.x = Math.abs(e.x), t.y = Math.abs(e.y), t;
+};
+const lerpScratch$1 = new Cartesian2();
+Cartesian2.lerp = function(e, t, n, i) {
+ return Cartesian2.multiplyByScalar(t, n, lerpScratch$1), i = Cartesian2.multiplyByScalar(e, 1 - n, i), Cartesian2.add(lerpScratch$1, i, i);
+};
+const angleBetweenScratch = new Cartesian2(), angleBetweenScratch2 = new Cartesian2();
+Cartesian2.angleBetween = function(e, t) {
+ return Cartesian2.normalize(e, angleBetweenScratch), Cartesian2.normalize(t, angleBetweenScratch2), CesiumMath.acosClamped(
+ Cartesian2.dot(angleBetweenScratch, angleBetweenScratch2)
+ );
+};
+const mostOrthogonalAxisScratch = new Cartesian2();
+Cartesian2.mostOrthogonalAxis = function(e, t) {
+ const n = Cartesian2.normalize(e, mostOrthogonalAxisScratch);
+ return Cartesian2.abs(n, n), n.x <= n.y ? t = Cartesian2.clone(Cartesian2.UNIT_X, t) : t = Cartesian2.clone(Cartesian2.UNIT_Y, t), t;
+};
+Cartesian2.equals = function(e, t) {
+ return e === t || defined(e) && defined(t) && e.x === t.x && e.y === t.y;
+};
+Cartesian2.equalsArray = function(e, t, n) {
+ return e.x === t[n] && e.y === t[n + 1];
+};
+Cartesian2.equalsEpsilon = function(e, t, n, i) {
+ return e === t || defined(e) && defined(t) && CesiumMath.equalsEpsilon(
+ e.x,
+ t.x,
+ n,
+ i
+ ) && CesiumMath.equalsEpsilon(
+ e.y,
+ t.y,
+ n,
+ i
+ );
+};
+Cartesian2.ZERO = Object.freeze(new Cartesian2(0, 0));
+Cartesian2.ONE = Object.freeze(new Cartesian2(1, 1));
+Cartesian2.UNIT_X = Object.freeze(new Cartesian2(1, 0));
+Cartesian2.UNIT_Y = Object.freeze(new Cartesian2(0, 1));
+Cartesian2.prototype.clone = function(e) {
+ return Cartesian2.clone(this, e);
+};
+Cartesian2.prototype.equals = function(e) {
+ return Cartesian2.equals(this, e);
+};
+Cartesian2.prototype.equalsEpsilon = function(e, t, n) {
+ return Cartesian2.equalsEpsilon(
+ this,
+ e,
+ t,
+ n
+ );
+};
+Cartesian2.prototype.toString = function() {
+ return `(${this.x}, ${this.y})`;
+};
+const scaleToGeodeticSurfaceIntersection = new Cartesian3(), scaleToGeodeticSurfaceGradient = new Cartesian3();
+function scaleToGeodeticSurface(e, t, n, i, r) {
+ const o = e.x, s = e.y, c = e.z, l = t.x, d = t.y, f = t.z, h = o * o * l * l, p = s * s * d * d, m = c * c * f * f, _ = h + p + m, y = Math.sqrt(1 / _), C = Cartesian3.multiplyByScalar(
+ e,
+ y,
+ scaleToGeodeticSurfaceIntersection
+ );
+ if (_ < i)
+ return isFinite(y) ? Cartesian3.clone(C, r) : void 0;
+ const T = n.x, x = n.y, b = n.z, S = scaleToGeodeticSurfaceGradient;
+ S.x = C.x * T * 2, S.y = C.y * x * 2, S.z = C.z * b * 2;
+ let E = (1 - y) * Cartesian3.magnitude(e) / (0.5 * Cartesian3.magnitude(S)), A = 0, D, P, I, M, R, L, g, w, O, N, F;
+ do {
+ E -= A, I = 1 / (1 + E * T), M = 1 / (1 + E * x), R = 1 / (1 + E * b), L = I * I, g = M * M, w = R * R, O = L * I, N = g * M, F = w * R, D = h * L + p * g + m * w - 1, P = h * O * T + p * N * x + m * F * b;
+ const B = -2 * P;
+ A = D / B;
+ } while (Math.abs(D) > CesiumMath.EPSILON12);
+ return defined(r) ? (r.x = o * I, r.y = s * M, r.z = c * R, r) : new Cartesian3(
+ o * I,
+ s * M,
+ c * R
+ );
+}
+function Cartographic(e, t, n) {
+ this.longitude = defaultValue(e, 0), this.latitude = defaultValue(t, 0), this.height = defaultValue(n, 0);
+}
+Cartographic.fromRadians = function(e, t, n, i) {
+ return n = defaultValue(n, 0), defined(i) ? (i.longitude = e, i.latitude = t, i.height = n, i) : new Cartographic(e, t, n);
+};
+Cartographic.fromDegrees = function(e, t, n, i) {
+ return e = CesiumMath.toRadians(e), t = CesiumMath.toRadians(t), Cartographic.fromRadians(e, t, n, i);
+};
+const cartesianToCartographicN$1 = new Cartesian3(), cartesianToCartographicP$1 = new Cartesian3(), cartesianToCartographicH$1 = new Cartesian3();
+Cartographic._ellipsoidOneOverRadii = new Cartesian3(
+ 1 / 6378137,
+ 1 / 6378137,
+ 1 / 6356752314245179e-9
+);
+Cartographic._ellipsoidOneOverRadiiSquared = new Cartesian3(
+ 1 / (6378137 * 6378137),
+ 1 / (6378137 * 6378137),
+ 1 / (6356752314245179e-9 * 6356752314245179e-9)
+);
+Cartographic._ellipsoidCenterToleranceSquared = CesiumMath.EPSILON1;
+Cartographic.fromCartesian = function(e, t, n) {
+ const i = defined(t) ? t.oneOverRadii : Cartographic._ellipsoidOneOverRadii, r = defined(t) ? t.oneOverRadiiSquared : Cartographic._ellipsoidOneOverRadiiSquared, o = defined(t) ? t._centerToleranceSquared : Cartographic._ellipsoidCenterToleranceSquared, s = scaleToGeodeticSurface(
+ e,
+ i,
+ r,
+ o,
+ cartesianToCartographicP$1
+ );
+ if (!defined(s))
+ return;
+ let c = Cartesian3.multiplyComponents(
+ s,
+ r,
+ cartesianToCartographicN$1
+ );
+ c = Cartesian3.normalize(c, c);
+ const l = Cartesian3.subtract(e, s, cartesianToCartographicH$1), d = Math.atan2(c.y, c.x), f = Math.asin(c.z), h = CesiumMath.sign(Cartesian3.dot(l, e)) * Cartesian3.magnitude(l);
+ return defined(n) ? (n.longitude = d, n.latitude = f, n.height = h, n) : new Cartographic(d, f, h);
+};
+Cartographic.toCartesian = function(e, t, n) {
+ return Cartesian3.fromRadians(
+ e.longitude,
+ e.latitude,
+ e.height,
+ t,
+ n
+ );
+};
+Cartographic.clone = function(e, t) {
+ if (defined(e))
+ return defined(t) ? (t.longitude = e.longitude, t.latitude = e.latitude, t.height = e.height, t) : new Cartographic(
+ e.longitude,
+ e.latitude,
+ e.height
+ );
+};
+Cartographic.equals = function(e, t) {
+ return e === t || defined(e) && defined(t) && e.longitude === t.longitude && e.latitude === t.latitude && e.height === t.height;
+};
+Cartographic.equalsEpsilon = function(e, t, n) {
+ return n = defaultValue(n, 0), e === t || defined(e) && defined(t) && Math.abs(e.longitude - t.longitude) <= n && Math.abs(e.latitude - t.latitude) <= n && Math.abs(e.height - t.height) <= n;
+};
+Cartographic.ZERO = Object.freeze(new Cartographic(0, 0, 0));
+Cartographic.prototype.clone = function(e) {
+ return Cartographic.clone(this, e);
+};
+Cartographic.prototype.equals = function(e) {
+ return Cartographic.equals(this, e);
+};
+Cartographic.prototype.equalsEpsilon = function(e, t) {
+ return Cartographic.equalsEpsilon(this, e, t);
+};
+Cartographic.prototype.toString = function() {
+ return `(${this.longitude}, ${this.latitude}, ${this.height})`;
+};
+function initialize$h(e, t, n, i) {
+ t = defaultValue(t, 0), n = defaultValue(n, 0), i = defaultValue(i, 0), e._radii = new Cartesian3(t, n, i), e._radiiSquared = new Cartesian3(t * t, n * n, i * i), e._radiiToTheFourth = new Cartesian3(
+ t * t * t * t,
+ n * n * n * n,
+ i * i * i * i
+ ), e._oneOverRadii = new Cartesian3(
+ t === 0 ? 0 : 1 / t,
+ n === 0 ? 0 : 1 / n,
+ i === 0 ? 0 : 1 / i
+ ), e._oneOverRadiiSquared = new Cartesian3(
+ t === 0 ? 0 : 1 / (t * t),
+ n === 0 ? 0 : 1 / (n * n),
+ i === 0 ? 0 : 1 / (i * i)
+ ), e._minimumRadius = Math.min(t, n, i), e._maximumRadius = Math.max(t, n, i), e._centerToleranceSquared = CesiumMath.EPSILON1, e._radiiSquared.z !== 0 && (e._squaredXOverSquaredZ = e._radiiSquared.x / e._radiiSquared.z);
+}
+function Ellipsoid(e, t, n) {
+ this._radii = void 0, this._radiiSquared = void 0, this._radiiToTheFourth = void 0, this._oneOverRadii = void 0, this._oneOverRadiiSquared = void 0, this._minimumRadius = void 0, this._maximumRadius = void 0, this._centerToleranceSquared = void 0, this._squaredXOverSquaredZ = void 0, initialize$h(this, e, t, n);
+}
+Object.defineProperties(Ellipsoid.prototype, {
+ /**
+ * Gets the radii of the ellipsoid.
+ * @memberof Ellipsoid.prototype
+ * @type {Cartesian3}
+ * @readonly
+ */
+ radii: {
+ get: function() {
+ return this._radii;
+ }
+ },
+ /**
+ * Gets the squared radii of the ellipsoid.
+ * @memberof Ellipsoid.prototype
+ * @type {Cartesian3}
+ * @readonly
+ */
+ radiiSquared: {
+ get: function() {
+ return this._radiiSquared;
+ }
+ },
+ /**
+ * Gets the radii of the ellipsoid raise to the fourth power.
+ * @memberof Ellipsoid.prototype
+ * @type {Cartesian3}
+ * @readonly
+ */
+ radiiToTheFourth: {
+ get: function() {
+ return this._radiiToTheFourth;
+ }
+ },
+ /**
+ * Gets one over the radii of the ellipsoid.
+ * @memberof Ellipsoid.prototype
+ * @type {Cartesian3}
+ * @readonly
+ */
+ oneOverRadii: {
+ get: function() {
+ return this._oneOverRadii;
+ }
+ },
+ /**
+ * Gets one over the squared radii of the ellipsoid.
+ * @memberof Ellipsoid.prototype
+ * @type {Cartesian3}
+ * @readonly
+ */
+ oneOverRadiiSquared: {
+ get: function() {
+ return this._oneOverRadiiSquared;
+ }
+ },
+ /**
+ * Gets the minimum radius of the ellipsoid.
+ * @memberof Ellipsoid.prototype
+ * @type {number}
+ * @readonly
+ */
+ minimumRadius: {
+ get: function() {
+ return this._minimumRadius;
+ }
+ },
+ /**
+ * Gets the maximum radius of the ellipsoid.
+ * @memberof Ellipsoid.prototype
+ * @type {number}
+ * @readonly
+ */
+ maximumRadius: {
+ get: function() {
+ return this._maximumRadius;
+ }
+ }
+});
+Ellipsoid.clone = function(e, t) {
+ if (!defined(e))
+ return;
+ const n = e._radii;
+ return defined(t) ? (Cartesian3.clone(n, t._radii), Cartesian3.clone(e._radiiSquared, t._radiiSquared), Cartesian3.clone(e._radiiToTheFourth, t._radiiToTheFourth), Cartesian3.clone(e._oneOverRadii, t._oneOverRadii), Cartesian3.clone(e._oneOverRadiiSquared, t._oneOverRadiiSquared), t._minimumRadius = e._minimumRadius, t._maximumRadius = e._maximumRadius, t._centerToleranceSquared = e._centerToleranceSquared, t) : new Ellipsoid(n.x, n.y, n.z);
+};
+Ellipsoid.fromCartesian3 = function(e, t) {
+ return defined(t) || (t = new Ellipsoid()), defined(e) && initialize$h(t, e.x, e.y, e.z), t;
+};
+Ellipsoid.WGS84 = Object.freeze(
+ new Ellipsoid(6378137, 6378137, 6356752314245179e-9)
+);
+Ellipsoid.UNIT_SPHERE = Object.freeze(new Ellipsoid(1, 1, 1));
+Ellipsoid.MOON = Object.freeze(
+ new Ellipsoid(
+ CesiumMath.LUNAR_RADIUS,
+ CesiumMath.LUNAR_RADIUS,
+ CesiumMath.LUNAR_RADIUS
+ )
+);
+Ellipsoid._default = Ellipsoid.WGS84;
+Object.defineProperties(Ellipsoid, {
+ /**
+ * The default ellipsoid used when not otherwise specified.
+ * @memberof Ellipsoid
+ * @type {Ellipsoid}
+ * @example
+ * Cesium.Ellipsoid.default = Cesium.Ellipsoid.MOON;
+ *
+ * // Apollo 11 landing site
+ * const position = Cesium.Cartesian3.fromRadians(
+ * 0.67416,
+ * 23.47315,
+ * );
+ */
+ default: {
+ get: function() {
+ return Ellipsoid._default;
+ },
+ set: function(e) {
+ Ellipsoid._default = e, Cartesian3._ellipsoidRadiiSquared = e.radiiSquared, Cartographic._ellipsoidOneOverRadii = e.oneOverRadii, Cartographic._ellipsoidOneOverRadiiSquared = e.oneOverRadiiSquared, Cartographic._ellipsoidCenterToleranceSquared = e._centerToleranceSquared;
+ }
+ }
+});
+Ellipsoid.prototype.clone = function(e) {
+ return Ellipsoid.clone(this, e);
+};
+Ellipsoid.packedLength = Cartesian3.packedLength;
+Ellipsoid.pack = function(e, t, n) {
+ return n = defaultValue(n, 0), Cartesian3.pack(e._radii, t, n), t;
+};
+Ellipsoid.unpack = function(e, t, n) {
+ t = defaultValue(t, 0);
+ const i = Cartesian3.unpack(e, t);
+ return Ellipsoid.fromCartesian3(i, n);
+};
+Ellipsoid.prototype.geocentricSurfaceNormal = Cartesian3.normalize;
+Ellipsoid.prototype.geodeticSurfaceNormalCartographic = function(e, t) {
+ const n = e.longitude, i = e.latitude, r = Math.cos(i), o = r * Math.cos(n), s = r * Math.sin(n), c = Math.sin(i);
+ return defined(t) || (t = new Cartesian3()), t.x = o, t.y = s, t.z = c, Cartesian3.normalize(t, t);
+};
+Ellipsoid.prototype.geodeticSurfaceNormal = function(e, t) {
+ if (!Cartesian3.equalsEpsilon(e, Cartesian3.ZERO, CesiumMath.EPSILON14))
+ return defined(t) || (t = new Cartesian3()), t = Cartesian3.multiplyComponents(
+ e,
+ this._oneOverRadiiSquared,
+ t
+ ), Cartesian3.normalize(t, t);
+};
+const cartographicToCartesianNormal = new Cartesian3(), cartographicToCartesianK = new Cartesian3();
+Ellipsoid.prototype.cartographicToCartesian = function(e, t) {
+ const n = cartographicToCartesianNormal, i = cartographicToCartesianK;
+ this.geodeticSurfaceNormalCartographic(e, n), Cartesian3.multiplyComponents(this._radiiSquared, n, i);
+ const r = Math.sqrt(Cartesian3.dot(n, i));
+ return Cartesian3.divideByScalar(i, r, i), Cartesian3.multiplyByScalar(n, e.height, n), defined(t) || (t = new Cartesian3()), Cartesian3.add(i, n, t);
+};
+Ellipsoid.prototype.cartographicArrayToCartesianArray = function(e, t) {
+ const n = e.length;
+ defined(t) ? t.length = n : t = new Array(n);
+ for (let i = 0; i < n; i++)
+ t[i] = this.cartographicToCartesian(e[i], t[i]);
+ return t;
+};
+const cartesianToCartographicN = new Cartesian3(), cartesianToCartographicP = new Cartesian3(), cartesianToCartographicH = new Cartesian3();
+Ellipsoid.prototype.cartesianToCartographic = function(e, t) {
+ const n = this.scaleToGeodeticSurface(e, cartesianToCartographicP);
+ if (!defined(n))
+ return;
+ const i = this.geodeticSurfaceNormal(n, cartesianToCartographicN), r = Cartesian3.subtract(e, n, cartesianToCartographicH), o = Math.atan2(i.y, i.x), s = Math.asin(i.z), c = CesiumMath.sign(Cartesian3.dot(r, e)) * Cartesian3.magnitude(r);
+ return defined(t) ? (t.longitude = o, t.latitude = s, t.height = c, t) : new Cartographic(o, s, c);
+};
+Ellipsoid.prototype.cartesianArrayToCartographicArray = function(e, t) {
+ const n = e.length;
+ defined(t) ? t.length = n : t = new Array(n);
+ for (let i = 0; i < n; ++i)
+ t[i] = this.cartesianToCartographic(e[i], t[i]);
+ return t;
+};
+Ellipsoid.prototype.scaleToGeodeticSurface = function(e, t) {
+ return scaleToGeodeticSurface(
+ e,
+ this._oneOverRadii,
+ this._oneOverRadiiSquared,
+ this._centerToleranceSquared,
+ t
+ );
+};
+Ellipsoid.prototype.scaleToGeocentricSurface = function(e, t) {
+ defined(t) || (t = new Cartesian3());
+ const n = e.x, i = e.y, r = e.z, o = this._oneOverRadiiSquared, s = 1 / Math.sqrt(
+ n * n * o.x + i * i * o.y + r * r * o.z
+ );
+ return Cartesian3.multiplyByScalar(e, s, t);
+};
+Ellipsoid.prototype.transformPositionToScaledSpace = function(e, t) {
+ return defined(t) || (t = new Cartesian3()), Cartesian3.multiplyComponents(e, this._oneOverRadii, t);
+};
+Ellipsoid.prototype.transformPositionFromScaledSpace = function(e, t) {
+ return defined(t) || (t = new Cartesian3()), Cartesian3.multiplyComponents(e, this._radii, t);
+};
+Ellipsoid.prototype.equals = function(e) {
+ return this === e || defined(e) && Cartesian3.equals(this._radii, e._radii);
+};
+Ellipsoid.prototype.toString = function() {
+ return this._radii.toString();
+};
+Ellipsoid.prototype.getSurfaceNormalIntersectionWithZAxis = function(e, t, n) {
+ t = defaultValue(t, 0);
+ const i = this._squaredXOverSquaredZ;
+ if (defined(n) || (n = new Cartesian3()), n.x = 0, n.y = 0, n.z = e.z * (1 - i), !(Math.abs(n.z) >= this._radii.z - t))
+ return n;
+};
+const scratchEndpoint = new Cartesian3();
+Ellipsoid.prototype.getLocalCurvature = function(e, t) {
+ defined(t) || (t = new Cartesian2());
+ const n = this.getSurfaceNormalIntersectionWithZAxis(
+ e,
+ 0,
+ scratchEndpoint
+ ), i = Cartesian3.distance(
+ e,
+ n
+ ), r = this.minimumRadius * i / this.maximumRadius ** 2, o = i * r ** 2;
+ return Cartesian2.fromElements(
+ 1 / i,
+ 1 / o,
+ t
+ );
+};
+const abscissas = [
+ 0.14887433898163,
+ 0.43339539412925,
+ 0.67940956829902,
+ 0.86506336668898,
+ 0.97390652851717,
+ 0
+], weights = [
+ 0.29552422471475,
+ 0.26926671930999,
+ 0.21908636251598,
+ 0.14945134915058,
+ 0.066671344308684,
+ 0
+];
+function gaussLegendreQuadrature(e, t, n) {
+ const i = 0.5 * (t + e), r = 0.5 * (t - e);
+ let o = 0;
+ for (let s = 0; s < 5; s++) {
+ const c = r * abscissas[s];
+ o += weights[s] * (n(i + c) + n(i - c));
+ }
+ return o *= r, o;
+}
+Ellipsoid.prototype.surfaceArea = function(e) {
+ const t = e.west;
+ let n = e.east;
+ const i = e.south, r = e.north;
+ for (; n < t; )
+ n += CesiumMath.TWO_PI;
+ const o = this._radiiSquared, s = o.x, c = o.y, l = o.z, d = s * c;
+ return gaussLegendreQuadrature(i, r, function(f) {
+ const h = Math.cos(f), p = Math.sin(f);
+ return Math.cos(f) * gaussLegendreQuadrature(t, n, function(m) {
+ const _ = Math.cos(m), y = Math.sin(m);
+ return Math.sqrt(
+ d * p * p + l * (c * _ * _ + s * y * y) * h * h
+ );
+ });
+ });
+};
+function GeographicProjection(e) {
+ this._ellipsoid = defaultValue(e, Ellipsoid.default), this._semimajorAxis = this._ellipsoid.maximumRadius, this._oneOverSemimajorAxis = 1 / this._semimajorAxis;
+}
+Object.defineProperties(GeographicProjection.prototype, {
+ /**
+ * Gets the {@link Ellipsoid}.
+ *
+ * @memberof GeographicProjection.prototype
+ *
+ * @type {Ellipsoid}
+ * @readonly
+ */
+ ellipsoid: {
+ get: function() {
+ return this._ellipsoid;
+ }
+ }
+});
+GeographicProjection.prototype.project = function(e, t) {
+ const n = this._semimajorAxis, i = e.longitude * n, r = e.latitude * n, o = e.height;
+ return defined(t) ? (t.x = i, t.y = r, t.z = o, t) : new Cartesian3(i, r, o);
+};
+GeographicProjection.prototype.unproject = function(e, t) {
+ const n = this._oneOverSemimajorAxis, i = e.x * n, r = e.y * n, o = e.z;
+ return defined(t) ? (t.longitude = i, t.latitude = r, t.height = o, t) : new Cartographic(i, r, o);
+};
+const Intersect = {
+ /**
+ * Represents that an object is not contained within the frustum.
+ *
+ * @type {number}
+ * @constant
+ */
+ OUTSIDE: -1,
+ /**
+ * Represents that an object intersects one of the frustum's planes.
+ *
+ * @type {number}
+ * @constant
+ */
+ INTERSECTING: 0,
+ /**
+ * Represents that an object is fully within the frustum.
+ *
+ * @type {number}
+ * @constant
+ */
+ INSIDE: 1
+}, Intersect$1 = Object.freeze(Intersect);
+function binarySearch(e, t, n) {
+ let i = 0, r = e.length - 1, o, s;
+ for (; i <= r; ) {
+ if (o = ~~((i + r) / 2), s = n(e[o], t), s < 0) {
+ i = o + 1;
+ continue;
+ }
+ if (s > 0) {
+ r = o - 1;
+ continue;
+ }
+ return o;
+ }
+ return ~(r + 1);
+}
+function EarthOrientationParametersSample(e, t, n, i, r) {
+ this.xPoleWander = e, this.yPoleWander = t, this.xPoleOffset = n, this.yPoleOffset = i, this.ut1MinusUtc = r;
+}
+function isLeapYear(e) {
+ return e % 4 === 0 && e % 100 !== 0 || e % 400 === 0;
+}
+function GregorianDate(e, t, n, i, r, o, s, c) {
+ e = defaultValue(e, 1), t = defaultValue(t, 1), n = defaultValue(n, 1), i = defaultValue(i, 0), r = defaultValue(r, 0), o = defaultValue(o, 0), s = defaultValue(s, 0), c = defaultValue(c, !1), this.year = e, this.month = t, this.day = n, this.hour = i, this.minute = r, this.second = o, this.millisecond = s, this.isLeapSecond = c;
+}
+function LeapSecond(e, t) {
+ this.julianDate = e, this.offset = t;
+}
+const TimeConstants = {
+ /**
+ * The number of seconds in one millisecond: 0.001
+ * @type {number}
+ * @constant
+ */
+ SECONDS_PER_MILLISECOND: 1e-3,
+ /**
+ * The number of seconds in one minute: 60.
+ * @type {number}
+ * @constant
+ */
+ SECONDS_PER_MINUTE: 60,
+ /**
+ * The number of minutes in one hour: 60.
+ * @type {number}
+ * @constant
+ */
+ MINUTES_PER_HOUR: 60,
+ /**
+ * The number of hours in one day: 24.
+ * @type {number}
+ * @constant
+ */
+ HOURS_PER_DAY: 24,
+ /**
+ * The number of seconds in one hour: 3600.
+ * @type {number}
+ * @constant
+ */
+ SECONDS_PER_HOUR: 3600,
+ /**
+ * The number of minutes in one day: 1440.
+ * @type {number}
+ * @constant
+ */
+ MINUTES_PER_DAY: 1440,
+ /**
+ * The number of seconds in one day, ignoring leap seconds: 86400.
+ * @type {number}
+ * @constant
+ */
+ SECONDS_PER_DAY: 86400,
+ /**
+ * The number of days in one Julian century: 36525.
+ * @type {number}
+ * @constant
+ */
+ DAYS_PER_JULIAN_CENTURY: 36525,
+ /**
+ * One trillionth of a second.
+ * @type {number}
+ * @constant
+ */
+ PICOSECOND: 1e-9,
+ /**
+ * The number of days to subtract from a Julian date to determine the
+ * modified Julian date, which gives the number of days since midnight
+ * on November 17, 1858.
+ * @type {number}
+ * @constant
+ */
+ MODIFIED_JULIAN_DATE_DIFFERENCE: 24000005e-1
+}, TimeConstants$1 = Object.freeze(TimeConstants), TimeStandard = {
+ /**
+ * Represents the coordinated Universal Time (UTC) time standard.
+ *
+ * UTC is related to TAI according to the relationship
+ * UTC = TAI - deltaT where deltaT is the number of leap
+ * seconds which have been introduced as of the time in TAI.
+ *
+ * @type {number}
+ * @constant
+ */
+ UTC: 0,
+ /**
+ * Represents the International Atomic Time (TAI) time standard.
+ * TAI is the principal time standard to which the other time standards are related.
+ *
+ * @type {number}
+ * @constant
+ */
+ TAI: 1
+}, TimeStandard$1 = Object.freeze(TimeStandard), gregorianDateScratch = new GregorianDate(), daysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], daysInLeapFeburary = 29;
+function compareLeapSecondDates$1(e, t) {
+ return JulianDate.compare(e.julianDate, t.julianDate);
+}
+const binarySearchScratchLeapSecond = new LeapSecond();
+function convertUtcToTai(e) {
+ binarySearchScratchLeapSecond.julianDate = e;
+ const t = JulianDate.leapSeconds;
+ let n = binarySearch(
+ t,
+ binarySearchScratchLeapSecond,
+ compareLeapSecondDates$1
+ );
+ n < 0 && (n = ~n), n >= t.length && (n = t.length - 1);
+ let i = t[n].offset;
+ n > 0 && JulianDate.secondsDifference(
+ t[n].julianDate,
+ e
+ ) > i && (n--, i = t[n].offset), JulianDate.addSeconds(e, i, e);
+}
+function convertTaiToUtc(e, t) {
+ binarySearchScratchLeapSecond.julianDate = e;
+ const n = JulianDate.leapSeconds;
+ let i = binarySearch(
+ n,
+ binarySearchScratchLeapSecond,
+ compareLeapSecondDates$1
+ );
+ if (i < 0 && (i = ~i), i === 0)
+ return JulianDate.addSeconds(e, -n[0].offset, t);
+ if (i >= n.length)
+ return JulianDate.addSeconds(
+ e,
+ -n[i - 1].offset,
+ t
+ );
+ const r = JulianDate.secondsDifference(
+ n[i].julianDate,
+ e
+ );
+ if (r === 0)
+ return JulianDate.addSeconds(
+ e,
+ -n[i].offset,
+ t
+ );
+ if (!(r <= 1))
+ return JulianDate.addSeconds(
+ e,
+ -n[--i].offset,
+ t
+ );
+}
+function setComponents(e, t, n) {
+ const i = t / TimeConstants$1.SECONDS_PER_DAY | 0;
+ return e += i, t -= TimeConstants$1.SECONDS_PER_DAY * i, t < 0 && (e--, t += TimeConstants$1.SECONDS_PER_DAY), n.dayNumber = e, n.secondsOfDay = t, n;
+}
+function computeJulianDateComponents(e, t, n, i, r, o, s) {
+ const c = (t - 14) / 12 | 0, l = e + 4800 + c;
+ let d = (1461 * l / 4 | 0) + (367 * (t - 2 - 12 * c) / 12 | 0) - (3 * ((l + 100) / 100 | 0) / 4 | 0) + n - 32075;
+ i = i - 12, i < 0 && (i += 24);
+ const f = o + (i * TimeConstants$1.SECONDS_PER_HOUR + r * TimeConstants$1.SECONDS_PER_MINUTE + s * TimeConstants$1.SECONDS_PER_MILLISECOND);
+ return f >= 43200 && (d -= 1), [d, f];
+}
+const matchCalendarYear = /^(\d{4})$/, matchCalendarMonth = /^(\d{4})-(\d{2})$/, matchOrdinalDate = /^(\d{4})-?(\d{3})$/, matchWeekDate = /^(\d{4})-?W(\d{2})-?(\d{1})?$/, matchCalendarDate = /^(\d{4})-?(\d{2})-?(\d{2})$/, utcOffset = /([Z+\-])?(\d{2})?:?(\d{2})?$/, matchHours = /^(\d{2})(\.\d+)?/.source + utcOffset.source, matchHoursMinutes = /^(\d{2}):?(\d{2})(\.\d+)?/.source + utcOffset.source, matchHoursMinutesSeconds = /^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source + utcOffset.source;
+function JulianDate(e, t, n) {
+ this.dayNumber = void 0, this.secondsOfDay = void 0, e = defaultValue(e, 0), t = defaultValue(t, 0), n = defaultValue(n, TimeStandard$1.UTC);
+ const i = e | 0;
+ t = t + (e - i) * TimeConstants$1.SECONDS_PER_DAY, setComponents(i, t, this), n === TimeStandard$1.UTC && convertUtcToTai(this);
+}
+JulianDate.fromGregorianDate = function(e, t) {
+ const n = computeJulianDateComponents(
+ e.year,
+ e.month,
+ e.day,
+ e.hour,
+ e.minute,
+ e.second,
+ e.millisecond
+ );
+ return defined(t) ? (setComponents(n[0], n[1], t), convertUtcToTai(t), t) : new JulianDate(n[0], n[1], TimeStandard$1.UTC);
+};
+JulianDate.fromDate = function(e, t) {
+ const n = computeJulianDateComponents(
+ e.getUTCFullYear(),
+ e.getUTCMonth() + 1,
+ e.getUTCDate(),
+ e.getUTCHours(),
+ e.getUTCMinutes(),
+ e.getUTCSeconds(),
+ e.getUTCMilliseconds()
+ );
+ return defined(t) ? (setComponents(n[0], n[1], t), convertUtcToTai(t), t) : new JulianDate(n[0], n[1], TimeStandard$1.UTC);
+};
+JulianDate.fromIso8601 = function(e, t) {
+ e = e.replace(",", ".");
+ let n = e.split("T"), i, r = 1, o = 1, s = 0, c = 0, l = 0, d = 0;
+ const f = n[0], h = n[1];
+ let p, m;
+ if (n = f.match(matchCalendarDate), n !== null)
+ i = +n[1], r = +n[2], o = +n[3];
+ else if (n = f.match(matchCalendarMonth), n !== null)
+ i = +n[1], r = +n[2];
+ else if (n = f.match(matchCalendarYear), n !== null)
+ i = +n[1];
+ else {
+ let T;
+ if (n = f.match(matchOrdinalDate), n !== null)
+ i = +n[1], T = +n[2], m = isLeapYear(i);
+ else if (n = f.match(matchWeekDate), n !== null) {
+ i = +n[1];
+ const x = +n[2], b = +n[3] || 0, S = new Date(Date.UTC(i, 0, 4));
+ T = x * 7 + b - S.getUTCDay() - 3;
+ }
+ p = new Date(Date.UTC(i, 0, 1)), p.setUTCDate(T), r = p.getUTCMonth() + 1, o = p.getUTCDate();
+ }
+ m = isLeapYear(i);
+ let _;
+ if (defined(h)) {
+ n = h.match(matchHoursMinutesSeconds), n !== null ? (s = +n[1], c = +n[2], l = +n[3], d = +(n[4] || 0) * 1e3, _ = 5) : (n = h.match(matchHoursMinutes), n !== null ? (s = +n[1], c = +n[2], l = +(n[3] || 0) * 60, _ = 4) : (n = h.match(matchHours), n !== null && (s = +n[1], c = +(n[2] || 0) * 60, _ = 3)));
+ const T = n[_], x = +n[_ + 1], b = +(n[_ + 2] || 0);
+ switch (T) {
+ case "+":
+ s = s - x, c = c - b;
+ break;
+ case "-":
+ s = s + x, c = c + b;
+ break;
+ case "Z":
+ break;
+ default:
+ c = c + new Date(
+ Date.UTC(i, r - 1, o, s, c)
+ ).getTimezoneOffset();
+ break;
+ }
+ }
+ const y = l === 60;
+ for (y && l--; c >= 60; )
+ c -= 60, s++;
+ for (; s >= 24; )
+ s -= 24, o++;
+ for (p = m && r === 2 ? daysInLeapFeburary : daysInMonth[r - 1]; o > p; )
+ o -= p, r++, r > 12 && (r -= 12, i++), p = m && r === 2 ? daysInLeapFeburary : daysInMonth[r - 1];
+ for (; c < 0; )
+ c += 60, s--;
+ for (; s < 0; )
+ s += 24, o--;
+ for (; o < 1; )
+ r--, r < 1 && (r += 12, i--), p = m && r === 2 ? daysInLeapFeburary : daysInMonth[r - 1], o += p;
+ const C = computeJulianDateComponents(
+ i,
+ r,
+ o,
+ s,
+ c,
+ l,
+ d
+ );
+ return defined(t) ? (setComponents(C[0], C[1], t), convertUtcToTai(t)) : t = new JulianDate(C[0], C[1], TimeStandard$1.UTC), y && JulianDate.addSeconds(t, 1, t), t;
+};
+JulianDate.now = function(e) {
+ return JulianDate.fromDate(/* @__PURE__ */ new Date(), e);
+};
+const toGregorianDateScratch = new JulianDate(0, 0, TimeStandard$1.TAI);
+JulianDate.toGregorianDate = function(e, t) {
+ let n = !1, i = convertTaiToUtc(e, toGregorianDateScratch);
+ defined(i) || (JulianDate.addSeconds(e, -1, toGregorianDateScratch), i = convertTaiToUtc(toGregorianDateScratch, toGregorianDateScratch), n = !0);
+ let r = i.dayNumber;
+ const o = i.secondsOfDay;
+ o >= 43200 && (r += 1);
+ let s = r + 68569 | 0;
+ const c = 4 * s / 146097 | 0;
+ s = s - ((146097 * c + 3) / 4 | 0) | 0;
+ const l = 4e3 * (s + 1) / 1461001 | 0;
+ s = s - (1461 * l / 4 | 0) + 31 | 0;
+ const d = 80 * s / 2447 | 0, f = s - (2447 * d / 80 | 0) | 0;
+ s = d / 11 | 0;
+ const h = d + 2 - 12 * s | 0, p = 100 * (c - 49) + l + s | 0;
+ let m = o / TimeConstants$1.SECONDS_PER_HOUR | 0, _ = o - m * TimeConstants$1.SECONDS_PER_HOUR;
+ const y = _ / TimeConstants$1.SECONDS_PER_MINUTE | 0;
+ _ = _ - y * TimeConstants$1.SECONDS_PER_MINUTE;
+ let C = _ | 0;
+ const T = (_ - C) / TimeConstants$1.SECONDS_PER_MILLISECOND;
+ return m += 12, m > 23 && (m -= 24), n && (C += 1), defined(t) ? (t.year = p, t.month = h, t.day = f, t.hour = m, t.minute = y, t.second = C, t.millisecond = T, t.isLeapSecond = n, t) : new GregorianDate(
+ p,
+ h,
+ f,
+ m,
+ y,
+ C,
+ T,
+ n
+ );
+};
+JulianDate.toDate = function(e) {
+ const t = JulianDate.toGregorianDate(e, gregorianDateScratch);
+ let n = t.second;
+ return t.isLeapSecond && (n -= 1), new Date(
+ Date.UTC(
+ t.year,
+ t.month - 1,
+ t.day,
+ t.hour,
+ t.minute,
+ n,
+ t.millisecond
+ )
+ );
+};
+JulianDate.toIso8601 = function(e, t) {
+ const n = JulianDate.toGregorianDate(e, gregorianDateScratch);
+ let i = n.year, r = n.month, o = n.day, s = n.hour;
+ const c = n.minute, l = n.second, d = n.millisecond;
+ i === 1e4 && r === 1 && o === 1 && s === 0 && c === 0 && l === 0 && d === 0 && (i = 9999, r = 12, o = 31, s = 24);
+ let f;
+ return !defined(t) && d !== 0 ? (f = (d * 0.01).toString().replace(".", ""), `${i.toString().padStart(4, "0")}-${r.toString().padStart(2, "0")}-${o.toString().padStart(2, "0")}T${s.toString().padStart(2, "0")}:${c.toString().padStart(2, "0")}:${l.toString().padStart(2, "0")}.${f}Z`) : !defined(t) || t === 0 ? `${i.toString().padStart(4, "0")}-${r.toString().padStart(2, "0")}-${o.toString().padStart(2, "0")}T${s.toString().padStart(2, "0")}:${c.toString().padStart(2, "0")}:${l.toString().padStart(2, "0")}Z` : (f = (d * 0.01).toFixed(t).replace(".", "").slice(0, t), `${i.toString().padStart(4, "0")}-${r.toString().padStart(2, "0")}-${o.toString().padStart(2, "0")}T${s.toString().padStart(2, "0")}:${c.toString().padStart(2, "0")}:${l.toString().padStart(2, "0")}.${f}Z`);
+};
+JulianDate.clone = function(e, t) {
+ if (defined(e))
+ return defined(t) ? (t.dayNumber = e.dayNumber, t.secondsOfDay = e.secondsOfDay, t) : new JulianDate(
+ e.dayNumber,
+ e.secondsOfDay,
+ TimeStandard$1.TAI
+ );
+};
+JulianDate.compare = function(e, t) {
+ const n = e.dayNumber - t.dayNumber;
+ return n !== 0 ? n : e.secondsOfDay - t.secondsOfDay;
+};
+JulianDate.equals = function(e, t) {
+ return e === t || defined(e) && defined(t) && e.dayNumber === t.dayNumber && e.secondsOfDay === t.secondsOfDay;
+};
+JulianDate.equalsEpsilon = function(e, t, n) {
+ return n = defaultValue(n, 0), e === t || defined(e) && defined(t) && Math.abs(JulianDate.secondsDifference(e, t)) <= n;
+};
+JulianDate.totalDays = function(e) {
+ return e.dayNumber + e.secondsOfDay / TimeConstants$1.SECONDS_PER_DAY;
+};
+JulianDate.secondsDifference = function(e, t) {
+ return (e.dayNumber - t.dayNumber) * TimeConstants$1.SECONDS_PER_DAY + (e.secondsOfDay - t.secondsOfDay);
+};
+JulianDate.daysDifference = function(e, t) {
+ const n = e.dayNumber - t.dayNumber, i = (e.secondsOfDay - t.secondsOfDay) / TimeConstants$1.SECONDS_PER_DAY;
+ return n + i;
+};
+JulianDate.computeTaiMinusUtc = function(e) {
+ binarySearchScratchLeapSecond.julianDate = e;
+ const t = JulianDate.leapSeconds;
+ let n = binarySearch(
+ t,
+ binarySearchScratchLeapSecond,
+ compareLeapSecondDates$1
+ );
+ return n < 0 && (n = ~n, --n, n < 0 && (n = 0)), t[n].offset;
+};
+JulianDate.addSeconds = function(e, t, n) {
+ return setComponents(
+ e.dayNumber,
+ e.secondsOfDay + t,
+ n
+ );
+};
+JulianDate.addMinutes = function(e, t, n) {
+ const i = e.secondsOfDay + t * TimeConstants$1.SECONDS_PER_MINUTE;
+ return setComponents(e.dayNumber, i, n);
+};
+JulianDate.addHours = function(e, t, n) {
+ const i = e.secondsOfDay + t * TimeConstants$1.SECONDS_PER_HOUR;
+ return setComponents(e.dayNumber, i, n);
+};
+JulianDate.addDays = function(e, t, n) {
+ const i = e.dayNumber + t;
+ return setComponents(i, e.secondsOfDay, n);
+};
+JulianDate.lessThan = function(e, t) {
+ return JulianDate.compare(e, t) < 0;
+};
+JulianDate.lessThanOrEquals = function(e, t) {
+ return JulianDate.compare(e, t) <= 0;
+};
+JulianDate.greaterThan = function(e, t) {
+ return JulianDate.compare(e, t) > 0;
+};
+JulianDate.greaterThanOrEquals = function(e, t) {
+ return JulianDate.compare(e, t) >= 0;
+};
+JulianDate.prototype.clone = function(e) {
+ return JulianDate.clone(this, e);
+};
+JulianDate.prototype.equals = function(e) {
+ return JulianDate.equals(this, e);
+};
+JulianDate.prototype.equalsEpsilon = function(e, t) {
+ return JulianDate.equalsEpsilon(this, e, t);
+};
+JulianDate.prototype.toString = function() {
+ return JulianDate.toIso8601(this);
+};
+JulianDate.leapSeconds = [
+ new LeapSecond(new JulianDate(2441317, 43210, TimeStandard$1.TAI), 10),
+ // January 1, 1972 00:00:00 UTC
+ new LeapSecond(new JulianDate(2441499, 43211, TimeStandard$1.TAI), 11),
+ // July 1, 1972 00:00:00 UTC
+ new LeapSecond(new JulianDate(2441683, 43212, TimeStandard$1.TAI), 12),
+ // January 1, 1973 00:00:00 UTC
+ new LeapSecond(new JulianDate(2442048, 43213, TimeStandard$1.TAI), 13),
+ // January 1, 1974 00:00:00 UTC
+ new LeapSecond(new JulianDate(2442413, 43214, TimeStandard$1.TAI), 14),
+ // January 1, 1975 00:00:00 UTC
+ new LeapSecond(new JulianDate(2442778, 43215, TimeStandard$1.TAI), 15),
+ // January 1, 1976 00:00:00 UTC
+ new LeapSecond(new JulianDate(2443144, 43216, TimeStandard$1.TAI), 16),
+ // January 1, 1977 00:00:00 UTC
+ new LeapSecond(new JulianDate(2443509, 43217, TimeStandard$1.TAI), 17),
+ // January 1, 1978 00:00:00 UTC
+ new LeapSecond(new JulianDate(2443874, 43218, TimeStandard$1.TAI), 18),
+ // January 1, 1979 00:00:00 UTC
+ new LeapSecond(new JulianDate(2444239, 43219, TimeStandard$1.TAI), 19),
+ // January 1, 1980 00:00:00 UTC
+ new LeapSecond(new JulianDate(2444786, 43220, TimeStandard$1.TAI), 20),
+ // July 1, 1981 00:00:00 UTC
+ new LeapSecond(new JulianDate(2445151, 43221, TimeStandard$1.TAI), 21),
+ // July 1, 1982 00:00:00 UTC
+ new LeapSecond(new JulianDate(2445516, 43222, TimeStandard$1.TAI), 22),
+ // July 1, 1983 00:00:00 UTC
+ new LeapSecond(new JulianDate(2446247, 43223, TimeStandard$1.TAI), 23),
+ // July 1, 1985 00:00:00 UTC
+ new LeapSecond(new JulianDate(2447161, 43224, TimeStandard$1.TAI), 24),
+ // January 1, 1988 00:00:00 UTC
+ new LeapSecond(new JulianDate(2447892, 43225, TimeStandard$1.TAI), 25),
+ // January 1, 1990 00:00:00 UTC
+ new LeapSecond(new JulianDate(2448257, 43226, TimeStandard$1.TAI), 26),
+ // January 1, 1991 00:00:00 UTC
+ new LeapSecond(new JulianDate(2448804, 43227, TimeStandard$1.TAI), 27),
+ // July 1, 1992 00:00:00 UTC
+ new LeapSecond(new JulianDate(2449169, 43228, TimeStandard$1.TAI), 28),
+ // July 1, 1993 00:00:00 UTC
+ new LeapSecond(new JulianDate(2449534, 43229, TimeStandard$1.TAI), 29),
+ // July 1, 1994 00:00:00 UTC
+ new LeapSecond(new JulianDate(2450083, 43230, TimeStandard$1.TAI), 30),
+ // January 1, 1996 00:00:00 UTC
+ new LeapSecond(new JulianDate(2450630, 43231, TimeStandard$1.TAI), 31),
+ // July 1, 1997 00:00:00 UTC
+ new LeapSecond(new JulianDate(2451179, 43232, TimeStandard$1.TAI), 32),
+ // January 1, 1999 00:00:00 UTC
+ new LeapSecond(new JulianDate(2453736, 43233, TimeStandard$1.TAI), 33),
+ // January 1, 2006 00:00:00 UTC
+ new LeapSecond(new JulianDate(2454832, 43234, TimeStandard$1.TAI), 34),
+ // January 1, 2009 00:00:00 UTC
+ new LeapSecond(new JulianDate(2456109, 43235, TimeStandard$1.TAI), 35),
+ // July 1, 2012 00:00:00 UTC
+ new LeapSecond(new JulianDate(2457204, 43236, TimeStandard$1.TAI), 36),
+ // July 1, 2015 00:00:00 UTC
+ new LeapSecond(new JulianDate(2457754, 43237, TimeStandard$1.TAI), 37)
+ // January 1, 2017 00:00:00 UTC
+];
+var URI = { exports: {} }, punycode = { exports: {} };
+/*! https://mths.be/punycode v1.4.0 by @mathias */
+punycode.exports;
+var hasRequiredPunycode;
+function requirePunycode() {
+ return hasRequiredPunycode || (hasRequiredPunycode = 1, function(e, t) {
+ (function(n) {
+ var i = t && !t.nodeType && t, r = e && !e.nodeType && e, o = typeof commonjsGlobal == "object" && commonjsGlobal;
+ (o.global === o || o.window === o || o.self === o) && (n = o);
+ var s, c = 2147483647, l = 36, d = 1, f = 26, h = 38, p = 700, m = 72, _ = 128, y = "-", C = /^xn--/, T = /[^\x20-\x7E]/, x = /[\x2E\u3002\uFF0E\uFF61]/g, b = {
+ overflow: "Overflow: input needs wider integers to process",
+ "not-basic": "Illegal input >= 0x80 (not a basic code point)",
+ "invalid-input": "Invalid input"
+ }, S = l - d, E = Math.floor, A = String.fromCharCode, D;
+ function P(U) {
+ throw new RangeError(b[U]);
+ }
+ function I(U, k) {
+ for (var $ = U.length, G = []; $--; )
+ G[$] = k(U[$]);
+ return G;
+ }
+ function M(U, k) {
+ var $ = U.split("@"), G = "";
+ $.length > 1 && (G = $[0] + "@", U = $[1]), U = U.replace(x, ".");
+ var q = U.split("."), z = I(q, k).join(".");
+ return G + z;
+ }
+ function R(U) {
+ for (var k = [], $ = 0, G = U.length, q, z; $ < G; )
+ q = U.charCodeAt($++), q >= 55296 && q <= 56319 && $ < G ? (z = U.charCodeAt($++), (z & 64512) == 56320 ? k.push(((q & 1023) << 10) + (z & 1023) + 65536) : (k.push(q), $--)) : k.push(q);
+ return k;
+ }
+ function L(U) {
+ return I(U, function(k) {
+ var $ = "";
+ return k > 65535 && (k -= 65536, $ += A(k >>> 10 & 1023 | 55296), k = 56320 | k & 1023), $ += A(k), $;
+ }).join("");
+ }
+ function g(U) {
+ return U - 48 < 10 ? U - 22 : U - 65 < 26 ? U - 65 : U - 97 < 26 ? U - 97 : l;
+ }
+ function w(U, k) {
+ return U + 22 + 75 * (U < 26) - ((k != 0) << 5);
+ }
+ function O(U, k, $) {
+ var G = 0;
+ for (U = $ ? E(U / p) : U >> 1, U += E(U / k); U > S * f >> 1; G += l)
+ U = E(U / S);
+ return E(G + (S + 1) * U / (U + h));
+ }
+ function N(U) {
+ var k = [], $ = U.length, G, q = 0, z = _, H = m, Q, ne, K, Z, ee, oe, X, fe, de;
+ for (Q = U.lastIndexOf(y), Q < 0 && (Q = 0), ne = 0; ne < Q; ++ne)
+ U.charCodeAt(ne) >= 128 && P("not-basic"), k.push(U.charCodeAt(ne));
+ for (K = Q > 0 ? Q + 1 : 0; K < $; ) {
+ for (Z = q, ee = 1, oe = l; K >= $ && P("invalid-input"), X = g(U.charCodeAt(K++)), (X >= l || X > E((c - q) / ee)) && P("overflow"), q += X * ee, fe = oe <= H ? d : oe >= H + f ? f : oe - H, !(X < fe); oe += l)
+ de = l - fe, ee > E(c / de) && P("overflow"), ee *= de;
+ G = k.length + 1, H = O(q - Z, G, Z == 0), E(q / G) > c - z && P("overflow"), z += E(q / G), q %= G, k.splice(q++, 0, z);
+ }
+ return L(k);
+ }
+ function F(U) {
+ var k, $, G, q, z, H, Q, ne, K, Z, ee, oe = [], X, fe, de, ce;
+ for (U = R(U), X = U.length, k = _, $ = 0, z = m, H = 0; H < X; ++H)
+ ee = U[H], ee < 128 && oe.push(A(ee));
+ for (G = q = oe.length, q && oe.push(y); G < X; ) {
+ for (Q = c, H = 0; H < X; ++H)
+ ee = U[H], ee >= k && ee < Q && (Q = ee);
+ for (fe = G + 1, Q - k > E((c - $) / fe) && P("overflow"), $ += (Q - k) * fe, k = Q, H = 0; H < X; ++H)
+ if (ee = U[H], ee < k && ++$ > c && P("overflow"), ee == k) {
+ for (ne = $, K = l; Z = K <= z ? d : K >= z + f ? f : K - z, !(ne < Z); K += l)
+ ce = ne - Z, de = l - Z, oe.push(
+ A(w(Z + ce % de, 0))
+ ), ne = E(ce / de);
+ oe.push(A(w(ne, 0))), z = O($, fe, G == q), $ = 0, ++G;
+ }
+ ++$, ++k;
+ }
+ return oe.join("");
+ }
+ function B(U) {
+ return M(U, function(k) {
+ return C.test(k) ? N(k.slice(4).toLowerCase()) : k;
+ });
+ }
+ function V(U) {
+ return M(U, function(k) {
+ return T.test(k) ? "xn--" + F(k) : k;
+ });
+ }
+ if (s = {
+ /**
+ * A string representing the current Punycode.js version number.
+ * @memberOf punycode
+ * @type String
+ */
+ version: "1.3.2",
+ /**
+ * An object of methods to convert from JavaScript's internal character
+ * representation (UCS-2) to Unicode code points, and back.
+ * @see undefined is allowed, always try to provide a bounding volume to
+ * allow the tightest possible near and far planes to be computed for the scene, and
+ * minimize the number of frustums needed.
+ * true, the renderer frustum and horizon culls the command based on its {@link DrawCommand#boundingVolume}.
+ * If the command was already culled, set this to false for a performance improvement.
+ *
+ * @memberof DrawCommand.prototype
+ * @type {boolean}
+ * @default true
+ */
+ cull: {
+ get: function() {
+ return hasFlag(this, Flags.CULL);
+ },
+ set: function(e) {
+ hasFlag(this, Flags.CULL) !== e && (setFlag(this, Flags.CULL, e), this.dirty = !0);
+ }
+ },
+ /**
+ * When true, the horizon culls the command based on its {@link DrawCommand#boundingVolume}.
+ * {@link DrawCommand#cull} must also be true in order for the command to be culled.
+ *
+ * @memberof DrawCommand.prototype
+ * @type {boolean}
+ * @default true
+ */
+ occlude: {
+ get: function() {
+ return hasFlag(this, Flags.OCCLUDE);
+ },
+ set: function(e) {
+ hasFlag(this, Flags.OCCLUDE) !== e && (setFlag(this, Flags.OCCLUDE, e), this.dirty = !0);
+ }
+ },
+ /**
+ * The transformation from the geometry in model space to world space.
+ * undefined, the geometry is assumed to be defined in world space.
+ * false.
+ *
+ * @memberof DrawCommand.prototype
+ * @type {boolean}
+ * @default false
+ */
+ executeInClosestFrustum: {
+ get: function() {
+ return hasFlag(this, Flags.EXECUTE_IN_CLOSEST_FRUSTUM);
+ },
+ set: function(e) {
+ hasFlag(this, Flags.EXECUTE_IN_CLOSEST_FRUSTUM) !== e && (setFlag(this, Flags.EXECUTE_IN_CLOSEST_FRUSTUM, e), this.dirty = !0);
+ }
+ },
+ /**
+ * The object who created this command. This is useful for debugging command
+ * execution; it allows us to see who created a command when we only have a
+ * reference to the command, and can be used to selectively execute commands
+ * with {@link Scene#debugCommandFilter}.
+ *
+ * @memberof DrawCommand.prototype
+ * @type {object}
+ * @default undefined
+ *
+ * @see Scene#debugCommandFilter
+ */
+ owner: {
+ get: function() {
+ return this._owner;
+ },
+ set: function(e) {
+ this._owner !== e && (this._owner = e, this.dirty = !0);
+ }
+ },
+ /**
+ * This property is for debugging only; it is not for production use nor is it optimized.
+ * undefined, the command will only draw depth
+ * during the pick pass.
+ *
+ * @memberof DrawCommand.prototype
+ * @type {string}
+ * @default undefined
+ */
+ pickId: {
+ get: function() {
+ return this._pickId;
+ },
+ set: function(e) {
+ this._pickId !== e && (this._pickId = e, this.dirty = !0);
+ }
+ },
+ /**
+ * Whether this command should be executed in the pick pass only.
+ *
+ * @memberof DrawCommand.prototype
+ * @type {boolean}
+ * @default false
+ */
+ pickOnly: {
+ get: function() {
+ return hasFlag(this, Flags.PICK_ONLY);
+ },
+ set: function(e) {
+ hasFlag(this, Flags.PICK_ONLY) !== e && (setFlag(this, Flags.PICK_ONLY, e), this.dirty = !0);
+ }
+ },
+ /**
+ * Whether this command should be derived to draw depth for classification of translucent primitives.
+ *
+ * @memberof DrawCommand.prototype
+ * @type {boolean}
+ * @default false
+ */
+ depthForTranslucentClassification: {
+ get: function() {
+ return hasFlag(this, Flags.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION);
+ },
+ set: function(e) {
+ hasFlag(this, Flags.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION) !== e && (setFlag(this, Flags.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION, e), this.dirty = !0);
+ }
+ }
+});
+DrawCommand.shallowClone = function(e, t) {
+ if (defined(e))
+ return defined(t) || (t = new DrawCommand()), t._boundingVolume = e._boundingVolume, t._orientedBoundingBox = e._orientedBoundingBox, t._modelMatrix = e._modelMatrix, t._primitiveType = e._primitiveType, t._vertexArray = e._vertexArray, t._count = e._count, t._offset = e._offset, t._instanceCount = e._instanceCount, t._shaderProgram = e._shaderProgram, t._uniformMap = e._uniformMap, t._renderState = e._renderState, t._framebuffer = e._framebuffer, t._pass = e._pass, t._owner = e._owner, t._debugOverlappingFrustums = e._debugOverlappingFrustums, t._pickId = e._pickId, t._flags = e._flags, t.dirty = !0, t.lastDirtyTime = 0, t;
+};
+DrawCommand.prototype.execute = function(e, t) {
+ e.draw(this, t);
+};
+const PixelDatatype = {
+ UNSIGNED_BYTE: WebGLConstants$1.UNSIGNED_BYTE,
+ UNSIGNED_SHORT: WebGLConstants$1.UNSIGNED_SHORT,
+ UNSIGNED_INT: WebGLConstants$1.UNSIGNED_INT,
+ FLOAT: WebGLConstants$1.FLOAT,
+ HALF_FLOAT: WebGLConstants$1.HALF_FLOAT_OES,
+ UNSIGNED_INT_24_8: WebGLConstants$1.UNSIGNED_INT_24_8,
+ UNSIGNED_SHORT_4_4_4_4: WebGLConstants$1.UNSIGNED_SHORT_4_4_4_4,
+ UNSIGNED_SHORT_5_5_5_1: WebGLConstants$1.UNSIGNED_SHORT_5_5_5_1,
+ UNSIGNED_SHORT_5_6_5: WebGLConstants$1.UNSIGNED_SHORT_5_6_5
+};
+PixelDatatype.toWebGLConstant = function(e, t) {
+ switch (e) {
+ case PixelDatatype.UNSIGNED_BYTE:
+ return WebGLConstants$1.UNSIGNED_BYTE;
+ case PixelDatatype.UNSIGNED_SHORT:
+ return WebGLConstants$1.UNSIGNED_SHORT;
+ case PixelDatatype.UNSIGNED_INT:
+ return WebGLConstants$1.UNSIGNED_INT;
+ case PixelDatatype.FLOAT:
+ return WebGLConstants$1.FLOAT;
+ case PixelDatatype.HALF_FLOAT:
+ return t.webgl2 ? WebGLConstants$1.HALF_FLOAT : WebGLConstants$1.HALF_FLOAT_OES;
+ case PixelDatatype.UNSIGNED_INT_24_8:
+ return WebGLConstants$1.UNSIGNED_INT_24_8;
+ case PixelDatatype.UNSIGNED_SHORT_4_4_4_4:
+ return WebGLConstants$1.UNSIGNED_SHORT_4_4_4_4;
+ case PixelDatatype.UNSIGNED_SHORT_5_5_5_1:
+ return WebGLConstants$1.UNSIGNED_SHORT_5_5_5_1;
+ case PixelDatatype.UNSIGNED_SHORT_5_6_5:
+ return PixelDatatype.UNSIGNED_SHORT_5_6_5;
+ }
+};
+PixelDatatype.isPacked = function(e) {
+ return e === PixelDatatype.UNSIGNED_INT_24_8 || e === PixelDatatype.UNSIGNED_SHORT_4_4_4_4 || e === PixelDatatype.UNSIGNED_SHORT_5_5_5_1 || e === PixelDatatype.UNSIGNED_SHORT_5_6_5;
+};
+PixelDatatype.sizeInBytes = function(e) {
+ switch (e) {
+ case PixelDatatype.UNSIGNED_BYTE:
+ return 1;
+ case PixelDatatype.UNSIGNED_SHORT:
+ case PixelDatatype.UNSIGNED_SHORT_4_4_4_4:
+ case PixelDatatype.UNSIGNED_SHORT_5_5_5_1:
+ case PixelDatatype.UNSIGNED_SHORT_5_6_5:
+ case PixelDatatype.HALF_FLOAT:
+ return 2;
+ case PixelDatatype.UNSIGNED_INT:
+ case PixelDatatype.FLOAT:
+ case PixelDatatype.UNSIGNED_INT_24_8:
+ return 4;
+ }
+};
+PixelDatatype.validate = function(e) {
+ return e === PixelDatatype.UNSIGNED_BYTE || e === PixelDatatype.UNSIGNED_SHORT || e === PixelDatatype.UNSIGNED_INT || e === PixelDatatype.FLOAT || e === PixelDatatype.HALF_FLOAT || e === PixelDatatype.UNSIGNED_INT_24_8 || e === PixelDatatype.UNSIGNED_SHORT_4_4_4_4 || e === PixelDatatype.UNSIGNED_SHORT_5_5_5_1 || e === PixelDatatype.UNSIGNED_SHORT_5_6_5;
+};
+PixelDatatype.getTypedArrayConstructor = function(e) {
+ const t = PixelDatatype.sizeInBytes(e);
+ return t === Uint8Array.BYTES_PER_ELEMENT ? Uint8Array : t === Uint16Array.BYTES_PER_ELEMENT ? Uint16Array : t === Float32Array.BYTES_PER_ELEMENT && e === PixelDatatype.FLOAT ? Float32Array : Uint32Array;
+};
+const PixelDatatype$1 = Object.freeze(PixelDatatype), PixelFormat = {
+ /**
+ * A pixel format containing a depth value.
+ *
+ * @type {number}
+ * @constant
+ */
+ DEPTH_COMPONENT: WebGLConstants$1.DEPTH_COMPONENT,
+ /**
+ * A pixel format containing a depth and stencil value, most often used with {@link PixelDatatype.UNSIGNED_INT_24_8}.
+ *
+ * @type {number}
+ * @constant
+ */
+ DEPTH_STENCIL: WebGLConstants$1.DEPTH_STENCIL,
+ /**
+ * A pixel format containing an alpha channel.
+ *
+ * @type {number}
+ * @constant
+ */
+ ALPHA: WebGLConstants$1.ALPHA,
+ /**
+ * A pixel format containing a red channel
+ *
+ * @type {number}
+ * @constant
+ */
+ RED: WebGLConstants$1.RED,
+ /**
+ * A pixel format containing red and green channels.
+ *
+ * @type {number}
+ * @constant
+ */
+ RG: WebGLConstants$1.RG,
+ /**
+ * A pixel format containing red, green, and blue channels.
+ *
+ * @type {number}
+ * @constant
+ */
+ RGB: WebGLConstants$1.RGB,
+ /**
+ * A pixel format containing red, green, blue, and alpha channels.
+ *
+ * @type {number}
+ * @constant
+ */
+ RGBA: WebGLConstants$1.RGBA,
+ /**
+ * A pixel format containing a luminance (intensity) channel.
+ *
+ * @type {number}
+ * @constant
+ */
+ LUMINANCE: WebGLConstants$1.LUMINANCE,
+ /**
+ * A pixel format containing luminance (intensity) and alpha channels.
+ *
+ * @type {number}
+ * @constant
+ */
+ LUMINANCE_ALPHA: WebGLConstants$1.LUMINANCE_ALPHA,
+ /**
+ * A pixel format containing red, green, and blue channels that is DXT1 compressed.
+ *
+ * @type {number}
+ * @constant
+ */
+ RGB_DXT1: WebGLConstants$1.COMPRESSED_RGB_S3TC_DXT1_EXT,
+ /**
+ * A pixel format containing red, green, blue, and alpha channels that is DXT1 compressed.
+ *
+ * @type {number}
+ * @constant
+ */
+ RGBA_DXT1: WebGLConstants$1.COMPRESSED_RGBA_S3TC_DXT1_EXT,
+ /**
+ * A pixel format containing red, green, blue, and alpha channels that is DXT3 compressed.
+ *
+ * @type {number}
+ * @constant
+ */
+ RGBA_DXT3: WebGLConstants$1.COMPRESSED_RGBA_S3TC_DXT3_EXT,
+ /**
+ * A pixel format containing red, green, blue, and alpha channels that is DXT5 compressed.
+ *
+ * @type {number}
+ * @constant
+ */
+ RGBA_DXT5: WebGLConstants$1.COMPRESSED_RGBA_S3TC_DXT5_EXT,
+ /**
+ * A pixel format containing red, green, and blue channels that is PVR 4bpp compressed.
+ *
+ * @type {number}
+ * @constant
+ */
+ RGB_PVRTC_4BPPV1: WebGLConstants$1.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,
+ /**
+ * A pixel format containing red, green, and blue channels that is PVR 2bpp compressed.
+ *
+ * @type {number}
+ * @constant
+ */
+ RGB_PVRTC_2BPPV1: WebGLConstants$1.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,
+ /**
+ * A pixel format containing red, green, blue, and alpha channels that is PVR 4bpp compressed.
+ *
+ * @type {number}
+ * @constant
+ */
+ RGBA_PVRTC_4BPPV1: WebGLConstants$1.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,
+ /**
+ * A pixel format containing red, green, blue, and alpha channels that is PVR 2bpp compressed.
+ *
+ * @type {number}
+ * @constant
+ */
+ RGBA_PVRTC_2BPPV1: WebGLConstants$1.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,
+ /**
+ * A pixel format containing red, green, blue, and alpha channels that is ASTC compressed.
+ *
+ * @type {number}
+ * @constant
+ */
+ RGBA_ASTC: WebGLConstants$1.COMPRESSED_RGBA_ASTC_4x4_WEBGL,
+ /**
+ * A pixel format containing red, green, and blue channels that is ETC1 compressed.
+ *
+ * @type {number}
+ * @constant
+ */
+ RGB_ETC1: WebGLConstants$1.COMPRESSED_RGB_ETC1_WEBGL,
+ /**
+ * A pixel format containing red, green, and blue channels that is ETC2 compressed.
+ *
+ * @type {number}
+ * @constant
+ */
+ RGB8_ETC2: WebGLConstants$1.COMPRESSED_RGB8_ETC2,
+ /**
+ * A pixel format containing red, green, blue, and alpha channels that is ETC2 compressed.
+ *
+ * @type {number}
+ * @constant
+ */
+ RGBA8_ETC2_EAC: WebGLConstants$1.COMPRESSED_RGBA8_ETC2_EAC,
+ /**
+ * A pixel format containing red, green, blue, and alpha channels that is BC7 compressed.
+ *
+ * @type {number}
+ * @constant
+ */
+ RGBA_BC7: WebGLConstants$1.COMPRESSED_RGBA_BPTC_UNORM
+};
+PixelFormat.componentsLength = function(e) {
+ switch (e) {
+ case PixelFormat.RGB:
+ return 3;
+ case PixelFormat.RGBA:
+ return 4;
+ case PixelFormat.LUMINANCE_ALPHA:
+ case PixelFormat.RG:
+ return 2;
+ case PixelFormat.ALPHA:
+ case PixelFormat.RED:
+ case PixelFormat.LUMINANCE:
+ return 1;
+ default:
+ return 1;
+ }
+};
+PixelFormat.validate = function(e) {
+ return e === PixelFormat.DEPTH_COMPONENT || e === PixelFormat.DEPTH_STENCIL || e === PixelFormat.ALPHA || e === PixelFormat.RED || e === PixelFormat.RG || e === PixelFormat.RGB || e === PixelFormat.RGBA || e === PixelFormat.LUMINANCE || e === PixelFormat.LUMINANCE_ALPHA || e === PixelFormat.RGB_DXT1 || e === PixelFormat.RGBA_DXT1 || e === PixelFormat.RGBA_DXT3 || e === PixelFormat.RGBA_DXT5 || e === PixelFormat.RGB_PVRTC_4BPPV1 || e === PixelFormat.RGB_PVRTC_2BPPV1 || e === PixelFormat.RGBA_PVRTC_4BPPV1 || e === PixelFormat.RGBA_PVRTC_2BPPV1 || e === PixelFormat.RGBA_ASTC || e === PixelFormat.RGB_ETC1 || e === PixelFormat.RGB8_ETC2 || e === PixelFormat.RGBA8_ETC2_EAC || e === PixelFormat.RGBA_BC7;
+};
+PixelFormat.isColorFormat = function(e) {
+ return e === PixelFormat.RED || e === PixelFormat.ALPHA || e === PixelFormat.RGB || e === PixelFormat.RGBA || e === PixelFormat.LUMINANCE || e === PixelFormat.LUMINANCE_ALPHA;
+};
+PixelFormat.isDepthFormat = function(e) {
+ return e === PixelFormat.DEPTH_COMPONENT || e === PixelFormat.DEPTH_STENCIL;
+};
+PixelFormat.isCompressedFormat = function(e) {
+ return e === PixelFormat.RGB_DXT1 || e === PixelFormat.RGBA_DXT1 || e === PixelFormat.RGBA_DXT3 || e === PixelFormat.RGBA_DXT5 || e === PixelFormat.RGB_PVRTC_4BPPV1 || e === PixelFormat.RGB_PVRTC_2BPPV1 || e === PixelFormat.RGBA_PVRTC_4BPPV1 || e === PixelFormat.RGBA_PVRTC_2BPPV1 || e === PixelFormat.RGBA_ASTC || e === PixelFormat.RGB_ETC1 || e === PixelFormat.RGB8_ETC2 || e === PixelFormat.RGBA8_ETC2_EAC || e === PixelFormat.RGBA_BC7;
+};
+PixelFormat.isDXTFormat = function(e) {
+ return e === PixelFormat.RGB_DXT1 || e === PixelFormat.RGBA_DXT1 || e === PixelFormat.RGBA_DXT3 || e === PixelFormat.RGBA_DXT5;
+};
+PixelFormat.isPVRTCFormat = function(e) {
+ return e === PixelFormat.RGB_PVRTC_4BPPV1 || e === PixelFormat.RGB_PVRTC_2BPPV1 || e === PixelFormat.RGBA_PVRTC_4BPPV1 || e === PixelFormat.RGBA_PVRTC_2BPPV1;
+};
+PixelFormat.isASTCFormat = function(e) {
+ return e === PixelFormat.RGBA_ASTC;
+};
+PixelFormat.isETC1Format = function(e) {
+ return e === PixelFormat.RGB_ETC1;
+};
+PixelFormat.isETC2Format = function(e) {
+ return e === PixelFormat.RGB8_ETC2 || e === PixelFormat.RGBA8_ETC2_EAC;
+};
+PixelFormat.isBC7Format = function(e) {
+ return e === PixelFormat.RGBA_BC7;
+};
+PixelFormat.compressedTextureSizeInBytes = function(e, t, n) {
+ switch (e) {
+ case PixelFormat.RGB_DXT1:
+ case PixelFormat.RGBA_DXT1:
+ case PixelFormat.RGB_ETC1:
+ case PixelFormat.RGB8_ETC2:
+ return Math.floor((t + 3) / 4) * Math.floor((n + 3) / 4) * 8;
+ case PixelFormat.RGBA_DXT3:
+ case PixelFormat.RGBA_DXT5:
+ case PixelFormat.RGBA_ASTC:
+ case PixelFormat.RGBA8_ETC2_EAC:
+ return Math.floor((t + 3) / 4) * Math.floor((n + 3) / 4) * 16;
+ case PixelFormat.RGB_PVRTC_4BPPV1:
+ case PixelFormat.RGBA_PVRTC_4BPPV1:
+ return Math.floor((Math.max(t, 8) * Math.max(n, 8) * 4 + 7) / 8);
+ case PixelFormat.RGB_PVRTC_2BPPV1:
+ case PixelFormat.RGBA_PVRTC_2BPPV1:
+ return Math.floor(
+ (Math.max(t, 16) * Math.max(n, 8) * 2 + 7) / 8
+ );
+ case PixelFormat.RGBA_BC7:
+ return Math.ceil(t / 4) * Math.ceil(n / 4) * 16;
+ default:
+ return 0;
+ }
+};
+PixelFormat.textureSizeInBytes = function(e, t, n, i) {
+ let r = PixelFormat.componentsLength(e);
+ return PixelDatatype$1.isPacked(t) && (r = 1), r * PixelDatatype$1.sizeInBytes(t) * n * i;
+};
+PixelFormat.alignmentInBytes = function(e, t, n) {
+ const i = PixelFormat.textureSizeInBytes(e, t, n, 1) % 4;
+ return i === 0 ? 4 : i === 2 ? 2 : 1;
+};
+PixelFormat.createTypedArray = function(e, t, n, i) {
+ const r = PixelDatatype$1.getTypedArrayConstructor(t), o = PixelFormat.componentsLength(e) * n * i;
+ return new r(o);
+};
+PixelFormat.flipY = function(e, t, n, i, r) {
+ if (r === 1)
+ return e;
+ const o = PixelFormat.createTypedArray(
+ t,
+ n,
+ i,
+ r
+ ), s = PixelFormat.componentsLength(t), c = i * s;
+ for (let l = 0; l < r; ++l) {
+ const d = l * i * s, f = (r - l - 1) * i * s;
+ for (let h = 0; h < c; ++h)
+ o[f + h] = e[d + h];
+ }
+ return o;
+};
+PixelFormat.toInternalFormat = function(e, t, n) {
+ if (!n.webgl2)
+ return e;
+ if (e === PixelFormat.DEPTH_STENCIL)
+ return WebGLConstants$1.DEPTH24_STENCIL8;
+ if (e === PixelFormat.DEPTH_COMPONENT) {
+ if (t === PixelDatatype$1.UNSIGNED_SHORT)
+ return WebGLConstants$1.DEPTH_COMPONENT16;
+ if (t === PixelDatatype$1.UNSIGNED_INT)
+ return WebGLConstants$1.DEPTH_COMPONENT24;
+ }
+ if (t === PixelDatatype$1.FLOAT)
+ switch (e) {
+ case PixelFormat.RGBA:
+ return WebGLConstants$1.RGBA32F;
+ case PixelFormat.RGB:
+ return WebGLConstants$1.RGB32F;
+ case PixelFormat.RG:
+ return WebGLConstants$1.RG32F;
+ case PixelFormat.RED:
+ return WebGLConstants$1.R32F;
+ }
+ if (t === PixelDatatype$1.HALF_FLOAT)
+ switch (e) {
+ case PixelFormat.RGBA:
+ return WebGLConstants$1.RGBA16F;
+ case PixelFormat.RGB:
+ return WebGLConstants$1.RGB16F;
+ case PixelFormat.RG:
+ return WebGLConstants$1.RG16F;
+ case PixelFormat.RED:
+ return WebGLConstants$1.R16F;
+ }
+ return e;
+};
+const PixelFormat$1 = Object.freeze(PixelFormat), ContextLimits = {
+ _maximumCombinedTextureImageUnits: 0,
+ _maximumCubeMapSize: 0,
+ _maximumFragmentUniformVectors: 0,
+ _maximumTextureImageUnits: 0,
+ _maximumRenderbufferSize: 0,
+ _maximumTextureSize: 0,
+ _maximumVaryingVectors: 0,
+ _maximumVertexAttributes: 0,
+ _maximumVertexTextureImageUnits: 0,
+ _maximumVertexUniformVectors: 0,
+ _minimumAliasedLineWidth: 0,
+ _maximumAliasedLineWidth: 0,
+ _minimumAliasedPointSize: 0,
+ _maximumAliasedPointSize: 0,
+ _maximumViewportWidth: 0,
+ _maximumViewportHeight: 0,
+ _maximumTextureFilterAnisotropy: 0,
+ _maximumDrawBuffers: 0,
+ _maximumColorAttachments: 0,
+ _maximumSamples: 0,
+ _highpFloatSupported: !1,
+ _highpIntSupported: !1
+};
+Object.defineProperties(ContextLimits, {
+ /**
+ * The maximum number of texture units that can be used from the vertex and fragment
+ * shader with this WebGL implementation. The minimum is eight. If both shaders access the
+ * same texture unit, this counts as two texture units.
+ * @memberof ContextLimits
+ * @type {number}
+ * @see {@link https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml|glGet} with MAX_COMBINED_TEXTURE_IMAGE_UNITS.
+ */
+ maximumCombinedTextureImageUnits: {
+ get: function() {
+ return ContextLimits._maximumCombinedTextureImageUnits;
+ }
+ },
+ /**
+ * The approximate maximum cube mape width and height supported by this WebGL implementation.
+ * The minimum is 16, but most desktop and laptop implementations will support much larger sizes like 8,192.
+ * @memberof ContextLimits
+ * @type {number}
+ * @see {@link https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml|glGet} with MAX_CUBE_MAP_TEXTURE_SIZE.
+ */
+ maximumCubeMapSize: {
+ get: function() {
+ return ContextLimits._maximumCubeMapSize;
+ }
+ },
+ /**
+ * The maximum number of vec4, ivec4, and bvec4
+ * uniforms that can be used by a fragment shader with this WebGL implementation. The minimum is 16.
+ * @memberof ContextLimits
+ * @type {number}
+ * @see {@link https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml|glGet} with MAX_FRAGMENT_UNIFORM_VECTORS.
+ */
+ maximumFragmentUniformVectors: {
+ get: function() {
+ return ContextLimits._maximumFragmentUniformVectors;
+ }
+ },
+ /**
+ * The maximum number of texture units that can be used from the fragment shader with this WebGL implementation. The minimum is eight.
+ * @memberof ContextLimits
+ * @type {number}
+ * @see {@link https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml|glGet} with MAX_TEXTURE_IMAGE_UNITS.
+ */
+ maximumTextureImageUnits: {
+ get: function() {
+ return ContextLimits._maximumTextureImageUnits;
+ }
+ },
+ /**
+ * The maximum renderbuffer width and height supported by this WebGL implementation.
+ * The minimum is 16, but most desktop and laptop implementations will support much larger sizes like 8,192.
+ * @memberof ContextLimits
+ * @type {number}
+ * @see {@link https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml|glGet} with MAX_RENDERBUFFER_SIZE.
+ */
+ maximumRenderbufferSize: {
+ get: function() {
+ return ContextLimits._maximumRenderbufferSize;
+ }
+ },
+ /**
+ * The approximate maximum texture width and height supported by this WebGL implementation.
+ * The minimum is 64, but most desktop and laptop implementations will support much larger sizes like 8,192.
+ * @memberof ContextLimits
+ * @type {number}
+ * @see {@link https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml|glGet} with MAX_TEXTURE_SIZE.
+ */
+ maximumTextureSize: {
+ get: function() {
+ return ContextLimits._maximumTextureSize;
+ }
+ },
+ /**
+ * The maximum number of vec4 varying variables supported by this WebGL implementation.
+ * The minimum is eight. Matrices and arrays count as multiple vec4s.
+ * @memberof ContextLimits
+ * @type {number}
+ * @see {@link https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml|glGet} with MAX_VARYING_VECTORS.
+ */
+ maximumVaryingVectors: {
+ get: function() {
+ return ContextLimits._maximumVaryingVectors;
+ }
+ },
+ /**
+ * The maximum number of vec4 vertex attributes supported by this WebGL implementation. The minimum is eight.
+ * @memberof ContextLimits
+ * @type {number}
+ * @see {@link https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml|glGet} with MAX_VERTEX_ATTRIBS.
+ */
+ maximumVertexAttributes: {
+ get: function() {
+ return ContextLimits._maximumVertexAttributes;
+ }
+ },
+ /**
+ * The maximum number of texture units that can be used from the vertex shader with this WebGL implementation.
+ * The minimum is zero, which means the GL does not support vertex texture fetch.
+ * @memberof ContextLimits
+ * @type {number}
+ * @see {@link https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml|glGet} with MAX_VERTEX_TEXTURE_IMAGE_UNITS.
+ */
+ maximumVertexTextureImageUnits: {
+ get: function() {
+ return ContextLimits._maximumVertexTextureImageUnits;
+ }
+ },
+ /**
+ * The maximum number of vec4, ivec4, and bvec4
+ * uniforms that can be used by a vertex shader with this WebGL implementation. The minimum is 16.
+ * @memberof ContextLimits
+ * @type {number}
+ * @see {@link https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml|glGet} with MAX_VERTEX_UNIFORM_VECTORS.
+ */
+ maximumVertexUniformVectors: {
+ get: function() {
+ return ContextLimits._maximumVertexUniformVectors;
+ }
+ },
+ /**
+ * The minimum aliased line width, in pixels, supported by this WebGL implementation. It will be at most one.
+ * @memberof ContextLimits
+ * @type {number}
+ * @see {@link https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml|glGet} with ALIASED_LINE_WIDTH_RANGE.
+ */
+ minimumAliasedLineWidth: {
+ get: function() {
+ return ContextLimits._minimumAliasedLineWidth;
+ }
+ },
+ /**
+ * The maximum aliased line width, in pixels, supported by this WebGL implementation. It will be at least one.
+ * @memberof ContextLimits
+ * @type {number}
+ * @see {@link https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml|glGet} with ALIASED_LINE_WIDTH_RANGE.
+ */
+ maximumAliasedLineWidth: {
+ get: function() {
+ return ContextLimits._maximumAliasedLineWidth;
+ }
+ },
+ /**
+ * The minimum aliased point size, in pixels, supported by this WebGL implementation. It will be at most one.
+ * @memberof ContextLimits
+ * @type {number}
+ * @see {@link https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml|glGet} with ALIASED_POINT_SIZE_RANGE.
+ */
+ minimumAliasedPointSize: {
+ get: function() {
+ return ContextLimits._minimumAliasedPointSize;
+ }
+ },
+ /**
+ * The maximum aliased point size, in pixels, supported by this WebGL implementation. It will be at least one.
+ * @memberof ContextLimits
+ * @type {number}
+ * @see {@link https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml|glGet} with ALIASED_POINT_SIZE_RANGE.
+ */
+ maximumAliasedPointSize: {
+ get: function() {
+ return ContextLimits._maximumAliasedPointSize;
+ }
+ },
+ /**
+ * The maximum supported width of the viewport. It will be at least as large as the visible width of the associated canvas.
+ * @memberof ContextLimits
+ * @type {number}
+ * @see {@link https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml|glGet} with MAX_VIEWPORT_DIMS.
+ */
+ maximumViewportWidth: {
+ get: function() {
+ return ContextLimits._maximumViewportWidth;
+ }
+ },
+ /**
+ * The maximum supported height of the viewport. It will be at least as large as the visible height of the associated canvas.
+ * @memberof ContextLimits
+ * @type {number}
+ * @see {@link https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml|glGet} with MAX_VIEWPORT_DIMS.
+ */
+ maximumViewportHeight: {
+ get: function() {
+ return ContextLimits._maximumViewportHeight;
+ }
+ },
+ /**
+ * The maximum degree of anisotropy for texture filtering
+ * @memberof ContextLimits
+ * @type {number}
+ */
+ maximumTextureFilterAnisotropy: {
+ get: function() {
+ return ContextLimits._maximumTextureFilterAnisotropy;
+ }
+ },
+ /**
+ * The maximum number of simultaneous outputs that may be written in a fragment shader.
+ * @memberof ContextLimits
+ * @type {number}
+ */
+ maximumDrawBuffers: {
+ get: function() {
+ return ContextLimits._maximumDrawBuffers;
+ }
+ },
+ /**
+ * The maximum number of color attachments supported.
+ * @memberof ContextLimits
+ * @type {number}
+ */
+ maximumColorAttachments: {
+ get: function() {
+ return ContextLimits._maximumColorAttachments;
+ }
+ },
+ /**
+ * The maximum number of samples supported for multisampling.
+ * @memberof ContextLimits
+ * @type {number}
+ */
+ maximumSamples: {
+ get: function() {
+ return ContextLimits._maximumSamples;
+ }
+ },
+ /**
+ * High precision float supported (highp) in fragment shaders.
+ * @memberof ContextLimits
+ * @type {boolean}
+ */
+ highpFloatSupported: {
+ get: function() {
+ return ContextLimits._highpFloatSupported;
+ }
+ },
+ /**
+ * High precision int supported (highp) in fragment shaders.
+ * @memberof ContextLimits
+ * @type {boolean}
+ */
+ highpIntSupported: {
+ get: function() {
+ return ContextLimits._highpIntSupported;
+ }
+ }
+});
+function attachTexture(e, t, n) {
+ const i = e._gl;
+ i.framebufferTexture2D(
+ i.FRAMEBUFFER,
+ t,
+ n._target,
+ n._texture,
+ 0
+ );
+}
+function attachRenderbuffer(e, t, n) {
+ const i = e._gl;
+ i.framebufferRenderbuffer(
+ i.FRAMEBUFFER,
+ t,
+ i.RENDERBUFFER,
+ n._getRenderbuffer()
+ );
+}
+function Framebuffer(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const n = e.context._gl;
+ ContextLimits.maximumColorAttachments, this._gl = n, this._framebuffer = n.createFramebuffer(), this._colorTextures = [], this._colorRenderbuffers = [], this._activeColorAttachments = [], this._depthTexture = void 0, this._depthRenderbuffer = void 0, this._stencilRenderbuffer = void 0, this._depthStencilTexture = void 0, this._depthStencilRenderbuffer = void 0, this.destroyAttachments = defaultValue(e.destroyAttachments, !0), defined(e.depthTexture) || defined(e.depthRenderbuffer), defined(e.depthStencilTexture) || defined(e.depthStencilRenderbuffer), this._bind();
+ let i, r, o, s, c;
+ if (defined(e.colorTextures)) {
+ const l = e.colorTextures;
+ for (s = this._colorTextures.length = this._activeColorAttachments.length = l.length, o = 0; o < s; ++o)
+ i = l[o], c = this._gl.COLOR_ATTACHMENT0 + o, attachTexture(this, c, i), this._activeColorAttachments[o] = c, this._colorTextures[o] = i;
+ }
+ if (defined(e.colorRenderbuffers)) {
+ const l = e.colorRenderbuffers;
+ for (s = this._colorRenderbuffers.length = this._activeColorAttachments.length = l.length, o = 0; o < s; ++o)
+ r = l[o], c = this._gl.COLOR_ATTACHMENT0 + o, attachRenderbuffer(this, c, r), this._activeColorAttachments[o] = c, this._colorRenderbuffers[o] = r;
+ }
+ defined(e.depthTexture) && (i = e.depthTexture, attachTexture(this, this._gl.DEPTH_ATTACHMENT, i), this._depthTexture = i), defined(e.depthRenderbuffer) && (r = e.depthRenderbuffer, attachRenderbuffer(this, this._gl.DEPTH_ATTACHMENT, r), this._depthRenderbuffer = r), defined(e.stencilRenderbuffer) && (r = e.stencilRenderbuffer, attachRenderbuffer(this, this._gl.STENCIL_ATTACHMENT, r), this._stencilRenderbuffer = r), defined(e.depthStencilTexture) && (i = e.depthStencilTexture, attachTexture(this, this._gl.DEPTH_STENCIL_ATTACHMENT, i), this._depthStencilTexture = i), defined(e.depthStencilRenderbuffer) && (r = e.depthStencilRenderbuffer, attachRenderbuffer(this, this._gl.DEPTH_STENCIL_ATTACHMENT, r), this._depthStencilRenderbuffer = r), this._unBind();
+}
+Object.defineProperties(Framebuffer.prototype, {
+ /**
+ * The status of the framebuffer. If the status is not WebGLConstants.FRAMEBUFFER_COMPLETE,
+ * a {@link DeveloperError} will be thrown when attempting to render to the framebuffer.
+ * @memberof Framebuffer.prototype
+ * @type {number}
+ */
+ status: {
+ get: function() {
+ this._bind();
+ const e = this._gl.checkFramebufferStatus(this._gl.FRAMEBUFFER);
+ return this._unBind(), e;
+ }
+ },
+ numberOfColorAttachments: {
+ get: function() {
+ return this._activeColorAttachments.length;
+ }
+ },
+ depthTexture: {
+ get: function() {
+ return this._depthTexture;
+ }
+ },
+ depthRenderbuffer: {
+ get: function() {
+ return this._depthRenderbuffer;
+ }
+ },
+ stencilRenderbuffer: {
+ get: function() {
+ return this._stencilRenderbuffer;
+ }
+ },
+ depthStencilTexture: {
+ get: function() {
+ return this._depthStencilTexture;
+ }
+ },
+ depthStencilRenderbuffer: {
+ get: function() {
+ return this._depthStencilRenderbuffer;
+ }
+ },
+ /**
+ * True if the framebuffer has a depth attachment. Depth attachments include
+ * depth and depth-stencil textures, and depth and depth-stencil renderbuffers. When
+ * rendering to a framebuffer, a depth attachment is required for the depth test to have effect.
+ * @memberof Framebuffer.prototype
+ * @type {boolean}
+ */
+ hasDepthAttachment: {
+ get: function() {
+ return !!(this.depthTexture || this.depthRenderbuffer || this.depthStencilTexture || this.depthStencilRenderbuffer);
+ }
+ }
+});
+Framebuffer.prototype._bind = function() {
+ const e = this._gl;
+ e.bindFramebuffer(e.FRAMEBUFFER, this._framebuffer);
+};
+Framebuffer.prototype._unBind = function() {
+ const e = this._gl;
+ e.bindFramebuffer(e.FRAMEBUFFER, null);
+};
+Framebuffer.prototype.bindDraw = function() {
+ const e = this._gl;
+ e.bindFramebuffer(e.DRAW_FRAMEBUFFER, this._framebuffer);
+};
+Framebuffer.prototype.bindRead = function() {
+ const e = this._gl;
+ e.bindFramebuffer(e.READ_FRAMEBUFFER, this._framebuffer);
+};
+Framebuffer.prototype._getActiveColorAttachments = function() {
+ return this._activeColorAttachments;
+};
+Framebuffer.prototype.getColorTexture = function(e) {
+ return this._colorTextures[e];
+};
+Framebuffer.prototype.getColorRenderbuffer = function(e) {
+ return this._colorRenderbuffers[e];
+};
+Framebuffer.prototype.isDestroyed = function() {
+ return !1;
+};
+Framebuffer.prototype.destroy = function() {
+ if (this.destroyAttachments) {
+ let e = 0;
+ const t = this._colorTextures;
+ let n = t.length;
+ for (; e < n; ++e) {
+ const r = t[e];
+ defined(r) && r.destroy();
+ }
+ const i = this._colorRenderbuffers;
+ for (n = i.length, e = 0; e < n; ++e) {
+ const r = i[e];
+ defined(r) && r.destroy();
+ }
+ this._depthTexture = this._depthTexture && this._depthTexture.destroy(), this._depthRenderbuffer = this._depthRenderbuffer && this._depthRenderbuffer.destroy(), this._stencilRenderbuffer = this._stencilRenderbuffer && this._stencilRenderbuffer.destroy(), this._depthStencilTexture = this._depthStencilTexture && this._depthStencilTexture.destroy(), this._depthStencilRenderbuffer = this._depthStencilRenderbuffer && this._depthStencilRenderbuffer.destroy();
+ }
+ return this._gl.deleteFramebuffer(this._framebuffer), destroyObject(this);
+};
+const WindingOrder = {
+ /**
+ * Vertices are in clockwise order.
+ *
+ * @type {number}
+ * @constant
+ */
+ CLOCKWISE: WebGLConstants$1.CW,
+ /**
+ * Vertices are in counter-clockwise order.
+ *
+ * @type {number}
+ * @constant
+ */
+ COUNTER_CLOCKWISE: WebGLConstants$1.CCW
+};
+WindingOrder.validate = function(e) {
+ return e === WindingOrder.CLOCKWISE || e === WindingOrder.COUNTER_CLOCKWISE;
+};
+const WindingOrder$1 = Object.freeze(WindingOrder);
+function freezeRenderState(e) {
+ if (typeof e != "object" || e === null)
+ return e;
+ let t;
+ const n = Object.keys(e);
+ for (let i = 0; i < n.length; i++)
+ t = n[i], e.hasOwnProperty(t) && t !== "_applyFunctions" && (e[t] = freezeRenderState(e[t]));
+ return Object.freeze(e);
+}
+function RenderState(e) {
+ const t = defaultValue(e, defaultValue.EMPTY_OBJECT), n = defaultValue(t.cull, defaultValue.EMPTY_OBJECT), i = defaultValue(
+ t.polygonOffset,
+ defaultValue.EMPTY_OBJECT
+ ), r = defaultValue(t.scissorTest, defaultValue.EMPTY_OBJECT), o = defaultValue(
+ r.rectangle,
+ defaultValue.EMPTY_OBJECT
+ ), s = defaultValue(t.depthRange, defaultValue.EMPTY_OBJECT), c = defaultValue(t.depthTest, defaultValue.EMPTY_OBJECT), l = defaultValue(t.colorMask, defaultValue.EMPTY_OBJECT), d = defaultValue(t.blending, defaultValue.EMPTY_OBJECT), f = defaultValue(d.color, defaultValue.EMPTY_OBJECT), h = defaultValue(t.stencilTest, defaultValue.EMPTY_OBJECT), p = defaultValue(
+ h.frontOperation,
+ defaultValue.EMPTY_OBJECT
+ ), m = defaultValue(
+ h.backOperation,
+ defaultValue.EMPTY_OBJECT
+ ), _ = defaultValue(
+ t.sampleCoverage,
+ defaultValue.EMPTY_OBJECT
+ ), y = t.viewport;
+ this.frontFace = defaultValue(t.frontFace, WindingOrder$1.COUNTER_CLOCKWISE), this.cull = {
+ enabled: defaultValue(n.enabled, !1),
+ face: defaultValue(n.face, WebGLConstants$1.BACK)
+ }, this.lineWidth = defaultValue(t.lineWidth, 1), this.polygonOffset = {
+ enabled: defaultValue(i.enabled, !1),
+ factor: defaultValue(i.factor, 0),
+ units: defaultValue(i.units, 0)
+ }, this.scissorTest = {
+ enabled: defaultValue(r.enabled, !1),
+ rectangle: BoundingRectangle.clone(o)
+ }, this.depthRange = {
+ near: defaultValue(s.near, 0),
+ far: defaultValue(s.far, 1)
+ }, this.depthTest = {
+ enabled: defaultValue(c.enabled, !1),
+ func: defaultValue(c.func, WebGLConstants$1.LESS)
+ // func, because function is a JavaScript keyword
+ }, this.colorMask = {
+ red: defaultValue(l.red, !0),
+ green: defaultValue(l.green, !0),
+ blue: defaultValue(l.blue, !0),
+ alpha: defaultValue(l.alpha, !0)
+ }, this.depthMask = defaultValue(t.depthMask, !0), this.stencilMask = defaultValue(t.stencilMask, -1), this.blending = {
+ enabled: defaultValue(d.enabled, !1),
+ color: new Color(
+ defaultValue(f.red, 0),
+ defaultValue(f.green, 0),
+ defaultValue(f.blue, 0),
+ defaultValue(f.alpha, 0)
+ ),
+ equationRgb: defaultValue(d.equationRgb, WebGLConstants$1.FUNC_ADD),
+ equationAlpha: defaultValue(
+ d.equationAlpha,
+ WebGLConstants$1.FUNC_ADD
+ ),
+ functionSourceRgb: defaultValue(
+ d.functionSourceRgb,
+ WebGLConstants$1.ONE
+ ),
+ functionSourceAlpha: defaultValue(
+ d.functionSourceAlpha,
+ WebGLConstants$1.ONE
+ ),
+ functionDestinationRgb: defaultValue(
+ d.functionDestinationRgb,
+ WebGLConstants$1.ZERO
+ ),
+ functionDestinationAlpha: defaultValue(
+ d.functionDestinationAlpha,
+ WebGLConstants$1.ZERO
+ )
+ }, this.stencilTest = {
+ enabled: defaultValue(h.enabled, !1),
+ frontFunction: defaultValue(
+ h.frontFunction,
+ WebGLConstants$1.ALWAYS
+ ),
+ backFunction: defaultValue(h.backFunction, WebGLConstants$1.ALWAYS),
+ reference: defaultValue(h.reference, 0),
+ mask: defaultValue(h.mask, -1),
+ frontOperation: {
+ fail: defaultValue(p.fail, WebGLConstants$1.KEEP),
+ zFail: defaultValue(p.zFail, WebGLConstants$1.KEEP),
+ zPass: defaultValue(p.zPass, WebGLConstants$1.KEEP)
+ },
+ backOperation: {
+ fail: defaultValue(m.fail, WebGLConstants$1.KEEP),
+ zFail: defaultValue(m.zFail, WebGLConstants$1.KEEP),
+ zPass: defaultValue(m.zPass, WebGLConstants$1.KEEP)
+ }
+ }, this.sampleCoverage = {
+ enabled: defaultValue(_.enabled, !1),
+ value: defaultValue(_.value, 1),
+ invert: defaultValue(_.invert, !1)
+ }, this.viewport = defined(y) ? new BoundingRectangle(
+ y.x,
+ y.y,
+ y.width,
+ y.height
+ ) : void 0, this.id = 0, this._applyFunctions = [];
+}
+let nextRenderStateId = 0, renderStateCache = {};
+RenderState.fromCache = function(e) {
+ const t = JSON.stringify(e);
+ let n = renderStateCache[t];
+ if (defined(n))
+ return ++n.referenceCount, n.state;
+ let i = new RenderState(e);
+ const r = JSON.stringify(i);
+ return n = renderStateCache[r], defined(n) || (i.id = nextRenderStateId++, n = {
+ referenceCount: 0,
+ state: i
+ }, renderStateCache[r] = n), ++n.referenceCount, renderStateCache[t] = {
+ referenceCount: 1,
+ state: n.state
+ }, n.state;
+};
+RenderState.removeFromCache = function(e) {
+ const t = new RenderState(e), n = JSON.stringify(t), i = renderStateCache[n], r = JSON.stringify(e), o = renderStateCache[r];
+ defined(o) && (--o.referenceCount, o.referenceCount === 0 && (delete renderStateCache[r], defined(i) && --i.referenceCount)), defined(i) && i.referenceCount === 0 && delete renderStateCache[n];
+};
+RenderState.getCache = function() {
+ return renderStateCache;
+};
+RenderState.clearCache = function() {
+ renderStateCache = {};
+};
+function enableOrDisable(e, t, n) {
+ n ? e.enable(t) : e.disable(t);
+}
+function applyFrontFace(e, t) {
+ e.frontFace(t.frontFace);
+}
+function applyCull(e, t) {
+ const n = t.cull, i = n.enabled;
+ enableOrDisable(e, e.CULL_FACE, i), i && e.cullFace(n.face);
+}
+function applyLineWidth(e, t) {
+ e.lineWidth(t.lineWidth);
+}
+function applyPolygonOffset(e, t) {
+ const n = t.polygonOffset, i = n.enabled;
+ enableOrDisable(e, e.POLYGON_OFFSET_FILL, i), i && e.polygonOffset(n.factor, n.units);
+}
+function applyScissorTest(e, t, n) {
+ const i = t.scissorTest, r = defined(n.scissorTest) ? n.scissorTest.enabled : i.enabled;
+ if (enableOrDisable(e, e.SCISSOR_TEST, r), r) {
+ const o = defined(n.scissorTest) ? n.scissorTest.rectangle : i.rectangle;
+ e.scissor(o.x, o.y, o.width, o.height);
+ }
+}
+function applyDepthRange(e, t) {
+ const n = t.depthRange;
+ e.depthRange(n.near, n.far);
+}
+function applyDepthTest(e, t) {
+ const n = t.depthTest, i = n.enabled;
+ enableOrDisable(e, e.DEPTH_TEST, i), i && e.depthFunc(n.func);
+}
+function applyColorMask(e, t) {
+ const n = t.colorMask;
+ e.colorMask(n.red, n.green, n.blue, n.alpha);
+}
+function applyDepthMask(e, t) {
+ e.depthMask(t.depthMask);
+}
+function applyStencilMask(e, t) {
+ e.stencilMask(t.stencilMask);
+}
+function applyBlendingColor(e, t) {
+ e.blendColor(t.red, t.green, t.blue, t.alpha);
+}
+function applyBlending(e, t, n) {
+ const i = t.blending, r = defined(n.blendingEnabled) ? n.blendingEnabled : i.enabled;
+ enableOrDisable(e, e.BLEND, r), r && (applyBlendingColor(e, i.color), e.blendEquationSeparate(i.equationRgb, i.equationAlpha), e.blendFuncSeparate(
+ i.functionSourceRgb,
+ i.functionDestinationRgb,
+ i.functionSourceAlpha,
+ i.functionDestinationAlpha
+ ));
+}
+function applyStencilTest(e, t) {
+ const n = t.stencilTest, i = n.enabled;
+ if (enableOrDisable(e, e.STENCIL_TEST, i), i) {
+ const r = n.frontFunction, o = n.backFunction, s = n.reference, c = n.mask;
+ e.stencilFunc(r, s, c), e.stencilFuncSeparate(e.BACK, o, s, c), e.stencilFuncSeparate(e.FRONT, r, s, c);
+ const l = n.frontOperation, d = l.fail, f = l.zFail, h = l.zPass;
+ e.stencilOpSeparate(
+ e.FRONT,
+ d,
+ f,
+ h
+ );
+ const p = n.backOperation, m = p.fail, _ = p.zFail, y = p.zPass;
+ e.stencilOpSeparate(
+ e.BACK,
+ m,
+ _,
+ y
+ );
+ }
+}
+function applySampleCoverage(e, t) {
+ const n = t.sampleCoverage, i = n.enabled;
+ enableOrDisable(e, e.SAMPLE_COVERAGE, i), i && e.sampleCoverage(n.value, n.invert);
+}
+const scratchViewport$2 = new BoundingRectangle();
+function applyViewport(e, t, n) {
+ let i = defaultValue(t.viewport, n.viewport);
+ defined(i) || (i = scratchViewport$2, i.width = n.context.drawingBufferWidth, i.height = n.context.drawingBufferHeight), n.context.uniformState.viewport = i, e.viewport(i.x, i.y, i.width, i.height);
+}
+RenderState.apply = function(e, t, n) {
+ applyFrontFace(e, t), applyCull(e, t), applyLineWidth(e, t), applyPolygonOffset(e, t), applyDepthRange(e, t), applyDepthTest(e, t), applyColorMask(e, t), applyDepthMask(e, t), applyStencilMask(e, t), applyStencilTest(e, t), applySampleCoverage(e, t), applyScissorTest(e, t, n), applyBlending(e, t, n), applyViewport(e, t, n);
+};
+function createFuncs(e, t) {
+ const n = [];
+ return e.frontFace !== t.frontFace && n.push(applyFrontFace), (e.cull.enabled !== t.cull.enabled || e.cull.face !== t.cull.face) && n.push(applyCull), e.lineWidth !== t.lineWidth && n.push(applyLineWidth), (e.polygonOffset.enabled !== t.polygonOffset.enabled || e.polygonOffset.factor !== t.polygonOffset.factor || e.polygonOffset.units !== t.polygonOffset.units) && n.push(applyPolygonOffset), (e.depthRange.near !== t.depthRange.near || e.depthRange.far !== t.depthRange.far) && n.push(applyDepthRange), (e.depthTest.enabled !== t.depthTest.enabled || e.depthTest.func !== t.depthTest.func) && n.push(applyDepthTest), (e.colorMask.red !== t.colorMask.red || e.colorMask.green !== t.colorMask.green || e.colorMask.blue !== t.colorMask.blue || e.colorMask.alpha !== t.colorMask.alpha) && n.push(applyColorMask), e.depthMask !== t.depthMask && n.push(applyDepthMask), e.stencilMask !== t.stencilMask && n.push(applyStencilMask), (e.stencilTest.enabled !== t.stencilTest.enabled || e.stencilTest.frontFunction !== t.stencilTest.frontFunction || e.stencilTest.backFunction !== t.stencilTest.backFunction || e.stencilTest.reference !== t.stencilTest.reference || e.stencilTest.mask !== t.stencilTest.mask || e.stencilTest.frontOperation.fail !== t.stencilTest.frontOperation.fail || e.stencilTest.frontOperation.zFail !== t.stencilTest.frontOperation.zFail || e.stencilTest.backOperation.fail !== t.stencilTest.backOperation.fail || e.stencilTest.backOperation.zFail !== t.stencilTest.backOperation.zFail || e.stencilTest.backOperation.zPass !== t.stencilTest.backOperation.zPass) && n.push(applyStencilTest), (e.sampleCoverage.enabled !== t.sampleCoverage.enabled || e.sampleCoverage.value !== t.sampleCoverage.value || e.sampleCoverage.invert !== t.sampleCoverage.invert) && n.push(applySampleCoverage), n;
+}
+RenderState.partialApply = function(e, t, n, i, r, o) {
+ if (t !== n) {
+ let f = n._applyFunctions[t.id];
+ defined(f) || (f = createFuncs(t, n), n._applyFunctions[t.id] = f);
+ const h = f.length;
+ for (let p = 0; p < h; ++p)
+ f[p](e, n);
+ }
+ const s = defined(i.scissorTest) ? i.scissorTest : t.scissorTest, c = defined(r.scissorTest) ? r.scissorTest : n.scissorTest;
+ (s !== c || o) && applyScissorTest(e, n, r);
+ const l = defined(i.blendingEnabled) ? i.blendingEnabled : t.blending.enabled, d = defined(r.blendingEnabled) ? r.blendingEnabled : n.blending.enabled;
+ (l !== d || d && t.blending !== n.blending) && applyBlending(e, n, r), (t !== n || i !== r || i.context !== r.context) && applyViewport(e, n, r);
+};
+RenderState.getState = function(e) {
+ return {
+ frontFace: e.frontFace,
+ cull: {
+ enabled: e.cull.enabled,
+ face: e.cull.face
+ },
+ lineWidth: e.lineWidth,
+ polygonOffset: {
+ enabled: e.polygonOffset.enabled,
+ factor: e.polygonOffset.factor,
+ units: e.polygonOffset.units
+ },
+ scissorTest: {
+ enabled: e.scissorTest.enabled,
+ rectangle: BoundingRectangle.clone(e.scissorTest.rectangle)
+ },
+ depthRange: {
+ near: e.depthRange.near,
+ far: e.depthRange.far
+ },
+ depthTest: {
+ enabled: e.depthTest.enabled,
+ func: e.depthTest.func
+ },
+ colorMask: {
+ red: e.colorMask.red,
+ green: e.colorMask.green,
+ blue: e.colorMask.blue,
+ alpha: e.colorMask.alpha
+ },
+ depthMask: e.depthMask,
+ stencilMask: e.stencilMask,
+ blending: {
+ enabled: e.blending.enabled,
+ color: Color.clone(e.blending.color),
+ equationRgb: e.blending.equationRgb,
+ equationAlpha: e.blending.equationAlpha,
+ functionSourceRgb: e.blending.functionSourceRgb,
+ functionSourceAlpha: e.blending.functionSourceAlpha,
+ functionDestinationRgb: e.blending.functionDestinationRgb,
+ functionDestinationAlpha: e.blending.functionDestinationAlpha
+ },
+ stencilTest: {
+ enabled: e.stencilTest.enabled,
+ frontFunction: e.stencilTest.frontFunction,
+ backFunction: e.stencilTest.backFunction,
+ reference: e.stencilTest.reference,
+ mask: e.stencilTest.mask,
+ frontOperation: {
+ fail: e.stencilTest.frontOperation.fail,
+ zFail: e.stencilTest.frontOperation.zFail,
+ zPass: e.stencilTest.frontOperation.zPass
+ },
+ backOperation: {
+ fail: e.stencilTest.backOperation.fail,
+ zFail: e.stencilTest.backOperation.zFail,
+ zPass: e.stencilTest.backOperation.zPass
+ }
+ },
+ sampleCoverage: {
+ enabled: e.sampleCoverage.enabled,
+ value: e.sampleCoverage.value,
+ invert: e.sampleCoverage.invert
+ },
+ viewport: defined(e.viewport) ? BoundingRectangle.clone(e.viewport) : void 0
+ };
+};
+function Matrix2(e, t, n, i) {
+ this[0] = defaultValue(e, 0), this[1] = defaultValue(n, 0), this[2] = defaultValue(t, 0), this[3] = defaultValue(i, 0);
+}
+Matrix2.packedLength = 4;
+Matrix2.pack = function(e, t, n) {
+ return n = defaultValue(n, 0), t[n++] = e[0], t[n++] = e[1], t[n++] = e[2], t[n++] = e[3], t;
+};
+Matrix2.unpack = function(e, t, n) {
+ return t = defaultValue(t, 0), defined(n) || (n = new Matrix2()), n[0] = e[t++], n[1] = e[t++], n[2] = e[t++], n[3] = e[t++], n;
+};
+Matrix2.packArray = function(e, t) {
+ const n = e.length, i = n * 4;
+ defined(t) ? !Array.isArray(t) && t.length !== i || t.length !== i && (t.length = i) : t = new Array(i);
+ for (let r = 0; r < n; ++r)
+ Matrix2.pack(e[r], t, r * 4);
+ return t;
+};
+Matrix2.unpackArray = function(e, t) {
+ const n = e.length;
+ defined(t) ? t.length = n / 4 : t = new Array(n / 4);
+ for (let i = 0; i < n; i += 4) {
+ const r = i / 4;
+ t[r] = Matrix2.unpack(e, i, t[r]);
+ }
+ return t;
+};
+Matrix2.clone = function(e, t) {
+ if (defined(e))
+ return defined(t) ? (t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t) : new Matrix2(e[0], e[2], e[1], e[3]);
+};
+Matrix2.fromArray = Matrix2.unpack;
+Matrix2.fromColumnMajorArray = function(e, t) {
+ return Matrix2.clone(e, t);
+};
+Matrix2.fromRowMajorArray = function(e, t) {
+ return defined(t) ? (t[0] = e[0], t[1] = e[2], t[2] = e[1], t[3] = e[3], t) : new Matrix2(e[0], e[1], e[2], e[3]);
+};
+Matrix2.fromScale = function(e, t) {
+ return defined(t) ? (t[0] = e.x, t[1] = 0, t[2] = 0, t[3] = e.y, t) : new Matrix2(e.x, 0, 0, e.y);
+};
+Matrix2.fromUniformScale = function(e, t) {
+ return defined(t) ? (t[0] = e, t[1] = 0, t[2] = 0, t[3] = e, t) : new Matrix2(e, 0, 0, e);
+};
+Matrix2.fromRotation = function(e, t) {
+ const n = Math.cos(e), i = Math.sin(e);
+ return defined(t) ? (t[0] = n, t[1] = i, t[2] = -i, t[3] = n, t) : new Matrix2(n, -i, i, n);
+};
+Matrix2.toArray = function(e, t) {
+ return defined(t) ? (t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t) : [e[0], e[1], e[2], e[3]];
+};
+Matrix2.getElementIndex = function(e, t) {
+ return e * 2 + t;
+};
+Matrix2.getColumn = function(e, t, n) {
+ const i = t * 2, r = e[i], o = e[i + 1];
+ return n.x = r, n.y = o, n;
+};
+Matrix2.setColumn = function(e, t, n, i) {
+ i = Matrix2.clone(e, i);
+ const r = t * 2;
+ return i[r] = n.x, i[r + 1] = n.y, i;
+};
+Matrix2.getRow = function(e, t, n) {
+ const i = e[t], r = e[t + 2];
+ return n.x = i, n.y = r, n;
+};
+Matrix2.setRow = function(e, t, n, i) {
+ return i = Matrix2.clone(e, i), i[t] = n.x, i[t + 2] = n.y, i;
+};
+const scaleScratch1 = new Cartesian2();
+Matrix2.setScale = function(e, t, n) {
+ const i = Matrix2.getScale(e, scaleScratch1), r = t.x / i.x, o = t.y / i.y;
+ return n[0] = e[0] * r, n[1] = e[1] * r, n[2] = e[2] * o, n[3] = e[3] * o, n;
+};
+const scaleScratch2 = new Cartesian2();
+Matrix2.setUniformScale = function(e, t, n) {
+ const i = Matrix2.getScale(e, scaleScratch2), r = t / i.x, o = t / i.y;
+ return n[0] = e[0] * r, n[1] = e[1] * r, n[2] = e[2] * o, n[3] = e[3] * o, n;
+};
+const scratchColumn = new Cartesian2();
+Matrix2.getScale = function(e, t) {
+ return t.x = Cartesian2.magnitude(
+ Cartesian2.fromElements(e[0], e[1], scratchColumn)
+ ), t.y = Cartesian2.magnitude(
+ Cartesian2.fromElements(e[2], e[3], scratchColumn)
+ ), t;
+};
+const scaleScratch3 = new Cartesian2();
+Matrix2.getMaximumScale = function(e) {
+ return Matrix2.getScale(e, scaleScratch3), Cartesian2.maximumComponent(scaleScratch3);
+};
+const scaleScratch4 = new Cartesian2();
+Matrix2.setRotation = function(e, t, n) {
+ const i = Matrix2.getScale(e, scaleScratch4);
+ return n[0] = t[0] * i.x, n[1] = t[1] * i.x, n[2] = t[2] * i.y, n[3] = t[3] * i.y, n;
+};
+const scaleScratch5 = new Cartesian2();
+Matrix2.getRotation = function(e, t) {
+ const n = Matrix2.getScale(e, scaleScratch5);
+ return t[0] = e[0] / n.x, t[1] = e[1] / n.x, t[2] = e[2] / n.y, t[3] = e[3] / n.y, t;
+};
+Matrix2.multiply = function(e, t, n) {
+ const i = e[0] * t[0] + e[2] * t[1], r = e[0] * t[2] + e[2] * t[3], o = e[1] * t[0] + e[3] * t[1], s = e[1] * t[2] + e[3] * t[3];
+ return n[0] = i, n[1] = o, n[2] = r, n[3] = s, n;
+};
+Matrix2.add = function(e, t, n) {
+ return n[0] = e[0] + t[0], n[1] = e[1] + t[1], n[2] = e[2] + t[2], n[3] = e[3] + t[3], n;
+};
+Matrix2.subtract = function(e, t, n) {
+ return n[0] = e[0] - t[0], n[1] = e[1] - t[1], n[2] = e[2] - t[2], n[3] = e[3] - t[3], n;
+};
+Matrix2.multiplyByVector = function(e, t, n) {
+ const i = e[0] * t.x + e[2] * t.y, r = e[1] * t.x + e[3] * t.y;
+ return n.x = i, n.y = r, n;
+};
+Matrix2.multiplyByScalar = function(e, t, n) {
+ return n[0] = e[0] * t, n[1] = e[1] * t, n[2] = e[2] * t, n[3] = e[3] * t, n;
+};
+Matrix2.multiplyByScale = function(e, t, n) {
+ return n[0] = e[0] * t.x, n[1] = e[1] * t.x, n[2] = e[2] * t.y, n[3] = e[3] * t.y, n;
+};
+Matrix2.multiplyByUniformScale = function(e, t, n) {
+ return n[0] = e[0] * t, n[1] = e[1] * t, n[2] = e[2] * t, n[3] = e[3] * t, n;
+};
+Matrix2.negate = function(e, t) {
+ return t[0] = -e[0], t[1] = -e[1], t[2] = -e[2], t[3] = -e[3], t;
+};
+Matrix2.transpose = function(e, t) {
+ const n = e[0], i = e[2], r = e[1], o = e[3];
+ return t[0] = n, t[1] = i, t[2] = r, t[3] = o, t;
+};
+Matrix2.abs = function(e, t) {
+ return t[0] = Math.abs(e[0]), t[1] = Math.abs(e[1]), t[2] = Math.abs(e[2]), t[3] = Math.abs(e[3]), t;
+};
+Matrix2.equals = function(e, t) {
+ return e === t || defined(e) && defined(t) && e[0] === t[0] && e[1] === t[1] && e[2] === t[2] && e[3] === t[3];
+};
+Matrix2.equalsArray = function(e, t, n) {
+ return e[0] === t[n] && e[1] === t[n + 1] && e[2] === t[n + 2] && e[3] === t[n + 3];
+};
+Matrix2.equalsEpsilon = function(e, t, n) {
+ return n = defaultValue(n, 0), e === t || defined(e) && defined(t) && Math.abs(e[0] - t[0]) <= n && Math.abs(e[1] - t[1]) <= n && Math.abs(e[2] - t[2]) <= n && Math.abs(e[3] - t[3]) <= n;
+};
+Matrix2.IDENTITY = Object.freeze(new Matrix2(1, 0, 0, 1));
+Matrix2.ZERO = Object.freeze(new Matrix2(0, 0, 0, 0));
+Matrix2.COLUMN0ROW0 = 0;
+Matrix2.COLUMN0ROW1 = 1;
+Matrix2.COLUMN1ROW0 = 2;
+Matrix2.COLUMN1ROW1 = 3;
+Object.defineProperties(Matrix2.prototype, {
+ /**
+ * Gets the number of items in the collection.
+ * @memberof Matrix2.prototype
+ *
+ * @type {number}
+ */
+ length: {
+ get: function() {
+ return Matrix2.packedLength;
+ }
+ }
+});
+Matrix2.prototype.clone = function(e) {
+ return Matrix2.clone(this, e);
+};
+Matrix2.prototype.equals = function(e) {
+ return Matrix2.equals(this, e);
+};
+Matrix2.prototype.equalsEpsilon = function(e, t) {
+ return Matrix2.equalsEpsilon(this, e, t);
+};
+Matrix2.prototype.toString = function() {
+ return `(${this[0]}, ${this[2]})
+(${this[1]}, ${this[3]})`;
+};
+function createUniform$1(e, t, n, i) {
+ switch (t.type) {
+ case e.FLOAT:
+ return new UniformFloat(e, t, n, i);
+ case e.FLOAT_VEC2:
+ return new UniformFloatVec2(e, t, n, i);
+ case e.FLOAT_VEC3:
+ return new UniformFloatVec3(e, t, n, i);
+ case e.FLOAT_VEC4:
+ return new UniformFloatVec4(e, t, n, i);
+ case e.SAMPLER_2D:
+ case e.SAMPLER_CUBE:
+ return new UniformSampler(e, t, n, i);
+ case e.INT:
+ case e.BOOL:
+ return new UniformInt(e, t, n, i);
+ case e.INT_VEC2:
+ case e.BOOL_VEC2:
+ return new UniformIntVec2(e, t, n, i);
+ case e.INT_VEC3:
+ case e.BOOL_VEC3:
+ return new UniformIntVec3(e, t, n, i);
+ case e.INT_VEC4:
+ case e.BOOL_VEC4:
+ return new UniformIntVec4(e, t, n, i);
+ case e.FLOAT_MAT2:
+ return new UniformMat2(e, t, n, i);
+ case e.FLOAT_MAT3:
+ return new UniformMat3(e, t, n, i);
+ case e.FLOAT_MAT4:
+ return new UniformMat4(e, t, n, i);
+ default:
+ throw new RuntimeError(
+ `Unrecognized uniform type: ${t.type} for uniform "${n}".`
+ );
+ }
+}
+function UniformFloat(e, t, n, i) {
+ this.name = n, this.value = void 0, this._value = 0, this._gl = e, this._location = i;
+}
+UniformFloat.prototype.set = function() {
+ this.value !== this._value && (this._value = this.value, this._gl.uniform1f(this._location, this.value));
+};
+function UniformFloatVec2(e, t, n, i) {
+ this.name = n, this.value = void 0, this._value = new Cartesian2(), this._gl = e, this._location = i;
+}
+UniformFloatVec2.prototype.set = function() {
+ const e = this.value;
+ Cartesian2.equals(e, this._value) || (Cartesian2.clone(e, this._value), this._gl.uniform2f(this._location, e.x, e.y));
+};
+function UniformFloatVec3(e, t, n, i) {
+ this.name = n, this.value = void 0, this._value = void 0, this._gl = e, this._location = i;
+}
+UniformFloatVec3.prototype.set = function() {
+ const e = this.value;
+ defined(e.red) ? Color.equals(e, this._value) || (this._value = Color.clone(e, this._value), this._gl.uniform3f(this._location, e.red, e.green, e.blue)) : defined(e.x) && (Cartesian3.equals(e, this._value) || (this._value = Cartesian3.clone(e, this._value), this._gl.uniform3f(this._location, e.x, e.y, e.z)));
+};
+function UniformFloatVec4(e, t, n, i) {
+ this.name = n, this.value = void 0, this._value = void 0, this._gl = e, this._location = i;
+}
+UniformFloatVec4.prototype.set = function() {
+ const e = this.value;
+ defined(e.red) ? Color.equals(e, this._value) || (this._value = Color.clone(e, this._value), this._gl.uniform4f(this._location, e.red, e.green, e.blue, e.alpha)) : defined(e.x) && (Cartesian4.equals(e, this._value) || (this._value = Cartesian4.clone(e, this._value), this._gl.uniform4f(this._location, e.x, e.y, e.z, e.w)));
+};
+function UniformSampler(e, t, n, i) {
+ this.name = n, this.value = void 0, this._gl = e, this._location = i, this.textureUnitIndex = void 0;
+}
+UniformSampler.prototype.set = function() {
+ const e = this._gl;
+ e.activeTexture(e.TEXTURE0 + this.textureUnitIndex);
+ const t = this.value;
+ e.bindTexture(t._target, t._texture);
+};
+UniformSampler.prototype._setSampler = function(e) {
+ return this.textureUnitIndex = e, this._gl.uniform1i(this._location, e), e + 1;
+};
+function UniformInt(e, t, n, i) {
+ this.name = n, this.value = void 0, this._value = 0, this._gl = e, this._location = i;
+}
+UniformInt.prototype.set = function() {
+ this.value !== this._value && (this._value = this.value, this._gl.uniform1i(this._location, this.value));
+};
+function UniformIntVec2(e, t, n, i) {
+ this.name = n, this.value = void 0, this._value = new Cartesian2(), this._gl = e, this._location = i;
+}
+UniformIntVec2.prototype.set = function() {
+ const e = this.value;
+ Cartesian2.equals(e, this._value) || (Cartesian2.clone(e, this._value), this._gl.uniform2i(this._location, e.x, e.y));
+};
+function UniformIntVec3(e, t, n, i) {
+ this.name = n, this.value = void 0, this._value = new Cartesian3(), this._gl = e, this._location = i;
+}
+UniformIntVec3.prototype.set = function() {
+ const e = this.value;
+ Cartesian3.equals(e, this._value) || (Cartesian3.clone(e, this._value), this._gl.uniform3i(this._location, e.x, e.y, e.z));
+};
+function UniformIntVec4(e, t, n, i) {
+ this.name = n, this.value = void 0, this._value = new Cartesian4(), this._gl = e, this._location = i;
+}
+UniformIntVec4.prototype.set = function() {
+ const e = this.value;
+ Cartesian4.equals(e, this._value) || (Cartesian4.clone(e, this._value), this._gl.uniform4i(this._location, e.x, e.y, e.z, e.w));
+};
+const scratchUniformArray$1 = new Float32Array(4);
+function UniformMat2(e, t, n, i) {
+ this.name = n, this.value = void 0, this._value = new Matrix2(), this._gl = e, this._location = i;
+}
+UniformMat2.prototype.set = function() {
+ if (!Matrix2.equalsArray(this.value, this._value, 0)) {
+ Matrix2.clone(this.value, this._value);
+ const e = Matrix2.toArray(this.value, scratchUniformArray$1);
+ this._gl.uniformMatrix2fv(this._location, !1, e);
+ }
+};
+const scratchMat3Array = new Float32Array(9);
+function UniformMat3(e, t, n, i) {
+ this.name = n, this.value = void 0, this._value = new Matrix3(), this._gl = e, this._location = i;
+}
+UniformMat3.prototype.set = function() {
+ if (!Matrix3.equalsArray(this.value, this._value, 0)) {
+ Matrix3.clone(this.value, this._value);
+ const e = Matrix3.toArray(this.value, scratchMat3Array);
+ this._gl.uniformMatrix3fv(this._location, !1, e);
+ }
+};
+const scratchMat4Array = new Float32Array(16);
+function UniformMat4(e, t, n, i) {
+ this.name = n, this.value = void 0, this._value = new Matrix4(), this._gl = e, this._location = i;
+}
+UniformMat4.prototype.set = function() {
+ if (!Matrix4.equalsArray(this.value, this._value, 0)) {
+ Matrix4.clone(this.value, this._value);
+ const e = Matrix4.toArray(this.value, scratchMat4Array);
+ this._gl.uniformMatrix4fv(this._location, !1, e);
+ }
+};
+function createUniformArray(e, t, n, i) {
+ switch (t.type) {
+ case e.FLOAT:
+ return new UniformArrayFloat(e, t, n, i);
+ case e.FLOAT_VEC2:
+ return new UniformArrayFloatVec2(
+ e,
+ t,
+ n,
+ i
+ );
+ case e.FLOAT_VEC3:
+ return new UniformArrayFloatVec3(
+ e,
+ t,
+ n,
+ i
+ );
+ case e.FLOAT_VEC4:
+ return new UniformArrayFloatVec4(
+ e,
+ t,
+ n,
+ i
+ );
+ case e.SAMPLER_2D:
+ case e.SAMPLER_CUBE:
+ return new UniformArraySampler(e, t, n, i);
+ case e.INT:
+ case e.BOOL:
+ return new UniformArrayInt(e, t, n, i);
+ case e.INT_VEC2:
+ case e.BOOL_VEC2:
+ return new UniformArrayIntVec2(e, t, n, i);
+ case e.INT_VEC3:
+ case e.BOOL_VEC3:
+ return new UniformArrayIntVec3(e, t, n, i);
+ case e.INT_VEC4:
+ case e.BOOL_VEC4:
+ return new UniformArrayIntVec4(e, t, n, i);
+ case e.FLOAT_MAT2:
+ return new UniformArrayMat2(e, t, n, i);
+ case e.FLOAT_MAT3:
+ return new UniformArrayMat3(e, t, n, i);
+ case e.FLOAT_MAT4:
+ return new UniformArrayMat4(e, t, n, i);
+ default:
+ throw new RuntimeError(
+ `Unrecognized uniform type: ${t.type} for uniform "${n}".`
+ );
+ }
+}
+function UniformArrayFloat(e, t, n, i) {
+ const r = i.length;
+ this.name = n, this.value = new Array(r), this._value = new Float32Array(r), this._gl = e, this._location = i[0];
+}
+UniformArrayFloat.prototype.set = function() {
+ const e = this.value, t = e.length, n = this._value;
+ let i = !1;
+ for (let r = 0; r < t; ++r) {
+ const o = e[r];
+ o !== n[r] && (n[r] = o, i = !0);
+ }
+ i && this._gl.uniform1fv(this._location, n);
+};
+function UniformArrayFloatVec2(e, t, n, i) {
+ const r = i.length;
+ this.name = n, this.value = new Array(r), this._value = new Float32Array(r * 2), this._gl = e, this._location = i[0];
+}
+UniformArrayFloatVec2.prototype.set = function() {
+ const e = this.value, t = e.length, n = this._value;
+ let i = !1, r = 0;
+ for (let o = 0; o < t; ++o) {
+ const s = e[o];
+ Cartesian2.equalsArray(s, n, r) || (Cartesian2.pack(s, n, r), i = !0), r += 2;
+ }
+ i && this._gl.uniform2fv(this._location, n);
+};
+function UniformArrayFloatVec3(e, t, n, i) {
+ const r = i.length;
+ this.name = n, this.value = new Array(r), this._value = new Float32Array(r * 3), this._gl = e, this._location = i[0];
+}
+UniformArrayFloatVec3.prototype.set = function() {
+ const e = this.value, t = e.length, n = this._value;
+ let i = !1, r = 0;
+ for (let o = 0; o < t; ++o) {
+ const s = e[o];
+ defined(s.red) ? (s.red !== n[r] || s.green !== n[r + 1] || s.blue !== n[r + 2]) && (n[r] = s.red, n[r + 1] = s.green, n[r + 2] = s.blue, i = !0) : defined(s.x) && (Cartesian3.equalsArray(s, n, r) || (Cartesian3.pack(s, n, r), i = !0)), r += 3;
+ }
+ i && this._gl.uniform3fv(this._location, n);
+};
+function UniformArrayFloatVec4(e, t, n, i) {
+ const r = i.length;
+ this.name = n, this.value = new Array(r), this._value = new Float32Array(r * 4), this._gl = e, this._location = i[0];
+}
+UniformArrayFloatVec4.prototype.set = function() {
+ const e = this.value, t = e.length, n = this._value;
+ let i = !1, r = 0;
+ for (let o = 0; o < t; ++o) {
+ const s = e[o];
+ defined(s.red) ? Color.equalsArray(s, n, r) || (Color.pack(s, n, r), i = !0) : defined(s.x) && (Cartesian4.equalsArray(s, n, r) || (Cartesian4.pack(s, n, r), i = !0)), r += 4;
+ }
+ i && this._gl.uniform4fv(this._location, n);
+};
+function UniformArraySampler(e, t, n, i) {
+ const r = i.length;
+ this.name = n, this.value = new Array(r), this._value = new Float32Array(r), this._gl = e, this._locations = i, this.textureUnitIndex = void 0;
+}
+UniformArraySampler.prototype.set = function() {
+ const e = this._gl, t = e.TEXTURE0 + this.textureUnitIndex, n = this.value, i = n.length;
+ for (let r = 0; r < i; ++r) {
+ const o = n[r];
+ e.activeTexture(t + r), e.bindTexture(o._target, o._texture);
+ }
+};
+UniformArraySampler.prototype._setSampler = function(e) {
+ this.textureUnitIndex = e;
+ const t = this._locations, n = t.length;
+ for (let i = 0; i < n; ++i) {
+ const r = e + i;
+ this._gl.uniform1i(t[i], r);
+ }
+ return e + n;
+};
+function UniformArrayInt(e, t, n, i) {
+ const r = i.length;
+ this.name = n, this.value = new Array(r), this._value = new Int32Array(r), this._gl = e, this._location = i[0];
+}
+UniformArrayInt.prototype.set = function() {
+ const e = this.value, t = e.length, n = this._value;
+ let i = !1;
+ for (let r = 0; r < t; ++r) {
+ const o = e[r];
+ o !== n[r] && (n[r] = o, i = !0);
+ }
+ i && this._gl.uniform1iv(this._location, n);
+};
+function UniformArrayIntVec2(e, t, n, i) {
+ const r = i.length;
+ this.name = n, this.value = new Array(r), this._value = new Int32Array(r * 2), this._gl = e, this._location = i[0];
+}
+UniformArrayIntVec2.prototype.set = function() {
+ const e = this.value, t = e.length, n = this._value;
+ let i = !1, r = 0;
+ for (let o = 0; o < t; ++o) {
+ const s = e[o];
+ Cartesian2.equalsArray(s, n, r) || (Cartesian2.pack(s, n, r), i = !0), r += 2;
+ }
+ i && this._gl.uniform2iv(this._location, n);
+};
+function UniformArrayIntVec3(e, t, n, i) {
+ const r = i.length;
+ this.name = n, this.value = new Array(r), this._value = new Int32Array(r * 3), this._gl = e, this._location = i[0];
+}
+UniformArrayIntVec3.prototype.set = function() {
+ const e = this.value, t = e.length, n = this._value;
+ let i = !1, r = 0;
+ for (let o = 0; o < t; ++o) {
+ const s = e[o];
+ Cartesian3.equalsArray(s, n, r) || (Cartesian3.pack(s, n, r), i = !0), r += 3;
+ }
+ i && this._gl.uniform3iv(this._location, n);
+};
+function UniformArrayIntVec4(e, t, n, i) {
+ const r = i.length;
+ this.name = n, this.value = new Array(r), this._value = new Int32Array(r * 4), this._gl = e, this._location = i[0];
+}
+UniformArrayIntVec4.prototype.set = function() {
+ const e = this.value, t = e.length, n = this._value;
+ let i = !1, r = 0;
+ for (let o = 0; o < t; ++o) {
+ const s = e[o];
+ Cartesian4.equalsArray(s, n, r) || (Cartesian4.pack(s, n, r), i = !0), r += 4;
+ }
+ i && this._gl.uniform4iv(this._location, n);
+};
+function UniformArrayMat2(e, t, n, i) {
+ const r = i.length;
+ this.name = n, this.value = new Array(r), this._value = new Float32Array(r * 4), this._gl = e, this._location = i[0];
+}
+UniformArrayMat2.prototype.set = function() {
+ const e = this.value, t = e.length, n = this._value;
+ let i = !1, r = 0;
+ for (let o = 0; o < t; ++o) {
+ const s = e[o];
+ Matrix2.equalsArray(s, n, r) || (Matrix2.pack(s, n, r), i = !0), r += 4;
+ }
+ i && this._gl.uniformMatrix2fv(this._location, !1, n);
+};
+function UniformArrayMat3(e, t, n, i) {
+ const r = i.length;
+ this.name = n, this.value = new Array(r), this._value = new Float32Array(r * 9), this._gl = e, this._location = i[0];
+}
+UniformArrayMat3.prototype.set = function() {
+ const e = this.value, t = e.length, n = this._value;
+ let i = !1, r = 0;
+ for (let o = 0; o < t; ++o) {
+ const s = e[o];
+ Matrix3.equalsArray(s, n, r) || (Matrix3.pack(s, n, r), i = !0), r += 9;
+ }
+ i && this._gl.uniformMatrix3fv(this._location, !1, n);
+};
+function UniformArrayMat4(e, t, n, i) {
+ const r = i.length;
+ this.name = n, this.value = new Array(r), this._value = new Float32Array(r * 16), this._gl = e, this._location = i[0];
+}
+UniformArrayMat4.prototype.set = function() {
+ const e = this.value, t = e.length, n = this._value;
+ let i = !1, r = 0;
+ for (let o = 0; o < t; ++o) {
+ const s = e[o];
+ Matrix4.equalsArray(s, n, r) || (Matrix4.pack(s, n, r), i = !0), r += 16;
+ }
+ i && this._gl.uniformMatrix4fv(this._location, !1, n);
+};
+let nextShaderProgramId = 0;
+function ShaderProgram(e) {
+ let t = e.vertexShaderText, n = e.fragmentShaderText;
+ typeof spector < "u" && (t = t.replace(/^#line/gm, "//#line"), n = n.replace(/^#line/gm, "//#line"));
+ const i = handleUniformPrecisionMismatches(
+ t,
+ n
+ );
+ this._gl = e.gl, this._logShaderCompilation = e.logShaderCompilation, this._debugShaders = e.debugShaders, this._attributeLocations = e.attributeLocations, this._program = void 0, this._numberOfVertexAttributes = void 0, this._vertexAttributes = void 0, this._uniformsByName = void 0, this._uniforms = void 0, this._automaticUniforms = void 0, this._manualUniforms = void 0, this._duplicateUniformNames = i.duplicateUniformNames, this._cachedShader = void 0, this.maximumTextureUnitIndex = void 0, this._vertexShaderSource = e.vertexShaderSource, this._vertexShaderText = e.vertexShaderText, this._fragmentShaderSource = e.fragmentShaderSource, this._fragmentShaderText = i.fragmentShaderText, this.id = nextShaderProgramId++;
+}
+ShaderProgram.fromCache = function(e) {
+ return e = defaultValue(e, defaultValue.EMPTY_OBJECT), e.context.shaderCache.getShaderProgram(e);
+};
+ShaderProgram.replaceCache = function(e) {
+ return e = defaultValue(e, defaultValue.EMPTY_OBJECT), e.context.shaderCache.replaceShaderProgram(e);
+};
+Object.defineProperties(ShaderProgram.prototype, {
+ /**
+ * GLSL source for the shader program's vertex shader.
+ * @memberof ShaderProgram.prototype
+ *
+ * @type {ShaderSource}
+ * @readonly
+ */
+ vertexShaderSource: {
+ get: function() {
+ return this._vertexShaderSource;
+ }
+ },
+ /**
+ * GLSL source for the shader program's fragment shader.
+ * @memberof ShaderProgram.prototype
+ *
+ * @type {ShaderSource}
+ * @readonly
+ */
+ fragmentShaderSource: {
+ get: function() {
+ return this._fragmentShaderSource;
+ }
+ },
+ vertexAttributes: {
+ get: function() {
+ return initialize$g(this), this._vertexAttributes;
+ }
+ },
+ numberOfVertexAttributes: {
+ get: function() {
+ return initialize$g(this), this._numberOfVertexAttributes;
+ }
+ },
+ allUniforms: {
+ get: function() {
+ return initialize$g(this), this._uniformsByName;
+ }
+ }
+});
+function extractUniforms(e) {
+ const t = [], n = e.match(/uniform.*?(?![^{]*})(?=[=\[;])/g);
+ if (defined(n)) {
+ const i = n.length;
+ for (let r = 0; r < i; r++) {
+ const o = n[r].trim(), s = o.slice(o.lastIndexOf(" ") + 1);
+ t.push(s);
+ }
+ }
+ return t;
+}
+function handleUniformPrecisionMismatches(e, t) {
+ const n = {};
+ if (!ContextLimits.highpFloatSupported || !ContextLimits.highpIntSupported) {
+ let i, r, o, s;
+ const c = extractUniforms(e), l = extractUniforms(t), d = c.length, f = l.length;
+ for (i = 0; i < d; i++)
+ for (r = 0; r < f; r++)
+ if (c[i] === l[r]) {
+ o = c[i], s = `czm_mediump_${o}`;
+ const h = new RegExp(`${o}\\b`, "g");
+ t = t.replace(h, s), n[s] = o;
+ }
+ }
+ return {
+ fragmentShaderText: t,
+ duplicateUniformNames: n
+ };
+}
+const consolePrefix = "[Cesium WebGL] ";
+function createAndLinkProgram(e, t) {
+ const n = t._vertexShaderText, i = t._fragmentShaderText, r = e.createShader(e.VERTEX_SHADER);
+ e.shaderSource(r, n), e.compileShader(r);
+ const o = e.createShader(e.FRAGMENT_SHADER);
+ e.shaderSource(o, i), e.compileShader(o);
+ const s = e.createProgram();
+ e.attachShader(s, r), e.attachShader(s, o);
+ const c = t._attributeLocations;
+ if (defined(c))
+ for (const p in c)
+ c.hasOwnProperty(p) && e.bindAttribLocation(
+ s,
+ c[p],
+ p
+ );
+ e.linkProgram(s);
+ let l;
+ if (e.getProgramParameter(s, e.LINK_STATUS))
+ return t._logShaderCompilation && (l = e.getShaderInfoLog(r), defined(l) && l.length > 0 && console.log(`${consolePrefix}Vertex shader compile log: ${l}`), l = e.getShaderInfoLog(o), defined(l) && l.length > 0 && console.log(`${consolePrefix}Fragment shader compile log: ${l}`), l = e.getProgramInfoLog(s), defined(l) && l.length > 0 && console.log(`${consolePrefix}Shader program link log: ${l}`)), e.deleteShader(r), e.deleteShader(o), s;
+ let d;
+ const f = t._debugShaders;
+ throw e.getShaderParameter(o, e.COMPILE_STATUS) ? e.getShaderParameter(r, e.COMPILE_STATUS) ? (l = e.getProgramInfoLog(s), console.error(`${consolePrefix}Shader program link log: ${l}`), h(r, "vertex"), h(o, "fragment"), d = `Program failed to link. Link log: ${l}`) : (l = e.getShaderInfoLog(r), console.error(`${consolePrefix}Vertex shader compile log: ${l}`), console.error(`${consolePrefix} Vertex shader source:
+${n}`), d = `Vertex shader failed to compile. Compile log: ${l}`) : (l = e.getShaderInfoLog(o), console.error(`${consolePrefix}Fragment shader compile log: ${l}`), console.error(`${consolePrefix} Fragment shader source:
+${i}`), d = `Fragment shader failed to compile. Compile log: ${l}`), e.deleteShader(r), e.deleteShader(o), e.deleteProgram(s), new RuntimeError(d);
+ function h(p, m) {
+ if (!defined(f))
+ return;
+ const _ = f.getTranslatedShaderSource(p);
+ if (_ === "") {
+ console.error(`${consolePrefix}${m} shader translation failed.`);
+ return;
+ }
+ console.error(
+ `${consolePrefix}Translated ${m} shaderSource:
+${_}`
+ );
+ }
+}
+function findVertexAttributes(e, t, n) {
+ const i = {};
+ for (let r = 0; r < n; ++r) {
+ const o = e.getActiveAttrib(t, r), s = e.getAttribLocation(t, o.name);
+ i[o.name] = {
+ name: o.name,
+ type: o.type,
+ index: s
+ };
+ }
+ return i;
+}
+function findUniforms(e, t) {
+ const n = {}, i = [], r = [], o = e.getProgramParameter(t, e.ACTIVE_UNIFORMS);
+ for (let s = 0; s < o; ++s) {
+ const c = e.getActiveUniform(t, s), l = "[0]", d = c.name.indexOf(
+ l,
+ c.name.length - l.length
+ ) !== -1 ? c.name.slice(0, c.name.length - 3) : c.name;
+ if (d.indexOf("gl_") !== 0)
+ if (c.name.indexOf("[") < 0) {
+ const f = e.getUniformLocation(t, d);
+ if (f !== null) {
+ const h = createUniform$1(
+ e,
+ c,
+ d,
+ f
+ );
+ n[d] = h, i.push(h), h._setSampler && r.push(h);
+ }
+ } else {
+ let f, h, p, m;
+ const _ = d.indexOf("[");
+ if (_ >= 0) {
+ if (f = n[d.slice(0, _)], !defined(f))
+ continue;
+ h = f._locations, h.length <= 1 && (p = f.value, m = e.getUniformLocation(t, d), m !== null && (h.push(m), p.push(e.getUniform(t, m))));
+ } else {
+ h = [];
+ for (let y = 0; y < c.size; ++y)
+ m = e.getUniformLocation(t, `${d}[${y}]`), m !== null && h.push(m);
+ f = createUniformArray(
+ e,
+ c,
+ d,
+ h
+ ), n[d] = f, i.push(f), f._setSampler && r.push(f);
+ }
+ }
+ }
+ return {
+ uniformsByName: n,
+ uniforms: i,
+ samplerUniforms: r
+ };
+}
+function partitionUniforms(e, t) {
+ const n = [], i = [];
+ for (const r in t)
+ if (t.hasOwnProperty(r)) {
+ const o = t[r];
+ let s = r;
+ const c = e._duplicateUniformNames[s];
+ defined(c) && (o.name = c, s = c);
+ const l = AutomaticUniforms[s];
+ defined(l) ? n.push({
+ uniform: o,
+ automaticUniform: l
+ }) : i.push(o);
+ }
+ return {
+ automaticUniforms: n,
+ manualUniforms: i
+ };
+}
+function setSamplerUniforms(e, t, n) {
+ e.useProgram(t);
+ let i = 0;
+ const r = n.length;
+ for (let o = 0; o < r; ++o)
+ i = n[o]._setSampler(i);
+ return e.useProgram(null), i;
+}
+function initialize$g(e) {
+ defined(e._program) || reinitialize(e);
+}
+function reinitialize(e) {
+ const t = e._program, n = e._gl, i = createAndLinkProgram(n, e, e._debugShaders), r = n.getProgramParameter(
+ i,
+ n.ACTIVE_ATTRIBUTES
+ ), o = findUniforms(n, i), s = partitionUniforms(
+ e,
+ o.uniformsByName
+ );
+ e._program = i, e._numberOfVertexAttributes = r, e._vertexAttributes = findVertexAttributes(
+ n,
+ i,
+ r
+ ), e._uniformsByName = o.uniformsByName, e._uniforms = o.uniforms, e._automaticUniforms = s.automaticUniforms, e._manualUniforms = s.manualUniforms, e.maximumTextureUnitIndex = setSamplerUniforms(
+ n,
+ i,
+ o.samplerUniforms
+ ), t && e._gl.deleteProgram(t), typeof spector < "u" && (e._program.__SPECTOR_rebuildProgram = function(c, l, d, f) {
+ const h = e._vertexShaderText, p = e._fragmentShaderText, m = / ! = /g;
+ e._vertexShaderText = c.replace(m, " != "), e._fragmentShaderText = l.replace(m, " != ");
+ try {
+ reinitialize(e), d(e._program);
+ } catch (_) {
+ e._vertexShaderText = h, e._fragmentShaderText = p;
+ const C = /(?:Compile|Link) error: ([^]*)/.exec(_.message);
+ f(C ? C[1] : _.message);
+ }
+ });
+}
+ShaderProgram.prototype._bind = function() {
+ initialize$g(this), this._gl.useProgram(this._program);
+};
+ShaderProgram.prototype._setUniforms = function(e, t, n) {
+ let i, r;
+ if (defined(e)) {
+ const c = this._manualUniforms;
+ for (i = c.length, r = 0; r < i; ++r) {
+ const l = c[r];
+ l.value = e[l.name]();
+ }
+ }
+ const o = this._automaticUniforms;
+ for (i = o.length, r = 0; r < i; ++r) {
+ const c = o[r];
+ c.uniform.value = c.automaticUniform.getValue(t);
+ }
+ const s = this._uniforms;
+ for (i = s.length, r = 0; r < i; ++r)
+ s[r].set();
+ if (n) {
+ const c = this._gl, l = this._program;
+ c.validateProgram(l);
+ }
+};
+ShaderProgram.prototype.isDestroyed = function() {
+ return !1;
+};
+ShaderProgram.prototype.destroy = function() {
+ this._cachedShader.cache.releaseShaderProgram(this);
+};
+ShaderProgram.prototype.finalDestroy = function() {
+ return this._gl.deleteProgram(this._program), destroyObject(this);
+};
+function ComputeEngine(e) {
+ this._context = e;
+}
+let renderStateScratch;
+const drawCommandScratch = new DrawCommand({
+ primitiveType: PrimitiveType$1.TRIANGLES
+}), clearCommandScratch = new ClearCommand({
+ color: new Color(0, 0, 0, 0)
+});
+function createFramebuffer$1(e, t) {
+ return new Framebuffer({
+ context: e,
+ colorTextures: [t],
+ destroyAttachments: !1
+ });
+}
+function createViewportQuadShader(e, t) {
+ return ShaderProgram.fromCache({
+ context: e,
+ vertexShaderSource: ViewportQuadVS,
+ fragmentShaderSource: t,
+ attributeLocations: {
+ position: 0,
+ textureCoordinates: 1
+ }
+ });
+}
+function createRenderState$1(e, t) {
+ return (!defined(renderStateScratch) || renderStateScratch.viewport.width !== e || renderStateScratch.viewport.height !== t) && (renderStateScratch = RenderState.fromCache({
+ viewport: new BoundingRectangle(0, 0, e, t)
+ })), renderStateScratch;
+}
+ComputeEngine.prototype.execute = function(e) {
+ defined(e.preExecute) && e.preExecute(e);
+ const t = e.outputTexture, n = t.width, i = t.height, r = this._context, o = defined(e.vertexArray) ? e.vertexArray : r.getViewportQuadVertexArray(), s = defined(e.shaderProgram) ? e.shaderProgram : createViewportQuadShader(r, e.fragmentShaderSource), c = createFramebuffer$1(r, t), l = createRenderState$1(n, i), d = e.uniformMap, f = clearCommandScratch;
+ f.framebuffer = c, f.renderState = l, f.execute(r);
+ const h = drawCommandScratch;
+ h.vertexArray = o, h.renderState = l, h.shaderProgram = s, h.uniformMap = d, h.framebuffer = c, h.execute(r), c.destroy(), e.persists || (s.destroy(), defined(e.vertexArray) && o.destroy()), defined(e.postExecute) && e.postExecute(t);
+};
+ComputeEngine.prototype.isDestroyed = function() {
+ return !1;
+};
+ComputeEngine.prototype.destroy = function() {
+ return destroyObject(this);
+};
+const ComponentDatatype = {
+ /**
+ * 8-bit signed byte corresponding to gl.BYTE and the type
+ * of an element in Int8Array.
+ *
+ * @type {number}
+ * @constant
+ */
+ BYTE: WebGLConstants$1.BYTE,
+ /**
+ * 8-bit unsigned byte corresponding to UNSIGNED_BYTE and the type
+ * of an element in Uint8Array.
+ *
+ * @type {number}
+ * @constant
+ */
+ UNSIGNED_BYTE: WebGLConstants$1.UNSIGNED_BYTE,
+ /**
+ * 16-bit signed short corresponding to SHORT and the type
+ * of an element in Int16Array.
+ *
+ * @type {number}
+ * @constant
+ */
+ SHORT: WebGLConstants$1.SHORT,
+ /**
+ * 16-bit unsigned short corresponding to UNSIGNED_SHORT and the type
+ * of an element in Uint16Array.
+ *
+ * @type {number}
+ * @constant
+ */
+ UNSIGNED_SHORT: WebGLConstants$1.UNSIGNED_SHORT,
+ /**
+ * 32-bit signed int corresponding to INT and the type
+ * of an element in Int32Array.
+ *
+ * @memberOf ComponentDatatype
+ *
+ * @type {number}
+ * @constant
+ */
+ INT: WebGLConstants$1.INT,
+ /**
+ * 32-bit unsigned int corresponding to UNSIGNED_INT and the type
+ * of an element in Uint32Array.
+ *
+ * @memberOf ComponentDatatype
+ *
+ * @type {number}
+ * @constant
+ */
+ UNSIGNED_INT: WebGLConstants$1.UNSIGNED_INT,
+ /**
+ * 32-bit floating-point corresponding to FLOAT and the type
+ * of an element in Float32Array.
+ *
+ * @type {number}
+ * @constant
+ */
+ FLOAT: WebGLConstants$1.FLOAT,
+ /**
+ * 64-bit floating-point corresponding to gl.DOUBLE (in Desktop OpenGL;
+ * this is not supported in WebGL, and is emulated in Cesium via {@link GeometryPipeline.encodeAttribute})
+ * and the type of an element in Float64Array.
+ *
+ * @memberOf ComponentDatatype
+ *
+ * @type {number}
+ * @constant
+ * @default 0x140A
+ */
+ DOUBLE: WebGLConstants$1.DOUBLE
+};
+ComponentDatatype.getSizeInBytes = function(e) {
+ switch (e) {
+ case ComponentDatatype.BYTE:
+ return Int8Array.BYTES_PER_ELEMENT;
+ case ComponentDatatype.UNSIGNED_BYTE:
+ return Uint8Array.BYTES_PER_ELEMENT;
+ case ComponentDatatype.SHORT:
+ return Int16Array.BYTES_PER_ELEMENT;
+ case ComponentDatatype.UNSIGNED_SHORT:
+ return Uint16Array.BYTES_PER_ELEMENT;
+ case ComponentDatatype.INT:
+ return Int32Array.BYTES_PER_ELEMENT;
+ case ComponentDatatype.UNSIGNED_INT:
+ return Uint32Array.BYTES_PER_ELEMENT;
+ case ComponentDatatype.FLOAT:
+ return Float32Array.BYTES_PER_ELEMENT;
+ case ComponentDatatype.DOUBLE:
+ return Float64Array.BYTES_PER_ELEMENT;
+ }
+};
+ComponentDatatype.fromTypedArray = function(e) {
+ if (e instanceof Int8Array)
+ return ComponentDatatype.BYTE;
+ if (e instanceof Uint8Array)
+ return ComponentDatatype.UNSIGNED_BYTE;
+ if (e instanceof Int16Array)
+ return ComponentDatatype.SHORT;
+ if (e instanceof Uint16Array)
+ return ComponentDatatype.UNSIGNED_SHORT;
+ if (e instanceof Int32Array)
+ return ComponentDatatype.INT;
+ if (e instanceof Uint32Array)
+ return ComponentDatatype.UNSIGNED_INT;
+ if (e instanceof Float32Array)
+ return ComponentDatatype.FLOAT;
+ if (e instanceof Float64Array)
+ return ComponentDatatype.DOUBLE;
+};
+ComponentDatatype.validate = function(e) {
+ return defined(e) && (e === ComponentDatatype.BYTE || e === ComponentDatatype.UNSIGNED_BYTE || e === ComponentDatatype.SHORT || e === ComponentDatatype.UNSIGNED_SHORT || e === ComponentDatatype.INT || e === ComponentDatatype.UNSIGNED_INT || e === ComponentDatatype.FLOAT || e === ComponentDatatype.DOUBLE);
+};
+ComponentDatatype.createTypedArray = function(e, t) {
+ switch (e) {
+ case ComponentDatatype.BYTE:
+ return new Int8Array(t);
+ case ComponentDatatype.UNSIGNED_BYTE:
+ return new Uint8Array(t);
+ case ComponentDatatype.SHORT:
+ return new Int16Array(t);
+ case ComponentDatatype.UNSIGNED_SHORT:
+ return new Uint16Array(t);
+ case ComponentDatatype.INT:
+ return new Int32Array(t);
+ case ComponentDatatype.UNSIGNED_INT:
+ return new Uint32Array(t);
+ case ComponentDatatype.FLOAT:
+ return new Float32Array(t);
+ case ComponentDatatype.DOUBLE:
+ return new Float64Array(t);
+ }
+};
+ComponentDatatype.createArrayBufferView = function(e, t, n, i) {
+ switch (n = defaultValue(n, 0), i = defaultValue(
+ i,
+ (t.byteLength - n) / ComponentDatatype.getSizeInBytes(e)
+ ), e) {
+ case ComponentDatatype.BYTE:
+ return new Int8Array(t, n, i);
+ case ComponentDatatype.UNSIGNED_BYTE:
+ return new Uint8Array(t, n, i);
+ case ComponentDatatype.SHORT:
+ return new Int16Array(t, n, i);
+ case ComponentDatatype.UNSIGNED_SHORT:
+ return new Uint16Array(t, n, i);
+ case ComponentDatatype.INT:
+ return new Int32Array(t, n, i);
+ case ComponentDatatype.UNSIGNED_INT:
+ return new Uint32Array(t, n, i);
+ case ComponentDatatype.FLOAT:
+ return new Float32Array(t, n, i);
+ case ComponentDatatype.DOUBLE:
+ return new Float64Array(t, n, i);
+ }
+};
+ComponentDatatype.fromName = function(e) {
+ switch (e) {
+ case "BYTE":
+ return ComponentDatatype.BYTE;
+ case "UNSIGNED_BYTE":
+ return ComponentDatatype.UNSIGNED_BYTE;
+ case "SHORT":
+ return ComponentDatatype.SHORT;
+ case "UNSIGNED_SHORT":
+ return ComponentDatatype.UNSIGNED_SHORT;
+ case "INT":
+ return ComponentDatatype.INT;
+ case "UNSIGNED_INT":
+ return ComponentDatatype.UNSIGNED_INT;
+ case "FLOAT":
+ return ComponentDatatype.FLOAT;
+ case "DOUBLE":
+ return ComponentDatatype.DOUBLE;
+ }
+};
+const ComponentDatatype$1 = Object.freeze(ComponentDatatype), warnings = {};
+function oneTimeWarning(e, t) {
+ defined(warnings[e]) || (warnings[e] = !0, console.warn(defaultValue(t, e)));
+}
+oneTimeWarning.geometryOutlines = "Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.";
+oneTimeWarning.geometryZIndex = "Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored";
+oneTimeWarning.geometryHeightReference = "Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored";
+oneTimeWarning.geometryExtrudedHeightReference = "Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";
+function deprecationWarning(e, t) {
+ oneTimeWarning(e, t);
+}
+const GeometryType = {
+ NONE: 0,
+ TRIANGLES: 1,
+ LINES: 2,
+ POLYLINES: 3
+}, GeometryType$1 = Object.freeze(GeometryType);
+function Geometry(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this.attributes = e.attributes, this.indices = e.indices, this.primitiveType = defaultValue(
+ e.primitiveType,
+ PrimitiveType$1.TRIANGLES
+ ), this.boundingSphere = e.boundingSphere, this.geometryType = defaultValue(e.geometryType, GeometryType$1.NONE), this.boundingSphereCV = e.boundingSphereCV, this.offsetAttribute = e.offsetAttribute;
+}
+Geometry.computeNumberOfVertices = function(e) {
+ let t = -1;
+ for (const n in e.attributes)
+ if (e.attributes.hasOwnProperty(n) && defined(e.attributes[n]) && defined(e.attributes[n].values)) {
+ const i = e.attributes[n];
+ t = i.values.length / i.componentsPerAttribute;
+ }
+ return t;
+};
+const rectangleCenterScratch$3 = new Cartographic(), enuCenterScratch = new Cartesian3(), fixedFrameToEnuScratch = new Matrix4(), boundingRectanglePointsCartographicScratch = [
+ new Cartographic(),
+ new Cartographic(),
+ new Cartographic()
+], boundingRectanglePointsEnuScratch = [
+ new Cartesian2(),
+ new Cartesian2(),
+ new Cartesian2()
+], points2DScratch$2 = [new Cartesian2(), new Cartesian2(), new Cartesian2()], pointEnuScratch = new Cartesian3(), enuRotationScratch = new Quaternion(), enuRotationMatrixScratch = new Matrix4(), rotation2DScratch$1 = new Matrix2();
+Geometry._textureCoordinateRotationPoints = function(e, t, n, i) {
+ let r;
+ const o = Rectangle.center(
+ i,
+ rectangleCenterScratch$3
+ ), s = Cartographic.toCartesian(
+ o,
+ n,
+ enuCenterScratch
+ ), c = Transforms.eastNorthUpToFixedFrame(
+ s,
+ n,
+ fixedFrameToEnuScratch
+ ), l = Matrix4.inverse(
+ c,
+ fixedFrameToEnuScratch
+ ), d = boundingRectanglePointsEnuScratch, f = boundingRectanglePointsCartographicScratch;
+ f[0].longitude = i.west, f[0].latitude = i.south, f[1].longitude = i.west, f[1].latitude = i.north, f[2].longitude = i.east, f[2].latitude = i.south;
+ let h = pointEnuScratch;
+ for (r = 0; r < 3; r++)
+ Cartographic.toCartesian(f[r], n, h), h = Matrix4.multiplyByPointAsVector(l, h, h), d[r].x = h.x, d[r].y = h.y;
+ const p = Quaternion.fromAxisAngle(
+ Cartesian3.UNIT_Z,
+ -t,
+ enuRotationScratch
+ ), m = Matrix3.fromQuaternion(
+ p,
+ enuRotationMatrixScratch
+ ), _ = e.length;
+ let y = Number.POSITIVE_INFINITY, C = Number.POSITIVE_INFINITY, T = Number.NEGATIVE_INFINITY, x = Number.NEGATIVE_INFINITY;
+ for (r = 0; r < _; r++)
+ h = Matrix4.multiplyByPointAsVector(
+ l,
+ e[r],
+ h
+ ), h = Matrix3.multiplyByVector(m, h, h), y = Math.min(y, h.x), C = Math.min(C, h.y), T = Math.max(T, h.x), x = Math.max(x, h.y);
+ const b = Matrix2.fromRotation(
+ t,
+ rotation2DScratch$1
+ ), S = points2DScratch$2;
+ S[0].x = y, S[0].y = C, S[1].x = y, S[1].y = x, S[2].x = T, S[2].y = C;
+ const E = d[0], A = d[2].x - E.x, D = d[1].y - E.y;
+ for (r = 0; r < 3; r++) {
+ const L = S[r];
+ Matrix2.multiplyByVector(b, L, L), L.x = (L.x - E.x) / A, L.y = (L.y - E.y) / D;
+ }
+ const P = S[0], I = S[1], M = S[2], R = new Array(6);
+ return Cartesian2.pack(P, R), Cartesian2.pack(I, R, 2), Cartesian2.pack(M, R, 4), R;
+};
+function GeometryAttribute(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this.componentDatatype = e.componentDatatype, this.componentsPerAttribute = e.componentsPerAttribute, this.normalize = defaultValue(e.normalize, !1), this.values = e.values;
+}
+function CompressedTextureBuffer(e, t, n, i, r) {
+ this._format = e, this._datatype = t, this._width = n, this._height = i, this._buffer = r;
+}
+Object.defineProperties(CompressedTextureBuffer.prototype, {
+ /**
+ * The format of the compressed texture.
+ * @type {PixelFormat}
+ * @readonly
+ * @memberof CompressedTextureBuffer.prototype
+ */
+ internalFormat: {
+ get: function() {
+ return this._format;
+ }
+ },
+ /**
+ * The datatype of the compressed texture.
+ * @type {PixelDatatype}
+ * @readonly
+ * @memberof CompressedTextureBuffer.prototype
+ */
+ pixelDatatype: {
+ get: function() {
+ return this._datatype;
+ }
+ },
+ /**
+ * The width of the texture.
+ * @type {number}
+ * @readonly
+ * @memberof CompressedTextureBuffer.prototype
+ */
+ width: {
+ get: function() {
+ return this._width;
+ }
+ },
+ /**
+ * The height of the texture.
+ * @type {number}
+ * @readonly
+ * @memberof CompressedTextureBuffer.prototype
+ */
+ height: {
+ get: function() {
+ return this._height;
+ }
+ },
+ /**
+ * The compressed texture buffer.
+ * @type {Uint8Array}
+ * @readonly
+ * @memberof CompressedTextureBuffer.prototype
+ */
+ bufferView: {
+ get: function() {
+ return this._buffer;
+ }
+ },
+ /**
+ * The compressed texture buffer. Alias for bufferView.
+ * @type {Uint8Array}
+ * @readonly
+ * @memberof CompressedTextureBuffer.prototype
+ */
+ arrayBufferView: {
+ get: function() {
+ return this._buffer;
+ }
+ }
+});
+CompressedTextureBuffer.clone = function(e) {
+ if (defined(e))
+ return new CompressedTextureBuffer(
+ e._format,
+ e._datatype,
+ e._width,
+ e._height,
+ e._buffer
+ );
+};
+CompressedTextureBuffer.prototype.clone = function() {
+ return CompressedTextureBuffer.clone(this);
+};
+function canTransferArrayBuffer() {
+ if (!defined(TaskProcessor._canTransferArrayBuffer)) {
+ const e = createWorker("transferTypedArrayTest");
+ e.postMessage = defaultValue(
+ e.webkitPostMessage,
+ e.postMessage
+ );
+ const t = 99, n = new Int8Array([t]);
+ try {
+ e.postMessage(
+ {
+ array: n
+ },
+ [n.buffer]
+ );
+ } catch {
+ return TaskProcessor._canTransferArrayBuffer = !1, TaskProcessor._canTransferArrayBuffer;
+ }
+ TaskProcessor._canTransferArrayBuffer = new Promise((i) => {
+ e.onmessage = function(r) {
+ const o = r.data.array, s = defined(o) && o[0] === t;
+ i(s), e.terminate(), TaskProcessor._canTransferArrayBuffer = s;
+ };
+ });
+ }
+ return TaskProcessor._canTransferArrayBuffer;
+}
+const taskCompletedEvent = new Event();
+function urlFromScript(e) {
+ let t;
+ try {
+ t = new Blob([e], {
+ type: "application/javascript"
+ });
+ } catch {
+ const r = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder, o = new r();
+ o.append(e), t = o.getBlob("application/javascript");
+ }
+ return (window.URL || window.webkitURL).createObjectURL(t);
+}
+function createWorker(e) {
+ const t = new Uri(e), n = t.scheme().length !== 0 && t.fragment().length === 0, i = e.replace(/\.js$/, ""), r = {};
+ let o, s;
+ if (isCrossOriginUrl(e))
+ s = e;
+ else if (!n) {
+ const c = buildModuleUrl(
+ `${TaskProcessor._workerModulePrefix}/${i}.js`
+ );
+ isCrossOriginUrl(c) && (s = c);
+ }
+ if (s) {
+ const c = `import "${s}";`;
+ return o = urlFromScript(c), r.type = "module", new Worker(o, r);
+ }
+ if (!n && typeof CESIUM_WORKERS < "u") {
+ const c = `
+ importScripts("${urlFromScript(CESIUM_WORKERS)}");
+ CesiumWorkers["${i}"]();
+ `;
+ return o = urlFromScript(c), new Worker(o, r);
+ }
+ if (o = e, n || (o = buildModuleUrl(
+ `${TaskProcessor._workerModulePrefix + i}.js`
+ )), !FeatureDetection.supportsEsmWebWorkers())
+ throw new RuntimeError(
+ "This browser is not supported. Please update your browser to continue."
+ );
+ return r.type = "module", new Worker(o, r);
+}
+async function getWebAssemblyLoaderConfig(e, t) {
+ const n = {
+ modulePath: void 0,
+ wasmBinaryFile: void 0,
+ wasmBinary: void 0
+ };
+ if (!FeatureDetection.supportsWebAssembly()) {
+ if (!defined(t.fallbackModulePath))
+ throw new RuntimeError(
+ `This browser does not support Web Assembly, and no backup module was provided for ${e._workerPath}`
+ );
+ return n.modulePath = buildModuleUrl(t.fallbackModulePath), n;
+ }
+ n.wasmBinaryFile = buildModuleUrl(t.wasmBinaryFile);
+ const i = await Resource.fetchArrayBuffer({
+ url: n.wasmBinaryFile
+ });
+ return n.wasmBinary = i, n;
+}
+function TaskProcessor(e, t) {
+ this._workerPath = e, this._maximumActiveTasks = defaultValue(
+ t,
+ Number.POSITIVE_INFINITY
+ ), this._activeTasks = 0, this._nextID = 0, this._webAssemblyPromise = void 0;
+}
+const createOnmessageHandler = (e, t, n, i) => {
+ const r = ({ data: o }) => {
+ if (o.id === t) {
+ if (defined(o.error)) {
+ let s = o.error;
+ s.name === "RuntimeError" ? (s = new RuntimeError(o.error.message), s.stack = o.error.stack) : s.name === "DeveloperError" ? (s = new DeveloperError(o.error.message), s.stack = o.error.stack) : s.name === "Error" && (s = new Error(o.error.message), s.stack = o.error.stack), taskCompletedEvent.raiseEvent(s), i(s);
+ } else
+ taskCompletedEvent.raiseEvent(), n(o.result);
+ e.removeEventListener("message", r);
+ }
+ };
+ return r;
+}, emptyTransferableObjectArray = [];
+async function runTask(e, t, n) {
+ const i = await Promise.resolve(canTransferArrayBuffer());
+ defined(n) ? i || (n.length = 0) : n = emptyTransferableObjectArray;
+ const r = e._nextID++, o = new Promise((s, c) => {
+ e._worker.addEventListener(
+ "message",
+ createOnmessageHandler(e._worker, r, s, c)
+ );
+ });
+ return e._worker.postMessage(
+ {
+ id: r,
+ baseUrl: buildModuleUrl.getCesiumBaseUrl().url,
+ parameters: t,
+ canTransferArrayBuffer: i
+ },
+ n
+ ), o;
+}
+async function scheduleTask(e, t, n) {
+ ++e._activeTasks;
+ try {
+ const i = await runTask(e, t, n);
+ return --e._activeTasks, i;
+ } catch (i) {
+ throw --e._activeTasks, i;
+ }
+}
+TaskProcessor.prototype.scheduleTask = function(e, t) {
+ if (defined(this._worker) || (this._worker = createWorker(this._workerPath)), !(this._activeTasks >= this._maximumActiveTasks))
+ return scheduleTask(this, e, t);
+};
+TaskProcessor.prototype.initWebAssemblyModule = async function(e) {
+ if (defined(this._webAssemblyPromise))
+ return this._webAssemblyPromise;
+ const t = async () => {
+ const n = this._worker = createWorker(this._workerPath), i = await getWebAssemblyLoaderConfig(
+ this,
+ e
+ ), r = await Promise.resolve(canTransferArrayBuffer());
+ let o;
+ const s = i.wasmBinary;
+ defined(s) && r && (o = [s]);
+ const c = new Promise((l, d) => {
+ n.onmessage = function({ data: f }) {
+ defined(f) ? l(f.result) : d(new RuntimeError("Could not configure wasm module"));
+ };
+ });
+ return n.postMessage(
+ {
+ canTransferArrayBuffer: r,
+ parameters: { webAssemblyConfig: i }
+ },
+ o
+ ), c;
+ };
+ return this._webAssemblyPromise = t(), this._webAssemblyPromise;
+};
+TaskProcessor.prototype.isDestroyed = function() {
+ return !1;
+};
+TaskProcessor.prototype.destroy = function() {
+ return defined(this._worker) && this._worker.terminate(), destroyObject(this);
+};
+TaskProcessor.taskCompletedEvent = taskCompletedEvent;
+TaskProcessor._defaultWorkerModulePrefix = "Workers/";
+TaskProcessor._workerModulePrefix = TaskProcessor._defaultWorkerModulePrefix;
+TaskProcessor._canTransferArrayBuffer = void 0;
+function KTX2Transcoder() {
+}
+KTX2Transcoder._transcodeTaskProcessor = new TaskProcessor(
+ "transcodeKTX2",
+ Number.POSITIVE_INFINITY
+ // KTX2 transcoding is used in place of Resource.fetchImage, so it can't reject as "just soooo busy right now"
+);
+KTX2Transcoder._readyPromise = void 0;
+function makeReadyPromise() {
+ const e = KTX2Transcoder._transcodeTaskProcessor.initWebAssemblyModule({
+ wasmBinaryFile: "ThirdParty/basis_transcoder.wasm"
+ }).then(function(t) {
+ if (t)
+ return KTX2Transcoder._transcodeTaskProcessor;
+ throw new RuntimeError("KTX2 transcoder could not be initialized.");
+ });
+ KTX2Transcoder._readyPromise = e;
+}
+KTX2Transcoder.transcode = function(e, t) {
+ return defined(KTX2Transcoder._readyPromise) || makeReadyPromise(), KTX2Transcoder._readyPromise.then(function(n) {
+ let i = e;
+ e instanceof ArrayBuffer && (i = new Uint8Array(e));
+ const r = {
+ supportedTargetFormats: t,
+ ktx2Buffer: i
+ };
+ return n.scheduleTask(r, [i.buffer]);
+ }).then(function(n) {
+ const i = n.length, r = Object.keys(n[0]);
+ for (let o = 0; o < i; o++) {
+ const s = n[o];
+ for (let c = 0; c < r.length; c++) {
+ const l = s[r[c]];
+ s[r[c]] = new CompressedTextureBuffer(
+ l.internalFormat,
+ l.datatype,
+ l.width,
+ l.height,
+ l.levelBuffer
+ );
+ }
+ }
+ if (r.length === 1) {
+ for (let o = 0; o < i; ++o)
+ n[o] = n[o][r[0]];
+ i === 1 && (n = n[0]);
+ }
+ return n;
+ }).catch(function(n) {
+ throw n;
+ });
+};
+let supportedTranscoderFormats;
+loadKTX2.setKTX2SupportedFormats = function(e, t, n, i, r, o) {
+ supportedTranscoderFormats = {
+ s3tc: e,
+ pvrtc: t,
+ astc: n,
+ etc: i,
+ etc1: r,
+ bc7: o
+ };
+};
+function loadKTX2(e) {
+ let t;
+ return e instanceof ArrayBuffer || ArrayBuffer.isView(e) ? t = Promise.resolve(e) : t = Resource.createIfNeeded(e).fetchArrayBuffer(), t.then(function(n) {
+ return KTX2Transcoder.transcode(n, supportedTranscoderFormats);
+ });
+}
+function CubeMapFace(e, t, n, i, r, o, s, c, l, d, f) {
+ this._context = e, this._texture = t, this._textureTarget = n, this._targetFace = i, this._pixelDatatype = s, this._internalFormat = r, this._pixelFormat = o, this._size = c, this._preMultiplyAlpha = l, this._flipY = d, this._initialized = f;
+}
+Object.defineProperties(CubeMapFace.prototype, {
+ pixelFormat: {
+ get: function() {
+ return this._pixelFormat;
+ }
+ },
+ pixelDatatype: {
+ get: function() {
+ return this._pixelDatatype;
+ }
+ },
+ _target: {
+ get: function() {
+ return this._targetFace;
+ }
+ }
+});
+CubeMapFace.prototype.copyFrom = function(e) {
+ const {
+ xOffset: t = 0,
+ yOffset: n = 0,
+ source: i,
+ skipColorSpaceConversion: r = !1
+ } = e, { width: o, height: s } = i, c = this._context._gl, l = this._textureTarget, d = this._targetFace;
+ c.activeTexture(c.TEXTURE0), c.bindTexture(l, this._texture);
+ let f = i.arrayBufferView;
+ const h = this._size, p = this._pixelFormat, m = this._internalFormat, _ = this._pixelDatatype, y = this._preMultiplyAlpha, C = this._flipY;
+ let T = 4;
+ defined(f) && (T = PixelFormat$1.alignmentInBytes(
+ p,
+ _,
+ o
+ )), c.pixelStorei(c.UNPACK_ALIGNMENT, T), r ? c.pixelStorei(c.UNPACK_COLORSPACE_CONVERSION_WEBGL, c.NONE) : c.pixelStorei(
+ c.UNPACK_COLORSPACE_CONVERSION_WEBGL,
+ c.BROWSER_DEFAULT_WEBGL
+ );
+ let x = !1;
+ if (!this._initialized) {
+ let b;
+ t === 0 && n === 0 && o === h && s === h ? (defined(f) ? (c.pixelStorei(c.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !1), c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL, !1), C && (f = PixelFormat$1.flipY(
+ f,
+ p,
+ _,
+ h,
+ h
+ )), b = f) : (c.pixelStorei(c.UNPACK_PREMULTIPLY_ALPHA_WEBGL, y), c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL, C), b = i), x = !0) : (c.pixelStorei(c.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !1), c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL, !1), b = PixelFormat$1.createTypedArray(
+ p,
+ _,
+ h,
+ h
+ )), c.texImage2D(
+ d,
+ 0,
+ m,
+ h,
+ h,
+ 0,
+ p,
+ PixelDatatype$1.toWebGLConstant(_, this._context),
+ b
+ ), this._initialized = !0;
+ }
+ x || (defined(f) ? (c.pixelStorei(c.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !1), c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL, !1), C && (f = PixelFormat$1.flipY(
+ f,
+ p,
+ _,
+ o,
+ s
+ )), c.texSubImage2D(
+ d,
+ 0,
+ t,
+ n,
+ o,
+ s,
+ p,
+ PixelDatatype$1.toWebGLConstant(_, this._context),
+ f
+ )) : (c.pixelStorei(c.UNPACK_PREMULTIPLY_ALPHA_WEBGL, y), c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL, C), c.texSubImage2D(
+ d,
+ 0,
+ t,
+ n,
+ p,
+ PixelDatatype$1.toWebGLConstant(_, this._context),
+ i
+ ))), c.bindTexture(l, null);
+};
+CubeMapFace.prototype.copyFromFramebuffer = function(e, t, n, i, r, o) {
+ e = defaultValue(e, 0), t = defaultValue(t, 0), n = defaultValue(n, 0), i = defaultValue(i, 0), r = defaultValue(r, this._size), o = defaultValue(o, this._size);
+ const s = this._context._gl, c = this._textureTarget;
+ s.activeTexture(s.TEXTURE0), s.bindTexture(c, this._texture), s.copyTexSubImage2D(
+ this._targetFace,
+ 0,
+ e,
+ t,
+ n,
+ i,
+ r,
+ o
+ ), s.bindTexture(c, null), this._initialized = !0;
+};
+const MipmapHint = {
+ DONT_CARE: WebGLConstants$1.DONT_CARE,
+ FASTEST: WebGLConstants$1.FASTEST,
+ NICEST: WebGLConstants$1.NICEST,
+ validate: function(e) {
+ return e === MipmapHint.DONT_CARE || e === MipmapHint.FASTEST || e === MipmapHint.NICEST;
+ }
+}, MipmapHint$1 = Object.freeze(MipmapHint), TextureMagnificationFilter = {
+ /**
+ * Samples the texture by returning the closest pixel.
+ *
+ * @type {number}
+ * @constant
+ */
+ NEAREST: WebGLConstants$1.NEAREST,
+ /**
+ * Samples the texture through bi-linear interpolation of the four nearest pixels. This produces smoother results than NEAREST filtering.
+ *
+ * @type {number}
+ * @constant
+ */
+ LINEAR: WebGLConstants$1.LINEAR
+};
+TextureMagnificationFilter.validate = function(e) {
+ return e === TextureMagnificationFilter.NEAREST || e === TextureMagnificationFilter.LINEAR;
+};
+const TextureMagnificationFilter$1 = Object.freeze(TextureMagnificationFilter), TextureMinificationFilter = {
+ /**
+ * Samples the texture by returning the closest pixel.
+ *
+ * @type {number}
+ * @constant
+ */
+ NEAREST: WebGLConstants$1.NEAREST,
+ /**
+ * Samples the texture through bi-linear interpolation of the four nearest pixels. This produces smoother results than NEAREST filtering.
+ *
+ * @type {number}
+ * @constant
+ */
+ LINEAR: WebGLConstants$1.LINEAR,
+ /**
+ * Selects the nearest mip level and applies nearest sampling within that level.
+ * 1/pi.
+ *
+ * @alias czm_oneOverPi
+ * @glslConstant
+ *
+ * @see CesiumMath.ONE_OVER_PI
+ *
+ * @example
+ * // GLSL declaration
+ * const float czm_oneOverPi = ...;
+ *
+ * // Example
+ * float pi = 1.0 / czm_oneOverPi;
+ */
+const float czm_oneOverPi = 0.3183098861837907;
+`, czm_oneOverTwoPi = `/**
+ * A built-in GLSL floating-point constant for 1/2pi.
+ *
+ * @alias czm_oneOverTwoPi
+ * @glslConstant
+ *
+ * @see CesiumMath.ONE_OVER_TWO_PI
+ *
+ * @example
+ * // GLSL declaration
+ * const float czm_oneOverTwoPi = ...;
+ *
+ * // Example
+ * float pi = 2.0 * czm_oneOverTwoPi;
+ */
+const float czm_oneOverTwoPi = 0.15915494309189535;
+`, czm_passCesium3DTile = `/**
+ * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE}
+ *
+ * @name czm_passCesium3DTile
+ * @glslConstant
+ *
+ * @see czm_pass
+ */
+const float czm_passCesium3DTile = 4.0;
+`, czm_passCesium3DTileClassification = `/**
+ * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION}
+ *
+ * @name czm_passCesium3DTileClassification
+ * @glslConstant
+ *
+ * @see czm_pass
+ */
+const float czm_passCesium3DTileClassification = 5.0;
+`, czm_passCesium3DTileClassificationIgnoreShow = `/**
+ * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW}
+ *
+ * @name czm_passCesium3DTileClassificationIgnoreShow
+ * @glslConstant
+ *
+ * @see czm_pass
+ */
+const float czm_passCesium3DTileClassificationIgnoreShow = 6.0;
+`, czm_passClassification = `/**
+ * The automatic GLSL constant for {@link Pass#CLASSIFICATION}
+ *
+ * @name czm_passClassification
+ * @glslConstant
+ *
+ * @see czm_pass
+ */
+const float czm_passClassification = 7.0;
+`, czm_passCompute = `/**
+ * The automatic GLSL constant for {@link Pass#COMPUTE}
+ *
+ * @name czm_passCompute
+ * @glslConstant
+ *
+ * @see czm_pass
+ */
+const float czm_passCompute = 1.0;
+`, czm_passEnvironment = `/**
+ * The automatic GLSL constant for {@link Pass#ENVIRONMENT}
+ *
+ * @name czm_passEnvironment
+ * @glslConstant
+ *
+ * @see czm_pass
+ */
+const float czm_passEnvironment = 0.0;
+`, czm_passGlobe = `/**
+ * The automatic GLSL constant for {@link Pass#GLOBE}
+ *
+ * @name czm_passGlobe
+ * @glslConstant
+ *
+ * @see czm_pass
+ */
+const float czm_passGlobe = 2.0;
+`, czm_passOpaque = `/**
+ * The automatic GLSL constant for {@link Pass#OPAQUE}
+ *
+ * @name czm_passOpaque
+ * @glslConstant
+ *
+ * @see czm_pass
+ */
+const float czm_passOpaque = 7.0;
+`, czm_passOverlay = `/**
+ * The automatic GLSL constant for {@link Pass#OVERLAY}
+ *
+ * @name czm_passOverlay
+ * @glslConstant
+ *
+ * @see czm_pass
+ */
+const float czm_passOverlay = 10.0;
+`, czm_passTerrainClassification = `/**
+ * The automatic GLSL constant for {@link Pass#TERRAIN_CLASSIFICATION}
+ *
+ * @name czm_passTerrainClassification
+ * @glslConstant
+ *
+ * @see czm_pass
+ */
+const float czm_passTerrainClassification = 3.0;
+`, czm_passTranslucent = `/**
+ * The automatic GLSL constant for {@link Pass#TRANSLUCENT}
+ *
+ * @name czm_passTranslucent
+ * @glslConstant
+ *
+ * @see czm_pass
+ */
+const float czm_passTranslucent = 8.0;
+`, czm_passVoxels = `/**
+ * The automatic GLSL constant for {@link Pass#VOXELS}
+ *
+ * @name czm_passVoxels
+ * @glslConstant
+ *
+ * @see czm_pass
+ */
+const float czm_passVoxels = 9.0;
+`, czm_pi = `/**
+ * A built-in GLSL floating-point constant for Math.PI.
+ *
+ * @alias czm_pi
+ * @glslConstant
+ *
+ * @see CesiumMath.PI
+ *
+ * @example
+ * // GLSL declaration
+ * const float czm_pi = ...;
+ *
+ * // Example
+ * float twoPi = 2.0 * czm_pi;
+ */
+const float czm_pi = 3.141592653589793;
+`, czm_piOverFour = `/**
+ * A built-in GLSL floating-point constant for pi/4.
+ *
+ * @alias czm_piOverFour
+ * @glslConstant
+ *
+ * @see CesiumMath.PI_OVER_FOUR
+ *
+ * @example
+ * // GLSL declaration
+ * const float czm_piOverFour = ...;
+ *
+ * // Example
+ * float pi = 4.0 * czm_piOverFour;
+ */
+const float czm_piOverFour = 0.7853981633974483;
+`, czm_piOverSix = `/**
+ * A built-in GLSL floating-point constant for pi/6.
+ *
+ * @alias czm_piOverSix
+ * @glslConstant
+ *
+ * @see CesiumMath.PI_OVER_SIX
+ *
+ * @example
+ * // GLSL declaration
+ * const float czm_piOverSix = ...;
+ *
+ * // Example
+ * float pi = 6.0 * czm_piOverSix;
+ */
+const float czm_piOverSix = 0.5235987755982988;
+`, czm_piOverThree = `/**
+ * A built-in GLSL floating-point constant for pi/3.
+ *
+ * @alias czm_piOverThree
+ * @glslConstant
+ *
+ * @see CesiumMath.PI_OVER_THREE
+ *
+ * @example
+ * // GLSL declaration
+ * const float czm_piOverThree = ...;
+ *
+ * // Example
+ * float pi = 3.0 * czm_piOverThree;
+ */
+const float czm_piOverThree = 1.0471975511965976;
+`, czm_piOverTwo = `/**
+ * A built-in GLSL floating-point constant for pi/2.
+ *
+ * @alias czm_piOverTwo
+ * @glslConstant
+ *
+ * @see CesiumMath.PI_OVER_TWO
+ *
+ * @example
+ * // GLSL declaration
+ * const float czm_piOverTwo = ...;
+ *
+ * // Example
+ * float pi = 2.0 * czm_piOverTwo;
+ */
+const float czm_piOverTwo = 1.5707963267948966;
+`, czm_radiansPerDegree = `/**
+ * A built-in GLSL floating-point constant for converting degrees to radians.
+ *
+ * @alias czm_radiansPerDegree
+ * @glslConstant
+ *
+ * @see CesiumMath.RADIANS_PER_DEGREE
+ *
+ * @example
+ * // GLSL declaration
+ * const float czm_radiansPerDegree = ...;
+ *
+ * // Example
+ * float rad = czm_radiansPerDegree * deg;
+ */
+const float czm_radiansPerDegree = 0.017453292519943295;
+`, czm_sceneMode2D = `/**
+ * The constant identifier for the 2D {@link SceneMode}
+ *
+ * @name czm_sceneMode2D
+ * @glslConstant
+ * @see czm_sceneMode
+ * @see czm_sceneModeColumbusView
+ * @see czm_sceneMode3D
+ * @see czm_sceneModeMorphing
+ */
+const float czm_sceneMode2D = 2.0;
+`, czm_sceneMode3D = `/**
+ * The constant identifier for the 3D {@link SceneMode}
+ *
+ * @name czm_sceneMode3D
+ * @glslConstant
+ * @see czm_sceneMode
+ * @see czm_sceneMode2D
+ * @see czm_sceneModeColumbusView
+ * @see czm_sceneModeMorphing
+ */
+const float czm_sceneMode3D = 3.0;
+`, czm_sceneModeColumbusView = `/**
+ * The constant identifier for the Columbus View {@link SceneMode}
+ *
+ * @name czm_sceneModeColumbusView
+ * @glslConstant
+ * @see czm_sceneMode
+ * @see czm_sceneMode2D
+ * @see czm_sceneMode3D
+ * @see czm_sceneModeMorphing
+ */
+const float czm_sceneModeColumbusView = 1.0;
+`, czm_sceneModeMorphing = `/**
+ * The constant identifier for the Morphing {@link SceneMode}
+ *
+ * @name czm_sceneModeMorphing
+ * @glslConstant
+ * @see czm_sceneMode
+ * @see czm_sceneMode2D
+ * @see czm_sceneModeColumbusView
+ * @see czm_sceneMode3D
+ */
+const float czm_sceneModeMorphing = 0.0;
+`, czm_solarRadius = `/**
+ * A built-in GLSL floating-point constant for one solar radius.
+ *
+ * @alias czm_solarRadius
+ * @glslConstant
+ *
+ * @see CesiumMath.SOLAR_RADIUS
+ *
+ * @example
+ * // GLSL declaration
+ * const float czm_solarRadius = ...;
+ */
+const float czm_solarRadius = 695500000.0;
+`, czm_threePiOver2 = `/**
+ * A built-in GLSL floating-point constant for 3pi/2.
+ *
+ * @alias czm_threePiOver2
+ * @glslConstant
+ *
+ * @see CesiumMath.THREE_PI_OVER_TWO
+ *
+ * @example
+ * // GLSL declaration
+ * const float czm_threePiOver2 = ...;
+ *
+ * // Example
+ * float pi = (2.0 / 3.0) * czm_threePiOver2;
+ */
+const float czm_threePiOver2 = 4.71238898038469;
+`, czm_twoPi = `/**
+ * A built-in GLSL floating-point constant for 2pi.
+ *
+ * @alias czm_twoPi
+ * @glslConstant
+ *
+ * @see CesiumMath.TWO_PI
+ *
+ * @example
+ * // GLSL declaration
+ * const float czm_twoPi = ...;
+ *
+ * // Example
+ * float pi = czm_twoPi / 2.0;
+ */
+const float czm_twoPi = 6.283185307179586;
+`, czm_webMercatorMaxLatitude = `/**
+ * The maximum latitude, in radians, both North and South, supported by a Web Mercator
+ * (EPSG:3857) projection. Technically, the Mercator projection is defined
+ * for any latitude up to (but not including) 90 degrees, but it makes sense
+ * to cut it off sooner because it grows exponentially with increasing latitude.
+ * The logic behind this particular cutoff value, which is the one used by
+ * Google Maps, Bing Maps, and Esri, is that it makes the projection
+ * square. That is, the rectangle is equal in the X and Y directions.
+ *
+ * The constant value is computed as follows:
+ * czm_pi * 0.5 - (2.0 * atan(exp(-czm_pi)))
+ *
+ * @name czm_webMercatorMaxLatitude
+ * @glslConstant
+ */
+const float czm_webMercatorMaxLatitude = 1.4844222297453324;
+`, czm_depthRangeStruct = `/**
+ * @name czm_depthRangeStruct
+ * @glslStruct
+ */
+struct czm_depthRangeStruct
+{
+ float near;
+ float far;
+};
+`, czm_material = `/**
+ * Holds material information that can be used for lighting. Returned by all czm_getMaterial functions.
+ *
+ * @name czm_material
+ * @glslStruct
+ *
+ * @property {vec3} diffuse Incoming light that scatters evenly in all directions.
+ * @property {float} specular Intensity of incoming light reflecting in a single direction.
+ * @property {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.
+ * @property {vec3} normal Surface's normal in eye coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal.
+ * @property {vec3} emission Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light.
+ * @property {float} alpha Alpha of this material. 0.0 is completely transparent; 1.0 is completely opaque.
+ */
+struct czm_material
+{
+ vec3 diffuse;
+ float specular;
+ float shininess;
+ vec3 normal;
+ vec3 emission;
+ float alpha;
+};
+`, czm_materialInput = `/**
+ * Used as input to every material's czm_getMaterial function.
+ *
+ * @name czm_materialInput
+ * @glslStruct
+ *
+ * @property {float} s 1D texture coordinates.
+ * @property {vec2} st 2D texture coordinates.
+ * @property {vec3} str 3D texture coordinates.
+ * @property {vec3} normalEC Unperturbed surface normal in eye coordinates.
+ * @property {mat3} tangentToEyeMatrix Matrix for converting a tangent space normal to eye space.
+ * @property {vec3} positionToEyeEC Vector from the fragment to the eye in eye coordinates. The magnitude is the distance in meters from the fragment to the eye.
+ * @property {float} height The height of the terrain in meters above or below the ellipsoid. Only available for globe materials.
+ * @property {float} slope The slope of the terrain in radians. 0 is flat; pi/2 is vertical. Only available for globe materials.
+ * @property {float} aspect The aspect of the terrain in radians. 0 is East, pi/2 is North, pi is West, 3pi/2 is South. Only available for globe materials.
+* @property {float} waterMask The value of the water mask. 0 is land, 1 is water. Only available for globe materials.
+ */
+struct czm_materialInput
+{
+ float s;
+ vec2 st;
+ vec3 str;
+ vec3 normalEC;
+ mat3 tangentToEyeMatrix;
+ vec3 positionToEyeEC;
+ float height;
+ float slope;
+ float aspect;
+ float waterMask;
+};
+`, czm_modelMaterial = `/**
+ * Struct for representing a material for a {@link Model}. The model
+ * rendering pipeline will pass this struct between material, custom shaders,
+ * and lighting stages. This is not to be confused with {@link czm_material}
+ * which is used by the older Fabric materials system, although they are similar.
+ * color1 or color2.
+ * @param {float} dist The distance to the edge in texture coordinates.
+ * @param {float} [fuzzFactor=0.1] Controls the blurriness between the two colors.
+ * @returns {vec4} The anti-aliased color.
+ *
+ * @example
+ * // GLSL declarations
+ * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor);
+ * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist);
+ *
+ * // get the color for a material that has a sharp edge at the line y = 0.5 in texture space
+ * float dist = abs(textureCoordinates.t - 0.5);
+ * vec4 currentColor = mix(bottomColor, topColor, step(0.5, textureCoordinates.t));
+ * vec4 color = czm_antialias(bottomColor, topColor, currentColor, dist, 0.1);
+ */
+vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor)
+{
+ float val1 = clamp(dist / fuzzFactor, 0.0, 1.0);
+ float val2 = clamp((dist - 0.5) / fuzzFactor, 0.0, 1.0);
+ val1 = val1 * (1.0 - val2);
+ val1 = val1 * val1 * (3.0 - (2.0 * val1));
+ val1 = pow(val1, 0.5); //makes the transition nicer
+
+ vec4 midColor = (color1 + color2) * 0.5;
+ return mix(midColor, currentColor, val1);
+}
+
+vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist)
+{
+ return czm_antialias(color1, color2, currentColor, dist, 0.1);
+}
+`, czm_applyHSBShift = `/**
+ * Apply a HSB color shift to an RGB color.
+ *
+ * @param {vec3} rgb The color in RGB space.
+ * @param {vec3} hsbShift The amount to shift each component. The xyz components correspond to hue, saturation, and brightness. Shifting the hue by +/- 1.0 corresponds to shifting the hue by a full cycle. Saturation and brightness are clamped between 0 and 1 after the adjustment
+ * @param {bool} ignoreBlackPixels If true, black pixels will be unchanged. This is necessary in some shaders such as atmosphere-related effects.
+ *
+ * @return {vec3} The RGB color after shifting in HSB space and clamping saturation and brightness to a valid range.
+ */
+vec3 czm_applyHSBShift(vec3 rgb, vec3 hsbShift, bool ignoreBlackPixels) {
+ // Convert rgb color to hsb
+ vec3 hsb = czm_RGBToHSB(rgb);
+
+ // Perform hsb shift
+ // Hue cycles around so no clamp is needed.
+ hsb.x += hsbShift.x; // hue
+ hsb.y = clamp(hsb.y + hsbShift.y, 0.0, 1.0); // saturation
+
+ // brightness
+ //
+ // Some shaders such as atmosphere-related effects need to leave black
+ // pixels unchanged
+ if (ignoreBlackPixels) {
+ hsb.z = hsb.z > czm_epsilon7 ? hsb.z + hsbShift.z : 0.0;
+ } else {
+ hsb.z = hsb.z + hsbShift.z;
+ }
+ hsb.z = clamp(hsb.z, 0.0, 1.0);
+
+ // Convert shifted hsb back to rgb
+ return czm_HSBToRGB(hsb);
+}
+`, czm_approximateSphericalCoordinates = `/**
+ * Approximately computes spherical coordinates given a normal.
+ * Uses approximate inverse trigonometry for speed and consistency,
+ * since inverse trigonometry can differ from vendor-to-vendor and when compared with the CPU.
+ *
+ * @name czm_approximateSphericalCoordinates
+ * @glslFunction
+ *
+ * @param {vec3} normal arbitrary-length normal.
+ *
+ * @returns {vec2} Approximate latitude and longitude spherical coordinates.
+ */
+vec2 czm_approximateSphericalCoordinates(vec3 normal) {
+ // Project into plane with vertical for latitude
+ float latitudeApproximation = czm_fastApproximateAtan(sqrt(normal.x * normal.x + normal.y * normal.y), normal.z);
+ float longitudeApproximation = czm_fastApproximateAtan(normal.x, normal.y);
+ return vec2(latitudeApproximation, longitudeApproximation);
+}
+`, czm_approximateTanh = `/**
+ * Compute a rational approximation to tanh(x)
+ *
+ * @param {float} x A real number input
+ * @returns {float} An approximation for tanh(x)
+*/
+float czm_approximateTanh(float x) {
+ float x2 = x * x;
+ return max(-1.0, min(1.0, x * (27.0 + x2) / (27.0 + 9.0 * x2)));
+}
+`, czm_backFacing = `/**
+ * Determines if the fragment is back facing
+ *
+ * @name czm_backFacing
+ * @glslFunction
+ *
+ * @returns {bool} true if the fragment is back facing; otherwise, false.
+ */
+bool czm_backFacing()
+{
+ // !gl_FrontFacing doesn't work as expected on Mac/Intel so use the more verbose form instead. See https://github.com/CesiumGS/cesium/pull/8494.
+ return gl_FrontFacing == false;
+}
+`, czm_branchFreeTernary = `/**
+ * Branchless ternary operator to be used when it's inexpensive to explicitly
+ * evaluate both possibilities for a float expression.
+ *
+ * @name czm_branchFreeTernary
+ * @glslFunction
+ *
+ * @param {bool} comparison A comparison statement
+ * @param {float} a Value to return if the comparison is true.
+ * @param {float} b Value to return if the comparison is false.
+ *
+ * @returns {float} equivalent of comparison ? a : b
+ */
+float czm_branchFreeTernary(bool comparison, float a, float b) {
+ float useA = float(comparison);
+ return a * useA + b * (1.0 - useA);
+}
+
+/**
+ * Branchless ternary operator to be used when it's inexpensive to explicitly
+ * evaluate both possibilities for a vec2 expression.
+ *
+ * @name czm_branchFreeTernary
+ * @glslFunction
+ *
+ * @param {bool} comparison A comparison statement
+ * @param {vec2} a Value to return if the comparison is true.
+ * @param {vec2} b Value to return if the comparison is false.
+ *
+ * @returns {vec2} equivalent of comparison ? a : b
+ */
+vec2 czm_branchFreeTernary(bool comparison, vec2 a, vec2 b) {
+ float useA = float(comparison);
+ return a * useA + b * (1.0 - useA);
+}
+
+/**
+ * Branchless ternary operator to be used when it's inexpensive to explicitly
+ * evaluate both possibilities for a vec3 expression.
+ *
+ * @name czm_branchFreeTernary
+ * @glslFunction
+ *
+ * @param {bool} comparison A comparison statement
+ * @param {vec3} a Value to return if the comparison is true.
+ * @param {vec3} b Value to return if the comparison is false.
+ *
+ * @returns {vec3} equivalent of comparison ? a : b
+ */
+vec3 czm_branchFreeTernary(bool comparison, vec3 a, vec3 b) {
+ float useA = float(comparison);
+ return a * useA + b * (1.0 - useA);
+}
+
+/**
+ * Branchless ternary operator to be used when it's inexpensive to explicitly
+ * evaluate both possibilities for a vec4 expression.
+ *
+ * @name czm_branchFreeTernary
+ * @glslFunction
+ *
+ * @param {bool} comparison A comparison statement
+ * @param {vec3} a Value to return if the comparison is true.
+ * @param {vec3} b Value to return if the comparison is false.
+ *
+ * @returns {vec3} equivalent of comparison ? a : b
+ */
+vec4 czm_branchFreeTernary(bool comparison, vec4 a, vec4 b) {
+ float useA = float(comparison);
+ return a * useA + b * (1.0 - useA);
+}
+`, czm_cascadeColor = `
+vec4 czm_cascadeColor(vec4 weights)
+{
+ return vec4(1.0, 0.0, 0.0, 1.0) * weights.x +
+ vec4(0.0, 1.0, 0.0, 1.0) * weights.y +
+ vec4(0.0, 0.0, 1.0, 1.0) * weights.z +
+ vec4(1.0, 0.0, 1.0, 1.0) * weights.w;
+}
+`, czm_cascadeDistance = `
+uniform vec4 shadowMap_cascadeDistances;
+
+float czm_cascadeDistance(vec4 weights)
+{
+ return dot(shadowMap_cascadeDistances, weights);
+}
+`, czm_cascadeMatrix = `
+uniform mat4 shadowMap_cascadeMatrices[4];
+
+mat4 czm_cascadeMatrix(vec4 weights)
+{
+ return shadowMap_cascadeMatrices[0] * weights.x +
+ shadowMap_cascadeMatrices[1] * weights.y +
+ shadowMap_cascadeMatrices[2] * weights.z +
+ shadowMap_cascadeMatrices[3] * weights.w;
+}
+`, czm_cascadeWeights = `
+uniform vec4 shadowMap_cascadeSplits[2];
+
+vec4 czm_cascadeWeights(float depthEye)
+{
+ // One component is set to 1.0 and all others set to 0.0.
+ vec4 near = step(shadowMap_cascadeSplits[0], vec4(depthEye));
+ vec4 far = step(depthEye, shadowMap_cascadeSplits[1]);
+ return near * far;
+}
+`, czm_clipPolygons = `float getSignedDistance(vec2 uv, highp sampler2D clippingDistance) {
+ float signedDistance = texture(clippingDistance, uv).r;
+ return (signedDistance - 0.5) * 2.0;
+}
+
+void czm_clipPolygons(highp sampler2D clippingDistance, int extentsLength, vec2 clippingPosition, int regionIndex) {
+ // Position is completely outside of polygons bounds
+ vec2 rectUv = clippingPosition;
+ if (regionIndex < 0 || rectUv.x <= 0.0 || rectUv.y <= 0.0 || rectUv.x >= 1.0 || rectUv.y >= 1.0) {
+ #ifdef CLIPPING_INVERSE
+ discard;
+ #endif
+ return;
+ }
+
+ vec2 clippingDistanceTextureDimensions = vec2(textureSize(clippingDistance, 0));
+ vec2 sampleOffset = max(1.0 / clippingDistanceTextureDimensions, vec2(0.005));
+ float dimension = float(extentsLength);
+ if (extentsLength > 2) {
+ dimension = ceil(log2(float(extentsLength)));
+ }
+
+ vec2 textureOffset = vec2(mod(float(regionIndex), dimension), floor(float(regionIndex) / dimension)) / dimension;
+ vec2 uv = textureOffset + rectUv / dimension;
+
+ float signedDistance = getSignedDistance(uv, clippingDistance);
+
+ #ifdef CLIPPING_INVERSE
+ if (signedDistance > 0.0) {
+ discard;
+ }
+ #else
+ if (signedDistance < 0.0) {
+ discard;
+ }
+ #endif
+}
+`, czm_columbusViewMorph = `/**
+ * DOC_TBA
+ *
+ * @name czm_columbusViewMorph
+ * @glslFunction
+ */
+vec4 czm_columbusViewMorph(vec4 position2D, vec4 position3D, float time)
+{
+ // Just linear for now.
+ vec3 p = mix(position2D.xyz, position3D.xyz, time);
+ return vec4(p, 1.0);
+}
+`, czm_computeAtmosphereColor = `/**
+ * Compute the atmosphere color, applying Rayleigh and Mie scattering. This
+ * builtin uses automatic uniforms so the atmophere settings are synced with the
+ * state of the Scene, even in other contexts like Model.
+ *
+ * @name czm_computeAtmosphereColor
+ * @glslFunction
+ *
+ * @param {vec3} positionWC Position of the fragment in world coords (low precision)
+ * @param {vec3} lightDirection Light direction from the sun or other light source.
+ * @param {vec3} rayleighColor The Rayleigh scattering color computed by a scattering function
+ * @param {vec3} mieColor The Mie scattering color computed by a scattering function
+ * @param {float} opacity The opacity computed by a scattering function.
+ */
+vec4 czm_computeAtmosphereColor(
+ vec3 positionWC,
+ vec3 lightDirection,
+ vec3 rayleighColor,
+ vec3 mieColor,
+ float opacity
+) {
+ // Setup the primary ray: from the camera position to the vertex position.
+ vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
+ vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
+
+ float cosAngle = dot(cameraToPositionWCDirection, lightDirection);
+ float cosAngleSq = cosAngle * cosAngle;
+
+ float G = czm_atmosphereMieAnisotropy;
+ float GSq = G * G;
+
+ // The Rayleigh phase function.
+ float rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq);
+ // The Mie phase function.
+ float miePhase = 3.0 / (25.1327412287) * ((1.0 - GSq) * (cosAngleSq + 1.0)) / (pow(1.0 + GSq - 2.0 * cosAngle * G, 1.5) * (2.0 + GSq));
+
+ // The final color is generated by combining the effects of the Rayleigh and Mie scattering.
+ vec3 rayleigh = rayleighPhase * rayleighColor;
+ vec3 mie = miePhase * mieColor;
+
+ vec3 color = (rayleigh + mie) * czm_atmosphereLightIntensity;
+
+ return vec4(color, opacity);
+}
+`, czm_computeGroundAtmosphereScattering = `/**
+ * Compute atmosphere scattering for the ground atmosphere and fog. This method
+ * uses automatic uniforms so it is always synced with the scene settings.
+ *
+ * @name czm_computeGroundAtmosphereScattering
+ * @glslfunction
+ *
+ * @param {vec3} positionWC The position of the fragment in world coordinates.
+ * @param {vec3} lightDirection The direction of the light to calculate the scattering from.
+ * @param {vec3} rayleighColor The variable the Rayleigh scattering will be written to.
+ * @param {vec3} mieColor The variable the Mie scattering will be written to.
+ * @param {float} opacity The variable the transmittance will be written to.
+ */
+void czm_computeGroundAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity) {
+ vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
+ vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
+ czm_ray primaryRay = czm_ray(czm_viewerPositionWC, cameraToPositionWCDirection);
+
+ float atmosphereInnerRadius = length(positionWC);
+
+ czm_computeScattering(
+ primaryRay,
+ length(cameraToPositionWC),
+ lightDirection,
+ atmosphereInnerRadius,
+ rayleighColor,
+ mieColor,
+ opacity
+ );
+}
+`, czm_computePosition = `/**
+ * Returns a position in model coordinates relative to eye taking into
+ * account the current scene mode: 3D, 2D, or Columbus view.
+ * position3DHigh,
+ * position3DLow, position2DHigh, and position2DLow,
+ * and should be used when writing a vertex shader for an {@link Appearance}.
+ *
+ * The ellipsoid is assumed to be centered at the model coordinate's origin.
+ *
+ * @name czm_eastNorthUpToEyeCoordinates
+ * @glslFunction
+ *
+ * @param {vec3} positionMC The position on the ellipsoid in model coordinates.
+ * @param {vec3} normalEC The normalized ellipsoid surface normal, at positionMC, in eye coordinates.
+ *
+ * @returns {mat3} A 3x3 rotation matrix that transforms vectors from the east-north-up coordinate system to eye coordinates.
+ *
+ * @example
+ * // Transform a vector defined in the east-north-up coordinate
+ * // system, (0, 0, 1) which is the surface normal, to eye
+ * // coordinates.
+ * mat3 m = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);
+ * vec3 normalEC = m * vec3(0.0, 0.0, 1.0);
+ */
+mat3 czm_eastNorthUpToEyeCoordinates(vec3 positionMC, vec3 normalEC)
+{
+ vec3 tangentMC = normalize(vec3(-positionMC.y, positionMC.x, 0.0)); // normalized surface tangent in model coordinates
+ vec3 tangentEC = normalize(czm_normal3D * tangentMC); // normalized surface tangent in eye coordinates
+ vec3 bitangentEC = normalize(cross(normalEC, tangentEC)); // normalized surface bitangent in eye coordinates
+
+ return mat3(
+ tangentEC.x, tangentEC.y, tangentEC.z,
+ bitangentEC.x, bitangentEC.y, bitangentEC.z,
+ normalEC.x, normalEC.y, normalEC.z);
+}
+`, czm_ellipsoidContainsPoint = `/**
+ * DOC_TBA
+ *
+ * @name czm_ellipsoidContainsPoint
+ * @glslFunction
+ *
+ */
+bool czm_ellipsoidContainsPoint(vec3 ellipsoid_inverseRadii, vec3 point)
+{
+ vec3 scaled = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(point, 1.0)).xyz;
+ return (dot(scaled, scaled) <= 1.0);
+}
+`, czm_ellipsoidTextureCoordinates = `/**
+ * Approximate uv coordinates based on the ellipsoid normal.
+ *
+ * @name czm_ellipsoidTextureCoordinates
+ * @glslFunction
+ */
+vec2 czm_ellipsoidTextureCoordinates(vec3 normal)
+{
+ return vec2(atan(normal.y, normal.x) * czm_oneOverTwoPi + 0.5, asin(normal.z) * czm_oneOverPi + 0.5);
+}
+`, czm_equalsEpsilon = `/**
+ * Compares left and right componentwise. Returns true
+ * if they are within epsilon and false otherwise. The inputs
+ * left and right can be floats, vec2s,
+ * vec3s, or vec4s.
+ *
+ * @name czm_equalsEpsilon
+ * @glslFunction
+ *
+ * @param {} left The first vector.
+ * @param {} right The second vector.
+ * @param {float} epsilon The epsilon to use for equality testing.
+ * @returns {bool} true if the components are within epsilon and false otherwise.
+ *
+ * @example
+ * // GLSL declarations
+ * bool czm_equalsEpsilon(float left, float right, float epsilon);
+ * bool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon);
+ * bool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon);
+ * bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon);
+ */
+bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon) {
+ return all(lessThanEqual(abs(left - right), vec4(epsilon)));
+}
+
+bool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon) {
+ return all(lessThanEqual(abs(left - right), vec3(epsilon)));
+}
+
+bool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon) {
+ return all(lessThanEqual(abs(left - right), vec2(epsilon)));
+}
+
+bool czm_equalsEpsilon(float left, float right, float epsilon) {
+ return (abs(left - right) <= epsilon);
+}
+`, czm_eyeOffset = `/**
+ * DOC_TBA
+ *
+ * @name czm_eyeOffset
+ * @glslFunction
+ *
+ * @param {vec4} positionEC DOC_TBA.
+ * @param {vec3} eyeOffset DOC_TBA.
+ *
+ * @returns {vec4} DOC_TBA.
+ */
+vec4 czm_eyeOffset(vec4 positionEC, vec3 eyeOffset)
+{
+ // This equation is approximate in x and y.
+ vec4 p = positionEC;
+ vec4 zEyeOffset = normalize(p) * eyeOffset.z;
+ p.xy += eyeOffset.xy + zEyeOffset.xy;
+ p.z += zEyeOffset.z;
+ return p;
+}
+`, czm_eyeToWindowCoordinates = `/**
+ * Transforms a position from eye to window coordinates. The transformation
+ * from eye to clip coordinates is done using {@link czm_projection}.
+ * The transform from normalized device coordinates to window coordinates is
+ * done using {@link czm_viewportTransformation}, which assumes a depth range
+ * of near = 0 and far = 1.
+ *
+ * This transform is useful when there is a need to manipulate window coordinates
+ * in a vertex shader as done by {@link BillboardCollection}.
+ *
+ * @name czm_eyeToWindowCoordinates
+ * @glslFunction
+ *
+ * @param {vec4} position The position in eye coordinates to transform.
+ *
+ * @returns {vec4} The transformed position in window coordinates.
+ *
+ * @see czm_modelToWindowCoordinates
+ * @see czm_projection
+ * @see czm_viewportTransformation
+ * @see BillboardCollection
+ *
+ * @example
+ * vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);
+ */
+vec4 czm_eyeToWindowCoordinates(vec4 positionEC)
+{
+ vec4 q = czm_projection * positionEC; // clip coordinates
+ q.xyz /= q.w; // normalized device coordinates
+ q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates
+ return q;
+}
+`, czm_fastApproximateAtan = `/**
+ * Approxiamtes atan over the range [0, 1]. Safe to flip output for negative input.
+ *
+ * Based on Michal Drobot's approximation from ShaderFastLibs, which in turn is based on
+ * "Efficient approximations for the arctangent function," Rajan, S. Sichun Wang Inkol, R. Joyal, A., May 2006.
+ * Adapted from ShaderFastLibs under MIT License.
+ *
+ * Chosen for the following characteristics over range [0, 1]:
+ * - basically no error at 0 and 1, important for getting around range limit (naive atan2 via atan requires infinite range atan)
+ * - no visible artifacts from first-derivative discontinuities, unlike latitude via range-reduced sqrt asin approximations (at equator)
+ *
+ * The original code is x * (-0.1784 * abs(x) - 0.0663 * x * x + 1.0301);
+ * Removed the abs() in here because it isn't needed, the input range is guaranteed as [0, 1] by how we're approximating atan2.
+ *
+ * @name czm_fastApproximateAtan
+ * @glslFunction
+ *
+ * @param {float} x Value between 0 and 1 inclusive.
+ *
+ * @returns {float} Approximation of atan(x)
+ */
+float czm_fastApproximateAtan(float x) {
+ return x * (-0.1784 * x - 0.0663 * x * x + 1.0301);
+}
+
+/**
+ * Approximation of atan2.
+ *
+ * Range reduction math based on nvidia's cg reference implementation for atan2: http://developer.download.nvidia.com/cg/atan2.html
+ * However, we replaced their atan curve with Michael Drobot's (see above).
+ *
+ * @name czm_fastApproximateAtan
+ * @glslFunction
+ *
+ * @param {float} x Value between -1 and 1 inclusive.
+ * @param {float} y Value between -1 and 1 inclusive.
+ *
+ * @returns {float} Approximation of atan2(x, y)
+ */
+float czm_fastApproximateAtan(float x, float y) {
+ // atan approximations are usually only reliable over [-1, 1], or, in our case, [0, 1] due to modifications.
+ // So range-reduce using abs and by flipping whether x or y is on top.
+ float t = abs(x); // t used as swap and atan result.
+ float opposite = abs(y);
+ float adjacent = max(t, opposite);
+ opposite = min(t, opposite);
+
+ t = czm_fastApproximateAtan(opposite / adjacent);
+
+ // Undo range reduction
+ t = czm_branchFreeTernary(abs(y) > abs(x), czm_piOverTwo - t, t);
+ t = czm_branchFreeTernary(x < 0.0, czm_pi - t, t);
+ t = czm_branchFreeTernary(y < 0.0, -t, t);
+ return t;
+}
+`, czm_fog = `/**
+ * Gets the color with fog at a distance from the camera.
+ *
+ * @name czm_fog
+ * @glslFunction
+ *
+ * @param {float} distanceToCamera The distance to the camera in meters.
+ * @param {vec3} color The original color.
+ * @param {vec3} fogColor The color of the fog.
+ *
+ * @returns {vec3} The color adjusted for fog at the distance from the camera.
+ */
+vec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor)
+{
+ float scalar = distanceToCamera * czm_fogDensity;
+ float fog = 1.0 - exp(-(scalar * scalar));
+ return mix(color, fogColor, fog);
+}
+
+/**
+ * Gets the color with fog at a distance from the camera.
+ *
+ * @name czm_fog
+ * @glslFunction
+ *
+ * @param {float} distanceToCamera The distance to the camera in meters.
+ * @param {vec3} color The original color.
+ * @param {vec3} fogColor The color of the fog.
+ * @param {float} fogModifierConstant A constant to modify the appearance of fog.
+ *
+ * @returns {vec3} The color adjusted for fog at the distance from the camera.
+ */
+vec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor, float fogModifierConstant)
+{
+ float scalar = distanceToCamera * czm_fogDensity;
+ float fog = 1.0 - exp(-((fogModifierConstant * scalar + fogModifierConstant) * (scalar * (1.0 + fogModifierConstant))));
+ return mix(color, fogColor, fog);
+}
+`, czm_gammaCorrect = `/**
+ * Converts a color from RGB space to linear space.
+ *
+ * @name czm_gammaCorrect
+ * @glslFunction
+ *
+ * @param {vec3} color The color in RGB space.
+ * @returns {vec3} The color in linear space.
+ */
+vec3 czm_gammaCorrect(vec3 color) {
+#ifdef HDR
+ color = pow(color, vec3(czm_gamma));
+#endif
+ return color;
+}
+
+vec4 czm_gammaCorrect(vec4 color) {
+#ifdef HDR
+ color.rgb = pow(color.rgb, vec3(czm_gamma));
+#endif
+ return color;
+}
+`, czm_geodeticSurfaceNormal = `/**
+ * DOC_TBA
+ *
+ * @name czm_geodeticSurfaceNormal
+ * @glslFunction
+ *
+ * @param {vec3} positionOnEllipsoid DOC_TBA
+ * @param {vec3} ellipsoidCenter DOC_TBA
+ * @param {vec3} oneOverEllipsoidRadiiSquared DOC_TBA
+ *
+ * @returns {vec3} DOC_TBA.
+ */
+vec3 czm_geodeticSurfaceNormal(vec3 positionOnEllipsoid, vec3 ellipsoidCenter, vec3 oneOverEllipsoidRadiiSquared)
+{
+ return normalize((positionOnEllipsoid - ellipsoidCenter) * oneOverEllipsoidRadiiSquared);
+}
+`, czm_getDefaultMaterial = `/**
+ * An czm_material with default values. Every material's czm_getMaterial
+ * should use this default material as a base for the material it returns.
+ * The default normal value is given by materialInput.normalEC.
+ *
+ * @name czm_getDefaultMaterial
+ * @glslFunction
+ *
+ * @param {czm_materialInput} input The input used to construct the default material.
+ *
+ * @returns {czm_material} The default material.
+ *
+ * @see czm_materialInput
+ * @see czm_material
+ * @see czm_getMaterial
+ */
+czm_material czm_getDefaultMaterial(czm_materialInput materialInput)
+{
+ czm_material material;
+ material.diffuse = vec3(0.0);
+ material.specular = 0.0;
+ material.shininess = 1.0;
+ material.normal = materialInput.normalEC;
+ material.emission = vec3(0.0);
+ material.alpha = 1.0;
+ return material;
+}
+`, czm_getDynamicAtmosphereLightDirection = `/**
+ * Select which direction vector to use for dynamic atmosphere lighting based on an enum value
+ *
+ * @name czm_getDynamicAtmosphereLightDirection
+ * @glslfunction
+ * @see DynamicAtmosphereLightingType.js
+ *
+ * @param {vec3} positionWC the position of the vertex/fragment in world coordinates. This is normalized and returned when dynamic lighting is turned off.
+ * @param {float} lightEnum The enum value for selecting between light sources.
+ * @return {vec3} The normalized light direction vector. Depending on the enum value, it is either positionWC, czm_lightDirectionWC or czm_sunDirectionWC
+ */
+vec3 czm_getDynamicAtmosphereLightDirection(vec3 positionWC, float lightEnum) {
+ const float NONE = 0.0;
+ const float SCENE_LIGHT = 1.0;
+ const float SUNLIGHT = 2.0;
+
+ vec3 lightDirection =
+ positionWC * float(lightEnum == NONE) +
+ czm_lightDirectionWC * float(lightEnum == SCENE_LIGHT) +
+ czm_sunDirectionWC * float(lightEnum == SUNLIGHT);
+ return normalize(lightDirection);
+}
+`, czm_getLambertDiffuse = `/**
+ * Calculates the intensity of diffusely reflected light.
+ *
+ * @name czm_getLambertDiffuse
+ * @glslFunction
+ *
+ * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.
+ * @param {vec3} normalEC The surface normal in eye coordinates.
+ *
+ * @returns {float} The intensity of the diffuse reflection.
+ *
+ * @see czm_phong
+ *
+ * @example
+ * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);
+ * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);
+ * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);
+ */
+float czm_getLambertDiffuse(vec3 lightDirectionEC, vec3 normalEC)
+{
+ return max(dot(lightDirectionEC, normalEC), 0.0);
+}
+`, czm_getSpecular = `/**
+ * Calculates the specular intensity of reflected light.
+ *
+ * @name czm_getSpecular
+ * @glslFunction
+ *
+ * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.
+ * @param {vec3} toEyeEC Unit vector pointing to the eye position in eye coordinates.
+ * @param {vec3} normalEC The surface normal in eye coordinates.
+ * @param {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.
+ *
+ * @returns {float} The intensity of the specular highlight.
+ *
+ * @see czm_phong
+ *
+ * @example
+ * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);
+ * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);
+ * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);
+ */
+float czm_getSpecular(vec3 lightDirectionEC, vec3 toEyeEC, vec3 normalEC, float shininess)
+{
+ vec3 toReflectedLight = reflect(-lightDirectionEC, normalEC);
+ float specular = max(dot(toReflectedLight, toEyeEC), 0.0);
+
+ // pow has undefined behavior if both parameters <= 0.
+ // Prevent this by making sure shininess is at least czm_epsilon2.
+ return pow(specular, max(shininess, czm_epsilon2));
+}
+`, czm_getWaterNoise = `/**
+ * @private
+ */
+vec4 czm_getWaterNoise(sampler2D normalMap, vec2 uv, float time, float angleInRadians)
+{
+ float cosAngle = cos(angleInRadians);
+ float sinAngle = sin(angleInRadians);
+
+ // time dependent sampling directions
+ vec2 s0 = vec2(1.0/17.0, 0.0);
+ vec2 s1 = vec2(-1.0/29.0, 0.0);
+ vec2 s2 = vec2(1.0/101.0, 1.0/59.0);
+ vec2 s3 = vec2(-1.0/109.0, -1.0/57.0);
+
+ // rotate sampling direction by specified angle
+ s0 = vec2((cosAngle * s0.x) - (sinAngle * s0.y), (sinAngle * s0.x) + (cosAngle * s0.y));
+ s1 = vec2((cosAngle * s1.x) - (sinAngle * s1.y), (sinAngle * s1.x) + (cosAngle * s1.y));
+ s2 = vec2((cosAngle * s2.x) - (sinAngle * s2.y), (sinAngle * s2.x) + (cosAngle * s2.y));
+ s3 = vec2((cosAngle * s3.x) - (sinAngle * s3.y), (sinAngle * s3.x) + (cosAngle * s3.y));
+
+ vec2 uv0 = (uv/103.0) + (time * s0);
+ vec2 uv1 = uv/107.0 + (time * s1) + vec2(0.23);
+ vec2 uv2 = uv/vec2(897.0, 983.0) + (time * s2) + vec2(0.51);
+ vec2 uv3 = uv/vec2(991.0, 877.0) + (time * s3) + vec2(0.71);
+
+ uv0 = fract(uv0);
+ uv1 = fract(uv1);
+ uv2 = fract(uv2);
+ uv3 = fract(uv3);
+ vec4 noise = (texture(normalMap, uv0)) +
+ (texture(normalMap, uv1)) +
+ (texture(normalMap, uv2)) +
+ (texture(normalMap, uv3));
+
+ // average and scale to between -1 and 1
+ return ((noise / 4.0) - 0.5) * 2.0;
+}
+`, czm_hue = `/**
+ * Adjusts the hue of a color.
+ *
+ * @name czm_hue
+ * @glslFunction
+ *
+ * @param {vec3} rgb The color.
+ * @param {float} adjustment The amount to adjust the hue of the color in radians.
+ *
+ * @returns {float} The color with the hue adjusted.
+ *
+ * @example
+ * vec3 adjustHue = czm_hue(color, czm_pi); // The same as czm_hue(color, -czm_pi)
+ */
+vec3 czm_hue(vec3 rgb, float adjustment)
+{
+ const mat3 toYIQ = mat3(0.299, 0.587, 0.114,
+ 0.595716, -0.274453, -0.321263,
+ 0.211456, -0.522591, 0.311135);
+ const mat3 toRGB = mat3(1.0, 0.9563, 0.6210,
+ 1.0, -0.2721, -0.6474,
+ 1.0, -1.107, 1.7046);
+
+ vec3 yiq = toYIQ * rgb;
+ float hue = atan(yiq.z, yiq.y) + adjustment;
+ float chroma = sqrt(yiq.z * yiq.z + yiq.y * yiq.y);
+
+ vec3 color = vec3(yiq.x, chroma * cos(hue), chroma * sin(hue));
+ return toRGB * color;
+}
+`, czm_inverseGamma = `/**
+ * Converts a color in linear space to RGB space.
+ *
+ * @name czm_inverseGamma
+ * @glslFunction
+ *
+ * @param {vec3} color The color in linear space.
+ * @returns {vec3} The color in RGB space.
+ */
+vec3 czm_inverseGamma(vec3 color) {
+ return pow(color, vec3(1.0 / czm_gamma));
+}
+`, czm_isEmpty = `/**
+ * Determines if a time interval is empty.
+ *
+ * @name czm_isEmpty
+ * @glslFunction
+ *
+ * @param {czm_raySegment} interval The interval to test.
+ *
+ * @returns {bool} true if the time interval is empty; otherwise, false.
+ *
+ * @example
+ * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true
+ * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false
+ * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.
+ */
+bool czm_isEmpty(czm_raySegment interval)
+{
+ return (interval.stop < 0.0);
+}
+`, czm_isFull = `/**
+ * Determines if a time interval is empty.
+ *
+ * @name czm_isFull
+ * @glslFunction
+ *
+ * @param {czm_raySegment} interval The interval to test.
+ *
+ * @returns {bool} true if the time interval is empty; otherwise, false.
+ *
+ * @example
+ * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true
+ * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false
+ * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.
+ */
+bool czm_isFull(czm_raySegment interval)
+{
+ return (interval.start == 0.0 && interval.stop == czm_infinity);
+}
+`, czm_latitudeToWebMercatorFraction = `/**
+ * Computes the fraction of a Web Wercator rectangle at which a given geodetic latitude is located.
+ *
+ * @name czm_latitudeToWebMercatorFraction
+ * @glslFunction
+ *
+ * @param {float} latitude The geodetic latitude, in radians.
+ * @param {float} southMercatorY The Web Mercator coordinate of the southern boundary of the rectangle.
+ * @param {float} oneOverMercatorHeight The total height of the rectangle in Web Mercator coordinates.
+ *
+ * @returns {float} The fraction of the rectangle at which the latitude occurs. If the latitude is the southern
+ * boundary of the rectangle, the return value will be zero. If it is the northern boundary, the return
+ * value will be 1.0. Latitudes in between are mapped according to the Web Mercator projection.
+ */
+float czm_latitudeToWebMercatorFraction(float latitude, float southMercatorY, float oneOverMercatorHeight)
+{
+ float sinLatitude = sin(latitude);
+ float mercatorY = 0.5 * log((1.0 + sinLatitude) / (1.0 - sinLatitude));
+
+ return (mercatorY - southMercatorY) * oneOverMercatorHeight;
+}
+`, czm_lineDistance = `/**
+ * Computes distance from an point in 2D to a line in 2D.
+ *
+ * @name czm_lineDistance
+ * @glslFunction
+ *
+ * param {vec2} point1 A point along the line.
+ * param {vec2} point2 A point along the line.
+ * param {vec2} point A point that may or may not be on the line.
+ * returns {float} The distance from the point to the line.
+ */
+float czm_lineDistance(vec2 point1, vec2 point2, vec2 point) {
+ return abs((point2.y - point1.y) * point.x - (point2.x - point1.x) * point.y + point2.x * point1.y - point2.y * point1.x) / distance(point2, point1);
+}
+`, czm_linearToSrgb = `/**
+ * Converts a linear RGB color to an sRGB color.
+ *
+ * @param {vec3|vec4} linearIn The color in linear color space.
+ * @returns {vec3|vec4} The color in sRGB color space. The vector type matches the input.
+ */
+vec3 czm_linearToSrgb(vec3 linearIn)
+{
+ return pow(linearIn, vec3(1.0/2.2));
+}
+
+vec4 czm_linearToSrgb(vec4 linearIn)
+{
+ vec3 srgbOut = pow(linearIn.rgb, vec3(1.0/2.2));
+ return vec4(srgbOut, linearIn.a);
+}
+`, czm_luminance = `/**
+ * Computes the luminance of a color.
+ *
+ * @name czm_luminance
+ * @glslFunction
+ *
+ * @param {vec3} rgb The color.
+ *
+ * @returns {float} The luminance.
+ *
+ * @example
+ * float light = czm_luminance(vec3(0.0)); // 0.0
+ * float dark = czm_luminance(vec3(1.0)); // ~1.0
+ */
+float czm_luminance(vec3 rgb)
+{
+ // Algorithm from Chapter 10 of Graphics Shaders.
+ const vec3 W = vec3(0.2125, 0.7154, 0.0721);
+ return dot(rgb, W);
+}
+`, czm_maximumComponent = `/**
+ * Find the maximum component of a vector.
+ *
+ * @name czm_maximumComponent
+ * @glslFunction
+ *
+ * @param {vec2|vec3|vec4} v The input vector.
+ * @returns {float} The value of the largest component.
+ */
+float czm_maximumComponent(vec2 v)
+{
+ return max(v.x, v.y);
+}
+float czm_maximumComponent(vec3 v)
+{
+ return max(max(v.x, v.y), v.z);
+}
+float czm_maximumComponent(vec4 v)
+{
+ return max(max(max(v.x, v.y), v.z), v.w);
+}
+`, czm_metersPerPixel = `/**
+ * Computes the size of a pixel in meters at a distance from the eye.
+ * near = 0 and far = 1.
+ *
+ * This transform is useful when there is a need to manipulate window coordinates
+ * in a vertex shader as done by {@link BillboardCollection}.
+ *
+ * This function should not be confused with {@link czm_viewportOrthographic},
+ * which is an orthographic projection matrix that transforms from window
+ * coordinates to clip coordinates.
+ *
+ * @name czm_modelToWindowCoordinates
+ * @glslFunction
+ *
+ * @param {vec4} position The position in model coordinates to transform.
+ *
+ * @returns {vec4} The transformed position in window coordinates.
+ *
+ * @see czm_eyeToWindowCoordinates
+ * @see czm_modelViewProjection
+ * @see czm_viewportTransformation
+ * @see czm_viewportOrthographic
+ * @see BillboardCollection
+ *
+ * @example
+ * vec4 positionWC = czm_modelToWindowCoordinates(positionMC);
+ */
+vec4 czm_modelToWindowCoordinates(vec4 position)
+{
+ vec4 q = czm_modelViewProjection * position; // clip coordinates
+ q.xyz /= q.w; // normalized device coordinates
+ q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates
+ return q;
+}
+`, czm_multiplyWithColorBalance = `/**
+ * DOC_TBA
+ *
+ * @name czm_multiplyWithColorBalance
+ * @glslFunction
+ */
+vec3 czm_multiplyWithColorBalance(vec3 left, vec3 right)
+{
+ // Algorithm from Chapter 10 of Graphics Shaders.
+ const vec3 W = vec3(0.2125, 0.7154, 0.0721);
+
+ vec3 target = left * right;
+ float leftLuminance = dot(left, W);
+ float rightLuminance = dot(right, W);
+ float targetLuminance = dot(target, W);
+
+ return ((leftLuminance + rightLuminance) / (2.0 * targetLuminance)) * target;
+}
+`, czm_nearFarScalar = `/**
+ * Computes a value that scales with distance. The scaling is clamped at the near and
+ * far distances, and does not extrapolate. This function works with the
+ * {@link NearFarScalar} JavaScript class.
+ *
+ * @name czm_nearFarScalar
+ * @glslFunction
+ *
+ * @param {vec4} nearFarScalar A vector with 4 components: Near distance (x), Near value (y), Far distance (z), Far value (w).
+ * @param {float} cameraDistSq The square of the current distance from the camera.
+ *
+ * @returns {float} The value at this distance.
+ */
+float czm_nearFarScalar(vec4 nearFarScalar, float cameraDistSq)
+{
+ float valueAtMin = nearFarScalar.y;
+ float valueAtMax = nearFarScalar.w;
+ float nearDistanceSq = nearFarScalar.x * nearFarScalar.x;
+ float farDistanceSq = nearFarScalar.z * nearFarScalar.z;
+
+ float t = (cameraDistSq - nearDistanceSq) / (farDistanceSq - nearDistanceSq);
+
+ t = pow(clamp(t, 0.0, 1.0), 0.2);
+
+ return mix(valueAtMin, valueAtMax, t);
+}
+`, czm_octDecode = ` /**
+ * Decodes a unit-length vector in 'oct' encoding to a normalized 3-component Cartesian vector.
+ * The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors",
+ * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/
+ *
+ * @name czm_octDecode
+ * @param {vec2} encoded The oct-encoded, unit-length vector
+ * @param {float} range The maximum value of the SNORM range. The encoded vector is stored in log2(rangeMax+1) bits.
+ * @returns {vec3} The decoded and normalized vector
+ */
+ vec3 czm_octDecode(vec2 encoded, float range)
+ {
+ if (encoded.x == 0.0 && encoded.y == 0.0) {
+ return vec3(0.0, 0.0, 0.0);
+ }
+
+ encoded = encoded / range * 2.0 - 1.0;
+ vec3 v = vec3(encoded.x, encoded.y, 1.0 - abs(encoded.x) - abs(encoded.y));
+ if (v.z < 0.0)
+ {
+ v.xy = (1.0 - abs(v.yx)) * czm_signNotZero(v.xy);
+ }
+
+ return normalize(v);
+ }
+
+/**
+ * Decodes a unit-length vector in 'oct' encoding to a normalized 3-component Cartesian vector.
+ * The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors",
+ * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/
+ *
+ * @name czm_octDecode
+ * @param {vec2} encoded The oct-encoded, unit-length vector
+ * @returns {vec3} The decoded and normalized vector
+ */
+ vec3 czm_octDecode(vec2 encoded)
+ {
+ return czm_octDecode(encoded, 255.0);
+ }
+
+ /**
+ * Decodes a unit-length vector in 'oct' encoding packed into a floating-point number to a normalized 3-component Cartesian vector.
+ * The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors",
+ * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/
+ *
+ * @name czm_octDecode
+ * @param {float} encoded The oct-encoded, unit-length vector
+ * @returns {vec3} The decoded and normalized vector
+ */
+ vec3 czm_octDecode(float encoded)
+ {
+ float temp = encoded / 256.0;
+ float x = floor(temp);
+ float y = (temp - x) * 256.0;
+ return czm_octDecode(vec2(x, y));
+ }
+
+/**
+ * Decodes three unit-length vectors in 'oct' encoding packed into two floating-point numbers to normalized 3-component Cartesian vectors.
+ * The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors",
+ * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/
+ *
+ * @name czm_octDecode
+ * @param {vec2} encoded The packed oct-encoded, unit-length vectors.
+ * @param {vec3} vector1 One decoded and normalized vector.
+ * @param {vec3} vector2 One decoded and normalized vector.
+ * @param {vec3} vector3 One decoded and normalized vector.
+ */
+ void czm_octDecode(vec2 encoded, out vec3 vector1, out vec3 vector2, out vec3 vector3)
+ {
+ float temp = encoded.x / 65536.0;
+ float x = floor(temp);
+ float encodedFloat1 = (temp - x) * 65536.0;
+
+ temp = encoded.y / 65536.0;
+ float y = floor(temp);
+ float encodedFloat2 = (temp - y) * 65536.0;
+
+ vector1 = czm_octDecode(encodedFloat1);
+ vector2 = czm_octDecode(encodedFloat2);
+ vector3 = czm_octDecode(vec2(x, y));
+ }
+
+`, czm_packDepth = `/**
+ * Packs a depth value into a vec3 that can be represented by unsigned bytes.
+ *
+ * @name czm_packDepth
+ * @glslFunction
+ *
+ * @param {float} depth The floating-point depth.
+ * @returns {vec3} The packed depth.
+ */
+vec4 czm_packDepth(float depth)
+{
+ // See Aras Pranckevičius' post Encoding Floats to RGBA
+ // http://aras-p.info/blog/2009/07/30/encoding-floats-to-rgba-the-final/
+ vec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * depth;
+ enc = fract(enc);
+ enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);
+ return enc;
+}
+`, czm_pbrLighting = `vec3 lambertianDiffuse(vec3 diffuseColor)
+{
+ return diffuseColor / czm_pi;
+}
+
+vec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH)
+{
+ float versine = 1.0 - VdotH;
+ // pow(versine, 5.0) is slow. See https://stackoverflow.com/a/68793086/10082269
+ float versineSquared = versine * versine;
+ return f0 + (f90 - f0) * versineSquared * versineSquared * versine;
+}
+
+#ifdef USE_ANISOTROPY
+/**
+ * @param {float} bitangentRoughness Material roughness (along the anisotropy bitangent)
+ * @param {float} tangentialRoughness Anisotropic roughness (along the anisotropy tangent)
+ * @param {vec3} lightDirection The direction from the fragment to the light source, transformed to tangent-bitangent-normal coordinates
+ * @param {vec3} viewDirection The direction from the fragment to the camera, transformed to tangent-bitangent-normal coordinates
+ */
+float smithVisibilityGGX_anisotropic(float bitangentRoughness, float tangentialRoughness, vec3 lightDirection, vec3 viewDirection)
+{
+ vec3 roughnessScale = vec3(tangentialRoughness, bitangentRoughness, 1.0);
+ float GGXV = lightDirection.z * length(roughnessScale * viewDirection);
+ float GGXL = viewDirection.z * length(roughnessScale * lightDirection);
+ float v = 0.5 / (GGXV + GGXL);
+ return clamp(v, 0.0, 1.0);
+}
+
+/**
+ * @param {float} bitangentRoughness Material roughness (along the anisotropy bitangent)
+ * @param {float} tangentialRoughness Anisotropic roughness (along the anisotropy tangent)
+ * @param {vec3} halfwayDirection The unit vector halfway between light and view directions, transformed to tangent-bitangent-normal coordinates
+ */
+float GGX_anisotropic(float bitangentRoughness, float tangentialRoughness, vec3 halfwayDirection)
+{
+ float roughnessSquared = bitangentRoughness * tangentialRoughness;
+ vec3 f = halfwayDirection * vec3(bitangentRoughness, tangentialRoughness, roughnessSquared);
+ float w2 = roughnessSquared / dot(f, f);
+ return roughnessSquared * w2 * w2 / czm_pi;
+}
+#endif
+
+/**
+ * Estimate the geometric self-shadowing of the microfacets in a surface,
+ * using the Smith Joint GGX visibility function.
+ * Note: Vis = G / (4 * NdotL * NdotV)
+ * see Eric Heitz. 2014. Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs. Journal of Computer Graphics Techniques, 3
+ * see Real-Time Rendering. Page 331 to 336.
+ * see https://google.github.io/filament/Filament.md.html#materialsystem/specularbrdf/geometricshadowing(specularg)
+ *
+ * @param {float} alphaRoughness The roughness of the material, expressed as the square of perceptual roughness.
+ * @param {float} NdotL The cosine of the angle between the surface normal and the direction to the light source.
+ * @param {float} NdotV The cosine of the angle between the surface normal and the direction to the camera.
+ */
+float smithVisibilityGGX(float alphaRoughness, float NdotL, float NdotV)
+{
+ float alphaRoughnessSq = alphaRoughness * alphaRoughness;
+
+ float GGXV = NdotL * sqrt(NdotV * NdotV * (1.0 - alphaRoughnessSq) + alphaRoughnessSq);
+ float GGXL = NdotV * sqrt(NdotL * NdotL * (1.0 - alphaRoughnessSq) + alphaRoughnessSq);
+
+ float GGX = GGXV + GGXL;
+ if (GGX > 0.0)
+ {
+ return 0.5 / GGX;
+ }
+ return 0.0;
+}
+
+float smithVisibilityG1(float NdotV, float roughness)
+{
+ // this is the k value for direct lighting.
+ // for image based lighting it will be roughness^2 / 2
+ float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;
+ return NdotV / (NdotV * (1.0 - k) + k);
+}
+
+float smithVisibilityGGX_VCS(float roughness, float NdotL, float NdotV)
+{
+ // Avoid divide-by-zero errors
+ NdotL = clamp(NdotL, 0.001, 1.0);
+ NdotV += 0.001;
+ return (
+ smithVisibilityG1(NdotL, roughness) *
+ smithVisibilityG1(NdotV, roughness)
+ );
+}
+
+/**
+ * Estimate the fraction of the microfacets in a surface that are aligned with
+ * the halfway vector, which is aligned halfway between the directions from
+ * the fragment to the camera and from the fragment to the light source.
+ *
+ * @param {float} alphaRoughness The roughness of the material, expressed as the square of perceptual roughness.
+ * @param {float} NdotH The cosine of the angle between the surface normal and the halfway vector.
+ * @return {float} The fraction of microfacets aligned to the halfway vector.
+ */
+float GGX(float alphaRoughness, float NdotH)
+{
+ float alphaRoughnessSquared = alphaRoughness * alphaRoughness;
+ float f = (NdotH * alphaRoughnessSquared - NdotH) * NdotH + 1.0;
+ return alphaRoughnessSquared / (czm_pi * f * f);
+}
+
+/**
+ * Compute the strength of the specular reflection due to direct lighting.
+ *
+ * @param {vec3} normal The surface normal.
+ * @param {vec3} lightDirection The unit vector pointing from the fragment to the light source.
+ * @param {vec3} viewDirection The unit vector pointing from the fragment to the camera.
+ * @param {vec3} halfwayDirection The unit vector pointing from the fragment to halfway between the light source and the camera.
+ * @param {float} alphaRoughness The roughness of the material, expressed as the square of perceptual roughness.
+ * @return {float} The strength of the specular reflection.
+ */
+float computeDirectSpecularStrength(vec3 normal, vec3 lightDirection, vec3 viewDirection, vec3 halfwayDirection, float alphaRoughness)
+{
+ float NdotL = clamp(dot(normal, lightDirection), 0.0, 1.0);
+ float NdotV = clamp(dot(normal, viewDirection), 0.0, 1.0);
+ float G = smithVisibilityGGX(alphaRoughness, NdotL, NdotV);
+ float NdotH = clamp(dot(normal, halfwayDirection), 0.0, 1.0);
+ float D = GGX(alphaRoughness, NdotH);
+ return G * D;
+}
+
+/**
+ * Compute the diffuse and specular contributions using physically based
+ * rendering. This function only handles direct lighting.
+ * time can be positive, negative, or zero.
+ *
+ * @name czm_pointAlongRay
+ * @glslFunction
+ *
+ * @param {czm_ray} ray The ray to compute the point along.
+ * @param {float} time The time along the ray.
+ *
+ * @returns {vec3} The point along the ray at the given time.
+ *
+ * @example
+ * czm_ray ray = czm_ray(vec3(0.0), vec3(1.0, 0.0, 0.0)); // origin, direction
+ * vec3 v = czm_pointAlongRay(ray, 2.0); // (2.0, 0.0, 0.0)
+ */
+vec3 czm_pointAlongRay(czm_ray ray, float time)
+{
+ return ray.origin + (time * ray.direction);
+}
+`, czm_rayEllipsoidIntersectionInterval = `/**
+ * DOC_TBA
+ *
+ * @name czm_rayEllipsoidIntersectionInterval
+ * @glslFunction
+ */
+czm_raySegment czm_rayEllipsoidIntersectionInterval(czm_ray ray, vec3 ellipsoid_center, vec3 ellipsoid_inverseRadii)
+{
+ // ray and ellipsoid center in eye coordinates. radii in model coordinates.
+ vec3 q = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.origin, 1.0)).xyz;
+ vec3 w = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.direction, 0.0)).xyz;
+
+ q = q - ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ellipsoid_center, 1.0)).xyz;
+
+ float q2 = dot(q, q);
+ float qw = dot(q, w);
+
+ if (q2 > 1.0) // Outside ellipsoid.
+ {
+ if (qw >= 0.0) // Looking outward or tangent (0 intersections).
+ {
+ return czm_emptyRaySegment;
+ }
+ else // qw < 0.0.
+ {
+ float qw2 = qw * qw;
+ float difference = q2 - 1.0; // Positively valued.
+ float w2 = dot(w, w);
+ float product = w2 * difference;
+
+ if (qw2 < product) // Imaginary roots (0 intersections).
+ {
+ return czm_emptyRaySegment;
+ }
+ else if (qw2 > product) // Distinct roots (2 intersections).
+ {
+ float discriminant = qw * qw - product;
+ float temp = -qw + sqrt(discriminant); // Avoid cancellation.
+ float root0 = temp / w2;
+ float root1 = difference / temp;
+ if (root0 < root1)
+ {
+ czm_raySegment i = czm_raySegment(root0, root1);
+ return i;
+ }
+ else
+ {
+ czm_raySegment i = czm_raySegment(root1, root0);
+ return i;
+ }
+ }
+ else // qw2 == product. Repeated roots (2 intersections).
+ {
+ float root = sqrt(difference / w2);
+ czm_raySegment i = czm_raySegment(root, root);
+ return i;
+ }
+ }
+ }
+ else if (q2 < 1.0) // Inside ellipsoid (2 intersections).
+ {
+ float difference = q2 - 1.0; // Negatively valued.
+ float w2 = dot(w, w);
+ float product = w2 * difference; // Negatively valued.
+ float discriminant = qw * qw - product;
+ float temp = -qw + sqrt(discriminant); // Positively valued.
+ czm_raySegment i = czm_raySegment(0.0, temp / w2);
+ return i;
+ }
+ else // q2 == 1.0. On ellipsoid.
+ {
+ if (qw < 0.0) // Looking inward.
+ {
+ float w2 = dot(w, w);
+ czm_raySegment i = czm_raySegment(0.0, -qw / w2);
+ return i;
+ }
+ else // qw >= 0.0. Looking outward or tangent.
+ {
+ return czm_emptyRaySegment;
+ }
+ }
+}
+`, czm_raySphereIntersectionInterval = `/**
+ * Compute the intersection interval of a ray with a sphere.
+ *
+ * @name czm_raySphereIntersectionInterval
+ * @glslFunction
+ *
+ * @param {czm_ray} ray The ray.
+ * @param {vec3} center The center of the sphere.
+ * @param {float} radius The radius of the sphere.
+ * @return {czm_raySegment} The intersection interval of the ray with the sphere.
+ */
+czm_raySegment czm_raySphereIntersectionInterval(czm_ray ray, vec3 center, float radius)
+{
+ vec3 o = ray.origin;
+ vec3 d = ray.direction;
+
+ vec3 oc = o - center;
+
+ float a = dot(d, d);
+ float b = 2.0 * dot(d, oc);
+ float c = dot(oc, oc) - (radius * radius);
+
+ float det = (b * b) - (4.0 * a * c);
+
+ if (det < 0.0) {
+ return czm_emptyRaySegment;
+ }
+
+ float sqrtDet = sqrt(det);
+
+ float t0 = (-b - sqrtDet) / (2.0 * a);
+ float t1 = (-b + sqrtDet) / (2.0 * a);
+
+ czm_raySegment result = czm_raySegment(t0, t1);
+ return result;
+}
+`, czm_readDepth = `float czm_readDepth(sampler2D depthTexture, vec2 texCoords)
+{
+ return czm_reverseLogDepth(texture(depthTexture, texCoords).r);
+}
+`, czm_readNonPerspective = `/**
+ * Reads a value previously transformed with {@link czm_writeNonPerspective}
+ * by dividing it by \`w\`, the value used in the perspective divide.
+ * This function is intended to be called in a fragment shader to access a
+ * \`varying\` that should not be subject to perspective interpolation.
+ * For example, screen-space texture coordinates. The value should have been
+ * previously written in the vertex shader with a call to
+ * {@link czm_writeNonPerspective}.
+ *
+ * @name czm_readNonPerspective
+ * @glslFunction
+ *
+ * @param {float|vec2|vec3|vec4} value The non-perspective value to be read.
+ * @param {float} oneOverW One over the perspective divide value, \`w\`. Usually this is simply \`gl_FragCoord.w\`.
+ * @returns {float|vec2|vec3|vec4} The usable value.
+ */
+float czm_readNonPerspective(float value, float oneOverW) {
+ return value * oneOverW;
+}
+
+vec2 czm_readNonPerspective(vec2 value, float oneOverW) {
+ return value * oneOverW;
+}
+
+vec3 czm_readNonPerspective(vec3 value, float oneOverW) {
+ return value * oneOverW;
+}
+
+vec4 czm_readNonPerspective(vec4 value, float oneOverW) {
+ return value * oneOverW;
+}
+`, czm_reverseLogDepth = `float czm_reverseLogDepth(float logZ)
+{
+#ifdef LOG_DEPTH
+ float near = czm_currentFrustum.x;
+ float far = czm_currentFrustum.y;
+ float log2Depth = logZ * czm_log2FarDepthFromNearPlusOne;
+ float depthFromNear = pow(2.0, log2Depth) - 1.0;
+ return far * (1.0 - near / (depthFromNear + near)) / (far - near);
+#endif
+ return logZ;
+}
+`, czm_round = `/**
+ * Round a floating point value. This function exists because round() doesn't
+ * exist in GLSL 1.00.
+ *
+ * @param {float|vec2|vec3|vec4} value The value to round
+ * @param {float|vec2|vec3|vec3} The rounded value. The type matches the input.
+ */
+float czm_round(float value) {
+ return floor(value + 0.5);
+}
+
+vec2 czm_round(vec2 value) {
+ return floor(value + 0.5);
+}
+
+vec3 czm_round(vec3 value) {
+ return floor(value + 0.5);
+}
+
+vec4 czm_round(vec4 value) {
+ return floor(value + 0.5);
+}
+`, czm_saturation = `/**
+ * Adjusts the saturation of a color.
+ *
+ * @name czm_saturation
+ * @glslFunction
+ *
+ * @param {vec3} rgb The color.
+ * @param {float} adjustment The amount to adjust the saturation of the color.
+ *
+ * @returns {float} The color with the saturation adjusted.
+ *
+ * @example
+ * vec3 greyScale = czm_saturation(color, 0.0);
+ * vec3 doubleSaturation = czm_saturation(color, 2.0);
+ */
+vec3 czm_saturation(vec3 rgb, float adjustment)
+{
+ // Algorithm from Chapter 16 of OpenGL Shading Language
+ const vec3 W = vec3(0.2125, 0.7154, 0.0721);
+ vec3 intensity = vec3(dot(rgb, W));
+ return mix(intensity, rgb, adjustment);
+}
+`, czm_shadowDepthCompare = `
+float czm_sampleShadowMap(highp samplerCube shadowMap, vec3 d)
+{
+ return czm_unpackDepth(czm_textureCube(shadowMap, d));
+}
+
+float czm_sampleShadowMap(highp sampler2D shadowMap, vec2 uv)
+{
+#ifdef USE_SHADOW_DEPTH_TEXTURE
+ return texture(shadowMap, uv).r;
+#else
+ return czm_unpackDepth(texture(shadowMap, uv));
+#endif
+}
+
+float czm_shadowDepthCompare(samplerCube shadowMap, vec3 uv, float depth)
+{
+ return step(depth, czm_sampleShadowMap(shadowMap, uv));
+}
+
+float czm_shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth)
+{
+ return step(depth, czm_sampleShadowMap(shadowMap, uv));
+}
+`, czm_shadowVisibility = `
+float czm_private_shadowVisibility(float visibility, float nDotL, float normalShadingSmooth, float darkness)
+{
+#ifdef USE_NORMAL_SHADING
+#ifdef USE_NORMAL_SHADING_SMOOTH
+ float strength = clamp(nDotL / normalShadingSmooth, 0.0, 1.0);
+#else
+ float strength = step(0.0, nDotL);
+#endif
+ visibility *= strength;
+#endif
+
+ visibility = max(visibility, darkness);
+ return visibility;
+}
+
+#ifdef USE_CUBE_MAP_SHADOW
+float czm_shadowVisibility(samplerCube shadowMap, czm_shadowParameters shadowParameters)
+{
+ float depthBias = shadowParameters.depthBias;
+ float depth = shadowParameters.depth;
+ float nDotL = shadowParameters.nDotL;
+ float normalShadingSmooth = shadowParameters.normalShadingSmooth;
+ float darkness = shadowParameters.darkness;
+ vec3 uvw = shadowParameters.texCoords;
+
+ depth -= depthBias;
+ float visibility = czm_shadowDepthCompare(shadowMap, uvw, depth);
+ return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);
+}
+#else
+float czm_shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParameters)
+{
+ float depthBias = shadowParameters.depthBias;
+ float depth = shadowParameters.depth;
+ float nDotL = shadowParameters.nDotL;
+ float normalShadingSmooth = shadowParameters.normalShadingSmooth;
+ float darkness = shadowParameters.darkness;
+ vec2 uv = shadowParameters.texCoords;
+
+ depth -= depthBias;
+#ifdef USE_SOFT_SHADOWS
+ vec2 texelStepSize = shadowParameters.texelStepSize;
+ float radius = 1.0;
+ float dx0 = -texelStepSize.x * radius;
+ float dy0 = -texelStepSize.y * radius;
+ float dx1 = texelStepSize.x * radius;
+ float dy1 = texelStepSize.y * radius;
+ float visibility = (
+ czm_shadowDepthCompare(shadowMap, uv, depth) +
+ czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy0), depth) +
+ czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy0), depth) +
+ czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy0), depth) +
+ czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, 0.0), depth) +
+ czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, 0.0), depth) +
+ czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy1), depth) +
+ czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy1), depth) +
+ czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy1), depth)
+ ) * (1.0 / 9.0);
+#else
+ float visibility = czm_shadowDepthCompare(shadowMap, uv, depth);
+#endif
+
+ return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);
+}
+#endif
+`, czm_signNotZero = `/**
+ * Returns 1.0 if the given value is positive or zero, and -1.0 if it is negative. This is similar to the GLSL
+ * built-in function sign except that returns 1.0 instead of 0.0 when the input value is 0.0.
+ *
+ * @name czm_signNotZero
+ * @glslFunction
+ *
+ * @param {} value The value for which to determine the sign.
+ * @returns {} 1.0 if the value is positive or zero, -1.0 if the value is negative.
+ */
+float czm_signNotZero(float value)
+{
+ return value >= 0.0 ? 1.0 : -1.0;
+}
+
+vec2 czm_signNotZero(vec2 value)
+{
+ return vec2(czm_signNotZero(value.x), czm_signNotZero(value.y));
+}
+
+vec3 czm_signNotZero(vec3 value)
+{
+ return vec3(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z));
+}
+
+vec4 czm_signNotZero(vec4 value)
+{
+ return vec4(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z), czm_signNotZero(value.w));
+}
+`, czm_sphericalHarmonics = `/**
+ * Computes a color from the third order spherical harmonic coefficients and a normalized direction vector.
+ * vec3) that was encoded with {@link EncodedCartesian3},
+ * and then provided to the shader as separate high and low bits to
+ * be relative to the eye. As shown in the example, the position can then be transformed in eye
+ * or clip coordinates using {@link czm_modelViewRelativeToEye} or {@link czm_modelViewProjectionRelativeToEye},
+ * respectively.
+ * matrix can be
+ * a mat2, mat3, or mat4.
+ *
+ * @name czm_transpose
+ * @glslFunction
+ *
+ * @param {} matrix The matrix to transpose.
+ *
+ * @returns {} The transposed matrix.
+ *
+ * @example
+ * // GLSL declarations
+ * mat2 czm_transpose(mat2 matrix);
+ * mat3 czm_transpose(mat3 matrix);
+ * mat4 czm_transpose(mat4 matrix);
+ *
+ * // Transpose a 3x3 rotation matrix to find its inverse.
+ * mat3 eastNorthUpToEye = czm_eastNorthUpToEyeCoordinates(
+ * positionMC, normalEC);
+ * mat3 eyeToEastNorthUp = czm_transpose(eastNorthUpToEye);
+ */
+mat2 czm_transpose(mat2 matrix)
+{
+ return mat2(
+ matrix[0][0], matrix[1][0],
+ matrix[0][1], matrix[1][1]);
+}
+
+mat3 czm_transpose(mat3 matrix)
+{
+ return mat3(
+ matrix[0][0], matrix[1][0], matrix[2][0],
+ matrix[0][1], matrix[1][1], matrix[2][1],
+ matrix[0][2], matrix[1][2], matrix[2][2]);
+}
+
+mat4 czm_transpose(mat4 matrix)
+{
+ return mat4(
+ matrix[0][0], matrix[1][0], matrix[2][0], matrix[3][0],
+ matrix[0][1], matrix[1][1], matrix[2][1], matrix[3][1],
+ matrix[0][2], matrix[1][2], matrix[2][2], matrix[3][2],
+ matrix[0][3], matrix[1][3], matrix[2][3], matrix[3][3]);
+}
+`, czm_unpackClippingExtents = `vec2 getLookupUv(vec2 dimensions, int i) {
+ int pixY = i / int(dimensions.x);
+ int pixX = i - (pixY * int(dimensions.x));
+ float pixelWidth = 1.0 / dimensions.x;
+ float pixelHeight = 1.0 / dimensions.y;
+ float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel
+ float v = (float(pixY) + 0.5) * pixelHeight;
+ return vec2(u, v);
+}
+
+vec4 czm_unpackClippingExtents(highp sampler2D extentsTexture, int index) {
+ vec2 textureDimensions = vec2(textureSize(extentsTexture, 0));
+ return texture(extentsTexture, getLookupUv(textureDimensions, index));
+}`, czm_unpackDepth = `/**
+ * Unpacks a vec4 depth value to a float in [0, 1) range.
+ *
+ * @name czm_unpackDepth
+ * @glslFunction
+ *
+ * @param {vec4} packedDepth The packed depth.
+ *
+ * @returns {float} The floating-point depth in [0, 1) range.
+ */
+ float czm_unpackDepth(vec4 packedDepth)
+ {
+ // See Aras Pranckevičius' post Encoding Floats to RGBA
+ // http://aras-p.info/blog/2009/07/30/encoding-floats-to-rgba-the-final/
+ return dot(packedDepth, vec4(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0));
+ }
+`, czm_unpackFloat = `/**
+ * Unpack an IEEE 754 single-precision float that is packed as a little-endian unsigned normalized vec4.
+ *
+ * @name czm_unpackFloat
+ * @glslFunction
+ *
+ * @param {vec4} packedFloat The packed float.
+ *
+ * @returns {float} The floating-point depth in arbitrary range.
+ */
+float czm_unpackFloat(vec4 packedFloat)
+{
+ // Convert to [0.0, 255.0] and round to integer
+ packedFloat = floor(packedFloat * 255.0 + 0.5);
+ float sign = 1.0 - step(128.0, packedFloat[3]) * 2.0;
+ float exponent = 2.0 * mod(packedFloat[3], 128.0) + step(128.0, packedFloat[2]) - 127.0;
+ if (exponent == -127.0)
+ {
+ return 0.0;
+ }
+ float mantissa = mod(packedFloat[2], 128.0) * 65536.0 + packedFloat[1] * 256.0 + packedFloat[0] + float(0x800000);
+ float result = sign * exp2(exponent - 23.0) * mantissa;
+ return result;
+}
+`, czm_unpackUint = `/**
+ * Unpack unsigned integers of 1-4 bytes. in WebGL 1, there is no uint type,
+ * so the return value is an int.
+ * czm_viewportTransformation. The transformation from
+ * normalized device coordinates to clip coordinates is done using fragmentCoordinate.w,
+ * which is expected to be the scalar used in the perspective divide. The transformation
+ * from clip to eye coordinates is done using {@link czm_inverseProjection}.
+ *
+ * @name czm_windowToEyeCoordinates
+ * @glslFunction
+ *
+ * @param {vec4} fragmentCoordinate The position in window coordinates to transform.
+ *
+ * @returns {vec4} The transformed position in eye coordinates.
+ *
+ * @see czm_modelToWindowCoordinates
+ * @see czm_eyeToWindowCoordinates
+ * @see czm_inverseProjection
+ * @see czm_viewport
+ * @see czm_viewportTransformation
+ *
+ * @example
+ * vec4 positionEC = czm_windowToEyeCoordinates(gl_FragCoord);
+ */
+vec4 czm_windowToEyeCoordinates(vec4 fragmentCoordinate)
+{
+ vec2 screenCoordXY = (fragmentCoordinate.xy - czm_viewport.xy) / czm_viewport.zw;
+ return czm_screenToEyeCoordinates(vec4(screenCoordXY, fragmentCoordinate.zw));
+}
+
+vec4 czm_screenToEyeCoordinates(vec2 screenCoordinateXY, float depthOrLogDepth)
+{
+ // See reverseLogDepth.glsl. This is separate to re-use the pow.
+#if defined(LOG_DEPTH) || defined(LOG_DEPTH_READ_ONLY)
+ float near = czm_currentFrustum.x;
+ float far = czm_currentFrustum.y;
+ float log2Depth = depthOrLogDepth * czm_log2FarDepthFromNearPlusOne;
+ float depthFromNear = pow(2.0, log2Depth) - 1.0;
+ float depthFromCamera = depthFromNear + near;
+ vec4 screenCoord = vec4(screenCoordinateXY, far * (1.0 - near / depthFromCamera) / (far - near), 1.0);
+ vec4 eyeCoordinate = czm_screenToEyeCoordinates(screenCoord);
+ eyeCoordinate.w = 1.0 / depthFromCamera; // Better precision
+ return eyeCoordinate;
+#else
+ vec4 screenCoord = vec4(screenCoordinateXY, depthOrLogDepth, 1.0);
+ vec4 eyeCoordinate = czm_screenToEyeCoordinates(screenCoord);
+#endif
+ return eyeCoordinate;
+}
+
+/**
+ * Transforms a position given as window x/y and a depth or a log depth from window to eye coordinates.
+ * This function produces more accurate results for window positions with log depth than
+ * conventionally unpacking the log depth using czm_reverseLogDepth and using the standard version
+ * of czm_windowToEyeCoordinates.
+ *
+ * @name czm_windowToEyeCoordinates
+ * @glslFunction
+ *
+ * @param {vec2} fragmentCoordinateXY The XY position in window coordinates to transform.
+ * @param {float} depthOrLogDepth A depth or log depth for the fragment.
+ *
+ * @see czm_modelToWindowCoordinates
+ * @see czm_eyeToWindowCoordinates
+ * @see czm_inverseProjection
+ * @see czm_viewport
+ * @see czm_viewportTransformation
+ *
+ * @returns {vec4} The transformed position in eye coordinates.
+ */
+vec4 czm_windowToEyeCoordinates(vec2 fragmentCoordinateXY, float depthOrLogDepth)
+{
+ vec2 screenCoordXY = (fragmentCoordinateXY.xy - czm_viewport.xy) / czm_viewport.zw;
+ return czm_screenToEyeCoordinates(screenCoordXY, depthOrLogDepth);
+}
+`, czm_writeDepthClamp = `// emulated noperspective
+#if !defined(LOG_DEPTH)
+in float v_WindowZ;
+#endif
+
+/**
+ * Emulates GL_DEPTH_CLAMP. Clamps a fragment to the near and far plane
+ * by writing the fragment's depth. See czm_depthClamp for more details.
+ *
+ * @name czm_writeDepthClamp
+ * @glslFunction
+ *
+ * @example
+ * out_FragColor = color;
+ * czm_writeDepthClamp();
+ *
+ * @see czm_depthClamp
+ */
+void czm_writeDepthClamp()
+{
+#if (!defined(LOG_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth)))
+ gl_FragDepth = clamp(v_WindowZ * gl_FragCoord.w, 0.0, 1.0);
+#endif
+}
+`, czm_writeLogDepth = `#ifdef LOG_DEPTH
+in float v_depthFromNearPlusOne;
+
+#ifdef POLYGON_OFFSET
+uniform vec2 u_polygonOffset;
+#endif
+
+#endif
+
+/**
+ * Writes the fragment depth to the logarithmic depth buffer.
+ * x) and the far distance (y) of the frustum defined by the camera.
+ * This is the largest possible frustum, not an individual frustum used for multi-frustum rendering.
+ * @memberof UniformState.prototype
+ * @type {Cartesian2}
+ */
+ entireFrustum: {
+ get: function() {
+ return this._entireFrustum;
+ }
+ },
+ /**
+ * The near distance (x) and the far distance (y) of the frustum defined by the camera.
+ * This is the individual frustum used for multi-frustum rendering.
+ * @memberof UniformState.prototype
+ * @type {Cartesian2}
+ */
+ currentFrustum: {
+ get: function() {
+ return this._currentFrustum;
+ }
+ },
+ /**
+ * The distances to the frustum planes. The top, bottom, left and right distances are
+ * the x, y, z, and w components, respectively.
+ * @memberof UniformState.prototype
+ * @type {Cartesian4}
+ */
+ frustumPlanes: {
+ get: function() {
+ return this._frustumPlanes;
+ }
+ },
+ /**
+ * The far plane's distance from the near plane, plus 1.0.
+ *
+ * @memberof UniformState.prototype
+ * @type {number}
+ */
+ farDepthFromNearPlusOne: {
+ get: function() {
+ return this._farDepthFromNearPlusOne;
+ }
+ },
+ /**
+ * The log2 of {@link UniformState#farDepthFromNearPlusOne}.
+ *
+ * @memberof UniformState.prototype
+ * @type {number}
+ */
+ log2FarDepthFromNearPlusOne: {
+ get: function() {
+ return this._log2FarDepthFromNearPlusOne;
+ }
+ },
+ /**
+ * 1.0 divided by {@link UniformState#log2FarDepthFromNearPlusOne}.
+ *
+ * @memberof UniformState.prototype
+ * @type {number}
+ */
+ oneOverLog2FarDepthFromNearPlusOne: {
+ get: function() {
+ return this._oneOverLog2FarDepthFromNearPlusOne;
+ }
+ },
+ /**
+ * The height in meters of the eye (camera) above or below the ellipsoid.
+ * @memberof UniformState.prototype
+ * @type {number}
+ */
+ eyeHeight: {
+ get: function() {
+ return this._eyeHeight;
+ }
+ },
+ /**
+ * The height (x) and the height squared (y)
+ * in meters of the eye (camera) above the 2D world plane. This uniform is only valid
+ * when the {@link SceneMode} is SCENE2D.
+ * @memberof UniformState.prototype
+ * @type {Cartesian2}
+ */
+ eyeHeight2D: {
+ get: function() {
+ return this._eyeHeight2D;
+ }
+ },
+ /**
+ * The ellipsoid surface normal at the camera position, in model coordinates.
+ * @memberof UniformState.prototype
+ * @type {Cartesian3}
+ */
+ eyeEllipsoidNormalEC: {
+ get: function() {
+ return this._eyeEllipsoidNormalEC;
+ }
+ },
+ /**
+ * The ellipsoid radii of curvature at the camera position.
+ * The .x component is the prime vertical radius, .y is the meridional.
+ * @memberof UniformState.prototype
+ * @type {Cartesian2}
+ */
+ eyeEllipsoidCurvature: {
+ get: function() {
+ return this._eyeEllipsoidCurvature;
+ }
+ },
+ /**
+ * A transform from model coordinates to an east-north-up coordinate system
+ * centered at the position on the ellipsoid below the camera
+ * @memberof UniformState.prototype
+ * @type {Matrix4}
+ */
+ modelToEnu: {
+ get: function() {
+ return this._modelToEnu;
+ }
+ },
+ /**
+ * The inverse of {@link UniformState.prototype.modelToEnu}
+ * @memberof UniformState.prototype
+ * @type {Matrix4}
+ */
+ enuToModel: {
+ get: function() {
+ return this._enuToModel;
+ }
+ },
+ /**
+ * The sun position in 3D world coordinates at the current scene time.
+ * @memberof UniformState.prototype
+ * @type {Cartesian3}
+ */
+ sunPositionWC: {
+ get: function() {
+ return this._sunPositionWC;
+ }
+ },
+ /**
+ * The sun position in 2D world coordinates at the current scene time.
+ * @memberof UniformState.prototype
+ * @type {Cartesian3}
+ */
+ sunPositionColumbusView: {
+ get: function() {
+ return this._sunPositionColumbusView;
+ }
+ },
+ /**
+ * A normalized vector to the sun in 3D world coordinates at the current scene time. Even in 2D or
+ * Columbus View mode, this returns the direction to the sun in the 3D scene.
+ * @memberof UniformState.prototype
+ * @type {Cartesian3}
+ */
+ sunDirectionWC: {
+ get: function() {
+ return this._sunDirectionWC;
+ }
+ },
+ /**
+ * A normalized vector to the sun in eye coordinates at the current scene time. In 3D mode, this
+ * returns the actual vector from the camera position to the sun position. In 2D and Columbus View, it returns
+ * the vector from the equivalent 3D camera position to the position of the sun in the 3D scene.
+ * @memberof UniformState.prototype
+ * @type {Cartesian3}
+ */
+ sunDirectionEC: {
+ get: function() {
+ return this._sunDirectionEC;
+ }
+ },
+ /**
+ * A normalized vector to the moon in eye coordinates at the current scene time. In 3D mode, this
+ * returns the actual vector from the camera position to the moon position. In 2D and Columbus View, it returns
+ * the vector from the equivalent 3D camera position to the position of the moon in the 3D scene.
+ * @memberof UniformState.prototype
+ * @type {Cartesian3}
+ */
+ moonDirectionEC: {
+ get: function() {
+ return this._moonDirectionEC;
+ }
+ },
+ /**
+ * A normalized vector to the scene's light source in 3D world coordinates. Even in 2D or
+ * Columbus View mode, this returns the direction to the light in the 3D scene.
+ * @memberof UniformState.prototype
+ * @type {Cartesian3}
+ */
+ lightDirectionWC: {
+ get: function() {
+ return this._lightDirectionWC;
+ }
+ },
+ /**
+ * A normalized vector to the scene's light source in eye coordinates. In 3D mode, this
+ * returns the actual vector from the camera position to the light. In 2D and Columbus View, it returns
+ * the vector from the equivalent 3D camera position in the 3D scene.
+ * @memberof UniformState.prototype
+ * @type {Cartesian3}
+ */
+ lightDirectionEC: {
+ get: function() {
+ return this._lightDirectionEC;
+ }
+ },
+ /**
+ * The color of light emitted by the scene's light source. This is equivalent to the light
+ * color multiplied by the light intensity limited to a maximum luminance of 1.0 suitable
+ * for non-HDR lighting.
+ * @memberof UniformState.prototype
+ * @type {Cartesian3}
+ */
+ lightColor: {
+ get: function() {
+ return this._lightColor;
+ }
+ },
+ /**
+ * The high dynamic range color of light emitted by the scene's light source. This is equivalent to
+ * the light color multiplied by the light intensity suitable for HDR lighting.
+ * @memberof UniformState.prototype
+ * @type {Cartesian3}
+ */
+ lightColorHdr: {
+ get: function() {
+ return this._lightColorHdr;
+ }
+ },
+ /**
+ * The high bits of the camera position.
+ * @memberof UniformState.prototype
+ * @type {Cartesian3}
+ */
+ encodedCameraPositionMCHigh: {
+ get: function() {
+ return cleanEncodedCameraPositionMC(this), this._encodedCameraPositionMC.high;
+ }
+ },
+ /**
+ * The low bits of the camera position.
+ * @memberof UniformState.prototype
+ * @type {Cartesian3}
+ */
+ encodedCameraPositionMCLow: {
+ get: function() {
+ return cleanEncodedCameraPositionMC(this), this._encodedCameraPositionMC.low;
+ }
+ },
+ /**
+ * A 3x3 matrix that transforms from True Equator Mean Equinox (TEME) axes to the
+ * pseudo-fixed axes at the Scene's current time.
+ * @memberof UniformState.prototype
+ * @type {Matrix3}
+ */
+ temeToPseudoFixedMatrix: {
+ get: function() {
+ return this._temeToPseudoFixed;
+ }
+ },
+ /**
+ * Gets the scaling factor for transforming from the canvas
+ * pixel space to canvas coordinate space.
+ * @memberof UniformState.prototype
+ * @type {number}
+ */
+ pixelRatio: {
+ get: function() {
+ return this._pixelRatio;
+ }
+ },
+ /**
+ * A scalar used to mix a color with the fog color based on the distance to the camera.
+ * @memberof UniformState.prototype
+ * @type {number}
+ */
+ fogDensity: {
+ get: function() {
+ return this._fogDensity;
+ }
+ },
+ /**
+ * A scalar used as a minimum value when brightening fog
+ * @memberof UniformState.prototype
+ * @type {number}
+ */
+ fogMinimumBrightness: {
+ get: function() {
+ return this._fogMinimumBrightness;
+ }
+ },
+ /**
+ * A color shift to apply to the atmosphere color in HSB.
+ * @memberof UniformState.prototype
+ * @type {Cartesian3}
+ */
+ atmosphereHsbShift: {
+ get: function() {
+ return this._atmosphereHsbShift;
+ }
+ },
+ /**
+ * The intensity of the light that is used for computing the atmosphere color
+ * @memberof UniformState.prototype
+ * @type {number}
+ */
+ atmosphereLightIntensity: {
+ get: function() {
+ return this._atmosphereLightIntensity;
+ }
+ },
+ /**
+ * The Rayleigh scattering coefficient used in the atmospheric scattering equations for the sky atmosphere.
+ * @memberof UniformState.prototype
+ * @type {Cartesian3}
+ */
+ atmosphereRayleighCoefficient: {
+ get: function() {
+ return this._atmosphereRayleighCoefficient;
+ }
+ },
+ /**
+ * The Rayleigh scale height used in the atmospheric scattering equations for the sky atmosphere, in meters.
+ * @memberof UniformState.prototype
+ * @type {number}
+ */
+ atmosphereRayleighScaleHeight: {
+ get: function() {
+ return this._atmosphereRayleighScaleHeight;
+ }
+ },
+ /**
+ * The Mie scattering coefficient used in the atmospheric scattering equations for the sky atmosphere.
+ * @memberof UniformState.prototype
+ * @type {Cartesian3}
+ */
+ atmosphereMieCoefficient: {
+ get: function() {
+ return this._atmosphereMieCoefficient;
+ }
+ },
+ /**
+ * The Mie scale height used in the atmospheric scattering equations for the sky atmosphere, in meters.
+ * @memberof UniformState.prototype
+ * @type {number}
+ */
+ atmosphereMieScaleHeight: {
+ get: function() {
+ return this._atmosphereMieScaleHeight;
+ }
+ },
+ /**
+ * The anisotropy of the medium to consider for Mie scattering.
+ * @memberof UniformState.prototype
+ * @type {number}
+ */
+ atmosphereMieAnisotropy: {
+ get: function() {
+ return this._atmosphereMieAnisotropy;
+ }
+ },
+ /**
+ * Which light source to use for dynamically lighting the atmosphere
+ *
+ * @memberof UniformState.prototype
+ * @type {DynamicAtmosphereLightingType}
+ */
+ atmosphereDynamicLighting: {
+ get: function() {
+ return this._atmosphereDynamicLighting;
+ }
+ },
+ /**
+ * A scalar that represents the geometric tolerance per meter
+ * @memberof UniformState.prototype
+ * @type {number}
+ */
+ geometricToleranceOverMeter: {
+ get: function() {
+ return this._geometricToleranceOverMeter;
+ }
+ },
+ /**
+ * @memberof UniformState.prototype
+ * @type {Pass}
+ */
+ pass: {
+ get: function() {
+ return this._pass;
+ }
+ },
+ /**
+ * The current background color
+ * @memberof UniformState.prototype
+ * @type {Color}
+ */
+ backgroundColor: {
+ get: function() {
+ return this._backgroundColor;
+ }
+ },
+ /**
+ * The look up texture used to find the BRDF for a material
+ * @memberof UniformState.prototype
+ * @type {Texture}
+ */
+ brdfLut: {
+ get: function() {
+ return this._brdfLut;
+ }
+ },
+ /**
+ * The environment map of the scene
+ * @memberof UniformState.prototype
+ * @type {CubeMap}
+ */
+ environmentMap: {
+ get: function() {
+ return this._environmentMap;
+ }
+ },
+ /**
+ * The spherical harmonic coefficients of the scene.
+ * @memberof UniformState.prototype
+ * @type {Cartesian3[]}
+ */
+ sphericalHarmonicCoefficients: {
+ get: function() {
+ return this._sphericalHarmonicCoefficients;
+ }
+ },
+ /**
+ * The specular environment cube map of the scene.
+ * @memberof UniformState.prototype
+ * @type {Texture}
+ */
+ specularEnvironmentMaps: {
+ get: function() {
+ return this._specularEnvironmentMaps;
+ }
+ },
+ /**
+ * The maximum level-of-detail of the specular environment cube map of the scene.
+ * @memberof UniformState.prototype
+ * @type {number}
+ */
+ specularEnvironmentMapsMaximumLOD: {
+ get: function() {
+ return this._specularEnvironmentMapsMaximumLOD;
+ }
+ },
+ /**
+ * The splitter position to use when rendering with a splitter. This will be in pixel coordinates relative to the canvas.
+ * @memberof UniformState.prototype
+ * @type {number}
+ */
+ splitPosition: {
+ get: function() {
+ return this._splitPosition;
+ }
+ },
+ /**
+ * The distance from the camera at which to disable the depth test of billboards, labels and points
+ * to, for example, prevent clipping against terrain. When set to zero, the depth test should always
+ * be applied. When less than zero, the depth test should never be applied.
+ *
+ * @memberof UniformState.prototype
+ * @type {number}
+ */
+ minimumDisableDepthTestDistance: {
+ get: function() {
+ return this._minimumDisableDepthTestDistance;
+ }
+ },
+ /**
+ * The highlight color of unclassified 3D Tiles.
+ *
+ * @memberof UniformState.prototype
+ * @type {Color}
+ */
+ invertClassificationColor: {
+ get: function() {
+ return this._invertClassificationColor;
+ }
+ },
+ /**
+ * Whether or not the current projection is orthographic in 3D.
+ *
+ * @memberOf UniformState.prototype
+ * @type {boolean}
+ */
+ orthographicIn3D: {
+ get: function() {
+ return this._orthographicIn3D;
+ }
+ },
+ /**
+ * The current ellipsoid.
+ *
+ * @memberOf UniformState.prototype
+ * @type {Ellipsoid}
+ */
+ ellipsoid: {
+ get: function() {
+ return defaultValue(this._ellipsoid, Ellipsoid.default);
+ }
+ }
+});
+function setView(e, t) {
+ Matrix4.clone(t, e._view), Matrix4.getMatrix3(t, e._viewRotation), e._view3DDirty = !0, e._inverseView3DDirty = !0, e._modelViewDirty = !0, e._modelView3DDirty = !0, e._modelViewRelativeToEyeDirty = !0, e._inverseModelViewDirty = !0, e._inverseModelView3DDirty = !0, e._viewProjectionDirty = !0, e._inverseViewProjectionDirty = !0, e._modelViewProjectionDirty = !0, e._modelViewProjectionRelativeToEyeDirty = !0, e._modelViewInfiniteProjectionDirty = !0, e._normalDirty = !0, e._inverseNormalDirty = !0, e._normal3DDirty = !0, e._inverseNormal3DDirty = !0;
+}
+function setInverseView(e, t) {
+ Matrix4.clone(t, e._inverseView), Matrix4.getMatrix3(t, e._inverseViewRotation);
+}
+function setProjection(e, t) {
+ Matrix4.clone(t, e._projection), e._inverseProjectionDirty = !0, e._viewProjectionDirty = !0, e._inverseViewProjectionDirty = !0, e._modelViewProjectionDirty = !0, e._modelViewProjectionRelativeToEyeDirty = !0;
+}
+function setInfiniteProjection(e, t) {
+ Matrix4.clone(t, e._infiniteProjection), e._modelViewInfiniteProjectionDirty = !0;
+}
+const surfacePositionScratch = new Cartesian3(), enuTransformScratch = new Matrix4();
+function setCamera(e, t) {
+ Cartesian3.clone(t.positionWC, e._cameraPosition), Cartesian3.clone(t.directionWC, e._cameraDirection), Cartesian3.clone(t.rightWC, e._cameraRight), Cartesian3.clone(t.upWC, e._cameraUp);
+ const n = e._ellipsoid;
+ let i;
+ const r = t.positionCartographic;
+ if (defined(r) ? (e._eyeHeight = r.height, e._eyeEllipsoidNormalEC = n.geodeticSurfaceNormalCartographic(
+ r,
+ e._eyeEllipsoidNormalEC
+ ), i = Cartesian3.fromRadians(
+ r.longitude,
+ r.latitude,
+ 0,
+ n,
+ surfacePositionScratch
+ )) : (e._eyeHeight = -n.maximumRadius, Cartesian3.magnitude(t.positionWC) > 0 && (e._eyeEllipsoidNormalEC = Cartesian3.normalize(
+ t.positionWC,
+ e._eyeEllipsoidNormalEC
+ )), i = n.scaleToGeodeticSurface(
+ t.positionWC,
+ surfacePositionScratch
+ )), e._encodedCameraPositionMCDirty = !0, !defined(i))
+ return;
+ e._eyeEllipsoidNormalEC = Matrix3.multiplyByVector(
+ e._viewRotation,
+ e._eyeEllipsoidNormalEC,
+ e._eyeEllipsoidNormalEC
+ );
+ const o = Transforms.eastNorthUpToFixedFrame(
+ i,
+ n,
+ enuTransformScratch
+ );
+ e._enuToModel = Matrix4.multiplyTransformation(
+ e.inverseModel,
+ o,
+ e._enuToModel
+ ), e._modelToEnu = Matrix4.inverseTransformation(
+ e._enuToModel,
+ e._modelToEnu
+ ), CesiumMath.equalsEpsilon(
+ n._radii.x,
+ n._radii.y,
+ CesiumMath.EPSILON15
+ ) && (e._eyeEllipsoidCurvature = n.getLocalCurvature(
+ i,
+ e._eyeEllipsoidCurvature
+ ));
+}
+const transformMatrix = new Matrix3(), sunCartographicScratch = new Cartographic();
+function setSunAndMoonDirections(e, t) {
+ Transforms.computeIcrfToCentralBodyFixedMatrix(
+ t.time,
+ transformMatrix
+ );
+ let n = Simon1994PlanetaryPositions.computeSunPositionInEarthInertialFrame(
+ t.time,
+ e._sunPositionWC
+ );
+ Matrix3.multiplyByVector(transformMatrix, n, n), Cartesian3.normalize(n, e._sunDirectionWC), n = Matrix3.multiplyByVector(
+ e.viewRotation3D,
+ n,
+ e._sunDirectionEC
+ ), Cartesian3.normalize(n, n), n = Simon1994PlanetaryPositions.computeMoonPositionInEarthInertialFrame(
+ t.time,
+ e._moonDirectionEC
+ ), Matrix3.multiplyByVector(transformMatrix, n, n), Matrix3.multiplyByVector(e.viewRotation3D, n, n), Cartesian3.normalize(n, n);
+ const i = t.mapProjection, o = i.ellipsoid.cartesianToCartographic(
+ e._sunPositionWC,
+ sunCartographicScratch
+ );
+ i.project(o, e._sunPositionColumbusView);
+}
+UniformState.prototype.updateCamera = function(e) {
+ setView(this, e.viewMatrix), setInverseView(this, e.inverseViewMatrix), setCamera(this, e), this._entireFrustum.x = e.frustum.near, this._entireFrustum.y = e.frustum.far, this.updateFrustum(e.frustum), this._orthographicIn3D = this._mode !== SceneMode$1.SCENE2D && e.frustum instanceof OrthographicFrustum;
+};
+UniformState.prototype.updateFrustum = function(e) {
+ setProjection(this, e.projectionMatrix), defined(e.infiniteProjectionMatrix) && setInfiniteProjection(this, e.infiniteProjectionMatrix), this._currentFrustum.x = e.near, this._currentFrustum.y = e.far, this._farDepthFromNearPlusOne = e.far - e.near + 1, this._log2FarDepthFromNearPlusOne = CesiumMath.log2(
+ this._farDepthFromNearPlusOne
+ ), this._oneOverLog2FarDepthFromNearPlusOne = 1 / this._log2FarDepthFromNearPlusOne;
+ const t = e.offCenterFrustum;
+ defined(t) && (e = t), this._frustumPlanes.x = e.top, this._frustumPlanes.y = e.bottom, this._frustumPlanes.z = e.left, this._frustumPlanes.w = e.right;
+};
+UniformState.prototype.updatePass = function(e) {
+ this._pass = e;
+};
+const EMPTY_ARRAY = [], defaultLight = new SunLight();
+UniformState.prototype.update = function(e) {
+ this._mode = e.mode, this._mapProjection = e.mapProjection, this._ellipsoid = e.mapProjection.ellipsoid, this._pixelRatio = e.pixelRatio;
+ const t = e.camera;
+ this.updateCamera(t), e.mode === SceneMode$1.SCENE2D ? (this._frustum2DWidth = t.frustum.right - t.frustum.left, this._eyeHeight2D.x = this._frustum2DWidth * 0.5, this._eyeHeight2D.y = this._eyeHeight2D.x * this._eyeHeight2D.x) : (this._frustum2DWidth = 0, this._eyeHeight2D.x = 0, this._eyeHeight2D.y = 0), setSunAndMoonDirections(this, e);
+ const n = defaultValue(e.light, defaultLight);
+ n instanceof SunLight ? (this._lightDirectionWC = Cartesian3.clone(
+ this._sunDirectionWC,
+ this._lightDirectionWC
+ ), this._lightDirectionEC = Cartesian3.clone(
+ this._sunDirectionEC,
+ this._lightDirectionEC
+ )) : (this._lightDirectionWC = Cartesian3.normalize(
+ Cartesian3.negate(n.direction, this._lightDirectionWC),
+ this._lightDirectionWC
+ ), this._lightDirectionEC = Matrix3.multiplyByVector(
+ this.viewRotation3D,
+ this._lightDirectionWC,
+ this._lightDirectionEC
+ ));
+ const i = n.color;
+ let r = Cartesian3.fromElements(
+ i.red,
+ i.green,
+ i.blue,
+ this._lightColorHdr
+ );
+ r = Cartesian3.multiplyByScalar(
+ r,
+ n.intensity,
+ r
+ );
+ const o = Cartesian3.maximumComponent(r);
+ o > 1 ? Cartesian3.divideByScalar(
+ r,
+ o,
+ this._lightColor
+ ) : Cartesian3.clone(r, this._lightColor);
+ const s = e.brdfLutGenerator, c = defined(s) ? s.colorTexture : void 0;
+ this._brdfLut = c, this._environmentMap = defaultValue(
+ e.environmentMap,
+ e.context.defaultCubeMap
+ ), this._sphericalHarmonicCoefficients = defaultValue(
+ e.sphericalHarmonicCoefficients,
+ EMPTY_ARRAY
+ ), this._specularEnvironmentMaps = e.specularEnvironmentMaps, this._specularEnvironmentMapsMaximumLOD = e.specularEnvironmentMapsMaximumLOD, this._fogDensity = e.fog.density, this._fogMinimumBrightness = e.fog.minimumBrightness;
+ const l = e.atmosphere;
+ defined(l) && (this._atmosphereHsbShift = Cartesian3.fromElements(
+ l.hueShift,
+ l.saturationShift,
+ l.brightnessShift,
+ this._atmosphereHsbShift
+ ), this._atmosphereLightIntensity = l.lightIntensity, this._atmosphereRayleighCoefficient = Cartesian3.clone(
+ l.rayleighCoefficient,
+ this._atmosphereRayleighCoefficient
+ ), this._atmosphereRayleighScaleHeight = l.rayleighScaleHeight, this._atmosphereMieCoefficient = Cartesian3.clone(
+ l.mieCoefficient,
+ this._atmosphereMieCoefficient
+ ), this._atmosphereMieScaleHeight = l.mieScaleHeight, this._atmosphereMieAnisotropy = l.mieAnisotropy, this._atmosphereDynamicLighting = l.dynamicLighting), this._invertClassificationColor = e.invertClassificationColor, this._frameState = e, this._temeToPseudoFixed = Transforms.computeTemeToPseudoFixedMatrix(
+ e.time,
+ this._temeToPseudoFixed
+ ), this._splitPosition = e.splitPosition * e.context.drawingBufferWidth;
+ const d = t.frustum.fov, f = this._viewport;
+ let h;
+ defined(d) ? f.height > f.width ? h = Math.tan(0.5 * d) * 2 / f.height : h = Math.tan(0.5 * d) * 2 / f.width : h = 1 / Math.max(f.width, f.height), this._geometricToleranceOverMeter = h * e.maximumScreenSpaceError, Color.clone(e.backgroundColor, this._backgroundColor), this._minimumDisableDepthTestDistance = e.minimumDisableDepthTestDistance, this._minimumDisableDepthTestDistance *= this._minimumDisableDepthTestDistance, this._minimumDisableDepthTestDistance === Number.POSITIVE_INFINITY && (this._minimumDisableDepthTestDistance = -1);
+};
+function cleanViewport(e) {
+ if (e._viewportDirty) {
+ const t = e._viewport;
+ Matrix4.computeOrthographicOffCenter(
+ t.x,
+ t.x + t.width,
+ t.y,
+ t.y + t.height,
+ 0,
+ 1,
+ e._viewportOrthographicMatrix
+ ), Matrix4.computeViewportTransformation(
+ t,
+ 0,
+ 1,
+ e._viewportTransformation
+ ), e._viewportDirty = !1;
+ }
+}
+function cleanInverseProjection(e) {
+ e._inverseProjectionDirty && (e._inverseProjectionDirty = !1, e._mode !== SceneMode$1.SCENE2D && e._mode !== SceneMode$1.MORPHING && !e._orthographicIn3D ? Matrix4.inverse(
+ e._projection,
+ e._inverseProjection
+ ) : Matrix4.clone(Matrix4.ZERO, e._inverseProjection));
+}
+function cleanModelView(e) {
+ e._modelViewDirty && (e._modelViewDirty = !1, Matrix4.multiplyTransformation(
+ e._view,
+ e._model,
+ e._modelView
+ ));
+}
+function cleanModelView3D(e) {
+ e._modelView3DDirty && (e._modelView3DDirty = !1, Matrix4.multiplyTransformation(
+ e.view3D,
+ e._model,
+ e._modelView3D
+ ));
+}
+function cleanInverseModelView(e) {
+ e._inverseModelViewDirty && (e._inverseModelViewDirty = !1, Matrix4.inverse(e.modelView, e._inverseModelView));
+}
+function cleanInverseModelView3D(e) {
+ e._inverseModelView3DDirty && (e._inverseModelView3DDirty = !1, Matrix4.inverse(e.modelView3D, e._inverseModelView3D));
+}
+function cleanViewProjection(e) {
+ e._viewProjectionDirty && (e._viewProjectionDirty = !1, Matrix4.multiply(
+ e._projection,
+ e._view,
+ e._viewProjection
+ ));
+}
+function cleanInverseViewProjection(e) {
+ e._inverseViewProjectionDirty && (e._inverseViewProjectionDirty = !1, Matrix4.inverse(
+ e.viewProjection,
+ e._inverseViewProjection
+ ));
+}
+function cleanModelViewProjection(e) {
+ e._modelViewProjectionDirty && (e._modelViewProjectionDirty = !1, Matrix4.multiply(
+ e._projection,
+ e.modelView,
+ e._modelViewProjection
+ ));
+}
+function cleanModelViewRelativeToEye(e) {
+ if (e._modelViewRelativeToEyeDirty) {
+ e._modelViewRelativeToEyeDirty = !1;
+ const t = e.modelView, n = e._modelViewRelativeToEye;
+ n[0] = t[0], n[1] = t[1], n[2] = t[2], n[3] = t[3], n[4] = t[4], n[5] = t[5], n[6] = t[6], n[7] = t[7], n[8] = t[8], n[9] = t[9], n[10] = t[10], n[11] = t[11], n[12] = 0, n[13] = 0, n[14] = 0, n[15] = t[15];
+ }
+}
+function cleanInverseModelViewProjection(e) {
+ e._inverseModelViewProjectionDirty && (e._inverseModelViewProjectionDirty = !1, Matrix4.inverse(
+ e.modelViewProjection,
+ e._inverseModelViewProjection
+ ));
+}
+function cleanModelViewProjectionRelativeToEye(e) {
+ e._modelViewProjectionRelativeToEyeDirty && (e._modelViewProjectionRelativeToEyeDirty = !1, Matrix4.multiply(
+ e._projection,
+ e.modelViewRelativeToEye,
+ e._modelViewProjectionRelativeToEye
+ ));
+}
+function cleanModelViewInfiniteProjection(e) {
+ e._modelViewInfiniteProjectionDirty && (e._modelViewInfiniteProjectionDirty = !1, Matrix4.multiply(
+ e._infiniteProjection,
+ e.modelView,
+ e._modelViewInfiniteProjection
+ ));
+}
+function cleanNormal(e) {
+ if (e._normalDirty) {
+ e._normalDirty = !1;
+ const t = e._normal;
+ Matrix4.getMatrix3(e.inverseModelView, t), Matrix3.transpose(t, t);
+ }
+}
+function cleanNormal3D(e) {
+ if (e._normal3DDirty) {
+ e._normal3DDirty = !1;
+ const t = e._normal3D;
+ Matrix4.getMatrix3(e.inverseModelView3D, t), Matrix3.transpose(t, t);
+ }
+}
+function cleanInverseNormal(e) {
+ if (e._inverseNormalDirty) {
+ e._inverseNormalDirty = !1;
+ const t = e._inverseNormal;
+ Matrix4.getMatrix3(e.modelView, t), Matrix3.transpose(t, t);
+ }
+}
+function cleanInverseNormal3D(e) {
+ if (e._inverseNormal3DDirty) {
+ e._inverseNormal3DDirty = !1;
+ const t = e._inverseNormal3D;
+ Matrix4.getMatrix3(e.modelView3D, t), Matrix3.transpose(t, t);
+ }
+}
+const cameraPositionMC = new Cartesian3();
+function cleanEncodedCameraPositionMC(e) {
+ e._encodedCameraPositionMCDirty && (e._encodedCameraPositionMCDirty = !1, Matrix4.multiplyByPoint(
+ e.inverseModel,
+ e._cameraPosition,
+ cameraPositionMC
+ ), EncodedCartesian3.fromCartesian(
+ cameraPositionMC,
+ e._encodedCameraPositionMC
+ ));
+}
+const view2Dto3DPScratch = new Cartesian3(), view2Dto3DRScratch = new Cartesian3(), view2Dto3DUScratch = new Cartesian3(), view2Dto3DDScratch = new Cartesian3(), view2Dto3DCartographicScratch = new Cartographic(), view2Dto3DCartesian3Scratch = new Cartesian3(), view2Dto3DMatrix4Scratch = new Matrix4();
+function view2Dto3D(e, t, n, i, r, o, s, c) {
+ const l = view2Dto3DPScratch;
+ l.x = e.y, l.y = e.z, l.z = e.x;
+ const d = view2Dto3DRScratch;
+ d.x = n.y, d.y = n.z, d.z = n.x;
+ const f = view2Dto3DUScratch;
+ f.x = i.y, f.y = i.z, f.z = i.x;
+ const h = view2Dto3DDScratch;
+ h.x = t.y, h.y = t.z, h.z = t.x, o === SceneMode$1.SCENE2D && (l.z = r * 0.5);
+ const p = s.unproject(l, view2Dto3DCartographicScratch);
+ p.longitude = CesiumMath.clamp(
+ p.longitude,
+ -Math.PI,
+ Math.PI
+ ), p.latitude = CesiumMath.clamp(
+ p.latitude,
+ -CesiumMath.PI_OVER_TWO,
+ CesiumMath.PI_OVER_TWO
+ );
+ const m = s.ellipsoid, _ = m.cartographicToCartesian(
+ p,
+ view2Dto3DCartesian3Scratch
+ ), y = Transforms.eastNorthUpToFixedFrame(
+ _,
+ m,
+ view2Dto3DMatrix4Scratch
+ );
+ return Matrix4.multiplyByPointAsVector(y, d, d), Matrix4.multiplyByPointAsVector(y, f, f), Matrix4.multiplyByPointAsVector(y, h, h), defined(c) || (c = new Matrix4()), c[0] = d.x, c[1] = f.x, c[2] = -h.x, c[3] = 0, c[4] = d.y, c[5] = f.y, c[6] = -h.y, c[7] = 0, c[8] = d.z, c[9] = f.z, c[10] = -h.z, c[11] = 0, c[12] = -Cartesian3.dot(d, _), c[13] = -Cartesian3.dot(f, _), c[14] = Cartesian3.dot(h, _), c[15] = 1, c;
+}
+function updateView3D(e) {
+ e._view3DDirty && (e._mode === SceneMode$1.SCENE3D ? Matrix4.clone(e._view, e._view3D) : view2Dto3D(
+ e._cameraPosition,
+ e._cameraDirection,
+ e._cameraRight,
+ e._cameraUp,
+ e._frustum2DWidth,
+ e._mode,
+ e._mapProjection,
+ e._view3D
+ ), Matrix4.getMatrix3(e._view3D, e._viewRotation3D), e._view3DDirty = !1);
+}
+function updateInverseView3D(e) {
+ e._inverseView3DDirty && (Matrix4.inverseTransformation(e.view3D, e._inverseView3D), Matrix4.getMatrix3(e._inverseView3D, e._inverseViewRotation3D), e._inverseView3DDirty = !1);
+}
+function addAttribute(e, t, n, i) {
+ const r = defined(t.vertexBuffer), o = defined(t.value), s = t.value ? t.value.length : t.componentsPerAttribute, c = {
+ index: defaultValue(t.index, n),
+ enabled: defaultValue(t.enabled, !0),
+ vertexBuffer: t.vertexBuffer,
+ value: o ? t.value.slice(0) : void 0,
+ componentsPerAttribute: s,
+ componentDatatype: defaultValue(
+ t.componentDatatype,
+ ComponentDatatype$1.FLOAT
+ ),
+ normalize: defaultValue(t.normalize, !1),
+ offsetInBytes: defaultValue(t.offsetInBytes, 0),
+ strideInBytes: defaultValue(t.strideInBytes, 0),
+ instanceDivisor: defaultValue(t.instanceDivisor, 0)
+ };
+ if (r)
+ c.vertexAttrib = function(l) {
+ const d = this.index;
+ l.bindBuffer(l.ARRAY_BUFFER, this.vertexBuffer._getBuffer()), l.vertexAttribPointer(
+ d,
+ this.componentsPerAttribute,
+ this.componentDatatype,
+ this.normalize,
+ this.strideInBytes,
+ this.offsetInBytes
+ ), l.enableVertexAttribArray(d), this.instanceDivisor > 0 && (i.glVertexAttribDivisor(d, this.instanceDivisor), i._vertexAttribDivisors[d] = this.instanceDivisor, i._previousDrawInstanced = !0);
+ }, c.disableVertexAttribArray = function(l) {
+ l.disableVertexAttribArray(this.index), this.instanceDivisor > 0 && i.glVertexAttribDivisor(n, 0);
+ };
+ else {
+ switch (c.componentsPerAttribute) {
+ case 1:
+ c.vertexAttrib = function(l) {
+ l.vertexAttrib1fv(this.index, this.value);
+ };
+ break;
+ case 2:
+ c.vertexAttrib = function(l) {
+ l.vertexAttrib2fv(this.index, this.value);
+ };
+ break;
+ case 3:
+ c.vertexAttrib = function(l) {
+ l.vertexAttrib3fv(this.index, this.value);
+ };
+ break;
+ case 4:
+ c.vertexAttrib = function(l) {
+ l.vertexAttrib4fv(this.index, this.value);
+ };
+ break;
+ }
+ c.disableVertexAttribArray = function(l) {
+ };
+ }
+ e.push(c);
+}
+function bind(e, t, n) {
+ for (let i = 0; i < t.length; ++i) {
+ const r = t[i];
+ r.enabled && r.vertexAttrib(e);
+ }
+ defined(n) && e.bindBuffer(e.ELEMENT_ARRAY_BUFFER, n._getBuffer());
+}
+function VertexArray(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.context, n = t._gl, i = e.attributes, r = e.indexBuffer;
+ let o;
+ const s = [];
+ let c = 1, l = !1, d = !1, f = i.length;
+ for (o = 0; o < f; ++o)
+ addAttribute(s, i[o], o, t);
+ for (f = s.length, o = 0; o < f; ++o) {
+ const p = s[o];
+ if (defined(p.vertexBuffer) && p.instanceDivisor === 0) {
+ const m = p.strideInBytes || p.componentsPerAttribute * ComponentDatatype$1.getSizeInBytes(p.componentDatatype);
+ c = p.vertexBuffer.sizeInBytes / m;
+ break;
+ }
+ }
+ for (o = 0; o < f; ++o)
+ s[o].instanceDivisor > 0 && (l = !0), defined(s[o].value) && (d = !0);
+ let h;
+ t.vertexArrayObject && (h = t.glCreateVertexArray(), t.glBindVertexArray(h), bind(n, s, r), t.glBindVertexArray(null)), this._numberOfVertices = c, this._hasInstancedAttributes = l, this._hasConstantAttributes = d, this._context = t, this._gl = n, this._vao = h, this._attributes = s, this._indexBuffer = r;
+}
+function computeNumberOfVertices(e) {
+ return e.values.length / e.componentsPerAttribute;
+}
+function computeAttributeSizeInBytes(e) {
+ return ComponentDatatype$1.getSizeInBytes(e.componentDatatype) * e.componentsPerAttribute;
+}
+function interleaveAttributes(e) {
+ let t, n, i;
+ const r = [];
+ for (n in e)
+ e.hasOwnProperty(n) && defined(e[n]) && defined(e[n].values) && (r.push(n), e[n].componentDatatype === ComponentDatatype$1.DOUBLE && (e[n].componentDatatype = ComponentDatatype$1.FLOAT, e[n].values = ComponentDatatype$1.createTypedArray(
+ ComponentDatatype$1.FLOAT,
+ e[n].values
+ )));
+ let o;
+ const s = r.length;
+ if (s > 0)
+ for (o = computeNumberOfVertices(e[r[0]]), t = 1; t < s; ++t) {
+ const d = computeNumberOfVertices(
+ e[r[t]]
+ );
+ if (d !== o)
+ throw new RuntimeError(
+ `Each attribute list must have the same number of vertices. Attribute ${r[t]} has a different number of vertices (${d.toString()}) than attribute ${r[0]} (${o.toString()}).`
+ );
+ }
+ r.sort(function(d, f) {
+ return ComponentDatatype$1.getSizeInBytes(e[f].componentDatatype) - ComponentDatatype$1.getSizeInBytes(e[d].componentDatatype);
+ });
+ let c = 0;
+ const l = {};
+ for (t = 0; t < s; ++t)
+ n = r[t], i = e[n], l[n] = c, c += computeAttributeSizeInBytes(i);
+ if (c > 0) {
+ const d = ComponentDatatype$1.getSizeInBytes(
+ e[r[0]].componentDatatype
+ ), f = c % d;
+ f !== 0 && (c += d - f);
+ const h = o * c, p = new ArrayBuffer(h), m = {};
+ for (t = 0; t < s; ++t) {
+ n = r[t];
+ const _ = ComponentDatatype$1.getSizeInBytes(
+ e[n].componentDatatype
+ );
+ m[n] = {
+ pointer: ComponentDatatype$1.createTypedArray(
+ e[n].componentDatatype,
+ p
+ ),
+ index: l[n] / _,
+ // Offset in ComponentType
+ strideInComponentType: c / _
+ };
+ }
+ for (t = 0; t < o; ++t)
+ for (let _ = 0; _ < s; ++_) {
+ n = r[_], i = e[n];
+ const y = i.values, C = m[n], T = C.pointer, x = i.componentsPerAttribute;
+ for (let b = 0; b < x; ++b)
+ T[C.index + b] = y[t * x + b];
+ C.index += C.strideInComponentType;
+ }
+ return {
+ buffer: p,
+ offsetsInBytes: l,
+ vertexSizeInBytes: c
+ };
+ }
+}
+VertexArray.fromGeometry = function(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.context, n = defaultValue(e.geometry, defaultValue.EMPTY_OBJECT), i = defaultValue(
+ e.bufferUsage,
+ BufferUsage$1.DYNAMIC_DRAW
+ ), r = defaultValue(
+ e.attributeLocations,
+ defaultValue.EMPTY_OBJECT
+ ), o = defaultValue(e.interleave, !1), s = e.vertexArrayAttributes;
+ let c, l, d;
+ const f = defined(s) ? s : [], h = n.attributes;
+ if (o) {
+ const _ = interleaveAttributes(h);
+ if (defined(_)) {
+ d = Buffer.createVertexBuffer({
+ context: t,
+ typedArray: _.buffer,
+ usage: i
+ });
+ const y = _.offsetsInBytes, C = _.vertexSizeInBytes;
+ for (c in h)
+ h.hasOwnProperty(c) && defined(h[c]) && (l = h[c], defined(l.values) ? f.push({
+ index: r[c],
+ vertexBuffer: d,
+ componentDatatype: l.componentDatatype,
+ componentsPerAttribute: l.componentsPerAttribute,
+ normalize: l.normalize,
+ offsetInBytes: y[c],
+ strideInBytes: C
+ }) : f.push({
+ index: r[c],
+ value: l.value,
+ componentDatatype: l.componentDatatype,
+ normalize: l.normalize
+ }));
+ }
+ } else
+ for (c in h)
+ if (h.hasOwnProperty(c) && defined(h[c])) {
+ l = h[c];
+ let _ = l.componentDatatype;
+ _ === ComponentDatatype$1.DOUBLE && (_ = ComponentDatatype$1.FLOAT), d = void 0, defined(l.values) && (d = Buffer.createVertexBuffer({
+ context: t,
+ typedArray: ComponentDatatype$1.createTypedArray(
+ _,
+ l.values
+ ),
+ usage: i
+ })), f.push({
+ index: r[c],
+ vertexBuffer: d,
+ value: l.value,
+ componentDatatype: _,
+ componentsPerAttribute: l.componentsPerAttribute,
+ normalize: l.normalize
+ });
+ }
+ let p;
+ const m = n.indices;
+ return defined(m) && (Geometry.computeNumberOfVertices(n) >= CesiumMath.SIXTY_FOUR_KILOBYTES && t.elementIndexUint ? p = Buffer.createIndexBuffer({
+ context: t,
+ typedArray: new Uint32Array(m),
+ usage: i,
+ indexDatatype: IndexDatatype$1.UNSIGNED_INT
+ }) : p = Buffer.createIndexBuffer({
+ context: t,
+ typedArray: new Uint16Array(m),
+ usage: i,
+ indexDatatype: IndexDatatype$1.UNSIGNED_SHORT
+ })), new VertexArray({
+ context: t,
+ attributes: f,
+ indexBuffer: p
+ });
+};
+Object.defineProperties(VertexArray.prototype, {
+ numberOfAttributes: {
+ get: function() {
+ return this._attributes.length;
+ }
+ },
+ numberOfVertices: {
+ get: function() {
+ return this._numberOfVertices;
+ }
+ },
+ indexBuffer: {
+ get: function() {
+ return this._indexBuffer;
+ }
+ }
+});
+VertexArray.prototype.getAttribute = function(e) {
+ return this._attributes[e];
+};
+function setVertexAttribDivisor(e) {
+ const t = e._context, n = e._hasInstancedAttributes;
+ if (!n && !t._previousDrawInstanced)
+ return;
+ t._previousDrawInstanced = n;
+ const i = t._vertexAttribDivisors, r = e._attributes, o = ContextLimits.maximumVertexAttributes;
+ let s;
+ if (n) {
+ const c = r.length;
+ for (s = 0; s < c; ++s) {
+ const l = r[s];
+ if (l.enabled) {
+ const d = l.instanceDivisor, f = l.index;
+ d !== i[f] && (t.glVertexAttribDivisor(f, d), i[f] = d);
+ }
+ }
+ } else
+ for (s = 0; s < o; ++s)
+ i[s] > 0 && (t.glVertexAttribDivisor(s, 0), i[s] = 0);
+}
+function setConstantAttributes(e, t) {
+ const n = e._attributes, i = n.length;
+ for (let r = 0; r < i; ++r) {
+ const o = n[r];
+ o.enabled && defined(o.value) && o.vertexAttrib(t);
+ }
+}
+VertexArray.prototype._bind = function() {
+ defined(this._vao) ? (this._context.glBindVertexArray(this._vao), this._context.instancedArrays && setVertexAttribDivisor(this), this._hasConstantAttributes && setConstantAttributes(this, this._gl)) : bind(this._gl, this._attributes, this._indexBuffer);
+};
+VertexArray.prototype._unBind = function() {
+ if (defined(this._vao))
+ this._context.glBindVertexArray(null);
+ else {
+ const e = this._attributes, t = this._gl;
+ for (let n = 0; n < e.length; ++n) {
+ const i = e[n];
+ i.enabled && i.disableVertexAttribArray(t);
+ }
+ this._indexBuffer && t.bindBuffer(t.ELEMENT_ARRAY_BUFFER, null);
+ }
+};
+VertexArray.prototype.isDestroyed = function() {
+ return !1;
+};
+VertexArray.prototype.destroy = function() {
+ const e = this._attributes;
+ for (let n = 0; n < e.length; ++n) {
+ const i = e[n].vertexBuffer;
+ defined(i) && !i.isDestroyed() && i.vertexArrayDestroyable && i.destroy();
+ }
+ const t = this._indexBuffer;
+ return defined(t) && !t.isDestroyed() && t.vertexArrayDestroyable && t.destroy(), defined(this._vao) && this._context.glDeleteVertexArray(this._vao), destroyObject(this);
+};
+function Context(e, t) {
+ const {
+ getWebGLStub: n,
+ requestWebgl1: i,
+ webgl: r = {},
+ allowTextureFilterAnisotropic: o = !0
+ } = defaultValue(t, {});
+ r.alpha = defaultValue(r.alpha, !1), r.stencil = defaultValue(r.stencil, !0), r.powerPreference = defaultValue(
+ r.powerPreference,
+ "high-performance"
+ );
+ const s = defined(n) ? n(e, r) : getWebGLContext(e, r, i), l = typeof WebGL2RenderingContext < "u" && s instanceof WebGL2RenderingContext;
+ this._canvas = e, this._originalGLContext = s, this._gl = s, this._webgl2 = l, this._id = createGuid(), this.validateFramebuffer = !1, this.validateShaderProgram = !1, this.logShaderCompilation = !1, this._throwOnWebGLError = !1, this._shaderCache = new ShaderCache(this), this._textureCache = new TextureCache();
+ const d = s;
+ this._stencilBits = d.getParameter(d.STENCIL_BITS), ContextLimits._maximumCombinedTextureImageUnits = d.getParameter(
+ d.MAX_COMBINED_TEXTURE_IMAGE_UNITS
+ ), ContextLimits._maximumCubeMapSize = d.getParameter(
+ d.MAX_CUBE_MAP_TEXTURE_SIZE
+ ), ContextLimits._maximumFragmentUniformVectors = d.getParameter(
+ d.MAX_FRAGMENT_UNIFORM_VECTORS
+ ), ContextLimits._maximumTextureImageUnits = d.getParameter(
+ d.MAX_TEXTURE_IMAGE_UNITS
+ ), ContextLimits._maximumRenderbufferSize = d.getParameter(
+ d.MAX_RENDERBUFFER_SIZE
+ ), ContextLimits._maximumTextureSize = d.getParameter(d.MAX_TEXTURE_SIZE), ContextLimits._maximumVaryingVectors = d.getParameter(
+ d.MAX_VARYING_VECTORS
+ ), ContextLimits._maximumVertexAttributes = d.getParameter(
+ d.MAX_VERTEX_ATTRIBS
+ ), ContextLimits._maximumVertexTextureImageUnits = d.getParameter(
+ d.MAX_VERTEX_TEXTURE_IMAGE_UNITS
+ ), ContextLimits._maximumVertexUniformVectors = d.getParameter(
+ d.MAX_VERTEX_UNIFORM_VECTORS
+ ), ContextLimits._maximumSamples = this._webgl2 ? d.getParameter(d.MAX_SAMPLES) : 0;
+ const f = d.getParameter(d.ALIASED_LINE_WIDTH_RANGE);
+ ContextLimits._minimumAliasedLineWidth = f[0], ContextLimits._maximumAliasedLineWidth = f[1];
+ const h = d.getParameter(d.ALIASED_POINT_SIZE_RANGE);
+ ContextLimits._minimumAliasedPointSize = h[0], ContextLimits._maximumAliasedPointSize = h[1];
+ const p = d.getParameter(d.MAX_VIEWPORT_DIMS);
+ ContextLimits._maximumViewportWidth = p[0], ContextLimits._maximumViewportHeight = p[1];
+ const m = d.getShaderPrecisionFormat(
+ d.FRAGMENT_SHADER,
+ d.HIGH_FLOAT
+ );
+ ContextLimits._highpFloatSupported = m.precision !== 0;
+ const _ = d.getShaderPrecisionFormat(d.FRAGMENT_SHADER, d.HIGH_INT);
+ ContextLimits._highpIntSupported = _.rangeMax !== 0, this._antialias = d.getContextAttributes().antialias, this._standardDerivatives = !!getExtension(d, ["OES_standard_derivatives"]), this._blendMinmax = !!getExtension(d, ["EXT_blend_minmax"]), this._elementIndexUint = !!getExtension(d, ["OES_element_index_uint"]), this._depthTexture = !!getExtension(d, [
+ "WEBGL_depth_texture",
+ "WEBKIT_WEBGL_depth_texture"
+ ]), this._fragDepth = !!getExtension(d, ["EXT_frag_depth"]), this._debugShaders = getExtension(d, ["WEBGL_debug_shaders"]), this._textureFloat = !!getExtension(d, ["OES_texture_float"]), this._textureHalfFloat = !!getExtension(d, ["OES_texture_half_float"]), this._textureFloatLinear = !!getExtension(d, ["OES_texture_float_linear"]), this._textureHalfFloatLinear = !!getExtension(d, [
+ "OES_texture_half_float_linear"
+ ]), this._supportsTextureLod = !!getExtension(d, ["EXT_shader_texture_lod"]), this._colorBufferFloat = !!getExtension(d, [
+ "EXT_color_buffer_float",
+ "WEBGL_color_buffer_float"
+ ]), this._floatBlend = !!getExtension(d, ["EXT_float_blend"]), this._colorBufferHalfFloat = !!getExtension(d, [
+ "EXT_color_buffer_half_float"
+ ]), this._s3tc = !!getExtension(d, [
+ "WEBGL_compressed_texture_s3tc",
+ "MOZ_WEBGL_compressed_texture_s3tc",
+ "WEBKIT_WEBGL_compressed_texture_s3tc"
+ ]), this._pvrtc = !!getExtension(d, [
+ "WEBGL_compressed_texture_pvrtc",
+ "WEBKIT_WEBGL_compressed_texture_pvrtc"
+ ]), this._astc = !!getExtension(d, ["WEBGL_compressed_texture_astc"]), this._etc = !!getExtension(d, ["WEBG_compressed_texture_etc"]), this._etc1 = !!getExtension(d, ["WEBGL_compressed_texture_etc1"]), this._bc7 = !!getExtension(d, ["EXT_texture_compression_bptc"]), loadKTX2.setKTX2SupportedFormats(
+ this._s3tc,
+ this._pvrtc,
+ this._astc,
+ this._etc,
+ this._etc1,
+ this._bc7
+ );
+ const y = o ? getExtension(d, [
+ "EXT_texture_filter_anisotropic",
+ "WEBKIT_EXT_texture_filter_anisotropic"
+ ]) : void 0;
+ this._textureFilterAnisotropic = y, ContextLimits._maximumTextureFilterAnisotropy = defined(
+ y
+ ) ? d.getParameter(y.MAX_TEXTURE_MAX_ANISOTROPY_EXT) : 1;
+ let C, T, x, b, S, E, A, D, P, I;
+ if (l) {
+ const g = this;
+ C = function() {
+ return g._gl.createVertexArray();
+ }, T = function(w) {
+ g._gl.bindVertexArray(w);
+ }, x = function(w) {
+ g._gl.deleteVertexArray(w);
+ }, b = function(w, O, N, F, B) {
+ d.drawElementsInstanced(w, O, N, F, B);
+ }, S = function(w, O, N, F) {
+ d.drawArraysInstanced(w, O, N, F);
+ }, E = function(w, O) {
+ d.vertexAttribDivisor(w, O);
+ }, A = function(w) {
+ d.drawBuffers(w);
+ };
+ } else
+ D = getExtension(d, ["OES_vertex_array_object"]), defined(D) && (C = function() {
+ return D.createVertexArrayOES();
+ }, T = function(g) {
+ D.bindVertexArrayOES(g);
+ }, x = function(g) {
+ D.deleteVertexArrayOES(g);
+ }), P = getExtension(d, ["ANGLE_instanced_arrays"]), defined(P) && (b = function(g, w, O, N, F) {
+ P.drawElementsInstancedANGLE(
+ g,
+ w,
+ O,
+ N,
+ F
+ );
+ }, S = function(g, w, O, N) {
+ P.drawArraysInstancedANGLE(
+ g,
+ w,
+ O,
+ N
+ );
+ }, E = function(g, w) {
+ P.vertexAttribDivisorANGLE(g, w);
+ }), I = getExtension(d, ["WEBGL_draw_buffers"]), defined(I) && (A = function(g) {
+ I.drawBuffersWEBGL(g);
+ });
+ this.glCreateVertexArray = C, this.glBindVertexArray = T, this.glDeleteVertexArray = x, this.glDrawElementsInstanced = b, this.glDrawArraysInstanced = S, this.glVertexAttribDivisor = E, this.glDrawBuffers = A, this._vertexArrayObject = !!D, this._instancedArrays = !!P, this._drawBuffers = !!I, ContextLimits._maximumDrawBuffers = this.drawBuffers ? d.getParameter(WebGLConstants$1.MAX_DRAW_BUFFERS) : 1, ContextLimits._maximumColorAttachments = this.drawBuffers ? d.getParameter(WebGLConstants$1.MAX_COLOR_ATTACHMENTS) : 1, this._clearColor = new Color(0, 0, 0, 0), this._clearDepth = 1, this._clearStencil = 0;
+ const M = new UniformState(), R = new PassState(this), L = RenderState.fromCache();
+ this._defaultPassState = R, this._defaultRenderState = L, this._defaultTexture = void 0, this._defaultEmissiveTexture = void 0, this._defaultNormalTexture = void 0, this._defaultCubeMap = void 0, this._us = M, this._currentRenderState = L, this._currentPassState = R, this._currentFramebuffer = void 0, this._maxFrameTextureUnitIndex = 0, this._vertexAttribDivisors = [], this._previousDrawInstanced = !1;
+ for (let g = 0; g < ContextLimits._maximumVertexAttributes; g++)
+ this._vertexAttribDivisors.push(0);
+ this._pickObjects = {}, this._nextPickColor = new Uint32Array(1), this.options = {
+ getWebGLStub: n,
+ requestWebgl1: i,
+ webgl: r,
+ allowTextureFilterAnisotropic: o
+ }, this.cache = {}, RenderState.apply(d, L, R);
+}
+function getWebGLContext(e, t, n) {
+ if (typeof WebGLRenderingContext > "u")
+ throw new RuntimeError(
+ "The browser does not support WebGL. Visit http://get.webgl.org."
+ );
+ !n && !(typeof WebGL2RenderingContext < "u") && (n = !0);
+ const r = n ? "webgl" : "webgl2", o = e.getContext(r, t);
+ if (!defined(o))
+ throw new RuntimeError(
+ "The browser supports WebGL, but initialization failed."
+ );
+ return o;
+}
+function errorToString(e, t) {
+ let n = "WebGL Error: ";
+ switch (t) {
+ case e.INVALID_ENUM:
+ n += "INVALID_ENUM";
+ break;
+ case e.INVALID_VALUE:
+ n += "INVALID_VALUE";
+ break;
+ case e.INVALID_OPERATION:
+ n += "INVALID_OPERATION";
+ break;
+ case e.OUT_OF_MEMORY:
+ n += "OUT_OF_MEMORY";
+ break;
+ case e.CONTEXT_LOST_WEBGL:
+ n += "CONTEXT_LOST_WEBGL lost";
+ break;
+ default:
+ n += `Unknown (${t})`;
+ }
+ return n;
+}
+function createErrorMessage(e, t, n, i) {
+ let r = `${errorToString(e, i)}: ${t.name}(`;
+ for (let o = 0; o < n.length; ++o)
+ o !== 0 && (r += ", "), r += n[o];
+ return r += ");", r;
+}
+function throwOnError(e, t, n) {
+ const i = e.getError();
+ if (i !== e.NO_ERROR)
+ throw new RuntimeError(
+ createErrorMessage(e, t, n, i)
+ );
+}
+function makeGetterSetter(e, t, n) {
+ return {
+ get: function() {
+ const i = e[t];
+ return n(e, `get: ${t}`, i), e[t];
+ },
+ set: function(i) {
+ e[t] = i, n(e, `set: ${t}`, i);
+ }
+ };
+}
+function wrapGL(e, t) {
+ if (!defined(t))
+ return e;
+ function n(r) {
+ return function() {
+ const o = r.apply(e, arguments);
+ return t(e, r, arguments), o;
+ };
+ }
+ const i = {};
+ for (const r in e) {
+ const o = e[r];
+ o instanceof Function ? i[r] = n(o) : Object.defineProperty(
+ i,
+ r,
+ makeGetterSetter(e, r, t)
+ );
+ }
+ return i;
+}
+function getExtension(e, t) {
+ const n = t.length;
+ for (let i = 0; i < n; ++i) {
+ const r = e.getExtension(t[i]);
+ if (r)
+ return r;
+ }
+}
+const defaultFramebufferMarker = {};
+Object.defineProperties(Context.prototype, {
+ id: {
+ get: function() {
+ return this._id;
+ }
+ },
+ webgl2: {
+ get: function() {
+ return this._webgl2;
+ }
+ },
+ canvas: {
+ get: function() {
+ return this._canvas;
+ }
+ },
+ shaderCache: {
+ get: function() {
+ return this._shaderCache;
+ }
+ },
+ textureCache: {
+ get: function() {
+ return this._textureCache;
+ }
+ },
+ uniformState: {
+ get: function() {
+ return this._us;
+ }
+ },
+ /**
+ * The number of stencil bits per pixel in the default bound framebuffer. The minimum is eight bits.
+ * @memberof Context.prototype
+ * @type {number}
+ * @see {@link https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml|glGet} with STENCIL_BITS.
+ */
+ stencilBits: {
+ get: function() {
+ return this._stencilBits;
+ }
+ },
+ /**
+ * true if the WebGL context supports stencil buffers.
+ * Stencil buffers are not supported by all systems.
+ * @memberof Context.prototype
+ * @type {boolean}
+ */
+ stencilBuffer: {
+ get: function() {
+ return this._stencilBits >= 8;
+ }
+ },
+ /**
+ * true if the WebGL context supports antialiasing. By default
+ * antialiasing is requested, but it is not supported by all systems.
+ * @memberof Context.prototype
+ * @type {boolean}
+ */
+ antialias: {
+ get: function() {
+ return this._antialias;
+ }
+ },
+ /**
+ * true if the WebGL context supports multisample antialiasing. Requires
+ * WebGL2.
+ * @memberof Context.prototype
+ * @type {boolean}
+ */
+ msaa: {
+ get: function() {
+ return this._webgl2;
+ }
+ },
+ /**
+ * true if the OES_standard_derivatives extension is supported. This
+ * extension provides access to dFdx, dFdy, and fwidth
+ * functions from GLSL. A shader using these functions still needs to explicitly enable the
+ * extension with #extension GL_OES_standard_derivatives : enable.
+ * @memberof Context.prototype
+ * @type {boolean}
+ * @see {@link http://www.khronos.org/registry/gles/extensions/OES/OES_standard_derivatives.txt|OES_standard_derivatives}
+ */
+ standardDerivatives: {
+ get: function() {
+ return this._standardDerivatives || this._webgl2;
+ }
+ },
+ /**
+ * true if the EXT_float_blend extension is supported. This
+ * extension enables blending with 32-bit float values.
+ * @memberof Context.prototype
+ * @type {boolean}
+ * @see {@link https://www.khronos.org/registry/webgl/extensions/EXT_float_blend/}
+ */
+ floatBlend: {
+ get: function() {
+ return this._floatBlend;
+ }
+ },
+ /**
+ * true if the EXT_blend_minmax extension is supported. This
+ * extension extends blending capabilities by adding two new blend equations:
+ * the minimum or maximum color components of the source and destination colors.
+ * @memberof Context.prototype
+ * @type {boolean}
+ * @see {@link https://www.khronos.org/registry/webgl/extensions/EXT_blend_minmax/}
+ */
+ blendMinmax: {
+ get: function() {
+ return this._blendMinmax || this._webgl2;
+ }
+ },
+ /**
+ * true if the OES_element_index_uint extension is supported. This
+ * extension allows the use of unsigned int indices, which can improve performance by
+ * eliminating batch breaking caused by unsigned short indices.
+ * @memberof Context.prototype
+ * @type {boolean}
+ * @see {@link http://www.khronos.org/registry/webgl/extensions/OES_element_index_uint/|OES_element_index_uint}
+ */
+ elementIndexUint: {
+ get: function() {
+ return this._elementIndexUint || this._webgl2;
+ }
+ },
+ /**
+ * true if WEBGL_depth_texture is supported. This extension provides
+ * access to depth textures that, for example, can be attached to framebuffers for shadow mapping.
+ * @memberof Context.prototype
+ * @type {boolean}
+ * @see {@link http://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/|WEBGL_depth_texture}
+ */
+ depthTexture: {
+ get: function() {
+ return this._depthTexture || this._webgl2;
+ }
+ },
+ /**
+ * true if OES_texture_float is supported. This extension provides
+ * access to floating point textures that, for example, can be attached to framebuffers for high dynamic range.
+ * @memberof Context.prototype
+ * @type {boolean}
+ * @see {@link https://www.khronos.org/registry/webgl/extensions/OES_texture_float/}
+ */
+ floatingPointTexture: {
+ get: function() {
+ return this._webgl2 || this._textureFloat;
+ }
+ },
+ /**
+ * true if OES_texture_half_float is supported. This extension provides
+ * access to floating point textures that, for example, can be attached to framebuffers for high dynamic range.
+ * @memberof Context.prototype
+ * @type {boolean}
+ * @see {@link https://www.khronos.org/registry/webgl/extensions/OES_texture_half_float/}
+ */
+ halfFloatingPointTexture: {
+ get: function() {
+ return this._webgl2 || this._textureHalfFloat;
+ }
+ },
+ /**
+ * true if OES_texture_float_linear is supported. This extension provides
+ * access to linear sampling methods for minification and magnification filters of floating-point textures.
+ * @memberof Context.prototype
+ * @type {boolean}
+ * @see {@link https://www.khronos.org/registry/webgl/extensions/OES_texture_float_linear/}
+ */
+ textureFloatLinear: {
+ get: function() {
+ return this._textureFloatLinear;
+ }
+ },
+ /**
+ * true if OES_texture_half_float_linear is supported. This extension provides
+ * access to linear sampling methods for minification and magnification filters of half floating-point textures.
+ * @memberof Context.prototype
+ * @type {boolean}
+ * @see {@link https://www.khronos.org/registry/webgl/extensions/OES_texture_half_float_linear/}
+ */
+ textureHalfFloatLinear: {
+ get: function() {
+ return this._webgl2 && this._textureFloatLinear || !this._webgl2 && this._textureHalfFloatLinear;
+ }
+ },
+ /**
+ * true if EXT_shader_texture_lod is supported. This extension provides
+ * access to explicit LOD selection in texture sampling functions.
+ * @memberof Context.prototype
+ * @type {boolean}
+ * @see {@link https://registry.khronos.org/webgl/extensions/EXT_shader_texture_lod/}
+ */
+ supportsTextureLod: {
+ get: function() {
+ return this._webgl2 || this._supportsTextureLod;
+ }
+ },
+ /**
+ * true if EXT_texture_filter_anisotropic is supported. This extension provides
+ * access to anisotropic filtering for textured surfaces at an oblique angle from the viewer.
+ * @memberof Context.prototype
+ * @type {boolean}
+ * @see {@link https://www.khronos.org/registry/webgl/extensions/EXT_texture_filter_anisotropic/}
+ */
+ textureFilterAnisotropic: {
+ get: function() {
+ return !!this._textureFilterAnisotropic;
+ }
+ },
+ /**
+ * true if WEBGL_compressed_texture_s3tc is supported. This extension provides
+ * access to DXT compressed textures.
+ * @memberof Context.prototype
+ * @type {boolean}
+ * @see {@link https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_s3tc/}
+ */
+ s3tc: {
+ get: function() {
+ return this._s3tc;
+ }
+ },
+ /**
+ * true if WEBGL_compressed_texture_pvrtc is supported. This extension provides
+ * access to PVR compressed textures.
+ * @memberof Context.prototype
+ * @type {boolean}
+ * @see {@link https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_pvrtc/}
+ */
+ pvrtc: {
+ get: function() {
+ return this._pvrtc;
+ }
+ },
+ /**
+ * true if WEBGL_compressed_texture_astc is supported. This extension provides
+ * access to ASTC compressed textures.
+ * @memberof Context.prototype
+ * @type {boolean}
+ * @see {@link https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_astc/}
+ */
+ astc: {
+ get: function() {
+ return this._astc;
+ }
+ },
+ /**
+ * true if WEBGL_compressed_texture_etc is supported. This extension provides
+ * access to ETC compressed textures.
+ * @memberof Context.prototype
+ * @type {boolean}
+ * @see {@link https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_etc/}
+ */
+ etc: {
+ get: function() {
+ return this._etc;
+ }
+ },
+ /**
+ * true if WEBGL_compressed_texture_etc1 is supported. This extension provides
+ * access to ETC1 compressed textures.
+ * @memberof Context.prototype
+ * @type {boolean}
+ * @see {@link https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_etc1/}
+ */
+ etc1: {
+ get: function() {
+ return this._etc1;
+ }
+ },
+ /**
+ * true if EXT_texture_compression_bptc is supported. This extension provides
+ * access to BC7 compressed textures.
+ * @memberof Context.prototype
+ * @type {boolean}
+ * @see {@link https://www.khronos.org/registry/webgl/extensions/EXT_texture_compression_bptc/}
+ */
+ bc7: {
+ get: function() {
+ return this._bc7;
+ }
+ },
+ /**
+ * true if S3TC, PVRTC, ASTC, ETC, ETC1, or BC7 compression is supported.
+ * @memberof Context.prototype
+ * @type {boolean}
+ */
+ supportsBasis: {
+ get: function() {
+ return this._s3tc || this._pvrtc || this._astc || this._etc || this._etc1 || this._bc7;
+ }
+ },
+ /**
+ * true if the OES_vertex_array_object extension is supported. This
+ * extension can improve performance by reducing the overhead of switching vertex arrays.
+ * When enabled, this extension is automatically used by {@link VertexArray}.
+ * @memberof Context.prototype
+ * @type {boolean}
+ * @see {@link http://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/|OES_vertex_array_object}
+ */
+ vertexArrayObject: {
+ get: function() {
+ return this._vertexArrayObject || this._webgl2;
+ }
+ },
+ /**
+ * true if the EXT_frag_depth extension is supported. This
+ * extension provides access to the gl_FragDepthEXT built-in output variable
+ * from GLSL fragment shaders. A shader using these functions still needs to explicitly enable the
+ * extension with #extension GL_EXT_frag_depth : enable.
+ * @memberof Context.prototype
+ * @type {boolean}
+ * @see {@link http://www.khronos.org/registry/webgl/extensions/EXT_frag_depth/|EXT_frag_depth}
+ */
+ fragmentDepth: {
+ get: function() {
+ return this._fragDepth || this._webgl2;
+ }
+ },
+ /**
+ * true if the ANGLE_instanced_arrays extension is supported. This
+ * extension provides access to instanced rendering.
+ * @memberof Context.prototype
+ * @type {boolean}
+ * @see {@link https://www.khronos.org/registry/webgl/extensions/ANGLE_instanced_arrays}
+ */
+ instancedArrays: {
+ get: function() {
+ return this._instancedArrays || this._webgl2;
+ }
+ },
+ /**
+ * true if the EXT_color_buffer_float extension is supported. This
+ * extension makes the gl.RGBA32F format color renderable.
+ * @memberof Context.prototype
+ * @type {boolean}
+ * @see {@link https://www.khronos.org/registry/webgl/extensions/WEBGL_color_buffer_float/}
+ * @see {@link https://www.khronos.org/registry/webgl/extensions/EXT_color_buffer_float/}
+ */
+ colorBufferFloat: {
+ get: function() {
+ return this._colorBufferFloat;
+ }
+ },
+ /**
+ * true if the EXT_color_buffer_half_float extension is supported. This
+ * extension makes the format gl.RGBA16F format color renderable.
+ * @memberof Context.prototype
+ * @type {boolean}
+ * @see {@link https://www.khronos.org/registry/webgl/extensions/EXT_color_buffer_half_float/}
+ * @see {@link https://www.khronos.org/registry/webgl/extensions/EXT_color_buffer_float/}
+ */
+ colorBufferHalfFloat: {
+ get: function() {
+ return this._webgl2 && this._colorBufferFloat || !this._webgl2 && this._colorBufferHalfFloat;
+ }
+ },
+ /**
+ * true if the WEBGL_draw_buffers extension is supported. This
+ * extensions provides support for multiple render targets. The framebuffer object can have mutiple
+ * color attachments and the GLSL fragment shader can write to the built-in output array gl_FragData.
+ * A shader using this feature needs to explicitly enable the extension with
+ * #extension GL_EXT_draw_buffers : enable.
+ * @memberof Context.prototype
+ * @type {boolean}
+ * @see {@link http://www.khronos.org/registry/webgl/extensions/WEBGL_draw_buffers/|WEBGL_draw_buffers}
+ */
+ drawBuffers: {
+ get: function() {
+ return this._drawBuffers || this._webgl2;
+ }
+ },
+ debugShaders: {
+ get: function() {
+ return this._debugShaders;
+ }
+ },
+ throwOnWebGLError: {
+ get: function() {
+ return this._throwOnWebGLError;
+ },
+ set: function(e) {
+ this._throwOnWebGLError = e, this._gl = wrapGL(
+ this._originalGLContext,
+ e ? throwOnError : void 0
+ );
+ }
+ },
+ /**
+ * A 1x1 RGBA texture initialized to [255, 255, 255, 255]. This can
+ * be used as a placeholder texture while other textures are downloaded.
+ * @memberof Context.prototype
+ * @type {Texture}
+ */
+ defaultTexture: {
+ get: function() {
+ return this._defaultTexture === void 0 && (this._defaultTexture = new Texture({
+ context: this,
+ source: {
+ width: 1,
+ height: 1,
+ arrayBufferView: new Uint8Array([255, 255, 255, 255])
+ },
+ flipY: !1
+ })), this._defaultTexture;
+ }
+ },
+ /**
+ * A 1x1 RGB texture initialized to [0, 0, 0] representing a material that is
+ * not emissive. This can be used as a placeholder texture for emissive
+ * textures while other textures are downloaded.
+ * @memberof Context.prototype
+ * @type {Texture}
+ */
+ defaultEmissiveTexture: {
+ get: function() {
+ return this._defaultEmissiveTexture === void 0 && (this._defaultEmissiveTexture = new Texture({
+ context: this,
+ pixelFormat: PixelFormat$1.RGB,
+ source: {
+ width: 1,
+ height: 1,
+ arrayBufferView: new Uint8Array([0, 0, 0])
+ },
+ flipY: !1
+ })), this._defaultEmissiveTexture;
+ }
+ },
+ /**
+ * A 1x1 RGBA texture initialized to [128, 128, 255] to encode a tangent
+ * space normal pointing in the +z direction, i.e. (0, 0, 1). This can
+ * be used as a placeholder normal texture while other textures are
+ * downloaded.
+ * @memberof Context.prototype
+ * @type {Texture}
+ */
+ defaultNormalTexture: {
+ get: function() {
+ return this._defaultNormalTexture === void 0 && (this._defaultNormalTexture = new Texture({
+ context: this,
+ pixelFormat: PixelFormat$1.RGB,
+ source: {
+ width: 1,
+ height: 1,
+ arrayBufferView: new Uint8Array([128, 128, 255])
+ },
+ flipY: !1
+ })), this._defaultNormalTexture;
+ }
+ },
+ /**
+ * A cube map, where each face is a 1x1 RGBA texture initialized to
+ * [255, 255, 255, 255]. This can be used as a placeholder cube map while
+ * other cube maps are downloaded.
+ * @memberof Context.prototype
+ * @type {CubeMap}
+ */
+ defaultCubeMap: {
+ get: function() {
+ if (this._defaultCubeMap === void 0) {
+ const e = {
+ width: 1,
+ height: 1,
+ arrayBufferView: new Uint8Array([255, 255, 255, 255])
+ };
+ this._defaultCubeMap = new CubeMap({
+ context: this,
+ source: {
+ positiveX: e,
+ negativeX: e,
+ positiveY: e,
+ negativeY: e,
+ positiveZ: e,
+ negativeZ: e
+ },
+ flipY: !1
+ });
+ }
+ return this._defaultCubeMap;
+ }
+ },
+ /**
+ * The drawingBufferHeight of the underlying GL context.
+ * @memberof Context.prototype
+ * @type {number}
+ * @see {@link https://www.khronos.org/registry/webgl/specs/1.0/#DOM-WebGLRenderingContext-drawingBufferHeight|drawingBufferHeight}
+ */
+ drawingBufferHeight: {
+ get: function() {
+ return this._gl.drawingBufferHeight;
+ }
+ },
+ /**
+ * The drawingBufferWidth of the underlying GL context.
+ * @memberof Context.prototype
+ * @type {number}
+ * @see {@link https://www.khronos.org/registry/webgl/specs/1.0/#DOM-WebGLRenderingContext-drawingBufferWidth|drawingBufferWidth}
+ */
+ drawingBufferWidth: {
+ get: function() {
+ return this._gl.drawingBufferWidth;
+ }
+ },
+ /**
+ * Gets an object representing the currently bound framebuffer. While this instance is not an actual
+ * {@link Framebuffer}, it is used to represent the default framebuffer in calls to
+ * {@link Texture.fromFramebuffer}.
+ * @memberof Context.prototype
+ * @type {object}
+ */
+ defaultFramebuffer: {
+ get: function() {
+ return defaultFramebufferMarker;
+ }
+ }
+});
+function applyRenderState(e, t, n, i) {
+ const r = e._currentRenderState, o = e._currentPassState;
+ e._currentRenderState = t, e._currentPassState = n, RenderState.partialApply(
+ e._gl,
+ r,
+ t,
+ o,
+ n,
+ i
+ );
+}
+let scratchBackBufferArray;
+typeof WebGLRenderingContext < "u" && (scratchBackBufferArray = [WebGLConstants$1.BACK]);
+function bindFramebuffer(e, t) {
+ if (t !== e._currentFramebuffer) {
+ e._currentFramebuffer = t;
+ let n = scratchBackBufferArray;
+ if (defined(t))
+ t._bind(), n = t._getActiveColorAttachments();
+ else {
+ const i = e._gl;
+ i.bindFramebuffer(i.FRAMEBUFFER, null);
+ }
+ e.drawBuffers && e.glDrawBuffers(n);
+ }
+}
+const defaultClearCommand = new ClearCommand();
+Context.prototype.clear = function(e, t) {
+ e = defaultValue(e, defaultClearCommand), t = defaultValue(t, this._defaultPassState);
+ const n = this._gl;
+ let i = 0;
+ const r = e.color, o = e.depth, s = e.stencil;
+ defined(r) && (Color.equals(this._clearColor, r) || (Color.clone(r, this._clearColor), n.clearColor(r.red, r.green, r.blue, r.alpha)), i |= n.COLOR_BUFFER_BIT), defined(o) && (o !== this._clearDepth && (this._clearDepth = o, n.clearDepth(o)), i |= n.DEPTH_BUFFER_BIT), defined(s) && (s !== this._clearStencil && (this._clearStencil = s, n.clearStencil(s)), i |= n.STENCIL_BUFFER_BIT);
+ const c = defaultValue(e.renderState, this._defaultRenderState);
+ applyRenderState(this, c, t, !0);
+ const l = defaultValue(
+ e.framebuffer,
+ t.framebuffer
+ );
+ bindFramebuffer(this, l), n.clear(i);
+};
+function beginDraw(e, t, n, i, r) {
+ bindFramebuffer(e, t), applyRenderState(e, r, n, !1), i._bind(), e._maxFrameTextureUnitIndex = Math.max(
+ e._maxFrameTextureUnitIndex,
+ i.maximumTextureUnitIndex
+ );
+}
+function continueDraw(e, t, n, i) {
+ const r = t._primitiveType, o = t._vertexArray;
+ let s = t._offset, c = t._count;
+ const l = t.instanceCount;
+ e._us.model = defaultValue(t._modelMatrix, Matrix4.IDENTITY), n._setUniforms(
+ i,
+ e._us,
+ e.validateShaderProgram
+ ), o._bind();
+ const d = o.indexBuffer;
+ defined(d) ? (s = s * d.bytesPerIndex, defined(c) ? c = Math.min(c, d.numberOfIndices) : c = d.numberOfIndices, l === 0 ? e._gl.drawElements(
+ r,
+ c,
+ d.indexDatatype,
+ s
+ ) : e.glDrawElementsInstanced(
+ r,
+ c,
+ d.indexDatatype,
+ s,
+ l
+ )) : (defined(c) ? c = Math.min(c, o.numberOfVertices) : c = o.numberOfVertices, l === 0 ? e._gl.drawArrays(r, s, c) : e.glDrawArraysInstanced(
+ r,
+ s,
+ c,
+ l
+ )), o._unBind();
+}
+Context.prototype.draw = function(e, t, n, i) {
+ t = defaultValue(t, this._defaultPassState);
+ const r = defaultValue(
+ e._framebuffer,
+ t.framebuffer
+ ), o = defaultValue(
+ e._renderState,
+ this._defaultRenderState
+ );
+ n = defaultValue(n, e._shaderProgram), i = defaultValue(i, e._uniformMap), beginDraw(this, r, t, n, o), continueDraw(this, e, n, i);
+};
+Context.prototype.endFrame = function() {
+ const e = this._gl;
+ e.useProgram(null), this._currentFramebuffer = void 0, e.bindFramebuffer(e.FRAMEBUFFER, null);
+ const t = scratchBackBufferArray;
+ this.drawBuffers && this.glDrawBuffers(t);
+ const n = this._maxFrameTextureUnitIndex;
+ this._maxFrameTextureUnitIndex = 0;
+ for (let i = 0; i < n; ++i)
+ e.activeTexture(e.TEXTURE0 + i), e.bindTexture(e.TEXTURE_2D, null), e.bindTexture(e.TEXTURE_CUBE_MAP, null);
+};
+Context.prototype.readPixels = function(e) {
+ const t = this._gl;
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const n = Math.max(defaultValue(e.x, 0), 0), i = Math.max(defaultValue(e.y, 0), 0), r = defaultValue(e.width, t.drawingBufferWidth), o = defaultValue(e.height, t.drawingBufferHeight), s = e.framebuffer;
+ let c = PixelDatatype$1.UNSIGNED_BYTE;
+ defined(s) && s.numberOfColorAttachments > 0 && (c = s.getColorTexture(0).pixelDatatype);
+ const l = PixelFormat$1.createTypedArray(
+ PixelFormat$1.RGBA,
+ c,
+ r,
+ o
+ );
+ return bindFramebuffer(this, s), t.readPixels(
+ n,
+ i,
+ r,
+ o,
+ PixelFormat$1.RGBA,
+ PixelDatatype$1.toWebGLConstant(c, this),
+ l
+ ), l;
+};
+const viewportQuadAttributeLocations = {
+ position: 0,
+ textureCoordinates: 1
+};
+Context.prototype.getViewportQuadVertexArray = function() {
+ let e = this.cache.viewportQuad_vertexArray;
+ if (!defined(e)) {
+ const t = new Geometry({
+ attributes: {
+ position: new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 2,
+ values: [-1, -1, 1, -1, 1, 1, -1, 1]
+ }),
+ textureCoordinates: new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 2,
+ values: [0, 0, 1, 0, 1, 1, 0, 1]
+ })
+ },
+ // Workaround Internet Explorer 11.0.8 lack of TRIANGLE_FAN
+ indices: new Uint16Array([0, 1, 2, 0, 2, 3]),
+ primitiveType: PrimitiveType$1.TRIANGLES
+ });
+ e = VertexArray.fromGeometry({
+ context: this,
+ geometry: t,
+ attributeLocations: viewportQuadAttributeLocations,
+ bufferUsage: BufferUsage$1.STATIC_DRAW,
+ interleave: !0
+ }), this.cache.viewportQuad_vertexArray = e;
+ }
+ return e;
+};
+Context.prototype.createViewportQuadCommand = function(e, t) {
+ return t = defaultValue(t, defaultValue.EMPTY_OBJECT), new DrawCommand({
+ vertexArray: this.getViewportQuadVertexArray(),
+ primitiveType: PrimitiveType$1.TRIANGLES,
+ renderState: t.renderState,
+ shaderProgram: ShaderProgram.fromCache({
+ context: this,
+ vertexShaderSource: ViewportQuadVS,
+ fragmentShaderSource: e,
+ attributeLocations: viewportQuadAttributeLocations
+ }),
+ uniformMap: t.uniformMap,
+ owner: t.owner,
+ framebuffer: t.framebuffer,
+ pass: t.pass
+ });
+};
+Context.prototype.getObjectByPickColor = function(e) {
+ return this._pickObjects[e.toRgba()];
+};
+function PickId(e, t, n) {
+ this._pickObjects = e, this.key = t, this.color = n;
+}
+Object.defineProperties(PickId.prototype, {
+ object: {
+ get: function() {
+ return this._pickObjects[this.key];
+ },
+ set: function(e) {
+ this._pickObjects[this.key] = e;
+ }
+ }
+});
+PickId.prototype.destroy = function() {
+ delete this._pickObjects[this.key];
+};
+Context.prototype.createPickId = function(e) {
+ ++this._nextPickColor[0];
+ const t = this._nextPickColor[0];
+ if (t === 0)
+ throw new RuntimeError("Out of unique Pick IDs.");
+ return this._pickObjects[t] = e, new PickId(this._pickObjects, t, Color.fromRgba(t));
+};
+Context.prototype.isDestroyed = function() {
+ return !1;
+};
+Context.prototype.destroy = function() {
+ const e = this.cache;
+ for (const t in e)
+ if (e.hasOwnProperty(t)) {
+ const n = e[t];
+ defined(n.destroy) && n.destroy();
+ }
+ return this._shaderCache = this._shaderCache.destroy(), this._textureCache = this._textureCache.destroy(), this._defaultTexture = this._defaultTexture && this._defaultTexture.destroy(), this._defaultEmissiveTexture = this._defaultEmissiveTexture && this._defaultEmissiveTexture.destroy(), this._defaultNormalTexture = this._defaultNormalTexture && this._defaultNormalTexture.destroy(), this._defaultCubeMap = this._defaultCubeMap && this._defaultCubeMap.destroy(), destroyObject(this);
+};
+Context._deprecationWarning = deprecationWarning;
+function MultisampleFramebuffer(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.context, n = e.width, i = e.height;
+ this._width = n, this._height = i;
+ const r = e.colorRenderbuffers, o = e.colorTextures;
+ if (defined(r) !== defined(o))
+ throw new DeveloperError(
+ "Both color renderbuffer and texture attachments must be provided."
+ );
+ const s = e.depthStencilRenderbuffer, c = e.depthStencilTexture;
+ if (defined(s) !== defined(c))
+ throw new DeveloperError(
+ "Both depth-stencil renderbuffer and texture attachments must be provided."
+ );
+ this._renderFramebuffer = new Framebuffer({
+ context: t,
+ colorRenderbuffers: r,
+ depthStencilRenderbuffer: s,
+ destroyAttachments: e.destroyAttachments
+ }), this._colorFramebuffer = new Framebuffer({
+ context: t,
+ colorTextures: o,
+ depthStencilTexture: c,
+ destroyAttachments: e.destroyAttachments
+ });
+}
+MultisampleFramebuffer.prototype.getRenderFramebuffer = function() {
+ return this._renderFramebuffer;
+};
+MultisampleFramebuffer.prototype.getColorFramebuffer = function() {
+ return this._colorFramebuffer;
+};
+MultisampleFramebuffer.prototype.blitFramebuffers = function(e, t) {
+ this._renderFramebuffer.bindRead(), this._colorFramebuffer.bindDraw();
+ const n = e._gl;
+ let i = 0;
+ this._colorFramebuffer._colorTextures.length > 0 && (i |= n.COLOR_BUFFER_BIT), defined(this._colorFramebuffer.depthStencilTexture) && (i |= n.DEPTH_BUFFER_BIT | (t ? n.STENCIL_BUFFER_BIT : 0)), n.blitFramebuffer(
+ 0,
+ 0,
+ this._width,
+ this._height,
+ 0,
+ 0,
+ this._width,
+ this._height,
+ i,
+ n.NEAREST
+ ), n.bindFramebuffer(n.READ_FRAMEBUFFER, null), n.bindFramebuffer(n.DRAW_FRAMEBUFFER, null);
+};
+MultisampleFramebuffer.prototype.isDestroyed = function() {
+ return !1;
+};
+MultisampleFramebuffer.prototype.destroy = function() {
+ return this._renderFramebuffer.destroy(), this._colorFramebuffer.destroy(), destroyObject(this);
+};
+const RenderbufferFormat = {
+ RGBA4: WebGLConstants$1.RGBA4,
+ RGBA8: WebGLConstants$1.RGBA8,
+ RGBA16F: WebGLConstants$1.RGBA16F,
+ RGBA32F: WebGLConstants$1.RGBA32F,
+ RGB5_A1: WebGLConstants$1.RGB5_A1,
+ RGB565: WebGLConstants$1.RGB565,
+ DEPTH_COMPONENT16: WebGLConstants$1.DEPTH_COMPONENT16,
+ STENCIL_INDEX8: WebGLConstants$1.STENCIL_INDEX8,
+ DEPTH_STENCIL: WebGLConstants$1.DEPTH_STENCIL,
+ DEPTH24_STENCIL8: WebGLConstants$1.DEPTH24_STENCIL8,
+ validate: function(e) {
+ return e === RenderbufferFormat.RGBA4 || e === RenderbufferFormat.RGBA8 || e === RenderbufferFormat.RGBA16F || e === RenderbufferFormat.RGBA32F || e === RenderbufferFormat.RGB5_A1 || e === RenderbufferFormat.RGB565 || e === RenderbufferFormat.DEPTH_COMPONENT16 || e === RenderbufferFormat.STENCIL_INDEX8 || e === RenderbufferFormat.DEPTH_STENCIL || e === RenderbufferFormat.DEPTH24_STENCIL8;
+ },
+ getColorFormat: function(e) {
+ return e === WebGLConstants$1.FLOAT ? RenderbufferFormat.RGBA32F : e === WebGLConstants$1.HALF_FLOAT_OES ? RenderbufferFormat.RGBA16F : RenderbufferFormat.RGBA8;
+ }
+}, RenderbufferFormat$1 = Object.freeze(RenderbufferFormat);
+function Renderbuffer(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const n = e.context._gl;
+ ContextLimits.maximumRenderbufferSize;
+ const i = defaultValue(e.format, RenderbufferFormat$1.RGBA4), r = defined(e.width) ? e.width : n.drawingBufferWidth, o = defined(e.height) ? e.height : n.drawingBufferHeight, s = defaultValue(e.numSamples, 1);
+ this._gl = n, this._format = i, this._width = r, this._height = o, this._renderbuffer = this._gl.createRenderbuffer(), n.bindRenderbuffer(n.RENDERBUFFER, this._renderbuffer), s > 1 ? n.renderbufferStorageMultisample(
+ n.RENDERBUFFER,
+ s,
+ i,
+ r,
+ o
+ ) : n.renderbufferStorage(n.RENDERBUFFER, i, r, o), n.bindRenderbuffer(n.RENDERBUFFER, null);
+}
+Object.defineProperties(Renderbuffer.prototype, {
+ format: {
+ get: function() {
+ return this._format;
+ }
+ },
+ width: {
+ get: function() {
+ return this._width;
+ }
+ },
+ height: {
+ get: function() {
+ return this._height;
+ }
+ }
+});
+Renderbuffer.prototype._getRenderbuffer = function() {
+ return this._renderbuffer;
+};
+Renderbuffer.prototype.isDestroyed = function() {
+ return !1;
+};
+Renderbuffer.prototype.destroy = function() {
+ return this._gl.deleteRenderbuffer(this._renderbuffer), destroyObject(this);
+};
+function FramebufferManager(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._numSamples = defaultValue(e.numSamples, 1), this._colorAttachmentsLength = defaultValue(
+ e.colorAttachmentsLength,
+ 1
+ ), this._color = defaultValue(e.color, !0), this._depth = defaultValue(e.depth, !1), this._depthStencil = defaultValue(e.depthStencil, !1), this._supportsDepthTexture = defaultValue(
+ e.supportsDepthTexture,
+ !1
+ ), this._createColorAttachments = defaultValue(
+ e.createColorAttachments,
+ !0
+ ), this._createDepthAttachments = defaultValue(
+ e.createDepthAttachments,
+ !0
+ ), this._pixelDatatype = e.pixelDatatype, this._pixelFormat = e.pixelFormat, this._width = void 0, this._height = void 0, this._framebuffer = void 0, this._multisampleFramebuffer = void 0, this._colorTextures = void 0, this._color && (this._colorTextures = new Array(this._colorAttachmentsLength), this._colorRenderbuffers = new Array(this._colorAttachmentsLength)), this._colorRenderbuffer = void 0, this._depthStencilRenderbuffer = void 0, this._depthStencilTexture = void 0, this._depthRenderbuffer = void 0, this._depthTexture = void 0, this._attachmentsDirty = !1;
+}
+Object.defineProperties(FramebufferManager.prototype, {
+ framebuffer: {
+ get: function() {
+ return this._numSamples > 1 ? this._multisampleFramebuffer.getRenderFramebuffer() : this._framebuffer;
+ }
+ },
+ numSamples: {
+ get: function() {
+ return this._numSamples;
+ }
+ },
+ status: {
+ get: function() {
+ return this.framebuffer.status;
+ }
+ }
+});
+FramebufferManager.prototype.isDirty = function(e, t, n, i, r) {
+ n = defaultValue(n, 1);
+ const o = this._width !== e || this._height !== t, s = this._numSamples !== n, c = defined(i) && this._pixelDatatype !== i || defined(r) && this._pixelFormat !== r, l = defined(n === 1 ? this._framebuffer : this._multisampleFramebuffer);
+ return this._attachmentsDirty || o || s || c || !l || this._color && !defined(this._colorTextures[0]);
+};
+FramebufferManager.prototype.update = function(e, t, n, i, r, o) {
+ if (i = e.msaa ? defaultValue(i, 1) : 1, r = defaultValue(
+ r,
+ this._color ? defaultValue(this._pixelDatatype, PixelDatatype$1.UNSIGNED_BYTE) : void 0
+ ), o = defaultValue(
+ o,
+ this._color ? defaultValue(this._pixelFormat, PixelFormat$1.RGBA) : void 0
+ ), this.isDirty(t, n, i, r, o)) {
+ if (this.destroy(), this._width = t, this._height = n, this._numSamples = i, this._pixelDatatype = r, this._pixelFormat = o, this._attachmentsDirty = !1, this._color && this._createColorAttachments) {
+ for (let s = 0; s < this._colorAttachmentsLength; ++s)
+ if (this._colorTextures[s] = new Texture({
+ context: e,
+ width: t,
+ height: n,
+ pixelFormat: o,
+ pixelDatatype: r,
+ sampler: Sampler.NEAREST
+ }), this._numSamples > 1) {
+ const c = RenderbufferFormat$1.getColorFormat(r);
+ this._colorRenderbuffers[s] = new Renderbuffer({
+ context: e,
+ width: t,
+ height: n,
+ format: c,
+ numSamples: this._numSamples
+ });
+ }
+ }
+ this._depthStencil && this._createDepthAttachments && (this._supportsDepthTexture && e.depthTexture ? (this._depthStencilTexture = new Texture({
+ context: e,
+ width: t,
+ height: n,
+ pixelFormat: PixelFormat$1.DEPTH_STENCIL,
+ pixelDatatype: PixelDatatype$1.UNSIGNED_INT_24_8,
+ sampler: Sampler.NEAREST
+ }), this._numSamples > 1 && (this._depthStencilRenderbuffer = new Renderbuffer({
+ context: e,
+ width: t,
+ height: n,
+ format: RenderbufferFormat$1.DEPTH24_STENCIL8,
+ numSamples: this._numSamples
+ }))) : this._depthStencilRenderbuffer = new Renderbuffer({
+ context: e,
+ width: t,
+ height: n,
+ format: RenderbufferFormat$1.DEPTH_STENCIL
+ })), this._depth && this._createDepthAttachments && (this._supportsDepthTexture && e.depthTexture ? this._depthTexture = new Texture({
+ context: e,
+ width: t,
+ height: n,
+ pixelFormat: PixelFormat$1.DEPTH_COMPONENT,
+ pixelDatatype: PixelDatatype$1.UNSIGNED_INT,
+ sampler: Sampler.NEAREST
+ }) : this._depthRenderbuffer = new Renderbuffer({
+ context: e,
+ width: t,
+ height: n,
+ format: RenderbufferFormat$1.DEPTH_COMPONENT16
+ })), this._numSamples > 1 ? this._multisampleFramebuffer = new MultisampleFramebuffer({
+ context: e,
+ width: this._width,
+ height: this._height,
+ colorTextures: this._colorTextures,
+ colorRenderbuffers: this._colorRenderbuffers,
+ depthStencilTexture: this._depthStencilTexture,
+ depthStencilRenderbuffer: this._depthStencilRenderbuffer,
+ destroyAttachments: !1
+ }) : this._framebuffer = new Framebuffer({
+ context: e,
+ colorTextures: this._colorTextures,
+ depthTexture: this._depthTexture,
+ depthRenderbuffer: this._depthRenderbuffer,
+ depthStencilTexture: this._depthStencilTexture,
+ depthStencilRenderbuffer: this._depthStencilRenderbuffer,
+ destroyAttachments: !1
+ });
+ }
+};
+FramebufferManager.prototype.getColorTexture = function(e) {
+ return e = defaultValue(e, 0), this._colorTextures[e];
+};
+FramebufferManager.prototype.setColorTexture = function(e, t) {
+ t = defaultValue(t, 0), this._attachmentsDirty = e !== this._colorTextures[t], this._colorTextures[t] = e;
+};
+FramebufferManager.prototype.getColorRenderbuffer = function(e) {
+ return e = defaultValue(e, 0), this._colorRenderbuffers[e];
+};
+FramebufferManager.prototype.setColorRenderbuffer = function(e, t) {
+ t = defaultValue(t, 0), this._attachmentsDirty = e !== this._colorRenderbuffers[t], this._colorRenderbuffers[t] = e;
+};
+FramebufferManager.prototype.getDepthRenderbuffer = function() {
+ return this._depthRenderbuffer;
+};
+FramebufferManager.prototype.setDepthRenderbuffer = function(e) {
+ this._attachmentsDirty = e !== this._depthRenderbuffer, this._depthRenderbuffer = e;
+};
+FramebufferManager.prototype.getDepthTexture = function() {
+ return this._depthTexture;
+};
+FramebufferManager.prototype.setDepthTexture = function(e) {
+ this._attachmentsDirty = e !== this._depthTexture, this._depthTexture = e;
+};
+FramebufferManager.prototype.getDepthStencilRenderbuffer = function() {
+ return this._depthStencilRenderbuffer;
+};
+FramebufferManager.prototype.setDepthStencilRenderbuffer = function(e) {
+ this._attachmentsDirty = e !== this._depthStencilRenderbuffer, this._depthStencilRenderbuffer = e;
+};
+FramebufferManager.prototype.getDepthStencilTexture = function() {
+ return this._depthStencilTexture;
+};
+FramebufferManager.prototype.setDepthStencilTexture = function(e) {
+ this._attachmentsDirty = e !== this._depthStencilTexture, this._depthStencilTexture = e;
+};
+FramebufferManager.prototype.prepareTextures = function(e, t) {
+ this._numSamples > 1 && this._multisampleFramebuffer.blitFramebuffers(e, t);
+};
+FramebufferManager.prototype.clear = function(e, t, n) {
+ const i = t.framebuffer;
+ t.framebuffer = this.framebuffer, t.execute(e, n), t.framebuffer = i;
+};
+FramebufferManager.prototype.destroyFramebuffer = function() {
+ this._framebuffer = this._framebuffer && this._framebuffer.destroy(), this._multisampleFramebuffer = this._multisampleFramebuffer && this._multisampleFramebuffer.destroy();
+};
+FramebufferManager.prototype.destroy = function() {
+ if (this._color) {
+ let e;
+ const t = this._colorTextures.length;
+ for (e = 0; e < t; ++e) {
+ const n = this._colorTextures[e];
+ this._createColorAttachments && defined(n) && !n.isDestroyed() && (this._colorTextures[e].destroy(), this._colorTextures[e] = void 0), defined(n) && n.isDestroyed() && (this._colorTextures[e] = void 0);
+ const i = this._colorRenderbuffers[e];
+ this._createColorAttachments && defined(i) && !i.isDestroyed() && (this._colorRenderbuffers[e].destroy(), this._colorRenderbuffers[e] = void 0), defined(i) && i.isDestroyed() && (this._colorRenderbuffers[e] = void 0);
+ }
+ }
+ this._depthStencil && (this._createDepthAttachments && (this._depthStencilTexture = this._depthStencilTexture && this._depthStencilTexture.destroy(), this._depthStencilRenderbuffer = this._depthStencilRenderbuffer && this._depthStencilRenderbuffer.destroy()), defined(this._depthStencilTexture) && this._depthStencilTexture.isDestroyed() && (this._depthStencilTexture = void 0), defined(this._depthStencilRenderbuffer) && this._depthStencilRenderbuffer.isDestroyed() && (this._depthStencilRenderbuffer = void 0)), this._depth && (this._createDepthAttachments && (this._depthTexture = this._depthTexture && this._depthTexture.destroy(), this._depthRenderbuffer = this._depthRenderbuffer && this._depthRenderbuffer.destroy()), defined(this._depthTexture) && this._depthTexture.isDestroyed() && (this._depthTexture = void 0), defined(this._depthRenderbuffer) && this._depthRenderbuffer.isDestroyed() && (this._depthRenderbuffer = void 0)), this.destroyFramebuffer();
+};
+const ShaderDestination = {
+ VERTEX: 0,
+ FRAGMENT: 1,
+ BOTH: 2
+};
+ShaderDestination.includesVertexShader = function(e) {
+ return e === ShaderDestination.VERTEX || e === ShaderDestination.BOTH;
+};
+ShaderDestination.includesFragmentShader = function(e) {
+ return e === ShaderDestination.FRAGMENT || e === ShaderDestination.BOTH;
+};
+const ShaderDestination$1 = Object.freeze(ShaderDestination);
+function ShaderStruct(e) {
+ this.name = e, this.fields = [];
+}
+ShaderStruct.prototype.addField = function(e, t) {
+ const n = ` ${e} ${t};`;
+ this.fields.push(n);
+};
+ShaderStruct.prototype.generateGlslLines = function() {
+ let e = this.fields;
+ return e.length === 0 && (e = [" float _empty;"]), [].concat(`struct ${this.name}`, "{", e, "};");
+};
+function ShaderFunction(e) {
+ this.signature = e, this.body = [];
+}
+ShaderFunction.prototype.addLines = function(e) {
+ const t = this.body;
+ if (Array.isArray(e)) {
+ const n = e.length;
+ for (let i = 0; i < n; i++)
+ t.push(` ${e[i]}`);
+ } else
+ t.push(` ${e}`);
+};
+ShaderFunction.prototype.generateGlslLines = function() {
+ return [].concat(this.signature, "{", this.body, "}");
+};
+function ShaderBuilder() {
+ this._positionAttributeLine = void 0, this._nextAttributeLocation = 1, this._attributeLocations = {}, this._attributeLines = [], this._structs = {}, this._functions = {}, this._vertexShaderParts = {
+ defineLines: [],
+ uniformLines: [],
+ shaderLines: [],
+ varyingLines: [],
+ // identifiers of structs/functions to include, listed in insertion order
+ structIds: [],
+ functionIds: []
+ }, this._fragmentShaderParts = {
+ defineLines: [],
+ uniformLines: [],
+ shaderLines: [],
+ varyingLines: [],
+ // identifiers of structs/functions to include, listed in insertion order
+ structIds: [],
+ functionIds: []
+ };
+}
+Object.defineProperties(ShaderBuilder.prototype, {
+ /**
+ * Get a dictionary of attribute names to the integer location in
+ * the vertex shader.
+ *
+ * @memberof ShaderBuilder.prototype
+ * @type {Objecttrue.
+ * @memberof ConstantProperty.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ */
+ isConstant: {
+ value: !0
+ },
+ /**
+ * Gets the event that is raised whenever the definition of this property changes.
+ * The definition is changed whenever setValue is called with data different
+ * than the current value.
+ * @memberof ConstantProperty.prototype
+ *
+ * @type {Event}
+ * @readonly
+ */
+ definitionChanged: {
+ get: function() {
+ return this._definitionChanged;
+ }
+ }
+});
+ConstantProperty.prototype.getValue = function(e, t) {
+ return this._hasClone ? this._value.clone(t) : this._value;
+};
+ConstantProperty.prototype.setValue = function(e) {
+ const t = this._value;
+ if (t !== e) {
+ const n = defined(e), i = n && typeof e.clone == "function", r = n && typeof e.equals == "function";
+ (!r || !e.equals(t)) && (this._hasClone = i, this._hasEquals = r, this._value = i ? e.clone(this._value) : e, this._definitionChanged.raiseEvent(this));
+ }
+};
+ConstantProperty.prototype.equals = function(e) {
+ return this === e || //
+ e instanceof ConstantProperty && //
+ (!this._hasEquals && this._value === e._value || //
+ this._hasEquals && this._value.equals(e._value));
+};
+ConstantProperty.prototype.valueOf = function() {
+ return this._value;
+};
+ConstantProperty.prototype.toString = function() {
+ return String(this._value);
+};
+function createProperty(e, t, n, i, r) {
+ return {
+ configurable: i,
+ get: function() {
+ return this[t];
+ },
+ set: function(o) {
+ const s = this[t], c = this[n];
+ defined(c) && (c(), this[n] = void 0), o !== void 0 && (!defined(o) || !defined(o.getValue)) && defined(r) && (o = r(o)), s !== o && (this[t] = o, this._definitionChanged.raiseEvent(this, e, o, s)), defined(o) && defined(o.definitionChanged) && (this[n] = o.definitionChanged.addEventListener(
+ function() {
+ this._definitionChanged.raiseEvent(this, e, o, o);
+ },
+ this
+ ));
+ }
+ };
+}
+function createConstantProperty$1(e) {
+ return new ConstantProperty(e);
+}
+function createPropertyDescriptor(e, t, n) {
+ return createProperty(
+ e,
+ `_${e.toString()}`,
+ `_${e.toString()}Subscription`,
+ defaultValue(t, !1),
+ defaultValue(n, createConstantProperty$1)
+ );
+}
+function BillboardGraphics(e) {
+ this._definitionChanged = new Event(), this._show = void 0, this._showSubscription = void 0, this._image = void 0, this._imageSubscription = void 0, this._scale = void 0, this._scaleSubscription = void 0, this._pixelOffset = void 0, this._pixelOffsetSubscription = void 0, this._eyeOffset = void 0, this._eyeOffsetSubscription = void 0, this._horizontalOrigin = void 0, this._horizontalOriginSubscription = void 0, this._verticalOrigin = void 0, this._verticalOriginSubscription = void 0, this._heightReference = void 0, this._heightReferenceSubscription = void 0, this._color = void 0, this._colorSubscription = void 0, this._rotation = void 0, this._rotationSubscription = void 0, this._alignedAxis = void 0, this._alignedAxisSubscription = void 0, this._sizeInMeters = void 0, this._sizeInMetersSubscription = void 0, this._width = void 0, this._widthSubscription = void 0, this._height = void 0, this._heightSubscription = void 0, this._scaleByDistance = void 0, this._scaleByDistanceSubscription = void 0, this._translucencyByDistance = void 0, this._translucencyByDistanceSubscription = void 0, this._pixelOffsetScaleByDistance = void 0, this._pixelOffsetScaleByDistanceSubscription = void 0, this._imageSubRegion = void 0, this._imageSubRegionSubscription = void 0, this._distanceDisplayCondition = void 0, this._distanceDisplayConditionSubscription = void 0, this._disableDepthTestDistance = void 0, this._disableDepthTestDistanceSubscription = void 0, this._splitDirection = void 0, this._splitDirectionSubscription = void 0, this.merge(defaultValue(e, defaultValue.EMPTY_OBJECT));
+}
+Object.defineProperties(BillboardGraphics.prototype, {
+ /**
+ * Gets the event that is raised whenever a property or sub-property is changed or modified.
+ * @memberof BillboardGraphics.prototype
+ *
+ * @type {Event}
+ * @readonly
+ */
+ definitionChanged: {
+ get: function() {
+ return this._definitionChanged;
+ }
+ },
+ /**
+ * Gets or sets the boolean Property specifying the visibility of the billboard.
+ * @memberof BillboardGraphics.prototype
+ * @type {Property|undefined}
+ * @default true
+ */
+ show: createPropertyDescriptor("show"),
+ /**
+ * Gets or sets the Property specifying the Image, URI, or Canvas to use for the billboard.
+ * @memberof BillboardGraphics.prototype
+ * @type {Property|undefined}
+ */
+ image: createPropertyDescriptor("image"),
+ /**
+ * Gets or sets the numeric Property specifying the uniform scale to apply to the image.
+ * A scale greater than 1.0 enlarges the billboard while a scale less than 1.0 shrinks it.
+ * 
+ * From left to right in the above image, the scales are 0.5, 1.0, and 2.0.
+ *
x increases from left to right, and y increases from top to bottom.
+ * + *
default |
+ * b.pixeloffset = new Cartesian2(50, 25); |
+ *
x points towards the viewer's
+ * right, y points up, and z points into the screen.
+ * + * An eye offset is commonly used to arrange multiple billboards or objects at the same position, e.g., to + * arrange a billboard above its corresponding 3D model. + *
+ * Below, the billboard is positioned at the center of the Earth but an eye offset makes it always + * appear on top of the Earth regardless of the viewer's or Earth's orientation. + *+ *
![]() |
+ * ![]() |
+ *
b.eyeOffset = new Cartesian3(0.0, 8000000.0, 0.0);
+ * image.
+ * This has two common use cases. First, the same white texture may be used by many different billboards,
+ * each with a different color, to create colored billboards. Second, the color's alpha component can be
+ * used to make the billboard translucent as shown below. An alpha of 0.0 makes the billboard
+ * transparent, and 1.0 makes the billboard opaque.
+ * + *
default![]() |
+ * alpha : 0.5![]() |
+ *
alignedAxis.
+ * @memberof BillboardGraphics.prototype
+ * @type {Property|undefined}
+ * @default 0
+ */
+ rotation: createPropertyDescriptor("rotation"),
+ /**
+ * Gets or sets the {@link Cartesian3} Property specifying the unit vector axis of rotation
+ * in the fixed frame. When set to Cartesian3.ZERO the rotation is from the top of the screen.
+ * @memberof BillboardGraphics.prototype
+ * @type {Property|undefined}
+ * @default Cartesian3.ZERO
+ */
+ alignedAxis: createPropertyDescriptor("alignedAxis"),
+ /**
+ * Gets or sets the boolean Property specifying if this billboard's size will be measured in meters.
+ * @memberof BillboardGraphics.prototype
+ * @type {Property|undefined}
+ * @default false
+ */
+ sizeInMeters: createPropertyDescriptor("sizeInMeters"),
+ /**
+ * Gets or sets the numeric Property specifying the width of the billboard in pixels.
+ * When undefined, the native width is used.
+ * @memberof BillboardGraphics.prototype
+ * @type {Property|undefined}
+ */
+ width: createPropertyDescriptor("width"),
+ /**
+ * Gets or sets the numeric Property specifying the height of the billboard in pixels.
+ * When undefined, the native height is used.
+ * @memberof BillboardGraphics.prototype
+ * @type {Property|undefined}
+ */
+ height: createPropertyDescriptor("height"),
+ /**
+ * Gets or sets {@link NearFarScalar} Property specifying the scale of the billboard based on the distance from the camera.
+ * A billboard's scale will interpolate between the {@link NearFarScalar#nearValue} and
+ * {@link NearFarScalar#farValue} while the camera distance falls within the lower and upper bounds
+ * of the specified {@link NearFarScalar#near} and {@link NearFarScalar#far}.
+ * Outside of these ranges the billboard's scale remains clamped to the nearest bound.
+ * @memberof BillboardGraphics.prototype
+ * @type {Property|undefined}
+ */
+ scaleByDistance: createPropertyDescriptor("scaleByDistance"),
+ /**
+ * Gets or sets {@link NearFarScalar} Property specifying the translucency of the billboard based on the distance from the camera.
+ * A billboard's translucency will interpolate between the {@link NearFarScalar#nearValue} and
+ * {@link NearFarScalar#farValue} while the camera distance falls within the lower and upper bounds
+ * of the specified {@link NearFarScalar#near} and {@link NearFarScalar#far}.
+ * Outside of these ranges the billboard's translucency remains clamped to the nearest bound.
+ * @memberof BillboardGraphics.prototype
+ * @type {Property|undefined}
+ */
+ translucencyByDistance: createPropertyDescriptor("translucencyByDistance"),
+ /**
+ * Gets or sets {@link NearFarScalar} Property specifying the pixel offset of the billboard based on the distance from the camera.
+ * A billboard's pixel offset will interpolate between the {@link NearFarScalar#nearValue} and
+ * {@link NearFarScalar#farValue} while the camera distance falls within the lower and upper bounds
+ * of the specified {@link NearFarScalar#near} and {@link NearFarScalar#far}.
+ * Outside of these ranges the billboard's pixel offset remains clamped to the nearest bound.
+ * @memberof BillboardGraphics.prototype
+ * @type {Property|undefined}
+ */
+ pixelOffsetScaleByDistance: createPropertyDescriptor(
+ "pixelOffsetScaleByDistance"
+ ),
+ /**
+ * Gets or sets the Property specifying a {@link BoundingRectangle} that defines a
+ * sub-region of the image to use for the billboard, rather than the entire image,
+ * measured in pixels from the bottom-left.
+ * @memberof BillboardGraphics.prototype
+ * @type {Property|undefined}
+ */
+ imageSubRegion: createPropertyDescriptor("imageSubRegion"),
+ /**
+ * Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this billboard will be displayed.
+ * @memberof BillboardGraphics.prototype
+ * @type {Property|undefined}
+ */
+ distanceDisplayCondition: createPropertyDescriptor(
+ "distanceDisplayCondition"
+ ),
+ /**
+ * Gets or sets the distance from the camera at which to disable the depth test to, for example, prevent clipping against terrain.
+ * When set to zero, the depth test is always applied. When set to Number.POSITIVE_INFINITY, the depth test is never applied.
+ * @memberof BillboardGraphics.prototype
+ * @type {Property|undefined}
+ */
+ disableDepthTestDistance: createPropertyDescriptor(
+ "disableDepthTestDistance"
+ ),
+ /**
+ * Gets or sets the Property specifying the {@link SplitDirection} of this billboard.
+ * @memberof BillboardGraphics.prototype
+ * @type {Property|undefined}
+ * @default SplitDirection.NONE
+ */
+ splitDirection: createPropertyDescriptor("splitDirection")
+});
+BillboardGraphics.prototype.clone = function(e) {
+ return defined(e) ? (e.show = this._show, e.image = this._image, e.scale = this._scale, e.pixelOffset = this._pixelOffset, e.eyeOffset = this._eyeOffset, e.horizontalOrigin = this._horizontalOrigin, e.verticalOrigin = this._verticalOrigin, e.heightReference = this._heightReference, e.color = this._color, e.rotation = this._rotation, e.alignedAxis = this._alignedAxis, e.sizeInMeters = this._sizeInMeters, e.width = this._width, e.height = this._height, e.scaleByDistance = this._scaleByDistance, e.translucencyByDistance = this._translucencyByDistance, e.pixelOffsetScaleByDistance = this._pixelOffsetScaleByDistance, e.imageSubRegion = this._imageSubRegion, e.distanceDisplayCondition = this._distanceDisplayCondition, e.disableDepthTestDistance = this._disableDepthTestDistance, e.splitDirection = this._splitDirection, e) : new BillboardGraphics(this);
+};
+BillboardGraphics.prototype.merge = function(e) {
+ this.show = defaultValue(this._show, e.show), this.image = defaultValue(this._image, e.image), this.scale = defaultValue(this._scale, e.scale), this.pixelOffset = defaultValue(this._pixelOffset, e.pixelOffset), this.eyeOffset = defaultValue(this._eyeOffset, e.eyeOffset), this.horizontalOrigin = defaultValue(
+ this._horizontalOrigin,
+ e.horizontalOrigin
+ ), this.verticalOrigin = defaultValue(
+ this._verticalOrigin,
+ e.verticalOrigin
+ ), this.heightReference = defaultValue(
+ this._heightReference,
+ e.heightReference
+ ), this.color = defaultValue(this._color, e.color), this.rotation = defaultValue(this._rotation, e.rotation), this.alignedAxis = defaultValue(this._alignedAxis, e.alignedAxis), this.sizeInMeters = defaultValue(this._sizeInMeters, e.sizeInMeters), this.width = defaultValue(this._width, e.width), this.height = defaultValue(this._height, e.height), this.scaleByDistance = defaultValue(
+ this._scaleByDistance,
+ e.scaleByDistance
+ ), this.translucencyByDistance = defaultValue(
+ this._translucencyByDistance,
+ e.translucencyByDistance
+ ), this.pixelOffsetScaleByDistance = defaultValue(
+ this._pixelOffsetScaleByDistance,
+ e.pixelOffsetScaleByDistance
+ ), this.imageSubRegion = defaultValue(
+ this._imageSubRegion,
+ e.imageSubRegion
+ ), this.distanceDisplayCondition = defaultValue(
+ this._distanceDisplayCondition,
+ e.distanceDisplayCondition
+ ), this.disableDepthTestDistance = defaultValue(
+ this._disableDepthTestDistance,
+ e.disableDepthTestDistance
+ ), this.splitDirection = defaultValue(
+ this.splitDirection,
+ e.splitDirection
+ );
+};
+function AssociativeArray() {
+ this._array = [], this._hash = {};
+}
+Object.defineProperties(AssociativeArray.prototype, {
+ /**
+ * Gets the number of items in the collection.
+ * @memberof AssociativeArray.prototype
+ *
+ * @type {number}
+ */
+ length: {
+ get: function() {
+ return this._array.length;
+ }
+ },
+ /**
+ * Gets an unordered array of all values in the collection.
+ * This is a live array that will automatically reflect the values in the collection,
+ * it should not be modified directly.
+ * @memberof AssociativeArray.prototype
+ *
+ * @type {Array}
+ */
+ values: {
+ get: function() {
+ return this._array;
+ }
+ }
+});
+AssociativeArray.prototype.contains = function(e) {
+ return defined(this._hash[e]);
+};
+AssociativeArray.prototype.set = function(e, t) {
+ const n = this._hash[e];
+ t !== n && (this.remove(e), this._hash[e] = t, this._array.push(t));
+};
+AssociativeArray.prototype.get = function(e) {
+ return this._hash[e];
+};
+AssociativeArray.prototype.remove = function(e) {
+ const t = this._hash[e], n = defined(t);
+ if (n) {
+ const i = this._array;
+ i.splice(i.indexOf(t), 1), delete this._hash[e];
+ }
+ return n;
+};
+AssociativeArray.prototype.removeAll = function() {
+ const e = this._array;
+ e.length > 0 && (this._hash = {}, e.length = 0);
+};
+function DistanceDisplayCondition(e, t) {
+ e = defaultValue(e, 0), this._near = e, t = defaultValue(t, Number.MAX_VALUE), this._far = t;
+}
+Object.defineProperties(DistanceDisplayCondition.prototype, {
+ /**
+ * The smallest distance in the interval where the object is visible.
+ * @memberof DistanceDisplayCondition.prototype
+ * @type {number}
+ * @default 0.0
+ */
+ near: {
+ get: function() {
+ return this._near;
+ },
+ set: function(e) {
+ this._near = e;
+ }
+ },
+ /**
+ * The largest distance in the interval where the object is visible.
+ * @memberof DistanceDisplayCondition.prototype
+ * @type {number}
+ * @default Number.MAX_VALUE
+ */
+ far: {
+ get: function() {
+ return this._far;
+ },
+ set: function(e) {
+ this._far = e;
+ }
+ }
+});
+DistanceDisplayCondition.packedLength = 2;
+DistanceDisplayCondition.pack = function(e, t, n) {
+ return n = defaultValue(n, 0), t[n++] = e.near, t[n] = e.far, t;
+};
+DistanceDisplayCondition.unpack = function(e, t, n) {
+ return t = defaultValue(t, 0), defined(n) || (n = new DistanceDisplayCondition()), n.near = e[t++], n.far = e[t], n;
+};
+DistanceDisplayCondition.equals = function(e, t) {
+ return e === t || defined(e) && defined(t) && e.near === t.near && e.far === t.far;
+};
+DistanceDisplayCondition.clone = function(e, t) {
+ if (defined(e))
+ return defined(t) || (t = new DistanceDisplayCondition()), t.near = e.near, t.far = e.far, t;
+};
+DistanceDisplayCondition.prototype.clone = function(e) {
+ return DistanceDisplayCondition.clone(this, e);
+};
+DistanceDisplayCondition.prototype.equals = function(e) {
+ return DistanceDisplayCondition.equals(this, e);
+};
+function NearFarScalar(e, t, n, i) {
+ this.near = defaultValue(e, 0), this.nearValue = defaultValue(t, 0), this.far = defaultValue(n, 1), this.farValue = defaultValue(i, 0);
+}
+NearFarScalar.clone = function(e, t) {
+ if (defined(e))
+ return defined(t) ? (t.near = e.near, t.nearValue = e.nearValue, t.far = e.far, t.farValue = e.farValue, t) : new NearFarScalar(
+ e.near,
+ e.nearValue,
+ e.far,
+ e.farValue
+ );
+};
+NearFarScalar.packedLength = 4;
+NearFarScalar.pack = function(e, t, n) {
+ return n = defaultValue(n, 0), t[n++] = e.near, t[n++] = e.nearValue, t[n++] = e.far, t[n] = e.farValue, t;
+};
+NearFarScalar.unpack = function(e, t, n) {
+ return t = defaultValue(t, 0), defined(n) || (n = new NearFarScalar()), n.near = e[t++], n.nearValue = e[t++], n.far = e[t++], n.farValue = e[t], n;
+};
+NearFarScalar.equals = function(e, t) {
+ return e === t || defined(e) && defined(t) && e.near === t.near && e.nearValue === t.nearValue && e.far === t.far && e.farValue === t.farValue;
+};
+NearFarScalar.prototype.clone = function(e) {
+ return NearFarScalar.clone(this, e);
+};
+NearFarScalar.prototype.equals = function(e) {
+ return NearFarScalar.equals(this, e);
+};
+const HeightReference = {
+ /**
+ * The position is absolute.
+ * @type {number}
+ * @constant
+ */
+ NONE: 0,
+ /**
+ * The position is clamped to the terrain and 3D Tiles.
+ * @type {number}
+ * @constant
+ */
+ CLAMP_TO_GROUND: 1,
+ /**
+ * The position height is the height above the terrain and 3D Tiles.
+ * @type {number}
+ * @constant
+ */
+ RELATIVE_TO_GROUND: 2,
+ /**
+ * The position is clamped to terain.
+ * @type {number}
+ * @constant
+ */
+ CLAMP_TO_TERRAIN: 3,
+ /**
+ * The position height is the height above terrain.
+ * @type {number}
+ * @constant
+ */
+ RELATIVE_TO_TERRAIN: 4,
+ /**
+ * The position is clamped to 3D Tiles.
+ * @type {number}
+ * @constant
+ */
+ CLAMP_TO_3D_TILE: 5,
+ /**
+ * The position height is the height above 3D Tiles.
+ * @type {number}
+ * @constant
+ */
+ RELATIVE_TO_3D_TILE: 6
+}, HeightReference$1 = Object.freeze(HeightReference);
+function isHeightReferenceClamp(e) {
+ return e === HeightReference.CLAMP_TO_GROUND || e === HeightReference.CLAMP_TO_3D_TILE || e === HeightReference.CLAMP_TO_TERRAIN;
+}
+function isHeightReferenceRelative(e) {
+ return e === HeightReference.RELATIVE_TO_GROUND || e === HeightReference.RELATIVE_TO_3D_TILE || e === HeightReference.RELATIVE_TO_TERRAIN;
+}
+const HorizontalOrigin = {
+ /**
+ * The origin is at the horizontal center of the object.
+ *
+ * @type {number}
+ * @constant
+ */
+ CENTER: 0,
+ /**
+ * The origin is on the left side of the object.
+ *
+ * @type {number}
+ * @constant
+ */
+ LEFT: 1,
+ /**
+ * The origin is on the right side of the object.
+ *
+ * @type {number}
+ * @constant
+ */
+ RIGHT: -1
+}, HorizontalOrigin$1 = Object.freeze(HorizontalOrigin), VerticalOrigin = {
+ /**
+ * The origin is at the vertical center between BASELINE and TOP.
+ *
+ * @type {number}
+ * @constant
+ */
+ CENTER: 0,
+ /**
+ * The origin is at the bottom of the object.
+ *
+ * @type {number}
+ * @constant
+ */
+ BOTTOM: 1,
+ /**
+ * If the object contains text, the origin is at the baseline of the text, else the origin is at the bottom of the object.
+ *
+ * @type {number}
+ * @constant
+ */
+ BASELINE: 2,
+ /**
+ * The origin is at the top of the object.
+ *
+ * @type {number}
+ * @constant
+ */
+ TOP: -1
+}, VerticalOrigin$1 = Object.freeze(VerticalOrigin), BoundingSphereState = {
+ /**
+ * The BoundingSphere has been computed.
+ * @type BoundingSphereState
+ * @constant
+ */
+ DONE: 0,
+ /**
+ * The BoundingSphere is still being computed.
+ * @type BoundingSphereState
+ * @constant
+ */
+ PENDING: 1,
+ /**
+ * The BoundingSphere does not exist.
+ * @type BoundingSphereState
+ * @constant
+ */
+ FAILED: 2
+}, BoundingSphereState$1 = Object.freeze(BoundingSphereState);
+function Property() {
+ DeveloperError.throwInstantiationError();
+}
+Object.defineProperties(Property.prototype, {
+ /**
+ * Gets a value indicating if this property is constant. A property is considered
+ * constant if getValue always returns the same result for the current definition.
+ * @memberof Property.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ */
+ isConstant: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * Gets the event that is raised whenever the definition of this property changes.
+ * The definition is considered to have changed if a call to getValue would return
+ * a different result for the same time.
+ * @memberof Property.prototype
+ *
+ * @type {Event}
+ * @readonly
+ */
+ definitionChanged: {
+ get: DeveloperError.throwInstantiationError
+ }
+});
+Property.prototype.getValue = DeveloperError.throwInstantiationError;
+Property.prototype.equals = DeveloperError.throwInstantiationError;
+Property.equals = function(e, t) {
+ return e === t || defined(e) && e.equals(t);
+};
+Property.arrayEquals = function(e, t) {
+ if (e === t)
+ return !0;
+ if (!defined(e) || !defined(t) || e.length !== t.length)
+ return !1;
+ const n = e.length;
+ for (let i = 0; i < n; i++)
+ if (!Property.equals(e[i], t[i]))
+ return !1;
+ return !0;
+};
+Property.isConstant = function(e) {
+ return !defined(e) || e.isConstant;
+};
+Property.getValueOrUndefined = function(e, t, n) {
+ return defined(e) ? e.getValue(t, n) : void 0;
+};
+Property.getValueOrDefault = function(e, t, n, i) {
+ return defined(e) ? defaultValue(e.getValue(t, i), n) : n;
+};
+Property.getValueOrClonedDefault = function(e, t, n, i) {
+ let r;
+ return defined(e) && (r = e.getValue(t, i)), defined(r) || (r = n.clone(r)), r;
+};
+const SplitDirection = {
+ /**
+ * Display the primitive or ImageryLayer to the left of the {@link Scene#splitPosition}.
+ *
+ * @type {number}
+ * @constant
+ */
+ LEFT: -1,
+ /**
+ * Always display the primitive or ImageryLayer.
+ *
+ * @type {number}
+ * @constant
+ */
+ NONE: 0,
+ /**
+ * Display the primitive or ImageryLayer to the right of the {@link Scene#splitPosition}.
+ *
+ * @type {number}
+ * @constant
+ */
+ RIGHT: 1
+}, SplitDirection$1 = Object.freeze(SplitDirection), defaultColor$8 = Color.WHITE, defaultEyeOffset$1 = Cartesian3.ZERO, defaultHeightReference$2 = HeightReference$1.NONE, defaultPixelOffset$1 = Cartesian2.ZERO, defaultScale$4 = 1, defaultRotation$1 = 0, defaultAlignedAxis = Cartesian3.ZERO, defaultHorizontalOrigin$1 = HorizontalOrigin$1.CENTER, defaultVerticalOrigin$1 = VerticalOrigin$1.CENTER, defaultSizeInMeters = !1, defaultSplitDirection$1 = SplitDirection$1.NONE, positionScratch$d = new Cartesian3(), colorScratch$7 = new Color(), eyeOffsetScratch$1 = new Cartesian3(), pixelOffsetScratch$1 = new Cartesian2(), scaleByDistanceScratch$2 = new NearFarScalar(), translucencyByDistanceScratch$2 = new NearFarScalar(), pixelOffsetScaleByDistanceScratch$1 = new NearFarScalar(), boundingRectangleScratch = new BoundingRectangle(), distanceDisplayConditionScratch$8 = new DistanceDisplayCondition();
+function EntityData$3(e) {
+ this.entity = e, this.billboard = void 0, this.textureValue = void 0;
+}
+function BillboardVisualizer(e, t) {
+ t.collectionChanged.addEventListener(
+ BillboardVisualizer.prototype._onCollectionChanged,
+ this
+ ), this._cluster = e, this._entityCollection = t, this._items = new AssociativeArray(), this._onCollectionChanged(t, t.values, [], []);
+}
+BillboardVisualizer.prototype.update = function(e) {
+ const t = this._items.values, n = this._cluster;
+ for (let i = 0, r = t.length; i < r; i++) {
+ const o = t[i], s = o.entity, c = s._billboard;
+ let l, d = o.billboard, f = s.isShowing && s.isAvailable(e) && Property.getValueOrDefault(c._show, e, !0), h;
+ if (f && (h = Property.getValueOrUndefined(
+ s._position,
+ e,
+ positionScratch$d
+ ), l = Property.getValueOrUndefined(
+ c._image,
+ e
+ ), f = defined(h) && defined(l)), !f) {
+ returnPrimitive$2(o, s, n);
+ continue;
+ }
+ Property.isConstant(s._position) || (n._clusterDirty = !0), defined(d) || (d = n.getBillboard(s), d.id = s, d.image = void 0, o.billboard = d), d.show = f, (!defined(d.image) || o.textureValue !== l) && (d.image = l, o.textureValue = l), d.position = h, d.color = Property.getValueOrDefault(
+ c._color,
+ e,
+ defaultColor$8,
+ colorScratch$7
+ ), d.eyeOffset = Property.getValueOrDefault(
+ c._eyeOffset,
+ e,
+ defaultEyeOffset$1,
+ eyeOffsetScratch$1
+ ), d.heightReference = Property.getValueOrDefault(
+ c._heightReference,
+ e,
+ defaultHeightReference$2
+ ), d.pixelOffset = Property.getValueOrDefault(
+ c._pixelOffset,
+ e,
+ defaultPixelOffset$1,
+ pixelOffsetScratch$1
+ ), d.scale = Property.getValueOrDefault(
+ c._scale,
+ e,
+ defaultScale$4
+ ), d.rotation = Property.getValueOrDefault(
+ c._rotation,
+ e,
+ defaultRotation$1
+ ), d.alignedAxis = Property.getValueOrDefault(
+ c._alignedAxis,
+ e,
+ defaultAlignedAxis
+ ), d.horizontalOrigin = Property.getValueOrDefault(
+ c._horizontalOrigin,
+ e,
+ defaultHorizontalOrigin$1
+ ), d.verticalOrigin = Property.getValueOrDefault(
+ c._verticalOrigin,
+ e,
+ defaultVerticalOrigin$1
+ ), d.width = Property.getValueOrUndefined(
+ c._width,
+ e
+ ), d.height = Property.getValueOrUndefined(
+ c._height,
+ e
+ ), d.scaleByDistance = Property.getValueOrUndefined(
+ c._scaleByDistance,
+ e,
+ scaleByDistanceScratch$2
+ ), d.translucencyByDistance = Property.getValueOrUndefined(
+ c._translucencyByDistance,
+ e,
+ translucencyByDistanceScratch$2
+ ), d.pixelOffsetScaleByDistance = Property.getValueOrUndefined(
+ c._pixelOffsetScaleByDistance,
+ e,
+ pixelOffsetScaleByDistanceScratch$1
+ ), d.sizeInMeters = Property.getValueOrDefault(
+ c._sizeInMeters,
+ e,
+ defaultSizeInMeters
+ ), d.distanceDisplayCondition = Property.getValueOrUndefined(
+ c._distanceDisplayCondition,
+ e,
+ distanceDisplayConditionScratch$8
+ ), d.disableDepthTestDistance = Property.getValueOrUndefined(
+ c._disableDepthTestDistance,
+ e
+ ), d.splitDirection = Property.getValueOrDefault(
+ c._splitDirection,
+ e,
+ defaultSplitDirection$1
+ );
+ const p = Property.getValueOrUndefined(
+ c._imageSubRegion,
+ e,
+ boundingRectangleScratch
+ );
+ defined(p) && d.setImageSubRegion(d._imageId, p);
+ }
+ return !0;
+};
+BillboardVisualizer.prototype.getBoundingSphere = function(e, t) {
+ const n = this._items.get(e.id);
+ if (!defined(n) || !defined(n.billboard))
+ return BoundingSphereState$1.FAILED;
+ const i = n.billboard;
+ if (i.heightReference === HeightReference$1.NONE)
+ t.center = Cartesian3.clone(i.position, t.center);
+ else {
+ if (!defined(i._clampedPosition))
+ return BoundingSphereState$1.PENDING;
+ t.center = Cartesian3.clone(i._clampedPosition, t.center);
+ }
+ return t.radius = 0, BoundingSphereState$1.DONE;
+};
+BillboardVisualizer.prototype.isDestroyed = function() {
+ return !1;
+};
+BillboardVisualizer.prototype.destroy = function() {
+ this._entityCollection.collectionChanged.removeEventListener(
+ BillboardVisualizer.prototype._onCollectionChanged,
+ this
+ );
+ const e = this._entityCollection.values;
+ for (let t = 0; t < e.length; t++)
+ this._cluster.removeBillboard(e[t]);
+ return destroyObject(this);
+};
+BillboardVisualizer.prototype._onCollectionChanged = function(e, t, n, i) {
+ let r, o;
+ const s = this._items, c = this._cluster;
+ for (r = t.length - 1; r > -1; r--)
+ o = t[r], defined(o._billboard) && defined(o._position) && s.set(o.id, new EntityData$3(o));
+ for (r = i.length - 1; r > -1; r--)
+ o = i[r], defined(o._billboard) && defined(o._position) ? s.contains(o.id) || s.set(o.id, new EntityData$3(o)) : (returnPrimitive$2(s.get(o.id), o, c), s.remove(o.id));
+ for (r = n.length - 1; r > -1; r--)
+ o = n[r], returnPrimitive$2(s.get(o.id), o, c), s.remove(o.id);
+};
+function returnPrimitive$2(e, t, n) {
+ defined(e) && (e.billboard = void 0, n.removeBillboard(t));
+}
+function Interval(e, t) {
+ this.start = defaultValue(e, 0), this.stop = defaultValue(t, 0);
+}
+function BoundingSphere(e, t) {
+ this.center = Cartesian3.clone(defaultValue(e, Cartesian3.ZERO)), this.radius = defaultValue(t, 0);
+}
+const fromPointsXMin = new Cartesian3(), fromPointsYMin = new Cartesian3(), fromPointsZMin = new Cartesian3(), fromPointsXMax = new Cartesian3(), fromPointsYMax = new Cartesian3(), fromPointsZMax = new Cartesian3(), fromPointsCurrentPos = new Cartesian3(), fromPointsScratch = new Cartesian3(), fromPointsRitterCenter = new Cartesian3(), fromPointsMinBoxPt = new Cartesian3(), fromPointsMaxBoxPt = new Cartesian3(), fromPointsNaiveCenterScratch = new Cartesian3(), volumeConstant = 4 / 3 * CesiumMath.PI;
+BoundingSphere.fromPoints = function(e, t) {
+ if (defined(t) || (t = new BoundingSphere()), !defined(e) || e.length === 0)
+ return t.center = Cartesian3.clone(Cartesian3.ZERO, t.center), t.radius = 0, t;
+ const n = Cartesian3.clone(e[0], fromPointsCurrentPos), i = Cartesian3.clone(n, fromPointsXMin), r = Cartesian3.clone(n, fromPointsYMin), o = Cartesian3.clone(n, fromPointsZMin), s = Cartesian3.clone(n, fromPointsXMax), c = Cartesian3.clone(n, fromPointsYMax), l = Cartesian3.clone(n, fromPointsZMax), d = e.length;
+ let f;
+ for (f = 1; f < d; f++) {
+ Cartesian3.clone(e[f], n);
+ const P = n.x, I = n.y, M = n.z;
+ P < i.x && Cartesian3.clone(n, i), P > s.x && Cartesian3.clone(n, s), I < r.y && Cartesian3.clone(n, r), I > c.y && Cartesian3.clone(n, c), M < o.z && Cartesian3.clone(n, o), M > l.z && Cartesian3.clone(n, l);
+ }
+ const h = Cartesian3.magnitudeSquared(
+ Cartesian3.subtract(s, i, fromPointsScratch)
+ ), p = Cartesian3.magnitudeSquared(
+ Cartesian3.subtract(c, r, fromPointsScratch)
+ ), m = Cartesian3.magnitudeSquared(
+ Cartesian3.subtract(l, o, fromPointsScratch)
+ );
+ let _ = i, y = s, C = h;
+ p > C && (C = p, _ = r, y = c), m > C && (C = m, _ = o, y = l);
+ const T = fromPointsRitterCenter;
+ T.x = (_.x + y.x) * 0.5, T.y = (_.y + y.y) * 0.5, T.z = (_.z + y.z) * 0.5;
+ let x = Cartesian3.magnitudeSquared(
+ Cartesian3.subtract(y, T, fromPointsScratch)
+ ), b = Math.sqrt(x);
+ const S = fromPointsMinBoxPt;
+ S.x = i.x, S.y = r.y, S.z = o.z;
+ const E = fromPointsMaxBoxPt;
+ E.x = s.x, E.y = c.y, E.z = l.z;
+ const A = Cartesian3.midpoint(
+ S,
+ E,
+ fromPointsNaiveCenterScratch
+ );
+ let D = 0;
+ for (f = 0; f < d; f++) {
+ Cartesian3.clone(e[f], n);
+ const P = Cartesian3.magnitude(
+ Cartesian3.subtract(n, A, fromPointsScratch)
+ );
+ P > D && (D = P);
+ const I = Cartesian3.magnitudeSquared(
+ Cartesian3.subtract(n, T, fromPointsScratch)
+ );
+ if (I > x) {
+ const M = Math.sqrt(I);
+ b = (b + M) * 0.5, x = b * b;
+ const R = M - b;
+ T.x = (b * T.x + R * n.x) / M, T.y = (b * T.y + R * n.y) / M, T.z = (b * T.z + R * n.z) / M;
+ }
+ }
+ return b < D ? (Cartesian3.clone(T, t.center), t.radius = b) : (Cartesian3.clone(A, t.center), t.radius = D), t;
+};
+const defaultProjection = new GeographicProjection(), fromRectangle2DLowerLeft = new Cartesian3(), fromRectangle2DUpperRight = new Cartesian3(), fromRectangle2DSouthwest = new Cartographic(), fromRectangle2DNortheast = new Cartographic();
+BoundingSphere.fromRectangle2D = function(e, t, n) {
+ return BoundingSphere.fromRectangleWithHeights2D(
+ e,
+ t,
+ 0,
+ 0,
+ n
+ );
+};
+BoundingSphere.fromRectangleWithHeights2D = function(e, t, n, i, r) {
+ if (defined(r) || (r = new BoundingSphere()), !defined(e))
+ return r.center = Cartesian3.clone(Cartesian3.ZERO, r.center), r.radius = 0, r;
+ defaultProjection._ellipsoid = Ellipsoid.default, t = defaultValue(t, defaultProjection), Rectangle.southwest(e, fromRectangle2DSouthwest), fromRectangle2DSouthwest.height = n, Rectangle.northeast(e, fromRectangle2DNortheast), fromRectangle2DNortheast.height = i;
+ const o = t.project(
+ fromRectangle2DSouthwest,
+ fromRectangle2DLowerLeft
+ ), s = t.project(
+ fromRectangle2DNortheast,
+ fromRectangle2DUpperRight
+ ), c = s.x - o.x, l = s.y - o.y, d = s.z - o.z;
+ r.radius = Math.sqrt(c * c + l * l + d * d) * 0.5;
+ const f = r.center;
+ return f.x = o.x + c * 0.5, f.y = o.y + l * 0.5, f.z = o.z + d * 0.5, r;
+};
+const fromRectangle3DScratch = [];
+BoundingSphere.fromRectangle3D = function(e, t, n, i) {
+ if (t = defaultValue(t, Ellipsoid.default), n = defaultValue(n, 0), defined(i) || (i = new BoundingSphere()), !defined(e))
+ return i.center = Cartesian3.clone(Cartesian3.ZERO, i.center), i.radius = 0, i;
+ const r = Rectangle.subsample(
+ e,
+ t,
+ n,
+ fromRectangle3DScratch
+ );
+ return BoundingSphere.fromPoints(r, i);
+};
+BoundingSphere.fromVertices = function(e, t, n, i) {
+ if (defined(i) || (i = new BoundingSphere()), !defined(e) || e.length === 0)
+ return i.center = Cartesian3.clone(Cartesian3.ZERO, i.center), i.radius = 0, i;
+ t = defaultValue(t, Cartesian3.ZERO), n = defaultValue(n, 3);
+ const r = fromPointsCurrentPos;
+ r.x = e[0] + t.x, r.y = e[1] + t.y, r.z = e[2] + t.z;
+ const o = Cartesian3.clone(r, fromPointsXMin), s = Cartesian3.clone(r, fromPointsYMin), c = Cartesian3.clone(r, fromPointsZMin), l = Cartesian3.clone(r, fromPointsXMax), d = Cartesian3.clone(r, fromPointsYMax), f = Cartesian3.clone(r, fromPointsZMax), h = e.length;
+ let p;
+ for (p = 0; p < h; p += n) {
+ const M = e[p] + t.x, R = e[p + 1] + t.y, L = e[p + 2] + t.z;
+ r.x = M, r.y = R, r.z = L, M < o.x && Cartesian3.clone(r, o), M > l.x && Cartesian3.clone(r, l), R < s.y && Cartesian3.clone(r, s), R > d.y && Cartesian3.clone(r, d), L < c.z && Cartesian3.clone(r, c), L > f.z && Cartesian3.clone(r, f);
+ }
+ const m = Cartesian3.magnitudeSquared(
+ Cartesian3.subtract(l, o, fromPointsScratch)
+ ), _ = Cartesian3.magnitudeSquared(
+ Cartesian3.subtract(d, s, fromPointsScratch)
+ ), y = Cartesian3.magnitudeSquared(
+ Cartesian3.subtract(f, c, fromPointsScratch)
+ );
+ let C = o, T = l, x = m;
+ _ > x && (x = _, C = s, T = d), y > x && (x = y, C = c, T = f);
+ const b = fromPointsRitterCenter;
+ b.x = (C.x + T.x) * 0.5, b.y = (C.y + T.y) * 0.5, b.z = (C.z + T.z) * 0.5;
+ let S = Cartesian3.magnitudeSquared(
+ Cartesian3.subtract(T, b, fromPointsScratch)
+ ), E = Math.sqrt(S);
+ const A = fromPointsMinBoxPt;
+ A.x = o.x, A.y = s.y, A.z = c.z;
+ const D = fromPointsMaxBoxPt;
+ D.x = l.x, D.y = d.y, D.z = f.z;
+ const P = Cartesian3.midpoint(
+ A,
+ D,
+ fromPointsNaiveCenterScratch
+ );
+ let I = 0;
+ for (p = 0; p < h; p += n) {
+ r.x = e[p] + t.x, r.y = e[p + 1] + t.y, r.z = e[p + 2] + t.z;
+ const M = Cartesian3.magnitude(
+ Cartesian3.subtract(r, P, fromPointsScratch)
+ );
+ M > I && (I = M);
+ const R = Cartesian3.magnitudeSquared(
+ Cartesian3.subtract(r, b, fromPointsScratch)
+ );
+ if (R > S) {
+ const L = Math.sqrt(R);
+ E = (E + L) * 0.5, S = E * E;
+ const g = L - E;
+ b.x = (E * b.x + g * r.x) / L, b.y = (E * b.y + g * r.y) / L, b.z = (E * b.z + g * r.z) / L;
+ }
+ }
+ return E < I ? (Cartesian3.clone(b, i.center), i.radius = E) : (Cartesian3.clone(P, i.center), i.radius = I), i;
+};
+BoundingSphere.fromEncodedCartesianVertices = function(e, t, n) {
+ if (defined(n) || (n = new BoundingSphere()), !defined(e) || !defined(t) || e.length !== t.length || e.length === 0)
+ return n.center = Cartesian3.clone(Cartesian3.ZERO, n.center), n.radius = 0, n;
+ const i = fromPointsCurrentPos;
+ i.x = e[0] + t[0], i.y = e[1] + t[1], i.z = e[2] + t[2];
+ const r = Cartesian3.clone(i, fromPointsXMin), o = Cartesian3.clone(i, fromPointsYMin), s = Cartesian3.clone(i, fromPointsZMin), c = Cartesian3.clone(i, fromPointsXMax), l = Cartesian3.clone(i, fromPointsYMax), d = Cartesian3.clone(i, fromPointsZMax), f = e.length;
+ let h;
+ for (h = 0; h < f; h += 3) {
+ const I = e[h] + t[h], M = e[h + 1] + t[h + 1], R = e[h + 2] + t[h + 2];
+ i.x = I, i.y = M, i.z = R, I < r.x && Cartesian3.clone(i, r), I > c.x && Cartesian3.clone(i, c), M < o.y && Cartesian3.clone(i, o), M > l.y && Cartesian3.clone(i, l), R < s.z && Cartesian3.clone(i, s), R > d.z && Cartesian3.clone(i, d);
+ }
+ const p = Cartesian3.magnitudeSquared(
+ Cartesian3.subtract(c, r, fromPointsScratch)
+ ), m = Cartesian3.magnitudeSquared(
+ Cartesian3.subtract(l, o, fromPointsScratch)
+ ), _ = Cartesian3.magnitudeSquared(
+ Cartesian3.subtract(d, s, fromPointsScratch)
+ );
+ let y = r, C = c, T = p;
+ m > T && (T = m, y = o, C = l), _ > T && (T = _, y = s, C = d);
+ const x = fromPointsRitterCenter;
+ x.x = (y.x + C.x) * 0.5, x.y = (y.y + C.y) * 0.5, x.z = (y.z + C.z) * 0.5;
+ let b = Cartesian3.magnitudeSquared(
+ Cartesian3.subtract(C, x, fromPointsScratch)
+ ), S = Math.sqrt(b);
+ const E = fromPointsMinBoxPt;
+ E.x = r.x, E.y = o.y, E.z = s.z;
+ const A = fromPointsMaxBoxPt;
+ A.x = c.x, A.y = l.y, A.z = d.z;
+ const D = Cartesian3.midpoint(
+ E,
+ A,
+ fromPointsNaiveCenterScratch
+ );
+ let P = 0;
+ for (h = 0; h < f; h += 3) {
+ i.x = e[h] + t[h], i.y = e[h + 1] + t[h + 1], i.z = e[h + 2] + t[h + 2];
+ const I = Cartesian3.magnitude(
+ Cartesian3.subtract(i, D, fromPointsScratch)
+ );
+ I > P && (P = I);
+ const M = Cartesian3.magnitudeSquared(
+ Cartesian3.subtract(i, x, fromPointsScratch)
+ );
+ if (M > b) {
+ const R = Math.sqrt(M);
+ S = (S + R) * 0.5, b = S * S;
+ const L = R - S;
+ x.x = (S * x.x + L * i.x) / R, x.y = (S * x.y + L * i.y) / R, x.z = (S * x.z + L * i.z) / R;
+ }
+ }
+ return S < P ? (Cartesian3.clone(x, n.center), n.radius = S) : (Cartesian3.clone(D, n.center), n.radius = P), n;
+};
+BoundingSphere.fromCornerPoints = function(e, t, n) {
+ defined(n) || (n = new BoundingSphere());
+ const i = Cartesian3.midpoint(e, t, n.center);
+ return n.radius = Cartesian3.distance(i, t), n;
+};
+BoundingSphere.fromEllipsoid = function(e, t) {
+ return defined(t) || (t = new BoundingSphere()), Cartesian3.clone(Cartesian3.ZERO, t.center), t.radius = e.maximumRadius, t;
+};
+const fromBoundingSpheresScratch = new Cartesian3();
+BoundingSphere.fromBoundingSpheres = function(e, t) {
+ if (defined(t) || (t = new BoundingSphere()), !defined(e) || e.length === 0)
+ return t.center = Cartesian3.clone(Cartesian3.ZERO, t.center), t.radius = 0, t;
+ const n = e.length;
+ if (n === 1)
+ return BoundingSphere.clone(e[0], t);
+ if (n === 2)
+ return BoundingSphere.union(e[0], e[1], t);
+ const i = [];
+ let r;
+ for (r = 0; r < n; r++)
+ i.push(e[r].center);
+ t = BoundingSphere.fromPoints(i, t);
+ const o = t.center;
+ let s = t.radius;
+ for (r = 0; r < n; r++) {
+ const c = e[r];
+ s = Math.max(
+ s,
+ Cartesian3.distance(o, c.center, fromBoundingSpheresScratch) + c.radius
+ );
+ }
+ return t.radius = s, t;
+};
+const fromOrientedBoundingBoxScratchU = new Cartesian3(), fromOrientedBoundingBoxScratchV = new Cartesian3(), fromOrientedBoundingBoxScratchW = new Cartesian3();
+BoundingSphere.fromOrientedBoundingBox = function(e, t) {
+ defined(t) || (t = new BoundingSphere());
+ const n = e.halfAxes, i = Matrix3.getColumn(n, 0, fromOrientedBoundingBoxScratchU), r = Matrix3.getColumn(n, 1, fromOrientedBoundingBoxScratchV), o = Matrix3.getColumn(n, 2, fromOrientedBoundingBoxScratchW);
+ return Cartesian3.add(i, r, i), Cartesian3.add(i, o, i), t.center = Cartesian3.clone(e.center, t.center), t.radius = Cartesian3.magnitude(i), t;
+};
+const scratchFromTransformationCenter = new Cartesian3(), scratchFromTransformationScale = new Cartesian3();
+BoundingSphere.fromTransformation = function(e, t) {
+ defined(t) || (t = new BoundingSphere());
+ const n = Matrix4.getTranslation(
+ e,
+ scratchFromTransformationCenter
+ ), i = Matrix4.getScale(
+ e,
+ scratchFromTransformationScale
+ ), r = 0.5 * Cartesian3.magnitude(i);
+ return t.center = Cartesian3.clone(n, t.center), t.radius = r, t;
+};
+BoundingSphere.clone = function(e, t) {
+ if (defined(e))
+ return defined(t) ? (t.center = Cartesian3.clone(e.center, t.center), t.radius = e.radius, t) : new BoundingSphere(e.center, e.radius);
+};
+BoundingSphere.packedLength = 4;
+BoundingSphere.pack = function(e, t, n) {
+ n = defaultValue(n, 0);
+ const i = e.center;
+ return t[n++] = i.x, t[n++] = i.y, t[n++] = i.z, t[n] = e.radius, t;
+};
+BoundingSphere.unpack = function(e, t, n) {
+ t = defaultValue(t, 0), defined(n) || (n = new BoundingSphere());
+ const i = n.center;
+ return i.x = e[t++], i.y = e[t++], i.z = e[t++], n.radius = e[t], n;
+};
+const unionScratch = new Cartesian3(), unionScratchCenter = new Cartesian3();
+BoundingSphere.union = function(e, t, n) {
+ defined(n) || (n = new BoundingSphere());
+ const i = e.center, r = e.radius, o = t.center, s = t.radius, c = Cartesian3.subtract(
+ o,
+ i,
+ unionScratch
+ ), l = Cartesian3.magnitude(c);
+ if (r >= l + s)
+ return e.clone(n), n;
+ if (s >= l + r)
+ return t.clone(n), n;
+ const d = (r + l + s) * 0.5, f = Cartesian3.multiplyByScalar(
+ c,
+ (-r + d) / l,
+ unionScratchCenter
+ );
+ return Cartesian3.add(f, i, f), Cartesian3.clone(f, n.center), n.radius = d, n;
+};
+const expandScratch = new Cartesian3();
+BoundingSphere.expand = function(e, t, n) {
+ n = BoundingSphere.clone(e, n);
+ const i = Cartesian3.magnitude(
+ Cartesian3.subtract(t, n.center, expandScratch)
+ );
+ return i > n.radius && (n.radius = i), n;
+};
+BoundingSphere.intersectPlane = function(e, t) {
+ const n = e.center, i = e.radius, r = t.normal, o = Cartesian3.dot(r, n) + t.distance;
+ return o < -i ? Intersect$1.OUTSIDE : o < i ? Intersect$1.INTERSECTING : Intersect$1.INSIDE;
+};
+BoundingSphere.transform = function(e, t, n) {
+ return defined(n) || (n = new BoundingSphere()), n.center = Matrix4.multiplyByPoint(
+ t,
+ e.center,
+ n.center
+ ), n.radius = Matrix4.getMaximumScale(t) * e.radius, n;
+};
+const distanceSquaredToScratch = new Cartesian3();
+BoundingSphere.distanceSquaredTo = function(e, t) {
+ const n = Cartesian3.subtract(
+ e.center,
+ t,
+ distanceSquaredToScratch
+ ), i = Cartesian3.magnitude(n) - e.radius;
+ return i <= 0 ? 0 : i * i;
+};
+BoundingSphere.transformWithoutScale = function(e, t, n) {
+ return defined(n) || (n = new BoundingSphere()), n.center = Matrix4.multiplyByPoint(
+ t,
+ e.center,
+ n.center
+ ), n.radius = e.radius, n;
+};
+const scratchCartesian3$e = new Cartesian3();
+BoundingSphere.computePlaneDistances = function(e, t, n, i) {
+ defined(i) || (i = new Interval());
+ const r = Cartesian3.subtract(
+ e.center,
+ t,
+ scratchCartesian3$e
+ ), o = Cartesian3.dot(n, r);
+ return i.start = o - e.radius, i.stop = o + e.radius, i;
+};
+const projectTo2DNormalScratch = new Cartesian3(), projectTo2DEastScratch = new Cartesian3(), projectTo2DNorthScratch = new Cartesian3(), projectTo2DWestScratch = new Cartesian3(), projectTo2DSouthScratch = new Cartesian3(), projectTo2DCartographicScratch = new Cartographic(), projectTo2DPositionsScratch = new Array(8);
+for (let e = 0; e < 8; ++e)
+ projectTo2DPositionsScratch[e] = new Cartesian3();
+const projectTo2DProjection = new GeographicProjection();
+BoundingSphere.projectTo2D = function(e, t, n) {
+ projectTo2DProjection._ellipsoid = Ellipsoid.default, t = defaultValue(t, projectTo2DProjection);
+ const i = t.ellipsoid;
+ let r = e.center;
+ const o = e.radius;
+ let s;
+ Cartesian3.equals(r, Cartesian3.ZERO) ? s = Cartesian3.clone(Cartesian3.UNIT_X, projectTo2DNormalScratch) : s = i.geodeticSurfaceNormal(r, projectTo2DNormalScratch);
+ const c = Cartesian3.cross(
+ Cartesian3.UNIT_Z,
+ s,
+ projectTo2DEastScratch
+ );
+ Cartesian3.normalize(c, c);
+ const l = Cartesian3.cross(s, c, projectTo2DNorthScratch);
+ Cartesian3.normalize(l, l), Cartesian3.multiplyByScalar(s, o, s), Cartesian3.multiplyByScalar(l, o, l), Cartesian3.multiplyByScalar(c, o, c);
+ const d = Cartesian3.negate(l, projectTo2DSouthScratch), f = Cartesian3.negate(c, projectTo2DWestScratch), h = projectTo2DPositionsScratch;
+ let p = h[0];
+ Cartesian3.add(s, l, p), Cartesian3.add(p, c, p), p = h[1], Cartesian3.add(s, l, p), Cartesian3.add(p, f, p), p = h[2], Cartesian3.add(s, d, p), Cartesian3.add(p, f, p), p = h[3], Cartesian3.add(s, d, p), Cartesian3.add(p, c, p), Cartesian3.negate(s, s), p = h[4], Cartesian3.add(s, l, p), Cartesian3.add(p, c, p), p = h[5], Cartesian3.add(s, l, p), Cartesian3.add(p, f, p), p = h[6], Cartesian3.add(s, d, p), Cartesian3.add(p, f, p), p = h[7], Cartesian3.add(s, d, p), Cartesian3.add(p, c, p);
+ const m = h.length;
+ for (let T = 0; T < m; ++T) {
+ const x = h[T];
+ Cartesian3.add(r, x, x);
+ const b = i.cartesianToCartographic(
+ x,
+ projectTo2DCartographicScratch
+ );
+ t.project(b, x);
+ }
+ n = BoundingSphere.fromPoints(h, n), r = n.center;
+ const _ = r.x, y = r.y, C = r.z;
+ return r.x = C, r.y = _, r.z = y, n;
+};
+BoundingSphere.isOccluded = function(e, t) {
+ return !t.isBoundingSphereVisible(e);
+};
+BoundingSphere.equals = function(e, t) {
+ return e === t || defined(e) && defined(t) && Cartesian3.equals(e.center, t.center) && e.radius === t.radius;
+};
+BoundingSphere.prototype.intersectPlane = function(e) {
+ return BoundingSphere.intersectPlane(this, e);
+};
+BoundingSphere.prototype.distanceSquaredTo = function(e) {
+ return BoundingSphere.distanceSquaredTo(this, e);
+};
+BoundingSphere.prototype.computePlaneDistances = function(e, t, n) {
+ return BoundingSphere.computePlaneDistances(
+ this,
+ e,
+ t,
+ n
+ );
+};
+BoundingSphere.prototype.isOccluded = function(e) {
+ return BoundingSphere.isOccluded(this, e);
+};
+BoundingSphere.prototype.equals = function(e) {
+ return BoundingSphere.equals(this, e);
+};
+BoundingSphere.prototype.clone = function(e) {
+ return BoundingSphere.clone(this, e);
+};
+BoundingSphere.prototype.volume = function() {
+ const e = this.radius;
+ return volumeConstant * e * e * e;
+};
+function GeometryAttributes(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this.position = e.position, this.normal = e.normal, this.st = e.st, this.bitangent = e.bitangent, this.tangent = e.tangent, this.color = e.color;
+}
+const GeometryOffsetAttribute = {
+ NONE: 0,
+ TOP: 1,
+ ALL: 2
+}, GeometryOffsetAttribute$1 = Object.freeze(GeometryOffsetAttribute);
+function VertexFormat(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this.position = defaultValue(e.position, !1), this.normal = defaultValue(e.normal, !1), this.st = defaultValue(e.st, !1), this.bitangent = defaultValue(e.bitangent, !1), this.tangent = defaultValue(e.tangent, !1), this.color = defaultValue(e.color, !1);
+}
+VertexFormat.POSITION_ONLY = Object.freeze(
+ new VertexFormat({
+ position: !0
+ })
+);
+VertexFormat.POSITION_AND_NORMAL = Object.freeze(
+ new VertexFormat({
+ position: !0,
+ normal: !0
+ })
+);
+VertexFormat.POSITION_NORMAL_AND_ST = Object.freeze(
+ new VertexFormat({
+ position: !0,
+ normal: !0,
+ st: !0
+ })
+);
+VertexFormat.POSITION_AND_ST = Object.freeze(
+ new VertexFormat({
+ position: !0,
+ st: !0
+ })
+);
+VertexFormat.POSITION_AND_COLOR = Object.freeze(
+ new VertexFormat({
+ position: !0,
+ color: !0
+ })
+);
+VertexFormat.ALL = Object.freeze(
+ new VertexFormat({
+ position: !0,
+ normal: !0,
+ st: !0,
+ tangent: !0,
+ bitangent: !0
+ })
+);
+VertexFormat.DEFAULT = VertexFormat.POSITION_NORMAL_AND_ST;
+VertexFormat.packedLength = 6;
+VertexFormat.pack = function(e, t, n) {
+ return n = defaultValue(n, 0), t[n++] = e.position ? 1 : 0, t[n++] = e.normal ? 1 : 0, t[n++] = e.st ? 1 : 0, t[n++] = e.tangent ? 1 : 0, t[n++] = e.bitangent ? 1 : 0, t[n] = e.color ? 1 : 0, t;
+};
+VertexFormat.unpack = function(e, t, n) {
+ return t = defaultValue(t, 0), defined(n) || (n = new VertexFormat()), n.position = e[t++] === 1, n.normal = e[t++] === 1, n.st = e[t++] === 1, n.tangent = e[t++] === 1, n.bitangent = e[t++] === 1, n.color = e[t] === 1, n;
+};
+VertexFormat.clone = function(e, t) {
+ if (defined(e))
+ return defined(t) || (t = new VertexFormat()), t.position = e.position, t.normal = e.normal, t.st = e.st, t.tangent = e.tangent, t.bitangent = e.bitangent, t.color = e.color, t;
+};
+const diffScratch$1 = new Cartesian3();
+function BoxGeometry(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.minimum, n = e.maximum, i = defaultValue(e.vertexFormat, VertexFormat.DEFAULT);
+ this._minimum = Cartesian3.clone(t), this._maximum = Cartesian3.clone(n), this._vertexFormat = i, this._offsetAttribute = e.offsetAttribute, this._workerName = "createBoxGeometry";
+}
+BoxGeometry.fromDimensions = function(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.dimensions, n = Cartesian3.multiplyByScalar(t, 0.5, new Cartesian3());
+ return new BoxGeometry({
+ minimum: Cartesian3.negate(n, new Cartesian3()),
+ maximum: n,
+ vertexFormat: e.vertexFormat,
+ offsetAttribute: e.offsetAttribute
+ });
+};
+BoxGeometry.fromAxisAlignedBoundingBox = function(e) {
+ return new BoxGeometry({
+ minimum: e.minimum,
+ maximum: e.maximum
+ });
+};
+BoxGeometry.packedLength = 2 * Cartesian3.packedLength + VertexFormat.packedLength + 1;
+BoxGeometry.pack = function(e, t, n) {
+ return n = defaultValue(n, 0), Cartesian3.pack(e._minimum, t, n), Cartesian3.pack(
+ e._maximum,
+ t,
+ n + Cartesian3.packedLength
+ ), VertexFormat.pack(
+ e._vertexFormat,
+ t,
+ n + 2 * Cartesian3.packedLength
+ ), t[n + 2 * Cartesian3.packedLength + VertexFormat.packedLength] = defaultValue(e._offsetAttribute, -1), t;
+};
+const scratchMin$4 = new Cartesian3(), scratchMax$4 = new Cartesian3(), scratchVertexFormat$c = new VertexFormat(), scratchOptions$n = {
+ minimum: scratchMin$4,
+ maximum: scratchMax$4,
+ vertexFormat: scratchVertexFormat$c,
+ offsetAttribute: void 0
+};
+BoxGeometry.unpack = function(e, t, n) {
+ t = defaultValue(t, 0);
+ const i = Cartesian3.unpack(e, t, scratchMin$4), r = Cartesian3.unpack(
+ e,
+ t + Cartesian3.packedLength,
+ scratchMax$4
+ ), o = VertexFormat.unpack(
+ e,
+ t + 2 * Cartesian3.packedLength,
+ scratchVertexFormat$c
+ ), s = e[t + 2 * Cartesian3.packedLength + VertexFormat.packedLength];
+ return defined(n) ? (n._minimum = Cartesian3.clone(i, n._minimum), n._maximum = Cartesian3.clone(r, n._maximum), n._vertexFormat = VertexFormat.clone(o, n._vertexFormat), n._offsetAttribute = s === -1 ? void 0 : s, n) : (scratchOptions$n.offsetAttribute = s === -1 ? void 0 : s, new BoxGeometry(scratchOptions$n));
+};
+BoxGeometry.createGeometry = function(e) {
+ const t = e._minimum, n = e._maximum, i = e._vertexFormat;
+ if (Cartesian3.equals(t, n))
+ return;
+ const r = new GeometryAttributes();
+ let o, s;
+ if (i.position && (i.st || i.normal || i.tangent || i.bitangent)) {
+ if (i.position && (s = new Float64Array(6 * 4 * 3), s[0] = t.x, s[1] = t.y, s[2] = n.z, s[3] = n.x, s[4] = t.y, s[5] = n.z, s[6] = n.x, s[7] = n.y, s[8] = n.z, s[9] = t.x, s[10] = n.y, s[11] = n.z, s[12] = t.x, s[13] = t.y, s[14] = t.z, s[15] = n.x, s[16] = t.y, s[17] = t.z, s[18] = n.x, s[19] = n.y, s[20] = t.z, s[21] = t.x, s[22] = n.y, s[23] = t.z, s[24] = n.x, s[25] = t.y, s[26] = t.z, s[27] = n.x, s[28] = n.y, s[29] = t.z, s[30] = n.x, s[31] = n.y, s[32] = n.z, s[33] = n.x, s[34] = t.y, s[35] = n.z, s[36] = t.x, s[37] = t.y, s[38] = t.z, s[39] = t.x, s[40] = n.y, s[41] = t.z, s[42] = t.x, s[43] = n.y, s[44] = n.z, s[45] = t.x, s[46] = t.y, s[47] = n.z, s[48] = t.x, s[49] = n.y, s[50] = t.z, s[51] = n.x, s[52] = n.y, s[53] = t.z, s[54] = n.x, s[55] = n.y, s[56] = n.z, s[57] = t.x, s[58] = n.y, s[59] = n.z, s[60] = t.x, s[61] = t.y, s[62] = t.z, s[63] = n.x, s[64] = t.y, s[65] = t.z, s[66] = n.x, s[67] = t.y, s[68] = n.z, s[69] = t.x, s[70] = t.y, s[71] = n.z, r.position = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.DOUBLE,
+ componentsPerAttribute: 3,
+ values: s
+ })), i.normal) {
+ const d = new Float32Array(72);
+ d[0] = 0, d[1] = 0, d[2] = 1, d[3] = 0, d[4] = 0, d[5] = 1, d[6] = 0, d[7] = 0, d[8] = 1, d[9] = 0, d[10] = 0, d[11] = 1, d[12] = 0, d[13] = 0, d[14] = -1, d[15] = 0, d[16] = 0, d[17] = -1, d[18] = 0, d[19] = 0, d[20] = -1, d[21] = 0, d[22] = 0, d[23] = -1, d[24] = 1, d[25] = 0, d[26] = 0, d[27] = 1, d[28] = 0, d[29] = 0, d[30] = 1, d[31] = 0, d[32] = 0, d[33] = 1, d[34] = 0, d[35] = 0, d[36] = -1, d[37] = 0, d[38] = 0, d[39] = -1, d[40] = 0, d[41] = 0, d[42] = -1, d[43] = 0, d[44] = 0, d[45] = -1, d[46] = 0, d[47] = 0, d[48] = 0, d[49] = 1, d[50] = 0, d[51] = 0, d[52] = 1, d[53] = 0, d[54] = 0, d[55] = 1, d[56] = 0, d[57] = 0, d[58] = 1, d[59] = 0, d[60] = 0, d[61] = -1, d[62] = 0, d[63] = 0, d[64] = -1, d[65] = 0, d[66] = 0, d[67] = -1, d[68] = 0, d[69] = 0, d[70] = -1, d[71] = 0, r.normal = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 3,
+ values: d
+ });
+ }
+ if (i.st) {
+ const d = new Float32Array(48);
+ d[0] = 0, d[1] = 0, d[2] = 1, d[3] = 0, d[4] = 1, d[5] = 1, d[6] = 0, d[7] = 1, d[8] = 1, d[9] = 0, d[10] = 0, d[11] = 0, d[12] = 0, d[13] = 1, d[14] = 1, d[15] = 1, d[16] = 0, d[17] = 0, d[18] = 1, d[19] = 0, d[20] = 1, d[21] = 1, d[22] = 0, d[23] = 1, d[24] = 1, d[25] = 0, d[26] = 0, d[27] = 0, d[28] = 0, d[29] = 1, d[30] = 1, d[31] = 1, d[32] = 1, d[33] = 0, d[34] = 0, d[35] = 0, d[36] = 0, d[37] = 1, d[38] = 1, d[39] = 1, d[40] = 0, d[41] = 0, d[42] = 1, d[43] = 0, d[44] = 1, d[45] = 1, d[46] = 0, d[47] = 1, r.st = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 2,
+ values: d
+ });
+ }
+ if (i.tangent) {
+ const d = new Float32Array(72);
+ d[0] = 1, d[1] = 0, d[2] = 0, d[3] = 1, d[4] = 0, d[5] = 0, d[6] = 1, d[7] = 0, d[8] = 0, d[9] = 1, d[10] = 0, d[11] = 0, d[12] = -1, d[13] = 0, d[14] = 0, d[15] = -1, d[16] = 0, d[17] = 0, d[18] = -1, d[19] = 0, d[20] = 0, d[21] = -1, d[22] = 0, d[23] = 0, d[24] = 0, d[25] = 1, d[26] = 0, d[27] = 0, d[28] = 1, d[29] = 0, d[30] = 0, d[31] = 1, d[32] = 0, d[33] = 0, d[34] = 1, d[35] = 0, d[36] = 0, d[37] = -1, d[38] = 0, d[39] = 0, d[40] = -1, d[41] = 0, d[42] = 0, d[43] = -1, d[44] = 0, d[45] = 0, d[46] = -1, d[47] = 0, d[48] = -1, d[49] = 0, d[50] = 0, d[51] = -1, d[52] = 0, d[53] = 0, d[54] = -1, d[55] = 0, d[56] = 0, d[57] = -1, d[58] = 0, d[59] = 0, d[60] = 1, d[61] = 0, d[62] = 0, d[63] = 1, d[64] = 0, d[65] = 0, d[66] = 1, d[67] = 0, d[68] = 0, d[69] = 1, d[70] = 0, d[71] = 0, r.tangent = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 3,
+ values: d
+ });
+ }
+ if (i.bitangent) {
+ const d = new Float32Array(72);
+ d[0] = 0, d[1] = 1, d[2] = 0, d[3] = 0, d[4] = 1, d[5] = 0, d[6] = 0, d[7] = 1, d[8] = 0, d[9] = 0, d[10] = 1, d[11] = 0, d[12] = 0, d[13] = 1, d[14] = 0, d[15] = 0, d[16] = 1, d[17] = 0, d[18] = 0, d[19] = 1, d[20] = 0, d[21] = 0, d[22] = 1, d[23] = 0, d[24] = 0, d[25] = 0, d[26] = 1, d[27] = 0, d[28] = 0, d[29] = 1, d[30] = 0, d[31] = 0, d[32] = 1, d[33] = 0, d[34] = 0, d[35] = 1, d[36] = 0, d[37] = 0, d[38] = 1, d[39] = 0, d[40] = 0, d[41] = 1, d[42] = 0, d[43] = 0, d[44] = 1, d[45] = 0, d[46] = 0, d[47] = 1, d[48] = 0, d[49] = 0, d[50] = 1, d[51] = 0, d[52] = 0, d[53] = 1, d[54] = 0, d[55] = 0, d[56] = 1, d[57] = 0, d[58] = 0, d[59] = 1, d[60] = 0, d[61] = 0, d[62] = 1, d[63] = 0, d[64] = 0, d[65] = 1, d[66] = 0, d[67] = 0, d[68] = 1, d[69] = 0, d[70] = 0, d[71] = 1, r.bitangent = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 3,
+ values: d
+ });
+ }
+ o = new Uint16Array(6 * 2 * 3), o[0] = 0, o[1] = 1, o[2] = 2, o[3] = 0, o[4] = 2, o[5] = 3, o[6] = 6, o[7] = 5, o[8] = 4, o[9] = 7, o[10] = 6, o[11] = 4, o[12] = 8, o[13] = 9, o[14] = 10, o[15] = 8, o[16] = 10, o[17] = 11, o[18] = 14, o[19] = 13, o[20] = 12, o[21] = 15, o[22] = 14, o[23] = 12, o[24] = 18, o[25] = 17, o[26] = 16, o[27] = 19, o[28] = 18, o[29] = 16, o[30] = 20, o[31] = 21, o[32] = 22, o[33] = 20, o[34] = 22, o[35] = 23;
+ } else
+ s = new Float64Array(8 * 3), s[0] = t.x, s[1] = t.y, s[2] = t.z, s[3] = n.x, s[4] = t.y, s[5] = t.z, s[6] = n.x, s[7] = n.y, s[8] = t.z, s[9] = t.x, s[10] = n.y, s[11] = t.z, s[12] = t.x, s[13] = t.y, s[14] = n.z, s[15] = n.x, s[16] = t.y, s[17] = n.z, s[18] = n.x, s[19] = n.y, s[20] = n.z, s[21] = t.x, s[22] = n.y, s[23] = n.z, r.position = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.DOUBLE,
+ componentsPerAttribute: 3,
+ values: s
+ }), o = new Uint16Array(6 * 2 * 3), o[0] = 4, o[1] = 5, o[2] = 6, o[3] = 4, o[4] = 6, o[5] = 7, o[6] = 1, o[7] = 0, o[8] = 3, o[9] = 1, o[10] = 3, o[11] = 2, o[12] = 1, o[13] = 6, o[14] = 5, o[15] = 1, o[16] = 2, o[17] = 6, o[18] = 2, o[19] = 3, o[20] = 7, o[21] = 2, o[22] = 7, o[23] = 6, o[24] = 3, o[25] = 0, o[26] = 4, o[27] = 3, o[28] = 4, o[29] = 7, o[30] = 0, o[31] = 1, o[32] = 5, o[33] = 0, o[34] = 5, o[35] = 4;
+ const c = Cartesian3.subtract(n, t, diffScratch$1), l = Cartesian3.magnitude(c) * 0.5;
+ if (defined(e._offsetAttribute)) {
+ const d = s.length, f = e._offsetAttribute === GeometryOffsetAttribute$1.NONE ? 0 : 1, h = new Uint8Array(d / 3).fill(f);
+ r.applyOffset = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: h
+ });
+ }
+ return new Geometry({
+ attributes: r,
+ indices: o,
+ primitiveType: PrimitiveType$1.TRIANGLES,
+ boundingSphere: new BoundingSphere(Cartesian3.ZERO, l),
+ offsetAttribute: e._offsetAttribute
+ });
+};
+let unitBoxGeometry;
+BoxGeometry.getUnitBox = function() {
+ return defined(unitBoxGeometry) || (unitBoxGeometry = BoxGeometry.createGeometry(
+ BoxGeometry.fromDimensions({
+ dimensions: new Cartesian3(1, 1, 1),
+ vertexFormat: VertexFormat.POSITION_ONLY
+ })
+ )), unitBoxGeometry;
+};
+const diffScratch = new Cartesian3();
+function BoxOutlineGeometry(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.minimum, n = e.maximum;
+ this._min = Cartesian3.clone(t), this._max = Cartesian3.clone(n), this._offsetAttribute = e.offsetAttribute, this._workerName = "createBoxOutlineGeometry";
+}
+BoxOutlineGeometry.fromDimensions = function(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.dimensions, n = Cartesian3.multiplyByScalar(t, 0.5, new Cartesian3());
+ return new BoxOutlineGeometry({
+ minimum: Cartesian3.negate(n, new Cartesian3()),
+ maximum: n,
+ offsetAttribute: e.offsetAttribute
+ });
+};
+BoxOutlineGeometry.fromAxisAlignedBoundingBox = function(e) {
+ return new BoxOutlineGeometry({
+ minimum: e.minimum,
+ maximum: e.maximum
+ });
+};
+BoxOutlineGeometry.packedLength = 2 * Cartesian3.packedLength + 1;
+BoxOutlineGeometry.pack = function(e, t, n) {
+ return n = defaultValue(n, 0), Cartesian3.pack(e._min, t, n), Cartesian3.pack(e._max, t, n + Cartesian3.packedLength), t[n + Cartesian3.packedLength * 2] = defaultValue(
+ e._offsetAttribute,
+ -1
+ ), t;
+};
+const scratchMin$3 = new Cartesian3(), scratchMax$3 = new Cartesian3(), scratchOptions$m = {
+ minimum: scratchMin$3,
+ maximum: scratchMax$3,
+ offsetAttribute: void 0
+};
+BoxOutlineGeometry.unpack = function(e, t, n) {
+ t = defaultValue(t, 0);
+ const i = Cartesian3.unpack(e, t, scratchMin$3), r = Cartesian3.unpack(
+ e,
+ t + Cartesian3.packedLength,
+ scratchMax$3
+ ), o = e[t + Cartesian3.packedLength * 2];
+ return defined(n) ? (n._min = Cartesian3.clone(i, n._min), n._max = Cartesian3.clone(r, n._max), n._offsetAttribute = o === -1 ? void 0 : o, n) : (scratchOptions$m.offsetAttribute = o === -1 ? void 0 : o, new BoxOutlineGeometry(scratchOptions$m));
+};
+BoxOutlineGeometry.createGeometry = function(e) {
+ const t = e._min, n = e._max;
+ if (Cartesian3.equals(t, n))
+ return;
+ const i = new GeometryAttributes(), r = new Uint16Array(12 * 2), o = new Float64Array(8 * 3);
+ o[0] = t.x, o[1] = t.y, o[2] = t.z, o[3] = n.x, o[4] = t.y, o[5] = t.z, o[6] = n.x, o[7] = n.y, o[8] = t.z, o[9] = t.x, o[10] = n.y, o[11] = t.z, o[12] = t.x, o[13] = t.y, o[14] = n.z, o[15] = n.x, o[16] = t.y, o[17] = n.z, o[18] = n.x, o[19] = n.y, o[20] = n.z, o[21] = t.x, o[22] = n.y, o[23] = n.z, i.position = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.DOUBLE,
+ componentsPerAttribute: 3,
+ values: o
+ }), r[0] = 4, r[1] = 5, r[2] = 5, r[3] = 6, r[4] = 6, r[5] = 7, r[6] = 7, r[7] = 4, r[8] = 0, r[9] = 1, r[10] = 1, r[11] = 2, r[12] = 2, r[13] = 3, r[14] = 3, r[15] = 0, r[16] = 0, r[17] = 4, r[18] = 1, r[19] = 5, r[20] = 2, r[21] = 6, r[22] = 3, r[23] = 7;
+ const s = Cartesian3.subtract(n, t, diffScratch), c = Cartesian3.magnitude(s) * 0.5;
+ if (defined(e._offsetAttribute)) {
+ const l = o.length, d = e._offsetAttribute === GeometryOffsetAttribute$1.NONE ? 0 : 1, f = new Uint8Array(l / 3).fill(d);
+ i.applyOffset = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: f
+ });
+ }
+ return new Geometry({
+ attributes: i,
+ indices: r,
+ primitiveType: PrimitiveType$1.LINES,
+ boundingSphere: new BoundingSphere(Cartesian3.ZERO, c),
+ offsetAttribute: e._offsetAttribute
+ });
+};
+function ColorGeometryInstanceAttribute(e, t, n, i) {
+ e = defaultValue(e, 1), t = defaultValue(t, 1), n = defaultValue(n, 1), i = defaultValue(i, 1), this.value = new Uint8Array([
+ Color.floatToByte(e),
+ Color.floatToByte(t),
+ Color.floatToByte(n),
+ Color.floatToByte(i)
+ ]);
+}
+Object.defineProperties(ColorGeometryInstanceAttribute.prototype, {
+ /**
+ * The datatype of each component in the attribute, e.g., individual elements in
+ * {@link ColorGeometryInstanceAttribute#value}.
+ *
+ * @memberof ColorGeometryInstanceAttribute.prototype
+ *
+ * @type {ComponentDatatype}
+ * @readonly
+ *
+ * @default {@link ComponentDatatype.UNSIGNED_BYTE}
+ */
+ componentDatatype: {
+ get: function() {
+ return ComponentDatatype$1.UNSIGNED_BYTE;
+ }
+ },
+ /**
+ * The number of components in the attributes, i.e., {@link ColorGeometryInstanceAttribute#value}.
+ *
+ * @memberof ColorGeometryInstanceAttribute.prototype
+ *
+ * @type {number}
+ * @readonly
+ *
+ * @default 4
+ */
+ componentsPerAttribute: {
+ get: function() {
+ return 4;
+ }
+ },
+ /**
+ * When true and componentDatatype is an integer format,
+ * indicate that the components should be mapped to the range [0, 1] (unsigned)
+ * or [-1, 1] (signed) when they are accessed as floating-point for rendering.
+ *
+ * @memberof ColorGeometryInstanceAttribute.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default true
+ */
+ normalize: {
+ get: function() {
+ return !0;
+ }
+ }
+});
+ColorGeometryInstanceAttribute.fromColor = function(e) {
+ return new ColorGeometryInstanceAttribute(
+ e.red,
+ e.green,
+ e.blue,
+ e.alpha
+ );
+};
+ColorGeometryInstanceAttribute.toValue = function(e, t) {
+ return defined(t) ? e.toBytes(t) : new Uint8Array(e.toBytes());
+};
+ColorGeometryInstanceAttribute.equals = function(e, t) {
+ return e === t || defined(e) && defined(t) && e.value[0] === t.value[0] && e.value[1] === t.value[1] && e.value[2] === t.value[2] && e.value[3] === t.value[3];
+};
+function DistanceDisplayConditionGeometryInstanceAttribute(e, t) {
+ e = defaultValue(e, 0), t = defaultValue(t, Number.MAX_VALUE), this.value = new Float32Array([e, t]);
+}
+Object.defineProperties(
+ DistanceDisplayConditionGeometryInstanceAttribute.prototype,
+ {
+ /**
+ * The datatype of each component in the attribute, e.g., individual elements in
+ * {@link DistanceDisplayConditionGeometryInstanceAttribute#value}.
+ *
+ * @memberof DistanceDisplayConditionGeometryInstanceAttribute.prototype
+ *
+ * @type {ComponentDatatype}
+ * @readonly
+ *
+ * @default {@link ComponentDatatype.FLOAT}
+ */
+ componentDatatype: {
+ get: function() {
+ return ComponentDatatype$1.FLOAT;
+ }
+ },
+ /**
+ * The number of components in the attributes, i.e., {@link DistanceDisplayConditionGeometryInstanceAttribute#value}.
+ *
+ * @memberof DistanceDisplayConditionGeometryInstanceAttribute.prototype
+ *
+ * @type {number}
+ * @readonly
+ *
+ * @default 3
+ */
+ componentsPerAttribute: {
+ get: function() {
+ return 2;
+ }
+ },
+ /**
+ * When true and componentDatatype is an integer format,
+ * indicate that the components should be mapped to the range [0, 1] (unsigned)
+ * or [-1, 1] (signed) when they are accessed as floating-point for rendering.
+ *
+ * @memberof DistanceDisplayConditionGeometryInstanceAttribute.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default false
+ */
+ normalize: {
+ get: function() {
+ return !1;
+ }
+ }
+ }
+);
+DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition = function(e) {
+ return new DistanceDisplayConditionGeometryInstanceAttribute(
+ e.near,
+ e.far
+ );
+};
+DistanceDisplayConditionGeometryInstanceAttribute.toValue = function(e, t) {
+ return defined(t) ? (t[0] = e.near, t[1] = e.far, t) : new Float32Array([
+ e.near,
+ e.far
+ ]);
+};
+function GeometryInstance(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this.geometry = e.geometry, this.modelMatrix = Matrix4.clone(
+ defaultValue(e.modelMatrix, Matrix4.IDENTITY)
+ ), this.id = e.id, this.pickPrimitive = e.pickPrimitive, this.attributes = defaultValue(e.attributes, {}), this.westHemisphereGeometry = void 0, this.eastHemisphereGeometry = void 0;
+}
+function TimeInterval(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this.start = defined(e.start) ? JulianDate.clone(e.start) : new JulianDate(), this.stop = defined(e.stop) ? JulianDate.clone(e.stop) : new JulianDate(), this.data = e.data, this.isStartIncluded = defaultValue(e.isStartIncluded, !0), this.isStopIncluded = defaultValue(e.isStopIncluded, !0);
+}
+Object.defineProperties(TimeInterval.prototype, {
+ /**
+ * Gets whether or not this interval is empty.
+ * @memberof TimeInterval.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ isEmpty: {
+ get: function() {
+ const e = JulianDate.compare(this.stop, this.start);
+ return e < 0 || e === 0 && (!this.isStartIncluded || !this.isStopIncluded);
+ }
+ }
+});
+const scratchInterval = {
+ start: void 0,
+ stop: void 0,
+ isStartIncluded: void 0,
+ isStopIncluded: void 0,
+ data: void 0
+};
+TimeInterval.fromIso8601 = function(e, t) {
+ const n = e.iso8601.split("/");
+ if (n.length !== 2)
+ throw new DeveloperError(
+ "options.iso8601 is an invalid ISO 8601 interval."
+ );
+ const i = JulianDate.fromIso8601(n[0]), r = JulianDate.fromIso8601(n[1]), o = defaultValue(e.isStartIncluded, !0), s = defaultValue(e.isStopIncluded, !0), c = e.data;
+ return defined(t) ? (t.start = i, t.stop = r, t.isStartIncluded = o, t.isStopIncluded = s, t.data = c, t) : (scratchInterval.start = i, scratchInterval.stop = r, scratchInterval.isStartIncluded = o, scratchInterval.isStopIncluded = s, scratchInterval.data = c, new TimeInterval(scratchInterval));
+};
+TimeInterval.toIso8601 = function(e, t) {
+ return `${JulianDate.toIso8601(
+ e.start,
+ t
+ )}/${JulianDate.toIso8601(e.stop, t)}`;
+};
+TimeInterval.clone = function(e, t) {
+ if (defined(e))
+ return defined(t) ? (t.start = e.start, t.stop = e.stop, t.isStartIncluded = e.isStartIncluded, t.isStopIncluded = e.isStopIncluded, t.data = e.data, t) : new TimeInterval(e);
+};
+TimeInterval.equals = function(e, t, n) {
+ return e === t || defined(e) && defined(t) && (e.isEmpty && t.isEmpty || e.isStartIncluded === t.isStartIncluded && e.isStopIncluded === t.isStopIncluded && JulianDate.equals(e.start, t.start) && JulianDate.equals(e.stop, t.stop) && (e.data === t.data || defined(n) && n(e.data, t.data)));
+};
+TimeInterval.equalsEpsilon = function(e, t, n, i) {
+ return n = defaultValue(n, 0), e === t || defined(e) && defined(t) && (e.isEmpty && t.isEmpty || e.isStartIncluded === t.isStartIncluded && e.isStopIncluded === t.isStopIncluded && JulianDate.equalsEpsilon(e.start, t.start, n) && JulianDate.equalsEpsilon(e.stop, t.stop, n) && (e.data === t.data || defined(i) && i(e.data, t.data)));
+};
+TimeInterval.intersect = function(e, t, n, i) {
+ if (!defined(t))
+ return TimeInterval.clone(TimeInterval.EMPTY, n);
+ const r = e.start, o = e.stop, s = t.start, c = t.stop, l = JulianDate.greaterThanOrEquals(s, r) && JulianDate.greaterThanOrEquals(o, s), d = !l && JulianDate.lessThanOrEquals(s, r) && JulianDate.lessThanOrEquals(r, c);
+ if (!l && !d)
+ return TimeInterval.clone(TimeInterval.EMPTY, n);
+ const f = e.isStartIncluded, h = e.isStopIncluded, p = t.isStartIncluded, m = t.isStopIncluded, _ = JulianDate.lessThan(o, c);
+ return defined(n) || (n = new TimeInterval()), n.start = l ? s : r, n.isStartIncluded = f && p || !JulianDate.equals(s, r) && (l && p || d && f), n.stop = _ ? o : c, n.isStopIncluded = _ ? h : h && m || !JulianDate.equals(c, o) && m, n.data = defined(i) ? i(e.data, t.data) : e.data, n;
+};
+TimeInterval.contains = function(e, t) {
+ if (e.isEmpty)
+ return !1;
+ const n = JulianDate.compare(
+ e.start,
+ t
+ );
+ if (n === 0)
+ return e.isStartIncluded;
+ const i = JulianDate.compare(t, e.stop);
+ return i === 0 ? e.isStopIncluded : n < 0 && i < 0;
+};
+TimeInterval.prototype.clone = function(e) {
+ return TimeInterval.clone(this, e);
+};
+TimeInterval.prototype.equals = function(e, t) {
+ return TimeInterval.equals(this, e, t);
+};
+TimeInterval.prototype.equalsEpsilon = function(e, t, n) {
+ return TimeInterval.equalsEpsilon(this, e, t, n);
+};
+TimeInterval.prototype.toString = function() {
+ return TimeInterval.toIso8601(this);
+};
+TimeInterval.EMPTY = Object.freeze(
+ new TimeInterval({
+ start: new JulianDate(),
+ stop: new JulianDate(),
+ isStartIncluded: !1,
+ isStopIncluded: !1
+ })
+);
+const MINIMUM_VALUE = Object.freeze(
+ JulianDate.fromIso8601("0000-01-01T00:00:00Z")
+), MAXIMUM_VALUE = Object.freeze(
+ JulianDate.fromIso8601("9999-12-31T24:00:00Z")
+), MAXIMUM_INTERVAL = Object.freeze(
+ new TimeInterval({
+ start: MINIMUM_VALUE,
+ stop: MAXIMUM_VALUE
+ })
+), Iso8601 = {
+ /**
+ * A {@link JulianDate} representing the earliest time representable by an ISO8601 date.
+ * This is equivalent to the date string '0000-01-01T00:00:00Z'
+ *
+ * @type {JulianDate}
+ * @constant
+ */
+ MINIMUM_VALUE,
+ /**
+ * A {@link JulianDate} representing the latest time representable by an ISO8601 date.
+ * This is equivalent to the date string '9999-12-31T24:00:00Z'
+ *
+ * @type {JulianDate}
+ * @constant
+ */
+ MAXIMUM_VALUE,
+ /**
+ * A {@link TimeInterval} representing the largest interval representable by an ISO8601 interval.
+ * This is equivalent to the interval string '0000-01-01T00:00:00Z/9999-12-31T24:00:00Z'
+ *
+ * @type {TimeInterval}
+ * @constant
+ */
+ MAXIMUM_INTERVAL
+};
+function OffsetGeometryInstanceAttribute(e, t, n) {
+ e = defaultValue(e, 0), t = defaultValue(t, 0), n = defaultValue(n, 0), this.value = new Float32Array([e, t, n]);
+}
+Object.defineProperties(OffsetGeometryInstanceAttribute.prototype, {
+ /**
+ * The datatype of each component in the attribute, e.g., individual elements in
+ * {@link OffsetGeometryInstanceAttribute#value}.
+ *
+ * @memberof OffsetGeometryInstanceAttribute.prototype
+ *
+ * @type {ComponentDatatype}
+ * @readonly
+ *
+ * @default {@link ComponentDatatype.FLOAT}
+ */
+ componentDatatype: {
+ get: function() {
+ return ComponentDatatype$1.FLOAT;
+ }
+ },
+ /**
+ * The number of components in the attributes, i.e., {@link OffsetGeometryInstanceAttribute#value}.
+ *
+ * @memberof OffsetGeometryInstanceAttribute.prototype
+ *
+ * @type {number}
+ * @readonly
+ *
+ * @default 3
+ */
+ componentsPerAttribute: {
+ get: function() {
+ return 3;
+ }
+ },
+ /**
+ * When true and componentDatatype is an integer format,
+ * indicate that the components should be mapped to the range [0, 1] (unsigned)
+ * or [-1, 1] (signed) when they are accessed as floating-point for rendering.
+ *
+ * @memberof OffsetGeometryInstanceAttribute.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default false
+ */
+ normalize: {
+ get: function() {
+ return !1;
+ }
+ }
+});
+OffsetGeometryInstanceAttribute.fromCartesian3 = function(e) {
+ return new OffsetGeometryInstanceAttribute(e.x, e.y, e.z);
+};
+OffsetGeometryInstanceAttribute.toValue = function(e, t) {
+ return defined(t) || (t = new Float32Array([e.x, e.y, e.z])), t[0] = e.x, t[1] = e.y, t[2] = e.z, t;
+};
+function ShowGeometryInstanceAttribute(e) {
+ e = defaultValue(e, !0), this.value = ShowGeometryInstanceAttribute.toValue(e);
+}
+Object.defineProperties(ShowGeometryInstanceAttribute.prototype, {
+ /**
+ * The datatype of each component in the attribute, e.g., individual elements in
+ * {@link ColorGeometryInstanceAttribute#value}.
+ *
+ * @memberof ShowGeometryInstanceAttribute.prototype
+ *
+ * @type {ComponentDatatype}
+ * @readonly
+ *
+ * @default {@link ComponentDatatype.UNSIGNED_BYTE}
+ */
+ componentDatatype: {
+ get: function() {
+ return ComponentDatatype$1.UNSIGNED_BYTE;
+ }
+ },
+ /**
+ * The number of components in the attributes, i.e., {@link ColorGeometryInstanceAttribute#value}.
+ *
+ * @memberof ShowGeometryInstanceAttribute.prototype
+ *
+ * @type {number}
+ * @readonly
+ *
+ * @default 1
+ */
+ componentsPerAttribute: {
+ get: function() {
+ return 1;
+ }
+ },
+ /**
+ * When true and componentDatatype is an integer format,
+ * indicate that the components should be mapped to the range [0, 1] (unsigned)
+ * or [-1, 1] (signed) when they are accessed as floating-point for rendering.
+ *
+ * @memberof ShowGeometryInstanceAttribute.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default true
+ */
+ normalize: {
+ get: function() {
+ return !1;
+ }
+ }
+});
+ShowGeometryInstanceAttribute.toValue = function(e, t) {
+ return defined(t) ? (t[0] = e, t) : new Uint8Array([e]);
+};
+const AllMaterialAppearanceFS = `in vec3 v_positionEC;
+in vec3 v_normalEC;
+in vec3 v_tangentEC;
+in vec3 v_bitangentEC;
+in vec2 v_st;
+
+void main()
+{
+ vec3 positionToEyeEC = -v_positionEC;
+ mat3 tangentToEyeMatrix = czm_tangentToEyeSpaceMatrix(v_normalEC, v_tangentEC, v_bitangentEC);
+
+ vec3 normalEC = normalize(v_normalEC);
+#ifdef FACE_FORWARD
+ normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
+#endif
+
+ czm_materialInput materialInput;
+ materialInput.normalEC = normalEC;
+ materialInput.tangentToEyeMatrix = tangentToEyeMatrix;
+ materialInput.positionToEyeEC = positionToEyeEC;
+ materialInput.st = v_st;
+ czm_material material = czm_getMaterial(materialInput);
+
+#ifdef FLAT
+ out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
+#else
+ out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
+#endif
+}
+`, AllMaterialAppearanceVS = `in vec3 position3DHigh;
+in vec3 position3DLow;
+in vec3 normal;
+in vec3 tangent;
+in vec3 bitangent;
+in vec2 st;
+in float batchId;
+
+out vec3 v_positionEC;
+out vec3 v_normalEC;
+out vec3 v_tangentEC;
+out vec3 v_bitangentEC;
+out vec2 v_st;
+
+void main()
+{
+ vec4 p = czm_computePosition();
+
+ v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
+ v_normalEC = czm_normal * normal; // normal in eye coordinates
+ v_tangentEC = czm_normal * tangent; // tangent in eye coordinates
+ v_bitangentEC = czm_normal * bitangent; // bitangent in eye coordinates
+ v_st = st;
+
+ gl_Position = czm_modelViewProjectionRelativeToEye * p;
+}
+`, BasicMaterialAppearanceFS = `in vec3 v_positionEC;
+in vec3 v_normalEC;
+
+void main()
+{
+ vec3 positionToEyeEC = -v_positionEC;
+
+ vec3 normalEC = normalize(v_normalEC);
+#ifdef FACE_FORWARD
+ normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
+#endif
+
+ czm_materialInput materialInput;
+ materialInput.normalEC = normalEC;
+ materialInput.positionToEyeEC = positionToEyeEC;
+ czm_material material = czm_getMaterial(materialInput);
+
+#ifdef FLAT
+ out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
+#else
+ out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
+#endif
+}
+`, BasicMaterialAppearanceVS = `in vec3 position3DHigh;
+in vec3 position3DLow;
+in vec3 normal;
+in float batchId;
+
+out vec3 v_positionEC;
+out vec3 v_normalEC;
+
+void main()
+{
+ vec4 p = czm_computePosition();
+
+ v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
+ v_normalEC = czm_normal * normal; // normal in eye coordinates
+
+ gl_Position = czm_modelViewProjectionRelativeToEye * p;
+}
+`, TexturedMaterialAppearanceFS = `in vec3 v_positionEC;
+in vec3 v_normalEC;
+in vec2 v_st;
+
+void main()
+{
+ vec3 positionToEyeEC = -v_positionEC;
+
+ vec3 normalEC = normalize(v_normalEC);
+#ifdef FACE_FORWARD
+ normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
+#endif
+
+ czm_materialInput materialInput;
+ materialInput.normalEC = normalEC;
+ materialInput.positionToEyeEC = positionToEyeEC;
+ materialInput.st = v_st;
+ czm_material material = czm_getMaterial(materialInput);
+
+#ifdef FLAT
+ out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
+#else
+ out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
+#endif
+}
+`, TexturedMaterialAppearanceVS = `in vec3 position3DHigh;
+in vec3 position3DLow;
+in vec3 normal;
+in vec2 st;
+in float batchId;
+
+out vec3 v_positionEC;
+out vec3 v_normalEC;
+out vec2 v_st;
+
+void main()
+{
+ vec4 p = czm_computePosition();
+
+ v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
+ v_normalEC = czm_normal * normal; // normal in eye coordinates
+ v_st = st;
+
+ gl_Position = czm_modelViewProjectionRelativeToEye * p;
+}
+`, BlendEquation = {
+ /**
+ * Pixel values are added componentwise. This is used in additive blending for translucency.
+ *
+ * @type {number}
+ * @constant
+ */
+ ADD: WebGLConstants$1.FUNC_ADD,
+ /**
+ * Pixel values are subtracted componentwise (source - destination). This is used in alpha blending for translucency.
+ *
+ * @type {number}
+ * @constant
+ */
+ SUBTRACT: WebGLConstants$1.FUNC_SUBTRACT,
+ /**
+ * Pixel values are subtracted componentwise (destination - source).
+ *
+ * @type {number}
+ * @constant
+ */
+ REVERSE_SUBTRACT: WebGLConstants$1.FUNC_REVERSE_SUBTRACT,
+ /**
+ * Pixel values are given to the minimum function (min(source, destination)).
+ *
+ * This equation operates on each pixel color component.
+ *
+ * @type {number}
+ * @constant
+ */
+ MIN: WebGLConstants$1.MIN,
+ /**
+ * Pixel values are given to the maximum function (max(source, destination)).
+ *
+ * This equation operates on each pixel color component.
+ *
+ * @type {number}
+ * @constant
+ */
+ MAX: WebGLConstants$1.MAX
+}, BlendEquation$1 = Object.freeze(BlendEquation), BlendFunction = {
+ /**
+ * The blend factor is zero.
+ *
+ * @type {number}
+ * @constant
+ */
+ ZERO: WebGLConstants$1.ZERO,
+ /**
+ * The blend factor is one.
+ *
+ * @type {number}
+ * @constant
+ */
+ ONE: WebGLConstants$1.ONE,
+ /**
+ * The blend factor is the source color.
+ *
+ * @type {number}
+ * @constant
+ */
+ SOURCE_COLOR: WebGLConstants$1.SRC_COLOR,
+ /**
+ * The blend factor is one minus the source color.
+ *
+ * @type {number}
+ * @constant
+ */
+ ONE_MINUS_SOURCE_COLOR: WebGLConstants$1.ONE_MINUS_SRC_COLOR,
+ /**
+ * The blend factor is the destination color.
+ *
+ * @type {number}
+ * @constant
+ */
+ DESTINATION_COLOR: WebGLConstants$1.DST_COLOR,
+ /**
+ * The blend factor is one minus the destination color.
+ *
+ * @type {number}
+ * @constant
+ */
+ ONE_MINUS_DESTINATION_COLOR: WebGLConstants$1.ONE_MINUS_DST_COLOR,
+ /**
+ * The blend factor is the source alpha.
+ *
+ * @type {number}
+ * @constant
+ */
+ SOURCE_ALPHA: WebGLConstants$1.SRC_ALPHA,
+ /**
+ * The blend factor is one minus the source alpha.
+ *
+ * @type {number}
+ * @constant
+ */
+ ONE_MINUS_SOURCE_ALPHA: WebGLConstants$1.ONE_MINUS_SRC_ALPHA,
+ /**
+ * The blend factor is the destination alpha.
+ *
+ * @type {number}
+ * @constant
+ */
+ DESTINATION_ALPHA: WebGLConstants$1.DST_ALPHA,
+ /**
+ * The blend factor is one minus the destination alpha.
+ *
+ * @type {number}
+ * @constant
+ */
+ ONE_MINUS_DESTINATION_ALPHA: WebGLConstants$1.ONE_MINUS_DST_ALPHA,
+ /**
+ * The blend factor is the constant color.
+ *
+ * @type {number}
+ * @constant
+ */
+ CONSTANT_COLOR: WebGLConstants$1.CONSTANT_COLOR,
+ /**
+ * The blend factor is one minus the constant color.
+ *
+ * @type {number}
+ * @constant
+ */
+ ONE_MINUS_CONSTANT_COLOR: WebGLConstants$1.ONE_MINUS_CONSTANT_COLOR,
+ /**
+ * The blend factor is the constant alpha.
+ *
+ * @type {number}
+ * @constant
+ */
+ CONSTANT_ALPHA: WebGLConstants$1.CONSTANT_ALPHA,
+ /**
+ * The blend factor is one minus the constant alpha.
+ *
+ * @type {number}
+ * @constant
+ */
+ ONE_MINUS_CONSTANT_ALPHA: WebGLConstants$1.ONE_MINUS_CONSTANT_ALPHA,
+ /**
+ * The blend factor is the saturated source alpha.
+ *
+ * @type {number}
+ * @constant
+ */
+ SOURCE_ALPHA_SATURATE: WebGLConstants$1.SRC_ALPHA_SATURATE
+}, BlendFunction$1 = Object.freeze(BlendFunction), BlendingState = {
+ /**
+ * Blending is disabled.
+ *
+ * @type {object}
+ * @constant
+ */
+ DISABLED: Object.freeze({
+ enabled: !1
+ }),
+ /**
+ * Blending is enabled using alpha blending, source(source.alpha) + destination(1 - source.alpha).
+ *
+ * @type {object}
+ * @constant
+ */
+ ALPHA_BLEND: Object.freeze({
+ enabled: !0,
+ equationRgb: BlendEquation$1.ADD,
+ equationAlpha: BlendEquation$1.ADD,
+ functionSourceRgb: BlendFunction$1.SOURCE_ALPHA,
+ functionSourceAlpha: BlendFunction$1.ONE,
+ functionDestinationRgb: BlendFunction$1.ONE_MINUS_SOURCE_ALPHA,
+ functionDestinationAlpha: BlendFunction$1.ONE_MINUS_SOURCE_ALPHA
+ }),
+ /**
+ * Blending is enabled using alpha blending with premultiplied alpha, source + destination(1 - source.alpha).
+ *
+ * @type {object}
+ * @constant
+ */
+ PRE_MULTIPLIED_ALPHA_BLEND: Object.freeze({
+ enabled: !0,
+ equationRgb: BlendEquation$1.ADD,
+ equationAlpha: BlendEquation$1.ADD,
+ functionSourceRgb: BlendFunction$1.ONE,
+ functionSourceAlpha: BlendFunction$1.ONE,
+ functionDestinationRgb: BlendFunction$1.ONE_MINUS_SOURCE_ALPHA,
+ functionDestinationAlpha: BlendFunction$1.ONE_MINUS_SOURCE_ALPHA
+ }),
+ /**
+ * Blending is enabled using additive blending, source(source.alpha) + destination.
+ *
+ * @type {object}
+ * @constant
+ */
+ ADDITIVE_BLEND: Object.freeze({
+ enabled: !0,
+ equationRgb: BlendEquation$1.ADD,
+ equationAlpha: BlendEquation$1.ADD,
+ functionSourceRgb: BlendFunction$1.SOURCE_ALPHA,
+ functionSourceAlpha: BlendFunction$1.ONE,
+ functionDestinationRgb: BlendFunction$1.ONE,
+ functionDestinationAlpha: BlendFunction$1.ONE
+ })
+}, BlendingState$1 = Object.freeze(BlendingState), CullFace = {
+ /**
+ * Front-facing triangles are culled.
+ *
+ * @type {number}
+ * @constant
+ */
+ FRONT: WebGLConstants$1.FRONT,
+ /**
+ * Back-facing triangles are culled.
+ *
+ * @type {number}
+ * @constant
+ */
+ BACK: WebGLConstants$1.BACK,
+ /**
+ * Both front-facing and back-facing triangles are culled.
+ *
+ * @type {number}
+ * @constant
+ */
+ FRONT_AND_BACK: WebGLConstants$1.FRONT_AND_BACK
+}, CullFace$1 = Object.freeze(CullFace);
+function Appearance(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this.material = e.material, this.translucent = defaultValue(e.translucent, !0), this._vertexShaderSource = e.vertexShaderSource, this._fragmentShaderSource = e.fragmentShaderSource, this._renderState = e.renderState, this._closed = defaultValue(e.closed, !1);
+}
+Object.defineProperties(Appearance.prototype, {
+ /**
+ * The GLSL source code for the vertex shader.
+ *
+ * @memberof Appearance.prototype
+ *
+ * @type {string}
+ * @readonly
+ */
+ vertexShaderSource: {
+ get: function() {
+ return this._vertexShaderSource;
+ }
+ },
+ /**
+ * The GLSL source code for the fragment shader. The full fragment shader
+ * source is built procedurally taking into account the {@link Appearance#material}.
+ * Use {@link Appearance#getFragmentShaderSource} to get the full source.
+ *
+ * @memberof Appearance.prototype
+ *
+ * @type {string}
+ * @readonly
+ */
+ fragmentShaderSource: {
+ get: function() {
+ return this._fragmentShaderSource;
+ }
+ },
+ /**
+ * The WebGL fixed-function state to use when rendering the geometry.
+ *
+ * @memberof Appearance.prototype
+ *
+ * @type {object}
+ * @readonly
+ */
+ renderState: {
+ get: function() {
+ return this._renderState;
+ }
+ },
+ /**
+ * When true, the geometry is expected to be closed.
+ *
+ * @memberof Appearance.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default false
+ */
+ closed: {
+ get: function() {
+ return this._closed;
+ }
+ }
+});
+Appearance.prototype.getFragmentShaderSource = function() {
+ const e = [];
+ return this.flat && e.push("#define FLAT"), this.faceForward && e.push("#define FACE_FORWARD"), defined(this.material) && e.push(this.material.shaderSource), e.push(this.fragmentShaderSource), e.join(`
+`);
+};
+Appearance.prototype.isTranslucent = function() {
+ return defined(this.material) && this.material.isTranslucent() || !defined(this.material) && this.translucent;
+};
+Appearance.prototype.getRenderState = function() {
+ const e = this.isTranslucent(), t = clone$1(this.renderState, !1);
+ return e ? (t.depthMask = !1, t.blending = BlendingState$1.ALPHA_BLEND) : t.depthMask = !0, t;
+};
+Appearance.getDefaultRenderState = function(e, t, n) {
+ let i = {
+ depthTest: {
+ enabled: !0
+ }
+ };
+ return e && (i.depthMask = !1, i.blending = BlendingState$1.ALPHA_BLEND), t && (i.cull = {
+ enabled: !0,
+ face: CullFace$1.BACK
+ }), defined(n) && (i = combine$2(n, i, !0)), i;
+};
+const AspectRampMaterial = `uniform sampler2D image;
+
+czm_material czm_getMaterial(czm_materialInput materialInput)
+{
+ czm_material material = czm_getDefaultMaterial(materialInput);
+ vec4 rampColor = texture(image, vec2(materialInput.aspect / (2.0 * czm_pi), 0.5));
+ rampColor = czm_gammaCorrect(rampColor);
+ material.diffuse = rampColor.rgb;
+ material.alpha = rampColor.a;
+ return material;
+}
+`, BumpMapMaterial = `uniform sampler2D image;
+uniform float strength;
+uniform vec2 repeat;
+
+czm_material czm_getMaterial(czm_materialInput materialInput)
+{
+ czm_material material = czm_getDefaultMaterial(materialInput);
+
+ vec2 st = materialInput.st;
+
+ vec2 centerPixel = fract(repeat * st);
+ float centerBump = texture(image, centerPixel).channel;
+
+ float imageWidth = float(imageDimensions.x);
+ vec2 rightPixel = fract(repeat * (st + vec2(1.0 / imageWidth, 0.0)));
+ float rightBump = texture(image, rightPixel).channel;
+
+ float imageHeight = float(imageDimensions.y);
+ vec2 leftPixel = fract(repeat * (st + vec2(0.0, 1.0 / imageHeight)));
+ float topBump = texture(image, leftPixel).channel;
+
+ vec3 normalTangentSpace = normalize(vec3(centerBump - rightBump, centerBump - topBump, clamp(1.0 - strength, 0.1, 1.0)));
+ vec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;
+
+ material.normal = normalEC;
+ material.diffuse = vec3(0.01);
+
+ return material;
+}
+`, CheckerboardMaterial = `uniform vec4 lightColor;
+uniform vec4 darkColor;
+uniform vec2 repeat;
+
+czm_material czm_getMaterial(czm_materialInput materialInput)
+{
+ czm_material material = czm_getDefaultMaterial(materialInput);
+
+ vec2 st = materialInput.st;
+
+ // From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights
+ float b = mod(floor(repeat.s * st.s) + floor(repeat.t * st.t), 2.0); // 0.0 or 1.0
+
+ // Find the distance from the closest separator (region between two colors)
+ float scaledWidth = fract(repeat.s * st.s);
+ scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));
+ float scaledHeight = fract(repeat.t * st.t);
+ scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));
+ float value = min(scaledWidth, scaledHeight);
+
+ vec4 currentColor = mix(lightColor, darkColor, b);
+ vec4 color = czm_antialias(lightColor, darkColor, currentColor, value, 0.03);
+
+ color = czm_gammaCorrect(color);
+ material.diffuse = color.rgb;
+ material.alpha = color.a;
+
+ return material;
+}
+`, DotMaterial = `uniform vec4 lightColor;
+uniform vec4 darkColor;
+uniform vec2 repeat;
+
+czm_material czm_getMaterial(czm_materialInput materialInput)
+{
+ czm_material material = czm_getDefaultMaterial(materialInput);
+
+ // From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights
+ float b = smoothstep(0.3, 0.32, length(fract(repeat * materialInput.st) - 0.5)); // 0.0 or 1.0
+
+ vec4 color = mix(lightColor, darkColor, b);
+ color = czm_gammaCorrect(color);
+ material.diffuse = color.rgb;
+ material.alpha = color.a;
+
+ return material;
+}
+`, ElevationBandMaterial = `uniform sampler2D heights;
+uniform sampler2D colors;
+
+// This material expects heights to be sorted from lowest to highest.
+
+float getHeight(int idx, float invTexSize)
+{
+ vec2 uv = vec2((float(idx) + 0.5) * invTexSize, 0.5);
+#ifdef OES_texture_float
+ return texture(heights, uv).x;
+#else
+ return czm_unpackFloat(texture(heights, uv));
+#endif
+}
+
+czm_material czm_getMaterial(czm_materialInput materialInput)
+{
+ czm_material material = czm_getDefaultMaterial(materialInput);
+
+ float height = materialInput.height;
+ float invTexSize = 1.0 / float(heightsDimensions.x);
+
+ float minHeight = getHeight(0, invTexSize);
+ float maxHeight = getHeight(heightsDimensions.x - 1, invTexSize);
+
+ // early-out when outside the height range
+ if (height < minHeight || height > maxHeight) {
+ material.diffuse = vec3(0.0);
+ material.alpha = 0.0;
+ return material;
+ }
+
+ // Binary search to find heights above and below.
+ int idxBelow = 0;
+ int idxAbove = heightsDimensions.x;
+ float heightBelow = minHeight;
+ float heightAbove = maxHeight;
+
+ // while loop not allowed, so use for loop with max iterations.
+ // maxIterations of 16 supports a texture size up to 65536 (2^16).
+ const int maxIterations = 16;
+ for (int i = 0; i < maxIterations; i++) {
+ if (idxBelow >= idxAbove - 1) {
+ break;
+ }
+
+ int idxMid = (idxBelow + idxAbove) / 2;
+ float heightTex = getHeight(idxMid, invTexSize);
+
+ if (height > heightTex) {
+ idxBelow = idxMid;
+ heightBelow = heightTex;
+ } else {
+ idxAbove = idxMid;
+ heightAbove = heightTex;
+ }
+ }
+
+ float lerper = heightBelow == heightAbove ? 1.0 : (height - heightBelow) / (heightAbove - heightBelow);
+ vec2 colorUv = vec2(invTexSize * (float(idxBelow) + 0.5 + lerper), 0.5);
+ vec4 color = texture(colors, colorUv);
+
+ // undo preumultiplied alpha
+ if (color.a > 0.0)
+ {
+ color.rgb /= color.a;
+ }
+
+ color.rgb = czm_gammaCorrect(color.rgb);
+
+ material.diffuse = color.rgb;
+ material.alpha = color.a;
+ return material;
+}
+`, ElevationContourMaterial = `uniform vec4 color;
+uniform float spacing;
+uniform float width;
+
+czm_material czm_getMaterial(czm_materialInput materialInput)
+{
+ czm_material material = czm_getDefaultMaterial(materialInput);
+
+ float distanceToContour = mod(materialInput.height, spacing);
+
+#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
+ float dxc = abs(dFdx(materialInput.height));
+ float dyc = abs(dFdy(materialInput.height));
+ float dF = max(dxc, dyc) * czm_pixelRatio * width;
+ float alpha = (distanceToContour < dF) ? 1.0 : 0.0;
+#else
+ // If no derivatives available (IE 10?), use pixel ratio
+ float alpha = (distanceToContour < (czm_pixelRatio * width)) ? 1.0 : 0.0;
+#endif
+
+ vec4 outColor = czm_gammaCorrect(vec4(color.rgb, alpha * color.a));
+ material.diffuse = outColor.rgb;
+ material.alpha = outColor.a;
+
+ return material;
+}
+`, ElevationRampMaterial = `uniform sampler2D image;
+uniform float minimumHeight;
+uniform float maximumHeight;
+
+czm_material czm_getMaterial(czm_materialInput materialInput)
+{
+ czm_material material = czm_getDefaultMaterial(materialInput);
+ float scaledHeight = clamp((materialInput.height - minimumHeight) / (maximumHeight - minimumHeight), 0.0, 1.0);
+ vec4 rampColor = texture(image, vec2(scaledHeight, 0.5));
+ rampColor = czm_gammaCorrect(rampColor);
+ material.diffuse = rampColor.rgb;
+ material.alpha = rampColor.a;
+ return material;
+}
+`, FadeMaterial = `uniform vec4 fadeInColor;
+uniform vec4 fadeOutColor;
+uniform float maximumDistance;
+uniform bool repeat;
+uniform vec2 fadeDirection;
+uniform vec2 time;
+
+float getTime(float t, float coord)
+{
+ float scalar = 1.0 / maximumDistance;
+ float q = distance(t, coord) * scalar;
+ if (repeat)
+ {
+ float r = distance(t, coord + 1.0) * scalar;
+ float s = distance(t, coord - 1.0) * scalar;
+ q = min(min(r, s), q);
+ }
+ return clamp(q, 0.0, 1.0);
+}
+
+czm_material czm_getMaterial(czm_materialInput materialInput)
+{
+ czm_material material = czm_getDefaultMaterial(materialInput);
+
+ vec2 st = materialInput.st;
+ float s = getTime(time.x, st.s) * fadeDirection.s;
+ float t = getTime(time.y, st.t) * fadeDirection.t;
+
+ float u = length(vec2(s, t));
+ vec4 color = mix(fadeInColor, fadeOutColor, u);
+
+ color = czm_gammaCorrect(color);
+ material.emission = color.rgb;
+ material.alpha = color.a;
+
+ return material;
+}
+`, GridMaterial = `uniform vec4 color;
+uniform float cellAlpha;
+uniform vec2 lineCount;
+uniform vec2 lineThickness;
+uniform vec2 lineOffset;
+
+czm_material czm_getMaterial(czm_materialInput materialInput)
+{
+ czm_material material = czm_getDefaultMaterial(materialInput);
+
+ vec2 st = materialInput.st;
+
+ float scaledWidth = fract(lineCount.s * st.s - lineOffset.s);
+ scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));
+ float scaledHeight = fract(lineCount.t * st.t - lineOffset.t);
+ scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));
+
+ float value;
+
+ // Fuzz Factor - Controls blurriness of lines
+#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
+ const float fuzz = 1.2;
+ vec2 thickness = (lineThickness * czm_pixelRatio) - 1.0;
+
+ // From "3D Engine Design for Virtual Globes" by Cozzi and Ring, Listing 4.13.
+ vec2 dx = abs(dFdx(st));
+ vec2 dy = abs(dFdy(st));
+ vec2 dF = vec2(max(dx.s, dy.s), max(dx.t, dy.t)) * lineCount;
+ value = min(
+ smoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth),
+ smoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight));
+#else
+ // If no derivatives available (IE 10?), revert to view-dependent fuzz
+ const float fuzz = 0.05;
+
+ vec2 range = 0.5 - (lineThickness * 0.05);
+ value = min(
+ 1.0 - smoothstep(range.s, range.s + fuzz, scaledWidth),
+ 1.0 - smoothstep(range.t, range.t + fuzz, scaledHeight));
+#endif
+
+ // Edges taken from RimLightingMaterial.glsl
+ // See http://www.fundza.com/rman_shaders/surface/fake_rim/fake_rim1.html
+ float dRim = 1.0 - abs(dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC)));
+ float sRim = smoothstep(0.8, 1.0, dRim);
+ value *= (1.0 - sRim);
+
+ vec4 halfColor;
+ halfColor.rgb = color.rgb * 0.5;
+ halfColor.a = color.a * (1.0 - ((1.0 - cellAlpha) * value));
+ halfColor = czm_gammaCorrect(halfColor);
+ material.diffuse = halfColor.rgb;
+ material.emission = halfColor.rgb;
+ material.alpha = halfColor.a;
+
+ return material;
+}
+`, NormalMapMaterial = `uniform sampler2D image;
+uniform float strength;
+uniform vec2 repeat;
+
+czm_material czm_getMaterial(czm_materialInput materialInput)
+{
+ czm_material material = czm_getDefaultMaterial(materialInput);
+
+ vec4 textureValue = texture(image, fract(repeat * materialInput.st));
+ vec3 normalTangentSpace = textureValue.channels;
+ normalTangentSpace.xy = normalTangentSpace.xy * 2.0 - 1.0;
+ normalTangentSpace.z = clamp(1.0 - strength, 0.1, 1.0);
+ normalTangentSpace = normalize(normalTangentSpace);
+ vec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;
+
+ material.normal = normalEC;
+
+ return material;
+}
+`, PolylineArrowMaterial = `uniform vec4 color;
+
+float getPointOnLine(vec2 p0, vec2 p1, float x)
+{
+ float slope = (p0.y - p1.y) / (p0.x - p1.x);
+ return slope * (x - p0.x) + p0.y;
+}
+
+czm_material czm_getMaterial(czm_materialInput materialInput)
+{
+ czm_material material = czm_getDefaultMaterial(materialInput);
+
+ vec2 st = materialInput.st;
+
+#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
+ float base = 1.0 - abs(fwidth(st.s)) * 10.0 * czm_pixelRatio;
+#else
+ // If no derivatives available (IE 10?), 2.5% of the line will be the arrow head
+ float base = 0.975;
+#endif
+
+ vec2 center = vec2(1.0, 0.5);
+ float ptOnUpperLine = getPointOnLine(vec2(base, 1.0), center, st.s);
+ float ptOnLowerLine = getPointOnLine(vec2(base, 0.0), center, st.s);
+
+ float halfWidth = 0.15;
+ float s = step(0.5 - halfWidth, st.t);
+ s *= 1.0 - step(0.5 + halfWidth, st.t);
+ s *= 1.0 - step(base, st.s);
+
+ float t = step(base, materialInput.st.s);
+ t *= 1.0 - step(ptOnUpperLine, st.t);
+ t *= step(ptOnLowerLine, st.t);
+
+ // Find the distance from the closest separator (region between two colors)
+ float dist;
+ if (st.s < base)
+ {
+ float d1 = abs(st.t - (0.5 - halfWidth));
+ float d2 = abs(st.t - (0.5 + halfWidth));
+ dist = min(d1, d2);
+ }
+ else
+ {
+ float d1 = czm_infinity;
+ if (st.t < 0.5 - halfWidth && st.t > 0.5 + halfWidth)
+ {
+ d1 = abs(st.s - base);
+ }
+ float d2 = abs(st.t - ptOnUpperLine);
+ float d3 = abs(st.t - ptOnLowerLine);
+ dist = min(min(d1, d2), d3);
+ }
+
+ vec4 outsideColor = vec4(0.0);
+ vec4 currentColor = mix(outsideColor, color, clamp(s + t, 0.0, 1.0));
+ vec4 outColor = czm_antialias(outsideColor, color, currentColor, dist);
+
+ outColor = czm_gammaCorrect(outColor);
+ material.diffuse = outColor.rgb;
+ material.alpha = outColor.a;
+ return material;
+}
+`, PolylineDashMaterial = `uniform vec4 color;
+uniform vec4 gapColor;
+uniform float dashLength;
+uniform float dashPattern;
+in float v_polylineAngle;
+
+const float maskLength = 16.0;
+
+mat2 rotate(float rad) {
+ float c = cos(rad);
+ float s = sin(rad);
+ return mat2(
+ c, s,
+ -s, c
+ );
+}
+
+czm_material czm_getMaterial(czm_materialInput materialInput)
+{
+ czm_material material = czm_getDefaultMaterial(materialInput);
+
+ vec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;
+
+ // Get the relative position within the dash from 0 to 1
+ float dashPosition = fract(pos.x / (dashLength * czm_pixelRatio));
+ // Figure out the mask index.
+ float maskIndex = floor(dashPosition * maskLength);
+ // Test the bit mask.
+ float maskTest = floor(dashPattern / pow(2.0, maskIndex));
+ vec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? gapColor : color;
+ if (fragColor.a < 0.005) { // matches 0/255 and 1/255
+ discard;
+ }
+
+ fragColor = czm_gammaCorrect(fragColor);
+ material.emission = fragColor.rgb;
+ material.alpha = fragColor.a;
+ return material;
+}
+`, PolylineGlowMaterial = `uniform vec4 color;
+uniform float glowPower;
+uniform float taperPower;
+
+czm_material czm_getMaterial(czm_materialInput materialInput)
+{
+ czm_material material = czm_getDefaultMaterial(materialInput);
+
+ vec2 st = materialInput.st;
+ float glow = glowPower / abs(st.t - 0.5) - (glowPower / 0.5);
+
+ if (taperPower <= 0.99999) {
+ glow *= min(1.0, taperPower / (0.5 - st.s * 0.5) - (taperPower / 0.5));
+ }
+
+ vec4 fragColor;
+ fragColor.rgb = max(vec3(glow - 1.0 + color.rgb), color.rgb);
+ fragColor.a = clamp(0.0, 1.0, glow) * color.a;
+ fragColor = czm_gammaCorrect(fragColor);
+
+ material.emission = fragColor.rgb;
+ material.alpha = fragColor.a;
+
+ return material;
+}
+`, PolylineOutlineMaterial = `uniform vec4 color;
+uniform vec4 outlineColor;
+uniform float outlineWidth;
+
+in float v_width;
+
+czm_material czm_getMaterial(czm_materialInput materialInput)
+{
+ czm_material material = czm_getDefaultMaterial(materialInput);
+
+ vec2 st = materialInput.st;
+ float halfInteriorWidth = 0.5 * (v_width - outlineWidth) / v_width;
+ float b = step(0.5 - halfInteriorWidth, st.t);
+ b *= 1.0 - step(0.5 + halfInteriorWidth, st.t);
+
+ // Find the distance from the closest separator (region between two colors)
+ float d1 = abs(st.t - (0.5 - halfInteriorWidth));
+ float d2 = abs(st.t - (0.5 + halfInteriorWidth));
+ float dist = min(d1, d2);
+
+ vec4 currentColor = mix(outlineColor, color, b);
+ vec4 outColor = czm_antialias(outlineColor, color, currentColor, dist);
+ outColor = czm_gammaCorrect(outColor);
+
+ material.diffuse = outColor.rgb;
+ material.alpha = outColor.a;
+
+ return material;
+}
+`, RimLightingMaterial = `uniform vec4 color;
+uniform vec4 rimColor;
+uniform float width;
+
+czm_material czm_getMaterial(czm_materialInput materialInput)
+{
+ czm_material material = czm_getDefaultMaterial(materialInput);
+
+ // See http://www.fundza.com/rman_shaders/surface/fake_rim/fake_rim1.html
+ float d = 1.0 - dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC));
+ float s = smoothstep(1.0 - width, 1.0, d);
+
+ vec4 outColor = czm_gammaCorrect(color);
+ vec4 outRimColor = czm_gammaCorrect(rimColor);
+
+ material.diffuse = outColor.rgb;
+ material.emission = outRimColor.rgb * s;
+ material.alpha = mix(outColor.a, outRimColor.a, s);
+
+ return material;
+}
+`, SlopeRampMaterial = `uniform sampler2D image;
+
+czm_material czm_getMaterial(czm_materialInput materialInput)
+{
+ czm_material material = czm_getDefaultMaterial(materialInput);
+ vec4 rampColor = texture(image, vec2(materialInput.slope / (czm_pi / 2.0), 0.5));
+ rampColor = czm_gammaCorrect(rampColor);
+ material.diffuse = rampColor.rgb;
+ material.alpha = rampColor.a;
+ return material;
+}
+`, StripeMaterial = `uniform vec4 evenColor;
+uniform vec4 oddColor;
+uniform float offset;
+uniform float repeat;
+uniform bool horizontal;
+
+czm_material czm_getMaterial(czm_materialInput materialInput)
+{
+ czm_material material = czm_getDefaultMaterial(materialInput);
+
+ // Based on the Stripes Fragment Shader in the Orange Book (11.1.2)
+ float coord = mix(materialInput.st.s, materialInput.st.t, float(horizontal));
+ float value = fract((coord - offset) * (repeat * 0.5));
+ float dist = min(value, min(abs(value - 0.5), 1.0 - value));
+
+ vec4 currentColor = mix(evenColor, oddColor, step(0.5, value));
+ vec4 color = czm_antialias(evenColor, oddColor, currentColor, dist);
+ color = czm_gammaCorrect(color);
+
+ material.diffuse = color.rgb;
+ material.alpha = color.a;
+
+ return material;
+}
+`, WaterMaskMaterial = `uniform vec4 waterColor;
+uniform vec4 landColor;
+
+czm_material czm_getMaterial(czm_materialInput materialInput)
+{
+ czm_material material = czm_getDefaultMaterial(materialInput);
+
+ vec4 outColor = mix(landColor, waterColor, materialInput.waterMask);
+ outColor = czm_gammaCorrect(outColor);
+
+ material.diffuse = outColor.rgb;
+ material.alpha = outColor.a;
+
+ return material;
+}
+`, WaterMaterial = `// Thanks for the contribution Jonas
+// http://29a.ch/2012/7/19/webgl-terrain-rendering-water-fog
+
+uniform sampler2D specularMap;
+uniform sampler2D normalMap;
+uniform vec4 baseWaterColor;
+uniform vec4 blendColor;
+uniform float frequency;
+uniform float animationSpeed;
+uniform float amplitude;
+uniform float specularIntensity;
+uniform float fadeFactor;
+
+czm_material czm_getMaterial(czm_materialInput materialInput)
+{
+ czm_material material = czm_getDefaultMaterial(materialInput);
+
+ float time = czm_frameNumber * animationSpeed;
+
+ // fade is a function of the distance from the fragment and the frequency of the waves
+ float fade = max(1.0, (length(materialInput.positionToEyeEC) / 10000000000.0) * frequency * fadeFactor);
+
+ float specularMapValue = texture(specularMap, materialInput.st).r;
+
+ // note: not using directional motion at this time, just set the angle to 0.0;
+ vec4 noise = czm_getWaterNoise(normalMap, materialInput.st * frequency, time, 0.0);
+ vec3 normalTangentSpace = noise.xyz * vec3(1.0, 1.0, (1.0 / amplitude));
+
+ // fade out the normal perturbation as we move further from the water surface
+ normalTangentSpace.xy /= fade;
+
+ // attempt to fade out the normal perturbation as we approach non water areas (low specular map value)
+ normalTangentSpace = mix(vec3(0.0, 0.0, 50.0), normalTangentSpace, specularMapValue);
+
+ normalTangentSpace = normalize(normalTangentSpace);
+
+ // get ratios for alignment of the new normal vector with a vector perpendicular to the tangent plane
+ float tsPerturbationRatio = clamp(dot(normalTangentSpace, vec3(0.0, 0.0, 1.0)), 0.0, 1.0);
+
+ // fade out water effect as specular map value decreases
+ material.alpha = mix(blendColor.a, baseWaterColor.a, specularMapValue) * specularMapValue;
+
+ // base color is a blend of the water and non-water color based on the value from the specular map
+ // may need a uniform blend factor to better control this
+ material.diffuse = mix(blendColor.rgb, baseWaterColor.rgb, specularMapValue);
+
+ // diffuse highlights are based on how perturbed the normal is
+ material.diffuse += (0.1 * tsPerturbationRatio);
+
+ material.diffuse = material.diffuse;
+
+ material.normal = normalize(materialInput.tangentToEyeMatrix * normalTangentSpace);
+
+ material.specular = specularIntensity;
+ material.shininess = 10.0;
+
+ return material;
+}
+`;
+function Material$4(e) {
+ this.type = void 0, this.shaderSource = void 0, this.materials = void 0, this.uniforms = void 0, this._uniforms = void 0, this.translucent = void 0, this._minificationFilter = defaultValue(
+ e.minificationFilter,
+ TextureMinificationFilter$1.LINEAR
+ ), this._magnificationFilter = defaultValue(
+ e.magnificationFilter,
+ TextureMagnificationFilter$1.LINEAR
+ ), this._strict = void 0, this._template = void 0, this._count = void 0, this._texturePaths = {}, this._loadedImages = [], this._loadedCubeMaps = [], this._textures = {}, this._updateFunctions = [], this._defaultTexture = void 0, initializeMaterial(e, this), Object.defineProperties(this, {
+ type: {
+ value: this.type,
+ writable: !1
+ }
+ }), defined(Material$4._uniformList[this.type]) || (Material$4._uniformList[this.type] = Object.keys(this._uniforms));
+}
+Material$4._uniformList = {};
+Material$4.fromType = function(e, t) {
+ const n = new Material$4({
+ fabric: {
+ type: e
+ }
+ });
+ if (defined(t))
+ for (const i in t)
+ t.hasOwnProperty(i) && (n.uniforms[i] = t[i]);
+ return n;
+};
+Material$4.prototype.isTranslucent = function() {
+ if (defined(this.translucent))
+ return typeof this.translucent == "function" ? this.translucent() : this.translucent;
+ let e = !0;
+ const t = this._translucentFunctions, n = t.length;
+ for (let i = 0; i < n; ++i) {
+ const r = t[i];
+ if (typeof r == "function" ? e = e && r() : e = e && r, !e)
+ break;
+ }
+ return e;
+};
+Material$4.prototype.update = function(e) {
+ this._defaultTexture = e.defaultTexture;
+ let t, n;
+ const i = this._loadedImages;
+ let r = i.length;
+ for (t = 0; t < r; ++t) {
+ const l = i[t];
+ n = l.id;
+ let d = l.image, f;
+ Array.isArray(d) && (f = d.slice(1, d.length).map(function(y) {
+ return y.bufferView;
+ }), d = d[0]);
+ const h = new Sampler({
+ minificationFilter: this._minificationFilter,
+ magnificationFilter: this._magnificationFilter
+ });
+ let p;
+ defined(d.internalFormat) ? p = new Texture({
+ context: e,
+ pixelFormat: d.internalFormat,
+ width: d.width,
+ height: d.height,
+ source: {
+ arrayBufferView: d.bufferView,
+ mipLevels: f
+ },
+ sampler: h
+ }) : p = new Texture({
+ context: e,
+ source: d,
+ sampler: h
+ });
+ const m = this._textures[n];
+ defined(m) && m !== this._defaultTexture && m.destroy(), this._textures[n] = p;
+ const _ = `${n}Dimensions`;
+ if (this.uniforms.hasOwnProperty(_)) {
+ const y = this.uniforms[_];
+ y.x = p._width, y.y = p._height;
+ }
+ }
+ i.length = 0;
+ const o = this._loadedCubeMaps;
+ for (r = o.length, t = 0; t < r; ++t) {
+ const l = o[t];
+ n = l.id;
+ const d = l.images, f = new CubeMap({
+ context: e,
+ source: {
+ positiveX: d[0],
+ negativeX: d[1],
+ positiveY: d[2],
+ negativeY: d[3],
+ positiveZ: d[4],
+ negativeZ: d[5]
+ },
+ sampler: new Sampler({
+ minificationFilter: this._minificationFilter,
+ magnificationFilter: this._magnificationFilter
+ })
+ });
+ this._textures[n] = f;
+ }
+ o.length = 0;
+ const s = this._updateFunctions;
+ for (r = s.length, t = 0; t < r; ++t)
+ s[t](this, e);
+ const c = this.materials;
+ for (const l in c)
+ c.hasOwnProperty(l) && c[l].update(e);
+};
+Material$4.prototype.isDestroyed = function() {
+ return !1;
+};
+Material$4.prototype.destroy = function() {
+ const e = this._textures;
+ for (const n in e)
+ if (e.hasOwnProperty(n)) {
+ const i = e[n];
+ i !== this._defaultTexture && i.destroy();
+ }
+ const t = this.materials;
+ for (const n in t)
+ t.hasOwnProperty(n) && t[n].destroy();
+ return destroyObject(this);
+};
+function initializeMaterial(e, t) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), t._strict = defaultValue(e.strict, !1), t._count = defaultValue(e.count, 0), t._template = clone$1(
+ defaultValue(e.fabric, defaultValue.EMPTY_OBJECT)
+ ), t._template.uniforms = clone$1(
+ defaultValue(t._template.uniforms, defaultValue.EMPTY_OBJECT)
+ ), t._template.materials = clone$1(
+ defaultValue(t._template.materials, defaultValue.EMPTY_OBJECT)
+ ), t.type = defined(t._template.type) ? t._template.type : createGuid(), t.shaderSource = "", t.materials = {}, t.uniforms = {}, t._uniforms = {}, t._translucentFunctions = [];
+ let n;
+ const i = Material$4._materialCache.getMaterial(t.type);
+ if (defined(i)) {
+ const o = clone$1(i.fabric, !0);
+ t._template = combine$2(t._template, o, !0), n = i.translucent;
+ }
+ checkForTemplateErrors(t), defined(i) || Material$4._materialCache.addMaterial(t.type, t), createMethodDefinition(t), createUniforms(t), createSubMaterials(t);
+ const r = t._translucentFunctions.length === 0 ? !0 : void 0;
+ if (n = defaultValue(n, r), n = defaultValue(e.translucent, n), defined(n))
+ if (typeof n == "function") {
+ const o = function() {
+ return n(t);
+ };
+ t._translucentFunctions.push(o);
+ } else
+ t._translucentFunctions.push(n);
+}
+function checkForValidProperties(e, t, n, i) {
+ if (defined(e)) {
+ for (const r in e)
+ if (e.hasOwnProperty(r)) {
+ const o = t.indexOf(r) !== -1;
+ (i && !o || !i && o) && n(r, t);
+ }
+ }
+}
+function invalidNameError(e, t) {
+}
+function duplicateNameError(e, t) {
+}
+const templateProperties = [
+ "type",
+ "materials",
+ "uniforms",
+ "components",
+ "source"
+], componentProperties = [
+ "diffuse",
+ "specular",
+ "shininess",
+ "normal",
+ "emission",
+ "alpha"
+];
+function checkForTemplateErrors(e) {
+ const t = e._template, n = t.uniforms, i = t.materials, r = t.components;
+ checkForValidProperties(t, templateProperties, invalidNameError, !0), checkForValidProperties(
+ r,
+ componentProperties,
+ invalidNameError,
+ !0
+ );
+ const o = [];
+ for (const s in i)
+ i.hasOwnProperty(s) && o.push(s);
+ checkForValidProperties(n, o, duplicateNameError, !1);
+}
+function isMaterialFused(e, t) {
+ const n = t._template.materials;
+ for (const i in n)
+ if (n.hasOwnProperty(i) && e.indexOf(i) > -1)
+ return !0;
+ return !1;
+}
+function createMethodDefinition(e) {
+ const t = e._template.components, n = e._template.source;
+ if (defined(n))
+ e.shaderSource += `${n}
+`;
+ else {
+ if (e.shaderSource += `czm_material czm_getMaterial(czm_materialInput materialInput)
+{
+`, e.shaderSource += `czm_material material = czm_getDefaultMaterial(materialInput);
+`, defined(t)) {
+ const i = Object.keys(e._template.materials).length > 0;
+ for (const r in t)
+ if (t.hasOwnProperty(r))
+ if (r === "diffuse" || r === "emission") {
+ const s = i && isMaterialFused(t[r], e) ? t[r] : `czm_gammaCorrect(${t[r]})`;
+ e.shaderSource += `material.${r} = ${s};
+`;
+ } else r === "alpha" ? e.shaderSource += `material.alpha = ${t.alpha};
+` : e.shaderSource += `material.${r} = ${t[r]};
+`;
+ }
+ e.shaderSource += `return material;
+}
+`;
+ }
+}
+const matrixMap = {
+ mat2: Matrix2,
+ mat3: Matrix3,
+ mat4: Matrix4
+}, ktx2Regex$2 = /\.ktx2$/i;
+function createTexture2DUpdateFunction(e) {
+ let t;
+ return function(n, i) {
+ const r = n.uniforms, o = r[e], s = t !== o, c = !defined(o) || o === Material$4.DefaultImageId;
+ t = o;
+ let l = n._textures[e], d, f;
+ if (o instanceof HTMLVideoElement) {
+ if (o.readyState >= 2) {
+ if (s && defined(l) && (l !== i.defaultTexture && l.destroy(), l = void 0), !defined(l) || l === i.defaultTexture) {
+ const p = new Sampler({
+ minificationFilter: n._minificationFilter,
+ magnificationFilter: n._magnificationFilter
+ });
+ l = new Texture({
+ context: i,
+ source: o,
+ sampler: p
+ }), n._textures[e] = l;
+ return;
+ }
+ l.copyFrom({
+ source: o
+ });
+ } else defined(l) || (n._textures[e] = i.defaultTexture);
+ return;
+ }
+ if (o instanceof Texture && o !== l) {
+ n._texturePaths[e] = void 0;
+ const p = n._textures[e];
+ defined(p) && p !== n._defaultTexture && p.destroy(), n._textures[e] = o, d = `${e}Dimensions`, r.hasOwnProperty(d) && (f = r[d], f.x = o._width, f.y = o._height);
+ return;
+ }
+ if (s && defined(l) && c && (l !== n._defaultTexture && l.destroy(), l = void 0), defined(l) || (n._texturePaths[e] = void 0, l = n._textures[e] = n._defaultTexture, d = `${e}Dimensions`, r.hasOwnProperty(d) && (f = r[d], f.x = l._width, f.y = l._height)), c)
+ return;
+ const h = o instanceof Resource;
+ if (!defined(n._texturePaths[e]) || h && o.url !== n._texturePaths[e].url || !h && o !== n._texturePaths[e]) {
+ if (typeof o == "string" || h) {
+ const p = h ? o : Resource.createIfNeeded(o);
+ let m;
+ ktx2Regex$2.test(p.url) ? m = loadKTX2(p.url) : m = p.fetchImage(), Promise.resolve(m).then(function(_) {
+ n._loadedImages.push({
+ id: e,
+ image: _
+ });
+ }).catch(function() {
+ defined(l) && l !== n._defaultTexture && l.destroy(), n._textures[e] = n._defaultTexture;
+ });
+ } else (o instanceof HTMLCanvasElement || o instanceof HTMLImageElement) && n._loadedImages.push({
+ id: e,
+ image: o
+ });
+ n._texturePaths[e] = o;
+ }
+ };
+}
+function createCubeMapUpdateFunction(e) {
+ return function(t, n) {
+ const i = t.uniforms[e];
+ if (i instanceof CubeMap) {
+ const o = t._textures[e];
+ o !== t._defaultTexture && o.destroy(), t._texturePaths[e] = void 0, t._textures[e] = i;
+ return;
+ }
+ if (defined(t._textures[e]) || (t._texturePaths[e] = void 0, t._textures[e] = n.defaultCubeMap), i === Material$4.DefaultCubeMapId)
+ return;
+ const r = i.positiveX + i.negativeX + i.positiveY + i.negativeY + i.positiveZ + i.negativeZ;
+ if (r !== t._texturePaths[e]) {
+ const o = [
+ Resource.createIfNeeded(i.positiveX).fetchImage(),
+ Resource.createIfNeeded(i.negativeX).fetchImage(),
+ Resource.createIfNeeded(i.positiveY).fetchImage(),
+ Resource.createIfNeeded(i.negativeY).fetchImage(),
+ Resource.createIfNeeded(i.positiveZ).fetchImage(),
+ Resource.createIfNeeded(i.negativeZ).fetchImage()
+ ];
+ Promise.all(o).then(function(s) {
+ t._loadedCubeMaps.push({
+ id: e,
+ images: s
+ });
+ }), t._texturePaths[e] = r;
+ }
+ };
+}
+function createUniforms(e) {
+ const t = e._template.uniforms;
+ for (const n in t)
+ t.hasOwnProperty(n) && createUniform(e, n);
+}
+function createUniform(e, t) {
+ e._strict;
+ const n = e._template.uniforms, i = n[t], r = getUniformType(i);
+ if (r === "channels")
+ replaceToken(e, t, i, !1);
+ else {
+ if (r === "sampler2D") {
+ const c = `${t}Dimensions`;
+ getNumberOfTokens(e, c) > 0 && (n[c] = {
+ type: "ivec3",
+ x: 1,
+ y: 1
+ }, createUniform(e, c));
+ }
+ if (!new RegExp(
+ `uniform\\s+${r}\\s+${t}\\s*;`
+ ).test(e.shaderSource)) {
+ const c = `uniform ${r} ${t};`;
+ e.shaderSource = c + e.shaderSource;
+ }
+ const s = `${t}_${e._count++}`;
+ if (replaceToken(e, t, s), e.uniforms[t] = i, r === "sampler2D")
+ e._uniforms[s] = function() {
+ return e._textures[t];
+ }, e._updateFunctions.push(createTexture2DUpdateFunction(t));
+ else if (r === "samplerCube")
+ e._uniforms[s] = function() {
+ return e._textures[t];
+ }, e._updateFunctions.push(createCubeMapUpdateFunction(t));
+ else if (r.indexOf("mat") !== -1) {
+ const c = new matrixMap[r]();
+ e._uniforms[s] = function() {
+ return matrixMap[r].fromColumnMajorArray(
+ e.uniforms[t],
+ c
+ );
+ };
+ } else
+ e._uniforms[s] = function() {
+ return e.uniforms[t];
+ };
+ }
+}
+function getUniformType(e) {
+ let t = e.type;
+ if (!defined(t)) {
+ const n = typeof e;
+ if (n === "number")
+ t = "float";
+ else if (n === "boolean")
+ t = "bool";
+ else if (n === "string" || e instanceof Resource || e instanceof HTMLCanvasElement || e instanceof HTMLImageElement)
+ /^([rgba]){1,4}$/i.test(e) ? t = "channels" : e === Material$4.DefaultCubeMapId ? t = "samplerCube" : t = "sampler2D";
+ else if (n === "object")
+ if (Array.isArray(e))
+ (e.length === 4 || e.length === 9 || e.length === 16) && (t = `mat${Math.sqrt(e.length)}`);
+ else {
+ let i = 0;
+ for (const r in e)
+ e.hasOwnProperty(r) && (i += 1);
+ i >= 2 && i <= 4 ? t = `vec${i}` : i === 6 && (t = "samplerCube");
+ }
+ }
+ return t;
+}
+function createSubMaterials(e) {
+ const t = e._strict, n = e._template.materials;
+ for (const i in n)
+ if (n.hasOwnProperty(i)) {
+ const r = new Material$4({
+ strict: t,
+ fabric: n[i],
+ count: e._count
+ });
+ e._count = r._count, e._uniforms = combine$2(
+ e._uniforms,
+ r._uniforms,
+ !0
+ ), e.materials[i] = r, e._translucentFunctions = e._translucentFunctions.concat(
+ r._translucentFunctions
+ );
+ const o = "czm_getMaterial", s = `${o}_${e._count++}`;
+ replaceToken(r, o, s), e.shaderSource = r.shaderSource + e.shaderSource;
+ const c = `${s}(materialInput)`;
+ replaceToken(
+ e,
+ i,
+ c
+ );
+ }
+}
+function replaceToken(e, t, n, i) {
+ i = defaultValue(i, !0);
+ let r = 0;
+ const o = "([\\w])?", s = `([\\w${i ? "." : ""}])?`, c = new RegExp(s + t + o, "g");
+ return e.shaderSource = e.shaderSource.replace(c, function(l, d, f) {
+ return d || f ? l : (r += 1, n);
+ }), r;
+}
+function getNumberOfTokens(e, t, n) {
+ return replaceToken(e, t, t, n);
+}
+Material$4._materialCache = {
+ _materials: {},
+ addMaterial: function(e, t) {
+ this._materials[e] = t;
+ },
+ getMaterial: function(e) {
+ return this._materials[e];
+ }
+};
+Material$4.DefaultImageId = "czm_defaultImage";
+Material$4.DefaultCubeMapId = "czm_defaultCubeMap";
+Material$4.ColorType = "Color";
+Material$4._materialCache.addMaterial(Material$4.ColorType, {
+ fabric: {
+ type: Material$4.ColorType,
+ uniforms: {
+ color: new Color(1, 0, 0, 0.5)
+ },
+ components: {
+ diffuse: "color.rgb",
+ alpha: "color.a"
+ }
+ },
+ translucent: function(e) {
+ return e.uniforms.color.alpha < 1;
+ }
+});
+Material$4.ImageType = "Image";
+Material$4._materialCache.addMaterial(Material$4.ImageType, {
+ fabric: {
+ type: Material$4.ImageType,
+ uniforms: {
+ image: Material$4.DefaultImageId,
+ repeat: new Cartesian2(1, 1),
+ color: new Color(1, 1, 1, 1)
+ },
+ components: {
+ diffuse: "texture(image, fract(repeat * materialInput.st)).rgb * color.rgb",
+ alpha: "texture(image, fract(repeat * materialInput.st)).a * color.a"
+ }
+ },
+ translucent: function(e) {
+ return e.uniforms.color.alpha < 1;
+ }
+});
+Material$4.DiffuseMapType = "DiffuseMap";
+Material$4._materialCache.addMaterial(Material$4.DiffuseMapType, {
+ fabric: {
+ type: Material$4.DiffuseMapType,
+ uniforms: {
+ image: Material$4.DefaultImageId,
+ channels: "rgb",
+ repeat: new Cartesian2(1, 1)
+ },
+ components: {
+ diffuse: "texture(image, fract(repeat * materialInput.st)).channels"
+ }
+ },
+ translucent: !1
+});
+Material$4.AlphaMapType = "AlphaMap";
+Material$4._materialCache.addMaterial(Material$4.AlphaMapType, {
+ fabric: {
+ type: Material$4.AlphaMapType,
+ uniforms: {
+ image: Material$4.DefaultImageId,
+ channel: "a",
+ repeat: new Cartesian2(1, 1)
+ },
+ components: {
+ alpha: "texture(image, fract(repeat * materialInput.st)).channel"
+ }
+ },
+ translucent: !0
+});
+Material$4.SpecularMapType = "SpecularMap";
+Material$4._materialCache.addMaterial(Material$4.SpecularMapType, {
+ fabric: {
+ type: Material$4.SpecularMapType,
+ uniforms: {
+ image: Material$4.DefaultImageId,
+ channel: "r",
+ repeat: new Cartesian2(1, 1)
+ },
+ components: {
+ specular: "texture(image, fract(repeat * materialInput.st)).channel"
+ }
+ },
+ translucent: !1
+});
+Material$4.EmissionMapType = "EmissionMap";
+Material$4._materialCache.addMaterial(Material$4.EmissionMapType, {
+ fabric: {
+ type: Material$4.EmissionMapType,
+ uniforms: {
+ image: Material$4.DefaultImageId,
+ channels: "rgb",
+ repeat: new Cartesian2(1, 1)
+ },
+ components: {
+ emission: "texture(image, fract(repeat * materialInput.st)).channels"
+ }
+ },
+ translucent: !1
+});
+Material$4.BumpMapType = "BumpMap";
+Material$4._materialCache.addMaterial(Material$4.BumpMapType, {
+ fabric: {
+ type: Material$4.BumpMapType,
+ uniforms: {
+ image: Material$4.DefaultImageId,
+ channel: "r",
+ strength: 0.8,
+ repeat: new Cartesian2(1, 1)
+ },
+ source: BumpMapMaterial
+ },
+ translucent: !1
+});
+Material$4.NormalMapType = "NormalMap";
+Material$4._materialCache.addMaterial(Material$4.NormalMapType, {
+ fabric: {
+ type: Material$4.NormalMapType,
+ uniforms: {
+ image: Material$4.DefaultImageId,
+ channels: "rgb",
+ strength: 0.8,
+ repeat: new Cartesian2(1, 1)
+ },
+ source: NormalMapMaterial
+ },
+ translucent: !1
+});
+Material$4.GridType = "Grid";
+Material$4._materialCache.addMaterial(Material$4.GridType, {
+ fabric: {
+ type: Material$4.GridType,
+ uniforms: {
+ color: new Color(0, 1, 0, 1),
+ cellAlpha: 0.1,
+ lineCount: new Cartesian2(8, 8),
+ lineThickness: new Cartesian2(1, 1),
+ lineOffset: new Cartesian2(0, 0)
+ },
+ source: GridMaterial
+ },
+ translucent: function(e) {
+ const t = e.uniforms;
+ return t.color.alpha < 1 || t.cellAlpha < 1;
+ }
+});
+Material$4.StripeType = "Stripe";
+Material$4._materialCache.addMaterial(Material$4.StripeType, {
+ fabric: {
+ type: Material$4.StripeType,
+ uniforms: {
+ horizontal: !0,
+ evenColor: new Color(1, 1, 1, 0.5),
+ oddColor: new Color(0, 0, 1, 0.5),
+ offset: 0,
+ repeat: 5
+ },
+ source: StripeMaterial
+ },
+ translucent: function(e) {
+ const t = e.uniforms;
+ return t.evenColor.alpha < 1 || t.oddColor.alpha < 1;
+ }
+});
+Material$4.CheckerboardType = "Checkerboard";
+Material$4._materialCache.addMaterial(Material$4.CheckerboardType, {
+ fabric: {
+ type: Material$4.CheckerboardType,
+ uniforms: {
+ lightColor: new Color(1, 1, 1, 0.5),
+ darkColor: new Color(0, 0, 0, 0.5),
+ repeat: new Cartesian2(5, 5)
+ },
+ source: CheckerboardMaterial
+ },
+ translucent: function(e) {
+ const t = e.uniforms;
+ return t.lightColor.alpha < 1 || t.darkColor.alpha < 1;
+ }
+});
+Material$4.DotType = "Dot";
+Material$4._materialCache.addMaterial(Material$4.DotType, {
+ fabric: {
+ type: Material$4.DotType,
+ uniforms: {
+ lightColor: new Color(1, 1, 0, 0.75),
+ darkColor: new Color(0, 1, 1, 0.75),
+ repeat: new Cartesian2(5, 5)
+ },
+ source: DotMaterial
+ },
+ translucent: function(e) {
+ const t = e.uniforms;
+ return t.lightColor.alpha < 1 || t.darkColor.alpha < 1;
+ }
+});
+Material$4.WaterType = "Water";
+Material$4._materialCache.addMaterial(Material$4.WaterType, {
+ fabric: {
+ type: Material$4.WaterType,
+ uniforms: {
+ baseWaterColor: new Color(0.2, 0.3, 0.6, 1),
+ blendColor: new Color(0, 1, 0.699, 1),
+ specularMap: Material$4.DefaultImageId,
+ normalMap: Material$4.DefaultImageId,
+ frequency: 10,
+ animationSpeed: 0.01,
+ amplitude: 1,
+ specularIntensity: 0.5,
+ fadeFactor: 1
+ },
+ source: WaterMaterial
+ },
+ translucent: function(e) {
+ const t = e.uniforms;
+ return t.baseWaterColor.alpha < 1 || t.blendColor.alpha < 1;
+ }
+});
+Material$4.RimLightingType = "RimLighting";
+Material$4._materialCache.addMaterial(Material$4.RimLightingType, {
+ fabric: {
+ type: Material$4.RimLightingType,
+ uniforms: {
+ color: new Color(1, 0, 0, 0.7),
+ rimColor: new Color(1, 1, 1, 0.4),
+ width: 0.3
+ },
+ source: RimLightingMaterial
+ },
+ translucent: function(e) {
+ const t = e.uniforms;
+ return t.color.alpha < 1 || t.rimColor.alpha < 1;
+ }
+});
+Material$4.FadeType = "Fade";
+Material$4._materialCache.addMaterial(Material$4.FadeType, {
+ fabric: {
+ type: Material$4.FadeType,
+ uniforms: {
+ fadeInColor: new Color(1, 0, 0, 1),
+ fadeOutColor: new Color(0, 0, 0, 0),
+ maximumDistance: 0.5,
+ repeat: !0,
+ fadeDirection: {
+ x: !0,
+ y: !0
+ },
+ time: new Cartesian2(0.5, 0.5)
+ },
+ source: FadeMaterial
+ },
+ translucent: function(e) {
+ const t = e.uniforms;
+ return t.fadeInColor.alpha < 1 || t.fadeOutColor.alpha < 1;
+ }
+});
+Material$4.PolylineArrowType = "PolylineArrow";
+Material$4._materialCache.addMaterial(Material$4.PolylineArrowType, {
+ fabric: {
+ type: Material$4.PolylineArrowType,
+ uniforms: {
+ color: new Color(1, 1, 1, 1)
+ },
+ source: PolylineArrowMaterial
+ },
+ translucent: !0
+});
+Material$4.PolylineDashType = "PolylineDash";
+Material$4._materialCache.addMaterial(Material$4.PolylineDashType, {
+ fabric: {
+ type: Material$4.PolylineDashType,
+ uniforms: {
+ color: new Color(1, 0, 1, 1),
+ gapColor: new Color(0, 0, 0, 0),
+ dashLength: 16,
+ dashPattern: 255
+ },
+ source: PolylineDashMaterial
+ },
+ translucent: !0
+});
+Material$4.PolylineGlowType = "PolylineGlow";
+Material$4._materialCache.addMaterial(Material$4.PolylineGlowType, {
+ fabric: {
+ type: Material$4.PolylineGlowType,
+ uniforms: {
+ color: new Color(0, 0.5, 1, 1),
+ glowPower: 0.25,
+ taperPower: 1
+ },
+ source: PolylineGlowMaterial
+ },
+ translucent: !0
+});
+Material$4.PolylineOutlineType = "PolylineOutline";
+Material$4._materialCache.addMaterial(Material$4.PolylineOutlineType, {
+ fabric: {
+ type: Material$4.PolylineOutlineType,
+ uniforms: {
+ color: new Color(1, 1, 1, 1),
+ outlineColor: new Color(1, 0, 0, 1),
+ outlineWidth: 1
+ },
+ source: PolylineOutlineMaterial
+ },
+ translucent: function(e) {
+ const t = e.uniforms;
+ return t.color.alpha < 1 || t.outlineColor.alpha < 1;
+ }
+});
+Material$4.ElevationContourType = "ElevationContour";
+Material$4._materialCache.addMaterial(Material$4.ElevationContourType, {
+ fabric: {
+ type: Material$4.ElevationContourType,
+ uniforms: {
+ spacing: 100,
+ color: new Color(1, 0, 0, 1),
+ width: 1
+ },
+ source: ElevationContourMaterial
+ },
+ translucent: !1
+});
+Material$4.ElevationRampType = "ElevationRamp";
+Material$4._materialCache.addMaterial(Material$4.ElevationRampType, {
+ fabric: {
+ type: Material$4.ElevationRampType,
+ uniforms: {
+ image: Material$4.DefaultImageId,
+ minimumHeight: 0,
+ maximumHeight: 1e4
+ },
+ source: ElevationRampMaterial
+ },
+ translucent: !1
+});
+Material$4.SlopeRampMaterialType = "SlopeRamp";
+Material$4._materialCache.addMaterial(Material$4.SlopeRampMaterialType, {
+ fabric: {
+ type: Material$4.SlopeRampMaterialType,
+ uniforms: {
+ image: Material$4.DefaultImageId
+ },
+ source: SlopeRampMaterial
+ },
+ translucent: !1
+});
+Material$4.AspectRampMaterialType = "AspectRamp";
+Material$4._materialCache.addMaterial(Material$4.AspectRampMaterialType, {
+ fabric: {
+ type: Material$4.AspectRampMaterialType,
+ uniforms: {
+ image: Material$4.DefaultImageId
+ },
+ source: AspectRampMaterial
+ },
+ translucent: !1
+});
+Material$4.ElevationBandType = "ElevationBand";
+Material$4._materialCache.addMaterial(Material$4.ElevationBandType, {
+ fabric: {
+ type: Material$4.ElevationBandType,
+ uniforms: {
+ heights: Material$4.DefaultImageId,
+ colors: Material$4.DefaultImageId
+ },
+ source: ElevationBandMaterial
+ },
+ translucent: !0
+});
+Material$4.WaterMaskType = "WaterMask";
+Material$4._materialCache.addMaterial(Material$4.WaterMaskType, {
+ fabric: {
+ type: Material$4.WaterMaskType,
+ source: WaterMaskMaterial,
+ uniforms: {
+ waterColor: new Color(1, 1, 1, 1),
+ landColor: new Color(0, 0, 0, 0)
+ }
+ },
+ translucent: !1
+});
+function MaterialAppearance(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = defaultValue(e.translucent, !0), n = defaultValue(e.closed, !1), i = defaultValue(
+ e.materialSupport,
+ MaterialAppearance.MaterialSupport.TEXTURED
+ );
+ this.material = defined(e.material) ? e.material : Material$4.fromType(Material$4.ColorType), this.translucent = t, this._vertexShaderSource = defaultValue(
+ e.vertexShaderSource,
+ i.vertexShaderSource
+ ), this._fragmentShaderSource = defaultValue(
+ e.fragmentShaderSource,
+ i.fragmentShaderSource
+ ), this._renderState = Appearance.getDefaultRenderState(
+ t,
+ n,
+ e.renderState
+ ), this._closed = n, this._materialSupport = i, this._vertexFormat = i.vertexFormat, this._flat = defaultValue(e.flat, !1), this._faceForward = defaultValue(e.faceForward, !n);
+}
+Object.defineProperties(MaterialAppearance.prototype, {
+ /**
+ * The GLSL source code for the vertex shader.
+ *
+ * @memberof MaterialAppearance.prototype
+ *
+ * @type {string}
+ * @readonly
+ */
+ vertexShaderSource: {
+ get: function() {
+ return this._vertexShaderSource;
+ }
+ },
+ /**
+ * The GLSL source code for the fragment shader. The full fragment shader
+ * source is built procedurally taking into account {@link MaterialAppearance#material},
+ * {@link MaterialAppearance#flat}, and {@link MaterialAppearance#faceForward}.
+ * Use {@link MaterialAppearance#getFragmentShaderSource} to get the full source.
+ *
+ * @memberof MaterialAppearance.prototype
+ *
+ * @type {string}
+ * @readonly
+ */
+ fragmentShaderSource: {
+ get: function() {
+ return this._fragmentShaderSource;
+ }
+ },
+ /**
+ * The WebGL fixed-function state to use when rendering the geometry.
+ * + * The render state can be explicitly defined when constructing a {@link MaterialAppearance} + * instance, or it is set implicitly via {@link MaterialAppearance#translucent} + * and {@link MaterialAppearance#closed}. + *
+ * + * @memberof MaterialAppearance.prototype + * + * @type {object} + * @readonly + */ + renderState: { + get: function() { + return this._renderState; + } + }, + /** + * Whentrue, the geometry is expected to be closed so
+ * {@link MaterialAppearance#renderState} has backface culling enabled.
+ * If the viewer enters the geometry, it will not be visible.
+ *
+ * @memberof MaterialAppearance.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default false
+ */
+ closed: {
+ get: function() {
+ return this._closed;
+ }
+ },
+ /**
+ * The type of materials supported by this instance. This impacts the required
+ * {@link VertexFormat} and the complexity of the vertex and fragment shaders.
+ *
+ * @memberof MaterialAppearance.prototype
+ *
+ * @type {MaterialAppearance.MaterialSupportType}
+ * @readonly
+ *
+ * @default {@link MaterialAppearance.MaterialSupport.TEXTURED}
+ */
+ materialSupport: {
+ get: function() {
+ return this._materialSupport;
+ }
+ },
+ /**
+ * The {@link VertexFormat} that this appearance instance is compatible with.
+ * A geometry can have more vertex attributes and still be compatible - at a
+ * potential performance cost - but it can't have less.
+ *
+ * @memberof MaterialAppearance.prototype
+ *
+ * @type VertexFormat
+ * @readonly
+ *
+ * @default {@link MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat}
+ */
+ vertexFormat: {
+ get: function() {
+ return this._vertexFormat;
+ }
+ },
+ /**
+ * When true, flat shading is used in the fragment shader,
+ * which means lighting is not taking into account.
+ *
+ * @memberof MaterialAppearance.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default false
+ */
+ flat: {
+ get: function() {
+ return this._flat;
+ }
+ },
+ /**
+ * When true, the fragment shader flips the surface normal
+ * as needed to ensure that the normal faces the viewer to avoid
+ * dark spots. This is useful when both sides of a geometry should be
+ * shaded like {@link WallGeometry}.
+ *
+ * @memberof MaterialAppearance.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default true
+ */
+ faceForward: {
+ get: function() {
+ return this._faceForward;
+ }
+ }
+});
+MaterialAppearance.prototype.getFragmentShaderSource = Appearance.prototype.getFragmentShaderSource;
+MaterialAppearance.prototype.isTranslucent = Appearance.prototype.isTranslucent;
+MaterialAppearance.prototype.getRenderState = Appearance.prototype.getRenderState;
+MaterialAppearance.MaterialSupport = {
+ /**
+ * Only basic materials, which require just position and
+ * normal vertex attributes, are supported.
+ *
+ * @type {MaterialAppearance.MaterialSupportType}
+ * @constant
+ */
+ BASIC: Object.freeze({
+ vertexFormat: VertexFormat.POSITION_AND_NORMAL,
+ vertexShaderSource: BasicMaterialAppearanceVS,
+ fragmentShaderSource: BasicMaterialAppearanceFS
+ }),
+ /**
+ * Materials with textures, which require position,
+ * normal, and st vertex attributes,
+ * are supported. The vast majority of materials fall into this category.
+ *
+ * @type {MaterialAppearance.MaterialSupportType}
+ * @constant
+ */
+ TEXTURED: Object.freeze({
+ vertexFormat: VertexFormat.POSITION_NORMAL_AND_ST,
+ vertexShaderSource: TexturedMaterialAppearanceVS,
+ fragmentShaderSource: TexturedMaterialAppearanceFS
+ }),
+ /**
+ * All materials, including those that work in tangent space, are supported.
+ * This requires position, normal, st,
+ * tangent, and bitangent vertex attributes.
+ *
+ * @type {MaterialAppearance.MaterialSupportType}
+ * @constant
+ */
+ ALL: Object.freeze({
+ vertexFormat: VertexFormat.ALL,
+ vertexShaderSource: AllMaterialAppearanceVS,
+ fragmentShaderSource: AllMaterialAppearanceFS
+ })
+};
+const PerInstanceColorAppearanceFS = `in vec3 v_positionEC;
+in vec3 v_normalEC;
+in vec4 v_color;
+
+void main()
+{
+ vec3 positionToEyeEC = -v_positionEC;
+
+ vec3 normalEC = normalize(v_normalEC);
+#ifdef FACE_FORWARD
+ normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
+#endif
+
+ vec4 color = czm_gammaCorrect(v_color);
+
+ czm_materialInput materialInput;
+ materialInput.normalEC = normalEC;
+ materialInput.positionToEyeEC = positionToEyeEC;
+ czm_material material = czm_getDefaultMaterial(materialInput);
+ material.diffuse = color.rgb;
+ material.alpha = color.a;
+
+ out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
+}
+`, PerInstanceColorAppearanceVS = `in vec3 position3DHigh;
+in vec3 position3DLow;
+in vec3 normal;
+in vec4 color;
+in float batchId;
+
+out vec3 v_positionEC;
+out vec3 v_normalEC;
+out vec4 v_color;
+
+void main()
+{
+ vec4 p = czm_computePosition();
+
+ v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
+ v_normalEC = czm_normal * normal; // normal in eye coordinates
+ v_color = color;
+
+ gl_Position = czm_modelViewProjectionRelativeToEye * p;
+}
+`, PerInstanceFlatColorAppearanceFS = `in vec4 v_color;
+
+void main()
+{
+ out_FragColor = czm_gammaCorrect(v_color);
+}
+`, PerInstanceFlatColorAppearanceVS = `in vec3 position3DHigh;
+in vec3 position3DLow;
+in vec4 color;
+in float batchId;
+
+out vec4 v_color;
+
+void main()
+{
+ vec4 p = czm_computePosition();
+
+ v_color = color;
+
+ gl_Position = czm_modelViewProjectionRelativeToEye * p;
+}
+`;
+function PerInstanceColorAppearance(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = defaultValue(e.translucent, !0), n = defaultValue(e.closed, !1), i = defaultValue(e.flat, !1), r = i ? PerInstanceFlatColorAppearanceVS : PerInstanceColorAppearanceVS, o = i ? PerInstanceFlatColorAppearanceFS : PerInstanceColorAppearanceFS, s = i ? PerInstanceColorAppearance.FLAT_VERTEX_FORMAT : PerInstanceColorAppearance.VERTEX_FORMAT;
+ this.material = void 0, this.translucent = t, this._vertexShaderSource = defaultValue(e.vertexShaderSource, r), this._fragmentShaderSource = defaultValue(e.fragmentShaderSource, o), this._renderState = Appearance.getDefaultRenderState(
+ t,
+ n,
+ e.renderState
+ ), this._closed = n, this._vertexFormat = s, this._flat = i, this._faceForward = defaultValue(e.faceForward, !n);
+}
+Object.defineProperties(PerInstanceColorAppearance.prototype, {
+ /**
+ * The GLSL source code for the vertex shader.
+ *
+ * @memberof PerInstanceColorAppearance.prototype
+ *
+ * @type {string}
+ * @readonly
+ */
+ vertexShaderSource: {
+ get: function() {
+ return this._vertexShaderSource;
+ }
+ },
+ /**
+ * The GLSL source code for the fragment shader.
+ *
+ * @memberof PerInstanceColorAppearance.prototype
+ *
+ * @type {string}
+ * @readonly
+ */
+ fragmentShaderSource: {
+ get: function() {
+ return this._fragmentShaderSource;
+ }
+ },
+ /**
+ * The WebGL fixed-function state to use when rendering the geometry.
+ * + * The render state can be explicitly defined when constructing a {@link PerInstanceColorAppearance} + * instance, or it is set implicitly via {@link PerInstanceColorAppearance#translucent} + * and {@link PerInstanceColorAppearance#closed}. + *
+ * + * @memberof PerInstanceColorAppearance.prototype + * + * @type {object} + * @readonly + */ + renderState: { + get: function() { + return this._renderState; + } + }, + /** + * Whentrue, the geometry is expected to be closed so
+ * {@link PerInstanceColorAppearance#renderState} has backface culling enabled.
+ * If the viewer enters the geometry, it will not be visible.
+ *
+ * @memberof PerInstanceColorAppearance.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default false
+ */
+ closed: {
+ get: function() {
+ return this._closed;
+ }
+ },
+ /**
+ * The {@link VertexFormat} that this appearance instance is compatible with.
+ * A geometry can have more vertex attributes and still be compatible - at a
+ * potential performance cost - but it can't have less.
+ *
+ * @memberof PerInstanceColorAppearance.prototype
+ *
+ * @type VertexFormat
+ * @readonly
+ */
+ vertexFormat: {
+ get: function() {
+ return this._vertexFormat;
+ }
+ },
+ /**
+ * When true, flat shading is used in the fragment shader,
+ * which means lighting is not taking into account.
+ *
+ * @memberof PerInstanceColorAppearance.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default false
+ */
+ flat: {
+ get: function() {
+ return this._flat;
+ }
+ },
+ /**
+ * When true, the fragment shader flips the surface normal
+ * as needed to ensure that the normal faces the viewer to avoid
+ * dark spots. This is useful when both sides of a geometry should be
+ * shaded like {@link WallGeometry}.
+ *
+ * @memberof PerInstanceColorAppearance.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default true
+ */
+ faceForward: {
+ get: function() {
+ return this._faceForward;
+ }
+ }
+});
+PerInstanceColorAppearance.VERTEX_FORMAT = VertexFormat.POSITION_AND_NORMAL;
+PerInstanceColorAppearance.FLAT_VERTEX_FORMAT = VertexFormat.POSITION_ONLY;
+PerInstanceColorAppearance.prototype.getFragmentShaderSource = Appearance.prototype.getFragmentShaderSource;
+PerInstanceColorAppearance.prototype.isTranslucent = Appearance.prototype.isTranslucent;
+PerInstanceColorAppearance.prototype.getRenderState = Appearance.prototype.getRenderState;
+function ColorMaterialProperty(e) {
+ this._definitionChanged = new Event(), this._color = void 0, this._colorSubscription = void 0, this.color = e;
+}
+Object.defineProperties(ColorMaterialProperty.prototype, {
+ /**
+ * Gets a value indicating if this property is constant. A property is considered
+ * constant if getValue always returns the same result for the current definition.
+ * @memberof ColorMaterialProperty.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ */
+ isConstant: {
+ get: function() {
+ return Property.isConstant(this._color);
+ }
+ },
+ /**
+ * Gets the event that is raised whenever the definition of this property changes.
+ * The definition is considered to have changed if a call to getValue would return
+ * a different result for the same time.
+ * @memberof ColorMaterialProperty.prototype
+ *
+ * @type {Event}
+ * @readonly
+ */
+ definitionChanged: {
+ get: function() {
+ return this._definitionChanged;
+ }
+ },
+ /**
+ * Gets or sets the {@link Color} {@link Property}.
+ * @memberof ColorMaterialProperty.prototype
+ * @type {Property|undefined}
+ * @default Color.WHITE
+ */
+ color: createPropertyDescriptor("color")
+});
+ColorMaterialProperty.prototype.getType = function(e) {
+ return "Color";
+};
+const timeScratch$r = new JulianDate();
+ColorMaterialProperty.prototype.getValue = function(e, t) {
+ return defined(e) || (e = JulianDate.now(timeScratch$r)), defined(t) || (t = {}), t.color = Property.getValueOrClonedDefault(
+ this._color,
+ e,
+ Color.WHITE,
+ t.color
+ ), t;
+};
+ColorMaterialProperty.prototype.equals = function(e) {
+ return this === e || //
+ e instanceof ColorMaterialProperty && //
+ Property.equals(this._color, e._color);
+};
+function GeographicTilingScheme(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._ellipsoid = defaultValue(e.ellipsoid, Ellipsoid.default), this._rectangle = defaultValue(e.rectangle, Rectangle.MAX_VALUE), this._projection = new GeographicProjection(this._ellipsoid), this._numberOfLevelZeroTilesX = defaultValue(
+ e.numberOfLevelZeroTilesX,
+ 2
+ ), this._numberOfLevelZeroTilesY = defaultValue(
+ e.numberOfLevelZeroTilesY,
+ 1
+ );
+}
+Object.defineProperties(GeographicTilingScheme.prototype, {
+ /**
+ * Gets the ellipsoid that is tiled by this tiling scheme.
+ * @memberof GeographicTilingScheme.prototype
+ * @type {Ellipsoid}
+ */
+ ellipsoid: {
+ get: function() {
+ return this._ellipsoid;
+ }
+ },
+ /**
+ * Gets the rectangle, in radians, covered by this tiling scheme.
+ * @memberof GeographicTilingScheme.prototype
+ * @type {Rectangle}
+ */
+ rectangle: {
+ get: function() {
+ return this._rectangle;
+ }
+ },
+ /**
+ * Gets the map projection used by this tiling scheme.
+ * @memberof GeographicTilingScheme.prototype
+ * @type {MapProjection}
+ */
+ projection: {
+ get: function() {
+ return this._projection;
+ }
+ }
+});
+GeographicTilingScheme.prototype.getNumberOfXTilesAtLevel = function(e) {
+ return this._numberOfLevelZeroTilesX << e;
+};
+GeographicTilingScheme.prototype.getNumberOfYTilesAtLevel = function(e) {
+ return this._numberOfLevelZeroTilesY << e;
+};
+GeographicTilingScheme.prototype.rectangleToNativeRectangle = function(e, t) {
+ const n = CesiumMath.toDegrees(e.west), i = CesiumMath.toDegrees(e.south), r = CesiumMath.toDegrees(e.east), o = CesiumMath.toDegrees(e.north);
+ return defined(t) ? (t.west = n, t.south = i, t.east = r, t.north = o, t) : new Rectangle(n, i, r, o);
+};
+GeographicTilingScheme.prototype.tileXYToNativeRectangle = function(e, t, n, i) {
+ const r = this.tileXYToRectangle(e, t, n, i);
+ return r.west = CesiumMath.toDegrees(r.west), r.south = CesiumMath.toDegrees(r.south), r.east = CesiumMath.toDegrees(r.east), r.north = CesiumMath.toDegrees(r.north), r;
+};
+GeographicTilingScheme.prototype.tileXYToRectangle = function(e, t, n, i) {
+ const r = this._rectangle, o = this.getNumberOfXTilesAtLevel(n), s = this.getNumberOfYTilesAtLevel(n), c = r.width / o, l = e * c + r.west, d = (e + 1) * c + r.west, f = r.height / s, h = r.north - t * f, p = r.north - (t + 1) * f;
+ return defined(i) || (i = new Rectangle(l, p, d, h)), i.west = l, i.south = p, i.east = d, i.north = h, i;
+};
+GeographicTilingScheme.prototype.positionToTileXY = function(e, t, n) {
+ const i = this._rectangle;
+ if (!Rectangle.contains(i, e))
+ return;
+ const r = this.getNumberOfXTilesAtLevel(t), o = this.getNumberOfYTilesAtLevel(t), s = i.width / r, c = i.height / o;
+ let l = e.longitude;
+ i.east < i.west && (l += CesiumMath.TWO_PI);
+ let d = (l - i.west) / s | 0;
+ d >= r && (d = r - 1);
+ let f = (i.north - e.latitude) / c | 0;
+ return f >= o && (f = o - 1), defined(n) ? (n.x = d, n.y = f, n) : new Cartesian2(d, f);
+};
+const scratchDiagonalCartesianNE = new Cartesian3(), scratchDiagonalCartesianSW = new Cartesian3(), scratchDiagonalCartographic = new Cartographic(), scratchCenterCartesian = new Cartesian3(), scratchSurfaceCartesian = new Cartesian3(), scratchBoundingSphere$5 = new BoundingSphere(), tilingScheme = new GeographicTilingScheme(), scratchCorners$1 = [
+ new Cartographic(),
+ new Cartographic(),
+ new Cartographic(),
+ new Cartographic()
+], scratchTileXY = new Cartesian2(), ApproximateTerrainHeights = {};
+ApproximateTerrainHeights.initialize = function() {
+ let e = ApproximateTerrainHeights._initPromise;
+ return defined(e) || (e = Resource.fetchJson(
+ buildModuleUrl("Assets/approximateTerrainHeights.json")
+ ).then(function(t) {
+ ApproximateTerrainHeights._terrainHeights = t;
+ }), ApproximateTerrainHeights._initPromise = e), e;
+};
+ApproximateTerrainHeights.getMinimumMaximumHeights = function(e, t) {
+ t = defaultValue(t, Ellipsoid.default);
+ const n = getTileXYLevel(e);
+ let i = ApproximateTerrainHeights._defaultMinTerrainHeight, r = ApproximateTerrainHeights._defaultMaxTerrainHeight;
+ if (defined(n)) {
+ const o = `${n.level}-${n.x}-${n.y}`, s = ApproximateTerrainHeights._terrainHeights[o];
+ defined(s) && (i = s[0], r = s[1]), t.cartographicToCartesian(
+ Rectangle.northeast(e, scratchDiagonalCartographic),
+ scratchDiagonalCartesianNE
+ ), t.cartographicToCartesian(
+ Rectangle.southwest(e, scratchDiagonalCartographic),
+ scratchDiagonalCartesianSW
+ ), Cartesian3.midpoint(
+ scratchDiagonalCartesianSW,
+ scratchDiagonalCartesianNE,
+ scratchCenterCartesian
+ );
+ const c = t.scaleToGeodeticSurface(
+ scratchCenterCartesian,
+ scratchSurfaceCartesian
+ );
+ if (defined(c)) {
+ const l = Cartesian3.distance(
+ scratchCenterCartesian,
+ c
+ );
+ i = Math.min(i, -l);
+ } else
+ i = ApproximateTerrainHeights._defaultMinTerrainHeight;
+ }
+ return i = Math.max(
+ ApproximateTerrainHeights._defaultMinTerrainHeight,
+ i
+ ), {
+ minimumTerrainHeight: i,
+ maximumTerrainHeight: r
+ };
+};
+ApproximateTerrainHeights.getBoundingSphere = function(e, t) {
+ t = defaultValue(t, Ellipsoid.default);
+ const n = getTileXYLevel(e);
+ let i = ApproximateTerrainHeights._defaultMaxTerrainHeight;
+ if (defined(n)) {
+ const o = `${n.level}-${n.x}-${n.y}`, s = ApproximateTerrainHeights._terrainHeights[o];
+ defined(s) && (i = s[1]);
+ }
+ const r = BoundingSphere.fromRectangle3D(e, t, 0);
+ return BoundingSphere.fromRectangle3D(
+ e,
+ t,
+ i,
+ scratchBoundingSphere$5
+ ), BoundingSphere.union(r, scratchBoundingSphere$5, r);
+};
+function getTileXYLevel(e) {
+ Cartographic.fromRadians(
+ e.east,
+ e.north,
+ 0,
+ scratchCorners$1[0]
+ ), Cartographic.fromRadians(
+ e.west,
+ e.north,
+ 0,
+ scratchCorners$1[1]
+ ), Cartographic.fromRadians(
+ e.east,
+ e.south,
+ 0,
+ scratchCorners$1[2]
+ ), Cartographic.fromRadians(
+ e.west,
+ e.south,
+ 0,
+ scratchCorners$1[3]
+ );
+ let t = 0, n = 0, i = 0, r = 0;
+ const o = ApproximateTerrainHeights._terrainHeightsMaxLevel;
+ let s;
+ for (s = 0; s <= o; ++s) {
+ let c = !1;
+ for (let l = 0; l < 4; ++l) {
+ const d = scratchCorners$1[l];
+ if (tilingScheme.positionToTileXY(d, s, scratchTileXY), l === 0)
+ i = scratchTileXY.x, r = scratchTileXY.y;
+ else if (i !== scratchTileXY.x || r !== scratchTileXY.y) {
+ c = !0;
+ break;
+ }
+ }
+ if (c)
+ break;
+ t = i, n = r;
+ }
+ if (s !== 0)
+ return {
+ x: t,
+ y: n,
+ level: s > o ? o : s - 1
+ };
+}
+ApproximateTerrainHeights._terrainHeightsMaxLevel = 6;
+ApproximateTerrainHeights._defaultMaxTerrainHeight = 9e3;
+ApproximateTerrainHeights._defaultMinTerrainHeight = -1e5;
+ApproximateTerrainHeights._terrainHeights = void 0;
+ApproximateTerrainHeights._initPromise = void 0;
+Object.defineProperties(ApproximateTerrainHeights, {
+ /**
+ * Determines if the terrain heights are initialized and ready to use. To initialize the terrain heights,
+ * call {@link ApproximateTerrainHeights#initialize} and wait for the returned promise to resolve.
+ * @type {boolean}
+ * @readonly
+ * @memberof ApproximateTerrainHeights
+ */
+ initialized: {
+ get: function() {
+ return defined(ApproximateTerrainHeights._terrainHeights);
+ }
+ }
+});
+function AxisAlignedBoundingBox(e, t, n) {
+ this.minimum = Cartesian3.clone(defaultValue(e, Cartesian3.ZERO)), this.maximum = Cartesian3.clone(defaultValue(t, Cartesian3.ZERO)), defined(n) ? n = Cartesian3.clone(n) : n = Cartesian3.midpoint(this.minimum, this.maximum, new Cartesian3()), this.center = n;
+}
+AxisAlignedBoundingBox.fromCorners = function(e, t, n) {
+ return defined(n) || (n = new AxisAlignedBoundingBox()), n.minimum = Cartesian3.clone(e, n.minimum), n.maximum = Cartesian3.clone(t, n.maximum), n.center = Cartesian3.midpoint(e, t, n.center), n;
+};
+AxisAlignedBoundingBox.fromPoints = function(e, t) {
+ if (defined(t) || (t = new AxisAlignedBoundingBox()), !defined(e) || e.length === 0)
+ return t.minimum = Cartesian3.clone(Cartesian3.ZERO, t.minimum), t.maximum = Cartesian3.clone(Cartesian3.ZERO, t.maximum), t.center = Cartesian3.clone(Cartesian3.ZERO, t.center), t;
+ let n = e[0].x, i = e[0].y, r = e[0].z, o = e[0].x, s = e[0].y, c = e[0].z;
+ const l = e.length;
+ for (let h = 1; h < l; h++) {
+ const p = e[h], m = p.x, _ = p.y, y = p.z;
+ n = Math.min(m, n), o = Math.max(m, o), i = Math.min(_, i), s = Math.max(_, s), r = Math.min(y, r), c = Math.max(y, c);
+ }
+ const d = t.minimum;
+ d.x = n, d.y = i, d.z = r;
+ const f = t.maximum;
+ return f.x = o, f.y = s, f.z = c, t.center = Cartesian3.midpoint(d, f, t.center), t;
+};
+AxisAlignedBoundingBox.clone = function(e, t) {
+ if (defined(e))
+ return defined(t) ? (t.minimum = Cartesian3.clone(e.minimum, t.minimum), t.maximum = Cartesian3.clone(e.maximum, t.maximum), t.center = Cartesian3.clone(e.center, t.center), t) : new AxisAlignedBoundingBox(e.minimum, e.maximum, e.center);
+};
+AxisAlignedBoundingBox.equals = function(e, t) {
+ return e === t || defined(e) && defined(t) && Cartesian3.equals(e.center, t.center) && Cartesian3.equals(e.minimum, t.minimum) && Cartesian3.equals(e.maximum, t.maximum);
+};
+let intersectScratch = new Cartesian3();
+AxisAlignedBoundingBox.intersectPlane = function(e, t) {
+ intersectScratch = Cartesian3.subtract(
+ e.maximum,
+ e.minimum,
+ intersectScratch
+ );
+ const n = Cartesian3.multiplyByScalar(
+ intersectScratch,
+ 0.5,
+ intersectScratch
+ ), i = t.normal, r = n.x * Math.abs(i.x) + n.y * Math.abs(i.y) + n.z * Math.abs(i.z), o = Cartesian3.dot(e.center, i) + t.distance;
+ return o - r > 0 ? Intersect$1.INSIDE : o + r < 0 ? Intersect$1.OUTSIDE : Intersect$1.INTERSECTING;
+};
+AxisAlignedBoundingBox.prototype.clone = function(e) {
+ return AxisAlignedBoundingBox.clone(this, e);
+};
+AxisAlignedBoundingBox.prototype.intersectPlane = function(e) {
+ return AxisAlignedBoundingBox.intersectPlane(this, e);
+};
+AxisAlignedBoundingBox.prototype.equals = function(e) {
+ return AxisAlignedBoundingBox.equals(this, e);
+};
+const QuadraticRealPolynomial = {};
+QuadraticRealPolynomial.computeDiscriminant = function(e, t, n) {
+ return t * t - 4 * e * n;
+};
+function addWithCancellationCheck$1(e, t, n) {
+ const i = e + t;
+ return CesiumMath.sign(e) !== CesiumMath.sign(t) && Math.abs(i / Math.max(Math.abs(e), Math.abs(t))) < n ? 0 : i;
+}
+QuadraticRealPolynomial.computeRealRoots = function(e, t, n) {
+ let i;
+ if (e === 0)
+ return t === 0 ? [] : [-n / t];
+ if (t === 0) {
+ if (n === 0)
+ return [0, 0];
+ const l = Math.abs(n), d = Math.abs(e);
+ if (l < d && l / d < CesiumMath.EPSILON14)
+ return [0, 0];
+ if (l > d && d / l < CesiumMath.EPSILON14)
+ return [];
+ if (i = -n / e, i < 0)
+ return [];
+ const f = Math.sqrt(i);
+ return [-f, f];
+ } else if (n === 0)
+ return i = -t / e, i < 0 ? [i, 0] : [0, i];
+ const r = t * t, o = 4 * e * n, s = addWithCancellationCheck$1(r, -o, CesiumMath.EPSILON14);
+ if (s < 0)
+ return [];
+ const c = -0.5 * addWithCancellationCheck$1(
+ t,
+ CesiumMath.sign(t) * Math.sqrt(s),
+ CesiumMath.EPSILON14
+ );
+ return t > 0 ? [c / e, n / c] : [n / c, c / e];
+};
+const CubicRealPolynomial = {};
+CubicRealPolynomial.computeDiscriminant = function(e, t, n, i) {
+ const r = e * e, o = t * t, s = n * n, c = i * i;
+ return 18 * e * t * n * i + o * s - 27 * r * c - 4 * (e * s * n + o * t * i);
+};
+function computeRealRoots(e, t, n, i) {
+ const r = e, o = t / 3, s = n / 3, c = i, l = r * s, d = o * c, f = o * o, h = s * s, p = r * s - f, m = r * c - o * s, _ = o * c - h, y = 4 * p * _ - m * m;
+ let C, T;
+ if (y < 0) {
+ let k, $, G;
+ f * d >= l * h ? (k = r, $ = p, G = -2 * o * p + r * m) : (k = c, $ = _, G = -c * m + 2 * s * _);
+ const z = -(G < 0 ? -1 : 1) * Math.abs(k) * Math.sqrt(-y);
+ T = -G + z;
+ const H = T / 2, Q = H < 0 ? -Math.pow(-H, 1 / 3) : Math.pow(H, 1 / 3), ne = T === z ? -Q : -$ / Q;
+ return C = $ <= 0 ? Q + ne : -G / (Q * Q + ne * ne + $), f * d >= l * h ? [(C - o) / r] : [-c / (C + s)];
+ }
+ const x = p, b = -2 * o * p + r * m, S = _, E = -c * m + 2 * s * _, A = Math.sqrt(y), D = Math.sqrt(3) / 2;
+ let P = Math.abs(Math.atan2(r * A, -b) / 3);
+ C = 2 * Math.sqrt(-x);
+ let I = Math.cos(P);
+ T = C * I;
+ let M = C * (-I / 2 - D * Math.sin(P));
+ const R = T + M > 2 * o ? T - o : M - o, L = r, g = R / L;
+ P = Math.abs(Math.atan2(c * A, -E) / 3), C = 2 * Math.sqrt(-S), I = Math.cos(P), T = C * I, M = C * (-I / 2 - D * Math.sin(P));
+ const w = -c, O = T + M < 2 * s ? T + s : M + s, N = w / O, F = L * O, B = -R * O - L * w, V = R * w, U = (s * B - o * V) / (-o * B + s * F);
+ return g <= U ? g <= N ? U <= N ? [g, U, N] : [g, N, U] : [N, g, U] : g <= N ? [U, g, N] : U <= N ? [U, N, g] : [N, U, g];
+}
+CubicRealPolynomial.computeRealRoots = function(e, t, n, i) {
+ let r, o;
+ if (e === 0)
+ return QuadraticRealPolynomial.computeRealRoots(t, n, i);
+ if (t === 0) {
+ if (n === 0) {
+ if (i === 0)
+ return [0, 0, 0];
+ o = -i / e;
+ const s = o < 0 ? -Math.pow(-o, 1 / 3) : Math.pow(o, 1 / 3);
+ return [s, s, s];
+ } else if (i === 0)
+ return r = QuadraticRealPolynomial.computeRealRoots(e, 0, n), r.Length === 0 ? [0] : [r[0], 0, r[1]];
+ return computeRealRoots(e, 0, n, i);
+ } else {
+ if (n === 0)
+ return i === 0 ? (o = -t / e, o < 0 ? [o, 0, 0] : [0, 0, o]) : computeRealRoots(e, t, 0, i);
+ if (i === 0)
+ return r = QuadraticRealPolynomial.computeRealRoots(e, t, n), r.length === 0 ? [0] : r[1] <= 0 ? [r[0], r[1], 0] : r[0] >= 0 ? [0, r[0], r[1]] : [r[0], 0, r[1]];
+ }
+ return computeRealRoots(e, t, n, i);
+};
+const QuarticRealPolynomial = {};
+QuarticRealPolynomial.computeDiscriminant = function(e, t, n, i, r) {
+ const o = e * e, s = o * e, c = t * t, l = c * t, d = n * n, f = d * n, h = i * i, p = h * i, m = r * r, _ = m * r;
+ return c * d * h - 4 * l * p - 4 * e * f * h + 18 * e * t * n * p - 27 * o * h * h + 256 * s * _ + r * (18 * l * n * i - 4 * c * f + 16 * e * d * d - 80 * e * t * d * i - 6 * e * c * h + 144 * o * n * h) + m * (144 * e * c * n - 27 * c * c - 128 * o * d - 192 * o * t * i);
+};
+function original(e, t, n, i) {
+ const r = e * e, o = t - 3 * r / 8, s = n - t * e / 2 + r * e / 8, c = i - n * e / 4 + t * r / 16 - 3 * r * r / 256, l = CubicRealPolynomial.computeRealRoots(
+ 1,
+ 2 * o,
+ o * o - 4 * c,
+ -s * s
+ );
+ if (l.length > 0) {
+ const d = -e / 4, f = l[l.length - 1];
+ if (Math.abs(f) < CesiumMath.EPSILON14) {
+ const h = QuadraticRealPolynomial.computeRealRoots(1, o, c);
+ if (h.length === 2) {
+ const p = h[0], m = h[1];
+ let _;
+ if (p >= 0 && m >= 0) {
+ const y = Math.sqrt(p), C = Math.sqrt(m);
+ return [d - C, d - y, d + y, d + C];
+ } else {
+ if (p >= 0 && m < 0)
+ return _ = Math.sqrt(p), [d - _, d + _];
+ if (p < 0 && m >= 0)
+ return _ = Math.sqrt(m), [d - _, d + _];
+ }
+ }
+ return [];
+ } else if (f > 0) {
+ const h = Math.sqrt(f), p = (o + f - s / h) / 2, m = (o + f + s / h) / 2, _ = QuadraticRealPolynomial.computeRealRoots(1, h, p), y = QuadraticRealPolynomial.computeRealRoots(1, -h, m);
+ return _.length !== 0 ? (_[0] += d, _[1] += d, y.length !== 0 ? (y[0] += d, y[1] += d, _[1] <= y[0] ? [_[0], _[1], y[0], y[1]] : y[1] <= _[0] ? [y[0], y[1], _[0], _[1]] : _[0] >= y[0] && _[1] <= y[1] ? [y[0], _[0], _[1], y[1]] : y[0] >= _[0] && y[1] <= _[1] ? [_[0], y[0], y[1], _[1]] : _[0] > y[0] && _[0] < y[1] ? [y[0], _[0], y[1], _[1]] : [_[0], y[0], _[1], y[1]]) : _) : y.length !== 0 ? (y[0] += d, y[1] += d, y) : [];
+ }
+ }
+ return [];
+}
+function neumark(e, t, n, i) {
+ const r = n * n, o = t * t, s = e * e, c = -2 * t, l = n * e + o - 4 * i, d = s * i - n * t * e + r, f = CubicRealPolynomial.computeRealRoots(1, c, l, d);
+ if (f.length > 0) {
+ const h = f[0], p = t - h, m = p * p, _ = e / 2, y = p / 2, C = m - 4 * i, T = m + 4 * Math.abs(i), x = s - 4 * h, b = s + 4 * Math.abs(h);
+ let S, E;
+ if (h < 0 || C * b < x * T) {
+ const L = Math.sqrt(x);
+ S = L / 2, E = L === 0 ? 0 : (e * y - n) / L;
+ } else {
+ const L = Math.sqrt(C);
+ S = L === 0 ? 0 : (e * y - n) / L, E = L / 2;
+ }
+ let A, D;
+ _ === 0 && S === 0 ? (A = 0, D = 0) : CesiumMath.sign(_) === CesiumMath.sign(S) ? (A = _ + S, D = h / A) : (D = _ - S, A = h / D);
+ let P, I;
+ y === 0 && E === 0 ? (P = 0, I = 0) : CesiumMath.sign(y) === CesiumMath.sign(E) ? (P = y + E, I = i / P) : (I = y - E, P = i / I);
+ const M = QuadraticRealPolynomial.computeRealRoots(1, A, P), R = QuadraticRealPolynomial.computeRealRoots(1, D, I);
+ if (M.length !== 0)
+ return R.length !== 0 ? M[1] <= R[0] ? [M[0], M[1], R[0], R[1]] : R[1] <= M[0] ? [R[0], R[1], M[0], M[1]] : M[0] >= R[0] && M[1] <= R[1] ? [R[0], M[0], M[1], R[1]] : R[0] >= M[0] && R[1] <= M[1] ? [M[0], R[0], R[1], M[1]] : M[0] > R[0] && M[0] < R[1] ? [R[0], M[0], R[1], M[1]] : [M[0], R[0], M[1], R[1]] : M;
+ if (R.length !== 0)
+ return R;
+ }
+ return [];
+}
+QuarticRealPolynomial.computeRealRoots = function(e, t, n, i, r) {
+ if (Math.abs(e) < CesiumMath.EPSILON15)
+ return CubicRealPolynomial.computeRealRoots(t, n, i, r);
+ const o = t / e, s = n / e, c = i / e, l = r / e;
+ let d = o < 0 ? 1 : 0;
+ switch (d += s < 0 ? d + 1 : d, d += c < 0 ? d + 1 : d, d += l < 0 ? d + 1 : d, d) {
+ case 0:
+ return original(o, s, c, l);
+ case 1:
+ return neumark(o, s, c, l);
+ case 2:
+ return neumark(o, s, c, l);
+ case 3:
+ return original(o, s, c, l);
+ case 4:
+ return original(o, s, c, l);
+ case 5:
+ return neumark(o, s, c, l);
+ case 6:
+ return original(o, s, c, l);
+ case 7:
+ return original(o, s, c, l);
+ case 8:
+ return neumark(o, s, c, l);
+ case 9:
+ return original(o, s, c, l);
+ case 10:
+ return original(o, s, c, l);
+ case 11:
+ return neumark(o, s, c, l);
+ case 12:
+ return original(o, s, c, l);
+ case 13:
+ return original(o, s, c, l);
+ case 14:
+ return original(o, s, c, l);
+ case 15:
+ return original(o, s, c, l);
+ default:
+ return;
+ }
+};
+function Ray(e, t) {
+ t = Cartesian3.clone(defaultValue(t, Cartesian3.ZERO)), Cartesian3.equals(t, Cartesian3.ZERO) || Cartesian3.normalize(t, t), this.origin = Cartesian3.clone(defaultValue(e, Cartesian3.ZERO)), this.direction = t;
+}
+Ray.clone = function(e, t) {
+ if (defined(e))
+ return defined(t) ? (t.origin = Cartesian3.clone(e.origin), t.direction = Cartesian3.clone(e.direction), t) : new Ray(e.origin, e.direction);
+};
+Ray.getPoint = function(e, t, n) {
+ return defined(n) || (n = new Cartesian3()), n = Cartesian3.multiplyByScalar(e.direction, t, n), Cartesian3.add(e.origin, n, n);
+};
+const IntersectionTests = {};
+IntersectionTests.rayPlane = function(e, t, n) {
+ defined(n) || (n = new Cartesian3());
+ const i = e.origin, r = e.direction, o = t.normal, s = Cartesian3.dot(o, r);
+ if (Math.abs(s) < CesiumMath.EPSILON15)
+ return;
+ const c = (-t.distance - Cartesian3.dot(o, i)) / s;
+ if (!(c < 0))
+ return n = Cartesian3.multiplyByScalar(r, c, n), Cartesian3.add(i, n, n);
+};
+const scratchEdge0 = new Cartesian3(), scratchEdge1 = new Cartesian3(), scratchPVec = new Cartesian3(), scratchTVec = new Cartesian3(), scratchQVec = new Cartesian3();
+IntersectionTests.rayTriangleParametric = function(e, t, n, i, r) {
+ r = defaultValue(r, !1);
+ const o = e.origin, s = e.direction, c = Cartesian3.subtract(n, t, scratchEdge0), l = Cartesian3.subtract(i, t, scratchEdge1), d = Cartesian3.cross(s, l, scratchPVec), f = Cartesian3.dot(c, d);
+ let h, p, m, _, y;
+ if (r) {
+ if (f < CesiumMath.EPSILON6 || (h = Cartesian3.subtract(o, t, scratchTVec), m = Cartesian3.dot(h, d), m < 0 || m > f) || (p = Cartesian3.cross(h, c, scratchQVec), _ = Cartesian3.dot(s, p), _ < 0 || m + _ > f))
+ return;
+ y = Cartesian3.dot(l, p) / f;
+ } else {
+ if (Math.abs(f) < CesiumMath.EPSILON6)
+ return;
+ const C = 1 / f;
+ if (h = Cartesian3.subtract(o, t, scratchTVec), m = Cartesian3.dot(h, d) * C, m < 0 || m > 1 || (p = Cartesian3.cross(h, c, scratchQVec), _ = Cartesian3.dot(s, p) * C, _ < 0 || m + _ > 1))
+ return;
+ y = Cartesian3.dot(l, p) * C;
+ }
+ return y;
+};
+IntersectionTests.rayTriangle = function(e, t, n, i, r, o) {
+ const s = IntersectionTests.rayTriangleParametric(
+ e,
+ t,
+ n,
+ i,
+ r
+ );
+ if (!(!defined(s) || s < 0))
+ return defined(o) || (o = new Cartesian3()), Cartesian3.multiplyByScalar(e.direction, s, o), Cartesian3.add(e.origin, o, o);
+};
+const scratchLineSegmentTriangleRay = new Ray();
+IntersectionTests.lineSegmentTriangle = function(e, t, n, i, r, o, s) {
+ const c = scratchLineSegmentTriangleRay;
+ Cartesian3.clone(e, c.origin), Cartesian3.subtract(t, e, c.direction), Cartesian3.normalize(c.direction, c.direction);
+ const l = IntersectionTests.rayTriangleParametric(
+ c,
+ n,
+ i,
+ r,
+ o
+ );
+ if (!(!defined(l) || l < 0 || l > Cartesian3.distance(e, t)))
+ return defined(s) || (s = new Cartesian3()), Cartesian3.multiplyByScalar(c.direction, l, s), Cartesian3.add(c.origin, s, s);
+};
+function solveQuadratic(e, t, n, i) {
+ const r = t * t - 4 * e * n;
+ if (r < 0)
+ return;
+ if (r > 0) {
+ const s = 1 / (2 * e), c = Math.sqrt(r), l = (-t + c) * s, d = (-t - c) * s;
+ return l < d ? (i.root0 = l, i.root1 = d) : (i.root0 = d, i.root1 = l), i;
+ }
+ const o = -t / (2 * e);
+ if (o !== 0)
+ return i.root0 = i.root1 = o, i;
+}
+const raySphereRoots = {
+ root0: 0,
+ root1: 0
+};
+function raySphere(e, t, n) {
+ defined(n) || (n = new Interval());
+ const i = e.origin, r = e.direction, o = t.center, s = t.radius * t.radius, c = Cartesian3.subtract(i, o, scratchPVec), l = Cartesian3.dot(r, r), d = 2 * Cartesian3.dot(r, c), f = Cartesian3.magnitudeSquared(c) - s, h = solveQuadratic(l, d, f, raySphereRoots);
+ if (defined(h))
+ return n.start = h.root0, n.stop = h.root1, n;
+}
+IntersectionTests.raySphere = function(e, t, n) {
+ if (n = raySphere(e, t, n), !(!defined(n) || n.stop < 0))
+ return n.start = Math.max(n.start, 0), n;
+};
+const scratchLineSegmentRay = new Ray();
+IntersectionTests.lineSegmentSphere = function(e, t, n, i) {
+ const r = scratchLineSegmentRay;
+ Cartesian3.clone(e, r.origin);
+ const o = Cartesian3.subtract(t, e, r.direction), s = Cartesian3.magnitude(o);
+ if (Cartesian3.normalize(o, o), i = raySphere(r, n, i), !(!defined(i) || i.stop < 0 || i.start > s))
+ return i.start = Math.max(i.start, 0), i.stop = Math.min(i.stop, s), i;
+};
+const scratchQ = new Cartesian3(), scratchW$1 = new Cartesian3();
+IntersectionTests.rayEllipsoid = function(e, t) {
+ const n = t.oneOverRadii, i = Cartesian3.multiplyComponents(n, e.origin, scratchQ), r = Cartesian3.multiplyComponents(
+ n,
+ e.direction,
+ scratchW$1
+ ), o = Cartesian3.magnitudeSquared(i), s = Cartesian3.dot(i, r);
+ let c, l, d, f, h;
+ if (o > 1) {
+ if (s >= 0)
+ return;
+ const p = s * s;
+ if (c = o - 1, l = Cartesian3.magnitudeSquared(r), d = l * c, p < d)
+ return;
+ if (p > d) {
+ f = s * s - d, h = -s + Math.sqrt(f);
+ const _ = h / l, y = c / h;
+ return _ < y ? new Interval(_, y) : {
+ start: y,
+ stop: _
+ };
+ }
+ const m = Math.sqrt(c / l);
+ return new Interval(m, m);
+ } else if (o < 1)
+ return c = o - 1, l = Cartesian3.magnitudeSquared(r), d = l * c, f = s * s - d, h = -s + Math.sqrt(f), new Interval(0, h / l);
+ if (s < 0)
+ return l = Cartesian3.magnitudeSquared(r), new Interval(0, -s / l);
+};
+function addWithCancellationCheck(e, t, n) {
+ const i = e + t;
+ return CesiumMath.sign(e) !== CesiumMath.sign(t) && Math.abs(i / Math.max(Math.abs(e), Math.abs(t))) < n ? 0 : i;
+}
+IntersectionTests.quadraticVectorExpression = function(e, t, n, i, r) {
+ const o = i * i, s = r * r, c = (e[Matrix3.COLUMN1ROW1] - e[Matrix3.COLUMN2ROW2]) * s, l = r * (i * addWithCancellationCheck(
+ e[Matrix3.COLUMN1ROW0],
+ e[Matrix3.COLUMN0ROW1],
+ CesiumMath.EPSILON15
+ ) + t.y), d = e[Matrix3.COLUMN0ROW0] * o + e[Matrix3.COLUMN2ROW2] * s + i * t.x + n, f = s * addWithCancellationCheck(
+ e[Matrix3.COLUMN2ROW1],
+ e[Matrix3.COLUMN1ROW2],
+ CesiumMath.EPSILON15
+ ), h = r * (i * addWithCancellationCheck(e[Matrix3.COLUMN2ROW0], e[Matrix3.COLUMN0ROW2]) + t.z);
+ let p;
+ const m = [];
+ if (h === 0 && f === 0) {
+ if (p = QuadraticRealPolynomial.computeRealRoots(c, l, d), p.length === 0)
+ return m;
+ const P = p[0], I = Math.sqrt(Math.max(1 - P * P, 0));
+ if (m.push(new Cartesian3(i, r * P, r * -I)), m.push(new Cartesian3(i, r * P, r * I)), p.length === 2) {
+ const M = p[1], R = Math.sqrt(Math.max(1 - M * M, 0));
+ m.push(new Cartesian3(i, r * M, r * -R)), m.push(new Cartesian3(i, r * M, r * R));
+ }
+ return m;
+ }
+ const _ = h * h, y = f * f, C = c * c, T = h * f, x = C + y, b = 2 * (l * c + T), S = 2 * d * c + l * l - y + _, E = 2 * (d * l - T), A = d * d - _;
+ if (x === 0 && b === 0 && S === 0 && E === 0)
+ return m;
+ p = QuarticRealPolynomial.computeRealRoots(x, b, S, E, A);
+ const D = p.length;
+ if (D === 0)
+ return m;
+ for (let P = 0; P < D; ++P) {
+ const I = p[P], M = I * I, R = Math.max(1 - M, 0), L = Math.sqrt(R);
+ let g;
+ CesiumMath.sign(c) === CesiumMath.sign(d) ? g = addWithCancellationCheck(
+ c * M + d,
+ l * I,
+ CesiumMath.EPSILON12
+ ) : CesiumMath.sign(d) === CesiumMath.sign(l * I) ? g = addWithCancellationCheck(
+ c * M,
+ l * I + d,
+ CesiumMath.EPSILON12
+ ) : g = addWithCancellationCheck(
+ c * M + l * I,
+ d,
+ CesiumMath.EPSILON12
+ );
+ const w = addWithCancellationCheck(
+ f * I,
+ h,
+ CesiumMath.EPSILON15
+ ), O = g * w;
+ O < 0 ? m.push(new Cartesian3(i, r * I, r * L)) : O > 0 ? m.push(new Cartesian3(i, r * I, r * -L)) : L !== 0 ? (m.push(new Cartesian3(i, r * I, r * -L)), m.push(new Cartesian3(i, r * I, r * L)), ++P) : m.push(new Cartesian3(i, r * I, r * L));
+ }
+ return m;
+};
+const firstAxisScratch = new Cartesian3(), secondAxisScratch = new Cartesian3(), thirdAxisScratch = new Cartesian3(), referenceScratch = new Cartesian3(), bCart = new Cartesian3(), bScratch = new Matrix3(), btScratch = new Matrix3(), diScratch = new Matrix3(), dScratch$1 = new Matrix3(), cScratch = new Matrix3(), tempMatrix = new Matrix3(), aScratch = new Matrix3(), sScratch$1 = new Cartesian3(), closestScratch = new Cartesian3(), surfPointScratch = new Cartographic();
+IntersectionTests.grazingAltitudeLocation = function(e, t) {
+ const n = e.origin, i = e.direction;
+ if (!Cartesian3.equals(n, Cartesian3.ZERO)) {
+ const A = t.geodeticSurfaceNormal(n, firstAxisScratch);
+ if (Cartesian3.dot(i, A) >= 0)
+ return n;
+ }
+ const r = defined(this.rayEllipsoid(e, t)), o = t.transformPositionToScaledSpace(
+ i,
+ firstAxisScratch
+ ), s = Cartesian3.normalize(o, o), c = Cartesian3.mostOrthogonalAxis(o, referenceScratch), l = Cartesian3.normalize(
+ Cartesian3.cross(c, s, secondAxisScratch),
+ secondAxisScratch
+ ), d = Cartesian3.normalize(
+ Cartesian3.cross(s, l, thirdAxisScratch),
+ thirdAxisScratch
+ ), f = bScratch;
+ f[0] = s.x, f[1] = s.y, f[2] = s.z, f[3] = l.x, f[4] = l.y, f[5] = l.z, f[6] = d.x, f[7] = d.y, f[8] = d.z;
+ const h = Matrix3.transpose(f, btScratch), p = Matrix3.fromScale(t.radii, diScratch), m = Matrix3.fromScale(t.oneOverRadii, dScratch$1), _ = cScratch;
+ _[0] = 0, _[1] = -i.z, _[2] = i.y, _[3] = i.z, _[4] = 0, _[5] = -i.x, _[6] = -i.y, _[7] = i.x, _[8] = 0;
+ const y = Matrix3.multiply(
+ Matrix3.multiply(h, m, tempMatrix),
+ _,
+ tempMatrix
+ ), C = Matrix3.multiply(
+ Matrix3.multiply(y, p, aScratch),
+ f,
+ aScratch
+ ), T = Matrix3.multiplyByVector(y, n, bCart), x = IntersectionTests.quadraticVectorExpression(
+ C,
+ Cartesian3.negate(T, firstAxisScratch),
+ 0,
+ 0,
+ 1
+ );
+ let b, S;
+ const E = x.length;
+ if (E > 0) {
+ let A = Cartesian3.clone(Cartesian3.ZERO, closestScratch), D = Number.NEGATIVE_INFINITY;
+ for (let I = 0; I < E; ++I) {
+ b = Matrix3.multiplyByVector(
+ p,
+ Matrix3.multiplyByVector(f, x[I], sScratch$1),
+ sScratch$1
+ );
+ const M = Cartesian3.normalize(
+ Cartesian3.subtract(b, n, referenceScratch),
+ referenceScratch
+ ), R = Cartesian3.dot(M, i);
+ R > D && (D = R, A = Cartesian3.clone(b, A));
+ }
+ const P = t.cartesianToCartographic(
+ A,
+ surfPointScratch
+ );
+ return D = CesiumMath.clamp(D, 0, 1), S = Cartesian3.magnitude(
+ Cartesian3.subtract(A, n, referenceScratch)
+ ) * Math.sqrt(1 - D * D), S = r ? -S : S, P.height = S, t.cartographicToCartesian(P, new Cartesian3());
+ }
+};
+const lineSegmentPlaneDifference = new Cartesian3();
+IntersectionTests.lineSegmentPlane = function(e, t, n, i) {
+ defined(i) || (i = new Cartesian3());
+ const r = Cartesian3.subtract(
+ t,
+ e,
+ lineSegmentPlaneDifference
+ ), o = n.normal, s = Cartesian3.dot(o, r);
+ if (Math.abs(s) < CesiumMath.EPSILON6)
+ return;
+ const c = Cartesian3.dot(o, e), l = -(n.distance + c) / s;
+ if (!(l < 0 || l > 1))
+ return Cartesian3.multiplyByScalar(r, l, i), Cartesian3.add(e, i, i), i;
+};
+IntersectionTests.trianglePlaneIntersection = function(e, t, n, i) {
+ const r = i.normal, o = i.distance, s = Cartesian3.dot(r, e) + o < 0, c = Cartesian3.dot(r, t) + o < 0, l = Cartesian3.dot(r, n) + o < 0;
+ let d = 0;
+ d += s ? 1 : 0, d += c ? 1 : 0, d += l ? 1 : 0;
+ let f, h;
+ if ((d === 1 || d === 2) && (f = new Cartesian3(), h = new Cartesian3()), d === 1) {
+ if (s)
+ return IntersectionTests.lineSegmentPlane(e, t, i, f), IntersectionTests.lineSegmentPlane(e, n, i, h), {
+ positions: [e, t, n, f, h],
+ indices: [
+ // Behind
+ 0,
+ 3,
+ 4,
+ // In front
+ 1,
+ 2,
+ 4,
+ 1,
+ 4,
+ 3
+ ]
+ };
+ if (c)
+ return IntersectionTests.lineSegmentPlane(t, n, i, f), IntersectionTests.lineSegmentPlane(t, e, i, h), {
+ positions: [e, t, n, f, h],
+ indices: [
+ // Behind
+ 1,
+ 3,
+ 4,
+ // In front
+ 2,
+ 0,
+ 4,
+ 2,
+ 4,
+ 3
+ ]
+ };
+ if (l)
+ return IntersectionTests.lineSegmentPlane(n, e, i, f), IntersectionTests.lineSegmentPlane(n, t, i, h), {
+ positions: [e, t, n, f, h],
+ indices: [
+ // Behind
+ 2,
+ 3,
+ 4,
+ // In front
+ 0,
+ 1,
+ 4,
+ 0,
+ 4,
+ 3
+ ]
+ };
+ } else if (d === 2)
+ if (s)
+ if (c) {
+ if (!l)
+ return IntersectionTests.lineSegmentPlane(e, n, i, f), IntersectionTests.lineSegmentPlane(t, n, i, h), {
+ positions: [e, t, n, f, h],
+ indices: [
+ // Behind
+ 0,
+ 1,
+ 4,
+ 0,
+ 4,
+ 3,
+ // In front
+ 2,
+ 3,
+ 4
+ ]
+ };
+ } else return IntersectionTests.lineSegmentPlane(n, t, i, f), IntersectionTests.lineSegmentPlane(e, t, i, h), {
+ positions: [e, t, n, f, h],
+ indices: [
+ // Behind
+ 2,
+ 0,
+ 4,
+ 2,
+ 4,
+ 3,
+ // In front
+ 1,
+ 3,
+ 4
+ ]
+ };
+ else return IntersectionTests.lineSegmentPlane(t, e, i, f), IntersectionTests.lineSegmentPlane(n, e, i, h), {
+ positions: [e, t, n, f, h],
+ indices: [
+ // Behind
+ 1,
+ 2,
+ 4,
+ 1,
+ 4,
+ 3,
+ // In front
+ 0,
+ 3,
+ 4
+ ]
+ };
+};
+const scratchCart4 = new Cartesian4();
+function EllipsoidTangentPlane(e, t) {
+ t = defaultValue(t, Ellipsoid.default), e = t.scaleToGeodeticSurface(e);
+ const n = Transforms.eastNorthUpToFixedFrame(e, t);
+ this._ellipsoid = t, this._origin = e, this._xAxis = Cartesian3.fromCartesian4(
+ Matrix4.getColumn(n, 0, scratchCart4)
+ ), this._yAxis = Cartesian3.fromCartesian4(
+ Matrix4.getColumn(n, 1, scratchCart4)
+ );
+ const i = Cartesian3.fromCartesian4(
+ Matrix4.getColumn(n, 2, scratchCart4)
+ );
+ this._plane = Plane.fromPointNormal(e, i);
+}
+Object.defineProperties(EllipsoidTangentPlane.prototype, {
+ /**
+ * Gets the ellipsoid.
+ * @memberof EllipsoidTangentPlane.prototype
+ * @type {Ellipsoid}
+ */
+ ellipsoid: {
+ get: function() {
+ return this._ellipsoid;
+ }
+ },
+ /**
+ * Gets the origin.
+ * @memberof EllipsoidTangentPlane.prototype
+ * @type {Cartesian3}
+ */
+ origin: {
+ get: function() {
+ return this._origin;
+ }
+ },
+ /**
+ * Gets the plane which is tangent to the ellipsoid.
+ * @memberof EllipsoidTangentPlane.prototype
+ * @readonly
+ * @type {Plane}
+ */
+ plane: {
+ get: function() {
+ return this._plane;
+ }
+ },
+ /**
+ * Gets the local X-axis (east) of the tangent plane.
+ * @memberof EllipsoidTangentPlane.prototype
+ * @readonly
+ * @type {Cartesian3}
+ */
+ xAxis: {
+ get: function() {
+ return this._xAxis;
+ }
+ },
+ /**
+ * Gets the local Y-axis (north) of the tangent plane.
+ * @memberof EllipsoidTangentPlane.prototype
+ * @readonly
+ * @type {Cartesian3}
+ */
+ yAxis: {
+ get: function() {
+ return this._yAxis;
+ }
+ },
+ /**
+ * Gets the local Z-axis (up) of the tangent plane.
+ * @memberof EllipsoidTangentPlane.prototype
+ * @readonly
+ * @type {Cartesian3}
+ */
+ zAxis: {
+ get: function() {
+ return this._plane.normal;
+ }
+ }
+});
+const tmp = new AxisAlignedBoundingBox();
+EllipsoidTangentPlane.fromPoints = function(e, t) {
+ const n = AxisAlignedBoundingBox.fromPoints(e, tmp);
+ return new EllipsoidTangentPlane(n.center, t);
+};
+const scratchProjectPointOntoPlaneRay$1 = new Ray(), scratchProjectPointOntoPlaneCartesian3$1 = new Cartesian3();
+EllipsoidTangentPlane.prototype.projectPointOntoPlane = function(e, t) {
+ const n = scratchProjectPointOntoPlaneRay$1;
+ n.origin = e, Cartesian3.normalize(e, n.direction);
+ let i = IntersectionTests.rayPlane(
+ n,
+ this._plane,
+ scratchProjectPointOntoPlaneCartesian3$1
+ );
+ if (defined(i) || (Cartesian3.negate(n.direction, n.direction), i = IntersectionTests.rayPlane(
+ n,
+ this._plane,
+ scratchProjectPointOntoPlaneCartesian3$1
+ )), defined(i)) {
+ const r = Cartesian3.subtract(
+ i,
+ this._origin,
+ i
+ ), o = Cartesian3.dot(this._xAxis, r), s = Cartesian3.dot(this._yAxis, r);
+ return defined(t) ? (t.x = o, t.y = s, t) : new Cartesian2(o, s);
+ }
+};
+EllipsoidTangentPlane.prototype.projectPointsOntoPlane = function(e, t) {
+ defined(t) || (t = []);
+ let n = 0;
+ const i = e.length;
+ for (let r = 0; r < i; r++) {
+ const o = this.projectPointOntoPlane(e[r], t[n]);
+ defined(o) && (t[n] = o, n++);
+ }
+ return t.length = n, t;
+};
+EllipsoidTangentPlane.prototype.projectPointToNearestOnPlane = function(e, t) {
+ defined(t) || (t = new Cartesian2());
+ const n = scratchProjectPointOntoPlaneRay$1;
+ n.origin = e, Cartesian3.clone(this._plane.normal, n.direction);
+ let i = IntersectionTests.rayPlane(
+ n,
+ this._plane,
+ scratchProjectPointOntoPlaneCartesian3$1
+ );
+ defined(i) || (Cartesian3.negate(n.direction, n.direction), i = IntersectionTests.rayPlane(
+ n,
+ this._plane,
+ scratchProjectPointOntoPlaneCartesian3$1
+ ));
+ const r = Cartesian3.subtract(
+ i,
+ this._origin,
+ i
+ ), o = Cartesian3.dot(this._xAxis, r), s = Cartesian3.dot(this._yAxis, r);
+ return t.x = o, t.y = s, t;
+};
+EllipsoidTangentPlane.prototype.projectPointsToNearestOnPlane = function(e, t) {
+ defined(t) || (t = []);
+ const n = e.length;
+ t.length = n;
+ for (let i = 0; i < n; i++)
+ t[i] = this.projectPointToNearestOnPlane(e[i], t[i]);
+ return t;
+};
+const projectPointsOntoEllipsoidScratch = new Cartesian3();
+EllipsoidTangentPlane.prototype.projectPointOntoEllipsoid = function(e, t) {
+ defined(t) || (t = new Cartesian3());
+ const n = this._ellipsoid, i = this._origin, r = this._xAxis, o = this._yAxis, s = projectPointsOntoEllipsoidScratch;
+ return Cartesian3.multiplyByScalar(r, e.x, s), t = Cartesian3.add(i, s, t), Cartesian3.multiplyByScalar(o, e.y, s), Cartesian3.add(t, s, t), n.scaleToGeocentricSurface(t, t), t;
+};
+EllipsoidTangentPlane.prototype.projectPointsOntoEllipsoid = function(e, t) {
+ const n = e.length;
+ defined(t) ? t.length = n : t = new Array(n);
+ for (let i = 0; i < n; ++i)
+ t[i] = this.projectPointOntoEllipsoid(e[i], t[i]);
+ return t;
+};
+function OrientedBoundingBox(e, t) {
+ this.center = Cartesian3.clone(defaultValue(e, Cartesian3.ZERO)), this.halfAxes = Matrix3.clone(defaultValue(t, Matrix3.ZERO));
+}
+OrientedBoundingBox.packedLength = Cartesian3.packedLength + Matrix3.packedLength;
+OrientedBoundingBox.pack = function(e, t, n) {
+ return n = defaultValue(n, 0), Cartesian3.pack(e.center, t, n), Matrix3.pack(e.halfAxes, t, n + Cartesian3.packedLength), t;
+};
+OrientedBoundingBox.unpack = function(e, t, n) {
+ return t = defaultValue(t, 0), defined(n) || (n = new OrientedBoundingBox()), Cartesian3.unpack(e, t, n.center), Matrix3.unpack(
+ e,
+ t + Cartesian3.packedLength,
+ n.halfAxes
+ ), n;
+};
+const scratchCartesian1$9 = new Cartesian3(), scratchCartesian2$c = new Cartesian3(), scratchCartesian3$d = new Cartesian3(), scratchCartesian4$6 = new Cartesian3(), scratchCartesian5$2 = new Cartesian3(), scratchCartesian6$1 = new Cartesian3(), scratchCovarianceResult = new Matrix3(), scratchEigenResult = {
+ unitary: new Matrix3(),
+ diagonal: new Matrix3()
+};
+OrientedBoundingBox.fromPoints = function(e, t) {
+ if (defined(t) || (t = new OrientedBoundingBox()), !defined(e) || e.length === 0)
+ return t.halfAxes = Matrix3.ZERO, t.center = Cartesian3.ZERO, t;
+ let n;
+ const i = e.length, r = Cartesian3.clone(e[0], scratchCartesian1$9);
+ for (n = 1; n < i; n++)
+ Cartesian3.add(r, e[n], r);
+ const o = 1 / i;
+ Cartesian3.multiplyByScalar(r, o, r);
+ let s = 0, c = 0, l = 0, d = 0, f = 0, h = 0, p;
+ for (n = 0; n < i; n++)
+ p = Cartesian3.subtract(e[n], r, scratchCartesian2$c), s += p.x * p.x, c += p.x * p.y, l += p.x * p.z, d += p.y * p.y, f += p.y * p.z, h += p.z * p.z;
+ s *= o, c *= o, l *= o, d *= o, f *= o, h *= o;
+ const m = scratchCovarianceResult;
+ m[0] = s, m[1] = c, m[2] = l, m[3] = c, m[4] = d, m[5] = f, m[6] = l, m[7] = f, m[8] = h;
+ const _ = Matrix3.computeEigenDecomposition(
+ m,
+ scratchEigenResult
+ ), y = Matrix3.clone(_.unitary, t.halfAxes);
+ let C = Matrix3.getColumn(y, 0, scratchCartesian4$6), T = Matrix3.getColumn(y, 1, scratchCartesian5$2), x = Matrix3.getColumn(y, 2, scratchCartesian6$1), b = -Number.MAX_VALUE, S = -Number.MAX_VALUE, E = -Number.MAX_VALUE, A = Number.MAX_VALUE, D = Number.MAX_VALUE, P = Number.MAX_VALUE;
+ for (n = 0; n < i; n++)
+ p = e[n], b = Math.max(Cartesian3.dot(C, p), b), S = Math.max(Cartesian3.dot(T, p), S), E = Math.max(Cartesian3.dot(x, p), E), A = Math.min(Cartesian3.dot(C, p), A), D = Math.min(Cartesian3.dot(T, p), D), P = Math.min(Cartesian3.dot(x, p), P);
+ C = Cartesian3.multiplyByScalar(C, 0.5 * (A + b), C), T = Cartesian3.multiplyByScalar(T, 0.5 * (D + S), T), x = Cartesian3.multiplyByScalar(x, 0.5 * (P + E), x);
+ const I = Cartesian3.add(C, T, t.center);
+ Cartesian3.add(I, x, I);
+ const M = scratchCartesian3$d;
+ return M.x = b - A, M.y = S - D, M.z = E - P, Cartesian3.multiplyByScalar(M, 0.5, M), Matrix3.multiplyByScale(t.halfAxes, M, t.halfAxes), t;
+};
+const scratchOffset = new Cartesian3(), scratchScale$8 = new Cartesian3();
+function fromPlaneExtents(e, t, n, i, r, o, s, c, l, d, f) {
+ defined(f) || (f = new OrientedBoundingBox());
+ const h = f.halfAxes;
+ Matrix3.setColumn(h, 0, t, h), Matrix3.setColumn(h, 1, n, h), Matrix3.setColumn(h, 2, i, h);
+ let p = scratchOffset;
+ p.x = (r + o) / 2, p.y = (s + c) / 2, p.z = (l + d) / 2;
+ const m = scratchScale$8;
+ m.x = (o - r) / 2, m.y = (c - s) / 2, m.z = (d - l) / 2;
+ const _ = f.center;
+ return p = Matrix3.multiplyByVector(h, p, p), Cartesian3.add(e, p, _), Matrix3.multiplyByScale(h, m, h), f;
+}
+const scratchRectangleCenterCartographic = new Cartographic(), scratchRectangleCenter = new Cartesian3(), scratchPerimeterCartographicNC = new Cartographic(), scratchPerimeterCartographicNW = new Cartographic(), scratchPerimeterCartographicCW = new Cartographic(), scratchPerimeterCartographicSW = new Cartographic(), scratchPerimeterCartographicSC = new Cartographic(), scratchPerimeterCartesianNC = new Cartesian3(), scratchPerimeterCartesianNW = new Cartesian3(), scratchPerimeterCartesianCW = new Cartesian3(), scratchPerimeterCartesianSW = new Cartesian3(), scratchPerimeterCartesianSC = new Cartesian3(), scratchPerimeterProjectedNC = new Cartesian2(), scratchPerimeterProjectedNW = new Cartesian2(), scratchPerimeterProjectedCW = new Cartesian2(), scratchPerimeterProjectedSW = new Cartesian2(), scratchPerimeterProjectedSC = new Cartesian2(), scratchPlaneOrigin = new Cartesian3(), scratchPlaneNormal = new Cartesian3(), scratchPlaneXAxis = new Cartesian3(), scratchHorizonCartesian = new Cartesian3(), scratchHorizonProjected = new Cartesian2(), scratchMaxY = new Cartesian3(), scratchMinY = new Cartesian3(), scratchZ = new Cartesian3(), scratchPlane$1 = new Plane(Cartesian3.UNIT_X, 0);
+OrientedBoundingBox.fromRectangle = function(e, t, n, i, r) {
+ t = defaultValue(t, 0), n = defaultValue(n, 0), i = defaultValue(i, Ellipsoid.default);
+ let o, s, c, l, d, f, h;
+ if (e.width <= CesiumMath.PI) {
+ const D = Rectangle.center(
+ e,
+ scratchRectangleCenterCartographic
+ ), P = i.cartographicToCartesian(
+ D,
+ scratchRectangleCenter
+ ), I = new EllipsoidTangentPlane(P, i);
+ h = I.plane;
+ const M = D.longitude, R = e.south < 0 && e.north > 0 ? 0 : D.latitude, L = Cartographic.fromRadians(
+ M,
+ e.north,
+ n,
+ scratchPerimeterCartographicNC
+ ), g = Cartographic.fromRadians(
+ e.west,
+ e.north,
+ n,
+ scratchPerimeterCartographicNW
+ ), w = Cartographic.fromRadians(
+ e.west,
+ R,
+ n,
+ scratchPerimeterCartographicCW
+ ), O = Cartographic.fromRadians(
+ e.west,
+ e.south,
+ n,
+ scratchPerimeterCartographicSW
+ ), N = Cartographic.fromRadians(
+ M,
+ e.south,
+ n,
+ scratchPerimeterCartographicSC
+ ), F = i.cartographicToCartesian(
+ L,
+ scratchPerimeterCartesianNC
+ );
+ let B = i.cartographicToCartesian(
+ g,
+ scratchPerimeterCartesianNW
+ );
+ const V = i.cartographicToCartesian(
+ w,
+ scratchPerimeterCartesianCW
+ );
+ let U = i.cartographicToCartesian(
+ O,
+ scratchPerimeterCartesianSW
+ );
+ const k = i.cartographicToCartesian(
+ N,
+ scratchPerimeterCartesianSC
+ ), $ = I.projectPointToNearestOnPlane(
+ F,
+ scratchPerimeterProjectedNC
+ ), G = I.projectPointToNearestOnPlane(
+ B,
+ scratchPerimeterProjectedNW
+ ), q = I.projectPointToNearestOnPlane(
+ V,
+ scratchPerimeterProjectedCW
+ ), z = I.projectPointToNearestOnPlane(
+ U,
+ scratchPerimeterProjectedSW
+ ), H = I.projectPointToNearestOnPlane(
+ k,
+ scratchPerimeterProjectedSC
+ );
+ return o = Math.min(
+ G.x,
+ q.x,
+ z.x
+ ), s = -o, l = Math.max(G.y, $.y), c = Math.min(z.y, H.y), g.height = O.height = t, B = i.cartographicToCartesian(
+ g,
+ scratchPerimeterCartesianNW
+ ), U = i.cartographicToCartesian(
+ O,
+ scratchPerimeterCartesianSW
+ ), d = Math.min(
+ Plane.getPointDistance(h, B),
+ Plane.getPointDistance(h, U)
+ ), f = n, fromPlaneExtents(
+ I.origin,
+ I.xAxis,
+ I.yAxis,
+ I.zAxis,
+ o,
+ s,
+ c,
+ l,
+ d,
+ f,
+ r
+ );
+ }
+ const p = e.south > 0, m = e.north < 0, _ = p ? e.south : m ? e.north : 0, y = Rectangle.center(
+ e,
+ scratchRectangleCenterCartographic
+ ).longitude, C = Cartesian3.fromRadians(
+ y,
+ _,
+ n,
+ i,
+ scratchPlaneOrigin
+ );
+ C.z = 0;
+ const x = Math.abs(C.x) < CesiumMath.EPSILON10 && Math.abs(C.y) < CesiumMath.EPSILON10 ? Cartesian3.UNIT_X : Cartesian3.normalize(C, scratchPlaneNormal), b = Cartesian3.UNIT_Z, S = Cartesian3.cross(
+ x,
+ b,
+ scratchPlaneXAxis
+ );
+ h = Plane.fromPointNormal(C, x, scratchPlane$1);
+ const E = Cartesian3.fromRadians(
+ y + CesiumMath.PI_OVER_TWO,
+ _,
+ n,
+ i,
+ scratchHorizonCartesian
+ );
+ s = Cartesian3.dot(
+ Plane.projectPointOntoPlane(
+ h,
+ E,
+ scratchHorizonProjected
+ ),
+ S
+ ), o = -s, l = Cartesian3.fromRadians(
+ 0,
+ e.north,
+ m ? t : n,
+ i,
+ scratchMaxY
+ ).z, c = Cartesian3.fromRadians(
+ 0,
+ e.south,
+ p ? t : n,
+ i,
+ scratchMinY
+ ).z;
+ const A = Cartesian3.fromRadians(
+ e.east,
+ _,
+ n,
+ i,
+ scratchZ
+ );
+ return d = Plane.getPointDistance(h, A), f = 0, fromPlaneExtents(
+ C,
+ S,
+ b,
+ x,
+ o,
+ s,
+ c,
+ l,
+ d,
+ f,
+ r
+ );
+};
+OrientedBoundingBox.fromTransformation = function(e, t) {
+ return defined(t) || (t = new OrientedBoundingBox()), t.center = Matrix4.getTranslation(e, t.center), t.halfAxes = Matrix4.getMatrix3(e, t.halfAxes), t.halfAxes = Matrix3.multiplyByScalar(
+ t.halfAxes,
+ 0.5,
+ t.halfAxes
+ ), t;
+};
+OrientedBoundingBox.clone = function(e, t) {
+ if (defined(e))
+ return defined(t) ? (Cartesian3.clone(e.center, t.center), Matrix3.clone(e.halfAxes, t.halfAxes), t) : new OrientedBoundingBox(e.center, e.halfAxes);
+};
+OrientedBoundingBox.intersectPlane = function(e, t) {
+ const n = e.center, i = t.normal, r = e.halfAxes, o = i.x, s = i.y, c = i.z, l = Math.abs(
+ o * r[Matrix3.COLUMN0ROW0] + s * r[Matrix3.COLUMN0ROW1] + c * r[Matrix3.COLUMN0ROW2]
+ ) + Math.abs(
+ o * r[Matrix3.COLUMN1ROW0] + s * r[Matrix3.COLUMN1ROW1] + c * r[Matrix3.COLUMN1ROW2]
+ ) + Math.abs(
+ o * r[Matrix3.COLUMN2ROW0] + s * r[Matrix3.COLUMN2ROW1] + c * r[Matrix3.COLUMN2ROW2]
+ ), d = Cartesian3.dot(i, n) + t.distance;
+ return d <= -l ? Intersect$1.OUTSIDE : d >= l ? Intersect$1.INSIDE : Intersect$1.INTERSECTING;
+};
+const scratchCartesianU = new Cartesian3(), scratchCartesianV = new Cartesian3(), scratchCartesianW = new Cartesian3(), scratchValidAxis2 = new Cartesian3(), scratchValidAxis3 = new Cartesian3(), scratchPPrime = new Cartesian3();
+OrientedBoundingBox.distanceSquaredTo = function(e, t) {
+ const n = Cartesian3.subtract(t, e.center, scratchOffset), i = e.halfAxes;
+ let r = Matrix3.getColumn(i, 0, scratchCartesianU), o = Matrix3.getColumn(i, 1, scratchCartesianV), s = Matrix3.getColumn(i, 2, scratchCartesianW);
+ const c = Cartesian3.magnitude(r), l = Cartesian3.magnitude(o), d = Cartesian3.magnitude(s);
+ let f = !0, h = !0, p = !0;
+ c > 0 ? Cartesian3.divideByScalar(r, c, r) : f = !1, l > 0 ? Cartesian3.divideByScalar(o, l, o) : h = !1, d > 0 ? Cartesian3.divideByScalar(s, d, s) : p = !1;
+ const m = !f + !h + !p;
+ let _, y, C;
+ if (m === 1) {
+ let S = r;
+ _ = o, y = s, h ? p || (S = s, y = r) : (S = o, _ = r), C = Cartesian3.cross(_, y, scratchValidAxis3), S === r ? r = C : S === o ? o = C : S === s && (s = C);
+ } else if (m === 2) {
+ _ = r, h ? _ = o : p && (_ = s);
+ let S = Cartesian3.UNIT_Y;
+ S.equalsEpsilon(_, CesiumMath.EPSILON3) && (S = Cartesian3.UNIT_X), y = Cartesian3.cross(_, S, scratchValidAxis2), Cartesian3.normalize(y, y), C = Cartesian3.cross(_, y, scratchValidAxis3), Cartesian3.normalize(C, C), _ === r ? (o = y, s = C) : _ === o ? (s = y, r = C) : _ === s && (r = y, o = C);
+ } else m === 3 && (r = Cartesian3.UNIT_X, o = Cartesian3.UNIT_Y, s = Cartesian3.UNIT_Z);
+ const T = scratchPPrime;
+ T.x = Cartesian3.dot(n, r), T.y = Cartesian3.dot(n, o), T.z = Cartesian3.dot(n, s);
+ let x = 0, b;
+ return T.x < -c ? (b = T.x + c, x += b * b) : T.x > c && (b = T.x - c, x += b * b), T.y < -l ? (b = T.y + l, x += b * b) : T.y > l && (b = T.y - l, x += b * b), T.z < -d ? (b = T.z + d, x += b * b) : T.z > d && (b = T.z - d, x += b * b), x;
+};
+const scratchCorner = new Cartesian3(), scratchToCenter$1 = new Cartesian3();
+OrientedBoundingBox.computePlaneDistances = function(e, t, n, i) {
+ defined(i) || (i = new Interval());
+ let r = Number.POSITIVE_INFINITY, o = Number.NEGATIVE_INFINITY;
+ const s = e.center, c = e.halfAxes, l = Matrix3.getColumn(c, 0, scratchCartesianU), d = Matrix3.getColumn(c, 1, scratchCartesianV), f = Matrix3.getColumn(c, 2, scratchCartesianW), h = Cartesian3.add(l, d, scratchCorner);
+ Cartesian3.add(h, f, h), Cartesian3.add(h, s, h);
+ const p = Cartesian3.subtract(h, t, scratchToCenter$1);
+ let m = Cartesian3.dot(n, p);
+ return r = Math.min(m, r), o = Math.max(m, o), Cartesian3.add(s, l, h), Cartesian3.add(h, d, h), Cartesian3.subtract(h, f, h), Cartesian3.subtract(h, t, p), m = Cartesian3.dot(n, p), r = Math.min(m, r), o = Math.max(m, o), Cartesian3.add(s, l, h), Cartesian3.subtract(h, d, h), Cartesian3.add(h, f, h), Cartesian3.subtract(h, t, p), m = Cartesian3.dot(n, p), r = Math.min(m, r), o = Math.max(m, o), Cartesian3.add(s, l, h), Cartesian3.subtract(h, d, h), Cartesian3.subtract(h, f, h), Cartesian3.subtract(h, t, p), m = Cartesian3.dot(n, p), r = Math.min(m, r), o = Math.max(m, o), Cartesian3.subtract(s, l, h), Cartesian3.add(h, d, h), Cartesian3.add(h, f, h), Cartesian3.subtract(h, t, p), m = Cartesian3.dot(n, p), r = Math.min(m, r), o = Math.max(m, o), Cartesian3.subtract(s, l, h), Cartesian3.add(h, d, h), Cartesian3.subtract(h, f, h), Cartesian3.subtract(h, t, p), m = Cartesian3.dot(n, p), r = Math.min(m, r), o = Math.max(m, o), Cartesian3.subtract(s, l, h), Cartesian3.subtract(h, d, h), Cartesian3.add(h, f, h), Cartesian3.subtract(h, t, p), m = Cartesian3.dot(n, p), r = Math.min(m, r), o = Math.max(m, o), Cartesian3.subtract(s, l, h), Cartesian3.subtract(h, d, h), Cartesian3.subtract(h, f, h), Cartesian3.subtract(h, t, p), m = Cartesian3.dot(n, p), r = Math.min(m, r), o = Math.max(m, o), i.start = r, i.stop = o, i;
+};
+const scratchXAxis$1 = new Cartesian3(), scratchYAxis$1 = new Cartesian3(), scratchZAxis$1 = new Cartesian3();
+OrientedBoundingBox.computeCorners = function(e, t) {
+ defined(t) || (t = [
+ new Cartesian3(),
+ new Cartesian3(),
+ new Cartesian3(),
+ new Cartesian3(),
+ new Cartesian3(),
+ new Cartesian3(),
+ new Cartesian3(),
+ new Cartesian3()
+ ]);
+ const n = e.center, i = e.halfAxes, r = Matrix3.getColumn(i, 0, scratchXAxis$1), o = Matrix3.getColumn(i, 1, scratchYAxis$1), s = Matrix3.getColumn(i, 2, scratchZAxis$1);
+ return Cartesian3.clone(n, t[0]), Cartesian3.subtract(t[0], r, t[0]), Cartesian3.subtract(t[0], o, t[0]), Cartesian3.subtract(t[0], s, t[0]), Cartesian3.clone(n, t[1]), Cartesian3.subtract(t[1], r, t[1]), Cartesian3.subtract(t[1], o, t[1]), Cartesian3.add(t[1], s, t[1]), Cartesian3.clone(n, t[2]), Cartesian3.subtract(t[2], r, t[2]), Cartesian3.add(t[2], o, t[2]), Cartesian3.subtract(t[2], s, t[2]), Cartesian3.clone(n, t[3]), Cartesian3.subtract(t[3], r, t[3]), Cartesian3.add(t[3], o, t[3]), Cartesian3.add(t[3], s, t[3]), Cartesian3.clone(n, t[4]), Cartesian3.add(t[4], r, t[4]), Cartesian3.subtract(t[4], o, t[4]), Cartesian3.subtract(t[4], s, t[4]), Cartesian3.clone(n, t[5]), Cartesian3.add(t[5], r, t[5]), Cartesian3.subtract(t[5], o, t[5]), Cartesian3.add(t[5], s, t[5]), Cartesian3.clone(n, t[6]), Cartesian3.add(t[6], r, t[6]), Cartesian3.add(t[6], o, t[6]), Cartesian3.subtract(t[6], s, t[6]), Cartesian3.clone(n, t[7]), Cartesian3.add(t[7], r, t[7]), Cartesian3.add(t[7], o, t[7]), Cartesian3.add(t[7], s, t[7]), t;
+};
+const scratchRotationScale$2 = new Matrix3();
+OrientedBoundingBox.computeTransformation = function(e, t) {
+ defined(t) || (t = new Matrix4());
+ const n = e.center, i = Matrix3.multiplyByUniformScale(
+ e.halfAxes,
+ 2,
+ scratchRotationScale$2
+ );
+ return Matrix4.fromRotationTranslation(i, n, t);
+};
+const scratchBoundingSphere$4 = new BoundingSphere();
+OrientedBoundingBox.isOccluded = function(e, t) {
+ const n = BoundingSphere.fromOrientedBoundingBox(
+ e,
+ scratchBoundingSphere$4
+ );
+ return !t.isBoundingSphereVisible(n);
+};
+OrientedBoundingBox.prototype.intersectPlane = function(e) {
+ return OrientedBoundingBox.intersectPlane(this, e);
+};
+OrientedBoundingBox.prototype.distanceSquaredTo = function(e) {
+ return OrientedBoundingBox.distanceSquaredTo(this, e);
+};
+OrientedBoundingBox.prototype.computePlaneDistances = function(e, t, n) {
+ return OrientedBoundingBox.computePlaneDistances(
+ this,
+ e,
+ t,
+ n
+ );
+};
+OrientedBoundingBox.prototype.computeCorners = function(e) {
+ return OrientedBoundingBox.computeCorners(this, e);
+};
+OrientedBoundingBox.prototype.computeTransformation = function(e) {
+ return OrientedBoundingBox.computeTransformation(this, e);
+};
+OrientedBoundingBox.prototype.isOccluded = function(e) {
+ return OrientedBoundingBox.isOccluded(this, e);
+};
+OrientedBoundingBox.equals = function(e, t) {
+ return e === t || defined(e) && defined(t) && Cartesian3.equals(e.center, t.center) && Matrix3.equals(e.halfAxes, t.halfAxes);
+};
+OrientedBoundingBox.prototype.clone = function(e) {
+ return OrientedBoundingBox.clone(this, e);
+};
+OrientedBoundingBox.prototype.equals = function(e) {
+ return OrientedBoundingBox.equals(this, e);
+};
+const VerticalExaggeration = {};
+VerticalExaggeration.getHeight = function(e, t, n) {
+ return (e - n) * t + n;
+};
+const scratchCartographic$j = new Cartographic();
+VerticalExaggeration.getPosition = function(e, t, n, i, r) {
+ const o = t.cartesianToCartographic(
+ e,
+ scratchCartographic$j
+ );
+ if (!defined(o))
+ return Cartesian3.clone(e, r);
+ const s = VerticalExaggeration.getHeight(
+ o.height,
+ n,
+ i
+ );
+ return Cartesian3.fromRadians(
+ o.longitude,
+ o.latitude,
+ s,
+ t,
+ r
+ );
+};
+const ShadowVolumeAppearanceVS = `in vec3 position3DHigh;
+in vec3 position3DLow;
+in float batchId;
+
+#ifdef EXTRUDED_GEOMETRY
+in vec3 extrudeDirection;
+
+uniform float u_globeMinimumAltitude;
+#endif // EXTRUDED_GEOMETRY
+
+#ifdef PER_INSTANCE_COLOR
+out vec4 v_color;
+#endif // PER_INSTANCE_COLOR
+
+#ifdef TEXTURE_COORDINATES
+#ifdef SPHERICAL
+out vec4 v_sphericalExtents;
+#else // SPHERICAL
+out vec2 v_inversePlaneExtents;
+out vec4 v_westPlane;
+out vec4 v_southPlane;
+#endif // SPHERICAL
+out vec3 v_uvMinAndSphericalLongitudeRotation;
+out vec3 v_uMaxAndInverseDistance;
+out vec3 v_vMaxAndInverseDistance;
+#endif // TEXTURE_COORDINATES
+
+void main()
+{
+ vec4 position = czm_computePosition();
+
+#ifdef EXTRUDED_GEOMETRY
+ float delta = min(u_globeMinimumAltitude, czm_geometricToleranceOverMeter * length(position.xyz));
+ delta *= czm_sceneMode == czm_sceneMode3D ? 1.0 : 0.0;
+
+ //extrudeDirection is zero for the top layer
+ position = position + vec4(extrudeDirection * delta, 0.0);
+#endif
+
+#ifdef TEXTURE_COORDINATES
+#ifdef SPHERICAL
+ v_sphericalExtents = czm_batchTable_sphericalExtents(batchId);
+ v_uvMinAndSphericalLongitudeRotation.z = czm_batchTable_longitudeRotation(batchId);
+#else // SPHERICAL
+#ifdef COLUMBUS_VIEW_2D
+ vec4 planes2D_high = czm_batchTable_planes2D_HIGH(batchId);
+ vec4 planes2D_low = czm_batchTable_planes2D_LOW(batchId);
+
+ // If the primitive is split across the IDL (planes2D_high.x > planes2D_high.w):
+ // - If this vertex is on the east side of the IDL (position3DLow.y > 0.0, comparison with position3DHigh may produce artifacts)
+ // - existing "east" is on the wrong side of the world, far away (planes2D_high/low.w)
+ // - so set "east" as beyond the eastmost extent of the projection (idlSplitNewPlaneHiLow)
+ vec2 idlSplitNewPlaneHiLow = vec2(EAST_MOST_X_HIGH - (WEST_MOST_X_HIGH - planes2D_high.w), EAST_MOST_X_LOW - (WEST_MOST_X_LOW - planes2D_low.w));
+ bool idlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y > 0.0;
+ planes2D_high.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.w);
+ planes2D_low.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.w);
+
+ // - else, if this vertex is on the west side of the IDL (position3DLow.y < 0.0)
+ // - existing "west" is on the wrong side of the world, far away (planes2D_high/low.x)
+ // - so set "west" as beyond the westmost extent of the projection (idlSplitNewPlaneHiLow)
+ idlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y < 0.0;
+ idlSplitNewPlaneHiLow = vec2(WEST_MOST_X_HIGH - (EAST_MOST_X_HIGH - planes2D_high.x), WEST_MOST_X_LOW - (EAST_MOST_X_LOW - planes2D_low.x));
+ planes2D_high.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.x);
+ planes2D_low.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.x);
+
+ vec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.xy), vec3(0.0, planes2D_low.xy))).xyz;
+ vec3 northWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.x, planes2D_high.z), vec3(0.0, planes2D_low.x, planes2D_low.z))).xyz;
+ vec3 southEastCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.w, planes2D_high.y), vec3(0.0, planes2D_low.w, planes2D_low.y))).xyz;
+#else // COLUMBUS_VIEW_2D
+ // 3D case has smaller "plane extents," so planes encoded as a 64 bit position and 2 vec3s for distances/direction
+ vec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(czm_batchTable_southWest_HIGH(batchId), czm_batchTable_southWest_LOW(batchId))).xyz;
+ vec3 northWestCorner = czm_normal * czm_batchTable_northward(batchId) + southWestCorner;
+ vec3 southEastCorner = czm_normal * czm_batchTable_eastward(batchId) + southWestCorner;
+#endif // COLUMBUS_VIEW_2D
+
+ vec3 eastWard = southEastCorner - southWestCorner;
+ float eastExtent = length(eastWard);
+ eastWard /= eastExtent;
+
+ vec3 northWard = northWestCorner - southWestCorner;
+ float northExtent = length(northWard);
+ northWard /= northExtent;
+
+ v_westPlane = vec4(eastWard, -dot(eastWard, southWestCorner));
+ v_southPlane = vec4(northWard, -dot(northWard, southWestCorner));
+ v_inversePlaneExtents = vec2(1.0 / eastExtent, 1.0 / northExtent);
+#endif // SPHERICAL
+ vec4 uvMinAndExtents = czm_batchTable_uvMinAndExtents(batchId);
+ vec4 uMaxVmax = czm_batchTable_uMaxVmax(batchId);
+
+ v_uMaxAndInverseDistance = vec3(uMaxVmax.xy, uvMinAndExtents.z);
+ v_vMaxAndInverseDistance = vec3(uMaxVmax.zw, uvMinAndExtents.w);
+ v_uvMinAndSphericalLongitudeRotation.xy = uvMinAndExtents.xy;
+#endif // TEXTURE_COORDINATES
+
+#ifdef PER_INSTANCE_COLOR
+ v_color = czm_batchTable_color(batchId);
+#endif
+
+ gl_Position = czm_depthClamp(czm_modelViewProjectionRelativeToEye * position);
+}
+`, ShadowVolumeFS = `#ifdef VECTOR_TILE
+uniform vec4 u_highlightColor;
+#endif
+
+void main(void)
+{
+#ifdef VECTOR_TILE
+ out_FragColor = czm_gammaCorrect(u_highlightColor);
+#else
+ out_FragColor = vec4(1.0);
+#endif
+ czm_writeDepthClamp();
+}
+`, ClassificationType = {
+ /**
+ * Only terrain will be classified.
+ *
+ * @type {number}
+ * @constant
+ */
+ TERRAIN: 0,
+ /**
+ * Only 3D Tiles will be classified.
+ *
+ * @type {number}
+ * @constant
+ */
+ CESIUM_3D_TILE: 1,
+ /**
+ * Both terrain and 3D Tiles will be classified.
+ *
+ * @type {number}
+ * @constant
+ */
+ BOTH: 2
+};
+ClassificationType.NUMBER_OF_CLASSIFICATION_TYPES = 3;
+const ClassificationType$1 = Object.freeze(ClassificationType), DepthFunction = {
+ /**
+ * The depth test never passes.
+ *
+ * @type {number}
+ * @constant
+ */
+ NEVER: WebGLConstants$1.NEVER,
+ /**
+ * The depth test passes if the incoming depth is less than the stored depth.
+ *
+ * @type {number}
+ * @constant
+ */
+ LESS: WebGLConstants$1.LESS,
+ /**
+ * The depth test passes if the incoming depth is equal to the stored depth.
+ *
+ * @type {number}
+ * @constant
+ */
+ EQUAL: WebGLConstants$1.EQUAL,
+ /**
+ * The depth test passes if the incoming depth is less than or equal to the stored depth.
+ *
+ * @type {number}
+ * @constant
+ */
+ LESS_OR_EQUAL: WebGLConstants$1.LEQUAL,
+ /**
+ * The depth test passes if the incoming depth is greater than the stored depth.
+ *
+ * @type {number}
+ * @constant
+ */
+ GREATER: WebGLConstants$1.GREATER,
+ /**
+ * The depth test passes if the incoming depth is not equal to the stored depth.
+ *
+ * @type {number}
+ * @constant
+ */
+ NOT_EQUAL: WebGLConstants$1.NOTEQUAL,
+ /**
+ * The depth test passes if the incoming depth is greater than or equal to the stored depth.
+ *
+ * @type {number}
+ * @constant
+ */
+ GREATER_OR_EQUAL: WebGLConstants$1.GEQUAL,
+ /**
+ * The depth test always passes.
+ *
+ * @type {number}
+ * @constant
+ */
+ ALWAYS: WebGLConstants$1.ALWAYS
+}, DepthFunction$1 = Object.freeze(DepthFunction);
+function subdivideArray(e, t) {
+ const n = [], i = e.length;
+ let r = 0;
+ for (; r < i; ) {
+ const o = Math.ceil((i - r) / t--);
+ n.push(e.slice(r, r + o)), r += o;
+ }
+ return n;
+}
+function BatchTable(e, t, n) {
+ if (this._attributes = t, this._numberOfInstances = n, t.length === 0)
+ return;
+ const i = getDatatype(t), r = e.floatingPointTexture, o = i === PixelDatatype$1.FLOAT && !r, s = createOffsets(t, o), c = getStride(s, t, o), l = Math.floor(
+ ContextLimits.maximumTextureSize / c
+ ), d = Math.min(
+ n,
+ l
+ ), f = c * d, h = Math.ceil(n / d), p = 1 / f, m = p * 0.5, _ = 1 / h, y = _ * 0.5;
+ this._textureDimensions = new Cartesian2(f, h), this._textureStep = new Cartesian4(p, m, _, y), this._pixelDatatype = o ? PixelDatatype$1.UNSIGNED_BYTE : i, this._packFloats = o, this._offsets = s, this._stride = c, this._texture = void 0;
+ const C = 4 * f * h;
+ this._batchValues = i === PixelDatatype$1.FLOAT && !o ? new Float32Array(C) : new Uint8Array(C), this._batchValuesDirty = !1;
+}
+Object.defineProperties(BatchTable.prototype, {
+ /**
+ * The attribute descriptions.
+ * @memberOf BatchTable.prototype
+ * @type {Object[]}
+ * @readonly
+ */
+ attributes: {
+ get: function() {
+ return this._attributes;
+ }
+ },
+ /**
+ * The number of instances.
+ * @memberOf BatchTable.prototype
+ * @type {number}
+ * @readonly
+ */
+ numberOfInstances: {
+ get: function() {
+ return this._numberOfInstances;
+ }
+ }
+});
+function getDatatype(e) {
+ let t = !1;
+ const n = e.length;
+ for (let i = 0; i < n; ++i)
+ if (e[i].componentDatatype !== ComponentDatatype$1.UNSIGNED_BYTE) {
+ t = !0;
+ break;
+ }
+ return t ? PixelDatatype$1.FLOAT : PixelDatatype$1.UNSIGNED_BYTE;
+}
+function getAttributeType(e, t) {
+ const n = e[t].componentsPerAttribute;
+ return n === 2 ? Cartesian2 : n === 3 ? Cartesian3 : n === 4 ? Cartesian4 : Number;
+}
+function createOffsets(e, t) {
+ const n = new Array(e.length);
+ let i = 0;
+ const r = e.length;
+ for (let o = 0; o < r; ++o) {
+ const c = e[o].componentDatatype;
+ n[o] = i, c !== ComponentDatatype$1.UNSIGNED_BYTE && t ? i += 4 : ++i;
+ }
+ return n;
+}
+function getStride(e, t, n) {
+ const i = e.length, r = e[i - 1];
+ return t[i - 1].componentDatatype !== ComponentDatatype$1.UNSIGNED_BYTE && n ? r + 4 : r + 1;
+}
+const scratchPackedFloatCartesian4 = new Cartesian4();
+function getPackedFloat(e, t, n) {
+ let i = Cartesian4.unpack(e, t, scratchPackedFloatCartesian4);
+ const r = Cartesian4.unpackFloat(i);
+ i = Cartesian4.unpack(e, t + 4, scratchPackedFloatCartesian4);
+ const o = Cartesian4.unpackFloat(i);
+ i = Cartesian4.unpack(e, t + 8, scratchPackedFloatCartesian4);
+ const s = Cartesian4.unpackFloat(i);
+ i = Cartesian4.unpack(e, t + 12, scratchPackedFloatCartesian4);
+ const c = Cartesian4.unpackFloat(i);
+ return Cartesian4.fromElements(r, o, s, c, n);
+}
+function setPackedAttribute(e, t, n) {
+ let i = Cartesian4.packFloat(e.x, scratchPackedFloatCartesian4);
+ Cartesian4.pack(i, t, n), i = Cartesian4.packFloat(e.y, i), Cartesian4.pack(i, t, n + 4), i = Cartesian4.packFloat(e.z, i), Cartesian4.pack(i, t, n + 8), i = Cartesian4.packFloat(e.w, i), Cartesian4.pack(i, t, n + 12);
+}
+const scratchGetAttributeCartesian4$1 = new Cartesian4();
+BatchTable.prototype.getBatchedAttribute = function(e, t, n) {
+ const i = this._attributes, r = this._offsets[t], s = 4 * this._stride * e + 4 * r;
+ let c;
+ this._packFloats && i[t].componentDatatype !== PixelDatatype$1.UNSIGNED_BYTE ? c = getPackedFloat(
+ this._batchValues,
+ s,
+ scratchGetAttributeCartesian4$1
+ ) : c = Cartesian4.unpack(
+ this._batchValues,
+ s,
+ scratchGetAttributeCartesian4$1
+ );
+ const l = getAttributeType(i, t);
+ return defined(l.fromCartesian4) ? l.fromCartesian4(c, n) : defined(l.clone) ? l.clone(c, n) : c.x;
+};
+const setAttributeScratchValues = [
+ void 0,
+ void 0,
+ new Cartesian2(),
+ new Cartesian3(),
+ new Cartesian4()
+], setAttributeScratchCartesian4 = new Cartesian4();
+BatchTable.prototype.setBatchedAttribute = function(e, t, n) {
+ const i = this._attributes, r = setAttributeScratchValues[i[t].componentsPerAttribute], o = this.getBatchedAttribute(
+ e,
+ t,
+ r
+ ), s = getAttributeType(this._attributes, t);
+ if (defined(s.equals) ? s.equals(o, n) : o === n)
+ return;
+ const l = setAttributeScratchCartesian4;
+ l.x = defined(n.x) ? n.x : n, l.y = defined(n.y) ? n.y : 0, l.z = defined(n.z) ? n.z : 0, l.w = defined(n.w) ? n.w : 0;
+ const d = this._offsets[t], h = 4 * this._stride * e + 4 * d;
+ this._packFloats && i[t].componentDatatype !== PixelDatatype$1.UNSIGNED_BYTE ? setPackedAttribute(l, this._batchValues, h) : Cartesian4.pack(l, this._batchValues, h), this._batchValuesDirty = !0;
+};
+function createTexture$3(e, t) {
+ const n = e._textureDimensions;
+ e._texture = new Texture({
+ context: t,
+ pixelFormat: PixelFormat$1.RGBA,
+ pixelDatatype: e._pixelDatatype,
+ width: n.x,
+ height: n.y,
+ sampler: Sampler.NEAREST,
+ flipY: !1
+ });
+}
+function updateTexture(e) {
+ const t = e._textureDimensions;
+ e._texture.copyFrom({
+ source: {
+ width: t.x,
+ height: t.y,
+ arrayBufferView: e._batchValues
+ }
+ });
+}
+BatchTable.prototype.update = function(e) {
+ defined(this._texture) && !this._batchValuesDirty || this._attributes.length === 0 || (this._batchValuesDirty = !1, defined(this._texture) || createTexture$3(this, e.context), updateTexture(this));
+};
+BatchTable.prototype.getUniformMapCallback = function() {
+ const e = this;
+ return function(t) {
+ return e._attributes.length === 0 ? t : combine$2(t, {
+ batchTexture: function() {
+ return e._texture;
+ },
+ batchTextureDimensions: function() {
+ return e._textureDimensions;
+ },
+ batchTextureStep: function() {
+ return e._textureStep;
+ }
+ });
+ };
+};
+function getGlslComputeSt$1(e) {
+ const t = e._stride;
+ return e._textureDimensions.y === 1 ? `uniform vec4 batchTextureStep;
+vec2 computeSt(float batchId)
+{
+ float stepX = batchTextureStep.x;
+ float centerX = batchTextureStep.y;
+ float numberOfAttributes = float(${t});
+ return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5);
+}
+` : `uniform vec4 batchTextureStep;
+uniform vec2 batchTextureDimensions;
+vec2 computeSt(float batchId)
+{
+ float stepX = batchTextureStep.x;
+ float centerX = batchTextureStep.y;
+ float stepY = batchTextureStep.z;
+ float centerY = batchTextureStep.w;
+ float numberOfAttributes = float(${t});
+ float xId = mod(batchId * numberOfAttributes, batchTextureDimensions.x);
+ float yId = floor(batchId * numberOfAttributes / batchTextureDimensions.x);
+ return vec2(centerX + (xId * stepX), centerY + (yId * stepY));
+}
+`;
+}
+function getComponentType(e) {
+ return e === 1 ? "float" : `vec${e}`;
+}
+function getComponentSwizzle(e) {
+ return e === 1 ? ".x" : e === 2 ? ".xy" : e === 3 ? ".xyz" : "";
+}
+function getGlslAttributeFunction(e, t) {
+ const i = e._attributes[t], r = i.componentsPerAttribute, o = i.functionName, s = getComponentType(r), c = getComponentSwizzle(r), l = e._offsets[t];
+ let d = `${s} ${o}(float batchId)
+{
+ vec2 st = computeSt(batchId);
+ st.x += batchTextureStep.x * float(${l});
+`;
+ return e._packFloats && i.componentDatatype !== PixelDatatype$1.UNSIGNED_BYTE ? d += `vec4 textureValue;
+textureValue.x = czm_unpackFloat(texture(batchTexture, st));
+textureValue.y = czm_unpackFloat(texture(batchTexture, st + vec2(batchTextureStep.x, 0.0)));
+textureValue.z = czm_unpackFloat(texture(batchTexture, st + vec2(batchTextureStep.x * 2.0, 0.0)));
+textureValue.w = czm_unpackFloat(texture(batchTexture, st + vec2(batchTextureStep.x * 3.0, 0.0)));
+` : d += ` vec4 textureValue = texture(batchTexture, st);
+`, d += ` ${s} value = textureValue${c};
+`, e._pixelDatatype === PixelDatatype$1.UNSIGNED_BYTE && i.componentDatatype === ComponentDatatype$1.UNSIGNED_BYTE && !i.normalize ? d += `value *= 255.0;
+` : e._pixelDatatype === PixelDatatype$1.FLOAT && i.componentDatatype === ComponentDatatype$1.UNSIGNED_BYTE && i.normalize && (d += `value /= 255.0;
+`), d += ` return value;
+}
+`, d;
+}
+BatchTable.prototype.getVertexShaderCallback = function() {
+ const e = this._attributes;
+ if (e.length === 0)
+ return function(i) {
+ return i;
+ };
+ let t = `uniform highp sampler2D batchTexture;
+`;
+ t += `${getGlslComputeSt$1(this)}
+`;
+ const n = e.length;
+ for (let i = 0; i < n; ++i)
+ t += getGlslAttributeFunction(this, i);
+ return function(i) {
+ const r = i.indexOf("void main"), o = i.substring(0, r), s = i.substring(r);
+ return `${o}
+${t}
+${s}`;
+ };
+};
+BatchTable.prototype.isDestroyed = function() {
+ return !1;
+};
+BatchTable.prototype.destroy = function() {
+ return this._texture = this._texture && this._texture.destroy(), destroyObject(this);
+};
+const AttributeType = {
+ /**
+ * The attribute is a single component.
+ *
+ * @type {string}
+ * @constant
+ */
+ SCALAR: "SCALAR",
+ /**
+ * The attribute is a two-component vector.
+ *
+ * @type {string}
+ * @constant
+ */
+ VEC2: "VEC2",
+ /**
+ * The attribute is a three-component vector.
+ *
+ * @type {string}
+ * @constant
+ */
+ VEC3: "VEC3",
+ /**
+ * The attribute is a four-component vector.
+ *
+ * @type {string}
+ * @constant
+ */
+ VEC4: "VEC4",
+ /**
+ * The attribute is a 2x2 matrix.
+ *
+ * @type {string}
+ * @constant
+ */
+ MAT2: "MAT2",
+ /**
+ * The attribute is a 3x3 matrix.
+ *
+ * @type {string}
+ * @constant
+ */
+ MAT3: "MAT3",
+ /**
+ * The attribute is a 4x4 matrix.
+ *
+ * @type {string}
+ * @constant
+ */
+ MAT4: "MAT4"
+};
+AttributeType.getMathType = function(e) {
+ switch (e) {
+ case AttributeType.SCALAR:
+ return Number;
+ case AttributeType.VEC2:
+ return Cartesian2;
+ case AttributeType.VEC3:
+ return Cartesian3;
+ case AttributeType.VEC4:
+ return Cartesian4;
+ case AttributeType.MAT2:
+ return Matrix2;
+ case AttributeType.MAT3:
+ return Matrix3;
+ case AttributeType.MAT4:
+ return Matrix4;
+ }
+};
+AttributeType.getNumberOfComponents = function(e) {
+ switch (e) {
+ case AttributeType.SCALAR:
+ return 1;
+ case AttributeType.VEC2:
+ return 2;
+ case AttributeType.VEC3:
+ return 3;
+ case AttributeType.VEC4:
+ case AttributeType.MAT2:
+ return 4;
+ case AttributeType.MAT3:
+ return 9;
+ case AttributeType.MAT4:
+ return 16;
+ }
+};
+AttributeType.getAttributeLocationCount = function(e) {
+ switch (e) {
+ case AttributeType.SCALAR:
+ case AttributeType.VEC2:
+ case AttributeType.VEC3:
+ case AttributeType.VEC4:
+ return 1;
+ case AttributeType.MAT2:
+ return 2;
+ case AttributeType.MAT3:
+ return 3;
+ case AttributeType.MAT4:
+ return 4;
+ }
+};
+AttributeType.getGlslType = function(e) {
+ switch (e) {
+ case AttributeType.SCALAR:
+ return "float";
+ case AttributeType.VEC2:
+ return "vec2";
+ case AttributeType.VEC3:
+ return "vec3";
+ case AttributeType.VEC4:
+ return "vec4";
+ case AttributeType.MAT2:
+ return "mat2";
+ case AttributeType.MAT3:
+ return "mat3";
+ case AttributeType.MAT4:
+ return "mat4";
+ }
+};
+const AttributeType$1 = Object.freeze(AttributeType), RIGHT_SHIFT = 1 / 256, LEFT_SHIFT = 256, AttributeCompression = {};
+AttributeCompression.octEncodeInRange = function(e, t, n) {
+ if (n.x = e.x / (Math.abs(e.x) + Math.abs(e.y) + Math.abs(e.z)), n.y = e.y / (Math.abs(e.x) + Math.abs(e.y) + Math.abs(e.z)), e.z < 0) {
+ const i = n.x, r = n.y;
+ n.x = (1 - Math.abs(r)) * CesiumMath.signNotZero(i), n.y = (1 - Math.abs(i)) * CesiumMath.signNotZero(r);
+ }
+ return n.x = CesiumMath.toSNorm(n.x, t), n.y = CesiumMath.toSNorm(n.y, t), n;
+};
+AttributeCompression.octEncode = function(e, t) {
+ return AttributeCompression.octEncodeInRange(e, 255, t);
+};
+const octEncodeScratch = new Cartesian2(), uint8ForceArray = new Uint8Array(1);
+function forceUint8(e) {
+ return uint8ForceArray[0] = e, uint8ForceArray[0];
+}
+AttributeCompression.octEncodeToCartesian4 = function(e, t) {
+ return AttributeCompression.octEncodeInRange(e, 65535, octEncodeScratch), t.x = forceUint8(octEncodeScratch.x * RIGHT_SHIFT), t.y = forceUint8(octEncodeScratch.x), t.z = forceUint8(octEncodeScratch.y * RIGHT_SHIFT), t.w = forceUint8(octEncodeScratch.y), t;
+};
+AttributeCompression.octDecodeInRange = function(e, t, n, i) {
+ if (i.x = CesiumMath.fromSNorm(e, n), i.y = CesiumMath.fromSNorm(t, n), i.z = 1 - (Math.abs(i.x) + Math.abs(i.y)), i.z < 0) {
+ const r = i.x;
+ i.x = (1 - Math.abs(i.y)) * CesiumMath.signNotZero(r), i.y = (1 - Math.abs(r)) * CesiumMath.signNotZero(i.y);
+ }
+ return Cartesian3.normalize(i, i);
+};
+AttributeCompression.octDecode = function(e, t, n) {
+ return AttributeCompression.octDecodeInRange(e, t, 255, n);
+};
+AttributeCompression.octDecodeFromCartesian4 = function(e, t) {
+ const n = e.x, i = e.y, r = e.z, o = e.w, s = n * LEFT_SHIFT + i, c = r * LEFT_SHIFT + o;
+ return AttributeCompression.octDecodeInRange(s, c, 65535, t);
+};
+AttributeCompression.octPackFloat = function(e) {
+ return 256 * e.x + e.y;
+};
+const scratchEncodeCart2 = new Cartesian2();
+AttributeCompression.octEncodeFloat = function(e) {
+ return AttributeCompression.octEncode(e, scratchEncodeCart2), AttributeCompression.octPackFloat(scratchEncodeCart2);
+};
+AttributeCompression.octDecodeFloat = function(e, t) {
+ const n = e / 256, i = Math.floor(n), r = (n - i) * 256;
+ return AttributeCompression.octDecode(i, r, t);
+};
+AttributeCompression.octPack = function(e, t, n, i) {
+ const r = AttributeCompression.octEncodeFloat(e), o = AttributeCompression.octEncodeFloat(t), s = AttributeCompression.octEncode(n, scratchEncodeCart2);
+ return i.x = 65536 * s.x + r, i.y = 65536 * s.y + o, i;
+};
+AttributeCompression.octUnpack = function(e, t, n, i) {
+ let r = e.x / 65536;
+ const o = Math.floor(r), s = (r - o) * 65536;
+ r = e.y / 65536;
+ const c = Math.floor(r), l = (r - c) * 65536;
+ AttributeCompression.octDecodeFloat(s, t), AttributeCompression.octDecodeFloat(l, n), AttributeCompression.octDecode(o, c, i);
+};
+AttributeCompression.compressTextureCoordinates = function(e) {
+ const t = e.x * 4095 | 0, n = e.y * 4095 | 0;
+ return 4096 * t + n;
+};
+AttributeCompression.decompressTextureCoordinates = function(e, t) {
+ const n = e / 4096, i = Math.floor(n);
+ return t.x = i / 4095, t.y = (e - i * 4096) / 4095, t;
+};
+function zigZagDecode(e) {
+ return e >> 1 ^ -(e & 1);
+}
+AttributeCompression.zigZagDeltaDecode = function(e, t, n) {
+ const i = e.length;
+ let r = 0, o = 0, s = 0;
+ for (let c = 0; c < i; ++c)
+ r += zigZagDecode(e[c]), o += zigZagDecode(t[c]), e[c] = r, t[c] = o, defined(n) && (s += zigZagDecode(n[c]), n[c] = s);
+};
+AttributeCompression.dequantize = function(e, t, n, i) {
+ const r = AttributeType$1.getNumberOfComponents(n);
+ let o;
+ switch (t) {
+ case ComponentDatatype$1.BYTE:
+ o = 127;
+ break;
+ case ComponentDatatype$1.UNSIGNED_BYTE:
+ o = 255;
+ break;
+ case ComponentDatatype$1.SHORT:
+ o = 32767;
+ break;
+ case ComponentDatatype$1.UNSIGNED_SHORT:
+ o = 65535;
+ break;
+ case ComponentDatatype$1.INT:
+ o = 2147483647;
+ break;
+ case ComponentDatatype$1.UNSIGNED_INT:
+ o = 4294967295;
+ break;
+ }
+ const s = new Float32Array(
+ i * r
+ );
+ for (let c = 0; c < i; c++)
+ for (let l = 0; l < r; l++) {
+ const d = c * r + l;
+ s[d] = Math.max(
+ e[d] / o,
+ -1
+ );
+ }
+ return s;
+};
+AttributeCompression.decodeRGB565 = function(e, t) {
+ const n = e.length;
+ defined(t) || (t = new Float32Array(n * 3));
+ const i = 31, r = 63, o = 1 / 31, s = 1 / 63;
+ for (let c = 0; c < n; c++) {
+ const l = e[c], d = l >> 11, f = l >> 5 & r, h = l & i, p = 3 * c;
+ t[p] = d * o, t[p + 1] = f * s, t[p + 2] = h * o;
+ }
+ return t;
+};
+const scratchCartesian1$8 = new Cartesian3(), scratchCartesian2$b = new Cartesian3(), scratchCartesian3$c = new Cartesian3();
+function barycentricCoordinates(e, t, n, i, r) {
+ defined(r) || (r = new Cartesian3());
+ let o, s, c, l, d, f, h, p;
+ if (defined(t.z)) {
+ if (Cartesian3.equalsEpsilon(e, t, CesiumMath.EPSILON14))
+ return Cartesian3.clone(Cartesian3.UNIT_X, r);
+ if (Cartesian3.equalsEpsilon(e, n, CesiumMath.EPSILON14))
+ return Cartesian3.clone(Cartesian3.UNIT_Y, r);
+ if (Cartesian3.equalsEpsilon(e, i, CesiumMath.EPSILON14))
+ return Cartesian3.clone(Cartesian3.UNIT_Z, r);
+ o = Cartesian3.subtract(n, t, scratchCartesian1$8), s = Cartesian3.subtract(i, t, scratchCartesian2$b), c = Cartesian3.subtract(e, t, scratchCartesian3$c), l = Cartesian3.dot(o, o), d = Cartesian3.dot(o, s), f = Cartesian3.dot(o, c), h = Cartesian3.dot(s, s), p = Cartesian3.dot(s, c);
+ } else {
+ if (Cartesian2.equalsEpsilon(e, t, CesiumMath.EPSILON14))
+ return Cartesian3.clone(Cartesian3.UNIT_X, r);
+ if (Cartesian2.equalsEpsilon(e, n, CesiumMath.EPSILON14))
+ return Cartesian3.clone(Cartesian3.UNIT_Y, r);
+ if (Cartesian2.equalsEpsilon(e, i, CesiumMath.EPSILON14))
+ return Cartesian3.clone(Cartesian3.UNIT_Z, r);
+ o = Cartesian2.subtract(n, t, scratchCartesian1$8), s = Cartesian2.subtract(i, t, scratchCartesian2$b), c = Cartesian2.subtract(e, t, scratchCartesian3$c), l = Cartesian2.dot(o, o), d = Cartesian2.dot(o, s), f = Cartesian2.dot(o, c), h = Cartesian2.dot(s, s), p = Cartesian2.dot(s, c);
+ }
+ r.y = h * f - d * p, r.z = l * p - d * f;
+ const m = l * h - d * d;
+ if (m !== 0)
+ return r.y /= m, r.z /= m, r.x = 1 - r.y - r.z, r;
+}
+const Tipsify = {};
+Tipsify.calculateACMR = function(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.indices;
+ let n = e.maximumIndex;
+ const i = defaultValue(e.cacheSize, 24), r = t.length;
+ if (!defined(n)) {
+ n = 0;
+ let c = 0, l = t[c];
+ for (; c < r; )
+ l > n && (n = l), ++c, l = t[c];
+ }
+ const o = [];
+ for (let c = 0; c < n + 1; c++)
+ o[c] = 0;
+ let s = i + 1;
+ for (let c = 0; c < r; ++c)
+ s - o[t[c]] > i && (o[t[c]] = s, ++s);
+ return (s - i + 1) / (r / 3);
+};
+Tipsify.tipsify = function(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.indices, n = e.maximumIndex, i = defaultValue(e.cacheSize, 24);
+ let r;
+ function o(R, L, g, w) {
+ for (; L.length >= 1; ) {
+ const O = L[L.length - 1];
+ if (L.splice(L.length - 1, 1), R[O].numLiveTriangles > 0)
+ return O;
+ }
+ for (; r < w; ) {
+ if (R[r].numLiveTriangles > 0)
+ return ++r, r - 1;
+ ++r;
+ }
+ return -1;
+ }
+ function s(R, L, g, w, O, N, F) {
+ let B = -1, V, U = -1, k = 0;
+ for (; k < g.length; ) {
+ const $ = g[k];
+ w[$].numLiveTriangles && (V = 0, O - w[$].timeStamp + 2 * w[$].numLiveTriangles <= L && (V = O - w[$].timeStamp), (V > U || U === -1) && (U = V, B = $)), ++k;
+ }
+ return B === -1 ? o(w, N, R, F) : B;
+ }
+ const c = t.length;
+ let l = 0, d = 0, f = t[d];
+ const h = c;
+ if (defined(n))
+ l = n + 1;
+ else {
+ for (; d < h; )
+ f > l && (l = f), ++d, f = t[d];
+ if (l === -1)
+ return 0;
+ ++l;
+ }
+ const p = [];
+ let m;
+ for (m = 0; m < l; m++)
+ p[m] = {
+ numLiveTriangles: 0,
+ timeStamp: 0,
+ vertexTriangles: []
+ };
+ d = 0;
+ let _ = 0;
+ for (; d < h; )
+ p[t[d]].vertexTriangles.push(_), ++p[t[d]].numLiveTriangles, p[t[d + 1]].vertexTriangles.push(_), ++p[t[d + 1]].numLiveTriangles, p[t[d + 2]].vertexTriangles.push(_), ++p[t[d + 2]].numLiveTriangles, ++_, d += 3;
+ let y = 0, C = i + 1;
+ r = 1;
+ let T = [];
+ const x = [];
+ let b, S, E = 0;
+ const A = [], D = c / 3, P = [];
+ for (m = 0; m < D; m++)
+ P[m] = !1;
+ let I, M;
+ for (; y !== -1; ) {
+ T = [], S = p[y], M = S.vertexTriangles.length;
+ for (let R = 0; R < M; ++R)
+ if (_ = S.vertexTriangles[R], !P[_]) {
+ P[_] = !0, d = _ + _ + _;
+ for (let L = 0; L < 3; ++L)
+ I = t[d], T.push(I), x.push(I), A[E] = I, ++E, b = p[I], --b.numLiveTriangles, C - b.timeStamp > i && (b.timeStamp = C, ++C), ++d;
+ }
+ y = s(
+ t,
+ i,
+ T,
+ p,
+ C,
+ x,
+ l
+ );
+ }
+ return A;
+};
+const GeometryPipeline = {};
+function addTriangle(e, t, n, i, r) {
+ e[t++] = n, e[t++] = i, e[t++] = i, e[t++] = r, e[t++] = r, e[t] = n;
+}
+function trianglesToLines(e) {
+ const t = e.length, n = t / 3 * 6, i = IndexDatatype$1.createTypedArray(t, n);
+ let r = 0;
+ for (let o = 0; o < t; o += 3, r += 6)
+ addTriangle(i, r, e[o], e[o + 1], e[o + 2]);
+ return i;
+}
+function triangleStripToLines(e) {
+ const t = e.length;
+ if (t >= 3) {
+ const n = (t - 2) * 6, i = IndexDatatype$1.createTypedArray(t, n);
+ addTriangle(i, 0, e[0], e[1], e[2]);
+ let r = 6;
+ for (let o = 3; o < t; ++o, r += 6)
+ addTriangle(
+ i,
+ r,
+ e[o - 1],
+ e[o],
+ e[o - 2]
+ );
+ return i;
+ }
+ return new Uint16Array();
+}
+function triangleFanToLines(e) {
+ if (e.length > 0) {
+ const t = e.length - 1, n = (t - 1) * 6, i = IndexDatatype$1.createTypedArray(t, n), r = e[0];
+ let o = 0;
+ for (let s = 1; s < t; ++s, o += 6)
+ addTriangle(i, o, r, e[s], e[s + 1]);
+ return i;
+ }
+ return new Uint16Array();
+}
+GeometryPipeline.toWireframe = function(e) {
+ const t = e.indices;
+ if (defined(t)) {
+ switch (e.primitiveType) {
+ case PrimitiveType$1.TRIANGLES:
+ e.indices = trianglesToLines(t);
+ break;
+ case PrimitiveType$1.TRIANGLE_STRIP:
+ e.indices = triangleStripToLines(t);
+ break;
+ case PrimitiveType$1.TRIANGLE_FAN:
+ e.indices = triangleFanToLines(t);
+ break;
+ }
+ e.primitiveType = PrimitiveType$1.LINES;
+ }
+ return e;
+};
+GeometryPipeline.createLineSegmentsForVectors = function(e, t, n) {
+ t = defaultValue(t, "normal"), n = defaultValue(n, 1e4);
+ const i = e.attributes.position.values, r = e.attributes[t].values, o = i.length, s = new Float64Array(2 * o);
+ let c = 0;
+ for (let f = 0; f < o; f += 3)
+ s[c++] = i[f], s[c++] = i[f + 1], s[c++] = i[f + 2], s[c++] = i[f] + r[f] * n, s[c++] = i[f + 1] + r[f + 1] * n, s[c++] = i[f + 2] + r[f + 2] * n;
+ let l;
+ const d = e.boundingSphere;
+ return defined(d) && (l = new BoundingSphere(d.center, d.radius + n)), new Geometry({
+ attributes: {
+ position: new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.DOUBLE,
+ componentsPerAttribute: 3,
+ values: s
+ })
+ },
+ primitiveType: PrimitiveType$1.LINES,
+ boundingSphere: l
+ });
+};
+GeometryPipeline.createAttributeLocations = function(e) {
+ const t = [
+ "position",
+ "positionHigh",
+ "positionLow",
+ // From VertexFormat.position - after 2D projection and high-precision encoding
+ "position3DHigh",
+ "position3DLow",
+ "position2DHigh",
+ "position2DLow",
+ // From Primitive
+ "pickColor",
+ // From VertexFormat
+ "normal",
+ "st",
+ "tangent",
+ "bitangent",
+ // For shadow volumes
+ "extrudeDirection",
+ // From compressing texture coordinates and normals
+ "compressedAttributes"
+ ], n = e.attributes, i = {};
+ let r = 0, o;
+ const s = t.length;
+ for (o = 0; o < s; ++o) {
+ const c = t[o];
+ defined(n[c]) && (i[c] = r++);
+ }
+ for (const c in n)
+ n.hasOwnProperty(c) && !defined(i[c]) && (i[c] = r++);
+ return i;
+};
+GeometryPipeline.reorderForPreVertexCache = function(e) {
+ const t = Geometry.computeNumberOfVertices(e), n = e.indices;
+ if (defined(n)) {
+ const i = new Int32Array(t);
+ for (let p = 0; p < t; p++)
+ i[p] = -1;
+ const r = n, o = r.length, s = IndexDatatype$1.createTypedArray(t, o);
+ let c = 0, l = 0, d = 0, f;
+ for (; c < o; )
+ f = i[r[c]], f !== -1 ? s[l] = f : (f = r[c], i[f] = d, s[l] = d, ++d), ++c, ++l;
+ e.indices = s;
+ const h = e.attributes;
+ for (const p in h)
+ if (h.hasOwnProperty(p) && defined(h[p]) && defined(h[p].values)) {
+ const m = h[p], _ = m.values;
+ let y = 0;
+ const C = m.componentsPerAttribute, T = ComponentDatatype$1.createTypedArray(
+ m.componentDatatype,
+ d * C
+ );
+ for (; y < t; ) {
+ const x = i[y];
+ if (x !== -1)
+ for (let b = 0; b < C; b++)
+ T[C * x + b] = _[C * y + b];
+ ++y;
+ }
+ m.values = T;
+ }
+ }
+ return e;
+};
+GeometryPipeline.reorderForPostVertexCache = function(e, t) {
+ const n = e.indices;
+ if (e.primitiveType === PrimitiveType$1.TRIANGLES && defined(n)) {
+ const i = n.length;
+ let r = 0;
+ for (let o = 0; o < i; o++)
+ n[o] > r && (r = n[o]);
+ e.indices = Tipsify.tipsify({
+ indices: n,
+ maximumIndex: r,
+ cacheSize: t
+ });
+ }
+ return e;
+};
+function copyAttributesDescriptions(e) {
+ const t = {};
+ for (const n in e)
+ if (e.hasOwnProperty(n) && defined(e[n]) && defined(e[n].values)) {
+ const i = e[n];
+ t[n] = new GeometryAttribute({
+ componentDatatype: i.componentDatatype,
+ componentsPerAttribute: i.componentsPerAttribute,
+ normalize: i.normalize,
+ values: []
+ });
+ }
+ return t;
+}
+function copyVertex(e, t, n) {
+ for (const i in t)
+ if (t.hasOwnProperty(i) && defined(t[i]) && defined(t[i].values)) {
+ const r = t[i];
+ for (let o = 0; o < r.componentsPerAttribute; ++o)
+ e[i].values.push(
+ r.values[n * r.componentsPerAttribute + o]
+ );
+ }
+}
+GeometryPipeline.fitToUnsignedShortIndices = function(e) {
+ const t = [], n = Geometry.computeNumberOfVertices(e);
+ if (defined(e.indices) && n >= CesiumMath.SIXTY_FOUR_KILOBYTES) {
+ let i = [], r = [], o = 0, s = copyAttributesDescriptions(e.attributes);
+ const c = e.indices, l = c.length;
+ let d;
+ e.primitiveType === PrimitiveType$1.TRIANGLES ? d = 3 : e.primitiveType === PrimitiveType$1.LINES ? d = 2 : e.primitiveType === PrimitiveType$1.POINTS && (d = 1);
+ for (let f = 0; f < l; f += d) {
+ for (let h = 0; h < d; ++h) {
+ const p = c[f + h];
+ let m = i[p];
+ defined(m) || (m = o++, i[p] = m, copyVertex(s, e.attributes, p)), r.push(m);
+ }
+ o + d >= CesiumMath.SIXTY_FOUR_KILOBYTES && (t.push(
+ new Geometry({
+ attributes: s,
+ indices: r,
+ primitiveType: e.primitiveType,
+ boundingSphere: e.boundingSphere,
+ boundingSphereCV: e.boundingSphereCV
+ })
+ ), i = [], r = [], o = 0, s = copyAttributesDescriptions(e.attributes));
+ }
+ r.length !== 0 && t.push(
+ new Geometry({
+ attributes: s,
+ indices: r,
+ primitiveType: e.primitiveType,
+ boundingSphere: e.boundingSphere,
+ boundingSphereCV: e.boundingSphereCV
+ })
+ );
+ } else
+ t.push(e);
+ return t;
+};
+const scratchProjectTo2DCartesian3 = new Cartesian3(), scratchProjectTo2DCartographic = new Cartographic();
+GeometryPipeline.projectTo2D = function(e, t, n, i, r) {
+ const o = e.attributes[t];
+ r = defined(r) ? r : new GeographicProjection();
+ const s = r.ellipsoid, c = o.values, l = new Float64Array(c.length);
+ let d = 0;
+ for (let f = 0; f < c.length; f += 3) {
+ const h = Cartesian3.fromArray(
+ c,
+ f,
+ scratchProjectTo2DCartesian3
+ ), p = s.cartesianToCartographic(
+ h,
+ scratchProjectTo2DCartographic
+ ), m = r.project(
+ p,
+ scratchProjectTo2DCartesian3
+ );
+ l[d++] = m.x, l[d++] = m.y, l[d++] = m.z;
+ }
+ return e.attributes[n] = o, e.attributes[i] = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.DOUBLE,
+ componentsPerAttribute: 3,
+ values: l
+ }), delete e.attributes[t], e;
+};
+const encodedResult = {
+ high: 0,
+ low: 0
+};
+GeometryPipeline.encodeAttribute = function(e, t, n, i) {
+ const r = e.attributes[t], o = r.values, s = o.length, c = new Float32Array(s), l = new Float32Array(s);
+ for (let f = 0; f < s; ++f)
+ EncodedCartesian3.encode(o[f], encodedResult), c[f] = encodedResult.high, l[f] = encodedResult.low;
+ const d = r.componentsPerAttribute;
+ return e.attributes[n] = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: d,
+ values: c
+ }), e.attributes[i] = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: d,
+ values: l
+ }), delete e.attributes[t], e;
+};
+let scratchCartesian3$b = new Cartesian3();
+function transformPoint(e, t) {
+ if (defined(t)) {
+ const n = t.values, i = n.length;
+ for (let r = 0; r < i; r += 3)
+ Cartesian3.unpack(n, r, scratchCartesian3$b), Matrix4.multiplyByPoint(e, scratchCartesian3$b, scratchCartesian3$b), Cartesian3.pack(scratchCartesian3$b, n, r);
+ }
+}
+function transformVector(e, t) {
+ if (defined(t)) {
+ const n = t.values, i = n.length;
+ for (let r = 0; r < i; r += 3)
+ Cartesian3.unpack(n, r, scratchCartesian3$b), Matrix3.multiplyByVector(e, scratchCartesian3$b, scratchCartesian3$b), scratchCartesian3$b = Cartesian3.normalize(
+ scratchCartesian3$b,
+ scratchCartesian3$b
+ ), Cartesian3.pack(scratchCartesian3$b, n, r);
+ }
+}
+const inverseTranspose = new Matrix4(), normalMatrix = new Matrix3();
+GeometryPipeline.transformToWorldCoordinates = function(e) {
+ const t = e.modelMatrix;
+ if (Matrix4.equals(t, Matrix4.IDENTITY))
+ return e;
+ const n = e.geometry.attributes;
+ transformPoint(t, n.position), transformPoint(t, n.prevPosition), transformPoint(t, n.nextPosition), (defined(n.normal) || defined(n.tangent) || defined(n.bitangent)) && (Matrix4.inverse(t, inverseTranspose), Matrix4.transpose(inverseTranspose, inverseTranspose), Matrix4.getMatrix3(inverseTranspose, normalMatrix), transformVector(normalMatrix, n.normal), transformVector(normalMatrix, n.tangent), transformVector(normalMatrix, n.bitangent));
+ const i = e.geometry.boundingSphere;
+ return defined(i) && (e.geometry.boundingSphere = BoundingSphere.transform(
+ i,
+ t,
+ i
+ )), e.modelMatrix = Matrix4.clone(Matrix4.IDENTITY), e;
+};
+function findAttributesInAllGeometries(e, t) {
+ const n = e.length, i = {}, r = e[0][t].attributes;
+ let o;
+ for (o in r)
+ if (r.hasOwnProperty(o) && defined(r[o]) && defined(r[o].values)) {
+ const s = r[o];
+ let c = s.values.length, l = !0;
+ for (let d = 1; d < n; ++d) {
+ const f = e[d][t].attributes[o];
+ if (!defined(f) || s.componentDatatype !== f.componentDatatype || s.componentsPerAttribute !== f.componentsPerAttribute || s.normalize !== f.normalize) {
+ l = !1;
+ break;
+ }
+ c += f.values.length;
+ }
+ l && (i[o] = new GeometryAttribute({
+ componentDatatype: s.componentDatatype,
+ componentsPerAttribute: s.componentsPerAttribute,
+ normalize: s.normalize,
+ values: ComponentDatatype$1.createTypedArray(
+ s.componentDatatype,
+ c
+ )
+ }));
+ }
+ return i;
+}
+const tempScratch$1 = new Cartesian3();
+function combineGeometries(e, t) {
+ const n = e.length;
+ let i, r, o, s;
+ e[0].modelMatrix;
+ const c = defined(e[0][t].indices), l = e[0][t].primitiveType, d = findAttributesInAllGeometries(e, t);
+ let f, h, p;
+ for (i in d)
+ if (d.hasOwnProperty(i))
+ for (f = d[i].values, s = 0, r = 0; r < n; ++r)
+ for (h = e[r][t].attributes[i].values, p = h.length, o = 0; o < p; ++o)
+ f[s++] = h[o];
+ let m;
+ if (c) {
+ let T = 0;
+ for (r = 0; r < n; ++r)
+ T += e[r][t].indices.length;
+ const x = Geometry.computeNumberOfVertices(
+ new Geometry({
+ attributes: d,
+ primitiveType: PrimitiveType$1.POINTS
+ })
+ ), b = IndexDatatype$1.createTypedArray(
+ x,
+ T
+ );
+ let S = 0, E = 0;
+ for (r = 0; r < n; ++r) {
+ const A = e[r][t].indices, D = A.length;
+ for (s = 0; s < D; ++s)
+ b[S++] = E + A[s];
+ E += Geometry.computeNumberOfVertices(e[r][t]);
+ }
+ m = b;
+ }
+ let _ = new Cartesian3(), y = 0, C;
+ for (r = 0; r < n; ++r) {
+ if (C = e[r][t].boundingSphere, !defined(C)) {
+ _ = void 0;
+ break;
+ }
+ Cartesian3.add(C.center, _, _);
+ }
+ if (defined(_))
+ for (Cartesian3.divideByScalar(_, n, _), r = 0; r < n; ++r) {
+ C = e[r][t].boundingSphere;
+ const T = Cartesian3.magnitude(
+ Cartesian3.subtract(C.center, _, tempScratch$1)
+ ) + C.radius;
+ T > y && (y = T);
+ }
+ return new Geometry({
+ attributes: d,
+ indices: m,
+ primitiveType: l,
+ boundingSphere: defined(_) ? new BoundingSphere(_, y) : void 0
+ });
+}
+GeometryPipeline.combineInstances = function(e) {
+ const t = [], n = [], i = e.length;
+ for (let o = 0; o < i; ++o) {
+ const s = e[o];
+ defined(s.geometry) ? t.push(s) : defined(s.westHemisphereGeometry) && defined(s.eastHemisphereGeometry) && n.push(s);
+ }
+ const r = [];
+ return t.length > 0 && r.push(combineGeometries(t, "geometry")), n.length > 0 && (r.push(
+ combineGeometries(n, "westHemisphereGeometry")
+ ), r.push(
+ combineGeometries(n, "eastHemisphereGeometry")
+ )), r;
+};
+const normal = new Cartesian3(), v0 = new Cartesian3(), v1 = new Cartesian3(), v2 = new Cartesian3();
+GeometryPipeline.computeNormal = function(e) {
+ const t = e.indices, n = e.attributes, i = n.position.values, r = n.position.values.length / 3, o = t.length, s = new Array(r), c = new Array(o / 3), l = new Array(o);
+ let d;
+ for (d = 0; d < r; d++)
+ s[d] = {
+ indexOffset: 0,
+ count: 0,
+ currentCount: 0
+ };
+ let f = 0;
+ for (d = 0; d < o; d += 3) {
+ const _ = t[d], y = t[d + 1], C = t[d + 2], T = _ * 3, x = y * 3, b = C * 3;
+ v0.x = i[T], v0.y = i[T + 1], v0.z = i[T + 2], v1.x = i[x], v1.y = i[x + 1], v1.z = i[x + 2], v2.x = i[b], v2.y = i[b + 1], v2.z = i[b + 2], s[_].count++, s[y].count++, s[C].count++, Cartesian3.subtract(v1, v0, v1), Cartesian3.subtract(v2, v0, v2), c[f] = Cartesian3.cross(v1, v2, new Cartesian3()), f++;
+ }
+ let h = 0;
+ for (d = 0; d < r; d++)
+ s[d].indexOffset += h, h += s[d].count;
+ f = 0;
+ let p;
+ for (d = 0; d < o; d += 3) {
+ p = s[t[d]];
+ let _ = p.indexOffset + p.currentCount;
+ l[_] = f, p.currentCount++, p = s[t[d + 1]], _ = p.indexOffset + p.currentCount, l[_] = f, p.currentCount++, p = s[t[d + 2]], _ = p.indexOffset + p.currentCount, l[_] = f, p.currentCount++, f++;
+ }
+ const m = new Float32Array(r * 3);
+ for (d = 0; d < r; d++) {
+ const _ = d * 3;
+ if (p = s[d], Cartesian3.clone(Cartesian3.ZERO, normal), p.count > 0) {
+ for (f = 0; f < p.count; f++)
+ Cartesian3.add(
+ normal,
+ c[l[p.indexOffset + f]],
+ normal
+ );
+ Cartesian3.equalsEpsilon(Cartesian3.ZERO, normal, CesiumMath.EPSILON10) && Cartesian3.clone(
+ c[l[p.indexOffset]],
+ normal
+ );
+ }
+ Cartesian3.equalsEpsilon(Cartesian3.ZERO, normal, CesiumMath.EPSILON10) && (normal.z = 1), Cartesian3.normalize(normal, normal), m[_] = normal.x, m[_ + 1] = normal.y, m[_ + 2] = normal.z;
+ }
+ return e.attributes.normal = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 3,
+ values: m
+ }), e;
+};
+const normalScratch$4 = new Cartesian3(), normalScale = new Cartesian3(), tScratch = new Cartesian3();
+GeometryPipeline.computeTangentAndBitangent = function(e) {
+ e.attributes;
+ const t = e.indices, n = e.attributes.position.values, i = e.attributes.normal.values, r = e.attributes.st.values, o = e.attributes.position.values.length / 3, s = t.length, c = new Array(o * 3);
+ let l;
+ for (l = 0; l < c.length; l++)
+ c[l] = 0;
+ let d, f, h;
+ for (l = 0; l < s; l += 3) {
+ const _ = t[l], y = t[l + 1], C = t[l + 2];
+ d = _ * 3, f = y * 3, h = C * 3;
+ const T = _ * 2, x = y * 2, b = C * 2, S = n[d], E = n[d + 1], A = n[d + 2], D = r[T], P = r[T + 1], I = r[x + 1] - P, M = r[b + 1] - P, R = 1 / ((r[x] - D) * M - (r[b] - D) * I), L = (M * (n[f] - S) - I * (n[h] - S)) * R, g = (M * (n[f + 1] - E) - I * (n[h + 1] - E)) * R, w = (M * (n[f + 2] - A) - I * (n[h + 2] - A)) * R;
+ c[d] += L, c[d + 1] += g, c[d + 2] += w, c[f] += L, c[f + 1] += g, c[f + 2] += w, c[h] += L, c[h + 1] += g, c[h + 2] += w;
+ }
+ const p = new Float32Array(o * 3), m = new Float32Array(o * 3);
+ for (l = 0; l < o; l++) {
+ d = l * 3, f = d + 1, h = d + 2;
+ const _ = Cartesian3.fromArray(i, d, normalScratch$4), y = Cartesian3.fromArray(c, d, tScratch), C = Cartesian3.dot(_, y);
+ Cartesian3.multiplyByScalar(_, C, normalScale), Cartesian3.normalize(Cartesian3.subtract(y, normalScale, y), y), p[d] = y.x, p[f] = y.y, p[h] = y.z, Cartesian3.normalize(Cartesian3.cross(_, y, y), y), m[d] = y.x, m[f] = y.y, m[h] = y.z;
+ }
+ return e.attributes.tangent = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 3,
+ values: p
+ }), e.attributes.bitangent = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 3,
+ values: m
+ }), e;
+};
+const scratchCartesian2$a = new Cartesian2(), toEncode1 = new Cartesian3(), toEncode2 = new Cartesian3(), toEncode3 = new Cartesian3();
+let encodeResult2 = new Cartesian2();
+GeometryPipeline.compressVertices = function(e) {
+ const t = e.attributes.extrudeDirection;
+ let n, i;
+ if (defined(t)) {
+ const A = t.values;
+ i = A.length / 3;
+ const D = new Float32Array(i * 2);
+ let P = 0;
+ for (n = 0; n < i; ++n) {
+ if (Cartesian3.fromArray(A, n * 3, toEncode1), Cartesian3.equals(toEncode1, Cartesian3.ZERO)) {
+ P += 2;
+ continue;
+ }
+ encodeResult2 = AttributeCompression.octEncodeInRange(
+ toEncode1,
+ 65535,
+ encodeResult2
+ ), D[P++] = encodeResult2.x, D[P++] = encodeResult2.y;
+ }
+ return e.attributes.compressedAttributes = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 2,
+ values: D
+ }), delete e.attributes.extrudeDirection, e;
+ }
+ const r = e.attributes.normal, o = e.attributes.st, s = defined(r), c = defined(o);
+ if (!s && !c)
+ return e;
+ const l = e.attributes.tangent, d = e.attributes.bitangent, f = defined(l), h = defined(d);
+ let p, m, _, y;
+ s && (p = r.values), c && (m = o.values), f && (_ = l.values), h && (y = d.values), i = (s ? p.length : m.length) / (s ? 3 : 2);
+ let x = i, b = c && s ? 2 : 1;
+ b += f || h ? 1 : 0, x *= b;
+ const S = new Float32Array(x);
+ let E = 0;
+ for (n = 0; n < i; ++n) {
+ c && (Cartesian2.fromArray(m, n * 2, scratchCartesian2$a), S[E++] = AttributeCompression.compressTextureCoordinates(scratchCartesian2$a));
+ const A = n * 3;
+ s && defined(_) && defined(y) ? (Cartesian3.fromArray(p, A, toEncode1), Cartesian3.fromArray(_, A, toEncode2), Cartesian3.fromArray(y, A, toEncode3), AttributeCompression.octPack(
+ toEncode1,
+ toEncode2,
+ toEncode3,
+ scratchCartesian2$a
+ ), S[E++] = scratchCartesian2$a.x, S[E++] = scratchCartesian2$a.y) : (s && (Cartesian3.fromArray(p, A, toEncode1), S[E++] = AttributeCompression.octEncodeFloat(toEncode1)), f && (Cartesian3.fromArray(_, A, toEncode1), S[E++] = AttributeCompression.octEncodeFloat(toEncode1)), h && (Cartesian3.fromArray(y, A, toEncode1), S[E++] = AttributeCompression.octEncodeFloat(toEncode1)));
+ }
+ return e.attributes.compressedAttributes = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: b,
+ values: S
+ }), s && delete e.attributes.normal, c && delete e.attributes.st, h && delete e.attributes.bitangent, f && delete e.attributes.tangent, e;
+};
+function indexTriangles(e) {
+ if (defined(e.indices))
+ return e;
+ const t = Geometry.computeNumberOfVertices(e), n = IndexDatatype$1.createTypedArray(
+ t,
+ t
+ );
+ for (let i = 0; i < t; ++i)
+ n[i] = i;
+ return e.indices = n, e;
+}
+function indexTriangleFan(e) {
+ const t = Geometry.computeNumberOfVertices(e), n = IndexDatatype$1.createTypedArray(
+ t,
+ (t - 2) * 3
+ );
+ n[0] = 1, n[1] = 0, n[2] = 2;
+ let i = 3;
+ for (let r = 3; r < t; ++r)
+ n[i++] = r - 1, n[i++] = 0, n[i++] = r;
+ return e.indices = n, e.primitiveType = PrimitiveType$1.TRIANGLES, e;
+}
+function indexTriangleStrip(e) {
+ const t = Geometry.computeNumberOfVertices(e), n = IndexDatatype$1.createTypedArray(
+ t,
+ (t - 2) * 3
+ );
+ n[0] = 0, n[1] = 1, n[2] = 2, t > 3 && (n[3] = 0, n[4] = 2, n[5] = 3);
+ let i = 6;
+ for (let r = 3; r < t - 1; r += 2)
+ n[i++] = r, n[i++] = r - 1, n[i++] = r + 1, r + 2 < t && (n[i++] = r, n[i++] = r + 1, n[i++] = r + 2);
+ return e.indices = n, e.primitiveType = PrimitiveType$1.TRIANGLES, e;
+}
+function indexLines(e) {
+ if (defined(e.indices))
+ return e;
+ const t = Geometry.computeNumberOfVertices(e), n = IndexDatatype$1.createTypedArray(
+ t,
+ t
+ );
+ for (let i = 0; i < t; ++i)
+ n[i] = i;
+ return e.indices = n, e;
+}
+function indexLineStrip(e) {
+ const t = Geometry.computeNumberOfVertices(e), n = IndexDatatype$1.createTypedArray(
+ t,
+ (t - 1) * 2
+ );
+ n[0] = 0, n[1] = 1;
+ let i = 2;
+ for (let r = 2; r < t; ++r)
+ n[i++] = r - 1, n[i++] = r;
+ return e.indices = n, e.primitiveType = PrimitiveType$1.LINES, e;
+}
+function indexLineLoop(e) {
+ const t = Geometry.computeNumberOfVertices(e), n = IndexDatatype$1.createTypedArray(
+ t,
+ t * 2
+ );
+ n[0] = 0, n[1] = 1;
+ let i = 2;
+ for (let r = 2; r < t; ++r)
+ n[i++] = r - 1, n[i++] = r;
+ return n[i++] = t - 1, n[i] = 0, e.indices = n, e.primitiveType = PrimitiveType$1.LINES, e;
+}
+function indexPrimitive(e) {
+ switch (e.primitiveType) {
+ case PrimitiveType$1.TRIANGLE_FAN:
+ return indexTriangleFan(e);
+ case PrimitiveType$1.TRIANGLE_STRIP:
+ return indexTriangleStrip(e);
+ case PrimitiveType$1.TRIANGLES:
+ return indexTriangles(e);
+ case PrimitiveType$1.LINE_STRIP:
+ return indexLineStrip(e);
+ case PrimitiveType$1.LINE_LOOP:
+ return indexLineLoop(e);
+ case PrimitiveType$1.LINES:
+ return indexLines(e);
+ }
+ return e;
+}
+function offsetPointFromXZPlane(e, t) {
+ Math.abs(e.y) < CesiumMath.EPSILON6 && (t ? e.y = -CesiumMath.EPSILON6 : e.y = CesiumMath.EPSILON6);
+}
+function offsetTriangleFromXZPlane(e, t, n) {
+ if (e.y !== 0 && t.y !== 0 && n.y !== 0) {
+ offsetPointFromXZPlane(e, e.y < 0), offsetPointFromXZPlane(t, t.y < 0), offsetPointFromXZPlane(n, n.y < 0);
+ return;
+ }
+ const i = Math.abs(e.y), r = Math.abs(t.y), o = Math.abs(n.y);
+ let s;
+ i > r ? i > o ? s = CesiumMath.sign(e.y) : s = CesiumMath.sign(n.y) : r > o ? s = CesiumMath.sign(t.y) : s = CesiumMath.sign(n.y);
+ const c = s < 0;
+ offsetPointFromXZPlane(e, c), offsetPointFromXZPlane(t, c), offsetPointFromXZPlane(n, c);
+}
+const c3$1 = new Cartesian3();
+function getXZIntersectionOffsetPoints(e, t, n, i) {
+ Cartesian3.add(
+ e,
+ Cartesian3.multiplyByScalar(
+ Cartesian3.subtract(t, e, c3$1),
+ e.y / (e.y - t.y),
+ c3$1
+ ),
+ n
+ ), Cartesian3.clone(n, i), offsetPointFromXZPlane(n, !0), offsetPointFromXZPlane(i, !1);
+}
+const u1 = new Cartesian3(), u2 = new Cartesian3(), q1 = new Cartesian3(), q2 = new Cartesian3(), splitTriangleResult = {
+ positions: new Array(7),
+ indices: new Array(3 * 3)
+};
+function splitTriangle(e, t, n) {
+ if (e.x >= 0 || t.x >= 0 || n.x >= 0)
+ return;
+ offsetTriangleFromXZPlane(e, t, n);
+ const i = e.y < 0, r = t.y < 0, o = n.y < 0;
+ let s = 0;
+ s += i ? 1 : 0, s += r ? 1 : 0, s += o ? 1 : 0;
+ const c = splitTriangleResult.indices;
+ s === 1 ? (c[1] = 3, c[2] = 4, c[5] = 6, c[7] = 6, c[8] = 5, i ? (getXZIntersectionOffsetPoints(e, t, u1, q1), getXZIntersectionOffsetPoints(e, n, u2, q2), c[0] = 0, c[3] = 1, c[4] = 2, c[6] = 1) : r ? (getXZIntersectionOffsetPoints(t, n, u1, q1), getXZIntersectionOffsetPoints(t, e, u2, q2), c[0] = 1, c[3] = 2, c[4] = 0, c[6] = 2) : o && (getXZIntersectionOffsetPoints(n, e, u1, q1), getXZIntersectionOffsetPoints(n, t, u2, q2), c[0] = 2, c[3] = 0, c[4] = 1, c[6] = 0)) : s === 2 && (c[2] = 4, c[4] = 4, c[5] = 3, c[7] = 5, c[8] = 6, i ? r ? o || (getXZIntersectionOffsetPoints(n, e, u1, q1), getXZIntersectionOffsetPoints(n, t, u2, q2), c[0] = 0, c[1] = 1, c[3] = 0, c[6] = 2) : (getXZIntersectionOffsetPoints(t, n, u1, q1), getXZIntersectionOffsetPoints(t, e, u2, q2), c[0] = 2, c[1] = 0, c[3] = 2, c[6] = 1) : (getXZIntersectionOffsetPoints(e, t, u1, q1), getXZIntersectionOffsetPoints(e, n, u2, q2), c[0] = 1, c[1] = 2, c[3] = 1, c[6] = 0));
+ const l = splitTriangleResult.positions;
+ return l[0] = e, l[1] = t, l[2] = n, l.length = 3, (s === 1 || s === 2) && (l[3] = u1, l[4] = u2, l[5] = q1, l[6] = q2, l.length = 7), splitTriangleResult;
+}
+function updateGeometryAfterSplit(e, t) {
+ const n = e.attributes;
+ if (n.position.values.length === 0)
+ return;
+ for (const r in n)
+ if (n.hasOwnProperty(r) && defined(n[r]) && defined(n[r].values)) {
+ const o = n[r];
+ o.values = ComponentDatatype$1.createTypedArray(
+ o.componentDatatype,
+ o.values
+ );
+ }
+ const i = Geometry.computeNumberOfVertices(e);
+ return e.indices = IndexDatatype$1.createTypedArray(
+ i,
+ e.indices
+ ), t && (e.boundingSphere = BoundingSphere.fromVertices(
+ n.position.values
+ )), e;
+}
+function copyGeometryForSplit(e) {
+ const t = e.attributes, n = {};
+ for (const i in t)
+ if (t.hasOwnProperty(i) && defined(t[i]) && defined(t[i].values)) {
+ const r = t[i];
+ n[i] = new GeometryAttribute({
+ componentDatatype: r.componentDatatype,
+ componentsPerAttribute: r.componentsPerAttribute,
+ normalize: r.normalize,
+ values: []
+ });
+ }
+ return new Geometry({
+ attributes: n,
+ indices: [],
+ primitiveType: e.primitiveType
+ });
+}
+function updateInstanceAfterSplit(e, t, n) {
+ const i = defined(e.geometry.boundingSphere);
+ t = updateGeometryAfterSplit(t, i), n = updateGeometryAfterSplit(n, i), defined(n) && !defined(t) ? e.geometry = n : !defined(n) && defined(t) ? e.geometry = t : (e.westHemisphereGeometry = t, e.eastHemisphereGeometry = n, e.geometry = void 0);
+}
+function generateBarycentricInterpolateFunction(e, t) {
+ const n = new e(), i = new e(), r = new e();
+ return function(o, s, c, l, d, f, h, p) {
+ const m = e.fromArray(
+ d,
+ o * t,
+ n
+ ), _ = e.fromArray(
+ d,
+ s * t,
+ i
+ ), y = e.fromArray(
+ d,
+ c * t,
+ r
+ );
+ e.multiplyByScalar(m, l.x, m), e.multiplyByScalar(_, l.y, _), e.multiplyByScalar(y, l.z, y);
+ const C = e.add(m, _, m);
+ e.add(C, y, C), p && e.normalize(C, C), e.pack(
+ C,
+ f,
+ h * t
+ );
+ };
+}
+const interpolateAndPackCartesian4 = generateBarycentricInterpolateFunction(
+ Cartesian4,
+ 4
+), interpolateAndPackCartesian3 = generateBarycentricInterpolateFunction(
+ Cartesian3,
+ 3
+), interpolateAndPackCartesian2 = generateBarycentricInterpolateFunction(
+ Cartesian2,
+ 2
+), interpolateAndPackBoolean = function(e, t, n, i, r, o, s) {
+ const c = r[e] * i.x, l = r[t] * i.y, d = r[n] * i.z;
+ o[s] = c + l + d > CesiumMath.EPSILON6 ? 1 : 0;
+}, p0Scratch = new Cartesian3(), p1Scratch$2 = new Cartesian3(), p2Scratch$2 = new Cartesian3(), barycentricScratch = new Cartesian3();
+function computeTriangleAttributes(e, t, n, i, r, o, s, c, l, d, f, h, p, m, _, y) {
+ if (!defined(o) && !defined(s) && !defined(c) && !defined(l) && !defined(d) && m === 0)
+ return;
+ const C = Cartesian3.fromArray(r, e * 3, p0Scratch), T = Cartesian3.fromArray(r, t * 3, p1Scratch$2), x = Cartesian3.fromArray(r, n * 3, p2Scratch$2), b = barycentricCoordinates(i, C, T, x, barycentricScratch);
+ if (defined(b)) {
+ if (defined(o) && interpolateAndPackCartesian3(
+ e,
+ t,
+ n,
+ b,
+ o,
+ h.normal.values,
+ y,
+ !0
+ ), defined(d)) {
+ const S = Cartesian3.fromArray(d, e * 3, p0Scratch), E = Cartesian3.fromArray(d, t * 3, p1Scratch$2), A = Cartesian3.fromArray(d, n * 3, p2Scratch$2);
+ Cartesian3.multiplyByScalar(S, b.x, S), Cartesian3.multiplyByScalar(E, b.y, E), Cartesian3.multiplyByScalar(A, b.z, A);
+ let D;
+ !Cartesian3.equals(S, Cartesian3.ZERO) || !Cartesian3.equals(E, Cartesian3.ZERO) || !Cartesian3.equals(A, Cartesian3.ZERO) ? (D = Cartesian3.add(S, E, S), Cartesian3.add(D, A, D), Cartesian3.normalize(D, D)) : (D = p0Scratch, D.x = 0, D.y = 0, D.z = 0), Cartesian3.pack(
+ D,
+ h.extrudeDirection.values,
+ y * 3
+ );
+ }
+ if (defined(f) && interpolateAndPackBoolean(
+ e,
+ t,
+ n,
+ b,
+ f,
+ h.applyOffset.values,
+ y
+ ), defined(s) && interpolateAndPackCartesian3(
+ e,
+ t,
+ n,
+ b,
+ s,
+ h.tangent.values,
+ y,
+ !0
+ ), defined(c) && interpolateAndPackCartesian3(
+ e,
+ t,
+ n,
+ b,
+ c,
+ h.bitangent.values,
+ y,
+ !0
+ ), defined(l) && interpolateAndPackCartesian2(
+ e,
+ t,
+ n,
+ b,
+ l,
+ h.st.values,
+ y
+ ), m > 0)
+ for (let S = 0; S < m; S++) {
+ const E = p[S];
+ genericInterpolate(
+ e,
+ t,
+ n,
+ b,
+ y,
+ _[E],
+ h[E]
+ );
+ }
+ }
+}
+function genericInterpolate(e, t, n, i, r, o, s) {
+ const c = o.componentsPerAttribute, l = o.values, d = s.values;
+ switch (c) {
+ case 4:
+ interpolateAndPackCartesian4(
+ e,
+ t,
+ n,
+ i,
+ l,
+ d,
+ r,
+ !1
+ );
+ break;
+ case 3:
+ interpolateAndPackCartesian3(
+ e,
+ t,
+ n,
+ i,
+ l,
+ d,
+ r,
+ !1
+ );
+ break;
+ case 2:
+ interpolateAndPackCartesian2(
+ e,
+ t,
+ n,
+ i,
+ l,
+ d,
+ r,
+ !1
+ );
+ break;
+ default:
+ d[r] = l[e] * i.x + l[t] * i.y + l[n] * i.z;
+ }
+}
+function insertSplitPoint(e, t, n, i, r, o) {
+ const s = e.position.values.length / 3;
+ if (r !== -1) {
+ const c = i[r], l = n[c];
+ return l === -1 ? (n[c] = s, e.position.values.push(o.x, o.y, o.z), t.push(s), s) : (t.push(l), l);
+ }
+ return e.position.values.push(o.x, o.y, o.z), t.push(s), s;
+}
+const NAMED_ATTRIBUTES = {
+ position: !0,
+ normal: !0,
+ bitangent: !0,
+ tangent: !0,
+ st: !0,
+ extrudeDirection: !0,
+ applyOffset: !0
+};
+function splitLongitudeTriangles(e) {
+ const t = e.geometry, n = t.attributes, i = n.position.values, r = defined(n.normal) ? n.normal.values : void 0, o = defined(n.bitangent) ? n.bitangent.values : void 0, s = defined(n.tangent) ? n.tangent.values : void 0, c = defined(n.st) ? n.st.values : void 0, l = defined(n.extrudeDirection) ? n.extrudeDirection.values : void 0, d = defined(n.applyOffset) ? n.applyOffset.values : void 0, f = t.indices, h = [];
+ for (const D in n)
+ n.hasOwnProperty(D) && !NAMED_ATTRIBUTES[D] && defined(n[D]) && h.push(D);
+ const p = h.length, m = copyGeometryForSplit(t), _ = copyGeometryForSplit(t);
+ let y, C, T, x, b;
+ const S = [];
+ S.length = i.length / 3;
+ const E = [];
+ for (E.length = i.length / 3, b = 0; b < S.length; ++b)
+ S[b] = -1, E[b] = -1;
+ const A = f.length;
+ for (b = 0; b < A; b += 3) {
+ const D = f[b], P = f[b + 1], I = f[b + 2];
+ let M = Cartesian3.fromArray(i, D * 3), R = Cartesian3.fromArray(i, P * 3), L = Cartesian3.fromArray(i, I * 3);
+ const g = splitTriangle(M, R, L);
+ if (defined(g) && g.positions.length > 3) {
+ const w = g.positions, O = g.indices, N = O.length;
+ for (let F = 0; F < N; ++F) {
+ const B = O[F], V = w[B];
+ V.y < 0 ? (y = _.attributes, C = _.indices, T = S) : (y = m.attributes, C = m.indices, T = E), x = insertSplitPoint(
+ y,
+ C,
+ T,
+ f,
+ B < 3 ? b + B : -1,
+ V
+ ), computeTriangleAttributes(
+ D,
+ P,
+ I,
+ V,
+ i,
+ r,
+ s,
+ o,
+ c,
+ l,
+ d,
+ y,
+ h,
+ p,
+ n,
+ x
+ );
+ }
+ } else
+ defined(g) && (M = g.positions[0], R = g.positions[1], L = g.positions[2]), M.y < 0 ? (y = _.attributes, C = _.indices, T = S) : (y = m.attributes, C = m.indices, T = E), x = insertSplitPoint(
+ y,
+ C,
+ T,
+ f,
+ b,
+ M
+ ), computeTriangleAttributes(
+ D,
+ P,
+ I,
+ M,
+ i,
+ r,
+ s,
+ o,
+ c,
+ l,
+ d,
+ y,
+ h,
+ p,
+ n,
+ x
+ ), x = insertSplitPoint(
+ y,
+ C,
+ T,
+ f,
+ b + 1,
+ R
+ ), computeTriangleAttributes(
+ D,
+ P,
+ I,
+ R,
+ i,
+ r,
+ s,
+ o,
+ c,
+ l,
+ d,
+ y,
+ h,
+ p,
+ n,
+ x
+ ), x = insertSplitPoint(
+ y,
+ C,
+ T,
+ f,
+ b + 2,
+ L
+ ), computeTriangleAttributes(
+ D,
+ P,
+ I,
+ L,
+ i,
+ r,
+ s,
+ o,
+ c,
+ l,
+ d,
+ y,
+ h,
+ p,
+ n,
+ x
+ );
+ }
+ updateInstanceAfterSplit(e, _, m);
+}
+const xzPlane = Plane.fromPointNormal(Cartesian3.ZERO, Cartesian3.UNIT_Y), offsetScratch$c = new Cartesian3(), offsetPointScratch = new Cartesian3();
+function computeLineAttributes(e, t, n, i, r, o, s) {
+ if (!defined(s))
+ return;
+ const c = Cartesian3.fromArray(i, e * 3, p0Scratch);
+ Cartesian3.equalsEpsilon(c, n, CesiumMath.EPSILON10) ? o.applyOffset.values[r] = s[e] : o.applyOffset.values[r] = s[t];
+}
+function splitLongitudeLines(e) {
+ const t = e.geometry, n = t.attributes, i = n.position.values, r = defined(n.applyOffset) ? n.applyOffset.values : void 0, o = t.indices, s = copyGeometryForSplit(t), c = copyGeometryForSplit(t);
+ let l;
+ const d = o.length, f = [];
+ f.length = i.length / 3;
+ const h = [];
+ for (h.length = i.length / 3, l = 0; l < f.length; ++l)
+ f[l] = -1, h[l] = -1;
+ for (l = 0; l < d; l += 2) {
+ const p = o[l], m = o[l + 1], _ = Cartesian3.fromArray(i, p * 3, p0Scratch), y = Cartesian3.fromArray(i, m * 3, p1Scratch$2);
+ let C;
+ Math.abs(_.y) < CesiumMath.EPSILON6 && (_.y < 0 ? _.y = -CesiumMath.EPSILON6 : _.y = CesiumMath.EPSILON6), Math.abs(y.y) < CesiumMath.EPSILON6 && (y.y < 0 ? y.y = -CesiumMath.EPSILON6 : y.y = CesiumMath.EPSILON6);
+ let T = s.attributes, x = s.indices, b = h, S = c.attributes, E = c.indices, A = f;
+ const D = IntersectionTests.lineSegmentPlane(
+ _,
+ y,
+ xzPlane,
+ p2Scratch$2
+ );
+ if (defined(D)) {
+ const P = Cartesian3.multiplyByScalar(
+ Cartesian3.UNIT_Y,
+ 5 * CesiumMath.EPSILON9,
+ offsetScratch$c
+ );
+ _.y < 0 && (Cartesian3.negate(P, P), T = c.attributes, x = c.indices, b = f, S = s.attributes, E = s.indices, A = h);
+ const I = Cartesian3.add(
+ D,
+ P,
+ offsetPointScratch
+ );
+ C = insertSplitPoint(
+ T,
+ x,
+ b,
+ o,
+ l,
+ _
+ ), computeLineAttributes(
+ p,
+ m,
+ _,
+ i,
+ C,
+ T,
+ r
+ ), C = insertSplitPoint(
+ T,
+ x,
+ b,
+ o,
+ -1,
+ I
+ ), computeLineAttributes(
+ p,
+ m,
+ I,
+ i,
+ C,
+ T,
+ r
+ ), Cartesian3.negate(P, P), Cartesian3.add(D, P, I), C = insertSplitPoint(
+ S,
+ E,
+ A,
+ o,
+ -1,
+ I
+ ), computeLineAttributes(
+ p,
+ m,
+ I,
+ i,
+ C,
+ S,
+ r
+ ), C = insertSplitPoint(
+ S,
+ E,
+ A,
+ o,
+ l + 1,
+ y
+ ), computeLineAttributes(
+ p,
+ m,
+ y,
+ i,
+ C,
+ S,
+ r
+ );
+ } else {
+ let P, I, M;
+ _.y < 0 ? (P = c.attributes, I = c.indices, M = f) : (P = s.attributes, I = s.indices, M = h), C = insertSplitPoint(
+ P,
+ I,
+ M,
+ o,
+ l,
+ _
+ ), computeLineAttributes(
+ p,
+ m,
+ _,
+ i,
+ C,
+ P,
+ r
+ ), C = insertSplitPoint(
+ P,
+ I,
+ M,
+ o,
+ l + 1,
+ y
+ ), computeLineAttributes(
+ p,
+ m,
+ y,
+ i,
+ C,
+ P,
+ r
+ );
+ }
+ }
+ updateInstanceAfterSplit(e, c, s);
+}
+const cartesian2Scratch0 = new Cartesian2(), cartesian2Scratch1 = new Cartesian2(), cartesian3Scratch0 = new Cartesian3(), cartesian3Scratch2$1 = new Cartesian3(), cartesian3Scratch3$1 = new Cartesian3(), cartesian3Scratch4 = new Cartesian3(), cartesian3Scratch5 = new Cartesian3(), cartesian3Scratch6 = new Cartesian3(), cartesian4Scratch0 = new Cartesian4();
+function updateAdjacencyAfterSplit(e) {
+ const t = e.attributes, n = t.position.values, i = t.prevPosition.values, r = t.nextPosition.values, o = n.length;
+ for (let s = 0; s < o; s += 3) {
+ const c = Cartesian3.unpack(n, s, cartesian3Scratch0);
+ if (c.x > 0)
+ continue;
+ const l = Cartesian3.unpack(
+ i,
+ s,
+ cartesian3Scratch2$1
+ );
+ (c.y < 0 && l.y > 0 || c.y > 0 && l.y < 0) && (s - 3 > 0 ? (i[s] = n[s - 3], i[s + 1] = n[s - 2], i[s + 2] = n[s - 1]) : Cartesian3.pack(c, i, s));
+ const d = Cartesian3.unpack(
+ r,
+ s,
+ cartesian3Scratch3$1
+ );
+ (c.y < 0 && d.y > 0 || c.y > 0 && d.y < 0) && (s + 3 < o ? (r[s] = n[s + 3], r[s + 1] = n[s + 4], r[s + 2] = n[s + 5]) : Cartesian3.pack(c, r, s));
+ }
+}
+const offsetScalar = 5 * CesiumMath.EPSILON9, coplanarOffset = CesiumMath.EPSILON6;
+function splitLongitudePolyline(e) {
+ const t = e.geometry, n = t.attributes, i = n.position.values, r = n.prevPosition.values, o = n.nextPosition.values, s = n.expandAndWidth.values, c = defined(n.st) ? n.st.values : void 0, l = defined(n.color) ? n.color.values : void 0, d = copyGeometryForSplit(t), f = copyGeometryForSplit(t);
+ let h, p, m, _ = !1;
+ const y = i.length / 3;
+ for (h = 0; h < y; h += 4) {
+ const C = h, T = h + 2, x = Cartesian3.fromArray(i, C * 3, cartesian3Scratch0), b = Cartesian3.fromArray(i, T * 3, cartesian3Scratch2$1);
+ if (Math.abs(x.y) < coplanarOffset)
+ for (x.y = coplanarOffset * (b.y < 0 ? -1 : 1), i[h * 3 + 1] = x.y, i[(h + 1) * 3 + 1] = x.y, p = C * 3; p < C * 3 + 4 * 3; p += 3)
+ r[p] = i[h * 3], r[p + 1] = i[h * 3 + 1], r[p + 2] = i[h * 3 + 2];
+ if (Math.abs(b.y) < coplanarOffset)
+ for (b.y = coplanarOffset * (x.y < 0 ? -1 : 1), i[(h + 2) * 3 + 1] = b.y, i[(h + 3) * 3 + 1] = b.y, p = C * 3; p < C * 3 + 4 * 3; p += 3)
+ o[p] = i[(h + 2) * 3], o[p + 1] = i[(h + 2) * 3 + 1], o[p + 2] = i[(h + 2) * 3 + 2];
+ let S = d.attributes, E = d.indices, A = f.attributes, D = f.indices;
+ const P = IntersectionTests.lineSegmentPlane(
+ x,
+ b,
+ xzPlane,
+ cartesian3Scratch4
+ );
+ if (defined(P)) {
+ _ = !0;
+ const I = Cartesian3.multiplyByScalar(
+ Cartesian3.UNIT_Y,
+ offsetScalar,
+ cartesian3Scratch5
+ );
+ x.y < 0 && (Cartesian3.negate(I, I), S = f.attributes, E = f.indices, A = d.attributes, D = d.indices);
+ const M = Cartesian3.add(
+ P,
+ I,
+ cartesian3Scratch6
+ );
+ S.position.values.push(x.x, x.y, x.z, x.x, x.y, x.z), S.position.values.push(
+ M.x,
+ M.y,
+ M.z
+ ), S.position.values.push(
+ M.x,
+ M.y,
+ M.z
+ ), S.prevPosition.values.push(
+ r[C * 3],
+ r[C * 3 + 1],
+ r[C * 3 + 2]
+ ), S.prevPosition.values.push(
+ r[C * 3 + 3],
+ r[C * 3 + 4],
+ r[C * 3 + 5]
+ ), S.prevPosition.values.push(x.x, x.y, x.z, x.x, x.y, x.z), S.nextPosition.values.push(
+ M.x,
+ M.y,
+ M.z
+ ), S.nextPosition.values.push(
+ M.x,
+ M.y,
+ M.z
+ ), S.nextPosition.values.push(
+ M.x,
+ M.y,
+ M.z
+ ), S.nextPosition.values.push(
+ M.x,
+ M.y,
+ M.z
+ ), Cartesian3.negate(I, I), Cartesian3.add(P, I, M), A.position.values.push(
+ M.x,
+ M.y,
+ M.z
+ ), A.position.values.push(
+ M.x,
+ M.y,
+ M.z
+ ), A.position.values.push(b.x, b.y, b.z, b.x, b.y, b.z), A.prevPosition.values.push(
+ M.x,
+ M.y,
+ M.z
+ ), A.prevPosition.values.push(
+ M.x,
+ M.y,
+ M.z
+ ), A.prevPosition.values.push(
+ M.x,
+ M.y,
+ M.z
+ ), A.prevPosition.values.push(
+ M.x,
+ M.y,
+ M.z
+ ), A.nextPosition.values.push(b.x, b.y, b.z, b.x, b.y, b.z), A.nextPosition.values.push(
+ o[T * 3],
+ o[T * 3 + 1],
+ o[T * 3 + 2]
+ ), A.nextPosition.values.push(
+ o[T * 3 + 3],
+ o[T * 3 + 4],
+ o[T * 3 + 5]
+ );
+ const R = Cartesian2.fromArray(
+ s,
+ C * 2,
+ cartesian2Scratch0
+ ), L = Math.abs(R.y);
+ S.expandAndWidth.values.push(-1, L, 1, L), S.expandAndWidth.values.push(-1, -L, 1, -L), A.expandAndWidth.values.push(-1, L, 1, L), A.expandAndWidth.values.push(-1, -L, 1, -L);
+ let g = Cartesian3.magnitudeSquared(
+ Cartesian3.subtract(P, x, cartesian3Scratch3$1)
+ );
+ if (g /= Cartesian3.magnitudeSquared(
+ Cartesian3.subtract(b, x, cartesian3Scratch3$1)
+ ), defined(l)) {
+ const w = Cartesian4.fromArray(l, C * 4, cartesian4Scratch0), O = Cartesian4.fromArray(l, T * 4, cartesian4Scratch0), N = CesiumMath.lerp(w.x, O.x, g), F = CesiumMath.lerp(w.y, O.y, g), B = CesiumMath.lerp(w.z, O.z, g), V = CesiumMath.lerp(w.w, O.w, g);
+ for (p = C * 4; p < C * 4 + 2 * 4; ++p)
+ S.color.values.push(l[p]);
+ for (S.color.values.push(N, F, B, V), S.color.values.push(N, F, B, V), A.color.values.push(N, F, B, V), A.color.values.push(N, F, B, V), p = T * 4; p < T * 4 + 2 * 4; ++p)
+ A.color.values.push(l[p]);
+ }
+ if (defined(c)) {
+ const w = Cartesian2.fromArray(c, C * 2, cartesian2Scratch0), O = Cartesian2.fromArray(
+ c,
+ (h + 3) * 2,
+ cartesian2Scratch1
+ ), N = CesiumMath.lerp(w.x, O.x, g);
+ for (p = C * 2; p < C * 2 + 2 * 2; ++p)
+ S.st.values.push(c[p]);
+ for (S.st.values.push(N, w.y), S.st.values.push(N, O.y), A.st.values.push(N, w.y), A.st.values.push(N, O.y), p = T * 2; p < T * 2 + 2 * 2; ++p)
+ A.st.values.push(c[p]);
+ }
+ m = S.position.values.length / 3 - 4, E.push(m, m + 2, m + 1), E.push(m + 1, m + 2, m + 3), m = A.position.values.length / 3 - 4, D.push(m, m + 2, m + 1), D.push(m + 1, m + 2, m + 3);
+ } else {
+ let I, M;
+ for (x.y < 0 ? (I = f.attributes, M = f.indices) : (I = d.attributes, M = d.indices), I.position.values.push(x.x, x.y, x.z), I.position.values.push(x.x, x.y, x.z), I.position.values.push(b.x, b.y, b.z), I.position.values.push(b.x, b.y, b.z), p = h * 3; p < h * 3 + 4 * 3; ++p)
+ I.prevPosition.values.push(r[p]), I.nextPosition.values.push(o[p]);
+ for (p = h * 2; p < h * 2 + 4 * 2; ++p)
+ I.expandAndWidth.values.push(s[p]), defined(c) && I.st.values.push(c[p]);
+ if (defined(l))
+ for (p = h * 4; p < h * 4 + 4 * 4; ++p)
+ I.color.values.push(l[p]);
+ m = I.position.values.length / 3 - 4, M.push(m, m + 2, m + 1), M.push(m + 1, m + 2, m + 3);
+ }
+ }
+ _ && (updateAdjacencyAfterSplit(f), updateAdjacencyAfterSplit(d)), updateInstanceAfterSplit(e, f, d);
+}
+GeometryPipeline.splitLongitude = function(e) {
+ const t = e.geometry, n = t.boundingSphere;
+ if (defined(n) && (n.center.x - n.radius > 0 || BoundingSphere.intersectPlane(n, Plane.ORIGIN_ZX_PLANE) !== Intersect$1.INTERSECTING))
+ return e;
+ if (t.geometryType !== GeometryType$1.NONE)
+ switch (t.geometryType) {
+ case GeometryType$1.POLYLINES:
+ splitLongitudePolyline(e);
+ break;
+ case GeometryType$1.TRIANGLES:
+ splitLongitudeTriangles(e);
+ break;
+ case GeometryType$1.LINES:
+ splitLongitudeLines(e);
+ break;
+ }
+ else
+ indexPrimitive(t), t.primitiveType === PrimitiveType$1.TRIANGLES ? splitLongitudeTriangles(e) : t.primitiveType === PrimitiveType$1.LINES && splitLongitudeLines(e);
+ return e;
+};
+function WebMercatorProjection(e) {
+ this._ellipsoid = defaultValue(e, Ellipsoid.WGS84), this._semimajorAxis = this._ellipsoid.maximumRadius, this._oneOverSemimajorAxis = 1 / this._semimajorAxis;
+}
+Object.defineProperties(WebMercatorProjection.prototype, {
+ /**
+ * Gets the {@link Ellipsoid}.
+ *
+ * @memberof WebMercatorProjection.prototype
+ *
+ * @type {Ellipsoid}
+ * @readonly
+ */
+ ellipsoid: {
+ get: function() {
+ return this._ellipsoid;
+ }
+ }
+});
+WebMercatorProjection.mercatorAngleToGeodeticLatitude = function(e) {
+ return CesiumMath.PI_OVER_TWO - 2 * Math.atan(Math.exp(-e));
+};
+WebMercatorProjection.geodeticLatitudeToMercatorAngle = function(e) {
+ e > WebMercatorProjection.MaximumLatitude ? e = WebMercatorProjection.MaximumLatitude : e < -WebMercatorProjection.MaximumLatitude && (e = -WebMercatorProjection.MaximumLatitude);
+ const t = Math.sin(e);
+ return 0.5 * Math.log((1 + t) / (1 - t));
+};
+WebMercatorProjection.MaximumLatitude = WebMercatorProjection.mercatorAngleToGeodeticLatitude(
+ Math.PI
+);
+WebMercatorProjection.prototype.project = function(e, t) {
+ const n = this._semimajorAxis, i = e.longitude * n, r = WebMercatorProjection.geodeticLatitudeToMercatorAngle(
+ e.latitude
+ ) * n, o = e.height;
+ return defined(t) ? (t.x = i, t.y = r, t.z = o, t) : new Cartesian3(i, r, o);
+};
+WebMercatorProjection.prototype.unproject = function(e, t) {
+ const n = this._oneOverSemimajorAxis, i = e.x * n, r = WebMercatorProjection.mercatorAngleToGeodeticLatitude(
+ e.y * n
+ ), o = e.z;
+ return defined(t) ? (t.longitude = i, t.latitude = r, t.height = o, t) : new Cartographic(i, r, o);
+};
+function transformToWorldCoordinates(e, t, n) {
+ let i = !n;
+ const r = e.length;
+ let o;
+ if (!i && r > 1) {
+ const s = e[0].modelMatrix;
+ for (o = 1; o < r; ++o)
+ if (!Matrix4.equals(s, e[o].modelMatrix)) {
+ i = !0;
+ break;
+ }
+ }
+ if (i)
+ for (o = 0; o < r; ++o)
+ defined(e[o].geometry) && GeometryPipeline.transformToWorldCoordinates(e[o]);
+ else
+ Matrix4.multiplyTransformation(
+ t,
+ e[0].modelMatrix,
+ t
+ );
+}
+function addGeometryBatchId(e, t) {
+ const n = e.attributes, i = n.position, r = i.values.length / i.componentsPerAttribute;
+ n.batchId = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 1,
+ values: new Float32Array(r)
+ });
+ const o = n.batchId.values;
+ for (let s = 0; s < r; ++s)
+ o[s] = t;
+}
+function addBatchIds(e) {
+ const t = e.length;
+ for (let n = 0; n < t; ++n) {
+ const i = e[n];
+ defined(i.geometry) ? addGeometryBatchId(i.geometry, n) : defined(i.westHemisphereGeometry) && defined(i.eastHemisphereGeometry) && (addGeometryBatchId(i.westHemisphereGeometry, n), addGeometryBatchId(i.eastHemisphereGeometry, n));
+ }
+}
+function geometryPipeline(e) {
+ const t = e.instances, n = e.projection, i = e.elementIndexUintSupported, r = e.scene3DOnly, o = e.vertexCacheOptimize, s = e.compressVertices, c = e.modelMatrix;
+ let l, d, f = t.length;
+ for (l = 0; l < f; ++l)
+ if (defined(t[l].geometry)) {
+ t[l].geometry.primitiveType;
+ break;
+ }
+ if (transformToWorldCoordinates(t, c, r), !r)
+ for (l = 0; l < f; ++l)
+ defined(t[l].geometry) && GeometryPipeline.splitLongitude(t[l]);
+ if (addBatchIds(t), o)
+ for (l = 0; l < f; ++l) {
+ const p = t[l];
+ defined(p.geometry) ? (GeometryPipeline.reorderForPostVertexCache(p.geometry), GeometryPipeline.reorderForPreVertexCache(p.geometry)) : defined(p.westHemisphereGeometry) && defined(p.eastHemisphereGeometry) && (GeometryPipeline.reorderForPostVertexCache(
+ p.westHemisphereGeometry
+ ), GeometryPipeline.reorderForPreVertexCache(
+ p.westHemisphereGeometry
+ ), GeometryPipeline.reorderForPostVertexCache(
+ p.eastHemisphereGeometry
+ ), GeometryPipeline.reorderForPreVertexCache(
+ p.eastHemisphereGeometry
+ ));
+ }
+ let h = GeometryPipeline.combineInstances(t);
+ for (f = h.length, l = 0; l < f; ++l) {
+ d = h[l];
+ const p = d.attributes;
+ if (r)
+ for (const m in p)
+ p.hasOwnProperty(m) && p[m].componentDatatype === ComponentDatatype$1.DOUBLE && GeometryPipeline.encodeAttribute(
+ d,
+ m,
+ `${m}3DHigh`,
+ `${m}3DLow`
+ );
+ else
+ for (const m in p)
+ if (p.hasOwnProperty(m) && p[m].componentDatatype === ComponentDatatype$1.DOUBLE) {
+ const _ = `${m}3D`, y = `${m}2D`;
+ GeometryPipeline.projectTo2D(
+ d,
+ m,
+ _,
+ y,
+ n
+ ), defined(d.boundingSphere) && m === "position" && (d.boundingSphereCV = BoundingSphere.fromVertices(
+ d.attributes.position2D.values
+ )), GeometryPipeline.encodeAttribute(
+ d,
+ _,
+ `${_}High`,
+ `${_}Low`
+ ), GeometryPipeline.encodeAttribute(
+ d,
+ y,
+ `${y}High`,
+ `${y}Low`
+ );
+ }
+ s && GeometryPipeline.compressVertices(d);
+ }
+ if (!i) {
+ let p = [];
+ for (f = h.length, l = 0; l < f; ++l)
+ d = h[l], p = p.concat(
+ GeometryPipeline.fitToUnsignedShortIndices(d)
+ );
+ h = p;
+ }
+ return h;
+}
+function createPickOffsets(e, t, n, i) {
+ let r, o, s;
+ const c = i.length - 1;
+ if (c >= 0) {
+ const d = i[c];
+ r = d.offset + d.count, s = d.index, o = n[s].indices.length;
+ } else
+ r = 0, s = 0, o = n[s].indices.length;
+ const l = e.length;
+ for (let d = 0; d < l; ++d) {
+ const h = e[d][t];
+ if (!defined(h))
+ continue;
+ const p = h.indices.length;
+ r + p > o && (r = 0, o = n[++s].indices.length), i.push({
+ index: s,
+ offset: r,
+ count: p
+ }), r += p;
+ }
+}
+function createInstancePickOffsets(e, t) {
+ const n = [];
+ return createPickOffsets(e, "geometry", t, n), createPickOffsets(
+ e,
+ "westHemisphereGeometry",
+ t,
+ n
+ ), createPickOffsets(
+ e,
+ "eastHemisphereGeometry",
+ t,
+ n
+ ), n;
+}
+const PrimitivePipeline = {};
+PrimitivePipeline.combineGeometry = function(e) {
+ let t, n;
+ const i = e.instances, r = i.length;
+ let o, s, c = !1;
+ r > 0 && (t = geometryPipeline(e), t.length > 0 && (n = GeometryPipeline.createAttributeLocations(
+ t[0]
+ ), e.createPickOffsets && (o = createInstancePickOffsets(i, t))), defined(i[0].attributes) && defined(i[0].attributes.offset) && (s = new Array(r), c = !0));
+ const l = new Array(r), d = new Array(r);
+ for (let f = 0; f < r; ++f) {
+ const h = i[f], p = h.geometry;
+ defined(p) && (l[f] = p.boundingSphere, d[f] = p.boundingSphereCV, c && (s[f] = h.geometry.offsetAttribute));
+ const m = h.eastHemisphereGeometry, _ = h.westHemisphereGeometry;
+ defined(m) && defined(_) && (defined(m.boundingSphere) && defined(_.boundingSphere) && (l[f] = BoundingSphere.union(
+ m.boundingSphere,
+ _.boundingSphere
+ )), defined(m.boundingSphereCV) && defined(_.boundingSphereCV) && (d[f] = BoundingSphere.union(
+ m.boundingSphereCV,
+ _.boundingSphereCV
+ )));
+ }
+ return {
+ geometries: t,
+ modelMatrix: e.modelMatrix,
+ attributeLocations: n,
+ pickOffsets: o,
+ offsetInstanceExtend: s,
+ boundingSpheres: l,
+ boundingSpheresCV: d
+ };
+};
+function transferGeometry(e, t) {
+ const n = e.attributes;
+ for (const i in n)
+ if (n.hasOwnProperty(i)) {
+ const r = n[i];
+ defined(r) && defined(r.values) && t.push(r.values.buffer);
+ }
+ defined(e.indices) && t.push(e.indices.buffer);
+}
+function transferGeometries(e, t) {
+ const n = e.length;
+ for (let i = 0; i < n; ++i)
+ transferGeometry(e[i], t);
+}
+function countCreateGeometryResults(e) {
+ let t = 1;
+ const n = e.length;
+ for (let i = 0; i < n; i++) {
+ const r = e[i];
+ if (++t, !defined(r))
+ continue;
+ const o = r.attributes;
+ t += 7 + 2 * BoundingSphere.packedLength + (defined(r.indices) ? r.indices.length : 0);
+ for (const s in o)
+ if (o.hasOwnProperty(s) && defined(o[s])) {
+ const c = o[s];
+ t += 5 + c.values.length;
+ }
+ }
+ return t;
+}
+PrimitivePipeline.packCreateGeometryResults = function(e, t) {
+ const n = new Float64Array(countCreateGeometryResults(e)), i = [], r = {}, o = e.length;
+ let s = 0;
+ n[s++] = o;
+ for (let c = 0; c < o; c++) {
+ const l = e[c], d = defined(l);
+ if (n[s++] = d ? 1 : 0, !d)
+ continue;
+ n[s++] = l.primitiveType, n[s++] = l.geometryType, n[s++] = defaultValue(l.offsetAttribute, -1);
+ const f = defined(l.boundingSphere) ? 1 : 0;
+ n[s++] = f, f && BoundingSphere.pack(l.boundingSphere, n, s), s += BoundingSphere.packedLength;
+ const h = defined(l.boundingSphereCV) ? 1 : 0;
+ n[s++] = h, h && BoundingSphere.pack(l.boundingSphereCV, n, s), s += BoundingSphere.packedLength;
+ const p = l.attributes, m = [];
+ for (const y in p)
+ p.hasOwnProperty(y) && defined(p[y]) && (m.push(y), defined(r[y]) || (r[y] = i.length, i.push(y)));
+ n[s++] = m.length;
+ for (let y = 0; y < m.length; y++) {
+ const C = m[y], T = p[C];
+ n[s++] = r[C], n[s++] = T.componentDatatype, n[s++] = T.componentsPerAttribute, n[s++] = T.normalize ? 1 : 0, n[s++] = T.values.length, n.set(T.values, s), s += T.values.length;
+ }
+ const _ = defined(l.indices) ? l.indices.length : 0;
+ n[s++] = _, _ > 0 && (n.set(l.indices, s), s += _);
+ }
+ return t.push(n.buffer), {
+ stringTable: i,
+ packedData: n
+ };
+};
+PrimitivePipeline.unpackCreateGeometryResults = function(e) {
+ const t = e.stringTable, n = e.packedData;
+ let i;
+ const r = new Array(n[0]);
+ let o = 0, s = 1;
+ for (; s < n.length; ) {
+ if (!(n[s++] === 1)) {
+ r[o++] = void 0;
+ continue;
+ }
+ const l = n[s++], d = n[s++];
+ let f = n[s++];
+ f === -1 && (f = void 0);
+ let h, p;
+ n[s++] === 1 && (h = BoundingSphere.unpack(
+ n,
+ s
+ )), s += BoundingSphere.packedLength, n[s++] === 1 && (p = BoundingSphere.unpack(
+ n,
+ s
+ )), s += BoundingSphere.packedLength;
+ let y, C, T;
+ const x = new GeometryAttributes(), b = n[s++];
+ for (i = 0; i < b; i++) {
+ const E = t[n[s++]], A = n[s++];
+ T = n[s++];
+ const D = n[s++] !== 0;
+ y = n[s++], C = ComponentDatatype$1.createTypedArray(A, y);
+ for (let P = 0; P < y; P++)
+ C[P] = n[s++];
+ x[E] = new GeometryAttribute({
+ componentDatatype: A,
+ componentsPerAttribute: T,
+ normalize: D,
+ values: C
+ });
+ }
+ let S;
+ if (y = n[s++], y > 0) {
+ const E = C.length / T;
+ for (S = IndexDatatype$1.createTypedArray(E, y), i = 0; i < y; i++)
+ S[i] = n[s++];
+ }
+ r[o++] = new Geometry({
+ primitiveType: l,
+ geometryType: d,
+ boundingSphere: h,
+ boundingSphereCV: p,
+ indices: S,
+ attributes: x,
+ offsetAttribute: f
+ });
+ }
+ return r;
+};
+function packInstancesForCombine(e, t) {
+ const n = e.length, i = new Float64Array(1 + n * 19);
+ let r = 0;
+ i[r++] = n;
+ for (let o = 0; o < n; o++) {
+ const s = e[o];
+ if (Matrix4.pack(s.modelMatrix, i, r), r += Matrix4.packedLength, defined(s.attributes) && defined(s.attributes.offset)) {
+ const c = s.attributes.offset.value;
+ i[r] = c[0], i[r + 1] = c[1], i[r + 2] = c[2];
+ }
+ r += 3;
+ }
+ return t.push(i.buffer), i;
+}
+function unpackInstancesForCombine(e) {
+ const t = e, n = new Array(t[0]);
+ let i = 0, r = 1;
+ for (; r < t.length; ) {
+ const o = Matrix4.unpack(t, r);
+ let s;
+ r += Matrix4.packedLength, defined(t[r]) && (s = {
+ offset: new OffsetGeometryInstanceAttribute(
+ t[r],
+ t[r + 1],
+ t[r + 2]
+ )
+ }), r += 3, n[i++] = {
+ modelMatrix: o,
+ attributes: s
+ };
+ }
+ return n;
+}
+PrimitivePipeline.packCombineGeometryParameters = function(e, t) {
+ const n = e.createGeometryResults, i = n.length;
+ for (let r = 0; r < i; r++)
+ t.push(n[r].packedData.buffer);
+ return {
+ createGeometryResults: e.createGeometryResults,
+ packedInstances: packInstancesForCombine(
+ e.instances,
+ t
+ ),
+ ellipsoid: e.ellipsoid,
+ isGeographic: e.projection instanceof GeographicProjection,
+ elementIndexUintSupported: e.elementIndexUintSupported,
+ scene3DOnly: e.scene3DOnly,
+ vertexCacheOptimize: e.vertexCacheOptimize,
+ compressVertices: e.compressVertices,
+ modelMatrix: e.modelMatrix,
+ createPickOffsets: e.createPickOffsets
+ };
+};
+PrimitivePipeline.unpackCombineGeometryParameters = function(e) {
+ const t = unpackInstancesForCombine(e.packedInstances), n = e.createGeometryResults, i = n.length;
+ let r = 0;
+ for (let c = 0; c < i; c++) {
+ const l = PrimitivePipeline.unpackCreateGeometryResults(
+ n[c]
+ ), d = l.length;
+ for (let f = 0; f < d; f++) {
+ const h = l[f], p = t[r];
+ p.geometry = h, ++r;
+ }
+ }
+ const o = Ellipsoid.clone(e.ellipsoid), s = e.isGeographic ? new GeographicProjection(o) : new WebMercatorProjection(o);
+ return {
+ instances: t,
+ ellipsoid: o,
+ projection: s,
+ elementIndexUintSupported: e.elementIndexUintSupported,
+ scene3DOnly: e.scene3DOnly,
+ vertexCacheOptimize: e.vertexCacheOptimize,
+ compressVertices: e.compressVertices,
+ modelMatrix: Matrix4.clone(e.modelMatrix),
+ createPickOffsets: e.createPickOffsets
+ };
+};
+function packBoundingSpheres(e) {
+ const t = e.length, n = 1 + (BoundingSphere.packedLength + 1) * t, i = new Float32Array(n);
+ let r = 0;
+ i[r++] = t;
+ for (let o = 0; o < t; ++o) {
+ const s = e[o];
+ defined(s) ? (i[r++] = 1, BoundingSphere.pack(e[o], i, r)) : i[r++] = 0, r += BoundingSphere.packedLength;
+ }
+ return i;
+}
+function unpackBoundingSpheres(e) {
+ const t = new Array(e[0]);
+ let n = 0, i = 1;
+ for (; i < e.length; )
+ e[i++] === 1 && (t[n] = BoundingSphere.unpack(e, i)), ++n, i += BoundingSphere.packedLength;
+ return t;
+}
+PrimitivePipeline.packCombineGeometryResults = function(e, t) {
+ defined(e.geometries) && transferGeometries(e.geometries, t);
+ const n = packBoundingSpheres(e.boundingSpheres), i = packBoundingSpheres(
+ e.boundingSpheresCV
+ );
+ return t.push(
+ n.buffer,
+ i.buffer
+ ), {
+ geometries: e.geometries,
+ attributeLocations: e.attributeLocations,
+ modelMatrix: e.modelMatrix,
+ pickOffsets: e.pickOffsets,
+ offsetInstanceExtend: e.offsetInstanceExtend,
+ boundingSpheres: n,
+ boundingSpheresCV: i
+ };
+};
+PrimitivePipeline.unpackCombineGeometryResults = function(e) {
+ return {
+ geometries: e.geometries,
+ attributeLocations: e.attributeLocations,
+ modelMatrix: e.modelMatrix,
+ pickOffsets: e.pickOffsets,
+ offsetInstanceExtend: e.offsetInstanceExtend,
+ boundingSpheres: unpackBoundingSpheres(e.boundingSpheres),
+ boundingSpheresCV: unpackBoundingSpheres(e.boundingSpheresCV)
+ };
+};
+const PrimitiveState = {
+ READY: 0,
+ CREATING: 1,
+ CREATED: 2,
+ COMBINING: 3,
+ COMBINED: 4,
+ COMPLETE: 5,
+ FAILED: 6
+}, PrimitiveState$1 = Object.freeze(PrimitiveState), ShadowMode = {
+ /**
+ * The object does not cast or receive shadows.
+ *
+ * @type {number}
+ * @constant
+ */
+ DISABLED: 0,
+ /**
+ * The object casts and receives shadows.
+ *
+ * @type {number}
+ * @constant
+ */
+ ENABLED: 1,
+ /**
+ * The object casts shadows only.
+ *
+ * @type {number}
+ * @constant
+ */
+ CAST_ONLY: 2,
+ /**
+ * The object receives shadows only.
+ *
+ * @type {number}
+ * @constant
+ */
+ RECEIVE_ONLY: 3
+};
+ShadowMode.NUMBER_OF_SHADOW_MODES = 4;
+ShadowMode.castShadows = function(e) {
+ return e === ShadowMode.ENABLED || e === ShadowMode.CAST_ONLY;
+};
+ShadowMode.receiveShadows = function(e) {
+ return e === ShadowMode.ENABLED || e === ShadowMode.RECEIVE_ONLY;
+};
+ShadowMode.fromCastReceive = function(e, t) {
+ return e && t ? ShadowMode.ENABLED : e ? ShadowMode.CAST_ONLY : t ? ShadowMode.RECEIVE_ONLY : ShadowMode.DISABLED;
+};
+const ShadowMode$1 = Object.freeze(ShadowMode);
+function Primitive$3(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this.geometryInstances = e.geometryInstances, this.appearance = e.appearance, this._appearance = void 0, this._material = void 0, this.depthFailAppearance = e.depthFailAppearance, this._depthFailAppearance = void 0, this._depthFailMaterial = void 0, this.modelMatrix = Matrix4.clone(
+ defaultValue(e.modelMatrix, Matrix4.IDENTITY)
+ ), this._modelMatrix = new Matrix4(), this.show = defaultValue(e.show, !0), this._vertexCacheOptimize = defaultValue(e.vertexCacheOptimize, !1), this._interleave = defaultValue(e.interleave, !1), this._releaseGeometryInstances = defaultValue(
+ e.releaseGeometryInstances,
+ !0
+ ), this._allowPicking = defaultValue(e.allowPicking, !0), this._asynchronous = defaultValue(e.asynchronous, !0), this._compressVertices = defaultValue(e.compressVertices, !0), this.cull = defaultValue(e.cull, !0), this.debugShowBoundingVolume = defaultValue(
+ e.debugShowBoundingVolume,
+ !1
+ ), this.rtcCenter = e.rtcCenter, this.shadows = defaultValue(e.shadows, ShadowMode$1.DISABLED), this._translucent = void 0, this._state = PrimitiveState$1.READY, this._geometries = [], this._error = void 0, this._numberOfInstances = 0, this._boundingSpheres = [], this._boundingSphereWC = [], this._boundingSphereCV = [], this._boundingSphere2D = [], this._boundingSphereMorph = [], this._perInstanceAttributeCache = /* @__PURE__ */ new Map(), this._instanceIds = [], this._lastPerInstanceAttributeIndex = 0, this._va = [], this._attributeLocations = void 0, this._primitiveType = void 0, this._frontFaceRS = void 0, this._backFaceRS = void 0, this._sp = void 0, this._depthFailAppearance = void 0, this._spDepthFail = void 0, this._frontFaceDepthFailRS = void 0, this._backFaceDepthFailRS = void 0, this._pickIds = [], this._colorCommands = [], this._pickCommands = [], this._createBoundingVolumeFunction = e._createBoundingVolumeFunction, this._createRenderStatesFunction = e._createRenderStatesFunction, this._createShaderProgramFunction = e._createShaderProgramFunction, this._createCommandsFunction = e._createCommandsFunction, this._updateAndQueueCommandsFunction = e._updateAndQueueCommandsFunction, this._createPickOffsets = e._createPickOffsets, this._pickOffsets = void 0, this._createGeometryResults = void 0, this._ready = !1, this._batchTable = void 0, this._batchTableAttributeIndices = void 0, this._offsetInstanceExtend = void 0, this._batchTableOffsetAttribute2DIndex = void 0, this._batchTableOffsetsUpdated = !1, this._instanceBoundingSpheres = void 0, this._instanceBoundingSpheresCV = void 0, this._tempBoundingSpheres = void 0, this._recomputeBoundingSpheres = !1, this._batchTableBoundingSpheresUpdated = !1, this._batchTableBoundingSphereAttributeIndices = void 0;
+}
+Object.defineProperties(Primitive$3.prototype, {
+ /**
+ * When true, geometry vertices are optimized for the pre and post-vertex-shader caches.
+ *
+ * @memberof Primitive.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default true
+ */
+ vertexCacheOptimize: {
+ get: function() {
+ return this._vertexCacheOptimize;
+ }
+ },
+ /**
+ * Determines if geometry vertex attributes are interleaved, which can slightly improve rendering performance.
+ *
+ * @memberof Primitive.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default false
+ */
+ interleave: {
+ get: function() {
+ return this._interleave;
+ }
+ },
+ /**
+ * When true, the primitive does not keep a reference to the input geometryInstances to save memory.
+ *
+ * @memberof Primitive.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default true
+ */
+ releaseGeometryInstances: {
+ get: function() {
+ return this._releaseGeometryInstances;
+ }
+ },
+ /**
+ * When true, each geometry instance will only be pickable with {@link Scene#pick}. When false, GPU memory is saved. *
+ *
+ * @memberof Primitive.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default true
+ */
+ allowPicking: {
+ get: function() {
+ return this._allowPicking;
+ }
+ },
+ /**
+ * Determines if the geometry instances will be created and batched on a web worker.
+ *
+ * @memberof Primitive.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default true
+ */
+ asynchronous: {
+ get: function() {
+ return this._asynchronous;
+ }
+ },
+ /**
+ * When true, geometry vertices are compressed, which will save memory.
+ *
+ * @memberof Primitive.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default true
+ */
+ compressVertices: {
+ get: function() {
+ return this._compressVertices;
+ }
+ },
+ /**
+ * Determines if the primitive is complete and ready to render. If this property is
+ * true, the primitive will be rendered the next time that {@link Primitive#update}
+ * is called.
+ *
+ * @memberof Primitive.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @example
+ * // Wait for a primitive to become ready before accessing attributes
+ * const removeListener = scene.postRender.addEventListener(() => {
+ * if (!frustumPrimitive.ready) {
+ * return;
+ * }
+ *
+ * const attributes = primitive.getGeometryInstanceAttributes('an id');
+ * attributes.color = Cesium.ColorGeometryInstanceAttribute.toValue(Cesium.Color.AQUA);
+ *
+ * removeListener();
+ * });
+ */
+ ready: {
+ get: function() {
+ return this._ready;
+ }
+ }
+});
+function getCommonPerInstanceAttributeNames(e) {
+ const t = e.length, n = [], i = e[0].attributes;
+ let r;
+ for (r in i)
+ if (i.hasOwnProperty(r) && defined(i[r])) {
+ const o = i[r];
+ let s = !0;
+ for (let c = 1; c < t; ++c) {
+ const l = e[c].attributes[r];
+ if (!defined(l) || o.componentDatatype !== l.componentDatatype || o.componentsPerAttribute !== l.componentsPerAttribute || o.normalize !== l.normalize) {
+ s = !1;
+ break;
+ }
+ }
+ s && n.push(r);
+ }
+ return n;
+}
+const scratchGetAttributeCartesian2 = new Cartesian2(), scratchGetAttributeCartesian3 = new Cartesian3(), scratchGetAttributeCartesian4 = new Cartesian4();
+function getAttributeValue(e) {
+ const t = e.length;
+ if (t === 1)
+ return e[0];
+ if (t === 2)
+ return Cartesian2.unpack(e, 0, scratchGetAttributeCartesian2);
+ if (t === 3)
+ return Cartesian3.unpack(e, 0, scratchGetAttributeCartesian3);
+ if (t === 4)
+ return Cartesian4.unpack(e, 0, scratchGetAttributeCartesian4);
+}
+function createBatchTable$1(e, t) {
+ const n = e.geometryInstances, i = Array.isArray(n) ? n : [n], r = i.length;
+ if (r === 0)
+ return;
+ const o = getCommonPerInstanceAttributeNames(i), s = o.length, c = [], l = {}, d = {};
+ let f, p = i[0].attributes, m, _, y;
+ for (m = 0; m < s; ++m)
+ _ = o[m], y = p[_], l[_] = m, c.push({
+ functionName: `czm_batchTable_${_}`,
+ componentDatatype: y.componentDatatype,
+ componentsPerAttribute: y.componentsPerAttribute,
+ normalize: y.normalize
+ });
+ o.indexOf("distanceDisplayCondition") !== -1 && (c.push(
+ {
+ functionName: "czm_batchTable_boundingSphereCenter3DHigh",
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 3
+ },
+ {
+ functionName: "czm_batchTable_boundingSphereCenter3DLow",
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 3
+ },
+ {
+ functionName: "czm_batchTable_boundingSphereCenter2DHigh",
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 3
+ },
+ {
+ functionName: "czm_batchTable_boundingSphereCenter2DLow",
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 3
+ },
+ {
+ functionName: "czm_batchTable_boundingSphereRadius",
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 1
+ }
+ ), d.center3DHigh = c.length - 5, d.center3DLow = c.length - 4, d.center2DHigh = c.length - 3, d.center2DLow = c.length - 2, d.radius = c.length - 1), o.indexOf("offset") !== -1 && (c.push({
+ functionName: "czm_batchTable_offset2D",
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 3
+ }), f = c.length - 1), c.push({
+ functionName: "czm_batchTable_pickColor",
+ componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE,
+ componentsPerAttribute: 4,
+ normalize: !0
+ });
+ const C = c.length, T = new BatchTable(t, c, r);
+ for (m = 0; m < r; ++m) {
+ const x = i[m];
+ p = x.attributes;
+ for (let D = 0; D < s; ++D) {
+ _ = o[D], y = p[_];
+ const P = getAttributeValue(y.value), I = l[_];
+ T.setBatchedAttribute(m, I, P);
+ }
+ const b = {
+ primitive: defaultValue(x.pickPrimitive, e)
+ };
+ defined(x.id) && (b.id = x.id);
+ const S = t.createPickId(b);
+ e._pickIds.push(S);
+ const E = S.color, A = scratchGetAttributeCartesian4;
+ A.x = Color.floatToByte(E.red), A.y = Color.floatToByte(E.green), A.z = Color.floatToByte(E.blue), A.w = Color.floatToByte(E.alpha), T.setBatchedAttribute(m, C - 1, A);
+ }
+ e._batchTable = T, e._batchTableAttributeIndices = l, e._batchTableBoundingSphereAttributeIndices = d, e._batchTableOffsetAttribute2DIndex = f;
+}
+function cloneAttribute(e) {
+ let t;
+ return Array.isArray(e.values) ? t = e.values.slice(0) : t = new e.values.constructor(e.values), new GeometryAttribute({
+ componentDatatype: e.componentDatatype,
+ componentsPerAttribute: e.componentsPerAttribute,
+ normalize: e.normalize,
+ values: t
+ });
+}
+function cloneGeometry(e) {
+ const t = e.attributes, n = new GeometryAttributes();
+ for (const r in t)
+ t.hasOwnProperty(r) && defined(t[r]) && (n[r] = cloneAttribute(t[r]));
+ let i;
+ if (defined(e.indices)) {
+ const r = e.indices;
+ Array.isArray(r) ? i = r.slice(0) : i = new r.constructor(r);
+ }
+ return new Geometry({
+ attributes: n,
+ indices: i,
+ primitiveType: e.primitiveType,
+ boundingSphere: BoundingSphere.clone(e.boundingSphere)
+ });
+}
+function cloneInstance(e, t) {
+ return {
+ geometry: t,
+ attributes: e.attributes,
+ modelMatrix: Matrix4.clone(e.modelMatrix),
+ pickPrimitive: e.pickPrimitive,
+ id: e.id
+ };
+}
+const positionRegex = /in\s+vec(?:3|4)\s+(.*)3DHigh;/g;
+Primitive$3._modifyShaderPosition = function(e, t, n) {
+ let i, r = "", o = "", s = "";
+ for (; (i = positionRegex.exec(t)) !== null; ) {
+ const c = i[1], l = `vec4 czm_compute${c[0].toUpperCase()}${c.substr(
+ 1
+ )}()`;
+ l !== "vec4 czm_computePosition()" && (r += `${l};
+`), defined(e.rtcCenter) ? (t = t.replace(
+ /in\s+vec(?:3|4)\s+position3DHigh;/g,
+ ""
+ ), t = t.replace(
+ /in\s+vec(?:3|4)\s+position3DLow;/g,
+ ""
+ ), r += `uniform mat4 u_modifiedModelView;
+`, o += `in vec4 position;
+`, s += `${l}
+{
+ return u_modifiedModelView * position;
+}
+
+`, t = t.replace(
+ /czm_modelViewRelativeToEye\s+\*\s+/g,
+ ""
+ ), t = t.replace(
+ /czm_modelViewProjectionRelativeToEye/g,
+ "czm_projection"
+ )) : n ? s += `${l}
+{
+ return czm_translateRelativeToEye(${c}3DHigh, ${c}3DLow);
+}
+
+` : (o += `in vec3 ${c}2DHigh;
+in vec3 ${c}2DLow;
+`, s += `${l}
+{
+ vec4 p;
+ if (czm_morphTime == 1.0)
+ {
+ p = czm_translateRelativeToEye(${c}3DHigh, ${c}3DLow);
+ }
+ else if (czm_morphTime == 0.0)
+ {
+ p = czm_translateRelativeToEye(${c}2DHigh.zxy, ${c}2DLow.zxy);
+ }
+ else
+ {
+ p = czm_columbusViewMorph(
+ czm_translateRelativeToEye(${c}2DHigh.zxy, ${c}2DLow.zxy),
+ czm_translateRelativeToEye(${c}3DHigh, ${c}3DLow),
+ czm_morphTime);
+ }
+ return p;
+}
+
+`);
+ }
+ return [r, o, t, s].join(
+ `
+`
+ );
+};
+Primitive$3._appendShowToShader = function(e, t) {
+ return defined(e._batchTableAttributeIndices.show) ? `${ShaderSource.replaceMain(
+ t,
+ "czm_non_show_main"
+ )}
+void main()
+{
+ czm_non_show_main();
+ gl_Position *= czm_batchTable_show(batchId);
+}` : t;
+};
+Primitive$3._updateColorAttribute = function(e, t, n) {
+ if (!defined(e._batchTableAttributeIndices.color) && !defined(e._batchTableAttributeIndices.depthFailColor) || t.search(/in\s+vec4\s+color;/g) === -1)
+ return t;
+ let i = t;
+ return i = i.replace(/in\s+vec4\s+color;/g, ""), n ? i = i.replace(
+ /(\b)color(\b)/g,
+ "$1czm_batchTable_depthFailColor(batchId)$2"
+ ) : i = i.replace(
+ /(\b)color(\b)/g,
+ "$1czm_batchTable_color(batchId)$2"
+ ), i;
+};
+function appendPickToVertexShader(e) {
+ return `${ShaderSource.replaceMain(e, "czm_non_pick_main")}
+out vec4 v_pickColor;
+void main()
+{
+ czm_non_pick_main();
+ v_pickColor = czm_batchTable_pickColor(batchId);
+}`;
+}
+function appendPickToFragmentShader(e) {
+ return `in vec4 v_pickColor;
+${e}`;
+}
+Primitive$3._updatePickColorAttribute = function(e) {
+ let t = e.replace(/in\s+vec4\s+pickColor;/g, "");
+ return t = t.replace(
+ /(\b)pickColor(\b)/g,
+ "$1czm_batchTable_pickColor(batchId)$2"
+ ), t;
+};
+Primitive$3._appendOffsetToShader = function(e, t) {
+ if (!defined(e._batchTableAttributeIndices.offset))
+ return t;
+ let n = `in float batchId;
+`;
+ n += "in float applyOffset;";
+ let i = t.replace(
+ /in\s+float\s+batchId;/g,
+ n
+ ), r = `vec4 $1 = czm_computePosition();
+`;
+ return r += ` if (czm_sceneMode == czm_sceneMode3D)
+`, r += ` {
+`, r += " $1 = $1 + vec4(czm_batchTable_offset(batchId) * applyOffset, 0.0);", r += ` }
+`, r += ` else
+`, r += ` {
+`, r += " $1 = $1 + vec4(czm_batchTable_offset2D(batchId) * applyOffset, 0.0);", r += ` }
+`, i = i.replace(
+ /vec4\s+([A-Za-z0-9_]+)\s+=\s+czm_computePosition\(\);/g,
+ r
+ ), i;
+};
+Primitive$3._appendDistanceDisplayConditionToShader = function(e, t, n) {
+ if (!defined(e._batchTableAttributeIndices.distanceDisplayCondition))
+ return t;
+ const i = ShaderSource.replaceMain(
+ t,
+ "czm_non_distanceDisplayCondition_main"
+ );
+ let r = `void main()
+{
+ czm_non_distanceDisplayCondition_main();
+ vec2 distanceDisplayCondition = czm_batchTable_distanceDisplayCondition(batchId);
+ vec3 boundingSphereCenter3DHigh = czm_batchTable_boundingSphereCenter3DHigh(batchId);
+ vec3 boundingSphereCenter3DLow = czm_batchTable_boundingSphereCenter3DLow(batchId);
+ float boundingSphereRadius = czm_batchTable_boundingSphereRadius(batchId);
+`;
+ return n ? r += ` vec4 centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);
+` : r += ` vec3 boundingSphereCenter2DHigh = czm_batchTable_boundingSphereCenter2DHigh(batchId);
+ vec3 boundingSphereCenter2DLow = czm_batchTable_boundingSphereCenter2DLow(batchId);
+ vec4 centerRTE;
+ if (czm_morphTime == 1.0)
+ {
+ centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);
+ }
+ else if (czm_morphTime == 0.0)
+ {
+ centerRTE = czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy);
+ }
+ else
+ {
+ centerRTE = czm_columbusViewMorph(
+ czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy),
+ czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow),
+ czm_morphTime);
+ }
+`, r += ` float radiusSq = boundingSphereRadius * boundingSphereRadius;
+ float distanceSq;
+ if (czm_sceneMode == czm_sceneMode2D)
+ {
+ distanceSq = czm_eyeHeight2D.y - radiusSq;
+ }
+ else
+ {
+ distanceSq = dot(centerRTE.xyz, centerRTE.xyz) - radiusSq;
+ }
+ distanceSq = max(distanceSq, 0.0);
+ float nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x;
+ float farSq = distanceDisplayCondition.y * distanceDisplayCondition.y;
+ float show = (distanceSq >= nearSq && distanceSq <= farSq) ? 1.0 : 0.0;
+ gl_Position *= show;
+}`, `${i}
+${r}`;
+};
+function modifyForEncodedNormals$1(e, t) {
+ if (!e.compressVertices)
+ return t;
+ const n = t.search(/in\s+vec3\s+normal;/g) !== -1, i = t.search(/in\s+vec2\s+st;/g) !== -1;
+ if (!n && !i)
+ return t;
+ const r = t.search(/in\s+vec3\s+tangent;/g) !== -1, o = t.search(/in\s+vec3\s+bitangent;/g) !== -1;
+ let s = i && n ? 2 : 1;
+ s += r || o ? 1 : 0;
+ const c = s > 1 ? `vec${s}` : "float", l = "compressedAttributes", d = `in ${c} ${l};`;
+ let f = "", h = "";
+ if (i) {
+ f += `vec2 st;
+`;
+ const _ = s > 1 ? `${l}.x` : l;
+ h += ` st = czm_decompressTextureCoordinates(${_});
+`;
+ }
+ n && r && o ? (f += `vec3 normal;
+vec3 tangent;
+vec3 bitangent;
+`, h += ` czm_octDecode(${l}.${i ? "yz" : "xy"}, normal, tangent, bitangent);
+`) : (n && (f += `vec3 normal;
+`, h += ` normal = czm_octDecode(${l}${s > 1 ? `.${i ? "y" : "x"}` : ""});
+`), r && (f += `vec3 tangent;
+`, h += ` tangent = czm_octDecode(${l}.${i && n ? "z" : "y"});
+`), o && (f += `vec3 bitangent;
+`, h += ` bitangent = czm_octDecode(${l}.${i && n ? "z" : "y"});
+`));
+ let p = t;
+ p = p.replace(/in\s+vec3\s+normal;/g, ""), p = p.replace(/in\s+vec2\s+st;/g, ""), p = p.replace(/in\s+vec3\s+tangent;/g, ""), p = p.replace(/in\s+vec3\s+bitangent;/g, ""), p = ShaderSource.replaceMain(p, "czm_non_compressed_main");
+ const m = `void main()
+{
+${h} czm_non_compressed_main();
+}`;
+ return [d, f, p, m].join(`
+`);
+}
+function depthClampVS(e) {
+ let t = ShaderSource.replaceMain(
+ e,
+ "czm_non_depth_clamp_main"
+ );
+ return t += `void main() {
+ czm_non_depth_clamp_main();
+ gl_Position = czm_depthClamp(gl_Position);}
+`, t;
+}
+function depthClampFS(e) {
+ let t = ShaderSource.replaceMain(
+ e,
+ "czm_non_depth_clamp_main"
+ );
+ return t += `void main() {
+ czm_non_depth_clamp_main();
+ #if defined(LOG_DEPTH)
+ czm_writeLogDepth();
+ #else
+ czm_writeDepthClamp();
+ #endif
+}
+`, t;
+}
+function validateShaderMatching(e, t) {
+ e.vertexAttributes;
+}
+function getUniformFunction(e, t) {
+ return function() {
+ return e[t];
+ };
+}
+const numberOfCreationWorkers = Math.max(
+ FeatureDetection.hardwareConcurrency - 1,
+ 1
+);
+let createGeometryTaskProcessors;
+const combineGeometryTaskProcessor = new TaskProcessor("combineGeometry");
+function loadAsynchronous(e, t) {
+ let n, i, r, o;
+ const s = e._instanceIds;
+ if (e._state === PrimitiveState$1.READY) {
+ n = Array.isArray(e.geometryInstances) ? e.geometryInstances : [e.geometryInstances];
+ const c = e._numberOfInstances = n.length, l = [];
+ let d = [];
+ for (r = 0; r < c; ++r)
+ i = n[r].geometry, s.push(n[r].id), d.push({
+ moduleName: i._workerName,
+ modulePath: i._workerPath,
+ geometry: i
+ });
+ if (!defined(createGeometryTaskProcessors))
+ for (createGeometryTaskProcessors = new Array(numberOfCreationWorkers), r = 0; r < numberOfCreationWorkers; r++)
+ createGeometryTaskProcessors[r] = new TaskProcessor("createGeometry");
+ let f;
+ for (d = subdivideArray(d, numberOfCreationWorkers), r = 0; r < d.length; r++) {
+ let h = 0;
+ const p = d[r], m = p.length;
+ for (o = 0; o < m; ++o)
+ f = p[o], i = f.geometry, defined(i.constructor.pack) && (f.offset = h, h += defaultValue(
+ i.constructor.packedLength,
+ i.packedLength
+ ));
+ let _;
+ if (h > 0) {
+ const y = new Float64Array(h);
+ for (_ = [y.buffer], o = 0; o < m; ++o)
+ f = p[o], i = f.geometry, defined(i.constructor.pack) && (i.constructor.pack(i, y, f.offset), f.geometry = y);
+ }
+ l.push(
+ createGeometryTaskProcessors[r].scheduleTask(
+ {
+ subTasks: d[r]
+ },
+ _
+ )
+ );
+ }
+ e._state = PrimitiveState$1.CREATING, Promise.all(l).then(function(h) {
+ e._createGeometryResults = h, e._state = PrimitiveState$1.CREATED;
+ }).catch(function(h) {
+ setReady(e, t, PrimitiveState$1.FAILED, h);
+ });
+ } else if (e._state === PrimitiveState$1.CREATED) {
+ const c = [];
+ n = Array.isArray(e.geometryInstances) ? e.geometryInstances : [e.geometryInstances];
+ const l = t.scene3DOnly, d = t.mapProjection, f = combineGeometryTaskProcessor.scheduleTask(
+ PrimitivePipeline.packCombineGeometryParameters(
+ {
+ createGeometryResults: e._createGeometryResults,
+ instances: n,
+ ellipsoid: d.ellipsoid,
+ projection: d,
+ elementIndexUintSupported: t.context.elementIndexUint,
+ scene3DOnly: l,
+ vertexCacheOptimize: e.vertexCacheOptimize,
+ compressVertices: e.compressVertices,
+ modelMatrix: e.modelMatrix,
+ createPickOffsets: e._createPickOffsets
+ },
+ c
+ ),
+ c
+ );
+ e._createGeometryResults = void 0, e._state = PrimitiveState$1.COMBINING, Promise.resolve(f).then(function(h) {
+ const p = PrimitivePipeline.unpackCombineGeometryResults(
+ h
+ );
+ e._geometries = p.geometries, e._attributeLocations = p.attributeLocations, e.modelMatrix = Matrix4.clone(
+ p.modelMatrix,
+ e.modelMatrix
+ ), e._pickOffsets = p.pickOffsets, e._offsetInstanceExtend = p.offsetInstanceExtend, e._instanceBoundingSpheres = p.boundingSpheres, e._instanceBoundingSpheresCV = p.boundingSpheresCV, defined(e._geometries) && e._geometries.length > 0 ? (e._recomputeBoundingSpheres = !0, e._state = PrimitiveState$1.COMBINED) : setReady(e, t, PrimitiveState$1.FAILED, void 0);
+ }).catch(function(h) {
+ setReady(e, t, PrimitiveState$1.FAILED, h);
+ });
+ }
+}
+function loadSynchronous(e, t) {
+ const n = Array.isArray(e.geometryInstances) ? e.geometryInstances : [e.geometryInstances], i = e._numberOfInstances = n.length, r = new Array(i), o = e._instanceIds;
+ let s, c, l = 0;
+ for (c = 0; c < i; c++) {
+ s = n[c];
+ const p = s.geometry;
+ let m;
+ defined(p.attributes) && defined(p.primitiveType) ? m = cloneGeometry(p) : m = p.constructor.createGeometry(p), r[l++] = cloneInstance(s, m), o.push(s.id);
+ }
+ r.length = l;
+ const d = t.scene3DOnly, f = t.mapProjection, h = PrimitivePipeline.combineGeometry({
+ instances: r,
+ ellipsoid: f.ellipsoid,
+ projection: f,
+ elementIndexUintSupported: t.context.elementIndexUint,
+ scene3DOnly: d,
+ vertexCacheOptimize: e.vertexCacheOptimize,
+ compressVertices: e.compressVertices,
+ modelMatrix: e.modelMatrix,
+ createPickOffsets: e._createPickOffsets
+ });
+ e._geometries = h.geometries, e._attributeLocations = h.attributeLocations, e.modelMatrix = Matrix4.clone(
+ h.modelMatrix,
+ e.modelMatrix
+ ), e._pickOffsets = h.pickOffsets, e._offsetInstanceExtend = h.offsetInstanceExtend, e._instanceBoundingSpheres = h.boundingSpheres, e._instanceBoundingSpheresCV = h.boundingSpheresCV, defined(e._geometries) && e._geometries.length > 0 ? (e._recomputeBoundingSpheres = !0, e._state = PrimitiveState$1.COMBINED) : setReady(e, t, PrimitiveState$1.FAILED, void 0);
+}
+function recomputeBoundingSpheres(e, t) {
+ const n = e._batchTableAttributeIndices.offset;
+ if (!e._recomputeBoundingSpheres || !defined(n)) {
+ e._recomputeBoundingSpheres = !1;
+ return;
+ }
+ let i;
+ const r = e._offsetInstanceExtend, o = e._instanceBoundingSpheres, s = o.length;
+ let c = e._tempBoundingSpheres;
+ if (!defined(c)) {
+ for (c = new Array(s), i = 0; i < s; i++)
+ c[i] = new BoundingSphere();
+ e._tempBoundingSpheres = c;
+ }
+ for (i = 0; i < s; ++i) {
+ let y = c[i];
+ const C = e._batchTable.getBatchedAttribute(
+ i,
+ n,
+ new Cartesian3()
+ );
+ y = o[i].clone(y), transformBoundingSphere(y, C, r[i]);
+ }
+ const l = [], d = [], f = [];
+ for (i = 0; i < s; ++i) {
+ const y = c[i];
+ y.center.x - y.radius > 0 || BoundingSphere.intersectPlane(y, Plane.ORIGIN_ZX_PLANE) !== Intersect$1.INTERSECTING ? l.push(y) : (d.push(y), f.push(y));
+ }
+ let h = l[0], p = f[0], m = d[0];
+ for (i = 1; i < l.length; i++)
+ h = BoundingSphere.union(h, l[i]);
+ for (i = 1; i < f.length; i++)
+ p = BoundingSphere.union(p, f[i]);
+ for (i = 1; i < d.length; i++)
+ m = BoundingSphere.union(m, d[i]);
+ const _ = [];
+ for (defined(h) && _.push(h), defined(p) && _.push(p), defined(m) && _.push(m), i = 0; i < _.length; i++) {
+ const y = _[i].clone(e._boundingSpheres[i]);
+ e._boundingSpheres[i] = y, e._boundingSphereCV[i] = BoundingSphere.projectTo2D(
+ y,
+ t.mapProjection,
+ e._boundingSphereCV[i]
+ );
+ }
+ Primitive$3._updateBoundingVolumes(
+ e,
+ t,
+ e.modelMatrix,
+ !0
+ ), e._recomputeBoundingSpheres = !1;
+}
+const scratchBoundingSphereCenterEncoded = new EncodedCartesian3(), scratchBoundingSphereCartographic = new Cartographic(), scratchBoundingSphereCenter2D = new Cartesian3(), scratchBoundingSphere$3 = new BoundingSphere();
+function updateBatchTableBoundingSpheres(e, t) {
+ if (!defined(
+ e._batchTableAttributeIndices.distanceDisplayCondition
+ ) || e._batchTableBoundingSpheresUpdated)
+ return;
+ const i = e._batchTableBoundingSphereAttributeIndices, r = i.center3DHigh, o = i.center3DLow, s = i.center2DHigh, c = i.center2DLow, l = i.radius, d = t.mapProjection, f = d.ellipsoid, h = e._batchTable, p = e._instanceBoundingSpheres, m = p.length;
+ for (let _ = 0; _ < m; ++_) {
+ let y = p[_];
+ if (!defined(y))
+ continue;
+ const C = e.modelMatrix;
+ defined(C) && (y = BoundingSphere.transform(
+ y,
+ C,
+ scratchBoundingSphere$3
+ ));
+ const T = y.center, x = y.radius;
+ let b = EncodedCartesian3.fromCartesian(
+ T,
+ scratchBoundingSphereCenterEncoded
+ );
+ if (h.setBatchedAttribute(_, r, b.high), h.setBatchedAttribute(_, o, b.low), !t.scene3DOnly) {
+ const S = f.cartesianToCartographic(
+ T,
+ scratchBoundingSphereCartographic
+ ), E = d.project(
+ S,
+ scratchBoundingSphereCenter2D
+ );
+ b = EncodedCartesian3.fromCartesian(
+ E,
+ scratchBoundingSphereCenterEncoded
+ ), h.setBatchedAttribute(_, s, b.high), h.setBatchedAttribute(_, c, b.low);
+ }
+ h.setBatchedAttribute(_, l, x);
+ }
+ e._batchTableBoundingSpheresUpdated = !0;
+}
+const offsetScratchCartesian = new Cartesian3(), offsetCenterScratch = new Cartesian3();
+function updateBatchTableOffsets(e, t) {
+ if (!defined(e._batchTableAttributeIndices.offset) || e._batchTableOffsetsUpdated || t.scene3DOnly)
+ return;
+ const i = e._batchTableOffsetAttribute2DIndex, r = t.mapProjection, o = r.ellipsoid, s = e._batchTable, c = e._instanceBoundingSpheres, l = c.length;
+ for (let d = 0; d < l; ++d) {
+ let f = c[d];
+ if (!defined(f))
+ continue;
+ const h = s.getBatchedAttribute(
+ d,
+ e._batchTableAttributeIndices.offset
+ );
+ if (Cartesian3.equals(h, Cartesian3.ZERO)) {
+ s.setBatchedAttribute(d, i, Cartesian3.ZERO);
+ continue;
+ }
+ const p = e.modelMatrix;
+ defined(p) && (f = BoundingSphere.transform(
+ f,
+ p,
+ scratchBoundingSphere$3
+ ));
+ let m = f.center;
+ m = o.scaleToGeodeticSurface(m, offsetCenterScratch);
+ let _ = o.cartesianToCartographic(
+ m,
+ scratchBoundingSphereCartographic
+ );
+ const y = r.project(
+ _,
+ scratchBoundingSphereCenter2D
+ ), C = Cartesian3.add(h, m, offsetScratchCartesian);
+ _ = o.cartesianToCartographic(C, _);
+ const T = r.project(
+ _,
+ offsetScratchCartesian
+ ), x = Cartesian3.subtract(
+ T,
+ y,
+ offsetScratchCartesian
+ ), b = x.x;
+ x.x = x.z, x.z = x.y, x.y = b, s.setBatchedAttribute(d, i, x);
+ }
+ e._batchTableOffsetsUpdated = !0;
+}
+function createVertexArray$4(e, t) {
+ const n = e._attributeLocations, i = e._geometries, r = t.scene3DOnly, o = t.context, s = [], c = i.length;
+ for (let l = 0; l < c; ++l) {
+ const d = i[l];
+ if (s.push(
+ VertexArray.fromGeometry({
+ context: o,
+ geometry: d,
+ attributeLocations: n,
+ bufferUsage: BufferUsage$1.STATIC_DRAW,
+ interleave: e._interleave
+ })
+ ), defined(e._createBoundingVolumeFunction))
+ e._createBoundingVolumeFunction(t, d);
+ else if (e._boundingSpheres.push(
+ BoundingSphere.clone(d.boundingSphere)
+ ), e._boundingSphereWC.push(new BoundingSphere()), !r) {
+ const f = d.boundingSphereCV.center, h = f.x, p = f.y, m = f.z;
+ f.x = m, f.y = h, f.z = p, e._boundingSphereCV.push(
+ BoundingSphere.clone(d.boundingSphereCV)
+ ), e._boundingSphere2D.push(new BoundingSphere()), e._boundingSphereMorph.push(new BoundingSphere());
+ }
+ }
+ e._va = s, e._primitiveType = i[0].primitiveType, e.releaseGeometryInstances && (e.geometryInstances = void 0), e._geometries = void 0, setReady(e, t, PrimitiveState$1.COMPLETE, void 0);
+}
+function createRenderStates$5(e, t, n, i) {
+ let r = n.getRenderState(), o;
+ i ? (o = clone$1(r, !1), o.cull = {
+ enabled: !0,
+ face: CullFace$1.BACK
+ }, e._frontFaceRS = RenderState.fromCache(o), o.cull.face = CullFace$1.FRONT, e._backFaceRS = RenderState.fromCache(o)) : (e._frontFaceRS = RenderState.fromCache(r), e._backFaceRS = e._frontFaceRS), o = clone$1(r, !1), defined(e._depthFailAppearance) && (o.depthTest.enabled = !1), defined(e._depthFailAppearance) && (r = e._depthFailAppearance.getRenderState(), o = clone$1(r, !1), o.depthTest.func = DepthFunction$1.GREATER, i ? (o.cull = {
+ enabled: !0,
+ face: CullFace$1.BACK
+ }, e._frontFaceDepthFailRS = RenderState.fromCache(o), o.cull.face = CullFace$1.FRONT, e._backFaceDepthFailRS = RenderState.fromCache(o)) : (e._frontFaceDepthFailRS = RenderState.fromCache(o), e._backFaceDepthFailRS = e._frontFaceRS));
+}
+function createShaderProgram$3(e, t, n) {
+ const i = t.context, r = e._attributeLocations;
+ let o = e._batchTable.getVertexShaderCallback()(
+ n.vertexShaderSource
+ );
+ o = Primitive$3._appendOffsetToShader(e, o), o = Primitive$3._appendShowToShader(e, o), o = Primitive$3._appendDistanceDisplayConditionToShader(
+ e,
+ o,
+ t.scene3DOnly
+ ), o = appendPickToVertexShader(o), o = Primitive$3._updateColorAttribute(e, o, !1), o = modifyForEncodedNormals$1(e, o), o = Primitive$3._modifyShaderPosition(e, o, t.scene3DOnly);
+ let s = n.getFragmentShaderSource();
+ s = appendPickToFragmentShader(s), e._sp = ShaderProgram.replaceCache({
+ context: i,
+ shaderProgram: e._sp,
+ vertexShaderSource: o,
+ fragmentShaderSource: s,
+ attributeLocations: r
+ }), validateShaderMatching(e._sp), defined(e._depthFailAppearance) && (o = e._batchTable.getVertexShaderCallback()(
+ e._depthFailAppearance.vertexShaderSource
+ ), o = Primitive$3._appendShowToShader(e, o), o = Primitive$3._appendDistanceDisplayConditionToShader(
+ e,
+ o,
+ t.scene3DOnly
+ ), o = appendPickToVertexShader(o), o = Primitive$3._updateColorAttribute(e, o, !0), o = modifyForEncodedNormals$1(e, o), o = Primitive$3._modifyShaderPosition(e, o, t.scene3DOnly), o = depthClampVS(o), s = e._depthFailAppearance.getFragmentShaderSource(), s = appendPickToFragmentShader(s), s = depthClampFS(s), e._spDepthFail = ShaderProgram.replaceCache({
+ context: i,
+ shaderProgram: e._spDepthFail,
+ vertexShaderSource: o,
+ fragmentShaderSource: s,
+ attributeLocations: r
+ }), validateShaderMatching(e._spDepthFail));
+}
+const modifiedModelViewScratch$4 = new Matrix4(), rtcScratch$4 = new Cartesian3();
+function getUniforms(e, t, n, i) {
+ const r = defined(n) ? n._uniforms : void 0, o = {}, s = t.uniforms;
+ if (defined(s))
+ for (const l in s)
+ s.hasOwnProperty(l) && (o[l] = getUniformFunction(
+ s,
+ l
+ ));
+ let c = combine$2(o, r);
+ return c = e._batchTable.getUniformMapCallback()(c), defined(e.rtcCenter) && (c.u_modifiedModelView = function() {
+ const l = i.context.uniformState.view;
+ return Matrix4.multiply(
+ l,
+ e._modelMatrix,
+ modifiedModelViewScratch$4
+ ), Matrix4.multiplyByPoint(
+ modifiedModelViewScratch$4,
+ e.rtcCenter,
+ rtcScratch$4
+ ), Matrix4.setTranslation(
+ modifiedModelViewScratch$4,
+ rtcScratch$4,
+ modifiedModelViewScratch$4
+ ), modifiedModelViewScratch$4;
+ }), c;
+}
+function createCommands$4(e, t, n, i, r, o, s, c) {
+ const l = getUniforms(e, t, n, c);
+ let d;
+ defined(e._depthFailAppearance) && (d = getUniforms(
+ e,
+ e._depthFailAppearance,
+ e._depthFailAppearance.material,
+ c
+ ));
+ const f = i ? Pass$1.TRANSLUCENT : Pass$1.OPAQUE;
+ let h = r ? 2 : 1;
+ h *= defined(e._depthFailAppearance) ? 2 : 1, o.length = e._va.length * h;
+ const p = o.length;
+ let m = 0;
+ for (let _ = 0; _ < p; ++_) {
+ let y;
+ r && (y = o[_], defined(y) || (y = o[_] = new DrawCommand({
+ owner: e,
+ primitiveType: e._primitiveType
+ })), y.vertexArray = e._va[m], y.renderState = e._backFaceRS, y.shaderProgram = e._sp, y.uniformMap = l, y.pass = f, ++_), y = o[_], defined(y) || (y = o[_] = new DrawCommand({
+ owner: e,
+ primitiveType: e._primitiveType
+ })), y.vertexArray = e._va[m], y.renderState = e._frontFaceRS, y.shaderProgram = e._sp, y.uniformMap = l, y.pass = f, defined(e._depthFailAppearance) && (r && (++_, y = o[_], defined(y) || (y = o[_] = new DrawCommand({
+ owner: e,
+ primitiveType: e._primitiveType
+ })), y.vertexArray = e._va[m], y.renderState = e._backFaceDepthFailRS, y.shaderProgram = e._spDepthFail, y.uniformMap = d, y.pass = f), ++_, y = o[_], defined(y) || (y = o[_] = new DrawCommand({
+ owner: e,
+ primitiveType: e._primitiveType
+ })), y.vertexArray = e._va[m], y.renderState = e._frontFaceDepthFailRS, y.shaderProgram = e._spDepthFail, y.uniformMap = d, y.pass = f), ++m;
+ }
+}
+Primitive$3._updateBoundingVolumes = function(e, t, n, i) {
+ let r, o, s;
+ if (i || !Matrix4.equals(n, e._modelMatrix))
+ for (Matrix4.clone(n, e._modelMatrix), o = e._boundingSpheres.length, r = 0; r < o; ++r)
+ s = e._boundingSpheres[r], defined(s) && (e._boundingSphereWC[r] = BoundingSphere.transform(
+ s,
+ n,
+ e._boundingSphereWC[r]
+ ), t.scene3DOnly || (e._boundingSphere2D[r] = BoundingSphere.clone(
+ e._boundingSphereCV[r],
+ e._boundingSphere2D[r]
+ ), e._boundingSphere2D[r].center.x = 0, e._boundingSphereMorph[r] = BoundingSphere.union(
+ e._boundingSphereWC[r],
+ e._boundingSphereCV[r]
+ )));
+ const c = e.appearance.pixelSize;
+ if (defined(c))
+ for (o = e._boundingSpheres.length, r = 0; r < o; ++r) {
+ s = e._boundingSpheres[r];
+ const l = e._boundingSphereWC[r], f = t.camera.getPixelSize(
+ s,
+ t.context.drawingBufferWidth,
+ t.context.drawingBufferHeight
+ ) * c;
+ l.radius = s.radius + f;
+ }
+};
+function updateAndQueueCommands$3(e, t, n, i, r, o, s, c) {
+ Primitive$3._updateBoundingVolumes(e, t, r);
+ let l;
+ t.mode === SceneMode$1.SCENE3D ? l = e._boundingSphereWC : t.mode === SceneMode$1.COLUMBUS_VIEW ? l = e._boundingSphereCV : t.mode === SceneMode$1.SCENE2D && defined(e._boundingSphere2D) ? l = e._boundingSphere2D : defined(e._boundingSphereMorph) && (l = e._boundingSphereMorph);
+ const d = t.commandList, f = t.passes;
+ if (f.render || f.pick) {
+ const h = e.allowPicking, p = ShadowMode$1.castShadows(e.shadows), m = ShadowMode$1.receiveShadows(e.shadows), _ = n.length;
+ let y = c ? 2 : 1;
+ y *= defined(e._depthFailAppearance) ? 2 : 1;
+ for (let C = 0; C < _; ++C) {
+ const T = Math.floor(C / y), x = n[C];
+ x.modelMatrix = r, x.boundingVolume = l[T], x.cull = o, x.debugShowBoundingVolume = s, x.castShadows = p, x.receiveShadows = m, h ? x.pickId = "v_pickColor" : x.pickId = void 0, d.push(x);
+ }
+ }
+}
+Primitive$3.prototype.update = function(e) {
+ if (!defined(this.geometryInstances) && this._va.length === 0 || defined(this.geometryInstances) && Array.isArray(this.geometryInstances) && this.geometryInstances.length === 0 || !defined(this.appearance) || e.mode !== SceneMode$1.SCENE3D && e.scene3DOnly || !e.passes.render && !e.passes.pick)
+ return;
+ if (defined(this._error))
+ throw this._error;
+ if (this._state === PrimitiveState$1.FAILED)
+ return;
+ const t = e.context;
+ if (defined(this._batchTable) || createBatchTable$1(this, t), this._batchTable.attributes.length > 0) {
+ if (ContextLimits.maximumVertexTextureImageUnits === 0)
+ throw new RuntimeError(
+ "Vertex texture fetch support is required to render primitives with per-instance attributes. The maximum number of vertex texture image units must be greater than zero."
+ );
+ this._batchTable.update(e);
+ }
+ if (this._state !== PrimitiveState$1.COMPLETE && this._state !== PrimitiveState$1.COMBINED && (this.asynchronous ? loadAsynchronous(this, e) : loadSynchronous(this, e)), this._state === PrimitiveState$1.COMBINED && (updateBatchTableBoundingSpheres(this, e), updateBatchTableOffsets(this, e), createVertexArray$4(this, e)), !this.show || this._state !== PrimitiveState$1.COMPLETE)
+ return;
+ this._batchTableOffsetsUpdated || updateBatchTableOffsets(this, e), this._recomputeBoundingSpheres && recomputeBoundingSpheres(this, e);
+ const n = this.appearance, i = n.material;
+ let r = !1, o = !1;
+ this._appearance !== n ? (this._appearance = n, this._material = i, r = !0, o = !0) : this._material !== i && (this._material = i, o = !0);
+ const s = this.depthFailAppearance, c = defined(s) ? s.material : void 0;
+ this._depthFailAppearance !== s ? (this._depthFailAppearance = s, this._depthFailMaterial = c, r = !0, o = !0) : this._depthFailMaterial !== c && (this._depthFailMaterial = c, o = !0);
+ const l = this._appearance.isTranslucent();
+ this._translucent !== l && (this._translucent = l, r = !0), defined(this._material) && this._material.update(t);
+ const d = n.closed && l;
+ r && defaultValue(
+ this._createRenderStatesFunction,
+ createRenderStates$5
+ )(this, t, n, d), o && defaultValue(
+ this._createShaderProgramFunction,
+ createShaderProgram$3
+ )(this, e, n), (r || o) && defaultValue(
+ this._createCommandsFunction,
+ createCommands$4
+ )(
+ this,
+ n,
+ i,
+ l,
+ d,
+ this._colorCommands,
+ this._pickCommands,
+ e
+ ), defaultValue(
+ this._updateAndQueueCommandsFunction,
+ updateAndQueueCommands$3
+ )(
+ this,
+ e,
+ this._colorCommands,
+ this._pickCommands,
+ this.modelMatrix,
+ this.cull,
+ this.debugShowBoundingVolume,
+ d
+ );
+};
+const offsetBoundingSphereScratch1 = new BoundingSphere(), offsetBoundingSphereScratch2 = new BoundingSphere();
+function transformBoundingSphere(e, t, n) {
+ if (n === GeometryOffsetAttribute$1.TOP) {
+ const i = BoundingSphere.clone(
+ e,
+ offsetBoundingSphereScratch1
+ ), r = BoundingSphere.clone(
+ e,
+ offsetBoundingSphereScratch2
+ );
+ r.center = Cartesian3.add(r.center, t, r.center), e = BoundingSphere.union(i, r, e);
+ } else n === GeometryOffsetAttribute$1.ALL && (e.center = Cartesian3.add(
+ e.center,
+ t,
+ e.center
+ ));
+ return e;
+}
+function createGetFunction(e, t, n) {
+ return function() {
+ const i = e.getBatchedAttribute(
+ t,
+ n
+ ), r = e.attributes[n], o = r.componentsPerAttribute, s = ComponentDatatype$1.createTypedArray(
+ r.componentDatatype,
+ o
+ );
+ return defined(i.constructor.pack) ? i.constructor.pack(i, s, 0) : s[0] = i, s;
+ };
+}
+function createSetFunction(e, t, n, i, r) {
+ return function(o) {
+ const s = getAttributeValue(o);
+ e.setBatchedAttribute(
+ t,
+ n,
+ s
+ ), r === "offset" && (i._recomputeBoundingSpheres = !0, i._batchTableOffsetsUpdated = !1);
+ };
+}
+const offsetScratch$b = new Cartesian3();
+function createBoundingSphereProperties(e, t, n) {
+ t.boundingSphere = {
+ get: function() {
+ let i = e._instanceBoundingSpheres[n];
+ if (defined(i)) {
+ i = i.clone();
+ const r = e.modelMatrix, o = t.offset;
+ defined(o) && transformBoundingSphere(
+ i,
+ Cartesian3.fromArray(o.get(), 0, offsetScratch$b),
+ e._offsetInstanceExtend[n]
+ ), defined(r) && (i = BoundingSphere.transform(
+ i,
+ r
+ ));
+ }
+ return i;
+ }
+ }, t.boundingSphereCV = {
+ get: function() {
+ return e._instanceBoundingSpheresCV[n];
+ }
+ };
+}
+function createPickIdProperty(e, t, n) {
+ t.pickId = {
+ get: function() {
+ return e._pickIds[n];
+ }
+ };
+}
+Primitive$3.prototype.getGeometryInstanceAttributes = function(e) {
+ let t = this._perInstanceAttributeCache.get(e);
+ if (defined(t))
+ return t;
+ let n = -1;
+ const i = this._lastPerInstanceAttributeIndex, r = this._instanceIds, o = r.length;
+ for (let d = 0; d < o; ++d) {
+ const f = (i + d) % o;
+ if (e === r[f]) {
+ n = f;
+ break;
+ }
+ }
+ if (n === -1)
+ return;
+ const s = this._batchTable, c = this._batchTableAttributeIndices;
+ t = {};
+ const l = {};
+ for (const d in c)
+ if (c.hasOwnProperty(d)) {
+ const f = c[d];
+ l[d] = {
+ get: createGetFunction(s, n, f),
+ set: createSetFunction(s, n, f, this, d)
+ };
+ }
+ return createBoundingSphereProperties(this, l, n), createPickIdProperty(this, l, n), Object.defineProperties(t, l), this._lastPerInstanceAttributeIndex = n, this._perInstanceAttributeCache.set(e, t), t;
+};
+Primitive$3.prototype.isDestroyed = function() {
+ return !1;
+};
+Primitive$3.prototype.destroy = function() {
+ let e, t;
+ this._sp = this._sp && this._sp.destroy(), this._spDepthFail = this._spDepthFail && this._spDepthFail.destroy();
+ const n = this._va;
+ for (e = n.length, t = 0; t < e; ++t)
+ n[t].destroy();
+ this._va = void 0;
+ const i = this._pickIds;
+ for (e = i.length, t = 0; t < e; ++t)
+ i[t].destroy();
+ return this._pickIds = void 0, this._batchTable = this._batchTable && this._batchTable.destroy(), this._instanceIds = void 0, this._perInstanceAttributeCache = void 0, this._attributeLocations = void 0, destroyObject(this);
+};
+function setReady(e, t, n, i) {
+ e._error = i, e._state = n, t.afterRender.push(function() {
+ e._ready = e._state === PrimitiveState$1.COMPLETE || e._state === PrimitiveState$1.FAILED;
+ });
+}
+function GeometryInstanceAttribute(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this.componentDatatype = e.componentDatatype, this.componentsPerAttribute = e.componentsPerAttribute, this.normalize = defaultValue(e.normalize, !1), this.value = e.value;
+}
+const ShadowVolumeAppearanceFS = `#ifdef TEXTURE_COORDINATES
+#ifdef SPHERICAL
+in vec4 v_sphericalExtents;
+#else // SPHERICAL
+in vec2 v_inversePlaneExtents;
+in vec4 v_westPlane;
+in vec4 v_southPlane;
+#endif // SPHERICAL
+in vec3 v_uvMinAndSphericalLongitudeRotation;
+in vec3 v_uMaxAndInverseDistance;
+in vec3 v_vMaxAndInverseDistance;
+#endif // TEXTURE_COORDINATES
+
+#ifdef PER_INSTANCE_COLOR
+in vec4 v_color;
+#endif
+
+#ifdef NORMAL_EC
+vec3 getEyeCoordinate3FromWindowCoordinate(vec2 fragCoord, float logDepthOrDepth) {
+ vec4 eyeCoordinate = czm_windowToEyeCoordinates(fragCoord, logDepthOrDepth);
+ return eyeCoordinate.xyz / eyeCoordinate.w;
+}
+
+vec3 vectorFromOffset(vec4 eyeCoordinate, vec2 positiveOffset) {
+ vec2 glFragCoordXY = gl_FragCoord.xy;
+ // Sample depths at both offset and negative offset
+ float upOrRightLogDepth = czm_unpackDepth(texture(czm_globeDepthTexture, (glFragCoordXY + positiveOffset) / czm_viewport.zw));
+ float downOrLeftLogDepth = czm_unpackDepth(texture(czm_globeDepthTexture, (glFragCoordXY - positiveOffset) / czm_viewport.zw));
+ // Explicitly evaluate both paths
+ // Necessary for multifrustum and for edges of the screen
+ bvec2 upOrRightInBounds = lessThan(glFragCoordXY + positiveOffset, czm_viewport.zw);
+ float useUpOrRight = float(upOrRightLogDepth > 0.0 && upOrRightInBounds.x && upOrRightInBounds.y);
+ float useDownOrLeft = float(useUpOrRight == 0.0);
+ vec3 upOrRightEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY + positiveOffset, upOrRightLogDepth);
+ vec3 downOrLeftEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY - positiveOffset, downOrLeftLogDepth);
+ return (upOrRightEC - (eyeCoordinate.xyz / eyeCoordinate.w)) * useUpOrRight + ((eyeCoordinate.xyz / eyeCoordinate.w) - downOrLeftEC) * useDownOrLeft;
+}
+#endif // NORMAL_EC
+
+void main(void)
+{
+#ifdef REQUIRES_EC
+ float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw));
+ vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
+#endif
+
+#ifdef REQUIRES_WC
+ vec4 worldCoordinate4 = czm_inverseView * eyeCoordinate;
+ vec3 worldCoordinate = worldCoordinate4.xyz / worldCoordinate4.w;
+#endif
+
+#ifdef TEXTURE_COORDINATES
+ vec2 uv;
+#ifdef SPHERICAL
+ // Treat world coords as a sphere normal for spherical coordinates
+ vec2 sphericalLatLong = czm_approximateSphericalCoordinates(worldCoordinate);
+ sphericalLatLong.y += v_uvMinAndSphericalLongitudeRotation.z;
+ sphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);
+ uv.x = (sphericalLatLong.y - v_sphericalExtents.y) * v_sphericalExtents.w;
+ uv.y = (sphericalLatLong.x - v_sphericalExtents.x) * v_sphericalExtents.z;
+#else // SPHERICAL
+ // Unpack planes and transform to eye space
+ uv.x = czm_planeDistance(v_westPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.x;
+ uv.y = czm_planeDistance(v_southPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.y;
+#endif // SPHERICAL
+#endif // TEXTURE_COORDINATES
+
+#ifdef PICK
+#ifdef CULL_FRAGMENTS
+ // When classifying translucent geometry, logDepthOrDepth == 0.0
+ // indicates a region that should not be classified, possibly due to there
+ // being opaque pixels there in another buffer.
+ // Check for logDepthOrDepth != 0.0 to make sure this should be classified.
+ if (0.0 <= uv.x && uv.x <= 1.0 && 0.0 <= uv.y && uv.y <= 1.0 || logDepthOrDepth != 0.0) {
+ out_FragColor.a = 1.0; // 0.0 alpha leads to discard from ShaderSource.createPickFragmentShaderSource
+ czm_writeDepthClamp();
+ }
+#else // CULL_FRAGMENTS
+ out_FragColor.a = 1.0;
+#endif // CULL_FRAGMENTS
+#else // PICK
+
+#ifdef CULL_FRAGMENTS
+ // When classifying translucent geometry, logDepthOrDepth == 0.0
+ // indicates a region that should not be classified, possibly due to there
+ // being opaque pixels there in another buffer.
+ if (uv.x <= 0.0 || 1.0 <= uv.x || uv.y <= 0.0 || 1.0 <= uv.y || logDepthOrDepth == 0.0) {
+ discard;
+ }
+#endif
+
+#ifdef NORMAL_EC
+ // Compute normal by sampling adjacent pixels in 2x2 block in screen space
+ vec3 downUp = vectorFromOffset(eyeCoordinate, vec2(0.0, 1.0));
+ vec3 leftRight = vectorFromOffset(eyeCoordinate, vec2(1.0, 0.0));
+ vec3 normalEC = normalize(cross(leftRight, downUp));
+#endif
+
+
+#ifdef PER_INSTANCE_COLOR
+
+ vec4 color = czm_gammaCorrect(v_color);
+#ifdef FLAT
+ out_FragColor = color;
+#else // FLAT
+ czm_materialInput materialInput;
+ materialInput.normalEC = normalEC;
+ materialInput.positionToEyeEC = -eyeCoordinate.xyz;
+ czm_material material = czm_getDefaultMaterial(materialInput);
+ material.diffuse = color.rgb;
+ material.alpha = color.a;
+
+ out_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);
+#endif // FLAT
+
+ // Premultiply alpha. Required for classification primitives on translucent globe.
+ out_FragColor.rgb *= out_FragColor.a;
+
+#else // PER_INSTANCE_COLOR
+
+ // Material support.
+ // USES_ is distinct from REQUIRES_, because some things are dependencies of each other or
+ // dependencies for culling but might not actually be used by the material.
+
+ czm_materialInput materialInput;
+
+#ifdef USES_NORMAL_EC
+ materialInput.normalEC = normalEC;
+#endif
+
+#ifdef USES_POSITION_TO_EYE_EC
+ materialInput.positionToEyeEC = -eyeCoordinate.xyz;
+#endif
+
+#ifdef USES_TANGENT_TO_EYE
+ materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(worldCoordinate, normalEC);
+#endif
+
+#ifdef USES_ST
+ // Remap texture coordinates from computed (approximately aligned with cartographic space) to the desired
+ // texture coordinate system, which typically forms a tight oriented bounding box around the geometry.
+ // Shader is provided a set of reference points for remapping.
+ materialInput.st.x = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_uMaxAndInverseDistance.xy, uv) * v_uMaxAndInverseDistance.z;
+ materialInput.st.y = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_vMaxAndInverseDistance.xy, uv) * v_vMaxAndInverseDistance.z;
+#endif
+
+ czm_material material = czm_getMaterial(materialInput);
+
+#ifdef FLAT
+ out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
+#else // FLAT
+ out_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);
+#endif // FLAT
+
+ // Premultiply alpha. Required for classification primitives on translucent globe.
+ out_FragColor.rgb *= out_FragColor.a;
+
+#endif // PER_INSTANCE_COLOR
+ czm_writeDepthClamp();
+#endif // PICK
+}
+`;
+function ShadowVolumeAppearance(e, t, n) {
+ this._projectionExtentDefines = {
+ eastMostYhighDefine: "",
+ eastMostYlowDefine: "",
+ westMostYhighDefine: "",
+ westMostYlowDefine: ""
+ };
+ const i = new ShaderDependencies();
+ i.requiresTextureCoordinates = e, i.requiresEC = !n.flat;
+ const r = new ShaderDependencies();
+ if (r.requiresTextureCoordinates = e, n instanceof PerInstanceColorAppearance)
+ i.requiresNormalEC = !n.flat;
+ else {
+ const o = `${n.material.shaderSource}
+${n.fragmentShaderSource}`;
+ i.normalEC = o.indexOf("materialInput.normalEC") !== -1 || o.indexOf("czm_getDefaultMaterial") !== -1, i.positionToEyeEC = o.indexOf("materialInput.positionToEyeEC") !== -1, i.tangentToEyeMatrix = o.indexOf("materialInput.tangentToEyeMatrix") !== -1, i.st = o.indexOf("materialInput.st") !== -1;
+ }
+ this._colorShaderDependencies = i, this._pickShaderDependencies = r, this._appearance = n, this._extentsCulling = e, this._planarExtents = t;
+}
+ShadowVolumeAppearance.prototype.createFragmentShader = function(e) {
+ const t = this._appearance, n = this._colorShaderDependencies, i = [];
+ !e && !this._planarExtents && i.push("SPHERICAL"), n.requiresEC && i.push("REQUIRES_EC"), n.requiresWC && i.push("REQUIRES_WC"), n.requiresTextureCoordinates && i.push("TEXTURE_COORDINATES"), this._extentsCulling && i.push("CULL_FRAGMENTS"), n.requiresNormalEC && i.push("NORMAL_EC"), t instanceof PerInstanceColorAppearance && i.push("PER_INSTANCE_COLOR"), n.normalEC && i.push("USES_NORMAL_EC"), n.positionToEyeEC && i.push("USES_POSITION_TO_EYE_EC"), n.tangentToEyeMatrix && i.push("USES_TANGENT_TO_EYE"), n.st && i.push("USES_ST"), t.flat && i.push("FLAT");
+ let r = "";
+ return t instanceof PerInstanceColorAppearance || (r = t.material.shaderSource), new ShaderSource({
+ defines: i,
+ sources: [r, ShadowVolumeAppearanceFS]
+ });
+};
+ShadowVolumeAppearance.prototype.createPickFragmentShader = function(e) {
+ const t = this._pickShaderDependencies, n = ["PICK"];
+ return !e && !this._planarExtents && n.push("SPHERICAL"), t.requiresEC && n.push("REQUIRES_EC"), t.requiresWC && n.push("REQUIRES_WC"), t.requiresTextureCoordinates && n.push("TEXTURE_COORDINATES"), this._extentsCulling && n.push("CULL_FRAGMENTS"), new ShaderSource({
+ defines: n,
+ sources: [ShadowVolumeAppearanceFS],
+ pickColorQualifier: "in"
+ });
+};
+ShadowVolumeAppearance.prototype.createVertexShader = function(e, t, n, i) {
+ return createShadowVolumeAppearanceVS(
+ this._colorShaderDependencies,
+ this._planarExtents,
+ n,
+ e,
+ t,
+ this._appearance,
+ i,
+ this._projectionExtentDefines
+ );
+};
+ShadowVolumeAppearance.prototype.createPickVertexShader = function(e, t, n, i) {
+ return createShadowVolumeAppearanceVS(
+ this._pickShaderDependencies,
+ this._planarExtents,
+ n,
+ e,
+ t,
+ void 0,
+ i,
+ this._projectionExtentDefines
+ );
+};
+const longitudeExtentsCartesianScratch = new Cartesian3(), longitudeExtentsCartographicScratch = new Cartographic(), longitudeExtentsEncodeScratch = {
+ high: 0,
+ low: 0
+};
+function createShadowVolumeAppearanceVS(e, t, n, i, r, o, s, c) {
+ const l = i.slice();
+ if (c.eastMostYhighDefine === "") {
+ const d = longitudeExtentsCartographicScratch;
+ d.longitude = CesiumMath.PI, d.latitude = 0, d.height = 0;
+ const f = s.project(
+ d,
+ longitudeExtentsCartesianScratch
+ );
+ let h = EncodedCartesian3.encode(
+ f.x,
+ longitudeExtentsEncodeScratch
+ );
+ c.eastMostYhighDefine = `EAST_MOST_X_HIGH ${h.high.toFixed(
+ `${h.high}`.length + 1
+ )}`, c.eastMostYlowDefine = `EAST_MOST_X_LOW ${h.low.toFixed(
+ `${h.low}`.length + 1
+ )}`;
+ const p = longitudeExtentsCartographicScratch;
+ p.longitude = -CesiumMath.PI, p.latitude = 0, p.height = 0;
+ const m = s.project(
+ p,
+ longitudeExtentsCartesianScratch
+ );
+ h = EncodedCartesian3.encode(
+ m.x,
+ longitudeExtentsEncodeScratch
+ ), c.westMostYhighDefine = `WEST_MOST_X_HIGH ${h.high.toFixed(
+ `${h.high}`.length + 1
+ )}`, c.westMostYlowDefine = `WEST_MOST_X_LOW ${h.low.toFixed(
+ `${h.low}`.length + 1
+ )}`;
+ }
+ return n && (l.push(c.eastMostYhighDefine), l.push(c.eastMostYlowDefine), l.push(c.westMostYhighDefine), l.push(c.westMostYlowDefine)), defined(o) && o instanceof PerInstanceColorAppearance && l.push("PER_INSTANCE_COLOR"), e.requiresTextureCoordinates && (l.push("TEXTURE_COORDINATES"), t || n || l.push("SPHERICAL"), n && l.push("COLUMBUS_VIEW_2D")), new ShaderSource({
+ defines: l,
+ sources: [r]
+ });
+}
+function ShaderDependencies() {
+ this._requiresEC = !1, this._requiresWC = !1, this._requiresNormalEC = !1, this._requiresTextureCoordinates = !1, this._usesNormalEC = !1, this._usesPositionToEyeEC = !1, this._usesTangentToEyeMat = !1, this._usesSt = !1;
+}
+Object.defineProperties(ShaderDependencies.prototype, {
+ // Set when assessing final shading (flat vs. phong) and culling using computed texture coordinates
+ requiresEC: {
+ get: function() {
+ return this._requiresEC;
+ },
+ set: function(e) {
+ this._requiresEC = e || this._requiresEC;
+ }
+ },
+ requiresWC: {
+ get: function() {
+ return this._requiresWC;
+ },
+ set: function(e) {
+ this._requiresWC = e || this._requiresWC, this.requiresEC = this._requiresWC;
+ }
+ },
+ requiresNormalEC: {
+ get: function() {
+ return this._requiresNormalEC;
+ },
+ set: function(e) {
+ this._requiresNormalEC = e || this._requiresNormalEC, this.requiresEC = this._requiresNormalEC;
+ }
+ },
+ requiresTextureCoordinates: {
+ get: function() {
+ return this._requiresTextureCoordinates;
+ },
+ set: function(e) {
+ this._requiresTextureCoordinates = e || this._requiresTextureCoordinates, this.requiresWC = this._requiresTextureCoordinates;
+ }
+ },
+ // Get/Set when assessing material hookups
+ normalEC: {
+ set: function(e) {
+ this.requiresNormalEC = e, this._usesNormalEC = e;
+ },
+ get: function() {
+ return this._usesNormalEC;
+ }
+ },
+ tangentToEyeMatrix: {
+ set: function(e) {
+ this.requiresWC = e, this.requiresNormalEC = e, this._usesTangentToEyeMat = e;
+ },
+ get: function() {
+ return this._usesTangentToEyeMat;
+ }
+ },
+ positionToEyeEC: {
+ set: function(e) {
+ this.requiresEC = e, this._usesPositionToEyeEC = e;
+ },
+ get: function() {
+ return this._usesPositionToEyeEC;
+ }
+ },
+ st: {
+ set: function(e) {
+ this.requiresTextureCoordinates = e, this._usesSt = e;
+ },
+ get: function() {
+ return this._usesSt;
+ }
+ }
+});
+function pointLineDistance(e, t, n) {
+ return Math.abs(
+ (t.y - e.y) * n.x - (t.x - e.x) * n.y + t.x * e.y - t.y * e.x
+ ) / Cartesian2.distance(t, e);
+}
+const points2DScratch$1 = [
+ new Cartesian2(),
+ new Cartesian2(),
+ new Cartesian2(),
+ new Cartesian2()
+];
+function addTextureCoordinateRotationAttributes(e, t) {
+ const n = points2DScratch$1, i = Cartesian2.unpack(
+ t,
+ 0,
+ n[0]
+ ), r = Cartesian2.unpack(
+ t,
+ 2,
+ n[1]
+ ), o = Cartesian2.unpack(
+ t,
+ 4,
+ n[2]
+ );
+ e.uMaxVmax = new GeometryInstanceAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 4,
+ normalize: !1,
+ value: [r.x, r.y, o.x, o.y]
+ });
+ const s = 1 / pointLineDistance(i, r, o), c = 1 / pointLineDistance(i, o, r);
+ e.uvMinAndExtents = new GeometryInstanceAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 4,
+ normalize: !1,
+ value: [i.x, i.y, s, c]
+ });
+}
+const cartographicScratch$4 = new Cartographic(), cornerScratch = new Cartesian3(), northWestScratch = new Cartesian3(), southEastScratch = new Cartesian3(), highLowScratch = { high: 0, low: 0 };
+function add2DTextureCoordinateAttributes(e, t, n) {
+ const i = cartographicScratch$4;
+ i.height = 0, i.longitude = e.west, i.latitude = e.south;
+ const r = t.project(i, cornerScratch);
+ i.latitude = e.north;
+ const o = t.project(i, northWestScratch);
+ i.longitude = e.east, i.latitude = e.south;
+ const s = t.project(i, southEastScratch), c = [0, 0, 0, 0], l = [0, 0, 0, 0];
+ let d = EncodedCartesian3.encode(r.x, highLowScratch);
+ c[0] = d.high, l[0] = d.low, d = EncodedCartesian3.encode(r.y, highLowScratch), c[1] = d.high, l[1] = d.low, d = EncodedCartesian3.encode(o.y, highLowScratch), c[2] = d.high, l[2] = d.low, d = EncodedCartesian3.encode(s.x, highLowScratch), c[3] = d.high, l[3] = d.low, n.planes2D_HIGH = new GeometryInstanceAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 4,
+ normalize: !1,
+ value: c
+ }), n.planes2D_LOW = new GeometryInstanceAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 4,
+ normalize: !1,
+ value: l
+ });
+}
+const enuMatrixScratch = new Matrix4(), inverseEnuScratch = new Matrix4(), rectanglePointCartesianScratch = new Cartesian3(), rectangleCenterScratch$2 = new Cartographic(), pointsCartographicScratch = [
+ new Cartographic(),
+ new Cartographic(),
+ new Cartographic(),
+ new Cartographic(),
+ new Cartographic(),
+ new Cartographic(),
+ new Cartographic(),
+ new Cartographic()
+];
+function computeRectangleBounds(e, t, n, i, r, o) {
+ const s = Rectangle.center(
+ e,
+ rectangleCenterScratch$2
+ );
+ s.height = n;
+ const c = Cartographic.toCartesian(
+ s,
+ t,
+ rectanglePointCartesianScratch
+ ), l = Transforms.eastNorthUpToFixedFrame(
+ c,
+ t,
+ enuMatrixScratch
+ ), d = Matrix4.inverse(l, inverseEnuScratch), f = e.west, h = e.east, p = e.north, m = e.south, _ = pointsCartographicScratch;
+ _[0].latitude = m, _[0].longitude = f, _[1].latitude = p, _[1].longitude = f, _[2].latitude = p, _[2].longitude = h, _[3].latitude = m, _[3].longitude = h;
+ const y = (f + h) * 0.5, C = (p + m) * 0.5;
+ _[4].latitude = m, _[4].longitude = y, _[5].latitude = p, _[5].longitude = y, _[6].latitude = C, _[6].longitude = f, _[7].latitude = C, _[7].longitude = h;
+ let T = Number.POSITIVE_INFINITY, x = Number.NEGATIVE_INFINITY, b = Number.POSITIVE_INFINITY, S = Number.NEGATIVE_INFINITY;
+ for (let P = 0; P < 8; P++) {
+ _[P].height = n;
+ const I = Cartographic.toCartesian(
+ _[P],
+ t,
+ rectanglePointCartesianScratch
+ );
+ Matrix4.multiplyByPoint(d, I, I), I.z = 0, T = Math.min(T, I.x), x = Math.max(x, I.x), b = Math.min(b, I.y), S = Math.max(S, I.y);
+ }
+ const E = i;
+ E.x = T, E.y = b, E.z = 0, Matrix4.multiplyByPoint(l, E, E);
+ const A = r;
+ A.x = x, A.y = b, A.z = 0, Matrix4.multiplyByPoint(l, A, A), Cartesian3.subtract(A, E, r);
+ const D = o;
+ D.x = T, D.y = S, D.z = 0, Matrix4.multiplyByPoint(l, D, D), Cartesian3.subtract(D, E, o);
+}
+const eastwardScratch = new Cartesian3(), northwardScratch = new Cartesian3(), encodeScratch$1 = new EncodedCartesian3();
+ShadowVolumeAppearance.getPlanarTextureCoordinateAttributes = function(e, t, n, i, r) {
+ const o = cornerScratch, s = eastwardScratch, c = northwardScratch;
+ computeRectangleBounds(
+ e,
+ n,
+ defaultValue(r, 0),
+ o,
+ s,
+ c
+ );
+ const l = {};
+ addTextureCoordinateRotationAttributes(
+ l,
+ t
+ );
+ const d = EncodedCartesian3.fromCartesian(o, encodeScratch$1);
+ return l.southWest_HIGH = new GeometryInstanceAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 3,
+ normalize: !1,
+ value: Cartesian3.pack(d.high, [0, 0, 0])
+ }), l.southWest_LOW = new GeometryInstanceAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 3,
+ normalize: !1,
+ value: Cartesian3.pack(d.low, [0, 0, 0])
+ }), l.eastward = new GeometryInstanceAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 3,
+ normalize: !1,
+ value: Cartesian3.pack(s, [0, 0, 0])
+ }), l.northward = new GeometryInstanceAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 3,
+ normalize: !1,
+ value: Cartesian3.pack(c, [0, 0, 0])
+ }), add2DTextureCoordinateAttributes(e, i, l), l;
+};
+const spherePointScratch$1 = new Cartesian3();
+function latLongToSpherical(e, t, n, i) {
+ const r = cartographicScratch$4;
+ r.latitude = e, r.longitude = t, r.height = 0;
+ const o = Cartographic.toCartesian(
+ r,
+ n,
+ spherePointScratch$1
+ ), s = Math.sqrt(
+ o.x * o.x + o.y * o.y
+ ), c = CesiumMath.fastApproximateAtan2(s, o.z), l = CesiumMath.fastApproximateAtan2(
+ o.x,
+ o.y
+ );
+ return i.x = c, i.y = l, i;
+}
+const sphericalScratch = new Cartesian2();
+ShadowVolumeAppearance.getSphericalExtentGeometryInstanceAttributes = function(e, t, n, i) {
+ const r = latLongToSpherical(
+ e.south,
+ e.west,
+ n,
+ sphericalScratch
+ );
+ let o = r.x, s = r.y;
+ const c = latLongToSpherical(
+ e.north,
+ e.east,
+ n,
+ sphericalScratch
+ );
+ let l = c.x, d = c.y, f = 0;
+ s > d && (f = CesiumMath.PI - s, s = -CesiumMath.PI, d += f), o -= CesiumMath.EPSILON5, s -= CesiumMath.EPSILON5, l += CesiumMath.EPSILON5, d += CesiumMath.EPSILON5;
+ const h = 1 / (d - s), p = 1 / (l - o), m = {
+ sphericalExtents: new GeometryInstanceAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 4,
+ normalize: !1,
+ value: [o, s, p, h]
+ }),
+ longitudeRotation: new GeometryInstanceAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 1,
+ normalize: !1,
+ value: [f]
+ })
+ };
+ return addTextureCoordinateRotationAttributes(
+ m,
+ t
+ ), add2DTextureCoordinateAttributes(e, i, m), m;
+};
+ShadowVolumeAppearance.hasAttributesForTextureCoordinatePlanes = function(e) {
+ return defined(e.southWest_HIGH) && defined(e.southWest_LOW) && defined(e.northward) && defined(e.eastward) && defined(e.planes2D_HIGH) && defined(e.planes2D_LOW) && defined(e.uMaxVmax) && defined(e.uvMinAndExtents);
+};
+ShadowVolumeAppearance.hasAttributesForSphericalExtents = function(e) {
+ return defined(e.sphericalExtents) && defined(e.longitudeRotation) && defined(e.planes2D_HIGH) && defined(e.planes2D_LOW) && defined(e.uMaxVmax) && defined(e.uvMinAndExtents);
+};
+function shouldUseSpherical(e) {
+ return Math.max(e.width, e.height) > ShadowVolumeAppearance.MAX_WIDTH_FOR_PLANAR_EXTENTS;
+}
+ShadowVolumeAppearance.shouldUseSphericalCoordinates = function(e) {
+ return shouldUseSpherical(e);
+};
+ShadowVolumeAppearance.MAX_WIDTH_FOR_PLANAR_EXTENTS = CesiumMath.toRadians(1);
+const StencilFunction = {
+ /**
+ * The stencil test never passes.
+ *
+ * @type {number}
+ * @constant
+ */
+ NEVER: WebGLConstants$1.NEVER,
+ /**
+ * The stencil test passes when the masked reference value is less than the masked stencil value.
+ *
+ * @type {number}
+ * @constant
+ */
+ LESS: WebGLConstants$1.LESS,
+ /**
+ * The stencil test passes when the masked reference value is equal to the masked stencil value.
+ *
+ * @type {number}
+ * @constant
+ */
+ EQUAL: WebGLConstants$1.EQUAL,
+ /**
+ * The stencil test passes when the masked reference value is less than or equal to the masked stencil value.
+ *
+ * @type {number}
+ * @constant
+ */
+ LESS_OR_EQUAL: WebGLConstants$1.LEQUAL,
+ /**
+ * The stencil test passes when the masked reference value is greater than the masked stencil value.
+ *
+ * @type {number}
+ * @constant
+ */
+ GREATER: WebGLConstants$1.GREATER,
+ /**
+ * The stencil test passes when the masked reference value is not equal to the masked stencil value.
+ *
+ * @type {number}
+ * @constant
+ */
+ NOT_EQUAL: WebGLConstants$1.NOTEQUAL,
+ /**
+ * The stencil test passes when the masked reference value is greater than or equal to the masked stencil value.
+ *
+ * @type {number}
+ * @constant
+ */
+ GREATER_OR_EQUAL: WebGLConstants$1.GEQUAL,
+ /**
+ * The stencil test always passes.
+ *
+ * @type {number}
+ * @constant
+ */
+ ALWAYS: WebGLConstants$1.ALWAYS
+}, StencilFunction$1 = Object.freeze(StencilFunction), StencilOperation = {
+ /**
+ * Sets the stencil buffer value to zero.
+ *
+ * @type {number}
+ * @constant
+ */
+ ZERO: WebGLConstants$1.ZERO,
+ /**
+ * Does not change the stencil buffer.
+ *
+ * @type {number}
+ * @constant
+ */
+ KEEP: WebGLConstants$1.KEEP,
+ /**
+ * Replaces the stencil buffer value with the reference value.
+ *
+ * @type {number}
+ * @constant
+ */
+ REPLACE: WebGLConstants$1.REPLACE,
+ /**
+ * Increments the stencil buffer value, clamping to unsigned byte.
+ *
+ * @type {number}
+ * @constant
+ */
+ INCREMENT: WebGLConstants$1.INCR,
+ /**
+ * Decrements the stencil buffer value, clamping to zero.
+ *
+ * @type {number}
+ * @constant
+ */
+ DECREMENT: WebGLConstants$1.DECR,
+ /**
+ * Bitwise inverts the existing stencil buffer value.
+ *
+ * @type {number}
+ * @constant
+ */
+ INVERT: WebGLConstants$1.INVERT,
+ /**
+ * Increments the stencil buffer value, wrapping to zero when exceeding the unsigned byte range.
+ *
+ * @type {number}
+ * @constant
+ */
+ INCREMENT_WRAP: WebGLConstants$1.INCR_WRAP,
+ /**
+ * Decrements the stencil buffer value, wrapping to the maximum unsigned byte instead of going below zero.
+ *
+ * @type {number}
+ * @constant
+ */
+ DECREMENT_WRAP: WebGLConstants$1.DECR_WRAP
+}, StencilOperation$1 = Object.freeze(StencilOperation), StencilConstants = {
+ CESIUM_3D_TILE_MASK: 128,
+ SKIP_LOD_MASK: 112,
+ SKIP_LOD_BIT_SHIFT: 4,
+ CLASSIFICATION_MASK: 15
+};
+StencilConstants.setCesium3DTileBit = function() {
+ return {
+ enabled: !0,
+ frontFunction: StencilFunction$1.ALWAYS,
+ frontOperation: {
+ fail: StencilOperation$1.KEEP,
+ zFail: StencilOperation$1.KEEP,
+ zPass: StencilOperation$1.REPLACE
+ },
+ backFunction: StencilFunction$1.ALWAYS,
+ backOperation: {
+ fail: StencilOperation$1.KEEP,
+ zFail: StencilOperation$1.KEEP,
+ zPass: StencilOperation$1.REPLACE
+ },
+ reference: StencilConstants.CESIUM_3D_TILE_MASK,
+ mask: StencilConstants.CESIUM_3D_TILE_MASK
+ };
+};
+const StencilConstants$1 = Object.freeze(StencilConstants);
+function ClassificationPrimitive(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.geometryInstances;
+ this.geometryInstances = t, this.show = defaultValue(e.show, !0), this.classificationType = defaultValue(
+ e.classificationType,
+ ClassificationType$1.BOTH
+ ), this.debugShowBoundingVolume = defaultValue(
+ e.debugShowBoundingVolume,
+ !1
+ ), this.debugShowShadowVolume = defaultValue(
+ e.debugShowShadowVolume,
+ !1
+ ), this._debugShowShadowVolume = !1, this._extruded = defaultValue(e._extruded, !1), this._uniformMap = e._uniformMap, this._sp = void 0, this._spStencil = void 0, this._spPick = void 0, this._spColor = void 0, this._spPick2D = void 0, this._spColor2D = void 0, this._rsStencilDepthPass = void 0, this._rsStencilDepthPass3DTiles = void 0, this._rsColorPass = void 0, this._rsPickPass = void 0, this._commandsIgnoreShow = [], this._ready = !1, this._primitive = void 0, this._pickPrimitive = e._pickPrimitive, this._hasSphericalExtentsAttribute = !1, this._hasPlanarExtentsAttributes = !1, this._hasPerColorAttribute = !1, this.appearance = e.appearance, this._createBoundingVolumeFunction = e._createBoundingVolumeFunction, this._updateAndQueueCommandsFunction = e._updateAndQueueCommandsFunction, this._usePickOffsets = !1, this._primitiveOptions = {
+ geometryInstances: void 0,
+ appearance: void 0,
+ vertexCacheOptimize: defaultValue(e.vertexCacheOptimize, !1),
+ interleave: defaultValue(e.interleave, !1),
+ releaseGeometryInstances: defaultValue(
+ e.releaseGeometryInstances,
+ !0
+ ),
+ allowPicking: defaultValue(e.allowPicking, !0),
+ asynchronous: defaultValue(e.asynchronous, !0),
+ compressVertices: defaultValue(e.compressVertices, !0),
+ _createBoundingVolumeFunction: void 0,
+ _createRenderStatesFunction: void 0,
+ _createShaderProgramFunction: void 0,
+ _createCommandsFunction: void 0,
+ _updateAndQueueCommandsFunction: void 0,
+ _createPickOffsets: !0
+ };
+}
+Object.defineProperties(ClassificationPrimitive.prototype, {
+ /**
+ * When true, geometry vertices are optimized for the pre and post-vertex-shader caches.
+ *
+ * @memberof ClassificationPrimitive.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default true
+ */
+ vertexCacheOptimize: {
+ get: function() {
+ return this._primitiveOptions.vertexCacheOptimize;
+ }
+ },
+ /**
+ * Determines if geometry vertex attributes are interleaved, which can slightly improve rendering performance.
+ *
+ * @memberof ClassificationPrimitive.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default false
+ */
+ interleave: {
+ get: function() {
+ return this._primitiveOptions.interleave;
+ }
+ },
+ /**
+ * When true, the primitive does not keep a reference to the input geometryInstances to save memory.
+ *
+ * @memberof ClassificationPrimitive.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default true
+ */
+ releaseGeometryInstances: {
+ get: function() {
+ return this._primitiveOptions.releaseGeometryInstances;
+ }
+ },
+ /**
+ * When true, each geometry instance will only be pickable with {@link Scene#pick}. When false, GPU memory is saved.
+ *
+ * @memberof ClassificationPrimitive.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default true
+ */
+ allowPicking: {
+ get: function() {
+ return this._primitiveOptions.allowPicking;
+ }
+ },
+ /**
+ * Determines if the geometry instances will be created and batched on a web worker.
+ *
+ * @memberof ClassificationPrimitive.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default true
+ */
+ asynchronous: {
+ get: function() {
+ return this._primitiveOptions.asynchronous;
+ }
+ },
+ /**
+ * When true, geometry vertices are compressed, which will save memory.
+ *
+ * @memberof ClassificationPrimitive.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default true
+ */
+ compressVertices: {
+ get: function() {
+ return this._primitiveOptions.compressVertices;
+ }
+ },
+ /**
+ * Determines if the primitive is complete and ready to render. If this property is
+ * true, the primitive will be rendered the next time that {@link ClassificationPrimitive#update}
+ * is called.
+ *
+ * @memberof ClassificationPrimitive.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ */
+ ready: {
+ get: function() {
+ return this._ready;
+ }
+ },
+ /**
+ * Returns true if the ClassificationPrimitive needs a separate shader and commands for 2D.
+ * This is because texture coordinates on ClassificationPrimitives are computed differently,
+ * and are used for culling when multiple GeometryInstances are batched in one ClassificationPrimitive.
+ * @memberof ClassificationPrimitive.prototype
+ * @type {boolean}
+ * @readonly
+ * @private
+ */
+ _needs2DShader: {
+ get: function() {
+ return this._hasPlanarExtentsAttributes || this._hasSphericalExtentsAttribute;
+ }
+ }
+});
+ClassificationPrimitive.isSupported = function(e) {
+ return e.context.stencilBuffer;
+};
+function getStencilDepthRenderState$2(e, t) {
+ const n = t ? StencilFunction$1.EQUAL : StencilFunction$1.ALWAYS;
+ return {
+ colorMask: {
+ red: !1,
+ green: !1,
+ blue: !1,
+ alpha: !1
+ },
+ stencilTest: {
+ enabled: e,
+ frontFunction: n,
+ frontOperation: {
+ fail: StencilOperation$1.KEEP,
+ zFail: StencilOperation$1.DECREMENT_WRAP,
+ zPass: StencilOperation$1.KEEP
+ },
+ backFunction: n,
+ backOperation: {
+ fail: StencilOperation$1.KEEP,
+ zFail: StencilOperation$1.INCREMENT_WRAP,
+ zPass: StencilOperation$1.KEEP
+ },
+ reference: StencilConstants$1.CESIUM_3D_TILE_MASK,
+ mask: StencilConstants$1.CESIUM_3D_TILE_MASK
+ },
+ stencilMask: StencilConstants$1.CLASSIFICATION_MASK,
+ depthTest: {
+ enabled: !0,
+ func: DepthFunction$1.LESS_OR_EQUAL
+ },
+ depthMask: !1
+ };
+}
+function getColorRenderState(e) {
+ return {
+ stencilTest: {
+ enabled: e,
+ frontFunction: StencilFunction$1.NOT_EQUAL,
+ frontOperation: {
+ fail: StencilOperation$1.ZERO,
+ zFail: StencilOperation$1.ZERO,
+ zPass: StencilOperation$1.ZERO
+ },
+ backFunction: StencilFunction$1.NOT_EQUAL,
+ backOperation: {
+ fail: StencilOperation$1.ZERO,
+ zFail: StencilOperation$1.ZERO,
+ zPass: StencilOperation$1.ZERO
+ },
+ reference: 0,
+ mask: StencilConstants$1.CLASSIFICATION_MASK
+ },
+ stencilMask: StencilConstants$1.CLASSIFICATION_MASK,
+ depthTest: {
+ enabled: !1
+ },
+ depthMask: !1,
+ blending: BlendingState$1.PRE_MULTIPLIED_ALPHA_BLEND
+ };
+}
+const pickRenderState$2 = {
+ stencilTest: {
+ enabled: !0,
+ frontFunction: StencilFunction$1.NOT_EQUAL,
+ frontOperation: {
+ fail: StencilOperation$1.ZERO,
+ zFail: StencilOperation$1.ZERO,
+ zPass: StencilOperation$1.ZERO
+ },
+ backFunction: StencilFunction$1.NOT_EQUAL,
+ backOperation: {
+ fail: StencilOperation$1.ZERO,
+ zFail: StencilOperation$1.ZERO,
+ zPass: StencilOperation$1.ZERO
+ },
+ reference: 0,
+ mask: StencilConstants$1.CLASSIFICATION_MASK
+ },
+ stencilMask: StencilConstants$1.CLASSIFICATION_MASK,
+ depthTest: {
+ enabled: !1
+ },
+ depthMask: !1
+};
+function createRenderStates$4(e, t, n, i) {
+ if (defined(e._rsStencilDepthPass))
+ return;
+ const r = !e.debugShowShadowVolume;
+ e._rsStencilDepthPass = RenderState.fromCache(
+ getStencilDepthRenderState$2(r, !1)
+ ), e._rsStencilDepthPass3DTiles = RenderState.fromCache(
+ getStencilDepthRenderState$2(r, !0)
+ ), e._rsColorPass = RenderState.fromCache(
+ getColorRenderState(r)
+ ), e._rsPickPass = RenderState.fromCache(pickRenderState$2);
+}
+function modifyForEncodedNormals(e, t) {
+ if (!e.compressVertices)
+ return t;
+ if (t.search(/in\s+vec3\s+extrudeDirection;/g) !== -1) {
+ const n = "compressedAttributes", i = `in vec2 ${n};`, r = `vec3 extrudeDirection;
+`, o = ` extrudeDirection = czm_octDecode(${n}, 65535.0);
+`;
+ let s = t;
+ s = s.replace(/in\s+vec3\s+extrudeDirection;/g, ""), s = ShaderSource.replaceMain(
+ s,
+ "czm_non_compressed_main"
+ );
+ const c = `void main()
+{
+${o} czm_non_compressed_main();
+}`;
+ return [i, r, s, c].join(`
+`);
+ }
+}
+function createShaderProgram$2(e, t) {
+ const n = t.context, i = e._primitive;
+ let r = ShadowVolumeAppearanceVS;
+ r = e._primitive._batchTable.getVertexShaderCallback()(
+ r
+ ), r = Primitive$3._appendDistanceDisplayConditionToShader(i, r), r = Primitive$3._modifyShaderPosition(
+ e,
+ r,
+ t.scene3DOnly
+ ), r = Primitive$3._updateColorAttribute(i, r);
+ const o = e._hasPlanarExtentsAttributes, s = o || e._hasSphericalExtentsAttribute;
+ e._extruded && (r = modifyForEncodedNormals(i, r));
+ const c = e._extruded ? "EXTRUDED_GEOMETRY" : "";
+ let l = new ShaderSource({
+ defines: [c],
+ sources: [r]
+ });
+ const d = new ShaderSource({
+ sources: [ShadowVolumeFS]
+ }), f = e._primitive._attributeLocations, h = new ShadowVolumeAppearance(
+ s,
+ o,
+ e.appearance
+ );
+ if (e._spStencil = ShaderProgram.replaceCache({
+ context: n,
+ shaderProgram: e._spStencil,
+ vertexShaderSource: l,
+ fragmentShaderSource: d,
+ attributeLocations: f
+ }), e._primitive.allowPicking) {
+ let _ = ShaderSource.createPickVertexShaderSource(r);
+ _ = Primitive$3._appendShowToShader(i, _), _ = Primitive$3._updatePickColorAttribute(_);
+ const y = h.createPickFragmentShader(!1), C = h.createPickVertexShader(
+ [c],
+ _,
+ !1,
+ t.mapProjection
+ );
+ if (e._spPick = ShaderProgram.replaceCache({
+ context: n,
+ shaderProgram: e._spPick,
+ vertexShaderSource: C,
+ fragmentShaderSource: y,
+ attributeLocations: f
+ }), s) {
+ let T = n.shaderCache.getDerivedShaderProgram(
+ e._spPick,
+ "2dPick"
+ );
+ if (!defined(T)) {
+ const x = h.createPickFragmentShader(!0), b = h.createPickVertexShader(
+ [c],
+ _,
+ !0,
+ t.mapProjection
+ );
+ T = n.shaderCache.createDerivedShaderProgram(
+ e._spPick,
+ "2dPick",
+ {
+ vertexShaderSource: b,
+ fragmentShaderSource: x,
+ attributeLocations: f
+ }
+ );
+ }
+ e._spPick2D = T;
+ }
+ } else
+ e._spPick = ShaderProgram.fromCache({
+ context: n,
+ vertexShaderSource: l,
+ fragmentShaderSource: d,
+ attributeLocations: f
+ });
+ r = Primitive$3._appendShowToShader(i, r), l = new ShaderSource({
+ defines: [c],
+ sources: [r]
+ }), e._sp = ShaderProgram.replaceCache({
+ context: n,
+ shaderProgram: e._sp,
+ vertexShaderSource: l,
+ fragmentShaderSource: d,
+ attributeLocations: f
+ });
+ const p = h.createFragmentShader(!1), m = h.createVertexShader(
+ [c],
+ r,
+ !1,
+ t.mapProjection
+ );
+ if (e._spColor = ShaderProgram.replaceCache({
+ context: n,
+ shaderProgram: e._spColor,
+ vertexShaderSource: m,
+ fragmentShaderSource: p,
+ attributeLocations: f
+ }), s) {
+ let _ = n.shaderCache.getDerivedShaderProgram(
+ e._spColor,
+ "2dColor"
+ );
+ if (!defined(_)) {
+ const y = h.createFragmentShader(!0), C = h.createVertexShader(
+ [c],
+ r,
+ !0,
+ t.mapProjection
+ );
+ _ = n.shaderCache.createDerivedShaderProgram(
+ e._spColor,
+ "2dColor",
+ {
+ vertexShaderSource: C,
+ fragmentShaderSource: y,
+ attributeLocations: f
+ }
+ );
+ }
+ e._spColor2D = _;
+ }
+}
+function createColorCommands$1(e, t) {
+ const n = e._primitive;
+ let i = n._va.length * 2;
+ t.length = i;
+ let r, o, s, c = 0, l = n._batchTable.getUniformMapCallback()(
+ e._uniformMap
+ );
+ const d = e._needs2DShader;
+ for (r = 0; r < i; r += 2) {
+ const m = n._va[c++];
+ o = t[r], defined(o) || (o = t[r] = new DrawCommand({
+ owner: e,
+ primitiveType: n._primitiveType
+ })), o.vertexArray = m, o.renderState = e._rsStencilDepthPass, o.shaderProgram = e._sp, o.uniformMap = l, o.pass = Pass$1.TERRAIN_CLASSIFICATION, s = DrawCommand.shallowClone(
+ o,
+ o.derivedCommands.tileset
+ ), s.renderState = e._rsStencilDepthPass3DTiles, s.pass = Pass$1.CESIUM_3D_TILE_CLASSIFICATION, o.derivedCommands.tileset = s, o = t[r + 1], defined(o) || (o = t[r + 1] = new DrawCommand({
+ owner: e,
+ primitiveType: n._primitiveType
+ })), o.vertexArray = m, o.renderState = e._rsColorPass, o.shaderProgram = e._spColor, o.pass = Pass$1.TERRAIN_CLASSIFICATION;
+ const y = e.appearance.material;
+ if (defined(y) && (l = combine$2(l, y._uniforms)), o.uniformMap = l, s = DrawCommand.shallowClone(
+ o,
+ o.derivedCommands.tileset
+ ), s.pass = Pass$1.CESIUM_3D_TILE_CLASSIFICATION, o.derivedCommands.tileset = s, d) {
+ let C = DrawCommand.shallowClone(
+ o,
+ o.derivedCommands.appearance2D
+ );
+ C.shaderProgram = e._spColor2D, o.derivedCommands.appearance2D = C, C = DrawCommand.shallowClone(
+ s,
+ s.derivedCommands.appearance2D
+ ), C.shaderProgram = e._spColor2D, s.derivedCommands.appearance2D = C;
+ }
+ }
+ const f = e._commandsIgnoreShow, h = e._spStencil;
+ let p = 0;
+ i = f.length = i / 2;
+ for (let m = 0; m < i; ++m) {
+ const _ = f[m] = DrawCommand.shallowClone(
+ t[p],
+ f[m]
+ );
+ _.shaderProgram = h, _.pass = Pass$1.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW, p += 2;
+ }
+}
+function createPickCommands$2(e, t) {
+ const n = e._usePickOffsets, i = e._primitive;
+ let r = i._va.length * 2, o, s = 0, c;
+ n && (o = i._pickOffsets, r = o.length * 2), t.length = r;
+ let l, d, f, h = 0;
+ const p = i._batchTable.getUniformMapCallback()(
+ e._uniformMap
+ ), m = e._needs2DShader;
+ for (l = 0; l < r; l += 2) {
+ let _ = i._va[h++];
+ if (n && (c = o[s++], _ = i._va[c.index]), d = t[l], defined(d) || (d = t[l] = new DrawCommand({
+ owner: e,
+ primitiveType: i._primitiveType,
+ pickOnly: !0
+ })), d.vertexArray = _, d.renderState = e._rsStencilDepthPass, d.shaderProgram = e._sp, d.uniformMap = p, d.pass = Pass$1.TERRAIN_CLASSIFICATION, n && (d.offset = c.offset, d.count = c.count), f = DrawCommand.shallowClone(
+ d,
+ d.derivedCommands.tileset
+ ), f.renderState = e._rsStencilDepthPass3DTiles, f.pass = Pass$1.CESIUM_3D_TILE_CLASSIFICATION, d.derivedCommands.tileset = f, d = t[l + 1], defined(d) || (d = t[l + 1] = new DrawCommand({
+ owner: e,
+ primitiveType: i._primitiveType,
+ pickOnly: !0
+ })), d.vertexArray = _, d.renderState = e._rsPickPass, d.shaderProgram = e._spPick, d.uniformMap = p, d.pass = Pass$1.TERRAIN_CLASSIFICATION, n && (d.offset = c.offset, d.count = c.count), f = DrawCommand.shallowClone(
+ d,
+ d.derivedCommands.tileset
+ ), f.pass = Pass$1.CESIUM_3D_TILE_CLASSIFICATION, d.derivedCommands.tileset = f, m) {
+ let y = DrawCommand.shallowClone(
+ d,
+ d.derivedCommands.pick2D
+ );
+ y.shaderProgram = e._spPick2D, d.derivedCommands.pick2D = y, y = DrawCommand.shallowClone(
+ f,
+ f.derivedCommands.pick2D
+ ), y.shaderProgram = e._spPick2D, f.derivedCommands.pick2D = y;
+ }
+ }
+}
+function createCommands$3(e, t, n, i, r, o, s) {
+ createColorCommands$1(e, o), createPickCommands$2(e, s);
+}
+function boundingVolumeIndex$1(e, t) {
+ return Math.floor(e % t / 2);
+}
+function updateAndQueueRenderCommand$1(e, t, n, i, r, o) {
+ e.modelMatrix = n, e.boundingVolume = r, e.cull = i, e.debugShowBoundingVolume = o, t.commandList.push(e);
+}
+function updateAndQueuePickCommand$1(e, t, n, i, r) {
+ e.modelMatrix = n, e.boundingVolume = r, e.cull = i, t.commandList.push(e);
+}
+function updateAndQueueCommands$2(e, t, n, i, r, o, s, c) {
+ const l = e._primitive;
+ Primitive$3._updateBoundingVolumes(l, t, r);
+ let d;
+ t.mode === SceneMode$1.SCENE3D ? d = l._boundingSphereWC : t.mode === SceneMode$1.COLUMBUS_VIEW ? d = l._boundingSphereCV : t.mode === SceneMode$1.SCENE2D && defined(l._boundingSphere2D) ? d = l._boundingSphere2D : defined(l._boundingSphereMorph) && (d = l._boundingSphereMorph);
+ const f = e.classificationType, h = f !== ClassificationType$1.CESIUM_3D_TILE, p = f !== ClassificationType$1.TERRAIN, m = t.passes;
+ let _, y, C;
+ if (m.render) {
+ const T = n.length;
+ for (_ = 0; _ < T; ++_)
+ y = d[boundingVolumeIndex$1(_, T)], h && (C = n[_], updateAndQueueRenderCommand$1(
+ C,
+ t,
+ r,
+ o,
+ y,
+ s
+ )), p && (C = n[_].derivedCommands.tileset, updateAndQueueRenderCommand$1(
+ C,
+ t,
+ r,
+ o,
+ y,
+ s
+ ));
+ if (t.invertClassification) {
+ const x = e._commandsIgnoreShow, b = x.length;
+ for (_ = 0; _ < b; ++_)
+ y = d[_], C = x[_], updateAndQueueRenderCommand$1(
+ C,
+ t,
+ r,
+ o,
+ y,
+ s
+ );
+ }
+ }
+ if (m.pick) {
+ const T = i.length, x = l._pickOffsets;
+ for (_ = 0; _ < T; ++_) {
+ const b = x[boundingVolumeIndex$1(_, T)];
+ y = d[b.index], h && (C = i[_], updateAndQueuePickCommand$1(
+ C,
+ t,
+ r,
+ o,
+ y
+ )), p && (C = i[_].derivedCommands.tileset, updateAndQueuePickCommand$1(
+ C,
+ t,
+ r,
+ o,
+ y
+ ));
+ }
+ }
+}
+ClassificationPrimitive.prototype.update = function(e) {
+ if (!defined(this._primitive) && !defined(this.geometryInstances))
+ return;
+ let t = this.appearance;
+ defined(t) && defined(t.material) && t.material.update(e.context);
+ const n = this, i = this._primitiveOptions;
+ if (!defined(this._primitive)) {
+ const r = Array.isArray(this.geometryInstances) ? this.geometryInstances : [this.geometryInstances], o = r.length;
+ let s, c, l, d = !1, f = !0, h, p = !1, m = !1;
+ for (o > 0 && (l = r[0].attributes, p = ShadowVolumeAppearance.hasAttributesForSphericalExtents(
+ l
+ ), m = ShadowVolumeAppearance.hasAttributesForTextureCoordinatePlanes(
+ l
+ ), h = l.color), s = 0; s < o; s++) {
+ c = r[s];
+ const y = c.attributes.color;
+ defined(y) && (d = !0), f = f && defined(y) && ColorGeometryInstanceAttribute.equals(h, y);
+ }
+ if (!f && !p && !m)
+ throw new DeveloperError(
+ "All GeometryInstances must have the same color attribute except via GroundPrimitives"
+ );
+ d && !defined(t) && (t = new PerInstanceColorAppearance({
+ flat: !0
+ }), this.appearance = t), this._usePickOffsets = !p && !m, this._hasSphericalExtentsAttribute = p, this._hasPlanarExtentsAttributes = m, this._hasPerColorAttribute = d;
+ const _ = new Array(o);
+ for (s = 0; s < o; ++s)
+ c = r[s], _[s] = new GeometryInstance({
+ geometry: c.geometry,
+ attributes: c.attributes,
+ modelMatrix: c.modelMatrix,
+ id: c.id,
+ pickPrimitive: defaultValue(this._pickPrimitive, n)
+ });
+ i.appearance = t, i.geometryInstances = _, defined(this._createBoundingVolumeFunction) && (i._createBoundingVolumeFunction = function(y, C) {
+ n._createBoundingVolumeFunction(y, C);
+ }), i._createRenderStatesFunction = function(y, C, T, x) {
+ createRenderStates$4(n);
+ }, i._createShaderProgramFunction = function(y, C, T) {
+ createShaderProgram$2(n, C);
+ }, i._createCommandsFunction = function(y, C, T, x, b, S, E) {
+ createCommands$3(
+ n,
+ void 0,
+ void 0,
+ !0,
+ !1,
+ S,
+ E
+ );
+ }, defined(this._updateAndQueueCommandsFunction) ? i._updateAndQueueCommandsFunction = function(y, C, T, x, b, S, E, A) {
+ n._updateAndQueueCommandsFunction(
+ y,
+ C,
+ T,
+ x,
+ b,
+ S,
+ E,
+ A
+ );
+ } : i._updateAndQueueCommandsFunction = function(y, C, T, x, b, S, E, A) {
+ updateAndQueueCommands$2(
+ n,
+ C,
+ T,
+ x,
+ b,
+ S,
+ E
+ );
+ }, this._primitive = new Primitive$3(i);
+ }
+ this.debugShowShadowVolume && !this._debugShowShadowVolume && this._ready ? (this._debugShowShadowVolume = !0, this._rsStencilDepthPass = RenderState.fromCache(
+ getStencilDepthRenderState$2(!1, !1)
+ ), this._rsStencilDepthPass3DTiles = RenderState.fromCache(
+ getStencilDepthRenderState$2(!1, !0)
+ ), this._rsColorPass = RenderState.fromCache(getColorRenderState(!1))) : !this.debugShowShadowVolume && this._debugShowShadowVolume && (this._debugShowShadowVolume = !1, this._rsStencilDepthPass = RenderState.fromCache(
+ getStencilDepthRenderState$2(!0, !1)
+ ), this._rsStencilDepthPass3DTiles = RenderState.fromCache(
+ getStencilDepthRenderState$2(!0, !0)
+ ), this._rsColorPass = RenderState.fromCache(getColorRenderState(!0))), this._primitive.appearance !== t && (this._primitive.appearance = t), this._primitive.show = this.show, this._primitive.debugShowBoundingVolume = this.debugShowBoundingVolume, this._primitive.update(e), e.afterRender.push(() => {
+ defined(this._primitive) && this._primitive.ready && (this._ready = !0, this.releaseGeometryInstances && (this.geometryInstances = void 0));
+ });
+};
+ClassificationPrimitive.prototype.getGeometryInstanceAttributes = function(e) {
+ return this._primitive.getGeometryInstanceAttributes(e);
+};
+ClassificationPrimitive.prototype.isDestroyed = function() {
+ return !1;
+};
+ClassificationPrimitive.prototype.destroy = function() {
+ return this._primitive = this._primitive && this._primitive.destroy(), this._sp = this._sp && this._sp.destroy(), this._spPick = this._spPick && this._spPick.destroy(), this._spColor = this._spColor && this._spColor.destroy(), this._spPick2D = void 0, this._spColor2D = void 0, destroyObject(this);
+};
+const GroundPrimitiveUniformMap = {
+ u_globeMinimumAltitude: function() {
+ return 55e3;
+ }
+};
+function GroundPrimitive(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ let t = e.appearance;
+ const n = e.geometryInstances;
+ if (!defined(t) && defined(n)) {
+ const r = Array.isArray(n) ? n : [n], o = r.length;
+ for (let s = 0; s < o; s++) {
+ const c = r[s].attributes;
+ if (defined(c) && defined(c.color)) {
+ t = new PerInstanceColorAppearance({
+ flat: !0
+ });
+ break;
+ }
+ }
+ }
+ this.appearance = t, this.geometryInstances = e.geometryInstances, this.show = defaultValue(e.show, !0), this.classificationType = defaultValue(
+ e.classificationType,
+ ClassificationType$1.BOTH
+ ), this.debugShowBoundingVolume = defaultValue(
+ e.debugShowBoundingVolume,
+ !1
+ ), this.debugShowShadowVolume = defaultValue(
+ e.debugShowShadowVolume,
+ !1
+ ), this._boundingVolumes = [], this._boundingVolumes2D = [], this._ready = !1, this._primitive = void 0, this._maxHeight = void 0, this._minHeight = void 0, this._maxTerrainHeight = ApproximateTerrainHeights._defaultMaxTerrainHeight, this._minTerrainHeight = ApproximateTerrainHeights._defaultMinTerrainHeight, this._boundingSpheresKeys = [], this._boundingSpheres = [], this._useFragmentCulling = !1, this._zIndex = void 0;
+ const i = this;
+ this._classificationPrimitiveOptions = {
+ geometryInstances: void 0,
+ appearance: void 0,
+ vertexCacheOptimize: defaultValue(e.vertexCacheOptimize, !1),
+ interleave: defaultValue(e.interleave, !1),
+ releaseGeometryInstances: defaultValue(
+ e.releaseGeometryInstances,
+ !0
+ ),
+ allowPicking: defaultValue(e.allowPicking, !0),
+ asynchronous: defaultValue(e.asynchronous, !0),
+ compressVertices: defaultValue(e.compressVertices, !0),
+ _createBoundingVolumeFunction: void 0,
+ _updateAndQueueCommandsFunction: void 0,
+ _pickPrimitive: i,
+ _extruded: !0,
+ _uniformMap: GroundPrimitiveUniformMap
+ };
+}
+Object.defineProperties(GroundPrimitive.prototype, {
+ /**
+ * When true, geometry vertices are optimized for the pre and post-vertex-shader caches.
+ *
+ * @memberof GroundPrimitive.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default true
+ */
+ vertexCacheOptimize: {
+ get: function() {
+ return this._classificationPrimitiveOptions.vertexCacheOptimize;
+ }
+ },
+ /**
+ * Determines if geometry vertex attributes are interleaved, which can slightly improve rendering performance.
+ *
+ * @memberof GroundPrimitive.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default false
+ */
+ interleave: {
+ get: function() {
+ return this._classificationPrimitiveOptions.interleave;
+ }
+ },
+ /**
+ * When true, the primitive does not keep a reference to the input geometryInstances to save memory.
+ *
+ * @memberof GroundPrimitive.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default true
+ */
+ releaseGeometryInstances: {
+ get: function() {
+ return this._classificationPrimitiveOptions.releaseGeometryInstances;
+ }
+ },
+ /**
+ * When true, each geometry instance will only be pickable with {@link Scene#pick}. When false, GPU memory is saved.
+ *
+ * @memberof GroundPrimitive.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default true
+ */
+ allowPicking: {
+ get: function() {
+ return this._classificationPrimitiveOptions.allowPicking;
+ }
+ },
+ /**
+ * Determines if the geometry instances will be created and batched on a web worker.
+ *
+ * @memberof GroundPrimitive.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default true
+ */
+ asynchronous: {
+ get: function() {
+ return this._classificationPrimitiveOptions.asynchronous;
+ }
+ },
+ /**
+ * When true, geometry vertices are compressed, which will save memory.
+ *
+ * @memberof GroundPrimitive.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default true
+ */
+ compressVertices: {
+ get: function() {
+ return this._classificationPrimitiveOptions.compressVertices;
+ }
+ },
+ /**
+ * Determines if the primitive is complete and ready to render. If this property is
+ * true, the primitive will be rendered the next time that {@link GroundPrimitive#update}
+ * is called.
+ *
+ * @memberof GroundPrimitive.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ */
+ ready: {
+ get: function() {
+ return this._ready;
+ }
+ }
+});
+GroundPrimitive.isSupported = ClassificationPrimitive.isSupported;
+function getComputeMaximumHeightFunction(e) {
+ return function(t, n) {
+ const i = n.maximumRadius, r = i / Math.cos(t * 0.5) - i;
+ return e._maxHeight + r;
+ };
+}
+function getComputeMinimumHeightFunction(e) {
+ return function(t, n) {
+ return e._minHeight;
+ };
+}
+const scratchBVCartesianHigh = new Cartesian3(), scratchBVCartesianLow = new Cartesian3(), scratchBVCartesian = new Cartesian3(), scratchBVCartographic$1 = new Cartographic(), scratchBVRectangle = new Rectangle();
+function getRectangle(e, t) {
+ const n = e.mapProjection.ellipsoid;
+ if (!defined(t.attributes) || !defined(t.attributes.position3DHigh))
+ return defined(t.rectangle) ? t.rectangle : void 0;
+ const i = t.attributes.position3DHigh.values, r = t.attributes.position3DLow.values, o = i.length;
+ let s = Number.POSITIVE_INFINITY, c = Number.POSITIVE_INFINITY, l = Number.NEGATIVE_INFINITY, d = Number.NEGATIVE_INFINITY;
+ for (let h = 0; h < o; h += 3) {
+ const p = Cartesian3.unpack(
+ i,
+ h,
+ scratchBVCartesianHigh
+ ), m = Cartesian3.unpack(
+ r,
+ h,
+ scratchBVCartesianLow
+ ), _ = Cartesian3.add(
+ p,
+ m,
+ scratchBVCartesian
+ ), y = n.cartesianToCartographic(
+ _,
+ scratchBVCartographic$1
+ ), C = y.latitude, T = y.longitude;
+ s = Math.min(s, C), c = Math.min(c, T), l = Math.max(l, C), d = Math.max(d, T);
+ }
+ const f = scratchBVRectangle;
+ return f.north = l, f.south = s, f.east = d, f.west = c, f;
+}
+function setMinMaxTerrainHeights(e, t, n) {
+ const i = ApproximateTerrainHeights.getMinimumMaximumHeights(
+ t,
+ n
+ );
+ e._minTerrainHeight = i.minimumTerrainHeight, e._maxTerrainHeight = i.maximumTerrainHeight;
+}
+function createBoundingVolume(e, t, n) {
+ const i = t.mapProjection.ellipsoid, r = getRectangle(t, n), o = OrientedBoundingBox.fromRectangle(
+ r,
+ e._minHeight,
+ e._maxHeight,
+ i
+ );
+ if (e._boundingVolumes.push(o), !t.scene3DOnly) {
+ const s = t.mapProjection, c = BoundingSphere.fromRectangleWithHeights2D(
+ r,
+ s,
+ e._maxHeight,
+ e._minHeight
+ );
+ Cartesian3.fromElements(
+ c.center.z,
+ c.center.x,
+ c.center.y,
+ c.center
+ ), e._boundingVolumes2D.push(c);
+ }
+}
+function boundingVolumeIndex(e, t) {
+ return Math.floor(e % t / 2);
+}
+function updateAndQueueRenderCommand(e, t, n, i, r, o, s) {
+ const c = e._primitive;
+ n.mode !== SceneMode$1.SCENE3D && t.shaderProgram === c._spColor && c._needs2DShader && (t = t.derivedCommands.appearance2D), t.owner = e, t.modelMatrix = i, t.boundingVolume = o, t.cull = r, t.debugShowBoundingVolume = s, n.commandList.push(t);
+}
+function updateAndQueuePickCommand(e, t, n, i, r, o) {
+ const s = e._primitive;
+ n.mode !== SceneMode$1.SCENE3D && t.shaderProgram === s._spPick && s._needs2DShader && (t = t.derivedCommands.pick2D), t.owner = e, t.modelMatrix = i, t.boundingVolume = o, t.cull = r, n.commandList.push(t);
+}
+function updateAndQueueCommands$1(e, t, n, i, r, o, s, c) {
+ let l;
+ t.mode === SceneMode$1.SCENE3D ? l = e._boundingVolumes : l = e._boundingVolumes2D;
+ const d = e.classificationType, f = d !== ClassificationType$1.CESIUM_3D_TILE, h = d !== ClassificationType$1.TERRAIN, p = t.passes, m = e._primitive;
+ let _, y, C;
+ if (p.render) {
+ const T = n.length;
+ for (_ = 0; _ < T; ++_)
+ y = l[boundingVolumeIndex(_, T)], f && (C = n[_], updateAndQueueRenderCommand(
+ e,
+ C,
+ t,
+ r,
+ o,
+ y,
+ s
+ )), h && (C = n[_].derivedCommands.tileset, updateAndQueueRenderCommand(
+ e,
+ C,
+ t,
+ r,
+ o,
+ y,
+ s
+ ));
+ if (t.invertClassification) {
+ const x = m._commandsIgnoreShow, b = x.length;
+ for (_ = 0; _ < b; ++_)
+ y = l[_], C = x[_], updateAndQueueRenderCommand(
+ e,
+ C,
+ t,
+ r,
+ o,
+ y,
+ s
+ );
+ }
+ }
+ if (p.pick) {
+ const T = i.length;
+ let x;
+ for (e._useFragmentCulling || (x = m._primitive._pickOffsets), _ = 0; _ < T; ++_) {
+ if (y = l[boundingVolumeIndex(_, T)], !e._useFragmentCulling) {
+ const b = x[boundingVolumeIndex(_, T)];
+ y = l[b.index];
+ }
+ f && (C = i[_], updateAndQueuePickCommand(
+ e,
+ C,
+ t,
+ r,
+ o,
+ y
+ )), h && (C = i[_].derivedCommands.tileset, updateAndQueuePickCommand(
+ e,
+ C,
+ t,
+ r,
+ o,
+ y
+ ));
+ }
+ }
+}
+GroundPrimitive.initializeTerrainHeights = function() {
+ return ApproximateTerrainHeights.initialize();
+};
+GroundPrimitive.prototype.update = function(e) {
+ if (!defined(this._primitive) && !defined(this.geometryInstances))
+ return;
+ if (!ApproximateTerrainHeights.initialized) {
+ GroundPrimitive.initializeTerrainHeights();
+ return;
+ }
+ const t = this, n = this._classificationPrimitiveOptions;
+ if (!defined(this._primitive)) {
+ const i = e.mapProjection.ellipsoid;
+ let r, o, s;
+ const c = Array.isArray(this.geometryInstances) ? this.geometryInstances : [this.geometryInstances], l = c.length, d = new Array(l);
+ let f, h;
+ for (f = 0; f < l; ++f) {
+ r = c[f], o = r.geometry;
+ const y = getRectangle(e, o);
+ defined(h) ? defined(y) && Rectangle.union(h, y, h) : h = Rectangle.clone(y);
+ const C = r.id;
+ if (defined(C) && defined(y)) {
+ const T = ApproximateTerrainHeights.getBoundingSphere(
+ y,
+ i
+ );
+ this._boundingSpheresKeys.push(C), this._boundingSpheres.push(T);
+ }
+ s = o.constructor, !defined(s) || defined(s.createShadowVolume);
+ }
+ setMinMaxTerrainHeights(this, h, i);
+ const p = e.verticalExaggeration, m = e.verticalExaggerationRelativeHeight;
+ this._minHeight = VerticalExaggeration.getHeight(
+ this._minTerrainHeight,
+ p,
+ m
+ ), this._maxHeight = VerticalExaggeration.getHeight(
+ this._maxTerrainHeight,
+ p,
+ m
+ );
+ const _ = GroundPrimitive._supportsMaterials(
+ e.context
+ );
+ if (this._useFragmentCulling = _, _) {
+ let y, C = !0;
+ for (f = 0; f < l; ++f)
+ if (r = c[f], o = r.geometry, h = getRectangle(e, o), ShadowVolumeAppearance.shouldUseSphericalCoordinates(h)) {
+ C = !1;
+ break;
+ }
+ for (f = 0; f < l; ++f) {
+ r = c[f], o = r.geometry, s = o.constructor;
+ const T = getRectangle(e, o), x = o.textureCoordinateRotationPoints;
+ C ? y = ShadowVolumeAppearance.getPlanarTextureCoordinateAttributes(
+ T,
+ x,
+ i,
+ e.mapProjection,
+ this._maxHeight
+ ) : y = ShadowVolumeAppearance.getSphericalExtentGeometryInstanceAttributes(
+ T,
+ x,
+ i,
+ e.mapProjection
+ );
+ const b = r.attributes;
+ for (const S in b)
+ b.hasOwnProperty(S) && (y[S] = b[S]);
+ d[f] = new GeometryInstance({
+ geometry: s.createShadowVolume(
+ o,
+ getComputeMinimumHeightFunction(this),
+ getComputeMaximumHeightFunction(this)
+ ),
+ attributes: y,
+ id: r.id
+ });
+ }
+ } else
+ for (f = 0; f < l; ++f)
+ r = c[f], o = r.geometry, s = o.constructor, d[f] = new GeometryInstance({
+ geometry: s.createShadowVolume(
+ o,
+ getComputeMinimumHeightFunction(this),
+ getComputeMaximumHeightFunction(this)
+ ),
+ attributes: r.attributes,
+ id: r.id
+ });
+ n.geometryInstances = d, n.appearance = this.appearance, n._createBoundingVolumeFunction = function(y, C) {
+ createBoundingVolume(t, y, C);
+ }, n._updateAndQueueCommandsFunction = function(y, C, T, x, b, S, E, A) {
+ updateAndQueueCommands$1(
+ t,
+ C,
+ T,
+ x,
+ b,
+ S,
+ E
+ );
+ }, this._primitive = new ClassificationPrimitive(n);
+ }
+ this._primitive.appearance = this.appearance, this._primitive.show = this.show, this._primitive.debugShowShadowVolume = this.debugShowShadowVolume, this._primitive.debugShowBoundingVolume = this.debugShowBoundingVolume, this._primitive.update(e), e.afterRender.push(() => {
+ !this._ready && defined(this._primitive) && this._primitive.ready && (this._ready = !0, this.releaseGeometryInstances && (this.geometryInstances = void 0));
+ });
+};
+GroundPrimitive.prototype.getBoundingSphere = function(e) {
+ const t = this._boundingSpheresKeys.indexOf(e);
+ if (t !== -1)
+ return this._boundingSpheres[t];
+};
+GroundPrimitive.prototype.getGeometryInstanceAttributes = function(e) {
+ return this._primitive.getGeometryInstanceAttributes(e);
+};
+GroundPrimitive.prototype.isDestroyed = function() {
+ return !1;
+};
+GroundPrimitive.prototype.destroy = function() {
+ return this._primitive = this._primitive && this._primitive.destroy(), destroyObject(this);
+};
+GroundPrimitive._supportsMaterials = function(e) {
+ return e.depthTexture;
+};
+GroundPrimitive.supportsMaterials = function(e) {
+ return GroundPrimitive._supportsMaterials(e.frameState.context);
+};
+function MaterialProperty() {
+ DeveloperError.throwInstantiationError();
+}
+Object.defineProperties(MaterialProperty.prototype, {
+ /**
+ * Gets a value indicating if this property is constant. A property is considered
+ * constant if getValue always returns the same result for the current definition.
+ * @memberof MaterialProperty.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ */
+ isConstant: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * Gets the event that is raised whenever the definition of this property changes.
+ * The definition is considered to have changed if a call to getValue would return
+ * a different result for the same time.
+ * @memberof MaterialProperty.prototype
+ *
+ * @type {Event}
+ * @readonly
+ */
+ definitionChanged: {
+ get: DeveloperError.throwInstantiationError
+ }
+});
+MaterialProperty.prototype.getType = DeveloperError.throwInstantiationError;
+MaterialProperty.prototype.getValue = DeveloperError.throwInstantiationError;
+MaterialProperty.prototype.equals = DeveloperError.throwInstantiationError;
+const timeScratch$q = new JulianDate();
+MaterialProperty.getValue = function(e, t, n) {
+ let i;
+ return defined(e) || (e = JulianDate.now(timeScratch$q)), defined(t) && (i = t.getType(e), defined(i)) ? ((!defined(n) || n.type !== i) && (n = Material$4.fromType(i)), t.getValue(e, n.uniforms), n) : ((!defined(n) || n.type !== Material$4.ColorType) && (n = Material$4.fromType(Material$4.ColorType)), Color.clone(Color.WHITE, n.uniforms.color), n);
+};
+function DynamicGeometryUpdater$1(e, t, n) {
+ this._primitives = t, this._orderedGroundPrimitives = n, this._primitive = void 0, this._outlinePrimitive = void 0, this._geometryUpdater = e, this._options = e._options, this._entity = e._entity, this._material = void 0;
+}
+DynamicGeometryUpdater$1.prototype._isHidden = function(e, t, n) {
+ return !e.isShowing || !e.isAvailable(n) || !Property.getValueOrDefault(t.show, n, !0);
+};
+DynamicGeometryUpdater$1.prototype._setOptions = DeveloperError.throwInstantiationError;
+DynamicGeometryUpdater$1.prototype.update = function(e) {
+ const t = this._geometryUpdater, n = t._onTerrain, i = this._primitives, r = this._orderedGroundPrimitives;
+ n ? r.remove(this._primitive) : (i.removeAndDestroy(this._primitive), i.removeAndDestroy(this._outlinePrimitive), this._outlinePrimitive = void 0), this._primitive = void 0;
+ const o = this._entity, s = o[this._geometryUpdater._geometryPropertyName];
+ if (this._setOptions(o, s, e), this._isHidden(o, s, e))
+ return;
+ const c = this._geometryUpdater.shadowsProperty.getValue(e), l = this._options;
+ if (!defined(s.fill) || s.fill.getValue(e)) {
+ const d = t.fillMaterialProperty, f = d instanceof ColorMaterialProperty;
+ let h;
+ const p = t._getIsClosed(l);
+ if (f)
+ h = new PerInstanceColorAppearance({
+ closed: p,
+ flat: n && !t._supportsMaterialsforEntitiesOnTerrain
+ });
+ else {
+ const m = MaterialProperty.getValue(
+ e,
+ d,
+ this._material
+ );
+ this._material = m, h = new MaterialAppearance({
+ material: m,
+ translucent: m.isTranslucent(),
+ closed: p
+ });
+ }
+ if (n)
+ l.vertexFormat = PerInstanceColorAppearance.VERTEX_FORMAT, this._primitive = r.add(
+ new GroundPrimitive({
+ geometryInstances: this._geometryUpdater.createFillGeometryInstance(
+ e
+ ),
+ appearance: h,
+ asynchronous: !1,
+ shadows: c,
+ classificationType: this._geometryUpdater.classificationTypeProperty.getValue(
+ e
+ )
+ }),
+ Property.getValueOrUndefined(this._geometryUpdater.zIndex, e)
+ );
+ else {
+ l.vertexFormat = h.vertexFormat;
+ const m = this._geometryUpdater.createFillGeometryInstance(
+ e
+ );
+ f && (h.translucent = m.attributes.color.value[3] !== 255), this._primitive = i.add(
+ new Primitive$3({
+ geometryInstances: m,
+ appearance: h,
+ asynchronous: !1,
+ shadows: c
+ })
+ );
+ }
+ }
+ if (!n && defined(s.outline) && s.outline.getValue(e)) {
+ const d = this._geometryUpdater.createOutlineGeometryInstance(
+ e
+ ), f = Property.getValueOrDefault(
+ s.outlineWidth,
+ e,
+ 1
+ );
+ this._outlinePrimitive = i.add(
+ new Primitive$3({
+ geometryInstances: d,
+ appearance: new PerInstanceColorAppearance({
+ flat: !0,
+ translucent: d.attributes.color.value[3] !== 255,
+ renderState: {
+ lineWidth: t._scene.clampLineWidth(f)
+ }
+ }),
+ asynchronous: !1,
+ shadows: c
+ })
+ );
+ }
+};
+DynamicGeometryUpdater$1.prototype.getBoundingSphere = function(e) {
+ const t = this._entity, n = this._primitive, i = this._outlinePrimitive;
+ let r;
+ return defined(n) && n.show && n.ready && (r = n.getGeometryInstanceAttributes(t), defined(r) && defined(r.boundingSphere)) || defined(i) && i.show && i.ready && (r = i.getGeometryInstanceAttributes(t), defined(r) && defined(r.boundingSphere)) ? (BoundingSphere.clone(r.boundingSphere, e), BoundingSphereState$1.DONE) : defined(n) && !n.ready || defined(i) && !i.ready ? BoundingSphereState$1.PENDING : BoundingSphereState$1.FAILED;
+};
+DynamicGeometryUpdater$1.prototype.isDestroyed = function() {
+ return !1;
+};
+DynamicGeometryUpdater$1.prototype.destroy = function() {
+ const e = this._primitives, t = this._orderedGroundPrimitives;
+ this._geometryUpdater._onTerrain ? t.remove(this._primitive) : e.removeAndDestroy(this._primitive), e.removeAndDestroy(this._outlinePrimitive), destroyObject(this);
+};
+const ArcType = {
+ /**
+ * Straight line that does not conform to the surface of the ellipsoid.
+ *
+ * @type {number}
+ * @constant
+ */
+ NONE: 0,
+ /**
+ * Follow geodesic path.
+ *
+ * @type {number}
+ * @constant
+ */
+ GEODESIC: 1,
+ /**
+ * Follow rhumb or loxodrome path.
+ *
+ * @type {number}
+ * @constant
+ */
+ RHUMB: 2
+}, ArcType$1 = Object.freeze(ArcType), removeDuplicatesEpsilon = CesiumMath.EPSILON10;
+function arrayRemoveDuplicates(e, t, n, i) {
+ if (!defined(e))
+ return;
+ n = defaultValue(n, !1);
+ const r = defined(i), o = e.length;
+ if (o < 2)
+ return e;
+ let s, c = e[0], l, d, f = 0, h = -1;
+ for (s = 1; s < o; ++s)
+ l = e[s], t(c, l, removeDuplicatesEpsilon) ? (defined(d) || (d = e.slice(0, s), f = s - 1, h = 0), r && i.push(s)) : (defined(d) && (d.push(l), f = s, r && (h = i.length)), c = l);
+ return n && t(e[0], e[o - 1], removeDuplicatesEpsilon) && (r && (defined(d) ? i.splice(h, 0, f) : i.push(o - 1)), defined(d) ? d.length -= 1 : d = e.slice(0, -1)), defined(d) ? d : e;
+}
+function setConstants(e) {
+ const t = e._uSquared, n = e._ellipsoid.maximumRadius, i = e._ellipsoid.minimumRadius, r = (n - i) / n, o = Math.cos(e._startHeading), s = Math.sin(e._startHeading), c = (1 - r) * Math.tan(e._start.latitude), l = 1 / Math.sqrt(1 + c * c), d = l * c, f = Math.atan2(c, o), h = l * s, p = h * h, m = 1 - p, _ = Math.sqrt(m), y = t / 4, C = y * y, T = C * y, x = C * C, b = 1 + y - 3 * C / 4 + 5 * T / 4 - 175 * x / 64, S = 1 - y + 15 * C / 8 - 35 * T / 8, E = 1 - 3 * y + 35 * C / 4, A = 1 - 5 * y, D = b * f - S * Math.sin(2 * f) * y / 2 - E * Math.sin(4 * f) * C / 16 - A * Math.sin(6 * f) * T / 48 - Math.sin(8 * f) * 5 * x / 512, P = e._constants;
+ P.a = n, P.b = i, P.f = r, P.cosineHeading = o, P.sineHeading = s, P.tanU = c, P.cosineU = l, P.sineU = d, P.sigma = f, P.sineAlpha = h, P.sineSquaredAlpha = p, P.cosineSquaredAlpha = m, P.cosineAlpha = _, P.u2Over4 = y, P.u4Over16 = C, P.u6Over64 = T, P.u8Over256 = x, P.a0 = b, P.a1 = S, P.a2 = E, P.a3 = A, P.distanceRatio = D;
+}
+function computeC(e, t) {
+ return e * t * (4 + e * (4 - 3 * t)) / 16;
+}
+function computeDeltaLambda(e, t, n, i, r, o, s) {
+ const c = computeC(e, n);
+ return (1 - c) * e * t * (i + c * r * (s + c * o * (2 * s * s - 1)));
+}
+function vincentyInverseFormula(e, t, n, i, r, o, s) {
+ const c = (t - n) / t, l = o - i, d = Math.atan((1 - c) * Math.tan(r)), f = Math.atan((1 - c) * Math.tan(s)), h = Math.cos(d), p = Math.sin(d), m = Math.cos(f), _ = Math.sin(f), y = h * m, C = h * _, T = p * _, x = p * m;
+ let b = l, S = CesiumMath.TWO_PI, E = Math.cos(b), A = Math.sin(b), D, P, I, M, R;
+ do {
+ E = Math.cos(b), A = Math.sin(b);
+ const U = C - x * E;
+ I = Math.sqrt(
+ m * m * A * A + U * U
+ ), P = T + y * E, D = Math.atan2(I, P);
+ let k;
+ I === 0 ? (k = 0, M = 1) : (k = y * A / I, M = 1 - k * k), S = b, R = P - 2 * T / M, isFinite(R) || (R = 0), b = l + computeDeltaLambda(
+ c,
+ k,
+ M,
+ D,
+ I,
+ P,
+ R
+ );
+ } while (Math.abs(b - S) > CesiumMath.EPSILON12);
+ const L = M * (t * t - n * n) / (n * n), g = 1 + L * (4096 + L * (L * (320 - 175 * L) - 768)) / 16384, w = L * (256 + L * (L * (74 - 47 * L) - 128)) / 1024, O = R * R, N = w * I * (R + w * (P * (2 * O - 1) - w * R * (4 * I * I - 3) * (4 * O - 3) / 6) / 4), F = n * g * (D - N), B = Math.atan2(
+ m * A,
+ C - x * E
+ ), V = Math.atan2(h * A, C * E - x);
+ e._distance = F, e._startHeading = B, e._endHeading = V, e._uSquared = L;
+}
+const scratchCart1$1 = new Cartesian3(), scratchCart2$2 = new Cartesian3();
+function computeProperties$1(e, t, n, i) {
+ Cartesian3.normalize(
+ i.cartographicToCartesian(t, scratchCart2$2),
+ scratchCart1$1
+ ), Cartesian3.normalize(
+ i.cartographicToCartesian(n, scratchCart2$2),
+ scratchCart2$2
+ ), vincentyInverseFormula(
+ e,
+ i.maximumRadius,
+ i.minimumRadius,
+ t.longitude,
+ t.latitude,
+ n.longitude,
+ n.latitude
+ ), e._start = Cartographic.clone(
+ t,
+ e._start
+ ), e._end = Cartographic.clone(n, e._end), e._start.height = 0, e._end.height = 0, setConstants(e);
+}
+function EllipsoidGeodesic(e, t, n) {
+ const i = defaultValue(n, Ellipsoid.default);
+ this._ellipsoid = i, this._start = new Cartographic(), this._end = new Cartographic(), this._constants = {}, this._startHeading = void 0, this._endHeading = void 0, this._distance = void 0, this._uSquared = void 0, defined(e) && defined(t) && computeProperties$1(this, e, t, i);
+}
+Object.defineProperties(EllipsoidGeodesic.prototype, {
+ /**
+ * Gets the ellipsoid.
+ * @memberof EllipsoidGeodesic.prototype
+ * @type {Ellipsoid}
+ * @readonly
+ */
+ ellipsoid: {
+ get: function() {
+ return this._ellipsoid;
+ }
+ },
+ /**
+ * Gets the surface distance between the start and end point
+ * @memberof EllipsoidGeodesic.prototype
+ * @type {number}
+ * @readonly
+ */
+ surfaceDistance: {
+ get: function() {
+ return this._distance;
+ }
+ },
+ /**
+ * Gets the initial planetodetic point on the path.
+ * @memberof EllipsoidGeodesic.prototype
+ * @type {Cartographic}
+ * @readonly
+ */
+ start: {
+ get: function() {
+ return this._start;
+ }
+ },
+ /**
+ * Gets the final planetodetic point on the path.
+ * @memberof EllipsoidGeodesic.prototype
+ * @type {Cartographic}
+ * @readonly
+ */
+ end: {
+ get: function() {
+ return this._end;
+ }
+ },
+ /**
+ * Gets the heading at the initial point.
+ * @memberof EllipsoidGeodesic.prototype
+ * @type {number}
+ * @readonly
+ */
+ startHeading: {
+ get: function() {
+ return this._startHeading;
+ }
+ },
+ /**
+ * Gets the heading at the final point.
+ * @memberof EllipsoidGeodesic.prototype
+ * @type {number}
+ * @readonly
+ */
+ endHeading: {
+ get: function() {
+ return this._endHeading;
+ }
+ }
+});
+EllipsoidGeodesic.prototype.setEndPoints = function(e, t) {
+ computeProperties$1(this, e, t, this._ellipsoid);
+};
+EllipsoidGeodesic.prototype.interpolateUsingFraction = function(e, t) {
+ return this.interpolateUsingSurfaceDistance(
+ this._distance * e,
+ t
+ );
+};
+EllipsoidGeodesic.prototype.interpolateUsingSurfaceDistance = function(e, t) {
+ const n = this._constants, i = n.distanceRatio + e / n.b, r = Math.cos(2 * i), o = Math.cos(4 * i), s = Math.cos(6 * i), c = Math.sin(2 * i), l = Math.sin(4 * i), d = Math.sin(6 * i), f = Math.sin(8 * i), h = i * i, p = i * h, m = n.u8Over256, _ = n.u2Over4, y = n.u6Over64, C = n.u4Over16;
+ let T = 2 * p * m * r / 3 + i * (1 - _ + 7 * C / 4 - 15 * y / 4 + 579 * m / 64 - (C - 15 * y / 4 + 187 * m / 16) * r - (5 * y / 4 - 115 * m / 16) * o - 29 * m * s / 16) + (_ / 2 - C + 71 * y / 32 - 85 * m / 16) * c + (5 * C / 16 - 5 * y / 4 + 383 * m / 96) * l - h * ((y - 11 * m / 2) * c + 5 * m * l / 2) + (29 * y / 96 - 29 * m / 16) * d + 539 * m * f / 1536;
+ const x = Math.asin(Math.sin(T) * n.cosineAlpha), b = Math.atan(n.a / n.b * Math.tan(x));
+ T = T - n.sigma;
+ const S = Math.cos(2 * n.sigma + T), E = Math.sin(T), A = Math.cos(T), D = n.cosineU * A, P = n.sineU * E, M = Math.atan2(
+ E * n.sineHeading,
+ D - P * n.cosineHeading
+ ) - computeDeltaLambda(
+ n.f,
+ n.sineAlpha,
+ n.cosineSquaredAlpha,
+ T,
+ E,
+ A,
+ S
+ );
+ return defined(t) ? (t.longitude = this._start.longitude + M, t.latitude = b, t.height = 0, t) : new Cartographic(this._start.longitude + M, b, 0);
+};
+function calculateM(e, t, n) {
+ if (e === 0)
+ return t * n;
+ const i = e * e, r = i * i, o = r * i, s = o * i, c = s * i, l = c * i, d = n, f = Math.sin(2 * d), h = Math.sin(4 * d), p = Math.sin(6 * d), m = Math.sin(8 * d), _ = Math.sin(10 * d), y = Math.sin(12 * d);
+ return t * ((1 - i / 4 - 3 * r / 64 - 5 * o / 256 - 175 * s / 16384 - 441 * c / 65536 - 4851 * l / 1048576) * d - (3 * i / 8 + 3 * r / 32 + 45 * o / 1024 + 105 * s / 4096 + 2205 * c / 131072 + 6237 * l / 524288) * f + (15 * r / 256 + 45 * o / 1024 + 525 * s / 16384 + 1575 * c / 65536 + 155925 * l / 8388608) * h - (35 * o / 3072 + 175 * s / 12288 + 3675 * c / 262144 + 13475 * l / 1048576) * p + (315 * s / 131072 + 2205 * c / 524288 + 43659 * l / 8388608) * m - (693 * c / 1310720 + 6237 * l / 5242880) * _ + 1001 * l / 8388608 * y);
+}
+function calculateInverseM(e, t, n) {
+ const i = e / n;
+ if (t === 0)
+ return i;
+ const r = i * i, o = r * i, s = o * i, c = t, l = c * c, d = l * l, f = d * l, h = f * l, p = h * l, m = p * l, _ = Math.sin(2 * i), y = Math.cos(2 * i), C = Math.sin(4 * i), T = Math.cos(4 * i), x = Math.sin(6 * i), b = Math.cos(6 * i), S = Math.sin(8 * i), E = Math.cos(8 * i), A = Math.sin(10 * i), D = Math.cos(10 * i), P = Math.sin(12 * i);
+ return i + i * l / 4 + 7 * i * d / 64 + 15 * i * f / 256 + 579 * i * h / 16384 + 1515 * i * p / 65536 + 16837 * i * m / 1048576 + (3 * i * d / 16 + 45 * i * f / 256 - i * (32 * r - 561) * h / 4096 - i * (232 * r - 1677) * p / 16384 + i * (399985 - 90560 * r + 512 * s) * m / 5242880) * y + (21 * i * f / 256 + 483 * i * h / 4096 - i * (224 * r - 1969) * p / 16384 - i * (33152 * r - 112599) * m / 1048576) * T + (151 * i * h / 4096 + 4681 * i * p / 65536 + 1479 * i * m / 16384 - 453 * o * m / 32768) * b + (1097 * i * p / 65536 + 42783 * i * m / 1048576) * E + 8011 * i * m / 1048576 * D + (3 * l / 8 + 3 * d / 16 + 213 * f / 2048 - 3 * r * f / 64 + 255 * h / 4096 - 33 * r * h / 512 + 20861 * p / 524288 - 33 * r * p / 512 + s * p / 1024 + 28273 * m / 1048576 - 471 * r * m / 8192 + 9 * s * m / 4096) * _ + (21 * d / 256 + 21 * f / 256 + 533 * h / 8192 - 21 * r * h / 512 + 197 * p / 4096 - 315 * r * p / 4096 + 584039 * m / 16777216 - 12517 * r * m / 131072 + 7 * s * m / 2048) * C + (151 * f / 6144 + 151 * h / 4096 + 5019 * p / 131072 - 453 * r * p / 16384 + 26965 * m / 786432 - 8607 * r * m / 131072) * x + (1097 * h / 131072 + 1097 * p / 65536 + 225797 * m / 10485760 - 1097 * r * m / 65536) * S + (8011 * p / 2621440 + 8011 * m / 1048576) * A + 293393 * m / 251658240 * P;
+}
+function calculateSigma(e, t) {
+ if (e === 0)
+ return Math.log(Math.tan(0.5 * (CesiumMath.PI_OVER_TWO + t)));
+ const n = e * Math.sin(t);
+ return Math.log(Math.tan(0.5 * (CesiumMath.PI_OVER_TWO + t))) - e / 2 * Math.log((1 + n) / (1 - n));
+}
+function calculateHeading(e, t, n, i, r) {
+ const o = calculateSigma(e._ellipticity, n), s = calculateSigma(
+ e._ellipticity,
+ r
+ );
+ return Math.atan2(
+ CesiumMath.negativePiToPi(i - t),
+ s - o
+ );
+}
+function calculateArcLength(e, t, n, i, r, o, s) {
+ const c = e._heading, l = o - i;
+ let d = 0;
+ if (CesiumMath.equalsEpsilon(
+ Math.abs(c),
+ CesiumMath.PI_OVER_TWO,
+ CesiumMath.EPSILON8
+ ))
+ if (t === n)
+ d = t * Math.cos(r) * CesiumMath.negativePiToPi(l);
+ else {
+ const f = Math.sin(r);
+ d = t * Math.cos(r) * CesiumMath.negativePiToPi(l) / Math.sqrt(1 - e._ellipticitySquared * f * f);
+ }
+ else {
+ const f = calculateM(
+ e._ellipticity,
+ t,
+ r
+ );
+ d = (calculateM(
+ e._ellipticity,
+ t,
+ s
+ ) - f) / Math.cos(c);
+ }
+ return Math.abs(d);
+}
+const scratchCart1 = new Cartesian3(), scratchCart2$1 = new Cartesian3();
+function computeProperties(e, t, n, i) {
+ Cartesian3.normalize(
+ i.cartographicToCartesian(t, scratchCart2$1),
+ scratchCart1
+ ), Cartesian3.normalize(
+ i.cartographicToCartesian(n, scratchCart2$1),
+ scratchCart2$1
+ );
+ const r = i.maximumRadius, o = i.minimumRadius, s = r * r, c = o * o;
+ e._ellipticitySquared = (s - c) / s, e._ellipticity = Math.sqrt(
+ e._ellipticitySquared
+ ), e._start = Cartographic.clone(
+ t,
+ e._start
+ ), e._start.height = 0, e._end = Cartographic.clone(n, e._end), e._end.height = 0, e._heading = calculateHeading(
+ e,
+ t.longitude,
+ t.latitude,
+ n.longitude,
+ n.latitude
+ ), e._distance = calculateArcLength(
+ e,
+ i.maximumRadius,
+ i.minimumRadius,
+ t.longitude,
+ t.latitude,
+ n.longitude,
+ n.latitude
+ );
+}
+function interpolateUsingSurfaceDistance(e, t, n, i, r, o) {
+ if (n === 0)
+ return Cartographic.clone(e, o);
+ const s = r * r;
+ let c, l, d;
+ if (Math.abs(CesiumMath.PI_OVER_TWO - Math.abs(t)) > CesiumMath.EPSILON8) {
+ const f = calculateM(r, i, e.latitude), h = n * Math.cos(t), p = f + h;
+ if (l = calculateInverseM(p, r, i), Math.abs(t) < CesiumMath.EPSILON10)
+ c = CesiumMath.negativePiToPi(e.longitude);
+ else {
+ const m = calculateSigma(r, e.latitude), _ = calculateSigma(r, l);
+ d = Math.tan(t) * (_ - m), c = CesiumMath.negativePiToPi(e.longitude + d);
+ }
+ } else {
+ l = e.latitude;
+ let f;
+ if (r === 0)
+ f = i * Math.cos(e.latitude);
+ else {
+ const h = Math.sin(e.latitude);
+ f = i * Math.cos(e.latitude) / Math.sqrt(1 - s * h * h);
+ }
+ d = n / f, t > 0 ? c = CesiumMath.negativePiToPi(e.longitude + d) : c = CesiumMath.negativePiToPi(e.longitude - d);
+ }
+ return defined(o) ? (o.longitude = c, o.latitude = l, o.height = 0, o) : new Cartographic(c, l, 0);
+}
+function EllipsoidRhumbLine(e, t, n) {
+ const i = defaultValue(n, Ellipsoid.default);
+ this._ellipsoid = i, this._start = new Cartographic(), this._end = new Cartographic(), this._heading = void 0, this._distance = void 0, this._ellipticity = void 0, this._ellipticitySquared = void 0, defined(e) && defined(t) && computeProperties(this, e, t, i);
+}
+Object.defineProperties(EllipsoidRhumbLine.prototype, {
+ /**
+ * Gets the ellipsoid.
+ * @memberof EllipsoidRhumbLine.prototype
+ * @type {Ellipsoid}
+ * @readonly
+ */
+ ellipsoid: {
+ get: function() {
+ return this._ellipsoid;
+ }
+ },
+ /**
+ * Gets the surface distance between the start and end point
+ * @memberof EllipsoidRhumbLine.prototype
+ * @type {number}
+ * @readonly
+ */
+ surfaceDistance: {
+ get: function() {
+ return this._distance;
+ }
+ },
+ /**
+ * Gets the initial planetodetic point on the path.
+ * @memberof EllipsoidRhumbLine.prototype
+ * @type {Cartographic}
+ * @readonly
+ */
+ start: {
+ get: function() {
+ return this._start;
+ }
+ },
+ /**
+ * Gets the final planetodetic point on the path.
+ * @memberof EllipsoidRhumbLine.prototype
+ * @type {Cartographic}
+ * @readonly
+ */
+ end: {
+ get: function() {
+ return this._end;
+ }
+ },
+ /**
+ * Gets the heading from the start point to the end point.
+ * @memberof EllipsoidRhumbLine.prototype
+ * @type {number}
+ * @readonly
+ */
+ heading: {
+ get: function() {
+ return this._heading;
+ }
+ }
+});
+EllipsoidRhumbLine.fromStartHeadingDistance = function(e, t, n, i, r) {
+ const o = defaultValue(i, Ellipsoid.default), s = o.maximumRadius, c = o.minimumRadius, l = s * s, d = c * c, f = Math.sqrt((l - d) / l);
+ t = CesiumMath.negativePiToPi(t);
+ const h = interpolateUsingSurfaceDistance(
+ e,
+ t,
+ n,
+ o.maximumRadius,
+ f
+ );
+ return !defined(r) || defined(i) && !i.equals(r.ellipsoid) ? new EllipsoidRhumbLine(e, h, o) : (r.setEndPoints(e, h), r);
+};
+EllipsoidRhumbLine.prototype.setEndPoints = function(e, t) {
+ computeProperties(this, e, t, this._ellipsoid);
+};
+EllipsoidRhumbLine.prototype.interpolateUsingFraction = function(e, t) {
+ return this.interpolateUsingSurfaceDistance(
+ e * this._distance,
+ t
+ );
+};
+EllipsoidRhumbLine.prototype.interpolateUsingSurfaceDistance = function(e, t) {
+ return interpolateUsingSurfaceDistance(
+ this._start,
+ this._heading,
+ e,
+ this._ellipsoid.maximumRadius,
+ this._ellipticity,
+ t
+ );
+};
+EllipsoidRhumbLine.prototype.findIntersectionWithLongitude = function(e, t) {
+ const n = this._ellipticity, i = this._heading, r = Math.abs(i), o = this._start;
+ if (e = CesiumMath.negativePiToPi(e), CesiumMath.equalsEpsilon(
+ Math.abs(e),
+ Math.PI,
+ CesiumMath.EPSILON14
+ ) && (e = CesiumMath.sign(o.longitude) * Math.PI), defined(t) || (t = new Cartographic()), Math.abs(CesiumMath.PI_OVER_TWO - r) <= CesiumMath.EPSILON8)
+ return t.longitude = e, t.latitude = o.latitude, t.height = 0, t;
+ if (CesiumMath.equalsEpsilon(
+ Math.abs(CesiumMath.PI_OVER_TWO - r),
+ CesiumMath.PI_OVER_TWO,
+ CesiumMath.EPSILON8
+ ))
+ return CesiumMath.equalsEpsilon(
+ e,
+ o.longitude,
+ CesiumMath.EPSILON12
+ ) ? void 0 : (t.longitude = e, t.latitude = CesiumMath.PI_OVER_TWO * CesiumMath.sign(CesiumMath.PI_OVER_TWO - i), t.height = 0, t);
+ const s = o.latitude, c = n * Math.sin(s), l = Math.tan(0.5 * (CesiumMath.PI_OVER_TWO + s)) * Math.exp((e - o.longitude) / Math.tan(i)), d = (1 + c) / (1 - c);
+ let f = o.latitude, h;
+ do {
+ h = f;
+ const p = n * Math.sin(h), m = (1 + p) / (1 - p);
+ f = 2 * Math.atan(
+ l * Math.pow(m / d, n / 2)
+ ) - CesiumMath.PI_OVER_TWO;
+ } while (!CesiumMath.equalsEpsilon(f, h, CesiumMath.EPSILON12));
+ return t.longitude = e, t.latitude = f, t.height = 0, t;
+};
+EllipsoidRhumbLine.prototype.findIntersectionWithLatitude = function(e, t) {
+ const n = this._ellipticity, i = this._heading, r = this._start;
+ if (CesiumMath.equalsEpsilon(
+ Math.abs(i),
+ CesiumMath.PI_OVER_TWO,
+ CesiumMath.EPSILON8
+ ))
+ return;
+ const o = calculateSigma(n, r.latitude), s = calculateSigma(n, e), c = Math.tan(i) * (s - o), l = CesiumMath.negativePiToPi(r.longitude + c);
+ return defined(t) ? (t.longitude = l, t.latitude = e, t.height = 0, t) : new Cartographic(l, e, 0);
+};
+const PROJECTIONS = [GeographicProjection, WebMercatorProjection], PROJECTION_COUNT = PROJECTIONS.length, MITER_BREAK_SMALL = Math.cos(CesiumMath.toRadians(30)), MITER_BREAK_LARGE = Math.cos(CesiumMath.toRadians(150)), WALL_INITIAL_MIN_HEIGHT = 0, WALL_INITIAL_MAX_HEIGHT = 1e3;
+function GroundPolylineGeometry(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.positions;
+ this.width = defaultValue(e.width, 1), this._positions = t, this.granularity = defaultValue(e.granularity, 9999), this.loop = defaultValue(e.loop, !1), this.arcType = defaultValue(e.arcType, ArcType$1.GEODESIC), this._ellipsoid = Ellipsoid.default, this._projectionIndex = 0, this._workerName = "createGroundPolylineGeometry", this._scene3DOnly = !1;
+}
+Object.defineProperties(GroundPolylineGeometry.prototype, {
+ /**
+ * The number of elements used to pack the object into an array.
+ * @memberof GroundPolylineGeometry.prototype
+ * @type {number}
+ * @readonly
+ * @private
+ */
+ packedLength: {
+ get: function() {
+ return 1 + this._positions.length * 3 + 1 + 1 + 1 + Ellipsoid.packedLength + 1 + 1;
+ }
+ }
+});
+GroundPolylineGeometry.setProjectionAndEllipsoid = function(e, t) {
+ let n = 0;
+ for (let i = 0; i < PROJECTION_COUNT; i++)
+ if (t instanceof PROJECTIONS[i]) {
+ n = i;
+ break;
+ }
+ e._projectionIndex = n, e._ellipsoid = t.ellipsoid;
+};
+const cart3Scratch1 = new Cartesian3(), cart3Scratch2 = new Cartesian3(), cart3Scratch3 = new Cartesian3();
+function computeRightNormal(e, t, n, i, r) {
+ const o = getPosition$2(i, e, 0, cart3Scratch1), s = getPosition$2(i, e, n, cart3Scratch2), c = getPosition$2(i, t, 0, cart3Scratch3), l = direction(s, o, cart3Scratch2), d = direction(c, o, cart3Scratch3);
+ return Cartesian3.cross(d, l, r), Cartesian3.normalize(r, r);
+}
+const interpolatedCartographicScratch = new Cartographic(), interpolatedBottomScratch = new Cartesian3(), interpolatedTopScratch = new Cartesian3(), interpolatedNormalScratch = new Cartesian3();
+function interpolateSegment(e, t, n, i, r, o, s, c, l, d, f) {
+ if (r === 0)
+ return;
+ let h;
+ o === ArcType$1.GEODESIC ? h = new EllipsoidGeodesic(e, t, s) : o === ArcType$1.RHUMB && (h = new EllipsoidRhumbLine(e, t, s));
+ const p = h.surfaceDistance;
+ if (p < r)
+ return;
+ const m = computeRightNormal(
+ e,
+ t,
+ i,
+ s,
+ interpolatedNormalScratch
+ ), _ = Math.ceil(p / r), y = p / _;
+ let C = y;
+ const T = _ - 1;
+ let x = c.length;
+ for (let b = 0; b < T; b++) {
+ const S = h.interpolateUsingSurfaceDistance(
+ C,
+ interpolatedCartographicScratch
+ ), E = getPosition$2(
+ s,
+ S,
+ n,
+ interpolatedBottomScratch
+ ), A = getPosition$2(
+ s,
+ S,
+ i,
+ interpolatedTopScratch
+ );
+ Cartesian3.pack(m, c, x), Cartesian3.pack(E, l, x), Cartesian3.pack(A, d, x), f.push(S.latitude), f.push(S.longitude), x += 3, C += y;
+ }
+}
+const heightlessCartographicScratch = new Cartographic();
+function getPosition$2(e, t, n, i) {
+ return Cartographic.clone(t, heightlessCartographicScratch), heightlessCartographicScratch.height = n, Cartographic.toCartesian(
+ heightlessCartographicScratch,
+ e,
+ i
+ );
+}
+GroundPolylineGeometry.pack = function(e, t, n) {
+ let i = defaultValue(n, 0);
+ const r = e._positions, o = r.length;
+ t[i++] = o;
+ for (let s = 0; s < o; ++s) {
+ const c = r[s];
+ Cartesian3.pack(c, t, i), i += 3;
+ }
+ return t[i++] = e.granularity, t[i++] = e.loop ? 1 : 0, t[i++] = e.arcType, Ellipsoid.pack(e._ellipsoid, t, i), i += Ellipsoid.packedLength, t[i++] = e._projectionIndex, t[i++] = e._scene3DOnly ? 1 : 0, t;
+};
+GroundPolylineGeometry.unpack = function(e, t, n) {
+ let i = defaultValue(t, 0);
+ const r = e[i++], o = new Array(r);
+ for (let p = 0; p < r; p++)
+ o[p] = Cartesian3.unpack(e, i), i += 3;
+ const s = e[i++], c = e[i++] === 1, l = e[i++], d = Ellipsoid.unpack(e, i);
+ i += Ellipsoid.packedLength;
+ const f = e[i++], h = e[i++] === 1;
+ return defined(n) || (n = new GroundPolylineGeometry({
+ positions: o
+ })), n._positions = o, n.granularity = s, n.loop = c, n.arcType = l, n._ellipsoid = d, n._projectionIndex = f, n._scene3DOnly = h, n;
+};
+function direction(e, t, n) {
+ return Cartesian3.subtract(e, t, n), Cartesian3.normalize(n, n), n;
+}
+function tangentDirection(e, t, n, i) {
+ return i = direction(e, t, i), i = Cartesian3.cross(i, n, i), i = Cartesian3.normalize(i, i), i = Cartesian3.cross(n, i, i), i;
+}
+const toPreviousScratch = new Cartesian3(), toNextScratch = new Cartesian3(), forwardScratch = new Cartesian3(), vertexUpScratch = new Cartesian3(), cosine90 = 0, cosine180 = -1;
+function computeVertexMiterNormal(e, t, n, i, r) {
+ const o = direction(n, t, vertexUpScratch), s = tangentDirection(
+ e,
+ t,
+ o,
+ toPreviousScratch
+ ), c = tangentDirection(i, t, o, toNextScratch);
+ if (CesiumMath.equalsEpsilon(
+ Cartesian3.dot(s, c),
+ cosine180,
+ CesiumMath.EPSILON5
+ ))
+ return r = Cartesian3.cross(o, s, r), r = Cartesian3.normalize(r, r), r;
+ r = Cartesian3.add(c, s, r), r = Cartesian3.normalize(r, r);
+ const l = Cartesian3.cross(o, r, forwardScratch);
+ return Cartesian3.dot(c, l) < cosine90 && (r = Cartesian3.negate(r, r)), r;
+}
+const XZ_PLANE = Plane.fromPointNormal(Cartesian3.ZERO, Cartesian3.UNIT_Y), previousBottomScratch = new Cartesian3(), vertexBottomScratch = new Cartesian3(), vertexTopScratch = new Cartesian3(), nextBottomScratch = new Cartesian3(), vertexNormalScratch = new Cartesian3(), intersectionScratch$1 = new Cartesian3(), cartographicScratch0 = new Cartographic(), cartographicScratch1 = new Cartographic(), cartographicIntersectionScratch = new Cartographic();
+GroundPolylineGeometry.createGeometry = function(e) {
+ const t = !e._scene3DOnly;
+ let n = e.loop;
+ const i = e._ellipsoid, r = e.granularity, o = e.arcType, s = new PROJECTIONS[e._projectionIndex](
+ i
+ ), c = WALL_INITIAL_MIN_HEIGHT, l = WALL_INITIAL_MAX_HEIGHT;
+ let d, f;
+ const h = e._positions, p = h.length;
+ p === 2 && (n = !1);
+ let m, _, y, C;
+ const T = new EllipsoidRhumbLine(void 0, void 0, i);
+ let x, b, S;
+ const E = [h[0]];
+ for (f = 0; f < p - 1; f++)
+ m = h[f], _ = h[f + 1], x = IntersectionTests.lineSegmentPlane(
+ m,
+ _,
+ XZ_PLANE,
+ intersectionScratch$1
+ ), defined(x) && !Cartesian3.equalsEpsilon(x, m, CesiumMath.EPSILON7) && !Cartesian3.equalsEpsilon(x, _, CesiumMath.EPSILON7) && (e.arcType === ArcType$1.GEODESIC ? E.push(Cartesian3.clone(x)) : e.arcType === ArcType$1.RHUMB && (S = i.cartesianToCartographic(
+ x,
+ cartographicScratch0
+ ).longitude, y = i.cartesianToCartographic(m, cartographicScratch0), C = i.cartesianToCartographic(_, cartographicScratch1), T.setEndPoints(y, C), b = T.findIntersectionWithLongitude(
+ S,
+ cartographicIntersectionScratch
+ ), x = i.cartographicToCartesian(
+ b,
+ intersectionScratch$1
+ ), defined(x) && !Cartesian3.equalsEpsilon(x, m, CesiumMath.EPSILON7) && !Cartesian3.equalsEpsilon(x, _, CesiumMath.EPSILON7) && E.push(Cartesian3.clone(x)))), E.push(_);
+ n && (m = h[p - 1], _ = h[0], x = IntersectionTests.lineSegmentPlane(
+ m,
+ _,
+ XZ_PLANE,
+ intersectionScratch$1
+ ), defined(x) && !Cartesian3.equalsEpsilon(x, m, CesiumMath.EPSILON7) && !Cartesian3.equalsEpsilon(x, _, CesiumMath.EPSILON7) && (e.arcType === ArcType$1.GEODESIC ? E.push(Cartesian3.clone(x)) : e.arcType === ArcType$1.RHUMB && (S = i.cartesianToCartographic(
+ x,
+ cartographicScratch0
+ ).longitude, y = i.cartesianToCartographic(m, cartographicScratch0), C = i.cartesianToCartographic(_, cartographicScratch1), T.setEndPoints(y, C), b = T.findIntersectionWithLongitude(
+ S,
+ cartographicIntersectionScratch
+ ), x = i.cartographicToCartesian(
+ b,
+ intersectionScratch$1
+ ), defined(x) && !Cartesian3.equalsEpsilon(x, m, CesiumMath.EPSILON7) && !Cartesian3.equalsEpsilon(x, _, CesiumMath.EPSILON7) && E.push(Cartesian3.clone(x)))));
+ let A = E.length, D = new Array(A);
+ for (f = 0; f < A; f++) {
+ const $ = Cartographic.fromCartesian(
+ E[f],
+ i
+ );
+ $.height = 0, D[f] = $;
+ }
+ if (D = arrayRemoveDuplicates(
+ D,
+ Cartographic.equalsEpsilon
+ ), A = D.length, A < 2)
+ return;
+ const P = [], I = [], M = [], R = [];
+ let L = previousBottomScratch, g = vertexBottomScratch, w = vertexTopScratch, O = nextBottomScratch, N = vertexNormalScratch;
+ const F = D[0], B = D[1], V = D[A - 1];
+ for (L = getPosition$2(
+ i,
+ V,
+ c,
+ L
+ ), O = getPosition$2(i, B, c, O), g = getPosition$2(
+ i,
+ F,
+ c,
+ g
+ ), w = getPosition$2(i, F, l, w), n ? N = computeVertexMiterNormal(
+ L,
+ g,
+ w,
+ O,
+ N
+ ) : N = computeRightNormal(
+ F,
+ B,
+ l,
+ i,
+ N
+ ), Cartesian3.pack(N, I, 0), Cartesian3.pack(g, M, 0), Cartesian3.pack(w, R, 0), P.push(F.latitude), P.push(F.longitude), interpolateSegment(
+ F,
+ B,
+ c,
+ l,
+ r,
+ o,
+ i,
+ I,
+ M,
+ R,
+ P
+ ), f = 1; f < A - 1; ++f) {
+ L = Cartesian3.clone(g, L), g = Cartesian3.clone(O, g);
+ const $ = D[f];
+ getPosition$2(i, $, l, w), getPosition$2(i, D[f + 1], c, O), computeVertexMiterNormal(
+ L,
+ g,
+ w,
+ O,
+ N
+ ), d = I.length, Cartesian3.pack(N, I, d), Cartesian3.pack(g, M, d), Cartesian3.pack(w, R, d), P.push($.latitude), P.push($.longitude), interpolateSegment(
+ D[f],
+ D[f + 1],
+ c,
+ l,
+ r,
+ o,
+ i,
+ I,
+ M,
+ R,
+ P
+ );
+ }
+ const U = D[A - 1], k = D[A - 2];
+ if (g = getPosition$2(
+ i,
+ U,
+ c,
+ g
+ ), w = getPosition$2(i, U, l, w), n) {
+ const $ = D[0];
+ L = getPosition$2(
+ i,
+ k,
+ c,
+ L
+ ), O = getPosition$2(
+ i,
+ $,
+ c,
+ O
+ ), N = computeVertexMiterNormal(
+ L,
+ g,
+ w,
+ O,
+ N
+ );
+ } else
+ N = computeRightNormal(
+ k,
+ U,
+ l,
+ i,
+ N
+ );
+ if (d = I.length, Cartesian3.pack(N, I, d), Cartesian3.pack(g, M, d), Cartesian3.pack(w, R, d), P.push(U.latitude), P.push(U.longitude), n) {
+ for (interpolateSegment(
+ U,
+ F,
+ c,
+ l,
+ r,
+ o,
+ i,
+ I,
+ M,
+ R,
+ P
+ ), d = I.length, f = 0; f < 3; ++f)
+ I[d + f] = I[f], M[d + f] = M[f], R[d + f] = R[f];
+ P.push(F.latitude), P.push(F.longitude);
+ }
+ return generateGeometryAttributes(
+ n,
+ s,
+ M,
+ R,
+ I,
+ P,
+ t
+ );
+};
+const lineDirectionScratch = new Cartesian3(), matrix3Scratch$1 = new Matrix3(), quaternionScratch$3 = new Quaternion();
+function breakMiter(e, t, n, i) {
+ const r = direction(n, t, lineDirectionScratch), o = Cartesian3.dot(r, e);
+ if (o > MITER_BREAK_SMALL || o < MITER_BREAK_LARGE) {
+ const s = direction(i, n, vertexUpScratch), c = o < MITER_BREAK_LARGE ? CesiumMath.PI_OVER_TWO : -CesiumMath.PI_OVER_TWO, l = Quaternion.fromAxisAngle(
+ s,
+ c,
+ quaternionScratch$3
+ ), d = Matrix3.fromQuaternion(l, matrix3Scratch$1);
+ return Matrix3.multiplyByVector(
+ d,
+ e,
+ e
+ ), !0;
+ }
+ return !1;
+}
+const endPosCartographicScratch = new Cartographic(), normalStartpointScratch = new Cartesian3(), normalEndpointScratch = new Cartesian3();
+function projectNormal(e, t, n, i, r) {
+ const o = Cartographic.toCartesian(
+ t,
+ e._ellipsoid,
+ normalStartpointScratch
+ );
+ let s = Cartesian3.add(o, n, normalEndpointScratch), c = !1;
+ const l = e._ellipsoid;
+ let d = l.cartesianToCartographic(
+ s,
+ endPosCartographicScratch
+ );
+ Math.abs(t.longitude - d.longitude) > CesiumMath.PI_OVER_TWO && (c = !0, s = Cartesian3.subtract(
+ o,
+ n,
+ normalEndpointScratch
+ ), d = l.cartesianToCartographic(
+ s,
+ endPosCartographicScratch
+ )), d.height = 0;
+ const f = e.project(
+ d,
+ r
+ );
+ return r = Cartesian3.subtract(
+ f,
+ i,
+ r
+ ), r.z = 0, r = Cartesian3.normalize(r, r), c && Cartesian3.negate(r, r), r;
+}
+const adjustHeightNormalScratch = new Cartesian3(), adjustHeightOffsetScratch = new Cartesian3();
+function adjustHeights(e, t, n, i, r, o) {
+ const s = Cartesian3.subtract(
+ t,
+ e,
+ adjustHeightNormalScratch
+ );
+ Cartesian3.normalize(s, s);
+ const c = n - WALL_INITIAL_MIN_HEIGHT;
+ let l = Cartesian3.multiplyByScalar(
+ s,
+ c,
+ adjustHeightOffsetScratch
+ );
+ Cartesian3.add(e, l, r);
+ const d = i - WALL_INITIAL_MAX_HEIGHT;
+ l = Cartesian3.multiplyByScalar(
+ s,
+ d,
+ adjustHeightOffsetScratch
+ ), Cartesian3.add(t, l, o);
+}
+const nudgeDirectionScratch = new Cartesian3();
+function nudgeXZ(e, t) {
+ const n = Plane.getPointDistance(XZ_PLANE, e), i = Plane.getPointDistance(XZ_PLANE, t);
+ let r = nudgeDirectionScratch;
+ CesiumMath.equalsEpsilon(n, 0, CesiumMath.EPSILON2) ? (r = direction(t, e, r), Cartesian3.multiplyByScalar(r, CesiumMath.EPSILON2, r), Cartesian3.add(e, r, e)) : CesiumMath.equalsEpsilon(i, 0, CesiumMath.EPSILON2) && (r = direction(e, t, r), Cartesian3.multiplyByScalar(r, CesiumMath.EPSILON2, r), Cartesian3.add(t, r, t));
+}
+function nudgeCartographic(e, t) {
+ const n = Math.abs(e.longitude), i = Math.abs(t.longitude);
+ if (CesiumMath.equalsEpsilon(n, CesiumMath.PI, CesiumMath.EPSILON11)) {
+ const r = CesiumMath.sign(t.longitude);
+ return e.longitude = r * (n - CesiumMath.EPSILON11), 1;
+ } else if (CesiumMath.equalsEpsilon(i, CesiumMath.PI, CesiumMath.EPSILON11)) {
+ const r = CesiumMath.sign(e.longitude);
+ return t.longitude = r * (i - CesiumMath.EPSILON11), 2;
+ }
+ return 0;
+}
+const startCartographicScratch = new Cartographic(), endCartographicScratch = new Cartographic(), segmentStartTopScratch = new Cartesian3(), segmentEndTopScratch = new Cartesian3(), segmentStartBottomScratch = new Cartesian3(), segmentEndBottomScratch = new Cartesian3(), segmentStartNormalScratch = new Cartesian3(), segmentEndNormalScratch = new Cartesian3(), getHeightCartographics = [
+ startCartographicScratch,
+ endCartographicScratch
+], getHeightRectangleScratch = new Rectangle(), adjustHeightStartTopScratch = new Cartesian3(), adjustHeightEndTopScratch = new Cartesian3(), adjustHeightStartBottomScratch = new Cartesian3(), adjustHeightEndBottomScratch = new Cartesian3(), segmentStart2DScratch = new Cartesian3(), segmentEnd2DScratch = new Cartesian3(), segmentStartNormal2DScratch = new Cartesian3(), segmentEndNormal2DScratch = new Cartesian3(), offsetScratch$a = new Cartesian3(), startUpScratch = new Cartesian3(), endUpScratch = new Cartesian3(), rightScratch = new Cartesian3(), startPlaneNormalScratch = new Cartesian3(), endPlaneNormalScratch = new Cartesian3(), encodeScratch = new EncodedCartesian3(), encodeScratch2D = new EncodedCartesian3(), forwardOffset2DScratch = new Cartesian3(), right2DScratch = new Cartesian3(), normalNudgeScratch = new Cartesian3(), scratchBoundingSpheres = [new BoundingSphere(), new BoundingSphere()], REFERENCE_INDICES = [
+ 0,
+ 2,
+ 1,
+ 0,
+ 3,
+ 2,
+ // right
+ 0,
+ 7,
+ 3,
+ 0,
+ 4,
+ 7,
+ // start
+ 0,
+ 5,
+ 4,
+ 0,
+ 1,
+ 5,
+ // bottom
+ 5,
+ 7,
+ 4,
+ 5,
+ 6,
+ 7,
+ // left
+ 5,
+ 2,
+ 6,
+ 5,
+ 1,
+ 2,
+ // end
+ 3,
+ 6,
+ 2,
+ 3,
+ 7,
+ 6
+ // top
+], REFERENCE_INDICES_LENGTH = REFERENCE_INDICES.length;
+function generateGeometryAttributes(e, t, n, i, r, o, s) {
+ let c, l;
+ const d = t._ellipsoid, f = n.length / 3 - 1, h = f * 8, p = h * 4, m = f * 36, _ = h > 65535 ? new Uint32Array(m) : new Uint16Array(m), y = new Float64Array(h * 3), C = new Float32Array(p), T = new Float32Array(p), x = new Float32Array(p), b = new Float32Array(
+ p
+ ), S = new Float32Array(
+ p
+ );
+ let E, A, D, P;
+ s && (E = new Float32Array(p), A = new Float32Array(p), D = new Float32Array(p), P = new Float32Array(h * 2));
+ const I = o.length / 2;
+ let M = 0;
+ const R = startCartographicScratch;
+ R.height = 0;
+ const L = endCartographicScratch;
+ L.height = 0;
+ let g = segmentStartTopScratch, w = segmentEndTopScratch;
+ if (s)
+ for (l = 0, c = 1; c < I; c++)
+ R.latitude = o[l], R.longitude = o[l + 1], L.latitude = o[l + 2], L.longitude = o[l + 3], g = t.project(
+ R,
+ g
+ ), w = t.project(
+ L,
+ w
+ ), M += Cartesian3.distance(
+ g,
+ w
+ ), l += 2;
+ const O = i.length / 3;
+ w = Cartesian3.unpack(
+ i,
+ 0,
+ w
+ );
+ let N = 0;
+ for (l = 3, c = 1; c < O; c++)
+ g = Cartesian3.clone(
+ w,
+ g
+ ), w = Cartesian3.unpack(
+ i,
+ l,
+ w
+ ), N += Cartesian3.distance(g, w), l += 3;
+ let F;
+ l = 3;
+ let B = 0, V = 0, U = 0, k = 0, $ = !1, G = Cartesian3.unpack(
+ n,
+ 0,
+ segmentEndBottomScratch
+ ), q = Cartesian3.unpack(i, 0, segmentEndTopScratch), z = Cartesian3.unpack(
+ r,
+ 0,
+ segmentEndNormalScratch
+ );
+ if (e) {
+ const X = Cartesian3.unpack(
+ n,
+ n.length - 6,
+ segmentStartBottomScratch
+ );
+ breakMiter(z, X, G, q) && (z = Cartesian3.negate(
+ z,
+ z
+ ));
+ }
+ let H = 0, Q = 0, ne = 0;
+ for (c = 0; c < f; c++) {
+ const X = Cartesian3.clone(G, segmentStartBottomScratch), fe = Cartesian3.clone(q, segmentStartTopScratch);
+ let de = Cartesian3.clone(
+ z,
+ segmentStartNormalScratch
+ );
+ $ && (de = Cartesian3.negate(
+ de,
+ de
+ )), G = Cartesian3.unpack(
+ n,
+ l,
+ segmentEndBottomScratch
+ ), q = Cartesian3.unpack(i, l, segmentEndTopScratch), z = Cartesian3.unpack(
+ r,
+ l,
+ segmentEndNormalScratch
+ ), $ = breakMiter(z, X, G, q), R.latitude = o[B], R.longitude = o[B + 1], L.latitude = o[B + 2], L.longitude = o[B + 3];
+ let ce, ye, ge, re;
+ if (s) {
+ const Ae = nudgeCartographic(R, L);
+ ce = t.project(R, segmentStart2DScratch), ye = t.project(L, segmentEnd2DScratch);
+ const ke = direction(ye, ce, forwardOffset2DScratch);
+ ke.y = Math.abs(ke.y), ge = segmentStartNormal2DScratch, re = segmentEndNormal2DScratch, Ae === 0 || Cartesian3.dot(ke, Cartesian3.UNIT_Y) > MITER_BREAK_SMALL ? (ge = projectNormal(
+ t,
+ R,
+ de,
+ ce,
+ segmentStartNormal2DScratch
+ ), re = projectNormal(
+ t,
+ L,
+ z,
+ ye,
+ segmentEndNormal2DScratch
+ )) : Ae === 1 ? (re = projectNormal(
+ t,
+ L,
+ z,
+ ye,
+ segmentEndNormal2DScratch
+ ), ge.x = 0, ge.y = CesiumMath.sign(
+ R.longitude - Math.abs(L.longitude)
+ ), ge.z = 0) : (ge = projectNormal(
+ t,
+ R,
+ de,
+ ce,
+ segmentStartNormal2DScratch
+ ), re.x = 0, re.y = CesiumMath.sign(
+ R.longitude - L.longitude
+ ), re.z = 0);
+ }
+ const be = Cartesian3.distance(fe, q), pe = EncodedCartesian3.fromCartesian(
+ X,
+ encodeScratch
+ ), Te = Cartesian3.subtract(
+ G,
+ X,
+ offsetScratch$a
+ ), xe = Cartesian3.normalize(Te, rightScratch);
+ let W = Cartesian3.subtract(fe, X, startUpScratch);
+ W = Cartesian3.normalize(W, W);
+ let j = Cartesian3.cross(xe, W, rightScratch);
+ j = Cartesian3.normalize(j, j);
+ let se = Cartesian3.cross(
+ W,
+ de,
+ startPlaneNormalScratch
+ );
+ se = Cartesian3.normalize(se, se);
+ let Pe = Cartesian3.subtract(q, G, endUpScratch);
+ Pe = Cartesian3.normalize(Pe, Pe);
+ let le = Cartesian3.cross(
+ z,
+ Pe,
+ endPlaneNormalScratch
+ );
+ le = Cartesian3.normalize(le, le);
+ const De = be / N, Me = H / N;
+ let He = 0, Oe, $e, J, ae = 0, te = 0;
+ if (s) {
+ He = Cartesian3.distance(ce, ye), Oe = EncodedCartesian3.fromCartesian(
+ ce,
+ encodeScratch2D
+ ), $e = Cartesian3.subtract(
+ ye,
+ ce,
+ forwardOffset2DScratch
+ ), J = Cartesian3.normalize($e, right2DScratch);
+ const Ae = J.x;
+ J.x = J.y, J.y = -Ae, ae = He / M, te = Q / M;
+ }
+ for (F = 0; F < 8; F++) {
+ const Ae = k + F * 4, ke = V + F * 2, Fe = Ae + 3, Je = F < 4 ? 1 : -1, ve = F === 2 || F === 3 || F === 6 || F === 7 ? 1 : -1;
+ Cartesian3.pack(pe.high, C, Ae), C[Fe] = Te.x, Cartesian3.pack(pe.low, T, Ae), T[Fe] = Te.y, Cartesian3.pack(
+ se,
+ x,
+ Ae
+ ), x[Fe] = Te.z, Cartesian3.pack(
+ le,
+ b,
+ Ae
+ ), b[Fe] = De * Je, Cartesian3.pack(
+ j,
+ S,
+ Ae
+ );
+ let Le = Me * ve;
+ Le === 0 && ve < 0 && (Le = 9), S[Fe] = Le, s && (E[Ae] = Oe.high.x, E[Ae + 1] = Oe.high.y, E[Ae + 2] = Oe.low.x, E[Ae + 3] = Oe.low.y, D[Ae] = -ge.y, D[Ae + 1] = ge.x, D[Ae + 2] = re.y, D[Ae + 3] = -re.x, A[Ae] = $e.x, A[Ae + 1] = $e.y, A[Ae + 2] = J.x, A[Ae + 3] = J.y, P[ke] = ae * Je, Le = te * ve, Le === 0 && ve < 0 && (Le = 9), P[ke + 1] = Le);
+ }
+ const ie = adjustHeightStartBottomScratch, ue = adjustHeightEndBottomScratch, me = adjustHeightStartTopScratch, Se = adjustHeightEndTopScratch, we = Rectangle.fromCartographicArray(
+ getHeightCartographics,
+ getHeightRectangleScratch
+ ), Ee = ApproximateTerrainHeights.getMinimumMaximumHeights(
+ we,
+ d
+ ), Ve = Ee.minimumTerrainHeight, We = Ee.maximumTerrainHeight;
+ ne += Math.abs(Ve), ne += Math.abs(We), adjustHeights(
+ X,
+ fe,
+ Ve,
+ We,
+ ie,
+ me
+ ), adjustHeights(
+ G,
+ q,
+ Ve,
+ We,
+ ue,
+ Se
+ );
+ let Ne = Cartesian3.multiplyByScalar(
+ j,
+ CesiumMath.EPSILON5,
+ normalNudgeScratch
+ );
+ Cartesian3.add(
+ ie,
+ Ne,
+ ie
+ ), Cartesian3.add(ue, Ne, ue), Cartesian3.add(me, Ne, me), Cartesian3.add(Se, Ne, Se), nudgeXZ(ie, ue), nudgeXZ(me, Se), Cartesian3.pack(ie, y, U), Cartesian3.pack(ue, y, U + 3), Cartesian3.pack(Se, y, U + 6), Cartesian3.pack(me, y, U + 9), Ne = Cartesian3.multiplyByScalar(
+ j,
+ -2 * CesiumMath.EPSILON5,
+ normalNudgeScratch
+ ), Cartesian3.add(
+ ie,
+ Ne,
+ ie
+ ), Cartesian3.add(ue, Ne, ue), Cartesian3.add(me, Ne, me), Cartesian3.add(Se, Ne, Se), nudgeXZ(ie, ue), nudgeXZ(me, Se), Cartesian3.pack(
+ ie,
+ y,
+ U + 12
+ ), Cartesian3.pack(
+ ue,
+ y,
+ U + 15
+ ), Cartesian3.pack(Se, y, U + 18), Cartesian3.pack(me, y, U + 21), B += 2, l += 3, V += 16, U += 24, k += 32, H += be, Q += He;
+ }
+ l = 0;
+ let K = 0;
+ for (c = 0; c < f; c++) {
+ for (F = 0; F < REFERENCE_INDICES_LENGTH; F++)
+ _[l + F] = REFERENCE_INDICES[F] + K;
+ K += 8, l += REFERENCE_INDICES_LENGTH;
+ }
+ const Z = scratchBoundingSpheres;
+ BoundingSphere.fromVertices(
+ n,
+ Cartesian3.ZERO,
+ 3,
+ Z[0]
+ ), BoundingSphere.fromVertices(
+ i,
+ Cartesian3.ZERO,
+ 3,
+ Z[1]
+ );
+ const ee = BoundingSphere.fromBoundingSpheres(Z);
+ ee.radius += ne / (f * 2);
+ const oe = {
+ position: new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.DOUBLE,
+ componentsPerAttribute: 3,
+ normalize: !1,
+ values: y
+ }),
+ startHiAndForwardOffsetX: getVec4GeometryAttribute(
+ C
+ ),
+ startLoAndForwardOffsetY: getVec4GeometryAttribute(
+ T
+ ),
+ startNormalAndForwardOffsetZ: getVec4GeometryAttribute(
+ x
+ ),
+ endNormalAndTextureCoordinateNormalizationX: getVec4GeometryAttribute(
+ b
+ ),
+ rightNormalAndTextureCoordinateNormalizationY: getVec4GeometryAttribute(
+ S
+ )
+ };
+ return s && (oe.startHiLo2D = getVec4GeometryAttribute(E), oe.offsetAndRight2D = getVec4GeometryAttribute(A), oe.startEndNormals2D = getVec4GeometryAttribute(D), oe.texcoordNormalization2D = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 2,
+ normalize: !1,
+ values: P
+ })), new Geometry({
+ attributes: oe,
+ indices: _,
+ boundingSphere: ee
+ });
+}
+function getVec4GeometryAttribute(e) {
+ return new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 4,
+ normalize: !1,
+ values: e
+ });
+}
+GroundPolylineGeometry._projectNormal = projectNormal;
+const PolylineShadowVolumeFS = `in vec4 v_startPlaneNormalEcAndHalfWidth;
+in vec4 v_endPlaneNormalEcAndBatchId;
+in vec4 v_rightPlaneEC; // Technically can compute distance for this here
+in vec4 v_endEcAndStartEcX;
+in vec4 v_texcoordNormalizationAndStartEcYZ;
+
+#ifdef PER_INSTANCE_COLOR
+in vec4 v_color;
+#endif
+
+void main(void)
+{
+ float logDepthOrDepth = czm_branchFreeTernary(czm_sceneMode == czm_sceneMode2D, gl_FragCoord.z, czm_unpackDepth(texture(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw)));
+ vec3 ecStart = vec3(v_endEcAndStartEcX.w, v_texcoordNormalizationAndStartEcYZ.zw);
+
+ // Discard for sky
+ if (logDepthOrDepth == 0.0) {
+#ifdef DEBUG_SHOW_VOLUME
+ out_FragColor = vec4(1.0, 0.0, 0.0, 0.5);
+ return;
+#else // DEBUG_SHOW_VOLUME
+ discard;
+#endif // DEBUG_SHOW_VOLUME
+ }
+
+ vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
+ eyeCoordinate /= eyeCoordinate.w;
+
+ float halfMaxWidth = v_startPlaneNormalEcAndHalfWidth.w * czm_metersPerPixel(eyeCoordinate);
+ // Check distance of the eye coordinate against the right-facing plane
+ float widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);
+
+ // Check eye coordinate against the mitering planes
+ float distanceFromStart = czm_planeDistance(v_startPlaneNormalEcAndHalfWidth.xyz, -dot(ecStart, v_startPlaneNormalEcAndHalfWidth.xyz), eyeCoordinate.xyz);
+ float distanceFromEnd = czm_planeDistance(v_endPlaneNormalEcAndBatchId.xyz, -dot(v_endEcAndStartEcX.xyz, v_endPlaneNormalEcAndBatchId.xyz), eyeCoordinate.xyz);
+
+ if (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0) {
+#ifdef DEBUG_SHOW_VOLUME
+ out_FragColor = vec4(1.0, 0.0, 0.0, 0.5);
+ return;
+#else // DEBUG_SHOW_VOLUME
+ discard;
+#endif // DEBUG_SHOW_VOLUME
+ }
+
+ // Check distance of the eye coordinate against start and end planes with normals in the right plane.
+ // For computing unskewed lengthwise texture coordinate.
+ // Can also be used for clipping extremely pointy miters, but in practice unnecessary because of miter breaking.
+
+ // aligned plane: cross the right plane normal with miter plane normal, then cross the result with right again to point it more "forward"
+ vec3 alignedPlaneNormal;
+
+ // start aligned plane
+ alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_startPlaneNormalEcAndHalfWidth.xyz);
+ alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));
+ distanceFromStart = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, ecStart), eyeCoordinate.xyz);
+
+ // end aligned plane
+ alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_endPlaneNormalEcAndBatchId.xyz);
+ alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));
+ distanceFromEnd = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, v_endEcAndStartEcX.xyz), eyeCoordinate.xyz);
+
+#ifdef PER_INSTANCE_COLOR
+ out_FragColor = czm_gammaCorrect(v_color);
+#else // PER_INSTANCE_COLOR
+ // Clamp - distance to aligned planes may be negative due to mitering,
+ // so fragment texture coordinate might be out-of-bounds.
+ float s = clamp(distanceFromStart / (distanceFromStart + distanceFromEnd), 0.0, 1.0);
+ s = (s * v_texcoordNormalizationAndStartEcYZ.x) + v_texcoordNormalizationAndStartEcYZ.y;
+ float t = (widthwiseDistance + halfMaxWidth) / (2.0 * halfMaxWidth);
+
+ czm_materialInput materialInput;
+
+ materialInput.s = s;
+ materialInput.st = vec2(s, t);
+ materialInput.str = vec3(s, t, 0.0);
+
+ czm_material material = czm_getMaterial(materialInput);
+ out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
+#endif // PER_INSTANCE_COLOR
+
+ // Premultiply alpha. Required for classification primitives on translucent globe.
+ out_FragColor.rgb *= out_FragColor.a;
+
+ czm_writeDepthClamp();
+}
+`, PolylineShadowVolumeMorphFS = `in vec3 v_forwardDirectionEC;
+in vec3 v_texcoordNormalizationAndHalfWidth;
+in float v_batchId;
+
+#ifdef PER_INSTANCE_COLOR
+in vec4 v_color;
+#else
+in vec2 v_alignedPlaneDistances;
+in float v_texcoordT;
+#endif
+
+float rayPlaneDistanceUnsafe(vec3 origin, vec3 direction, vec3 planeNormal, float planeDistance) {
+ // We don't expect the ray to ever be parallel to the plane
+ return (-planeDistance - dot(planeNormal, origin)) / dot(planeNormal, direction);
+}
+
+void main(void)
+{
+ vec4 eyeCoordinate = gl_FragCoord;
+ eyeCoordinate /= eyeCoordinate.w;
+
+#ifdef PER_INSTANCE_COLOR
+ out_FragColor = czm_gammaCorrect(v_color);
+#else // PER_INSTANCE_COLOR
+ // Use distances for planes aligned with segment to prevent skew in dashing
+ float distanceFromStart = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, -v_forwardDirectionEC, v_forwardDirectionEC.xyz, v_alignedPlaneDistances.x);
+ float distanceFromEnd = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, v_forwardDirectionEC, -v_forwardDirectionEC.xyz, v_alignedPlaneDistances.y);
+
+ // Clamp - distance to aligned planes may be negative due to mitering
+ distanceFromStart = max(0.0, distanceFromStart);
+ distanceFromEnd = max(0.0, distanceFromEnd);
+
+ float s = distanceFromStart / (distanceFromStart + distanceFromEnd);
+ s = (s * v_texcoordNormalizationAndHalfWidth.x) + v_texcoordNormalizationAndHalfWidth.y;
+
+ czm_materialInput materialInput;
+
+ materialInput.s = s;
+ materialInput.st = vec2(s, v_texcoordT);
+ materialInput.str = vec3(s, v_texcoordT, 0.0);
+
+ czm_material material = czm_getMaterial(materialInput);
+ out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
+#endif // PER_INSTANCE_COLOR
+}
+`, PolylineShadowVolumeMorphVS = `in vec3 position3DHigh;
+in vec3 position3DLow;
+
+in vec4 startHiAndForwardOffsetX;
+in vec4 startLoAndForwardOffsetY;
+in vec4 startNormalAndForwardOffsetZ;
+in vec4 endNormalAndTextureCoordinateNormalizationX;
+in vec4 rightNormalAndTextureCoordinateNormalizationY;
+in vec4 startHiLo2D;
+in vec4 offsetAndRight2D;
+in vec4 startEndNormals2D;
+in vec2 texcoordNormalization2D;
+
+in float batchId;
+
+out vec3 v_forwardDirectionEC;
+out vec3 v_texcoordNormalizationAndHalfWidth;
+out float v_batchId;
+
+// For materials
+#ifdef WIDTH_VARYING
+out float v_width;
+#endif
+#ifdef ANGLE_VARYING
+out float v_polylineAngle;
+#endif
+
+#ifdef PER_INSTANCE_COLOR
+out vec4 v_color;
+#else
+out vec2 v_alignedPlaneDistances;
+out float v_texcoordT;
+#endif
+
+// Morphing planes using SLERP or NLERP doesn't seem to work, so instead draw the material directly on the shadow volume.
+// Morph views are from very far away and aren't meant to be used precisely, so this should be sufficient.
+void main()
+{
+ v_batchId = batchId;
+
+ // Start position
+ vec4 posRelativeToEye2D = czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw));
+ vec4 posRelativeToEye3D = czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz);
+ vec4 posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);
+ vec3 posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;
+ vec3 posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;
+ vec3 startEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;
+
+ // Start plane
+ vec4 startPlane2D;
+ vec4 startPlane3D;
+ startPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);
+ startPlane3D.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;
+ startPlane2D.w = -dot(startPlane2D.xyz, posEc2D);
+ startPlane3D.w = -dot(startPlane3D.xyz, posEc3D);
+
+ // Right plane
+ vec4 rightPlane2D;
+ vec4 rightPlane3D;
+ rightPlane2D.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);
+ rightPlane3D.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;
+ rightPlane2D.w = -dot(rightPlane2D.xyz, posEc2D);
+ rightPlane3D.w = -dot(rightPlane3D.xyz, posEc3D);
+
+ // End position
+ posRelativeToEye2D = posRelativeToEye2D + vec4(0.0, offsetAndRight2D.xy, 0.0);
+ posRelativeToEye3D = posRelativeToEye3D + vec4(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w, 0.0);
+ posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);
+ posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;
+ posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;
+ vec3 endEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;
+ vec3 forwardEc3D = czm_normal * normalize(vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w));
+ vec3 forwardEc2D = czm_normal * normalize(vec3(0.0, offsetAndRight2D.xy));
+
+ // End plane
+ vec4 endPlane2D;
+ vec4 endPlane3D;
+ endPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);
+ endPlane3D.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;
+ endPlane2D.w = -dot(endPlane2D.xyz, posEc2D);
+ endPlane3D.w = -dot(endPlane3D.xyz, posEc3D);
+
+ // Forward direction
+ v_forwardDirectionEC = normalize(endEC - startEC);
+
+ vec2 cleanTexcoordNormalization2D;
+ cleanTexcoordNormalization2D.x = abs(texcoordNormalization2D.x);
+ cleanTexcoordNormalization2D.y = czm_branchFreeTernary(texcoordNormalization2D.y > 1.0, 0.0, abs(texcoordNormalization2D.y));
+ vec2 cleanTexcoordNormalization3D;
+ cleanTexcoordNormalization3D.x = abs(endNormalAndTextureCoordinateNormalizationX.w);
+ cleanTexcoordNormalization3D.y = rightNormalAndTextureCoordinateNormalizationY.w;
+ cleanTexcoordNormalization3D.y = czm_branchFreeTernary(cleanTexcoordNormalization3D.y > 1.0, 0.0, abs(cleanTexcoordNormalization3D.y));
+
+ v_texcoordNormalizationAndHalfWidth.xy = mix(cleanTexcoordNormalization2D, cleanTexcoordNormalization3D, czm_morphTime);
+
+#ifdef PER_INSTANCE_COLOR
+ v_color = czm_batchTable_color(batchId);
+#else // PER_INSTANCE_COLOR
+ // For computing texture coordinates
+
+ v_alignedPlaneDistances.x = -dot(v_forwardDirectionEC, startEC);
+ v_alignedPlaneDistances.y = -dot(-v_forwardDirectionEC, endEC);
+#endif // PER_INSTANCE_COLOR
+
+#ifdef WIDTH_VARYING
+ float width = czm_batchTable_width(batchId);
+ float halfWidth = width * 0.5;
+ v_width = width;
+ v_texcoordNormalizationAndHalfWidth.z = halfWidth;
+#else
+ float halfWidth = 0.5 * czm_batchTable_width(batchId);
+ v_texcoordNormalizationAndHalfWidth.z = halfWidth;
+#endif
+
+ // Compute a normal along which to "push" the position out, extending the miter depending on view distance.
+ // Position has already been "pushed" by unit length along miter normal, and miter normals are encoded in the planes.
+ // Decode the normal to use at this specific vertex, push the position back, and then push to where it needs to be.
+ // Since this is morphing, compute both 3D and 2D positions and then blend.
+
+ // ****** 3D ******
+ // Check distance to the end plane and start plane, pick the plane that is closer
+ vec4 positionEc3D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position3DHigh, position3DLow); // w = 1.0, see czm_computePosition
+ float absStartPlaneDistance = abs(czm_planeDistance(startPlane3D, positionEc3D.xyz));
+ float absEndPlaneDistance = abs(czm_planeDistance(endPlane3D, positionEc3D.xyz));
+ vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane3D.xyz, endPlane3D.xyz);
+ vec3 upOrDown = normalize(cross(rightPlane3D.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.
+ vec3 normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.
+
+ // Nudge the top vertex upwards to prevent flickering
+ vec3 geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc3D));
+ geodeticSurfaceNormal *= float(0.0 <= rightNormalAndTextureCoordinateNormalizationY.w && rightNormalAndTextureCoordinateNormalizationY.w <= 1.0);
+ geodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;
+ positionEc3D.xyz += geodeticSurfaceNormal;
+
+ // Determine if this vertex is on the "left" or "right"
+ normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);
+
+ // A "perfect" implementation would push along normals according to the angle against forward.
+ // In practice, just pushing the normal out by halfWidth is sufficient for morph views.
+ positionEc3D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc3D)) * normalEC; // prevent artifacts when czm_metersPerPixel is negative (behind camera)
+
+ // ****** 2D ******
+ // Check distance to the end plane and start plane, pick the plane that is closer
+ vec4 positionEc2D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy); // w = 1.0, see czm_computePosition
+ absStartPlaneDistance = abs(czm_planeDistance(startPlane2D, positionEc2D.xyz));
+ absEndPlaneDistance = abs(czm_planeDistance(endPlane2D, positionEc2D.xyz));
+ planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane2D.xyz, endPlane2D.xyz);
+ upOrDown = normalize(cross(rightPlane2D.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.
+ normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.
+
+ // Nudge the top vertex upwards to prevent flickering
+ geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc2D));
+ geodeticSurfaceNormal *= float(0.0 <= texcoordNormalization2D.y && texcoordNormalization2D.y <= 1.0);
+ geodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;
+ positionEc2D.xyz += geodeticSurfaceNormal;
+
+ // Determine if this vertex is on the "left" or "right"
+ normalEC *= sign(texcoordNormalization2D.x);
+#ifndef PER_INSTANCE_COLOR
+ // Use vertex's sidedness to compute its texture coordinate.
+ v_texcoordT = clamp(sign(texcoordNormalization2D.x), 0.0, 1.0);
+#endif
+
+ // A "perfect" implementation would push along normals according to the angle against forward.
+ // In practice, just pushing the normal out by halfWidth is sufficient for morph views.
+ positionEc2D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc2D)) * normalEC; // prevent artifacts when czm_metersPerPixel is negative (behind camera)
+
+ // Blend for actual position
+ gl_Position = czm_projection * mix(positionEc2D, positionEc3D, czm_morphTime);
+
+#ifdef ANGLE_VARYING
+ // Approximate relative screen space direction of the line.
+ vec2 approxLineDirection = normalize(vec2(v_forwardDirectionEC.x, -v_forwardDirectionEC.y));
+ approxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);
+ v_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);
+#endif
+}
+`, PolylineShadowVolumeVS = `in vec3 position3DHigh;
+in vec3 position3DLow;
+
+// In 2D and in 3D, texture coordinate normalization component signs encodes:
+// * X sign - sidedness relative to right plane
+// * Y sign - is negative OR magnitude is greater than 1.0 if vertex is on bottom of volume
+#ifndef COLUMBUS_VIEW_2D
+in vec4 startHiAndForwardOffsetX;
+in vec4 startLoAndForwardOffsetY;
+in vec4 startNormalAndForwardOffsetZ;
+in vec4 endNormalAndTextureCoordinateNormalizationX;
+in vec4 rightNormalAndTextureCoordinateNormalizationY;
+#else
+in vec4 startHiLo2D;
+in vec4 offsetAndRight2D;
+in vec4 startEndNormals2D;
+in vec2 texcoordNormalization2D;
+#endif
+
+in float batchId;
+
+out vec4 v_startPlaneNormalEcAndHalfWidth;
+out vec4 v_endPlaneNormalEcAndBatchId;
+out vec4 v_rightPlaneEC;
+out vec4 v_endEcAndStartEcX;
+out vec4 v_texcoordNormalizationAndStartEcYZ;
+
+// For materials
+#ifdef WIDTH_VARYING
+out float v_width;
+#endif
+#ifdef ANGLE_VARYING
+out float v_polylineAngle;
+#endif
+
+#ifdef PER_INSTANCE_COLOR
+out vec4 v_color;
+#endif
+
+void main()
+{
+#ifdef COLUMBUS_VIEW_2D
+ vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw))).xyz;
+
+ vec3 forwardDirectionEC = czm_normal * vec3(0.0, offsetAndRight2D.xy);
+ vec3 ecEnd = forwardDirectionEC + ecStart;
+ forwardDirectionEC = normalize(forwardDirectionEC);
+
+ // Right plane
+ v_rightPlaneEC.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);
+ v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);
+
+ // start plane
+ vec4 startPlaneEC;
+ startPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);
+ startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);
+
+ // end plane
+ vec4 endPlaneEC;
+ endPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);
+ endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);
+
+ v_texcoordNormalizationAndStartEcYZ.x = abs(texcoordNormalization2D.x);
+ v_texcoordNormalizationAndStartEcYZ.y = texcoordNormalization2D.y;
+
+#else // COLUMBUS_VIEW_2D
+ vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz)).xyz;
+ vec3 offset = czm_normal * vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w);
+ vec3 ecEnd = ecStart + offset;
+
+ vec3 forwardDirectionEC = normalize(offset);
+
+ // start plane
+ vec4 startPlaneEC;
+ startPlaneEC.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;
+ startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);
+
+ // end plane
+ vec4 endPlaneEC;
+ endPlaneEC.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;
+ endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);
+
+ // Right plane
+ v_rightPlaneEC.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;
+ v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);
+
+ v_texcoordNormalizationAndStartEcYZ.x = abs(endNormalAndTextureCoordinateNormalizationX.w);
+ v_texcoordNormalizationAndStartEcYZ.y = rightNormalAndTextureCoordinateNormalizationY.w;
+
+#endif // COLUMBUS_VIEW_2D
+
+ v_endEcAndStartEcX.xyz = ecEnd;
+ v_endEcAndStartEcX.w = ecStart.x;
+ v_texcoordNormalizationAndStartEcYZ.zw = ecStart.yz;
+
+#ifdef PER_INSTANCE_COLOR
+ v_color = czm_batchTable_color(batchId);
+#endif // PER_INSTANCE_COLOR
+
+ // Compute a normal along which to "push" the position out, extending the miter depending on view distance.
+ // Position has already been "pushed" by unit length along miter normal, and miter normals are encoded in the planes.
+ // Decode the normal to use at this specific vertex, push the position back, and then push to where it needs to be.
+ vec4 positionRelativeToEye = czm_computePosition();
+
+ // Check distance to the end plane and start plane, pick the plane that is closer
+ vec4 positionEC = czm_modelViewRelativeToEye * positionRelativeToEye; // w = 1.0, see czm_computePosition
+ float absStartPlaneDistance = abs(czm_planeDistance(startPlaneEC, positionEC.xyz));
+ float absEndPlaneDistance = abs(czm_planeDistance(endPlaneEC, positionEC.xyz));
+ vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlaneEC.xyz, endPlaneEC.xyz);
+ vec3 upOrDown = normalize(cross(v_rightPlaneEC.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.
+ vec3 normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.
+
+ // Extrude bottom vertices downward for far view distances, like for GroundPrimitives
+ upOrDown = cross(forwardDirectionEC, normalEC);
+ upOrDown = float(czm_sceneMode == czm_sceneMode3D) * upOrDown;
+ upOrDown = float(v_texcoordNormalizationAndStartEcYZ.y > 1.0 || v_texcoordNormalizationAndStartEcYZ.y < 0.0) * upOrDown;
+ upOrDown = min(GLOBE_MINIMUM_ALTITUDE, czm_geometricToleranceOverMeter * length(positionRelativeToEye.xyz)) * upOrDown;
+ positionEC.xyz += upOrDown;
+
+ v_texcoordNormalizationAndStartEcYZ.y = czm_branchFreeTernary(v_texcoordNormalizationAndStartEcYZ.y > 1.0, 0.0, abs(v_texcoordNormalizationAndStartEcYZ.y));
+
+ // Determine distance along normalEC to push for a volume of appropriate width.
+ // Make volumes about double pixel width for a conservative fit - in practice the
+ // extra cost here is minimal compared to the loose volume heights.
+ //
+ // N = normalEC (guaranteed "right-facing")
+ // R = rightEC
+ // p = angle between N and R
+ // w = distance to push along R if R == N
+ // d = distance to push along N
+ //
+ // N R
+ // { p| } * cos(p) = dot(N, R) = w / d
+ // d | |w * d = w / dot(N, R)
+ // { | }
+ // o---------- polyline segment ---->
+ //
+ float width = czm_batchTable_width(batchId);
+#ifdef WIDTH_VARYING
+ v_width = width;
+#endif
+
+ v_startPlaneNormalEcAndHalfWidth.xyz = startPlaneEC.xyz;
+ v_startPlaneNormalEcAndHalfWidth.w = width * 0.5;
+
+ v_endPlaneNormalEcAndBatchId.xyz = endPlaneEC.xyz;
+ v_endPlaneNormalEcAndBatchId.w = batchId;
+
+ width = width * max(0.0, czm_metersPerPixel(positionEC)); // width = distance to push along R
+ width = width / dot(normalEC, v_rightPlaneEC.xyz); // width = distance to push along N
+
+ // Determine if this vertex is on the "left" or "right"
+#ifdef COLUMBUS_VIEW_2D
+ normalEC *= sign(texcoordNormalization2D.x);
+#else
+ normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);
+#endif
+
+ positionEC.xyz += width * normalEC;
+ gl_Position = czm_depthClamp(czm_projection * positionEC);
+
+#ifdef ANGLE_VARYING
+ // Approximate relative screen space direction of the line.
+ vec2 approxLineDirection = normalize(vec2(forwardDirectionEC.x, -forwardDirectionEC.y));
+ approxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);
+ v_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);
+#endif
+}
+`, PolylineColorAppearanceVS = `in vec3 position3DHigh;
+in vec3 position3DLow;
+in vec3 prevPosition3DHigh;
+in vec3 prevPosition3DLow;
+in vec3 nextPosition3DHigh;
+in vec3 nextPosition3DLow;
+in vec2 expandAndWidth;
+in vec4 color;
+in float batchId;
+
+out vec4 v_color;
+
+void main()
+{
+ float expandDir = expandAndWidth.x;
+ float width = abs(expandAndWidth.y) + 0.5;
+ bool usePrev = expandAndWidth.y < 0.0;
+
+ vec4 p = czm_computePosition();
+ vec4 prev = czm_computePrevPosition();
+ vec4 next = czm_computeNextPosition();
+
+ float angle;
+ vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);
+ gl_Position = czm_viewportOrthographic * positionWC;
+
+ v_color = color;
+}
+`, PolylineCommon = `void clipLineSegmentToNearPlane(
+ vec3 p0,
+ vec3 p1,
+ out vec4 positionWC,
+ out bool clipped,
+ out bool culledByNearPlane,
+ out vec4 clippedPositionEC)
+{
+ culledByNearPlane = false;
+ clipped = false;
+
+ vec3 p0ToP1 = p1 - p0;
+ float magnitude = length(p0ToP1);
+ vec3 direction = normalize(p0ToP1);
+
+ // Distance that p0 is behind the near plane. Negative means p0 is
+ // in front of the near plane.
+ float endPoint0Distance = czm_currentFrustum.x + p0.z;
+
+ // Camera looks down -Z.
+ // When moving a point along +Z: LESS VISIBLE
+ // * Points in front of the camera move closer to the camera.
+ // * Points behind the camrea move farther away from the camera.
+ // When moving a point along -Z: MORE VISIBLE
+ // * Points in front of the camera move farther away from the camera.
+ // * Points behind the camera move closer to the camera.
+
+ // Positive denominator: -Z, becoming more visible
+ // Negative denominator: +Z, becoming less visible
+ // Nearly zero: parallel to near plane
+ float denominator = -direction.z;
+
+ if (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)
+ {
+ // p0 is behind the near plane and the line to p1 is nearly parallel to
+ // the near plane, so cull the segment completely.
+ culledByNearPlane = true;
+ }
+ else if (endPoint0Distance > 0.0)
+ {
+ // p0 is behind the near plane, and the line to p1 is moving distinctly
+ // toward or away from it.
+
+ // t = (-plane distance - dot(plane normal, ray origin)) / dot(plane normal, ray direction)
+ float t = endPoint0Distance / denominator;
+ if (t < 0.0 || t > magnitude)
+ {
+ // Near plane intersection is not between the two points.
+ // We already confirmed p0 is behind the naer plane, so now
+ // we know the entire segment is behind it.
+ culledByNearPlane = true;
+ }
+ else
+ {
+ // Segment crosses the near plane, update p0 to lie exactly on it.
+ p0 = p0 + t * direction;
+
+ // Numerical noise might put us a bit on the wrong side of the near plane.
+ // Don't let that happen.
+ p0.z = min(p0.z, -czm_currentFrustum.x);
+
+ clipped = true;
+ }
+ }
+
+ clippedPositionEC = vec4(p0, 1.0);
+ positionWC = czm_eyeToWindowCoordinates(clippedPositionEC);
+}
+
+vec4 getPolylineWindowCoordinatesEC(vec4 positionEC, vec4 prevEC, vec4 nextEC, float expandDirection, float width, bool usePrevious, out float angle)
+{
+ // expandDirection +1 is to the _left_ when looking from positionEC toward nextEC.
+
+#ifdef POLYLINE_DASH
+ // Compute the window coordinates of the points.
+ vec4 positionWindow = czm_eyeToWindowCoordinates(positionEC);
+ vec4 previousWindow = czm_eyeToWindowCoordinates(prevEC);
+ vec4 nextWindow = czm_eyeToWindowCoordinates(nextEC);
+
+ // Determine the relative screen space direction of the line.
+ vec2 lineDir;
+ if (usePrevious) {
+ lineDir = normalize(positionWindow.xy - previousWindow.xy);
+ }
+ else {
+ lineDir = normalize(nextWindow.xy - positionWindow.xy);
+ }
+ angle = atan(lineDir.x, lineDir.y) - 1.570796327; // precomputed atan(1,0)
+
+ // Quantize the angle so it doesn't change rapidly between segments.
+ angle = floor(angle / czm_piOverFour + 0.5) * czm_piOverFour;
+#endif
+
+ vec4 clippedPrevWC, clippedPrevEC;
+ bool prevSegmentClipped, prevSegmentCulled;
+ clipLineSegmentToNearPlane(prevEC.xyz, positionEC.xyz, clippedPrevWC, prevSegmentClipped, prevSegmentCulled, clippedPrevEC);
+
+ vec4 clippedNextWC, clippedNextEC;
+ bool nextSegmentClipped, nextSegmentCulled;
+ clipLineSegmentToNearPlane(nextEC.xyz, positionEC.xyz, clippedNextWC, nextSegmentClipped, nextSegmentCulled, clippedNextEC);
+
+ bool segmentClipped, segmentCulled;
+ vec4 clippedPositionWC, clippedPositionEC;
+ clipLineSegmentToNearPlane(positionEC.xyz, usePrevious ? prevEC.xyz : nextEC.xyz, clippedPositionWC, segmentClipped, segmentCulled, clippedPositionEC);
+
+ if (segmentCulled)
+ {
+ return vec4(0.0, 0.0, 0.0, 1.0);
+ }
+
+ vec2 directionToPrevWC = normalize(clippedPrevWC.xy - clippedPositionWC.xy);
+ vec2 directionToNextWC = normalize(clippedNextWC.xy - clippedPositionWC.xy);
+
+ // If a segment was culled, we can't use the corresponding direction
+ // computed above. We should never see both of these be true without
+ // \`segmentCulled\` above also being true.
+ if (prevSegmentCulled)
+ {
+ directionToPrevWC = -directionToNextWC;
+ }
+ else if (nextSegmentCulled)
+ {
+ directionToNextWC = -directionToPrevWC;
+ }
+
+ vec2 thisSegmentForwardWC, otherSegmentForwardWC;
+ if (usePrevious)
+ {
+ thisSegmentForwardWC = -directionToPrevWC;
+ otherSegmentForwardWC = directionToNextWC;
+ }
+ else
+ {
+ thisSegmentForwardWC = directionToNextWC;
+ otherSegmentForwardWC = -directionToPrevWC;
+ }
+
+ vec2 thisSegmentLeftWC = vec2(-thisSegmentForwardWC.y, thisSegmentForwardWC.x);
+
+ vec2 leftWC = thisSegmentLeftWC;
+ float expandWidth = width * 0.5;
+
+ // When lines are split at the anti-meridian, the position may be at the
+ // same location as the next or previous position, and we need to handle
+ // that to avoid producing NaNs.
+ if (!czm_equalsEpsilon(prevEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1) && !czm_equalsEpsilon(nextEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1))
+ {
+ vec2 otherSegmentLeftWC = vec2(-otherSegmentForwardWC.y, otherSegmentForwardWC.x);
+
+ vec2 leftSumWC = thisSegmentLeftWC + otherSegmentLeftWC;
+ float leftSumLength = length(leftSumWC);
+ leftWC = leftSumLength < czm_epsilon6 ? thisSegmentLeftWC : (leftSumWC / leftSumLength);
+
+ // The sine of the angle between the two vectors is given by the formula
+ // |a x b| = |a||b|sin(theta)
+ // which is
+ // float sinAngle = length(cross(vec3(leftWC, 0.0), vec3(-thisSegmentForwardWC, 0.0)));
+ // Because the z components of both vectors are zero, the x and y coordinate will be zero.
+ // Therefore, the sine of the angle is just the z component of the cross product.
+ vec2 u = -thisSegmentForwardWC;
+ vec2 v = leftWC;
+ float sinAngle = abs(u.x * v.y - u.y * v.x);
+ expandWidth = clamp(expandWidth / sinAngle, 0.0, width * 2.0);
+ }
+
+ vec2 offset = leftWC * expandDirection * expandWidth * czm_pixelRatio;
+ return vec4(clippedPositionWC.xy + offset, -clippedPositionWC.z, 1.0) * (czm_projection * clippedPositionEC).w;
+}
+
+vec4 getPolylineWindowCoordinates(vec4 position, vec4 previous, vec4 next, float expandDirection, float width, bool usePrevious, out float angle)
+{
+ vec4 positionEC = czm_modelViewRelativeToEye * position;
+ vec4 prevEC = czm_modelViewRelativeToEye * previous;
+ vec4 nextEC = czm_modelViewRelativeToEye * next;
+ return getPolylineWindowCoordinatesEC(positionEC, prevEC, nextEC, expandDirection, width, usePrevious, angle);
+}
+`;
+let defaultVertexShaderSource$1 = `${PolylineCommon}
+${PolylineColorAppearanceVS}`;
+const defaultFragmentShaderSource$1 = PerInstanceFlatColorAppearanceFS;
+FeatureDetection.isInternetExplorer() || (defaultVertexShaderSource$1 = `#define CLIP_POLYLINE
+${defaultVertexShaderSource$1}`);
+function PolylineColorAppearance(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = defaultValue(e.translucent, !0), n = !1, i = PolylineColorAppearance.VERTEX_FORMAT;
+ this.material = void 0, this.translucent = t, this._vertexShaderSource = defaultValue(
+ e.vertexShaderSource,
+ defaultVertexShaderSource$1
+ ), this._fragmentShaderSource = defaultValue(
+ e.fragmentShaderSource,
+ defaultFragmentShaderSource$1
+ ), this._renderState = Appearance.getDefaultRenderState(
+ t,
+ n,
+ e.renderState
+ ), this._closed = n, this._vertexFormat = i;
+}
+Object.defineProperties(PolylineColorAppearance.prototype, {
+ /**
+ * The GLSL source code for the vertex shader.
+ *
+ * @memberof PolylineColorAppearance.prototype
+ *
+ * @type {string}
+ * @readonly
+ */
+ vertexShaderSource: {
+ get: function() {
+ return this._vertexShaderSource;
+ }
+ },
+ /**
+ * The GLSL source code for the fragment shader.
+ *
+ * @memberof PolylineColorAppearance.prototype
+ *
+ * @type {string}
+ * @readonly
+ */
+ fragmentShaderSource: {
+ get: function() {
+ return this._fragmentShaderSource;
+ }
+ },
+ /**
+ * The WebGL fixed-function state to use when rendering the geometry.
+ * + * The render state can be explicitly defined when constructing a {@link PolylineColorAppearance} + * instance, or it is set implicitly via {@link PolylineColorAppearance#translucent}. + *
+ * + * @memberof PolylineColorAppearance.prototype + * + * @type {object} + * @readonly + */ + renderState: { + get: function() { + return this._renderState; + } + }, + /** + * Whentrue, the geometry is expected to be closed so
+ * {@link PolylineColorAppearance#renderState} has backface culling enabled.
+ * This is always false for PolylineColorAppearance.
+ *
+ * @memberof PolylineColorAppearance.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default false
+ */
+ closed: {
+ get: function() {
+ return this._closed;
+ }
+ },
+ /**
+ * The {@link VertexFormat} that this appearance instance is compatible with.
+ * A geometry can have more vertex attributes and still be compatible - at a
+ * potential performance cost - but it can't have less.
+ *
+ * @memberof PolylineColorAppearance.prototype
+ *
+ * @type VertexFormat
+ * @readonly
+ *
+ * @default {@link PolylineColorAppearance.VERTEX_FORMAT}
+ */
+ vertexFormat: {
+ get: function() {
+ return this._vertexFormat;
+ }
+ }
+});
+PolylineColorAppearance.VERTEX_FORMAT = VertexFormat.POSITION_ONLY;
+PolylineColorAppearance.prototype.getFragmentShaderSource = Appearance.prototype.getFragmentShaderSource;
+PolylineColorAppearance.prototype.isTranslucent = Appearance.prototype.isTranslucent;
+PolylineColorAppearance.prototype.getRenderState = Appearance.prototype.getRenderState;
+const PolylineMaterialAppearanceVS = `in vec3 position3DHigh;
+in vec3 position3DLow;
+in vec3 prevPosition3DHigh;
+in vec3 prevPosition3DLow;
+in vec3 nextPosition3DHigh;
+in vec3 nextPosition3DLow;
+in vec2 expandAndWidth;
+in vec2 st;
+in float batchId;
+
+out float v_width;
+out vec2 v_st;
+out float v_polylineAngle;
+
+void main()
+{
+ float expandDir = expandAndWidth.x;
+ float width = abs(expandAndWidth.y) + 0.5;
+ bool usePrev = expandAndWidth.y < 0.0;
+
+ vec4 p = czm_computePosition();
+ vec4 prev = czm_computePrevPosition();
+ vec4 next = czm_computeNextPosition();
+
+ float angle;
+ vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);
+ gl_Position = czm_viewportOrthographic * positionWC;
+
+ v_width = width;
+ v_st.s = st.s;
+ v_st.t = czm_writeNonPerspective(st.t, gl_Position.w);
+ v_polylineAngle = angle;
+}
+`, PolylineFS$1 = `#ifdef VECTOR_TILE
+uniform vec4 u_highlightColor;
+#endif
+
+in vec2 v_st;
+
+void main()
+{
+ czm_materialInput materialInput;
+
+ vec2 st = v_st;
+ st.t = czm_readNonPerspective(st.t, gl_FragCoord.w);
+
+ materialInput.s = st.s;
+ materialInput.st = st;
+ materialInput.str = vec3(st, 0.0);
+
+ czm_material material = czm_getMaterial(materialInput);
+ out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
+#ifdef VECTOR_TILE
+ out_FragColor *= u_highlightColor;
+#endif
+
+ czm_writeLogDepth();
+}
+`;
+let defaultVertexShaderSource = `${PolylineCommon}
+${PolylineMaterialAppearanceVS}`;
+const defaultFragmentShaderSource = PolylineFS$1;
+FeatureDetection.isInternetExplorer() || (defaultVertexShaderSource = `#define CLIP_POLYLINE
+${defaultVertexShaderSource}`);
+function PolylineMaterialAppearance(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = defaultValue(e.translucent, !0), n = !1, i = PolylineMaterialAppearance.VERTEX_FORMAT;
+ this.material = defined(e.material) ? e.material : Material$4.fromType(Material$4.ColorType), this.translucent = t, this._vertexShaderSource = defaultValue(
+ e.vertexShaderSource,
+ defaultVertexShaderSource
+ ), this._fragmentShaderSource = defaultValue(
+ e.fragmentShaderSource,
+ defaultFragmentShaderSource
+ ), this._renderState = Appearance.getDefaultRenderState(
+ t,
+ n,
+ e.renderState
+ ), this._closed = n, this._vertexFormat = i;
+}
+Object.defineProperties(PolylineMaterialAppearance.prototype, {
+ /**
+ * The GLSL source code for the vertex shader.
+ *
+ * @memberof PolylineMaterialAppearance.prototype
+ *
+ * @type {string}
+ * @readonly
+ */
+ vertexShaderSource: {
+ get: function() {
+ let e = this._vertexShaderSource;
+ return this.material.shaderSource.search(/in\s+float\s+v_polylineAngle;/g) !== -1 && (e = `#define POLYLINE_DASH
+${e}`), e;
+ }
+ },
+ /**
+ * The GLSL source code for the fragment shader.
+ *
+ * @memberof PolylineMaterialAppearance.prototype
+ *
+ * @type {string}
+ * @readonly
+ */
+ fragmentShaderSource: {
+ get: function() {
+ return this._fragmentShaderSource;
+ }
+ },
+ /**
+ * The WebGL fixed-function state to use when rendering the geometry.
+ * + * The render state can be explicitly defined when constructing a {@link PolylineMaterialAppearance} + * instance, or it is set implicitly via {@link PolylineMaterialAppearance#translucent} + * and {@link PolylineMaterialAppearance#closed}. + *
+ * + * @memberof PolylineMaterialAppearance.prototype + * + * @type {object} + * @readonly + */ + renderState: { + get: function() { + return this._renderState; + } + }, + /** + * Whentrue, the geometry is expected to be closed so
+ * {@link PolylineMaterialAppearance#renderState} has backface culling enabled.
+ * This is always false for PolylineMaterialAppearance.
+ *
+ * @memberof PolylineMaterialAppearance.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default false
+ */
+ closed: {
+ get: function() {
+ return this._closed;
+ }
+ },
+ /**
+ * The {@link VertexFormat} that this appearance instance is compatible with.
+ * A geometry can have more vertex attributes and still be compatible - at a
+ * potential performance cost - but it can't have less.
+ *
+ * @memberof PolylineMaterialAppearance.prototype
+ *
+ * @type VertexFormat
+ * @readonly
+ *
+ * @default {@link PolylineMaterialAppearance.VERTEX_FORMAT}
+ */
+ vertexFormat: {
+ get: function() {
+ return this._vertexFormat;
+ }
+ }
+});
+PolylineMaterialAppearance.VERTEX_FORMAT = VertexFormat.POSITION_AND_ST;
+PolylineMaterialAppearance.prototype.getFragmentShaderSource = Appearance.prototype.getFragmentShaderSource;
+PolylineMaterialAppearance.prototype.isTranslucent = Appearance.prototype.isTranslucent;
+PolylineMaterialAppearance.prototype.getRenderState = Appearance.prototype.getRenderState;
+function GroundPolylinePrimitive(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this.geometryInstances = e.geometryInstances, this._hasPerInstanceColors = !0;
+ let t = e.appearance;
+ defined(t) || (t = new PolylineMaterialAppearance()), this.appearance = t, this.show = defaultValue(e.show, !0), this.classificationType = defaultValue(
+ e.classificationType,
+ ClassificationType$1.BOTH
+ ), this.debugShowBoundingVolume = defaultValue(
+ e.debugShowBoundingVolume,
+ !1
+ ), this._debugShowShadowVolume = defaultValue(
+ e.debugShowShadowVolume,
+ !1
+ ), this._primitiveOptions = {
+ geometryInstances: void 0,
+ appearance: void 0,
+ vertexCacheOptimize: !1,
+ interleave: defaultValue(e.interleave, !1),
+ releaseGeometryInstances: defaultValue(
+ e.releaseGeometryInstances,
+ !0
+ ),
+ allowPicking: defaultValue(e.allowPicking, !0),
+ asynchronous: defaultValue(e.asynchronous, !0),
+ compressVertices: !1,
+ _createShaderProgramFunction: void 0,
+ _createCommandsFunction: void 0,
+ _updateAndQueueCommandsFunction: void 0
+ }, this._zIndex = void 0, this._ready = !1, this._primitive = void 0, this._sp = void 0, this._sp2D = void 0, this._spMorph = void 0, this._renderState = getRenderState$1(!1), this._renderState3DTiles = getRenderState$1(!0), this._renderStateMorph = RenderState.fromCache({
+ cull: {
+ enabled: !0,
+ face: CullFace$1.FRONT
+ // Geometry is "inverted," so cull front when materials on volume instead of on terrain (morph)
+ },
+ depthTest: {
+ enabled: !0
+ },
+ blending: BlendingState$1.PRE_MULTIPLIED_ALPHA_BLEND,
+ depthMask: !1
+ });
+}
+Object.defineProperties(GroundPolylinePrimitive.prototype, {
+ /**
+ * Determines if geometry vertex attributes are interleaved, which can slightly improve rendering performance.
+ *
+ * @memberof GroundPolylinePrimitive.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default false
+ */
+ interleave: {
+ get: function() {
+ return this._primitiveOptions.interleave;
+ }
+ },
+ /**
+ * When true, the primitive does not keep a reference to the input geometryInstances to save memory.
+ *
+ * @memberof GroundPolylinePrimitive.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default true
+ */
+ releaseGeometryInstances: {
+ get: function() {
+ return this._primitiveOptions.releaseGeometryInstances;
+ }
+ },
+ /**
+ * When true, each geometry instance will only be pickable with {@link Scene#pick}. When false, GPU memory is saved.
+ *
+ * @memberof GroundPolylinePrimitive.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default true
+ */
+ allowPicking: {
+ get: function() {
+ return this._primitiveOptions.allowPicking;
+ }
+ },
+ /**
+ * Determines if the geometry instances will be created and batched on a web worker.
+ *
+ * @memberof GroundPolylinePrimitive.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default true
+ */
+ asynchronous: {
+ get: function() {
+ return this._primitiveOptions.asynchronous;
+ }
+ },
+ /**
+ * Determines if the primitive is complete and ready to render. If this property is
+ * true, the primitive will be rendered the next time that {@link GroundPolylinePrimitive#update}
+ * is called.
+ *
+ * @memberof GroundPolylinePrimitive.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ */
+ ready: {
+ get: function() {
+ return this._ready;
+ }
+ },
+ /**
+ * This property is for debugging only; it is not for production use nor is it optimized.
+ * + * If true, draws the shadow volume for each geometry in the primitive. + *
+ * + * @memberof GroundPolylinePrimitive.prototype + * + * @type {boolean} + * @readonly + * + * @default false + */ + debugShowShadowVolume: { + get: function() { + return this._debugShowShadowVolume; + } + } +}); +GroundPolylinePrimitive.initializeTerrainHeights = function() { + return ApproximateTerrainHeights.initialize(); +}; +function createShaderProgram$1(e, t, n) { + const i = t.context, r = e._primitive, o = r._attributeLocations; + let s = r._batchTable.getVertexShaderCallback()( + PolylineShadowVolumeVS + ); + s = Primitive$3._appendShowToShader(r, s), s = Primitive$3._appendDistanceDisplayConditionToShader(r, s), s = Primitive$3._modifyShaderPosition( + e, + s, + t.scene3DOnly + ); + let c = r._batchTable.getVertexShaderCallback()( + PolylineShadowVolumeMorphVS + ); + c = Primitive$3._appendShowToShader(r, c), c = Primitive$3._appendDistanceDisplayConditionToShader( + r, + c + ), c = Primitive$3._modifyShaderPosition( + e, + c, + t.scene3DOnly + ); + let l = r._batchTable.getVertexShaderCallback()( + PolylineShadowVolumeFS + ); + const d = [ + `GLOBE_MINIMUM_ALTITUDE ${t.mapProjection.ellipsoid.minimumRadius.toFixed( + 1 + )}` + ]; + let f = "", h = ""; + defined(n.material) ? (h = defined(n.material) ? n.material.shaderSource : "", h.search(/in\s+float\s+v_polylineAngle;/g) !== -1 && d.push("ANGLE_VARYING"), h.search(/in\s+float\s+v_width;/g) !== -1 && d.push("WIDTH_VARYING")) : f = "PER_INSTANCE_COLOR", d.push(f); + const p = e.debugShowShadowVolume ? ["DEBUG_SHOW_VOLUME", f] : [f], m = new ShaderSource({ + defines: d, + sources: [s] + }), _ = new ShaderSource({ + defines: p, + sources: [h, l] + }); + e._sp = ShaderProgram.replaceCache({ + context: i, + shaderProgram: r._sp, + vertexShaderSource: m, + fragmentShaderSource: _, + attributeLocations: o + }); + let y = i.shaderCache.getDerivedShaderProgram( + e._sp, + "2dColor" + ); + if (!defined(y)) { + const T = new ShaderSource({ + defines: d.concat(["COLUMBUS_VIEW_2D"]), + sources: [s] + }); + y = i.shaderCache.createDerivedShaderProgram( + e._sp, + "2dColor", + { + context: i, + shaderProgram: e._sp2D, + vertexShaderSource: T, + fragmentShaderSource: _, + attributeLocations: o + } + ); + } + e._sp2D = y; + let C = i.shaderCache.getDerivedShaderProgram( + e._sp, + "MorphColor" + ); + if (!defined(C)) { + const T = new ShaderSource({ + defines: d.concat([ + `MAX_TERRAIN_HEIGHT ${ApproximateTerrainHeights._defaultMaxTerrainHeight.toFixed( + 1 + )}` + ]), + sources: [c] + }); + l = r._batchTable.getVertexShaderCallback()( + PolylineShadowVolumeMorphFS + ); + const x = new ShaderSource({ + defines: p, + sources: [h, l] + }); + C = i.shaderCache.createDerivedShaderProgram( + e._sp, + "MorphColor", + { + context: i, + shaderProgram: e._spMorph, + vertexShaderSource: T, + fragmentShaderSource: x, + attributeLocations: o + } + ); + } + e._spMorph = C; +} +function getRenderState$1(e) { + return RenderState.fromCache({ + cull: { + enabled: !0 + // prevent double-draw. Geometry is "inverted" (reversed winding order) so we're drawing backfaces. + }, + blending: BlendingState$1.PRE_MULTIPLIED_ALPHA_BLEND, + depthMask: !1, + stencilTest: { + enabled: e, + frontFunction: StencilFunction$1.EQUAL, + frontOperation: { + fail: StencilOperation$1.KEEP, + zFail: StencilOperation$1.KEEP, + zPass: StencilOperation$1.KEEP + }, + backFunction: StencilFunction$1.EQUAL, + backOperation: { + fail: StencilOperation$1.KEEP, + zFail: StencilOperation$1.KEEP, + zPass: StencilOperation$1.KEEP + }, + reference: StencilConstants$1.CESIUM_3D_TILE_MASK, + mask: StencilConstants$1.CESIUM_3D_TILE_MASK + } + }); +} +function createCommands$2(e, t, n, i, r, o) { + const s = e._primitive, c = s._va.length; + r.length = c, o.length = c; + const d = t instanceof PolylineColorAppearance ? {} : n._uniforms, f = s._batchTable.getUniformMapCallback()( + d + ); + for (let h = 0; h < c; h++) { + const p = s._va[h]; + let m = r[h]; + defined(m) || (m = r[h] = new DrawCommand({ + owner: e, + primitiveType: s._primitiveType + })), m.vertexArray = p, m.renderState = e._renderState, m.shaderProgram = e._sp, m.uniformMap = f, m.pass = Pass$1.TERRAIN_CLASSIFICATION, m.pickId = "czm_batchTable_pickColor(v_endPlaneNormalEcAndBatchId.w)"; + const _ = DrawCommand.shallowClone( + m, + m.derivedCommands.tileset + ); + _.renderState = e._renderState3DTiles, _.pass = Pass$1.CESIUM_3D_TILE_CLASSIFICATION, m.derivedCommands.tileset = _; + const y = DrawCommand.shallowClone( + m, + m.derivedCommands.color2D + ); + y.shaderProgram = e._sp2D, m.derivedCommands.color2D = y; + const C = DrawCommand.shallowClone( + _, + _.derivedCommands.color2D + ); + C.shaderProgram = e._sp2D, _.derivedCommands.color2D = C; + const T = DrawCommand.shallowClone( + m, + m.derivedCommands.colorMorph + ); + T.renderState = e._renderStateMorph, T.shaderProgram = e._spMorph, T.pickId = "czm_batchTable_pickColor(v_batchId)", m.derivedCommands.colorMorph = T; + } +} +function updateAndQueueCommand(e, t, n, i, r, o, s) { + n.mode === SceneMode$1.MORPHING ? t = t.derivedCommands.colorMorph : n.mode !== SceneMode$1.SCENE3D && (t = t.derivedCommands.color2D), t.modelMatrix = i, t.boundingVolume = o, t.cull = r, t.debugShowBoundingVolume = s, n.commandList.push(t); +} +function updateAndQueueCommands(e, t, n, i, r, o, s) { + const c = e._primitive; + Primitive$3._updateBoundingVolumes(c, t, r); + let l; + t.mode === SceneMode$1.SCENE3D ? l = c._boundingSphereWC : t.mode === SceneMode$1.COLUMBUS_VIEW ? l = c._boundingSphereCV : t.mode === SceneMode$1.SCENE2D && defined(c._boundingSphere2D) ? l = c._boundingSphere2D : defined(c._boundingSphereMorph) && (l = c._boundingSphereMorph); + const d = t.mode === SceneMode$1.MORPHING, f = e.classificationType, h = f !== ClassificationType$1.CESIUM_3D_TILE, p = f !== ClassificationType$1.TERRAIN && !d; + let m; + const _ = t.passes; + if (_.render || _.pick && c.allowPicking) { + const y = n.length; + for (let C = 0; C < y; ++C) { + const T = l[C]; + h && (m = n[C], updateAndQueueCommand( + e, + m, + t, + r, + o, + T, + s + )), p && (m = n[C].derivedCommands.tileset, updateAndQueueCommand( + e, + m, + t, + r, + o, + T, + s + )); + } + } +} +GroundPolylinePrimitive.prototype.update = function(e) { + if (!defined(this._primitive) && !defined(this.geometryInstances)) + return; + if (!ApproximateTerrainHeights.initialized) { + GroundPolylinePrimitive.initializeTerrainHeights(); + return; + } + let t; + const n = this, i = this._primitiveOptions; + if (!defined(this._primitive)) { + const r = Array.isArray(this.geometryInstances) ? this.geometryInstances : [this.geometryInstances], o = r.length, s = new Array(o); + let c; + for (t = 0; t < o; ++t) + if (c = r[t].attributes, !defined(c) || !defined(c.color)) { + this._hasPerInstanceColors = !1; + break; + } + for (t = 0; t < o; ++t) { + const l = r[t]; + c = {}; + const d = l.attributes; + for (const f in d) + d.hasOwnProperty(f) && (c[f] = d[f]); + defined(c.width) || (c.width = new GeometryInstanceAttribute({ + componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE, + componentsPerAttribute: 1, + value: [l.geometry.width] + })), l.geometry._scene3DOnly = e.scene3DOnly, GroundPolylineGeometry.setProjectionAndEllipsoid( + l.geometry, + e.mapProjection + ), s[t] = new GeometryInstance({ + geometry: l.geometry, + attributes: c, + id: l.id, + pickPrimitive: n + }); + } + i.geometryInstances = s, i.appearance = this.appearance, i._createShaderProgramFunction = function(l, d, f) { + createShaderProgram$1(n, d, f); + }, i._createCommandsFunction = function(l, d, f, h, p, m, _) { + createCommands$2( + n, + d, + f, + h, + m, + _ + ); + }, i._updateAndQueueCommandsFunction = function(l, d, f, h, p, m, _, y) { + updateAndQueueCommands( + n, + d, + f, + h, + p, + m, + _ + ); + }, this._primitive = new Primitive$3(i); + } + if (this.appearance instanceof PolylineColorAppearance && !this._hasPerInstanceColors) + throw new DeveloperError( + "All GeometryInstances must have color attributes to use PolylineColorAppearance with GroundPolylinePrimitive." + ); + this._primitive.appearance = this.appearance, this._primitive.show = this.show, this._primitive.debugShowBoundingVolume = this.debugShowBoundingVolume, this._primitive.update(e), e.afterRender.push(() => { + !this._ready && defined(this._primitive) && this._primitive.ready && (this._ready = !0, this.releaseGeometryInstances && (this.geometryInstances = void 0)); + }); +}; +GroundPolylinePrimitive.prototype.getGeometryInstanceAttributes = function(e) { + return this._primitive.getGeometryInstanceAttributes(e); +}; +GroundPolylinePrimitive.isSupported = function(e) { + return e.frameState.context.depthTexture; +}; +GroundPolylinePrimitive.prototype.isDestroyed = function() { + return !1; +}; +GroundPolylinePrimitive.prototype.destroy = function() { + return this._primitive = this._primitive && this._primitive.destroy(), this._sp = this._sp && this._sp.destroy(), this._sp2D = void 0, this._spMorph = void 0, destroyObject(this); +}; +const defaultRepeat$2 = new Cartesian2(1, 1), defaultTransparent = !1, defaultColor$7 = Color.WHITE; +function ImageMaterialProperty(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._definitionChanged = new Event(), this._image = void 0, this._imageSubscription = void 0, this._repeat = void 0, this._repeatSubscription = void 0, this._color = void 0, this._colorSubscription = void 0, this._transparent = void 0, this._transparentSubscription = void 0, this.image = e.image, this.repeat = e.repeat, this.color = e.color, this.transparent = e.transparent; +} +Object.defineProperties(ImageMaterialProperty.prototype, { + /** + * Gets a value indicating if this property is constant. A property is considered + * constant if getValue always returns the same result for the current definition. + * @memberof ImageMaterialProperty.prototype + * + * @type {boolean} + * @readonly + */ + isConstant: { + get: function() { + return Property.isConstant(this._image) && Property.isConstant(this._repeat); + } + }, + /** + * Gets the event that is raised whenever the definition of this property changes. + * The definition is considered to have changed if a call to getValue would return + * a different result for the same time. + * @memberof ImageMaterialProperty.prototype + * + * @type {Event} + * @readonly + */ + definitionChanged: { + get: function() { + return this._definitionChanged; + } + }, + /** + * Gets or sets the Property specifying Image, URL, Canvas, or Video to use. + * @memberof ImageMaterialProperty.prototype + * @type {Property|undefined} + */ + image: createPropertyDescriptor("image"), + /** + * Gets or sets the {@link Cartesian2} Property specifying the number of times the image repeats in each direction. + * @memberof ImageMaterialProperty.prototype + * @type {Property|undefined} + * @default new Cartesian2(1, 1) + */ + repeat: createPropertyDescriptor("repeat"), + /** + * Gets or sets the Color Property specifying the desired color applied to the image. + * @memberof ImageMaterialProperty.prototype + * @type {Property|undefined} + * @default 1.0 + */ + color: createPropertyDescriptor("color"), + /** + * Gets or sets the Boolean Property specifying whether the image has transparency + * @memberof ImageMaterialProperty.prototype + * @type {Property|undefined} + * @default 1.0 + */ + transparent: createPropertyDescriptor("transparent") +}); +ImageMaterialProperty.prototype.getType = function(e) { + return "Image"; +}; +const timeScratch$p = new JulianDate(); +ImageMaterialProperty.prototype.getValue = function(e, t) { + return defined(e) || (e = JulianDate.now(timeScratch$p)), defined(t) || (t = {}), t.image = Property.getValueOrUndefined(this._image, e), t.repeat = Property.getValueOrClonedDefault( + this._repeat, + e, + defaultRepeat$2, + t.repeat + ), t.color = Property.getValueOrClonedDefault( + this._color, + e, + defaultColor$7, + t.color + ), Property.getValueOrDefault(this._transparent, e, defaultTransparent) && (t.color.alpha = Math.min(0.99, t.color.alpha)), t; +}; +ImageMaterialProperty.prototype.equals = function(e) { + return this === e || e instanceof ImageMaterialProperty && Property.equals(this._image, e._image) && Property.equals(this._repeat, e._repeat) && Property.equals(this._color, e._color) && Property.equals(this._transparent, e._transparent); +}; +function createMaterialProperty(e) { + if (e instanceof Color) + return new ColorMaterialProperty(e); + if (typeof e == "string" || e instanceof Resource || e instanceof HTMLCanvasElement || e instanceof HTMLVideoElement) { + const t = new ImageMaterialProperty(); + return t.image = e, t; + } +} +function createMaterialPropertyDescriptor(e, t) { + return createPropertyDescriptor(e, t, createMaterialProperty); +} +function BoxGraphics(e) { + this._definitionChanged = new Event(), this._show = void 0, this._showSubscription = void 0, this._dimensions = void 0, this._dimensionsSubscription = void 0, this._heightReference = void 0, this._heightReferenceSubscription = void 0, this._fill = void 0, this._fillSubscription = void 0, this._material = void 0, this._materialSubscription = void 0, this._outline = void 0, this._outlineSubscription = void 0, this._outlineColor = void 0, this._outlineColorSubscription = void 0, this._outlineWidth = void 0, this._outlineWidthSubscription = void 0, this._shadows = void 0, this._shadowsSubscription = void 0, this._distanceDisplayCondition = void 0, this._distanceDisplayConditionSubscription = void 0, this.merge(defaultValue(e, defaultValue.EMPTY_OBJECT)); +} +Object.defineProperties(BoxGraphics.prototype, { + /** + * Gets the event that is raised whenever a property or sub-property is changed or modified. + * @memberof BoxGraphics.prototype + * @type {Event} + * @readonly + */ + definitionChanged: { + get: function() { + return this._definitionChanged; + } + }, + /** + * Gets or sets the boolean Property specifying the visibility of the box. + * @memberof BoxGraphics.prototype + * @type {Property|undefined} + * @default true + */ + show: createPropertyDescriptor("show"), + /** + * Gets or sets {@link Cartesian3} Property property specifying the length, width, and height of the box. + * @memberof BoxGraphics.prototype + * @type {Property|undefined} + */ + dimensions: createPropertyDescriptor("dimensions"), + /** + * Gets or sets the Property specifying the {@link HeightReference}. + * @memberof BoxGraphics.prototype + * @type {Property|undefined} + * @default HeightReference.NONE + */ + heightReference: createPropertyDescriptor("heightReference"), + /** + * Gets or sets the boolean Property specifying whether the box is filled with the provided material. + * @memberof BoxGraphics.prototype + * @type {Property|undefined} + * @default true + */ + fill: createPropertyDescriptor("fill"), + /** + * Gets or sets the material used to fill the box. + * @memberof BoxGraphics.prototype + * @type {MaterialProperty|undefined} + * @default Color.WHITE + */ + material: createMaterialPropertyDescriptor("material"), + /** + * Gets or sets the Property specifying whether the box is outlined. + * @memberof BoxGraphics.prototype + * @type {Property|undefined} + * @default false + */ + outline: createPropertyDescriptor("outline"), + /** + * Gets or sets the Property specifying the {@link Color} of the outline. + * @memberof BoxGraphics.prototype + * @type {Property|undefined} + * @default Color.BLACK + */ + outlineColor: createPropertyDescriptor("outlineColor"), + /** + * Gets or sets the numeric Property specifying the width of the outline. + *+ * Note: This property will be ignored on all major browsers on Windows platforms. For details, see (@link https://github.com/CesiumGS/cesium/issues/40}. + *
+ * @memberof BoxGraphics.prototype + * @type {Property|undefined} + * @default 1.0 + */ + outlineWidth: createPropertyDescriptor("outlineWidth"), + /** + * Get or sets the enum Property specifying whether the box + * casts or receives shadows from light sources. + * @memberof BoxGraphics.prototype + * @type {Property|undefined} + * @default ShadowMode.DISABLED + */ + shadows: createPropertyDescriptor("shadows"), + /** + * Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this box will be displayed. + * @memberof BoxGraphics.prototype + * @type {Property|undefined} + */ + distanceDisplayCondition: createPropertyDescriptor( + "distanceDisplayCondition" + ) +}); +BoxGraphics.prototype.clone = function(e) { + return defined(e) ? (e.show = this.show, e.dimensions = this.dimensions, e.heightReference = this.heightReference, e.fill = this.fill, e.material = this.material, e.outline = this.outline, e.outlineColor = this.outlineColor, e.outlineWidth = this.outlineWidth, e.shadows = this.shadows, e.distanceDisplayCondition = this.distanceDisplayCondition, e) : new BoxGraphics(this); +}; +BoxGraphics.prototype.merge = function(e) { + this.show = defaultValue(this.show, e.show), this.dimensions = defaultValue(this.dimensions, e.dimensions), this.heightReference = defaultValue( + this.heightReference, + e.heightReference + ), this.fill = defaultValue(this.fill, e.fill), this.material = defaultValue(this.material, e.material), this.outline = defaultValue(this.outline, e.outline), this.outlineColor = defaultValue(this.outlineColor, e.outlineColor), this.outlineWidth = defaultValue(this.outlineWidth, e.outlineWidth), this.shadows = defaultValue(this.shadows, e.shadows), this.distanceDisplayCondition = defaultValue( + this.distanceDisplayCondition, + e.distanceDisplayCondition + ); +}; +const ReferenceFrame = { + /** + * The fixed frame. + * + * @type {number} + * @constant + */ + FIXED: 0, + /** + * The inertial frame. + * + * @type {number} + * @constant + */ + INERTIAL: 1 +}, ReferenceFrame$1 = Object.freeze(ReferenceFrame); +function PositionProperty() { + DeveloperError.throwInstantiationError(); +} +Object.defineProperties(PositionProperty.prototype, { + /** + * Gets a value indicating if this property is constant. A property is considered + * constant if getValue always returns the same result for the current definition. + * @memberof PositionProperty.prototype + * + * @type {boolean} + * @readonly + */ + isConstant: { + get: DeveloperError.throwInstantiationError + }, + /** + * Gets the event that is raised whenever the definition of this property changes. + * The definition is considered to have changed if a call to getValue would return + * a different result for the same time. + * @memberof PositionProperty.prototype + * + * @type {Event} + * @readonly + */ + definitionChanged: { + get: DeveloperError.throwInstantiationError + }, + /** + * Gets the reference frame that the position is defined in. + * @memberof PositionProperty.prototype + * @type {ReferenceFrame} + */ + referenceFrame: { + get: DeveloperError.throwInstantiationError + } +}); +PositionProperty.prototype.getValue = DeveloperError.throwInstantiationError; +PositionProperty.prototype.getValueInReferenceFrame = DeveloperError.throwInstantiationError; +PositionProperty.prototype.equals = DeveloperError.throwInstantiationError; +const scratchMatrix3$2 = new Matrix3(); +PositionProperty.convertToReferenceFrame = function(e, t, n, i, r) { + if (!defined(t)) + return t; + if (defined(r) || (r = new Cartesian3()), n === i) + return Cartesian3.clone(t, r); + const o = Transforms.computeIcrfToCentralBodyFixedMatrix( + e, + scratchMatrix3$2 + ); + if (n === ReferenceFrame$1.INERTIAL) + return Matrix3.multiplyByVector(o, t, r); + if (n === ReferenceFrame$1.FIXED) + return Matrix3.multiplyByVector( + Matrix3.transpose(o, scratchMatrix3$2), + t, + r + ); +}; +function ConstantPositionProperty(e, t) { + this._definitionChanged = new Event(), this._value = Cartesian3.clone(e), this._referenceFrame = defaultValue(t, ReferenceFrame$1.FIXED); +} +Object.defineProperties(ConstantPositionProperty.prototype, { + /** + * Gets a value indicating if this property is constant. A property is considered + * constant if getValue always returns the same result for the current definition. + * @memberof ConstantPositionProperty.prototype + * + * @type {boolean} + * @readonly + */ + isConstant: { + get: function() { + return !defined(this._value) || this._referenceFrame === ReferenceFrame$1.FIXED; + } + }, + /** + * Gets the event that is raised whenever the definition of this property changes. + * The definition is considered to have changed if a call to getValue would return + * a different result for the same time. + * @memberof ConstantPositionProperty.prototype + * + * @type {Event} + * @readonly + */ + definitionChanged: { + get: function() { + return this._definitionChanged; + } + }, + /** + * Gets the reference frame in which the position is defined. + * @memberof ConstantPositionProperty.prototype + * @type {ReferenceFrame} + * @default ReferenceFrame.FIXED; + */ + referenceFrame: { + get: function() { + return this._referenceFrame; + } + } +}); +const timeScratch$o = new JulianDate(); +ConstantPositionProperty.prototype.getValue = function(e, t) { + return defined(e) || (e = JulianDate.now(timeScratch$o)), this.getValueInReferenceFrame(e, ReferenceFrame$1.FIXED, t); +}; +ConstantPositionProperty.prototype.setValue = function(e, t) { + let n = !1; + Cartesian3.equals(this._value, e) || (n = !0, this._value = Cartesian3.clone(e)), defined(t) && this._referenceFrame !== t && (n = !0, this._referenceFrame = t), n && this._definitionChanged.raiseEvent(this); +}; +ConstantPositionProperty.prototype.getValueInReferenceFrame = function(e, t, n) { + return PositionProperty.convertToReferenceFrame( + e, + this._value, + this._referenceFrame, + t, + n + ); +}; +ConstantPositionProperty.prototype.equals = function(e) { + return this === e || e instanceof ConstantPositionProperty && Cartesian3.equals(this._value, e._value) && this._referenceFrame === e._referenceFrame; +}; +function CorridorGraphics(e) { + this._definitionChanged = new Event(), this._show = void 0, this._showSubscription = void 0, this._positions = void 0, this._positionsSubscription = void 0, this._width = void 0, this._widthSubscription = void 0, this._height = void 0, this._heightSubscription = void 0, this._heightReference = void 0, this._heightReferenceSubscription = void 0, this._extrudedHeight = void 0, this._extrudedHeightSubscription = void 0, this._extrudedHeightReference = void 0, this._extrudedHeightReferenceSubscription = void 0, this._cornerType = void 0, this._cornerTypeSubscription = void 0, this._granularity = void 0, this._granularitySubscription = void 0, this._fill = void 0, this._fillSubscription = void 0, this._material = void 0, this._materialSubscription = void 0, this._outline = void 0, this._outlineSubscription = void 0, this._outlineColor = void 0, this._outlineColorSubscription = void 0, this._outlineWidth = void 0, this._outlineWidthSubscription = void 0, this._shadows = void 0, this._shadowsSubscription = void 0, this._distanceDisplayCondition = void 0, this._distanceDisplayConditionSubscription = void 0, this._classificationType = void 0, this._classificationTypeSubscription = void 0, this._zIndex = void 0, this._zIndexSubscription = void 0, this.merge(defaultValue(e, defaultValue.EMPTY_OBJECT)); +} +Object.defineProperties(CorridorGraphics.prototype, { + /** + * Gets the event that is raised whenever a property or sub-property is changed or modified. + * @memberof CorridorGraphics.prototype + * @type {Event} + * @readonly + */ + definitionChanged: { + get: function() { + return this._definitionChanged; + } + }, + /** + * Gets or sets the boolean Property specifying the visibility of the corridor. + * @memberof CorridorGraphics.prototype + * @type {Property|undefined} + * @default true + */ + show: createPropertyDescriptor("show"), + /** + * Gets or sets a Property specifying the array of {@link Cartesian3} positions that define the centerline of the corridor. + * @memberof CorridorGraphics.prototype + * @type {Property|undefined} + */ + positions: createPropertyDescriptor("positions"), + /** + * Gets or sets the numeric Property specifying the width of the outline. + * @memberof CorridorGraphics.prototype + * @type {Property|undefined} + */ + width: createPropertyDescriptor("width"), + /** + * Gets or sets the numeric Property specifying the altitude of the corridor. + * @memberof CorridorGraphics.prototype + * @type {Property|undefined} + * @default 0.0 + */ + height: createPropertyDescriptor("height"), + /** + * Gets or sets the Property specifying the {@link HeightReference}. + * @memberof CorridorGraphics.prototype + * @type {Property|undefined} + * @default HeightReference.NONE + */ + heightReference: createPropertyDescriptor("heightReference"), + /** + * Gets or sets the numeric Property specifying the altitude of the corridor extrusion. + * Setting this property creates a corridor shaped volume starting at height and ending + * at this altitude. + * @memberof CorridorGraphics.prototype + * @type {Property|undefined} + */ + extrudedHeight: createPropertyDescriptor("extrudedHeight"), + /** + * Gets or sets the Property specifying the extruded {@link HeightReference}. + * @memberof CorridorGraphics.prototype + * @type {Property|undefined} + * @default HeightReference.NONE + */ + extrudedHeightReference: createPropertyDescriptor("extrudedHeightReference"), + /** + * Gets or sets the {@link CornerType} Property specifying how corners are styled. + * @memberof CorridorGraphics.prototype + * @type {Property|undefined} + * @default CornerType.ROUNDED + */ + cornerType: createPropertyDescriptor("cornerType"), + /** + * Gets or sets the numeric Property specifying the sampling distance between each latitude and longitude point. + * @memberof CorridorGraphics.prototype + * @type {Property|undefined} + * @default {CesiumMath.RADIANS_PER_DEGREE} + */ + granularity: createPropertyDescriptor("granularity"), + /** + * Gets or sets the boolean Property specifying whether the corridor is filled with the provided material. + * @memberof CorridorGraphics.prototype + * @type {Property|undefined} + * @default true + */ + fill: createPropertyDescriptor("fill"), + /** + * Gets or sets the Property specifying the material used to fill the corridor. + * @memberof CorridorGraphics.prototype + * @type {MaterialProperty|undefined} + * @default Color.WHITE + */ + material: createMaterialPropertyDescriptor("material"), + /** + * Gets or sets the Property specifying whether the corridor is outlined. + * @memberof CorridorGraphics.prototype + * @type {Property|undefined} + * @default false + */ + outline: createPropertyDescriptor("outline"), + /** + * Gets or sets the Property specifying the {@link Color} of the outline. + * @memberof CorridorGraphics.prototype + * @type {Property|undefined} + * @default Color.BLACK + */ + outlineColor: createPropertyDescriptor("outlineColor"), + /** + * Gets or sets the numeric Property specifying the width of the outline. + *+ * Note: This property will be ignored on all major browsers on Windows platforms. For details, see (@link https://github.com/CesiumGS/cesium/issues/40}. + *
+ * @memberof CorridorGraphics.prototype + * @type {Property|undefined} + * @default 1.0 + */ + outlineWidth: createPropertyDescriptor("outlineWidth"), + /** + * Get or sets the enum Property specifying whether the corridor + * casts or receives shadows from light sources. + * @memberof CorridorGraphics.prototype + * @type {Property|undefined} + * @default ShadowMode.DISABLED + */ + shadows: createPropertyDescriptor("shadows"), + /** + * Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this corridor will be displayed. + * @memberof CorridorGraphics.prototype + * @type {Property|undefined} + */ + distanceDisplayCondition: createPropertyDescriptor( + "distanceDisplayCondition" + ), + /** + * Gets or sets the {@link ClassificationType} Property specifying whether this corridor will classify terrain, 3D Tiles, or both when on the ground. + * @memberof CorridorGraphics.prototype + * @type {Property|undefined} + * @default ClassificationType.BOTH + */ + classificationType: createPropertyDescriptor("classificationType"), + /** + * Gets or sets the zIndex Property specifying the ordering of the corridor. Only has an effect if the coridor is static and neither height or exturdedHeight are specified. + * @memberof CorridorGraphics.prototype + * @type {ConstantProperty|undefined} + * @default 0 + */ + zIndex: createPropertyDescriptor("zIndex") +}); +CorridorGraphics.prototype.clone = function(e) { + return defined(e) ? (e.show = this.show, e.positions = this.positions, e.width = this.width, e.height = this.height, e.heightReference = this.heightReference, e.extrudedHeight = this.extrudedHeight, e.extrudedHeightReference = this.extrudedHeightReference, e.cornerType = this.cornerType, e.granularity = this.granularity, e.fill = this.fill, e.material = this.material, e.outline = this.outline, e.outlineColor = this.outlineColor, e.outlineWidth = this.outlineWidth, e.shadows = this.shadows, e.distanceDisplayCondition = this.distanceDisplayCondition, e.classificationType = this.classificationType, e.zIndex = this.zIndex, e) : new CorridorGraphics(this); +}; +CorridorGraphics.prototype.merge = function(e) { + this.show = defaultValue(this.show, e.show), this.positions = defaultValue(this.positions, e.positions), this.width = defaultValue(this.width, e.width), this.height = defaultValue(this.height, e.height), this.heightReference = defaultValue( + this.heightReference, + e.heightReference + ), this.extrudedHeight = defaultValue( + this.extrudedHeight, + e.extrudedHeight + ), this.extrudedHeightReference = defaultValue( + this.extrudedHeightReference, + e.extrudedHeightReference + ), this.cornerType = defaultValue(this.cornerType, e.cornerType), this.granularity = defaultValue(this.granularity, e.granularity), this.fill = defaultValue(this.fill, e.fill), this.material = defaultValue(this.material, e.material), this.outline = defaultValue(this.outline, e.outline), this.outlineColor = defaultValue(this.outlineColor, e.outlineColor), this.outlineWidth = defaultValue(this.outlineWidth, e.outlineWidth), this.shadows = defaultValue(this.shadows, e.shadows), this.distanceDisplayCondition = defaultValue( + this.distanceDisplayCondition, + e.distanceDisplayCondition + ), this.classificationType = defaultValue( + this.classificationType, + e.classificationType + ), this.zIndex = defaultValue(this.zIndex, e.zIndex); +}; +function createRawProperty(e) { + return e; +} +function createRawPropertyDescriptor(e, t) { + return createPropertyDescriptor(e, t, createRawProperty); +} +function CylinderGraphics(e) { + this._definitionChanged = new Event(), this._show = void 0, this._showSubscription = void 0, this._length = void 0, this._lengthSubscription = void 0, this._topRadius = void 0, this._topRadiusSubscription = void 0, this._bottomRadius = void 0, this._bottomRadiusSubscription = void 0, this._heightReference = void 0, this._heightReferenceSubscription = void 0, this._fill = void 0, this._fillSubscription = void 0, this._material = void 0, this._materialSubscription = void 0, this._outline = void 0, this._outlineSubscription = void 0, this._outlineColor = void 0, this._outlineColorSubscription = void 0, this._outlineWidth = void 0, this._outlineWidthSubscription = void 0, this._numberOfVerticalLines = void 0, this._numberOfVerticalLinesSubscription = void 0, this._slices = void 0, this._slicesSubscription = void 0, this._shadows = void 0, this._shadowsSubscription = void 0, this._distanceDisplayCondition = void 0, this._distanceDisplayConditionSubscription = void 0, this.merge(defaultValue(e, defaultValue.EMPTY_OBJECT)); +} +Object.defineProperties(CylinderGraphics.prototype, { + /** + * Gets the event that is raised whenever a property or sub-property is changed or modified. + * @memberof CylinderGraphics.prototype + * + * @type {Event} + * @readonly + */ + definitionChanged: { + get: function() { + return this._definitionChanged; + } + }, + /** + * Gets or sets the boolean Property specifying the visibility of the cylinder. + * @memberof CylinderGraphics.prototype + * @type {Property|undefined} + * @default true + */ + show: createPropertyDescriptor("show"), + /** + * Gets or sets the numeric Property specifying the length of the cylinder. + * @memberof CylinderGraphics.prototype + * @type {Property|undefined} + */ + length: createPropertyDescriptor("length"), + /** + * Gets or sets the numeric Property specifying the radius of the top of the cylinder. + * @memberof CylinderGraphics.prototype + * @type {Property|undefined} + */ + topRadius: createPropertyDescriptor("topRadius"), + /** + * Gets or sets the numeric Property specifying the radius of the bottom of the cylinder. + * @memberof CylinderGraphics.prototype + * @type {Property|undefined} + */ + bottomRadius: createPropertyDescriptor("bottomRadius"), + /** + * Gets or sets the Property specifying the {@link HeightReference}. + * @memberof CylinderGraphics.prototype + * @type {Property|undefined} + * @default HeightReference.NONE + */ + heightReference: createPropertyDescriptor("heightReference"), + /** + * Gets or sets the boolean Property specifying whether the cylinder is filled with the provided material. + * @memberof CylinderGraphics.prototype + * @type {Property|undefined} + * @default true + */ + fill: createPropertyDescriptor("fill"), + /** + * Gets or sets the Property specifying the material used to fill the cylinder. + * @memberof CylinderGraphics.prototype + * @type {MaterialProperty|undefined} + * @default Color.WHITE + */ + material: createMaterialPropertyDescriptor("material"), + /** + * Gets or sets the boolean Property specifying whether the cylinder is outlined. + * @memberof CylinderGraphics.prototype + * @type {Property|undefined} + * @default false + */ + outline: createPropertyDescriptor("outline"), + /** + * Gets or sets the Property specifying the {@link Color} of the outline. + * @memberof CylinderGraphics.prototype + * @type {Property|undefined} + * @default Color.BLACK + */ + outlineColor: createPropertyDescriptor("outlineColor"), + /** + * Gets or sets the numeric Property specifying the width of the outline. + *+ * Note: This property will be ignored on all major browsers on Windows platforms. For details, see (@link https://github.com/CesiumGS/cesium/issues/40}. + *
+ * @memberof CylinderGraphics.prototype + * @type {Property|undefined} + * @default 1.0 + */ + outlineWidth: createPropertyDescriptor("outlineWidth"), + /** + * Gets or sets the Property specifying the number of vertical lines to draw along the perimeter for the outline. + * @memberof CylinderGraphics.prototype + * @type {Property|undefined} + * @default 16 + */ + numberOfVerticalLines: createPropertyDescriptor("numberOfVerticalLines"), + /** + * Gets or sets the Property specifying the number of edges around the perimeter of the cylinder. + * @memberof CylinderGraphics.prototype + * @type {Property|undefined} + * @default 128 + */ + slices: createPropertyDescriptor("slices"), + /** + * Get or sets the enum Property specifying whether the cylinder + * casts or receives shadows from light sources. + * @memberof CylinderGraphics.prototype + * @type {Property|undefined} + * @default ShadowMode.DISABLED + */ + shadows: createPropertyDescriptor("shadows"), + /** + * Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this cylinder will be displayed. + * @memberof CylinderGraphics.prototype + * @type {Property|undefined} + */ + distanceDisplayCondition: createPropertyDescriptor( + "distanceDisplayCondition" + ) +}); +CylinderGraphics.prototype.clone = function(e) { + return defined(e) ? (e.show = this.show, e.length = this.length, e.topRadius = this.topRadius, e.bottomRadius = this.bottomRadius, e.heightReference = this.heightReference, e.fill = this.fill, e.material = this.material, e.outline = this.outline, e.outlineColor = this.outlineColor, e.outlineWidth = this.outlineWidth, e.numberOfVerticalLines = this.numberOfVerticalLines, e.slices = this.slices, e.shadows = this.shadows, e.distanceDisplayCondition = this.distanceDisplayCondition, e) : new CylinderGraphics(this); +}; +CylinderGraphics.prototype.merge = function(e) { + this.show = defaultValue(this.show, e.show), this.length = defaultValue(this.length, e.length), this.topRadius = defaultValue(this.topRadius, e.topRadius), this.bottomRadius = defaultValue(this.bottomRadius, e.bottomRadius), this.heightReference = defaultValue( + this.heightReference, + e.heightReference + ), this.fill = defaultValue(this.fill, e.fill), this.material = defaultValue(this.material, e.material), this.outline = defaultValue(this.outline, e.outline), this.outlineColor = defaultValue(this.outlineColor, e.outlineColor), this.outlineWidth = defaultValue(this.outlineWidth, e.outlineWidth), this.numberOfVerticalLines = defaultValue( + this.numberOfVerticalLines, + e.numberOfVerticalLines + ), this.slices = defaultValue(this.slices, e.slices), this.shadows = defaultValue(this.shadows, e.shadows), this.distanceDisplayCondition = defaultValue( + this.distanceDisplayCondition, + e.distanceDisplayCondition + ); +}; +function EllipseGraphics(e) { + this._definitionChanged = new Event(), this._show = void 0, this._showSubscription = void 0, this._semiMajorAxis = void 0, this._semiMajorAxisSubscription = void 0, this._semiMinorAxis = void 0, this._semiMinorAxisSubscription = void 0, this._height = void 0, this._heightSubscription = void 0, this._heightReference = void 0, this._heightReferenceSubscription = void 0, this._extrudedHeight = void 0, this._extrudedHeightSubscription = void 0, this._extrudedHeightReference = void 0, this._extrudedHeightReferenceSubscription = void 0, this._rotation = void 0, this._rotationSubscription = void 0, this._stRotation = void 0, this._stRotationSubscription = void 0, this._granularity = void 0, this._granularitySubscription = void 0, this._fill = void 0, this._fillSubscription = void 0, this._material = void 0, this._materialSubscription = void 0, this._outline = void 0, this._outlineSubscription = void 0, this._outlineColor = void 0, this._outlineColorSubscription = void 0, this._outlineWidth = void 0, this._outlineWidthSubscription = void 0, this._numberOfVerticalLines = void 0, this._numberOfVerticalLinesSubscription = void 0, this._shadows = void 0, this._shadowsSubscription = void 0, this._distanceDisplayCondition = void 0, this._distanceDisplayConditionSubscription = void 0, this._classificationType = void 0, this._classificationTypeSubscription = void 0, this._zIndex = void 0, this._zIndexSubscription = void 0, this.merge(defaultValue(e, defaultValue.EMPTY_OBJECT)); +} +Object.defineProperties(EllipseGraphics.prototype, { + /** + * Gets the event that is raised whenever a property or sub-property is changed or modified. + * @memberof EllipseGraphics.prototype + * + * @type {Event} + * @readonly + */ + definitionChanged: { + get: function() { + return this._definitionChanged; + } + }, + /** + * Gets or sets the boolean Property specifying the visibility of the ellipse. + * @memberof EllipseGraphics.prototype + * @type {Property|undefined} + * @default true + */ + show: createPropertyDescriptor("show"), + /** + * Gets or sets the numeric Property specifying the semi-major axis. + * @memberof EllipseGraphics.prototype + * @type {Property|undefined} + */ + semiMajorAxis: createPropertyDescriptor("semiMajorAxis"), + /** + * Gets or sets the numeric Property specifying the semi-minor axis. + * @memberof EllipseGraphics.prototype + * @type {Property|undefined} + */ + semiMinorAxis: createPropertyDescriptor("semiMinorAxis"), + /** + * Gets or sets the numeric Property specifying the altitude of the ellipse. + * @memberof EllipseGraphics.prototype + * @type {Property|undefined} + * @default 0.0 + */ + height: createPropertyDescriptor("height"), + /** + * Gets or sets the Property specifying the {@link HeightReference}. + * @memberof EllipseGraphics.prototype + * @type {Property|undefined} + * @default HeightReference.NONE + */ + heightReference: createPropertyDescriptor("heightReference"), + /** + * Gets or sets the numeric Property specifying the altitude of the ellipse extrusion. + * Setting this property creates volume starting at height and ending at this altitude. + * @memberof EllipseGraphics.prototype + * @type {Property|undefined} + */ + extrudedHeight: createPropertyDescriptor("extrudedHeight"), + /** + * Gets or sets the Property specifying the extruded {@link HeightReference}. + * @memberof EllipseGraphics.prototype + * @type {Property|undefined} + * @default HeightReference.NONE + */ + extrudedHeightReference: createPropertyDescriptor("extrudedHeightReference"), + /** + * Gets or sets the numeric property specifying the rotation of the ellipse counter-clockwise from north. + * @memberof EllipseGraphics.prototype + * @type {Property|undefined} + * @default 0 + */ + rotation: createPropertyDescriptor("rotation"), + /** + * Gets or sets the numeric property specifying the rotation of the ellipse texture counter-clockwise from north. + * @memberof EllipseGraphics.prototype + * @type {Property|undefined} + * @default 0 + */ + stRotation: createPropertyDescriptor("stRotation"), + /** + * Gets or sets the numeric Property specifying the angular distance between points on the ellipse. + * @memberof EllipseGraphics.prototype + * @type {Property|undefined} + * @default {CesiumMath.RADIANS_PER_DEGREE} + */ + granularity: createPropertyDescriptor("granularity"), + /** + * Gets or sets the boolean Property specifying whether the ellipse is filled with the provided material. + * @memberof EllipseGraphics.prototype + * @type {Property|undefined} + * @default true + */ + fill: createPropertyDescriptor("fill"), + /** + * Gets or sets the Property specifying the material used to fill the ellipse. + * @memberof EllipseGraphics.prototype + * @type {MaterialProperty|undefined} + * @default Color.WHITE + */ + material: createMaterialPropertyDescriptor("material"), + /** + * Gets or sets the Property specifying whether the ellipse is outlined. + * @memberof EllipseGraphics.prototype + * @type {Property|undefined} + * @default false + */ + outline: createPropertyDescriptor("outline"), + /** + * Gets or sets the Property specifying the {@link Color} of the outline. + * @memberof EllipseGraphics.prototype + * @type {Property|undefined} + * @default Color.BLACK + */ + outlineColor: createPropertyDescriptor("outlineColor"), + /** + * Gets or sets the numeric Property specifying the width of the outline. + *+ * Note: This property will be ignored on all major browsers on Windows platforms. For details, see (@link https://github.com/CesiumGS/cesium/issues/40}. + *
+ * @memberof EllipseGraphics.prototype + * @type {Property|undefined} + * @default 1.0 + */ + outlineWidth: createPropertyDescriptor("outlineWidth"), + /** + * Gets or sets the numeric Property specifying the number of vertical lines to draw along the perimeter for the outline. + * @memberof EllipseGraphics.prototype + * @type {Property|undefined} + * @default 16 + */ + numberOfVerticalLines: createPropertyDescriptor("numberOfVerticalLines"), + /** + * Get or sets the enum Property specifying whether the ellipse + * casts or receives shadows from light sources. + * @memberof EllipseGraphics.prototype + * @type {Property|undefined} + * @default ShadowMode.DISABLED + */ + shadows: createPropertyDescriptor("shadows"), + /** + * Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this ellipse will be displayed. + * @memberof EllipseGraphics.prototype + * @type {Property|undefined} + */ + distanceDisplayCondition: createPropertyDescriptor( + "distanceDisplayCondition" + ), + /** + * Gets or sets the {@link ClassificationType} Property specifying whether this ellipse will classify terrain, 3D Tiles, or both when on the ground. + * @memberof EllipseGraphics.prototype + * @type {Property|undefined} + * @default ClassificationType.BOTH + */ + classificationType: createPropertyDescriptor("classificationType"), + /** + * Gets or sets the zIndex Property specifying the ellipse ordering. Only has an effect if the ellipse is constant and neither height or extrudedHeight are specified + * @memberof EllipseGraphics.prototype + * @type {ConstantProperty|undefined} + * @default 0 + */ + zIndex: createPropertyDescriptor("zIndex") +}); +EllipseGraphics.prototype.clone = function(e) { + return defined(e) ? (e.show = this.show, e.semiMajorAxis = this.semiMajorAxis, e.semiMinorAxis = this.semiMinorAxis, e.height = this.height, e.heightReference = this.heightReference, e.extrudedHeight = this.extrudedHeight, e.extrudedHeightReference = this.extrudedHeightReference, e.rotation = this.rotation, e.stRotation = this.stRotation, e.granularity = this.granularity, e.fill = this.fill, e.material = this.material, e.outline = this.outline, e.outlineColor = this.outlineColor, e.outlineWidth = this.outlineWidth, e.numberOfVerticalLines = this.numberOfVerticalLines, e.shadows = this.shadows, e.distanceDisplayCondition = this.distanceDisplayCondition, e.classificationType = this.classificationType, e.zIndex = this.zIndex, e) : new EllipseGraphics(this); +}; +EllipseGraphics.prototype.merge = function(e) { + this.show = defaultValue(this.show, e.show), this.semiMajorAxis = defaultValue(this.semiMajorAxis, e.semiMajorAxis), this.semiMinorAxis = defaultValue(this.semiMinorAxis, e.semiMinorAxis), this.height = defaultValue(this.height, e.height), this.heightReference = defaultValue( + this.heightReference, + e.heightReference + ), this.extrudedHeight = defaultValue( + this.extrudedHeight, + e.extrudedHeight + ), this.extrudedHeightReference = defaultValue( + this.extrudedHeightReference, + e.extrudedHeightReference + ), this.rotation = defaultValue(this.rotation, e.rotation), this.stRotation = defaultValue(this.stRotation, e.stRotation), this.granularity = defaultValue(this.granularity, e.granularity), this.fill = defaultValue(this.fill, e.fill), this.material = defaultValue(this.material, e.material), this.outline = defaultValue(this.outline, e.outline), this.outlineColor = defaultValue(this.outlineColor, e.outlineColor), this.outlineWidth = defaultValue(this.outlineWidth, e.outlineWidth), this.numberOfVerticalLines = defaultValue( + this.numberOfVerticalLines, + e.numberOfVerticalLines + ), this.shadows = defaultValue(this.shadows, e.shadows), this.distanceDisplayCondition = defaultValue( + this.distanceDisplayCondition, + e.distanceDisplayCondition + ), this.classificationType = defaultValue( + this.classificationType, + e.classificationType + ), this.zIndex = defaultValue(this.zIndex, e.zIndex); +}; +function EllipsoidGraphics(e) { + this._definitionChanged = new Event(), this._show = void 0, this._showSubscription = void 0, this._radii = void 0, this._radiiSubscription = void 0, this._innerRadii = void 0, this._innerRadiiSubscription = void 0, this._minimumClock = void 0, this._minimumClockSubscription = void 0, this._maximumClock = void 0, this._maximumClockSubscription = void 0, this._minimumCone = void 0, this._minimumConeSubscription = void 0, this._maximumCone = void 0, this._maximumConeSubscription = void 0, this._heightReference = void 0, this._heightReferenceSubscription = void 0, this._fill = void 0, this._fillSubscription = void 0, this._material = void 0, this._materialSubscription = void 0, this._outline = void 0, this._outlineSubscription = void 0, this._outlineColor = void 0, this._outlineColorSubscription = void 0, this._outlineWidth = void 0, this._outlineWidthSubscription = void 0, this._stackPartitions = void 0, this._stackPartitionsSubscription = void 0, this._slicePartitions = void 0, this._slicePartitionsSubscription = void 0, this._subdivisions = void 0, this._subdivisionsSubscription = void 0, this._shadows = void 0, this._shadowsSubscription = void 0, this._distanceDisplayCondition = void 0, this._distanceDisplayConditionSubscription = void 0, this.merge(defaultValue(e, defaultValue.EMPTY_OBJECT)); +} +Object.defineProperties(EllipsoidGraphics.prototype, { + /** + * Gets the event that is raised whenever a property or sub-property is changed or modified. + * @memberof EllipsoidGraphics.prototype + * + * @type {Event} + * @readonly + */ + definitionChanged: { + get: function() { + return this._definitionChanged; + } + }, + /** + * Gets or sets the boolean Property specifying the visibility of the ellipsoid. + * @memberof EllipsoidGraphics.prototype + * @type {Property|undefined} + * @default true + */ + show: createPropertyDescriptor("show"), + /** + * Gets or sets the {@link Cartesian3} {@link Property} specifying the radii of the ellipsoid. + * @memberof EllipsoidGraphics.prototype + * @type {Property|undefined} + */ + radii: createPropertyDescriptor("radii"), + /** + * Gets or sets the {@link Cartesian3} {@link Property} specifying the inner radii of the ellipsoid. + * @memberof EllipsoidGraphics.prototype + * @type {Property|undefined} + * @default radii + */ + innerRadii: createPropertyDescriptor("innerRadii"), + /** + * Gets or sets the Property specifying the minimum clock angle of the ellipsoid. + * @memberof EllipsoidGraphics.prototype + * @type {Property|undefined} + * @default 0.0 + */ + minimumClock: createPropertyDescriptor("minimumClock"), + /** + * Gets or sets the Property specifying the maximum clock angle of the ellipsoid. + * @memberof EllipsoidGraphics.prototype + * @type {Property|undefined} + * @default 2*PI + */ + maximumClock: createPropertyDescriptor("maximumClock"), + /** + * Gets or sets the Property specifying the minimum cone angle of the ellipsoid. + * @memberof EllipsoidGraphics.prototype + * @type {Property|undefined} + * @default 0.0 + */ + minimumCone: createPropertyDescriptor("minimumCone"), + /** + * Gets or sets the Property specifying the maximum cone angle of the ellipsoid. + * @memberof EllipsoidGraphics.prototype + * @type {Property|undefined} + * @default PI + */ + maximumCone: createPropertyDescriptor("maximumCone"), + /** + * Gets or sets the Property specifying the {@link HeightReference}. + * @memberof EllipsoidGraphics.prototype + * @type {Property|undefined} + * @default HeightReference.NONE + */ + heightReference: createPropertyDescriptor("heightReference"), + /** + * Gets or sets the boolean Property specifying whether the ellipsoid is filled with the provided material. + * @memberof EllipsoidGraphics.prototype + * @type {Property|undefined} + * @default true + */ + fill: createPropertyDescriptor("fill"), + /** + * Gets or sets the Property specifying the material used to fill the ellipsoid. + * @memberof EllipsoidGraphics.prototype + * @type {MaterialProperty} + * @default Color.WHITE + */ + material: createMaterialPropertyDescriptor("material"), + /** + * Gets or sets the Property specifying whether the ellipsoid is outlined. + * @memberof EllipsoidGraphics.prototype + * @type {Property|undefined} + * @default false + */ + outline: createPropertyDescriptor("outline"), + /** + * Gets or sets the Property specifying the {@link Color} of the outline. + * @memberof EllipsoidGraphics.prototype + * @type {Property|undefined} + * @default Color.BLACK + */ + outlineColor: createPropertyDescriptor("outlineColor"), + /** + * Gets or sets the numeric Property specifying the width of the outline. + *+ * Note: This property will be ignored on all major browsers on Windows platforms. For details, see (@link https://github.com/CesiumGS/cesium/issues/40}. + *
+ * @memberof EllipsoidGraphics.prototype + * @type {Property|undefined} + * @default 1.0 + */ + outlineWidth: createPropertyDescriptor("outlineWidth"), + /** + * Gets or sets the Property specifying the number of stacks. + * @memberof EllipsoidGraphics.prototype + * @type {Property|undefined} + * @default 64 + */ + stackPartitions: createPropertyDescriptor("stackPartitions"), + /** + * Gets or sets the Property specifying the number of radial slices per 360 degrees. + * @memberof EllipsoidGraphics.prototype + * @type {Property|undefined} + * @default 64 + */ + slicePartitions: createPropertyDescriptor("slicePartitions"), + /** + * Gets or sets the Property specifying the number of samples per outline ring, determining the granularity of the curvature. + * @memberof EllipsoidGraphics.prototype + * @type {Property|undefined} + * @default 128 + */ + subdivisions: createPropertyDescriptor("subdivisions"), + /** + * Get or sets the enum Property specifying whether the ellipsoid + * casts or receives shadows from light sources. + * @memberof EllipsoidGraphics.prototype + * @type {Property|undefined} + * @default ShadowMode.DISABLED + */ + shadows: createPropertyDescriptor("shadows"), + /** + * Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this ellipsoid will be displayed. + * @memberof EllipsoidGraphics.prototype + * @type {Property|undefined} + */ + distanceDisplayCondition: createPropertyDescriptor( + "distanceDisplayCondition" + ) +}); +EllipsoidGraphics.prototype.clone = function(e) { + return defined(e) ? (e.show = this.show, e.radii = this.radii, e.innerRadii = this.innerRadii, e.minimumClock = this.minimumClock, e.maximumClock = this.maximumClock, e.minimumCone = this.minimumCone, e.maximumCone = this.maximumCone, e.heightReference = this.heightReference, e.fill = this.fill, e.material = this.material, e.outline = this.outline, e.outlineColor = this.outlineColor, e.outlineWidth = this.outlineWidth, e.stackPartitions = this.stackPartitions, e.slicePartitions = this.slicePartitions, e.subdivisions = this.subdivisions, e.shadows = this.shadows, e.distanceDisplayCondition = this.distanceDisplayCondition, e) : new EllipsoidGraphics(this); +}; +EllipsoidGraphics.prototype.merge = function(e) { + this.show = defaultValue(this.show, e.show), this.radii = defaultValue(this.radii, e.radii), this.innerRadii = defaultValue(this.innerRadii, e.innerRadii), this.minimumClock = defaultValue(this.minimumClock, e.minimumClock), this.maximumClock = defaultValue(this.maximumClock, e.maximumClock), this.minimumCone = defaultValue(this.minimumCone, e.minimumCone), this.maximumCone = defaultValue(this.maximumCone, e.maximumCone), this.heightReference = defaultValue( + this.heightReference, + e.heightReference + ), this.fill = defaultValue(this.fill, e.fill), this.material = defaultValue(this.material, e.material), this.outline = defaultValue(this.outline, e.outline), this.outlineColor = defaultValue(this.outlineColor, e.outlineColor), this.outlineWidth = defaultValue(this.outlineWidth, e.outlineWidth), this.stackPartitions = defaultValue( + this.stackPartitions, + e.stackPartitions + ), this.slicePartitions = defaultValue( + this.slicePartitions, + e.slicePartitions + ), this.subdivisions = defaultValue(this.subdivisions, e.subdivisions), this.shadows = defaultValue(this.shadows, e.shadows), this.distanceDisplayCondition = defaultValue( + this.distanceDisplayCondition, + e.distanceDisplayCondition + ); +}; +function LabelGraphics(e) { + this._definitionChanged = new Event(), this._show = void 0, this._showSubscription = void 0, this._text = void 0, this._textSubscription = void 0, this._font = void 0, this._fontSubscription = void 0, this._style = void 0, this._styleSubscription = void 0, this._scale = void 0, this._scaleSubscription = void 0, this._showBackground = void 0, this._showBackgroundSubscription = void 0, this._backgroundColor = void 0, this._backgroundColorSubscription = void 0, this._backgroundPadding = void 0, this._backgroundPaddingSubscription = void 0, this._pixelOffset = void 0, this._pixelOffsetSubscription = void 0, this._eyeOffset = void 0, this._eyeOffsetSubscription = void 0, this._horizontalOrigin = void 0, this._horizontalOriginSubscription = void 0, this._verticalOrigin = void 0, this._verticalOriginSubscription = void 0, this._heightReference = void 0, this._heightReferenceSubscription = void 0, this._fillColor = void 0, this._fillColorSubscription = void 0, this._outlineColor = void 0, this._outlineColorSubscription = void 0, this._outlineWidth = void 0, this._outlineWidthSubscription = void 0, this._translucencyByDistance = void 0, this._translucencyByDistanceSubscription = void 0, this._pixelOffsetScaleByDistance = void 0, this._pixelOffsetScaleByDistanceSubscription = void 0, this._scaleByDistance = void 0, this._scaleByDistanceSubscription = void 0, this._distanceDisplayCondition = void 0, this._distanceDisplayConditionSubscription = void 0, this._disableDepthTestDistance = void 0, this._disableDepthTestDistanceSubscription = void 0, this.merge(defaultValue(e, defaultValue.EMPTY_OBJECT)); +} +Object.defineProperties(LabelGraphics.prototype, { + /** + * Gets the event that is raised whenever a property or sub-property is changed or modified. + * @memberof LabelGraphics.prototype + * + * @type {Event} + * @readonly + */ + definitionChanged: { + get: function() { + return this._definitionChanged; + } + }, + /** + * Gets or sets the boolean Property specifying the visibility of the label. + * @memberof LabelGraphics.prototype + * @type {Property|undefined} + */ + show: createPropertyDescriptor("show"), + /** + * Gets or sets the string Property specifying the text of the label. + * Explicit newlines '\n' are supported. + * @memberof LabelGraphics.prototype + * @type {Property|undefined} + */ + text: createPropertyDescriptor("text"), + /** + * Gets or sets the string Property specifying the font in CSS syntax. + * @memberof LabelGraphics.prototype + * @type {Property|undefined} + * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/font|CSS font on MDN} + */ + font: createPropertyDescriptor("font"), + /** + * Gets or sets the Property specifying the {@link LabelStyle}. + * @memberof LabelGraphics.prototype + * @type {Property|undefined} + */ + style: createPropertyDescriptor("style"), + /** + * Gets or sets the numeric Property specifying the uniform scale to apply to the image. + * A scale greater than1.0 enlarges the label while a scale less than 1.0 shrinks it.
+ * + *

0.5, 1.0,
+ * and 2.0.
+ * x increases from left to right, and y increases from top to bottom.
+ * + *
default |
+ * l.pixeloffset = new Cartesian2(25, 75); |
+ *
x points towards the viewer's
+ * right, y points up, and z points into the screen.
+ * + * An eye offset is commonly used to arrange multiple labels or objects at the same position, e.g., to + * arrange a label above its corresponding 3D model. + *
+ * Below, the label is positioned at the center of the Earth but an eye offset makes it always + * appear on top of the Earth regardless of the viewer's or Earth's orientation. + *+ *
![]() |
+ * ![]() |
+ *
l.eyeOffset = new Cartesian3(0.0, 8000000.0, 0.0);0.0,
+ * no minimum size is enforced.
+ * @memberof ModelGraphics.prototype
+ * @type {Property|undefined}
+ * @default 0.0
+ */
+ minimumPixelSize: createPropertyDescriptor("minimumPixelSize"),
+ /**
+ * Gets or sets the numeric Property specifying the maximum scale
+ * size of a model. This property is used as an upper limit for
+ * {@link ModelGraphics#minimumPixelSize}.
+ * @memberof ModelGraphics.prototype
+ * @type {Property|undefined}
+ */
+ maximumScale: createPropertyDescriptor("maximumScale"),
+ /**
+ * Get or sets the boolean Property specifying whether textures
+ * may continue to stream in after the model is loaded.
+ * @memberof ModelGraphics.prototype
+ * @type {Property|undefined}
+ */
+ incrementallyLoadTextures: createPropertyDescriptor(
+ "incrementallyLoadTextures"
+ ),
+ /**
+ * Gets or sets the boolean Property specifying if glTF animations should be run.
+ * @memberof ModelGraphics.prototype
+ * @type {Property|undefined}
+ * @default true
+ */
+ runAnimations: createPropertyDescriptor("runAnimations"),
+ /**
+ * Gets or sets the boolean Property specifying if glTF animations should hold the last pose for time durations with no keyframes.
+ * @memberof ModelGraphics.prototype
+ * @type {Property|undefined}
+ * @default true
+ */
+ clampAnimations: createPropertyDescriptor("clampAnimations"),
+ /**
+ * Get or sets the enum Property specifying whether the model
+ * casts or receives shadows from light sources.
+ * @memberof ModelGraphics.prototype
+ * @type {Property|undefined}
+ * @default ShadowMode.ENABLED
+ */
+ shadows: createPropertyDescriptor("shadows"),
+ /**
+ * Gets or sets the Property specifying the {@link HeightReference}.
+ * @memberof ModelGraphics.prototype
+ * @type {Property|undefined}
+ * @default HeightReference.NONE
+ */
+ heightReference: createPropertyDescriptor("heightReference"),
+ /**
+ * Gets or sets the Property specifying the {@link Color} of the silhouette.
+ * @memberof ModelGraphics.prototype
+ * @type {Property|undefined}
+ * @default Color.RED
+ */
+ silhouetteColor: createPropertyDescriptor("silhouetteColor"),
+ /**
+ * Gets or sets the numeric Property specifying the size of the silhouette in pixels.
+ * @memberof ModelGraphics.prototype
+ * @type {Property|undefined}
+ * @default 0.0
+ */
+ silhouetteSize: createPropertyDescriptor("silhouetteSize"),
+ /**
+ * Gets or sets the Property specifying the {@link Color} that blends with the model's rendered color.
+ * @memberof ModelGraphics.prototype
+ * @type {Property|undefined}
+ * @default Color.WHITE
+ */
+ color: createPropertyDescriptor("color"),
+ /**
+ * Gets or sets the enum Property specifying how the color blends with the model.
+ * @memberof ModelGraphics.prototype
+ * @type {Property|undefined}
+ * @default ColorBlendMode.HIGHLIGHT
+ */
+ colorBlendMode: createPropertyDescriptor("colorBlendMode"),
+ /**
+ * A numeric Property specifying the color strength when the colorBlendMode is MIX.
+ * A value of 0.0 results in the model's rendered color while a value of 1.0 results in a solid color, with
+ * any value in-between resulting in a mix of the two.
+ * @memberof ModelGraphics.prototype
+ * @type {Property|undefined}
+ * @default 0.5
+ */
+ colorBlendAmount: createPropertyDescriptor("colorBlendAmount"),
+ /**
+ * A property specifying the {@link Cartesian2} used to scale the diffuse and specular image-based lighting contribution to the final color.
+ * @memberof ModelGraphics.prototype
+ * @type {Property|undefined}
+ */
+ imageBasedLightingFactor: createPropertyDescriptor(
+ "imageBasedLightingFactor"
+ ),
+ /**
+ * A property specifying the {@link Cartesian3} light color when shading the model. When undefined the scene's light color is used instead.
+ * @memberOf ModelGraphics.prototype
+ * @type {Property|undefined}
+ */
+ lightColor: createPropertyDescriptor("lightColor"),
+ /**
+ * Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this model will be displayed.
+ * @memberof ModelGraphics.prototype
+ * @type {Property|undefined}
+ */
+ distanceDisplayCondition: createPropertyDescriptor(
+ "distanceDisplayCondition"
+ ),
+ /**
+ * Gets or sets the set of node transformations to apply to this model. This is represented as an {@link PropertyBag}, where keys are
+ * names of nodes, and values are {@link TranslationRotationScale} Properties describing the transformation to apply to that node.
+ * The transformation is applied after the node's existing transformation as specified in the glTF, and does not replace the node's existing transformation.
+ * @memberof ModelGraphics.prototype
+ * @type {PropertyBag}
+ */
+ nodeTransformations: createPropertyDescriptor(
+ "nodeTransformations",
+ void 0,
+ createNodeTransformationPropertyBag
+ ),
+ /**
+ * Gets or sets the set of articulation values to apply to this model. This is represented as an {@link PropertyBag}, where keys are
+ * composed as the name of the articulation, a single space, and the name of the stage.
+ * @memberof ModelGraphics.prototype
+ * @type {PropertyBag}
+ */
+ articulations: createPropertyDescriptor(
+ "articulations",
+ void 0,
+ createArticulationStagePropertyBag
+ ),
+ /**
+ * A property specifying the {@link ClippingPlaneCollection} used to selectively disable rendering the model.
+ * @memberof ModelGraphics.prototype
+ * @type {Property|undefined}
+ */
+ clippingPlanes: createPropertyDescriptor("clippingPlanes"),
+ /**
+ * Gets or sets the {@link CustomShader} to apply to this model. When undefined, no custom shader code is used.
+ * @memberof ModelGraphics.prototype
+ * @type {Property|undefined}
+ */
+ customShader: createPropertyDescriptor("customShader")
+});
+ModelGraphics.prototype.clone = function(e) {
+ return defined(e) ? (e.show = this.show, e.uri = this.uri, e.scale = this.scale, e.minimumPixelSize = this.minimumPixelSize, e.maximumScale = this.maximumScale, e.incrementallyLoadTextures = this.incrementallyLoadTextures, e.runAnimations = this.runAnimations, e.clampAnimations = this.clampAnimations, e.heightReference = this._heightReference, e.silhouetteColor = this.silhouetteColor, e.silhouetteSize = this.silhouetteSize, e.color = this.color, e.colorBlendMode = this.colorBlendMode, e.colorBlendAmount = this.colorBlendAmount, e.imageBasedLightingFactor = this.imageBasedLightingFactor, e.lightColor = this.lightColor, e.distanceDisplayCondition = this.distanceDisplayCondition, e.nodeTransformations = this.nodeTransformations, e.articulations = this.articulations, e.clippingPlanes = this.clippingPlanes, e.customShader = this.customShader, e) : new ModelGraphics(this);
+};
+ModelGraphics.prototype.merge = function(e) {
+ this.show = defaultValue(this.show, e.show), this.uri = defaultValue(this.uri, e.uri), this.scale = defaultValue(this.scale, e.scale), this.minimumPixelSize = defaultValue(
+ this.minimumPixelSize,
+ e.minimumPixelSize
+ ), this.maximumScale = defaultValue(this.maximumScale, e.maximumScale), this.incrementallyLoadTextures = defaultValue(
+ this.incrementallyLoadTextures,
+ e.incrementallyLoadTextures
+ ), this.runAnimations = defaultValue(this.runAnimations, e.runAnimations), this.clampAnimations = defaultValue(
+ this.clampAnimations,
+ e.clampAnimations
+ ), this.shadows = defaultValue(this.shadows, e.shadows), this.heightReference = defaultValue(
+ this.heightReference,
+ e.heightReference
+ ), this.silhouetteColor = defaultValue(
+ this.silhouetteColor,
+ e.silhouetteColor
+ ), this.silhouetteSize = defaultValue(
+ this.silhouetteSize,
+ e.silhouetteSize
+ ), this.color = defaultValue(this.color, e.color), this.colorBlendMode = defaultValue(
+ this.colorBlendMode,
+ e.colorBlendMode
+ ), this.colorBlendAmount = defaultValue(
+ this.colorBlendAmount,
+ e.colorBlendAmount
+ ), this.imageBasedLightingFactor = defaultValue(
+ this.imageBasedLightingFactor,
+ e.imageBasedLightingFactor
+ ), this.lightColor = defaultValue(this.lightColor, e.lightColor), this.distanceDisplayCondition = defaultValue(
+ this.distanceDisplayCondition,
+ e.distanceDisplayCondition
+ ), this.clippingPlanes = defaultValue(
+ this.clippingPlanes,
+ e.clippingPlanes
+ ), this.customShader = defaultValue(this.customShader, e.customShader);
+ const t = e.nodeTransformations;
+ if (defined(t)) {
+ const i = this.nodeTransformations;
+ defined(i) ? i.merge(t) : this.nodeTransformations = new PropertyBag(
+ t,
+ createNodeTransformationProperty
+ );
+ }
+ const n = e.articulations;
+ if (defined(n)) {
+ const i = this.articulations;
+ defined(i) ? i.merge(n) : this.articulations = new PropertyBag(n);
+ }
+};
+function Cesium3DTilesetGraphics(e) {
+ this._definitionChanged = new Event(), this._show = void 0, this._showSubscription = void 0, this._uri = void 0, this._uriSubscription = void 0, this._maximumScreenSpaceError = void 0, this._maximumScreenSpaceErrorSubscription = void 0, this.merge(defaultValue(e, defaultValue.EMPTY_OBJECT));
+}
+Object.defineProperties(Cesium3DTilesetGraphics.prototype, {
+ /**
+ * Gets the event that is raised whenever a property or sub-property is changed or modified.
+ * @memberof Cesium3DTilesetGraphics.prototype
+ * @type {Event}
+ * @readonly
+ */
+ definitionChanged: {
+ get: function() {
+ return this._definitionChanged;
+ }
+ },
+ /**
+ * Gets or sets the boolean Property specifying the visibility of the model.
+ * @memberof Cesium3DTilesetGraphics.prototype
+ * @type {Property|undefined}
+ * @default true
+ */
+ show: createPropertyDescriptor("show"),
+ /**
+ * Gets or sets the string Property specifying the URI of the glTF asset.
+ * @memberof Cesium3DTilesetGraphics.prototype
+ * @type {Property|undefined}
+ */
+ uri: createPropertyDescriptor("uri"),
+ /**
+ * Gets or sets the maximum screen space error used to drive level of detail refinement.
+ * @memberof Cesium3DTilesetGraphics.prototype
+ * @type {Property|undefined}
+ */
+ maximumScreenSpaceError: createPropertyDescriptor("maximumScreenSpaceError")
+});
+Cesium3DTilesetGraphics.prototype.clone = function(e) {
+ return defined(e) ? (e.show = this.show, e.uri = this.uri, e.maximumScreenSpaceError = this.maximumScreenSpaceError, e) : new Cesium3DTilesetGraphics(this);
+};
+Cesium3DTilesetGraphics.prototype.merge = function(e) {
+ this.show = defaultValue(this.show, e.show), this.uri = defaultValue(this.uri, e.uri), this.maximumScreenSpaceError = defaultValue(
+ this.maximumScreenSpaceError,
+ e.maximumScreenSpaceError
+ );
+};
+function PathGraphics(e) {
+ this._definitionChanged = new Event(), this._show = void 0, this._showSubscription = void 0, this._leadTime = void 0, this._leadTimeSubscription = void 0, this._trailTime = void 0, this._trailTimeSubscription = void 0, this._width = void 0, this._widthSubscription = void 0, this._resolution = void 0, this._resolutionSubscription = void 0, this._material = void 0, this._materialSubscription = void 0, this._distanceDisplayCondition = void 0, this._distanceDisplayConditionSubscription = void 0, this.merge(defaultValue(e, defaultValue.EMPTY_OBJECT));
+}
+Object.defineProperties(PathGraphics.prototype, {
+ /**
+ * Gets the event that is raised whenever a property or sub-property is changed or modified.
+ * @memberof PathGraphics.prototype
+ * @type {Event}
+ * @readonly
+ */
+ definitionChanged: {
+ get: function() {
+ return this._definitionChanged;
+ }
+ },
+ /**
+ * Gets or sets the boolean Property specifying the visibility of the path.
+ * @memberof PathGraphics.prototype
+ * @type {Property|undefined}
+ * @default true
+ */
+ show: createPropertyDescriptor("show"),
+ /**
+ * Gets or sets the Property specifying the number of seconds in front of the object to show.
+ * @memberof PathGraphics.prototype
+ * @type {Property|undefined}
+ */
+ leadTime: createPropertyDescriptor("leadTime"),
+ /**
+ * Gets or sets the Property specifying the number of seconds behind the object to show.
+ * @memberof PathGraphics.prototype
+ * @type {Property|undefined}
+ */
+ trailTime: createPropertyDescriptor("trailTime"),
+ /**
+ * Gets or sets the numeric Property specifying the width in pixels.
+ * @memberof PathGraphics.prototype
+ * @type {Property|undefined}
+ * @default 1.0
+ */
+ width: createPropertyDescriptor("width"),
+ /**
+ * Gets or sets the Property specifying the maximum number of seconds to step when sampling the position.
+ * @memberof PathGraphics.prototype
+ * @type {Property|undefined}
+ * @default 60
+ */
+ resolution: createPropertyDescriptor("resolution"),
+ /**
+ * Gets or sets the Property specifying the material used to draw the path.
+ * @memberof PathGraphics.prototype
+ * @type {MaterialProperty}
+ * @default Color.WHITE
+ */
+ material: createMaterialPropertyDescriptor("material"),
+ /**
+ * Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this path will be displayed.
+ * @memberof PathGraphics.prototype
+ * @type {Property|undefined}
+ */
+ distanceDisplayCondition: createPropertyDescriptor(
+ "distanceDisplayCondition"
+ )
+});
+PathGraphics.prototype.clone = function(e) {
+ return defined(e) ? (e.show = this.show, e.leadTime = this.leadTime, e.trailTime = this.trailTime, e.width = this.width, e.resolution = this.resolution, e.material = this.material, e.distanceDisplayCondition = this.distanceDisplayCondition, e) : new PathGraphics(this);
+};
+PathGraphics.prototype.merge = function(e) {
+ this.show = defaultValue(this.show, e.show), this.leadTime = defaultValue(this.leadTime, e.leadTime), this.trailTime = defaultValue(this.trailTime, e.trailTime), this.width = defaultValue(this.width, e.width), this.resolution = defaultValue(this.resolution, e.resolution), this.material = defaultValue(this.material, e.material), this.distanceDisplayCondition = defaultValue(
+ this.distanceDisplayCondition,
+ e.distanceDisplayCondition
+ );
+};
+function PlaneGraphics(e) {
+ this._definitionChanged = new Event(), this._show = void 0, this._showSubscription = void 0, this._plane = void 0, this._planeSubscription = void 0, this._dimensions = void 0, this._dimensionsSubscription = void 0, this._fill = void 0, this._fillSubscription = void 0, this._material = void 0, this._materialSubscription = void 0, this._outline = void 0, this._outlineSubscription = void 0, this._outlineColor = void 0, this._outlineColorSubscription = void 0, this._outlineWidth = void 0, this._outlineWidthSubscription = void 0, this._shadows = void 0, this._shadowsSubscription = void 0, this._distanceDisplayCondition = void 0, this._distanceDisplayConditionSubscription = void 0, this.merge(defaultValue(e, defaultValue.EMPTY_OBJECT));
+}
+Object.defineProperties(PlaneGraphics.prototype, {
+ /**
+ * Gets the event that is raised whenever a property or sub-property is changed or modified.
+ * @memberof PlaneGraphics.prototype
+ * @type {Event}
+ * @readonly
+ */
+ definitionChanged: {
+ get: function() {
+ return this._definitionChanged;
+ }
+ },
+ /**
+ * Gets or sets the boolean Property specifying the visibility of the plane.
+ * @memberof PlaneGraphics.prototype
+ * @type {Property|undefined}
+ * @default true
+ */
+ show: createPropertyDescriptor("show"),
+ /**
+ * Gets or sets the {@link Plane} Property specifying the normal and distance of the plane.
+ *
+ * @memberof PlaneGraphics.prototype
+ * @type {Property|undefined}
+ */
+ plane: createPropertyDescriptor("plane"),
+ /**
+ * Gets or sets the {@link Cartesian2} Property specifying the width and height of the plane.
+ *
+ * @memberof PlaneGraphics.prototype
+ * @type {Property|undefined}
+ */
+ dimensions: createPropertyDescriptor("dimensions"),
+ /**
+ * Gets or sets the boolean Property specifying whether the plane is filled with the provided material.
+ * @memberof PlaneGraphics.prototype
+ * @type {Property|undefined}
+ * @default true
+ */
+ fill: createPropertyDescriptor("fill"),
+ /**
+ * Gets or sets the material used to fill the plane.
+ * @memberof PlaneGraphics.prototype
+ * @type {MaterialProperty}
+ * @default Color.WHITE
+ */
+ material: createMaterialPropertyDescriptor("material"),
+ /**
+ * Gets or sets the Property specifying whether the plane is outlined.
+ * @memberof PlaneGraphics.prototype
+ * @type {Property|undefined}
+ * @default false
+ */
+ outline: createPropertyDescriptor("outline"),
+ /**
+ * Gets or sets the Property specifying the {@link Color} of the outline.
+ * @memberof PlaneGraphics.prototype
+ * @type {Property|undefined}
+ * @default Color.BLACK
+ */
+ outlineColor: createPropertyDescriptor("outlineColor"),
+ /**
+ * Gets or sets the numeric Property specifying the width of the outline.
+ * + * Note: This property will be ignored on all major browsers on Windows platforms. For details, see (@link https://github.com/CesiumGS/cesium/issues/40}. + *
+ * @memberof PlaneGraphics.prototype + * @type {Property|undefined} + * @default 1.0 + */ + outlineWidth: createPropertyDescriptor("outlineWidth"), + /** + * Get or sets the enum Property specifying whether the plane + * casts or receives shadows from light sources. + * @memberof PlaneGraphics.prototype + * @type {Property|undefined} + * @default ShadowMode.DISABLED + */ + shadows: createPropertyDescriptor("shadows"), + /** + * Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this plane will be displayed. + * @memberof PlaneGraphics.prototype + * @type {Property|undefined} + */ + distanceDisplayCondition: createPropertyDescriptor( + "distanceDisplayCondition" + ) +}); +PlaneGraphics.prototype.clone = function(e) { + return defined(e) ? (e.show = this.show, e.plane = this.plane, e.dimensions = this.dimensions, e.fill = this.fill, e.material = this.material, e.outline = this.outline, e.outlineColor = this.outlineColor, e.outlineWidth = this.outlineWidth, e.shadows = this.shadows, e.distanceDisplayCondition = this.distanceDisplayCondition, e) : new PlaneGraphics(this); +}; +PlaneGraphics.prototype.merge = function(e) { + this.show = defaultValue(this.show, e.show), this.plane = defaultValue(this.plane, e.plane), this.dimensions = defaultValue(this.dimensions, e.dimensions), this.fill = defaultValue(this.fill, e.fill), this.material = defaultValue(this.material, e.material), this.outline = defaultValue(this.outline, e.outline), this.outlineColor = defaultValue(this.outlineColor, e.outlineColor), this.outlineWidth = defaultValue(this.outlineWidth, e.outlineWidth), this.shadows = defaultValue(this.shadows, e.shadows), this.distanceDisplayCondition = defaultValue( + this.distanceDisplayCondition, + e.distanceDisplayCondition + ); +}; +function PointGraphics(e) { + this._definitionChanged = new Event(), this._show = void 0, this._showSubscription = void 0, this._pixelSize = void 0, this._pixelSizeSubscription = void 0, this._heightReference = void 0, this._heightReferenceSubscription = void 0, this._color = void 0, this._colorSubscription = void 0, this._outlineColor = void 0, this._outlineColorSubscription = void 0, this._outlineWidth = void 0, this._outlineWidthSubscription = void 0, this._scaleByDistance = void 0, this._scaleByDistanceSubscription = void 0, this._translucencyByDistance = void 0, this._translucencyByDistanceSubscription = void 0, this._distanceDisplayCondition = void 0, this._distanceDisplayConditionSubscription = void 0, this._disableDepthTestDistance = void 0, this._disableDepthTestDistanceSubscription = void 0, this._splitDirection = void 0, this._splitDirectionSubscription = void 0, this.merge(defaultValue(e, defaultValue.EMPTY_OBJECT)); +} +Object.defineProperties(PointGraphics.prototype, { + /** + * Gets the event that is raised whenever a property or sub-property is changed or modified. + * @memberof PointGraphics.prototype + * + * @type {Event} + * @readonly + */ + definitionChanged: { + get: function() { + return this._definitionChanged; + } + }, + /** + * Gets or sets the boolean Property specifying the visibility of the point. + * @memberof PointGraphics.prototype + * @type {Property|undefined} + * @default true + */ + show: createPropertyDescriptor("show"), + /** + * Gets or sets the numeric Property specifying the size in pixels. + * @memberof PointGraphics.prototype + * @type {Property|undefined} + * @default 1 + */ + pixelSize: createPropertyDescriptor("pixelSize"), + /** + * Gets or sets the Property specifying the {@link HeightReference}. + * @memberof PointGraphics.prototype + * @type {Property|undefined} + * @default HeightReference.NONE + */ + heightReference: createPropertyDescriptor("heightReference"), + /** + * Gets or sets the Property specifying the {@link Color} of the point. + * @memberof PointGraphics.prototype + * @type {Property|undefined} + * @default Color.WHITE + */ + color: createPropertyDescriptor("color"), + /** + * Gets or sets the Property specifying the {@link Color} of the outline. + * @memberof PointGraphics.prototype + * @type {Property|undefined} + * @default Color.BLACK + */ + outlineColor: createPropertyDescriptor("outlineColor"), + /** + * Gets or sets the numeric Property specifying the the outline width in pixels. + * @memberof PointGraphics.prototype + * @type {Property|undefined} + * @default 0 + */ + outlineWidth: createPropertyDescriptor("outlineWidth"), + /** + * Gets or sets the {@link NearFarScalar} Property used to scale the point based on distance. + * If undefined, a constant size is used. + * @memberof PointGraphics.prototype + * @type {Property|undefined} + */ + scaleByDistance: createPropertyDescriptor("scaleByDistance"), + /** + * Gets or sets {@link NearFarScalar} Property specifying the translucency of the point based on the distance from the camera. + * A point's translucency will interpolate between the {@link NearFarScalar#nearValue} and + * {@link NearFarScalar#farValue} while the camera distance falls within the lower and upper bounds + * of the specified {@link NearFarScalar#near} and {@link NearFarScalar#far}. + * Outside of these ranges the points's translucency remains clamped to the nearest bound. + * @memberof PointGraphics.prototype + * @type {Property|undefined} + */ + translucencyByDistance: createPropertyDescriptor("translucencyByDistance"), + /** + * Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this point will be displayed. + * @memberof PointGraphics.prototype + * @type {Property|undefined} + */ + distanceDisplayCondition: createPropertyDescriptor( + "distanceDisplayCondition" + ), + /** + * Gets or sets the distance from the camera at which to disable the depth test to, for example, prevent clipping against terrain. + * When set to zero, the depth test is always applied. When set to Number.POSITIVE_INFINITY, the depth test is never applied. + * @memberof PointGraphics.prototype + * @type {Property|undefined} + */ + disableDepthTestDistance: createPropertyDescriptor( + "disableDepthTestDistance" + ), + /** + * Gets or sets the Property specifying the {@link SplitDirection} of this point. + * @memberof PointGraphics.prototype + * @type {Property|undefined} + * @default SplitDirection.NONE + */ + splitDirection: createPropertyDescriptor("splitDirection") +}); +PointGraphics.prototype.clone = function(e) { + return defined(e) ? (e.show = this.show, e.pixelSize = this.pixelSize, e.heightReference = this.heightReference, e.color = this.color, e.outlineColor = this.outlineColor, e.outlineWidth = this.outlineWidth, e.scaleByDistance = this.scaleByDistance, e.translucencyByDistance = this._translucencyByDistance, e.distanceDisplayCondition = this.distanceDisplayCondition, e.disableDepthTestDistance = this.disableDepthTestDistance, e.splitDirection = this.splitDirection, e) : new PointGraphics(this); +}; +PointGraphics.prototype.merge = function(e) { + this.show = defaultValue(this.show, e.show), this.pixelSize = defaultValue(this.pixelSize, e.pixelSize), this.heightReference = defaultValue( + this.heightReference, + e.heightReference + ), this.color = defaultValue(this.color, e.color), this.outlineColor = defaultValue(this.outlineColor, e.outlineColor), this.outlineWidth = defaultValue(this.outlineWidth, e.outlineWidth), this.scaleByDistance = defaultValue( + this.scaleByDistance, + e.scaleByDistance + ), this.translucencyByDistance = defaultValue( + this._translucencyByDistance, + e.translucencyByDistance + ), this.distanceDisplayCondition = defaultValue( + this.distanceDisplayCondition, + e.distanceDisplayCondition + ), this.disableDepthTestDistance = defaultValue( + this.disableDepthTestDistance, + e.disableDepthTestDistance + ), this.splitDirection = defaultValue( + this.splitDirection, + e.splitDirection + ); +}; +function PolygonHierarchy(e, t) { + this.positions = defined(e) ? e : [], this.holes = defined(t) ? t : []; +} +function createPolygonHierarchyProperty(e) { + return Array.isArray(e) && (e = new PolygonHierarchy(e)), new ConstantProperty(e); +} +function PolygonGraphics(e) { + this._definitionChanged = new Event(), this._show = void 0, this._showSubscription = void 0, this._hierarchy = void 0, this._hierarchySubscription = void 0, this._height = void 0, this._heightSubscription = void 0, this._heightReference = void 0, this._heightReferenceSubscription = void 0, this._extrudedHeight = void 0, this._extrudedHeightSubscription = void 0, this._extrudedHeightReference = void 0, this._extrudedHeightReferenceSubscription = void 0, this._stRotation = void 0, this._stRotationSubscription = void 0, this._granularity = void 0, this._granularitySubscription = void 0, this._fill = void 0, this._fillSubscription = void 0, this._material = void 0, this._materialSubscription = void 0, this._outline = void 0, this._outlineSubscription = void 0, this._outlineColor = void 0, this._outlineColorSubscription = void 0, this._outlineWidth = void 0, this._outlineWidthSubscription = void 0, this._perPositionHeight = void 0, this._perPositionHeightSubscription = void 0, this._closeTop = void 0, this._closeTopSubscription = void 0, this._closeBottom = void 0, this._closeBottomSubscription = void 0, this._arcType = void 0, this._arcTypeSubscription = void 0, this._shadows = void 0, this._shadowsSubscription = void 0, this._distanceDisplayCondition = void 0, this._distanceDisplayConditionSubscription = void 0, this._classificationType = void 0, this._classificationTypeSubscription = void 0, this._zIndex = void 0, this._zIndexSubscription = void 0, this._textureCoordinates = void 0, this._textureCoordinatesSubscription = void 0, this.merge(defaultValue(e, defaultValue.EMPTY_OBJECT)); +} +Object.defineProperties(PolygonGraphics.prototype, { + /** + * Gets the event that is raised whenever a property or sub-property is changed or modified. + * @memberof PolygonGraphics.prototype + * + * @type {Event} + * @readonly + */ + definitionChanged: { + get: function() { + return this._definitionChanged; + } + }, + /** + * Gets or sets the boolean Property specifying the visibility of the polygon. + * @memberof PolygonGraphics.prototype + * @type {Property|undefined} + * @default true + */ + show: createPropertyDescriptor("show"), + /** + * Gets or sets the Property specifying the {@link PolygonHierarchy}. + * @memberof PolygonGraphics.prototype + * @type {Property|undefined} + */ + hierarchy: createPropertyDescriptor( + "hierarchy", + void 0, + createPolygonHierarchyProperty + ), + /** + * Gets or sets the numeric Property specifying the constant altitude of the polygon. + * @memberof PolygonGraphics.prototype + * @type {Property|undefined} + * @default 0.0 + */ + height: createPropertyDescriptor("height"), + /** + * Gets or sets the Property specifying the {@link HeightReference}. + * @memberof PolygonGraphics.prototype + * @type {Property|undefined} + * @default HeightReference.NONE + */ + heightReference: createPropertyDescriptor("heightReference"), + /** + * Gets or sets the numeric Property specifying the altitude of the polygon extrusion. + * If {@link PolygonGraphics#perPositionHeight} is false, the volume starts at {@link PolygonGraphics#height} and ends at this altitude. + * If {@link PolygonGraphics#perPositionHeight} is true, the volume starts at the height of each {@link PolygonGraphics#hierarchy} position and ends at this altitude. + * @memberof PolygonGraphics.prototype + * @type {Property|undefined} + */ + extrudedHeight: createPropertyDescriptor("extrudedHeight"), + /** + * Gets or sets the Property specifying the extruded {@link HeightReference}. + * @memberof PolygonGraphics.prototype + * @type {Property|undefined} + * @default HeightReference.NONE + */ + extrudedHeightReference: createPropertyDescriptor("extrudedHeightReference"), + /** + * Gets or sets the numeric property specifying the rotation of the polygon texture counter-clockwise from north. Only has an effect if textureCoordinates is not defined. + * @memberof PolygonGraphics.prototype + * @type {Property|undefined} + * @default 0 + */ + stRotation: createPropertyDescriptor("stRotation"), + /** + * Gets or sets the numeric Property specifying the angular distance between points on the polygon. + * @memberof PolygonGraphics.prototype + * @type {Property|undefined} + * @default {CesiumMath.RADIANS_PER_DEGREE} + */ + granularity: createPropertyDescriptor("granularity"), + /** + * Gets or sets the boolean Property specifying whether the polygon is filled with the provided material. + * @memberof PolygonGraphics.prototype + * @type {Property|undefined} + * @default true + */ + fill: createPropertyDescriptor("fill"), + /** + * Gets or sets the Property specifying the material used to fill the polygon. + * @memberof PolygonGraphics.prototype + * @type {MaterialProperty} + * @default Color.WHITE + */ + material: createMaterialPropertyDescriptor("material"), + /** + * Gets or sets the Property specifying whether the polygon is outlined. + * @memberof PolygonGraphics.prototype + * @type {Property|undefined} + * @default false + */ + outline: createPropertyDescriptor("outline"), + /** + * Gets or sets the Property specifying the {@link Color} of the outline. + * @memberof PolygonGraphics.prototype + * @type {Property|undefined} + * @default Color.BLACK + */ + outlineColor: createPropertyDescriptor("outlineColor"), + /** + * Gets or sets the numeric Property specifying the width of the outline. + *+ * Note: This property will be ignored on all major browsers on Windows platforms. For details, see (@link https://github.com/CesiumGS/cesium/issues/40}. + *
+ * @memberof PolygonGraphics.prototype + * @type {Property|undefined} + * @default 1.0 + */ + outlineWidth: createPropertyDescriptor("outlineWidth"), + /** + * Gets or sets the boolean specifying whether or not the the height of each position is used. + * If true, the shape will have non-uniform altitude defined by the height of each {@link PolygonGraphics#hierarchy} position. + * If false, the shape will have a constant altitude as specified by {@link PolygonGraphics#height}. + * @memberof PolygonGraphics.prototype + * @type {Property|undefined} + */ + perPositionHeight: createPropertyDescriptor("perPositionHeight"), + /** + * Gets or sets a boolean specifying whether or not the top of an extruded polygon is included. + * @memberof PolygonGraphics.prototype + * @type {Property|undefined} + */ + closeTop: createPropertyDescriptor("closeTop"), + /** + * Gets or sets a boolean specifying whether or not the bottom of an extruded polygon is included. + * @memberof PolygonGraphics.prototype + * @type {Property|undefined} + */ + closeBottom: createPropertyDescriptor("closeBottom"), + /** + * Gets or sets the {@link ArcType} Property specifying the type of lines the polygon edges use. + * @memberof PolygonGraphics.prototype + * @type {Property|undefined} + * @default ArcType.GEODESIC + */ + arcType: createPropertyDescriptor("arcType"), + /** + * Get or sets the enum Property specifying whether the polygon + * casts or receives shadows from light sources. + * @memberof PolygonGraphics.prototype + * @type {Property|undefined} + * @default ShadowMode.DISABLED + */ + shadows: createPropertyDescriptor("shadows"), + /** + * Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this polygon will be displayed. + * @memberof PolygonGraphics.prototype + * @type {Property|undefined} + */ + distanceDisplayCondition: createPropertyDescriptor( + "distanceDisplayCondition" + ), + /** + * Gets or sets the {@link ClassificationType} Property specifying whether this polygon will classify terrain, 3D Tiles, or both when on the ground. + * @memberof PolygonGraphics.prototype + * @type {Property|undefined} + * @default ClassificationType.BOTH + */ + classificationType: createPropertyDescriptor("classificationType"), + /** + * Gets or sets the zIndex Prperty specifying the ordering of ground geometry. Only has an effect if the polygon is constant and neither height or extrudedHeight are specified. + * @memberof PolygonGraphics.prototype + * @type {ConstantProperty|undefined} + * @default 0 + */ + zIndex: createPropertyDescriptor("zIndex"), + /** + * A Property specifying texture coordinates as a {@link PolygonHierarchy} of {@link Cartesian2} points. Has no effect for ground primitives. + * @memberof PolygonGraphics.prototype + * @type {Property|undefined} + */ + textureCoordinates: createPropertyDescriptor("textureCoordinates") +}); +PolygonGraphics.prototype.clone = function(e) { + return defined(e) ? (e.show = this.show, e.hierarchy = this.hierarchy, e.height = this.height, e.heightReference = this.heightReference, e.extrudedHeight = this.extrudedHeight, e.extrudedHeightReference = this.extrudedHeightReference, e.stRotation = this.stRotation, e.granularity = this.granularity, e.fill = this.fill, e.material = this.material, e.outline = this.outline, e.outlineColor = this.outlineColor, e.outlineWidth = this.outlineWidth, e.perPositionHeight = this.perPositionHeight, e.closeTop = this.closeTop, e.closeBottom = this.closeBottom, e.arcType = this.arcType, e.shadows = this.shadows, e.distanceDisplayCondition = this.distanceDisplayCondition, e.classificationType = this.classificationType, e.zIndex = this.zIndex, e.textureCoordinates = this.textureCoordinates, e) : new PolygonGraphics(this); +}; +PolygonGraphics.prototype.merge = function(e) { + this.show = defaultValue(this.show, e.show), this.hierarchy = defaultValue(this.hierarchy, e.hierarchy), this.height = defaultValue(this.height, e.height), this.heightReference = defaultValue( + this.heightReference, + e.heightReference + ), this.extrudedHeight = defaultValue( + this.extrudedHeight, + e.extrudedHeight + ), this.extrudedHeightReference = defaultValue( + this.extrudedHeightReference, + e.extrudedHeightReference + ), this.stRotation = defaultValue(this.stRotation, e.stRotation), this.granularity = defaultValue(this.granularity, e.granularity), this.fill = defaultValue(this.fill, e.fill), this.material = defaultValue(this.material, e.material), this.outline = defaultValue(this.outline, e.outline), this.outlineColor = defaultValue(this.outlineColor, e.outlineColor), this.outlineWidth = defaultValue(this.outlineWidth, e.outlineWidth), this.perPositionHeight = defaultValue( + this.perPositionHeight, + e.perPositionHeight + ), this.closeTop = defaultValue(this.closeTop, e.closeTop), this.closeBottom = defaultValue(this.closeBottom, e.closeBottom), this.arcType = defaultValue(this.arcType, e.arcType), this.shadows = defaultValue(this.shadows, e.shadows), this.distanceDisplayCondition = defaultValue( + this.distanceDisplayCondition, + e.distanceDisplayCondition + ), this.classificationType = defaultValue( + this.classificationType, + e.classificationType + ), this.zIndex = defaultValue(this.zIndex, e.zIndex), this.textureCoordinates = defaultValue( + this.textureCoordinates, + e.textureCoordinates + ); +}; +function PolylineGraphics(e) { + this._definitionChanged = new Event(), this._show = void 0, this._showSubscription = void 0, this._positions = void 0, this._positionsSubscription = void 0, this._width = void 0, this._widthSubscription = void 0, this._granularity = void 0, this._granularitySubscription = void 0, this._material = void 0, this._materialSubscription = void 0, this._depthFailMaterial = void 0, this._depthFailMaterialSubscription = void 0, this._arcType = void 0, this._arcTypeSubscription = void 0, this._clampToGround = void 0, this._clampToGroundSubscription = void 0, this._shadows = void 0, this._shadowsSubscription = void 0, this._distanceDisplayCondition = void 0, this._distanceDisplayConditionSubscription = void 0, this._classificationType = void 0, this._classificationTypeSubscription = void 0, this._zIndex = void 0, this._zIndexSubscription = void 0, this.merge(defaultValue(e, defaultValue.EMPTY_OBJECT)); +} +Object.defineProperties(PolylineGraphics.prototype, { + /** + * Gets the event that is raised whenever a property or sub-property is changed or modified. + * @memberof PolylineGraphics.prototype + * + * @type {Event} + * @readonly + */ + definitionChanged: { + get: function() { + return this._definitionChanged; + } + }, + /** + * Gets or sets the boolean Property specifying the visibility of the polyline. + * @memberof PolylineGraphics.prototype + * @type {Property|undefined} + * @default true + */ + show: createPropertyDescriptor("show"), + /** + * Gets or sets the Property specifying the array of {@link Cartesian3} + * positions that define the line strip. + * @memberof PolylineGraphics.prototype + * @type {Property|undefined} + */ + positions: createPropertyDescriptor("positions"), + /** + * Gets or sets the numeric Property specifying the width in pixels. + * @memberof PolylineGraphics.prototype + * @type {Property|undefined} + * @default 1.0 + */ + width: createPropertyDescriptor("width"), + /** + * Gets or sets the numeric Property specifying the angular distance between each latitude and longitude if arcType is not ArcType.NONE and clampToGround is false. + * @memberof PolylineGraphics.prototype + * @type {Property|undefined} + * @default Cesium.Math.RADIANS_PER_DEGREE + */ + granularity: createPropertyDescriptor("granularity"), + /** + * Gets or sets the Property specifying the material used to draw the polyline. + * @memberof PolylineGraphics.prototype + * @type {MaterialProperty} + * @default Color.WHITE + */ + material: createMaterialPropertyDescriptor("material"), + /** + * Gets or sets the Property specifying the material used to draw the polyline when it fails the depth test. + *+ * Requires the EXT_frag_depth WebGL extension to render properly. If the extension is not supported, + * there may be artifacts. + *
+ * @memberof PolylineGraphics.prototype + * @type {MaterialProperty} + * @default undefined + */ + depthFailMaterial: createMaterialPropertyDescriptor("depthFailMaterial"), + /** + * Gets or sets the {@link ArcType} Property specifying whether the line segments should be great arcs, rhumb lines or linearly connected. + * @memberof PolylineGraphics.prototype + * @type {Property|undefined} + * @default ArcType.GEODESIC + */ + arcType: createPropertyDescriptor("arcType"), + /** + * Gets or sets the boolean Property specifying whether the polyline + * should be clamped to the ground. + * @memberof PolylineGraphics.prototype + * @type {Property|undefined} + * @default false + */ + clampToGround: createPropertyDescriptor("clampToGround"), + /** + * Get or sets the enum Property specifying whether the polyline + * casts or receives shadows from light sources. + * @memberof PolylineGraphics.prototype + * @type {Property|undefined} + * @default ShadowMode.DISABLED + */ + shadows: createPropertyDescriptor("shadows"), + /** + * Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this polyline will be displayed. + * @memberof PolylineGraphics.prototype + * @type {Property|undefined} + */ + distanceDisplayCondition: createPropertyDescriptor( + "distanceDisplayCondition" + ), + /** + * Gets or sets the {@link ClassificationType} Property specifying whether this polyline will classify terrain, 3D Tiles, or both when on the ground. + * @memberof PolylineGraphics.prototype + * @type {Property|undefined} + * @default ClassificationType.BOTH + */ + classificationType: createPropertyDescriptor("classificationType"), + /** + * Gets or sets the zIndex Property specifying the ordering of the polyline. Only has an effect if `clampToGround` is true and polylines on terrain is supported. + * @memberof PolylineGraphics.prototype + * @type {ConstantProperty|undefined} + * @default 0 + */ + zIndex: createPropertyDescriptor("zIndex") +}); +PolylineGraphics.prototype.clone = function(e) { + return defined(e) ? (e.show = this.show, e.positions = this.positions, e.width = this.width, e.granularity = this.granularity, e.material = this.material, e.depthFailMaterial = this.depthFailMaterial, e.arcType = this.arcType, e.clampToGround = this.clampToGround, e.shadows = this.shadows, e.distanceDisplayCondition = this.distanceDisplayCondition, e.classificationType = this.classificationType, e.zIndex = this.zIndex, e) : new PolylineGraphics(this); +}; +PolylineGraphics.prototype.merge = function(e) { + this.show = defaultValue(this.show, e.show), this.positions = defaultValue(this.positions, e.positions), this.width = defaultValue(this.width, e.width), this.granularity = defaultValue(this.granularity, e.granularity), this.material = defaultValue(this.material, e.material), this.depthFailMaterial = defaultValue( + this.depthFailMaterial, + e.depthFailMaterial + ), this.arcType = defaultValue(this.arcType, e.arcType), this.clampToGround = defaultValue(this.clampToGround, e.clampToGround), this.shadows = defaultValue(this.shadows, e.shadows), this.distanceDisplayCondition = defaultValue( + this.distanceDisplayCondition, + e.distanceDisplayCondition + ), this.classificationType = defaultValue( + this.classificationType, + e.classificationType + ), this.zIndex = defaultValue(this.zIndex, e.zIndex); +}; +function PolylineVolumeGraphics(e) { + this._definitionChanged = new Event(), this._show = void 0, this._showSubscription = void 0, this._positions = void 0, this._positionsSubscription = void 0, this._shape = void 0, this._shapeSubscription = void 0, this._cornerType = void 0, this._cornerTypeSubscription = void 0, this._granularity = void 0, this._granularitySubscription = void 0, this._fill = void 0, this._fillSubscription = void 0, this._material = void 0, this._materialSubscription = void 0, this._outline = void 0, this._outlineSubscription = void 0, this._outlineColor = void 0, this._outlineColorSubscription = void 0, this._outlineWidth = void 0, this._outlineWidthSubscription = void 0, this._shadows = void 0, this._shadowsSubscription = void 0, this._distanceDisplayCondition = void 0, this._distanceDisplayConditionSubsription = void 0, this.merge(defaultValue(e, defaultValue.EMPTY_OBJECT)); +} +Object.defineProperties(PolylineVolumeGraphics.prototype, { + /** + * Gets the event that is raised whenever a property or sub-property is changed or modified. + * @memberof PolylineVolumeGraphics.prototype + * + * @type {Event} + * @readonly + */ + definitionChanged: { + get: function() { + return this._definitionChanged; + } + }, + /** + * Gets or sets the boolean Property specifying the visibility of the volume. + * @memberof PolylineVolumeGraphics.prototype + * @type {Property|undefined} + * @default true + */ + show: createPropertyDescriptor("show"), + /** + * Gets or sets the Property specifying the array of {@link Cartesian3} positions which define the line strip. + * @memberof PolylineVolumeGraphics.prototype + * @type {Property|undefined} + */ + positions: createPropertyDescriptor("positions"), + /** + * Gets or sets the Property specifying the array of {@link Cartesian2} positions which define the shape to be extruded. + * @memberof PolylineVolumeGraphics.prototype + * @type {Property|undefined} + */ + shape: createPropertyDescriptor("shape"), + /** + * Gets or sets the {@link CornerType} Property specifying the style of the corners. + * @memberof PolylineVolumeGraphics.prototype + * @type {Property|undefined} + * @default CornerType.ROUNDED + */ + cornerType: createPropertyDescriptor("cornerType"), + /** + * Gets or sets the numeric Property specifying the angular distance between points on the volume. + * @memberof PolylineVolumeGraphics.prototype + * @type {Property|undefined} + * @default {CesiumMath.RADIANS_PER_DEGREE} + */ + granularity: createPropertyDescriptor("granularity"), + /** + * Gets or sets the boolean Property specifying whether the volume is filled with the provided material. + * @memberof PolylineVolumeGraphics.prototype + * @type {Property|undefined} + * @default true + */ + fill: createPropertyDescriptor("fill"), + /** + * Gets or sets the Property specifying the material used to fill the volume. + * @memberof PolylineVolumeGraphics.prototype + * @type {MaterialProperty} + * @default Color.WHITE + */ + material: createMaterialPropertyDescriptor("material"), + /** + * Gets or sets the Property specifying whether the volume is outlined. + * @memberof PolylineVolumeGraphics.prototype + * @type {Property|undefined} + * @default false + */ + outline: createPropertyDescriptor("outline"), + /** + * Gets or sets the Property specifying the {@link Color} of the outline. + * @memberof PolylineVolumeGraphics.prototype + * @type {Property|undefined} + * @default Color.BLACK + */ + outlineColor: createPropertyDescriptor("outlineColor"), + /** + * Gets or sets the numeric Property specifying the width of the outline. + *+ * Note: This property will be ignored on all major browsers on Windows platforms. For details, see (@link https://github.com/CesiumGS/cesium/issues/40}. + *
+ * @memberof PolylineVolumeGraphics.prototype + * @type {Property|undefined} + * @default 1.0 + */ + outlineWidth: createPropertyDescriptor("outlineWidth"), + /** + * Get or sets the enum Property specifying whether the volume + * casts or receives shadows from light sources. + * @memberof PolylineVolumeGraphics.prototype + * @type {Property|undefined} + * @default ShadowMode.DISABLED + */ + shadows: createPropertyDescriptor("shadows"), + /** + * Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this volume will be displayed. + * @memberof PolylineVolumeGraphics.prototype + * @type {Property|undefined} + */ + distanceDisplayCondition: createPropertyDescriptor( + "distanceDisplayCondition" + ) +}); +PolylineVolumeGraphics.prototype.clone = function(e) { + return defined(e) ? (e.show = this.show, e.positions = this.positions, e.shape = this.shape, e.cornerType = this.cornerType, e.granularity = this.granularity, e.fill = this.fill, e.material = this.material, e.outline = this.outline, e.outlineColor = this.outlineColor, e.outlineWidth = this.outlineWidth, e.shadows = this.shadows, e.distanceDisplayCondition = this.distanceDisplayCondition, e) : new PolylineVolumeGraphics(this); +}; +PolylineVolumeGraphics.prototype.merge = function(e) { + this.show = defaultValue(this.show, e.show), this.positions = defaultValue(this.positions, e.positions), this.shape = defaultValue(this.shape, e.shape), this.cornerType = defaultValue(this.cornerType, e.cornerType), this.granularity = defaultValue(this.granularity, e.granularity), this.fill = defaultValue(this.fill, e.fill), this.material = defaultValue(this.material, e.material), this.outline = defaultValue(this.outline, e.outline), this.outlineColor = defaultValue(this.outlineColor, e.outlineColor), this.outlineWidth = defaultValue(this.outlineWidth, e.outlineWidth), this.shadows = defaultValue(this.shadows, e.shadows), this.distanceDisplayCondition = defaultValue( + this.distanceDisplayCondition, + e.distanceDisplayCondition + ); +}; +function RectangleGraphics(e) { + this._definitionChanged = new Event(), this._show = void 0, this._showSubscription = void 0, this._coordinates = void 0, this._coordinatesSubscription = void 0, this._height = void 0, this._heightSubscription = void 0, this._heightReference = void 0, this._heightReferenceSubscription = void 0, this._extrudedHeight = void 0, this._extrudedHeightSubscription = void 0, this._extrudedHeightReference = void 0, this._extrudedHeightReferenceSubscription = void 0, this._rotation = void 0, this._rotationSubscription = void 0, this._stRotation = void 0, this._stRotationSubscription = void 0, this._granularity = void 0, this._granularitySubscription = void 0, this._fill = void 0, this._fillSubscription = void 0, this._material = void 0, this._materialSubscription = void 0, this._outline = void 0, this._outlineSubscription = void 0, this._outlineColor = void 0, this._outlineColorSubscription = void 0, this._outlineWidth = void 0, this._outlineWidthSubscription = void 0, this._shadows = void 0, this._shadowsSubscription = void 0, this._distanceDisplayCondition = void 0, this._distancedisplayConditionSubscription = void 0, this._classificationType = void 0, this._classificationTypeSubscription = void 0, this._zIndex = void 0, this._zIndexSubscription = void 0, this.merge(defaultValue(e, defaultValue.EMPTY_OBJECT)); +} +Object.defineProperties(RectangleGraphics.prototype, { + /** + * Gets the event that is raised whenever a property or sub-property is changed or modified. + * @memberof RectangleGraphics.prototype + * + * @type {Event} + * @readonly + */ + definitionChanged: { + get: function() { + return this._definitionChanged; + } + }, + /** + * Gets or sets the boolean Property specifying the visibility of the rectangle. + * @memberof RectangleGraphics.prototype + * @type {Property|undefined} + * @default true + */ + show: createPropertyDescriptor("show"), + /** + * Gets or sets the Property specifying the {@link Rectangle}. + * @memberof RectangleGraphics.prototype + * @type {Property|undefined} + */ + coordinates: createPropertyDescriptor("coordinates"), + /** + * Gets or sets the numeric Property specifying the altitude of the rectangle. + * @memberof RectangleGraphics.prototype + * @type {Property|undefined} + * @default 0.0 + */ + height: createPropertyDescriptor("height"), + /** + * Gets or sets the Property specifying the {@link HeightReference}. + * @memberof RectangleGraphics.prototype + * @type {Property|undefined} + * @default HeightReference.NONE + */ + heightReference: createPropertyDescriptor("heightReference"), + /** + * Gets or sets the numeric Property specifying the altitude of the rectangle extrusion. + * Setting this property creates volume starting at height and ending at this altitude. + * @memberof RectangleGraphics.prototype + * @type {Property|undefined} + */ + extrudedHeight: createPropertyDescriptor("extrudedHeight"), + /** + * Gets or sets the Property specifying the extruded {@link HeightReference}. + * @memberof RectangleGraphics.prototype + * @type {Property|undefined} + * @default HeightReference.NONE + */ + extrudedHeightReference: createPropertyDescriptor("extrudedHeightReference"), + /** + * Gets or sets the numeric property specifying the rotation of the rectangle clockwise from north. + * @memberof RectangleGraphics.prototype + * @type {Property|undefined} + * @default 0 + */ + rotation: createPropertyDescriptor("rotation"), + /** + * Gets or sets the numeric property specifying the rotation of the rectangle texture counter-clockwise from north. + * @memberof RectangleGraphics.prototype + * @type {Property|undefined} + * @default 0 + */ + stRotation: createPropertyDescriptor("stRotation"), + /** + * Gets or sets the numeric Property specifying the angular distance between points on the rectangle. + * @memberof RectangleGraphics.prototype + * @type {Property|undefined} + * @default {CesiumMath.RADIANS_PER_DEGREE} + */ + granularity: createPropertyDescriptor("granularity"), + /** + * Gets or sets the boolean Property specifying whether the rectangle is filled with the provided material. + * @memberof RectangleGraphics.prototype + * @type {Property|undefined} + * @default true + */ + fill: createPropertyDescriptor("fill"), + /** + * Gets or sets the Property specifying the material used to fill the rectangle. + * @memberof RectangleGraphics.prototype + * @type {MaterialProperty} + * @default Color.WHITE + */ + material: createMaterialPropertyDescriptor("material"), + /** + * Gets or sets the Property specifying whether the rectangle is outlined. + * @memberof RectangleGraphics.prototype + * @type {Property|undefined} + * @default false + */ + outline: createPropertyDescriptor("outline"), + /** + * Gets or sets the Property specifying the {@link Color} of the outline. + * @memberof RectangleGraphics.prototype + * @type {Property|undefined} + * @default Color.BLACK + */ + outlineColor: createPropertyDescriptor("outlineColor"), + /** + * Gets or sets the numeric Property specifying the width of the outline. + *+ * Note: This property will be ignored on all major browsers on Windows platforms. For details, see (@link https://github.com/CesiumGS/cesium/issues/40}. + *
+ * @memberof RectangleGraphics.prototype + * @type {Property|undefined} + * @default 1.0 + */ + outlineWidth: createPropertyDescriptor("outlineWidth"), + /** + * Get or sets the enum Property specifying whether the rectangle + * casts or receives shadows from light sources. + * @memberof RectangleGraphics.prototype + * @type {Property|undefined} + * @default ShadowMode.DISABLED + */ + shadows: createPropertyDescriptor("shadows"), + /** + * Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this rectangle will be displayed. + * @memberof RectangleGraphics.prototype + * @type {Property|undefined} + */ + distanceDisplayCondition: createPropertyDescriptor( + "distanceDisplayCondition" + ), + /** + * Gets or sets the {@link ClassificationType} Property specifying whether this rectangle will classify terrain, 3D Tiles, or both when on the ground. + * @memberof RectangleGraphics.prototype + * @type {Property|undefined} + * @default ClassificationType.BOTH + */ + classificationType: createPropertyDescriptor("classificationType"), + /** + * Gets or sets the zIndex Property specifying the ordering of the rectangle. Only has an effect if the rectangle is constant and neither height or extrudedHeight are specified. + * @memberof RectangleGraphics.prototype + * @type {ConstantProperty|undefined} + * @default 0 + */ + zIndex: createPropertyDescriptor("zIndex") +}); +RectangleGraphics.prototype.clone = function(e) { + return defined(e) ? (e.show = this.show, e.coordinates = this.coordinates, e.height = this.height, e.heightReference = this.heightReference, e.extrudedHeight = this.extrudedHeight, e.extrudedHeightReference = this.extrudedHeightReference, e.rotation = this.rotation, e.stRotation = this.stRotation, e.granularity = this.granularity, e.fill = this.fill, e.material = this.material, e.outline = this.outline, e.outlineColor = this.outlineColor, e.outlineWidth = this.outlineWidth, e.shadows = this.shadows, e.distanceDisplayCondition = this.distanceDisplayCondition, e.classificationType = this.classificationType, e.zIndex = this.zIndex, e) : new RectangleGraphics(this); +}; +RectangleGraphics.prototype.merge = function(e) { + this.show = defaultValue(this.show, e.show), this.coordinates = defaultValue(this.coordinates, e.coordinates), this.height = defaultValue(this.height, e.height), this.heightReference = defaultValue( + this.heightReference, + e.heightReference + ), this.extrudedHeight = defaultValue( + this.extrudedHeight, + e.extrudedHeight + ), this.extrudedHeightReference = defaultValue( + this.extrudedHeightReference, + e.extrudedHeightReference + ), this.rotation = defaultValue(this.rotation, e.rotation), this.stRotation = defaultValue(this.stRotation, e.stRotation), this.granularity = defaultValue(this.granularity, e.granularity), this.fill = defaultValue(this.fill, e.fill), this.material = defaultValue(this.material, e.material), this.outline = defaultValue(this.outline, e.outline), this.outlineColor = defaultValue(this.outlineColor, e.outlineColor), this.outlineWidth = defaultValue(this.outlineWidth, e.outlineWidth), this.shadows = defaultValue(this.shadows, e.shadows), this.distanceDisplayCondition = defaultValue( + this.distanceDisplayCondition, + e.distanceDisplayCondition + ), this.classificationType = defaultValue( + this.classificationType, + e.classificationType + ), this.zIndex = defaultValue(this.zIndex, e.zIndex); +}; +function WallGraphics(e) { + this._definitionChanged = new Event(), this._show = void 0, this._showSubscription = void 0, this._positions = void 0, this._positionsSubscription = void 0, this._minimumHeights = void 0, this._minimumHeightsSubscription = void 0, this._maximumHeights = void 0, this._maximumHeightsSubscription = void 0, this._granularity = void 0, this._granularitySubscription = void 0, this._fill = void 0, this._fillSubscription = void 0, this._material = void 0, this._materialSubscription = void 0, this._outline = void 0, this._outlineSubscription = void 0, this._outlineColor = void 0, this._outlineColorSubscription = void 0, this._outlineWidth = void 0, this._outlineWidthSubscription = void 0, this._shadows = void 0, this._shadowsSubscription = void 0, this._distanceDisplayCondition = void 0, this._distanceDisplayConditionSubscription = void 0, this.merge(defaultValue(e, defaultValue.EMPTY_OBJECT)); +} +Object.defineProperties(WallGraphics.prototype, { + /** + * Gets the event that is raised whenever a property or sub-property is changed or modified. + * @memberof WallGraphics.prototype + * + * @type {Event} + * @readonly + */ + definitionChanged: { + get: function() { + return this._definitionChanged; + } + }, + /** + * Gets or sets the boolean Property specifying the visibility of the wall. + * @memberof WallGraphics.prototype + * @type {Property|undefined} + * @default true + */ + show: createPropertyDescriptor("show"), + /** + * Gets or sets the Property specifying the array of {@link Cartesian3} positions which define the top of the wall. + * @memberof WallGraphics.prototype + * @type {Property|undefined} + */ + positions: createPropertyDescriptor("positions"), + /** + * Gets or sets the Property specifying an array of heights to be used for the bottom of the wall instead of the surface of the globe. + * If defined, the array must be the same length as {@link Wall#positions}. + * @memberof WallGraphics.prototype + * @type {Property|undefined} + */ + minimumHeights: createPropertyDescriptor("minimumHeights"), + /** + * Gets or sets the Property specifying an array of heights to be used for the top of the wall instead of the height of each position. + * If defined, the array must be the same length as {@link Wall#positions}. + * @memberof WallGraphics.prototype + * @type {Property|undefined} + */ + maximumHeights: createPropertyDescriptor("maximumHeights"), + /** + * Gets or sets the numeric Property specifying the angular distance between points on the wall. + * @memberof WallGraphics.prototype + * @type {Property|undefined} + * @default {CesiumMath.RADIANS_PER_DEGREE} + */ + granularity: createPropertyDescriptor("granularity"), + /** + * Gets or sets the boolean Property specifying whether the wall is filled with the provided material. + * @memberof WallGraphics.prototype + * @type {Property|undefined} + * @default true + */ + fill: createPropertyDescriptor("fill"), + /** + * Gets or sets the Property specifying the material used to fill the wall. + * @memberof WallGraphics.prototype + * @type {MaterialProperty} + * @default Color.WHITE + */ + material: createMaterialPropertyDescriptor("material"), + /** + * Gets or sets the Property specifying whether the wall is outlined. + * @memberof WallGraphics.prototype + * @type {Property|undefined} + * @default false + */ + outline: createPropertyDescriptor("outline"), + /** + * Gets or sets the Property specifying the {@link Color} of the outline. + * @memberof WallGraphics.prototype + * @type {Property|undefined} + * @default Color.BLACK + */ + outlineColor: createPropertyDescriptor("outlineColor"), + /** + * Gets or sets the numeric Property specifying the width of the outline. + *+ * Note: This property will be ignored on all major browsers on Windows platforms. For details, see (@link https://github.com/CesiumGS/cesium/issues/40}. + *
+ * @memberof WallGraphics.prototype + * @type {Property|undefined} + * @default 1.0 + */ + outlineWidth: createPropertyDescriptor("outlineWidth"), + /** + * Get or sets the enum Property specifying whether the wall + * casts or receives shadows from light sources. + * @memberof WallGraphics.prototype + * @type {Property|undefined} + * @default ShadowMode.DISABLED + */ + shadows: createPropertyDescriptor("shadows"), + /** + * Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this wall will be displayed. + * @memberof WallGraphics.prototype + * @type {Property|undefined} + */ + distanceDisplayCondition: createPropertyDescriptor( + "distanceDisplayCondition" + ) +}); +WallGraphics.prototype.clone = function(e) { + return defined(e) ? (e.show = this.show, e.positions = this.positions, e.minimumHeights = this.minimumHeights, e.maximumHeights = this.maximumHeights, e.granularity = this.granularity, e.fill = this.fill, e.material = this.material, e.outline = this.outline, e.outlineColor = this.outlineColor, e.outlineWidth = this.outlineWidth, e.shadows = this.shadows, e.distanceDisplayCondition = this.distanceDisplayCondition, e) : new WallGraphics(this); +}; +WallGraphics.prototype.merge = function(e) { + this.show = defaultValue(this.show, e.show), this.positions = defaultValue(this.positions, e.positions), this.minimumHeights = defaultValue( + this.minimumHeights, + e.minimumHeights + ), this.maximumHeights = defaultValue( + this.maximumHeights, + e.maximumHeights + ), this.granularity = defaultValue(this.granularity, e.granularity), this.fill = defaultValue(this.fill, e.fill), this.material = defaultValue(this.material, e.material), this.outline = defaultValue(this.outline, e.outline), this.outlineColor = defaultValue(this.outlineColor, e.outlineColor), this.outlineWidth = defaultValue(this.outlineWidth, e.outlineWidth), this.shadows = defaultValue(this.shadows, e.shadows), this.distanceDisplayCondition = defaultValue( + this.distanceDisplayCondition, + e.distanceDisplayCondition + ); +}; +const cartoScratch$2 = new Cartographic(), ExtraPropertyNames = []; +function createConstantPositionProperty(e) { + return new ConstantPositionProperty(e); +} +function createPositionPropertyDescriptor(e) { + return createPropertyDescriptor( + e, + void 0, + createConstantPositionProperty + ); +} +function createPropertyTypeDescriptor(e, t) { + return createPropertyDescriptor(e, void 0, function(n) { + return n instanceof t ? n : new t(n); + }); +} +function Entity(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + let t = e.id; + defined(t) || (t = createGuid()), this._availability = void 0, this._id = t, this._definitionChanged = new Event(), this._name = e.name, this._show = defaultValue(e.show, !0), this._parent = void 0, this._propertyNames = [ + "billboard", + "box", + "corridor", + "cylinder", + "description", + "ellipse", + "ellipsoid", + "label", + "model", + "tileset", + "orientation", + "path", + "plane", + "point", + "polygon", + "polyline", + "polylineVolume", + "position", + "properties", + "rectangle", + "viewFrom", + "wall", + ...ExtraPropertyNames + ], this._billboard = void 0, this._billboardSubscription = void 0, this._box = void 0, this._boxSubscription = void 0, this._corridor = void 0, this._corridorSubscription = void 0, this._cylinder = void 0, this._cylinderSubscription = void 0, this._description = void 0, this._descriptionSubscription = void 0, this._ellipse = void 0, this._ellipseSubscription = void 0, this._ellipsoid = void 0, this._ellipsoidSubscription = void 0, this._label = void 0, this._labelSubscription = void 0, this._model = void 0, this._modelSubscription = void 0, this._tileset = void 0, this._tilesetSubscription = void 0, this._orientation = void 0, this._orientationSubscription = void 0, this._path = void 0, this._pathSubscription = void 0, this._plane = void 0, this._planeSubscription = void 0, this._point = void 0, this._pointSubscription = void 0, this._polygon = void 0, this._polygonSubscription = void 0, this._polyline = void 0, this._polylineSubscription = void 0, this._polylineVolume = void 0, this._polylineVolumeSubscription = void 0, this._position = void 0, this._positionSubscription = void 0, this._properties = void 0, this._propertiesSubscription = void 0, this._rectangle = void 0, this._rectangleSubscription = void 0, this._viewFrom = void 0, this._viewFromSubscription = void 0, this._wall = void 0, this._wallSubscription = void 0, this._children = [], this.entityCollection = void 0, this.parent = e.parent, this.merge(e); +} +function updateShow(e, t, n) { + const i = t.length; + for (let r = 0; r < i; r++) { + const o = t[r], s = o._show; + (!n && s) !== (n && s) && updateShow(o, o._children, n); + } + e._definitionChanged.raiseEvent( + e, + "isShowing", + n, + !n + ); +} +Object.defineProperties(Entity.prototype, { + /** + * The availability, if any, associated with this object. + * If availability is undefined, it is assumed that this object's + * other properties will return valid data for any provided time. + * If availability exists, the objects other properties will only + * provide valid data if queried within the given interval. + * @memberof Entity.prototype + * @type {TimeIntervalCollection|undefined} + */ + availability: createRawPropertyDescriptor("availability"), + /** + * Gets the unique ID associated with this object. + * @memberof Entity.prototype + * @type {string} + */ + id: { + get: function() { + return this._id; + } + }, + /** + * Gets the event that is raised whenever a property or sub-property is changed or modified. + * @memberof Entity.prototype + * + * @type {Event} + * @readonly + */ + definitionChanged: { + get: function() { + return this._definitionChanged; + } + }, + /** + * Gets or sets the name of the object. The name is intended for end-user + * consumption and does not need to be unique. + * @memberof Entity.prototype + * @type {string|undefined} + */ + name: createRawPropertyDescriptor("name"), + /** + * Gets or sets whether this entity should be displayed. When set to true, + * the entity is only displayed if the parent entity's show property is also true. + * @memberof Entity.prototype + * @type {boolean} + */ + show: { + get: function() { + return this._show; + }, + set: function(e) { + if (e === this._show) + return; + const t = this.isShowing; + this._show = e; + const n = this.isShowing; + t !== n && updateShow(this, this._children, n), this._definitionChanged.raiseEvent(this, "show", e, !e); + } + }, + /** + * Gets whether this entity is being displayed, taking into account + * the visibility of any ancestor entities. + * @memberof Entity.prototype + * @type {boolean} + */ + isShowing: { + get: function() { + return this._show && (!defined(this.entityCollection) || this.entityCollection.show) && (!defined(this._parent) || this._parent.isShowing); + } + }, + /** + * Gets or sets the parent object. + * @memberof Entity.prototype + * @type {Entity|undefined} + */ + parent: { + get: function() { + return this._parent; + }, + set: function(e) { + const t = this._parent; + if (t === e) + return; + const n = this.isShowing; + if (defined(t)) { + const r = t._children.indexOf(this); + t._children.splice(r, 1); + } + this._parent = e, defined(e) && e._children.push(this); + const i = this.isShowing; + n !== i && updateShow(this, this._children, i), this._definitionChanged.raiseEvent(this, "parent", e, t); + } + }, + /** + * Gets the names of all properties registered on this instance. + * @memberof Entity.prototype + * @type {string[]} + */ + propertyNames: { + get: function() { + return this._propertyNames; + } + }, + /** + * Gets or sets the billboard. + * @memberof Entity.prototype + * @type {BillboardGraphics|undefined} + */ + billboard: createPropertyTypeDescriptor("billboard", BillboardGraphics), + /** + * Gets or sets the box. + * @memberof Entity.prototype + * @type {BoxGraphics|undefined} + */ + box: createPropertyTypeDescriptor("box", BoxGraphics), + /** + * Gets or sets the corridor. + * @memberof Entity.prototype + * @type {CorridorGraphics|undefined} + */ + corridor: createPropertyTypeDescriptor("corridor", CorridorGraphics), + /** + * Gets or sets the cylinder. + * @memberof Entity.prototype + * @type {CylinderGraphics|undefined} + */ + cylinder: createPropertyTypeDescriptor("cylinder", CylinderGraphics), + /** + * Gets or sets the description. + * @memberof Entity.prototype + * @type {Property|undefined} + */ + description: createPropertyDescriptor("description"), + /** + * Gets or sets the ellipse. + * @memberof Entity.prototype + * @type {EllipseGraphics|undefined} + */ + ellipse: createPropertyTypeDescriptor("ellipse", EllipseGraphics), + /** + * Gets or sets the ellipsoid. + * @memberof Entity.prototype + * @type {EllipsoidGraphics|undefined} + */ + ellipsoid: createPropertyTypeDescriptor("ellipsoid", EllipsoidGraphics), + /** + * Gets or sets the label. + * @memberof Entity.prototype + * @type {LabelGraphics|undefined} + */ + label: createPropertyTypeDescriptor("label", LabelGraphics), + /** + * Gets or sets the model. + * @memberof Entity.prototype + * @type {ModelGraphics|undefined} + */ + model: createPropertyTypeDescriptor("model", ModelGraphics), + /** + * Gets or sets the tileset. + * @memberof Entity.prototype + * @type {Cesium3DTilesetGraphics|undefined} + */ + tileset: createPropertyTypeDescriptor("tileset", Cesium3DTilesetGraphics), + /** + * Gets or sets the orientation in respect to Earth-fixed-Earth-centered (ECEF). + * Defaults to east-north-up at entity position. + * @memberof Entity.prototype + * @type {Property|undefined} + */ + orientation: createPropertyDescriptor("orientation"), + /** + * Gets or sets the path. + * @memberof Entity.prototype + * @type {PathGraphics|undefined} + */ + path: createPropertyTypeDescriptor("path", PathGraphics), + /** + * Gets or sets the plane. + * @memberof Entity.prototype + * @type {PlaneGraphics|undefined} + */ + plane: createPropertyTypeDescriptor("plane", PlaneGraphics), + /** + * Gets or sets the point graphic. + * @memberof Entity.prototype + * @type {PointGraphics|undefined} + */ + point: createPropertyTypeDescriptor("point", PointGraphics), + /** + * Gets or sets the polygon. + * @memberof Entity.prototype + * @type {PolygonGraphics|undefined} + */ + polygon: createPropertyTypeDescriptor("polygon", PolygonGraphics), + /** + * Gets or sets the polyline. + * @memberof Entity.prototype + * @type {PolylineGraphics|undefined} + */ + polyline: createPropertyTypeDescriptor("polyline", PolylineGraphics), + /** + * Gets or sets the polyline volume. + * @memberof Entity.prototype + * @type {PolylineVolumeGraphics|undefined} + */ + polylineVolume: createPropertyTypeDescriptor( + "polylineVolume", + PolylineVolumeGraphics + ), + /** + * Gets or sets the bag of arbitrary properties associated with this entity. + * @memberof Entity.prototype + * @type {PropertyBag|undefined} + */ + properties: createPropertyTypeDescriptor("properties", PropertyBag), + /** + * Gets or sets the position. + * @memberof Entity.prototype + * @type {PositionProperty|undefined} + */ + position: createPositionPropertyDescriptor("position"), + /** + * Gets or sets the rectangle. + * @memberof Entity.prototype + * @type {RectangleGraphics|undefined} + */ + rectangle: createPropertyTypeDescriptor("rectangle", RectangleGraphics), + /** + * Gets or sets the suggested initial offset when tracking this object. + * The offset is typically defined in the east-north-up reference frame, + * but may be another frame depending on the object's velocity. + * @memberof Entity.prototype + * @type {Property|undefined} + */ + viewFrom: createPropertyDescriptor("viewFrom"), + /** + * Gets or sets the wall. + * @memberof Entity.prototype + * @type {WallGraphics|undefined} + */ + wall: createPropertyTypeDescriptor("wall", WallGraphics) +}); +Entity.registerEntityType = function(e, t) { + Object.defineProperties(Entity.prototype, { + [e]: createPropertyTypeDescriptor(e, t) + }), ExtraPropertyNames.includes(e) || ExtraPropertyNames.push(e); +}; +Entity.prototype.isAvailable = function(e) { + const t = this._availability; + return !defined(t) || t.contains(e); +}; +Entity.prototype.addProperty = function(e) { + this._propertyNames.push(e), Object.defineProperty( + this, + e, + createRawPropertyDescriptor(e, !0) + ); +}; +Entity.prototype.removeProperty = function(e) { + const n = this._propertyNames.indexOf(e); + this._propertyNames.splice(n, 1), delete this[e]; +}; +Entity.prototype.merge = function(e) { + this.name = defaultValue(this.name, e.name), this.availability = defaultValue(this.availability, e.availability); + const t = this._propertyNames, n = defined(e._propertyNames) ? e._propertyNames : Object.keys(e), i = n.length; + for (let r = 0; r < i; r++) { + const o = n[r]; + if (o === "parent" || o === "name" || o === "availability" || o === "children") + continue; + const s = this[o], c = e[o]; + !defined(s) && t.indexOf(o) === -1 && this.addProperty(o), defined(c) && (defined(s) ? defined(s.merge) && s.merge(c) : defined(c.merge) && defined(c.clone) ? this[o] = c.clone() : this[o] = c); + } +}; +const matrix3Scratch = new Matrix3(), positionScratch$c = new Cartesian3(), orientationScratch = new Quaternion(); +Entity.prototype.computeModelMatrix = function(e, t) { + const n = Property.getValueOrUndefined( + this._position, + e, + positionScratch$c + ); + if (!defined(n)) + return; + const i = Property.getValueOrUndefined( + this._orientation, + e, + orientationScratch + ); + return defined(i) ? t = Matrix4.fromRotationTranslation( + Matrix3.fromQuaternion(i, matrix3Scratch), + n, + t + ) : t = Transforms.eastNorthUpToFixedFrame(n, void 0, t), t; +}; +Entity.prototype.computeModelMatrixForHeightReference = function(e, t, n, i, r) { + const o = Property.getValueOrDefault( + t, + e, + HeightReference$1.NONE + ); + let s = Property.getValueOrUndefined( + this._position, + e, + positionScratch$c + ); + if (o === HeightReference$1.NONE || !defined(s) || Cartesian3.equalsEpsilon(s, Cartesian3.ZERO, CesiumMath.EPSILON8)) + return this.computeModelMatrix(e, r); + const c = i.cartesianToCartographic(s, cartoScratch$2); + isHeightReferenceClamp(o) ? c.height = n : c.height += n, s = i.cartographicToCartesian(c, s); + const l = Property.getValueOrUndefined( + this._orientation, + e, + orientationScratch + ); + return defined(l) ? r = Matrix4.fromRotationTranslation( + Matrix3.fromQuaternion(l, matrix3Scratch), + s, + r + ) : r = Transforms.eastNorthUpToFixedFrame(s, void 0, r), r; +}; +Entity.supportsMaterialsforEntitiesOnTerrain = function(e) { + return GroundPrimitive.supportsMaterials(e); +}; +Entity.supportsPolylinesOnTerrain = function(e) { + return GroundPolylinePrimitive.isSupported(e); +}; +const defaultMaterial$2 = new ColorMaterialProperty(Color.WHITE), defaultShow$1 = new ConstantProperty(!0), defaultFill$1 = new ConstantProperty(!0), defaultOutline = new ConstantProperty(!1), defaultOutlineColor$3 = new ConstantProperty(Color.BLACK), defaultShadows$2 = new ConstantProperty(ShadowMode$1.DISABLED), defaultDistanceDisplayCondition$7 = new ConstantProperty( + new DistanceDisplayCondition() +), defaultClassificationType$1 = new ConstantProperty(ClassificationType$1.BOTH); +function GeometryUpdater(e) { + const t = e.entity, n = e.geometryPropertyName; + this._entity = t, this._scene = e.scene, this._fillEnabled = !1, this._isClosed = !1, this._onTerrain = !1, this._dynamic = !1, this._outlineEnabled = !1, this._geometryChanged = new Event(), this._showProperty = void 0, this._materialProperty = void 0, this._showOutlineProperty = void 0, this._outlineColorProperty = void 0, this._outlineWidth = 1, this._shadowsProperty = void 0, this._distanceDisplayConditionProperty = void 0, this._classificationTypeProperty = void 0, this._options = e.geometryOptions, this._geometryPropertyName = n, this._id = `${n}-${t.id}`, this._observedPropertyNames = e.observedPropertyNames, this._supportsMaterialsforEntitiesOnTerrain = Entity.supportsMaterialsforEntitiesOnTerrain( + e.scene + ); +} +Object.defineProperties(GeometryUpdater.prototype, { + /** + * Gets the unique ID associated with this updater + * @memberof GeometryUpdater.prototype + * @type {string} + * @readonly + */ + id: { + get: function() { + return this._id; + } + }, + /** + * Gets the entity associated with this geometry. + * @memberof GeometryUpdater.prototype + * + * @type {Entity} + * @readonly + */ + entity: { + get: function() { + return this._entity; + } + }, + /** + * Gets a value indicating if the geometry has a fill component. + * @memberof GeometryUpdater.prototype + * + * @type {boolean} + * @readonly + */ + fillEnabled: { + get: function() { + return this._fillEnabled; + } + }, + /** + * Gets a value indicating if fill visibility varies with simulation time. + * @memberof GeometryUpdater.prototype + * + * @type {boolean} + * @readonly + */ + hasConstantFill: { + get: function() { + return !this._fillEnabled || !defined(this._entity.availability) && Property.isConstant(this._showProperty) && Property.isConstant(this._fillProperty); + } + }, + /** + * Gets the material property used to fill the geometry. + * @memberof GeometryUpdater.prototype + * + * @type {MaterialProperty} + * @readonly + */ + fillMaterialProperty: { + get: function() { + return this._materialProperty; + } + }, + /** + * Gets a value indicating if the geometry has an outline component. + * @memberof GeometryUpdater.prototype + * + * @type {boolean} + * @readonly + */ + outlineEnabled: { + get: function() { + return this._outlineEnabled; + } + }, + /** + * Gets a value indicating if the geometry has an outline component. + * @memberof GeometryUpdater.prototype + * + * @type {boolean} + * @readonly + */ + hasConstantOutline: { + get: function() { + return !this._outlineEnabled || !defined(this._entity.availability) && Property.isConstant(this._showProperty) && Property.isConstant(this._showOutlineProperty); + } + }, + /** + * Gets the {@link Color} property for the geometry outline. + * @memberof GeometryUpdater.prototype + * + * @type {Property} + * @readonly + */ + outlineColorProperty: { + get: function() { + return this._outlineColorProperty; + } + }, + /** + * Gets the constant with of the geometry outline, in pixels. + * This value is only valid if isDynamic is false. + * @memberof GeometryUpdater.prototype + * + * @type {number} + * @readonly + */ + outlineWidth: { + get: function() { + return this._outlineWidth; + } + }, + /** + * Gets the property specifying whether the geometry + * casts or receives shadows from light sources. + * @memberof GeometryUpdater.prototype + * + * @type {Property} + * @readonly + */ + shadowsProperty: { + get: function() { + return this._shadowsProperty; + } + }, + /** + * Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this geometry will be displayed. + * @memberof GeometryUpdater.prototype + * + * @type {Property} + * @readonly + */ + distanceDisplayConditionProperty: { + get: function() { + return this._distanceDisplayConditionProperty; + } + }, + /** + * Gets or sets the {@link ClassificationType} Property specifying if this geometry will classify terrain, 3D Tiles, or both when on the ground. + * @memberof GeometryUpdater.prototype + * + * @type {Property} + * @readonly + */ + classificationTypeProperty: { + get: function() { + return this._classificationTypeProperty; + } + }, + /** + * Gets a value indicating if the geometry is time-varying. + * + * @memberof GeometryUpdater.prototype + * + * @type {boolean} + * @readonly + */ + isDynamic: { + get: function() { + return this._dynamic; + } + }, + /** + * Gets a value indicating if the geometry is closed. + * This property is only valid for static geometry. + * @memberof GeometryUpdater.prototype + * + * @type {boolean} + * @readonly + */ + isClosed: { + get: function() { + return this._isClosed; + } + }, + /** + * Gets a value indicating if the geometry should be drawn on terrain. + * @memberof EllipseGeometryUpdater.prototype + * + * @type {boolean} + * @readonly + */ + onTerrain: { + get: function() { + return this._onTerrain; + } + }, + /** + * Gets an event that is raised whenever the public properties + * of this updater change. + * @memberof GeometryUpdater.prototype + * + * @type {boolean} + * @readonly + */ + geometryChanged: { + get: function() { + return this._geometryChanged; + } + } +}); +GeometryUpdater.prototype.isOutlineVisible = function(e) { + const t = this._entity, n = this._outlineEnabled && t.isAvailable(e) && this._showProperty.getValue(e) && this._showOutlineProperty.getValue(e); + return defaultValue(n, !1); +}; +GeometryUpdater.prototype.isFilled = function(e) { + const t = this._entity, n = this._fillEnabled && t.isAvailable(e) && this._showProperty.getValue(e) && this._fillProperty.getValue(e); + return defaultValue(n, !1); +}; +GeometryUpdater.prototype.createFillGeometryInstance = DeveloperError.throwInstantiationError; +GeometryUpdater.prototype.createOutlineGeometryInstance = DeveloperError.throwInstantiationError; +GeometryUpdater.prototype.isDestroyed = function() { + return !1; +}; +GeometryUpdater.prototype.destroy = function() { + destroyObject(this); +}; +GeometryUpdater.prototype._isHidden = function(e, t) { + const n = t.show; + return defined(n) && n.isConstant && !n.getValue(Iso8601.MINIMUM_VALUE); +}; +GeometryUpdater.prototype._isOnTerrain = function(e, t) { + return !1; +}; +GeometryUpdater.prototype._getIsClosed = function(e) { + return !0; +}; +GeometryUpdater.prototype._isDynamic = DeveloperError.throwInstantiationError; +GeometryUpdater.prototype._setStaticOptions = DeveloperError.throwInstantiationError; +GeometryUpdater.prototype._onEntityPropertyChanged = function(e, t, n, i) { + if (this._observedPropertyNames.indexOf(t) === -1) + return; + const r = this._entity[this._geometryPropertyName]; + if (!defined(r)) { + (this._fillEnabled || this._outlineEnabled) && (this._fillEnabled = !1, this._outlineEnabled = !1, this._geometryChanged.raiseEvent(this)); + return; + } + const o = r.fill, s = defined(o) && o.isConstant ? o.getValue(Iso8601.MINIMUM_VALUE) : !0, c = r.outline; + let l = defined(c); + if (l && c.isConstant && (l = c.getValue(Iso8601.MINIMUM_VALUE)), !s && !l) { + (this._fillEnabled || this._outlineEnabled) && (this._fillEnabled = !1, this._outlineEnabled = !1, this._geometryChanged.raiseEvent(this)); + return; + } + const d = r.show; + if (this._isHidden(e, r)) { + (this._fillEnabled || this._outlineEnabled) && (this._fillEnabled = !1, this._outlineEnabled = !1, this._geometryChanged.raiseEvent(this)); + return; + } + this._materialProperty = defaultValue(r.material, defaultMaterial$2), this._fillProperty = defaultValue(o, defaultFill$1), this._showProperty = defaultValue(d, defaultShow$1), this._showOutlineProperty = defaultValue(r.outline, defaultOutline), this._outlineColorProperty = l ? defaultValue(r.outlineColor, defaultOutlineColor$3) : void 0, this._shadowsProperty = defaultValue(r.shadows, defaultShadows$2), this._distanceDisplayConditionProperty = defaultValue( + r.distanceDisplayCondition, + defaultDistanceDisplayCondition$7 + ), this._classificationTypeProperty = defaultValue( + r.classificationType, + defaultClassificationType$1 + ), this._fillEnabled = s; + const f = this._isOnTerrain(e, r) && (this._supportsMaterialsforEntitiesOnTerrain || this._materialProperty instanceof ColorMaterialProperty); + if (l && f && (oneTimeWarning(oneTimeWarning.geometryOutlines), l = !1), this._onTerrain = f, this._outlineEnabled = l, this._isDynamic(e, r)) + this._dynamic || (this._dynamic = !0, this._geometryChanged.raiseEvent(this)); + else { + this._setStaticOptions(e, r), this._isClosed = this._getIsClosed(this._options); + const h = r.outlineWidth; + this._outlineWidth = defined(h) ? h.getValue(Iso8601.MINIMUM_VALUE) : 1, this._dynamic = !1, this._geometryChanged.raiseEvent(this); + } +}; +GeometryUpdater.prototype.createDynamicUpdater = function(e, t) { + return new this.constructor.DynamicGeometryUpdater( + this, + e, + t + ); +}; +function CallbackProperty(e, t) { + this._callback = void 0, this._isConstant = void 0, this._definitionChanged = new Event(), this.setCallback(e, t); +} +Object.defineProperties(CallbackProperty.prototype, { + /** + * Gets a value indicating if this property is constant. + * @memberof CallbackProperty.prototype + * + * @type {boolean} + * @readonly + */ + isConstant: { + get: function() { + return this._isConstant; + } + }, + /** + * Gets the event that is raised whenever the definition of this property changes. + * The definition is changed whenever setCallback is called. + * @memberof CallbackProperty.prototype + * + * @type {Event} + * @readonly + */ + definitionChanged: { + get: function() { + return this._definitionChanged; + } + } +}); +const timeScratch$l = new JulianDate(); +CallbackProperty.prototype.getValue = function(e, t) { + return defined(e) || (e = JulianDate.now(timeScratch$l)), this._callback(e, t); +}; +CallbackProperty.prototype.setCallback = function(e, t) { + const n = this._callback !== e || this._isConstant !== t; + this._callback = e, this._isConstant = t, n && this._definitionChanged.raiseEvent(this); +}; +CallbackProperty.prototype.equals = function(e) { + return this === e || e instanceof CallbackProperty && this._callback === e._callback && this._isConstant === e._isConstant; +}; +const scratchPosition$e = new Cartesian3(); +function TerrainOffsetProperty(e, t, n, i) { + this._scene = e, this._heightReference = n, this._extrudedHeightReference = i, this._positionProperty = t, this._position = new Cartesian3(), this._cartographicPosition = new Cartographic(), this._normal = new Cartesian3(), this._definitionChanged = new Event(), this._terrainHeight = 0, this._removeCallbackFunc = void 0, this._removeEventListener = void 0, this._removeModeListener = void 0; + const r = this; + if (defined(e.globe) && (this._removeEventListener = e.terrainProviderChanged.addEventListener( + function() { + r._updateClamping(); + } + ), this._removeModeListener = e.morphComplete.addEventListener( + function() { + r._updateClamping(); + } + )), t.isConstant) { + const o = t.getValue( + Iso8601.MINIMUM_VALUE, + scratchPosition$e + ); + if (!defined(o) || Cartesian3.equals(o, Cartesian3.ZERO) || !defined(e.globe)) + return; + this._position = Cartesian3.clone(o, this._position), this._updateClamping(), this._normal = e.ellipsoid.geodeticSurfaceNormal( + o, + this._normal + ); + } +} +Object.defineProperties(TerrainOffsetProperty.prototype, { + /** + * Gets a value indicating if this property is constant. + * @memberof TerrainOffsetProperty.prototype + * + * @type {boolean} + * @readonly + */ + isConstant: { + get: function() { + return !1; + } + }, + /** + * Gets the event that is raised whenever the definition of this property changes. + * @memberof TerrainOffsetProperty.prototype + * + * @type {Event} + * @readonly + */ + definitionChanged: { + get: function() { + return this._definitionChanged; + } + } +}); +TerrainOffsetProperty.prototype._updateClamping = function() { + defined(this._removeCallbackFunc) && this._removeCallbackFunc(); + const e = this._scene, t = this._position; + if (Cartesian3.equals(t, Cartesian3.ZERO)) { + this._terrainHeight = 0; + return; + } + const i = e.ellipsoid.cartesianToCartographic( + t, + this._cartographicPosition + ), r = e.getHeight(i, this._heightReference); + defined(r) ? this._terrainHeight = r : this._terrainHeight = 0; + const o = (s) => { + this._terrainHeight = s.height, this.definitionChanged.raiseEvent(); + }; + this._removeCallbackFunc = e.updateHeight( + i, + o, + this._heightReference + ); +}; +const timeScratch$k = new JulianDate(); +TerrainOffsetProperty.prototype.getValue = function(e, t) { + defined(e) || (e = JulianDate.now(timeScratch$k)); + const n = Property.getValueOrDefault( + this._heightReference, + e, + HeightReference$1.NONE + ), i = Property.getValueOrDefault( + this._extrudedHeightReference, + e, + HeightReference$1.NONE + ); + if (n === HeightReference$1.NONE && !isHeightReferenceRelative(i)) + return this._position = Cartesian3.clone(Cartesian3.ZERO, this._position), Cartesian3.clone(Cartesian3.ZERO, t); + if (this._positionProperty.isConstant) + return Cartesian3.multiplyByScalar( + this._normal, + this._terrainHeight, + t + ); + const r = this._scene, o = this._positionProperty.getValue(e, scratchPosition$e); + if (!defined(o) || Cartesian3.equals(o, Cartesian3.ZERO) || !defined(r.globe)) + return Cartesian3.clone(Cartesian3.ZERO, t); + if (Cartesian3.equalsEpsilon(this._position, o, CesiumMath.EPSILON10)) + return Cartesian3.multiplyByScalar( + this._normal, + this._terrainHeight, + t + ); + this._position = Cartesian3.clone(o, this._position), this._updateClamping(); + const s = r.ellipsoid.geodeticSurfaceNormal(o, this._normal); + return Cartesian3.multiplyByScalar(s, this._terrainHeight, t); +}; +TerrainOffsetProperty.prototype.isDestroyed = function() { + return !1; +}; +TerrainOffsetProperty.prototype.destroy = function() { + return defined(this._removeEventListener) && this._removeEventListener(), defined(this._removeModeListener) && this._removeModeListener(), defined(this._removeCallbackFunc) && this._removeCallbackFunc(), destroyObject(this); +}; +function heightReferenceOnEntityPropertyChanged(e, t, n, i) { + if (GeometryUpdater.prototype._onEntityPropertyChanged.call( + this, + e, + t, + n, + i + ), this._observedPropertyNames.indexOf(t) === -1) + return; + const r = this._entity[this._geometryPropertyName]; + if (!defined(r)) + return; + defined(this._terrainOffsetProperty) && (this._terrainOffsetProperty.destroy(), this._terrainOffsetProperty = void 0); + const o = r.heightReference; + if (defined(o)) { + const s = new CallbackProperty( + this._computeCenter.bind(this), + !this._dynamic + ); + this._terrainOffsetProperty = new TerrainOffsetProperty( + this._scene, + s, + o + ); + } +} +const defaultOffset$a = Cartesian3.ZERO, offsetScratch$9 = new Cartesian3(), positionScratch$b = new Cartesian3(), scratchColor$p = new Color(); +function BoxGeometryOptions(e) { + this.id = e, this.vertexFormat = void 0, this.dimensions = void 0, this.offsetAttribute = void 0; +} +function BoxGeometryUpdater(e, t) { + GeometryUpdater.call(this, { + entity: e, + scene: t, + geometryOptions: new BoxGeometryOptions(e), + geometryPropertyName: "box", + observedPropertyNames: ["availability", "position", "orientation", "box"] + }), this._onEntityPropertyChanged(e, "box", e.box, void 0); +} +defined(Object.create) && (BoxGeometryUpdater.prototype = Object.create(GeometryUpdater.prototype), BoxGeometryUpdater.prototype.constructor = BoxGeometryUpdater); +Object.defineProperties(BoxGeometryUpdater.prototype, { + /** + * Gets the terrain offset property + * @type {TerrainOffsetProperty} + * @memberof BoxGeometryUpdater.prototype + * @readonly + * @private + */ + terrainOffsetProperty: { + get: function() { + return this._terrainOffsetProperty; + } + } +}); +BoxGeometryUpdater.prototype.createFillGeometryInstance = function(e) { + const t = this._entity, n = t.isAvailable(e), i = new ShowGeometryInstanceAttribute( + n && t.isShowing && this._showProperty.getValue(e) && this._fillProperty.getValue(e) + ), r = this._distanceDisplayConditionProperty.getValue( + e + ), o = DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition( + r + ), s = { + show: i, + distanceDisplayCondition: o, + color: void 0, + offset: void 0 + }; + if (this._materialProperty instanceof ColorMaterialProperty) { + let c; + defined(this._materialProperty.color) && (this._materialProperty.color.isConstant || n) && (c = this._materialProperty.color.getValue(e, scratchColor$p)), defined(c) || (c = Color.WHITE), s.color = ColorGeometryInstanceAttribute.fromColor(c); + } + return defined(this._options.offsetAttribute) && (s.offset = OffsetGeometryInstanceAttribute.fromCartesian3( + Property.getValueOrDefault( + this._terrainOffsetProperty, + e, + defaultOffset$a, + offsetScratch$9 + ) + )), new GeometryInstance({ + id: t, + geometry: BoxGeometry.fromDimensions(this._options), + modelMatrix: t.computeModelMatrixForHeightReference( + e, + t.box.heightReference, + this._options.dimensions.z * 0.5, + this._scene.ellipsoid + ), + attributes: s + }); +}; +BoxGeometryUpdater.prototype.createOutlineGeometryInstance = function(e) { + const t = this._entity, n = t.isAvailable(e), i = Property.getValueOrDefault( + this._outlineColorProperty, + e, + Color.BLACK, + scratchColor$p + ), r = this._distanceDisplayConditionProperty.getValue( + e + ), o = { + show: new ShowGeometryInstanceAttribute( + n && t.isShowing && this._showProperty.getValue(e) && this._showOutlineProperty.getValue(e) + ), + color: ColorGeometryInstanceAttribute.fromColor(i), + distanceDisplayCondition: DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition( + r + ), + offset: void 0 + }; + return defined(this._options.offsetAttribute) && (o.offset = OffsetGeometryInstanceAttribute.fromCartesian3( + Property.getValueOrDefault( + this._terrainOffsetProperty, + e, + defaultOffset$a, + offsetScratch$9 + ) + )), new GeometryInstance({ + id: t, + geometry: BoxOutlineGeometry.fromDimensions(this._options), + modelMatrix: t.computeModelMatrixForHeightReference( + e, + t.box.heightReference, + this._options.dimensions.z * 0.5, + this._scene.ellipsoid + ), + attributes: o + }); +}; +BoxGeometryUpdater.prototype._computeCenter = function(e, t) { + return Property.getValueOrUndefined(this._entity.position, e, t); +}; +BoxGeometryUpdater.prototype._isHidden = function(e, t) { + return !defined(t.dimensions) || !defined(e.position) || GeometryUpdater.prototype._isHidden.call(this, e, t); +}; +BoxGeometryUpdater.prototype._isDynamic = function(e, t) { + return !e.position.isConstant || !Property.isConstant(e.orientation) || !t.dimensions.isConstant || !Property.isConstant(t.outlineWidth); +}; +BoxGeometryUpdater.prototype._setStaticOptions = function(e, t) { + const n = Property.getValueOrDefault( + t.heightReference, + Iso8601.MINIMUM_VALUE, + HeightReference$1.NONE + ), i = this._options; + i.vertexFormat = this._materialProperty instanceof ColorMaterialProperty ? PerInstanceColorAppearance.VERTEX_FORMAT : MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat, i.dimensions = t.dimensions.getValue( + Iso8601.MINIMUM_VALUE, + i.dimensions + ), i.offsetAttribute = n !== HeightReference$1.NONE ? GeometryOffsetAttribute$1.ALL : void 0; +}; +BoxGeometryUpdater.prototype._onEntityPropertyChanged = heightReferenceOnEntityPropertyChanged; +BoxGeometryUpdater.DynamicGeometryUpdater = DynamicBoxGeometryUpdater; +function DynamicBoxGeometryUpdater(e, t, n) { + DynamicGeometryUpdater$1.call( + this, + e, + t, + n + ); +} +defined(Object.create) && (DynamicBoxGeometryUpdater.prototype = Object.create( + DynamicGeometryUpdater$1.prototype +), DynamicBoxGeometryUpdater.prototype.constructor = DynamicBoxGeometryUpdater); +DynamicBoxGeometryUpdater.prototype._isHidden = function(e, t, n) { + const i = Property.getValueOrUndefined( + e.position, + n, + positionScratch$b + ), r = this._options.dimensions; + return !defined(i) || !defined(r) || DynamicGeometryUpdater$1.prototype._isHidden.call(this, e, t, n); +}; +DynamicBoxGeometryUpdater.prototype._setOptions = function(e, t, n) { + const i = Property.getValueOrDefault( + t.heightReference, + n, + HeightReference$1.NONE + ), r = this._options; + r.dimensions = Property.getValueOrUndefined( + t.dimensions, + n, + r.dimensions + ), r.offsetAttribute = i !== HeightReference$1.NONE ? GeometryOffsetAttribute$1.ALL : void 0; +}; +/*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */ +const { + entries, + setPrototypeOf, + isFrozen, + getPrototypeOf, + getOwnPropertyDescriptor +} = Object; +let { + freeze, + seal, + create +} = Object, { + apply, + construct +} = typeof Reflect < "u" && Reflect; +freeze || (freeze = function(t) { + return t; +}); +seal || (seal = function(t) { + return t; +}); +apply || (apply = function(t, n, i) { + return t.apply(n, i); +}); +construct || (construct = function(t, n) { + return new t(...n); +}); +const arrayForEach = unapply(Array.prototype.forEach), arrayPop = unapply(Array.prototype.pop), arrayPush = unapply(Array.prototype.push), stringToLowerCase = unapply(String.prototype.toLowerCase), stringToString = unapply(String.prototype.toString), stringMatch = unapply(String.prototype.match), stringReplace = unapply(String.prototype.replace), stringIndexOf = unapply(String.prototype.indexOf), stringTrim = unapply(String.prototype.trim), objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty), regExpTest = unapply(RegExp.prototype.test), typeErrorCreate = unconstruct(TypeError); +function unapply(e) { + return function(t) { + for (var n = arguments.length, i = new Array(n > 1 ? n - 1 : 0), r = 1; r < n; r++) + i[r - 1] = arguments[r]; + return apply(e, t, i); + }; +} +function unconstruct(e) { + return function() { + for (var t = arguments.length, n = new Array(t), i = 0; i < t; i++) + n[i] = arguments[i]; + return construct(e, n); + }; +} +function addToSet(e, t) { + let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : stringToLowerCase; + setPrototypeOf && setPrototypeOf(e, null); + let i = t.length; + for (; i--; ) { + let r = t[i]; + if (typeof r == "string") { + const o = n(r); + o !== r && (isFrozen(t) || (t[i] = o), r = o); + } + e[r] = !0; + } + return e; +} +function cleanArray(e) { + for (let t = 0; t < e.length; t++) + objectHasOwnProperty(e, t) || (e[t] = null); + return e; +} +function clone(e) { + const t = create(null); + for (const [n, i] of entries(e)) + objectHasOwnProperty(e, n) && (Array.isArray(i) ? t[n] = cleanArray(i) : i && typeof i == "object" && i.constructor === Object ? t[n] = clone(i) : t[n] = i); + return t; +} +function lookupGetter(e, t) { + for (; e !== null; ) { + const i = getOwnPropertyDescriptor(e, t); + if (i) { + if (i.get) + return unapply(i.get); + if (typeof i.value == "function") + return unapply(i.value); + } + e = getPrototypeOf(e); + } + function n() { + return null; + } + return n; +} +const html$1 = freeze(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), svg$1 = freeze(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), svgFilters = freeze(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), svgDisallowed = freeze(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), mathMl$1 = freeze(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), mathMlDisallowed = freeze(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), text = freeze(["#text"]), html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), svg = freeze(["accent-height", "accumulate", "additive", "alignment-baseline", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), xml = freeze(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm), ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm), TMPLIT_EXPR = seal(/\${[\w\W]*}/gm), DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/), ARIA_ATTR = seal(/^aria-[\-\w]+$/), IS_ALLOWED_URI = seal( + /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i + // eslint-disable-line no-useless-escape +), IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i), ATTR_WHITESPACE = seal( + /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g + // eslint-disable-line no-control-regex +), DOCTYPE_NAME = seal(/^html$/i), CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i); +var EXPRESSIONS = /* @__PURE__ */ Object.freeze({ + __proto__: null, + MUSTACHE_EXPR, + ERB_EXPR, + TMPLIT_EXPR, + DATA_ATTR, + ARIA_ATTR, + IS_ALLOWED_URI, + IS_SCRIPT_OR_DATA, + ATTR_WHITESPACE, + DOCTYPE_NAME, + CUSTOM_ELEMENT +}); +const NODE_TYPE = { + element: 1, + attribute: 2, + text: 3, + cdataSection: 4, + entityReference: 5, + // Deprecated + entityNode: 6, + // Deprecated + progressingInstruction: 7, + comment: 8, + document: 9, + documentType: 10, + documentFragment: 11, + notation: 12 + // Deprecated +}, getGlobal = function() { + return typeof window > "u" ? null : window; +}, _createTrustedTypesPolicy = function(t, n) { + if (typeof t != "object" || typeof t.createPolicy != "function") + return null; + let i = null; + const r = "data-tt-policy-suffix"; + n && n.hasAttribute(r) && (i = n.getAttribute(r)); + const o = "dompurify" + (i ? "#" + i : ""); + try { + return t.createPolicy(o, { + createHTML(s) { + return s; + }, + createScriptURL(s) { + return s; + } + }); + } catch { + return console.warn("TrustedTypes policy " + o + " could not be created."), null; + } +}; +function createDOMPurify() { + let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal(); + const t = (_e) => createDOMPurify(_e); + if (t.version = "3.1.6", t.removed = [], !e || !e.document || e.document.nodeType !== NODE_TYPE.document) + return t.isSupported = !1, t; + let { + document: n + } = e; + const i = n, r = i.currentScript, { + DocumentFragment: o, + HTMLTemplateElement: s, + Node: c, + Element: l, + NodeFilter: d, + NamedNodeMap: f = e.NamedNodeMap || e.MozNamedAttrMap, + HTMLFormElement: h, + DOMParser: p, + trustedTypes: m + } = e, _ = l.prototype, y = lookupGetter(_, "cloneNode"), C = lookupGetter(_, "remove"), T = lookupGetter(_, "nextSibling"), x = lookupGetter(_, "childNodes"), b = lookupGetter(_, "parentNode"); + if (typeof s == "function") { + const _e = n.createElement("template"); + _e.content && _e.content.ownerDocument && (n = _e.content.ownerDocument); + } + let S, E = ""; + const { + implementation: A, + createNodeIterator: D, + createDocumentFragment: P, + getElementsByTagName: I + } = n, { + importNode: M + } = i; + let R = {}; + t.isSupported = typeof entries == "function" && typeof b == "function" && A && A.createHTMLDocument !== void 0; + const { + MUSTACHE_EXPR: L, + ERB_EXPR: g, + TMPLIT_EXPR: w, + DATA_ATTR: O, + ARIA_ATTR: N, + IS_SCRIPT_OR_DATA: F, + ATTR_WHITESPACE: B, + CUSTOM_ELEMENT: V + } = EXPRESSIONS; + let { + IS_ALLOWED_URI: U + } = EXPRESSIONS, k = null; + const $ = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]); + let G = null; + const q = addToSet({}, [...html, ...svg, ...mathMl, ...xml]); + let z = Object.seal(create(null, { + tagNameCheck: { + writable: !0, + configurable: !1, + enumerable: !0, + value: null + }, + attributeNameCheck: { + writable: !0, + configurable: !1, + enumerable: !0, + value: null + }, + allowCustomizedBuiltInElements: { + writable: !0, + configurable: !1, + enumerable: !0, + value: !1 + } + })), H = null, Q = null, ne = !0, K = !0, Z = !1, ee = !0, oe = !1, X = !0, fe = !1, de = !1, ce = !1, ye = !1, ge = !1, re = !1, be = !0, pe = !1; + const Te = "user-content-"; + let xe = !0, W = !1, j = {}, se = null; + const Pe = addToSet({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]); + let le = null; + const De = addToSet({}, ["audio", "video", "img", "source", "image", "track"]); + let Me = null; + const He = addToSet({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Oe = "http://www.w3.org/1998/Math/MathML", $e = "http://www.w3.org/2000/svg", J = "http://www.w3.org/1999/xhtml"; + let ae = J, te = !1, ie = null; + const ue = addToSet({}, [Oe, $e, J], stringToString); + let me = null; + const Se = ["application/xhtml+xml", "text/html"], we = "text/html"; + let Ee = null, Ve = null; + const We = n.createElement("form"), Ne = function(Y) { + return Y instanceof RegExp || Y instanceof Function; + }, Ae = function() { + let Y = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; + if (!(Ve && Ve === Y)) { + if ((!Y || typeof Y != "object") && (Y = {}), Y = clone(Y), me = // eslint-disable-next-line unicorn/prefer-includes + Se.indexOf(Y.PARSER_MEDIA_TYPE) === -1 ? we : Y.PARSER_MEDIA_TYPE, Ee = me === "application/xhtml+xml" ? stringToString : stringToLowerCase, k = objectHasOwnProperty(Y, "ALLOWED_TAGS") ? addToSet({}, Y.ALLOWED_TAGS, Ee) : $, G = objectHasOwnProperty(Y, "ALLOWED_ATTR") ? addToSet({}, Y.ALLOWED_ATTR, Ee) : q, ie = objectHasOwnProperty(Y, "ALLOWED_NAMESPACES") ? addToSet({}, Y.ALLOWED_NAMESPACES, stringToString) : ue, Me = objectHasOwnProperty(Y, "ADD_URI_SAFE_ATTR") ? addToSet( + clone(He), + // eslint-disable-line indent + Y.ADD_URI_SAFE_ATTR, + // eslint-disable-line indent + Ee + // eslint-disable-line indent + ) : He, le = objectHasOwnProperty(Y, "ADD_DATA_URI_TAGS") ? addToSet( + clone(De), + // eslint-disable-line indent + Y.ADD_DATA_URI_TAGS, + // eslint-disable-line indent + Ee + // eslint-disable-line indent + ) : De, se = objectHasOwnProperty(Y, "FORBID_CONTENTS") ? addToSet({}, Y.FORBID_CONTENTS, Ee) : Pe, H = objectHasOwnProperty(Y, "FORBID_TAGS") ? addToSet({}, Y.FORBID_TAGS, Ee) : {}, Q = objectHasOwnProperty(Y, "FORBID_ATTR") ? addToSet({}, Y.FORBID_ATTR, Ee) : {}, j = objectHasOwnProperty(Y, "USE_PROFILES") ? Y.USE_PROFILES : !1, ne = Y.ALLOW_ARIA_ATTR !== !1, K = Y.ALLOW_DATA_ATTR !== !1, Z = Y.ALLOW_UNKNOWN_PROTOCOLS || !1, ee = Y.ALLOW_SELF_CLOSE_IN_ATTR !== !1, oe = Y.SAFE_FOR_TEMPLATES || !1, X = Y.SAFE_FOR_XML !== !1, fe = Y.WHOLE_DOCUMENT || !1, ye = Y.RETURN_DOM || !1, ge = Y.RETURN_DOM_FRAGMENT || !1, re = Y.RETURN_TRUSTED_TYPE || !1, ce = Y.FORCE_BODY || !1, be = Y.SANITIZE_DOM !== !1, pe = Y.SANITIZE_NAMED_PROPS || !1, xe = Y.KEEP_CONTENT !== !1, W = Y.IN_PLACE || !1, U = Y.ALLOWED_URI_REGEXP || IS_ALLOWED_URI, ae = Y.NAMESPACE || J, z = Y.CUSTOM_ELEMENT_HANDLING || {}, Y.CUSTOM_ELEMENT_HANDLING && Ne(Y.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (z.tagNameCheck = Y.CUSTOM_ELEMENT_HANDLING.tagNameCheck), Y.CUSTOM_ELEMENT_HANDLING && Ne(Y.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (z.attributeNameCheck = Y.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), Y.CUSTOM_ELEMENT_HANDLING && typeof Y.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (z.allowCustomizedBuiltInElements = Y.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), oe && (K = !1), ge && (ye = !0), j && (k = addToSet({}, text), G = [], j.html === !0 && (addToSet(k, html$1), addToSet(G, html)), j.svg === !0 && (addToSet(k, svg$1), addToSet(G, svg), addToSet(G, xml)), j.svgFilters === !0 && (addToSet(k, svgFilters), addToSet(G, svg), addToSet(G, xml)), j.mathMl === !0 && (addToSet(k, mathMl$1), addToSet(G, mathMl), addToSet(G, xml))), Y.ADD_TAGS && (k === $ && (k = clone(k)), addToSet(k, Y.ADD_TAGS, Ee)), Y.ADD_ATTR && (G === q && (G = clone(G)), addToSet(G, Y.ADD_ATTR, Ee)), Y.ADD_URI_SAFE_ATTR && addToSet(Me, Y.ADD_URI_SAFE_ATTR, Ee), Y.FORBID_CONTENTS && (se === Pe && (se = clone(se)), addToSet(se, Y.FORBID_CONTENTS, Ee)), xe && (k["#text"] = !0), fe && addToSet(k, ["html", "head", "body"]), k.table && (addToSet(k, ["tbody"]), delete H.tbody), Y.TRUSTED_TYPES_POLICY) { + if (typeof Y.TRUSTED_TYPES_POLICY.createHTML != "function") + throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.'); + if (typeof Y.TRUSTED_TYPES_POLICY.createScriptURL != "function") + throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.'); + S = Y.TRUSTED_TYPES_POLICY, E = S.createHTML(""); + } else + S === void 0 && (S = _createTrustedTypesPolicy(m, r)), S !== null && typeof E == "string" && (E = S.createHTML("")); + freeze && freeze(Y), Ve = Y; + } + }, ke = addToSet({}, ["mi", "mo", "mn", "ms", "mtext"]), Fe = addToSet({}, ["foreignobject", "annotation-xml"]), Je = addToSet({}, ["title", "style", "font", "a", "script"]), ve = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]), Le = addToSet({}, [...mathMl$1, ...mathMlDisallowed]), rt = function(Y) { + let he = b(Y); + (!he || !he.tagName) && (he = { + namespaceURI: ae, + tagName: "template" + }); + const Ce = stringToLowerCase(Y.tagName), Re = stringToLowerCase(he.tagName); + return ie[Y.namespaceURI] ? Y.namespaceURI === $e ? he.namespaceURI === J ? Ce === "svg" : he.namespaceURI === Oe ? Ce === "svg" && (Re === "annotation-xml" || ke[Re]) : !!ve[Ce] : Y.namespaceURI === Oe ? he.namespaceURI === J ? Ce === "math" : he.namespaceURI === $e ? Ce === "math" && Fe[Re] : !!Le[Ce] : Y.namespaceURI === J ? he.namespaceURI === $e && !Fe[Re] || he.namespaceURI === Oe && !ke[Re] ? !1 : !Le[Ce] && (Je[Ce] || !ve[Ce]) : !!(me === "application/xhtml+xml" && ie[Y.namespaceURI]) : !1; + }, Be = function(Y) { + arrayPush(t.removed, { + element: Y + }); + try { + b(Y).removeChild(Y); + } catch { + C(Y); + } + }, Ze = function(Y, he) { + try { + arrayPush(t.removed, { + attribute: he.getAttributeNode(Y), + from: he + }); + } catch { + arrayPush(t.removed, { + attribute: null, + from: he + }); + } + if (he.removeAttribute(Y), Y === "is" && !G[Y]) + if (ye || ge) + try { + Be(he); + } catch { + } + else + try { + he.setAttribute(Y, ""); + } catch { + } + }, je = function(Y) { + let he = null, Ce = null; + if (ce) + Y = "maximumMipmapLevel is suitable for
+ * PBR rendering of a material with maximum roughness (1.0).
+ * @memberOf SpecularEnvironmentCubeMap.prototype
+ * @type {number}
+ * @readonly
+ */
+ maximumMipmapLevel: {
+ get: function() {
+ return this._maximumMipmapLevel;
+ }
+ },
+ /**
+ * Determines if the cube map is complete and ready to use.
+ * @memberof SpecularEnvironmentCubeMap.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ ready: {
+ get: function() {
+ return this._ready;
+ }
+ }
+});
+SpecularEnvironmentCubeMap.isSupported = function(e) {
+ return (e.colorBufferHalfFloat && e.halfFloatingPointTexture || e.floatingPointTexture && e.colorBufferFloat) && e.supportsTextureLod;
+};
+function cleanupResources(e) {
+ e._cubeMapBuffers = void 0;
+}
+SpecularEnvironmentCubeMap.prototype.update = function(e) {
+ const { context: t } = e;
+ if (!SpecularEnvironmentCubeMap.isSupported(t))
+ return;
+ if (defined(this._texture)) {
+ cleanupResources(this);
+ return;
+ }
+ if (!defined(this._texture) && !this._loading) {
+ const f = t.textureCache.getTexture(this._url);
+ defined(f) && (cleanupResources(this), this._texture = f, this._maximumMipmapLevel = this._texture.maximumMipmapLevel, this._ready = !0);
+ }
+ const n = this._cubeMapBuffers;
+ if (!defined(n) && !this._loading) {
+ const f = this;
+ loadKTX2(this._url).then(function(h) {
+ f._cubeMapBuffers = h, f._loading = !1;
+ }).catch(function(h) {
+ f.isDestroyed() || f._errorEvent.raiseEvent(h);
+ }), this._loading = !0;
+ }
+ if (!defined(this._cubeMapBuffers))
+ return;
+ let { pixelDatatype: i } = n[0].positiveX;
+ defined(i) || (i = t.halfFloatingPointTexture ? PixelDatatype$1.HALF_FLOAT : PixelDatatype$1.FLOAT);
+ const r = PixelFormat$1.RGBA, o = n.length;
+ this._maximumMipmapLevel = o - 1;
+ const s = n[0].positiveX.width, c = Math.log2(s) + 1;
+ if (o !== c) {
+ const f = {};
+ Object.values(CubeMap.FaceName).forEach((h) => {
+ f[h] = void 0;
+ });
+ for (let h = o; h < c; h++)
+ n.push(f);
+ }
+ const l = new Sampler({
+ minificationFilter: TextureMinificationFilter$1.LINEAR_MIPMAP_LINEAR
+ }), d = new CubeMap({
+ context: t,
+ source: n[0],
+ flipY: !1,
+ pixelDatatype: i,
+ pixelFormat: r,
+ sampler: l
+ });
+ d.loadMipmaps(n.slice(1)), this._texture = d, this._texture.maximumMipmapLevel = this._maximumMipmapLevel, t.textureCache.addTexture(this._url, this._texture), this._ready = !0;
+};
+SpecularEnvironmentCubeMap.prototype.isDestroyed = function() {
+ return !1;
+};
+SpecularEnvironmentCubeMap.prototype.destroy = function() {
+ return cleanupResources(this), this._texture = this._texture && this._texture.destroy(), destroyObject(this);
+};
+function ImageBasedLighting(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = defined(e.imageBasedLightingFactor) ? Cartesian2.clone(e.imageBasedLightingFactor) : new Cartesian2(1, 1);
+ this._imageBasedLightingFactor = t;
+ const n = defaultValue(e.luminanceAtZenith, 0.2);
+ this._luminanceAtZenith = n;
+ const i = e.sphericalHarmonicCoefficients;
+ this._sphericalHarmonicCoefficients = i, this._specularEnvironmentMaps = e.specularEnvironmentMaps, this._specularEnvironmentCubeMap = void 0, this._specularEnvironmentCubeMapDirty = !0, this._specularEnvironmentMapLoaded = !1, this._previousSpecularEnvironmentMapLoaded = !1, this._useDefaultSpecularMaps = !1, this._useDefaultSphericalHarmonics = !1, this._shouldRegenerateShaders = !1, this._previousFrameNumber = void 0, this._previousImageBasedLightingFactor = Cartesian2.clone(
+ t
+ ), this._previousLuminanceAtZenith = n, this._previousSphericalHarmonicCoefficients = i, this._removeErrorListener = void 0;
+}
+Object.defineProperties(ImageBasedLighting.prototype, {
+ /**
+ * Cesium adds lighting from the earth, sky, atmosphere, and star skybox.
+ * This cartesian is used to scale the final diffuse and specular lighting
+ * contribution from those sources to the final color. A value of 0.0 will
+ * disable those light sources.
+ *
+ * @memberof ImageBasedLighting.prototype
+ *
+ * @type {Cartesian2}
+ * @default Cartesian2(1.0, 1.0)
+ */
+ imageBasedLightingFactor: {
+ get: function() {
+ return this._imageBasedLightingFactor;
+ },
+ set: function(e) {
+ this._previousImageBasedLightingFactor = Cartesian2.clone(
+ this._imageBasedLightingFactor,
+ this._previousImageBasedLightingFactor
+ ), this._imageBasedLightingFactor = Cartesian2.clone(
+ e,
+ this._imageBasedLightingFactor
+ );
+ }
+ },
+ /**
+ * The sun's luminance at the zenith in kilo candela per meter squared
+ * to use for this model's procedural environment map. This is used when
+ * {@link ImageBasedLighting#specularEnvironmentMaps} and {@link ImageBasedLighting#sphericalHarmonicCoefficients}
+ * are not defined.
+ *
+ * @memberof ImageBasedLighting.prototype
+ *
+ * @type {number}
+ * @default 0.2
+ */
+ luminanceAtZenith: {
+ get: function() {
+ return this._luminanceAtZenith;
+ },
+ set: function(e) {
+ this._previousLuminanceAtZenith = this._luminanceAtZenith, this._luminanceAtZenith = e;
+ }
+ },
+ /**
+ * The third order spherical harmonic coefficients used for the diffuse color of image-based lighting. When undefined, a diffuse irradiance
+ * computed from the atmosphere color is used.
+ *
+ * There are nine Cartesian3 coefficients.
+ * The order of the coefficients is: L0,0, L1,-1, L1,0, L1,1, L2,-2, L2,-1, L2,0, L2,1, L2,2
+ *
cmgen tool of
+ * {@link https://github.com/google/filament/releases|Google's Filament project}.
+ * Be sure to use the --no-mirror option in cmgen.
+ *
+ * @memberof ImageBasedLighting.prototype
+ *
+ * @type {Cartesian3[]}
+ * @demo {@link https://sandcastle.cesium.com/index.html?src=Image-Based Lighting.html|Sandcastle Image Based Lighting Demo}
+ * @see {@link https://graphics.stanford.edu/papers/envmap/envmap.pdf|An Efficient Representation for Irradiance Environment Maps}
+ */
+ sphericalHarmonicCoefficients: {
+ get: function() {
+ return this._sphericalHarmonicCoefficients;
+ },
+ set: function(e) {
+ this._previousSphericalHarmonicCoefficients = this._sphericalHarmonicCoefficients, this._sphericalHarmonicCoefficients = e;
+ }
+ },
+ /**
+ * A URL to a KTX2 file that contains a cube map of the specular lighting and the convoluted specular mipmaps.
+ *
+ * @memberof ImageBasedLighting.prototype
+ * @demo {@link https://sandcastle.cesium.com/index.html?src=Image-Based Lighting.html|Sandcastle Image Based Lighting Demo}
+ * @type {string}
+ * @see ImageBasedLighting#sphericalHarmonicCoefficients
+ */
+ specularEnvironmentMaps: {
+ get: function() {
+ return this._specularEnvironmentMaps;
+ },
+ set: function(e) {
+ e !== this._specularEnvironmentMaps && (this._specularEnvironmentCubeMapDirty = this._specularEnvironmentCubeMapDirty || e !== this._specularEnvironmentMaps, this._specularEnvironmentMapLoaded = !1), this._specularEnvironmentMaps = e;
+ }
+ },
+ /**
+ * Whether or not image-based lighting is enabled.
+ *
+ * @memberof ImageBasedLighting.prototype
+ * @type {boolean}
+ *
+ * @private
+ */
+ enabled: {
+ get: function() {
+ return this._imageBasedLightingFactor.x > 0 || this._imageBasedLightingFactor.y > 0;
+ }
+ },
+ /**
+ * Whether or not the models that use this lighting should regenerate their shaders,
+ * based on the properties and resources have changed.
+ *
+ * @memberof ImageBasedLighting.prototype
+ * @type {boolean}
+ *
+ * @private
+ */
+ shouldRegenerateShaders: {
+ get: function() {
+ return this._shouldRegenerateShaders;
+ }
+ },
+ /**
+ * Whether or not to use the default spherical harmonic coefficients.
+ *
+ * @memberof ImageBasedLighting.prototype
+ * @type {boolean}
+ *
+ * @private
+ */
+ useDefaultSphericalHarmonics: {
+ get: function() {
+ return this._useDefaultSphericalHarmonics;
+ }
+ },
+ /**
+ * Whether or not the image-based lighting settings use spherical harmonic coefficients.
+ *
+ * @memberof ImageBasedLighting.prototype
+ * @type {boolean}
+ *
+ * @private
+ */
+ useSphericalHarmonicCoefficients: {
+ get: function() {
+ return defined(this._sphericalHarmonicCoefficients) || this._useDefaultSphericalHarmonics;
+ }
+ },
+ /**
+ * The cube map for the specular environment maps.
+ *
+ * @memberof ImageBasedLighting.prototype
+ * @type {SpecularEnvironmentCubeMap}
+ *
+ * @private
+ */
+ specularEnvironmentCubeMap: {
+ get: function() {
+ return this._specularEnvironmentCubeMap;
+ }
+ },
+ /**
+ * Whether or not to use the default specular environment maps.
+ *
+ * @memberof ImageBasedLighting.prototype
+ * @type {boolean}
+ *
+ * @private
+ */
+ useDefaultSpecularMaps: {
+ get: function() {
+ return this._useDefaultSpecularMaps;
+ }
+ },
+ /**
+ * Whether or not the image-based lighting settings use specular environment maps.
+ *
+ * @memberof ImageBasedLighting.prototype
+ * @type {boolean}
+ *
+ * @private
+ */
+ useSpecularEnvironmentMaps: {
+ get: function() {
+ return defined(this._specularEnvironmentCubeMap) && this._specularEnvironmentCubeMap.ready || this._useDefaultSpecularMaps;
+ }
+ }
+});
+function createSpecularEnvironmentCubeMap(e, t) {
+ if (SpecularEnvironmentCubeMap.isSupported(t)) {
+ if (e._specularEnvironmentCubeMap = e._specularEnvironmentCubeMap && e._specularEnvironmentCubeMap.destroy(), defined(e._specularEnvironmentMaps)) {
+ const n = new SpecularEnvironmentCubeMap(
+ e._specularEnvironmentMaps
+ );
+ e._specularEnvironmentCubeMap = n, e._removeErrorListener = n.errorEvent.addEventListener(
+ (i) => {
+ console.error(`Error loading specularEnvironmentMaps: ${i}`);
+ }
+ );
+ }
+ e._shouldRegenerateShaders = !0;
+ }
+}
+ImageBasedLighting.prototype.update = function(e) {
+ if (e.frameNumber === this._previousFrameNumber)
+ return;
+ this._previousFrameNumber = e.frameNumber;
+ const t = e.context;
+ e.brdfLutGenerator.update(e), this._shouldRegenerateShaders = !1;
+ const n = this._imageBasedLightingFactor, i = this._previousImageBasedLightingFactor;
+ Cartesian2.equals(n, i) || (this._shouldRegenerateShaders = n.x > 0 && i.x === 0 || n.x === 0 && i.x > 0, this._shouldRegenerateShaders = this._shouldRegenerateShaders || n.y > 0 && i.y === 0 || n.y === 0 && i.y > 0, this._previousImageBasedLightingFactor = Cartesian2.clone(
+ this._imageBasedLightingFactor,
+ this._previousImageBasedLightingFactor
+ )), this._luminanceAtZenith !== this._previousLuminanceAtZenith && (this._shouldRegenerateShaders = this._shouldRegenerateShaders || defined(this._luminanceAtZenith) !== defined(this._previousLuminanceAtZenith), this._previousLuminanceAtZenith = this._luminanceAtZenith), this._previousSphericalHarmonicCoefficients !== this._sphericalHarmonicCoefficients && (this._shouldRegenerateShaders = this._shouldRegenerateShaders || defined(this._previousSphericalHarmonicCoefficients) !== defined(this._sphericalHarmonicCoefficients), this._previousSphericalHarmonicCoefficients = this._sphericalHarmonicCoefficients), this._shouldRegenerateShaders = this._shouldRegenerateShaders || this._previousSpecularEnvironmentMapLoaded !== this._specularEnvironmentMapLoaded, this._previousSpecularEnvironmentMapLoaded = this._specularEnvironmentMapLoaded, this._specularEnvironmentCubeMapDirty && (createSpecularEnvironmentCubeMap(this, t), this._specularEnvironmentCubeMapDirty = !1), defined(this._specularEnvironmentCubeMap) && (this._specularEnvironmentCubeMap.update(e), this._specularEnvironmentCubeMap.ready && (this._specularEnvironmentMapLoaded = !0));
+ const r = !defined(this._specularEnvironmentCubeMap) && defined(e.specularEnvironmentMaps) && !this._useDefaultSpecularMaps, o = !defined(e.specularEnvironmentMaps) && this._useDefaultSpecularMaps, s = !defined(this._sphericalHarmonicCoefficients) && defined(e.sphericalHarmonicCoefficients) && !this._useDefaultSphericalHarmonics, c = !defined(e.sphericalHarmonicCoefficients) && this._useDefaultSphericalHarmonics;
+ this._shouldRegenerateShaders = this._shouldRegenerateShaders || r || o || s || c, this._useDefaultSpecularMaps = !defined(this._specularEnvironmentCubeMap) && defined(e.specularEnvironmentMaps), this._useDefaultSphericalHarmonics = !defined(this._sphericalHarmonicCoefficients) && defined(e.sphericalHarmonicCoefficients);
+};
+ImageBasedLighting.prototype.isDestroyed = function() {
+ return !1;
+};
+ImageBasedLighting.prototype.destroy = function() {
+ return this._specularEnvironmentCubeMap = this._specularEnvironmentCubeMap && this._specularEnvironmentCubeMap.destroy(), this._removeErrorListener = this._removeErrorListener && this._removeErrorListener(), destroyObject(this);
+};
+let defaultTokenCredit$1;
+const defaultAccessToken$1 = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIxMjY5YWQzZS04ZGIyLTRlMjEtYjcwNS1iYmY0NDNmN2E3ZjAiLCJpZCI6MjU5LCJpYXQiOjE3MjUzNzYwMzZ9.L0mzOLcquvnxOpG5DnqWQmivpRCwePDt3WAgzb8VlVA", Ion = {};
+Ion.defaultAccessToken = defaultAccessToken$1;
+Ion.defaultServer = new Resource({ url: "https://api.cesium.com/" });
+Ion.getDefaultTokenCredit = function(e) {
+ if (e === defaultAccessToken$1) {
+ if (!defined(defaultTokenCredit$1)) {
+ const t = ` This application is using Cesium's default ion access token. Please assign Cesium.Ion.defaultAccessToken with an access token from your ion account before making any Cesium API calls. You can sign up for a free ion account at https://cesium.com.`;
+ defaultTokenCredit$1 = new Credit(t, !0);
+ }
+ return defaultTokenCredit$1;
+ }
+};
+function IonResource(e, t) {
+ let n;
+ const i = e.externalType, r = defined(i);
+ if (!r)
+ n = {
+ url: e.url,
+ retryAttempts: 1,
+ retryCallback
+ };
+ else if (i === "3DTILES" || i === "STK_TERRAIN_SERVER")
+ n = { url: e.options.url };
+ else
+ throw new RuntimeError(
+ "Ion.createResource does not support external imagery assets; use IonImageryProvider instead."
+ );
+ Resource.call(this, n), this._ionEndpoint = e, this._ionEndpointDomain = r ? void 0 : new Uri(e.url).authority(), this._ionEndpointResource = t, this._ionRoot = void 0, this._pendingPromise = void 0, this._credits = void 0, this._isExternal = r;
+}
+defined(Object.create) && (IonResource.prototype = Object.create(Resource.prototype), IonResource.prototype.constructor = IonResource);
+IonResource.fromAssetId = function(e, t) {
+ const n = IonResource._createEndpointResource(
+ e,
+ t
+ );
+ return n.fetchJson().then(function(i) {
+ return new IonResource(i, n);
+ });
+};
+Object.defineProperties(IonResource.prototype, {
+ /**
+ * Gets the credits required for attribution of the asset.
+ *
+ * @memberof IonResource.prototype
+ * @type {Credit[]}
+ * @readonly
+ */
+ credits: {
+ get: function() {
+ return defined(this._ionRoot) ? this._ionRoot.credits : defined(this._credits) ? this._credits : (this._credits = IonResource.getCreditsFromEndpoint(
+ this._ionEndpoint,
+ this._ionEndpointResource
+ ), this._credits);
+ }
+ }
+});
+IonResource.getCreditsFromEndpoint = function(e, t) {
+ const n = e.attributions.map(Credit.getIonCredit), i = Ion.getDefaultTokenCredit(
+ t.queryParameters.access_token
+ );
+ return defined(i) && n.push(Credit.clone(i)), n;
+};
+IonResource.prototype.clone = function(e) {
+ const t = defaultValue(this._ionRoot, this);
+ return defined(e) || (e = new IonResource(
+ t._ionEndpoint,
+ t._ionEndpointResource
+ )), e = Resource.prototype.clone.call(this, e), e._ionRoot = t, e._isExternal = this._isExternal, e;
+};
+IonResource.prototype.fetchImage = function(e) {
+ if (!this._isExternal) {
+ const t = e;
+ e = {
+ preferBlob: !0
+ }, defined(t) && (e.flipY = t.flipY, e.preferImageBitmap = t.preferImageBitmap);
+ }
+ return Resource.prototype.fetchImage.call(this, e);
+};
+IonResource.prototype._makeRequest = function(e) {
+ return this._isExternal || new Uri(this.url).authority() !== this._ionEndpointDomain ? Resource.prototype._makeRequest.call(this, e) : (defined(e.headers) || (e.headers = {}), e.headers.Authorization = `Bearer ${this._ionEndpoint.accessToken}`, e.headers["X-Cesium-Client"] = "CesiumJS", typeof CESIUM_VERSION < "u" && (e.headers["X-Cesium-Client-Version"] = CESIUM_VERSION), Resource.prototype._makeRequest.call(this, e));
+};
+IonResource._createEndpointResource = function(e, t) {
+ t = defaultValue(t, defaultValue.EMPTY_OBJECT);
+ let n = defaultValue(t.server, Ion.defaultServer);
+ const i = defaultValue(t.accessToken, Ion.defaultAccessToken);
+ n = Resource.createIfNeeded(n);
+ const r = {
+ url: `v1/assets/${e}/endpoint`
+ };
+ return defined(i) && (r.queryParameters = { access_token: i }), n.getDerivedResource(r);
+};
+function retryCallback(e, t) {
+ const n = defaultValue(e._ionRoot, e), i = n._ionEndpointResource, r = typeof Image < "u";
+ return !defined(t) || t.statusCode !== 401 && !(r && t.target instanceof Image) ? Promise.resolve(!1) : (defined(n._pendingPromise) || (n._pendingPromise = i.fetchJson().then(function(o) {
+ return n._ionEndpoint = o, o;
+ }).finally(function(o) {
+ return n._pendingPromise = void 0, o;
+ })), n._pendingPromise.then(function(o) {
+ return e._ionEndpoint = o, !0;
+ }));
+}
+function ManagedArray(e) {
+ e = defaultValue(e, 0), this._array = new Array(e), this._length = e;
+}
+Object.defineProperties(ManagedArray.prototype, {
+ /**
+ * Gets or sets the length of the array.
+ * If the set length is greater than the length of the internal array, the internal array is resized.
+ *
+ * @memberof ManagedArray.prototype
+ * @type {number}
+ */
+ length: {
+ get: function() {
+ return this._length;
+ },
+ set: function(e) {
+ const t = this._array, n = this._length;
+ if (e < n)
+ for (let i = e; i < n; ++i)
+ t[i] = void 0;
+ else e > t.length && (t.length = e);
+ this._length = e;
+ }
+ },
+ /**
+ * Gets the internal array.
+ *
+ * @memberof ManagedArray.prototype
+ * @type {Array}
+ * @readonly
+ */
+ values: {
+ get: function() {
+ return this._array;
+ }
+ }
+});
+ManagedArray.prototype.get = function(e) {
+ return this._array[e];
+};
+ManagedArray.prototype.set = function(e, t) {
+ e >= this._length && (this.length = e + 1), this._array[e] = t;
+};
+ManagedArray.prototype.peek = function() {
+ return this._array[this._length - 1];
+};
+ManagedArray.prototype.push = function(e) {
+ const t = this.length++;
+ this._array[t] = e;
+};
+ManagedArray.prototype.pop = function() {
+ if (this._length === 0)
+ return;
+ const e = this._array[this._length - 1];
+ return --this.length, e;
+};
+ManagedArray.prototype.reserve = function(e) {
+ e > this._array.length && (this._array.length = e);
+};
+ManagedArray.prototype.resize = function(e) {
+ this.length = e;
+};
+ManagedArray.prototype.trim = function(e) {
+ e = defaultValue(e, this._length), this._array.length = e;
+};
+const Axis = {
+ /**
+ * Denotes the x-axis.
+ *
+ * @type {number}
+ * @constant
+ */
+ X: 0,
+ /**
+ * Denotes the y-axis.
+ *
+ * @type {number}
+ * @constant
+ */
+ Y: 1,
+ /**
+ * Denotes the z-axis.
+ *
+ * @type {number}
+ * @constant
+ */
+ Z: 2
+};
+Axis.Y_UP_TO_Z_UP = Matrix4.fromRotationTranslation(
+ // Rotation about PI/2 around the X-axis
+ Matrix3.fromArray([1, 0, 0, 0, 0, 1, 0, -1, 0])
+);
+Axis.Z_UP_TO_Y_UP = Matrix4.fromRotationTranslation(
+ // Rotation about -PI/2 around the X-axis
+ Matrix3.fromArray([1, 0, 0, 0, 0, -1, 0, 1, 0])
+);
+Axis.X_UP_TO_Z_UP = Matrix4.fromRotationTranslation(
+ // Rotation about -PI/2 around the Y-axis
+ Matrix3.fromArray([0, 0, 1, 0, 1, 0, -1, 0, 0])
+);
+Axis.Z_UP_TO_X_UP = Matrix4.fromRotationTranslation(
+ // Rotation about PI/2 around the Y-axis
+ Matrix3.fromArray([0, 0, -1, 0, 1, 0, 1, 0, 0])
+);
+Axis.X_UP_TO_Y_UP = Matrix4.fromRotationTranslation(
+ // Rotation about PI/2 around the Z-axis
+ Matrix3.fromArray([0, 1, 0, -1, 0, 0, 0, 0, 1])
+);
+Axis.Y_UP_TO_X_UP = Matrix4.fromRotationTranslation(
+ // Rotation about -PI/2 around the Z-axis
+ Matrix3.fromArray([0, -1, 0, 1, 0, 0, 0, 0, 1])
+);
+Axis.fromName = function(e) {
+ return Axis[e];
+};
+const Axis$1 = Object.freeze(Axis);
+function Cesium3DContentGroup(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._metadata = e.metadata;
+}
+Object.defineProperties(Cesium3DContentGroup.prototype, {
+ /**
+ * Get the metadata for this group
+ *
+ * @memberof Cesium3DContentGroup.prototype
+ *
+ * @type {GroupMetadata}
+ *
+ * @readonly
+ */
+ metadata: {
+ get: function() {
+ return this._metadata;
+ }
+ }
+});
+function getStringFromTypedArray(e, t, n) {
+ return t = defaultValue(t, 0), n = defaultValue(n, e.byteLength - t), e = e.subarray(t, t + n), getStringFromTypedArray.decode(e);
+}
+getStringFromTypedArray.decodeWithTextDecoder = function(e) {
+ return new TextDecoder("utf-8").decode(e);
+};
+getStringFromTypedArray.decodeWithFromCharCode = function(e) {
+ let t = "";
+ const n = utf8Handler(e), i = n.length;
+ for (let r = 0; r < i; ++r) {
+ let o = n[r];
+ o <= 65535 ? t += String.fromCharCode(o) : (o -= 65536, t += String.fromCharCode((o >> 10) + 55296, (o & 1023) + 56320));
+ }
+ return t;
+};
+function inRange(e, t, n) {
+ return t <= e && e <= n;
+}
+function utf8Handler(e) {
+ let t = 0, n = 0, i = 0, r = 128, o = 191;
+ const s = [], c = e.length;
+ for (let l = 0; l < c; ++l) {
+ const d = e[l];
+ if (i === 0) {
+ if (inRange(d, 0, 127)) {
+ s.push(d);
+ continue;
+ }
+ if (inRange(d, 194, 223)) {
+ i = 1, t = d & 31;
+ continue;
+ }
+ if (inRange(d, 224, 239)) {
+ d === 224 && (r = 160), d === 237 && (o = 159), i = 2, t = d & 15;
+ continue;
+ }
+ if (inRange(d, 240, 244)) {
+ d === 240 && (r = 144), d === 244 && (o = 143), i = 3, t = d & 7;
+ continue;
+ }
+ throw new RuntimeError("String decoding failed.");
+ }
+ if (!inRange(d, r, o)) {
+ t = i = n = 0, r = 128, o = 191, --l;
+ continue;
+ }
+ r = 128, o = 191, t = t << 6 | d & 63, ++n, n === i && (s.push(t), t = i = n = 0);
+ }
+ return s;
+}
+typeof TextDecoder < "u" ? getStringFromTypedArray.decode = getStringFromTypedArray.decodeWithTextDecoder : getStringFromTypedArray.decode = getStringFromTypedArray.decodeWithFromCharCode;
+function getMagic(e, t) {
+ return t = defaultValue(t, 0), getStringFromTypedArray(
+ e,
+ t,
+ Math.min(4, e.length)
+ );
+}
+function Composite3DTileContent(e, t, n, i) {
+ this._tileset = e, this._tile = t, this._resource = n, defined(i) || (i = []), this._contents = i, this._metadata = void 0, this._group = void 0, this._ready = !1;
+}
+Object.defineProperties(Composite3DTileContent.prototype, {
+ featurePropertiesDirty: {
+ get: function() {
+ const e = this._contents, t = e.length;
+ for (let n = 0; n < t; ++n)
+ if (e[n].featurePropertiesDirty)
+ return !0;
+ return !1;
+ },
+ set: function(e) {
+ const t = this._contents, n = t.length;
+ for (let i = 0; i < n; ++i)
+ t[i].featurePropertiesDirty = e;
+ }
+ },
+ /**
+ * Part of the {@link Cesium3DTileContent} interface. Composite3DTileContent
+ * always returns 0. Instead call featuresLength for a tile in the composite.
+ * @memberof Composite3DTileContent.prototype
+ */
+ featuresLength: {
+ get: function() {
+ return 0;
+ }
+ },
+ /**
+ * Part of the {@link Cesium3DTileContent} interface. Composite3DTileContent
+ * always returns 0. Instead call pointsLength for a tile in the composite.
+ * @memberof Composite3DTileContent.prototype
+ */
+ pointsLength: {
+ get: function() {
+ return 0;
+ }
+ },
+ /**
+ * Part of the {@link Cesium3DTileContent} interface. Composite3DTileContent
+ * always returns 0. Instead call trianglesLength for a tile in the composite.
+ * @memberof Composite3DTileContent.prototype
+ */
+ trianglesLength: {
+ get: function() {
+ return 0;
+ }
+ },
+ /**
+ * Part of the {@link Cesium3DTileContent} interface. Composite3DTileContent
+ * always returns 0. Instead call geometryByteLength for a tile in the composite.
+ * @memberof Composite3DTileContent.prototype
+ */
+ geometryByteLength: {
+ get: function() {
+ return 0;
+ }
+ },
+ /**
+ * Part of the {@link Cesium3DTileContent} interface. Composite3DTileContent
+ * always returns 0. Instead call texturesByteLength for a tile in the composite.
+ * @memberof Composite3DTileContent.prototype
+ */
+ texturesByteLength: {
+ get: function() {
+ return 0;
+ }
+ },
+ /**
+ * Part of the {@link Cesium3DTileContent} interface. Composite3DTileContent
+ * always returns 0. Instead call batchTableByteLength for a tile in the composite.
+ * @memberof Composite3DTileContent.prototype
+ */
+ batchTableByteLength: {
+ get: function() {
+ return 0;
+ }
+ },
+ innerContents: {
+ get: function() {
+ return this._contents;
+ }
+ },
+ /**
+ * Returns true when the tile's content is ready to render; otherwise false
+ *
+ * @memberof Composite3DTileContent.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ * @private
+ */
+ ready: {
+ get: function() {
+ return this._ready;
+ }
+ },
+ tileset: {
+ get: function() {
+ return this._tileset;
+ }
+ },
+ tile: {
+ get: function() {
+ return this._tile;
+ }
+ },
+ url: {
+ get: function() {
+ return this._resource.getUrlComponent(!0);
+ }
+ },
+ /**
+ * Part of the {@link Cesium3DTileContent} interface. Composite3DTileContent
+ * both stores the content metadata and propagates the content metadata to all of its children.
+ * @memberof Composite3DTileContent.prototype
+ * @private
+ * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
+ */
+ metadata: {
+ get: function() {
+ return this._metadata;
+ },
+ set: function(e) {
+ this._metadata = e;
+ const t = this._contents, n = t.length;
+ for (let i = 0; i < n; ++i)
+ t[i].metadata = e;
+ }
+ },
+ /**
+ * Part of the {@link Cesium3DTileContent} interface. Composite3DTileContent
+ * always returns undefined. Instead call batchTable for a tile in the composite.
+ * @memberof Composite3DTileContent.prototype
+ */
+ batchTable: {
+ get: function() {
+ }
+ },
+ /**
+ * Part of the {@link Cesium3DTileContent} interface. Composite3DTileContent
+ * both stores the group metadata and propagates the group metadata to all of its children.
+ * @memberof Composite3DTileContent.prototype
+ * @private
+ * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
+ */
+ group: {
+ get: function() {
+ return this._group;
+ },
+ set: function(e) {
+ this._group = e;
+ const t = this._contents, n = t.length;
+ for (let i = 0; i < n; ++i)
+ t[i].group = e;
+ }
+ }
+});
+const sizeOfUint32$7 = Uint32Array.BYTES_PER_ELEMENT;
+Composite3DTileContent.fromTileType = async function(e, t, n, i, r, o) {
+ r = defaultValue(r, 0);
+ const s = new Uint8Array(i), c = new DataView(i);
+ r += sizeOfUint32$7;
+ const l = c.getUint32(r, !0);
+ if (l !== 1)
+ throw new RuntimeError(
+ `Only Composite Tile version 1 is supported. Version ${l} is not.`
+ );
+ r += sizeOfUint32$7, r += sizeOfUint32$7;
+ const d = c.getUint32(r, !0);
+ r += sizeOfUint32$7;
+ let f = n.queryParameters.compositeIndex;
+ defined(f) ? f = `${f}_` : f = "";
+ const h = [];
+ h.length = d;
+ for (let _ = 0; _ < d; ++_) {
+ const y = getMagic(s, r), C = c.getUint32(r + sizeOfUint32$7 * 2, !0), T = o[y], x = `${f}${_}`, b = n.getDerivedResource({
+ queryParameters: {
+ compositeIndex: x
+ }
+ });
+ if (defined(T))
+ h[_] = Promise.resolve(
+ T(e, t, b, i, r)
+ );
+ else
+ throw new RuntimeError(
+ `Unknown tile content type, ${y}, inside Composite tile`
+ );
+ r += C;
+ }
+ const p = await Promise.all(h);
+ return new Composite3DTileContent(
+ e,
+ t,
+ n,
+ p
+ );
+};
+Composite3DTileContent.prototype.hasProperty = function(e, t) {
+ return !1;
+};
+Composite3DTileContent.prototype.getFeature = function(e) {
+};
+Composite3DTileContent.prototype.applyDebugSettings = function(e, t) {
+ const n = this._contents, i = n.length;
+ for (let r = 0; r < i; ++r)
+ n[r].applyDebugSettings(e, t);
+};
+Composite3DTileContent.prototype.applyStyle = function(e) {
+ const t = this._contents, n = t.length;
+ for (let i = 0; i < n; ++i)
+ t[i].applyStyle(e);
+};
+Composite3DTileContent.prototype.update = function(e, t) {
+ const n = this._contents, i = n.length;
+ let r = !0;
+ for (let o = 0; o < i; ++o)
+ n[o].update(e, t), r = r && n[o].ready;
+ !this._ready && r && (this._ready = !0);
+};
+Composite3DTileContent.prototype.pick = function(e, t, n) {
+ if (!this._ready)
+ return;
+ let i, r = Number.POSITIVE_INFINITY;
+ const o = this._contents, s = o.length;
+ for (let c = 0; c < s; ++c) {
+ const l = o[c].pick(e, t, n);
+ if (!defined(l))
+ continue;
+ const d = Cartesian3.distance(e.origin, l);
+ d < r && (i = l, r = d);
+ }
+ if (defined(i))
+ return n;
+};
+Composite3DTileContent.prototype.isDestroyed = function() {
+ return !1;
+};
+Composite3DTileContent.prototype.destroy = function() {
+ const e = this._contents, t = e.length;
+ for (let n = 0; n < t; ++n)
+ e[n].destroy();
+ return destroyObject(this);
+};
+function getJsonFromTypedArray(e, t, n) {
+ return JSON.parse(
+ getStringFromTypedArray(e, t, n)
+ );
+}
+function BatchTexture(e) {
+ this._id = createGuid();
+ const t = e.featuresLength;
+ this._showAlphaProperties = void 0, this._batchValues = void 0, this._batchValuesDirty = !1, this._batchTexture = void 0, this._defaultTexture = void 0, this._pickTexture = void 0, this._pickIds = [];
+ let n, i;
+ if (t > 0) {
+ const r = Math.min(t, ContextLimits.maximumTextureSize), o = Math.ceil(t / ContextLimits.maximumTextureSize), s = 1 / r, c = s * 0.5, l = 1 / o, d = l * 0.5;
+ n = new Cartesian2(r, o), i = new Cartesian4(s, c, l, d);
+ }
+ this._translucentFeaturesLength = 0, this._featuresLength = t, this._textureDimensions = n, this._textureStep = i, this._owner = e.owner, this._statistics = e.statistics, this._colorChangedCallback = e.colorChangedCallback;
+}
+Object.defineProperties(BatchTexture.prototype, {
+ /**
+ * Number of features that are translucent
+ *
+ * @memberof BatchTexture.prototype
+ * @type {number}
+ * @readonly
+ * @private
+ */
+ translucentFeaturesLength: {
+ get: function() {
+ return this._translucentFeaturesLength;
+ }
+ },
+ /**
+ * Total size of all GPU resources used by this batch texture.
+ *
+ * @memberof BatchTexture.prototype
+ * @type {number}
+ * @readonly
+ * @private
+ */
+ byteLength: {
+ get: function() {
+ let e = 0;
+ return defined(this._pickTexture) && (e += this._pickTexture.sizeInBytes), defined(this._batchTexture) && (e += this._batchTexture.sizeInBytes), e;
+ }
+ },
+ /**
+ * Dimensions of the underlying batch texture.
+ *
+ * @memberof BatchTexture.prototype
+ * @type {Cartesian2}
+ * @readonly
+ * @private
+ */
+ textureDimensions: {
+ get: function() {
+ return this._textureDimensions;
+ }
+ },
+ /**
+ * Size of each texture and distance from side to center of a texel in
+ * each direction. Stored as (stepX, centerX, stepY, centerY)
+ *
+ * @memberof BatchTexture.prototype
+ * @type {Cartesian4}
+ * @readonly
+ * @private
+ */
+ textureStep: {
+ get: function() {
+ return this._textureStep;
+ }
+ },
+ /**
+ * The underlying texture used for styling. The texels are accessed
+ * by batch ID, and the value is the color of this feature after accounting
+ * for show/hide settings.
+ *
+ * @memberof BatchTexture.prototype
+ * @type {Texture}
+ * @readonly
+ * @private
+ */
+ batchTexture: {
+ get: function() {
+ return this._batchTexture;
+ }
+ },
+ /**
+ * The default texture to use when there are no batch values
+ *
+ * @memberof BatchTexture.prototype
+ * @type {Texture}
+ * @readonly
+ * @private
+ */
+ defaultTexture: {
+ get: function() {
+ return this._defaultTexture;
+ }
+ },
+ /**
+ * The underlying texture used for picking. The texels are accessed by
+ * batch ID, and the value is the pick color.
+ *
+ * @memberof BatchTexture.prototype
+ * @type {Texture}
+ * @readonly
+ * @private
+ */
+ pickTexture: {
+ get: function() {
+ return this._pickTexture;
+ }
+ }
+});
+BatchTexture.DEFAULT_COLOR_VALUE = Color.WHITE;
+BatchTexture.DEFAULT_SHOW_VALUE = !0;
+function getByteLength(e) {
+ const t = e._textureDimensions;
+ return t.x * t.y * 4;
+}
+function getBatchValues(e) {
+ if (!defined(e._batchValues)) {
+ const t = getByteLength(e), n = new Uint8Array(t).fill(255);
+ e._batchValues = n;
+ }
+ return e._batchValues;
+}
+function getShowAlphaProperties(e) {
+ if (!defined(e._showAlphaProperties)) {
+ const t = 2 * e._featuresLength, n = new Uint8Array(t).fill(255);
+ e._showAlphaProperties = n;
+ }
+ return e._showAlphaProperties;
+}
+BatchTexture.prototype.setShow = function(e, t) {
+ if (t && !defined(this._showAlphaProperties))
+ return;
+ const n = getShowAlphaProperties(this), i = e * 2, r = t ? 255 : 0;
+ if (n[i] !== r) {
+ n[i] = r;
+ const o = getBatchValues(this), s = e * 4 + 3;
+ o[s] = t ? n[i + 1] : 0, this._batchValuesDirty = !0;
+ }
+};
+BatchTexture.prototype.setAllShow = function(e) {
+ const t = this._featuresLength;
+ for (let n = 0; n < t; ++n)
+ this.setShow(n, e);
+};
+BatchTexture.prototype.getShow = function(e) {
+ if (!defined(this._showAlphaProperties))
+ return !0;
+ const t = e * 2;
+ return this._showAlphaProperties[t] === 255;
+};
+const scratchColorBytes$1 = new Array(4);
+BatchTexture.prototype.setColor = function(e, t) {
+ if (Color.equals(t, BatchTexture.DEFAULT_COLOR_VALUE) && !defined(this._batchValues))
+ return;
+ const n = t.toBytes(scratchColorBytes$1), i = n[3], r = getBatchValues(this), o = e * 4, s = getShowAlphaProperties(this), c = e * 2;
+ if (r[o] !== n[0] || r[o + 1] !== n[1] || r[o + 2] !== n[2] || s[c + 1] !== i) {
+ r[o] = n[0], r[o + 1] = n[1], r[o + 2] = n[2];
+ const l = s[c + 1] !== 255, d = s[c] !== 0;
+ r[o + 3] = d ? i : 0, s[c + 1] = i;
+ const f = i !== 255;
+ f && !l ? ++this._translucentFeaturesLength : !f && l && --this._translucentFeaturesLength, this._batchValuesDirty = !0, defined(this._colorChangedCallback) && this._colorChangedCallback(e, t);
+ }
+};
+BatchTexture.prototype.setAllColor = function(e) {
+ const t = this._featuresLength;
+ for (let n = 0; n < t; ++n)
+ this.setColor(n, e);
+};
+BatchTexture.prototype.getColor = function(e, t) {
+ if (!defined(this._batchValues))
+ return Color.clone(BatchTexture.DEFAULT_COLOR_VALUE, t);
+ const n = this._batchValues, i = e * 4, r = this._showAlphaProperties, o = e * 2;
+ return Color.fromBytes(
+ n[i],
+ n[i + 1],
+ n[i + 2],
+ r[o + 1],
+ t
+ );
+};
+BatchTexture.prototype.getPickColor = function(e) {
+ return this._pickIds[e];
+};
+function createTexture$2(e, t, n) {
+ const i = e._textureDimensions;
+ return new Texture({
+ context: t,
+ pixelFormat: PixelFormat$1.RGBA,
+ pixelDatatype: PixelDatatype$1.UNSIGNED_BYTE,
+ source: {
+ width: i.x,
+ height: i.y,
+ arrayBufferView: n
+ },
+ flipY: !1,
+ sampler: Sampler.NEAREST
+ });
+}
+function createPickTexture(e, t) {
+ const n = e._featuresLength;
+ if (!defined(e._pickTexture) && n > 0) {
+ const i = e._pickIds, r = getByteLength(e), o = new Uint8Array(r), s = e._owner, c = e._statistics;
+ for (let l = 0; l < n; ++l) {
+ const d = t.createPickId(s.getFeature(l));
+ i.push(d);
+ const f = d.color, h = l * 4;
+ o[h] = Color.floatToByte(f.red), o[h + 1] = Color.floatToByte(f.green), o[h + 2] = Color.floatToByte(f.blue), o[h + 3] = Color.floatToByte(f.alpha);
+ }
+ e._pickTexture = createTexture$2(e, t, o), defined(c) && (c.batchTableByteLength += e._pickTexture.sizeInBytes);
+ }
+}
+function updateBatchTexture(e) {
+ const t = e._textureDimensions;
+ e._batchTexture.copyFrom({
+ source: {
+ width: t.x,
+ height: t.y,
+ arrayBufferView: e._batchValues
+ }
+ });
+}
+BatchTexture.prototype.update = function(e, t) {
+ const n = t.context;
+ this._defaultTexture = n.defaultTexture;
+ const i = t.passes;
+ (i.pick || i.postProcess) && createPickTexture(this, n), this._batchValuesDirty && (this._batchValuesDirty = !1, defined(this._batchTexture) || (this._batchTexture = createTexture$2(this, n, this._batchValues), defined(this._statistics) && (this._statistics.batchTableByteLength += this._batchTexture.sizeInBytes)), updateBatchTexture(this));
+};
+BatchTexture.prototype.isDestroyed = function() {
+ return !1;
+};
+BatchTexture.prototype.destroy = function() {
+ this._batchTexture = this._batchTexture && this._batchTexture.destroy(), this._pickTexture = this._pickTexture && this._pickTexture.destroy();
+ const e = this._pickIds, t = e.length;
+ for (let n = 0; n < t; ++n)
+ e[n].destroy();
+ return destroyObject(this);
+};
+const ComponentsPerAttribute = {
+ SCALAR: 1,
+ VEC2: 2,
+ VEC3: 3,
+ VEC4: 4,
+ MAT2: 4,
+ MAT3: 9,
+ MAT4: 16
+}, ClassPerType = {
+ SCALAR: void 0,
+ VEC2: Cartesian2,
+ VEC3: Cartesian3,
+ VEC4: Cartesian4,
+ MAT2: Matrix2,
+ MAT3: Matrix3,
+ MAT4: Matrix4
+};
+function getBinaryAccessor(e) {
+ const t = e.componentType;
+ let n;
+ typeof t == "string" ? n = ComponentDatatype$1.fromName(t) : n = t;
+ const i = ComponentsPerAttribute[e.type], r = ClassPerType[e.type];
+ return {
+ componentsPerAttribute: i,
+ classType: r,
+ createArrayBufferView: function(o, s, c) {
+ return ComponentDatatype$1.createArrayBufferView(
+ n,
+ o,
+ s,
+ i * c
+ );
+ }
+ };
+}
+function BatchTableHierarchy(e) {
+ this._classes = void 0, this._classIds = void 0, this._classIndexes = void 0, this._parentCounts = void 0, this._parentIndexes = void 0, this._parentIds = void 0, this._byteLength = 0, initialize$f(this, e.extension, e.binaryBody);
+}
+Object.defineProperties(BatchTableHierarchy.prototype, {
+ byteLength: {
+ get: function() {
+ return this._byteLength;
+ }
+ }
+});
+function initialize$f(e, t, n) {
+ let i, r, o;
+ const s = t.instancesLength, c = t.classes;
+ let l = t.classIds, d = t.parentCounts, f = t.parentIds, h = s, p = 0;
+ defined(l.byteOffset) && (l.componentType = defaultValue(
+ l.componentType,
+ ComponentDatatype$1.UNSIGNED_SHORT
+ ), l.type = AttributeType$1.SCALAR, o = getBinaryAccessor(l), l = o.createArrayBufferView(
+ n.buffer,
+ n.byteOffset + l.byteOffset,
+ s
+ ), p += l.byteLength);
+ let m;
+ if (defined(d)) {
+ for (defined(d.byteOffset) && (d.componentType = defaultValue(
+ d.componentType,
+ ComponentDatatype$1.UNSIGNED_SHORT
+ ), d.type = AttributeType$1.SCALAR, o = getBinaryAccessor(d), d = o.createArrayBufferView(
+ n.buffer,
+ n.byteOffset + d.byteOffset,
+ s
+ ), p += d.byteLength), m = new Uint16Array(s), h = 0, i = 0; i < s; ++i)
+ m[i] = h, h += d[i];
+ p += m.byteLength;
+ }
+ defined(f) && defined(f.byteOffset) && (f.componentType = defaultValue(
+ f.componentType,
+ ComponentDatatype$1.UNSIGNED_SHORT
+ ), f.type = AttributeType$1.SCALAR, o = getBinaryAccessor(f), f = o.createArrayBufferView(
+ n.buffer,
+ n.byteOffset + f.byteOffset,
+ h
+ ), p += f.byteLength);
+ const _ = c.length;
+ for (i = 0; i < _; ++i) {
+ const T = c[i].length, x = c[i].instances, b = getBinaryProperties$1(
+ T,
+ x,
+ n
+ );
+ p += countBinaryPropertyMemory$1(b), c[i].instances = combine$2(b, x);
+ }
+ const y = new Array(_).fill(0), C = new Uint16Array(s);
+ for (i = 0; i < s; ++i)
+ r = l[i], C[i] = y[r], ++y[r];
+ p += C.byteLength, e._classes = c, e._classIds = l, e._classIndexes = C, e._parentCounts = d, e._parentIndexes = m, e._parentIds = f, e._byteLength = p;
+}
+function getBinaryProperties$1(e, t, n) {
+ let i;
+ for (const r in t)
+ if (t.hasOwnProperty(r)) {
+ const o = t[r], s = o.byteOffset;
+ if (defined(s)) {
+ const c = o.componentType, l = o.type;
+ if (!defined(c))
+ throw new RuntimeError("componentType is required.");
+ if (!defined(l))
+ throw new RuntimeError("type is required.");
+ if (!defined(n))
+ throw new RuntimeError(
+ `Property ${r} requires a batch table binary.`
+ );
+ const d = getBinaryAccessor(o), f = d.componentsPerAttribute, h = d.classType, p = d.createArrayBufferView(
+ n.buffer,
+ n.byteOffset + s,
+ e
+ );
+ defined(i) || (i = {}), i[r] = {
+ typedArray: p,
+ componentCount: f,
+ type: h
+ };
+ }
+ }
+ return i;
+}
+function countBinaryPropertyMemory$1(e) {
+ let t = 0;
+ for (const n in e)
+ e.hasOwnProperty(n) && (t += e[n].typedArray.byteLength);
+ return t;
+}
+const scratchVisited = [], scratchStack$1 = [];
+let marker = 0;
+function traverseHierarchyMultipleParents(e, t, n) {
+ const i = e._classIds, r = e._parentCounts, o = e._parentIds, s = e._parentIndexes, c = i.length, l = scratchVisited;
+ l.length = Math.max(l.length, c);
+ const d = ++marker, f = scratchStack$1;
+ for (f.length = 0, f.push(t); f.length > 0; ) {
+ if (t = f.pop(), l[t] === d)
+ continue;
+ l[t] = d;
+ const h = n(e, t);
+ if (defined(h))
+ return h;
+ const p = r[t], m = s[t];
+ for (let _ = 0; _ < p; ++_) {
+ const y = o[m + _];
+ y !== t && f.push(y);
+ }
+ }
+}
+function traverseHierarchySingleParent(e, t, n) {
+ let i = !0;
+ for (; i; ) {
+ const r = n(e, t);
+ if (defined(r))
+ return r;
+ const o = e._parentIds[t];
+ i = o !== t, t = o;
+ }
+}
+function traverseHierarchy(e, t, n) {
+ const i = e._parentCounts, r = e._parentIds;
+ if (defined(r)) {
+ if (defined(i))
+ return traverseHierarchyMultipleParents(
+ e,
+ t,
+ n
+ );
+ } else return n(e, t);
+ return traverseHierarchySingleParent(
+ e,
+ t,
+ n
+ );
+}
+BatchTableHierarchy.prototype.hasProperty = function(e, t) {
+ const n = traverseHierarchy(this, e, function(i, r) {
+ const o = i._classIds[r], s = i._classes[o].instances;
+ if (defined(s[t]))
+ return !0;
+ });
+ return defined(n);
+};
+BatchTableHierarchy.prototype.propertyExists = function(e) {
+ const t = this._classes, n = t.length;
+ for (let i = 0; i < n; ++i) {
+ const r = t[i].instances;
+ if (defined(r[e]))
+ return !0;
+ }
+ return !1;
+};
+BatchTableHierarchy.prototype.getPropertyIds = function(e, t) {
+ return t = defined(t) ? t : [], t.length = 0, traverseHierarchy(this, e, function(n, i) {
+ const r = n._classIds[i], o = n._classes[r].instances;
+ for (const s in o)
+ o.hasOwnProperty(s) && t.indexOf(s) === -1 && t.push(s);
+ }), t;
+};
+BatchTableHierarchy.prototype.getProperty = function(e, t) {
+ return traverseHierarchy(this, e, function(n, i) {
+ const r = n._classIds[i], o = n._classes[r], s = n._classIndexes[i], c = o.instances[t];
+ if (defined(c))
+ return defined(c.typedArray) ? getBinaryProperty$1(c, s) : clone$1(c[s], !0);
+ });
+};
+function getBinaryProperty$1(e, t) {
+ const n = e.typedArray, i = e.componentCount;
+ return i === 1 ? n[t] : e.type.unpack(n, t * i);
+}
+BatchTableHierarchy.prototype.setProperty = function(e, t, n) {
+ const i = traverseHierarchy(this, e, function(r, o) {
+ const s = r._classIds[o], c = r._classes[s], l = r._classIndexes[o], d = c.instances[t];
+ if (defined(d))
+ return defined(d.typedArray) ? setBinaryProperty$1(d, l, n) : d[l] = clone$1(n, !0), !0;
+ });
+ return defined(i);
+};
+function setBinaryProperty$1(e, t, n) {
+ const i = e.typedArray, r = e.componentCount;
+ r === 1 ? i[t] = n : e.type.pack(n, i, t * r);
+}
+BatchTableHierarchy.prototype.isClass = function(e, t) {
+ const n = traverseHierarchy(this, e, function(i, r) {
+ const o = i._classIds[r];
+ if (i._classes[o].name === t)
+ return !0;
+ });
+ return defined(n);
+};
+BatchTableHierarchy.prototype.getClassName = function(e) {
+ const t = this._classIds[e];
+ return this._classes[t].name;
+};
+const Cesium3DTileColorBlendMode = {
+ /**
+ * Multiplies the source color by the feature color.
+ *
+ * @type {number}
+ * @constant
+ */
+ HIGHLIGHT: 0,
+ /**
+ * Replaces the source color with the feature color.
+ *
+ * @type {number}
+ * @constant
+ */
+ REPLACE: 1,
+ /**
+ * Blends the source color and feature color together.
+ *
+ * @type {number}
+ * @constant
+ */
+ MIX: 2
+}, Cesium3DTileColorBlendMode$1 = Object.freeze(Cesium3DTileColorBlendMode), DEFAULT_COLOR_VALUE$3 = BatchTexture.DEFAULT_COLOR_VALUE, DEFAULT_SHOW_VALUE$3 = BatchTexture.DEFAULT_SHOW_VALUE;
+function Cesium3DTileBatchTable(e, t, n, i, r) {
+ this.featuresLength = t;
+ let o;
+ defined(n) && (o = n.extensions), this._extensions = defaultValue(o, {});
+ const s = initializeProperties(n);
+ this._properties = s, this._batchTableHierarchy = initializeHierarchy(
+ this,
+ n,
+ i
+ );
+ const c = getBinaryProperties(
+ t,
+ s,
+ i
+ );
+ this._binaryPropertiesByteLength = countBinaryPropertyMemory(
+ c
+ ), this._batchTableBinaryProperties = c, this._content = e, this._batchTexture = new BatchTexture({
+ featuresLength: t,
+ colorChangedCallback: r,
+ owner: e,
+ statistics: e.tileset.statistics
+ });
+}
+Cesium3DTileBatchTable._deprecationWarning = deprecationWarning;
+Object.defineProperties(Cesium3DTileBatchTable.prototype, {
+ /**
+ * Size of the batch table, including the batch table hierarchy's binary
+ * buffers and any binary properties. JSON data is not counted.
+ *
+ * @memberof Cesium3DTileBatchTable.prototype
+ * @type {number}
+ * @readonly
+ * @private
+ */
+ batchTableByteLength: {
+ get: function() {
+ let e = this._binaryPropertiesByteLength;
+ return defined(this._batchTableHierarchy) && (e += this._batchTableHierarchy.byteLength), e += this._batchTexture.byteLength, e;
+ }
+ }
+});
+function initializeProperties(e) {
+ const t = {};
+ if (!defined(e))
+ return t;
+ for (const n in e)
+ e.hasOwnProperty(n) && n !== "HIERARCHY" && // Deprecated HIERARCHY property
+ n !== "extensions" && n !== "extras" && (t[n] = clone$1(e[n], !0));
+ return t;
+}
+function initializeHierarchy(e, t, n) {
+ if (!defined(t))
+ return;
+ let i = e._extensions["3DTILES_batch_table_hierarchy"];
+ const r = t.HIERARCHY;
+ if (defined(r) && (Cesium3DTileBatchTable._deprecationWarning(
+ "batchTableHierarchyExtension",
+ "The batch table HIERARCHY property has been moved to an extension. Use extensions.3DTILES_batch_table_hierarchy instead."
+ ), e._extensions["3DTILES_batch_table_hierarchy"] = r, i = r), !!defined(i))
+ return new BatchTableHierarchy({
+ extension: i,
+ binaryBody: n
+ });
+}
+function getBinaryProperties(e, t, n) {
+ let i;
+ for (const r in t)
+ if (t.hasOwnProperty(r)) {
+ const o = t[r], s = o.byteOffset;
+ if (defined(s)) {
+ const c = o.componentType, l = o.type;
+ if (!defined(c))
+ throw new RuntimeError("componentType is required.");
+ if (!defined(l))
+ throw new RuntimeError("type is required.");
+ if (!defined(n))
+ throw new RuntimeError(
+ `Property ${r} requires a batch table binary.`
+ );
+ const d = getBinaryAccessor(o), f = d.componentsPerAttribute, h = d.classType, p = d.createArrayBufferView(
+ n.buffer,
+ n.byteOffset + s,
+ e
+ );
+ defined(i) || (i = {}), i[r] = {
+ typedArray: p,
+ componentCount: f,
+ type: h
+ };
+ }
+ }
+ return i;
+}
+function countBinaryPropertyMemory(e) {
+ if (!defined(e))
+ return 0;
+ let t = 0;
+ for (const n in e)
+ e.hasOwnProperty(n) && (t += e[n].typedArray.byteLength);
+ return t;
+}
+Cesium3DTileBatchTable.getBinaryProperties = function(e, t, n) {
+ return getBinaryProperties(e, t, n);
+};
+Cesium3DTileBatchTable.prototype.setShow = function(e, t) {
+ this._batchTexture.setShow(e, t);
+};
+Cesium3DTileBatchTable.prototype.setAllShow = function(e) {
+ this._batchTexture.setAllShow(e);
+};
+Cesium3DTileBatchTable.prototype.getShow = function(e) {
+ return this._batchTexture.getShow(e);
+};
+Cesium3DTileBatchTable.prototype.setColor = function(e, t) {
+ this._batchTexture.setColor(e, t);
+};
+Cesium3DTileBatchTable.prototype.setAllColor = function(e) {
+ this._batchTexture.setAllColor(e);
+};
+Cesium3DTileBatchTable.prototype.getColor = function(e, t) {
+ return this._batchTexture.getColor(e, t);
+};
+Cesium3DTileBatchTable.prototype.getPickColor = function(e) {
+ return this._batchTexture.getPickColor(e);
+};
+const scratchColor$o = new Color();
+Cesium3DTileBatchTable.prototype.applyStyle = function(e) {
+ if (!defined(e)) {
+ this.setAllColor(DEFAULT_COLOR_VALUE$3), this.setAllShow(DEFAULT_SHOW_VALUE$3);
+ return;
+ }
+ const t = this._content, n = this.featuresLength;
+ for (let i = 0; i < n; ++i) {
+ const r = t.getFeature(i), o = defined(e.color) ? defaultValue(
+ e.color.evaluateColor(r, scratchColor$o),
+ DEFAULT_COLOR_VALUE$3
+ ) : DEFAULT_COLOR_VALUE$3, s = defined(e.show) ? defaultValue(e.show.evaluate(r), DEFAULT_SHOW_VALUE$3) : DEFAULT_SHOW_VALUE$3;
+ this.setColor(i, o), this.setShow(i, s);
+ }
+};
+function getBinaryProperty(e, t) {
+ const n = e.typedArray, i = e.componentCount;
+ return i === 1 ? n[t] : e.type.unpack(n, t * i);
+}
+function setBinaryProperty(e, t, n) {
+ const i = e.typedArray, r = e.componentCount;
+ r === 1 ? i[t] = n : e.type.pack(n, i, t * r);
+}
+Cesium3DTileBatchTable.prototype.isClass = function(e, t) {
+ const n = this._batchTableHierarchy;
+ return defined(n) ? n.isClass(e, t) : !1;
+};
+Cesium3DTileBatchTable.prototype.isExactClass = function(e, t) {
+ return this.getExactClassName(e) === t;
+};
+Cesium3DTileBatchTable.prototype.getExactClassName = function(e) {
+ const t = this._batchTableHierarchy;
+ if (defined(t))
+ return t.getClassName(e);
+};
+Cesium3DTileBatchTable.prototype.hasProperty = function(e, t) {
+ return defined(this._properties[t]) || defined(this._batchTableHierarchy) && this._batchTableHierarchy.hasProperty(e, t);
+};
+Cesium3DTileBatchTable.prototype.hasPropertyBySemantic = function() {
+ return !1;
+};
+Cesium3DTileBatchTable.prototype.getPropertyIds = function(e, t) {
+ t = defined(t) ? t : [], t.length = 0;
+ const n = Object.keys(this._properties);
+ return t.push.apply(t, n), defined(this._batchTableHierarchy) && t.push.apply(
+ t,
+ this._batchTableHierarchy.getPropertyIds(e, n)
+ ), t;
+};
+Cesium3DTileBatchTable.prototype.getPropertyBySemantic = function(e, t) {
+};
+Cesium3DTileBatchTable.prototype.getProperty = function(e, t) {
+ if (defined(this._batchTableBinaryProperties)) {
+ const i = this._batchTableBinaryProperties[t];
+ if (defined(i))
+ return getBinaryProperty(i, e);
+ }
+ const n = this._properties[t];
+ if (defined(n))
+ return clone$1(n[e], !0);
+ if (defined(this._batchTableHierarchy)) {
+ const i = this._batchTableHierarchy.getProperty(
+ e,
+ t
+ );
+ if (defined(i))
+ return i;
+ }
+};
+Cesium3DTileBatchTable.prototype.setProperty = function(e, t, n) {
+ const i = this.featuresLength;
+ if (defined(this._batchTableBinaryProperties)) {
+ const o = this._batchTableBinaryProperties[t];
+ if (defined(o)) {
+ setBinaryProperty(o, e, n);
+ return;
+ }
+ }
+ if (defined(this._batchTableHierarchy) && this._batchTableHierarchy.setProperty(e, t, n))
+ return;
+ let r = this._properties[t];
+ defined(r) || (this._properties[t] = new Array(i), r = this._properties[t]), r[e] = clone$1(n, !0);
+};
+function getGlslComputeSt(e) {
+ return e._batchTexture.textureDimensions.y === 1 ? `uniform vec4 tile_textureStep;
+vec2 computeSt(float batchId)
+{
+ float stepX = tile_textureStep.x;
+ float centerX = tile_textureStep.y;
+ return vec2(centerX + (batchId * stepX), 0.5);
+}
+` : `uniform vec4 tile_textureStep;
+uniform vec2 tile_textureDimensions;
+vec2 computeSt(float batchId)
+{
+ float stepX = tile_textureStep.x;
+ float centerX = tile_textureStep.y;
+ float stepY = tile_textureStep.z;
+ float centerY = tile_textureStep.w;
+ float xId = mod(batchId, tile_textureDimensions.x);
+ float yId = floor(batchId / tile_textureDimensions.x);
+ return vec2(centerX + (xId * stepX), centerY + (yId * stepY));
+}
+`;
+}
+Cesium3DTileBatchTable.prototype.getVertexShaderCallback = function(e, t, n) {
+ if (this.featuresLength === 0)
+ return;
+ const i = this;
+ return function(r) {
+ const o = modifyDiffuse(
+ r,
+ n,
+ !1
+ );
+ let s;
+ return ContextLimits.maximumVertexTextureImageUnits > 0 ? (s = "", e && (s += `uniform bool tile_translucentCommand;
+`), s += `uniform sampler2D tile_batchTexture;
+out vec4 tile_featureColor;
+out vec2 tile_featureSt;
+void main()
+{
+ vec2 st = computeSt(${t});
+ vec4 featureProperties = texture(tile_batchTexture, st);
+ tile_color(featureProperties);
+ float show = ceil(featureProperties.a);
+ gl_Position *= show;
+`, e && (s += ` bool isStyleTranslucent = (featureProperties.a != 1.0);
+ if (czm_pass == czm_passTranslucent)
+ {
+ if (!isStyleTranslucent && !tile_translucentCommand)
+ {
+ gl_Position *= 0.0;
+ }
+ }
+ else
+ {
+ if (isStyleTranslucent)
+ {
+ gl_Position *= 0.0;
+ }
+ }
+`), s += ` tile_featureColor = featureProperties;
+ tile_featureSt = st;
+}`) : s = `out vec2 tile_featureSt;
+void main()
+{
+ tile_color(vec4(1.0));
+ tile_featureSt = computeSt(${t});
+}`, `${o}
+${getGlslComputeSt(i)}${s}`;
+ };
+};
+function getDefaultShader(e, t) {
+ return e = ShaderSource.replaceMain(e, "tile_main"), t ? `${e}uniform float tile_colorBlend;
+void tile_color(vec4 tile_featureColor)
+{
+ tile_main();
+ tile_featureColor = czm_gammaCorrect(tile_featureColor);
+ out_FragColor.a *= tile_featureColor.a;
+ float highlight = ceil(tile_colorBlend);
+ out_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight);
+}
+` : `${e}void tile_color(vec4 tile_featureColor)
+{
+ tile_main();
+}
+`;
+}
+function replaceDiffuseTextureCalls(e, t) {
+ const n = `texture(${t}`;
+ let i = 0, r = e.indexOf(n, i), o;
+ for (; r > -1; ) {
+ let s = 0;
+ for (let d = r; d < e.length; ++d) {
+ const f = e.charAt(d);
+ if (f === "(")
+ ++s;
+ else if (f === ")" && (--s, s === 0)) {
+ o = d + 1;
+ break;
+ }
+ }
+ const l = `tile_diffuse_final(${e.slice(r, o)}, tile_diffuse)`;
+ e = e.slice(0, r) + l + e.slice(o), i = r + l.length, r = e.indexOf(n, i);
+ }
+ return e;
+}
+function modifyDiffuse(e, t, n) {
+ if (!defined(t))
+ return getDefaultShader(e, n);
+ let i = new RegExp(
+ `(uniform|attribute|in)\\s+(vec[34]|sampler2D)\\s+${t};`
+ );
+ const r = e.match(i);
+ if (!defined(r))
+ return getDefaultShader(e, n);
+ const o = r[0], s = r[2];
+ e = ShaderSource.replaceMain(e, "tile_main"), e = e.replace(o, "");
+ const c = `bool isWhite(vec3 color)
+{
+ return all(greaterThan(color, vec3(1.0 - czm_epsilon3)));
+}
+vec4 tile_diffuse_final(vec4 sourceDiffuse, vec4 tileDiffuse)
+{
+ vec4 blendDiffuse = mix(sourceDiffuse, tileDiffuse, tile_colorBlend);
+ vec4 diffuse = isWhite(tileDiffuse.rgb) ? sourceDiffuse : blendDiffuse;
+ return vec4(diffuse.rgb, sourceDiffuse.a);
+}
+`, l = ` tile_featureColor = czm_gammaCorrect(tile_featureColor);
+ out_FragColor.a *= tile_featureColor.a;
+ float highlight = ceil(tile_colorBlend);
+ out_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight);
+`;
+ let d;
+ if (s === "vec3" || s === "vec4") {
+ const f = s === "vec3" ? `vec4(${t}, 1.0)` : t, h = s === "vec3" ? "tile_diffuse.xyz" : "tile_diffuse";
+ i = new RegExp(t, "g"), e = e.replace(i, h), d = ` vec4 source = ${f};
+ tile_diffuse = tile_diffuse_final(source, tile_featureColor);
+ tile_main();
+`;
+ } else s === "sampler2D" && (e = replaceDiffuseTextureCalls(e, t), d = ` tile_diffuse = tile_featureColor;
+ tile_main();
+`);
+ return e = `uniform float tile_colorBlend;
+vec4 tile_diffuse = vec4(1.0);
+${c}${o}
+${e}
+void tile_color(vec4 tile_featureColor)
+{
+${d}`, n && (e += l), e += `}
+`, e;
+}
+Cesium3DTileBatchTable.prototype.getFragmentShaderCallback = function(e, t, n) {
+ if (this.featuresLength !== 0)
+ return function(i) {
+ return i = modifyDiffuse(i, t, !0), ContextLimits.maximumVertexTextureImageUnits > 0 ? (i += `uniform sampler2D tile_pickTexture;
+in vec2 tile_featureSt;
+in vec4 tile_featureColor;
+void main()
+{
+ tile_color(tile_featureColor);
+`, n && (i += ` out_FragColor.rgb *= out_FragColor.a;
+`), i += "}") : (e && (i += `uniform bool tile_translucentCommand;
+`), i += `uniform sampler2D tile_pickTexture;
+uniform sampler2D tile_batchTexture;
+in vec2 tile_featureSt;
+void main()
+{
+ vec4 featureProperties = texture(tile_batchTexture, tile_featureSt);
+ if (featureProperties.a == 0.0) {
+ discard;
+ }
+`, e && (i += ` bool isStyleTranslucent = (featureProperties.a != 1.0);
+ if (czm_pass == czm_passTranslucent)
+ {
+ if (!isStyleTranslucent && !tile_translucentCommand)
+ {
+ discard;
+ }
+ }
+ else
+ {
+ if (isStyleTranslucent)
+ {
+ discard;
+ }
+ }
+`), i += ` tile_color(featureProperties);
+`, n && (i += ` out_FragColor.rgb *= out_FragColor.a;
+`), i += `}
+`), i;
+ };
+};
+Cesium3DTileBatchTable.prototype.getClassificationFragmentShaderCallback = function() {
+ if (this.featuresLength !== 0)
+ return function(e) {
+ return e = ShaderSource.replaceMain(e, "tile_main"), ContextLimits.maximumVertexTextureImageUnits > 0 ? e += `uniform sampler2D tile_pickTexture;
+in vec2 tile_featureSt;
+in vec4 tile_featureColor;
+void main()
+{
+ tile_main();
+ out_FragColor = tile_featureColor;
+ out_FragColor.rgb *= out_FragColor.a;
+}` : e += `uniform sampler2D tile_batchTexture;
+uniform sampler2D tile_pickTexture;
+in vec2 tile_featureSt;
+void main()
+{
+ tile_main();
+ vec4 featureProperties = texture(tile_batchTexture, tile_featureSt);
+ if (featureProperties.a == 0.0) {
+ discard;
+ }
+ out_FragColor = featureProperties;
+ out_FragColor.rgb *= out_FragColor.a;
+}
+`, e;
+ };
+};
+function getColorBlend(e) {
+ const t = e._content.tileset, n = t.colorBlendMode, i = t.colorBlendAmount;
+ if (n === Cesium3DTileColorBlendMode$1.HIGHLIGHT)
+ return 0;
+ if (n === Cesium3DTileColorBlendMode$1.REPLACE)
+ return 1;
+ if (n === Cesium3DTileColorBlendMode$1.MIX)
+ return CesiumMath.clamp(i, CesiumMath.EPSILON4, 1);
+}
+Cesium3DTileBatchTable.prototype.getUniformMapCallback = function() {
+ if (this.featuresLength === 0)
+ return;
+ const e = this;
+ return function(t) {
+ return combine$2(t, {
+ tile_batchTexture: function() {
+ return defaultValue(
+ e._batchTexture.batchTexture,
+ e._batchTexture.defaultTexture
+ );
+ },
+ tile_textureDimensions: function() {
+ return e._batchTexture.textureDimensions;
+ },
+ tile_textureStep: function() {
+ return e._batchTexture.textureStep;
+ },
+ tile_colorBlend: function() {
+ return getColorBlend(e);
+ },
+ tile_pickTexture: function() {
+ return e._batchTexture.pickTexture;
+ }
+ });
+ };
+};
+Cesium3DTileBatchTable.prototype.getPickId = function() {
+ return "texture(tile_pickTexture, tile_featureSt)";
+};
+const StyleCommandsNeeded$2 = {
+ ALL_OPAQUE: 0,
+ ALL_TRANSLUCENT: 1,
+ OPAQUE_AND_TRANSLUCENT: 2
+};
+Cesium3DTileBatchTable.prototype.addDerivedCommands = function(e, t) {
+ const n = e.commandList, i = n.length, r = this._content._tile, o = r._finalResolution, s = r.tileset, c = s.isSkippingLevelOfDetail && s.hasMixedContent && e.context.stencilBuffer, l = getStyleCommandsNeeded(this);
+ for (let d = t; d < i; ++d) {
+ const f = n[d];
+ if (f.pass === Pass$1.COMPUTE)
+ continue;
+ let h = f.derivedCommands.tileset;
+ (!defined(h) || f.dirty) && (h = {}, f.derivedCommands.tileset = h, h.originalCommand = deriveCommand(f), f.dirty = !1);
+ const p = h.originalCommand;
+ l !== StyleCommandsNeeded$2.ALL_OPAQUE && f.pass !== Pass$1.TRANSLUCENT && (defined(h.translucent) || (h.translucent = deriveTranslucentCommand$1(p))), l !== StyleCommandsNeeded$2.ALL_TRANSLUCENT && f.pass !== Pass$1.TRANSLUCENT && (defined(h.opaque) || (h.opaque = deriveOpaqueCommand(p)), c && (o || (defined(h.zback) || (h.zback = deriveZBackfaceCommand(
+ e.context,
+ p
+ )), s._backfaceCommands.push(h.zback)), (!defined(h.stencil) || r._selectionDepth !== getLastSelectionDepth$1(h.stencil)) && (f.renderState.depthMask ? h.stencil = deriveStencilCommand(
+ p,
+ r._selectionDepth
+ ) : h.stencil = h.opaque)));
+ const m = c ? h.stencil : h.opaque, _ = h.translucent;
+ f.pass !== Pass$1.TRANSLUCENT ? (l === StyleCommandsNeeded$2.ALL_OPAQUE && (n[d] = m), l === StyleCommandsNeeded$2.ALL_TRANSLUCENT && (n[d] = _), l === StyleCommandsNeeded$2.OPAQUE_AND_TRANSLUCENT && (n[d] = m, n.push(_))) : n[d] = p;
+ }
+};
+function getStyleCommandsNeeded(e) {
+ const t = e._batchTexture.translucentFeaturesLength;
+ return t === 0 ? StyleCommandsNeeded$2.ALL_OPAQUE : t === e.featuresLength ? StyleCommandsNeeded$2.ALL_TRANSLUCENT : StyleCommandsNeeded$2.OPAQUE_AND_TRANSLUCENT;
+}
+function deriveCommand(e) {
+ const t = DrawCommand.shallowClone(e), n = t.pass === Pass$1.TRANSLUCENT;
+ return t.uniformMap = defined(t.uniformMap) ? t.uniformMap : {}, t.uniformMap.tile_translucentCommand = function() {
+ return n;
+ }, t;
+}
+function deriveTranslucentCommand$1(e) {
+ const t = DrawCommand.shallowClone(e);
+ return t.pass = Pass$1.TRANSLUCENT, t.renderState = getTranslucentRenderState$1(e.renderState), t;
+}
+function deriveOpaqueCommand(e) {
+ const t = DrawCommand.shallowClone(e);
+ return t.renderState = getOpaqueRenderState(e.renderState), t;
+}
+function getLogDepthPolygonOffsetFragmentShaderProgram(e, t) {
+ let n = e.shaderCache.getDerivedShaderProgram(
+ t,
+ "zBackfaceLogDepth"
+ );
+ if (!defined(n)) {
+ const i = t.fragmentShaderSource.clone();
+ i.defines = defined(i.defines) ? i.defines.slice(0) : [], i.defines.push("POLYGON_OFFSET"), n = e.shaderCache.createDerivedShaderProgram(
+ t,
+ "zBackfaceLogDepth",
+ {
+ vertexShaderSource: t.vertexShaderSource,
+ fragmentShaderSource: i,
+ attributeLocations: t._attributeLocations
+ }
+ );
+ }
+ return n;
+}
+function deriveZBackfaceCommand(e, t) {
+ const n = DrawCommand.shallowClone(t), i = clone$1(n.renderState, !0);
+ i.cull.enabled = !0, i.cull.face = CullFace$1.FRONT, i.colorMask = {
+ red: !1,
+ green: !1,
+ blue: !1,
+ alpha: !1
+ }, i.polygonOffset = {
+ enabled: !0,
+ factor: 5,
+ units: 5
+ }, i.stencilTest = StencilConstants$1.setCesium3DTileBit(), i.stencilMask = StencilConstants$1.CESIUM_3D_TILE_MASK, n.renderState = RenderState.fromCache(i), n.castShadows = !1, n.receiveShadows = !1, n.uniformMap = clone$1(t.uniformMap);
+ const r = new Cartesian2(5, 5);
+ return n.uniformMap.u_polygonOffset = function() {
+ return r;
+ }, n.shaderProgram = getLogDepthPolygonOffsetFragmentShaderProgram(
+ e,
+ t.shaderProgram
+ ), n;
+}
+function deriveStencilCommand(e, t) {
+ const n = DrawCommand.shallowClone(e), i = clone$1(n.renderState, !0);
+ return i.stencilTest.enabled = !0, i.stencilTest.mask = StencilConstants$1.SKIP_LOD_MASK, i.stencilTest.reference = StencilConstants$1.CESIUM_3D_TILE_MASK | t << StencilConstants$1.SKIP_LOD_BIT_SHIFT, i.stencilTest.frontFunction = StencilFunction$1.GREATER_OR_EQUAL, i.stencilTest.frontOperation.zPass = StencilOperation$1.REPLACE, i.stencilTest.backFunction = StencilFunction$1.GREATER_OR_EQUAL, i.stencilTest.backOperation.zPass = StencilOperation$1.REPLACE, i.stencilMask = StencilConstants$1.CESIUM_3D_TILE_MASK | StencilConstants$1.SKIP_LOD_MASK, n.renderState = RenderState.fromCache(i), n;
+}
+function getLastSelectionDepth$1(e) {
+ return (e.renderState.stencilTest.reference & StencilConstants$1.SKIP_LOD_MASK) >>> StencilConstants$1.SKIP_LOD_BIT_SHIFT;
+}
+function getTranslucentRenderState$1(e) {
+ const t = clone$1(e, !0);
+ return t.cull.enabled = !1, t.depthTest.enabled = !0, t.depthMask = !1, t.blending = BlendingState$1.ALPHA_BLEND, t.stencilTest = StencilConstants$1.setCesium3DTileBit(), t.stencilMask = StencilConstants$1.CESIUM_3D_TILE_MASK, RenderState.fromCache(t);
+}
+function getOpaqueRenderState(e) {
+ const t = clone$1(e, !0);
+ return t.stencilTest = StencilConstants$1.setCesium3DTileBit(), t.stencilMask = StencilConstants$1.CESIUM_3D_TILE_MASK, RenderState.fromCache(t);
+}
+Cesium3DTileBatchTable.prototype.update = function(e, t) {
+ this._batchTexture.update(e, t);
+};
+Cesium3DTileBatchTable.prototype.isDestroyed = function() {
+ return !1;
+};
+Cesium3DTileBatchTable.prototype.destroy = function() {
+ return this._batchTexture = this._batchTexture && this._batchTexture.destroy(), destroyObject(this);
+};
+function Vector3DTileBatch(e) {
+ this.offset = e.offset, this.count = e.count, this.color = e.color, this.batchIds = e.batchIds;
+}
+const VectorTileVS = `in vec3 position;
+in float a_batchId;
+
+uniform mat4 u_modifiedModelViewProjection;
+
+void main()
+{
+ gl_Position = czm_depthClamp(u_modifiedModelViewProjection * vec4(position, 1.0));
+}
+`;
+function Cesium3DTileFeature(e, t) {
+ this._content = e, this._batchId = t, this._color = void 0;
+}
+Object.defineProperties(Cesium3DTileFeature.prototype, {
+ /**
+ * Gets or sets if the feature will be shown. This is set for all features
+ * when a style's show is evaluated.
+ *
+ * @memberof Cesium3DTileFeature.prototype
+ *
+ * @type {boolean}
+ *
+ * @default true
+ */
+ show: {
+ get: function() {
+ return this._content.batchTable.getShow(this._batchId);
+ },
+ set: function(e) {
+ this._content.batchTable.setShow(this._batchId, e);
+ }
+ },
+ /**
+ * Gets or sets the highlight color multiplied with the feature's color. When
+ * this is white, the feature's color is not changed. This is set for all features
+ * when a style's color is evaluated.
+ *
+ * @memberof Cesium3DTileFeature.prototype
+ *
+ * @type {Color}
+ *
+ * @default {@link Color.WHITE}
+ */
+ color: {
+ get: function() {
+ return defined(this._color) || (this._color = new Color()), this._content.batchTable.getColor(this._batchId, this._color);
+ },
+ set: function(e) {
+ this._content.batchTable.setColor(this._batchId, e);
+ }
+ },
+ /**
+ * Gets a typed array containing the ECEF positions of the polyline.
+ * Returns undefined if {@link Cesium3DTileset#vectorKeepDecodedPositions} is false
+ * or the feature is not a polyline in a vector tile.
+ *
+ * @memberof Cesium3DTileFeature.prototype
+ *
+ * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
+ *
+ * @type {Float64Array}
+ */
+ polylinePositions: {
+ get: function() {
+ if (defined(this._content.getPolylinePositions))
+ return this._content.getPolylinePositions(this._batchId);
+ }
+ },
+ /**
+ * Gets the content of the tile containing the feature.
+ *
+ * @memberof Cesium3DTileFeature.prototype
+ *
+ * @type {Cesium3DTileContent}
+ *
+ * @readonly
+ * @private
+ */
+ content: {
+ get: function() {
+ return this._content;
+ }
+ },
+ /**
+ * Gets the tileset containing the feature.
+ *
+ * @memberof Cesium3DTileFeature.prototype
+ *
+ * @type {Cesium3DTileset}
+ *
+ * @readonly
+ */
+ tileset: {
+ get: function() {
+ return this._content.tileset;
+ }
+ },
+ /**
+ * All objects returned by {@link Scene#pick} have a primitive property. This returns
+ * the tileset containing the feature.
+ *
+ * @memberof Cesium3DTileFeature.prototype
+ *
+ * @type {Cesium3DTileset}
+ *
+ * @readonly
+ */
+ primitive: {
+ get: function() {
+ return this._content.tileset;
+ }
+ },
+ /**
+ * Get the feature ID associated with this feature. For 3D Tiles 1.0, the
+ * batch ID is returned. For EXT_mesh_features, this is the feature ID from
+ * the selected feature ID set.
+ *
+ * @memberof Cesium3DTileFeature.prototype
+ *
+ * @type {number}
+ *
+ * @readonly
+ * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
+ */
+ featureId: {
+ get: function() {
+ return this._batchId;
+ }
+ },
+ /**
+ * @private
+ */
+ pickId: {
+ get: function() {
+ return this._content.batchTable.getPickColor(this._batchId);
+ }
+ }
+});
+Cesium3DTileFeature.prototype.hasProperty = function(e) {
+ return this._content.batchTable.hasProperty(this._batchId, e);
+};
+Cesium3DTileFeature.prototype.getPropertyIds = function(e) {
+ return this._content.batchTable.getPropertyIds(this._batchId, e);
+};
+Cesium3DTileFeature.prototype.getProperty = function(e) {
+ return this._content.batchTable.getProperty(this._batchId, e);
+};
+Cesium3DTileFeature.getPropertyInherited = function(e, t, n) {
+ const i = e.batchTable;
+ if (defined(i)) {
+ if (i.hasPropertyBySemantic(t, n))
+ return i.getPropertyBySemantic(t, n);
+ if (i.hasProperty(t, n))
+ return i.getProperty(t, n);
+ }
+ const r = e.metadata;
+ if (defined(r)) {
+ if (r.hasPropertyBySemantic(n))
+ return r.getPropertyBySemantic(n);
+ if (r.hasProperty(n))
+ return r.getProperty(n);
+ }
+ const o = e.tile, s = o.metadata;
+ if (defined(s)) {
+ if (s.hasPropertyBySemantic(n))
+ return s.getPropertyBySemantic(n);
+ if (s.hasProperty(n))
+ return s.getProperty(n);
+ }
+ let c;
+ if (defined(o.implicitSubtree) && (c = o.implicitSubtree.metadata), defined(c)) {
+ if (c.hasPropertyBySemantic(n))
+ return c.getPropertyBySemantic(n);
+ if (c.hasProperty(n))
+ return c.getProperty(n);
+ }
+ const l = defined(e.group) ? e.group.metadata : void 0;
+ if (defined(l)) {
+ if (l.hasPropertyBySemantic(n))
+ return l.getPropertyBySemantic(n);
+ if (l.hasProperty(n))
+ return l.getProperty(n);
+ }
+ const d = e.tileset.metadata;
+ if (defined(d)) {
+ if (d.hasPropertyBySemantic(n))
+ return d.getPropertyBySemantic(n);
+ if (d.hasProperty(n))
+ return d.getProperty(n);
+ }
+};
+Cesium3DTileFeature.prototype.getPropertyInherited = function(e) {
+ return Cesium3DTileFeature.getPropertyInherited(
+ this._content,
+ this._batchId,
+ e
+ );
+};
+Cesium3DTileFeature.prototype.setProperty = function(e, t) {
+ this._content.batchTable.setProperty(this._batchId, e, t), this._content.featurePropertiesDirty = !0;
+};
+Cesium3DTileFeature.prototype.isExactClass = function(e) {
+ return this._content.batchTable.isExactClass(this._batchId, e);
+};
+Cesium3DTileFeature.prototype.isClass = function(e) {
+ return this._content.batchTable.isClass(this._batchId, e);
+};
+Cesium3DTileFeature.prototype.getExactClassName = function() {
+ return this._content.batchTable.getExactClassName(this._batchId);
+};
+class Hooks {
+ /**
+ * @callback HookCallback
+ * @this {*|Jsep} this
+ * @param {Jsep} env
+ * @returns: void
+ */
+ /**
+ * Adds the given callback to the list of callbacks for the given hook.
+ *
+ * The callback will be invoked when the hook it is registered for is run.
+ *
+ * One callback function can be registered to multiple hooks and the same hook multiple times.
+ *
+ * @param {string|object} name The name of the hook, or an object of callbacks keyed by name
+ * @param {HookCallback|boolean} callback The callback function which is given environment variables.
+ * @param {?boolean} [first=false] Will add the hook to the top of the list (defaults to the bottom)
+ * @public
+ */
+ add(t, n, i) {
+ if (typeof arguments[0] != "string")
+ for (let r in arguments[0])
+ this.add(r, arguments[0][r], arguments[1]);
+ else
+ (Array.isArray(t) ? t : [t]).forEach(function(r) {
+ this[r] = this[r] || [], n && this[r][i ? "unshift" : "push"](n);
+ }, this);
+ }
+ /**
+ * Runs a hook invoking all registered callbacks with the given environment variables.
+ *
+ * Callbacks will be invoked synchronously and in the order in which they were registered.
+ *
+ * @param {string} name The name of the hook.
+ * @param {Object1.
+ *
+ * @memberof ImplicitAvailabilityBitstream.prototype
+ *
+ * @type {number}
+ * @readonly
+ * @private
+ */
+ availableCount: {
+ get: function() {
+ return this._availableCount;
+ }
+ }
+});
+ImplicitAvailabilityBitstream.prototype.getBit = function(e) {
+ if (defined(this._constant))
+ return this._constant;
+ const t = e >> 3, n = e % 8;
+ return (this._bitstream[t] >> n & 1) === 1;
+};
+function ImplicitMetadataView(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.metadataTable, n = e.class, i = e.entityId, r = e.propertyTableJson;
+ this._class = n, this._metadataTable = t, this._entityId = i, this._extensions = r.extensions, this._extras = r.extras;
+}
+Object.defineProperties(ImplicitMetadataView.prototype, {
+ /**
+ * The class that properties conform to.
+ *
+ * @memberof ImplicitMetadataView.prototype
+ * @type {MetadataClass}
+ * @readonly
+ */
+ class: {
+ get: function() {
+ return this._class;
+ }
+ },
+ /**
+ * Extra user-defined properties.
+ *
+ * @memberof ImplicitMetadataView.prototype
+ * @type {object}
+ * @readonly
+ */
+ extras: {
+ get: function() {
+ return this._extras;
+ }
+ },
+ /**
+ * An object containing extensions.
+ *
+ * @memberof ImplicitMetadataView.prototype
+ * @type {object}
+ * @readonly
+ */
+ extensions: {
+ get: function() {
+ return this._extensions;
+ }
+ }
+});
+ImplicitMetadataView.prototype.hasProperty = function(e) {
+ return this._metadataTable.hasProperty(e);
+};
+ImplicitMetadataView.prototype.hasPropertyBySemantic = function(e) {
+ return this._metadataTable.hasPropertyBySemantic(e);
+};
+ImplicitMetadataView.prototype.getPropertyIds = function(e) {
+ return this._metadataTable.getPropertyIds(e);
+};
+ImplicitMetadataView.prototype.getProperty = function(e) {
+ return this._metadataTable.getProperty(this._entityId, e);
+};
+ImplicitMetadataView.prototype.setProperty = function(e, t) {
+ return this._metadataTable.setProperty(this._entityId, e, t);
+};
+ImplicitMetadataView.prototype.getPropertyBySemantic = function(e) {
+ return this._metadataTable.getPropertyBySemantic(this._entityId, e);
+};
+ImplicitMetadataView.prototype.setPropertyBySemantic = function(e, t) {
+ return this._metadataTable.setPropertyBySemantic(
+ this._entityId,
+ e,
+ t
+ );
+};
+const ImplicitSubdivisionScheme = {
+ /**
+ * A quadtree divides a parent tile into four children, split at the midpoint
+ * of the x and y dimensions of the bounding box
+ * @type {string}
+ * @constant
+ * @private
+ */
+ QUADTREE: "QUADTREE",
+ /**
+ * An octree divides a parent tile into eight children, split at the midpoint
+ * of the x, y, and z dimensions of the bounding box.
+ * @type {string}
+ * @constant
+ * @private
+ */
+ OCTREE: "OCTREE"
+};
+ImplicitSubdivisionScheme.getBranchingFactor = function(e) {
+ switch (e) {
+ case ImplicitSubdivisionScheme.OCTREE:
+ return 8;
+ case ImplicitSubdivisionScheme.QUADTREE:
+ return 4;
+ }
+};
+const ImplicitSubdivisionScheme$1 = Object.freeze(ImplicitSubdivisionScheme);
+function MetadataEntity() {
+}
+Object.defineProperties(MetadataEntity.prototype, {
+ /**
+ * The class that properties conform to.
+ *
+ * @memberof MetadataEntity.prototype
+ * @type {MetadataClass}
+ * @readonly
+ * @private
+ */
+ class: {
+ // eslint-disable-next-line getter-return
+ get: function() {
+ DeveloperError.throwInstantiationError();
+ }
+ }
+});
+MetadataEntity.prototype.hasProperty = function(e) {
+ DeveloperError.throwInstantiationError();
+};
+MetadataEntity.prototype.hasPropertyBySemantic = function(e) {
+ DeveloperError.throwInstantiationError();
+};
+MetadataEntity.prototype.getPropertyIds = function(e) {
+ DeveloperError.throwInstantiationError();
+};
+MetadataEntity.prototype.getProperty = function(e) {
+ DeveloperError.throwInstantiationError();
+};
+MetadataEntity.prototype.setProperty = function(e, t) {
+ DeveloperError.throwInstantiationError();
+};
+MetadataEntity.prototype.getPropertyBySemantic = function(e) {
+ DeveloperError.throwInstantiationError();
+};
+MetadataEntity.prototype.setPropertyBySemantic = function(e, t) {
+ DeveloperError.throwInstantiationError();
+};
+MetadataEntity.hasProperty = function(e, t, n) {
+ if (defined(t[e]))
+ return !0;
+ const i = n.properties;
+ if (!defined(i))
+ return !1;
+ const r = i[e];
+ return !!(defined(r) && defined(r.default));
+};
+MetadataEntity.hasPropertyBySemantic = function(e, t, n) {
+ const i = n.propertiesBySemantic;
+ if (!defined(i))
+ return !1;
+ const r = i[e];
+ return defined(r);
+};
+MetadataEntity.getPropertyIds = function(e, t, n) {
+ n = defined(n) ? n : [], n.length = 0;
+ for (const r in e)
+ e.hasOwnProperty(r) && defined(e[r]) && n.push(r);
+ const i = t.properties;
+ if (defined(i))
+ for (const r in i)
+ i.hasOwnProperty(r) && !defined(e[r]) && defined(i[r].default) && n.push(r);
+ return n;
+};
+MetadataEntity.getProperty = function(e, t, n) {
+ const i = n.properties[e];
+ let r = t[e];
+ Array.isArray(r) && (r = r.slice());
+ const o = !0;
+ if (r = i.handleNoData(r), !defined(r) && defined(i.default))
+ return r = clone$1(i.default, !0), i.unpackVectorAndMatrixTypes(r, o);
+ if (defined(r))
+ return r = i.normalize(r), r = i.applyValueTransform(r), i.unpackVectorAndMatrixTypes(r, o);
+};
+MetadataEntity.setProperty = function(e, t, n, i) {
+ if (!defined(n[e]))
+ return !1;
+ Array.isArray(t) && (t = t.slice());
+ let r;
+ const o = i.properties;
+ return defined(o) && (r = o[e]), defined(r) && (t = r.packVectorAndMatrixTypes(t, !0), t = r.unapplyValueTransform(t), t = r.unnormalize(t)), n[e] = t, !0;
+};
+MetadataEntity.getPropertyBySemantic = function(e, t, n) {
+ const i = n.propertiesBySemantic;
+ if (!defined(i))
+ return;
+ const r = i[e];
+ if (defined(r))
+ return MetadataEntity.getProperty(r.id, t, n);
+};
+MetadataEntity.setPropertyBySemantic = function(e, t, n, i) {
+ const r = i.propertiesBySemantic;
+ if (!defined(r))
+ return !1;
+ const o = i.propertiesBySemantic[e];
+ return defined(o) ? MetadataEntity.setProperty(
+ o.id,
+ t,
+ n,
+ i
+ ) : !1;
+};
+function ImplicitSubtreeMetadata(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.subtreeMetadata, n = e.class, i = defined(t.properties) ? t.properties : {};
+ this._class = n, this._properties = i, this._extras = t.extras, this._extensions = t.extensions;
+}
+Object.defineProperties(ImplicitSubtreeMetadata.prototype, {
+ /**
+ * The class that properties conform to.
+ *
+ * @memberof ImplicitSubtreeMetadata.prototype
+ * @type {MetadataClass}
+ * @readonly
+ * @private
+ */
+ class: {
+ get: function() {
+ return this._class;
+ }
+ },
+ /**
+ * Extra user-defined properties.
+ *
+ * @memberof ImplicitSubtreeMetadata.prototype
+ * @type {object}
+ * @readonly
+ * @private
+ */
+ extras: {
+ get: function() {
+ return this._extras;
+ }
+ },
+ /**
+ * An object containing extensions.
+ *
+ * @memberof ImplicitSubtreeMetadata.prototype
+ * @type {object}
+ * @readonly
+ * @private
+ */
+ extensions: {
+ get: function() {
+ return this._extensions;
+ }
+ }
+});
+ImplicitSubtreeMetadata.prototype.hasProperty = function(e) {
+ return MetadataEntity.hasProperty(e, this._properties, this._class);
+};
+ImplicitSubtreeMetadata.prototype.hasPropertyBySemantic = function(e) {
+ return MetadataEntity.hasPropertyBySemantic(
+ e,
+ this._properties,
+ this._class
+ );
+};
+ImplicitSubtreeMetadata.prototype.getPropertyIds = function(e) {
+ return MetadataEntity.getPropertyIds(this._properties, this._class, e);
+};
+ImplicitSubtreeMetadata.prototype.getProperty = function(e) {
+ return MetadataEntity.getProperty(e, this._properties, this._class);
+};
+ImplicitSubtreeMetadata.prototype.setProperty = function(e, t) {
+ return MetadataEntity.setProperty(
+ e,
+ t,
+ this._properties,
+ this._class
+ );
+};
+ImplicitSubtreeMetadata.prototype.getPropertyBySemantic = function(e) {
+ return MetadataEntity.getPropertyBySemantic(
+ e,
+ this._properties,
+ this._class
+ );
+};
+ImplicitSubtreeMetadata.prototype.setPropertyBySemantic = function(e, t) {
+ return MetadataEntity.setPropertyBySemantic(
+ e,
+ t,
+ this._properties,
+ this._class
+ );
+};
+const MetadataComponentType = {
+ /**
+ * An 8-bit signed integer
+ *
+ * @type {string}
+ * @constant
+ */
+ INT8: "INT8",
+ /**
+ * An 8-bit unsigned integer
+ *
+ * @type {string}
+ * @constant
+ */
+ UINT8: "UINT8",
+ /**
+ * A 16-bit signed integer
+ *
+ * @type {string}
+ * @constant
+ */
+ INT16: "INT16",
+ /**
+ * A 16-bit unsigned integer
+ *
+ * @type {string}
+ * @constant
+ */
+ UINT16: "UINT16",
+ /**
+ * A 32-bit signed integer
+ *
+ * @type {string}
+ * @constant
+ */
+ INT32: "INT32",
+ /**
+ * A 32-bit unsigned integer
+ *
+ * @type {string}
+ * @constant
+ */
+ UINT32: "UINT32",
+ /**
+ * A 64-bit signed integer. This type requires BigInt support.
+ *
+ * @see FeatureDetection.supportsBigInt
+ *
+ * @type {string}
+ * @constant
+ */
+ INT64: "INT64",
+ /**
+ * A 64-bit signed integer. This type requires BigInt support
+ *
+ * @see FeatureDetection.supportsBigInt
+ *
+ * @type {string}
+ * @constant
+ */
+ UINT64: "UINT64",
+ /**
+ * A 32-bit (single precision) floating point number
+ *
+ * @type {string}
+ * @constant
+ */
+ FLOAT32: "FLOAT32",
+ /**
+ * A 64-bit (double precision) floating point number
+ *
+ * @type {string}
+ * @constant
+ */
+ FLOAT64: "FLOAT64"
+};
+MetadataComponentType.getMinimum = function(e) {
+ switch (e) {
+ case MetadataComponentType.INT8:
+ return -128;
+ case MetadataComponentType.UINT8:
+ return 0;
+ case MetadataComponentType.INT16:
+ return -32768;
+ case MetadataComponentType.UINT16:
+ return 0;
+ case MetadataComponentType.INT32:
+ return -2147483648;
+ case MetadataComponentType.UINT32:
+ return 0;
+ case MetadataComponentType.INT64:
+ return FeatureDetection.supportsBigInt() ? BigInt("-9223372036854775808") : -Math.pow(2, 63);
+ case MetadataComponentType.UINT64:
+ return FeatureDetection.supportsBigInt() ? BigInt(0) : 0;
+ case MetadataComponentType.FLOAT32:
+ return -34028234663852886e22;
+ case MetadataComponentType.FLOAT64:
+ return -Number.MAX_VALUE;
+ }
+};
+MetadataComponentType.getMaximum = function(e) {
+ switch (e) {
+ case MetadataComponentType.INT8:
+ return 127;
+ case MetadataComponentType.UINT8:
+ return 255;
+ case MetadataComponentType.INT16:
+ return 32767;
+ case MetadataComponentType.UINT16:
+ return 65535;
+ case MetadataComponentType.INT32:
+ return 2147483647;
+ case MetadataComponentType.UINT32:
+ return 4294967295;
+ case MetadataComponentType.INT64:
+ return FeatureDetection.supportsBigInt() ? BigInt("9223372036854775807") : Math.pow(2, 63) - 1;
+ case MetadataComponentType.UINT64:
+ return FeatureDetection.supportsBigInt() ? BigInt("18446744073709551615") : Math.pow(2, 64) - 1;
+ case MetadataComponentType.FLOAT32:
+ return 34028234663852886e22;
+ case MetadataComponentType.FLOAT64:
+ return Number.MAX_VALUE;
+ }
+};
+MetadataComponentType.isIntegerType = function(e) {
+ switch (e) {
+ case MetadataComponentType.INT8:
+ case MetadataComponentType.UINT8:
+ case MetadataComponentType.INT16:
+ case MetadataComponentType.UINT16:
+ case MetadataComponentType.INT32:
+ case MetadataComponentType.UINT32:
+ case MetadataComponentType.INT64:
+ case MetadataComponentType.UINT64:
+ return !0;
+ default:
+ return !1;
+ }
+};
+MetadataComponentType.isUnsignedIntegerType = function(e) {
+ switch (e) {
+ case MetadataComponentType.UINT8:
+ case MetadataComponentType.UINT16:
+ case MetadataComponentType.UINT32:
+ case MetadataComponentType.UINT64:
+ return !0;
+ default:
+ return !1;
+ }
+};
+MetadataComponentType.isVectorCompatible = function(e) {
+ switch (e) {
+ case MetadataComponentType.INT8:
+ case MetadataComponentType.UINT8:
+ case MetadataComponentType.INT16:
+ case MetadataComponentType.UINT16:
+ case MetadataComponentType.INT32:
+ case MetadataComponentType.UINT32:
+ case MetadataComponentType.FLOAT32:
+ case MetadataComponentType.FLOAT64:
+ return !0;
+ default:
+ return !1;
+ }
+};
+MetadataComponentType.normalize = function(e, t) {
+ return Math.max(
+ Number(e) / Number(MetadataComponentType.getMaximum(t)),
+ -1
+ );
+};
+MetadataComponentType.unnormalize = function(e, t) {
+ const n = MetadataComponentType.getMaximum(t), i = MetadataComponentType.isUnsignedIntegerType(t) ? 0 : -n;
+ return e = CesiumMath.sign(e) * Math.round(Math.abs(e) * Number(n)), (t === MetadataComponentType.INT64 || t === MetadataComponentType.UINT64) && FeatureDetection.supportsBigInt() && (e = BigInt(e)), e > n ? n : e < i ? i : e;
+};
+MetadataComponentType.applyValueTransform = function(e, t, n) {
+ return n * e + t;
+};
+MetadataComponentType.unapplyValueTransform = function(e, t, n) {
+ return n === 0 ? 0 : (e - t) / n;
+};
+MetadataComponentType.getSizeInBytes = function(e) {
+ switch (e) {
+ case MetadataComponentType.INT8:
+ case MetadataComponentType.UINT8:
+ return 1;
+ case MetadataComponentType.INT16:
+ case MetadataComponentType.UINT16:
+ return 2;
+ case MetadataComponentType.INT32:
+ case MetadataComponentType.UINT32:
+ return 4;
+ case MetadataComponentType.INT64:
+ case MetadataComponentType.UINT64:
+ return 8;
+ case MetadataComponentType.FLOAT32:
+ return 4;
+ case MetadataComponentType.FLOAT64:
+ return 8;
+ }
+};
+MetadataComponentType.fromComponentDatatype = function(e) {
+ switch (e) {
+ case ComponentDatatype$1.BYTE:
+ return MetadataComponentType.INT8;
+ case ComponentDatatype$1.UNSIGNED_BYTE:
+ return MetadataComponentType.UINT8;
+ case ComponentDatatype$1.SHORT:
+ return MetadataComponentType.INT16;
+ case ComponentDatatype$1.UNSIGNED_SHORT:
+ return MetadataComponentType.UINT16;
+ case ComponentDatatype$1.INT:
+ return MetadataComponentType.INT32;
+ case ComponentDatatype$1.UNSIGNED_INT:
+ return MetadataComponentType.UINT32;
+ case ComponentDatatype$1.FLOAT:
+ return MetadataComponentType.FLOAT32;
+ case ComponentDatatype$1.DOUBLE:
+ return MetadataComponentType.FLOAT64;
+ }
+};
+MetadataComponentType.toComponentDatatype = function(e) {
+ switch (e) {
+ case MetadataComponentType.INT8:
+ return ComponentDatatype$1.BYTE;
+ case MetadataComponentType.UINT8:
+ return ComponentDatatype$1.UNSIGNED_BYTE;
+ case MetadataComponentType.INT16:
+ return ComponentDatatype$1.SHORT;
+ case MetadataComponentType.UINT16:
+ return ComponentDatatype$1.UNSIGNED_SHORT;
+ case MetadataComponentType.INT32:
+ return ComponentDatatype$1.INT;
+ case MetadataComponentType.UINT32:
+ return ComponentDatatype$1.UNSIGNED_INT;
+ case MetadataComponentType.FLOAT32:
+ return ComponentDatatype$1.FLOAT;
+ case MetadataComponentType.FLOAT64:
+ return ComponentDatatype$1.DOUBLE;
+ }
+};
+const MetadataComponentType$1 = Object.freeze(MetadataComponentType), MetadataType = {
+ /**
+ * A single component
+ *
+ * @type {string}
+ * @constant
+ */
+ SCALAR: "SCALAR",
+ /**
+ * A vector with two components
+ *
+ * @type {string}
+ * @constant
+ */
+ VEC2: "VEC2",
+ /**
+ * A vector with three components
+ *
+ * @type {string}
+ * @constant
+ */
+ VEC3: "VEC3",
+ /**
+ * A vector with four components
+ *
+ * @type {string}
+ * @constant
+ */
+ VEC4: "VEC4",
+ /**
+ * A 2x2 matrix, stored in column-major format.
+ *
+ * @type {string}
+ * @constant
+ */
+ MAT2: "MAT2",
+ /**
+ * A 3x3 matrix, stored in column-major format.
+ *
+ * @type {string}
+ * @constant
+ */
+ MAT3: "MAT3",
+ /**
+ * A 4x4 matrix, stored in column-major format.
+ *
+ * @type {string}
+ * @constant
+ */
+ MAT4: "MAT4",
+ /**
+ * A boolean (true/false) value
+ *
+ * @type {string}
+ * @constant
+ */
+ BOOLEAN: "BOOLEAN",
+ /**
+ * A UTF-8 encoded string value
+ *
+ * @type {string}
+ * @constant
+ */
+ STRING: "STRING",
+ /**
+ * An enumerated value. This type is used in conjunction with a {@link MetadataEnum} to describe the valid values.
+ *
+ * @see MetadataEnum
+ *
+ * @type {string}
+ * @constant
+ */
+ ENUM: "ENUM"
+};
+MetadataType.isVectorType = function(e) {
+ switch (e) {
+ case MetadataType.VEC2:
+ case MetadataType.VEC3:
+ case MetadataType.VEC4:
+ return !0;
+ default:
+ return !1;
+ }
+};
+MetadataType.isMatrixType = function(e) {
+ switch (e) {
+ case MetadataType.MAT2:
+ case MetadataType.MAT3:
+ case MetadataType.MAT4:
+ return !0;
+ default:
+ return !1;
+ }
+};
+MetadataType.getComponentCount = function(e) {
+ switch (e) {
+ case MetadataType.SCALAR:
+ case MetadataType.STRING:
+ case MetadataType.ENUM:
+ case MetadataType.BOOLEAN:
+ return 1;
+ case MetadataType.VEC2:
+ return 2;
+ case MetadataType.VEC3:
+ return 3;
+ case MetadataType.VEC4:
+ return 4;
+ case MetadataType.MAT2:
+ return 4;
+ case MetadataType.MAT3:
+ return 9;
+ case MetadataType.MAT4:
+ return 16;
+ }
+};
+MetadataType.getMathType = function(e) {
+ switch (e) {
+ case MetadataType.VEC2:
+ return Cartesian2;
+ case MetadataType.VEC3:
+ return Cartesian3;
+ case MetadataType.VEC4:
+ return Cartesian4;
+ case MetadataType.MAT2:
+ return Matrix2;
+ case MetadataType.MAT3:
+ return Matrix3;
+ case MetadataType.MAT4:
+ return Matrix4;
+ default:
+ return;
+ }
+};
+const MetadataType$1 = Object.freeze(MetadataType);
+function MetadataClassProperty(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.id, n = e.type, i = e.componentType, r = e.enumType, o = defined(i) && MetadataComponentType$1.isIntegerType(i) && defaultValue(e.normalized, !1);
+ this._id = t, this._name = e.name, this._description = e.description, this._semantic = e.semantic, this._isLegacyExtension = e.isLegacyExtension, this._type = n, this._componentType = i, this._enumType = r, this._valueType = defined(r) ? r.valueType : i, this._isArray = defaultValue(e.isArray, !1), this._isVariableLengthArray = defaultValue(
+ e.isVariableLengthArray,
+ !1
+ ), this._arrayLength = e.arrayLength, this._min = clone$1(e.min, !0), this._max = clone$1(e.max, !0), this._normalized = o;
+ let s = clone$1(e.offset, !0), c = clone$1(e.scale, !0);
+ const l = defined(s) || defined(c), d = !0;
+ defined(s) || (s = this.expandConstant(0, d)), defined(c) || (c = this.expandConstant(1, d)), this._offset = s, this._scale = c, this._hasValueTransform = l, this._noData = clone$1(e.noData, !0), this._default = clone$1(e.default, !0), this._required = defaultValue(e.required, !0), this._extras = clone$1(e.extras, !0), this._extensions = clone$1(e.extensions, !0);
+}
+MetadataClassProperty.fromJson = function(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.id, n = e.property, i = isLegacy(n), r = parseType(n, e.enums);
+ let o;
+ return defined(i) ? i ? o = defined(n.optional) ? !n.optional : !0 : o = defaultValue(n.required, !1) : o = !1, new MetadataClassProperty({
+ id: t,
+ type: r.type,
+ componentType: r.componentType,
+ enumType: r.enumType,
+ isArray: r.isArray,
+ isVariableLengthArray: r.isVariableLengthArray,
+ arrayLength: r.arrayLength,
+ normalized: n.normalized,
+ min: n.min,
+ max: n.max,
+ offset: n.offset,
+ scale: n.scale,
+ noData: n.noData,
+ default: n.default,
+ required: o,
+ name: n.name,
+ description: n.description,
+ semantic: n.semantic,
+ extras: n.extras,
+ extensions: n.extensions,
+ isLegacyExtension: i
+ });
+};
+Object.defineProperties(MetadataClassProperty.prototype, {
+ /**
+ * The ID of the property.
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {string}
+ * @readonly
+ */
+ id: {
+ get: function() {
+ return this._id;
+ }
+ },
+ /**
+ * The name of the property.
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {string}
+ * @readonly
+ */
+ name: {
+ get: function() {
+ return this._name;
+ }
+ },
+ /**
+ * The description of the property.
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {string}
+ * @readonly
+ */
+ description: {
+ get: function() {
+ return this._description;
+ }
+ },
+ /**
+ * The type of the property such as SCALAR, VEC2, VEC3
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {MetadataType}
+ * @readonly
+ */
+ type: {
+ get: function() {
+ return this._type;
+ }
+ },
+ /**
+ * The enum type of the property. Only defined when type is ENUM.
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {MetadataEnum}
+ * @readonly
+ */
+ enumType: {
+ get: function() {
+ return this._enumType;
+ }
+ },
+ /**
+ * The component type of the property. This includes integer
+ * (e.g. INT8 or UINT16), and floating point (FLOAT32 and FLOAT64) values
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {MetadataComponentType}
+ * @readonly
+ */
+ componentType: {
+ get: function() {
+ return this._componentType;
+ }
+ },
+ /**
+ * The datatype used for storing each component of the property. This
+ * is usually the same as componentType except for ENUM, where this
+ * returns an integer type
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {MetadataComponentType}
+ * @readonly
+ * @private
+ */
+ valueType: {
+ get: function() {
+ return this._valueType;
+ }
+ },
+ /**
+ * True if a property is an array (either fixed length or variable length),
+ * false otherwise.
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ isArray: {
+ get: function() {
+ return this._isArray;
+ }
+ },
+ /**
+ * True if a property is a variable length array, false otherwise.
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ isVariableLengthArray: {
+ get: function() {
+ return this._isVariableLengthArray;
+ }
+ },
+ /**
+ * The number of array elements. Only defined for fixed-size
+ * arrays.
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {number}
+ * @readonly
+ */
+ arrayLength: {
+ get: function() {
+ return this._arrayLength;
+ }
+ },
+ /**
+ * Whether the property is normalized.
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ normalized: {
+ get: function() {
+ return this._normalized;
+ }
+ },
+ /**
+ * A number or an array of numbers storing the maximum allowable value of this property. Only defined when type is a numeric type.
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {number|number[]|number[][]}
+ * @readonly
+ */
+ max: {
+ get: function() {
+ return this._max;
+ }
+ },
+ /**
+ * A number or an array of numbers storing the minimum allowable value of this property. Only defined when type is a numeric type.
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {number|number[]|number[][]}
+ * @readonly
+ */
+ min: {
+ get: function() {
+ return this._min;
+ }
+ },
+ /**
+ * The no-data sentinel value that represents null values
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {boolean|number|string|Array}
+ * @readonly
+ */
+ noData: {
+ get: function() {
+ return this._noData;
+ }
+ },
+ /**
+ * A default value to use when an entity's property value is not defined.
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {boolean|number|string|Array}
+ * @readonly
+ */
+ default: {
+ get: function() {
+ return this._default;
+ }
+ },
+ /**
+ * Whether the property is required.
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ required: {
+ get: function() {
+ return this._required;
+ }
+ },
+ /**
+ * An identifier that describes how this property should be interpreted.
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {string}
+ * @readonly
+ */
+ semantic: {
+ get: function() {
+ return this._semantic;
+ }
+ },
+ /**
+ * True if offset/scale should be applied. If both offset/scale were
+ * undefined, they default to identity so this property is set false
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {boolean}
+ * @readonly
+ * @private
+ */
+ hasValueTransform: {
+ get: function() {
+ return this._hasValueTransform;
+ }
+ },
+ /**
+ * The offset to be added to property values as part of the value transform.
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {number|number[]|number[][]}
+ * @readonly
+ */
+ offset: {
+ get: function() {
+ return this._offset;
+ }
+ },
+ /**
+ * The scale to be multiplied to property values as part of the value transform.
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {number|number[]|number[][]}
+ * @readonly
+ */
+ scale: {
+ get: function() {
+ return this._scale;
+ }
+ },
+ /**
+ * Extra user-defined properties.
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {*}
+ * @readonly
+ */
+ extras: {
+ get: function() {
+ return this._extras;
+ }
+ },
+ /**
+ * An object containing extensions.
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {object}
+ * @readonly
+ */
+ extensions: {
+ get: function() {
+ return this._extensions;
+ }
+ }
+});
+function isLegacy(e) {
+ if (e.type === "ARRAY")
+ return !0;
+ const t = e.type;
+ if (t === MetadataType$1.SCALAR || MetadataType$1.isMatrixType(t) || MetadataType$1.isVectorType(t))
+ return !1;
+ if (defined(MetadataComponentType$1[t]))
+ return !0;
+ if (defined(e.noData) || defined(e.scale) || defined(e.offset) || defined(e.required) || defined(e.count) || defined(e.array) || defined(e.optional))
+ return !1;
+}
+function parseType(e, t) {
+ const n = e.type, i = e.componentType, r = n === "ARRAY";
+ let o, s, c;
+ r ? (o = !0, s = e.componentCount, c = !defined(s)) : e.array ? (o = !0, s = e.count, c = !defined(e.count)) : (o = !1, s = void 0, c = !1);
+ let l;
+ if (defined(e.enumType) && (l = t[e.enumType]), n === MetadataType$1.ENUM)
+ return {
+ type: n,
+ componentType: void 0,
+ enumType: l,
+ valueType: l.valueType,
+ isArray: o,
+ isVariableLengthArray: c,
+ arrayLength: s
+ };
+ if (r && i === MetadataType$1.ENUM)
+ return {
+ type: i,
+ componentType: void 0,
+ enumType: l,
+ valueType: l.valueType,
+ isArray: o,
+ isVariableLengthArray: c,
+ arrayLength: s
+ };
+ if (n === MetadataType$1.SCALAR || MetadataType$1.isMatrixType(n) || MetadataType$1.isVectorType(n))
+ return {
+ type: n,
+ componentType: i,
+ enumType: void 0,
+ valueType: i,
+ isArray: o,
+ isVariableLengthArray: c,
+ arrayLength: s
+ };
+ if (n === MetadataType$1.BOOLEAN || n === MetadataType$1.STRING)
+ return {
+ type: n,
+ componentType: void 0,
+ enumType: void 0,
+ valueType: void 0,
+ isArray: o,
+ isVariableLengthArray: c,
+ arrayLength: s
+ };
+ if (r && (i === MetadataType$1.BOOLEAN || i === MetadataType$1.STRING))
+ return {
+ type: i,
+ componentType: void 0,
+ enumType: void 0,
+ valueType: void 0,
+ isArray: o,
+ isVariableLengthArray: c,
+ arrayLength: s
+ };
+ if (defined(i) && defined(MetadataComponentType$1[i]))
+ return {
+ type: MetadataType$1.SCALAR,
+ componentType: i,
+ enumType: void 0,
+ valueType: i,
+ isArray: o,
+ isVariableLengthArray: c,
+ arrayLength: s
+ };
+ if (defined(MetadataComponentType$1[n]))
+ return {
+ type: MetadataType$1.SCALAR,
+ componentType: n,
+ enumType: void 0,
+ valueType: n,
+ isArray: o,
+ isVariableLengthArray: c,
+ arrayLength: s
+ };
+}
+MetadataClassProperty.prototype.normalize = function(e) {
+ return this._normalized ? normalizeInPlace(
+ e,
+ this._valueType,
+ MetadataComponentType$1.normalize
+ ) : e;
+};
+MetadataClassProperty.prototype.unnormalize = function(e) {
+ return this._normalized ? normalizeInPlace(
+ e,
+ this._valueType,
+ MetadataComponentType$1.unnormalize
+ ) : e;
+};
+MetadataClassProperty.prototype.applyValueTransform = function(e) {
+ return !this._hasValueTransform || this._isVariableLengthArray ? e : MetadataClassProperty.valueTransformInPlace(
+ e,
+ this._offset,
+ this._scale,
+ MetadataComponentType$1.applyValueTransform
+ );
+};
+MetadataClassProperty.prototype.unapplyValueTransform = function(e) {
+ return !this._hasValueTransform || this._isVariableLengthArray ? e : MetadataClassProperty.valueTransformInPlace(
+ e,
+ this._offset,
+ this._scale,
+ MetadataComponentType$1.unapplyValueTransform
+ );
+};
+MetadataClassProperty.prototype.expandConstant = function(e, t) {
+ t = defaultValue(t, !1);
+ const n = this._isArray, i = this._arrayLength, r = MetadataType$1.getComponentCount(this._type), o = n && r > 1;
+ if (!n && r === 1)
+ return e;
+ if (!n)
+ return new Array(r).fill(e);
+ if (!o)
+ return new Array(i).fill(e);
+ if (!t)
+ return new Array(this._arrayLength * r).fill(e);
+ const s = new Array(r).fill(e);
+ return new Array(this._arrayLength).fill(s);
+};
+MetadataClassProperty.prototype.handleNoData = function(e) {
+ const t = this._noData;
+ if (!defined(t))
+ return e;
+ if (!arrayEquals(e, t))
+ return e;
+};
+function arrayEquals(e, t) {
+ if (!Array.isArray(e))
+ return e === t;
+ if (!Array.isArray(t) || e.length !== t.length)
+ return !1;
+ for (let n = 0; n < e.length; n++)
+ if (!arrayEquals(e[n], t[n]))
+ return !1;
+ return !0;
+}
+MetadataClassProperty.prototype.unpackVectorAndMatrixTypes = function(e, t) {
+ t = defaultValue(t, !1);
+ const n = MetadataType$1.getMathType(this._type), i = this._isArray, r = MetadataType$1.getComponentCount(this._type), o = i && r > 1;
+ return defined(n) ? t && o ? e.map(function(s) {
+ return n.unpack(s);
+ }) : i ? n.unpackArray(e) : n.unpack(e) : e;
+};
+MetadataClassProperty.prototype.packVectorAndMatrixTypes = function(e, t) {
+ t = defaultValue(t, !1);
+ const n = MetadataType$1.getMathType(this._type), i = this._isArray, r = MetadataType$1.getComponentCount(this._type), o = i && r > 1;
+ return defined(n) ? t && o ? e.map(function(s) {
+ return n.pack(s, []);
+ }) : i ? n.packArray(e, []) : n.pack(e, []) : e;
+};
+MetadataClassProperty.prototype.validate = function(e) {
+ if (!(!defined(e) && defined(this._default)))
+ return this._required && !defined(e) ? "required property must have a value" : this._isArray ? validateArray(this, e) : validateSingleValue(this, e);
+};
+function validateArray(e, t) {
+ if (!Array.isArray(t))
+ return `value ${t} must be an array`;
+ const n = t.length;
+ if (!e._isVariableLengthArray && n !== e._arrayLength)
+ return "Array length does not match property.arrayLength";
+ for (let i = 0; i < n; i++) {
+ const r = validateSingleValue(e, t[i]);
+ if (defined(r))
+ return r;
+ }
+}
+function validateSingleValue(e, t) {
+ const n = e._type, i = e._componentType, r = e._enumType, o = e._normalized;
+ return MetadataType$1.isVectorType(n) ? validateVector(t, n, i) : MetadataType$1.isMatrixType(n) ? validateMatrix(t, n, i) : n === MetadataType$1.STRING ? validateString(t) : n === MetadataType$1.BOOLEAN ? validateBoolean(t) : n === MetadataType$1.ENUM ? validateEnum(t, r) : validateScalar(t, i, o);
+}
+function validateVector(e, t, n) {
+ if (!MetadataComponentType$1.isVectorCompatible(n))
+ return `componentType ${n} is incompatible with vector type ${t}`;
+ if (t === MetadataType$1.VEC2 && !(e instanceof Cartesian2))
+ return `vector value ${e} must be a Cartesian2`;
+ if (t === MetadataType$1.VEC3 && !(e instanceof Cartesian3))
+ return `vector value ${e} must be a Cartesian3`;
+ if (t === MetadataType$1.VEC4 && !(e instanceof Cartesian4))
+ return `vector value ${e} must be a Cartesian4`;
+}
+function validateMatrix(e, t, n) {
+ if (!MetadataComponentType$1.isVectorCompatible(n))
+ return `componentType ${n} is incompatible with matrix type ${t}`;
+ if (t === MetadataType$1.MAT2 && !(e instanceof Matrix2))
+ return `matrix value ${e} must be a Matrix2`;
+ if (t === MetadataType$1.MAT3 && !(e instanceof Matrix3))
+ return `matrix value ${e} must be a Matrix3`;
+ if (t === MetadataType$1.MAT4 && !(e instanceof Matrix4))
+ return `matrix value ${e} must be a Matrix4`;
+}
+function validateString(e) {
+ if (typeof e != "string")
+ return getTypeErrorMessage(e, MetadataType$1.STRING);
+}
+function validateBoolean(e) {
+ if (typeof e != "boolean")
+ return getTypeErrorMessage(e, MetadataType$1.BOOLEAN);
+}
+function validateEnum(e, t) {
+ const n = typeof e;
+ if (defined(t))
+ return n !== "string" || !defined(t.valuesByName[e]) ? `value ${e} is not a valid enum name for ${t.id}` : void 0;
+}
+function validateScalar(e, t, n) {
+ const i = typeof e;
+ switch (t) {
+ case MetadataComponentType$1.INT8:
+ case MetadataComponentType$1.UINT8:
+ case MetadataComponentType$1.INT16:
+ case MetadataComponentType$1.UINT16:
+ case MetadataComponentType$1.INT32:
+ case MetadataComponentType$1.UINT32:
+ case MetadataComponentType$1.FLOAT32:
+ case MetadataComponentType$1.FLOAT64:
+ return i !== "number" ? getTypeErrorMessage(e, t) : isFinite(e) ? checkInRange(e, t, n) : getNonFiniteErrorMessage(e, t);
+ case MetadataComponentType$1.INT64:
+ case MetadataComponentType$1.UINT64:
+ return i !== "number" && i !== "bigint" ? getTypeErrorMessage(e, t) : i === "number" && !isFinite(e) ? getNonFiniteErrorMessage(e, t) : checkInRange(e, t, n);
+ }
+}
+function getTypeErrorMessage(e, t) {
+ return `value ${e} does not match type ${t}`;
+}
+function getOutOfRangeErrorMessage(e, t, n) {
+ let i = `value ${e} is out of range for type ${t}`;
+ return n && (i += " (normalized)"), i;
+}
+function checkInRange(e, t, n) {
+ if (n) {
+ const i = MetadataComponentType$1.isUnsignedIntegerType(t) ? 0 : -1;
+ return e < i || e > 1 ? getOutOfRangeErrorMessage(e, t, n) : void 0;
+ }
+ if (e < MetadataComponentType$1.getMinimum(t) || e > MetadataComponentType$1.getMaximum(t))
+ return getOutOfRangeErrorMessage(e, t, n);
+}
+function getNonFiniteErrorMessage(e, t) {
+ return `value ${e} of type ${t} must be finite`;
+}
+function normalizeInPlace(e, t, n) {
+ if (!Array.isArray(e))
+ return n(e, t);
+ for (let i = 0; i < e.length; i++)
+ e[i] = normalizeInPlace(e[i], t, n);
+ return e;
+}
+MetadataClassProperty.valueTransformInPlace = function(e, t, n, i) {
+ if (!Array.isArray(e))
+ return i(e, t, n);
+ for (let r = 0; r < e.length; r++)
+ e[r] = MetadataClassProperty.valueTransformInPlace(
+ e[r],
+ t[r],
+ n[r],
+ i
+ );
+ return e;
+};
+function MetadataTableProperty(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.count, n = e.property, i = e.classProperty, r = e.bufferViews, o = i.type, s = i.isArray, c = i.isVariableLengthArray;
+ let l = i.valueType;
+ const d = i.enumType, f = o === MetadataType$1.STRING, h = o === MetadataType$1.BOOLEAN;
+ let p = 0, m;
+ if (c) {
+ let R = defaultValue(
+ n.arrayOffsetType,
+ n.offsetType
+ );
+ R = defaultValue(
+ MetadataComponentType$1[R],
+ MetadataComponentType$1.UINT32
+ );
+ const L = defaultValue(
+ n.arrayOffsets,
+ n.arrayOffsetBufferView
+ );
+ m = new BufferView(
+ r[L],
+ R,
+ t + 1
+ ), p += m.typedArray.byteLength;
+ }
+ const _ = MetadataType$1.getComponentCount(o);
+ let y;
+ c ? y = m.get(t) - m.get(0) : s ? y = t * i.arrayLength : y = t;
+ const C = _ * y;
+ let T;
+ if (f) {
+ let R = defaultValue(
+ n.stringOffsetType,
+ n.offsetType
+ );
+ R = defaultValue(
+ MetadataComponentType$1[R],
+ MetadataComponentType$1.UINT32
+ );
+ const L = defaultValue(
+ n.stringOffsets,
+ n.stringOffsetBufferView
+ );
+ T = new BufferView(
+ r[L],
+ R,
+ C + 1
+ ), p += T.typedArray.byteLength;
+ }
+ (f || h) && (l = MetadataComponentType$1.UINT8);
+ let x;
+ f ? x = T.get(C) - T.get(0) : h ? x = Math.ceil(C / 8) : x = C;
+ const b = defaultValue(n.values, n.bufferView), S = new BufferView(
+ r[b],
+ l,
+ x
+ );
+ p += S.typedArray.byteLength;
+ let E = n.offset, A = n.scale;
+ const D = i.hasValueTransform || defined(E) || defined(A);
+ E = defaultValue(E, i.offset), A = defaultValue(A, i.scale), E = flatten(E), A = flatten(A);
+ let P, I;
+ const M = this;
+ f ? P = function(R) {
+ return getString(R, M._values, M._stringOffsets);
+ } : h ? (P = function(R) {
+ return getBoolean(R, M._values);
+ }, I = function(R, L) {
+ setBoolean(R, M._values, L);
+ }) : defined(d) ? (P = function(R) {
+ const L = M._values.get(R);
+ return d.namesByValue[L];
+ }, I = function(R, L) {
+ const g = d.valuesByName[L];
+ M._values.set(R, g);
+ }) : (P = function(R) {
+ return M._values.get(R);
+ }, I = function(R, L) {
+ M._values.set(R, L);
+ }), this._arrayOffsets = m, this._stringOffsets = T, this._values = S, this._classProperty = i, this._count = t, this._vectorComponentCount = _, this._min = n.min, this._max = n.max, this._offset = E, this._scale = A, this._hasValueTransform = D, this._getValue = P, this._setValue = I, this._unpackedValues = void 0, this._extras = n.extras, this._extensions = n.extensions, this._byteLength = p;
+}
+Object.defineProperties(MetadataTableProperty.prototype, {
+ /**
+ * True if offset/scale should be applied. If both offset/scale were
+ * undefined, they default to identity so this property is set false
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {boolean}
+ * @readonly
+ * @private
+ */
+ hasValueTransform: {
+ get: function() {
+ return this._hasValueTransform;
+ }
+ },
+ /**
+ * The offset to be added to property values as part of the value transform.
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {number|number[]|number[][]}
+ * @readonly
+ * @private
+ */
+ offset: {
+ get: function() {
+ return this._offset;
+ }
+ },
+ /**
+ * The scale to be multiplied to property values as part of the value transform.
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {number|number[]|number[][]}
+ * @readonly
+ * @private
+ */
+ scale: {
+ get: function() {
+ return this._scale;
+ }
+ },
+ /**
+ * Extra user-defined properties.
+ *
+ * @memberof MetadataTableProperty.prototype
+ * @type {*}
+ * @readonly
+ * @private
+ */
+ extras: {
+ get: function() {
+ return this._extras;
+ }
+ },
+ /**
+ * An object containing extensions.
+ *
+ * @memberof MetadataTableProperty.prototype
+ * @type {*}
+ * @readonly
+ * @private
+ */
+ extensions: {
+ get: function() {
+ return this._extensions;
+ }
+ },
+ /**
+ * Size of all typed arrays used by this table property
+ *
+ * @memberof MetadataTableProperty.prototype
+ * @type {Normal}
+ * @readonly
+ * @private
+ */
+ byteLength: {
+ get: function() {
+ return this._byteLength;
+ }
+ }
+});
+MetadataTableProperty.prototype.get = function(e) {
+ let t = get(this, e);
+ return t = this._classProperty.handleNoData(t), defined(t) ? (t = this._classProperty.normalize(t), t = applyValueTransform(this, t), this._classProperty.unpackVectorAndMatrixTypes(t)) : (t = this._classProperty.default, this._classProperty.unpackVectorAndMatrixTypes(t));
+};
+MetadataTableProperty.prototype.set = function(e, t) {
+ const n = this._classProperty;
+ t = n.packVectorAndMatrixTypes(t), t = unapplyValueTransform(this, t), t = n.unnormalize(t), set(this, e, t);
+};
+MetadataTableProperty.prototype.getTypedArray = function() {
+ if (defined(this._values))
+ return this._values.typedArray;
+};
+function flatten(e) {
+ if (!Array.isArray(e))
+ return e;
+ const t = [];
+ for (let n = 0; n < e.length; n++) {
+ const i = e[n];
+ Array.isArray(i) ? t.push.apply(t, i) : t.push(i);
+ }
+ return t;
+}
+function get(e, t) {
+ requiresUnpackForGet(e) && unpackProperty(e);
+ const n = e._classProperty, i = n.isArray, r = n.type, o = MetadataType$1.getComponentCount(r);
+ if (defined(e._unpackedValues)) {
+ const s = e._unpackedValues[t];
+ return i ? clone$1(s, !0) : s;
+ }
+ return !i && o === 1 ? e._getValue(t) : getArrayValues(e, n, t);
+}
+function getArrayValues(e, t, n) {
+ let i, r;
+ if (t.isVariableLengthArray) {
+ i = e._arrayOffsets.get(n), r = e._arrayOffsets.get(n + 1) - i;
+ const s = MetadataType$1.getComponentCount(t.type);
+ i *= s, r *= s;
+ } else {
+ const c = defaultValue(t.arrayLength, 1) * e._vectorComponentCount;
+ i = n * c, r = c;
+ }
+ const o = new Array(r);
+ for (let s = 0; s < r; s++)
+ o[s] = e._getValue(i + s);
+ return o;
+}
+function set(e, t, n) {
+ requiresUnpackForSet(e, t, n) && unpackProperty(e);
+ const i = e._classProperty, r = i.isArray, o = i.type, s = MetadataType$1.getComponentCount(o);
+ if (defined(e._unpackedValues)) {
+ i.isArray && (n = clone$1(n, !0)), e._unpackedValues[t] = n;
+ return;
+ }
+ if (!r && s === 1) {
+ e._setValue(t, n);
+ return;
+ }
+ let c, l;
+ if (i.isVariableLengthArray)
+ c = e._arrayOffsets.get(t), l = e._arrayOffsets.get(t + 1) - c;
+ else {
+ const f = defaultValue(i.arrayLength, 1) * e._vectorComponentCount;
+ c = t * f, l = f;
+ }
+ for (let d = 0; d < l; ++d)
+ e._setValue(c + d, n[d]);
+}
+function getString(e, t, n) {
+ const i = n.get(e), r = n.get(e + 1) - i;
+ return getStringFromTypedArray(
+ t.typedArray,
+ i,
+ r
+ );
+}
+function getBoolean(e, t) {
+ const n = e >> 3, i = e % 8;
+ return (t.typedArray[n] >> i & 1) === 1;
+}
+function setBoolean(e, t, n) {
+ const i = e >> 3, r = e % 8;
+ n ? t.typedArray[i] |= 1 << r : t.typedArray[i] &= ~(1 << r);
+}
+function getInt64NumberFallback(e, t) {
+ const n = t.dataView, i = e * 8;
+ let r = 0;
+ const o = (n.getUint8(i + 7) & 128) > 0;
+ let s = !0;
+ for (let c = 0; c < 8; ++c) {
+ let l = n.getUint8(i + c);
+ o && (s ? l !== 0 && (l = ~(l - 1) & 255, s = !1) : l = ~l & 255), r += l * Math.pow(256, c);
+ }
+ return o && (r = -r), r;
+}
+function getInt64BigIntFallback(e, t) {
+ const n = t.dataView, i = e * 8;
+ let r = BigInt(0);
+ const o = (n.getUint8(i + 7) & 128) > 0;
+ let s = !0;
+ for (let c = 0; c < 8; ++c) {
+ let l = n.getUint8(i + c);
+ o && (s ? l !== 0 && (l = ~(l - 1) & 255, s = !1) : l = ~l & 255), r += BigInt(l) * (BigInt(1) << BigInt(c * 8));
+ }
+ return o && (r = -r), r;
+}
+function getUint64NumberFallback(e, t) {
+ const n = t.dataView, i = e * 8, r = n.getUint32(i, !0), o = n.getUint32(i + 4, !0);
+ return r + 4294967296 * o;
+}
+function getUint64BigIntFallback(e, t) {
+ const n = t.dataView, i = e * 8, r = BigInt(n.getUint32(i, !0)), o = BigInt(n.getUint32(i + 4, !0));
+ return r + BigInt(4294967296) * o;
+}
+function getComponentDatatype(e) {
+ switch (e) {
+ case MetadataComponentType$1.INT8:
+ return ComponentDatatype$1.BYTE;
+ case MetadataComponentType$1.UINT8:
+ return ComponentDatatype$1.UNSIGNED_BYTE;
+ case MetadataComponentType$1.INT16:
+ return ComponentDatatype$1.SHORT;
+ case MetadataComponentType$1.UINT16:
+ return ComponentDatatype$1.UNSIGNED_SHORT;
+ case MetadataComponentType$1.INT32:
+ return ComponentDatatype$1.INT;
+ case MetadataComponentType$1.UINT32:
+ return ComponentDatatype$1.UNSIGNED_INT;
+ case MetadataComponentType$1.FLOAT32:
+ return ComponentDatatype$1.FLOAT;
+ case MetadataComponentType$1.FLOAT64:
+ return ComponentDatatype$1.DOUBLE;
+ }
+}
+function requiresUnpackForGet(e) {
+ if (defined(e._unpackedValues))
+ return !1;
+ const t = e._classProperty, n = t.type, i = t.valueType;
+ return n === MetadataType$1.STRING || i === MetadataComponentType$1.INT64 && !FeatureDetection.supportsBigInt64Array() || i === MetadataComponentType$1.UINT64 && !FeatureDetection.supportsBigUint64Array();
+}
+function requiresUnpackForSet(e, t, n) {
+ if (requiresUnpackForGet(e))
+ return !0;
+ const i = e._arrayOffsets;
+ if (defined(i)) {
+ const r = i.get(t + 1) - i.get(t), o = n.length;
+ if (r !== o)
+ return !0;
+ }
+ return !1;
+}
+function unpackProperty(e) {
+ e._unpackedValues = unpackValues(e), e._arrayOffsets = void 0, e._stringOffsets = void 0, e._values = void 0;
+}
+function unpackValues(e) {
+ const t = e._count, n = new Array(t), i = e._classProperty, r = i.isArray, o = i.type, s = MetadataType$1.getComponentCount(o);
+ if (!r && s === 1) {
+ for (let c = 0; c < t; ++c)
+ n[c] = e._getValue(c);
+ return n;
+ }
+ for (let c = 0; c < t; c++)
+ n[c] = getArrayValues(e, i, c);
+ return n;
+}
+function applyValueTransform(e, t) {
+ const i = e._classProperty.isVariableLengthArray;
+ return !e._hasValueTransform || i ? t : MetadataClassProperty.valueTransformInPlace(
+ t,
+ e._offset,
+ e._scale,
+ MetadataComponentType$1.applyValueTransform
+ );
+}
+function unapplyValueTransform(e, t) {
+ const i = e._classProperty.isVariableLengthArray;
+ return !e._hasValueTransform || i ? t : MetadataClassProperty.valueTransformInPlace(
+ t,
+ e._offset,
+ e._scale,
+ MetadataComponentType$1.unapplyValueTransform
+ );
+}
+function BufferView(e, t, n) {
+ const i = this;
+ let r, o, s;
+ if (t === MetadataComponentType$1.INT64)
+ FeatureDetection.supportsBigInt() ? FeatureDetection.supportsBigInt64Array() ? (r = new BigInt64Array(
+ e.buffer,
+ e.byteOffset,
+ n
+ ), s = function(c, l) {
+ i.typedArray[c] = BigInt(l);
+ }) : (r = new Uint8Array(
+ e.buffer,
+ e.byteOffset,
+ n * 8
+ ), o = function(c) {
+ return getInt64BigIntFallback(c, i);
+ }) : (oneTimeWarning(
+ "INT64 type is not fully supported on this platform. Values greater than 2^53 - 1 or less than -(2^53 - 1) may lose precision when read."
+ ), r = new Uint8Array(
+ e.buffer,
+ e.byteOffset,
+ n * 8
+ ), o = function(c) {
+ return getInt64NumberFallback(c, i);
+ });
+ else if (t === MetadataComponentType$1.UINT64)
+ FeatureDetection.supportsBigInt() ? FeatureDetection.supportsBigUint64Array() ? (r = new BigUint64Array(
+ e.buffer,
+ e.byteOffset,
+ n
+ ), s = function(c, l) {
+ i.typedArray[c] = BigInt(l);
+ }) : (r = new Uint8Array(
+ e.buffer,
+ e.byteOffset,
+ n * 8
+ ), o = function(c) {
+ return getUint64BigIntFallback(c, i);
+ }) : (oneTimeWarning(
+ "UINT64 type is not fully supported on this platform. Values greater than 2^53 - 1 may lose precision when read."
+ ), r = new Uint8Array(
+ e.buffer,
+ e.byteOffset,
+ n * 8
+ ), o = function(c) {
+ return getUint64NumberFallback(c, i);
+ });
+ else {
+ const c = getComponentDatatype(t);
+ r = ComponentDatatype$1.createArrayBufferView(
+ c,
+ e.buffer,
+ e.byteOffset,
+ n
+ ), s = function(l, d) {
+ i.typedArray[l] = d;
+ };
+ }
+ defined(o) || (o = function(c) {
+ return i.typedArray[c];
+ }), this.typedArray = r, this.dataView = new DataView(r.buffer, r.byteOffset), this.get = o, this.set = s, this._componentType = t;
+}
+function MetadataTable(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.count, n = e.class;
+ let i = 0;
+ const r = {};
+ if (defined(e.properties)) {
+ for (const o in e.properties)
+ if (e.properties.hasOwnProperty(o)) {
+ const s = new MetadataTableProperty({
+ count: t,
+ property: e.properties[o],
+ classProperty: n.properties[o],
+ bufferViews: e.bufferViews
+ });
+ r[o] = s, i += s.byteLength;
+ }
+ }
+ this._count = t, this._class = n, this._properties = r, this._byteLength = i;
+}
+Object.defineProperties(MetadataTable.prototype, {
+ /**
+ * The number of entities in the table.
+ *
+ * @memberof MetadataTable.prototype
+ * @type {number}
+ * @readonly
+ * @private
+ */
+ count: {
+ get: function() {
+ return this._count;
+ }
+ },
+ /**
+ * The class that properties conform to.
+ *
+ * @memberof MetadataTable.prototype
+ * @type {MetadataClass}
+ * @readonly
+ * @private
+ */
+ class: {
+ get: function() {
+ return this._class;
+ }
+ },
+ /**
+ * The size of all typed arrays used in this table.
+ *
+ * @memberof MetadataTable.prototype
+ * @type {number}
+ * @readonly
+ * @private
+ */
+ byteLength: {
+ get: function() {
+ return this._byteLength;
+ }
+ }
+});
+MetadataTable.prototype.hasProperty = function(e) {
+ return MetadataEntity.hasProperty(e, this._properties, this._class);
+};
+MetadataTable.prototype.hasPropertyBySemantic = function(e) {
+ return MetadataEntity.hasPropertyBySemantic(
+ e,
+ this._properties,
+ this._class
+ );
+};
+MetadataTable.prototype.getPropertyIds = function(e) {
+ return MetadataEntity.getPropertyIds(this._properties, this._class, e);
+};
+MetadataTable.prototype.getProperty = function(e, t) {
+ const n = this._properties[t];
+ let i;
+ return defined(n) ? i = n.get(e) : i = getDefault$1(this._class, t), i;
+};
+MetadataTable.prototype.setProperty = function(e, t, n) {
+ const i = this._properties[t];
+ return defined(i) ? (i.set(e, n), !0) : !1;
+};
+MetadataTable.prototype.getPropertyBySemantic = function(e, t) {
+ let n;
+ const i = this._class.propertiesBySemantic;
+ if (defined(i) && (n = i[t]), defined(n))
+ return this.getProperty(e, n.id);
+};
+MetadataTable.prototype.setPropertyBySemantic = function(e, t, n) {
+ let i;
+ const r = this._class.propertiesBySemantic;
+ return defined(r) && (i = r[t]), defined(i) ? this.setProperty(e, i.id, n) : !1;
+};
+MetadataTable.prototype.getPropertyTypedArray = function(e) {
+ const t = this._properties[e];
+ if (defined(t))
+ return t.getTypedArray();
+};
+MetadataTable.prototype.getPropertyTypedArrayBySemantic = function(e) {
+ let t;
+ const n = this._class.propertiesBySemantic;
+ if (defined(n) && (t = n[e]), defined(t))
+ return this.getPropertyTypedArray(t.id);
+};
+function getDefault$1(e, t) {
+ const n = e.properties;
+ if (!defined(n))
+ return;
+ const i = n[t];
+ if (defined(i) && defined(i.default)) {
+ let r = i.default;
+ return i.isArray && (r = clone$1(r, !0)), r = i.normalize(r), i.unpackVectorAndMatrixTypes(r);
+ }
+}
+function ResourceLoader() {
+}
+Object.defineProperties(ResourceLoader.prototype, {
+ /**
+ * The cache key of the resource.
+ *
+ * @memberof ResourceLoader.prototype
+ *
+ * @type {string}
+ * @readonly
+ * @private
+ */
+ cacheKey: {
+ // eslint-disable-next-line getter-return
+ get: function() {
+ DeveloperError.throwInstantiationError();
+ }
+ }
+});
+ResourceLoader.prototype.load = function() {
+ DeveloperError.throwInstantiationError();
+};
+ResourceLoader.prototype.unload = function() {
+};
+ResourceLoader.prototype.process = function(e) {
+ return !1;
+};
+ResourceLoader.prototype.getError = function(e, t) {
+ defined(t) && defined(t.message) && (e += `
+${t.message}`);
+ const n = new RuntimeError(e);
+ return defined(t) && (n.stack = `Original stack:
+${t.stack}
+Handler stack:
+${n.stack}`), n;
+};
+ResourceLoader.prototype.isDestroyed = function() {
+ return !1;
+};
+ResourceLoader.prototype.destroy = function() {
+ return this.unload(), destroyObject(this);
+};
+const ResourceLoaderState = {
+ /**
+ * The resource has not yet been loaded.
+ *
+ * @type {number}
+ * @constant
+ * @private
+ */
+ UNLOADED: 0,
+ /**
+ * The resource is loading. In this state, external resources are fetched as needed.
+ *
+ * @type {number}
+ * @constant
+ * @private
+ */
+ LOADING: 1,
+ /**
+ * The resource has finished loading, but requires further processing.
+ *
+ * @type {number}
+ * @constant
+ * @private
+ */
+ LOADED: 2,
+ /**
+ * The resource is processing. GPU resources are allocated in this state as needed.
+ *
+ * @type {Number}
+ * @constant
+ * @private
+ */
+ PROCESSING: 3,
+ /**
+ * The resource has finished loading and processing; the results are ready to be used.
+ *
+ * @type {number}
+ * @constant
+ * @private
+ */
+ READY: 4,
+ /**
+ * The resource loading or processing has failed due to an error.
+ *
+ * @type {number}
+ * @constant
+ * @private
+ */
+ FAILED: 5
+}, ResourceLoaderState$1 = Object.freeze(ResourceLoaderState);
+function BufferLoader(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.typedArray, n = e.resource, i = e.cacheKey;
+ this._typedArray = t, this._resource = n, this._cacheKey = i, this._state = ResourceLoaderState$1.UNLOADED, this._promise = void 0;
+}
+defined(Object.create) && (BufferLoader.prototype = Object.create(ResourceLoader.prototype), BufferLoader.prototype.constructor = BufferLoader);
+Object.defineProperties(BufferLoader.prototype, {
+ /**
+ * The cache key of the resource.
+ *
+ * @memberof BufferLoader.prototype
+ *
+ * @type {string}
+ * @readonly
+ * @private
+ */
+ cacheKey: {
+ get: function() {
+ return this._cacheKey;
+ }
+ },
+ /**
+ * The typed array containing the embedded buffer contents.
+ *
+ * @memberof BufferLoader.prototype
+ *
+ * @type {Uint8Array}
+ * @readonly
+ * @private
+ */
+ typedArray: {
+ get: function() {
+ return this._typedArray;
+ }
+ }
+});
+BufferLoader.prototype.load = async function() {
+ return defined(this._promise) ? this._promise : defined(this._typedArray) ? (this._promise = Promise.resolve(this), this._promise) : (this._promise = loadExternalBuffer(this), this._promise);
+};
+async function loadExternalBuffer(e) {
+ const t = e._resource;
+ e._state = ResourceLoaderState$1.LOADING;
+ try {
+ const n = await BufferLoader._fetchArrayBuffer(t);
+ return e.isDestroyed() ? void 0 : (e._typedArray = new Uint8Array(n), e._state = ResourceLoaderState$1.READY, e);
+ } catch (n) {
+ if (e.isDestroyed())
+ return;
+ e._state = ResourceLoaderState$1.FAILED;
+ const i = `Failed to load external buffer: ${t.url}`;
+ throw e.getError(i, n);
+ }
+}
+BufferLoader._fetchArrayBuffer = function(e) {
+ return e.fetchArrayBuffer();
+};
+BufferLoader.prototype.unload = function() {
+ this._typedArray = void 0;
+};
+(function() {
+ var e = "b9H79TebbbeJq9Geueu9Geub9Gbb9Gvuuuuueu9Gduueu9Gluu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akaqfai6Egxcsfgecl4cifcd4hmadakal2fhPdndndnaec9WGgsTmbcbhzaPhHawhOxekdnaxmbalheinaraw9Ram6miawcbamzNjjjbamfhwaecufgembxvkkcbhAaPhOinaDaAfRbbhCaDcjlfheaOhoaxhXinaeaoRbbgQaC9RgCcetaC;acr4786bbaoalfhoaecefheaQhCaXcufgXmbkaraw9Ram6mdaOcefhOawcbamzNjjjbamfhwaAcefgAal9hmbxlkkindnaxTmbaDazfRbbhCaDcjlfheaHhoaxhXinaeaoRbbgQaC9RgCcetaC;acr4786bbaoalfhoaecefheaQhCaXcufgXmbkkaraO9Ram6mearaOcbamzNjjjbgLamfgw9RcK6mecbhKaDcjlfhOinaDcjlfaKfhYcwhAczhQceheindndnaegXce9hmbcuhoaYRbbmecbhodninaogecsSmeaecefhoaOaefcefRbbTmbkkcucbaecs6EhoxekaXcethocuaXtc;:bGcFb7hCcbheinaoaCaOaefRbb9nfhoaecefgecz9hmbkkaoaQaoaQ6geEhQaXaAaeEhAaXcetheaXcl6mbkdndndndnaAcufPdiebkaLaKco4fgeaeRbbcdciaAclSEaKci4coGtV86bbaAcw9hmeawaY8Pbb83bbawcwfaYcwf8Pbb83bbawczfhwxdkaLaKco4fgeaeRbbceaKci4coGtV86bbkdncwaA9Tg8Ambinawcb86bbawcefhwxbkkcuaAtcu7hYcbhEaOh3ina3hea8AhCcbhoinaeRbbgQaYcFeGgXaQaX6EaoaAtVhoaecefheaCcufgCmbkawao86bba3a8Afh3awcefhwaEa8AfgEcz6mbkcbheindnaOaefRbbgoaX6mbawao86bbawcefhwkaecefgecz9hmbkkdnaKczfgKas9pmbaOczfhOaraw9RcL0mekkaKas6meawTmeaHcefhHawhOazcefgzalSmixbkkcbhoxikcbhoaraw9Ralcaalca0E6mddnalc8F0mbawcbcaal9RgezNjjjbaefhwkawaDcjdfalz:tjjjbalfab9RhoxdkaDaPaxcufal2falz:tjjjb8Aaxakfhkawmbkcbhokavcjof8Kjjjjbaok9heeuaecaaeca0Eabcj;abae9Uc;WFbGgdcjdadcjd6Egdfcufad9Uae2adcl4cifcd4adV2fcefkmbcbabBdN:kjjbk:zse5u8Jjjjjbc;ae9Rgl8Kjjjjbcbhvdnaici9UgocHfae0mbabcbyd:e:kjjbgrc;GeV86bbalc;abfcFecjezNjjjb8AalcUfgw9cu83ibalc8WfgD9cu83ibalcyfgq9cu83ibalcafgk9cu83ibalcKfgx9cu83ibalczfgm9cu83ibal9cu83iwal9cu83ibabaefc9WfhPabcefgsaofhednaiTmbcmcsarcb9kgzEhHcbhOcbhAcbhCcbhXcbhQindnaeaP9nmbcbhvxikaQcufhvadaCcdtfgLydbhKaLcwfydbhYaLclfydbh8AcbhEdndndninalc;abfavcsGcitfgoydlh3dndndnaoydbgoaK9hmba3a8ASmekdnaoa8A9hmba3aY9hmbaEcefhExekaoaY9hmea3aK9hmeaEcdfhEkaEc870mdaXcufhvaLaEciGcx2goc:y1jjbfydbcdtfydbh3aLaocN1jjbfydbcdtfydbh8AaLaoc:q1jjbfydbcdtfydbhKcbhodnindnalavcsGcdtfydba39hmbaohYxdkcuhYavcufhvaocefgocz9hmbkkaOa3aOSgvaYce9iaYaH9oVgoGfhOdndndncbcsavEaYaoEgvcs9hmbarce9imba3a3aAa3cefaASgvEgAcefSmecmcsavEhvkasavaEcdtc;WeGV86bbavcs9hmea3aA9Rgvcetavc8F917hvinaeavcFb0crtavcFbGV86bbaecefheavcje6hoavcr4hvaoTmbka3hAxvkcPhvasaEcdtcPV86bba3hAkavTmiavaH9omicdhocehEaQhYxlkavcufhvaEclfgEc;ab9hmbkkdnaLceaYaOSceta8AaOSEcx2gvc:q1jjbfydbcdtfydbgKTaLavcN1jjbfydbcdtfydbg8AceSGaLavc:y1jjbfydbcdtfydbg3cdSGaOcb9hGazGg5ce9hmbaw9cu83ibaD9cu83ibaq9cu83ibak9cu83ibax9cu83ibam9cu83ibal9cu83iwal9cu83ibcbhOkcbhEaXcufgvhodnindnalaocsGcdtfydba8A9hmbaEhYxdkcuhYaocufhoaEcefgEcz9hmbkkcbhodnindnalavcsGcdtfydba39hmbaohExdkcuhEavcufhvaocefgocz9hmbkkaOaKaOSg8EfhLdndnaYcm0mbaYcefhYxekcbcsa8AaLSgvEhYaLavfhLkdndnaEcm0mbaEcefhExekcbcsa3aLSgvEhEaLavfhLkc9:cua8EEh8FcbhvaEaYcltVgacFeGhodndndninavcj1jjbfRbbaoSmeavcefgvcz9hmbxdkka5aKaO9havcm0VVmbasavc;WeV86bbxekasa8F86bbaeaa86bbaecefhekdna8EmbaKaA9Rgvcetavc8F917hvinaeavcFb0gocrtavcFbGV86bbavcr4hvaecefheaombkaKhAkdnaYcs9hmba8AaA9Rgvcetavc8F917hvinaeavcFb0gocrtavcFbGV86bbavcr4hvaecefheaombka8AhAkdnaEcs9hmba3aA9Rgvcetavc8F917hvinaeavcFb0gocrtavcFbGV86bbavcr4hvaecefheaombka3hAkalaXcdtfaKBdbaXcefcsGhvdndnaYPzbeeeeeeeeeeeeeebekalavcdtfa8ABdbaXcdfcsGhvkdndnaEPzbeeeeeeeeeeeeeebekalavcdtfa3BdbavcefcsGhvkcihoalc;abfaQcitfgEaKBdlaEa8ABdbaQcefcsGhYcdhEavhXaLhOxekcdhoalaXcdtfa3BdbcehEaXcefcsGhXaQhYkalc;abfaYcitfgva8ABdlava3Bdbalc;abfaQaEfcsGcitfgva3BdlavaKBdbascefhsaQaofcsGhQaCcifgCai6mbkkcbhvaeaP0mbcbhvinaeavfavcj1jjbfRbb86bbavcefgvcz9hmbkaeab9Ravfhvkalc;aef8KjjjjbavkZeeucbhddninadcefgdc8F0meceadtae6mbkkadcrfcFeGcr9Uci2cdfabci9U2cHfkmbcbabBd:e:kjjbk:ydewu8Jjjjjbcz9Rhlcbhvdnaicvfae0mbcbhvabcbRb:e:kjjbc;qeV86bbal9cb83iwabcefhoabaefc98fhrdnaiTmbcbhwcbhDindnaoar6mbcbskadaDcdtfydbgqalcwfawaqav9Rgvavc8F91gv7av9Rc507gwcdtfgkydb9Rgvc8E91c9:Gavcdt7awVhvinaoavcFb0gecrtavcFbGV86bbavcr4hvaocefhoaembkakaqBdbaqhvaDcefgDai9hmbkkcbhvaoar0mbaocbBbbaoab9RclfhvkavkBeeucbhddninadcefgdc8F0meceadtae6mbkkadcwfcFeGcr9Uab2cvfk:bvli99dui99ludnaeTmbcuadcetcuftcu7:Yhvdndncuaicuftcu7:YgoJbbbZMgr:lJbbb9p9DTmbar:Ohwxekcjjjj94hwkcbhicbhDinalclfIdbgrJbbbbJbbjZalIdbgq:lar:lMalcwfIdbgk:lMgr:varJbbbb9BEgrNhxaqarNhrdndnakJbbbb9GTmbaxhqxekJbbjZar:l:tgqaq:maxJbbbb9GEhqJbbjZax:l:tgxax:marJbbbb9GEhrkdndnalcxfIdbgxJbbj:;axJbbj:;9GEgkJbbjZakJbbjZ9FEavNJbbbZJbbb:;axJbbbb9GEMgx:lJbbb9p9DTmbax:Ohmxekcjjjj94hmkdndnaqJbbj:;aqJbbj:;9GEgxJbbjZaxJbbjZ9FEaoNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:OhPxekcjjjj94hPkdndnarJbbj:;arJbbj:;9GEgqJbbjZaqJbbjZ9FEaoNJbbbZJbbb:;arJbbbb9GEMgr:lJbbb9p9DTmbar:Ohsxekcjjjj94hskdndnadcl9hmbabaifgzas86bbazcifam86bbazcdfaw86bbazcefaP86bbxekabaDfgzas87ebazcofam87ebazclfaw87ebazcdfaP87ebkalczfhlaiclfhiaDcwfhDaecufgembkkk;hlld99eud99eudnaeTmbdndncuaicuftcu7:YgvJbbbZMgo:lJbbb9p9DTmbao:Ohixekcjjjj94hikaic;8FiGhrinabcofcicdalclfIdb:lalIdb:l9EgialcwfIdb:lalaicdtfIdb:l9EEgialcxfIdb:lalaicdtfIdb:l9EEgiarV87ebdndnJbbj:;JbbjZalaicdtfIdbJbbbb9DEgoalaicd7cdtfIdbJ;Zl:1ZNNgwJbbj:;awJbbj:;9GEgDJbbjZaDJbbjZ9FEavNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohqxekcjjjj94hqkabcdfaq87ebdndnalaicefciGcdtfIdbJ;Zl:1ZNaoNgwJbbj:;awJbbj:;9GEgDJbbjZaDJbbjZ9FEavNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohqxekcjjjj94hqkabaq87ebdndnaoalaicufciGcdtfIdbJ;Zl:1ZNNgoJbbj:;aoJbbj:;9GEgwJbbjZawJbbjZ9FEavNJbbbZJbbb:;aoJbbbb9GEMgo:lJbbb9p9DTmbao:Ohixekcjjjj94hikabclfai87ebabcwfhbalczfhlaecufgembkkk:dvdxue998Jjjjjbcjd9Rgo8Kjjjjbadcd4hrdndndndnavcd9hmbadcl6meaohwarhDinawc:CuBdbawclfhwaDcufgDmbkaeTmiadcl6mdarcdthqalhkcbhxinaohwakhDarhminawawydbgPaDydbgscL4cFeGc:cufcbasEgsaPas9kEBdbaDclfhDawclfhwamcufgmmbkakaqfhkaxcefgxaeSmixbkkaeTmdxekaeTmekavcb9hadcl6gqVhzarcdthxavce9hhHcbhdindndndnaHmbaqmdc:CuhDalhwarhminaDawydbgPcL4cFeGc:cufcbaPEgPaDaP9kEhDawclfhwamcufgmmbxdkkc:CuhDazmbaohwalhmarhPinawamydbgscL4cFeGgkc8Aakc8A9kEc:cufcbasEBdbamclfhmawclfhwaPcufgPmbkkaqmbcbhwarhPinaDhmdnavceSmbaoawfydbhmkdndnalawfIdbgOcjjj;8iamai9RcefgmcLt9R::NJbbbZJbbb:;aOJbbbb9GEMgO:lJbbb9p9DTmbaO:Ohsxekcjjjj94hskabawfascFFFrGamcKtVBdbawclfhwaPcufgPmbkkabaxfhbalaxfhladcefgdae9hmbkkaocjdf8Kjjjjbk;HqdCui998Jjjjjbc:qd9Rgv8Kjjjjbavc:Sefcbc;KbzNjjjb8AcbhodnadTmbcbhoaiTmbdnabae9hmbavcuadcdtgradcFFFFi0Ecbyd:m:kjjbHjjjjbbgeBd:SeavceBd:mdaeabarz:tjjjb8Akavc:GefcwfcbBdbav9cb83i:Geavc:Gefaeadaiavc:Sefz:njjjbavyd:Gehwadci9UgDcbyd:m:kjjbHjjjjbbhravc:Sefavyd:mdgqcdtfarBdbavaqcefgkBd:mdarcbaDzNjjjbhxavc:SefakcdtfcuaicdtaicFFFFi0Ecbyd:m:kjjbHjjjjbbgmBdbavaqcdfgPBd:mdawhramhkinakalIdbalarydbgscwascw6Ecdtfc;ebfIdbMUdbarclfhrakclfhkaicufgimbkavc:SefaPcdtfcuaDcdtadcFFFF970Ecbyd:m:kjjbHjjjjbbgPBdbdnadci6mbaehraPhkaDhiinakamarydbcdtfIdbamarclfydbcdtfIdbMamarcwfydbcdtfIdbMUdbarcxfhrakclfhkaicufgimbkkaqcifhoavc;qbfhzavhravyd:KehHavyd:OehOcbhscbhkcbhAcehCinarhXcihQaeakci2gLcdtfgrydbhdarclfydbhqabaAcx2fgicwfarcwfydbgKBdbaiclfaqBdbaiadBdbaxakfce86bbazaKBdwazaqBdlazadBdbaPakcdtfcbBdbdnasTmbcihQaXhiinazaQcdtfaiydbgrBdbaQaraK9harad9haraq9hGGfhQaiclfhiascufgsmbkkaAcefhAcbhsinaOaHaeasaLfcdtfydbcdtgifydbcdtfgKhrawaifgqydbgdhidnadTmbdninarydbakSmearclfhraicufgiTmdxbkkaraKadcdtfc98fydbBdbaqaqydbcufBdbkascefgsci9hmbkdndnaQTmbcuhkJbbbbhYcbhqavyd:KehKavyd:OehLindndnawazaqcdtfydbcdtgsfydbgrmbaqcefhqxekaqcs0hiamasfgdIdbh8AadalcbaqcefgqaiEcdtfIdbalarcwarcw6Ecdtfc;ebfIdbMgEUdbaEa8A:thEarcdthiaLaKasfydbcdtfhrinaParydbgscdtfgdaEadIdbMg8AUdba8AaYaYa8A9DgdEhYasakadEhkarclfhraic98fgimbkkaqaQ9hmbkakcu9hmekaCaD9pmdindnaxaCfRbbmbaChkxdkaDaCcefgC9hmbxikkaQczaQcz6EhsazhraXhzakcu9hmbkkaocdtavc:Seffc98fhrdninaoTmearydbcbyd1:kjjbH:bjjjbbarc98fhraocufhoxbkkavc:qdf8Kjjjjbk;IlevucuaicdtgvaicFFFFi0Egocbyd:m:kjjbHjjjjbbhralalyd9GgwcdtfarBdbalawcefBd9GabarBdbaocbyd:m:kjjbHjjjjbbhralalyd9GgocdtfarBdbalaocefBd9GabarBdlcuadcdtadcFFFFi0Ecbyd:m:kjjbHjjjjbbhralalyd9GgocdtfarBdbalaocefBd9GabarBdwabydbcbavzNjjjb8Aadci9UhDdnadTmbabydbhoaehladhrinaoalydbcdtfgvavydbcefBdbalclfhlarcufgrmbkkdnaiTmbabydbhlabydlhrcbhvaihoinaravBdbarclfhralydbavfhvalclfhlaocufgombkkdnadci6mbabydlhrabydwhvcbhlinaecwfydbhoaeclfydbhdaraeydbcdtfgwawydbgwcefBdbavawcdtfalBdbaradcdtfgdadydbgdcefBdbavadcdtfalBdbaraocdtfgoaoydbgocefBdbavaocdtfalBdbaecxfheaDalcefgl9hmbkkdnaiTmbabydlheabydbhlinaeaeydbalydb9RBdbalclfhlaeclfheaicufgimbkkkQbabaeadaic:01jjbz:mjjjbkQbabaeadaic:C:jjjbz:mjjjbk9DeeuabcFeaicdtzNjjjbhlcbhbdnadTmbindnalaeydbcdtfgiydbcu9hmbaiabBdbabcefhbkaeclfheadcufgdmbkkabk;Wkivuo99lu8Jjjjjbc;W;Gb9Rgl8Kjjjjbcbhvalcj;Gbfcbc;KbzNjjjb8AalcuadcdtadcFFFFi0Egocbyd:m:kjjbHjjjjbbgrBdj9GalceBd;G9GalcFFF;7rBdwal9cFFF;7;3FF:;Fb83dbalcFFF97Bd;S9Gal9cFFF;7FFF:;u83d;K9Gaicd4hwdndnadmbJFFuFhDJFFuuhqJFFuuhkJFFuFhxJFFuuhmJFFuFhPxekawcdthsaehzincbhiinalaifgHazaifIdbgDaHIdbgxaxaD9EEUdbalc;K;GbfaifgHaDaHIdbgxaxaD9DEUdbaiclfgicx9hmbkazasfhzavcefgvad9hmbkalIdwhqalId;S9GhDalIdlhkalId;O9GhxalIdbhmalId;K9GhPkdndnadTmbJbbbbJbbjZJbbbbaPam:tgPaPJbbbb9DEgPaxak:tgxaxaP9DEgxaDaq:tgDaDax9DEgD:vaDJbbbb9BEhDawcdthsarhHadhzindndnaDaeIdbam:tNJb;au9eNJbbbZMgx:lJbbb9p9DTmbax:Ohixekcjjjj94hikaicztaicwtcj;GiGVaicsGVc:p;G:dKGcH2c;d;H:WKGcv2c;j:KM;jbGhvdndnaDaeclfIdbak:tNJb;au9eNJbbbZMgx:lJbbb9p9DTmbax:Ohixekcjjjj94hikaicztaicwtcj;GiGVaicsGVc:p;G:dKGcH2c;d;H:WKGcq2cM;j:KMeGavVhvdndnaDaecwfIdbaq:tNJb;au9eNJbbbZMgx:lJbbb9p9DTmbax:Ohixekcjjjj94hikaHavaicztaicwtcj;GiGVaicsGVc:p;G:dKGcH2c;d;H:WKGcC2c:KM;j:KdGVBdbaeasfheaHclfhHazcufgzmbkalcbcj;GbzNjjjbhiarhHadheinaiaHydbgzcFrGcx2fgvavydbcefBdbaiazcq4cFrGcx2fgvavydlcefBdlaiazcC4cFrGcx2fgzazydwcefBdwaHclfhHaecufgembxdkkalcbcj;GbzNjjjb8AkcbhHcbhzcbhecbhvinalaHfgiydbhsaiazBdbaicwfgwydbhOawavBdbaiclfgiydbhwaiaeBdbasazfhzaOavfhvawaefheaHcxfgHcj;Gb9hmbkcbhHalaocbyd:m:kjjbHjjjjbbgiBd:e9GdnadTmbabhzinazaHBdbazclfhzadaHcefgH9hmbkabhHadhzinalaraHydbgecdtfydbcFrGcx2fgvavydbgvcefBdbaiavcdtfaeBdbaHclfhHazcufgzmbkaihHadhzinalaraHydbgecdtfydbcq4cFrGcx2fgvavydlgvcefBdlabavcdtfaeBdbaHclfhHazcufgzmbkabhHadhzinalaraHydbgecdtfydbcC4cFrGcx2fgvavydwgvcefBdwaiavcdtfaeBdbaHclfhHazcufgzmbkcbhHinabaiydbcdtfaHBdbaiclfhiadaHcefgH9hmbkkclhidninaic98Smealcj;Gbfaifydbcbyd1:kjjbH:bjjjbbaic98fhixbkkalc;W;Gbf8Kjjjjbk9teiucbcbyd:q:kjjbgeabcifc98GfgbBd:q:kjjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabk9teiucbcbyd:q:kjjbgeabcrfc94GfgbBd:q:kjjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik9:eiuZbhedndncbyd:q:kjjbgdaecztgi9nmbcuheadai9RcFFifcz4nbcuSmekadhekcbabae9Rcifc98Gcbyd:q:kjjbfgdBd:q:kjjbdnadZbcztge9nmbadae9RcFFifcz4nb8Akkk:Iddbcjwk:edb4:h9w9N94:P:gW:j9O:ye9Pbbbbbbebbbdbbbebbbdbbbbbbbdbbbbbbbebbbbbbb:l29hZ;69:9kZ;N;76Z;rg97Z;z;o9xZ8J;B85Z;:;u9yZ;b;k9HZ:2;Z9DZ9e:l9mZ59A8KZ:r;T3Z:A:zYZ79OHZ;j4::8::Y:D9V8:bbbb9s:49:Z8R:hBZ9M9M;M8:L;z;o8:;8:PG89q;x:J878R:hQ8::M:B;e87bbbbbbjZbbjZbbjZ:E;V;N8::Y:DsZ9i;H;68:xd;R8:;h0838:;W:NoZbbbb:WV9O8:uf888:9i;H;68:9c9G;L89;n;m9m89;D8Ko8:bbbbf:8tZ9m836ZS:2AZL;zPZZ818EZ9e:lxZ;U98F8:819E;68:bc:eqkzebbbebbbdbbbaWbb", t = new Uint8Array([32, 0, 65, 2, 1, 106, 34, 33, 3, 128, 11, 4, 13, 64, 6, 253, 10, 7, 15, 116, 127, 5, 8, 12, 40, 16, 19, 54, 20, 9, 27, 255, 113, 17, 42, 67, 24, 23, 146, 148, 18, 14, 22, 45, 70, 69, 56, 114, 101, 21, 25, 63, 75, 136, 108, 28, 118, 29, 73, 115]);
+ if (typeof WebAssembly != "object")
+ return {
+ supported: !1
+ };
+ var n, i = WebAssembly.instantiate(r(e), {}).then(function(m) {
+ n = m.instance, n.exports.__wasm_call_ctors(), n.exports.meshopt_encodeVertexVersion(0), n.exports.meshopt_encodeIndexVersion(1);
+ });
+ function r(m) {
+ for (var _ = new Uint8Array(m.length), y = 0; y < m.length; ++y) {
+ var C = m.charCodeAt(y);
+ _[y] = C > 96 ? C - 97 : C > 64 ? C - 39 : C + 4;
+ }
+ for (var T = 0, y = 0; y < m.length; ++y)
+ _[T++] = _[y] < 60 ? t[_[y]] : (_[y] - 60) * 64 + _[++y];
+ return _.buffer.slice(0, T);
+ }
+ function o(m) {
+ if (!m)
+ throw new Error("Assertion failed");
+ }
+ function s(m) {
+ return new Uint8Array(m.buffer, m.byteOffset, m.byteLength);
+ }
+ function c(m, _, y, C) {
+ var T = n.exports.sbrk, x = T(_.length * 4), b = T(y * 4), S = new Uint8Array(n.exports.memory.buffer), E = s(_);
+ S.set(E, x), C && C(x, x, _.length, y);
+ var A = m(b, x, _.length, y);
+ S = new Uint8Array(n.exports.memory.buffer);
+ var D = new Uint32Array(y);
+ new Uint8Array(D.buffer).set(S.subarray(b, b + y * 4)), E.set(S.subarray(x, x + _.length * 4)), T(x - T(0));
+ for (var P = 0; P < _.length; ++P)
+ _[P] = D[_[P]];
+ return [D, A];
+ }
+ function l(m, _, y, C) {
+ var T = n.exports.sbrk, x = T(y * 4), b = T(y * C), S = new Uint8Array(n.exports.memory.buffer);
+ S.set(s(_), b), m(x, b, y, C), S = new Uint8Array(n.exports.memory.buffer);
+ var E = new Uint32Array(y);
+ return new Uint8Array(E.buffer).set(S.subarray(x, x + y * 4)), T(x - T(0)), E;
+ }
+ function d(m, _, y, C, T) {
+ var x = n.exports.sbrk, b = x(_), S = x(C * T), E = new Uint8Array(n.exports.memory.buffer);
+ E.set(s(y), S);
+ var A = m(b, _, S, C, T), D = new Uint8Array(A);
+ return D.set(E.subarray(b, b + A)), x(b - x(0)), D;
+ }
+ function f(m) {
+ for (var _ = 0, y = 0; y < m.length; ++y) {
+ var C = m[y];
+ _ = _ < C ? C : _;
+ }
+ return _;
+ }
+ function h(m, _) {
+ if (o(_ == 2 || _ == 4), _ == 4)
+ return new Uint32Array(m.buffer, m.byteOffset, m.byteLength / 4);
+ var y = new Uint16Array(m.buffer, m.byteOffset, m.byteLength / 2);
+ return new Uint32Array(y);
+ }
+ function p(m, _, y, C, T, x, b) {
+ var S = n.exports.sbrk, E = S(y * C), A = S(y * x), D = new Uint8Array(n.exports.memory.buffer);
+ D.set(s(_), A), m(E, y, C, T, A, b);
+ var P = new Uint8Array(y * C);
+ return P.set(D.subarray(E, E + y * C)), S(E - S(0)), P;
+ }
+ return {
+ ready: i,
+ supported: !0,
+ reorderMesh: function(m, _, y) {
+ var C = _ ? y ? n.exports.meshopt_optimizeVertexCacheStrip : n.exports.meshopt_optimizeVertexCache : void 0;
+ return c(n.exports.meshopt_optimizeVertexFetchRemap, m, f(m) + 1, C);
+ },
+ reorderPoints: function(m, _) {
+ return o(m instanceof Float32Array), o(m.length % _ == 0), o(_ >= 3), l(n.exports.meshopt_spatialSortRemap, m, m.length / _, _ * 4);
+ },
+ encodeVertexBuffer: function(m, _, y) {
+ o(y > 0 && y <= 256), o(y % 4 == 0);
+ var C = n.exports.meshopt_encodeVertexBufferBound(_, y);
+ return d(n.exports.meshopt_encodeVertexBuffer, C, m, _, y);
+ },
+ encodeIndexBuffer: function(m, _, y) {
+ o(y == 2 || y == 4), o(_ % 3 == 0);
+ var C = h(m, y), T = n.exports.meshopt_encodeIndexBufferBound(_, f(C) + 1);
+ return d(n.exports.meshopt_encodeIndexBuffer, T, C, _, 4);
+ },
+ encodeIndexSequence: function(m, _, y) {
+ o(y == 2 || y == 4);
+ var C = h(m, y), T = n.exports.meshopt_encodeIndexSequenceBound(_, f(C) + 1);
+ return d(n.exports.meshopt_encodeIndexSequence, T, C, _, 4);
+ },
+ encodeGltfBuffer: function(m, _, y, C) {
+ var T = {
+ ATTRIBUTES: this.encodeVertexBuffer,
+ TRIANGLES: this.encodeIndexBuffer,
+ INDICES: this.encodeIndexSequence
+ };
+ return o(T[C]), T[C](m, _, y);
+ },
+ encodeFilterOct: function(m, _, y, C) {
+ return o(y == 4 || y == 8), o(C >= 1 && C <= 16), p(n.exports.meshopt_encodeFilterOct, m, _, y, C, 16);
+ },
+ encodeFilterQuat: function(m, _, y, C) {
+ return o(y == 8), o(C >= 4 && C <= 16), p(n.exports.meshopt_encodeFilterQuat, m, _, y, C, 16);
+ },
+ encodeFilterExp: function(m, _, y, C, T) {
+ o(y > 0 && y % 4 == 0), o(C >= 1 && C <= 24);
+ var x = {
+ Separate: 0,
+ SharedVector: 1,
+ SharedComponent: 2
+ };
+ return p(n.exports.meshopt_encodeFilterExp, m, _, y, C, y, T ? x[T] : 1);
+ }
+ };
+})();
+var MeshoptDecoder = function() {
+ var e = "b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuikqbeeedddillviebeoweuec:q;iekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbol79IV9Rbrq;w8Wqdbk;esezu8Jjjjjbcj;eb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Radz1jjjbhwcj;abad9Uc;WFbGgocjdaocjd6EhDaicefhocbhqdnindndndnaeaq9nmbaDaeaq9RaqaDfae6Egkcsfglcl4cifcd4hxalc9WGgmTmecbhPawcjdfhsaohzinaraz9Rax6mvarazaxfgo9RcK6mvczhlcbhHinalgic9WfgOawcj;cbffhldndndndndnazaOco4fRbbaHcoG4ciGPlbedibkal9cb83ibalcwf9cb83ibxikalaoRblaoRbbgOco4gAaAciSgAE86bbawcj;cbfaifglcGfaoclfaAfgARbbaOcl4ciGgCaCciSgCE86bbalcVfaAaCfgARbbaOcd4ciGgCaCciSgCE86bbalc7faAaCfgARbbaOciGgOaOciSgOE86bbalctfaAaOfgARbbaoRbegOco4gCaCciSgCE86bbalc91faAaCfgARbbaOcl4ciGgCaCciSgCE86bbalc4faAaCfgARbbaOcd4ciGgCaCciSgCE86bbalc93faAaCfgARbbaOciGgOaOciSgOE86bbalc94faAaOfgARbbaoRbdgOco4gCaCciSgCE86bbalc95faAaCfgARbbaOcl4ciGgCaCciSgCE86bbalc96faAaCfgARbbaOcd4ciGgCaCciSgCE86bbalc97faAaCfgARbbaOciGgOaOciSgOE86bbalc98faAaOfgORbbaoRbigoco4gAaAciSgAE86bbalc99faOaAfgORbbaocl4ciGgAaAciSgAE86bbalc9:faOaAfgORbbaocd4ciGgAaAciSgAE86bbalcufaOaAfglRbbaociGgoaociSgoE86bbalaofhoxdkalaoRbwaoRbbgOcl4gAaAcsSgAE86bbawcj;cbfaifglcGfaocwfaAfgARbbaOcsGgOaOcsSgOE86bbalcVfaAaOfgORbbaoRbegAcl4gCaCcsSgCE86bbalc7faOaCfgORbbaAcsGgAaAcsSgAE86bbalctfaOaAfgORbbaoRbdgAcl4gCaCcsSgCE86bbalc91faOaCfgORbbaAcsGgAaAcsSgAE86bbalc4faOaAfgORbbaoRbigAcl4gCaCcsSgCE86bbalc93faOaCfgORbbaAcsGgAaAcsSgAE86bbalc94faOaAfgORbbaoRblgAcl4gCaCcsSgCE86bbalc95faOaCfgORbbaAcsGgAaAcsSgAE86bbalc96faOaAfgORbbaoRbvgAcl4gCaCcsSgCE86bbalc97faOaCfgORbbaAcsGgAaAcsSgAE86bbalc98faOaAfgORbbaoRbogAcl4gCaCcsSgCE86bbalc99faOaCfgORbbaAcsGgAaAcsSgAE86bbalc9:faOaAfgORbbaoRbrgocl4gAaAcsSgAE86bbalcufaOaAfglRbbaocsGgoaocsSgoE86bbalaofhoxekalao8Pbb83bbalcwfaocwf8Pbb83bbaoczfhokdnaiam9pmbaHcdfhHaiczfhlarao9RcL0mekkaiam6mvaoTmvdnakTmbawaPfRbbhHawcj;cbfhlashiakhOinaialRbbgzce4cbazceG9R7aHfgH86bbaiadfhialcefhlaOcufgOmbkkascefhsaohzaPcefgPad9hmbxikkcbc99arao9Radcaadca0ESEhoxlkaoaxad2fhCdnakmbadhlinaoTmlarao9Rax6mlaoaxfhoalcufglmbkaChoxekcbhmawcjdfhAinarao9Rax6miawamfRbbhHawcj;cbfhlaAhiakhOinaialRbbgzce4cbazceG9R7aHfgH86bbaiadfhialcefhlaOcufgOmbkaAcefhAaoaxfhoamcefgmad9hmbkaChokabaqad2fawcjdfakad2z1jjjb8Aawawcjdfakcufad2fadz1jjjb8Aakaqfhqaombkc9:hoxekc9:hokavcj;ebf8Kjjjjbaok;cseHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgwce0mbavc;abfcFecjez:jjjjb8AavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhDaicefgqarfhidnaeTmbcmcsawceSEhkcbhxcbhmcbhPcbhwcbhlindnaiaD9nmbc9:hoxikdndnaqRbbgoc;Ve0mbavc;abfalaocu7gscl4fcsGcitfgzydlhrazydbhzdnaocsGgHak9pmbavawasfcsGcdtfydbaxaHEhoaHThsdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkaxasfhxcdhHavawcdtfaoBdbawasfhwcehsalhOxdkdndnaHcsSmbaHc987aHamffcefhoxekaicefhoai8SbbgHcFeGhsdndnaHcu9mmbaohixekaicvfhiascFbGhscrhHdninao8SbbgOcFbGaHtasVhsaOcu9kmeaocefhoaHcrfgHc8J9hmbxdkkaocefhikasce4cbasceG9R7amfhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhHavawcdtfaoBdbcehsawcefhwalhOaohmxekdnaocpe0mbaxcefgHavawaDaocsGfRbbgocl49RcsGcdtfydbaocz6gzEhravawao9RcsGcdtfydbaHazfgAaocsGgHEhoaHThCdndnadcd9hmbabaPcetfgHax87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHaxBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfaxBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgOaxBdlaOarBdbavawazfgwcsGcdtfaoBdbalcefcsGhOawaCfhwaxhzaAaCfhxxekaxcbaiRbbgOEgzaoc;:eSgHfhraOcsGhCaOcl4hAdndnaOcs0mbarcefhoxekarhoavawaA9RcsGcdtfydbhrkdndnaCmbaocefhxxekaohxavawaO9RcsGcdtfydbhokdndnaHTmbaicefhHxekaicdfhHai8SbegscFeGhzdnascu9kmbaicofhXazcFbGhzcrhidninaH8SbbgscFbGaitazVhzascu9kmeaHcefhHaicrfgic8J9hmbkaXhHxekaHcefhHkazce4cbazceG9R7amfgmhzkdndnaAcsSmbaHhsxekaHcefhsaH8SbbgicFeGhrdnaicu9kmbaHcvfhXarcFbGhrcrhidninas8SbbgHcFbGaitarVhraHcu9kmeascefhsaicrfgic8J9hmbkaXhsxekascefhskarce4cbarceG9R7amfgmhrkdndnaCcsSmbashixekascefhias8SbbgocFeGhHdnaocu9kmbascvfhXaHcFbGhHcrhodninai8SbbgscFbGaotaHVhHascu9kmeaicefhiaocrfgoc8J9hmbkaXhixekaicefhikaHce4cbaHceG9R7amfgmhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfazBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgXazBdlaXarBdbavawaOcz6aAcsSVfgwcsGcdtfaoBdbawaCTaCcsSVfhwalcefcsGhOkaqcefhqavc;abfaOcitfgOarBdlaOaoBdbavc;abfalasfcsGcitfgraoBdlarazBdbawcsGhwalaHfcsGhlaPcifgPae6mbkkcbc99aiaDSEhokavc;aef8Kjjjjbaok:flevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:Lvoeue99dud99eud99dndnadcl9hmbaeTmeindndnabcdfgd8Sbb:Yab8Sbbgi:Ygl:l:tabcefgv8Sbbgo:Ygr:l:tgwJbb;:9cawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai86bbdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad86bbdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad86bbabclfhbaecufgembxdkkaeTmbindndnabclfgd8Ueb:Yab8Uebgi:Ygl:l:tabcdfgv8Uebgo:Ygr:l:tgwJb;:FSawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai87ebdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad87ebdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad87ebabcwfhbaecufgembkkk;oiliui99iue99dnaeTmbcbhiabhlindndnJ;Zl81Zalcof8UebgvciV:Y:vgoal8Ueb:YNgrJb;:FSNJbbbZJbbb:;arJbbbb9GEMgw:lJbbb9p9DTmbaw:OhDxekcjjjj94hDkalclf8Uebhqalcdf8UebhkabaiavcefciGfcetfaD87ebdndnaoak:YNgwJb;:FSNJbbbZJbbb:;awJbbbb9GEMgx:lJbbb9p9DTmbax:OhDxekcjjjj94hDkabaiavciGfgkcd7cetfaD87ebdndnaoaq:YNgoJb;:FSNJbbbZJbbb:;aoJbbbb9GEMgx:lJbbb9p9DTmbax:OhDxekcjjjj94hDkabaiavcufciGfcetfaD87ebdndnJbbjZararN:tawawN:taoaoN:tgrJbbbbarJbbbb9GE:rJb;:FSNJbbbZMgr:lJbbb9p9DTmbar:Ohvxekcjjjj94hvkabakcetfav87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2gdTmbinababydbgecwtcw91:Yaece91cjjj98Gcjjj;8if::NUdbabclfhbadcufgdmbkkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkkkebcjwklz9Kbb", t = "b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuikqbbebeedddilve9Weeeviebeoweuec:q;Aekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbwl79IV9RbDq:p9sqlbzik9:evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaec:q:yjjbfai86bbaecitc:q1jjbfab8Piw83ibaecefgecjd9hmbkk:N8JlHud97euo978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Rad;8qbbcj;abad9UhlaicefhodnaeTmbadTmbalc;WFbGglcjdalcjd6EhwcbhDinawaeaD9RaDawfae6Egqcsfglc9WGgkci2hxakcethmalcl4cifcd4hPabaDad2fhsakc;ab6hzcbhHincbhOaohAdndninaraA9RaP6meavcj;cbfaOak2fhCaAaPfhocbhidnazmbarao9Rc;Gb6mbcbhlinaCalfhidndndndndnaAalco4fRbbgXciGPlbedibkaipxbbbbbbbbbbbbbbbbpklbxikaiaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbaoclfaYpQbfaKc:q:yjjbfRbbfhoxdkaiaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbaocwfaYpQbfaKc:q:yjjbfRbbfhoxekaiaopbbbpklbaoczfhokdndndndndnaXcd4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklzxikaiaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzaoclfaYpQbfaKc:q:yjjbfRbbfhoxdkaiaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzaocwfaYpQbfaKc:q:yjjbfRbbfhoxekaiaopbbbpklzaoczfhokdndndndndnaXcl4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklaxikaiaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaaoclfaYpQbfaKc:q:yjjbfRbbfhoxdkaiaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaaocwfaYpQbfaKc:q:yjjbfRbbfhoxekaiaopbbbpklaaoczfhokdndndndndnaXco4Plbedibkaipxbbbbbbbbbbbbbbbbpkl8WxikaiaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WaoclfaYpQbfaXc:q:yjjbfRbbfhoxdkaiaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WaocwfaYpQbfaXc:q:yjjbfRbbfhoxekaiaopbbbpkl8Waoczfhokalc;abfhialcjefak0meaihlarao9Rc;Fb0mbkkdnaiak9pmbaici4hlinarao9RcK6miaCaifhXdndndndndnaAaico4fRbbalcoG4ciGPlbedibkaXpxbbbbbbbbbbbbbbbbpkbbxikaXaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkbbaoclfaYpQbfaKc:q:yjjbfRbbfhoxdkaXaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkbbaocwfaYpQbfaKc:q:yjjbfRbbfhoxekaXaopbbbpkbbaoczfhokalcdfhlaiczfgiak6mbkkaoTmeaohAaOcefgOclSmdxbkkc9:hoxlkdnakTmbavcjdfaHfhiavaHfpbdbhYcbhXinaiavcj;cbfaXfglpblbgLcep9TaLpxeeeeeeeeeeeeeeeegQp9op9Hp9rgLalakfpblbg8Acep9Ta8AaQp9op9Hp9rg8ApmbzeHdOiAlCvXoQrLgEalamfpblbg3cep9Ta3aQp9op9Hp9rg3alaxfpblbg5cep9Ta5aQp9op9Hp9rg5pmbzeHdOiAlCvXoQrLg8EpmbezHdiOAlvCXorQLgQaQpmbedibedibedibediaYp9UgYp9AdbbaiadfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfglaYaEa8EpmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaladfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfglaYaLa8ApmwKDYq8AkEx3m5P8Es8FgLa3a5pmwKDYq8AkEx3m5P8Es8Fg8ApmbezHdiOAlvCXorQLgQaQpmbedibedibedibedip9UgYp9AdbbaladfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfglaYaLa8ApmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaladfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfhiaXczfgXak6mbkkaHclfgHad6mbkasavcjdfaqad2;8qbbavavcjdfaqcufad2fad;8qbbaqaDfgDae6mbkkcbc99arao9Radcaadca0ESEhokavcj;kbf8Kjjjjbaokwbz:bjjjbk::seHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgwce0mbavc;abfcFecje;8kbavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhDaicefgqarfhidnaeTmbcmcsawceSEhkcbhxcbhmcbhPcbhwcbhlindnaiaD9nmbc9:hoxikdndnaqRbbgoc;Ve0mbavc;abfalaocu7gscl4fcsGcitfgzydlhrazydbhzdnaocsGgHak9pmbavawasfcsGcdtfydbaxaHEhoaHThsdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkaxasfhxcdhHavawcdtfaoBdbawasfhwcehsalhOxdkdndnaHcsSmbaHc987aHamffcefhoxekaicefhoai8SbbgHcFeGhsdndnaHcu9mmbaohixekaicvfhiascFbGhscrhHdninao8SbbgOcFbGaHtasVhsaOcu9kmeaocefhoaHcrfgHc8J9hmbxdkkaocefhikasce4cbasceG9R7amfhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhHavawcdtfaoBdbcehsawcefhwalhOaohmxekdnaocpe0mbaxcefgHavawaDaocsGfRbbgocl49RcsGcdtfydbaocz6gzEhravawao9RcsGcdtfydbaHazfgAaocsGgHEhoaHThCdndnadcd9hmbabaPcetfgHax87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHaxBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfaxBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgOaxBdlaOarBdbavawazfgwcsGcdtfaoBdbalcefcsGhOawaCfhwaxhzaAaCfhxxekaxcbaiRbbgOEgzaoc;:eSgHfhraOcsGhCaOcl4hAdndnaOcs0mbarcefhoxekarhoavawaA9RcsGcdtfydbhrkdndnaCmbaocefhxxekaohxavawaO9RcsGcdtfydbhokdndnaHTmbaicefhHxekaicdfhHai8SbegscFeGhzdnascu9kmbaicofhXazcFbGhzcrhidninaH8SbbgscFbGaitazVhzascu9kmeaHcefhHaicrfgic8J9hmbkaXhHxekaHcefhHkazce4cbazceG9R7amfgmhzkdndnaAcsSmbaHhsxekaHcefhsaH8SbbgicFeGhrdnaicu9kmbaHcvfhXarcFbGhrcrhidninas8SbbgHcFbGaitarVhraHcu9kmeascefhsaicrfgic8J9hmbkaXhsxekascefhskarce4cbarceG9R7amfgmhrkdndnaCcsSmbashixekascefhias8SbbgocFeGhHdnaocu9kmbascvfhXaHcFbGhHcrhodninai8SbbgscFbGaotaHVhHascu9kmeaicefhiaocrfgoc8J9hmbkaXhixekaicefhikaHce4cbaHceG9R7amfgmhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfazBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgXazBdlaXarBdbavawaOcz6aAcsSVfgwcsGcdtfaoBdbawaCTaCcsSVfhwalcefcsGhOkaqcefhqavc;abfaOcitfgOarBdlaOaoBdbavc;abfalasfcsGcitfgraoBdlarazBdbawcsGhwalaHfcsGhlaPcifgPae6mbkkcbc99aiaDSEhokavc;aef8Kjjjjbaok:flevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:wPliuo97eue978Jjjjjbca9Rhiaec98Ghldndnadcl9hmbdnalTmbcbhvabhdinadadpbbbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbadczfhdavclfgval6mbkkalaeSmeaipxbbbbbbbbbbbbbbbbgqpklbaiabalcdtfgdaeciGglcdtgv;8qbbdnalTmbaiaipblbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDaqp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpklbkadaiav;8qbbskdnalTmbcbhvabhdinadczfgxaxpbbbgopxbbbbbbFFbbbbbbFFgkp9oadpbbbgDaopmbediwDqkzHOAKY8AEgwczp:Reczp:Sep;6egraDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eawczp:Sep;6egwp;Gearp;Gep;Kep;Legopxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegrpxb;:FSb;:FSb;:FSb;:FSararp;Meaoaop;Meawaqawamp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFFbbFFbbFFbbFFbbp9oaoawp;Meaqp;Keczp:Rep9qgoarawp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogrpmwDKYqk8AExm35Ps8E8Fp9qpkbbadaDakp9oaoarpmbezHdiOAlvCXorQLp9qpkbbadcafhdavclfgval6mbkkalaeSmbaiaeciGgvcitgdfcbcaad9R;8kbaiabalcitfglad;8qbbdnavTmbaiaipblzgopxbbbbbbFFbbbbbbFFgkp9oaipblbgDaopmbediwDqkzHOAKY8AEgwczp:Reczp:Sep;6egraDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eawczp:Sep;6egwp;Gearp;Gep;Kep;Legopxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegrpxb;:FSb;:FSb;:FSb;:FSararp;Meaoaop;Meawaqawamp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFFbbFFbbFFbbFFbbp9oaoawp;Meaqp;Keczp:Rep9qgoarawp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogrpmwDKYqk8AExm35Ps8E8Fp9qpklzaiaDakp9oaoarpmbezHdiOAlvCXorQLp9qpklbkalaiad;8qbbkk;4wllue97euv978Jjjjjbc8W9Rhidnaec98GglTmbcbhvabhoinaiaopbbbgraoczfgwpbbbgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklbaopxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaDakp;Mearp;Keamp9oaqakp;Mearp;Keczp:Rep9qgkpmbezHdiOAlvCXorQLgrp5baipblbpEb:T:j83ibaocwfarp5eaipblbpEe:T:j83ibawaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblbpEd:T:j83ibaocKfakp5eaipblbpEi:T:j83ibaocafhoavclfgval6mbkkdnalaeSmbaiaeciGgvcitgofcbcaao9R;8kbaiabalcitfgwao;8qbbdnavTmbaiaipblbgraipblzgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklaaipxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaDakp;Mearp;Keamp9oaqakp;Mearp;Keczp:Rep9qgkpmbezHdiOAlvCXorQLgrp5baipblapEb:T:j83ibaiarp5eaipblapEe:T:j83iwaiaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblapEd:T:j83izaiakp5eaipblapEi:T:j83iKkawaiao;8qbbkk:Pddiue978Jjjjjbc;ab9Rhidnadcd4ae2glc98GgvTmbcbheabhdinadadpbbbgocwp:Recwp:Sep;6eaocep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepkbbadczfhdaeclfgeav6mbkkdnavalSmbaialciGgecdtgdVcbc;abad9R;8kbaiabavcdtfgvad;8qbbdnaeTmbaiaipblbgocwp:Recwp:Sep;6eaocep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepklbkavaiad;8qbbkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkkebcjwklz9Tbb", n = new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 3, 2, 0, 0, 5, 3, 1, 0, 1, 12, 1, 0, 10, 22, 2, 12, 0, 65, 0, 65, 0, 65, 0, 252, 10, 0, 0, 11, 7, 0, 65, 0, 253, 15, 26, 11]), i = new Uint8Array([32, 0, 65, 2, 1, 106, 34, 33, 3, 128, 11, 4, 13, 64, 6, 253, 10, 7, 15, 116, 127, 5, 8, 12, 40, 16, 19, 54, 20, 9, 27, 255, 113, 17, 42, 67, 24, 23, 146, 148, 18, 14, 22, 45, 70, 69, 56, 114, 101, 21, 25, 63, 75, 136, 108, 28, 118, 29, 73, 115]);
+ if (typeof WebAssembly != "object")
+ return {
+ supported: !1
+ };
+ var r = WebAssembly.validate(n) ? c(t) : c(e), o, s = WebAssembly.instantiate(r, {}).then(function(T) {
+ o = T.instance, o.exports.__wasm_call_ctors();
+ });
+ function c(T) {
+ for (var x = new Uint8Array(T.length), b = 0; b < T.length; ++b) {
+ var S = T.charCodeAt(b);
+ x[b] = S > 96 ? S - 97 : S > 64 ? S - 39 : S + 4;
+ }
+ for (var E = 0, b = 0; b < T.length; ++b)
+ x[E++] = x[b] < 60 ? i[x[b]] : (x[b] - 60) * 64 + x[++b];
+ return x.buffer.slice(0, E);
+ }
+ function l(T, x, b, S, E, A, D) {
+ var P = T.exports.sbrk, I = S + 3 & -4, M = P(I * E), R = P(A.length), L = new Uint8Array(T.exports.memory.buffer);
+ L.set(A, R);
+ var g = x(M, S, E, R, A.length);
+ if (g == 0 && D && D(M, I, E), b.set(L.subarray(M, M + S * E)), P(M - P(0)), g != 0)
+ throw new Error("Malformed buffer data: " + g);
+ }
+ var d = {
+ NONE: "",
+ OCTAHEDRAL: "meshopt_decodeFilterOct",
+ QUATERNION: "meshopt_decodeFilterQuat",
+ EXPONENTIAL: "meshopt_decodeFilterExp"
+ }, f = {
+ ATTRIBUTES: "meshopt_decodeVertexBuffer",
+ TRIANGLES: "meshopt_decodeIndexBuffer",
+ INDICES: "meshopt_decodeIndexSequence"
+ }, h = [], p = 0;
+ function m(T) {
+ var x = {
+ object: new Worker(T),
+ pending: 0,
+ requests: {}
+ };
+ return x.object.onmessage = function(b) {
+ var S = b.data;
+ x.pending -= S.count, x.requests[S.id][S.action](S.value), delete x.requests[S.id];
+ }, x;
+ }
+ function _(T) {
+ for (var x = "self.ready = WebAssembly.instantiate(new Uint8Array([" + new Uint8Array(r) + "]), {}).then(function(result) { result.instance.exports.__wasm_call_ctors(); return result.instance; });self.onmessage = " + C.name + ";" + l.toString() + C.toString(), b = new Blob([x], { type: "text/javascript" }), S = URL.createObjectURL(b), E = h.length; E < T; ++E)
+ h[E] = m(S);
+ for (var E = T; E < h.length; ++E)
+ h[E].object.postMessage({});
+ h.length = T, URL.revokeObjectURL(S);
+ }
+ function y(T, x, b, S, E) {
+ for (var A = h[0], D = 1; D < h.length; ++D)
+ h[D].pending < A.pending && (A = h[D]);
+ return new Promise(function(P, I) {
+ var M = new Uint8Array(b), R = ++p;
+ A.pending += T, A.requests[R] = { resolve: P, reject: I }, A.object.postMessage({ id: R, count: T, size: x, source: M, mode: S, filter: E }, [M.buffer]);
+ });
+ }
+ function C(T) {
+ var x = T.data;
+ if (!x.id)
+ return self.close();
+ self.ready.then(function(b) {
+ try {
+ var S = new Uint8Array(x.count * x.size);
+ l(b, b.exports[x.mode], S, x.count, x.size, x.source, b.exports[x.filter]), self.postMessage({ id: x.id, count: x.count, action: "resolve", value: S }, [S.buffer]);
+ } catch (E) {
+ self.postMessage({ id: x.id, count: x.count, action: "reject", value: E });
+ }
+ });
+ }
+ return {
+ ready: s,
+ supported: !0,
+ useWorkers: function(T) {
+ _(T);
+ },
+ decodeVertexBuffer: function(T, x, b, S, E) {
+ l(o, o.exports.meshopt_decodeVertexBuffer, T, x, b, S, o.exports[d[E]]);
+ },
+ decodeIndexBuffer: function(T, x, b, S) {
+ l(o, o.exports.meshopt_decodeIndexBuffer, T, x, b, S);
+ },
+ decodeIndexSequence: function(T, x, b, S) {
+ l(o, o.exports.meshopt_decodeIndexSequence, T, x, b, S);
+ },
+ decodeGltfBuffer: function(T, x, b, S, E, A) {
+ l(o, o.exports[f[E]], T, x, b, S, o.exports[d[A]]);
+ },
+ decodeGltfBufferAsync: function(T, x, b, S, E) {
+ return h.length > 0 ? y(T, x, b, f[S], d[E]) : s.then(function() {
+ var A = new Uint8Array(T * x);
+ return l(o, o.exports[f[S]], A, T, x, b, o.exports[d[E]]), A;
+ });
+ }
+ };
+}();
+(function() {
+ var e = "b9H79Tebbbe9Hk9Geueu9Geub9Gbb9Gsuuuuuuuuuuuu99uueu9Gvuuuuub9Gvuuuuue999Gquuuuuuu99uueu9Gwuuuuuu99ueu9Giuuue999Gluuuueu9GiuuueuizsdilvoirwDbqqbeqlve9Weiiviebeoweuecj;jekr:Tewo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bbz9TW79O9V9Wt9F79P9T9W29P9M95bl8E9TW79O9V9Wt9F79P9T9W29P9M959x9Pt9OcttV9P9I91tW7bvQ9TW79O9V9Wt9F79P9T9W29P9M959q9V9P9Ut7boX9TW79O9V9Wt9F79P9T9W29P9M959t9J9H2Wbra9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94SWt9J9O9sW9T9H9Wbwl79IV9RbDDwebcekdmxq:f97sdbk:39si8Au8A99zu8Jjjjjbc;W;ab9Rgs8Kjjjjbcbhzascxfcbc;Kbz:ljjjb8AdnabaeSmbabaeadcdtz:kjjjb8AkdndnamcdGmbcbhHxekasalcrfci4gecbyd;S1jjbHjjjjbbgOBdxasceBd2aOcbaez:ljjjbhAcbhlcbhednadTmbcbhlabheadhOinaAaeydbgCci4fgXaXRbbgXceaCcrGgCtV86bbaXcu7aC4ceGalfhlaeclfheaOcufgOmbkcualcdtalcFFFFi0Ehekasaecbyd;S1jjbHjjjjbbgHBdzascdBd2alcd4alfhCcehOinaOgecethOaeaC6mbkcdhzcbhQascuaecdtgOaecFFFFi0Ecbyd;S1jjbHjjjjbbgCBdCasciBd2aCcFeaOz:ljjjbhLdnadTmbaecufhXcbhKinabaQcdtfgYydbgAc:v;t;h;Ev2hCcbhedndninaLaCaXGgCcdtfg8AydbgOcuSmeaHaOcdtfydbaASmdaecefgeaCfhCaeaX9nmbxdkkaHaKcdtfaABdba8AaKBdbaKhOaKcefhKkaYaOBdbaQcefgQad9hmbkkaLcbyd;O1jjbH:bjjjbbascdBd2kascxfazcdtfcualcefgecdtaecFFFFi0Ecbyd;S1jjbHjjjjbbgEBdbasaEBdlasazceVgeBd2ascxfaecdtfcuadcitadcFFFFe0Ecbyd;S1jjbHjjjjbbg3Bdbasa3BdwasazcdfgeBd2asclfabadalcbz:cjjjbascxfaecdtfcualcdtg5alcFFFFi0Eg8Ecbyd;S1jjbHjjjjbbgOBdbasazcifgeBd2ascxfaecdtfa8Ecbyd;S1jjbHjjjjbbg8FBdbasazclVgaBd2alcd4alfhXcehCinaCgecethCaeaX6mbkcbhKascxfaacdtfghcuaecdtgCaecFFFFi0Ecbyd;S1jjbHjjjjbbgXBdbasazcvVggBd2aXcFeaCz:ljjjbhQdnalTmbavcd4hAaecufhCinaKhednaHTmbaHaKcdtfydbhekaiaeaA2cdtfgeydlgXcH4aX7c:F:b:DD2aeydbgXcH4aX7c;D;O:B8J27aeydwgecH4ae7c:3F;N8N27aCGheaKcdth8JdndndndndnaHTmbaHa8JfhYcbhXinaQaecdtfgLydbg8AcuSmlaiaHa8AcdtfydbaA2cdtfaiaYydbaA2cdtfcxz:ojjjbTmiaXcefgXaefaCGheaXaC9nmbxdkkaiaKaA2cdtfhYcbhXinaQaecdtfgLydbg8AcuSmiaia8AaA2cdtfaYcxz:ojjjbTmdaXcefgXaefaCGheaXaC9nmbkkcbhLkaLydbgecu9hmekaLaKBdbaKhekaOa8JfaeBdbaKcefgKal9hmbkcbhea8FhCinaCaeBdbaCclfhCalaecefge9hmbkcbheaOhCa8FhXindnaeaCydbgASmbaXa8FaAcdtfgAydbBdbaAaeBdbkaCclfhCaXclfhXalaecefge9hmbkkcbh8KaQcbyd;O1jjbH:bjjjbbasaaBd2ahalcbyd;S1jjbHjjjjbbgABdbasagBd2ascxfagcdtfa8Ecbyd;S1jjbHjjjjbbgeBdbasazcofgCBd2ascxfaCcdtfa8Ecbyd;S1jjbHjjjjbbgCBdbasazcrfg8LBd2aecFea5z:ljjjbh8MaCcFea5z:ljjjbh8NdnalTmba3cwfhyindnaEa8KgXcefg8Kcdtfydbg8AaEaXcdtgefydbgCSmba8AaC9Rh8Ja3aCcitfh5a8Naefhga8MaefhKcbhLindndna5aLcitfydbgQaX9hmbaKaXBdbagaXBdbxekdnaEaQcdtgafgeclfydbgCaeydbgeSmba3aecitg8AfydbaXSmeaCae9Rhhaecu7aCfhYaya8AfhCcbheinaYaeSmeaecefheaCydbh8AaCcwfhCa8AaX9hmbkaeah6meka8NaafgeaXaQaeydbcuSEBdbaKaQaXaKydbcuSEBdbkaLcefgLa8J9hmbkka8Kal9hmbkaOhCaHhLa8FhXa8Nh8Aa8MhQcbheindndnaeaCydbgY9hmbdnaqTmbaehYdnaHTmbaLydbhYkaqaYfRbbTmbaAaefcl86bbxdkdnaeaXydbgY9hmbaQydbhYdna8AydbgKcu9hmbaYcu9hmbaAaefcb86bbxikaAaefh8JdnaeaKSmbaeaYSmba8Jce86bbxika8Jcl86bbxdkdnaea8FaYcdtgKfydb9hmbdna8Aydbg8JcuSmbaea8JSmbaQydbg5cuSmbaea5Smba8NaKfydbgacuSmbaaaYSmba8MaKfydbgKcuSmbaKaYSmbdnaOa8JcdtfydbaOaKcdtfydb9hmbaOa5cdtfydbaOaacdtfydb9hmbaAaefcd86bbxlkaAaefcl86bbxikaAaefcl86bbxdkaAaefcl86bbxekaAaefaAaYfRbb86bbkaCclfhCaLclfhLaXclfhXa8Aclfh8AaQclfhQalaecefge9hmbkamceGTmbaAhealhCindnaeRbbce9hmbaecl86bbkaecefheaCcufgCmbkkascxfa8Lcdtfcualcx2alc;v:Q;v:Qe0Ecbyd;S1jjbHjjjjbbggBdbasazcwVg8JBd2agaialavaHz:djjjbh8PdndnaDmbcbhvxekascxfa8JcdtfcualaD2gecdtaecFFFFi0Ecbyd;S1jjbHjjjjbbgvBdbasazcDVg8JBd2alTmbarcd4hYdnaHTmbaDcdthKcbhLavhQinaoaHaLcdtfydbaY2cdtfheawhCaQhXaDh8AinaXaeIdbaCIdbNUdbaeclfheaCclfhCaXclfhXa8Acufg8AmbkaQaKfhQaLcefgLal9hmbxdkkaYcdthYaDcdthKcbhQavhLinaoheawhCaLhXaDh8AinaXaeIdba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ja8Aclfh5dnaDTmbaqaXfgXIdwa8WNaXIdza8XNaXIdaMgRaRMMa8WNaXIdla8VNaXIdCa8WNaXId3MgRaRMMa8VNaXIdba8XNaXIdxa8VNaXIdKMgRaRMMa8XNaXId8KMMMh8RavaLaD2cdtfhCawayaD2cltfheaXIdyh8YaDhXinaCIdbgRJbbb;aNaecxfIdba8WaecwfIdbNa8XaeIdbNa8VaeclfIdbNMMMNaRaRNa8YNa8RMMh8RaCclfhCaeczfheaXcufgXmbkaqadfgXIdwa8UNaXIdzaINaXIdaMgRaRMMa8UNaXIdla8SNaXIdCa8UNaXId3MgRaRMMa8SNaXIdbaINaXIdxa8SNaXIdKMgRaRMMaINaXId8KMMMh8WavaKaD2cdtfhCawaaaD2cltfheaXIdyh8XaDhXinaCIdbgRJbbb;aNaecxfIdba8UaecwfIdbNaIaeIdbNa8SaeclfIdbNMMMNaRaRNa8XNa8WMMh8WaCclfhCaeczfheaXcufgXmbka80a8W:lMh80a81a8R:lMh81ka5aLaKa81a809FgeEBdba8AaQaiaeEBdba8Ja81a80aeEUdbaYcefgYaE9hmbkasc;Wbfcbcj;abz:ljjjb8AaSheaEhCinasc;WbfaeydbcO4c;8ZGfgXaXydbcefBdbaecxfheaCcufgCmbkcbhecbhCinasc;WbfaefgXydbh8AaXaCBdba8AaCfhCaeclfgecj;ab9hmbkcbheaShCinasc;WbfaCydbcO4c;8ZGfgXaXydbgXcefBdbazaXcdtfaeBdbaCcxfhCaEaecefge9hmbkaoak9RgXci9Uh9hdnalTmbcbhea3hCinaCaeBdbaCclfhCalaecefge9hmbkkcbh9ia9ecbalz:ljjjbh6aXcO9Uh9ka9hce4h0asydwh9mcbhdcbh5dninahaza5cdtfydbcx2fg8JIdwg8RaB9Emeada9h9pmeJFFuuhRdna0aE9pmbahaza0cdtfydbcx2fIdwJbb;aZNhRkdna8RaR9ETmbada9k0mdkdna6aOa8Jydlg9ncdtg9ofydbg8Afg9pRbba6aOa8Jydbgicdtg9qfydbg9rfg9s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Rbbc9:fPdebdkaiheina3aecdtgefa8ABdba8Faefydbgeai9hmbxikka8Fa9ofydbhea8Fa9qfydbhia3a9qfa9nBdbaeh9nka3aicdtfa9nBdbka9sce86bba9pce86bbaCIdbgRa83a83aR9DEh83a9icefh9icecdaXRbbceSEadfhdka5cefg5aE9hmbkkdna9imbaohdxikdnalTmbcbhCa8MheindnaeydbgXcuSmbdnaCa3aXcdtg8AfydbgX9hmba8Ma8AfydbhXkaeaXBdbkaeclfhealaCcefgC9hmbkcbhCa8NheindnaeydbgXcuSmbdnaCa3aXcdtg8AfydbgX9hmba8Na8AfydbhXkaeaXBdbkaeclfhealaCcefgC9hmbkkcbhdabhecbhLindna3aeydbcdtfydbgCa3aeclfydbcdtfydbgXSmbaCa3aecwfydbcdtfydbg8ASmbaXa8ASmbabadcdtfgQaCBdbaQcwfa8ABdbaQclfaXBdbadcifhdkaecxfheaLcifgLao6mbkadak9nmdxbkkasclfabadalaOz:cjjjbkdnaHTmbadTmbadheinabaHabydbcdtfydbBdbabclfhbaecufgembkkdnaPTmbaPaca83:rNUdbkasyd2gecdtascxffc98fhOdninaeTmeaOydbcbyd;O1jjbH:bjjjbbaOc98fhOaecufhexbkkasc;W;abf8Kjjjjbadk;Yieouabydlhvabydbclfcbaicdtz:ljjjbhoadci9UhrdnadTmbdnalTmbaehwadhDinaoalawydbcdtfydbcdtfgqaqydbcefBdbawclfhwaDcufgDmbxdkkaehwadhDinaoawydbcdtfgqaqydbcefBdbawclfhwaDcufgDmbkkdnaiTmbcbhDaohwinawydbhqawaDBdbawclfhwaqaDfhDaicufgimbkkdnadci6mbinaecwfydbhwaeclfydbhDaeydbhidnalTmbalawcdtfydbhwalaDcdtfydbhDalaicdtfydbhikavaoaicdtfgqydbcitfaDBdbavaqydbcitfawBdlaqaqydbcefBdbavaoaDcdtfgqydbcitfawBdbavaqydbcitfaiBdlaqaqydbcefBdbavaoawcdtfgwydbcitfaiBdbavawydbcitfaDBdlawawydbcefBdbaecxfhearcufgrmbkkabydbcbBdbk;Podvuv998Jjjjjbca9RgvcFFF;7rBd3av9cFFF;7;3FF:;Fb83dCavcFFF97Bdzav9cFFF;7FFF:;u83dwdnadTmbaicd4hodnabmbdnalTmbcbhrinaealarcdtfydbao2cdtfhwcbhiinavcCfaifgDawaifIdbgqaDIdbgkakaq9EEUdbavcwfaifgDaqaDIdbgkakaq9DEUdbaiclfgicx9hmbkarcefgrad9hmbxikkaocdthrcbhwincbhiinavcCfaifgDaeaifIdbgqaDIdbgkakaq9EEUdbavcwfaifgDaqaDIdbgkakaq9DEUdbaiclfgicx9hmbkaearfheawcefgwad9hmbxdkkdnalTmbcbhrinabarcx2fgiaealarcdtfydbao2cdtfgwIdbUdbaiawIdlUdlaiawIdwUdwcbhiinavcCfaifgDawaifIdbgqaDIdbgkakaq9EEUdbavcwfaifgDaqaDIdbgkakaq9DEUdbaiclfgicx9hmbkarcefgrad9hmbxdkkaocdthlcbhraehwinabarcx2fgiaearao2cdtfgDIdbUdbaiaDIdlUdlaiaDIdwUdwcbhiinavcCfaifgDawaifIdbgqaDIdbgkakaq9EEUdbavcwfaifgDaqaDIdbgkakaq9DEUdbaiclfgicx9hmbkawalfhwarcefgrad9hmbkkJbbbbavIdwavIdCgk:tgqaqJbbbb9DEgqavIdxavIdKgx:tgmamaq9DEgqavIdzavId3gm:tgPaPaq9DEhPdnabTmbadTmbJbbbbJbbjZaP:vaPJbbbb9BEhqinabaqabIdbak:tNUdbabclfgvaqavIdbax:tNUdbabcwfgvaqavIdbam:tNUdbabcxfhbadcufgdmbkkaPk8MbabaeadaialavcbcbcbcbcbaoarawaDz:bjjjbk8MbabaeadaialavaoarawaDaqakaxamaPz:bjjjbk;3Aowud99wue99iul998Jjjjjbc;Wb9Rgw8KjjjjbdndnarmbcbhDxekawcxfcbc;Kbz:ljjjb8Aawcuadcx2adc;v:Q;v:Qe0Ecbyd;S1jjbHjjjjbbgqBdxawceBd2aqaeadaicbz:djjjb8AawcuadcdtadcFFFFi0Egkcbyd;S1jjbHjjjjbbgxBdzawcdBd2adcd4adfhmceheinaegicetheaiam6mbkcbhmawcuaicdtgPaicFFFFi0Ecbyd;S1jjbHjjjjbbgsBdCawciBd2dndnar:Zgz:rJbbbZMgH:lJbbb9p9DTmbaH:Ohexekcjjjj94hekaicufhOc:bwhAcbhCcbhXadhQinaChLaeaAgKcufaeaK9iEamgDcefaeaD9kEhYdndnadTmbaYcuf:YhHaqhiaxheadhmindndnaiIdbaHNJbbbZMg8A:lJbbb9p9DTmba8A:OhAxekcjjjj94hAkaAcCthAdndnaiclfIdbaHNJbbbZMg8A:lJbbb9p9DTmba8A:OhCxekcjjjj94hCkaCcqtaAVhAdndnaicwfIdbaHNJbbbZMg8A:lJbbb9p9DTmba8A:OhCxekcjjjj94hCkaeaAaCVBdbaicxfhiaeclfheamcufgmmbkascFeaPz:ljjjbhEcbh3cbh5indnaEaxa5cdtfydbgAcm4aA7c:v;t;h;Ev2gics4ai7aOGgmcdtfgCydbgecuSmbaeaASmbcehiinaEamaifaOGgmcdtfgCydbgecuSmeaicefhiaeaA9hmbkkaCaABdba3aecuSfh3a5cefg5ad9hmbxdkkascFeaPz:ljjjb8Acbh3kaDaYa3ar0giEhmaLa3aiEhCdna3arSmbaYaKaiEgAam9Rcd9imbdndnaXcl0mbdnaQ:ZgHaL:Zg8A:taY:Yg8EaD:Y:tg8Fa8EaK:Y:tgaa3:Zghaz:tNNNaHaz:taaNa8Aah:tNa8Aaz:ta8FNahaH:tNM:va8EMJbbbZMgH:lJbbb9p9DTmbaH:Ohexdkcjjjj94hexekamaAfcd9Theka3aQaiEhQaXcefgXcs9hmekkdndnaCmbcihicbhDxekcbhiawakcbyd;S1jjbHjjjjbbg5BdKawclBd2dndnadTmbamcuf:YhHaqhiaxheadhmindndnaiIdbaHNJbbbZMg8A:lJbbb9p9DTmba8A:OhAxekcjjjj94hAkaAcCthAdndnaiclfIdbaHNJbbbZMg8A:lJbbb9p9DTmba8A:OhCxekcjjjj94hCkaCcqtaAVhAdndnaicwfIdbaHNJbbbZMg8A:lJbbb9p9DTmba8A:OhCxekcjjjj94hCkaeaAaCVBdbaicxfhiaeclfheamcufgmmbkascFeaPz:ljjjbhEcbhDcbh3inaxa3cdtgYfydbgAcm4aA7c:v;t;h;Ev2gics4ai7hecbhidndninaEaeaOGgmcdtfgCydbgecuSmednaxaecdtgCfydbaASmbaicefgiamfheaiaO9nmekka5aCfydbhixekaCa3BdbaDhiaDcefhDka5aYfaiBdba3cefg3ad9hmbkcuaDc32giaDc;j:KM;jb0EhexekascFeaPz:ljjjb8AcbhDcbhekawaecbyd;S1jjbHjjjjbbgeBd3awcvBd2aecbaiz:ljjjbhCavcd4hxdnadTmbdnalTmbaxcdthEa5hAalheaqhmadhOinaCaAydbc32fgiamIdbaiIdbMUdbaiamclfIdbaiIdlMUdlaiamcwfIdbaiIdwMUdwaiaeIdbaiIdxMUdxaiaeclfIdbaiIdzMUdzaiaecwfIdbaiIdCMUdCaiaiIdKJbbjZMUdKaAclfhAaeaEfheamcxfhmaOcufgOmbxdkka5hmaqheadhAinaCamydbc32fgiaeIdbaiIdbMUdbaiaeclfIdbaiIdlMUdlaiaecwfIdbaiIdwMUdwaiaiIdxJbbbbMUdxaiaiIdzJbbbbMUdzaiaiIdCJbbbbMUdCaiaiIdKJbbjZMUdKamclfhmaecxfheaAcufgAmbkkdnaDTmbaChiaDheinaiaiIdbJbbbbJbbjZaicKfIdbgH:vaHJbbbb9BEgHNUdbaiclfgmaHamIdbNUdbaicwfgmaHamIdbNUdbaicxfgmaHamIdbNUdbaiczfgmaHamIdbNUdbaicCfgmaHamIdbNUdbaic3fhiaecufgembkkcbhAawcuaDcdtgYaDcFFFFi0Egicbyd;S1jjbHjjjjbbgeBdaawcoBd2awaicbyd;S1jjbHjjjjbbgEBd8KaecFeaYz:ljjjbh3dnadTmbaoaoNh8Aaxcdthxalheina8Aaec;C1jjbalEgmIdwaCa5ydbgOc32fgiIdC:tgHaHNamIdbaiIdx:tgHaHNamIdlaiIdz:tgHaHNMMNaqcwfIdbaiIdw:tgHaHNaqIdbaiIdb:tgHaHNaqclfIdbaiIdl:tgHaHNMMMhHdndna3aOcdtgifgmydbcuSmbaEaifIdbaH9ETmekamaABdbaEaifaHUdbka5clfh5aeaxfheaqcxfhqadaAcefgA9hmbkkaba3aYz:kjjjb8AcrhikaicdthiinaiTmeaic98fgiawcxffydbcbyd;O1jjbH:bjjjbbxbkkawc;Wbf8KjjjjbaDk:Odieui99iu8Jjjjjbca9RgicFFF;7rBd3ai9cFFF;7;3FF:;Fb83dCaicFFF97Bdzai9cFFF;7FFF:;u83dwdndnaembJbbjFhlJbbjFhvJbbjFhoxekadcd4cdthrcbhwincbhdinaicCfadfgDabadfIdbglaDIdbgvaval9EEUdbaicwfadfgDalaDIdbgvaval9DEUdbadclfgdcx9hmbkabarfhbawcefgwae9hmbkaiIdzaiId3:thoaiIdxaiIdK:thvaiIdwaiIdC:thlkJbbbbalalJbbbb9DEglavaval9DEglaoaoal9DEk9DeeuabcFeaicdtz:ljjjbhlcbhbdnadTmbindnalaeydbcdtfgiydbcu9hmbaiabBdbabcefhbkaeclfheadcufgdmbkkabk9teiucbcbyd;W1jjbgeabcifc98GfgbBd;W1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabk9teiucbcbyd;W1jjbgeabcrfc94GfgbBd;W1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik9:eiuZbhedndncbyd;W1jjbgdaecztgi9nmbcuheadai9RcFFifcz4nbcuSmekadhekcbabae9Rcifc98Gcbyd;W1jjbfgdBd;W1jjbdnadZbcztge9nmbadae9RcFFifcz4nb8Akk6eiucbhidnadTmbdninabRbbglaeRbbgv9hmeaecefheabcefhbadcufgdmbxdkkalav9Rhikaikk:bedbcjwk9Oebbbdbbbbbbbebbbeeebeebebbeeebebbbbbebebbbbbebbbdbbbbbbbbbbbbbbbeeeeebebbbbbebbbbbeebbbbbbbbbbbbbbbbbbbbbc;Owkxebbbdbbbj9Kbb", t = new Uint8Array([32, 0, 65, 2, 1, 106, 34, 33, 3, 128, 11, 4, 13, 64, 6, 253, 10, 7, 15, 116, 127, 5, 8, 12, 40, 16, 19, 54, 20, 9, 27, 255, 113, 17, 42, 67, 24, 23, 146, 148, 18, 14, 22, 45, 70, 69, 56, 114, 101, 21, 25, 63, 75, 136, 108, 28, 118, 29, 73, 115]);
+ if (typeof WebAssembly != "object")
+ return {
+ supported: !1
+ };
+ var n, i = WebAssembly.instantiate(r(e), {}).then(function(_) {
+ n = _.instance, n.exports.__wasm_call_ctors();
+ });
+ function r(_) {
+ for (var y = new Uint8Array(_.length), C = 0; C < _.length; ++C) {
+ var T = _.charCodeAt(C);
+ y[C] = T > 96 ? T - 97 : T > 64 ? T - 39 : T + 4;
+ }
+ for (var x = 0, C = 0; C < _.length; ++C)
+ y[x++] = y[C] < 60 ? t[y[C]] : (y[C] - 60) * 64 + y[++C];
+ return y.buffer.slice(0, x);
+ }
+ function o(_) {
+ if (!_)
+ throw new Error("Assertion failed");
+ }
+ function s(_) {
+ return new Uint8Array(_.buffer, _.byteOffset, _.byteLength);
+ }
+ function c(_, y, C) {
+ var T = n.exports.sbrk, x = T(y.length * 4), b = T(C * 4), S = new Uint8Array(n.exports.memory.buffer), E = s(y);
+ S.set(E, x);
+ var A = _(b, x, y.length, C);
+ S = new Uint8Array(n.exports.memory.buffer);
+ var D = new Uint32Array(C);
+ new Uint8Array(D.buffer).set(S.subarray(b, b + C * 4)), E.set(S.subarray(x, x + y.length * 4)), T(x - T(0));
+ for (var P = 0; P < y.length; ++P)
+ y[P] = D[y[P]];
+ return [D, A];
+ }
+ function l(_) {
+ for (var y = 0, C = 0; C < _.length; ++C) {
+ var T = _[C];
+ y = y < T ? T : y;
+ }
+ return y;
+ }
+ function d(_, y, C, T, x, b, S, E, A) {
+ var D = n.exports.sbrk, P = D(4), I = D(C * 4), M = D(x * b), R = D(C * 4), L = new Uint8Array(n.exports.memory.buffer);
+ L.set(s(T), M), L.set(s(y), R);
+ var g = _(I, R, C, M, x, b, S, E, A, P);
+ L = new Uint8Array(n.exports.memory.buffer);
+ var w = new Uint32Array(g);
+ s(w).set(L.subarray(I, I + g * 4));
+ var O = new Float32Array(1);
+ return s(O).set(L.subarray(P, P + 4)), D(P - D(0)), [w, O[0]];
+ }
+ function f(_, y, C, T, x, b, S, E, A, D, P, I, M) {
+ var R = n.exports.sbrk, L = R(4), g = R(C * 4), w = R(x * b), O = R(x * E), N = R(A.length * 4), F = R(C * 4), B = D ? R(x) : 0, V = new Uint8Array(n.exports.memory.buffer);
+ V.set(s(T), w), V.set(s(S), O), V.set(s(A), N), V.set(s(y), F), D && V.set(s(D), B);
+ var U = _(g, F, C, w, x, b, O, E, N, A.length, B, P, I, M, L);
+ V = new Uint8Array(n.exports.memory.buffer);
+ var k = new Uint32Array(U);
+ s(k).set(V.subarray(g, g + U * 4));
+ var $ = new Float32Array(1);
+ return s($).set(V.subarray(L, L + 4)), R(L - R(0)), [k, $[0]];
+ }
+ function h(_, y, C, T) {
+ var x = n.exports.sbrk, b = x(C * T), S = new Uint8Array(n.exports.memory.buffer);
+ S.set(s(y), b);
+ var E = _(b, C, T);
+ return x(b - x(0)), E;
+ }
+ function p(_, y, C, T, x, b, S, E) {
+ var A = n.exports.sbrk, D = A(E * 4), P = A(C * T), I = A(C * b), M = new Uint8Array(n.exports.memory.buffer);
+ M.set(s(y), P), x && M.set(s(x), I);
+ var R = _(D, P, C, T, I, b, S, E);
+ M = new Uint8Array(n.exports.memory.buffer);
+ var L = new Uint32Array(R);
+ return s(L).set(M.subarray(D, D + R * 4)), A(D - A(0)), L;
+ }
+ var m = {
+ LockBorder: 1,
+ Sparse: 2,
+ ErrorAbsolute: 4
+ };
+ return {
+ ready: i,
+ supported: !0,
+ // set this to true to be able to use simplifyPoints and simplifyWithAttributes
+ // note that these functions are experimental and may change interface/behavior in a way that will require revising calling code
+ useExperimentalFeatures: !1,
+ compactMesh: function(_) {
+ o(_ instanceof Uint32Array || _ instanceof Int32Array || _ instanceof Uint16Array || _ instanceof Int16Array), o(_.length % 3 == 0);
+ var y = _.BYTES_PER_ELEMENT == 4 ? _ : new Uint32Array(_);
+ return c(n.exports.meshopt_optimizeVertexFetchRemap, y, l(_) + 1);
+ },
+ simplify: function(_, y, C, T, x, b) {
+ o(_ instanceof Uint32Array || _ instanceof Int32Array || _ instanceof Uint16Array || _ instanceof Int16Array), o(_.length % 3 == 0), o(y instanceof Float32Array), o(y.length % C == 0), o(C >= 3), o(T >= 0 && T <= _.length), o(T % 3 == 0), o(x >= 0);
+ for (var S = 0, E = 0; E < (b ? b.length : 0); ++E)
+ o(b[E] in m), S |= m[b[E]];
+ var A = _.BYTES_PER_ELEMENT == 4 ? _ : new Uint32Array(_), D = d(n.exports.meshopt_simplify, A, _.length, y, y.length / C, C * 4, T, x, S);
+ return D[0] = _ instanceof Uint32Array ? D[0] : new _.constructor(D[0]), D;
+ },
+ simplifyWithAttributes: function(_, y, C, T, x, b, S, E, A, D) {
+ o(this.useExperimentalFeatures), o(_ instanceof Uint32Array || _ instanceof Int32Array || _ instanceof Uint16Array || _ instanceof Int16Array), o(_.length % 3 == 0), o(y instanceof Float32Array), o(y.length % C == 0), o(C >= 3), o(T instanceof Float32Array), o(T.length % x == 0), o(x >= 0), o(S == null || S.length == y.length), o(E >= 0 && E <= _.length), o(E % 3 == 0), o(A >= 0), o(Array.isArray(b)), o(x >= b.length), o(b.length <= 16);
+ for (var P = 0, I = 0; I < (D ? D.length : 0); ++I)
+ o(D[I] in m), P |= m[D[I]];
+ var M = _.BYTES_PER_ELEMENT == 4 ? _ : new Uint32Array(_), R = f(n.exports.meshopt_simplifyWithAttributes, M, _.length, y, y.length / C, C * 4, T, x * 4, new Float32Array(b), S ? new Uint8Array(S) : null, E, A, P);
+ return R[0] = _ instanceof Uint32Array ? R[0] : new _.constructor(R[0]), R;
+ },
+ getScale: function(_, y) {
+ return o(_ instanceof Float32Array), o(_.length % y == 0), o(y >= 3), h(n.exports.meshopt_simplifyScale, _, _.length / y, y * 4);
+ },
+ simplifyPoints: function(_, y, C, T, x, b) {
+ return o(this.useExperimentalFeatures), o(_ instanceof Float32Array), o(_.length % y == 0), o(y >= 3), o(C >= 0 && C <= _.length / y), T ? (o(T instanceof Float32Array), o(T.length % x == 0), o(x >= 3), o(_.length / y == T.length / x), p(n.exports.meshopt_simplifyPoints, _, _.length / y, y * 4, T, x * 4, b, C)) : p(n.exports.meshopt_simplifyPoints, _, _.length / y, y * 4, void 0, 0, 0, C);
+ }
+ };
+})();
+function GltfBufferViewLoader(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.resourceCache, n = e.gltf, i = e.bufferViewId, r = e.gltfResource, o = e.baseResource, s = e.cacheKey, c = n.bufferViews[i];
+ let l = c.buffer, d = c.byteOffset, f = c.byteLength, h = !1, p, m, _, y;
+ if (hasExtension(c, "EXT_meshopt_compression")) {
+ const T = c.extensions.EXT_meshopt_compression;
+ l = T.buffer, d = defaultValue(T.byteOffset, 0), f = T.byteLength, h = !0, p = T.byteStride, m = T.count, _ = T.mode, y = defaultValue(T.filter, "NONE");
+ }
+ const C = n.buffers[l];
+ this._hasMeshopt = h, this._meshoptByteStride = p, this._meshoptCount = m, this._meshoptMode = _, this._meshoptFilter = y, this._resourceCache = t, this._gltfResource = r, this._baseResource = o, this._buffer = C, this._bufferId = l, this._byteOffset = d, this._byteLength = f, this._cacheKey = s, this._bufferLoader = void 0, this._typedArray = void 0, this._state = ResourceLoaderState$1.UNLOADED, this._promise = void 0;
+}
+defined(Object.create) && (GltfBufferViewLoader.prototype = Object.create(ResourceLoader.prototype), GltfBufferViewLoader.prototype.constructor = GltfBufferViewLoader);
+Object.defineProperties(GltfBufferViewLoader.prototype, {
+ /**
+ * The cache key of the resource.
+ *
+ * @memberof GltfBufferViewLoader.prototype
+ *
+ * @type {string}
+ * @readonly
+ * @private
+ */
+ cacheKey: {
+ get: function() {
+ return this._cacheKey;
+ }
+ },
+ /**
+ * The typed array containing buffer view data.
+ *
+ * @memberof GltfBufferViewLoader.prototype
+ *
+ * @type {Uint8Array}
+ * @readonly
+ * @private
+ */
+ typedArray: {
+ get: function() {
+ return this._typedArray;
+ }
+ }
+});
+async function loadResources$4(e) {
+ try {
+ const t = getBufferLoader(e);
+ if (e._bufferLoader = t, await t.load(), e.isDestroyed())
+ return;
+ const n = t.typedArray, i = new Uint8Array(
+ n.buffer,
+ n.byteOffset + e._byteOffset,
+ e._byteLength
+ );
+ if (e.unload(), e._typedArray = i, e._hasMeshopt) {
+ const r = e._meshoptCount, o = e._meshoptByteStride, s = new Uint8Array(r * o);
+ MeshoptDecoder.decodeGltfBuffer(
+ s,
+ r,
+ o,
+ e._typedArray,
+ e._meshoptMode,
+ e._meshoptFilter
+ ), e._typedArray = s;
+ }
+ return e._state = ResourceLoaderState$1.READY, e;
+ } catch (t) {
+ if (e.isDestroyed())
+ return;
+ throw e.unload(), e._state = ResourceLoaderState$1.FAILED, e.getError("Failed to load buffer view", t);
+ }
+}
+GltfBufferViewLoader.prototype.load = async function() {
+ return defined(this._promise) ? this._promise : (this._state = ResourceLoaderState$1.LOADING, this._promise = loadResources$4(this), this._promise);
+};
+function getBufferLoader(e) {
+ const t = e._resourceCache, n = e._buffer;
+ if (defined(n.uri)) {
+ const r = e._baseResource.getDerivedResource({
+ url: n.uri
+ });
+ return t.getExternalBufferLoader({
+ resource: r
+ });
+ }
+ return t.getEmbeddedBufferLoader({
+ parentResource: e._gltfResource,
+ bufferId: e._bufferId
+ });
+}
+GltfBufferViewLoader.prototype.unload = function() {
+ defined(this._bufferLoader) && !this._bufferLoader.isDestroyed() && this._resourceCache.unload(this._bufferLoader), this._bufferLoader = void 0, this._typedArray = void 0;
+};
+function DracoLoader() {
+}
+DracoLoader._maxDecodingConcurrency = Math.max(
+ FeatureDetection.hardwareConcurrency - 1,
+ 1
+);
+DracoLoader._decoderTaskProcessor = void 0;
+DracoLoader._taskProcessorReady = !1;
+DracoLoader._error = void 0;
+DracoLoader._getDecoderTaskProcessor = function() {
+ if (!defined(DracoLoader._decoderTaskProcessor)) {
+ const e = new TaskProcessor(
+ "decodeDraco",
+ DracoLoader._maxDecodingConcurrency
+ );
+ e.initWebAssemblyModule({
+ wasmBinaryFile: "ThirdParty/draco_decoder.wasm"
+ }).then(function(t) {
+ t ? DracoLoader._taskProcessorReady = !0 : DracoLoader._error = new RuntimeError(
+ "Draco decoder could not be initialized."
+ );
+ }).catch((t) => {
+ DracoLoader._error = t;
+ }), DracoLoader._decoderTaskProcessor = e;
+ }
+ return DracoLoader._decoderTaskProcessor;
+};
+DracoLoader.decodePointCloud = function(e) {
+ const t = DracoLoader._getDecoderTaskProcessor();
+ if (defined(DracoLoader._error))
+ throw DracoLoader._error;
+ if (DracoLoader._taskProcessorReady)
+ return t.scheduleTask(e, [
+ e.buffer.buffer
+ ]);
+};
+DracoLoader.decodeBufferView = function(e) {
+ const t = DracoLoader._getDecoderTaskProcessor();
+ if (defined(DracoLoader._error))
+ throw DracoLoader._error;
+ if (DracoLoader._taskProcessorReady)
+ return t.scheduleTask(e, [e.array.buffer]);
+};
+function GltfDracoLoader(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.resourceCache, n = e.gltf, i = e.draco, r = e.gltfResource, o = e.baseResource, s = e.cacheKey;
+ this._resourceCache = t, this._gltfResource = r, this._baseResource = o, this._gltf = n, this._draco = i, this._cacheKey = s, this._bufferViewLoader = void 0, this._bufferViewTypedArray = void 0, this._decodePromise = void 0, this._decodedData = void 0, this._state = ResourceLoaderState$1.UNLOADED, this._promise = void 0, this._dracoError = void 0;
+}
+defined(Object.create) && (GltfDracoLoader.prototype = Object.create(ResourceLoader.prototype), GltfDracoLoader.prototype.constructor = GltfDracoLoader);
+Object.defineProperties(GltfDracoLoader.prototype, {
+ /**
+ * The cache key of the resource.
+ *
+ * @memberof GltfDracoLoader.prototype
+ *
+ * @type {string}
+ * @readonly
+ * @private
+ */
+ cacheKey: {
+ get: function() {
+ return this._cacheKey;
+ }
+ },
+ /**
+ * The decoded data.
+ *
+ * @memberof GltfDracoLoader.prototype
+ *
+ * @type {object}
+ * @readonly
+ * @private
+ */
+ decodedData: {
+ get: function() {
+ return this._decodedData;
+ }
+ }
+});
+async function loadResources$3(e) {
+ const t = e._resourceCache;
+ try {
+ const n = t.getBufferViewLoader({
+ gltf: e._gltf,
+ bufferViewId: e._draco.bufferView,
+ gltfResource: e._gltfResource,
+ baseResource: e._baseResource
+ });
+ return e._bufferViewLoader = n, await n.load(), e.isDestroyed() ? void 0 : (e._bufferViewTypedArray = n.typedArray, e._state = ResourceLoaderState$1.PROCESSING, e);
+ } catch (n) {
+ if (e.isDestroyed())
+ return;
+ handleError$a(e, n);
+ }
+}
+GltfDracoLoader.prototype.load = async function() {
+ return defined(this._promise) ? this._promise : (this._state = ResourceLoaderState$1.LOADING, this._promise = loadResources$3(this), this._promise);
+};
+function handleError$a(e, t) {
+ throw e.unload(), e._state = ResourceLoaderState$1.FAILED, e.getError("Failed to load Draco", t);
+}
+async function processDecode(e, t) {
+ try {
+ const n = await t;
+ return e.isDestroyed() ? void 0 : (e.unload(), e._decodedData = {
+ indices: n.indexArray,
+ vertexAttributes: n.attributeData
+ }, e._state = ResourceLoaderState$1.READY, e._baseResource);
+ } catch (n) {
+ if (e.isDestroyed())
+ return;
+ e._dracoError = n;
+ }
+}
+GltfDracoLoader.prototype.process = function(e) {
+ if (this._state === ResourceLoaderState$1.READY)
+ return !0;
+ if (this._state !== ResourceLoaderState$1.PROCESSING || (defined(this._dracoError) && handleError$a(this, this._dracoError), !defined(this._bufferViewTypedArray)) || defined(this._decodePromise))
+ return !1;
+ const t = this._draco, i = this._gltf.bufferViews, r = t.bufferView, o = i[r], s = t.attributes, c = {
+ // Need to make a copy of the typed array otherwise the underlying
+ // ArrayBuffer may be accessed on both the worker and the main thread. This
+ // leads to errors such as "ArrayBuffer at index 0 is already detached".
+ // PERFORMANCE_IDEA: Look into SharedArrayBuffer to get around this.
+ array: new Uint8Array(this._bufferViewTypedArray),
+ bufferView: o,
+ compressedAttributes: s,
+ dequantizeInShader: !0
+ }, l = DracoLoader.decodeBufferView(c);
+ if (!defined(l))
+ return !1;
+ this._decodePromise = processDecode(this, l);
+};
+GltfDracoLoader.prototype.unload = function() {
+ defined(this._bufferViewLoader) && this._resourceCache.unload(this._bufferViewLoader), this._bufferViewLoader = void 0, this._bufferViewTypedArray = void 0, this._decodedData = void 0, this._gltf = void 0;
+};
+function loadImageFromTypedArray(e) {
+ const t = e.uint8Array, n = e.format, i = e.request, r = defaultValue(e.flipY, !1), o = defaultValue(
+ e.skipColorSpaceConversion,
+ !1
+ ), s = new Blob([t], {
+ type: n
+ });
+ let c;
+ return Resource.supportsImageBitmapOptions().then(function(l) {
+ return l ? Promise.resolve(
+ Resource.createImageBitmapFromBlob(s, {
+ flipY: r,
+ premultiplyAlpha: !1,
+ skipColorSpaceConversion: o
+ })
+ ) : (c = window.URL.createObjectURL(s), new Resource({
+ url: c,
+ request: i
+ }).fetchImage({
+ flipY: r,
+ skipColorSpaceConversion: o
+ }));
+ }).then(function(l) {
+ return defined(c) && window.URL.revokeObjectURL(c), l;
+ }).catch(function(l) {
+ return defined(c) && window.URL.revokeObjectURL(c), Promise.reject(l);
+ });
+}
+function GltfImageLoader(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.resourceCache, n = e.gltf, i = e.imageId, r = e.gltfResource, o = e.baseResource, s = e.cacheKey, c = n.images[i], l = c.bufferView, d = c.uri;
+ this._resourceCache = t, this._gltfResource = r, this._baseResource = o, this._gltf = n, this._bufferViewId = l, this._uri = d, this._cacheKey = s, this._bufferViewLoader = void 0, this._image = void 0, this._mipLevels = void 0, this._state = ResourceLoaderState$1.UNLOADED, this._promise = void 0;
+}
+defined(Object.create) && (GltfImageLoader.prototype = Object.create(ResourceLoader.prototype), GltfImageLoader.prototype.constructor = GltfImageLoader);
+Object.defineProperties(GltfImageLoader.prototype, {
+ /**
+ * The cache key of the resource.
+ *
+ * @memberof GltfImageLoader.prototype
+ *
+ * @type {string}
+ * @readonly
+ * @private
+ */
+ cacheKey: {
+ get: function() {
+ return this._cacheKey;
+ }
+ },
+ /**
+ * The image.
+ *
+ * @memberof GltfImageLoader.prototype
+ *
+ * @type {Image|ImageBitmap|CompressedTextureBuffer}
+ * @readonly
+ * @private
+ */
+ image: {
+ get: function() {
+ return this._image;
+ }
+ },
+ /**
+ * The mip levels. Only defined for KTX2 files containing mip levels.
+ *
+ * @memberof GltfImageLoader.prototype
+ *
+ * @type {Uint8Array[]}
+ * @readonly
+ * @private
+ */
+ mipLevels: {
+ get: function() {
+ return this._mipLevels;
+ }
+ }
+});
+GltfImageLoader.prototype.load = function() {
+ return defined(this._promise) ? this._promise : defined(this._bufferViewId) ? (this._promise = loadFromBufferView$2(this), this._promise) : (this._promise = loadFromUri$1(this), this._promise);
+};
+function getImageAndMipLevels(e) {
+ let t;
+ return Array.isArray(e) && (t = e.slice(1, e.length).map(function(n) {
+ return n.bufferView;
+ }), e = e[0]), {
+ image: e,
+ mipLevels: t
+ };
+}
+async function loadFromBufferView$2(e) {
+ e._state = ResourceLoaderState$1.LOADING;
+ const t = e._resourceCache;
+ try {
+ const n = t.getBufferViewLoader({
+ gltf: e._gltf,
+ bufferViewId: e._bufferViewId,
+ gltfResource: e._gltfResource,
+ baseResource: e._baseResource
+ });
+ if (e._bufferViewLoader = n, await n.load(), e.isDestroyed())
+ return;
+ const i = n.typedArray, r = await loadImageFromBufferTypedArray(i);
+ if (e.isDestroyed())
+ return;
+ const o = getImageAndMipLevels(r);
+ return e.unload(), e._image = o.image, e._mipLevels = o.mipLevels, e._state = ResourceLoaderState$1.READY, e;
+ } catch (n) {
+ return e.isDestroyed() ? void 0 : handleError$9(e, n, "Failed to load embedded image");
+ }
+}
+async function loadFromUri$1(e) {
+ e._state = ResourceLoaderState$1.LOADING;
+ const t = e._baseResource, n = e._uri, i = t.getDerivedResource({
+ url: n
+ });
+ try {
+ const r = await loadImageFromUri(i);
+ if (e.isDestroyed())
+ return;
+ const o = getImageAndMipLevels(r);
+ return e.unload(), e._image = o.image, e._mipLevels = o.mipLevels, e._state = ResourceLoaderState$1.READY, e;
+ } catch (r) {
+ return e.isDestroyed() ? void 0 : handleError$9(e, r, `Failed to load image: ${n}`);
+ }
+}
+function handleError$9(e, t, n) {
+ return e.unload(), e._state = ResourceLoaderState$1.FAILED, Promise.reject(e.getError(n, t));
+}
+function getMimeTypeFromTypedArray(e) {
+ const t = e.subarray(0, 2), n = e.subarray(0, 4), i = e.subarray(8, 12);
+ if (t[0] === 255 && t[1] === 216)
+ return "image/jpeg";
+ if (t[0] === 137 && t[1] === 80)
+ return "image/png";
+ if (t[0] === 171 && t[1] === 75)
+ return "image/ktx2";
+ if (
+ // See https://developers.google.com/speed/webp/docs/riff_container#webp_file_header
+ n[0] === 82 && n[1] === 73 && n[2] === 70 && n[3] === 70 && i[0] === 87 && i[1] === 69 && i[2] === 66 && i[3] === 80
+ )
+ return "image/webp";
+ throw new RuntimeError("Image format is not recognized");
+}
+async function loadImageFromBufferTypedArray(e) {
+ const t = getMimeTypeFromTypedArray(e);
+ if (t === "image/ktx2") {
+ const n = new Uint8Array(e);
+ return loadKTX2(n);
+ }
+ return GltfImageLoader._loadImageFromTypedArray({
+ uint8Array: e,
+ format: t,
+ flipY: !1,
+ skipColorSpaceConversion: !0
+ });
+}
+const ktx2Regex$1 = /(^data:image\/ktx2)|(\.ktx2$)/i;
+function loadImageFromUri(e) {
+ const t = e.getUrlComponent(!1, !0);
+ return ktx2Regex$1.test(t) ? loadKTX2(e) : e.fetchImage({
+ skipColorSpaceConversion: !0,
+ preferImageBitmap: !0
+ });
+}
+GltfImageLoader.prototype.unload = function() {
+ defined(this._bufferViewLoader) && !this._bufferViewLoader.isDestroyed() && this._resourceCache.unload(this._bufferViewLoader), this._bufferViewLoader = void 0, this._uri = void 0, this._image = void 0, this._mipLevels = void 0, this._gltf = void 0;
+};
+GltfImageLoader._loadImageFromTypedArray = loadImageFromTypedArray;
+const JobType = {
+ TEXTURE: 0,
+ PROGRAM: 1,
+ BUFFER: 2,
+ NUMBER_OF_JOB_TYPES: 3
+}, JobType$1 = Object.freeze(JobType);
+function GltfIndexBufferLoader(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.resourceCache, n = e.gltf, i = e.accessorId, r = e.gltfResource, o = e.baseResource, s = e.draco, c = e.cacheKey, l = defaultValue(e.asynchronous, !0), d = defaultValue(e.loadBuffer, !1), f = defaultValue(e.loadTypedArray, !1), h = n.accessors[i].componentType;
+ this._resourceCache = t, this._gltfResource = r, this._baseResource = o, this._gltf = n, this._accessorId = i, this._indexDatatype = h, this._draco = s, this._cacheKey = c, this._asynchronous = l, this._loadBuffer = d, this._loadTypedArray = f, this._bufferViewLoader = void 0, this._dracoLoader = void 0, this._typedArray = void 0, this._buffer = void 0, this._state = ResourceLoaderState$1.UNLOADED, this._promise = void 0;
+}
+defined(Object.create) && (GltfIndexBufferLoader.prototype = Object.create(ResourceLoader.prototype), GltfIndexBufferLoader.prototype.constructor = GltfIndexBufferLoader);
+Object.defineProperties(GltfIndexBufferLoader.prototype, {
+ /**
+ * The cache key of the resource.
+ *
+ * @memberof GltfIndexBufferLoader.prototype
+ *
+ * @type {string}
+ * @readonly
+ * @private
+ */
+ cacheKey: {
+ get: function() {
+ return this._cacheKey;
+ }
+ },
+ /**
+ * The index buffer. This is only defined when loadBuffer is true.
+ *
+ * @memberof GltfIndexBufferLoader.prototype
+ *
+ * @type {Buffer}
+ * @readonly
+ * @private
+ */
+ buffer: {
+ get: function() {
+ return this._buffer;
+ }
+ },
+ /**
+ * The typed array containing indices. This is only defined when loadTypedArray is true.
+ *
+ * @memberof GltfIndexBufferLoader.prototype
+ *
+ * @type {Uint8Array|Uint16Array|Uint32Array}
+ * @readonly
+ * @private
+ */
+ typedArray: {
+ get: function() {
+ return this._typedArray;
+ }
+ },
+ /**
+ * The index datatype after decode.
+ *
+ * @memberof GltfIndexBufferLoader.prototype
+ *
+ * @type {IndexDatatype}
+ * @readonly
+ * @private
+ */
+ indexDatatype: {
+ get: function() {
+ return this._indexDatatype;
+ }
+ }
+});
+const scratchIndexBufferJob = new CreateIndexBufferJob();
+GltfIndexBufferLoader.prototype.load = async function() {
+ return defined(this._promise) ? this._promise : defined(this._draco) ? (this._promise = loadFromDraco$1(this), this._promise) : (this._promise = loadFromBufferView$1(this), this._promise);
+};
+async function loadFromDraco$1(e) {
+ e._state = ResourceLoaderState$1.LOADING;
+ const t = e._resourceCache;
+ try {
+ const n = t.getDracoLoader({
+ gltf: e._gltf,
+ draco: e._draco,
+ gltfResource: e._gltfResource,
+ baseResource: e._baseResource
+ });
+ return e._dracoLoader = n, await n.load(), e.isDestroyed() ? void 0 : (e._state = ResourceLoaderState$1.LOADED, e);
+ } catch (n) {
+ if (e.isDestroyed())
+ return;
+ handleError$8(e, n);
+ }
+}
+async function loadFromBufferView$1(e) {
+ const t = e._gltf, n = e._accessorId, r = t.accessors[n].bufferView;
+ e._state = ResourceLoaderState$1.LOADING;
+ const o = e._resourceCache;
+ try {
+ const s = o.getBufferViewLoader({
+ gltf: t,
+ bufferViewId: r,
+ gltfResource: e._gltfResource,
+ baseResource: e._baseResource
+ });
+ if (e._bufferViewLoader = s, await s.load(), e.isDestroyed())
+ return;
+ const c = s.typedArray;
+ return e._typedArray = createIndicesTypedArray(
+ e,
+ c
+ ), e._state = ResourceLoaderState$1.PROCESSING, e;
+ } catch (s) {
+ if (e.isDestroyed())
+ return;
+ handleError$8(e, s);
+ }
+}
+function createIndicesTypedArray(e, t) {
+ const n = e._gltf, i = e._accessorId, r = n.accessors[i], o = r.count, s = r.componentType, c = IndexDatatype$1.getSizeInBytes(s);
+ let l = t.buffer, d = t.byteOffset + r.byteOffset;
+ if (d % c !== 0) {
+ const h = o * c, p = new Uint8Array(l, d, h);
+ l = new Uint8Array(p).buffer, d = 0, deprecationWarning(
+ "index-buffer-unaligned",
+ `The index array is not aligned to a ${c}-byte boundary.`
+ );
+ }
+ let f;
+ return s === IndexDatatype$1.UNSIGNED_BYTE ? f = new Uint8Array(l, d, o) : s === IndexDatatype$1.UNSIGNED_SHORT ? f = new Uint16Array(l, d, o) : s === IndexDatatype$1.UNSIGNED_INT && (f = new Uint32Array(l, d, o)), f;
+}
+function handleError$8(e, t) {
+ throw e.unload(), e._state = ResourceLoaderState$1.FAILED, e.getError("Failed to load index buffer", t);
+}
+function CreateIndexBufferJob() {
+ this.typedArray = void 0, this.indexDatatype = void 0, this.context = void 0, this.buffer = void 0;
+}
+CreateIndexBufferJob.prototype.set = function(e, t, n) {
+ this.typedArray = e, this.indexDatatype = t, this.context = n;
+};
+CreateIndexBufferJob.prototype.execute = function() {
+ this.buffer = createIndexBuffer(
+ this.typedArray,
+ this.indexDatatype,
+ this.context
+ );
+};
+function createIndexBuffer(e, t, n) {
+ const i = Buffer.createIndexBuffer({
+ typedArray: e,
+ context: n,
+ usage: BufferUsage$1.STATIC_DRAW,
+ indexDatatype: t
+ });
+ return i.vertexArrayDestroyable = !1, i;
+}
+GltfIndexBufferLoader.prototype.process = function(e) {
+ if (this._state === ResourceLoaderState$1.READY)
+ return !0;
+ if (this._state !== ResourceLoaderState$1.LOADED && this._state !== ResourceLoaderState$1.PROCESSING)
+ return !1;
+ let t = this._typedArray, n = this._indexDatatype;
+ if (defined(this._dracoLoader))
+ try {
+ this._dracoLoader.process(e) && (t = this._dracoLoader.decodedData.indices.typedArray, this._typedArray = t, n = ComponentDatatype$1.fromTypedArray(t), this._indexDatatype = n);
+ } catch (r) {
+ handleError$8(this, r);
+ }
+ if (!defined(t))
+ return !1;
+ let i;
+ if (this._loadBuffer && this._asynchronous) {
+ const r = scratchIndexBufferJob;
+ if (r.set(t, n, e.context), !e.jobScheduler.execute(r, JobType$1.BUFFER))
+ return !1;
+ i = r.buffer;
+ } else this._loadBuffer && (i = createIndexBuffer(t, n, e.context));
+ return this.unload(), this._buffer = i, this._typedArray = this._loadTypedArray ? t : void 0, this._state = ResourceLoaderState$1.READY, this._resourceCache.statistics.addGeometryLoader(this), !0;
+};
+GltfIndexBufferLoader.prototype.unload = function() {
+ defined(this._buffer) && this._buffer.destroy();
+ const e = this._resourceCache;
+ defined(this._bufferViewLoader) && !this._bufferViewLoader.isDestroyed() && e.unload(this._bufferViewLoader), defined(this._dracoLoader) && e.unload(this._dracoLoader), this._bufferViewLoader = void 0, this._dracoLoader = void 0, this._typedArray = void 0, this._buffer = void 0, this._gltf = void 0;
+};
+function addToArray(e, t, n) {
+ if (n = defaultValue(n, !1), n) {
+ const i = e.indexOf(t);
+ if (i > -1)
+ return i;
+ }
+ return e.push(t), e.length - 1;
+}
+function usesExtension(e, t) {
+ return defined(e.extensionsUsed) && e.extensionsUsed.indexOf(t) >= 0;
+}
+function ForEach() {
+}
+ForEach.objectLegacy = function(e, t) {
+ if (defined(e)) {
+ for (const n in e)
+ if (Object.prototype.hasOwnProperty.call(e, n)) {
+ const i = e[n], r = t(i, n);
+ if (defined(r))
+ return r;
+ }
+ }
+};
+ForEach.object = function(e, t) {
+ if (defined(e)) {
+ const n = e.length;
+ for (let i = 0; i < n; i++) {
+ const r = e[i], o = t(r, i);
+ if (defined(o))
+ return o;
+ }
+ }
+};
+ForEach.topLevel = function(e, t, n) {
+ const i = e[t];
+ return defined(i) && !Array.isArray(i) ? ForEach.objectLegacy(i, n) : ForEach.object(i, n);
+};
+ForEach.accessor = function(e, t) {
+ return ForEach.topLevel(e, "accessors", t);
+};
+ForEach.accessorWithSemantic = function(e, t, n) {
+ const i = {};
+ return ForEach.mesh(e, function(r) {
+ return ForEach.meshPrimitive(r, function(o) {
+ const s = ForEach.meshPrimitiveAttribute(
+ o,
+ function(c, l) {
+ if (l.indexOf(t) === 0 && !defined(i[c])) {
+ i[c] = !0;
+ const d = n(c);
+ if (defined(d))
+ return d;
+ }
+ }
+ );
+ return defined(s) ? s : ForEach.meshPrimitiveTarget(o, function(c) {
+ return ForEach.meshPrimitiveTargetAttribute(
+ c,
+ function(l, d) {
+ if (d.indexOf(t) === 0 && !defined(i[l])) {
+ i[l] = !0;
+ const f = n(l);
+ if (defined(f))
+ return f;
+ }
+ }
+ );
+ });
+ });
+ });
+};
+ForEach.accessorContainingVertexAttributeData = function(e, t) {
+ const n = {};
+ return ForEach.mesh(e, function(i) {
+ return ForEach.meshPrimitive(i, function(r) {
+ const o = ForEach.meshPrimitiveAttribute(
+ r,
+ function(s) {
+ if (!defined(n[s])) {
+ n[s] = !0;
+ const c = t(s);
+ if (defined(c))
+ return c;
+ }
+ }
+ );
+ return defined(o) ? o : ForEach.meshPrimitiveTarget(r, function(s) {
+ return ForEach.meshPrimitiveTargetAttribute(
+ s,
+ function(c) {
+ if (!defined(n[c])) {
+ n[c] = !0;
+ const l = t(c);
+ if (defined(l))
+ return l;
+ }
+ }
+ );
+ });
+ });
+ });
+};
+ForEach.accessorContainingIndexData = function(e, t) {
+ const n = {};
+ return ForEach.mesh(e, function(i) {
+ return ForEach.meshPrimitive(i, function(r) {
+ const o = r.indices;
+ if (defined(o) && !defined(n[o])) {
+ n[o] = !0;
+ const s = t(o);
+ if (defined(s))
+ return s;
+ }
+ });
+ });
+};
+ForEach.animation = function(e, t) {
+ return ForEach.topLevel(e, "animations", t);
+};
+ForEach.animationChannel = function(e, t) {
+ const n = e.channels;
+ return ForEach.object(n, t);
+};
+ForEach.animationSampler = function(e, t) {
+ const n = e.samplers;
+ return ForEach.object(n, t);
+};
+ForEach.buffer = function(e, t) {
+ return ForEach.topLevel(e, "buffers", t);
+};
+ForEach.bufferView = function(e, t) {
+ return ForEach.topLevel(e, "bufferViews", t);
+};
+ForEach.camera = function(e, t) {
+ return ForEach.topLevel(e, "cameras", t);
+};
+ForEach.image = function(e, t) {
+ return ForEach.topLevel(e, "images", t);
+};
+ForEach.material = function(e, t) {
+ return ForEach.topLevel(e, "materials", t);
+};
+ForEach.materialValue = function(e, t) {
+ let n = e.values;
+ defined(e.extensions) && defined(e.extensions.KHR_techniques_webgl) && (n = e.extensions.KHR_techniques_webgl.values);
+ for (const i in n)
+ if (Object.prototype.hasOwnProperty.call(n, i)) {
+ const r = t(n[i], i);
+ if (defined(r))
+ return r;
+ }
+};
+ForEach.mesh = function(e, t) {
+ return ForEach.topLevel(e, "meshes", t);
+};
+ForEach.meshPrimitive = function(e, t) {
+ const n = e.primitives;
+ if (defined(n)) {
+ const i = n.length;
+ for (let r = 0; r < i; r++) {
+ const o = n[r], s = t(o, r);
+ if (defined(s))
+ return s;
+ }
+ }
+};
+ForEach.meshPrimitiveAttribute = function(e, t) {
+ const n = e.attributes;
+ for (const i in n)
+ if (Object.prototype.hasOwnProperty.call(n, i)) {
+ const r = t(n[i], i);
+ if (defined(r))
+ return r;
+ }
+};
+ForEach.meshPrimitiveTarget = function(e, t) {
+ const n = e.targets;
+ if (defined(n)) {
+ const i = n.length;
+ for (let r = 0; r < i; ++r) {
+ const o = t(n[r], r);
+ if (defined(o))
+ return o;
+ }
+ }
+};
+ForEach.meshPrimitiveTargetAttribute = function(e, t) {
+ for (const n in e)
+ if (Object.prototype.hasOwnProperty.call(e, n)) {
+ const i = e[n], r = t(i, n);
+ if (defined(r))
+ return r;
+ }
+};
+ForEach.node = function(e, t) {
+ return ForEach.topLevel(e, "nodes", t);
+};
+ForEach.nodeInTree = function(e, t, n) {
+ const i = e.nodes;
+ if (defined(i)) {
+ const r = t.length;
+ for (let o = 0; o < r; o++) {
+ const s = t[o], c = i[s];
+ if (defined(c)) {
+ let l = n(c, s);
+ if (defined(l))
+ return l;
+ const d = c.children;
+ if (defined(d) && (l = ForEach.nodeInTree(e, d, n), defined(l)))
+ return l;
+ }
+ }
+ }
+};
+ForEach.nodeInScene = function(e, t, n) {
+ const i = t.nodes;
+ if (defined(i))
+ return ForEach.nodeInTree(e, i, n);
+};
+ForEach.program = function(e, t) {
+ return usesExtension(e, "KHR_techniques_webgl") ? ForEach.object(
+ e.extensions.KHR_techniques_webgl.programs,
+ t
+ ) : ForEach.topLevel(e, "programs", t);
+};
+ForEach.sampler = function(e, t) {
+ return ForEach.topLevel(e, "samplers", t);
+};
+ForEach.scene = function(e, t) {
+ return ForEach.topLevel(e, "scenes", t);
+};
+ForEach.shader = function(e, t) {
+ return usesExtension(e, "KHR_techniques_webgl") ? ForEach.object(
+ e.extensions.KHR_techniques_webgl.shaders,
+ t
+ ) : ForEach.topLevel(e, "shaders", t);
+};
+ForEach.skin = function(e, t) {
+ return ForEach.topLevel(e, "skins", t);
+};
+ForEach.skinJoint = function(e, t) {
+ const n = e.joints;
+ if (defined(n)) {
+ const i = n.length;
+ for (let r = 0; r < i; r++) {
+ const o = n[r], s = t(o);
+ if (defined(s))
+ return s;
+ }
+ }
+};
+ForEach.techniqueAttribute = function(e, t) {
+ const n = e.attributes;
+ for (const i in n)
+ if (Object.prototype.hasOwnProperty.call(n, i)) {
+ const r = t(n[i], i);
+ if (defined(r))
+ return r;
+ }
+};
+ForEach.techniqueUniform = function(e, t) {
+ const n = e.uniforms;
+ for (const i in n)
+ if (Object.prototype.hasOwnProperty.call(n, i)) {
+ const r = t(n[i], i);
+ if (defined(r))
+ return r;
+ }
+};
+ForEach.techniqueParameter = function(e, t) {
+ const n = e.parameters;
+ for (const i in n)
+ if (Object.prototype.hasOwnProperty.call(n, i)) {
+ const r = t(n[i], i);
+ if (defined(r))
+ return r;
+ }
+};
+ForEach.technique = function(e, t) {
+ return usesExtension(e, "KHR_techniques_webgl") ? ForEach.object(
+ e.extensions.KHR_techniques_webgl.techniques,
+ t
+ ) : ForEach.topLevel(e, "techniques", t);
+};
+ForEach.texture = function(e, t) {
+ return ForEach.topLevel(e, "textures", t);
+};
+function numberOfComponentsForType(e) {
+ switch (e) {
+ case "SCALAR":
+ return 1;
+ case "VEC2":
+ return 2;
+ case "VEC3":
+ return 3;
+ case "VEC4":
+ case "MAT2":
+ return 4;
+ case "MAT3":
+ return 9;
+ case "MAT4":
+ return 16;
+ }
+}
+function getAccessorByteStride(e, t) {
+ const n = t.bufferView;
+ if (defined(n)) {
+ const i = e.bufferViews[n];
+ if (defined(i.byteStride) && i.byteStride > 0)
+ return i.byteStride;
+ }
+ return ComponentDatatype$1.getSizeInBytes(t.componentType) * numberOfComponentsForType(t.type);
+}
+function addDefaults(e) {
+ ForEach.accessor(e, function(n) {
+ defined(n.bufferView) && (n.byteOffset = defaultValue(n.byteOffset, 0));
+ }), ForEach.bufferView(e, function(n) {
+ defined(n.buffer) && (n.byteOffset = defaultValue(n.byteOffset, 0));
+ }), ForEach.mesh(e, function(n) {
+ ForEach.meshPrimitive(n, function(i) {
+ if (i.mode = defaultValue(i.mode, WebGLConstants$1.TRIANGLES), !defined(i.material)) {
+ defined(e.materials) || (e.materials = []);
+ const r = {
+ name: "default"
+ };
+ i.material = addToArray(e.materials, r);
+ }
+ });
+ }), ForEach.accessorContainingVertexAttributeData(e, function(n) {
+ const i = e.accessors[n], r = i.bufferView;
+ if (i.normalized = defaultValue(i.normalized, !1), defined(r)) {
+ const o = e.bufferViews[r];
+ o.byteStride = getAccessorByteStride(e, i), o.target = WebGLConstants$1.ARRAY_BUFFER;
+ }
+ }), ForEach.accessorContainingIndexData(e, function(n) {
+ const r = e.accessors[n].bufferView;
+ if (defined(r)) {
+ const o = e.bufferViews[r];
+ o.target = WebGLConstants$1.ELEMENT_ARRAY_BUFFER;
+ }
+ }), ForEach.material(e, function(n) {
+ const i = defaultValue(
+ n.extensions,
+ defaultValue.EMPTY_OBJECT
+ ), r = i.KHR_materials_common;
+ if (defined(r)) {
+ const l = r.technique, d = defined(r.values) ? r.values : {};
+ r.values = d, d.ambient = defined(d.ambient) ? d.ambient : [0, 0, 0, 1], d.emission = defined(d.emission) ? d.emission : [0, 0, 0, 1], d.transparency = defaultValue(d.transparency, 1), l !== "CONSTANT" && (d.diffuse = defined(d.diffuse) ? d.diffuse : [0, 0, 0, 1], l !== "LAMBERT" && (d.specular = defined(d.specular) ? d.specular : [0, 0, 0, 1], d.shininess = defaultValue(d.shininess, 0))), r.transparent = defaultValue(
+ r.transparent,
+ !1
+ ), r.doubleSided = defaultValue(
+ r.doubleSided,
+ !1
+ );
+ return;
+ }
+ n.emissiveFactor = defaultValue(
+ n.emissiveFactor,
+ [0, 0, 0]
+ ), n.alphaMode = defaultValue(n.alphaMode, "OPAQUE"), n.doubleSided = defaultValue(n.doubleSided, !1), n.alphaMode === "MASK" && (n.alphaCutoff = defaultValue(n.alphaCutoff, 0.5));
+ const o = i.KHR_techniques_webgl;
+ defined(o) && ForEach.materialValue(n, function(l) {
+ defined(l.index) && addTextureDefaults(l);
+ }), addTextureDefaults(n.emissiveTexture), addTextureDefaults(n.normalTexture), addTextureDefaults(n.occlusionTexture);
+ const s = n.pbrMetallicRoughness;
+ defined(s) && (s.baseColorFactor = defaultValue(
+ s.baseColorFactor,
+ [1, 1, 1, 1]
+ ), s.metallicFactor = defaultValue(
+ s.metallicFactor,
+ 1
+ ), s.roughnessFactor = defaultValue(
+ s.roughnessFactor,
+ 1
+ ), addTextureDefaults(s.baseColorTexture), addTextureDefaults(s.metallicRoughnessTexture));
+ const c = i.KHR_materials_pbrSpecularGlossiness;
+ defined(c) && (c.diffuseFactor = defaultValue(
+ c.diffuseFactor,
+ [1, 1, 1, 1]
+ ), c.specularFactor = defaultValue(
+ c.specularFactor,
+ [1, 1, 1]
+ ), c.glossinessFactor = defaultValue(
+ c.glossinessFactor,
+ 1
+ ), addTextureDefaults(c.specularGlossinessTexture));
+ }), ForEach.animation(e, function(n) {
+ ForEach.animationSampler(n, function(i) {
+ i.interpolation = defaultValue(i.interpolation, "LINEAR");
+ });
+ });
+ const t = getAnimatedNodes(e);
+ return ForEach.node(e, function(n, i) {
+ defined(t[i]) || defined(n.translation) || defined(n.rotation) || defined(n.scale) ? (n.translation = defaultValue(n.translation, [0, 0, 0]), n.rotation = defaultValue(n.rotation, [0, 0, 0, 1]), n.scale = defaultValue(n.scale, [1, 1, 1])) : n.matrix = defaultValue(
+ n.matrix,
+ [
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1
+ ]
+ );
+ }), ForEach.sampler(e, function(n) {
+ n.wrapS = defaultValue(n.wrapS, WebGLConstants$1.REPEAT), n.wrapT = defaultValue(n.wrapT, WebGLConstants$1.REPEAT);
+ }), defined(e.scenes) && !defined(e.scene) && (e.scene = 0), e;
+}
+function getAnimatedNodes(e) {
+ const t = {};
+ return ForEach.animation(e, function(n) {
+ ForEach.animationChannel(n, function(i) {
+ const r = i.target, o = r.node, s = r.path;
+ (s === "translation" || s === "rotation" || s === "scale") && (t[o] = !0);
+ });
+ }), t;
+}
+function addTextureDefaults(e) {
+ defined(e) && (e.texCoord = defaultValue(e.texCoord, 0));
+}
+function addPipelineExtras(e) {
+ return ForEach.shader(e, function(t) {
+ addExtras(t);
+ }), ForEach.buffer(e, function(t) {
+ addExtras(t);
+ }), ForEach.image(e, function(t) {
+ addExtras(t);
+ }), addExtras(e), e;
+}
+function addExtras(e) {
+ e.extras = defined(e.extras) ? e.extras : {}, e.extras._pipeline = defined(e.extras._pipeline) ? e.extras._pipeline : {};
+}
+function removeExtensionsRequired(e, t) {
+ const n = e.extensionsRequired;
+ if (defined(n)) {
+ const i = n.indexOf(t);
+ i >= 0 && n.splice(i, 1), n.length === 0 && delete e.extensionsRequired;
+ }
+}
+function removeExtensionsUsed(e, t) {
+ const n = e.extensionsUsed;
+ if (defined(n)) {
+ const i = n.indexOf(t);
+ i >= 0 && n.splice(i, 1), removeExtensionsRequired(e, t), n.length === 0 && delete e.extensionsUsed;
+ }
+}
+const sizeOfUint32$5 = 4;
+function parseGlb(e) {
+ if (getMagic(e) !== "glTF")
+ throw new RuntimeError("File is not valid binary glTF");
+ const n = readHeader(e, 0, 5), i = n[1];
+ if (i !== 1 && i !== 2)
+ throw new RuntimeError("Binary glTF version is not 1 or 2");
+ return i === 1 ? parseGlbVersion1(e, n) : parseGlbVersion2(e, n);
+}
+function readHeader(e, t, n) {
+ const i = new DataView(e.buffer), r = new Array(n);
+ for (let o = 0; o < n; ++o)
+ r[o] = i.getUint32(
+ e.byteOffset + t + o * sizeOfUint32$5,
+ !0
+ );
+ return r;
+}
+function parseGlbVersion1(e, t) {
+ const n = t[2], i = t[3];
+ if (t[4] !== 0)
+ throw new RuntimeError("Binary glTF scene format is not JSON");
+ const o = 20, s = o + i, c = getStringFromTypedArray(e, o, i), l = JSON.parse(c);
+ addPipelineExtras(l);
+ const d = e.subarray(s, n), f = l.buffers;
+ if (defined(f) && Object.keys(f).length > 0) {
+ const h = defaultValue(
+ f.binary_glTF,
+ f.KHR_binary_glTF
+ );
+ defined(h) && (h.extras._pipeline.source = d, delete h.uri);
+ }
+ return removeExtensionsUsed(l, "KHR_binary_glTF"), l;
+}
+function parseGlbVersion2(e, t) {
+ const n = t[2];
+ let i = 12, r, o;
+ for (; i < n; ) {
+ const s = readHeader(e, i, 2), c = s[0], l = s[1];
+ i += 8;
+ const d = e.subarray(i, i + c);
+ if (i += c, l === 1313821514) {
+ const f = getStringFromTypedArray(d);
+ r = JSON.parse(f), addPipelineExtras(r);
+ } else l === 5130562 && (o = d);
+ }
+ if (defined(r) && defined(o)) {
+ const s = r.buffers;
+ if (defined(s) && s.length > 0) {
+ const c = s[0];
+ c.extras._pipeline.source = o;
+ }
+ }
+ return r;
+}
+function removePipelineExtras(e) {
+ return ForEach.shader(e, function(t) {
+ removeExtras(t);
+ }), ForEach.buffer(e, function(t) {
+ removeExtras(t);
+ }), ForEach.image(e, function(t) {
+ removeExtras(t);
+ }), removeExtras(e), e;
+}
+function removeExtras(e) {
+ defined(e.extras) && (defined(e.extras._pipeline) && delete e.extras._pipeline, Object.keys(e.extras).length === 0 && delete e.extras);
+}
+function addExtensionsUsed(e, t) {
+ let n = e.extensionsUsed;
+ defined(n) || (n = [], e.extensionsUsed = n), addToArray(n, t, !0);
+}
+function getComponentReader(e) {
+ switch (e) {
+ case ComponentDatatype$1.BYTE:
+ return function(t, n, i, r, o) {
+ for (let s = 0; s < i; ++s)
+ o[s] = t.getInt8(
+ n + s * r
+ );
+ };
+ case ComponentDatatype$1.UNSIGNED_BYTE:
+ return function(t, n, i, r, o) {
+ for (let s = 0; s < i; ++s)
+ o[s] = t.getUint8(
+ n + s * r
+ );
+ };
+ case ComponentDatatype$1.SHORT:
+ return function(t, n, i, r, o) {
+ for (let s = 0; s < i; ++s)
+ o[s] = t.getInt16(
+ n + s * r,
+ !0
+ );
+ };
+ case ComponentDatatype$1.UNSIGNED_SHORT:
+ return function(t, n, i, r, o) {
+ for (let s = 0; s < i; ++s)
+ o[s] = t.getUint16(
+ n + s * r,
+ !0
+ );
+ };
+ case ComponentDatatype$1.INT:
+ return function(t, n, i, r, o) {
+ for (let s = 0; s < i; ++s)
+ o[s] = t.getInt32(
+ n + s * r,
+ !0
+ );
+ };
+ case ComponentDatatype$1.UNSIGNED_INT:
+ return function(t, n, i, r, o) {
+ for (let s = 0; s < i; ++s)
+ o[s] = t.getUint32(
+ n + s * r,
+ !0
+ );
+ };
+ case ComponentDatatype$1.FLOAT:
+ return function(t, n, i, r, o) {
+ for (let s = 0; s < i; ++s)
+ o[s] = t.getFloat32(
+ n + s * r,
+ !0
+ );
+ };
+ case ComponentDatatype$1.DOUBLE:
+ return function(t, n, i, r, o) {
+ for (let s = 0; s < i; ++s)
+ o[s] = t.getFloat64(
+ n + s * r,
+ !0
+ );
+ };
+ }
+}
+function findAccessorMinMax(e, t) {
+ const n = e.bufferViews, i = e.buffers, r = t.bufferView, o = numberOfComponentsForType(t.type);
+ if (!defined(t.bufferView))
+ return {
+ min: new Array(o).fill(0),
+ max: new Array(o).fill(0)
+ };
+ const s = new Array(o).fill(Number.POSITIVE_INFINITY), c = new Array(o).fill(Number.NEGATIVE_INFINITY), l = n[r], d = l.buffer, h = i[d].extras._pipeline.source, p = t.count, m = getAccessorByteStride(e, t);
+ let _ = t.byteOffset + l.byteOffset + h.byteOffset;
+ const y = t.componentType, C = ComponentDatatype$1.getSizeInBytes(y), T = new DataView(h.buffer), x = new Array(o), b = getComponentReader(y);
+ for (let S = 0; S < p; S++) {
+ b(
+ T,
+ _,
+ o,
+ C,
+ x
+ );
+ for (let E = 0; E < o; E++) {
+ const A = x[E];
+ s[E] = Math.min(s[E], A), c[E] = Math.max(c[E], A);
+ }
+ _ += m;
+ }
+ return {
+ min: s,
+ max: c
+ };
+}
+const defaultBlendEquation = [WebGLConstants$1.FUNC_ADD, WebGLConstants$1.FUNC_ADD], defaultBlendFactors = [
+ WebGLConstants$1.ONE,
+ WebGLConstants$1.ZERO,
+ WebGLConstants$1.ONE,
+ WebGLConstants$1.ZERO
+];
+function isStateEnabled(e, t) {
+ const n = e.enable;
+ return defined(n) ? n.indexOf(t) > -1 : !1;
+}
+const supportedBlendFactors = [
+ WebGLConstants$1.ZERO,
+ WebGLConstants$1.ONE,
+ WebGLConstants$1.SRC_COLOR,
+ WebGLConstants$1.ONE_MINUS_SRC_COLOR,
+ WebGLConstants$1.SRC_ALPHA,
+ WebGLConstants$1.ONE_MINUS_SRC_ALPHA,
+ WebGLConstants$1.DST_ALPHA,
+ WebGLConstants$1.ONE_MINUS_DST_ALPHA,
+ WebGLConstants$1.DST_COLOR,
+ WebGLConstants$1.ONE_MINUS_DST_COLOR
+];
+function getSupportedBlendFactors(e, t) {
+ if (!defined(e))
+ return t;
+ for (let n = 0; n < 4; n++)
+ if (supportedBlendFactors.indexOf(e[n]) === -1)
+ return t;
+ return e;
+}
+function moveTechniqueRenderStates(e) {
+ const t = {}, n = {}, i = e.techniques;
+ return defined(i) && (ForEach.technique(e, function(r, o) {
+ const s = r.states;
+ if (defined(s)) {
+ const c = n[o] = {};
+ if (isStateEnabled(s, WebGLConstants$1.BLEND)) {
+ c.alphaMode = "BLEND";
+ const l = s.functions;
+ defined(l) && (defined(l.blendEquationSeparate) || defined(l.blendFuncSeparate)) && (t[o] = {
+ blendEquation: defaultValue(
+ l.blendEquationSeparate,
+ defaultBlendEquation
+ ),
+ blendFactors: getSupportedBlendFactors(
+ l.blendFuncSeparate,
+ defaultBlendFactors
+ )
+ });
+ }
+ isStateEnabled(s, WebGLConstants$1.CULL_FACE) || (c.doubleSided = !0), delete r.states;
+ }
+ }), Object.keys(t).length > 0 && (defined(e.extensions) || (e.extensions = {}), addExtensionsUsed(e, "KHR_blend")), ForEach.material(e, function(r) {
+ if (defined(r.technique)) {
+ const o = n[r.technique];
+ ForEach.objectLegacy(o, function(c, l) {
+ r[l] = c;
+ });
+ const s = t[r.technique];
+ defined(s) && (defined(r.extensions) || (r.extensions = {}), r.extensions.KHR_blend = s);
+ }
+ })), e;
+}
+function addExtensionsRequired(e, t) {
+ let n = e.extensionsRequired;
+ defined(n) || (n = [], e.extensionsRequired = n), addToArray(n, t, !0), addExtensionsUsed(e, t);
+}
+function moveTechniquesToExtension(e) {
+ const t = e.techniques, n = {}, i = {}, r = {};
+ if (defined(t)) {
+ const o = {
+ programs: [],
+ shaders: [],
+ techniques: []
+ }, s = e.glExtensionsUsed;
+ delete e.glExtensionsUsed, ForEach.technique(e, function(c, l) {
+ const d = {
+ name: c.name,
+ program: void 0,
+ attributes: {},
+ uniforms: {}
+ };
+ let f;
+ if (ForEach.techniqueAttribute(
+ c,
+ function(h, p) {
+ f = c.parameters[h], d.attributes[p] = {
+ semantic: f.semantic
+ };
+ }
+ ), ForEach.techniqueUniform(
+ c,
+ function(h, p) {
+ f = c.parameters[h], d.uniforms[p] = {
+ count: f.count,
+ node: f.node,
+ type: f.type,
+ semantic: f.semantic,
+ value: f.value
+ }, defined(n[l]) || (n[l] = {}), n[l][h] = p;
+ }
+ ), defined(r[c.program]))
+ d.program = r[c.program];
+ else {
+ const h = e.programs[c.program], p = {
+ name: h.name,
+ fragmentShader: void 0,
+ vertexShader: void 0,
+ glExtensions: s
+ }, m = e.shaders[h.fragmentShader];
+ p.fragmentShader = addToArray(o.shaders, m, !0);
+ const _ = e.shaders[h.vertexShader];
+ p.vertexShader = addToArray(o.shaders, _, !0), d.program = addToArray(o.programs, p), r[c.program] = d.program;
+ }
+ i[l] = addToArray(
+ o.techniques,
+ d
+ );
+ }), o.techniques.length > 0 && (defined(e.extensions) || (e.extensions = {}), e.extensions.KHR_techniques_webgl = o, addExtensionsUsed(e, "KHR_techniques_webgl"), addExtensionsRequired(e, "KHR_techniques_webgl"));
+ }
+ return ForEach.material(e, function(o) {
+ if (defined(o.technique)) {
+ const s = {
+ technique: i[o.technique]
+ };
+ ForEach.objectLegacy(o.values, function(c, l) {
+ defined(s.values) || (s.values = {});
+ const d = n[o.technique][l];
+ defined(d) && (s.values[d] = c);
+ }), defined(o.extensions) || (o.extensions = {}), o.extensions.KHR_techniques_webgl = s;
+ }
+ delete o.technique, delete o.values;
+ }), delete e.techniques, delete e.programs, delete e.shaders, e;
+}
+function forEachTextureInMaterial(e, t) {
+ Check.typeOf.object("material", e), Check.defined("handler", t);
+ const n = e.pbrMetallicRoughness;
+ if (defined(n)) {
+ if (defined(n.baseColorTexture)) {
+ const o = n.baseColorTexture, s = t(o.index, o);
+ if (defined(s))
+ return s;
+ }
+ if (defined(n.metallicRoughnessTexture)) {
+ const o = n.metallicRoughnessTexture, s = t(o.index, o);
+ if (defined(s))
+ return s;
+ }
+ }
+ const { extensions: i } = e;
+ if (defined(i)) {
+ const o = i.KHR_materials_pbrSpecularGlossiness;
+ if (defined(o)) {
+ if (defined(o.diffuseTexture)) {
+ const l = o.diffuseTexture, d = t(l.index, l);
+ if (defined(d))
+ return d;
+ }
+ if (defined(o.specularGlossinessTexture)) {
+ const l = o.specularGlossinessTexture, d = t(l.index, l);
+ if (defined(d))
+ return d;
+ }
+ }
+ const s = i.KHR_materials_specular;
+ if (defined(s)) {
+ const { specularTexture: l, specularColorTexture: d } = s;
+ if (defined(l)) {
+ const f = t(l.index, l);
+ if (defined(f))
+ return f;
+ }
+ if (defined(d)) {
+ const f = t(d.index, d);
+ if (defined(f))
+ return f;
+ }
+ }
+ const c = i.KHR_materials_common;
+ if (defined(c) && defined(c.values)) {
+ const { diffuse: l, ambient: d, emission: f, specular: h } = c.values;
+ if (defined(l) && defined(l.index)) {
+ const p = t(l.index, l);
+ if (defined(p))
+ return p;
+ }
+ if (defined(d) && defined(d.index)) {
+ const p = t(d.index, d);
+ if (defined(p))
+ return p;
+ }
+ if (defined(f) && defined(f.index)) {
+ const p = t(f.index, f);
+ if (defined(p))
+ return p;
+ }
+ if (defined(h) && defined(h.index)) {
+ const p = t(h.index, h);
+ if (defined(p))
+ return p;
+ }
+ }
+ }
+ const r = ForEach.materialValue(e, function(o) {
+ if (defined(o.index)) {
+ const s = t(o.index, o);
+ if (defined(s))
+ return s;
+ }
+ });
+ if (defined(r))
+ return r;
+ if (defined(e.emissiveTexture)) {
+ const o = e.emissiveTexture, s = t(o.index, o);
+ if (defined(s))
+ return s;
+ }
+ if (defined(e.normalTexture)) {
+ const o = e.normalTexture, s = t(o.index, o);
+ if (defined(s))
+ return s;
+ }
+ if (defined(e.occlusionTexture)) {
+ const o = e.occlusionTexture, s = t(o.index, o);
+ if (defined(s))
+ return s;
+ }
+}
+const allElementTypes = [
+ "mesh",
+ "node",
+ "material",
+ "accessor",
+ "bufferView",
+ "buffer",
+ "texture",
+ "sampler",
+ "image"
+];
+function removeUnusedElements(e, t) {
+ return t = defaultValue(t, allElementTypes), allElementTypes.forEach(function(n) {
+ t.indexOf(n) > -1 && removeUnusedElementsByType(e, n);
+ }), e;
+}
+const TypeToGltfElementName = {
+ accessor: "accessors",
+ buffer: "buffers",
+ bufferView: "bufferViews",
+ image: "images",
+ node: "nodes",
+ material: "materials",
+ mesh: "meshes",
+ sampler: "samplers",
+ texture: "textures"
+};
+function removeUnusedElementsByType(e, t) {
+ const n = TypeToGltfElementName[t], i = e[n];
+ if (defined(i)) {
+ let r = 0;
+ const o = getListOfElementsIdsInUse[t](e), s = i.length;
+ for (let c = 0; c < s; ++c)
+ o[c] || (Remove[t](e, c - r), r++);
+ }
+}
+function Remove() {
+}
+Remove.accessor = function(e, t) {
+ e.accessors.splice(t, 1), ForEach.mesh(e, function(i) {
+ ForEach.meshPrimitive(i, function(r) {
+ ForEach.meshPrimitiveAttribute(
+ r,
+ function(c, l) {
+ c > t && r.attributes[l]--;
+ }
+ ), ForEach.meshPrimitiveTarget(r, function(c) {
+ ForEach.meshPrimitiveTargetAttribute(
+ c,
+ function(l, d) {
+ l > t && c[d]--;
+ }
+ );
+ });
+ const o = r.indices;
+ defined(o) && o > t && r.indices--;
+ const s = r.extensions;
+ defined(s) && defined(s.CESIUM_primitive_outline) && s.CESIUM_primitive_outline.indices > t && --s.CESIUM_primitive_outline.indices;
+ });
+ }), ForEach.skin(e, function(i) {
+ defined(i.inverseBindMatrices) && i.inverseBindMatrices > t && i.inverseBindMatrices--;
+ }), ForEach.animation(e, function(i) {
+ ForEach.animationSampler(i, function(r) {
+ defined(r.input) && r.input > t && r.input--, defined(r.output) && r.output > t && r.output--;
+ });
+ });
+};
+Remove.buffer = function(e, t) {
+ e.buffers.splice(t, 1), ForEach.bufferView(e, function(i) {
+ defined(i.buffer) && i.buffer > t && i.buffer--, defined(i.extensions) && defined(i.extensions.EXT_meshopt_compression) && i.extensions.EXT_meshopt_compression.buffer--;
+ });
+};
+Remove.bufferView = function(e, t) {
+ if (e.bufferViews.splice(t, 1), ForEach.accessor(e, function(i) {
+ defined(i.bufferView) && i.bufferView > t && i.bufferView--;
+ }), ForEach.shader(e, function(i) {
+ defined(i.bufferView) && i.bufferView > t && i.bufferView--;
+ }), ForEach.image(e, function(i) {
+ defined(i.bufferView) && i.bufferView > t && i.bufferView--;
+ }), usesExtension(e, "KHR_draco_mesh_compression") && ForEach.mesh(e, function(i) {
+ ForEach.meshPrimitive(i, function(r) {
+ defined(r.extensions) && defined(r.extensions.KHR_draco_mesh_compression) && r.extensions.KHR_draco_mesh_compression.bufferView > t && r.extensions.KHR_draco_mesh_compression.bufferView--;
+ });
+ }), usesExtension(e, "EXT_feature_metadata")) {
+ const r = e.extensions.EXT_feature_metadata.featureTables;
+ for (const o in r)
+ if (r.hasOwnProperty(o)) {
+ const c = r[o].properties;
+ if (defined(c)) {
+ for (const l in c)
+ if (c.hasOwnProperty(l)) {
+ const d = c[l];
+ defined(d.bufferView) && d.bufferView > t && d.bufferView--, defined(d.arrayOffsetBufferView) && d.arrayOffsetBufferView > t && d.arrayOffsetBufferView--, defined(d.stringOffsetBufferView) && d.stringOffsetBufferView > t && d.stringOffsetBufferView--;
+ }
+ }
+ }
+ }
+ if (usesExtension(e, "EXT_structural_metadata")) {
+ const r = e.extensions.EXT_structural_metadata.propertyTables;
+ if (defined(r)) {
+ const o = r.length;
+ for (let s = 0; s < o; ++s) {
+ const l = r[s].properties;
+ for (const d in l)
+ if (l.hasOwnProperty(d)) {
+ const f = l[d];
+ defined(f.values) && f.values > t && f.values--, defined(f.arrayOffsets) && f.arrayOffsets > t && f.arrayOffsets--, defined(f.stringOffsets) && f.stringOffsets > t && f.stringOffsets--;
+ }
+ }
+ }
+ }
+};
+Remove.image = function(e, t) {
+ e.images.splice(t, 1), ForEach.texture(e, function(i) {
+ defined(i.source) && i.source > t && --i.source;
+ const r = i.extensions;
+ defined(r) && defined(r.EXT_texture_webp) && r.EXT_texture_webp.source > t ? --i.extensions.EXT_texture_webp.source : defined(r) && defined(r.KHR_texture_basisu) && r.KHR_texture_basisu.source > t && --i.extensions.KHR_texture_basisu.source;
+ });
+};
+Remove.mesh = function(e, t) {
+ e.meshes.splice(t, 1), ForEach.node(e, function(i) {
+ defined(i.mesh) && (i.mesh > t ? i.mesh-- : i.mesh === t && delete i.mesh);
+ });
+};
+Remove.node = function(e, t) {
+ e.nodes.splice(t, 1), ForEach.skin(e, function(i) {
+ defined(i.skeleton) && i.skeleton > t && i.skeleton--, i.joints = i.joints.map(function(r) {
+ return r > t ? r - 1 : r;
+ });
+ }), ForEach.animation(e, function(i) {
+ ForEach.animationChannel(i, function(r) {
+ defined(r.target) && defined(r.target.node) && r.target.node > t && r.target.node--;
+ });
+ }), ForEach.technique(e, function(i) {
+ ForEach.techniqueUniform(i, function(r) {
+ defined(r.node) && r.node > t && r.node--;
+ });
+ }), ForEach.node(e, function(i) {
+ defined(i.children) && (i.children = i.children.filter(function(r) {
+ return r !== t;
+ }).map(function(r) {
+ return r > t ? r - 1 : r;
+ }));
+ }), ForEach.scene(e, function(i) {
+ i.nodes = i.nodes.filter(function(r) {
+ return r !== t;
+ }).map(function(r) {
+ return r > t ? r - 1 : r;
+ });
+ });
+};
+Remove.material = function(e, t) {
+ e.materials.splice(t, 1), ForEach.mesh(e, function(i) {
+ ForEach.meshPrimitive(i, function(r) {
+ defined(r.material) && r.material > t && r.material--;
+ });
+ });
+};
+Remove.sampler = function(e, t) {
+ e.samplers.splice(t, 1), ForEach.texture(e, function(i) {
+ defined(i.sampler) && i.sampler > t && --i.sampler;
+ });
+};
+Remove.texture = function(e, t) {
+ if (e.textures.splice(t, 1), ForEach.material(e, function(i) {
+ forEachTextureInMaterial(i, function(r, o) {
+ o.index > t && --o.index;
+ });
+ }), usesExtension(e, "EXT_feature_metadata")) {
+ ForEach.mesh(e, function(o) {
+ ForEach.meshPrimitive(o, function(s) {
+ const c = s.extensions;
+ if (defined(c) && defined(c.EXT_feature_metadata)) {
+ const d = c.EXT_feature_metadata.featureIdTextures;
+ if (defined(d)) {
+ const f = d.length;
+ for (let h = 0; h < f; ++h) {
+ const m = d[h].featureIds.texture;
+ m.index > t && --m.index;
+ }
+ }
+ }
+ });
+ });
+ const r = e.extensions.EXT_feature_metadata.featureTextures;
+ for (const o in r)
+ if (r.hasOwnProperty(o)) {
+ const c = r[o].properties;
+ if (defined(c)) {
+ for (const l in c)
+ if (c.hasOwnProperty(l)) {
+ const f = c[l].texture;
+ f.index > t && --f.index;
+ }
+ }
+ }
+ }
+ if (usesExtension(e, "EXT_mesh_features") && ForEach.mesh(e, function(i) {
+ ForEach.meshPrimitive(i, function(r) {
+ const o = r.extensions;
+ if (defined(o) && defined(o.EXT_mesh_features)) {
+ const c = o.EXT_mesh_features.featureIds;
+ if (defined(c)) {
+ const l = c.length;
+ for (let d = 0; d < l; ++d) {
+ const f = c[d];
+ defined(f.texture) && f.texture.index > t && --f.texture.index;
+ }
+ }
+ }
+ });
+ }), usesExtension(e, "EXT_structural_metadata")) {
+ const r = e.extensions.EXT_structural_metadata.propertyTextures;
+ if (defined(r)) {
+ const o = r.length;
+ for (let s = 0; s < o; ++s) {
+ const l = r[s].properties;
+ for (const d in l)
+ if (l.hasOwnProperty(d)) {
+ const f = l[d];
+ f.index > t && --f.index;
+ }
+ }
+ }
+ }
+};
+function getListOfElementsIdsInUse() {
+}
+getListOfElementsIdsInUse.accessor = function(e) {
+ const t = {};
+ return ForEach.mesh(e, function(n) {
+ ForEach.meshPrimitive(n, function(i) {
+ ForEach.meshPrimitiveAttribute(i, function(o) {
+ t[o] = !0;
+ }), ForEach.meshPrimitiveTarget(i, function(o) {
+ ForEach.meshPrimitiveTargetAttribute(o, function(s) {
+ t[s] = !0;
+ });
+ });
+ const r = i.indices;
+ defined(r) && (t[r] = !0);
+ });
+ }), ForEach.skin(e, function(n) {
+ defined(n.inverseBindMatrices) && (t[n.inverseBindMatrices] = !0);
+ }), ForEach.animation(e, function(n) {
+ ForEach.animationSampler(n, function(i) {
+ defined(i.input) && (t[i.input] = !0), defined(i.output) && (t[i.output] = !0);
+ });
+ }), usesExtension(e, "EXT_mesh_gpu_instancing") && ForEach.node(e, function(n) {
+ defined(n.extensions) && defined(n.extensions.EXT_mesh_gpu_instancing) && Object.keys(n.extensions.EXT_mesh_gpu_instancing.attributes).forEach(
+ function(i) {
+ const r = n.extensions.EXT_mesh_gpu_instancing.attributes[i];
+ t[r] = !0;
+ }
+ );
+ }), usesExtension(e, "CESIUM_primitive_outline") && ForEach.mesh(e, function(n) {
+ ForEach.meshPrimitive(n, function(i) {
+ const r = i.extensions;
+ if (defined(r) && defined(r.CESIUM_primitive_outline)) {
+ const s = r.CESIUM_primitive_outline.indices;
+ defined(s) && (t[s] = !0);
+ }
+ });
+ }), t;
+};
+getListOfElementsIdsInUse.buffer = function(e) {
+ const t = {};
+ return ForEach.bufferView(e, function(n) {
+ defined(n.buffer) && (t[n.buffer] = !0), defined(n.extensions) && defined(n.extensions.EXT_meshopt_compression) && (t[n.extensions.EXT_meshopt_compression.buffer] = !0);
+ }), t;
+};
+getListOfElementsIdsInUse.bufferView = function(e) {
+ const t = {};
+ if (ForEach.accessor(e, function(n) {
+ defined(n.bufferView) && (t[n.bufferView] = !0);
+ }), ForEach.shader(e, function(n) {
+ defined(n.bufferView) && (t[n.bufferView] = !0);
+ }), ForEach.image(e, function(n) {
+ defined(n.bufferView) && (t[n.bufferView] = !0);
+ }), usesExtension(e, "KHR_draco_mesh_compression") && ForEach.mesh(e, function(n) {
+ ForEach.meshPrimitive(n, function(i) {
+ defined(i.extensions) && defined(i.extensions.KHR_draco_mesh_compression) && (t[i.extensions.KHR_draco_mesh_compression.bufferView] = !0);
+ });
+ }), usesExtension(e, "EXT_feature_metadata")) {
+ const i = e.extensions.EXT_feature_metadata.featureTables;
+ for (const r in i)
+ if (i.hasOwnProperty(r)) {
+ const s = i[r].properties;
+ if (defined(s)) {
+ for (const c in s)
+ if (s.hasOwnProperty(c)) {
+ const l = s[c];
+ defined(l.bufferView) && (t[l.bufferView] = !0), defined(l.arrayOffsetBufferView) && (t[l.arrayOffsetBufferView] = !0), defined(l.stringOffsetBufferView) && (t[l.stringOffsetBufferView] = !0);
+ }
+ }
+ }
+ }
+ if (usesExtension(e, "EXT_structural_metadata")) {
+ const i = e.extensions.EXT_structural_metadata.propertyTables;
+ if (defined(i)) {
+ const r = i.length;
+ for (let o = 0; o < r; ++o) {
+ const c = i[o].properties;
+ for (const l in c)
+ if (c.hasOwnProperty(l)) {
+ const d = c[l];
+ defined(d.values) && (t[d.values] = !0), defined(d.arrayOffsets) && (t[d.arrayOffsets] = !0), defined(d.stringOffsets) && (t[d.stringOffsets] = !0);
+ }
+ }
+ }
+ }
+ return t;
+};
+getListOfElementsIdsInUse.image = function(e) {
+ const t = {};
+ return ForEach.texture(e, function(n) {
+ defined(n.source) && (t[n.source] = !0), defined(n.extensions) && defined(n.extensions.EXT_texture_webp) ? t[n.extensions.EXT_texture_webp.source] = !0 : defined(n.extensions) && defined(n.extensions.KHR_texture_basisu) && (t[n.extensions.KHR_texture_basisu.source] = !0);
+ }), t;
+};
+getListOfElementsIdsInUse.mesh = function(e) {
+ const t = {};
+ return ForEach.node(e, function(n) {
+ if (defined(n.mesh && defined(e.meshes))) {
+ const i = e.meshes[n.mesh];
+ defined(i) && defined(i.primitives) && i.primitives.length > 0 && (t[n.mesh] = !0);
+ }
+ }), t;
+};
+function nodeIsEmpty(e, t, n) {
+ const i = e.nodes[t];
+ return defined(i.mesh) || defined(i.camera) || defined(i.skin) || defined(i.weights) || defined(i.extras) || defined(i.extensions) && Object.keys(i.extensions).length !== 0 || defined(n[t]) ? !1 : !defined(i.children) || i.children.filter(function(r) {
+ return !nodeIsEmpty(e, r, n);
+ }).length === 0;
+}
+getListOfElementsIdsInUse.node = function(e) {
+ const t = {};
+ return ForEach.skin(e, function(n) {
+ defined(n.skeleton) && (t[n.skeleton] = !0), ForEach.skinJoint(n, function(i) {
+ t[i] = !0;
+ });
+ }), ForEach.animation(e, function(n) {
+ ForEach.animationChannel(n, function(i) {
+ defined(i.target) && defined(i.target.node) && (t[i.target.node] = !0);
+ });
+ }), ForEach.technique(e, function(n) {
+ ForEach.techniqueUniform(n, function(i) {
+ defined(i.node) && (t[i.node] = !0);
+ });
+ }), ForEach.node(e, function(n, i) {
+ nodeIsEmpty(e, i, t) || (t[i] = !0);
+ }), t;
+};
+getListOfElementsIdsInUse.material = function(e) {
+ const t = {};
+ return ForEach.mesh(e, function(n) {
+ ForEach.meshPrimitive(n, function(i) {
+ defined(i.material) && (t[i.material] = !0);
+ });
+ }), t;
+};
+getListOfElementsIdsInUse.texture = function(e) {
+ const t = {};
+ if (ForEach.material(e, function(n) {
+ forEachTextureInMaterial(n, function(i) {
+ t[i] = !0;
+ });
+ }), usesExtension(e, "EXT_feature_metadata")) {
+ ForEach.mesh(e, function(r) {
+ ForEach.meshPrimitive(r, function(o) {
+ const s = o.extensions;
+ if (defined(s) && defined(s.EXT_feature_metadata)) {
+ const l = s.EXT_feature_metadata.featureIdTextures;
+ if (defined(l)) {
+ const d = l.length;
+ for (let f = 0; f < d; ++f) {
+ const p = l[f].featureIds.texture;
+ t[p.index] = !0;
+ }
+ }
+ }
+ });
+ });
+ const i = e.extensions.EXT_feature_metadata.featureTextures;
+ for (const r in i)
+ if (i.hasOwnProperty(r)) {
+ const s = i[r].properties;
+ if (defined(s)) {
+ for (const c in s)
+ if (s.hasOwnProperty(c)) {
+ const d = s[c].texture;
+ t[d.index] = !0;
+ }
+ }
+ }
+ }
+ if (usesExtension(e, "EXT_mesh_features") && ForEach.mesh(e, function(n) {
+ ForEach.meshPrimitive(n, function(i) {
+ const r = i.extensions;
+ if (defined(r) && defined(r.EXT_mesh_features)) {
+ const s = r.EXT_mesh_features.featureIds;
+ if (defined(s)) {
+ const c = s.length;
+ for (let l = 0; l < c; ++l) {
+ const d = s[l];
+ defined(d.texture) && (t[d.texture.index] = !0);
+ }
+ }
+ }
+ });
+ }), usesExtension(e, "EXT_structural_metadata")) {
+ const i = e.extensions.EXT_structural_metadata.propertyTextures;
+ if (defined(i)) {
+ const r = i.length;
+ for (let o = 0; o < r; ++o) {
+ const c = i[o].properties;
+ for (const l in c)
+ if (c.hasOwnProperty(l)) {
+ const d = c[l];
+ t[d.index] = !0;
+ }
+ }
+ }
+ }
+ return t;
+};
+getListOfElementsIdsInUse.sampler = function(e) {
+ const t = {};
+ return ForEach.texture(e, function(n) {
+ defined(n.sampler) && (t[n.sampler] = !0);
+ }), t;
+};
+function addBuffer(e, t) {
+ const n = {
+ byteLength: t.length,
+ extras: {
+ _pipeline: {
+ source: t
+ }
+ }
+ }, r = {
+ buffer: addToArray(e.buffers, n),
+ byteOffset: 0,
+ byteLength: t.length
+ };
+ return addToArray(e.bufferViews, r);
+}
+function readAccessorPacked(e, t) {
+ const n = getAccessorByteStride(e, t), i = ComponentDatatype$1.getSizeInBytes(
+ t.componentType
+ ), r = numberOfComponentsForType(t.type), o = t.count, s = new Array(r * o);
+ if (!defined(t.bufferView))
+ return s.fill(0);
+ const c = e.bufferViews[t.bufferView], l = e.buffers[c.buffer].extras._pipeline.source;
+ let d = t.byteOffset + c.byteOffset + l.byteOffset;
+ const f = new DataView(l.buffer), h = new Array(r), p = getComponentReader(t.componentType);
+ for (let m = 0; m < o; ++m) {
+ p(
+ f,
+ d,
+ r,
+ i,
+ h
+ );
+ for (let _ = 0; _ < r; ++_)
+ s[m * r + _] = h[_];
+ d += n;
+ }
+ return s;
+}
+function updateAccessorComponentTypes(e) {
+ let t;
+ return ForEach.accessorWithSemantic(e, "JOINTS_0", function(n) {
+ const i = e.accessors[n];
+ t = i.componentType, t === WebGLConstants$1.BYTE ? convertType(e, i, ComponentDatatype$1.UNSIGNED_BYTE) : t !== WebGLConstants$1.UNSIGNED_BYTE && t !== WebGLConstants$1.UNSIGNED_SHORT && convertType(e, i, ComponentDatatype$1.UNSIGNED_SHORT);
+ }), ForEach.accessorWithSemantic(e, "WEIGHTS_0", function(n) {
+ const i = e.accessors[n];
+ t = i.componentType, t === WebGLConstants$1.BYTE ? convertType(e, i, ComponentDatatype$1.UNSIGNED_BYTE) : t === WebGLConstants$1.SHORT && convertType(e, i, ComponentDatatype$1.UNSIGNED_SHORT);
+ }), e;
+}
+function convertType(e, t, n) {
+ const i = ComponentDatatype$1.createTypedArray(
+ n,
+ readAccessorPacked(e, t)
+ ), r = new Uint8Array(i.buffer);
+ t.bufferView = addBuffer(e, r), t.componentType = n, t.byteOffset = 0;
+}
+function removeExtension(e, t) {
+ return removeExtensionsUsed(e, t), t === "CESIUM_RTC" && removeCesiumRTC(e), removeExtensionAndTraverse(e, t);
+}
+function removeCesiumRTC(e) {
+ ForEach.technique(e, function(t) {
+ ForEach.techniqueUniform(t, function(n) {
+ n.semantic === "CESIUM_RTC_MODELVIEW" && (n.semantic = "MODELVIEW");
+ });
+ });
+}
+function removeExtensionAndTraverse(e, t) {
+ if (Array.isArray(e)) {
+ const n = e.length;
+ for (let i = 0; i < n; ++i)
+ removeExtensionAndTraverse(e[i], t);
+ } else if (e !== null && typeof e == "object" && e.constructor === Object) {
+ const n = e.extensions;
+ let i;
+ defined(n) && (i = n[t], defined(i) && (delete n[t], Object.keys(n).length === 0 && delete e.extensions));
+ for (const r in e)
+ Object.prototype.hasOwnProperty.call(e, r) && removeExtensionAndTraverse(e[r], t);
+ return i;
+ }
+}
+const updateFunctions = {
+ 0.8: glTF08to10,
+ "1.0": glTF10to20,
+ "2.0": void 0
+};
+function updateVersion(e, t) {
+ t = defaultValue(t, defaultValue.EMPTY_OBJECT);
+ const n = t.targetVersion;
+ let i = e.version;
+ e.asset = defaultValue(e.asset, {
+ version: "1.0"
+ }), e.asset.version = defaultValue(e.asset.version, "1.0"), i = defaultValue(i, e.asset.version).toString(), Object.prototype.hasOwnProperty.call(updateFunctions, i) || (defined(i) && (i = i.substring(0, 3)), Object.prototype.hasOwnProperty.call(updateFunctions, i) || (i = "1.0"));
+ let r = updateFunctions[i];
+ for (; defined(r) && i !== n; )
+ r(e, t), i = e.asset.version, r = updateFunctions[i];
+ return t.keepLegacyExtensions || (convertTechniquesToPbr(e, t), convertMaterialsCommonToPbr(e)), e;
+}
+function updateInstanceTechniques(e) {
+ const t = e.materials;
+ for (const n in t)
+ if (Object.prototype.hasOwnProperty.call(t, n)) {
+ const i = t[n], r = i.instanceTechnique;
+ defined(r) && (i.technique = r.technique, i.values = r.values, delete i.instanceTechnique);
+ }
+}
+function setPrimitiveModes(e) {
+ const t = e.meshes;
+ for (const n in t)
+ if (Object.prototype.hasOwnProperty.call(t, n)) {
+ const r = t[n].primitives;
+ if (defined(r)) {
+ const o = r.length;
+ for (let s = 0; s < o; ++s) {
+ const c = r[s], l = defaultValue(
+ c.primitive,
+ WebGLConstants$1.TRIANGLES
+ );
+ c.mode = defaultValue(c.mode, l), delete c.primitive;
+ }
+ }
+ }
+}
+function updateNodes(e) {
+ const t = e.nodes, n = new Cartesian3(), i = new Quaternion();
+ for (const r in t)
+ if (Object.prototype.hasOwnProperty.call(t, r)) {
+ const o = t[r];
+ if (defined(o.rotation)) {
+ const c = o.rotation;
+ Cartesian3.fromArray(c, 0, n), Quaternion.fromAxisAngle(n, c[3], i), o.rotation = [i.x, i.y, i.z, i.w];
+ }
+ const s = o.instanceSkin;
+ defined(s) && (o.skeletons = s.skeletons, o.skin = s.skin, o.meshes = s.meshes, delete o.instanceSkin);
+ }
+}
+function updateAnimations(e) {
+ const t = e.animations, n = e.accessors, i = e.bufferViews, r = e.buffers, o = {}, s = new Cartesian3(), c = new Quaternion();
+ for (const l in t)
+ if (Object.prototype.hasOwnProperty.call(t, l)) {
+ const d = t[l], f = d.channels, h = d.parameters, p = d.samplers;
+ if (defined(f)) {
+ const m = f.length;
+ for (let _ = 0; _ < m; ++_) {
+ const y = f[_];
+ if (y.target.path === "rotation") {
+ const C = h[p[y.sampler].output];
+ if (defined(o[C]))
+ continue;
+ o[C] = !0;
+ const T = n[C], x = i[T.bufferView], S = r[x.buffer].extras._pipeline.source, E = S.byteOffset + x.byteOffset + T.byteOffset, A = T.componentType, D = T.count, P = numberOfComponentsForType(T.type), I = T.count * P, M = ComponentDatatype$1.createArrayBufferView(
+ A,
+ S.buffer,
+ E,
+ I
+ );
+ for (let R = 0; R < D; R++) {
+ const L = R * P;
+ Cartesian3.unpack(M, L, s);
+ const g = M[L + 3];
+ Quaternion.fromAxisAngle(s, g, c), Quaternion.pack(c, M, L);
+ }
+ }
+ }
+ }
+ }
+}
+function removeTechniquePasses(e) {
+ const t = e.techniques;
+ for (const n in t)
+ if (Object.prototype.hasOwnProperty.call(t, n)) {
+ const i = t[n], r = i.passes;
+ if (defined(r)) {
+ const o = defaultValue(i.pass, "defaultPass");
+ if (Object.prototype.hasOwnProperty.call(r, o)) {
+ const s = r[o], c = s.instanceProgram;
+ i.attributes = defaultValue(
+ i.attributes,
+ c.attributes
+ ), i.program = defaultValue(
+ i.program,
+ c.program
+ ), i.uniforms = defaultValue(
+ i.uniforms,
+ c.uniforms
+ ), i.states = defaultValue(i.states, s.states);
+ }
+ delete i.passes, delete i.pass;
+ }
+ }
+}
+function glTF08to10(e) {
+ defined(e.asset) || (e.asset = {});
+ const t = e.asset;
+ if (t.version = "1.0", typeof t.profile == "string") {
+ const n = t.profile.split(" ");
+ t.profile = {
+ api: n[0],
+ version: n[1]
+ };
+ } else
+ t.profile = {};
+ if (defined(e.version) && delete e.version, updateInstanceTechniques(e), setPrimitiveModes(e), updateNodes(e), updateAnimations(e), removeTechniquePasses(e), defined(e.allExtensions) && (e.extensionsUsed = e.allExtensions, delete e.allExtensions), defined(e.lights)) {
+ const n = defaultValue(e.extensions, {});
+ e.extensions = n;
+ const i = defaultValue(n.KHR_materials_common, {});
+ n.KHR_materials_common = i, i.lights = e.lights, delete e.lights, addExtensionsUsed(e, "KHR_materials_common");
+ }
+}
+function removeAnimationSamplersIndirection(e) {
+ const t = e.animations;
+ for (const n in t)
+ if (Object.prototype.hasOwnProperty.call(t, n)) {
+ const i = t[n], r = i.parameters;
+ if (defined(r)) {
+ const o = i.samplers;
+ for (const s in o)
+ if (Object.prototype.hasOwnProperty.call(o, s)) {
+ const c = o[s];
+ c.input = r[c.input], c.output = r[c.output];
+ }
+ delete i.parameters;
+ }
+ }
+}
+function objectToArray(e, t) {
+ const n = [];
+ for (const i in e)
+ if (Object.prototype.hasOwnProperty.call(e, i)) {
+ const r = e[i];
+ t[i] = n.length, n.push(r), defined(r.name) || (r.name = i);
+ }
+ return n;
+}
+function objectsToArrays(e) {
+ let t;
+ const n = {
+ accessors: {},
+ animations: {},
+ buffers: {},
+ bufferViews: {},
+ cameras: {},
+ images: {},
+ materials: {},
+ meshes: {},
+ nodes: {},
+ programs: {},
+ samplers: {},
+ scenes: {},
+ shaders: {},
+ skins: {},
+ textures: {},
+ techniques: {}
+ };
+ let i;
+ const r = {}, o = e.nodes;
+ for (const s in o)
+ Object.prototype.hasOwnProperty.call(o, s) && (i = o[s].jointName, defined(i) && (r[i] = s));
+ for (const s in e)
+ if (Object.prototype.hasOwnProperty.call(e, s) && defined(n[s])) {
+ const c = {}, l = e[s];
+ e[s] = objectToArray(l, c), n[s] = c;
+ }
+ for (i in r)
+ Object.prototype.hasOwnProperty.call(r, i) && (r[i] = n.nodes[r[i]]);
+ defined(e.scene) && (e.scene = n.scenes[e.scene]), ForEach.bufferView(e, function(s) {
+ defined(s.buffer) && (s.buffer = n.buffers[s.buffer]);
+ }), ForEach.accessor(e, function(s) {
+ defined(s.bufferView) && (s.bufferView = n.bufferViews[s.bufferView]);
+ }), ForEach.shader(e, function(s) {
+ const c = s.extensions;
+ if (defined(c)) {
+ const l = c.KHR_binary_glTF;
+ defined(l) && (s.bufferView = n.bufferViews[l.bufferView], delete c.KHR_binary_glTF), Object.keys(c).length === 0 && delete s.extensions;
+ }
+ }), ForEach.program(e, function(s) {
+ defined(s.vertexShader) && (s.vertexShader = n.shaders[s.vertexShader]), defined(s.fragmentShader) && (s.fragmentShader = n.shaders[s.fragmentShader]);
+ }), ForEach.technique(e, function(s) {
+ defined(s.program) && (s.program = n.programs[s.program]), ForEach.techniqueParameter(s, function(c) {
+ defined(c.node) && (c.node = n.nodes[c.node]);
+ const l = c.value;
+ typeof l == "string" && (c.value = {
+ index: n.textures[l]
+ });
+ });
+ }), ForEach.mesh(e, function(s) {
+ ForEach.meshPrimitive(s, function(c) {
+ defined(c.indices) && (c.indices = n.accessors[c.indices]), ForEach.meshPrimitiveAttribute(
+ c,
+ function(l, d) {
+ c.attributes[d] = n.accessors[l];
+ }
+ ), defined(c.material) && (c.material = n.materials[c.material]);
+ });
+ }), ForEach.node(e, function(s) {
+ let c = s.children;
+ if (defined(c)) {
+ const l = c.length;
+ for (t = 0; t < l; ++t)
+ c[t] = n.nodes[c[t]];
+ }
+ if (defined(s.meshes)) {
+ const l = s.meshes, d = l.length;
+ if (d > 0)
+ for (s.mesh = n.meshes[l[0]], t = 1; t < d; ++t) {
+ const f = {
+ mesh: n.meshes[l[t]]
+ }, h = addToArray(e.nodes, f);
+ defined(c) || (c = [], s.children = c), c.push(h);
+ }
+ delete s.meshes;
+ }
+ if (defined(s.camera) && (s.camera = n.cameras[s.camera]), defined(s.skin) && (s.skin = n.skins[s.skin]), defined(s.skeletons)) {
+ const l = s.skeletons;
+ if (l.length > 0 && defined(s.skin)) {
+ const f = e.skins[s.skin];
+ f.skeleton = n.nodes[l[0]];
+ }
+ delete s.skeletons;
+ }
+ defined(s.jointName) && delete s.jointName;
+ }), ForEach.skin(e, function(s) {
+ defined(s.inverseBindMatrices) && (s.inverseBindMatrices = n.accessors[s.inverseBindMatrices]);
+ const c = s.jointNames;
+ if (defined(c)) {
+ const l = [], d = c.length;
+ for (t = 0; t < d; ++t)
+ l[t] = r[c[t]];
+ s.joints = l, delete s.jointNames;
+ }
+ }), ForEach.scene(e, function(s) {
+ const c = s.nodes;
+ if (defined(c)) {
+ const l = c.length;
+ for (t = 0; t < l; ++t)
+ c[t] = n.nodes[c[t]];
+ }
+ }), ForEach.animation(e, function(s) {
+ const c = {};
+ s.samplers = objectToArray(s.samplers, c), ForEach.animationSampler(s, function(l) {
+ l.input = n.accessors[l.input], l.output = n.accessors[l.output];
+ }), ForEach.animationChannel(s, function(l) {
+ l.sampler = c[l.sampler];
+ const d = l.target;
+ defined(d) && (d.node = n.nodes[d.id], delete d.id);
+ });
+ }), ForEach.material(e, function(s) {
+ defined(s.technique) && (s.technique = n.techniques[s.technique]), ForEach.materialValue(s, function(l, d) {
+ typeof l == "string" && (s.values[d] = {
+ index: n.textures[l]
+ });
+ });
+ const c = s.extensions;
+ if (defined(c)) {
+ const l = c.KHR_materials_common;
+ defined(l) && defined(l.values) && ForEach.materialValue(l, function(d, f) {
+ typeof d == "string" && (l.values[f] = {
+ index: n.textures[d]
+ });
+ });
+ }
+ }), ForEach.image(e, function(s) {
+ const c = s.extensions;
+ if (defined(c)) {
+ const l = c.KHR_binary_glTF;
+ defined(l) && (s.bufferView = n.bufferViews[l.bufferView], s.mimeType = l.mimeType, delete c.KHR_binary_glTF), Object.keys(c).length === 0 && delete s.extensions;
+ }
+ }), ForEach.texture(e, function(s) {
+ defined(s.sampler) && (s.sampler = n.samplers[s.sampler]), defined(s.source) && (s.source = n.images[s.source]);
+ });
+}
+function removeAnimationSamplerNames(e) {
+ ForEach.animation(e, function(t) {
+ ForEach.animationSampler(t, function(n) {
+ delete n.name;
+ });
+ });
+}
+function removeEmptyArrays(e) {
+ for (const t in e)
+ if (Object.prototype.hasOwnProperty.call(e, t)) {
+ const n = e[t];
+ Array.isArray(n) && n.length === 0 && delete e[t];
+ }
+ ForEach.node(e, function(t) {
+ defined(t.children) && t.children.length === 0 && delete t.children;
+ });
+}
+function stripAsset(e) {
+ const t = e.asset;
+ delete t.profile, delete t.premultipliedAlpha;
+}
+const knownExtensions = {
+ CESIUM_RTC: !0,
+ KHR_materials_common: !0,
+ WEB3D_quantized_attributes: !0
+};
+function requireKnownExtensions(e) {
+ const t = e.extensionsUsed;
+ if (e.extensionsRequired = defaultValue(e.extensionsRequired, []), defined(t)) {
+ const n = t.length;
+ for (let i = 0; i < n; ++i) {
+ const r = t[i];
+ defined(knownExtensions[r]) && e.extensionsRequired.push(r);
+ }
+ }
+}
+function removeBufferType(e) {
+ ForEach.buffer(e, function(t) {
+ delete t.type;
+ });
+}
+function removeTextureProperties(e) {
+ ForEach.texture(e, function(t) {
+ delete t.format, delete t.internalFormat, delete t.target, delete t.type;
+ });
+}
+function requireAttributeSetIndex(e) {
+ ForEach.mesh(e, function(t) {
+ ForEach.meshPrimitive(t, function(n) {
+ ForEach.meshPrimitiveAttribute(
+ n,
+ function(i, r) {
+ r === "TEXCOORD" ? n.attributes.TEXCOORD_0 = i : r === "COLOR" && (n.attributes.COLOR_0 = i);
+ }
+ ), delete n.attributes.TEXCOORD, delete n.attributes.COLOR;
+ });
+ }), ForEach.technique(e, function(t) {
+ ForEach.techniqueParameter(t, function(n) {
+ const i = n.semantic;
+ defined(i) && (i === "TEXCOORD" ? n.semantic = "TEXCOORD_0" : i === "COLOR" && (n.semantic = "COLOR_0"));
+ });
+ });
+}
+const knownSemantics = {
+ POSITION: !0,
+ NORMAL: !0,
+ TANGENT: !0
+}, indexedSemantics = {
+ COLOR: "COLOR",
+ JOINT: "JOINTS",
+ JOINTS: "JOINTS",
+ TEXCOORD: "TEXCOORD",
+ WEIGHT: "WEIGHTS",
+ WEIGHTS: "WEIGHTS"
+};
+function underscoreApplicationSpecificSemantics(e) {
+ const t = {};
+ ForEach.mesh(e, function(n) {
+ ForEach.meshPrimitive(n, function(i) {
+ ForEach.meshPrimitiveAttribute(
+ i,
+ function(r, o) {
+ if (o.charAt(0) !== "_") {
+ const s = o.search(/_[0-9]+/g);
+ let c = o, l = "_0";
+ s >= 0 && (c = o.substring(0, s), l = o.substring(s));
+ let d;
+ const f = indexedSemantics[c];
+ defined(f) ? (d = f + l, t[o] = d) : defined(knownSemantics[c]) || (d = `_${o}`, t[o] = d);
+ }
+ }
+ );
+ for (const r in t)
+ if (Object.prototype.hasOwnProperty.call(t, r)) {
+ const o = t[r], s = i.attributes[r];
+ defined(s) && (delete i.attributes[r], i.attributes[o] = s);
+ }
+ });
+ }), ForEach.technique(e, function(n) {
+ ForEach.techniqueParameter(n, function(i) {
+ const r = t[i.semantic];
+ defined(r) && (i.semantic = r);
+ });
+ });
+}
+function clampCameraParameters(e) {
+ ForEach.camera(e, function(t) {
+ const n = t.perspective;
+ if (defined(n)) {
+ const i = n.aspectRatio;
+ defined(i) && i === 0 && delete n.aspectRatio;
+ const r = n.yfov;
+ defined(r) && r === 0 && (n.yfov = 1);
+ }
+ });
+}
+function computeAccessorByteStride(e, t) {
+ return defined(t.byteStride) && t.byteStride !== 0 ? t.byteStride : getAccessorByteStride(e, t);
+}
+function requireByteLength(e) {
+ ForEach.buffer(e, function(t) {
+ defined(t.byteLength) || (t.byteLength = t.extras._pipeline.source.length);
+ }), ForEach.accessor(e, function(t) {
+ const n = t.bufferView;
+ if (defined(n)) {
+ const i = e.bufferViews[n], r = computeAccessorByteStride(e, t), o = t.byteOffset + t.count * r;
+ i.byteLength = Math.max(
+ defaultValue(i.byteLength, 0),
+ o
+ );
+ }
+ });
+}
+function moveByteStrideToBufferView(e) {
+ let t, n, i;
+ const r = e.bufferViews, o = {};
+ ForEach.accessorContainingVertexAttributeData(e, function(c) {
+ const l = e.accessors[c];
+ defined(l.bufferView) && (o[l.bufferView] = !0);
+ });
+ const s = {};
+ ForEach.accessor(e, function(c) {
+ defined(c.bufferView) && (s[c.bufferView] = defaultValue(
+ s[c.bufferView],
+ []
+ ), s[c.bufferView].push(c));
+ });
+ for (const c in s)
+ if (Object.prototype.hasOwnProperty.call(s, c)) {
+ i = r[c];
+ const l = s[c];
+ l.sort(function(p, m) {
+ return p.byteOffset - m.byteOffset;
+ });
+ let d = 0, f = 0;
+ const h = l.length;
+ for (t = 0; t < h; ++t) {
+ let p = l[t];
+ const m = computeAccessorByteStride(e, p), _ = p.byteOffset, y = p.count * m;
+ delete p.byteStride;
+ const C = t < h - 1, T = C ? computeAccessorByteStride(e, l[t + 1]) : void 0;
+ if (m !== T) {
+ const x = clone$1(i, !0);
+ o[c] && (x.byteStride = m), x.byteOffset += d, x.byteLength = _ + y - d;
+ const b = addToArray(r, x);
+ for (n = f; n <= t; ++n)
+ p = l[n], p.bufferView = b, p.byteOffset = p.byteOffset - d;
+ d = C ? l[t + 1].byteOffset : void 0, f = t + 1;
+ }
+ }
+ }
+ removeUnusedElements(e, ["accessor", "bufferView", "buffer"]);
+}
+function requirePositionAccessorMinMax(e) {
+ ForEach.accessorWithSemantic(e, "POSITION", function(t) {
+ const n = e.accessors[t];
+ if (!defined(n.min) || !defined(n.max)) {
+ const i = findAccessorMinMax(e, n);
+ n.min = i.min, n.max = i.max;
+ }
+ });
+}
+function isNodeEmpty(e) {
+ return (!defined(e.children) || e.children.length === 0) && (!defined(e.meshes) || e.meshes.length === 0) && !defined(e.camera) && !defined(e.skin) && !defined(e.skeletons) && !defined(e.jointName) && (!defined(e.translation) || Cartesian3.fromArray(e.translation).equals(Cartesian3.ZERO)) && (!defined(e.scale) || Cartesian3.fromArray(e.scale).equals(new Cartesian3(1, 1, 1))) && (!defined(e.rotation) || Cartesian4.fromArray(e.rotation).equals(
+ new Cartesian4(0, 0, 0, 1)
+ )) && (!defined(e.matrix) || Matrix4.fromColumnMajorArray(e.matrix).equals(Matrix4.IDENTITY)) && !defined(e.extensions) && !defined(e.extras);
+}
+function deleteNode(e, t) {
+ ForEach.scene(e, function(n) {
+ const i = n.nodes;
+ if (defined(i)) {
+ const r = i.length;
+ for (let o = r; o >= 0; --o)
+ if (i[o] === t) {
+ i.splice(o, 1);
+ return;
+ }
+ }
+ }), ForEach.node(e, function(n, i) {
+ if (defined(n.children)) {
+ const r = n.children.indexOf(t);
+ r > -1 && (n.children.splice(r, 1), isNodeEmpty(n) && deleteNode(e, i));
+ }
+ }), delete e.nodes[t];
+}
+function removeEmptyNodes(e) {
+ return ForEach.node(e, function(t, n) {
+ isNodeEmpty(t) && deleteNode(e, n);
+ }), e;
+}
+function requireAnimationAccessorMinMax(e) {
+ ForEach.animation(e, function(t) {
+ ForEach.animationSampler(t, function(n) {
+ const i = e.accessors[n.input];
+ if (!defined(i.min) || !defined(i.max)) {
+ const r = findAccessorMinMax(e, i);
+ i.min = r.min, i.max = r.max;
+ }
+ });
+ });
+}
+function validatePresentAccessorMinMax(e) {
+ ForEach.accessor(e, function(t) {
+ if (defined(t.min) || defined(t.max)) {
+ const n = findAccessorMinMax(e, t);
+ defined(t.min) && (t.min = n.min), defined(t.max) && (t.max = n.max);
+ }
+ });
+}
+function glTF10to20(e) {
+ e.asset = defaultValue(e.asset, {}), e.asset.version = "2.0", updateInstanceTechniques(e), removeAnimationSamplersIndirection(e), removeEmptyNodes(e), objectsToArrays(e), removeAnimationSamplerNames(e), stripAsset(e), requireKnownExtensions(e), requireByteLength(e), moveByteStrideToBufferView(e), requirePositionAccessorMinMax(e), requireAnimationAccessorMinMax(e), validatePresentAccessorMinMax(e), removeBufferType(e), removeTextureProperties(e), requireAttributeSetIndex(e), underscoreApplicationSpecificSemantics(e), updateAccessorComponentTypes(e), clampCameraParameters(e), moveTechniqueRenderStates(e), moveTechniquesToExtension(e), removeEmptyArrays(e);
+}
+const defaultBaseColorTextureNames = [
+ "u_tex",
+ "u_diffuse",
+ "u_emission",
+ "u_diffuse_tex"
+], defaultBaseColorFactorNames = ["u_diffuse", "u_diffuse_mat"];
+function initializePbrMaterial(e) {
+ e.pbrMetallicRoughness = defined(e.pbrMetallicRoughness) ? e.pbrMetallicRoughness : {}, e.pbrMetallicRoughness.roughnessFactor = 1, e.pbrMetallicRoughness.metallicFactor = 0;
+}
+function isTexture(e) {
+ return defined(e.index);
+}
+function isVec4(e) {
+ return Array.isArray(e) && e.length === 4;
+}
+function srgbToLinear$1(e) {
+ const t = new Array(4);
+ t[3] = e[3];
+ for (let n = 0; n < 3; n++) {
+ const i = e[n];
+ i <= 0.04045 ? t[n] = e[n] * 0.07739938080495357 : t[n] = Math.pow(
+ // eslint-disable-next-line no-loss-of-precision
+ (i + 0.055) * 0.9478672985781991,
+ 2.4
+ );
+ }
+ return t;
+}
+function convertTechniquesToPbr(e, t) {
+ t = defaultValue(t, defaultValue.EMPTY_OBJECT);
+ const n = defaultValue(
+ t.baseColorTextureNames,
+ defaultBaseColorTextureNames
+ ), i = defaultValue(
+ t.baseColorFactorNames,
+ defaultBaseColorFactorNames
+ );
+ ForEach.material(e, function(r) {
+ ForEach.materialValue(r, function(o, s) {
+ n.indexOf(s) !== -1 && isTexture(o) ? (initializePbrMaterial(r), r.pbrMetallicRoughness.baseColorTexture = o) : i.indexOf(s) !== -1 && isVec4(o) && (initializePbrMaterial(r), r.pbrMetallicRoughness.baseColorFactor = srgbToLinear$1(o));
+ });
+ }), removeExtension(e, "KHR_techniques_webgl"), removeExtension(e, "KHR_blend");
+}
+function assignAsBaseColor(e, t) {
+ defined(t) && (isVec4(t) ? e.pbrMetallicRoughness.baseColorFactor = srgbToLinear$1(t) : isTexture(t) && (e.pbrMetallicRoughness.baseColorTexture = t));
+}
+function assignAsEmissive(e, t) {
+ defined(t) && (isVec4(t) ? e.emissiveFactor = t.slice(0, 3) : isTexture(t) && (e.emissiveTexture = t));
+}
+function convertMaterialsCommonToPbr(e) {
+ ForEach.material(e, function(t) {
+ const n = defaultValue(
+ t.extensions,
+ defaultValue.EMPTY_OBJECT
+ ).KHR_materials_common;
+ if (!defined(n))
+ return;
+ const i = defaultValue(n.values, {}), r = i.ambient, o = i.diffuse, s = i.emission, c = i.transparency, l = n.doubleSided, d = n.transparent;
+ initializePbrMaterial(t), n.technique === "CONSTANT" ? (addExtensionsUsed(e, "KHR_materials_unlit"), t.extensions = defined(t.extensions) ? t.extensions : {}, t.extensions.KHR_materials_unlit = {}, assignAsBaseColor(t, s), assignAsBaseColor(t, r)) : (assignAsBaseColor(t, o), assignAsEmissive(t, r), assignAsEmissive(t, s)), defined(l) && (t.doubleSided = l), defined(c) && (defined(t.pbrMetallicRoughness.baseColorFactor) ? t.pbrMetallicRoughness.baseColorFactor[3] *= c : t.pbrMetallicRoughness.baseColorFactor = [1, 1, 1, c]), defined(d) && (t.alphaMode = d ? "BLEND" : "OPAQUE");
+ }), removeExtension(e, "KHR_materials_common");
+}
+const VertexAttributeSemantic = {
+ /**
+ * Per-vertex position.
+ *
+ * @type {string}
+ * @constant
+ */
+ POSITION: "POSITION",
+ /**
+ * Per-vertex normal.
+ *
+ * @type {string}
+ * @constant
+ */
+ NORMAL: "NORMAL",
+ /**
+ * Per-vertex tangent.
+ *
+ * @type {string}
+ * @constant
+ */
+ TANGENT: "TANGENT",
+ /**
+ * Per-vertex texture coordinates.
+ *
+ * @type {string}
+ * @constant
+ */
+ TEXCOORD: "TEXCOORD",
+ /**
+ * Per-vertex color.
+ *
+ * @type {string}
+ * @constant
+ */
+ COLOR: "COLOR",
+ /**
+ * Per-vertex joint IDs for skinning.
+ *
+ * @type {string}
+ * @constant
+ */
+ JOINTS: "JOINTS",
+ /**
+ * Per-vertex joint weights for skinning.
+ *
+ * @type {string}
+ * @constant
+ */
+ WEIGHTS: "WEIGHTS",
+ /**
+ * Per-vertex feature ID.
+ *
+ * @type {string}
+ * @constant
+ */
+ FEATURE_ID: "_FEATURE_ID"
+};
+function semanticToVariableName(e) {
+ switch (e) {
+ case VertexAttributeSemantic.POSITION:
+ return "positionMC";
+ case VertexAttributeSemantic.NORMAL:
+ return "normalMC";
+ case VertexAttributeSemantic.TANGENT:
+ return "tangentMC";
+ case VertexAttributeSemantic.TEXCOORD:
+ return "texCoord";
+ case VertexAttributeSemantic.COLOR:
+ return "color";
+ case VertexAttributeSemantic.JOINTS:
+ return "joints";
+ case VertexAttributeSemantic.WEIGHTS:
+ return "weights";
+ case VertexAttributeSemantic.FEATURE_ID:
+ return "featureId";
+ }
+}
+VertexAttributeSemantic.hasSetIndex = function(e) {
+ switch (e) {
+ case VertexAttributeSemantic.POSITION:
+ case VertexAttributeSemantic.NORMAL:
+ case VertexAttributeSemantic.TANGENT:
+ return !1;
+ case VertexAttributeSemantic.TEXCOORD:
+ case VertexAttributeSemantic.COLOR:
+ case VertexAttributeSemantic.JOINTS:
+ case VertexAttributeSemantic.WEIGHTS:
+ case VertexAttributeSemantic.FEATURE_ID:
+ return !0;
+ }
+};
+VertexAttributeSemantic.fromGltfSemantic = function(e) {
+ let t = e;
+ const i = /^(\w+)_\d+$/.exec(e);
+ switch (i !== null && (t = i[1]), t) {
+ case "POSITION":
+ return VertexAttributeSemantic.POSITION;
+ case "NORMAL":
+ return VertexAttributeSemantic.NORMAL;
+ case "TANGENT":
+ return VertexAttributeSemantic.TANGENT;
+ case "TEXCOORD":
+ return VertexAttributeSemantic.TEXCOORD;
+ case "COLOR":
+ return VertexAttributeSemantic.COLOR;
+ case "JOINTS":
+ return VertexAttributeSemantic.JOINTS;
+ case "WEIGHTS":
+ return VertexAttributeSemantic.WEIGHTS;
+ case "_FEATURE_ID":
+ return VertexAttributeSemantic.FEATURE_ID;
+ }
+};
+VertexAttributeSemantic.fromPntsSemantic = function(e) {
+ switch (e) {
+ case "POSITION":
+ case "POSITION_QUANTIZED":
+ return VertexAttributeSemantic.POSITION;
+ case "RGBA":
+ case "RGB":
+ case "RGB565":
+ return VertexAttributeSemantic.COLOR;
+ case "NORMAL":
+ case "NORMAL_OCT16P":
+ return VertexAttributeSemantic.NORMAL;
+ case "BATCH_ID":
+ return VertexAttributeSemantic.FEATURE_ID;
+ }
+};
+VertexAttributeSemantic.getGlslType = function(e) {
+ switch (e) {
+ case VertexAttributeSemantic.POSITION:
+ case VertexAttributeSemantic.NORMAL:
+ case VertexAttributeSemantic.TANGENT:
+ return "vec3";
+ case VertexAttributeSemantic.TEXCOORD:
+ return "vec2";
+ case VertexAttributeSemantic.COLOR:
+ return "vec4";
+ case VertexAttributeSemantic.JOINTS:
+ return "ivec4";
+ case VertexAttributeSemantic.WEIGHTS:
+ return "vec4";
+ case VertexAttributeSemantic.FEATURE_ID:
+ return "int";
+ }
+};
+VertexAttributeSemantic.getVariableName = function(e, t) {
+ let n = semanticToVariableName(e);
+ return defined(t) && (n += `_${t}`), n;
+};
+const VertexAttributeSemantic$1 = Object.freeze(VertexAttributeSemantic);
+function ModelUtility() {
+}
+ModelUtility.getError = function(e, t, n) {
+ let i = `Failed to load ${e}: ${t}`;
+ defined(n) && defined(n.message) && (i += `
+${n.message}`);
+ const r = new RuntimeError(i);
+ return defined(n) && (r.stack = `Original stack:
+${n.stack}
+Handler stack:
+${r.stack}`), r;
+};
+ModelUtility.getNodeTransform = function(e) {
+ return defined(e.matrix) ? e.matrix : Matrix4.fromTranslationQuaternionRotationScale(
+ defined(e.translation) ? e.translation : Cartesian3.ZERO,
+ defined(e.rotation) ? e.rotation : Quaternion.IDENTITY,
+ defined(e.scale) ? e.scale : Cartesian3.ONE
+ );
+};
+ModelUtility.getAttributeBySemantic = function(e, t, n) {
+ const i = e.attributes, r = i.length;
+ for (let o = 0; o < r; ++o) {
+ const s = i[o], c = defined(n) ? s.setIndex === n : !0;
+ if (s.semantic === t && c)
+ return s;
+ }
+};
+ModelUtility.getAttributeByName = function(e, t) {
+ const n = e.attributes, i = n.length;
+ for (let r = 0; r < i; ++r) {
+ const o = n[r];
+ if (o.name === t)
+ return o;
+ }
+};
+ModelUtility.getFeatureIdsByLabel = function(e, t) {
+ for (let n = 0; n < e.length; n++) {
+ const i = e[n];
+ if (i.positionalLabel === t || i.label === t)
+ return i;
+ }
+};
+ModelUtility.hasQuantizedAttributes = function(e) {
+ if (!defined(e))
+ return !1;
+ for (let t = 0; t < e.length; t++) {
+ const n = e[t];
+ if (defined(n.quantization))
+ return !0;
+ }
+ return !1;
+};
+ModelUtility.getAttributeInfo = function(e) {
+ const t = e.semantic, n = e.setIndex;
+ let i, r = !1;
+ defined(t) ? (i = VertexAttributeSemantic$1.getVariableName(t, n), r = !0) : (i = e.name, i = i.replace(/^_/, ""), i = i.toLowerCase());
+ const o = /^color_\d+$/.test(i), s = e.type;
+ let c = AttributeType$1.getGlslType(s);
+ o && (c = "vec4");
+ const l = defined(e.quantization);
+ let d;
+ return l && (d = o ? "vec4" : AttributeType$1.getGlslType(e.quantization.type)), {
+ attribute: e,
+ isQuantized: l,
+ variableName: i,
+ hasSemantic: r,
+ glslType: c,
+ quantizedGlslType: d
+ };
+};
+const cartesianMaxScratch = new Cartesian3(), cartesianMinScratch = new Cartesian3();
+ModelUtility.getPositionMinMax = function(e, t, n) {
+ const i = ModelUtility.getAttributeBySemantic(
+ e,
+ "POSITION"
+ );
+ let r = i.max, o = i.min;
+ return defined(n) && defined(t) && (o = Cartesian3.add(
+ o,
+ t,
+ cartesianMinScratch
+ ), r = Cartesian3.add(
+ r,
+ n,
+ cartesianMaxScratch
+ )), {
+ min: o,
+ max: r
+ };
+};
+ModelUtility.getAxisCorrectionMatrix = function(e, t, n) {
+ return n = Matrix4.clone(Matrix4.IDENTITY, n), e === Axis$1.Y ? n = Matrix4.clone(Axis$1.Y_UP_TO_Z_UP, n) : e === Axis$1.X && (n = Matrix4.clone(Axis$1.X_UP_TO_Z_UP, n)), t === Axis$1.Z && (n = Matrix4.multiplyTransformation(n, Axis$1.Z_UP_TO_X_UP, n)), n;
+};
+const scratchMatrix3$1 = new Matrix3();
+ModelUtility.getCullFace = function(e, t) {
+ if (!PrimitiveType$1.isTriangles(t))
+ return CullFace$1.BACK;
+ const n = Matrix4.getMatrix3(e, scratchMatrix3$1);
+ return Matrix3.determinant(n) < 0 ? CullFace$1.FRONT : CullFace$1.BACK;
+};
+ModelUtility.sanitizeGlslIdentifier = function(e) {
+ let t = e.replaceAll(/[^A-Za-z0-9]+/g, "_");
+ return t = t.replace(/^gl_/, ""), /^\d/.test(t) && (t = `_${t}`), t;
+};
+ModelUtility.supportedExtensions = {
+ AGI_articulations: !0,
+ CESIUM_primitive_outline: !0,
+ CESIUM_RTC: !0,
+ EXT_feature_metadata: !0,
+ EXT_instance_features: !0,
+ EXT_mesh_features: !0,
+ EXT_mesh_gpu_instancing: !0,
+ EXT_meshopt_compression: !0,
+ EXT_structural_metadata: !0,
+ EXT_texture_webp: !0,
+ KHR_blend: !0,
+ KHR_draco_mesh_compression: !0,
+ KHR_techniques_webgl: !0,
+ KHR_materials_common: !0,
+ KHR_materials_pbrSpecularGlossiness: !0,
+ KHR_materials_specular: !0,
+ KHR_materials_anisotropy: !0,
+ KHR_materials_clearcoat: !0,
+ KHR_materials_unlit: !0,
+ KHR_mesh_quantization: !0,
+ KHR_texture_basisu: !0,
+ KHR_texture_transform: !0,
+ WEB3D_quantized_attributes: !0
+};
+ModelUtility.checkSupportedExtensions = function(e) {
+ const t = e.length;
+ for (let n = 0; n < t; n++) {
+ const i = e[n];
+ if (!ModelUtility.supportedExtensions[i])
+ throw new RuntimeError(`Unsupported glTF Extension: ${i}`);
+ }
+};
+function GltfJsonLoader(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.resourceCache, n = e.gltfResource, i = e.baseResource, r = e.typedArray, o = e.gltfJson, s = e.cacheKey;
+ this._resourceCache = t, this._gltfResource = n, this._baseResource = i, this._typedArray = r, this._gltfJson = o, this._cacheKey = s, this._gltf = void 0, this._bufferLoaders = [], this._state = ResourceLoaderState$1.UNLOADED, this._promise = void 0;
+}
+defined(Object.create) && (GltfJsonLoader.prototype = Object.create(ResourceLoader.prototype), GltfJsonLoader.prototype.constructor = GltfJsonLoader);
+Object.defineProperties(GltfJsonLoader.prototype, {
+ /**
+ * The cache key of the resource.
+ *
+ * @memberof GltfJsonLoader.prototype
+ *
+ * @type {string}
+ * @readonly
+ * @private
+ */
+ cacheKey: {
+ get: function() {
+ return this._cacheKey;
+ }
+ },
+ /**
+ * The glTF JSON.
+ *
+ * @memberof GltfJsonLoader.prototype
+ *
+ * @type {object}
+ * @readonly
+ * @private
+ */
+ gltf: {
+ get: function() {
+ return this._gltf;
+ }
+ }
+});
+GltfJsonLoader.prototype.load = async function() {
+ return defined(this._promise) ? this._promise : (this._state = ResourceLoaderState$1.LOADING, defined(this._gltfJson) ? (this._promise = processGltfJson(this, this._gltfJson), this._promise) : defined(this._typedArray) ? (this._promise = processGltfTypedArray(this, this._typedArray), this._promise) : (this._promise = loadFromUri(this), this._promise));
+};
+async function loadFromUri(e) {
+ let t;
+ try {
+ const n = await e._fetchGltf();
+ if (e.isDestroyed())
+ return;
+ t = new Uint8Array(n);
+ } catch (n) {
+ if (e.isDestroyed())
+ return;
+ handleError$7(e, n);
+ }
+ return processGltfTypedArray(e, t);
+}
+function handleError$7(e, t) {
+ e.unload(), e._state = ResourceLoaderState$1.FAILED;
+ const n = `Failed to load glTF: ${e._gltfResource.url}`;
+ throw e.getError(n, t);
+}
+async function upgradeVersion(e, t) {
+ if (defined(t.asset) && t.asset.version === "2.0" && !usesExtension(t, "KHR_techniques_webgl") && !usesExtension(t, "KHR_materials_common"))
+ return Promise.resolve();
+ const n = [];
+ ForEach.buffer(t, function(i) {
+ if (!defined(i.extras._pipeline.source) && // Ignore uri if this buffer uses the glTF 1.0 KHR_binary_glTF extension
+ defined(i.uri)) {
+ const r = e._baseResource.getDerivedResource({
+ url: i.uri
+ }), s = e._resourceCache.getExternalBufferLoader({
+ resource: r
+ });
+ e._bufferLoaders.push(s), n.push(
+ s.load().then(function() {
+ s.isDestroyed() || (i.extras._pipeline.source = s.typedArray);
+ })
+ );
+ }
+ }), await Promise.all(n), updateVersion(t);
+}
+function decodeDataUris(e) {
+ const t = [];
+ return ForEach.buffer(e, function(n) {
+ const i = n.uri;
+ !defined(n.extras._pipeline.source) && // Ignore uri if this buffer uses the glTF 1.0 KHR_binary_glTF extension
+ defined(i) && isDataUri(i) && (delete n.uri, t.push(
+ Resource.fetchArrayBuffer(i).then(function(r) {
+ n.extras._pipeline.source = new Uint8Array(r);
+ })
+ ));
+ }), Promise.all(t);
+}
+function loadEmbeddedBuffers(e, t) {
+ const n = [];
+ return ForEach.buffer(t, function(i, r) {
+ const o = i.extras._pipeline.source;
+ if (defined(o) && !defined(i.uri)) {
+ const c = e._resourceCache.getEmbeddedBufferLoader({
+ parentResource: e._gltfResource,
+ bufferId: r,
+ typedArray: o
+ });
+ e._bufferLoaders.push(c), n.push(c.load());
+ }
+ }), Promise.all(n);
+}
+async function processGltfJson(e, t) {
+ try {
+ addPipelineExtras(t), await decodeDataUris(t), await upgradeVersion(e, t), addDefaults(t), await loadEmbeddedBuffers(e, t), removePipelineExtras(t);
+ const n = t.asset.version;
+ if (n !== "1.0" && n !== "2.0")
+ throw new RuntimeError(`Unsupported glTF version: ${n}`);
+ const i = t.extensionsRequired;
+ return defined(i) && ModelUtility.checkSupportedExtensions(i), e._gltf = t, e._state = ResourceLoaderState$1.READY, e;
+ } catch (n) {
+ if (e.isDestroyed())
+ return;
+ handleError$7(e, n);
+ }
+}
+async function processGltfTypedArray(e, t) {
+ let n;
+ try {
+ getMagic(t) === "glTF" ? n = parseGlb(t) : n = getJsonFromTypedArray(t);
+ } catch (i) {
+ if (e.isDestroyed())
+ return;
+ handleError$7(e, i);
+ }
+ return processGltfJson(e, n);
+}
+GltfJsonLoader.prototype.unload = function() {
+ const e = this._bufferLoaders, t = e.length;
+ for (let n = 0; n < t; ++n)
+ e[n] = !e[n].isDestroyed() && this._resourceCache.unload(e[n]);
+ this._bufferLoaders.length = 0, this._gltf = void 0;
+};
+GltfJsonLoader.prototype._fetchGltf = function() {
+ return this._gltfResource.fetchArrayBuffer();
+};
+const AlphaMode = {
+ /**
+ * The alpha value is ignored and the rendered output is fully opaque.
+ *
+ * @type {string}
+ * @constant
+ */
+ OPAQUE: "OPAQUE",
+ /**
+ * The rendered output is either fully opaque or fully transparent depending on the alpha value and the specified alpha cutoff value.
+ *
+ * @type {string}
+ * @constant
+ */
+ MASK: "MASK",
+ /**
+ * The rendered output is composited onto the destination with alpha blending.
+ *
+ * @type {string}
+ * @constant
+ */
+ BLEND: "BLEND"
+}, AlphaMode$1 = Object.freeze(AlphaMode), ModelComponents = {};
+function Quantization$1() {
+ this.octEncoded = !1, this.octEncodedZXY = !1, this.normalizationRange = void 0, this.quantizedVolumeOffset = void 0, this.quantizedVolumeDimensions = void 0, this.quantizedVolumeStepSize = void 0, this.componentDatatype = void 0, this.type = void 0;
+}
+function Attribute$3() {
+ this.name = void 0, this.semantic = void 0, this.setIndex = void 0, this.componentDatatype = void 0, this.type = void 0, this.normalized = !1, this.count = void 0, this.min = void 0, this.max = void 0, this.constant = void 0, this.quantization = void 0, this.typedArray = void 0, this.buffer = void 0, this.byteOffset = 0, this.byteStride = void 0;
+}
+function Indices$1() {
+ this.indexDatatype = void 0, this.count = void 0, this.buffer = void 0, this.typedArray = void 0;
+}
+function FeatureIdAttribute$4() {
+ this.featureCount = void 0, this.nullFeatureId = void 0, this.propertyTableId = void 0, this.setIndex = void 0, this.label = void 0, this.positionalLabel = void 0;
+}
+function FeatureIdImplicitRange$1() {
+ this.featureCount = void 0, this.nullFeatureId = void 0, this.propertyTableId = void 0, this.offset = 0, this.repeat = void 0, this.label = void 0, this.positionalLabel = void 0;
+}
+function FeatureIdTexture$1() {
+ this.featureCount = void 0, this.nullFeatureId = void 0, this.propertyTableId = void 0, this.textureReader = void 0, this.label = void 0, this.positionalLabel = void 0;
+}
+function MorphTarget$1() {
+ this.attributes = [];
+}
+function Primitive$2() {
+ this.attributes = [], this.morphTargets = [], this.indices = void 0, this.material = void 0, this.primitiveType = void 0, this.featureIds = [], this.propertyTextureIds = [], this.propertyAttributeIds = [], this.outlineCoordinates = void 0;
+}
+function Instances$2() {
+ this.attributes = [], this.featureIds = [], this.transformInWorldSpace = !1;
+}
+function Skin$1() {
+ this.index = void 0, this.joints = [], this.inverseBindMatrices = [];
+}
+function Node$3() {
+ this.name = void 0, this.index = void 0, this.children = [], this.primitives = [], this.instances = void 0, this.skin = void 0, this.matrix = void 0, this.translation = void 0, this.rotation = void 0, this.scale = void 0, this.morphWeights = [], this.articulationName = void 0;
+}
+function Scene$3() {
+ this.nodes = [];
+}
+const AnimatedPropertyType$2 = {
+ TRANSLATION: "translation",
+ ROTATION: "rotation",
+ SCALE: "scale",
+ WEIGHTS: "weights"
+};
+function AnimationSampler$1() {
+ this.input = [], this.interpolation = void 0, this.output = [];
+}
+function AnimationTarget$1() {
+ this.node = void 0, this.path = void 0;
+}
+function AnimationChannel$1() {
+ this.sampler = void 0, this.target = void 0;
+}
+function Animation$1() {
+ this.name = void 0, this.samplers = [], this.channels = [];
+}
+function ArticulationStage$1() {
+ this.name = void 0, this.type = void 0, this.minimumValue = void 0, this.maximumValue = void 0, this.initialValue = void 0;
+}
+function Articulation$1() {
+ this.name = void 0, this.stages = [];
+}
+function Asset$1() {
+ this.credits = [];
+}
+function Components$2() {
+ this.asset = new Asset$1(), this.scene = void 0, this.nodes = [], this.skins = [], this.animations = [], this.articulations = [], this.structuralMetadata = void 0, this.upAxis = void 0, this.forwardAxis = void 0, this.transform = Matrix4.clone(Matrix4.IDENTITY);
+}
+function TextureReader() {
+ this.texture = void 0, this.index = void 0, this.texCoord = 0, this.transform = Matrix3.clone(Matrix3.IDENTITY), this.scale = 1, this.channels = void 0;
+}
+function MetallicRoughness$3() {
+ this.baseColorTexture = void 0, this.metallicRoughnessTexture = void 0, this.baseColorFactor = Cartesian4.clone(
+ MetallicRoughness$3.DEFAULT_BASE_COLOR_FACTOR
+ ), this.metallicFactor = MetallicRoughness$3.DEFAULT_METALLIC_FACTOR, this.roughnessFactor = MetallicRoughness$3.DEFAULT_ROUGHNESS_FACTOR;
+}
+MetallicRoughness$3.DEFAULT_BASE_COLOR_FACTOR = Cartesian4.ONE;
+MetallicRoughness$3.DEFAULT_METALLIC_FACTOR = 1;
+MetallicRoughness$3.DEFAULT_ROUGHNESS_FACTOR = 1;
+function SpecularGlossiness$2() {
+ this.diffuseTexture = void 0, this.specularGlossinessTexture = void 0, this.diffuseFactor = Cartesian4.clone(
+ SpecularGlossiness$2.DEFAULT_DIFFUSE_FACTOR
+ ), this.specularFactor = Cartesian3.clone(
+ SpecularGlossiness$2.DEFAULT_SPECULAR_FACTOR
+ ), this.glossinessFactor = SpecularGlossiness$2.DEFAULT_GLOSSINESS_FACTOR;
+}
+SpecularGlossiness$2.DEFAULT_DIFFUSE_FACTOR = Cartesian4.ONE;
+SpecularGlossiness$2.DEFAULT_SPECULAR_FACTOR = Cartesian3.ONE;
+SpecularGlossiness$2.DEFAULT_GLOSSINESS_FACTOR = 1;
+function Specular$2() {
+ this.specularFactor = Specular$2.DEFAULT_SPECULAR_FACTOR, this.specularTexture = void 0, this.specularColorFactor = Cartesian3.clone(
+ Specular$2.DEFAULT_SPECULAR_COLOR_FACTOR
+ ), this.specularColorTexture = void 0;
+}
+Specular$2.DEFAULT_SPECULAR_FACTOR = 1;
+Specular$2.DEFAULT_SPECULAR_COLOR_FACTOR = Cartesian3.ONE;
+function Anisotropy$1() {
+ this.anisotropyStrength = Anisotropy$1.DEFAULT_ANISOTROPY_STRENGTH, this.anisotropyRotation = Anisotropy$1.DEFAULT_ANISOTROPY_ROTATION, this.anisotropyTexture = void 0;
+}
+Anisotropy$1.DEFAULT_ANISOTROPY_STRENGTH = 0;
+Anisotropy$1.DEFAULT_ANISOTROPY_ROTATION = 0;
+function Clearcoat$2() {
+ this.clearcoatFactor = Clearcoat$2.DEFAULT_CLEARCOAT_FACTOR, this.clearcoatTexture = void 0, this.clearcoatRoughnessFactor = Clearcoat$2.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR, this.clearcoatRoughnessTexture = void 0, this.clearcoatNormalTexture = void 0;
+}
+Clearcoat$2.DEFAULT_CLEARCOAT_FACTOR = 0;
+Clearcoat$2.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR = 0;
+function Material$3() {
+ this.metallicRoughness = new MetallicRoughness$3(), this.specularGlossiness = void 0, this.specular = void 0, this.anisotropy = void 0, this.clearcoat = void 0, this.emissiveTexture = void 0, this.normalTexture = void 0, this.occlusionTexture = void 0, this.emissiveFactor = Cartesian3.clone(Material$3.DEFAULT_EMISSIVE_FACTOR), this.alphaMode = AlphaMode$1.OPAQUE, this.alphaCutoff = 0.5, this.doubleSided = !1, this.unlit = !1;
+}
+Material$3.DEFAULT_EMISSIVE_FACTOR = Cartesian3.ZERO;
+ModelComponents.Quantization = Quantization$1;
+ModelComponents.Attribute = Attribute$3;
+ModelComponents.Indices = Indices$1;
+ModelComponents.FeatureIdAttribute = FeatureIdAttribute$4;
+ModelComponents.FeatureIdTexture = FeatureIdTexture$1;
+ModelComponents.FeatureIdImplicitRange = FeatureIdImplicitRange$1;
+ModelComponents.MorphTarget = MorphTarget$1;
+ModelComponents.Primitive = Primitive$2;
+ModelComponents.Instances = Instances$2;
+ModelComponents.Skin = Skin$1;
+ModelComponents.Node = Node$3;
+ModelComponents.Scene = Scene$3;
+ModelComponents.AnimatedPropertyType = Object.freeze(AnimatedPropertyType$2);
+ModelComponents.AnimationSampler = AnimationSampler$1;
+ModelComponents.AnimationTarget = AnimationTarget$1;
+ModelComponents.AnimationChannel = AnimationChannel$1;
+ModelComponents.Animation = Animation$1;
+ModelComponents.ArticulationStage = ArticulationStage$1;
+ModelComponents.Articulation = Articulation$1;
+ModelComponents.Asset = Asset$1;
+ModelComponents.Components = Components$2;
+ModelComponents.TextureReader = TextureReader;
+ModelComponents.MetallicRoughness = MetallicRoughness$3;
+ModelComponents.SpecularGlossiness = SpecularGlossiness$2;
+ModelComponents.Specular = Specular$2;
+ModelComponents.Anisotropy = Anisotropy$1;
+ModelComponents.Clearcoat = Clearcoat$2;
+ModelComponents.Material = Material$3;
+const GltfLoaderUtil = {};
+GltfLoaderUtil.getImageIdFromTexture = function(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const { gltf: t, textureId: n, supportedImageFormats: i } = e, r = t.textures[n], o = r.extensions;
+ if (defined(o)) {
+ if (i.webp && defined(o.EXT_texture_webp))
+ return o.EXT_texture_webp.source;
+ if (i.basis && defined(o.KHR_texture_basisu))
+ return o.KHR_texture_basisu.source;
+ }
+ return r.source;
+};
+GltfLoaderUtil.createSampler = function(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const { gltf: t, textureInfo: n, compressedTextureNoMipmap: i = !1 } = e;
+ let r = TextureWrap$1.REPEAT, o = TextureWrap$1.REPEAT, s = TextureMinificationFilter$1.LINEAR, c = TextureMagnificationFilter$1.LINEAR;
+ const l = n.index, f = t.textures[l].sampler;
+ if (defined(f)) {
+ const h = t.samplers[f];
+ r = defaultValue(h.wrapS, r), o = defaultValue(h.wrapT, o), s = defaultValue(h.minFilter, s), c = defaultValue(h.magFilter, c);
+ }
+ return i && s !== TextureMinificationFilter$1.LINEAR && s !== TextureMinificationFilter$1.NEAREST && (s === TextureMinificationFilter$1.NEAREST_MIPMAP_NEAREST || s === TextureMinificationFilter$1.NEAREST_MIPMAP_LINEAR ? s = TextureMinificationFilter$1.NEAREST : s = TextureMinificationFilter$1.LINEAR), new Sampler({
+ wrapS: r,
+ wrapT: o,
+ minificationFilter: s,
+ magnificationFilter: c
+ });
+};
+const defaultScale$2 = new Cartesian2(1, 1);
+GltfLoaderUtil.createModelTextureReader = function(e) {
+ var l;
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const { textureInfo: t, channels: n, texture: i } = e;
+ let r = defaultValue(t.texCoord, 0), o;
+ const s = (l = t.extensions) == null ? void 0 : l.KHR_texture_transform;
+ if (defined(s)) {
+ r = defaultValue(s.texCoord, r);
+ const d = defined(s.offset) ? Cartesian2.unpack(s.offset) : Cartesian2.ZERO;
+ let f = defaultValue(s.rotation, 0);
+ const h = defined(s.scale) ? Cartesian2.unpack(s.scale) : defaultScale$2;
+ f = -f, o = new Matrix3(
+ Math.cos(f) * h.x,
+ -Math.sin(f) * h.y,
+ d.x,
+ Math.sin(f) * h.x,
+ Math.cos(f) * h.y,
+ d.y,
+ 0,
+ 0,
+ 1
+ );
+ }
+ const c = new ModelComponents.TextureReader();
+ return c.index = t.index, c.texture = i, c.texCoord = r, c.scale = t.scale, c.transform = o, c.channels = n, c;
+};
+function resizeImageToNextPowerOfTwo(e) {
+ const t = document.createElement("canvas");
+ return t.width = CesiumMath.nextPowerOfTwo(e.width), t.height = CesiumMath.nextPowerOfTwo(e.height), t.getContext("2d").drawImage(
+ e,
+ 0,
+ 0,
+ e.width,
+ e.height,
+ 0,
+ 0,
+ t.width,
+ t.height
+ ), t;
+}
+function GltfTextureLoader(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.resourceCache, n = e.gltf, i = e.textureInfo, r = e.gltfResource, o = e.baseResource, s = e.supportedImageFormats, c = e.cacheKey, l = defaultValue(e.asynchronous, !0), d = i.index, f = GltfLoaderUtil.getImageIdFromTexture({
+ gltf: n,
+ textureId: d,
+ supportedImageFormats: s
+ });
+ this._resourceCache = t, this._gltf = n, this._textureInfo = i, this._imageId = f, this._gltfResource = r, this._baseResource = o, this._cacheKey = c, this._asynchronous = l, this._imageLoader = void 0, this._image = void 0, this._mipLevels = void 0, this._texture = void 0, this._state = ResourceLoaderState$1.UNLOADED, this._promise = void 0;
+}
+defined(Object.create) && (GltfTextureLoader.prototype = Object.create(ResourceLoader.prototype), GltfTextureLoader.prototype.constructor = GltfTextureLoader);
+Object.defineProperties(GltfTextureLoader.prototype, {
+ /**
+ * The cache key of the resource.
+ *
+ * @memberof GltfTextureLoader.prototype
+ *
+ * @type {string}
+ * @readonly
+ * @private
+ */
+ cacheKey: {
+ get: function() {
+ return this._cacheKey;
+ }
+ },
+ /**
+ * The texture.
+ *
+ * @memberof GltfTextureLoader.prototype
+ *
+ * @type {Texture}
+ * @readonly
+ * @private
+ */
+ texture: {
+ get: function() {
+ return this._texture;
+ }
+ }
+});
+const scratchTextureJob = new CreateTextureJob();
+async function loadResources$2(e) {
+ const t = e._resourceCache;
+ try {
+ const n = t.getImageLoader({
+ gltf: e._gltf,
+ imageId: e._imageId,
+ gltfResource: e._gltfResource,
+ baseResource: e._baseResource
+ });
+ return e._imageLoader = n, await n.load(), e.isDestroyed() ? void 0 : (e._image = n.image, e._mipLevels = n.mipLevels, e._state = ResourceLoaderState$1.LOADED, e);
+ } catch (n) {
+ if (e.isDestroyed())
+ return;
+ throw e.unload(), e._state = ResourceLoaderState$1.FAILED, e.getError("Failed to load texture", n);
+ }
+}
+GltfTextureLoader.prototype.load = async function() {
+ return defined(this._promise) ? this._promise : (this._state = ResourceLoaderState$1.LOADING, this._promise = loadResources$2(this), this._promise);
+};
+function CreateTextureJob() {
+ this.gltf = void 0, this.textureInfo = void 0, this.image = void 0, this.context = void 0, this.texture = void 0;
+}
+CreateTextureJob.prototype.set = function(e, t, n, i, r) {
+ this.gltf = e, this.textureInfo = t, this.image = n, this.mipLevels = i, this.context = r;
+};
+CreateTextureJob.prototype.execute = function() {
+ this.texture = createTexture$1(
+ this.gltf,
+ this.textureInfo,
+ this.image,
+ this.mipLevels,
+ this.context
+ );
+};
+function createTexture$1(e, t, n, i, r) {
+ const o = n.internalFormat;
+ let s = !1;
+ PixelFormat$1.isCompressedFormat(o) && !defined(i) && (s = !0);
+ const c = GltfLoaderUtil.createSampler({
+ gltf: e,
+ textureInfo: t,
+ compressedTextureNoMipmap: s
+ }), l = c.minificationFilter, d = c.wrapS, f = c.wrapT, h = l === TextureMinificationFilter$1.NEAREST_MIPMAP_NEAREST || l === TextureMinificationFilter$1.NEAREST_MIPMAP_LINEAR || l === TextureMinificationFilter$1.LINEAR_MIPMAP_NEAREST || l === TextureMinificationFilter$1.LINEAR_MIPMAP_LINEAR, p = !defined(o) && h, m = p || d === TextureWrap$1.REPEAT || d === TextureWrap$1.MIRRORED_REPEAT || f === TextureWrap$1.REPEAT || f === TextureWrap$1.MIRRORED_REPEAT, _ = !CesiumMath.isPowerOfTwo(n.width) || !CesiumMath.isPowerOfTwo(n.height), y = m && _;
+ let C;
+ return defined(o) ? (!r.webgl2 && PixelFormat$1.isCompressedFormat(o) && _ && m && console.warn(
+ "Compressed texture uses REPEAT or MIRRORED_REPEAT texture wrap mode and dimensions are not powers of two. The texture may be rendered incorrectly."
+ ), C = Texture.create({
+ context: r,
+ source: {
+ arrayBufferView: n.bufferView,
+ // Only defined for CompressedTextureBuffer
+ mipLevels: i
+ },
+ width: n.width,
+ height: n.height,
+ pixelFormat: n.internalFormat,
+ // Only defined for CompressedTextureBuffer
+ sampler: c
+ })) : (y && (n = resizeImageToNextPowerOfTwo(n)), C = Texture.create({
+ context: r,
+ source: n,
+ sampler: c,
+ flipY: !1,
+ skipColorSpaceConversion: !0
+ })), p && C.generateMipmap(), C;
+}
+GltfTextureLoader.prototype.process = function(e) {
+ if (this._state === ResourceLoaderState$1.READY)
+ return !0;
+ if (this._state !== ResourceLoaderState$1.LOADED && this._state !== ResourceLoaderState$1.PROCESSING || defined(this._texture) || !defined(this._image))
+ return !1;
+ this._state = ResourceLoaderState$1.PROCESSING;
+ let t;
+ if (this._asynchronous) {
+ const n = scratchTextureJob;
+ if (n.set(
+ this._gltf,
+ this._textureInfo,
+ this._image,
+ this._mipLevels,
+ e.context
+ ), !e.jobScheduler.execute(n, JobType$1.TEXTURE))
+ return;
+ t = n.texture;
+ } else
+ t = createTexture$1(
+ this._gltf,
+ this._textureInfo,
+ this._image,
+ this._mipLevels,
+ e.context
+ );
+ return this.unload(), this._texture = t, this._state = ResourceLoaderState$1.READY, this._resourceCache.statistics.addTextureLoader(this), !0;
+};
+GltfTextureLoader.prototype.unload = function() {
+ defined(this._texture) && this._texture.destroy(), defined(this._imageLoader) && !this._imageLoader.isDestroyed() && this._resourceCache.unload(this._imageLoader), this._imageLoader = void 0, this._image = void 0, this._mipLevels = void 0, this._texture = void 0, this._gltf = void 0;
+};
+function GltfVertexBufferLoader(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.resourceCache, n = e.gltf, i = e.gltfResource, r = e.baseResource, o = e.bufferViewId, s = e.draco, c = e.attributeSemantic, l = e.accessorId, d = e.cacheKey, f = defaultValue(e.asynchronous, !0), h = defaultValue(e.loadBuffer, !1), p = defaultValue(e.loadTypedArray, !1);
+ this._resourceCache = t, this._gltfResource = i, this._baseResource = r, this._gltf = n, this._bufferViewId = o, this._draco = s, this._attributeSemantic = c, this._accessorId = l, this._cacheKey = d, this._asynchronous = f, this._loadBuffer = h, this._loadTypedArray = p, this._bufferViewLoader = void 0, this._dracoLoader = void 0, this._quantization = void 0, this._typedArray = void 0, this._buffer = void 0, this._state = ResourceLoaderState$1.UNLOADED, this._promise = void 0;
+}
+defined(Object.create) && (GltfVertexBufferLoader.prototype = Object.create(ResourceLoader.prototype), GltfVertexBufferLoader.prototype.constructor = GltfVertexBufferLoader);
+Object.defineProperties(GltfVertexBufferLoader.prototype, {
+ /**
+ * The cache key of the resource.
+ *
+ * @memberof GltfVertexBufferLoader.prototype
+ *
+ * @type {string}
+ * @readonly
+ * @private
+ */
+ cacheKey: {
+ get: function() {
+ return this._cacheKey;
+ }
+ },
+ /**
+ * The vertex buffer. This is only defined when loadAsTypedArray is false.
+ *
+ * @memberof GltfVertexBufferLoader.prototype
+ *
+ * @type {Buffer}
+ * @readonly
+ * @private
+ */
+ buffer: {
+ get: function() {
+ return this._buffer;
+ }
+ },
+ /**
+ * The typed array containing vertex buffer data. This is only defined when loadAsTypedArray is true.
+ *
+ * @memberof GltfVertexBufferLoader.prototype
+ *
+ * @type {Uint8Array}
+ * @readonly
+ * @private
+ */
+ typedArray: {
+ get: function() {
+ return this._typedArray;
+ }
+ },
+ /**
+ * Information about the quantized vertex attribute after Draco decode.
+ *
+ * @memberof GltfVertexBufferLoader.prototype
+ *
+ * @type {ModelComponents.Quantization}
+ * @readonly
+ * @private
+ */
+ quantization: {
+ get: function() {
+ return this._quantization;
+ }
+ }
+});
+function hasDracoCompression(e, t) {
+ return defined(e) && defined(e.attributes) && defined(e.attributes[t]);
+}
+GltfVertexBufferLoader.prototype.load = async function() {
+ return defined(this._promise) ? this._promise : hasDracoCompression(this._draco, this._attributeSemantic) ? (this._promise = loadFromDraco(this), this._promise) : (this._promise = loadFromBufferView(this), this._promise);
+};
+function getQuantizationInformation(e, t, n, i) {
+ const o = (1 << e.quantizationBits) - 1, s = 1 / o, c = new ModelComponents.Quantization();
+ if (c.componentDatatype = t, c.octEncoded = e.octEncoded, c.octEncodedZXY = !0, c.type = i, c.octEncoded)
+ c.type = AttributeType$1.VEC2, c.normalizationRange = o;
+ else {
+ const l = AttributeType$1.getMathType(i);
+ if (l === Number) {
+ const d = e.range;
+ c.quantizedVolumeOffset = e.minValues[0], c.quantizedVolumeDimensions = d, c.normalizationRange = o, c.quantizedVolumeStepSize = d * s;
+ } else {
+ c.quantizedVolumeOffset = l.unpack(
+ e.minValues
+ ), c.normalizationRange = l.unpack(
+ new Array(n).fill(o)
+ );
+ const d = new Array(n).fill(
+ e.range
+ );
+ c.quantizedVolumeDimensions = l.unpack(
+ d
+ );
+ const f = d.map(function(h) {
+ return h * s;
+ });
+ c.quantizedVolumeStepSize = l.unpack(f);
+ }
+ }
+ return c;
+}
+async function loadFromDraco(e) {
+ e._state = ResourceLoaderState$1.LOADING;
+ const t = e._resourceCache;
+ try {
+ const n = t.getDracoLoader({
+ gltf: e._gltf,
+ draco: e._draco,
+ gltfResource: e._gltfResource,
+ baseResource: e._baseResource
+ });
+ return e._dracoLoader = n, await n.load(), e.isDestroyed() ? void 0 : (e._state = ResourceLoaderState$1.LOADED, e);
+ } catch {
+ if (e.isDestroyed())
+ return;
+ handleError$6(e);
+ }
+}
+function processDraco(e) {
+ e._state = ResourceLoaderState$1.PROCESSING;
+ const n = e._dracoLoader.decodedData.vertexAttributes, i = e._attributeSemantic, r = n[i], o = e._accessorId, c = e._gltf.accessors[o].type, l = r.array, d = r.data.quantization;
+ defined(d) && (e._quantization = getQuantizationInformation(
+ d,
+ r.data.componentDatatype,
+ r.data.componentsPerAttribute,
+ c
+ )), e._typedArray = new Uint8Array(
+ l.buffer,
+ l.byteOffset,
+ l.byteLength
+ );
+}
+async function loadFromBufferView(e) {
+ e._state = ResourceLoaderState$1.LOADING;
+ const t = e._resourceCache;
+ try {
+ const n = t.getBufferViewLoader({
+ gltf: e._gltf,
+ bufferViewId: e._bufferViewId,
+ gltfResource: e._gltfResource,
+ baseResource: e._baseResource
+ });
+ return e._bufferViewLoader = n, await n.load(), e.isDestroyed() ? void 0 : (e._typedArray = n.typedArray, e._state = ResourceLoaderState$1.PROCESSING, e);
+ } catch (n) {
+ if (e.isDestroyed())
+ return;
+ handleError$6(e, n);
+ }
+}
+function handleError$6(e, t) {
+ throw e.unload(), e._state = ResourceLoaderState$1.FAILED, e.getError("Failed to load vertex buffer", t);
+}
+function CreateVertexBufferJob() {
+ this.typedArray = void 0, this.context = void 0, this.buffer = void 0;
+}
+CreateVertexBufferJob.prototype.set = function(e, t) {
+ this.typedArray = e, this.context = t;
+};
+CreateVertexBufferJob.prototype.execute = function() {
+ this.buffer = createVertexBuffer$1(this.typedArray, this.context);
+};
+function createVertexBuffer$1(e, t) {
+ const n = Buffer.createVertexBuffer({
+ typedArray: e,
+ context: t,
+ usage: BufferUsage$1.STATIC_DRAW
+ });
+ return n.vertexArrayDestroyable = !1, n;
+}
+const scratchVertexBufferJob = new CreateVertexBufferJob();
+GltfVertexBufferLoader.prototype.process = function(e) {
+ if (this._state === ResourceLoaderState$1.READY)
+ return !0;
+ if (this._state !== ResourceLoaderState$1.LOADED && this._state !== ResourceLoaderState$1.PROCESSING)
+ return !1;
+ if (defined(this._dracoLoader)) {
+ try {
+ if (!this._dracoLoader.process(e))
+ return !1;
+ } catch (i) {
+ handleError$6(this, i);
+ }
+ processDraco(this);
+ }
+ let t;
+ const n = this._typedArray;
+ if (this._loadBuffer && this._asynchronous) {
+ const i = scratchVertexBufferJob;
+ if (i.set(n, e.context), !e.jobScheduler.execute(i, JobType$1.BUFFER))
+ return !1;
+ t = i.buffer;
+ } else this._loadBuffer && (t = createVertexBuffer$1(n, e.context));
+ return this.unload(), this._buffer = t, this._typedArray = this._loadTypedArray ? n : void 0, this._state = ResourceLoaderState$1.READY, this._resourceCache.statistics.addGeometryLoader(this), !0;
+};
+GltfVertexBufferLoader.prototype.unload = function() {
+ defined(this._buffer) && this._buffer.destroy();
+ const e = this._resourceCache;
+ defined(this._bufferViewLoader) && !this._bufferViewLoader.isDestroyed() && e.unload(this._bufferViewLoader), defined(this._dracoLoader) && e.unload(this._dracoLoader), this._bufferViewLoader = void 0, this._dracoLoader = void 0, this._typedArray = void 0, this._buffer = void 0, this._gltf = void 0;
+};
+function MetadataClass(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.id, n = defaultValue(e.properties, {}), i = {};
+ for (const r in n)
+ if (n.hasOwnProperty(r)) {
+ const o = n[r];
+ defined(o.semantic) && (i[o.semantic] = o);
+ }
+ this._id = t, this._name = e.name, this._description = e.description, this._properties = n, this._propertiesBySemantic = i, this._extras = clone$1(e.extras, !0), this._extensions = clone$1(e.extensions, !0);
+}
+MetadataClass.fromJson = function(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.id, n = e.class, i = {};
+ for (const r in n.properties)
+ if (n.properties.hasOwnProperty(r)) {
+ const o = MetadataClassProperty.fromJson({
+ id: r,
+ property: n.properties[r],
+ enums: e.enums
+ });
+ i[r] = o;
+ }
+ return new MetadataClass({
+ id: t,
+ name: n.name,
+ description: n.description,
+ properties: i,
+ extras: n.extras,
+ extensions: n.extensions
+ });
+};
+Object.defineProperties(MetadataClass.prototype, {
+ /**
+ * The class properties.
+ *
+ * @memberof MetadataClass.prototype
+ * @type {Object3DTILES_metadata extension is used,
+ * this property stores a {@link MetadataTable} instance for the tiles in the subtree.
+ *
+ * @type {MetadataTable}
+ * @readonly
+ * @private
+ */
+ tileMetadataTable: {
+ get: function() {
+ return this._tileMetadataTable;
+ }
+ },
+ /**
+ * When tile metadata is present (3D Tiles 1.1) or the 3DTILES_metadata extension is used,
+ * this property stores the JSON from the extension. This is used by {@link TileMetadata}
+ * to get the extras and extensions for the tiles in the subtree.
+ *
+ * @type {object}
+ * @readonly
+ * @private
+ */
+ tilePropertyTableJson: {
+ get: function() {
+ return this._tilePropertyTableJson;
+ }
+ },
+ /**
+ * When content metadata is present (3D Tiles 1.1), this property stores
+ * an array of {@link MetadataTable} instances for the contents in the subtree.
+ *
+ * @type {Array}
+ * @readonly
+ * @private
+ */
+ contentMetadataTables: {
+ get: function() {
+ return this._contentMetadataTables;
+ }
+ },
+ /**
+ * When content metadata is present (3D Tiles 1.1), this property
+ * an array of the JSONs from the extension. This is used to get the extras
+ * and extensions for the contents in the subtree.
+ *
+ * @type {Array}
+ * @readonly
+ * @private
+ */
+ contentPropertyTableJsons: {
+ get: function() {
+ return this._contentPropertyTableJsons;
+ }
+ },
+ /**
+ * Gets the implicit tile coordinates for the root of the subtree.
+ *
+ * @type {ImplicitTileCoordinates}
+ * @readonly
+ * @private
+ */
+ implicitCoordinates: {
+ get: function() {
+ return this._implicitCoordinates;
+ }
+ }
+});
+ImplicitSubtree.prototype.tileIsAvailableAtIndex = function(e) {
+ return this._tileAvailability.getBit(e);
+};
+ImplicitSubtree.prototype.tileIsAvailableAtCoordinates = function(e) {
+ const t = this.getTileIndex(e);
+ return this.tileIsAvailableAtIndex(t);
+};
+ImplicitSubtree.prototype.contentIsAvailableAtIndex = function(e, t) {
+ return t = defaultValue(t, 0), this._contentAvailabilityBitstreams[t].getBit(e);
+};
+ImplicitSubtree.prototype.contentIsAvailableAtCoordinates = function(e, t) {
+ const n = this.getTileIndex(e);
+ return this.contentIsAvailableAtIndex(n, t);
+};
+ImplicitSubtree.prototype.childSubtreeIsAvailableAtIndex = function(e) {
+ return this._childSubtreeAvailability.getBit(e);
+};
+ImplicitSubtree.prototype.childSubtreeIsAvailableAtCoordinates = function(e) {
+ const t = this.getChildSubtreeIndex(e);
+ return this.childSubtreeIsAvailableAtIndex(t);
+};
+ImplicitSubtree.prototype.getLevelOffset = function(e) {
+ const t = this._branchingFactor;
+ return (Math.pow(t, e) - 1) / (t - 1);
+};
+ImplicitSubtree.prototype.getParentMortonIndex = function(e) {
+ let t = 2;
+ return this._subdivisionScheme === ImplicitSubdivisionScheme$1.OCTREE && (t = 3), e >> t;
+};
+ImplicitSubtree.fromSubtreeJson = async function(e, t, n, i, r) {
+ const o = new ImplicitSubtree(
+ e,
+ i,
+ r
+ );
+ let s;
+ defined(t) ? s = {
+ json: t,
+ binary: void 0
+ } : s = parseSubtreeChunks(n);
+ const c = s.json;
+ o._subtreeJson = c;
+ let l;
+ if (hasExtension(c, "3DTILES_metadata"))
+ l = c.extensions["3DTILES_metadata"];
+ else if (defined(c.tileMetadata)) {
+ const x = c.tileMetadata;
+ l = c.propertyTables[x];
+ }
+ const d = [];
+ if (defined(c.contentMetadata)) {
+ const x = c.contentMetadata.length;
+ for (let b = 0; b < x; b++) {
+ const S = c.contentMetadata[b];
+ d.push(
+ c.propertyTables[S]
+ );
+ }
+ }
+ let f;
+ const h = i.metadataSchema, p = c.subtreeMetadata;
+ if (defined(p)) {
+ const x = p.class, b = h.classes[x];
+ f = new ImplicitSubtreeMetadata({
+ subtreeMetadata: p,
+ class: b
+ });
+ }
+ o._metadata = f, o._tilePropertyTableJson = l, o._contentPropertyTableJsons = d;
+ const m = {
+ constant: 0
+ };
+ c.contentAvailabilityHeaders = [], hasExtension(c, "3DTILES_multiple_contents") ? c.contentAvailabilityHeaders = c.extensions["3DTILES_multiple_contents"].contentAvailability : Array.isArray(c.contentAvailability) ? c.contentAvailabilityHeaders = c.contentAvailability : c.contentAvailabilityHeaders.push(
+ defaultValue(c.contentAvailability, m)
+ );
+ const _ = preprocessBuffers(c.buffers), y = preprocessBufferViews(
+ c.bufferViews,
+ _
+ );
+ markActiveBufferViews(c, y), defined(l) && markActiveMetadataBufferViews(l, y);
+ for (let x = 0; x < d.length; x++) {
+ const b = d[x];
+ markActiveMetadataBufferViews(b, y);
+ }
+ const C = await requestActiveBuffers(
+ o,
+ _,
+ s.binary
+ ), T = parseActiveBufferViews(y, C);
+ return parseAvailability(o, c, i, T), defined(l) && (parseTileMetadataTable(o, i, T), makeTileJumpBuffer(o)), parseContentMetadataTables(o, i, T), makeContentJumpBuffers(o), o._ready = !0, o;
+};
+function parseSubtreeChunks(e) {
+ const n = new DataView(
+ e.buffer,
+ e.byteOffset
+ );
+ let i = 8;
+ const r = n.getUint32(i, !0);
+ i += 8;
+ const o = n.getUint32(i, !0);
+ i += 8;
+ const s = getJsonFromTypedArray(
+ e,
+ i,
+ r
+ );
+ i += r;
+ const c = e.subarray(
+ i,
+ i + o
+ );
+ return {
+ json: s,
+ binary: c
+ };
+}
+function preprocessBuffers(e) {
+ e = defined(e) ? e : [];
+ for (let t = 0; t < e.length; t++) {
+ const n = e[t];
+ n.isExternal = defined(n.uri), n.isActive = !1;
+ }
+ return e;
+}
+function preprocessBufferViews(e, t) {
+ e = defined(e) ? e : [];
+ for (let n = 0; n < e.length; n++) {
+ const i = e[n], r = t[i.buffer];
+ i.bufferHeader = r, i.isActive = !1;
+ }
+ return e;
+}
+function markActiveBufferViews(e, t) {
+ let n;
+ const i = e.tileAvailability;
+ defined(i.bitstream) ? n = t[i.bitstream] : defined(i.bufferView) && (n = t[i.bufferView]), defined(n) && (n.isActive = !0, n.bufferHeader.isActive = !0);
+ const r = e.contentAvailabilityHeaders;
+ for (let s = 0; s < r.length; s++)
+ n = void 0, defined(r[s].bitstream) ? n = t[r[s].bitstream] : defined(r[s].bufferView) && (n = t[r[s].bufferView]), defined(n) && (n.isActive = !0, n.bufferHeader.isActive = !0);
+ n = void 0;
+ const o = e.childSubtreeAvailability;
+ defined(o.bitstream) ? n = t[o.bitstream] : defined(o.bufferView) && (n = t[o.bufferView]), defined(n) && (n.isActive = !0, n.bufferHeader.isActive = !0);
+}
+function markActiveMetadataBufferViews(e, t) {
+ const n = e.properties;
+ let i;
+ for (const r in n)
+ if (n.hasOwnProperty(r)) {
+ const o = n[r], s = defaultValue(
+ o.values,
+ o.bufferView
+ );
+ i = t[s], i.isActive = !0, i.bufferHeader.isActive = !0;
+ const c = defaultValue(
+ o.stringOffsets,
+ o.stringOffsetBufferView
+ );
+ defined(c) && (i = t[c], i.isActive = !0, i.bufferHeader.isActive = !0);
+ const l = defaultValue(
+ o.arrayOffsets,
+ o.arrayOffsetBufferView
+ );
+ defined(l) && (i = t[l], i.isActive = !0, i.bufferHeader.isActive = !0);
+ }
+}
+function requestActiveBuffers(e, t, n) {
+ const i = [];
+ for (let r = 0; r < t.length; r++) {
+ const o = t[r];
+ if (!o.isActive)
+ i.push(Promise.resolve(void 0));
+ else if (o.isExternal) {
+ const s = requestExternalBuffer(e, o);
+ i.push(s);
+ } else
+ i.push(Promise.resolve(n));
+ }
+ return Promise.all(i).then(function(r) {
+ const o = {};
+ for (let s = 0; s < r.length; s++) {
+ const c = r[s];
+ defined(c) && (o[s] = c);
+ }
+ return o;
+ });
+}
+async function requestExternalBuffer(e, t) {
+ const i = e._resource.getDerivedResource({
+ url: t.uri
+ }), r = ResourceCache.getExternalBufferLoader({
+ resource: i
+ });
+ e._bufferLoader = r;
+ try {
+ await r.load();
+ } catch (o) {
+ if (r.isDestroyed())
+ return;
+ throw o;
+ }
+ return r.typedArray;
+}
+function parseActiveBufferViews(e, t) {
+ const n = {};
+ for (let i = 0; i < e.length; i++) {
+ const r = e[i];
+ if (!r.isActive)
+ continue;
+ const o = r.byteOffset, s = o + r.byteLength, l = t[r.buffer].subarray(o, s);
+ n[i] = l;
+ }
+ return n;
+}
+function parseAvailability(e, t, n, i) {
+ const r = n.branchingFactor, o = n.subtreeLevels, s = (Math.pow(r, o) - 1) / (r - 1), c = Math.pow(r, o), l = hasExtension(t, "3DTILES_metadata"), d = defined(e._tilePropertyTableJson);
+ let f = l || d;
+ e._tileAvailability = parseAvailabilityBitstream(
+ t.tileAvailability,
+ i,
+ s,
+ f
+ );
+ const h = e._contentPropertyTableJsons.length > 0;
+ f = f || h;
+ for (let p = 0; p < t.contentAvailabilityHeaders.length; p++) {
+ const m = parseAvailabilityBitstream(
+ t.contentAvailabilityHeaders[p],
+ i,
+ // content availability has the same length as tile availability.
+ s,
+ f
+ );
+ e._contentAvailabilityBitstreams.push(m);
+ }
+ e._childSubtreeAvailability = parseAvailabilityBitstream(
+ t.childSubtreeAvailability,
+ i,
+ c
+ );
+}
+function parseAvailabilityBitstream(e, t, n, i) {
+ if (defined(e.constant))
+ return new ImplicitAvailabilityBitstream({
+ constant: !!e.constant,
+ lengthBits: n,
+ availableCount: e.availableCount
+ });
+ let r;
+ return defined(e.bitstream) ? r = t[e.bitstream] : defined(e.bufferView) && (r = t[e.bufferView]), new ImplicitAvailabilityBitstream({
+ bitstream: r,
+ lengthBits: n,
+ availableCount: e.availableCount,
+ computeAvailableCountEnabled: i
+ });
+}
+function parseTileMetadataTable(e, t, n) {
+ const i = e._tilePropertyTableJson, r = e._tileAvailability.availableCount, o = t.metadataSchema, s = i.class, c = o.classes[s];
+ e._tileMetadataTable = new MetadataTable({
+ class: c,
+ count: r,
+ properties: i.properties,
+ bufferViews: n
+ });
+}
+function parseContentMetadataTables(e, t, n) {
+ const i = e._contentPropertyTableJsons, r = e._contentAvailabilityBitstreams, o = t.metadataSchema, s = e._contentMetadataTables;
+ for (let c = 0; c < i.length; c++) {
+ const l = i[c], f = r[c].availableCount, h = l.class, p = o.classes[h], m = new MetadataTable({
+ class: p,
+ count: f,
+ properties: l.properties,
+ bufferViews: n
+ });
+ s.push(m);
+ }
+}
+function makeJumpBuffer(e) {
+ let t = 0;
+ const n = e.lengthBits, i = e.availableCount;
+ let r;
+ i < 256 ? r = new Uint8Array(n) : i < 65536 ? r = new Uint16Array(n) : r = new Uint32Array(n);
+ for (let o = 0; o < e.lengthBits; o++)
+ e.getBit(o) && (r[o] = t, t++);
+ return r;
+}
+function makeTileJumpBuffer(e) {
+ const t = makeJumpBuffer(e._tileAvailability);
+ e._tileJumpBuffer = t;
+}
+function makeContentJumpBuffers(e) {
+ const t = e._contentJumpBuffers, n = e._contentAvailabilityBitstreams;
+ for (let i = 0; i < n.length; i++) {
+ const r = n[i], o = makeJumpBuffer(r);
+ t.push(o);
+ }
+}
+ImplicitSubtree.prototype.getTileIndex = function(e) {
+ const t = e.level - this._implicitCoordinates.level;
+ if (t < 0 || this._subtreeLevels <= t)
+ throw new RuntimeError("level is out of bounds for this subtree");
+ return e.getSubtreeCoordinates().getOffsetCoordinates(
+ e
+ ).tileIndex;
+};
+ImplicitSubtree.prototype.getChildSubtreeIndex = function(e) {
+ if (e.level - this._implicitCoordinates.level !== this._implicitCoordinates.subtreeLevels)
+ throw new RuntimeError("level is out of bounds for this subtree");
+ return e.getParentSubtreeCoordinates().getOffsetCoordinates(
+ e
+ ).mortonIndex;
+};
+function getTileEntityId(e, t) {
+ if (!defined(e._tileMetadataTable))
+ return;
+ const n = e.getTileIndex(t);
+ if (e._tileAvailability.getBit(n))
+ return e._tileJumpBuffer[n];
+}
+function getContentEntityId(e, t, n) {
+ const i = e._contentMetadataTables;
+ if (!defined(i))
+ return;
+ const r = i[n];
+ if (!defined(r))
+ return;
+ const o = e._contentAvailabilityBitstreams[n], s = e.getTileIndex(t);
+ if (o.getBit(s))
+ return e._contentJumpBuffers[n][s];
+}
+ImplicitSubtree.prototype.getTileMetadataView = function(e) {
+ const t = getTileEntityId(this, e);
+ if (!defined(t))
+ return;
+ const n = this._tileMetadataTable;
+ return new ImplicitMetadataView({
+ class: n.class,
+ metadataTable: n,
+ entityId: t,
+ propertyTableJson: this._tilePropertyTableJson
+ });
+};
+ImplicitSubtree.prototype.getContentMetadataView = function(e, t) {
+ const n = getContentEntityId(this, e, t);
+ if (!defined(n))
+ return;
+ const i = this._contentMetadataTables[t], r = this._contentPropertyTableJsons[t];
+ return new ImplicitMetadataView({
+ class: i.class,
+ metadataTable: i,
+ entityId: n,
+ contentIndex: t,
+ propertyTableJson: r
+ });
+};
+ImplicitSubtree.prototype.isDestroyed = function() {
+ return !1;
+};
+ImplicitSubtree.prototype.destroy = function() {
+ return defined(this._bufferLoader) && ResourceCache.unload(this._bufferLoader), destroyObject(this);
+};
+const MetadataSemantic = {
+ /**
+ * A unique identifier, stored as a STRING.
+ *
+ * @type {string}
+ * @constant
+ * @private
+ */
+ ID: "ID",
+ /**
+ * A name, stored as a STRING. This does not have to be unique.
+ *
+ * @type {string}
+ * @constant
+ * @private
+ */
+ NAME: "NAME",
+ /**
+ * A description, stored as a STRING.
+ *
+ * @type {string}
+ * @constant
+ * @private
+ */
+ DESCRIPTION: "DESCRIPTION",
+ /**
+ * The number of tiles in a tileset, stored as a UINT64.
+ *
+ * @type {string}
+ * @constant
+ * @private
+ */
+ TILESET_TILE_COUNT: "TILESET_TILE_COUNT",
+ /**
+ * A bounding box for a tile, stored as an array of 12 FLOAT32 or FLOAT64 components. The components are the same format as for boundingVolume.box in 3D Tiles 1.0. This semantic is used to provide a tighter bounding volume than the one implicitly calculated in implicit tiling.
+ *
+ * @type {string}
+ * @constant
+ * @private
+ */
+ TILE_BOUNDING_BOX: "TILE_BOUNDING_BOX",
+ /**
+ * A bounding region for a tile, stored as an array of 6 FLOAT64 components. The components are [west, south, east, north, minimumHeight, maximumHeight]. This semantic is used to provide a tighter bounding volume than the one implicitly calculated in implicit tiling.
+ *
+ * @type {string}
+ * @constant
+ * @private
+ */
+ TILE_BOUNDING_REGION: "TILE_BOUNDING_REGION",
+ /**
+ * A bounding sphere for a tile, stored as an array of 4 FLOAT32 or FLOAT64 components. The components are [centerX, centerY, centerZ, radius]. This semantic is used to provide a tighter bounding volume than the one implicitly calculated in implicit tiling.
+ *
+ * @type {string}
+ * @constant
+ * @private
+ */
+ TILE_BOUNDING_SPHERE: "TILE_BOUNDING_SPHERE",
+ /**
+ * The minimum height of a tile above (or below) the ellipsoid, stored as a FLOAT32 or a FLOAT64. This semantic is used to tighten bounding regions implicitly calculated in implicit tiling.
+ *
+ * @type {string}
+ * @constant
+ * @private
+ */
+ TILE_MINIMUM_HEIGHT: "TILE_MINIMUM_HEIGHT",
+ /**
+ * The maximum height of a tile above (or below) the ellipsoid, stored as a FLOAT32 or a FLOAT64. This semantic is used to tighten bounding regions implicitly calculated in implicit tiling.
+ *
+ * @type {string}
+ * @constant
+ * @private
+ */
+ TILE_MAXIMUM_HEIGHT: "TILE_MAXIMUM_HEIGHT",
+ /**
+ * The horizon occlusion point for a tile, stored as an VEC3 of FLOAT32 or FLOAT64 components.
+ *
+ * @see {@link https://cesium.com/blog/2013/04/25/horizon-culling/|Horizon Culling}
+ *
+ * @type {string}
+ * @constant
+ * @private
+ */
+ TILE_HORIZON_OCCLUSION_POINT: "TILE_HORIZON_OCCLUSION_POINT",
+ /**
+ * The geometric error for a tile, stored as a FLOAT32 or a FLOAT64. This semantic is used to override the geometric error implicitly calculated in implicit tiling.
+ *
+ * @type {string}
+ * @constant
+ * @private
+ */
+ TILE_GEOMETRIC_ERROR: "TILE_GEOMETRIC_ERROR",
+ /**
+ * A bounding box for the content of a tile, stored as an array of 12 FLOAT32 or FLOAT64 components. The components are the same format as for boundingVolume.box in 3D Tiles 1.0. This semantic is used to provide a tighter bounding volume than the one implicitly calculated in implicit tiling.
+ *
+ * @type {string}
+ * @constant
+ * @private
+ */
+ CONTENT_BOUNDING_BOX: "CONTENT_BOUNDING_BOX",
+ /**
+ * A bounding region for the content of a tile, stored as an array of 6 FLOAT64 components. The components are [west, south, east, north, minimumHeight, maximumHeight]. This semantic is used to provide a tighter bounding volume than the one implicitly calculated in implicit tiling.
+ *
+ * @type {string}
+ * @constant
+ * @private
+ */
+ CONTENT_BOUNDING_REGION: "CONTENT_BOUNDING_REGION",
+ /**
+ * A bounding sphere for the content of a tile, stored as an array of 4 FLOAT32 or FLOAT64 components. The components are [centerX, centerY, centerZ, radius]. This semantic is used to provide a tighter bounding volume than the one implicitly calculated in implicit tiling.
+ *
+ * @type {string}
+ * @constant
+ * @private
+ */
+ CONTENT_BOUNDING_SPHERE: "CONTENT_BOUNDING_SPHERE",
+ /**
+ * The minimum height of the content of a tile above (or below) the ellipsoid, stored as a FLOAT32 or a FLOAT64
+ *
+ * @type {string}
+ * @constant
+ * @private
+ */
+ CONTENT_MINIMUM_HEIGHT: "CONTENT_MINIMUM_HEIGHT",
+ /**
+ * The maximum height of the content of a tile above (or below) the ellipsoid, stored as a FLOAT32 or a FLOAT64
+ *
+ * @type {string}
+ * @constant
+ * @private
+ */
+ CONTENT_MAXIMUM_HEIGHT: "CONTENT_MAXIMUM_HEIGHT",
+ /**
+ * The horizon occlusion point for the content of a tile, stored as an VEC3 of FLOAT32 or FLOAT64 components.
+ *
+ * @see {@link https://cesium.com/blog/2013/04/25/horizon-culling/|Horizon Culling}
+ *
+ * @type {string}
+ * @constant
+ * @private
+ */
+ CONTENT_HORIZON_OCCLUSION_POINT: "CONTENT_HORIZON_OCCLUSION_POINT"
+}, MetadataSemantic$1 = Object.freeze(MetadataSemantic), BoundingVolumeSemantics = {};
+BoundingVolumeSemantics.parseAllBoundingVolumeSemantics = function(e) {
+ return {
+ tile: {
+ boundingVolume: BoundingVolumeSemantics.parseBoundingVolumeSemantic(
+ "TILE",
+ e
+ ),
+ minimumHeight: BoundingVolumeSemantics._parseMinimumHeight(
+ "TILE",
+ e
+ ),
+ maximumHeight: BoundingVolumeSemantics._parseMaximumHeight(
+ "TILE",
+ e
+ )
+ },
+ content: {
+ boundingVolume: BoundingVolumeSemantics.parseBoundingVolumeSemantic(
+ "CONTENT",
+ e
+ ),
+ minimumHeight: BoundingVolumeSemantics._parseMinimumHeight(
+ "CONTENT",
+ e
+ ),
+ maximumHeight: BoundingVolumeSemantics._parseMaximumHeight(
+ "CONTENT",
+ e
+ )
+ }
+ };
+};
+BoundingVolumeSemantics.parseBoundingVolumeSemantic = function(e, t) {
+ const n = `${e}_BOUNDING_BOX`, i = t.getPropertyBySemantic(n);
+ if (defined(i))
+ return {
+ box: i
+ };
+ const r = `${e}_BOUNDING_REGION`, o = t.getPropertyBySemantic(
+ r
+ );
+ if (defined(o))
+ return {
+ region: o
+ };
+ const s = `${e}_BOUNDING_SPHERE`, c = t.getPropertyBySemantic(
+ s
+ );
+ if (defined(c))
+ return {
+ sphere: c
+ };
+};
+BoundingVolumeSemantics._parseMinimumHeight = function(e, t) {
+ const n = `${e}_MINIMUM_HEIGHT`;
+ return t.getPropertyBySemantic(n);
+};
+BoundingVolumeSemantics._parseMaximumHeight = function(e, t) {
+ const n = `${e}_MAXIMUM_HEIGHT`;
+ return t.getPropertyBySemantic(n);
+};
+function Implicit3DTileContent(e, t, n) {
+ const i = t.implicitTileset, r = t.implicitCoordinates;
+ this._implicitTileset = i, this._implicitCoordinates = r, this._implicitSubtree = void 0, this._tileset = e, this._tile = t, this._resource = n, this._metadata = void 0, this.featurePropertiesDirty = !1, this._group = void 0;
+ const o = r.getTemplateValues(), s = i.subtreeUriTemplate.getDerivedResource(
+ {
+ templateValues: o
+ }
+ );
+ this._url = s.getUrlComponent(!0), this._ready = !1;
+}
+Object.defineProperties(Implicit3DTileContent.prototype, {
+ featuresLength: {
+ get: function() {
+ return 0;
+ }
+ },
+ pointsLength: {
+ get: function() {
+ return 0;
+ }
+ },
+ trianglesLength: {
+ get: function() {
+ return 0;
+ }
+ },
+ geometryByteLength: {
+ get: function() {
+ return 0;
+ }
+ },
+ texturesByteLength: {
+ get: function() {
+ return 0;
+ }
+ },
+ batchTableByteLength: {
+ get: function() {
+ return 0;
+ }
+ },
+ innerContents: {
+ get: function() {
+ }
+ },
+ /**
+ * Returns true when the tile's content is ready to render; otherwise false
+ *
+ * @memberof Implicit3DTileContent.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ * @private
+ */
+ ready: {
+ get: function() {
+ return this._ready;
+ }
+ },
+ tileset: {
+ get: function() {
+ return this._tileset;
+ }
+ },
+ tile: {
+ get: function() {
+ return this._tile;
+ }
+ },
+ url: {
+ get: function() {
+ return this._url;
+ }
+ },
+ /**
+ * Part of the {@link Cesium3DTileContent} interface. Implicit3DTileContent
+ * always returns undefined. Only transcoded tiles have content metadata.
+ * @memberof Implicit3DTileContent.prototype
+ * @private
+ */
+ metadata: {
+ get: function() {
+ },
+ set: function() {
+ }
+ },
+ batchTable: {
+ get: function() {
+ }
+ },
+ group: {
+ get: function() {
+ return this._group;
+ },
+ set: function(e) {
+ this._group = e;
+ }
+ }
+});
+Implicit3DTileContent.fromSubtreeJson = async function(e, t, n, i, r, o) {
+ o = defaultValue(o, 0);
+ let s;
+ defined(r) && (s = new Uint8Array(r, o));
+ const c = t.implicitTileset, l = t.implicitCoordinates, d = await ImplicitSubtree.fromSubtreeJson(
+ n,
+ i,
+ s,
+ c,
+ l
+ ), f = new Implicit3DTileContent(e, t, n);
+ return f._implicitSubtree = d, expandSubtree(f, d), f._ready = !0, f;
+};
+function expandSubtree(e, t) {
+ const n = e._tile, i = e._implicitCoordinates.childIndex, r = transcodeSubtreeTiles(
+ e,
+ t,
+ n,
+ i
+ ), o = e._tileset.statistics;
+ n.children.push(r.rootTile), o.numberOfTilesTotal++;
+ const s = listChildSubtrees(e, t, r.bottomRow);
+ for (let c = 0; c < s.length; c++) {
+ const l = s[c], d = l.tile, f = makePlaceholderChildSubtree(
+ e,
+ d,
+ l.childIndex
+ );
+ d.children.push(f), o.numberOfTilesTotal++;
+ }
+}
+function listChildSubtrees(e, t, n) {
+ const i = [], r = e._implicitTileset.branchingFactor;
+ for (let o = 0; o < n.length; o++) {
+ const s = n[o];
+ if (defined(s))
+ for (let c = 0; c < r; c++) {
+ const l = o * r + c;
+ t.childSubtreeIsAvailableAtIndex(l) && i.push({
+ tile: s,
+ childIndex: c
+ });
+ }
+ }
+ return i;
+}
+function transcodeSubtreeTiles(e, t, n, i) {
+ const s = deriveChildTile(
+ e,
+ t,
+ n,
+ i,
+ 0,
+ !0
+ ), c = e._tileset.statistics;
+ let l = [s], d = [];
+ const f = e._implicitTileset;
+ for (let h = 1; h < f.subtreeLevels; h++) {
+ const p = t.getLevelOffset(h), m = f.branchingFactor * l.length;
+ for (let _ = 0; _ < m; _++) {
+ const y = p + _;
+ if (!t.tileIsAvailableAtIndex(y)) {
+ d.push(void 0);
+ continue;
+ }
+ const C = t.getParentMortonIndex(_), T = l[C], x = _ % f.branchingFactor, b = deriveChildTile(
+ e,
+ t,
+ T,
+ x,
+ y
+ );
+ T.children.push(b), c.numberOfTilesTotal++, d.push(b);
+ }
+ l = d, d = [];
+ }
+ return {
+ rootTile: s,
+ // At the end of the last loop, bottomRow was moved to parentRow
+ bottomRow: l
+ };
+}
+function getGeometricError$2(e, t, n) {
+ const i = MetadataSemantic$1.TILE_GEOMETRIC_ERROR;
+ return defined(e) && e.hasPropertyBySemantic(i) ? e.getPropertyBySemantic(i) : t.geometricError / Math.pow(2, n.level);
+}
+function deriveChildTile(e, t, n, i, r, o) {
+ const s = e._implicitTileset;
+ let c;
+ defaultValue(o, !1) ? c = n.implicitCoordinates : c = n.implicitCoordinates.getChildCoordinates(
+ i
+ );
+ let l, d, f;
+ if (defined(t.tilePropertyTableJson)) {
+ l = t.getTileMetadataView(c);
+ const A = BoundingVolumeSemantics.parseAllBoundingVolumeSemantics(
+ l
+ );
+ d = A.tile, f = A.content;
+ }
+ const p = t.contentPropertyTableJsons.length;
+ let m = !1;
+ for (let A = 0; A < p; A++)
+ if (t.contentIsAvailableAtCoordinates(c, A)) {
+ m = !0;
+ break;
+ }
+ const _ = getTileBoundingVolume(
+ s,
+ c,
+ i,
+ o,
+ n,
+ d
+ ), y = [];
+ for (let A = 0; A < s.contentCount; A++) {
+ if (!t.contentIsAvailableAtIndex(r, A))
+ continue;
+ const I = {
+ uri: s.contentUriTemplates[A].getDerivedResource({
+ templateValues: c.getTemplateValues()
+ }).url
+ }, M = getContentBoundingVolume$1(
+ _,
+ f
+ );
+ defined(M) && (I.boundingVolume = M), y.push(combine$2(I, s.contentHeaders[A]));
+ }
+ const C = getGeometricError$2(
+ l,
+ s,
+ c
+ ), T = {
+ boundingVolume: _,
+ geometricError: C,
+ refine: s.refine,
+ contents: y
+ }, x = !0, b = clone$1(s.tileHeader, x);
+ delete b.boundingVolume, delete b.transform, delete b.metadata;
+ const S = combine$2(T, b, x), E = makeTile$1(
+ e,
+ s.baseResource,
+ S,
+ n
+ );
+ return E.implicitCoordinates = c, E.implicitSubtree = t, E.metadata = l, E.hasImplicitContentMetadata = m, E;
+}
+function canUpdateHeights(e, t) {
+ return defined(e) && defined(t) && (defined(t.minimumHeight) || defined(t.maximumHeight)) && (hasExtension(e, "3DTILES_bounding_volume_S2") || defined(e.region));
+}
+function updateHeights$1(e, t) {
+ defined(t) && (hasExtension(e, "3DTILES_bounding_volume_S2") ? updateS2CellHeights(
+ e.extensions["3DTILES_bounding_volume_S2"],
+ t.minimumHeight,
+ t.maximumHeight
+ ) : defined(e.region) && updateRegionHeights(
+ e.region,
+ t.minimumHeight,
+ t.maximumHeight
+ ));
+}
+function updateRegionHeights(e, t, n) {
+ defined(t) && (e[4] = t), defined(n) && (e[5] = n);
+}
+function updateS2CellHeights(e, t, n) {
+ defined(t) && (e.minimumHeight = t), defined(n) && (e.maximumHeight = n);
+}
+function getTileBoundingVolume(e, t, n, i, r, o) {
+ let s;
+ return !defined(o) || !defined(o.boundingVolume) || !canUpdateHeights(o.boundingVolume, o) && canUpdateHeights(e.boundingVolume, o) ? s = deriveBoundingVolume(
+ e,
+ t,
+ n,
+ defaultValue(i, !1),
+ r
+ ) : s = o.boundingVolume, updateHeights$1(s, o), s;
+}
+function getContentBoundingVolume$1(e, t) {
+ let n;
+ return defined(t) && (n = t.boundingVolume), canUpdateHeights(n, t) ? updateHeights$1(n, t) : canUpdateHeights(e, t) && (n = clone$1(e, !0), updateHeights$1(n, t)), n;
+}
+function deriveBoundingVolume(e, t, n, i, r) {
+ const o = e.boundingVolume;
+ return hasExtension(o, "3DTILES_bounding_volume_S2") ? deriveBoundingVolumeS2(
+ i,
+ r,
+ n,
+ t.level,
+ t.x,
+ t.y,
+ t.z
+ ) : defined(o.region) ? {
+ region: deriveBoundingRegion(
+ o.region,
+ t.level,
+ t.x,
+ t.y,
+ t.z
+ )
+ } : {
+ box: deriveBoundingBox(
+ o.box,
+ t.level,
+ t.x,
+ t.y,
+ t.z
+ )
+ };
+}
+function deriveBoundingVolumeS2(e, t, n, i, r, o, s) {
+ const c = t._boundingVolume;
+ if (e)
+ return {
+ extensions: {
+ "3DTILES_bounding_volume_S2": {
+ token: S2Cell.getTokenFromId(c.s2Cell._cellId),
+ minimumHeight: c.minimumHeight,
+ maximumHeight: c.maximumHeight
+ }
+ }
+ };
+ const l = Number(t._boundingVolume.s2Cell._cellId >> BigInt(61)), d = l % 2 === 0 ? HilbertOrder.encode2D(i, r, o) : HilbertOrder.encode2D(i, o, r), f = S2Cell.fromFacePositionLevel(l, BigInt(d), i);
+ let h, p;
+ if (defined(s)) {
+ const m = (c.maximumHeight + c.minimumHeight) / 2;
+ h = n < 4 ? c.minimumHeight : m, p = n < 4 ? m : c.maximumHeight;
+ } else
+ h = c.minimumHeight, p = c.maximumHeight;
+ return {
+ extensions: {
+ "3DTILES_bounding_volume_S2": {
+ token: S2Cell.getTokenFromId(f._cellId),
+ minimumHeight: h,
+ maximumHeight: p
+ }
+ }
+ };
+}
+const scratchScaleFactors = new Cartesian3(), scratchRootCenter = new Cartesian3(), scratchCenter$9 = new Cartesian3(), scratchHalfAxes$1 = new Matrix3();
+function deriveBoundingBox(e, t, n, i, r) {
+ if (t === 0)
+ return e;
+ const o = Cartesian3.unpack(e, 0, scratchRootCenter), s = Matrix3.unpack(e, 3, scratchHalfAxes$1), c = Math.pow(2, -t), l = -1 + (2 * n + 1) * c, d = -1 + (2 * i + 1) * c;
+ let f = 0;
+ const h = Cartesian3.fromElements(
+ c,
+ c,
+ 1,
+ scratchScaleFactors
+ );
+ defined(r) && (f = -1 + (2 * r + 1) * c, h.z = c);
+ let p = Cartesian3.fromElements(
+ l,
+ d,
+ f,
+ scratchCenter$9
+ );
+ p = Matrix3.multiplyByVector(s, p, scratchCenter$9), p = Cartesian3.add(p, o, scratchCenter$9);
+ let m = Matrix3.clone(s);
+ m = Matrix3.multiplyByScale(m, h, m);
+ const _ = new Array(12);
+ return Cartesian3.pack(p, _), Matrix3.pack(m, _, 3), _;
+}
+const scratchRectangle$b = new Rectangle();
+function deriveBoundingRegion(e, t, n, i, r) {
+ if (t === 0)
+ return e.slice();
+ const o = Rectangle.unpack(e, 0, scratchRectangle$b), s = e[4], c = e[5], l = Math.pow(2, -t), d = l * o.width, f = CesiumMath.negativePiToPi(o.west + n * d), h = CesiumMath.negativePiToPi(f + d), p = l * o.height, m = CesiumMath.negativePiToPi(o.south + i * p), _ = CesiumMath.negativePiToPi(m + p);
+ let y = s, C = c;
+ if (defined(r)) {
+ const T = l * (c - s);
+ y += r * T, C = y + T;
+ }
+ return [f, m, h, _, y, C];
+}
+function makePlaceholderChildSubtree(e, t, n) {
+ const i = e._implicitTileset, r = t.implicitCoordinates.getChildCoordinates(
+ n
+ ), o = deriveBoundingVolume(
+ i,
+ r,
+ n,
+ !1,
+ t
+ ), s = getGeometricError$2(
+ void 0,
+ i,
+ r
+ ), c = i.subtreeUriTemplate.getDerivedResource(
+ {
+ templateValues: r.getTemplateValues()
+ }
+ ).url, l = {
+ boundingVolume: o,
+ geometricError: s,
+ refine: i.refine,
+ contents: [
+ {
+ uri: c
+ }
+ ]
+ }, d = makeTile$1(
+ e,
+ i.baseResource,
+ l,
+ t
+ );
+ return d.implicitTileset = i, d.implicitCoordinates = r, d;
+}
+function makeTile$1(e, t, n, i) {
+ const r = e._tile.constructor;
+ return new r(e._tileset, t, n, i);
+}
+Implicit3DTileContent.prototype.hasProperty = function(e, t) {
+ return !1;
+};
+Implicit3DTileContent.prototype.getFeature = function(e) {
+};
+Implicit3DTileContent.prototype.applyDebugSettings = function(e, t) {
+};
+Implicit3DTileContent.prototype.applyStyle = function(e) {
+};
+Implicit3DTileContent.prototype.update = function(e, t) {
+};
+Implicit3DTileContent.prototype.pick = function(e, t, n) {
+};
+Implicit3DTileContent.prototype.isDestroyed = function() {
+ return !1;
+};
+Implicit3DTileContent.prototype.destroy = function() {
+ return this._implicitSubtree = this._implicitSubtree && this._implicitSubtree.destroy(), destroyObject(this);
+};
+Implicit3DTileContent._deriveBoundingBox = deriveBoundingBox;
+Implicit3DTileContent._deriveBoundingRegion = deriveBoundingRegion;
+Implicit3DTileContent._deriveBoundingVolumeS2 = deriveBoundingVolumeS2;
+const ModelAnimationLoop = {
+ /**
+ * Play the animation once; do not loop it.
+ *
+ * @type {number}
+ * @constant
+ */
+ NONE: 0,
+ /**
+ * Loop the animation playing it from the start immediately after it stops.
+ *
+ * @type {number}
+ * @constant
+ */
+ REPEAT: 1,
+ /**
+ * Loop the animation. First, playing it forward, then in reverse, then forward, and so on.
+ *
+ * @type {number}
+ * @constant
+ */
+ MIRRORED_REPEAT: 2
+}, ModelAnimationLoop$1 = Object.freeze(ModelAnimationLoop);
+function ClippingPlane(e, t) {
+ this._distance = t, this._normal = new UpdateChangedCartesian3(e, this), this.onChangeCallback = void 0, this.index = -1;
+}
+Object.defineProperties(ClippingPlane.prototype, {
+ /**
+ * The shortest distance from the origin to the plane. The sign of
+ * distance determines which side of the plane the origin
+ * is on. If distance is positive, the origin is in the half-space
+ * in the direction of the normal; if negative, the origin is in the half-space
+ * opposite to the normal; if zero, the plane passes through the origin.
+ *
+ * @type {number}
+ * @memberof ClippingPlane.prototype
+ */
+ distance: {
+ get: function() {
+ return this._distance;
+ },
+ set: function(e) {
+ defined(this.onChangeCallback) && e !== this._distance && this.onChangeCallback(this.index), this._distance = e;
+ }
+ },
+ /**
+ * The plane's normal.
+ *
+ * @type {Cartesian3}
+ * @memberof ClippingPlane.prototype
+ */
+ normal: {
+ get: function() {
+ return this._normal;
+ },
+ set: function(e) {
+ defined(this.onChangeCallback) && !Cartesian3.equals(this._normal._cartesian3, e) && this.onChangeCallback(this.index), Cartesian3.clone(e, this._normal._cartesian3);
+ }
+ }
+});
+ClippingPlane.fromPlane = function(e, t) {
+ return defined(t) ? (t.normal = e.normal, t.distance = e.distance) : t = new ClippingPlane(e.normal, e.distance), t;
+};
+ClippingPlane.clone = function(e, t) {
+ return defined(t) ? (t.normal = e.normal, t.distance = e.distance, t) : new ClippingPlane(e.normal, e.distance);
+};
+function UpdateChangedCartesian3(e, t) {
+ this._clippingPlane = t, this._cartesian3 = Cartesian3.clone(e);
+}
+Object.defineProperties(UpdateChangedCartesian3.prototype, {
+ x: {
+ get: function() {
+ return this._cartesian3.x;
+ },
+ set: function(e) {
+ defined(this._clippingPlane.onChangeCallback) && e !== this._cartesian3.x && this._clippingPlane.onChangeCallback(this._clippingPlane.index), this._cartesian3.x = e;
+ }
+ },
+ y: {
+ get: function() {
+ return this._cartesian3.y;
+ },
+ set: function(e) {
+ defined(this._clippingPlane.onChangeCallback) && e !== this._cartesian3.y && this._clippingPlane.onChangeCallback(this._clippingPlane.index), this._cartesian3.y = e;
+ }
+ },
+ z: {
+ get: function() {
+ return this._cartesian3.z;
+ },
+ set: function(e) {
+ defined(this._clippingPlane.onChangeCallback) && e !== this._cartesian3.z && this._clippingPlane.onChangeCallback(this._clippingPlane.index), this._cartesian3.z = e;
+ }
+ }
+});
+function ClippingPlaneCollection(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._planes = [], this._dirtyIndex = -1, this._multipleDirtyPlanes = !1, this._enabled = defaultValue(e.enabled, !0), this.modelMatrix = Matrix4.clone(
+ defaultValue(e.modelMatrix, Matrix4.IDENTITY)
+ ), this.edgeColor = Color.clone(defaultValue(e.edgeColor, Color.WHITE)), this.edgeWidth = defaultValue(e.edgeWidth, 0), this.planeAdded = new Event(), this.planeRemoved = new Event(), this._owner = void 0;
+ const t = defaultValue(
+ e.unionClippingRegions,
+ !1
+ );
+ this._unionClippingRegions = t, this._testIntersection = t ? unionIntersectFunction : defaultIntersectFunction, this._uint8View = void 0, this._float32View = void 0, this._clippingPlanesTexture = void 0;
+ const n = e.planes;
+ if (defined(n)) {
+ const i = n.length;
+ for (let r = 0; r < i; ++r)
+ this.add(n[r]);
+ }
+}
+function unionIntersectFunction(e) {
+ return e === Intersect$1.OUTSIDE;
+}
+function defaultIntersectFunction(e) {
+ return e === Intersect$1.INSIDE;
+}
+Object.defineProperties(ClippingPlaneCollection.prototype, {
+ /**
+ * Returns the number of planes in this collection. This is commonly used with
+ * {@link ClippingPlaneCollection#get} to iterate over all the planes
+ * in the collection.
+ *
+ * @memberof ClippingPlaneCollection.prototype
+ * @type {number}
+ * @readonly
+ */
+ length: {
+ get: function() {
+ return this._planes.length;
+ }
+ },
+ /**
+ * If true, a region will be clipped if it is on the outside of any plane in the
+ * collection. Otherwise, a region will only be clipped if it is on the
+ * outside of every plane.
+ *
+ * @memberof ClippingPlaneCollection.prototype
+ * @type {boolean}
+ * @default false
+ */
+ unionClippingRegions: {
+ get: function() {
+ return this._unionClippingRegions;
+ },
+ set: function(e) {
+ this._unionClippingRegions !== e && (this._unionClippingRegions = e, this._testIntersection = e ? unionIntersectFunction : defaultIntersectFunction);
+ }
+ },
+ /**
+ * If true, clipping will be enabled.
+ *
+ * @memberof ClippingPlaneCollection.prototype
+ * @type {boolean}
+ * @default true
+ */
+ enabled: {
+ get: function() {
+ return this._enabled;
+ },
+ set: function(e) {
+ this._enabled !== e && (this._enabled = e);
+ }
+ },
+ /**
+ * Returns a texture containing packed, untransformed clipping planes.
+ *
+ * @memberof ClippingPlaneCollection.prototype
+ * @type {Texture}
+ * @readonly
+ * @private
+ */
+ texture: {
+ get: function() {
+ return this._clippingPlanesTexture;
+ }
+ },
+ /**
+ * A reference to the ClippingPlaneCollection's owner, if any.
+ *
+ * @memberof ClippingPlaneCollection.prototype
+ * @readonly
+ * @private
+ */
+ owner: {
+ get: function() {
+ return this._owner;
+ }
+ },
+ /**
+ * Returns a Number encapsulating the state for this ClippingPlaneCollection.
+ *
+ * Clipping mode is encoded in the sign of the number, which is just the plane count.
+ * If this value changes, then shader regeneration is necessary.
+ *
+ * @memberof ClippingPlaneCollection.prototype
+ * @returns {number} A Number that describes the ClippingPlaneCollection's state.
+ * @readonly
+ * @private
+ */
+ clippingPlanesState: {
+ get: function() {
+ return this._unionClippingRegions ? this._planes.length : -this._planes.length;
+ }
+ }
+});
+function setIndexDirty(e, t) {
+ e._multipleDirtyPlanes = e._multipleDirtyPlanes || e._dirtyIndex !== -1 && e._dirtyIndex !== t, e._dirtyIndex = t;
+}
+ClippingPlaneCollection.prototype.add = function(e) {
+ const t = this._planes.length, n = this;
+ e.onChangeCallback = function(i) {
+ setIndexDirty(n, i);
+ }, e.index = t, setIndexDirty(this, t), this._planes.push(e), this.planeAdded.raiseEvent(e, t);
+};
+ClippingPlaneCollection.prototype.get = function(e) {
+ return this._planes[e];
+};
+function indexOf(e, t) {
+ const n = e.length;
+ for (let i = 0; i < n; ++i)
+ if (Plane.equals(e[i], t))
+ return i;
+ return -1;
+}
+ClippingPlaneCollection.prototype.contains = function(e) {
+ return indexOf(this._planes, e) !== -1;
+};
+ClippingPlaneCollection.prototype.remove = function(e) {
+ const t = this._planes, n = indexOf(t, e);
+ if (n === -1)
+ return !1;
+ e instanceof ClippingPlane && (e.onChangeCallback = void 0, e.index = -1);
+ const i = t.length - 1;
+ for (let r = n; r < i; ++r) {
+ const o = t[r + 1];
+ t[r] = o, o instanceof ClippingPlane && (o.index = r);
+ }
+ return this._multipleDirtyPlanes = !0, t.length = i, this.planeRemoved.raiseEvent(e, n), !0;
+};
+ClippingPlaneCollection.prototype.removeAll = function() {
+ const e = this._planes, t = e.length;
+ for (let n = 0; n < t; ++n) {
+ const i = e[n];
+ i instanceof ClippingPlane && (i.onChangeCallback = void 0, i.index = -1), this.planeRemoved.raiseEvent(i, n);
+ }
+ this._multipleDirtyPlanes = !0, this._planes = [];
+};
+const distanceEncodeScratch = new Cartesian4(), oct32EncodeScratch = new Cartesian4();
+function packPlanesAsUint8(e, t, n) {
+ const i = e._uint8View, r = e._planes;
+ let o = 0;
+ for (let s = t; s < n; ++s) {
+ const c = r[s], l = AttributeCompression.octEncodeToCartesian4(
+ c.normal,
+ oct32EncodeScratch
+ );
+ i[o] = l.x, i[o + 1] = l.y, i[o + 2] = l.z, i[o + 3] = l.w;
+ const d = Cartesian4.packFloat(
+ c.distance,
+ distanceEncodeScratch
+ );
+ i[o + 4] = d.x, i[o + 5] = d.y, i[o + 6] = d.z, i[o + 7] = d.w, o += 8;
+ }
+}
+function packPlanesAsFloats(e, t, n) {
+ const i = e._float32View, r = e._planes;
+ let o = 0;
+ for (let s = t; s < n; ++s) {
+ const c = r[s], l = c.normal;
+ i[o] = l.x, i[o + 1] = l.y, i[o + 2] = l.z, i[o + 3] = c.distance, o += 4;
+ }
+}
+function computeTextureResolution(e, t) {
+ const n = ContextLimits.maximumTextureSize;
+ return t.x = Math.min(e, n), t.y = Math.ceil(e / t.x), t;
+}
+const textureResolutionScratch$3 = new Cartesian2();
+ClippingPlaneCollection.prototype.update = function(e) {
+ let t = this._clippingPlanesTexture;
+ const n = e.context, i = ClippingPlaneCollection.useFloatTexture(n), r = i ? this.length : this.length * 2;
+ if (defined(t)) {
+ const s = t.width * t.height;
+ (s < r || r < 0.25 * s) && (t.destroy(), t = void 0, this._clippingPlanesTexture = void 0);
+ }
+ if (this.length === 0)
+ return;
+ if (!defined(t)) {
+ const s = computeTextureResolution(
+ r,
+ textureResolutionScratch$3
+ );
+ s.y *= 2, i ? (t = new Texture({
+ context: n,
+ width: s.x,
+ height: s.y,
+ pixelFormat: PixelFormat$1.RGBA,
+ pixelDatatype: PixelDatatype$1.FLOAT,
+ sampler: Sampler.NEAREST,
+ flipY: !1
+ }), this._float32View = new Float32Array(
+ s.x * s.y * 4
+ )) : (t = new Texture({
+ context: n,
+ width: s.x,
+ height: s.y,
+ pixelFormat: PixelFormat$1.RGBA,
+ pixelDatatype: PixelDatatype$1.UNSIGNED_BYTE,
+ sampler: Sampler.NEAREST,
+ flipY: !1
+ }), this._uint8View = new Uint8Array(
+ s.x * s.y * 4
+ )), this._clippingPlanesTexture = t, this._multipleDirtyPlanes = !0;
+ }
+ const o = this._dirtyIndex;
+ if (!(!this._multipleDirtyPlanes && o === -1)) {
+ if (this._multipleDirtyPlanes)
+ i ? (packPlanesAsFloats(this, 0, this._planes.length), t.copyFrom({
+ source: {
+ width: t.width,
+ height: t.height,
+ arrayBufferView: this._float32View
+ }
+ })) : (packPlanesAsUint8(this, 0, this._planes.length), t.copyFrom({
+ source: {
+ width: t.width,
+ height: t.height,
+ arrayBufferView: this._uint8View
+ }
+ }));
+ else {
+ let s = 0, c = 0;
+ i ? (c = Math.floor(o / t.width), s = Math.floor(o - c * t.width), packPlanesAsFloats(this, o, o + 1), t.copyFrom({
+ source: {
+ width: 1,
+ height: 1,
+ arrayBufferView: this._float32View
+ },
+ xOffset: s,
+ yOffset: c
+ })) : (c = Math.floor(o * 2 / t.width), s = Math.floor(
+ o * 2 - c * t.width
+ ), packPlanesAsUint8(this, o, o + 1), t.copyFrom({
+ source: {
+ width: 2,
+ height: 1,
+ arrayBufferView: this._uint8View
+ },
+ xOffset: s,
+ yOffset: c
+ }));
+ }
+ this._multipleDirtyPlanes = !1, this._dirtyIndex = -1;
+ }
+};
+const scratchMatrix$4 = new Matrix4(), scratchPlane = new Plane(Cartesian3.UNIT_X, 0);
+ClippingPlaneCollection.prototype.computeIntersectionWithBoundingVolume = function(e, t) {
+ const n = this._planes, i = n.length;
+ let r = this.modelMatrix;
+ defined(t) && (r = Matrix4.multiply(t, r, scratchMatrix$4));
+ let o = Intersect$1.INSIDE;
+ !this.unionClippingRegions && i > 0 && (o = Intersect$1.OUTSIDE);
+ for (let s = 0; s < i; ++s) {
+ const c = n[s];
+ Plane.transform(c, r, scratchPlane);
+ const l = e.intersectPlane(scratchPlane);
+ if (l === Intersect$1.INTERSECTING)
+ o = l;
+ else if (this._testIntersection(l))
+ return l;
+ }
+ return o;
+};
+ClippingPlaneCollection.setOwner = function(e, t, n) {
+ e !== t[n] && (t[n] = t[n] && t[n].destroy(), defined(e) && (e._owner = t, t[n] = e));
+};
+ClippingPlaneCollection.useFloatTexture = function(e) {
+ return e.floatingPointTexture;
+};
+ClippingPlaneCollection.getTextureResolution = function(e, t, n) {
+ const i = e.texture;
+ if (defined(i))
+ return n.x = i.width, n.y = i.height, n;
+ const r = ClippingPlaneCollection.useFloatTexture(t) ? e.length : e.length * 2, o = computeTextureResolution(r, n);
+ return o.y *= 2, o;
+};
+ClippingPlaneCollection.prototype.isDestroyed = function() {
+ return !1;
+};
+ClippingPlaneCollection.prototype.destroy = function() {
+ return this._clippingPlanesTexture = this._clippingPlanesTexture && this._clippingPlanesTexture.destroy(), destroyObject(this);
+};
+function earcut(e, t, n = 2) {
+ const i = t && t.length, r = i ? t[0] * n : e.length;
+ let o = linkedList(e, 0, r, n, !0);
+ const s = [];
+ if (!o || o.next === o.prev) return s;
+ let c, l, d;
+ if (i && (o = eliminateHoles(e, t, o, n)), e.length > 80 * n) {
+ c = 1 / 0, l = 1 / 0;
+ let f = -1 / 0, h = -1 / 0;
+ for (let p = n; p < r; p += n) {
+ const m = e[p], _ = e[p + 1];
+ m < c && (c = m), _ < l && (l = _), m > f && (f = m), _ > h && (h = _);
+ }
+ d = Math.max(f - c, h - l), d = d !== 0 ? 32767 / d : 0;
+ }
+ return earcutLinked(o, s, n, c, l, d, 0), s;
+}
+function linkedList(e, t, n, i, r) {
+ let o;
+ if (r === signedArea(e, t, n, i) > 0)
+ for (let s = t; s < n; s += i) o = insertNode(s / i | 0, e[s], e[s + 1], o);
+ else
+ for (let s = n - i; s >= t; s -= i) o = insertNode(s / i | 0, e[s], e[s + 1], o);
+ return o && equals(o, o.next) && (removeNode(o), o = o.next), o;
+}
+function filterPoints(e, t) {
+ if (!e) return e;
+ t || (t = e);
+ let n = e, i;
+ do
+ if (i = !1, !n.steiner && (equals(n, n.next) || area(n.prev, n, n.next) === 0)) {
+ if (removeNode(n), n = t = n.prev, n === n.next) break;
+ i = !0;
+ } else
+ n = n.next;
+ while (i || n !== t);
+ return t;
+}
+function earcutLinked(e, t, n, i, r, o, s) {
+ if (!e) return;
+ !s && o && indexCurve(e, i, r, o);
+ let c = e;
+ for (; e.prev !== e.next; ) {
+ const l = e.prev, d = e.next;
+ if (o ? isEarHashed(e, i, r, o) : isEar(e)) {
+ t.push(l.i, e.i, d.i), removeNode(e), e = d.next, c = d.next;
+ continue;
+ }
+ if (e = d, e === c) {
+ s ? s === 1 ? (e = cureLocalIntersections(filterPoints(e), t), earcutLinked(e, t, n, i, r, o, 2)) : s === 2 && splitEarcut(e, t, n, i, r, o) : earcutLinked(filterPoints(e), t, n, i, r, o, 1);
+ break;
+ }
+ }
+}
+function isEar(e) {
+ const t = e.prev, n = e, i = e.next;
+ if (area(t, n, i) >= 0) return !1;
+ const r = t.x, o = n.x, s = i.x, c = t.y, l = n.y, d = i.y, f = r < o ? r < s ? r : s : o < s ? o : s, h = c < l ? c < d ? c : d : l < d ? l : d, p = r > o ? r > s ? r : s : o > s ? o : s, m = c > l ? c > d ? c : d : l > d ? l : d;
+ let _ = i.next;
+ for (; _ !== t; ) {
+ if (_.x >= f && _.x <= p && _.y >= h && _.y <= m && pointInTriangle(r, c, o, l, s, d, _.x, _.y) && area(_.prev, _, _.next) >= 0) return !1;
+ _ = _.next;
+ }
+ return !0;
+}
+function isEarHashed(e, t, n, i) {
+ const r = e.prev, o = e, s = e.next;
+ if (area(r, o, s) >= 0) return !1;
+ const c = r.x, l = o.x, d = s.x, f = r.y, h = o.y, p = s.y, m = c < l ? c < d ? c : d : l < d ? l : d, _ = f < h ? f < p ? f : p : h < p ? h : p, y = c > l ? c > d ? c : d : l > d ? l : d, C = f > h ? f > p ? f : p : h > p ? h : p, T = zOrder(m, _, t, n, i), x = zOrder(y, C, t, n, i);
+ let b = e.prevZ, S = e.nextZ;
+ for (; b && b.z >= T && S && S.z <= x; ) {
+ if (b.x >= m && b.x <= y && b.y >= _ && b.y <= C && b !== r && b !== s && pointInTriangle(c, f, l, h, d, p, b.x, b.y) && area(b.prev, b, b.next) >= 0 || (b = b.prevZ, S.x >= m && S.x <= y && S.y >= _ && S.y <= C && S !== r && S !== s && pointInTriangle(c, f, l, h, d, p, S.x, S.y) && area(S.prev, S, S.next) >= 0)) return !1;
+ S = S.nextZ;
+ }
+ for (; b && b.z >= T; ) {
+ if (b.x >= m && b.x <= y && b.y >= _ && b.y <= C && b !== r && b !== s && pointInTriangle(c, f, l, h, d, p, b.x, b.y) && area(b.prev, b, b.next) >= 0) return !1;
+ b = b.prevZ;
+ }
+ for (; S && S.z <= x; ) {
+ if (S.x >= m && S.x <= y && S.y >= _ && S.y <= C && S !== r && S !== s && pointInTriangle(c, f, l, h, d, p, S.x, S.y) && area(S.prev, S, S.next) >= 0) return !1;
+ S = S.nextZ;
+ }
+ return !0;
+}
+function cureLocalIntersections(e, t) {
+ let n = e;
+ do {
+ const i = n.prev, r = n.next.next;
+ !equals(i, r) && intersects$1(i, n, n.next, r) && locallyInside(i, r) && locallyInside(r, i) && (t.push(i.i, n.i, r.i), removeNode(n), removeNode(n.next), n = e = r), n = n.next;
+ } while (n !== e);
+ return filterPoints(n);
+}
+function splitEarcut(e, t, n, i, r, o) {
+ let s = e;
+ do {
+ let c = s.next.next;
+ for (; c !== s.prev; ) {
+ if (s.i !== c.i && isValidDiagonal(s, c)) {
+ let l = splitPolygon(s, c);
+ s = filterPoints(s, s.next), l = filterPoints(l, l.next), earcutLinked(s, t, n, i, r, o, 0), earcutLinked(l, t, n, i, r, o, 0);
+ return;
+ }
+ c = c.next;
+ }
+ s = s.next;
+ } while (s !== e);
+}
+function eliminateHoles(e, t, n, i) {
+ const r = [];
+ for (let o = 0, s = t.length; o < s; o++) {
+ const c = t[o] * i, l = o < s - 1 ? t[o + 1] * i : e.length, d = linkedList(e, c, l, i, !1);
+ d === d.next && (d.steiner = !0), r.push(getLeftmost(d));
+ }
+ r.sort(compareX);
+ for (let o = 0; o < r.length; o++)
+ n = eliminateHole(r[o], n);
+ return n;
+}
+function compareX(e, t) {
+ return e.x - t.x;
+}
+function eliminateHole(e, t) {
+ const n = findHoleBridge(e, t);
+ if (!n)
+ return t;
+ const i = splitPolygon(n, e);
+ return filterPoints(i, i.next), filterPoints(n, n.next);
+}
+function findHoleBridge(e, t) {
+ let n = t;
+ const i = e.x, r = e.y;
+ let o = -1 / 0, s;
+ do {
+ if (r <= n.y && r >= n.next.y && n.next.y !== n.y) {
+ const h = n.x + (r - n.y) * (n.next.x - n.x) / (n.next.y - n.y);
+ if (h <= i && h > o && (o = h, s = n.x < n.next.x ? n : n.next, h === i))
+ return s;
+ }
+ n = n.next;
+ } while (n !== t);
+ if (!s) return null;
+ const c = s, l = s.x, d = s.y;
+ let f = 1 / 0;
+ n = s;
+ do {
+ if (i >= n.x && n.x >= l && i !== n.x && pointInTriangle(r < d ? i : o, r, l, d, r < d ? o : i, r, n.x, n.y)) {
+ const h = Math.abs(r - n.y) / (i - n.x);
+ locallyInside(n, e) && (h < f || h === f && (n.x > s.x || n.x === s.x && sectorContainsSector(s, n))) && (s = n, f = h);
+ }
+ n = n.next;
+ } while (n !== c);
+ return s;
+}
+function sectorContainsSector(e, t) {
+ return area(e.prev, e, t.prev) < 0 && area(t.next, e, e.next) < 0;
+}
+function indexCurve(e, t, n, i) {
+ let r = e;
+ do
+ r.z === 0 && (r.z = zOrder(r.x, r.y, t, n, i)), r.prevZ = r.prev, r.nextZ = r.next, r = r.next;
+ while (r !== e);
+ r.prevZ.nextZ = null, r.prevZ = null, sortLinked(r);
+}
+function sortLinked(e) {
+ let t, n = 1;
+ do {
+ let i = e, r;
+ e = null;
+ let o = null;
+ for (t = 0; i; ) {
+ t++;
+ let s = i, c = 0;
+ for (let d = 0; d < n && (c++, s = s.nextZ, !!s); d++)
+ ;
+ let l = n;
+ for (; c > 0 || l > 0 && s; )
+ c !== 0 && (l === 0 || !s || i.z <= s.z) ? (r = i, i = i.nextZ, c--) : (r = s, s = s.nextZ, l--), o ? o.nextZ = r : e = r, r.prevZ = o, o = r;
+ i = s;
+ }
+ o.nextZ = null, n *= 2;
+ } while (t > 1);
+ return e;
+}
+function zOrder(e, t, n, i, r) {
+ return e = (e - n) * r | 0, t = (t - i) * r | 0, e = (e | e << 8) & 16711935, e = (e | e << 4) & 252645135, e = (e | e << 2) & 858993459, e = (e | e << 1) & 1431655765, t = (t | t << 8) & 16711935, t = (t | t << 4) & 252645135, t = (t | t << 2) & 858993459, t = (t | t << 1) & 1431655765, e | t << 1;
+}
+function getLeftmost(e) {
+ let t = e, n = e;
+ do
+ (t.x < n.x || t.x === n.x && t.y < n.y) && (n = t), t = t.next;
+ while (t !== e);
+ return n;
+}
+function pointInTriangle(e, t, n, i, r, o, s, c) {
+ return (r - s) * (t - c) >= (e - s) * (o - c) && (e - s) * (i - c) >= (n - s) * (t - c) && (n - s) * (o - c) >= (r - s) * (i - c);
+}
+function isValidDiagonal(e, t) {
+ return e.next.i !== t.i && e.prev.i !== t.i && !intersectsPolygon(e, t) && // dones't intersect other edges
+ (locallyInside(e, t) && locallyInside(t, e) && middleInside(e, t) && // locally visible
+ (area(e.prev, e, t.prev) || area(e, t.prev, t)) || // does not create opposite-facing sectors
+ equals(e, t) && area(e.prev, e, e.next) > 0 && area(t.prev, t, t.next) > 0);
+}
+function area(e, t, n) {
+ return (t.y - e.y) * (n.x - t.x) - (t.x - e.x) * (n.y - t.y);
+}
+function equals(e, t) {
+ return e.x === t.x && e.y === t.y;
+}
+function intersects$1(e, t, n, i) {
+ const r = sign(area(e, t, n)), o = sign(area(e, t, i)), s = sign(area(n, i, e)), c = sign(area(n, i, t));
+ return !!(r !== o && s !== c || r === 0 && onSegment(e, n, t) || o === 0 && onSegment(e, i, t) || s === 0 && onSegment(n, e, i) || c === 0 && onSegment(n, t, i));
+}
+function onSegment(e, t, n) {
+ return t.x <= Math.max(e.x, n.x) && t.x >= Math.min(e.x, n.x) && t.y <= Math.max(e.y, n.y) && t.y >= Math.min(e.y, n.y);
+}
+function sign(e) {
+ return e > 0 ? 1 : e < 0 ? -1 : 0;
+}
+function intersectsPolygon(e, t) {
+ let n = e;
+ do {
+ if (n.i !== e.i && n.next.i !== e.i && n.i !== t.i && n.next.i !== t.i && intersects$1(n, n.next, e, t)) return !0;
+ n = n.next;
+ } while (n !== e);
+ return !1;
+}
+function locallyInside(e, t) {
+ return area(e.prev, e, e.next) < 0 ? area(e, t, e.next) >= 0 && area(e, e.prev, t) >= 0 : area(e, t, e.prev) < 0 || area(e, e.next, t) < 0;
+}
+function middleInside(e, t) {
+ let n = e, i = !1;
+ const r = (e.x + t.x) / 2, o = (e.y + t.y) / 2;
+ do
+ n.y > o != n.next.y > o && n.next.y !== n.y && r < (n.next.x - n.x) * (o - n.y) / (n.next.y - n.y) + n.x && (i = !i), n = n.next;
+ while (n !== e);
+ return i;
+}
+function splitPolygon(e, t) {
+ const n = createNode$1(e.i, e.x, e.y), i = createNode$1(t.i, t.x, t.y), r = e.next, o = t.prev;
+ return e.next = t, t.prev = e, n.next = r, r.prev = n, i.next = n, n.prev = i, o.next = i, i.prev = o, i;
+}
+function insertNode(e, t, n, i) {
+ const r = createNode$1(e, t, n);
+ return i ? (r.next = i.next, r.prev = i, i.next.prev = r, i.next = r) : (r.prev = r, r.next = r), r;
+}
+function removeNode(e) {
+ e.next.prev = e.prev, e.prev.next = e.next, e.prevZ && (e.prevZ.nextZ = e.nextZ), e.nextZ && (e.nextZ.prevZ = e.prevZ);
+}
+function createNode$1(e, t, n) {
+ return {
+ i: e,
+ // vertex index in coordinates array
+ x: t,
+ y: n,
+ // vertex coordinates
+ prev: null,
+ // previous and next vertex nodes in a polygon ring
+ next: null,
+ z: 0,
+ // z-order curve value
+ prevZ: null,
+ // previous and next nodes in z-order
+ nextZ: null,
+ steiner: !1
+ // indicates whether this is a steiner point
+ };
+}
+function signedArea(e, t, n, i) {
+ let r = 0;
+ for (let o = t, s = n - i; o < n; o += i)
+ r += (e[s] - e[o]) * (e[o + 1] + e[s + 1]), s = o;
+ return r;
+}
+const scaleToGeodeticHeightN = new Cartesian3(), scaleToGeodeticHeightP = new Cartesian3(), PolygonPipeline = {};
+PolygonPipeline.computeArea2D = function(e) {
+ const t = e.length;
+ let n = 0;
+ for (let i = t - 1, r = 0; r < t; i = r++) {
+ const o = e[i], s = e[r];
+ n += o.x * s.y - s.x * o.y;
+ }
+ return n * 0.5;
+};
+PolygonPipeline.computeWindingOrder2D = function(e) {
+ return PolygonPipeline.computeArea2D(e) > 0 ? WindingOrder$1.COUNTER_CLOCKWISE : WindingOrder$1.CLOCKWISE;
+};
+PolygonPipeline.triangulate = function(e, t) {
+ const n = Cartesian2.packArray(e);
+ return earcut(n, t, 2);
+};
+const subdivisionV0Scratch = new Cartesian3(), subdivisionV1Scratch = new Cartesian3(), subdivisionV2Scratch = new Cartesian3(), subdivisionS0Scratch = new Cartesian3(), subdivisionS1Scratch = new Cartesian3(), subdivisionS2Scratch = new Cartesian3(), subdivisionMidScratch = new Cartesian3(), subdivisionT0Scratch = new Cartesian2(), subdivisionT1Scratch = new Cartesian2(), subdivisionT2Scratch = new Cartesian2(), subdivisionTexcoordMidScratch = new Cartesian2();
+PolygonPipeline.computeSubdivision = function(e, t, n, i, r) {
+ r = defaultValue(r, CesiumMath.RADIANS_PER_DEGREE);
+ const o = defined(i), s = n.slice(0);
+ let c;
+ const l = t.length, d = new Array(l * 3), f = new Array(l * 2);
+ let h = 0, p = 0;
+ for (c = 0; c < l; c++) {
+ const b = t[c];
+ if (d[h++] = b.x, d[h++] = b.y, d[h++] = b.z, o) {
+ const S = i[c];
+ f[p++] = S.x, f[p++] = S.y;
+ }
+ }
+ const m = [], _ = {}, y = e.maximumRadius, C = CesiumMath.chordLength(r, y), T = C * C;
+ for (; s.length > 0; ) {
+ const b = s.pop(), S = s.pop(), E = s.pop(), A = Cartesian3.fromArray(
+ d,
+ E * 3,
+ subdivisionV0Scratch
+ ), D = Cartesian3.fromArray(
+ d,
+ S * 3,
+ subdivisionV1Scratch
+ ), P = Cartesian3.fromArray(
+ d,
+ b * 3,
+ subdivisionV2Scratch
+ );
+ let I, M, R;
+ o && (I = Cartesian2.fromArray(
+ f,
+ E * 2,
+ subdivisionT0Scratch
+ ), M = Cartesian2.fromArray(
+ f,
+ S * 2,
+ subdivisionT1Scratch
+ ), R = Cartesian2.fromArray(
+ f,
+ b * 2,
+ subdivisionT2Scratch
+ ));
+ const L = Cartesian3.multiplyByScalar(
+ Cartesian3.normalize(A, subdivisionS0Scratch),
+ y,
+ subdivisionS0Scratch
+ ), g = Cartesian3.multiplyByScalar(
+ Cartesian3.normalize(D, subdivisionS1Scratch),
+ y,
+ subdivisionS1Scratch
+ ), w = Cartesian3.multiplyByScalar(
+ Cartesian3.normalize(P, subdivisionS2Scratch),
+ y,
+ subdivisionS2Scratch
+ ), O = Cartesian3.magnitudeSquared(
+ Cartesian3.subtract(L, g, subdivisionMidScratch)
+ ), N = Cartesian3.magnitudeSquared(
+ Cartesian3.subtract(g, w, subdivisionMidScratch)
+ ), F = Cartesian3.magnitudeSquared(
+ Cartesian3.subtract(w, L, subdivisionMidScratch)
+ ), B = Math.max(O, N, F);
+ let V, U, k;
+ B > T ? O === B ? (V = `${Math.min(E, S)} ${Math.max(E, S)}`, c = _[V], defined(c) || (U = Cartesian3.add(A, D, subdivisionMidScratch), Cartesian3.multiplyByScalar(U, 0.5, U), d.push(U.x, U.y, U.z), c = d.length / 3 - 1, _[V] = c, o && (k = Cartesian2.add(I, M, subdivisionTexcoordMidScratch), Cartesian2.multiplyByScalar(k, 0.5, k), f.push(k.x, k.y))), s.push(E, c, b), s.push(c, S, b)) : N === B ? (V = `${Math.min(S, b)} ${Math.max(S, b)}`, c = _[V], defined(c) || (U = Cartesian3.add(D, P, subdivisionMidScratch), Cartesian3.multiplyByScalar(U, 0.5, U), d.push(U.x, U.y, U.z), c = d.length / 3 - 1, _[V] = c, o && (k = Cartesian2.add(M, R, subdivisionTexcoordMidScratch), Cartesian2.multiplyByScalar(k, 0.5, k), f.push(k.x, k.y))), s.push(S, c, E), s.push(c, b, E)) : F === B && (V = `${Math.min(b, E)} ${Math.max(b, E)}`, c = _[V], defined(c) || (U = Cartesian3.add(P, A, subdivisionMidScratch), Cartesian3.multiplyByScalar(U, 0.5, U), d.push(U.x, U.y, U.z), c = d.length / 3 - 1, _[V] = c, o && (k = Cartesian2.add(R, I, subdivisionTexcoordMidScratch), Cartesian2.multiplyByScalar(k, 0.5, k), f.push(k.x, k.y))), s.push(b, c, S), s.push(c, E, S)) : (m.push(E), m.push(S), m.push(b));
+ }
+ const x = {
+ attributes: {
+ position: new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.DOUBLE,
+ componentsPerAttribute: 3,
+ values: d
+ })
+ },
+ indices: m,
+ primitiveType: PrimitiveType$1.TRIANGLES
+ };
+ return o && (x.attributes.st = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 2,
+ values: f
+ })), new Geometry(x);
+};
+const subdivisionC0Scratch = new Cartographic(), subdivisionC1Scratch = new Cartographic(), subdivisionC2Scratch = new Cartographic(), subdivisionCartographicScratch = new Cartographic();
+PolygonPipeline.computeRhumbLineSubdivision = function(e, t, n, i, r) {
+ r = defaultValue(r, CesiumMath.RADIANS_PER_DEGREE);
+ const o = defined(i), s = n.slice(0);
+ let c;
+ const l = t.length, d = new Array(l * 3), f = new Array(l * 2);
+ let h = 0, p = 0;
+ for (c = 0; c < l; c++) {
+ const E = t[c];
+ if (d[h++] = E.x, d[h++] = E.y, d[h++] = E.z, o) {
+ const A = i[c];
+ f[p++] = A.x, f[p++] = A.y;
+ }
+ }
+ const m = [], _ = {}, y = e.maximumRadius, C = CesiumMath.chordLength(r, y), T = new EllipsoidRhumbLine(void 0, void 0, e), x = new EllipsoidRhumbLine(void 0, void 0, e), b = new EllipsoidRhumbLine(void 0, void 0, e);
+ for (; s.length > 0; ) {
+ const E = s.pop(), A = s.pop(), D = s.pop(), P = Cartesian3.fromArray(
+ d,
+ D * 3,
+ subdivisionV0Scratch
+ ), I = Cartesian3.fromArray(
+ d,
+ A * 3,
+ subdivisionV1Scratch
+ ), M = Cartesian3.fromArray(
+ d,
+ E * 3,
+ subdivisionV2Scratch
+ );
+ let R, L, g;
+ o && (R = Cartesian2.fromArray(
+ f,
+ D * 2,
+ subdivisionT0Scratch
+ ), L = Cartesian2.fromArray(
+ f,
+ A * 2,
+ subdivisionT1Scratch
+ ), g = Cartesian2.fromArray(
+ f,
+ E * 2,
+ subdivisionT2Scratch
+ ));
+ const w = e.cartesianToCartographic(P, subdivisionC0Scratch), O = e.cartesianToCartographic(I, subdivisionC1Scratch), N = e.cartesianToCartographic(M, subdivisionC2Scratch);
+ T.setEndPoints(w, O);
+ const F = T.surfaceDistance;
+ x.setEndPoints(O, N);
+ const B = x.surfaceDistance;
+ b.setEndPoints(N, w);
+ const V = b.surfaceDistance, U = Math.max(F, B, V);
+ let k, $, G, q, z;
+ U > C ? F === U ? (k = `${Math.min(D, A)} ${Math.max(D, A)}`, c = _[k], defined(c) || ($ = T.interpolateUsingFraction(
+ 0.5,
+ subdivisionCartographicScratch
+ ), G = (w.height + O.height) * 0.5, q = Cartesian3.fromRadians(
+ $.longitude,
+ $.latitude,
+ G,
+ e,
+ subdivisionMidScratch
+ ), d.push(
+ q.x,
+ q.y,
+ q.z
+ ), c = d.length / 3 - 1, _[k] = c, o && (z = Cartesian2.add(R, L, subdivisionTexcoordMidScratch), Cartesian2.multiplyByScalar(z, 0.5, z), f.push(z.x, z.y))), s.push(D, c, E), s.push(c, A, E)) : B === U ? (k = `${Math.min(A, E)} ${Math.max(A, E)}`, c = _[k], defined(c) || ($ = x.interpolateUsingFraction(
+ 0.5,
+ subdivisionCartographicScratch
+ ), G = (O.height + N.height) * 0.5, q = Cartesian3.fromRadians(
+ $.longitude,
+ $.latitude,
+ G,
+ e,
+ subdivisionMidScratch
+ ), d.push(
+ q.x,
+ q.y,
+ q.z
+ ), c = d.length / 3 - 1, _[k] = c, o && (z = Cartesian2.add(L, g, subdivisionTexcoordMidScratch), Cartesian2.multiplyByScalar(z, 0.5, z), f.push(z.x, z.y))), s.push(A, c, D), s.push(c, E, D)) : V === U && (k = `${Math.min(E, D)} ${Math.max(E, D)}`, c = _[k], defined(c) || ($ = b.interpolateUsingFraction(
+ 0.5,
+ subdivisionCartographicScratch
+ ), G = (N.height + w.height) * 0.5, q = Cartesian3.fromRadians(
+ $.longitude,
+ $.latitude,
+ G,
+ e,
+ subdivisionMidScratch
+ ), d.push(
+ q.x,
+ q.y,
+ q.z
+ ), c = d.length / 3 - 1, _[k] = c, o && (z = Cartesian2.add(g, R, subdivisionTexcoordMidScratch), Cartesian2.multiplyByScalar(z, 0.5, z), f.push(z.x, z.y))), s.push(E, c, A), s.push(c, D, A)) : (m.push(D), m.push(A), m.push(E));
+ }
+ const S = {
+ attributes: {
+ position: new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.DOUBLE,
+ componentsPerAttribute: 3,
+ values: d
+ })
+ },
+ indices: m,
+ primitiveType: PrimitiveType$1.TRIANGLES
+ };
+ return o && (S.attributes.st = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 2,
+ values: f
+ })), new Geometry(S);
+};
+PolygonPipeline.scaleToGeodeticHeight = function(e, t, n, i) {
+ n = defaultValue(n, Ellipsoid.default);
+ let r = scaleToGeodeticHeightN, o = scaleToGeodeticHeightP;
+ if (t = defaultValue(t, 0), i = defaultValue(i, !0), defined(e)) {
+ const s = e.length;
+ for (let c = 0; c < s; c += 3)
+ Cartesian3.fromArray(e, c, o), i && (o = n.scaleToGeodeticSurface(o, o)), t !== 0 && (r = n.geodeticSurfaceNormal(o, r), Cartesian3.multiplyByScalar(r, t, r), Cartesian3.add(o, r, o)), e[c] = o.x, e[c + 1] = o.y, e[c + 2] = o.z;
+ }
+ return e;
+};
+function Queue() {
+ this._array = [], this._offset = 0, this._length = 0;
+}
+Object.defineProperties(Queue.prototype, {
+ /**
+ * The length of the queue.
+ *
+ * @memberof Queue.prototype
+ *
+ * @type {number}
+ * @readonly
+ */
+ length: {
+ get: function() {
+ return this._length;
+ }
+ }
+});
+Queue.prototype.enqueue = function(e) {
+ this._array.push(e), this._length++;
+};
+Queue.prototype.dequeue = function() {
+ if (this._length === 0)
+ return;
+ const e = this._array;
+ let t = this._offset;
+ const n = e[t];
+ return e[t] = void 0, t++, t > 10 && t * 2 > e.length && (this._array = e.slice(t), t = 0), this._offset = t, this._length--, n;
+};
+Queue.prototype.peek = function() {
+ if (this._length !== 0)
+ return this._array[this._offset];
+};
+Queue.prototype.contains = function(e) {
+ return this._array.indexOf(e) !== -1;
+};
+Queue.prototype.clear = function() {
+ this._array.length = this._offset = this._length = 0;
+};
+Queue.prototype.sort = function(e) {
+ this._offset > 0 && (this._array = this._array.slice(this._offset), this._offset = 0), this._array.sort(e);
+};
+const PolygonGeometryLibrary = {};
+PolygonGeometryLibrary.computeHierarchyPackedLength = function(e, t) {
+ let n = 0;
+ const i = [e];
+ for (; i.length > 0; ) {
+ const r = i.pop();
+ if (!defined(r))
+ continue;
+ n += 2;
+ const o = r.positions, s = r.holes;
+ if (defined(o) && o.length > 0 && (n += o.length * t.packedLength), defined(s)) {
+ const c = s.length;
+ for (let l = 0; l < c; ++l)
+ i.push(s[l]);
+ }
+ }
+ return n;
+};
+PolygonGeometryLibrary.packPolygonHierarchy = function(e, t, n, i) {
+ const r = [e];
+ for (; r.length > 0; ) {
+ const o = r.pop();
+ if (!defined(o))
+ continue;
+ const s = o.positions, c = o.holes;
+ if (t[n++] = defined(s) ? s.length : 0, t[n++] = defined(c) ? c.length : 0, defined(s)) {
+ const l = s.length;
+ for (let d = 0; d < l; ++d, n += i.packedLength)
+ i.pack(s[d], t, n);
+ }
+ if (defined(c)) {
+ const l = c.length;
+ for (let d = 0; d < l; ++d)
+ r.push(c[d]);
+ }
+ }
+ return n;
+};
+PolygonGeometryLibrary.unpackPolygonHierarchy = function(e, t, n) {
+ const i = e[t++], r = e[t++], o = new Array(i), s = r > 0 ? new Array(r) : void 0;
+ for (let c = 0; c < i; ++c, t += n.packedLength)
+ o[c] = n.unpack(e, t);
+ for (let c = 0; c < r; ++c)
+ s[c] = PolygonGeometryLibrary.unpackPolygonHierarchy(
+ e,
+ t,
+ n
+ ), t = s[c].startingIndex, delete s[c].startingIndex;
+ return {
+ positions: o,
+ holes: s,
+ startingIndex: t
+ };
+};
+const distance2DScratch = new Cartesian2();
+function getPointAtDistance2D(e, t, n, i) {
+ return Cartesian2.subtract(t, e, distance2DScratch), Cartesian2.multiplyByScalar(
+ distance2DScratch,
+ n / i,
+ distance2DScratch
+ ), Cartesian2.add(e, distance2DScratch, distance2DScratch), [distance2DScratch.x, distance2DScratch.y];
+}
+const distanceScratch = new Cartesian3();
+function getPointAtDistance(e, t, n, i) {
+ return Cartesian3.subtract(t, e, distanceScratch), Cartesian3.multiplyByScalar(
+ distanceScratch,
+ n / i,
+ distanceScratch
+ ), Cartesian3.add(e, distanceScratch, distanceScratch), [distanceScratch.x, distanceScratch.y, distanceScratch.z];
+}
+PolygonGeometryLibrary.subdivideLineCount = function(e, t, n) {
+ const r = Cartesian3.distance(e, t) / n, o = Math.max(0, Math.ceil(CesiumMath.log2(r)));
+ return Math.pow(2, o);
+};
+const scratchCartographic0$1 = new Cartographic(), scratchCartographic1$2 = new Cartographic(), scratchCartographic2$1 = new Cartographic(), scratchCartesian0$1 = new Cartesian3(), scratchRhumbLine = new EllipsoidRhumbLine();
+PolygonGeometryLibrary.subdivideRhumbLineCount = function(e, t, n, i) {
+ const r = e.cartesianToCartographic(t, scratchCartographic0$1), o = e.cartesianToCartographic(n, scratchCartographic1$2), c = new EllipsoidRhumbLine(r, o, e).surfaceDistance / i, l = Math.max(0, Math.ceil(CesiumMath.log2(c)));
+ return Math.pow(2, l);
+};
+PolygonGeometryLibrary.subdivideTexcoordLine = function(e, t, n, i, r, o) {
+ const s = PolygonGeometryLibrary.subdivideLineCount(
+ n,
+ i,
+ r
+ ), c = Cartesian2.distance(e, t), l = c / s, d = o;
+ d.length = s * 2;
+ let f = 0;
+ for (let h = 0; h < s; h++) {
+ const p = getPointAtDistance2D(e, t, h * l, c);
+ d[f++] = p[0], d[f++] = p[1];
+ }
+ return d;
+};
+PolygonGeometryLibrary.subdivideLine = function(e, t, n, i) {
+ const r = PolygonGeometryLibrary.subdivideLineCount(
+ e,
+ t,
+ n
+ ), o = Cartesian3.distance(e, t), s = o / r;
+ defined(i) || (i = []);
+ const c = i;
+ c.length = r * 3;
+ let l = 0;
+ for (let d = 0; d < r; d++) {
+ const f = getPointAtDistance(e, t, d * s, o);
+ c[l++] = f[0], c[l++] = f[1], c[l++] = f[2];
+ }
+ return c;
+};
+PolygonGeometryLibrary.subdivideTexcoordRhumbLine = function(e, t, n, i, r, o, s) {
+ const c = n.cartesianToCartographic(i, scratchCartographic0$1), l = n.cartesianToCartographic(r, scratchCartographic1$2);
+ scratchRhumbLine.setEndPoints(c, l);
+ const d = scratchRhumbLine.surfaceDistance / o, f = Math.max(0, Math.ceil(CesiumMath.log2(d))), h = Math.pow(2, f), p = Cartesian2.distance(e, t), m = p / h, _ = s;
+ _.length = h * 2;
+ let y = 0;
+ for (let C = 0; C < h; C++) {
+ const T = getPointAtDistance2D(e, t, C * m, p);
+ _[y++] = T[0], _[y++] = T[1];
+ }
+ return _;
+};
+PolygonGeometryLibrary.subdivideRhumbLine = function(e, t, n, i, r) {
+ const o = e.cartesianToCartographic(t, scratchCartographic0$1), s = e.cartesianToCartographic(n, scratchCartographic1$2), c = new EllipsoidRhumbLine(o, s, e), l = c.surfaceDistance / i, d = Math.max(0, Math.ceil(CesiumMath.log2(l))), f = Math.pow(2, d), h = c.surfaceDistance / f;
+ defined(r) || (r = []);
+ const p = r;
+ p.length = f * 3;
+ let m = 0;
+ for (let _ = 0; _ < f; _++) {
+ const y = c.interpolateUsingSurfaceDistance(
+ _ * h,
+ scratchCartographic2$1
+ ), C = e.cartographicToCartesian(y, scratchCartesian0$1);
+ p[m++] = C.x, p[m++] = C.y, p[m++] = C.z;
+ }
+ return p;
+};
+const scaleToGeodeticHeightN1 = new Cartesian3(), scaleToGeodeticHeightN2 = new Cartesian3(), scaleToGeodeticHeightP1 = new Cartesian3(), scaleToGeodeticHeightP2 = new Cartesian3();
+PolygonGeometryLibrary.scaleToGeodeticHeightExtruded = function(e, t, n, i, r) {
+ i = defaultValue(i, Ellipsoid.default);
+ const o = scaleToGeodeticHeightN1;
+ let s = scaleToGeodeticHeightN2;
+ const c = scaleToGeodeticHeightP1;
+ let l = scaleToGeodeticHeightP2;
+ if (defined(e) && defined(e.attributes) && defined(e.attributes.position)) {
+ const d = e.attributes.position.values, f = d.length / 2;
+ for (let h = 0; h < f; h += 3)
+ Cartesian3.fromArray(d, h, c), i.geodeticSurfaceNormal(c, o), l = i.scaleToGeodeticSurface(c, l), s = Cartesian3.multiplyByScalar(o, n, s), s = Cartesian3.add(l, s, s), d[h + f] = s.x, d[h + 1 + f] = s.y, d[h + 2 + f] = s.z, r && (l = Cartesian3.clone(c, l)), s = Cartesian3.multiplyByScalar(o, t, s), s = Cartesian3.add(l, s, s), d[h] = s.x, d[h + 1] = s.y, d[h + 2] = s.z;
+ }
+ return e;
+};
+PolygonGeometryLibrary.polygonOutlinesFromHierarchy = function(e, t, n) {
+ const i = [], r = new Queue();
+ r.enqueue(e);
+ let o, s, c;
+ for (; r.length !== 0; ) {
+ const l = r.dequeue();
+ let d = l.positions;
+ if (t)
+ for (c = d.length, o = 0; o < c; o++)
+ n.scaleToGeodeticSurface(d[o], d[o]);
+ if (d = arrayRemoveDuplicates(
+ d,
+ Cartesian3.equalsEpsilon,
+ !0
+ ), d.length < 3)
+ continue;
+ const f = l.holes ? l.holes.length : 0;
+ for (o = 0; o < f; o++) {
+ const h = l.holes[o];
+ let p = h.positions;
+ if (t)
+ for (c = p.length, s = 0; s < c; ++s)
+ n.scaleToGeodeticSurface(p[s], p[s]);
+ if (p = arrayRemoveDuplicates(
+ p,
+ Cartesian3.equalsEpsilon,
+ !0
+ ), p.length < 3)
+ continue;
+ i.push(p);
+ let m = 0;
+ for (defined(h.holes) && (m = h.holes.length), s = 0; s < m; s++)
+ r.enqueue(h.holes[s]);
+ }
+ i.push(d);
+ }
+ return i;
+};
+const scratchRhumbIntersection = new Cartographic();
+function computeEquatorIntersectionRhumb(e, t, n) {
+ const i = n.cartesianToCartographic(e, scratchCartographic0$1), r = n.cartesianToCartographic(t, scratchCartographic1$2);
+ if (Math.sign(i.latitude) === Math.sign(r.latitude))
+ return;
+ scratchRhumbLine.setEndPoints(i, r);
+ const o = scratchRhumbLine.findIntersectionWithLatitude(
+ 0,
+ scratchRhumbIntersection
+ );
+ if (!defined(o))
+ return;
+ let s = Math.min(i.longitude, r.longitude), c = Math.max(i.longitude, r.longitude);
+ if (Math.abs(c - s) > CesiumMath.PI) {
+ const l = s;
+ s = c, c = l;
+ }
+ if (!(o.longitude < s || o.longitude > c))
+ return n.cartographicToCartesian(o);
+}
+function computeEquatorIntersection(e, t, n, i) {
+ if (i === ArcType$1.RHUMB)
+ return computeEquatorIntersectionRhumb(e, t, n);
+ const r = IntersectionTests.lineSegmentPlane(
+ e,
+ t,
+ Plane.ORIGIN_XY_PLANE
+ );
+ if (defined(r))
+ return n.scaleToGeodeticSurface(r, r);
+}
+const scratchCartographic$i = new Cartographic();
+function computeEdgesOnPlane(e, t, n) {
+ const i = [];
+ let r, o, s, c, l, d = 0;
+ for (; d < e.length; ) {
+ r = e[d], o = e[(d + 1) % e.length], s = CesiumMath.sign(r.z), c = CesiumMath.sign(o.z);
+ const f = (h) => t.cartesianToCartographic(
+ h,
+ scratchCartographic$i
+ ).longitude;
+ if (s === 0)
+ i.push({
+ position: d,
+ type: s,
+ visited: !1,
+ next: c,
+ theta: f(r)
+ });
+ else if (c !== 0) {
+ if (l = computeEquatorIntersection(
+ r,
+ o,
+ t,
+ n
+ ), ++d, !defined(l))
+ continue;
+ e.splice(d, 0, l), i.push({
+ position: d,
+ type: s,
+ visited: !1,
+ next: c,
+ theta: f(l)
+ });
+ }
+ ++d;
+ }
+ return i;
+}
+function wirePolygon(e, t, n, i, r, o, s) {
+ const c = [];
+ let l = o;
+ const d = (h) => (p) => p.position === h, f = [];
+ do {
+ const h = n[l];
+ c.push(h);
+ const p = i.findIndex(d(l)), m = i[p];
+ if (!defined(m)) {
+ ++l;
+ continue;
+ }
+ const { visited: _, type: y, next: C } = m;
+ if (m.visited = !0, y === 0) {
+ if (C === 0) {
+ const S = i[p - (s ? 1 : -1)];
+ if ((S == null ? void 0 : S.position) === l + 1)
+ S.visited = !0;
+ else {
+ ++l;
+ continue;
+ }
+ }
+ if (!_ && s && C > 0 || o === l && !s && C < 0) {
+ ++l;
+ continue;
+ }
+ }
+ if (!(s ? y >= 0 : y <= 0)) {
+ ++l;
+ continue;
+ }
+ _ || f.push(l);
+ const x = p + (s ? 1 : -1), b = i[x];
+ if (!defined(b)) {
+ ++l;
+ continue;
+ }
+ l = b.position;
+ } while (l < n.length && l >= 0 && l !== o && c.length < n.length);
+ e.splice(t, r, c);
+ for (const h of f)
+ t = wirePolygon(
+ e,
+ ++t,
+ n,
+ i,
+ 0,
+ h,
+ !s
+ );
+ return t;
+}
+PolygonGeometryLibrary.splitPolygonsOnEquator = function(e, t, n, i) {
+ defined(i) || (i = []), i.splice(0, 0, ...e), i.length = e.length;
+ let r = 0;
+ for (; r < i.length; ) {
+ const o = i[r], s = o.slice();
+ if (o.length < 3) {
+ i[r] = s, ++r;
+ continue;
+ }
+ const c = computeEdgesOnPlane(s, t, n);
+ if (s.length === o.length || c.length <= 1) {
+ i[r] = s, ++r;
+ continue;
+ }
+ c.sort((d, f) => d.theta - f.theta);
+ const l = s[0].z >= 0;
+ r = wirePolygon(
+ i,
+ r,
+ s,
+ c,
+ 1,
+ 0,
+ l
+ );
+ }
+ return i;
+};
+PolygonGeometryLibrary.polygonsFromHierarchy = function(e, t, n, i, r, o) {
+ const s = [], c = [], l = new Queue();
+ l.enqueue(e);
+ let d = defined(o);
+ for (; l.length !== 0; ) {
+ const f = l.dequeue();
+ let h = f.positions;
+ const p = f.holes;
+ let m, _;
+ if (i)
+ for (_ = h.length, m = 0; m < _; m++)
+ r.scaleToGeodeticSurface(h[m], h[m]);
+ if (t || (h = arrayRemoveDuplicates(
+ h,
+ Cartesian3.equalsEpsilon,
+ !0
+ )), h.length < 3)
+ continue;
+ let y = n(h);
+ if (!defined(y))
+ continue;
+ const C = [];
+ let T = PolygonPipeline.computeWindingOrder2D(
+ y
+ );
+ if (T === WindingOrder$1.CLOCKWISE && (y.reverse(), h = h.slice().reverse()), d) {
+ d = !1;
+ let A = [h];
+ if (A = o(A, A), A.length > 1) {
+ for (const D of A)
+ l.enqueue(new PolygonHierarchy(D, p));
+ continue;
+ }
+ }
+ let x = h.slice();
+ const b = defined(p) ? p.length : 0, S = [];
+ let E;
+ for (m = 0; m < b; m++) {
+ const A = p[m];
+ let D = A.positions;
+ if (i)
+ for (_ = D.length, E = 0; E < _; ++E)
+ r.scaleToGeodeticSurface(D[E], D[E]);
+ if (t || (D = arrayRemoveDuplicates(
+ D,
+ Cartesian3.equalsEpsilon,
+ !0
+ )), D.length < 3)
+ continue;
+ const P = n(D);
+ if (!defined(P))
+ continue;
+ T = PolygonPipeline.computeWindingOrder2D(
+ P
+ ), T === WindingOrder$1.CLOCKWISE && (P.reverse(), D = D.slice().reverse()), S.push(D), C.push(x.length), x = x.concat(D), y = y.concat(P);
+ let I = 0;
+ for (defined(A.holes) && (I = A.holes.length), E = 0; E < I; E++)
+ l.enqueue(A.holes[E]);
+ }
+ s.push({
+ outerRing: h,
+ holes: S
+ }), c.push({
+ positions: x,
+ positions2D: y,
+ holes: C
+ });
+ }
+ return {
+ hierarchy: s,
+ polygons: c
+ };
+};
+const computeBoundingRectangleCartesian2 = new Cartesian2(), computeBoundingRectangleCartesian3 = new Cartesian3(), computeBoundingRectangleQuaternion = new Quaternion(), computeBoundingRectangleMatrix3 = new Matrix3();
+PolygonGeometryLibrary.computeBoundingRectangle = function(e, t, n, i, r) {
+ const o = Quaternion.fromAxisAngle(
+ e,
+ i,
+ computeBoundingRectangleQuaternion
+ ), s = Matrix3.fromQuaternion(
+ o,
+ computeBoundingRectangleMatrix3
+ );
+ let c = Number.POSITIVE_INFINITY, l = Number.NEGATIVE_INFINITY, d = Number.POSITIVE_INFINITY, f = Number.NEGATIVE_INFINITY;
+ const h = n.length;
+ for (let p = 0; p < h; ++p) {
+ const m = Cartesian3.clone(
+ n[p],
+ computeBoundingRectangleCartesian3
+ );
+ Matrix3.multiplyByVector(s, m, m);
+ const _ = t(m, computeBoundingRectangleCartesian2);
+ defined(_) && (c = Math.min(c, _.x), l = Math.max(l, _.x), d = Math.min(d, _.y), f = Math.max(f, _.y));
+ }
+ return r.x = c, r.y = d, r.width = l - c, r.height = f - d, r;
+};
+PolygonGeometryLibrary.createGeometryFromPositions = function(e, t, n, i, r, o, s) {
+ let c = PolygonPipeline.triangulate(t.positions2D, t.holes);
+ c.length < 3 && (c = [0, 1, 2]);
+ const l = t.positions, d = defined(n), f = d ? n.positions : void 0;
+ if (r) {
+ const h = l.length, p = new Array(h * 3);
+ let m = 0;
+ for (let C = 0; C < h; C++) {
+ const T = l[C];
+ p[m++] = T.x, p[m++] = T.y, p[m++] = T.z;
+ }
+ const _ = {
+ attributes: {
+ position: new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.DOUBLE,
+ componentsPerAttribute: 3,
+ values: p
+ })
+ },
+ indices: c,
+ primitiveType: PrimitiveType$1.TRIANGLES
+ };
+ d && (_.attributes.st = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 2,
+ values: Cartesian2.packArray(f)
+ }));
+ const y = new Geometry(_);
+ return o.normal ? GeometryPipeline.computeNormal(y) : y;
+ }
+ if (s === ArcType$1.GEODESIC)
+ return PolygonPipeline.computeSubdivision(
+ e,
+ l,
+ c,
+ f,
+ i
+ );
+ if (s === ArcType$1.RHUMB)
+ return PolygonPipeline.computeRhumbLineSubdivision(
+ e,
+ l,
+ c,
+ f,
+ i
+ );
+};
+const computeWallTexcoordsSubdivided = [], computeWallIndicesSubdivided = [], p1Scratch$1 = new Cartesian3(), p2Scratch$1 = new Cartesian3();
+PolygonGeometryLibrary.computeWallGeometry = function(e, t, n, i, r, o) {
+ let s, c, l, d, f, h, p, m, _, y = e.length, C = 0, T = 0;
+ const x = defined(t), b = x ? t.positions : void 0;
+ if (r)
+ for (c = y * 3 * 2, s = new Array(c * 2), x && (_ = y * 2 * 2, m = new Array(_ * 2)), l = 0; l < y; l++)
+ d = e[l], f = e[(l + 1) % y], s[C] = s[C + c] = d.x, ++C, s[C] = s[C + c] = d.y, ++C, s[C] = s[C + c] = d.z, ++C, s[C] = s[C + c] = f.x, ++C, s[C] = s[C + c] = f.y, ++C, s[C] = s[C + c] = f.z, ++C, x && (h = b[l], p = b[(l + 1) % y], m[T] = m[T + _] = h.x, ++T, m[T] = m[T + _] = h.y, ++T, m[T] = m[T + _] = p.x, ++T, m[T] = m[T + _] = p.y, ++T);
+ else {
+ const P = CesiumMath.chordLength(
+ i,
+ n.maximumRadius
+ );
+ let I = 0;
+ if (o === ArcType$1.GEODESIC)
+ for (l = 0; l < y; l++)
+ I += PolygonGeometryLibrary.subdivideLineCount(
+ e[l],
+ e[(l + 1) % y],
+ P
+ );
+ else if (o === ArcType$1.RHUMB)
+ for (l = 0; l < y; l++)
+ I += PolygonGeometryLibrary.subdivideRhumbLineCount(
+ n,
+ e[l],
+ e[(l + 1) % y],
+ P
+ );
+ for (c = (I + y) * 3, s = new Array(c * 2), x && (_ = (I + y) * 2, m = new Array(_ * 2)), l = 0; l < y; l++) {
+ d = e[l], f = e[(l + 1) % y];
+ let M, R;
+ x && (h = b[l], p = b[(l + 1) % y]), o === ArcType$1.GEODESIC ? (M = PolygonGeometryLibrary.subdivideLine(
+ d,
+ f,
+ P,
+ computeWallIndicesSubdivided
+ ), x && (R = PolygonGeometryLibrary.subdivideTexcoordLine(
+ h,
+ p,
+ d,
+ f,
+ P,
+ computeWallTexcoordsSubdivided
+ ))) : o === ArcType$1.RHUMB && (M = PolygonGeometryLibrary.subdivideRhumbLine(
+ n,
+ d,
+ f,
+ P,
+ computeWallIndicesSubdivided
+ ), x && (R = PolygonGeometryLibrary.subdivideTexcoordRhumbLine(
+ h,
+ p,
+ n,
+ d,
+ f,
+ P,
+ computeWallTexcoordsSubdivided
+ )));
+ const L = M.length;
+ for (let g = 0; g < L; ++g, ++C)
+ s[C] = M[g], s[C + c] = M[g];
+ if (s[C] = f.x, s[C + c] = f.x, ++C, s[C] = f.y, s[C + c] = f.y, ++C, s[C] = f.z, s[C + c] = f.z, ++C, x) {
+ const g = R.length;
+ for (let w = 0; w < g; ++w, ++T)
+ m[T] = R[w], m[T + _] = R[w];
+ m[T] = p.x, m[T + _] = p.x, ++T, m[T] = p.y, m[T + _] = p.y, ++T;
+ }
+ }
+ }
+ y = s.length;
+ const S = IndexDatatype$1.createTypedArray(
+ y / 3,
+ y - e.length * 6
+ );
+ let E = 0;
+ for (y /= 6, l = 0; l < y; l++) {
+ const P = l, I = P + 1, M = P + y, R = M + 1;
+ d = Cartesian3.fromArray(s, P * 3, p1Scratch$1), f = Cartesian3.fromArray(s, I * 3, p2Scratch$1), !Cartesian3.equalsEpsilon(
+ d,
+ f,
+ CesiumMath.EPSILON10,
+ CesiumMath.EPSILON10
+ ) && (S[E++] = P, S[E++] = M, S[E++] = I, S[E++] = I, S[E++] = M, S[E++] = R);
+ }
+ const A = {
+ attributes: new GeometryAttributes({
+ position: new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.DOUBLE,
+ componentsPerAttribute: 3,
+ values: s
+ })
+ }),
+ indices: S,
+ primitiveType: PrimitiveType$1.TRIANGLES
+ };
+ return x && (A.attributes.st = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 2,
+ values: m
+ })), new Geometry(A);
+};
+function Stereographic(e, t) {
+ this.position = e, defined(this.position) || (this.position = new Cartesian2()), this.tangentPlane = t, defined(this.tangentPlane) || (this.tangentPlane = Stereographic.NORTH_POLE_TANGENT_PLANE);
+}
+Object.defineProperties(Stereographic.prototype, {
+ /**
+ * Gets the ellipsoid.
+ * @memberof Stereographic.prototype
+ * @type {Ellipsoid}
+ */
+ ellipsoid: {
+ get: function() {
+ return this.tangentPlane.ellipsoid;
+ }
+ },
+ /**
+ * Gets the x coordinate
+ * @memberof Stereographic.prototype
+ * @type {number}
+ */
+ x: {
+ get: function() {
+ return this.position.x;
+ }
+ },
+ /**
+ * Gets the y coordinate
+ * @memberof Stereographic.prototype
+ * @type {number}
+ */
+ y: {
+ get: function() {
+ return this.position.y;
+ }
+ },
+ /**
+ * Computes the conformal latitude, or the ellipsoidal latitude projected onto an arbitrary sphere.
+ * @memberof Stereographic.prototype
+ * @type {number}
+ */
+ conformalLatitude: {
+ get: function() {
+ const e = Cartesian2.magnitude(this.position), t = 2 * this.ellipsoid.maximumRadius;
+ return this.tangentPlane.plane.normal.z * (CesiumMath.PI_OVER_TWO - 2 * Math.atan2(e, t));
+ }
+ },
+ /**
+ * Computes the longitude
+ * @memberof Stereographic.prototype
+ * @type {number}
+ */
+ longitude: {
+ get: function() {
+ let e = CesiumMath.PI_OVER_TWO + Math.atan2(this.y, this.x);
+ return e > Math.PI && (e -= CesiumMath.TWO_PI), e;
+ }
+ }
+});
+const scratchCartographic$h = new Cartographic(), scratchCartesian$a = new Cartesian3();
+Stereographic.prototype.getLatitude = function(e) {
+ defined(e) || (e = Ellipsoid.default), scratchCartographic$h.latitude = this.conformalLatitude, scratchCartographic$h.longitude = this.longitude, scratchCartographic$h.height = 0;
+ const t = this.ellipsoid.cartographicToCartesian(
+ scratchCartographic$h,
+ scratchCartesian$a
+ );
+ return e.cartesianToCartographic(t, scratchCartographic$h), scratchCartographic$h.latitude;
+};
+const scratchProjectPointOntoPlaneRay = new Ray(), scratchProjectPointOntoPlaneRayDirection = new Cartesian3(), scratchProjectPointOntoPlaneCartesian3 = new Cartesian3();
+Stereographic.fromCartesian = function(e, t) {
+ const n = CesiumMath.signNotZero(e.z);
+ let i = Stereographic.NORTH_POLE_TANGENT_PLANE, r = Stereographic.SOUTH_POLE;
+ n < 0 && (i = Stereographic.SOUTH_POLE_TANGENT_PLANE, r = Stereographic.NORTH_POLE);
+ const o = scratchProjectPointOntoPlaneRay;
+ o.origin = i.ellipsoid.scaleToGeocentricSurface(
+ e,
+ o.origin
+ ), o.direction = Cartesian3.subtract(
+ o.origin,
+ r,
+ scratchProjectPointOntoPlaneRayDirection
+ ), Cartesian3.normalize(o.direction, o.direction);
+ const s = IntersectionTests.rayPlane(
+ o,
+ i.plane,
+ scratchProjectPointOntoPlaneCartesian3
+ ), c = Cartesian3.subtract(s, r, s), l = Cartesian3.dot(i.xAxis, c), d = n * Cartesian3.dot(i.yAxis, c);
+ return defined(t) ? (t.position = new Cartesian2(l, d), t.tangentPlane = i, t) : new Stereographic(new Cartesian2(l, d), i);
+};
+Stereographic.fromCartesianArray = function(e, t) {
+ const n = e.length;
+ defined(t) ? t.length = n : t = new Array(n);
+ for (let i = 0; i < n; i++)
+ t[i] = Stereographic.fromCartesian(e[i], t[i]);
+ return t;
+};
+Stereographic.clone = function(e, t) {
+ if (defined(e))
+ return defined(t) ? (t.position = e.position, t.tangentPlane = e.tangentPlane, t) : new Stereographic(
+ e.position,
+ e.tangentPlane
+ );
+};
+Stereographic.HALF_UNIT_SPHERE = Object.freeze(new Ellipsoid(0.5, 0.5, 0.5));
+Stereographic.NORTH_POLE = Object.freeze(new Cartesian3(0, 0, 0.5));
+Stereographic.SOUTH_POLE = Object.freeze(new Cartesian3(0, 0, -0.5));
+Stereographic.NORTH_POLE_TANGENT_PLANE = Object.freeze(
+ new EllipsoidTangentPlane(
+ Stereographic.NORTH_POLE,
+ Stereographic.HALF_UNIT_SPHERE
+ )
+);
+Stereographic.SOUTH_POLE_TANGENT_PLANE = Object.freeze(
+ new EllipsoidTangentPlane(
+ Stereographic.SOUTH_POLE,
+ Stereographic.HALF_UNIT_SPHERE
+ )
+);
+const scratchCarto1 = new Cartographic(), scratchCarto2 = new Cartographic();
+function adjustPosHeightsForNormal(e, t, n, i) {
+ const o = i.cartesianToCartographic(e, scratchCarto1).height, s = i.cartesianToCartographic(t, scratchCarto2);
+ s.height = o, i.cartographicToCartesian(s, t);
+ const c = i.cartesianToCartographic(n, scratchCarto2);
+ c.height = o - 100, i.cartographicToCartesian(c, n);
+}
+const scratchBoundingRectangle = new BoundingRectangle(), scratchPosition$d = new Cartesian3(), scratchNormal$7 = new Cartesian3(), scratchTangent$4 = new Cartesian3(), scratchBitangent$4 = new Cartesian3(), p1Scratch = new Cartesian3(), p2Scratch = new Cartesian3();
+let scratchPerPosNormal = new Cartesian3(), scratchPerPosTangent = new Cartesian3(), scratchPerPosBitangent = new Cartesian3();
+const appendTextureCoordinatesOrigin = new Cartesian2(), appendTextureCoordinatesCartesian2 = new Cartesian2(), appendTextureCoordinatesCartesian3 = new Cartesian3(), appendTextureCoordinatesQuaternion = new Quaternion(), appendTextureCoordinatesMatrix3 = new Matrix3(), tangentMatrixScratch$1 = new Matrix3();
+function computeAttributes$2(e) {
+ const t = e.vertexFormat, n = e.geometry, i = e.shadowVolume, r = n.attributes.position.values, o = defined(n.attributes.st) ? n.attributes.st.values : void 0;
+ let s = r.length;
+ const c = e.wall, l = e.top || c, d = e.bottom || c;
+ if (t.st || t.normal || t.tangent || t.bitangent || i) {
+ const f = e.boundingRectangle, h = e.rotationAxis, p = e.projectTo2d, m = e.ellipsoid, _ = e.stRotation, y = e.perPositionHeight, C = appendTextureCoordinatesOrigin;
+ C.x = f.x, C.y = f.y;
+ const T = t.st ? new Float32Array(2 * (s / 3)) : void 0;
+ let x;
+ t.normal && (y && l && !c ? x = n.attributes.normal.values : x = new Float32Array(s));
+ const b = t.tangent ? new Float32Array(s) : void 0, S = t.bitangent ? new Float32Array(s) : void 0, E = i ? new Float32Array(s) : void 0;
+ let A = 0, D = 0, P = scratchNormal$7, I = scratchTangent$4, M = scratchBitangent$4, R = !0, L = appendTextureCoordinatesMatrix3, g = tangentMatrixScratch$1;
+ if (_ !== 0) {
+ let N = Quaternion.fromAxisAngle(
+ h,
+ _,
+ appendTextureCoordinatesQuaternion
+ );
+ L = Matrix3.fromQuaternion(N, L), N = Quaternion.fromAxisAngle(
+ h,
+ -_,
+ appendTextureCoordinatesQuaternion
+ ), g = Matrix3.fromQuaternion(
+ N,
+ g
+ );
+ } else
+ L = Matrix3.clone(Matrix3.IDENTITY, L), g = Matrix3.clone(
+ Matrix3.IDENTITY,
+ g
+ );
+ let w = 0, O = 0;
+ l && d && (w = s / 2, O = s / 3, s /= 2);
+ for (let N = 0; N < s; N += 3) {
+ const F = Cartesian3.fromArray(
+ r,
+ N,
+ appendTextureCoordinatesCartesian3
+ );
+ if (t.st && !defined(o)) {
+ let B = Matrix3.multiplyByVector(
+ L,
+ F,
+ scratchPosition$d
+ );
+ B = m.scaleToGeodeticSurface(B, B);
+ const V = p([B], appendTextureCoordinatesCartesian2)[0];
+ Cartesian2.subtract(V, C, V);
+ const U = CesiumMath.clamp(V.x / f.width, 0, 1), k = CesiumMath.clamp(V.y / f.height, 0, 1);
+ d && (T[A + O] = U, T[A + 1 + O] = k), l && (T[A] = U, T[A + 1] = k), A += 2;
+ }
+ if (t.normal || t.tangent || t.bitangent || i) {
+ const B = D + 1, V = D + 2;
+ if (c) {
+ if (N + 3 < s) {
+ const U = Cartesian3.fromArray(r, N + 3, p1Scratch);
+ if (R) {
+ const k = Cartesian3.fromArray(
+ r,
+ N + s,
+ p2Scratch
+ );
+ y && adjustPosHeightsForNormal(F, U, k, m), Cartesian3.subtract(U, F, U), Cartesian3.subtract(k, F, k), P = Cartesian3.normalize(
+ Cartesian3.cross(k, U, P),
+ P
+ ), R = !1;
+ }
+ Cartesian3.equalsEpsilon(U, F, CesiumMath.EPSILON10) && (R = !0);
+ }
+ (t.tangent || t.bitangent) && (M = m.geodeticSurfaceNormal(F, M), t.tangent && (I = Cartesian3.normalize(
+ Cartesian3.cross(M, P, I),
+ I
+ )));
+ } else
+ P = m.geodeticSurfaceNormal(F, P), (t.tangent || t.bitangent) && (y && (scratchPerPosNormal = Cartesian3.fromArray(
+ x,
+ D,
+ scratchPerPosNormal
+ ), scratchPerPosTangent = Cartesian3.cross(
+ Cartesian3.UNIT_Z,
+ scratchPerPosNormal,
+ scratchPerPosTangent
+ ), scratchPerPosTangent = Cartesian3.normalize(
+ Matrix3.multiplyByVector(
+ g,
+ scratchPerPosTangent,
+ scratchPerPosTangent
+ ),
+ scratchPerPosTangent
+ ), t.bitangent && (scratchPerPosBitangent = Cartesian3.normalize(
+ Cartesian3.cross(
+ scratchPerPosNormal,
+ scratchPerPosTangent,
+ scratchPerPosBitangent
+ ),
+ scratchPerPosBitangent
+ ))), I = Cartesian3.cross(Cartesian3.UNIT_Z, P, I), I = Cartesian3.normalize(
+ Matrix3.multiplyByVector(g, I, I),
+ I
+ ), t.bitangent && (M = Cartesian3.normalize(
+ Cartesian3.cross(P, I, M),
+ M
+ )));
+ t.normal && (e.wall ? (x[D + w] = P.x, x[B + w] = P.y, x[V + w] = P.z) : d && (x[D + w] = -P.x, x[B + w] = -P.y, x[V + w] = -P.z), (l && !y || c) && (x[D] = P.x, x[B] = P.y, x[V] = P.z)), i && (c && (P = m.geodeticSurfaceNormal(F, P)), E[D + w] = -P.x, E[B + w] = -P.y, E[V + w] = -P.z), t.tangent && (e.wall ? (b[D + w] = I.x, b[B + w] = I.y, b[V + w] = I.z) : d && (b[D + w] = -I.x, b[B + w] = -I.y, b[V + w] = -I.z), l && (y ? (b[D] = scratchPerPosTangent.x, b[B] = scratchPerPosTangent.y, b[V] = scratchPerPosTangent.z) : (b[D] = I.x, b[B] = I.y, b[V] = I.z))), t.bitangent && (d && (S[D + w] = M.x, S[B + w] = M.y, S[V + w] = M.z), l && (y ? (S[D] = scratchPerPosBitangent.x, S[B] = scratchPerPosBitangent.y, S[V] = scratchPerPosBitangent.z) : (S[D] = M.x, S[B] = M.y, S[V] = M.z))), D += 3;
+ }
+ }
+ t.st && !defined(o) && (n.attributes.st = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 2,
+ values: T
+ })), t.normal && (n.attributes.normal = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 3,
+ values: x
+ })), t.tangent && (n.attributes.tangent = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 3,
+ values: b
+ })), t.bitangent && (n.attributes.bitangent = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 3,
+ values: S
+ })), i && (n.attributes.extrudeDirection = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 3,
+ values: E
+ }));
+ }
+ if (e.extrude && defined(e.offsetAttribute)) {
+ const f = r.length / 3;
+ let h = new Uint8Array(f);
+ if (e.offsetAttribute === GeometryOffsetAttribute$1.TOP)
+ l && d || c ? h = h.fill(1, 0, f / 2) : l && (h = h.fill(1));
+ else {
+ const p = e.offsetAttribute === GeometryOffsetAttribute$1.NONE ? 0 : 1;
+ h = h.fill(p);
+ }
+ n.attributes.applyOffset = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: h
+ });
+ }
+ return n;
+}
+const createGeometryFromPositionsExtrudedPositions = [];
+function createGeometryFromPositionsExtruded$1(e, t, n, i, r, o, s, c, l, d) {
+ const f = {
+ walls: []
+ };
+ let h;
+ if (s || c) {
+ const x = PolygonGeometryLibrary.createGeometryFromPositions(
+ e,
+ t,
+ n,
+ i,
+ o,
+ l,
+ d
+ ), b = x.attributes.position.values, S = x.indices;
+ let E, A;
+ if (s && c) {
+ const D = b.concat(b);
+ E = D.length / 3, A = IndexDatatype$1.createTypedArray(
+ E,
+ S.length * 2
+ ), A.set(S);
+ const P = S.length, I = E / 2;
+ for (h = 0; h < P; h += 3) {
+ const M = A[h] + I, R = A[h + 1] + I, L = A[h + 2] + I;
+ A[h + P] = L, A[h + 1 + P] = R, A[h + 2 + P] = M;
+ }
+ if (x.attributes.position.values = D, o && l.normal) {
+ const M = x.attributes.normal.values;
+ x.attributes.normal.values = new Float32Array(
+ D.length
+ ), x.attributes.normal.values.set(M);
+ }
+ if (l.st && defined(n)) {
+ const M = x.attributes.st.values;
+ x.attributes.st.values = new Float32Array(E * 2), x.attributes.st.values = M.concat(M);
+ }
+ x.indices = A;
+ } else if (c) {
+ for (E = b.length / 3, A = IndexDatatype$1.createTypedArray(E, S.length), h = 0; h < S.length; h += 3)
+ A[h] = S[h + 2], A[h + 1] = S[h + 1], A[h + 2] = S[h];
+ x.indices = A;
+ }
+ f.topAndBottom = new GeometryInstance({
+ geometry: x
+ });
+ }
+ let p = r.outerRing;
+ const m = EllipsoidTangentPlane.fromPoints(p, e);
+ let _ = m.projectPointsOntoPlane(
+ p,
+ createGeometryFromPositionsExtrudedPositions
+ ), y = PolygonPipeline.computeWindingOrder2D(_);
+ y === WindingOrder$1.CLOCKWISE && (p = p.slice().reverse());
+ let C = PolygonGeometryLibrary.computeWallGeometry(
+ p,
+ n,
+ e,
+ i,
+ o,
+ d
+ );
+ f.walls.push(
+ new GeometryInstance({
+ geometry: C
+ })
+ );
+ const T = r.holes;
+ for (h = 0; h < T.length; h++) {
+ let x = T[h];
+ _ = m.projectPointsOntoPlane(
+ x,
+ createGeometryFromPositionsExtrudedPositions
+ ), y = PolygonPipeline.computeWindingOrder2D(_), y === WindingOrder$1.COUNTER_CLOCKWISE && (x = x.slice().reverse()), C = PolygonGeometryLibrary.computeWallGeometry(
+ x,
+ n,
+ e,
+ i,
+ o,
+ d
+ ), f.walls.push(
+ new GeometryInstance({
+ geometry: C
+ })
+ );
+ }
+ return f;
+}
+function PolygonGeometry(e) {
+ const t = e.polygonHierarchy, n = defaultValue(e.vertexFormat, VertexFormat.DEFAULT), i = defaultValue(e.ellipsoid, Ellipsoid.default), r = defaultValue(
+ e.granularity,
+ CesiumMath.RADIANS_PER_DEGREE
+ ), o = defaultValue(e.stRotation, 0), s = e.textureCoordinates, c = defaultValue(e.perPositionHeight, !1), l = c && defined(e.extrudedHeight);
+ let d = defaultValue(e.height, 0), f = defaultValue(e.extrudedHeight, d);
+ if (!l) {
+ const h = Math.max(d, f);
+ f = Math.min(d, f), d = h;
+ }
+ this._vertexFormat = VertexFormat.clone(n), this._ellipsoid = Ellipsoid.clone(i), this._granularity = r, this._stRotation = o, this._height = d, this._extrudedHeight = f, this._closeTop = defaultValue(e.closeTop, !0), this._closeBottom = defaultValue(e.closeBottom, !0), this._polygonHierarchy = t, this._perPositionHeight = c, this._perPositionHeightExtrude = l, this._shadowVolume = defaultValue(e.shadowVolume, !1), this._workerName = "createPolygonGeometry", this._offsetAttribute = e.offsetAttribute, this._arcType = defaultValue(e.arcType, ArcType$1.GEODESIC), this._rectangle = void 0, this._textureCoordinateRotationPoints = void 0, this._textureCoordinates = s, this.packedLength = PolygonGeometryLibrary.computeHierarchyPackedLength(
+ t,
+ Cartesian3
+ ) + Ellipsoid.packedLength + VertexFormat.packedLength + (s ? PolygonGeometryLibrary.computeHierarchyPackedLength(
+ s,
+ Cartesian2
+ ) : 1) + 12;
+}
+PolygonGeometry.fromPositions = function(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = {
+ polygonHierarchy: {
+ positions: e.positions
+ },
+ height: e.height,
+ extrudedHeight: e.extrudedHeight,
+ vertexFormat: e.vertexFormat,
+ stRotation: e.stRotation,
+ ellipsoid: e.ellipsoid,
+ granularity: e.granularity,
+ perPositionHeight: e.perPositionHeight,
+ closeTop: e.closeTop,
+ closeBottom: e.closeBottom,
+ offsetAttribute: e.offsetAttribute,
+ arcType: e.arcType,
+ textureCoordinates: e.textureCoordinates
+ };
+ return new PolygonGeometry(t);
+};
+PolygonGeometry.pack = function(e, t, n) {
+ return n = defaultValue(n, 0), n = PolygonGeometryLibrary.packPolygonHierarchy(
+ e._polygonHierarchy,
+ t,
+ n,
+ Cartesian3
+ ), Ellipsoid.pack(e._ellipsoid, t, n), n += Ellipsoid.packedLength, VertexFormat.pack(e._vertexFormat, t, n), n += VertexFormat.packedLength, t[n++] = e._height, t[n++] = e._extrudedHeight, t[n++] = e._granularity, t[n++] = e._stRotation, t[n++] = e._perPositionHeightExtrude ? 1 : 0, t[n++] = e._perPositionHeight ? 1 : 0, t[n++] = e._closeTop ? 1 : 0, t[n++] = e._closeBottom ? 1 : 0, t[n++] = e._shadowVolume ? 1 : 0, t[n++] = defaultValue(e._offsetAttribute, -1), t[n++] = e._arcType, defined(e._textureCoordinates) ? n = PolygonGeometryLibrary.packPolygonHierarchy(
+ e._textureCoordinates,
+ t,
+ n,
+ Cartesian2
+ ) : t[n++] = -1, t[n++] = e.packedLength, t;
+};
+const scratchEllipsoid$e = Ellipsoid.clone(Ellipsoid.UNIT_SPHERE), scratchVertexFormat$b = new VertexFormat(), dummyOptions$1 = {
+ polygonHierarchy: {}
+};
+PolygonGeometry.unpack = function(e, t, n) {
+ t = defaultValue(t, 0);
+ const i = PolygonGeometryLibrary.unpackPolygonHierarchy(
+ e,
+ t,
+ Cartesian3
+ );
+ t = i.startingIndex, delete i.startingIndex;
+ const r = Ellipsoid.unpack(e, t, scratchEllipsoid$e);
+ t += Ellipsoid.packedLength;
+ const o = VertexFormat.unpack(
+ e,
+ t,
+ scratchVertexFormat$b
+ );
+ t += VertexFormat.packedLength;
+ const s = e[t++], c = e[t++], l = e[t++], d = e[t++], f = e[t++] === 1, h = e[t++] === 1, p = e[t++] === 1, m = e[t++] === 1, _ = e[t++] === 1, y = e[t++], C = e[t++], T = e[t] === -1 ? void 0 : PolygonGeometryLibrary.unpackPolygonHierarchy(
+ e,
+ t,
+ Cartesian2
+ );
+ defined(T) ? (t = T.startingIndex, delete T.startingIndex) : t++;
+ const x = e[t++];
+ return defined(n) || (n = new PolygonGeometry(dummyOptions$1)), n._polygonHierarchy = i, n._ellipsoid = Ellipsoid.clone(r, n._ellipsoid), n._vertexFormat = VertexFormat.clone(o, n._vertexFormat), n._height = s, n._extrudedHeight = c, n._granularity = l, n._stRotation = d, n._perPositionHeightExtrude = f, n._perPositionHeight = h, n._closeTop = p, n._closeBottom = m, n._shadowVolume = _, n._offsetAttribute = y === -1 ? void 0 : y, n._arcType = C, n._textureCoordinates = T, n.packedLength = x, n;
+};
+const scratchCartesian0 = new Cartesian2(), scratchCartesian1$7 = new Cartesian2(), scratchPolarClosest = new Stereographic();
+function expandRectangle(e, t, n, i, r, o) {
+ const s = e.longitude, c = s >= 0 ? s : s + CesiumMath.TWO_PI;
+ r.westOverIdl = Math.min(r.westOverIdl, c), r.eastOverIdl = Math.max(r.eastOverIdl, c), o.west = Math.min(o.west, s), o.east = Math.max(o.east, s);
+ const l = e.getLatitude(n);
+ let d = l;
+ if (o.south = Math.min(o.south, l), o.north = Math.max(o.north, l), i !== ArcType$1.RHUMB) {
+ const p = Cartesian2.subtract(
+ t.position,
+ e.position,
+ scratchCartesian0
+ ), m = Cartesian2.dot(t.position, p) / Cartesian2.dot(p, p);
+ if (m > 0 && m < 1) {
+ const _ = Cartesian2.add(
+ t.position,
+ Cartesian2.multiplyByScalar(p, -m, p),
+ scratchCartesian1$7
+ ), y = Stereographic.clone(t, scratchPolarClosest);
+ y.position = _;
+ const C = y.getLatitude(n);
+ o.south = Math.min(o.south, C), o.north = Math.max(o.north, C), Math.abs(l) > Math.abs(C) && (d = C);
+ }
+ }
+ const f = t.x * e.y - e.x * t.y;
+ let h = Math.sign(f);
+ h !== 0 && (h *= Cartesian2.angleBetween(t.position, e.position)), d >= 0 && (r.northAngle += h), d <= 0 && (r.southAngle += h);
+}
+const scratchPolar = new Stereographic(), scratchPolarPrevious = new Stereographic(), polygon = {
+ northAngle: 0,
+ southAngle: 0,
+ westOverIdl: 0,
+ eastOverIdl: 0
+};
+PolygonGeometry.computeRectangleFromPositions = function(e, t, n, i) {
+ if (defined(i) || (i = new Rectangle()), e.length < 3)
+ return i;
+ i.west = Number.POSITIVE_INFINITY, i.east = Number.NEGATIVE_INFINITY, i.south = Number.POSITIVE_INFINITY, i.north = Number.NEGATIVE_INFINITY, polygon.northAngle = 0, polygon.southAngle = 0, polygon.westOverIdl = Number.POSITIVE_INFINITY, polygon.eastOverIdl = Number.NEGATIVE_INFINITY;
+ const r = e.length;
+ let o = Stereographic.fromCartesian(
+ e[0],
+ scratchPolarPrevious
+ );
+ for (let s = 1; s < r; s++) {
+ const c = Stereographic.fromCartesian(
+ e[s],
+ scratchPolar
+ );
+ expandRectangle(
+ c,
+ o,
+ t,
+ n,
+ polygon,
+ i
+ ), o = Stereographic.clone(c, o);
+ }
+ return expandRectangle(
+ Stereographic.fromCartesian(e[0], scratchPolar),
+ o,
+ t,
+ n,
+ polygon,
+ i
+ ), i.east - i.west > polygon.eastOverIdl - polygon.westOverIdl && (i.west = polygon.westOverIdl, i.east = polygon.eastOverIdl, i.east > CesiumMath.PI && (i.east = i.east - CesiumMath.TWO_PI), i.west > CesiumMath.PI && (i.west = i.west - CesiumMath.TWO_PI)), CesiumMath.equalsEpsilon(
+ Math.abs(polygon.northAngle),
+ CesiumMath.TWO_PI,
+ CesiumMath.EPSILON10
+ ) && (i.north = CesiumMath.PI_OVER_TWO, i.east = CesiumMath.PI, i.west = -CesiumMath.PI), CesiumMath.equalsEpsilon(
+ Math.abs(polygon.southAngle),
+ CesiumMath.TWO_PI,
+ CesiumMath.EPSILON10
+ ) && (i.south = -CesiumMath.PI_OVER_TWO, i.east = CesiumMath.PI, i.west = -CesiumMath.PI), i;
+};
+const scratchPolarForPlane = new Stereographic();
+function getTangentPlane(e, t, n) {
+ return e.height >= CesiumMath.PI || e.width >= CesiumMath.PI ? Stereographic.fromCartesian(
+ t[0],
+ scratchPolarForPlane
+ ).tangentPlane : EllipsoidTangentPlane.fromPoints(t, n);
+}
+const scratchCartographicCyllindrical = new Cartographic();
+function createProjectTo2d(e, t, n) {
+ return (i, r) => {
+ if (e.height >= CesiumMath.PI || e.width >= CesiumMath.PI) {
+ if (e.south < 0 && e.north > 0) {
+ defined(r) || (r = []);
+ for (let s = 0; s < i.length; ++s) {
+ const c = n.cartesianToCartographic(
+ i[s],
+ scratchCartographicCyllindrical
+ );
+ r[s] = new Cartesian2(
+ c.longitude / CesiumMath.PI,
+ c.latitude / CesiumMath.PI_OVER_TWO
+ );
+ }
+ return r.length = i.length, r;
+ }
+ return Stereographic.fromCartesianArray(i, r);
+ }
+ return EllipsoidTangentPlane.fromPoints(
+ t,
+ n
+ ).projectPointsOntoPlane(i, r);
+ };
+}
+function createProjectPositionTo2d(e, t, n) {
+ if (e.height >= CesiumMath.PI || e.width >= CesiumMath.PI)
+ return (r, o) => {
+ if (e.south < 0 && e.north > 0) {
+ const s = n.cartesianToCartographic(
+ r,
+ scratchCartographicCyllindrical
+ );
+ return defined(o) || (o = new Cartesian2()), o.x = s.longitude / CesiumMath.PI, o.y = s.latitude / CesiumMath.PI_OVER_TWO, o;
+ }
+ return Stereographic.fromCartesian(r, o);
+ };
+ const i = EllipsoidTangentPlane.fromPoints(t, n);
+ return (r, o) => i.projectPointsOntoPlane(r, o);
+}
+function createSplitPolygons(e, t, n, i) {
+ return (r, o) => !i && (e.height >= CesiumMath.PI_OVER_TWO || e.width >= 2 * CesiumMath.PI_OVER_THREE) ? PolygonGeometryLibrary.splitPolygonsOnEquator(
+ r,
+ t,
+ n,
+ o
+ ) : r;
+}
+function computeBoundingRectangle(e, t, n, i) {
+ if (t.height >= CesiumMath.PI || t.width >= CesiumMath.PI)
+ return BoundingRectangle.fromRectangle(
+ t,
+ void 0,
+ scratchBoundingRectangle
+ );
+ const r = e, o = EllipsoidTangentPlane.fromPoints(
+ r,
+ n
+ );
+ return PolygonGeometryLibrary.computeBoundingRectangle(
+ o.plane.normal,
+ o.projectPointOntoPlane.bind(o),
+ r,
+ i,
+ scratchBoundingRectangle
+ );
+}
+PolygonGeometry.createGeometry = function(e) {
+ const t = e._vertexFormat, n = e._ellipsoid, i = e._granularity, r = e._stRotation, o = e._polygonHierarchy, s = e._perPositionHeight, c = e._closeTop, l = e._closeBottom, d = e._arcType, f = e._textureCoordinates, h = defined(f), p = o.positions;
+ if (p.length < 3)
+ return;
+ const m = e.rectangle, _ = PolygonGeometryLibrary.polygonsFromHierarchy(
+ o,
+ h,
+ createProjectTo2d(m, p, n),
+ !s,
+ n,
+ createSplitPolygons(m, n, d, s)
+ ), y = _.hierarchy, C = _.polygons, T = function(w) {
+ return w;
+ }, x = h ? PolygonGeometryLibrary.polygonsFromHierarchy(
+ f,
+ !0,
+ T,
+ !1,
+ n
+ ).polygons : void 0;
+ if (y.length === 0)
+ return;
+ const b = y[0].outerRing, S = computeBoundingRectangle(
+ b,
+ m,
+ n,
+ r
+ ), E = [], A = e._height, D = e._extrudedHeight, P = e._perPositionHeightExtrude || !CesiumMath.equalsEpsilon(A, D, 0, CesiumMath.EPSILON2), I = {
+ perPositionHeight: s,
+ vertexFormat: t,
+ geometry: void 0,
+ rotationAxis: getTangentPlane(m, b, n).plane.normal,
+ projectTo2d: createProjectPositionTo2d(m, b, n),
+ boundingRectangle: S,
+ ellipsoid: n,
+ stRotation: r,
+ textureCoordinates: void 0,
+ bottom: !1,
+ top: !0,
+ wall: !1,
+ extrude: !1,
+ arcType: d
+ };
+ let M;
+ if (P)
+ for (I.extrude = !0, I.top = c, I.bottom = l, I.shadowVolume = e._shadowVolume, I.offsetAttribute = e._offsetAttribute, M = 0; M < C.length; M++) {
+ const w = createGeometryFromPositionsExtruded$1(
+ n,
+ C[M],
+ h ? x[M] : void 0,
+ i,
+ y[M],
+ s,
+ c,
+ l,
+ t,
+ d
+ );
+ let O;
+ c && l ? (O = w.topAndBottom, I.geometry = PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(
+ O.geometry,
+ A,
+ D,
+ n,
+ s
+ )) : c ? (O = w.topAndBottom, O.geometry.attributes.position.values = PolygonPipeline.scaleToGeodeticHeight(
+ O.geometry.attributes.position.values,
+ A,
+ n,
+ !s
+ ), I.geometry = O.geometry) : l && (O = w.topAndBottom, O.geometry.attributes.position.values = PolygonPipeline.scaleToGeodeticHeight(
+ O.geometry.attributes.position.values,
+ D,
+ n,
+ !0
+ ), I.geometry = O.geometry), (c || l) && (I.wall = !1, O.geometry = computeAttributes$2(I), E.push(O));
+ const N = w.walls;
+ I.wall = !0;
+ for (let F = 0; F < N.length; F++) {
+ const B = N[F];
+ I.geometry = PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(
+ B.geometry,
+ A,
+ D,
+ n,
+ s
+ ), B.geometry = computeAttributes$2(I), E.push(B);
+ }
+ }
+ else
+ for (M = 0; M < C.length; M++) {
+ const w = new GeometryInstance({
+ geometry: PolygonGeometryLibrary.createGeometryFromPositions(
+ n,
+ C[M],
+ h ? x[M] : void 0,
+ i,
+ s,
+ t,
+ d
+ )
+ });
+ if (w.geometry.attributes.position.values = PolygonPipeline.scaleToGeodeticHeight(
+ w.geometry.attributes.position.values,
+ A,
+ n,
+ !s
+ ), I.geometry = w.geometry, w.geometry = computeAttributes$2(I), defined(e._offsetAttribute)) {
+ const O = w.geometry.attributes.position.values.length, N = e._offsetAttribute === GeometryOffsetAttribute$1.NONE ? 0 : 1, F = new Uint8Array(O / 3).fill(N);
+ w.geometry.attributes.applyOffset = new GeometryAttribute(
+ {
+ componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: F
+ }
+ );
+ }
+ E.push(w);
+ }
+ const R = GeometryPipeline.combineInstances(E)[0];
+ R.attributes.position.values = new Float64Array(
+ R.attributes.position.values
+ ), R.indices = IndexDatatype$1.createTypedArray(
+ R.attributes.position.values.length / 3,
+ R.indices
+ );
+ const L = R.attributes, g = BoundingSphere.fromVertices(
+ L.position.values
+ );
+ return t.position || delete L.position, new Geometry({
+ attributes: L,
+ indices: R.indices,
+ primitiveType: R.primitiveType,
+ boundingSphere: g,
+ offsetAttribute: e._offsetAttribute
+ });
+};
+PolygonGeometry.createShadowVolume = function(e, t, n) {
+ const i = e._granularity, r = e._ellipsoid, o = t(i, r), s = n(i, r);
+ return new PolygonGeometry({
+ polygonHierarchy: e._polygonHierarchy,
+ ellipsoid: r,
+ stRotation: e._stRotation,
+ granularity: i,
+ perPositionHeight: !1,
+ extrudedHeight: o,
+ height: s,
+ vertexFormat: VertexFormat.POSITION_ONLY,
+ shadowVolume: !0,
+ arcType: e._arcType
+ });
+};
+function textureCoordinateRotationPoints$2(e) {
+ const t = -e._stRotation;
+ if (t === 0)
+ return [0, 0, 0, 1, 1, 0];
+ const n = e._ellipsoid, i = e._polygonHierarchy.positions, r = e.rectangle;
+ return Geometry._textureCoordinateRotationPoints(
+ i,
+ t,
+ n,
+ r
+ );
+}
+Object.defineProperties(PolygonGeometry.prototype, {
+ /**
+ * @private
+ */
+ rectangle: {
+ get: function() {
+ if (!defined(this._rectangle)) {
+ const e = this._polygonHierarchy.positions;
+ this._rectangle = PolygonGeometry.computeRectangleFromPositions(
+ e,
+ this._ellipsoid,
+ this._arcType
+ );
+ }
+ return this._rectangle;
+ }
+ },
+ /**
+ * For remapping texture coordinates when rendering PolygonGeometries as GroundPrimitives.
+ * @private
+ */
+ textureCoordinateRotationPoints: {
+ get: function() {
+ return defined(this._textureCoordinateRotationPoints) || (this._textureCoordinateRotationPoints = textureCoordinateRotationPoints$2(
+ this
+ )), this._textureCoordinateRotationPoints;
+ }
+ }
+});
+function ClippingPolygon(e) {
+ this._ellipsoid = defaultValue(e.ellipsoid, Ellipsoid.default), this._positions = [...e.positions];
+}
+Object.defineProperties(ClippingPolygon.prototype, {
+ /**
+ * Returns the total number of positions in the polygon, include any holes.
+ *
+ * @memberof ClippingPolygon.prototype
+ * @type {number}
+ * @readonly
+ */
+ length: {
+ get: function() {
+ return this._positions.length;
+ }
+ },
+ /**
+ * Returns the outer ring of positions.
+ *
+ * @memberof ClippingPolygon.prototype
+ * @type {Cartesian3[]}
+ * @readonly
+ */
+ positions: {
+ get: function() {
+ return this._positions;
+ }
+ },
+ /**
+ * Returns the ellipsoid used to project the polygon onto surfaces when clipping.
+ *
+ * @memberof ClippingPolygon.prototype
+ * @type {Ellipsoid}
+ * @readonly
+ */
+ ellipsoid: {
+ get: function() {
+ return this._ellipsoid;
+ }
+ }
+});
+ClippingPolygon.clone = function(e, t) {
+ return defined(t) ? (t._ellipsoid = e.ellipsoid, t._positions.length = 0, t._positions.push(...e.positions), t) : new ClippingPolygon({
+ positions: e.positions,
+ ellipsoid: e.ellipsoid
+ });
+};
+ClippingPolygon.equals = function(e, t) {
+ return e.ellipsoid.equals(t.ellipsoid) && e.positions === t.positions;
+};
+ClippingPolygon.prototype.computeRectangle = function(e) {
+ return PolygonGeometry.computeRectangleFromPositions(
+ this.positions,
+ this.ellipsoid,
+ void 0,
+ e
+ );
+};
+const scratchRectangle$a = new Rectangle(), spherePointScratch = new Cartesian3();
+ClippingPolygon.prototype.computeSphericalExtents = function(e) {
+ defined(e) || (e = new Rectangle());
+ const t = this.computeRectangle(scratchRectangle$a);
+ let n = Cartographic.toCartesian(
+ Rectangle.southwest(t),
+ this.ellipsoid,
+ spherePointScratch
+ ), i = Math.sqrt(
+ n.x * n.x + n.y * n.y
+ ), r = CesiumMath.fastApproximateAtan2(i, n.z), o = CesiumMath.fastApproximateAtan2(
+ n.x,
+ n.y
+ );
+ return e.south = r, e.west = o, n = Cartographic.toCartesian(
+ Rectangle.northeast(t),
+ this.ellipsoid,
+ spherePointScratch
+ ), i = Math.sqrt(
+ n.x * n.x + n.y * n.y
+ ), r = CesiumMath.fastApproximateAtan2(i, n.z), o = CesiumMath.fastApproximateAtan2(
+ n.x,
+ n.y
+ ), e.north = r, e.east = o, e;
+};
+const PolygonSignedDistanceFS = `in vec2 v_textureCoordinates;
+
+uniform int u_polygonsLength;
+uniform int u_extentsLength;
+uniform highp sampler2D u_polygonTexture;
+uniform highp sampler2D u_extentsTexture;
+
+int getPolygonIndex(float dimension, vec2 coord) {
+ vec2 uv = coord.xy * dimension;
+ return int(floor(uv.y) * dimension + floor(uv.x));
+}
+
+vec2 getLookupUv(ivec2 dimensions, int i) {
+ int pixY = i / dimensions.x;
+ int pixX = i - (pixY * dimensions.x);
+ float pixelWidth = 1.0 / float(dimensions.x);
+ float pixelHeight = 1.0 / float(dimensions.y);
+ float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel
+ float v = (float(pixY) + 0.5) * pixelHeight;
+ return vec2(u, v);
+}
+
+vec4 getExtents(int i) {
+ return texture(u_extentsTexture, getLookupUv(textureSize(u_extentsTexture, 0), i));
+}
+
+ivec2 getPositionsLengthAndExtentsIndex(int i) {
+ vec2 uv = getLookupUv(textureSize(u_polygonTexture, 0), i);
+ vec4 value = texture(u_polygonTexture, uv);
+ return ivec2(int(value.x), int(value.y));
+}
+
+vec2 getPolygonPosition(int i) {
+ vec2 uv = getLookupUv(textureSize(u_polygonTexture, 0), i);
+ return texture(u_polygonTexture, uv).xy;
+}
+
+vec2 getCoordinates(vec2 textureCoordinates, vec4 extents) {
+ float latitude = mix(extents.x, extents.x + 1.0 / extents.z, textureCoordinates.y);
+ float longitude = mix(extents.y, extents.y + 1.0 / extents.w, textureCoordinates.x);
+ return vec2(latitude, longitude);
+}
+
+void main() {
+ int lastPolygonIndex = 0;
+ out_FragColor = vec4(1.0);
+
+ // Get the relevant region of the texture
+ float dimension = float(u_extentsLength);
+ if (u_extentsLength > 2) {
+ dimension = ceil(log2(float(u_extentsLength)));
+ }
+ int regionIndex = getPolygonIndex(dimension, v_textureCoordinates);
+
+ for (int polygonIndex = 0; polygonIndex < u_polygonsLength; polygonIndex++) {
+ ivec2 positionsLengthAndExtents = getPositionsLengthAndExtentsIndex(lastPolygonIndex);
+ int positionsLength = positionsLengthAndExtents.x;
+ int polygonExtentsIndex = positionsLengthAndExtents.y;
+ lastPolygonIndex += 1;
+
+ // Only compute signed distance for the relevant part of the atlas
+ if (polygonExtentsIndex == regionIndex) {
+ float clipAmount = czm_infinity;
+ vec4 extents = getExtents(polygonExtentsIndex);
+ vec2 textureOffset = vec2(mod(float(polygonExtentsIndex), dimension), floor(float(polygonExtentsIndex) / dimension)) / dimension;
+ vec2 p = getCoordinates((v_textureCoordinates - textureOffset) * dimension, extents);
+ float s = 1.0;
+
+ // Check each edge for absolute distance
+ for (int i = 0, j = positionsLength - 1; i < positionsLength; j = i, i++) {
+ vec2 a = getPolygonPosition(lastPolygonIndex + i);
+ vec2 b = getPolygonPosition(lastPolygonIndex + j);
+
+ vec2 ab = b - a;
+ vec2 pa = p - a;
+ float t = dot(pa, ab) / dot(ab, ab);
+ t = clamp(t, 0.0, 1.0);
+
+ vec2 pq = pa - t * ab;
+ float d = length(pq);
+
+ // Inside / outside computation to determine sign
+ bvec3 cond = bvec3(p.y >= a.y,
+ p.y < b.y,
+ ab.x * pa.y > ab.y * pa.x);
+ if (all(cond) || all(not(cond))) s = -s;
+ if (abs(d) < abs(clipAmount)) {
+ clipAmount = d;
+ }
+ }
+
+ // Normalize the range to [0,1]
+ vec4 result = (s * vec4(clipAmount * length(extents.zw))) / 2.0 + 0.5;
+ // In the case where we've iterated through multiple polygons, take the minimum
+ out_FragColor = min(out_FragColor, result);
+ }
+
+ lastPolygonIndex += positionsLength;
+ }
+}`;
+function ClippingPolygonCollection(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._polygons = [], this._totalPositions = 0, this.enabled = defaultValue(e.enabled, !0), this.inverse = defaultValue(e.inverse, !1), this.polygonAdded = new Event(), this.polygonRemoved = new Event(), this._owner = void 0, this._float32View = void 0, this._extentsFloat32View = void 0, this._extentsCount = 0, this._polygonsTexture = void 0, this._extentsTexture = void 0, this._signedDistanceTexture = void 0, this._signedDistanceComputeCommand = void 0;
+ const t = e.polygons;
+ if (defined(t)) {
+ const n = t.length;
+ for (let i = 0; i < n; ++i)
+ this._polygons.push(t[i]);
+ }
+}
+Object.defineProperties(ClippingPolygonCollection.prototype, {
+ /**
+ * Returns the number of polygons in this collection. This is commonly used with
+ * {@link ClippingPolygonCollection#get} to iterate over all the polygons
+ * in the collection.
+ *
+ * @memberof ClippingPolygonCollection.prototype
+ * @type {number}
+ * @readonly
+ */
+ length: {
+ get: function() {
+ return this._polygons.length;
+ }
+ },
+ /**
+ * Returns the total number of positions in all polygons in the collection.
+ *
+ * @memberof ClippingPolygonCollection.prototype
+ * @type {number}
+ * @readonly
+ * @private
+ */
+ totalPositions: {
+ get: function() {
+ return this._totalPositions;
+ }
+ },
+ /**
+ * Returns a texture containing the packed computed spherical extents for each polygon
+ *
+ * @memberof ClippingPolygonCollection.prototype
+ * @type {Texture}
+ * @readonly
+ * @private
+ */
+ extentsTexture: {
+ get: function() {
+ return this._extentsTexture;
+ }
+ },
+ /**
+ * Returns the number of packed extents, which can be fewer than the number of polygons.
+ *
+ * @memberof ClippingPolygonCollection.prototype
+ * @type {number}
+ * @readonly
+ * @private
+ */
+ extentsCount: {
+ get: function() {
+ return this._extentsCount;
+ }
+ },
+ /**
+ * Returns the number of pixels needed in the texture containing the packed computed spherical extents for each polygon.
+ *
+ * @memberof ClippingPolygonCollection.prototype
+ * @type {number}
+ * @readonly
+ * @private
+ */
+ pixelsNeededForExtents: {
+ get: function() {
+ return this.length;
+ }
+ },
+ /**
+ * Returns the number of pixels needed in the texture containing the packed polygon positions.
+ *
+ * @memberof ClippingPolygonCollection.prototype
+ * @type {number}
+ * @readonly
+ * @private
+ */
+ pixelsNeededForPolygonPositions: {
+ get: function() {
+ return this.totalPositions + this.length;
+ }
+ },
+ /**
+ * Returns a texture containing the computed signed distance of each polygon.
+ *
+ * @memberof ClippingPolygonCollection.prototype
+ * @type {Texture}
+ * @readonly
+ * @private
+ */
+ clippingTexture: {
+ get: function() {
+ return this._signedDistanceTexture;
+ }
+ },
+ /**
+ * A reference to the ClippingPolygonCollection's owner, if any.
+ *
+ * @memberof ClippingPolygonCollection.prototype
+ * @readonly
+ * @private
+ */
+ owner: {
+ get: function() {
+ return this._owner;
+ }
+ },
+ /**
+ * Returns a number encapsulating the state for this ClippingPolygonCollection.
+ *
+ * Clipping mode is encoded in the sign of the number, which is just the total position count.
+ * If this value changes, then shader regeneration is necessary.
+ *
+ * @memberof ClippingPolygonCollection.prototype
+ * @returns {number} A Number that describes the ClippingPolygonCollection's state.
+ * @readonly
+ * @private
+ */
+ clippingPolygonsState: {
+ get: function() {
+ return this.inverse ? -this.extentsCount : this.extentsCount;
+ }
+ }
+});
+ClippingPolygonCollection.prototype.add = function(e) {
+ const t = this._polygons.length;
+ return this._polygons.push(e), this.polygonAdded.raiseEvent(e, t), e;
+};
+ClippingPolygonCollection.prototype.get = function(e) {
+ return this._polygons[e];
+};
+ClippingPolygonCollection.prototype.contains = function(e) {
+ return this._polygons.some((t) => ClippingPolygon.equals(t, e));
+};
+ClippingPolygonCollection.prototype.remove = function(e) {
+ const t = this._polygons, n = t.findIndex((i) => ClippingPolygon.equals(i, e));
+ return n === -1 ? !1 : (t.splice(n, 1), this.polygonRemoved.raiseEvent(e, n), !0);
+};
+const scratchRectangle$9 = new Rectangle();
+function getExtents(e) {
+ const t = [], n = [], i = e.length;
+ for (let o = 0; o < i; ++o) {
+ const c = e[o].computeSphericalExtents();
+ let l = Math.max(c.height * 2.5, 1e-3), d = Math.max(c.width * 2.5, 1e-3), f = Rectangle.clone(c);
+ f.south -= l, f.west -= d, f.north += l, f.east += d, f.south = Math.max(f.south, -Math.PI), f.west = Math.max(f.west, -Math.PI), f.north = Math.min(f.north, Math.PI), f.east = Math.min(f.east, Math.PI);
+ const h = [o];
+ for (let p = 0; p < t.length; ++p) {
+ const m = t[p];
+ if (defined(m) && defined(Rectangle.simpleIntersection(m, f)) && !Rectangle.equals(m, f)) {
+ const _ = n[p];
+ h.push(..._), _.reduce(
+ (y, C) => Rectangle.union(
+ e[C].computeSphericalExtents(scratchRectangle$9),
+ y,
+ y
+ ),
+ c
+ ), t[p] = void 0, n[p] = void 0, l = Math.max(c.height * 2.5, 1e-3), d = Math.max(c.width * 2.5, 1e-3), f = Rectangle.clone(c, f), f.south -= l, f.west -= d, f.north += l, f.east += d, f.south = Math.max(f.south, -Math.PI), f.west = Math.max(f.west, -Math.PI), f.north = Math.min(f.north, Math.PI), f.east = Math.min(f.east, Math.PI), p = -1;
+ }
+ }
+ t.push(f), n.push(h);
+ }
+ const r = /* @__PURE__ */ new Map();
+ return n.filter(defined).forEach(
+ (o, s) => o.forEach((c) => r.set(c, s))
+ ), {
+ extentsList: t.filter(defined),
+ extentsIndexByPolygon: r
+ };
+}
+ClippingPolygonCollection.prototype.removeAll = function() {
+ const e = this._polygons, t = e.length;
+ for (let n = 0; n < t; ++n) {
+ const i = e[n];
+ this.polygonRemoved.raiseEvent(i, n);
+ }
+ this._polygons = [];
+};
+function packPolygonsAsFloats(e) {
+ const t = e._float32View, n = e._extentsFloat32View, i = e._polygons, { extentsList: r, extentsIndexByPolygon: o } = getExtents(i);
+ let s = 0;
+ for (const [l, d] of i.entries()) {
+ const f = d.length;
+ t[s++] = f, t[s++] = o.get(l);
+ for (let h = 0; h < f; ++h) {
+ const p = d.positions[h], m = Math.hypot(p.x, p.y), _ = CesiumMath.fastApproximateAtan2(
+ m,
+ p.z
+ ), y = CesiumMath.fastApproximateAtan2(
+ p.x,
+ p.y
+ );
+ t[s++] = _, t[s++] = y;
+ }
+ }
+ let c = 0;
+ for (const l of r) {
+ const d = 1 / (l.east - l.west), f = 1 / (l.north - l.south);
+ n[c++] = l.south, n[c++] = l.west, n[c++] = f, n[c++] = d;
+ }
+ e._extentsCount = r.length;
+}
+const textureResolutionScratch$2 = new Cartesian2();
+ClippingPolygonCollection.prototype.update = function(e) {
+ const t = e.context;
+ if (!ClippingPolygonCollection.isSupported(e))
+ throw new RuntimeError(
+ "ClippingPolygonCollections are only supported for WebGL 2."
+ );
+ const n = this._polygons.reduce(
+ (s, c) => s + c.length,
+ 0
+ );
+ if (n === this.totalPositions || (this._totalPositions = n, this.length === 0))
+ return;
+ defined(this._signedDistanceComputeCommand) && (this._signedDistanceComputeCommand.canceled = !0, this._signedDistanceComputeCommand = void 0);
+ let i = this._polygonsTexture, r = this._extentsTexture, o = this._signedDistanceTexture;
+ if (defined(i)) {
+ const s = i.width * i.height;
+ (s < this.pixelsNeededForPolygonPositions || this.pixelsNeededForPolygonPositions < 0.25 * s) && (i.destroy(), i = void 0, this._polygonsTexture = void 0);
+ }
+ if (!defined(i)) {
+ const s = ClippingPolygonCollection.getTextureResolution(
+ i,
+ this.pixelsNeededForPolygonPositions,
+ textureResolutionScratch$2
+ );
+ i = new Texture({
+ context: t,
+ width: s.x,
+ height: s.y,
+ pixelFormat: PixelFormat$1.RG,
+ pixelDatatype: PixelDatatype$1.FLOAT,
+ sampler: Sampler.NEAREST,
+ flipY: !1
+ }), this._float32View = new Float32Array(
+ s.x * s.y * 2
+ ), this._polygonsTexture = i;
+ }
+ if (defined(r)) {
+ const s = r.width * r.height;
+ (s < this.pixelsNeededForExtents || this.pixelsNeededForExtents < 0.25 * s) && (r.destroy(), r = void 0, this._extentsTexture = void 0);
+ }
+ if (!defined(r)) {
+ const s = ClippingPolygonCollection.getTextureResolution(
+ r,
+ this.pixelsNeededForExtents,
+ textureResolutionScratch$2
+ );
+ r = new Texture({
+ context: t,
+ width: s.x,
+ height: s.y,
+ pixelFormat: PixelFormat$1.RGBA,
+ pixelDatatype: PixelDatatype$1.FLOAT,
+ sampler: Sampler.NEAREST,
+ flipY: !1
+ }), this._extentsFloat32View = new Float32Array(
+ s.x * s.y * 4
+ ), this._extentsTexture = r;
+ }
+ if (packPolygonsAsFloats(this), r.copyFrom({
+ source: {
+ width: r.width,
+ height: r.height,
+ arrayBufferView: this._extentsFloat32View
+ }
+ }), i.copyFrom({
+ source: {
+ width: i.width,
+ height: i.height,
+ arrayBufferView: this._float32View
+ }
+ }), !defined(o)) {
+ const s = ClippingPolygonCollection.getClippingDistanceTextureResolution(
+ this,
+ textureResolutionScratch$2
+ );
+ o = new Texture({
+ context: t,
+ width: s.x,
+ height: s.y,
+ pixelFormat: t.webgl2 ? PixelFormat$1.RED : PixelFormat$1.LUMINANCE,
+ pixelDatatype: PixelDatatype$1.FLOAT,
+ sampler: new Sampler({
+ wrapS: TextureWrap$1.CLAMP_TO_EDGE,
+ wrapT: TextureWrap$1.CLAMP_TO_EDGE,
+ minificationFilter: TextureMinificationFilter$1.LINEAR,
+ magnificationFilter: TextureMagnificationFilter$1.LINEAR
+ }),
+ flipY: !1
+ }), this._signedDistanceTexture = o;
+ }
+ this._signedDistanceComputeCommand = createSignedDistanceTextureCommand(this);
+};
+ClippingPolygonCollection.prototype.queueCommands = function(e) {
+ defined(this._signedDistanceComputeCommand) && e.commandList.push(this._signedDistanceComputeCommand);
+};
+function createSignedDistanceTextureCommand(e) {
+ const t = e._polygonsTexture, n = e._extentsTexture;
+ return new ComputeCommand({
+ fragmentShaderSource: PolygonSignedDistanceFS,
+ outputTexture: e._signedDistanceTexture,
+ uniformMap: {
+ u_polygonsLength: function() {
+ return e.length;
+ },
+ u_extentsLength: function() {
+ return e.extentsCount;
+ },
+ u_extentsTexture: function() {
+ return n;
+ },
+ u_polygonTexture: function() {
+ return t;
+ }
+ },
+ persists: !1,
+ owner: e,
+ postExecute: () => {
+ e._signedDistanceComputeCommand = void 0;
+ }
+ });
+}
+const scratchRectangleTile = new Rectangle(), scratchRectangleIntersection = new Rectangle();
+ClippingPolygonCollection.prototype.computeIntersectionWithBoundingVolume = function(e, t) {
+ var o;
+ const n = this._polygons, i = n.length;
+ let r = Intersect$1.OUTSIDE;
+ this.inverse && (r = Intersect$1.INSIDE);
+ for (let s = 0; s < i; ++s) {
+ const l = n[s].computeRectangle();
+ let d = e.rectangle;
+ if (!defined(d) && defined((o = e.boundingVolume) == null ? void 0 : o.computeCorners)) {
+ const h = e.boundingVolume.computeCorners();
+ d = Rectangle.fromCartesianArray(
+ h,
+ t,
+ scratchRectangleTile
+ );
+ }
+ defined(d) || (d = Rectangle.fromBoundingSphere(
+ e.boundingSphere,
+ t,
+ scratchRectangleTile
+ ));
+ const f = Rectangle.simpleIntersection(
+ d,
+ l,
+ scratchRectangleIntersection
+ );
+ defined(f) && (r = Intersect$1.INTERSECTING);
+ }
+ return r;
+};
+ClippingPolygonCollection.setOwner = function(e, t, n) {
+ e !== t[n] && (t[n] = t[n] && t[n].destroy(), defined(e) && (e._owner = t, t[n] = e));
+};
+ClippingPolygonCollection.isSupported = function(e) {
+ return e == null ? void 0 : e.context.webgl2;
+};
+ClippingPolygonCollection.getTextureResolution = function(e, t, n) {
+ if (defined(e))
+ return n.x = e.width, n.y = e.height, n;
+ const i = ContextLimits.maximumTextureSize;
+ return n.x = Math.min(t, i), n.y = Math.ceil(t / n.x), n.y *= 2, n;
+};
+ClippingPolygonCollection.getClippingDistanceTextureResolution = function(e, t) {
+ const n = e.signedDistanceTexture;
+ return defined(n) ? (t.x = n.width, t.y = n.height, t) : (t.x = Math.min(ContextLimits.maximumTextureSize, 4096), t.y = Math.min(ContextLimits.maximumTextureSize, 4096), t);
+};
+ClippingPolygonCollection.getClippingExtentsTextureResolution = function(e, t) {
+ const n = e.extentsTexture;
+ return defined(n) ? (t.x = n.width, t.y = n.height, t) : ClippingPolygonCollection.getTextureResolution(
+ n,
+ e.pixelsNeededForExtents,
+ t
+ );
+};
+ClippingPolygonCollection.prototype.isDestroyed = function() {
+ return !1;
+};
+ClippingPolygonCollection.prototype.destroy = function() {
+ return defined(this._signedDistanceComputeCommand) && (this._signedDistanceComputeCommand.canceled = !0), this._polygonsTexture = this._polygonsTexture && this._polygonsTexture.destroy(), this._extentsTexture = this._extentsTexture && this._extentsTexture.destroy(), this._signedDistanceTexture = this._signedDistanceTexture && this._signedDistanceTexture.destroy(), destroyObject(this);
+};
+const ColorBlendMode = {
+ HIGHLIGHT: 0,
+ REPLACE: 1,
+ MIX: 2
+};
+ColorBlendMode.getColorBlend = function(e, t) {
+ if (e === ColorBlendMode.HIGHLIGHT)
+ return 0;
+ if (e === ColorBlendMode.REPLACE)
+ return 1;
+ if (e === ColorBlendMode.MIX)
+ return CesiumMath.clamp(t, CesiumMath.EPSILON4, 1);
+};
+const ColorBlendMode$1 = Object.freeze(ColorBlendMode), ArticulationStageType = {
+ XTRANSLATE: "xTranslate",
+ YTRANSLATE: "yTranslate",
+ ZTRANSLATE: "zTranslate",
+ XROTATE: "xRotate",
+ YROTATE: "yRotate",
+ ZROTATE: "zRotate",
+ XSCALE: "xScale",
+ YSCALE: "yScale",
+ ZSCALE: "zScale",
+ UNIFORMSCALE: "uniformScale"
+}, ArticulationStageType$1 = Object.freeze(ArticulationStageType), InterpolationType = {
+ STEP: 0,
+ LINEAR: 1,
+ CUBICSPLINE: 2
+}, InterpolationType$1 = Object.freeze(InterpolationType), emptyClass = {};
+function JsonMetadataTable(e) {
+ this._count = e.count, this._properties = clone$1(e.properties, !0);
+}
+JsonMetadataTable.prototype.hasProperty = function(e) {
+ return MetadataEntity.hasProperty(e, this._properties, emptyClass);
+};
+JsonMetadataTable.prototype.getPropertyIds = function(e) {
+ return MetadataEntity.getPropertyIds(this._properties, emptyClass, e);
+};
+JsonMetadataTable.prototype.getProperty = function(e, t) {
+ const n = this._properties[t];
+ if (defined(n))
+ return clone$1(n[e], !0);
+};
+JsonMetadataTable.prototype.setProperty = function(e, t, n) {
+ let i = this._properties[t];
+ defined(i) || (i = new Array(this._count), this._properties[t] = i), i[e] = clone$1(n, !0);
+};
+function PropertyTable(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._name = e.name, this._id = e.id, this._count = e.count, this._extras = e.extras, this._extensions = e.extensions, this._metadataTable = e.metadataTable, this._jsonMetadataTable = e.jsonMetadataTable, this._batchTableHierarchy = e.batchTableHierarchy;
+}
+Object.defineProperties(PropertyTable.prototype, {
+ /**
+ * A human-readable name for this table
+ *
+ * @memberof PropertyTable.prototype
+ * @type {string}
+ * @readonly
+ * @private
+ */
+ name: {
+ get: function() {
+ return this._name;
+ }
+ },
+ /**
+ * An identifier for this table. Useful for debugging.
+ *
+ * @memberof PropertyTable.prototype
+ * @type {string|number}
+ * @readonly
+ * @private
+ */
+ id: {
+ get: function() {
+ return this._id;
+ }
+ },
+ /**
+ * The number of features in the table.
+ *
+ * @memberof PropertyTable.prototype
+ * @type {number}
+ * @readonly
+ * @private
+ */
+ count: {
+ get: function() {
+ return this._count;
+ }
+ },
+ /**
+ * The class that properties conform to.
+ *
+ * @memberof PropertyTable.prototype
+ * @type {MetadataClass}
+ * @readonly
+ */
+ class: {
+ get: function() {
+ if (defined(this._metadataTable))
+ return this._metadataTable.class;
+ }
+ },
+ /**
+ * Extra user-defined properties.
+ *
+ * @memberof PropertyTable.prototype
+ * @type {*}
+ * @readonly
+ * @private
+ */
+ extras: {
+ get: function() {
+ return this._extras;
+ }
+ },
+ /**
+ * An object containing extensions.
+ *
+ * @memberof PropertyTable.prototype
+ * @type {object}
+ * @readonly
+ * @private
+ */
+ extensions: {
+ get: function() {
+ return this._extensions;
+ }
+ },
+ /**
+ * Get the total amount of binary metadata stored in memory. This does
+ * not include JSON metadata
+ *
+ * @memberof PropertyTable.prototype
+ * @type {number}
+ * @readonly
+ * @private
+ */
+ byteLength: {
+ get: function() {
+ let e = 0;
+ return defined(this._metadataTable) && (e += this._metadataTable.byteLength), defined(this._batchTableHierarchy) && (e += this._batchTableHierarchy.byteLength), e;
+ }
+ }
+});
+PropertyTable.prototype.hasProperty = function(e, t) {
+ return !!(defined(this._metadataTable) && this._metadataTable.hasProperty(t) || defined(this._batchTableHierarchy) && this._batchTableHierarchy.hasProperty(e, t) || defined(this._jsonMetadataTable) && this._jsonMetadataTable.hasProperty(t));
+};
+PropertyTable.prototype.hasPropertyBySemantic = function(e, t) {
+ return defined(this._metadataTable) ? this._metadataTable.hasPropertyBySemantic(t) : !1;
+};
+PropertyTable.prototype.propertyExists = function(e) {
+ return !!(defined(this._metadataTable) && this._metadataTable.hasProperty(e) || defined(this._batchTableHierarchy) && this._batchTableHierarchy.propertyExists(e) || defined(this._jsonMetadataTable) && this._jsonMetadataTable.hasProperty(e));
+};
+PropertyTable.prototype.propertyExistsBySemantic = function(e) {
+ return defined(this._metadataTable) ? this._metadataTable.hasPropertyBySemantic(e) : !1;
+};
+const scratchResults = [];
+PropertyTable.prototype.getPropertyIds = function(e, t) {
+ return t = defined(t) ? t : [], t.length = 0, defined(this._metadataTable) && t.push.apply(
+ t,
+ this._metadataTable.getPropertyIds(scratchResults)
+ ), defined(this._batchTableHierarchy) && t.push.apply(
+ t,
+ this._batchTableHierarchy.getPropertyIds(e, scratchResults)
+ ), defined(this._jsonMetadataTable) && t.push.apply(
+ t,
+ this._jsonMetadataTable.getPropertyIds(scratchResults)
+ ), t;
+};
+PropertyTable.prototype.getProperty = function(e, t) {
+ let n;
+ if (defined(this._metadataTable) && (n = this._metadataTable.getProperty(e, t), defined(n)) || defined(this._batchTableHierarchy) && (n = this._batchTableHierarchy.getProperty(e, t), defined(n)) || defined(this._jsonMetadataTable) && (n = this._jsonMetadataTable.getProperty(e, t), defined(n)))
+ return n;
+};
+PropertyTable.prototype.setProperty = function(e, t, n) {
+ defined(this._metadataTable) && this._metadataTable.setProperty(e, t, n) || defined(this._batchTableHierarchy) && this._batchTableHierarchy.setProperty(e, t, n) || (defined(this._jsonMetadataTable) || (this._jsonMetadataTable = new JsonMetadataTable({
+ count: this._count,
+ properties: {}
+ })), this._jsonMetadataTable.setProperty(e, t, n));
+};
+PropertyTable.prototype.getPropertyBySemantic = function(e, t) {
+ if (defined(this._metadataTable))
+ return this._metadataTable.getPropertyBySemantic(e, t);
+};
+PropertyTable.prototype.setPropertyBySemantic = function(e, t, n) {
+ return defined(this._metadataTable) ? this._metadataTable.setPropertyBySemantic(e, t, n) : !1;
+};
+PropertyTable.prototype.getPropertyTypedArray = function(e) {
+ if (defined(this._metadataTable))
+ return this._metadataTable.getPropertyTypedArray(e);
+};
+PropertyTable.prototype.getPropertyTypedArrayBySemantic = function(e) {
+ if (defined(this._metadataTable))
+ return this._metadataTable.getPropertyTypedArrayBySemantic(e);
+};
+PropertyTable.prototype.isClass = function(e, t) {
+ const n = this._batchTableHierarchy;
+ return defined(n) ? n.isClass(e, t) : !1;
+};
+PropertyTable.prototype.isExactClass = function(e, t) {
+ return this.getExactClassName(e) === t;
+};
+PropertyTable.prototype.getExactClassName = function(e) {
+ const t = this._batchTableHierarchy;
+ if (defined(t))
+ return t.getClassName(e);
+};
+function PropertyTextureProperty(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.property, n = e.classProperty, i = e.textures, r = defined(t.channels) ? t.channels : [0], o = t, s = GltfLoaderUtil.createModelTextureReader({
+ textureInfo: o,
+ channels: reformatChannels$1(r),
+ texture: i[o.index]
+ });
+ this._min = t.min, this._max = t.max;
+ let c = t.offset, l = t.scale;
+ const d = n.hasValueTransform || defined(c) || defined(l);
+ c = defaultValue(c, n.offset), l = defaultValue(l, n.scale), c = n.unpackVectorAndMatrixTypes(c), l = n.unpackVectorAndMatrixTypes(l), this._offset = c, this._scale = l, this._hasValueTransform = d, this._textureReader = s, this._classProperty = n, this._extras = t.extras, this._extensions = t.extensions;
+}
+Object.defineProperties(PropertyTextureProperty.prototype, {
+ /**
+ * The texture reader.
+ *
+ * @memberof PropertyTextureProperty.prototype
+ * @type {ModelComponents.TextureReader}
+ * @readonly
+ * @private
+ */
+ textureReader: {
+ get: function() {
+ return this._textureReader;
+ }
+ },
+ /**
+ * True if offset/scale should be applied. If both offset/scale were
+ * undefined, they default to identity so this property is set false
+ *
+ * @memberof PropertyTextureProperty.prototype
+ * @type {boolean}
+ * @readonly
+ * @private
+ */
+ hasValueTransform: {
+ get: function() {
+ return this._hasValueTransform;
+ }
+ },
+ /**
+ * The offset to be added to property values as part of the value transform.
+ *
+ * @memberof PropertyTextureProperty.prototype
+ * @type {number|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4}
+ * @readonly
+ * @private
+ */
+ offset: {
+ get: function() {
+ return this._offset;
+ }
+ },
+ /**
+ * The scale to be multiplied to property values as part of the value transform.
+ *
+ * @memberof PropertyTextureProperty.prototype
+ * @type {number|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4}
+ * @readonly
+ * @private
+ */
+ scale: {
+ get: function() {
+ return this._scale;
+ }
+ },
+ /**
+ * The properties inherited from this property's class
+ *
+ * @memberof PropertyTextureProperty.prototype
+ * @type {MetadataClassProperty}
+ * @readonly
+ * @private
+ */
+ classProperty: {
+ get: function() {
+ return this._classProperty;
+ }
+ },
+ /**
+ * Extra user-defined properties.
+ *
+ * @memberof PropertyTextureProperty.prototype
+ * @type {*}
+ * @readonly
+ * @private
+ */
+ extras: {
+ get: function() {
+ return this._extras;
+ }
+ },
+ /**
+ * An object containing extensions.
+ *
+ * @memberof PropertyTextureProperty.prototype
+ * @type {*}
+ * @readonly
+ * @private
+ */
+ extensions: {
+ get: function() {
+ return this._extensions;
+ }
+ }
+});
+PropertyTextureProperty.prototype.isGpuCompatible = function() {
+ const e = this._classProperty, t = e.type, n = e.componentType;
+ return e.isArray ? !e.isVariableLengthArray && e.arrayLength <= 4 && t === MetadataType$1.SCALAR && n === MetadataComponentType$1.UINT8 : MetadataType$1.isVectorType(t) || t === MetadataType$1.SCALAR ? n === MetadataComponentType$1.UINT8 : !1;
+};
+const floatTypesByComponentCount = [void 0, "float", "vec2", "vec3", "vec4"], integerTypesByComponentCount = [
+ void 0,
+ "int",
+ "ivec2",
+ "ivec3",
+ "ivec4"
+];
+PropertyTextureProperty.prototype.getGlslType = function() {
+ const e = this._classProperty;
+ let t = MetadataType$1.getComponentCount(e.type);
+ return e.isArray && (t = e.arrayLength), e.normalized ? floatTypesByComponentCount[t] : integerTypesByComponentCount[t];
+};
+PropertyTextureProperty.prototype.unpackInShader = function(e) {
+ return this._classProperty.normalized ? e : `${this.getGlslType()}(255.0 * ${e})`;
+};
+function reformatChannels$1(e) {
+ return e.map(function(t) {
+ return "rgba".charAt(t);
+ }).join("");
+}
+function PropertyTexture(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.propertyTexture, n = e.class, i = e.textures, r = t.extensions, o = t.extras, s = {};
+ if (defined(t.properties))
+ for (const c in t.properties)
+ t.properties.hasOwnProperty(c) && (s[c] = new PropertyTextureProperty({
+ property: t.properties[c],
+ classProperty: n.properties[c],
+ textures: i
+ }));
+ this._name = e.name, this._id = e.id, this._class = n, this._properties = s, this._extras = o, this._extensions = r;
+}
+Object.defineProperties(PropertyTexture.prototype, {
+ /**
+ * A human-readable name for this texture
+ *
+ * @memberof PropertyTexture.prototype
+ * @type {string}
+ * @readonly
+ * @private
+ */
+ name: {
+ get: function() {
+ return this._name;
+ }
+ },
+ /**
+ * An identifier for this texture. Useful for debugging.
+ *
+ * @memberof PropertyTexture.prototype
+ * @type {string|number}
+ * @readonly
+ * @private
+ */
+ id: {
+ get: function() {
+ return this._id;
+ }
+ },
+ /**
+ * The class that properties conform to.
+ *
+ * @memberof PropertyTexture.prototype
+ * @type {MetadataClass}
+ * @readonly
+ * @private
+ */
+ class: {
+ get: function() {
+ return this._class;
+ }
+ },
+ /**
+ * The properties in this property texture.
+ *
+ * @memberof PropertyTexture.prototype
+ *
+ * @type {PropertyTextureProperty}
+ * @readonly
+ * @private
+ */
+ properties: {
+ get: function() {
+ return this._properties;
+ }
+ },
+ /**
+ * Extra user-defined properties.
+ *
+ * @memberof PropertyTexture.prototype
+ * @type {*}
+ * @readonly
+ * @private
+ */
+ extras: {
+ get: function() {
+ return this._extras;
+ }
+ },
+ /**
+ * An object containing extensions.
+ *
+ * @memberof PropertyTexture.prototype
+ * @type {object}
+ * @readonly
+ * @private
+ */
+ extensions: {
+ get: function() {
+ return this._extensions;
+ }
+ }
+});
+PropertyTexture.prototype.getProperty = function(e) {
+ return this._properties[e];
+};
+function PropertyAttributeProperty(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.property, n = e.classProperty;
+ this._attribute = t.attribute, this._classProperty = n, this._min = t.min, this._max = t.max;
+ let i = t.offset, r = t.scale;
+ const o = n.hasValueTransform || defined(i) || defined(r);
+ i = defaultValue(i, n.offset), r = defaultValue(r, n.scale), i = n.unpackVectorAndMatrixTypes(i), r = n.unpackVectorAndMatrixTypes(r), this._offset = i, this._scale = r, this._hasValueTransform = o, this._extras = t.extras, this._extensions = t.extensions;
+}
+Object.defineProperties(PropertyAttributeProperty.prototype, {
+ /**
+ * The attribute semantic
+ *
+ * @memberof PropertyAttributeProperty.prototype
+ * @type {string}
+ * @readonly
+ * @private
+ */
+ attribute: {
+ get: function() {
+ return this._attribute;
+ }
+ },
+ /**
+ * True if offset/scale should be applied. If both offset/scale were
+ * undefined, they default to identity so this property is set false
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {boolean}
+ * @readonly
+ * @private
+ */
+ hasValueTransform: {
+ get: function() {
+ return this._hasValueTransform;
+ }
+ },
+ /**
+ * The offset to be added to property values as part of the value transform.
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {number|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4}
+ * @readonly
+ * @private
+ */
+ offset: {
+ get: function() {
+ return this._offset;
+ }
+ },
+ /**
+ * The scale to be multiplied to property values as part of the value transform.
+ *
+ * @memberof MetadataClassProperty.prototype
+ * @type {number|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4}
+ * @readonly
+ * @private
+ */
+ scale: {
+ get: function() {
+ return this._scale;
+ }
+ },
+ /**
+ * The properties inherited from this property's class
+ *
+ * @memberof PropertyAttributeProperty.prototype
+ * @type {MetadataClassProperty}
+ * @readonly
+ * @private
+ */
+ classProperty: {
+ get: function() {
+ return this._classProperty;
+ }
+ },
+ /**
+ * Extra user-defined properties.
+ *
+ * @memberof PropertyAttributeProperty.prototype
+ * @type {*}
+ * @readonly
+ * @private
+ */
+ extras: {
+ get: function() {
+ return this._extras;
+ }
+ },
+ /**
+ * An object containing extensions.
+ *
+ * @memberof PropertyAttributeProperty.prototype
+ * @type {*}
+ * @readonly
+ * @private
+ */
+ extensions: {
+ get: function() {
+ return this._extensions;
+ }
+ }
+});
+function PropertyAttribute(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.propertyAttribute, n = e.class, i = {};
+ if (defined(t.properties))
+ for (const r in t.properties)
+ t.properties.hasOwnProperty(r) && (i[r] = new PropertyAttributeProperty({
+ property: t.properties[r],
+ classProperty: n.properties[r]
+ }));
+ this._name = e.name, this._id = e.id, this._class = n, this._properties = i, this._extras = t.extras, this._extensions = t.extensions;
+}
+Object.defineProperties(PropertyAttribute.prototype, {
+ /**
+ * A human-readable name for this attribute
+ *
+ * @memberof PropertyAttribute.prototype
+ *
+ * @type {string}
+ * @readonly
+ * @private
+ */
+ name: {
+ get: function() {
+ return this._name;
+ }
+ },
+ /**
+ * An identifier for this attribute. Useful for debugging.
+ *
+ * @memberof PropertyAttribute.prototype
+ *
+ * @type {string|number}
+ * @readonly
+ * @private
+ */
+ id: {
+ get: function() {
+ return this._id;
+ }
+ },
+ /**
+ * The class that properties conform to.
+ *
+ * @memberof PropertyAttribute.prototype
+ *
+ * @type {MetadataClass}
+ * @readonly
+ * @private
+ */
+ class: {
+ get: function() {
+ return this._class;
+ }
+ },
+ /**
+ * The properties in this property attribute.
+ *
+ * @memberof PropertyAttribute.prototype
+ *
+ * @type {Object+ * See the {@link https://github.com/CesiumGS/glTF/blob/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata/schema/statistics.schema.json|statistics schema reference} for the full set of properties. + *
+ * + * @memberof StructuralMetadata.prototype + * @type {object} + * @readonly + * @private + */ + statistics: { + get: function() { + return this._statistics; + } + }, + /** + * Extra user-defined properties. + * + * @memberof StructuralMetadata.prototype + * @type {*} + * @readonly + * @private + */ + extras: { + get: function() { + return this._extras; + } + }, + /** + * An object containing extensions. + * + * @memberof StructuralMetadata.prototype + * @type {object} + * @readonly + * @private + */ + extensions: { + get: function() { + return this._extensions; + } + }, + /** + * Number of property tables in the metadata. + * + * @memberof StructuralMetadata.prototype + * @type {number} + * @readonly + * @private + */ + propertyTableCount: { + get: function() { + return this._propertyTableCount; + } + }, + /** + * The property tables in the metadata. + * + * @memberof StructuralMetadata.prototype + * @type {PropertyTable[]} + * @readonly + * @private + */ + propertyTables: { + get: function() { + return this._propertyTables; + } + }, + /** + * The property textures in the metadata. + * + * @memberof StructuralMetadata.prototype + * @type {PropertyTexture[]} + * @readonly + * @private + */ + propertyTextures: { + get: function() { + return this._propertyTextures; + } + }, + /** + * The property attributes from the structural metadata extension + * + * @memberof StructuralMetadata.prototype + * @type {PropertyAttribute[]} + * @readonly + * @private + */ + propertyAttributes: { + get: function() { + return this._propertyAttributes; + } + }, + /** + * Total size in bytes across all property tables + * + * @memberof StructuralMetadata.prototype + * @type {number} + * @readonly + * @private + */ + propertyTablesByteLength: { + get: function() { + if (!defined(this._propertyTables)) + return 0; + let e = 0; + const t = this._propertyTables.length; + for (let n = 0; n < t; n++) + e += this._propertyTables[n].byteLength; + return e; + } + } +}); +StructuralMetadata.prototype.getPropertyTable = function(e) { + return this._propertyTables[e]; +}; +StructuralMetadata.prototype.getPropertyTexture = function(e) { + return this._propertyTextures[e]; +}; +StructuralMetadata.prototype.getPropertyAttribute = function(e) { + return this._propertyAttributes[e]; +}; +function parseStructuralMetadata(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.extension, n = e.schema, i = []; + if (defined(t.propertyTables)) + for (let s = 0; s < t.propertyTables.length; s++) { + const c = t.propertyTables[s], l = n.classes[c.class], d = new MetadataTable({ + count: c.count, + properties: c.properties, + class: l, + bufferViews: e.bufferViews + }); + i.push( + new PropertyTable({ + id: s, + name: c.name, + count: c.count, + metadataTable: d, + extras: c.extras, + extensions: c.extensions + }) + ); + } + const r = []; + if (defined(t.propertyTextures)) + for (let s = 0; s < t.propertyTextures.length; s++) { + const c = t.propertyTextures[s]; + r.push( + new PropertyTexture({ + id: s, + name: c.name, + propertyTexture: c, + class: n.classes[c.class], + textures: e.textures + }) + ); + } + const o = []; + if (defined(t.propertyAttributes)) + for (let s = 0; s < t.propertyAttributes.length; s++) { + const c = t.propertyAttributes[s]; + o.push( + new PropertyAttribute({ + id: s, + name: c.name, + class: n.classes[c.class], + propertyAttribute: c + }) + ); + } + return new StructuralMetadata({ + schema: n, + propertyTables: i, + propertyTextures: r, + propertyAttributes: o, + statistics: t.statistics, + extras: t.extras, + extensions: t.extensions + }); +} +function parseFeatureMetadataLegacy(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.extension, n = e.schema; + let i; + const r = []; + let o; + if (defined(t.featureTables)) + for (o = Object.keys(t.featureTables).sort(), i = 0; i < o.length; i++) { + const c = o[i], l = t.featureTables[c], d = n.classes[l.class], f = new MetadataTable({ + count: l.count, + properties: l.properties, + class: d, + bufferViews: e.bufferViews + }); + r.push( + new PropertyTable({ + id: c, + count: l.count, + metadataTable: f, + extras: l.extras, + extensions: l.extensions + }) + ); + } + const s = []; + if (defined(t.featureTextures)) + for (o = Object.keys(t.featureTextures).sort(), i = 0; i < o.length; i++) { + const c = o[i], l = t.featureTextures[c]; + s.push( + new PropertyTexture({ + id: c, + propertyTexture: transcodeToPropertyTexture(l), + class: n.classes[l.class], + textures: e.textures + }) + ); + } + return new StructuralMetadata({ + schema: n, + propertyTables: r, + propertyTextures: s, + statistics: t.statistics, + extras: t.extras, + extensions: t.extensions + }); +} +function transcodeToPropertyTexture(e) { + const t = { + class: e.class, + properties: {} + }, n = e.properties; + for (const i in n) + if (n.hasOwnProperty(i)) { + const r = n[i], o = { + // EXT_structural_metadata uses numeric channel indices instead of + // a string of channel letters like "rgba". + channels: reformatChannels(r.channels), + extras: r.extras, + extensions: r.extensions + }; + t.properties[i] = combine$2( + r.texture, + o, + !0 + ); + } + return t; +} +function reformatChannels(e) { + const t = e.length, n = new Array(t); + for (let i = 0; i < t; i++) + n[i] = "rgba".indexOf(e[i]); + return n; +} +function GltfStructuralMetadataLoader(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const { + gltf: t, + extension: n, + extensionLegacy: i, + gltfResource: r, + baseResource: o, + supportedImageFormats: s, + frameState: c, + cacheKey: l, + asynchronous: d = !0 + } = e; + this._gltfResource = r, this._baseResource = o, this._gltf = t, this._extension = n, this._extensionLegacy = i, this._supportedImageFormats = s, this._frameState = c, this._cacheKey = l, this._asynchronous = d, this._bufferViewLoaders = [], this._bufferViewIds = [], this._textureLoaders = [], this._textureIds = [], this._schemaLoader = void 0, this._structuralMetadata = void 0, this._state = ResourceLoaderState$1.UNLOADED, this._promise = void 0; +} +defined(Object.create) && (GltfStructuralMetadataLoader.prototype = Object.create( + ResourceLoader.prototype +), GltfStructuralMetadataLoader.prototype.constructor = GltfStructuralMetadataLoader); +Object.defineProperties(GltfStructuralMetadataLoader.prototype, { + /** + * The cache key of the resource. + * + * @memberof GltfStructuralMetadataLoader.prototype + * + * @type {string} + * @readonly + * @private + */ + cacheKey: { + get: function() { + return this._cacheKey; + } + }, + /** + * The parsed structural metadata + * + * @memberof GltfStructuralMetadataLoader.prototype + * + * @type {StructuralMetadata} + * @readonly + * @private + */ + structuralMetadata: { + get: function() { + return this._structuralMetadata; + } + } +}); +async function loadResources$1(e) { + try { + const t = loadBufferViews(e), n = loadTextures(e), i = loadSchema(e); + return await Promise.all([t, n, i]), e.isDestroyed() ? void 0 : (e._gltf = void 0, e._state = ResourceLoaderState$1.LOADED, e); + } catch (t) { + if (e.isDestroyed()) + return; + throw e.unload(), e._state = ResourceLoaderState$1.FAILED, e.getError("Failed to load structural metadata", t); + } +} +GltfStructuralMetadataLoader.prototype.load = function() { + return defined(this._promise) ? this._promise : (this._state = ResourceLoaderState$1.LOADING, this._promise = loadResources$1(this), this._promise); +}; +function gatherBufferViewIdsFromProperties(e, t) { + for (const n in e) + if (e.hasOwnProperty(n)) { + const i = e[n], r = i.values, o = i.arrayOffsets, s = i.stringOffsets; + defined(r) && (t[r] = !0), defined(o) && (t[o] = !0), defined(s) && (t[s] = !0); + } +} +function gatherBufferViewIdsFromPropertiesLegacy(e, t) { + for (const n in e) + if (e.hasOwnProperty(n)) { + const i = e[n], r = i.bufferView, o = i.arrayOffsetBufferView, s = i.stringOffsetBufferView; + defined(r) && (t[r] = !0), defined(o) && (t[o] = !0), defined(s) && (t[s] = !0); + } +} +function gatherUsedBufferViewIds(e) { + const t = e.propertyTables, n = {}; + if (defined(t)) + for (let i = 0; i < t.length; i++) { + const r = t[i]; + gatherBufferViewIdsFromProperties( + r.properties, + n + ); + } + return n; +} +function gatherUsedBufferViewIdsLegacy(e) { + const t = e.featureTables, n = {}; + if (defined(t)) { + for (const i in t) + if (t.hasOwnProperty(i)) { + const o = t[i].properties; + defined(o) && gatherBufferViewIdsFromPropertiesLegacy(o, n); + } + } + return n; +} +async function loadBufferViews(e) { + let t; + defined(e._extension) ? t = gatherUsedBufferViewIds( + e._extension + ) : t = gatherUsedBufferViewIdsLegacy( + e._extensionLegacy + ); + const n = []; + for (const i in t) + if (t.hasOwnProperty(i)) { + const r = ResourceCache.getBufferViewLoader({ + gltf: e._gltf, + bufferViewId: parseInt(i), + gltfResource: e._gltfResource, + baseResource: e._baseResource + }); + e._bufferViewLoaders.push(r), e._bufferViewIds.push(i), n.push(r.load()); + } + return Promise.all(n); +} +function gatherUsedTextureIds(e) { + const t = {}, n = e.propertyTextures; + if (defined(n)) + for (let i = 0; i < n.length; i++) { + const o = n[i].properties; + defined(o) && gatherTextureIdsFromProperties(o, t); + } + return t; +} +function gatherTextureIdsFromProperties(e, t) { + for (const n in e) + if (e.hasOwnProperty(n)) { + const i = e[n]; + t[i.index] = i; + } +} +function gatherUsedTextureIdsLegacy(e) { + const t = {}, n = e.featureTextures; + if (defined(n)) { + for (const i in n) + if (n.hasOwnProperty(i)) { + const o = n[i].properties; + defined(o) && gatherTextureIdsFromPropertiesLegacy(o, t); + } + } + return t; +} +function gatherTextureIdsFromPropertiesLegacy(e, t) { + for (const n in e) + if (e.hasOwnProperty(n)) { + const r = e[n].texture; + t[r.index] = r; + } +} +function loadTextures(e) { + let t; + defined(e._extension) ? t = gatherUsedTextureIds(e._extension) : t = gatherUsedTextureIdsLegacy( + e._extensionLegacy + ); + const n = e._gltf, i = e._gltfResource, r = e._baseResource, o = e._supportedImageFormats, s = e._frameState, c = e._asynchronous, l = []; + for (const d in t) + if (t.hasOwnProperty(d)) { + const f = ResourceCache.getTextureLoader({ + gltf: n, + textureInfo: t[d], + gltfResource: i, + baseResource: r, + supportedImageFormats: o, + frameState: s, + asynchronous: c + }); + e._textureLoaders.push(f), e._textureIds.push(d), l.push(f.load()); + } + return Promise.all(l); +} +async function loadSchema(e) { + const t = defaultValue( + e._extension, + e._extensionLegacy + ); + let n; + if (defined(t.schemaUri)) { + const i = e._baseResource.getDerivedResource({ + url: t.schemaUri + }); + n = ResourceCache.getSchemaLoader({ + resource: i + }); + } else + n = ResourceCache.getSchemaLoader({ + schema: t.schema + }); + if (e._schemaLoader = n, await n.load(), !n.isDestroyed()) + return n.schema; +} +GltfStructuralMetadataLoader.prototype.process = function(e) { + if (this._state === ResourceLoaderState$1.READY) + return !0; + if (this._state !== ResourceLoaderState$1.LOADED) + return !1; + const t = this._textureLoaders, n = t.length; + let i = !0; + for (let c = 0; c < n; ++c) { + const d = t[c].process(e); + i = i && d; + } + if (!i) + return !1; + const r = this._schemaLoader.schema, o = {}; + for (let c = 0; c < this._bufferViewIds.length; ++c) { + const l = this._bufferViewIds[c], d = this._bufferViewLoaders[c]; + if (!d.isDestroyed()) { + const f = new Uint8Array(d.typedArray); + o[l] = f; + } + } + const s = {}; + for (let c = 0; c < this._textureIds.length; ++c) { + const l = this._textureIds[c], d = t[c]; + d.isDestroyed() || (s[l] = d.texture); + } + return defined(this._extension) ? this._structuralMetadata = parseStructuralMetadata({ + extension: this._extension, + schema: r, + bufferViews: o, + textures: s + }) : this._structuralMetadata = parseFeatureMetadataLegacy({ + extension: this._extensionLegacy, + schema: r, + bufferViews: o, + textures: s + }), unloadBufferViews(this), this._state = ResourceLoaderState$1.READY, !0; +}; +function unloadBufferViews(e) { + const t = e._bufferViewLoaders, n = t.length; + for (let i = 0; i < n; ++i) + ResourceCache.unload(t[i]); + e._bufferViewLoaders.length = 0, e._bufferViewIds.length = 0; +} +function unloadTextures$1(e) { + const t = e._textureLoaders, n = t.length; + for (let i = 0; i < n; ++i) + ResourceCache.unload(t[i]); + e._textureLoaders.length = 0, e._textureIds.length = 0; +} +GltfStructuralMetadataLoader.prototype.unload = function() { + unloadBufferViews(this), unloadTextures$1(this), defined(this._schemaLoader) && ResourceCache.unload(this._schemaLoader), this._schemaLoader = void 0, this._structuralMetadata = void 0; +}; +const InstanceAttributeSemantic = { + /** + * Per-instance translation. + * + * @type {string} + * @constant + */ + TRANSLATION: "TRANSLATION", + /** + * Per-instance rotation. + * + * @type {string} + * @constant + */ + ROTATION: "ROTATION", + /** + * Per-instance scale. + * + * @type {string} + * @constant + */ + SCALE: "SCALE", + /** + * Per-instance feature ID. + * + * @type {string} + * @constant + */ + FEATURE_ID: "_FEATURE_ID" +}; +InstanceAttributeSemantic.fromGltfSemantic = function(e) { + let t = e; + const i = /^(\w+)_\d+$/.exec(e); + switch (i !== null && (t = i[1]), t) { + case "TRANSLATION": + return InstanceAttributeSemantic.TRANSLATION; + case "ROTATION": + return InstanceAttributeSemantic.ROTATION; + case "SCALE": + return InstanceAttributeSemantic.SCALE; + case "_FEATURE_ID": + return InstanceAttributeSemantic.FEATURE_ID; + } +}; +const InstanceAttributeSemantic$1 = Object.freeze(InstanceAttributeSemantic), MAX_GLTF_UINT16_INDEX = 65534, MAX_GLTF_UINT8_INDEX = 255; +function PrimitiveOutlineGenerator(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.triangleIndices, n = e.outlineIndices, i = e.originalVertexCount; + this._triangleIndices = t, this._originalVertexCount = i, this._edges = new EdgeSet(n, i), this._outlineCoordinatesTypedArray = void 0, this._extraVertices = [], initialize$d(this); +} +Object.defineProperties(PrimitiveOutlineGenerator.prototype, { + /** + * The updated triangle indices after generating outlines. The caller is for + * responsible for updating the primitive's indices to use this array. + * + * @memberof PrimitiveOutlineGenerator.prototype + * + * @type {Uint8Array|Uint16Array|Uint32Array} + * @readonly + * + * @private + */ + updatedTriangleIndices: { + get: function() { + return this._triangleIndices; + } + }, + /** + * The computed outline coordinates. The caller is responsible for + * turning this into a vec3 attribute for rendering. + * + * @memberof PrimitiveOutlineGenerator.prototype + * + * @type {Float32Array} + * @readonly + * + * @private + */ + outlineCoordinates: { + get: function() { + return this._outlineCoordinatesTypedArray; + } + } +}); +function initialize$d(e) { + let t = e._triangleIndices; + const n = e._edges, i = [], r = e._extraVertices, o = e._originalVertexCount, s = {}; + for (let c = 0; c < t.length; c += 3) { + let l = t[c], d = t[c + 1], f = t[c + 2]; + const h = n.hasEdge(l, d), p = n.hasEdge(d, f), m = n.hasEdge(f, l); + let _ = matchAndStoreCoordinates( + i, + l, + d, + f, + h, + p, + m + ); + for (; defined(_); ) { + let y = s[_]; + if (!defined(y)) { + y = o + r.length; + let C = _; + for (; C >= o; ) + C = r[C - o]; + r.push(C), s[_] = y; + } + y > MAX_GLTF_UINT16_INDEX && (t instanceof Uint16Array || t instanceof Uint8Array) ? t = new Uint32Array(t) : y > MAX_GLTF_UINT8_INDEX && t instanceof Uint8Array && (t = new Uint16Array(t)), _ === l ? (l = y, t[c] = y) : _ === d ? (d = y, t[c + 1] = y) : (f = y, t[c + 2] = y), _ = matchAndStoreCoordinates( + i, + l, + d, + f, + h, + p, + m + ); + } + } + e._triangleIndices = t, e._outlineCoordinatesTypedArray = new Float32Array( + i + ); +} +function matchAndStoreCoordinates(e, t, n, i, r, o, s) { + const c = s ? 1 : 0, l = r ? 1 : 0, d = 0, f = computeOrderMask(e, t, c, l, d); + if (f === 0) + return t; + const h = 0, p = r ? 1 : 0, m = o ? 1 : 0, _ = computeOrderMask(e, n, h, p, m); + if (_ === 0) + return n; + const y = s ? 1 : 0, C = 0, T = o ? 1 : 0, x = computeOrderMask(e, i, y, C, T); + if (x === 0) + return i; + const b = f & _ & x; + let S, E, A; + if (b & 1) + S = 0, E = 1, A = 2; + else if (b & 2) + S = 0, A = 1, E = 2; + else if (b & 4) + E = 0, S = 1, A = 2; + else if (b & 8) + E = 0, A = 1, S = 2; + else if (b & 16) + A = 0, S = 1, E = 2; + else if (b & 32) + A = 0, E = 1, S = 2; + else { + const M = popcount6Bit(f), R = popcount6Bit(_), L = popcount6Bit(x); + return M < R && M < L ? t : R < L ? n : i; + } + const D = t * 3; + e[D + S] = c, e[D + E] = l, e[D + A] = d; + const P = n * 3; + e[P + S] = h, e[P + E] = p, e[P + A] = m; + const I = i * 3; + e[I + S] = y, e[I + E] = C, e[I + A] = T; +} +function computeOrderMask(e, t, n, i, r) { + const o = t * 3, s = e[o], c = e[o + 1], l = e[o + 2]; + return defined(s) ? (s === n && c === i && l === r) << 0 | (s === n && c === r && l === i) << 1 | (s === i && c === n && l === r) << 2 | (s === i && c === r && l === n) << 3 | (s === r && c === n && l === i) << 4 | (s === r && c === i && l === n) << 5 : 63; +} +function popcount6Bit(e) { + return (e & 1) + (e >> 1 & 1) + (e >> 2 & 1) + (e >> 3 & 1) + (e >> 4 & 1) + (e >> 5 & 1); +} +PrimitiveOutlineGenerator.prototype.updateAttribute = function(e) { + const t = this._extraVertices, n = e.length, i = n / this._originalVertexCount, r = t.length, o = e.constructor, s = new o( + e.length + r * i + ); + s.set(e); + for (let c = 0; c < r; c++) { + const l = t[c] * i, d = n + c * i; + for (let f = 0; f < i; f++) + s[d + f] = s[l + f]; + } + return s; +}; +PrimitiveOutlineGenerator.createTexture = function(e) { + let t = e.cache.modelOutliningCache; + if (defined(t) || (t = e.cache.modelOutliningCache = {}), defined(t.outlineTexture)) + return t.outlineTexture; + const n = Math.min(4096, ContextLimits.maximumTextureSize); + let i = n; + const r = createMipLevel(i), o = []; + for (; i > 1; ) + i >>= 1, o.push(createMipLevel(i)); + const s = new Texture({ + context: e, + source: { + arrayBufferView: r, + mipLevels: o + }, + width: n, + height: 1, + pixelFormat: PixelFormat$1.LUMINANCE, + sampler: new Sampler({ + wrapS: TextureWrap$1.CLAMP_TO_EDGE, + wrapT: TextureWrap$1.CLAMP_TO_EDGE, + minificationFilter: TextureMinificationFilter$1.LINEAR_MIPMAP_LINEAR, + magnificationFilter: TextureMagnificationFilter$1.LINEAR + }) + }); + return t.outlineTexture = s, s; +}; +function createMipLevel(e) { + const t = new Uint8Array(e); + return t[e - 1] = 192, e === 8 ? t[e - 1] = 96 : e === 4 ? t[e - 1] = 48 : e === 2 ? t[e - 1] = 24 : e === 1 && (t[e - 1] = 12), t; +} +function EdgeSet(e, t) { + this._originalVertexCount = t, this._edges = /* @__PURE__ */ new Set(); + for (let n = 0; n < e.length; n += 2) { + const i = e[n], r = e[n + 1], o = Math.min(i, r), s = Math.max(i, r), c = o * this._originalVertexCount + s; + this._edges.add(c); + } +} +EdgeSet.prototype.hasEdge = function(e, t) { + const n = Math.min(e, t), i = Math.max(e, t), r = n * this._originalVertexCount + i; + return this._edges.has(r); +}; +function AttributeLoadPlan(e) { + this.attribute = e, this.loadBuffer = !1, this.loadTypedArray = !1; +} +function IndicesLoadPlan(e) { + this.indices = e, this.loadBuffer = !1, this.loadTypedArray = !1; +} +function PrimitiveLoadPlan(e) { + this.primitive = e, this.attributePlans = [], this.indicesPlan = void 0, this.needsOutlines = !1, this.outlineIndices = void 0; +} +PrimitiveLoadPlan.prototype.postProcess = function(e) { + this.needsOutlines && (generateOutlines(this), generateBuffers(this, e)); +}; +function generateOutlines(e) { + const t = e.primitive, n = t.indices, i = t.attributes[0].count, r = new PrimitiveOutlineGenerator({ + triangleIndices: n.typedArray, + outlineIndices: e.outlineIndices, + originalVertexCount: i + }); + n.typedArray = r.updatedTriangleIndices, n.indexDatatype = IndexDatatype$1.fromTypedArray(n.typedArray); + const o = makeOutlineCoordinatesAttribute( + r.outlineCoordinates + ), s = new AttributeLoadPlan(o); + s.loadBuffer = !0, s.loadTypedArray = !1, e.attributePlans.push(s), t.outlineCoordinates = s.attribute; + const c = e.attributePlans, l = e.attributePlans.length; + for (let d = 0; d < l; d++) { + const f = c[d].attribute; + f.typedArray = r.updateAttribute(f.typedArray); + } +} +function makeOutlineCoordinatesAttribute(e) { + const t = new ModelComponents.Attribute(); + return t.name = "_OUTLINE_COORDINATES", t.typedArray = e, t.componentDatatype = ComponentDatatype$1.FLOAT, t.type = AttributeType$1.VEC3, t.normalized = !1, t.count = e.length / 3, t; +} +function generateBuffers(e, t) { + generateAttributeBuffers(e.attributePlans, t), defined(e.indicesPlan) && generateIndexBuffers(e.indicesPlan, t); +} +function generateAttributeBuffers(e, t) { + const n = e.length; + for (let i = 0; i < n; i++) { + const r = e[i], o = r.attribute, s = o.typedArray; + if (r.loadBuffer) { + const c = Buffer.createVertexBuffer({ + typedArray: s, + context: t, + usage: BufferUsage$1.STATIC_DRAW + }); + c.vertexArrayDestroyable = !1, o.buffer = c; + } + r.loadTypedArray || (o.typedArray = void 0); + } +} +function generateIndexBuffers(e, t) { + const n = e.indices; + if (e.loadBuffer) { + const i = Buffer.createIndexBuffer({ + typedArray: n.typedArray, + context: t, + usage: BufferUsage$1.STATIC_DRAW, + indexDatatype: n.indexDatatype + }); + n.buffer = i, i.vertexArrayDestroyable = !1; + } + e.loadTypedArray || (n.typedArray = void 0); +} +PrimitiveLoadPlan.AttributeLoadPlan = AttributeLoadPlan; +PrimitiveLoadPlan.IndicesLoadPlan = IndicesLoadPlan; +function SupportedImageFormats(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT), this.webp = defaultValue(e.webp, !1), this.basis = defaultValue(e.basis, !1); +} +const { + Attribute: Attribute$2, + Indices, + FeatureIdAttribute: FeatureIdAttribute$3, + FeatureIdTexture, + FeatureIdImplicitRange, + MorphTarget, + Primitive: Primitive$1, + Instances: Instances$1, + Skin, + Node: Node$2, + AnimatedPropertyType: AnimatedPropertyType$1, + AnimationSampler, + AnimationTarget, + AnimationChannel, + Animation, + ArticulationStage, + Articulation, + Asset, + Scene: Scene$2, + Components: Components$1, + MetallicRoughness: MetallicRoughness$2, + SpecularGlossiness: SpecularGlossiness$1, + Specular: Specular$1, + Anisotropy, + Clearcoat: Clearcoat$1, + Material: Material$2 +} = ModelComponents, GltfLoaderState = { + /** + * The initial state of the glTF loader before load() is called. + * + * @type {number} + * @constant + * + * @private + */ + NOT_LOADED: 0, + /** + * The state of the loader while waiting for the glTF JSON loader promise + * to resolve. + * + * @type {number} + * @constant + * + * @private + */ + LOADING: 1, + /** + * The state of the loader once the glTF JSON is loaded but before + * process() is called. + * + * @type {number} + * @constant + * + * @private + */ + LOADED: 2, + /** + * The state of the loader while parsing the glTF and creating GPU resources + * as needed. + * + * @type {number} + * @constant + * + * @private + */ + PROCESSING: 3, + /** + * For some features like handling CESIUM_primitive_outlines, the geometry + * must be modified after it is loaded. The post-processing state handles + * any geometry modification (if needed). + *+ * This state is not used for asynchronous texture loading. + *
+ * + * @type {number} + * @constant + * + * @private + */ + POST_PROCESSING: 4, + /** + * Once the processing/post-processing states are finished, the loader + * enters the processed state (sometimes from a promise chain). The next + * call to process() will advance to the ready state. + * + * @type {number} + * @constant + * + * @private + */ + PROCESSED: 5, + /** + * When the loader reaches the ready state, the loaders' promise will be + * resolved. + * + * @type {number} + * @constant + * + * @private + */ + READY: 6, + /** + * If an error occurs at any point, the loader switches to the failed state. + * + * @type {number} + * @constant + * + * @private + */ + FAILED: 7, + /** + * If unload() is called, the loader switches to the unloaded state. + * + * @type {number} + * @constant + * + * @private + */ + UNLOADED: 8 +}; +function GltfLoader(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const { + gltfResource: t, + typedArray: n, + releaseGltfJson: i = !1, + asynchronous: r = !0, + incrementallyLoadTextures: o = !0, + upAxis: s = Axis$1.Y, + forwardAxis: c = Axis$1.Z, + loadAttributesAsTypedArray: l = !1, + loadAttributesFor2D: d = !1, + enablePick: f = !1, + loadIndicesForWireframe: h = !1, + loadPrimitiveOutline: p = !0, + loadForClassification: m = !1, + renameBatchIdSemantic: _ = !1 + } = e, { baseResource: y = t.clone() } = e; + this._gltfJson = e.gltfJson, this._gltfResource = t, this._baseResource = y, this._typedArray = n, this._releaseGltfJson = i, this._asynchronous = r, this._incrementallyLoadTextures = o, this._upAxis = s, this._forwardAxis = c, this._loadAttributesAsTypedArray = l, this._loadAttributesFor2D = d, this._enablePick = f, this._loadIndicesForWireframe = h, this._loadPrimitiveOutline = p, this._loadForClassification = m, this._renameBatchIdSemantic = _, this._sortedPropertyTableIds = void 0, this._sortedFeatureTextureIds = void 0, this._gltfJsonLoader = void 0, this._state = GltfLoaderState.NOT_LOADED, this._textureState = GltfLoaderState.NOT_LOADED, this._promise = void 0, this._processError = void 0, this._textureErrors = [], this._primitiveLoadPlans = [], this._loaderPromises = [], this._textureLoaders = [], this._texturesPromises = [], this._textureCallbacks = [], this._bufferViewLoaders = [], this._geometryLoaders = [], this._geometryCallbacks = [], this._structuralMetadataLoader = void 0, this._loadResourcesPromise = void 0, this._resourcesLoaded = !1, this._texturesLoaded = !1, this._supportedImageFormats = void 0, this._postProcessBuffers = [], this._components = void 0; +} +defined(Object.create) && (GltfLoader.prototype = Object.create(ResourceLoader.prototype), GltfLoader.prototype.constructor = GltfLoader); +Object.defineProperties(GltfLoader.prototype, { + /** + * The cache key of the resource. + * + * @memberof GltfLoader.prototype + * + * @type {string} + * @readonly + * @private + */ + cacheKey: { + get: function() { + } + }, + /** + * The loaded components. + * + * @memberof GltfLoader.prototype + * + * @type {ModelComponents.Components} + * @readonly + * @private + */ + components: { + get: function() { + return this._components; + } + }, + /** + * The loaded glTF json. + * + * @memberof GltfLoader.prototype + * + * @type {object} + * @readonly + * @private + */ + gltfJson: { + get: function() { + return defined(this._gltfJsonLoader) ? this._gltfJsonLoader.gltf : this._gltfJson; + } + }, + /** + * Returns true if textures are loaded separately from the other glTF resources. + * + * @memberof GltfLoader.prototype + * + * @type {boolean} + * @readonly + * @private + */ + incrementallyLoadTextures: { + get: function() { + return this._incrementallyLoadTextures; + } + }, + /** + * true if textures are loaded, useful when incrementallyLoadTextures is true + * + * @memberof GltfLoader.prototype + * + * @type {boolean} + * @readonly + * @private + */ + texturesLoaded: { + get: function() { + return this._texturesLoaded; + } + } +}); +async function loadGltfJson(e) { + e._state = GltfLoaderState.LOADING, e._textureState = GltfLoaderState.LOADING; + try { + const t = ResourceCache.getGltfJsonLoader({ + gltfResource: e._gltfResource, + baseResource: e._baseResource, + typedArray: e._typedArray, + gltfJson: e._gltfJson + }); + return e._gltfJsonLoader = t, await t.load(), e.isDestroyed() || e.isUnloaded() || t.isDestroyed() ? void 0 : (e._state = GltfLoaderState.LOADED, e._textureState = GltfLoaderState.LOADED, e); + } catch (t) { + if (e.isDestroyed()) + return; + e._state = GltfLoaderState.FAILED, e._textureState = GltfLoaderState.FAILED, handleError$5(e, t); + } +} +async function loadResources(e, t) { + FeatureDetection.supportsWebP.initialized || await FeatureDetection.supportsWebP.initialize(), e._supportedImageFormats = new SupportedImageFormats({ + webp: FeatureDetection.supportsWebP(), + basis: t.context.supportsBasis + }); + const n = parse$1(e, t); + return e._state = GltfLoaderState.PROCESSING, e._textureState = GltfLoaderState.PROCESSING, defined(e._gltfJsonLoader) && e._releaseGltfJson && (ResourceCache.unload(e._gltfJsonLoader), e._gltfJsonLoader = void 0), n; +} +GltfLoader.prototype.load = async function() { + return defined(this._promise) ? this._promise : (this._promise = loadGltfJson(this), this._promise); +}; +function handleError$5(e, t) { + throw e.unload(), e.getError("Failed to load glTF", t); +} +function processLoaders(e, t) { + let n = !0; + const i = e._geometryLoaders; + for (let o = 0; o < i.length; ++o) { + const s = i[o].process(t); + s && defined(e._geometryCallbacks[o]) && (e._geometryCallbacks[o](), e._geometryCallbacks[o] = void 0), n = n && s; + } + const r = e._structuralMetadataLoader; + if (defined(r)) { + const o = r.process(t); + o && (e._components.structuralMetadata = r.structuralMetadata), n = n && o; + } + n && (e._state = GltfLoaderState.POST_PROCESSING); +} +function postProcessGeometry(e, t) { + const n = e._primitiveLoadPlans; + for (let i = 0; i < n.length; i++) { + const r = n[i]; + r.postProcess(t), r.needsOutlines && gatherPostProcessBuffers(e, r); + } +} +function gatherPostProcessBuffers(e, t) { + const n = e._postProcessBuffers, i = t.primitive, r = i.outlineCoordinates; + defined(r) && n.push(r.buffer); + const o = i.attributes; + for (let c = 0; c < o.length; c++) { + const l = o[c]; + defined(l.buffer) && n.push(l.buffer); + } + const s = i.indices; + defined(s) && defined(s.buffer) && n.push(s.buffer); +} +GltfLoader.prototype._process = function(e) { + return this._state === GltfLoaderState.READY ? !0 : (this._state === GltfLoaderState.PROCESSING && processLoaders(this, e), this._resourcesLoaded && this._state === GltfLoaderState.POST_PROCESSING && (postProcessGeometry(this, e.context), this._state = GltfLoaderState.PROCESSED), this._resourcesLoaded && this._state === GltfLoaderState.PROCESSED ? (unloadBufferViewLoaders(this), this._typedArray = void 0, this._state = GltfLoaderState.READY, !0) : !1); +}; +GltfLoader.prototype._processTextures = function(e) { + if (this._textureState === GltfLoaderState.READY) + return !0; + if (this._textureState !== GltfLoaderState.PROCESSING) + return !1; + let t = !0; + const n = this._textureLoaders; + for (let i = 0; i < n.length; ++i) { + const r = n[i].process(e); + r && defined(this._textureCallbacks[i]) && (this._textureCallbacks[i](), this._textureCallbacks[i] = void 0), t = t && r; + } + return t ? (this._textureState = GltfLoaderState.READY, this._texturesLoaded = !0, !0) : !1; +}; +GltfLoader.prototype.process = function(e) { + if (this._state === GltfLoaderState.LOADED && !defined(this._loadResourcesPromise) && (this._loadResourcesPromise = loadResources(this, e).then(() => { + this._resourcesLoaded = !0; + }).catch((r) => { + this._processError = r; + })), defined(this._processError)) { + this._state = GltfLoaderState.FAILED; + const r = this._processError; + this._processError = void 0, handleError$5(this, r); + } + const t = this._textureErrors.pop(); + if (defined(t)) { + const r = this.getError("Failed to load glTF texture", t); + throw r.name = "TextureError", r; + } + if (this._state === GltfLoaderState.FAILED) + return !1; + let n = !1; + try { + n = this._process(e); + } catch (r) { + this._state = GltfLoaderState.FAILED, handleError$5(this, r); + } + let i = !1; + try { + i = this._processTextures(e); + } catch (r) { + this._textureState = GltfLoaderState.FAILED, handleError$5(this, r); + } + return this._incrementallyLoadTextures ? n : n && i; +}; +function getVertexBufferLoader(e, t, n, i, r, o, s) { + const c = e.gltfJson, d = c.accessors[t].bufferView; + return ResourceCache.getVertexBufferLoader({ + gltf: c, + gltfResource: e._gltfResource, + baseResource: e._baseResource, + frameState: s, + bufferViewId: d, + draco: i, + attributeSemantic: n, + accessorId: t, + asynchronous: e._asynchronous, + loadBuffer: r, + loadTypedArray: o + }); +} +function getIndexBufferLoader(e, t, n, i, r, o) { + return ResourceCache.getIndexBufferLoader({ + gltf: e.gltfJson, + accessorId: t, + gltfResource: e._gltfResource, + baseResource: e._baseResource, + frameState: o, + draco: n, + asynchronous: e._asynchronous, + loadBuffer: i, + loadTypedArray: r + }); +} +function getBufferViewLoader(e, t) { + const n = ResourceCache.getBufferViewLoader({ + gltf: e.gltfJson, + bufferViewId: t, + gltfResource: e._gltfResource, + baseResource: e._baseResource + }); + return e._bufferViewLoaders.push(n), n; +} +function getPackedTypedArray(e, t, n) { + let i = t.byteOffset; + const r = getAccessorByteStride(e, t), o = t.count, s = numberOfComponentsForType(t.type), c = t.componentType, l = ComponentDatatype$1.getSizeInBytes(c), d = l * s, f = o * s; + if (r === d) + return n = new Uint8Array(n), ComponentDatatype$1.createArrayBufferView( + c, + n.buffer, + n.byteOffset + i, + f + ); + const h = ComponentDatatype$1.createTypedArray( + c, + f + ), p = new DataView(n.buffer), m = new Array(s), _ = getComponentReader(t.componentType); + i = n.byteOffset + i; + for (let y = 0; y < o; ++y) { + _( + p, + i, + s, + l, + m + ); + for (let C = 0; C < s; ++C) + h[y * s + C] = m[C]; + i += r; + } + return h; +} +function loadDefaultAccessorValues(e, t) { + const n = e.type; + if (n === AttributeType$1.SCALAR) + return t.fill(0); + const i = AttributeType$1.getMathType(n); + return t.fill(i.clone(i.ZERO)); +} +function loadAccessorValues(e, t, n, i) { + const r = e.type, o = e.count; + if (r === AttributeType$1.SCALAR) + for (let s = 0; s < o; s++) + n[s] = t[s]; + else if (r === AttributeType$1.VEC4 && i) + for (let s = 0; s < o; s++) + n[s] = Quaternion.unpack(t, s * 4); + else { + const s = AttributeType$1.getMathType(r), c = AttributeType$1.getNumberOfComponents( + r + ); + for (let l = 0; l < o; l++) + n[l] = s.unpack(t, l * c); + } + return n; +} +async function loadAccessorBufferView(e, t, n, i, r) { + const { gltfJson: o } = e; + if (await t.load(), e.isDestroyed()) + return; + const s = getPackedTypedArray( + o, + n, + t.typedArray + ); + i = defaultValue(i, !1), loadAccessorValues(n, s, r, i); +} +function loadAccessor(e, t, n) { + const i = new Array(t.count), r = t.bufferView; + if (defined(r)) { + const o = getBufferViewLoader(e, r), s = loadAccessorBufferView( + e, + o, + t, + n, + i + ); + return e._loaderPromises.push(s), i; + } + return loadDefaultAccessorValues(t, i); +} +function fromArray(e, t) { + if (defined(t)) + return e === Number ? t[0] : e.unpack(t); +} +function getDefault(e) { + return e === Number ? 0 : new e(); +} +function getQuantizationDivisor(e) { + switch (e) { + case ComponentDatatype$1.BYTE: + return 127; + case ComponentDatatype$1.UNSIGNED_BYTE: + return 255; + case ComponentDatatype$1.SHORT: + return 32767; + case ComponentDatatype$1.UNSIGNED_SHORT: + return 65535; + default: + return 1; + } +} +const minimumBoundsByType = { + VEC2: new Cartesian2(-1, -1), + VEC3: new Cartesian3(-1, -1, -1), + VEC4: new Cartesian4(-1, -1, -1, -1) +}; +function dequantizeMinMax(e, t) { + const n = getQuantizationDivisor(e.componentDatatype), i = minimumBoundsByType[e.type]; + let r = e.min; + defined(r) && (r = t.divideByScalar(r, n, r), r = t.maximumByComponent(r, i, r)); + let o = e.max; + defined(o) && (o = t.divideByScalar(o, n, o), o = t.maximumByComponent(o, i, o)), e.min = r, e.max = o; +} +function setQuantizationFromWeb3dQuantizedAttributes(e, t, n) { + const i = e.decodeMatrix, r = fromArray(n, e.decodedMin), o = fromArray(n, e.decodedMax); + defined(r) && defined(o) && (t.min = r, t.max = o); + const s = new ModelComponents.Quantization(); + s.componentDatatype = t.componentDatatype, s.type = t.type, i.length === 4 ? (s.quantizedVolumeOffset = i[2], s.quantizedVolumeStepSize = i[0]) : i.length === 9 ? (s.quantizedVolumeOffset = new Cartesian2( + i[6], + i[7] + ), s.quantizedVolumeStepSize = new Cartesian2( + i[0], + i[4] + )) : i.length === 16 ? (s.quantizedVolumeOffset = new Cartesian3( + i[12], + i[13], + i[14] + ), s.quantizedVolumeStepSize = new Cartesian3( + i[0], + i[5], + i[10] + )) : i.length === 25 && (s.quantizedVolumeOffset = new Cartesian4( + i[20], + i[21], + i[22], + i[23] + ), s.quantizedVolumeStepSize = new Cartesian4( + i[0], + i[6], + i[12], + i[18] + )), t.quantization = s; +} +function createAttribute(e, t, n, i, r) { + var h; + const o = e.accessors[t], s = AttributeType$1.getMathType(o.type), c = defaultValue(o.normalized, !1), l = new Attribute$2(); + l.name = n, l.semantic = i, l.setIndex = r, l.constant = getDefault(s), l.componentDatatype = o.componentType, l.normalized = c, l.count = o.count, l.type = o.type, l.min = fromArray(s, o.min), l.max = fromArray(s, o.max), l.byteOffset = o.byteOffset, l.byteStride = getAccessorByteStride(e, o), hasExtension(o, "WEB3D_quantized_attributes") && setQuantizationFromWeb3dQuantizedAttributes( + o.extensions.WEB3D_quantized_attributes, + l, + s + ); + const d = l.semantic === VertexAttributeSemantic$1.POSITION || l.semantic === VertexAttributeSemantic$1.NORMAL || l.semantic === VertexAttributeSemantic$1.TANGENT || l.semantic === VertexAttributeSemantic$1.TEXCOORD; + return ((h = e.extensionsRequired) == null ? void 0 : h.includes( + "KHR_mesh_quantization" + )) && c && d && dequantizeMinMax(l, s), l; +} +function getSetIndex(e) { + const n = /^\w+_(\d+)$/.exec(e); + if (n !== null) + return parseInt(n[1]); +} +const scratchSemanticInfo = { + gltfSemantic: void 0, + renamedSemantic: void 0, + modelSemantic: void 0 +}; +function getSemanticInfo(e, t, n) { + let i = n; + e._renameBatchIdSemantic && (n === "_BATCHID" || n === "BATCHID") && (i = "_FEATURE_ID_0"); + const r = t.fromGltfSemantic(i), o = scratchSemanticInfo; + return o.gltfSemantic = n, o.renamedSemantic = i, o.modelSemantic = r, o; +} +function isClassificationAttribute(e) { + const t = e === VertexAttributeSemantic$1.POSITION, n = e === VertexAttributeSemantic$1.FEATURE_ID, i = e === VertexAttributeSemantic$1.TEXCOORD; + return t || n || i; +} +function finalizeDracoAttribute(e, t, n, i) { + if (e.byteOffset = 0, e.byteStride = void 0, e.quantization = t.quantization, n && (e.buffer = t.buffer), i) { + const r = defined(t.quantization) ? t.quantization.componentDatatype : e.componentDatatype; + e.typedArray = ComponentDatatype$1.createArrayBufferView( + r, + t.typedArray.buffer + ); + } +} +function finalizeAttribute(e, t, n, i, r, o) { + if (r && (n.buffer = i.buffer), o) { + const s = i.typedArray; + n.typedArray = getPackedTypedArray( + e, + t, + s + ), r || (n.byteOffset = 0, n.byteStride = void 0); + } +} +function loadAttribute(e, t, n, i, r, o, s) { + const c = e.gltfJson, l = c.accessors[t], d = l.bufferView, f = n.gltfSemantic, h = n.renamedSemantic, p = n.modelSemantic, m = defined(p) ? getSetIndex(h) : void 0, y = createAttribute( + c, + t, + f, + p, + m + ); + if (!defined(i) && !defined(d)) + return y; + const C = getVertexBufferLoader( + e, + t, + f, + i, + r, + o, + s + ), T = e._geometryLoaders.length; + e._geometryLoaders.push(C); + const x = C.load(); + return e._loaderPromises.push(x), e._geometryCallbacks[T] = () => { + defined(i) && defined(i.attributes) && defined(i.attributes[f]) ? finalizeDracoAttribute( + y, + C, + r, + o + ) : finalizeAttribute( + c, + l, + y, + C, + r, + o + ); + }, y; +} +function loadVertexAttribute(e, t, n, i, r, o, s) { + const c = n.modelSemantic, l = c === VertexAttributeSemantic$1.POSITION, d = c === VertexAttributeSemantic$1.FEATURE_ID, f = l && !r && e._loadAttributesFor2D && !s.scene3DOnly, h = l && e._enablePick && !s.context.webgl2, p = e._loadForClassification && d, m = e._loadAttributesAsTypedArray, _ = !m, y = m || f || h || p, x = loadAttribute( + e, + t, + n, + i, + o ? !1 : _, + o ? !0 : y, + s + ), b = new PrimitiveLoadPlan.AttributeLoadPlan(x); + return b.loadBuffer = _, b.loadTypedArray = y, b; +} +function loadInstancedAttribute(e, t, n, i, r) { + const o = e.gltfJson.accessors, s = defined(n.ROTATION), c = defined(n.TRANSLATION) && defined(o[n.TRANSLATION].min) && defined(o[n.TRANSLATION].max), l = getSemanticInfo( + e, + InstanceAttributeSemantic$1, + i + ), d = l.modelSemantic, f = d === InstanceAttributeSemantic$1.TRANSLATION || d === InstanceAttributeSemantic$1.ROTATION || d === InstanceAttributeSemantic$1.SCALE, h = d === InstanceAttributeSemantic$1.TRANSLATION, p = e._loadAttributesAsTypedArray || s && f || !r.context.instancedArrays, m = e._enablePick && !r.context.webgl2, _ = !p, y = e._loadAttributesFor2D && !r.scene3DOnly; + return loadAttribute( + e, + t, + l, + void 0, + _, + p || h && (!c || y || m), + r + ); +} +function loadIndices(e, t, n, i, r, o) { + const s = e.gltfJson.accessors[t], c = s.bufferView; + if (!defined(n) && !defined(c)) + return; + const l = new Indices(); + l.count = s.count; + const d = e._loadAttributesAsTypedArray, f = (e._loadIndicesForWireframe || e._enablePick) && !o.context.webgl2, h = e._loadForClassification && i, m = !d, _ = d || f || h, T = getIndexBufferLoader( + e, + t, + n, + r ? !1 : m, + r ? !0 : _, + o + ), x = e._geometryLoaders.length; + e._geometryLoaders.push(T); + const b = T.load(); + e._loaderPromises.push(b), e._geometryCallbacks[x] = () => { + l.indexDatatype = T.indexDatatype, l.buffer = T.buffer, l.typedArray = T.typedArray; + }; + const S = new PrimitiveLoadPlan.IndicesLoadPlan(l); + return S.loadBuffer = m, S.loadTypedArray = _, S; +} +function loadTexture(e, t, n, i) { + const r = e.gltfJson, o = GltfLoaderUtil.getImageIdFromTexture({ + gltf: r, + textureId: t.index, + supportedImageFormats: e._supportedImageFormats + }); + if (!defined(o)) + return; + const s = ResourceCache.getTextureLoader({ + gltf: r, + textureInfo: t, + gltfResource: e._gltfResource, + baseResource: e._baseResource, + supportedImageFormats: e._supportedImageFormats, + frameState: n, + asynchronous: e._asynchronous + }), c = GltfLoaderUtil.createModelTextureReader({ + textureInfo: t + }), l = e._textureLoaders.length; + e._textureLoaders.push(s); + const d = s.load().catch((f) => { + if (!e.isDestroyed()) { + if (!e._incrementallyLoadTextures) + throw f; + e._textureState = GltfLoaderState.FAILED, e._textureErrors.push(f); + } + }); + return e._texturesPromises.push(d), e._textureCallbacks[l] = () => { + c.texture = s.texture, defined(i) && (c.texture.sampler = i); + }, c; +} +function loadSpecularGlossiness(e, t, n) { + const { + diffuseTexture: i, + specularGlossinessTexture: r, + diffuseFactor: o, + specularFactor: s, + glossinessFactor: c + } = t, l = new SpecularGlossiness$1(); + return defined(i) && (l.diffuseTexture = loadTexture( + e, + i, + n + )), defined(r) && (l.specularGlossinessTexture = loadTexture( + e, + r, + n + )), l.diffuseFactor = fromArray(Cartesian4, o), l.specularFactor = fromArray(Cartesian3, s), l.glossinessFactor = c, l; +} +function loadMetallicRoughness(e, t, n) { + const { + baseColorTexture: i, + metallicRoughnessTexture: r, + baseColorFactor: o, + metallicFactor: s, + roughnessFactor: c + } = t, l = new MetallicRoughness$2(); + return defined(i) && (l.baseColorTexture = loadTexture( + e, + i, + n + )), defined(r) && (l.metallicRoughnessTexture = loadTexture( + e, + r, + n + )), l.baseColorFactor = fromArray(Cartesian4, o), l.metallicFactor = s, l.roughnessFactor = c, l; +} +function loadSpecular(e, t, n) { + const { + specularFactor: i, + specularTexture: r, + specularColorFactor: o, + specularColorTexture: s + } = t, c = new Specular$1(); + return defined(r) && (c.specularTexture = loadTexture(e, r, n)), defined(s) && (c.specularColorTexture = loadTexture( + e, + s, + n + )), c.specularFactor = i, c.specularColorFactor = fromArray(Cartesian3, o), c; +} +function loadAnisotropy(e, t, n) { + const { + anisotropyStrength: i = Anisotropy.DEFAULT_ANISOTROPY_STRENGTH, + anisotropyRotation: r = Anisotropy.DEFAULT_ANISOTROPY_ROTATION, + anisotropyTexture: o + } = t, s = new Anisotropy(); + return defined(o) && (s.anisotropyTexture = loadTexture( + e, + o, + n + )), s.anisotropyStrength = i, s.anisotropyRotation = r, s; +} +function loadClearcoat(e, t, n) { + const { + clearcoatFactor: i = Clearcoat$1.DEFAULT_CLEARCOAT_FACTOR, + clearcoatTexture: r, + clearcoatRoughnessFactor: o = Clearcoat$1.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR, + clearcoatRoughnessTexture: s, + clearcoatNormalTexture: c + } = t, l = new Clearcoat$1(); + return defined(r) && (l.clearcoatTexture = loadTexture( + e, + r, + n + )), defined(s) && (l.clearcoatRoughnessTexture = loadTexture( + e, + s, + n + )), defined(c) && (l.clearcoatNormalTexture = loadTexture( + e, + c, + n + )), l.clearcoatFactor = i, l.clearcoatRoughnessFactor = o, l; +} +function loadMaterial(e, t, n) { + const i = new Material$2(), r = defaultValue( + t.extensions, + defaultValue.EMPTY_OBJECT + ), o = r.KHR_materials_pbrSpecularGlossiness, s = r.KHR_materials_specular, c = r.KHR_materials_anisotropy, l = r.KHR_materials_clearcoat, d = t.pbrMetallicRoughness; + return i.unlit = defined(r.KHR_materials_unlit), defined(o) ? i.specularGlossiness = loadSpecularGlossiness( + e, + o, + n + ) : (defined(d) && (i.metallicRoughness = loadMetallicRoughness( + e, + d, + n + )), defined(s) && !i.unlit && (i.specular = loadSpecular(e, s, n)), defined(c) && !i.unlit && (i.anisotropy = loadAnisotropy(e, c, n)), defined(l) && !i.unlit && (i.clearcoat = loadClearcoat(e, l, n))), defined(t.emissiveTexture) && (i.emissiveTexture = loadTexture( + e, + t.emissiveTexture, + n + )), defined(t.normalTexture) && !e._loadForClassification && (i.normalTexture = loadTexture( + e, + t.normalTexture, + n + )), defined(t.occlusionTexture) && (i.occlusionTexture = loadTexture( + e, + t.occlusionTexture, + n + )), i.emissiveFactor = fromArray(Cartesian3, t.emissiveFactor), i.alphaMode = t.alphaMode, i.alphaCutoff = t.alphaCutoff, i.doubleSided = t.doubleSided, i; +} +function loadFeatureIdAttribute(e, t) { + const n = new FeatureIdAttribute$3(); + return n.featureCount = e.featureCount, n.nullFeatureId = e.nullFeatureId, n.propertyTableId = e.propertyTable, n.setIndex = e.attribute, n.label = e.label, n.positionalLabel = t, n; +} +function loadFeatureIdAttributeLegacy(e, t, n, i) { + const r = new FeatureIdAttribute$3(), o = e.featureIds; + return r.featureCount = n, r.propertyTableId = t, r.setIndex = getSetIndex(o.attribute), r.positionalLabel = i, r; +} +function loadDefaultFeatureIds(e, t) { + const n = new FeatureIdImplicitRange(); + return n.propertyTableId = e.propertyTable, n.featureCount = e.featureCount, n.nullFeatureId = e.nullFeatureId, n.label = e.label, n.positionalLabel = t, n.offset = 0, n.repeat = 1, n; +} +function loadFeatureIdImplicitRangeLegacy(e, t, n, i) { + const r = new FeatureIdImplicitRange(), o = e.featureIds; + r.propertyTableId = t, r.featureCount = n, r.offset = defaultValue(o.constant, 0); + const s = defaultValue(o.divisor, 0); + return r.repeat = s === 0 ? void 0 : s, r.positionalLabel = i, r; +} +function loadFeatureIdTexture(e, t, n, i) { + const r = new FeatureIdTexture(); + r.featureCount = t.featureCount, r.nullFeatureId = t.nullFeatureId, r.propertyTableId = t.propertyTable, r.label = t.label, r.positionalLabel = i; + const o = t.texture; + r.textureReader = loadTexture( + e, + o, + n, + Sampler.NEAREST + // Feature ID textures require nearest sampling + ); + const c = (defined(o.channels) ? o.channels : [0]).map(function(l) { + return "rgba".charAt(l); + }).join(""); + return r.textureReader.channels = c, r; +} +function loadFeatureIdTextureLegacy(e, t, n, i, r, o) { + const s = new FeatureIdTexture(), c = t.featureIds, l = c.texture; + return s.featureCount = r, s.propertyTableId = n, s.textureReader = loadTexture( + e, + l, + i, + Sampler.NEAREST + // Feature ID textures require nearest sampling + ), s.textureReader.channels = c.channels, s.positionalLabel = o, s; +} +function loadMorphTarget(e, t, n, i, r) { + const o = new MorphTarget(), s = void 0, c = !1; + for (const l in t) { + if (!t.hasOwnProperty(l)) + continue; + const d = t[l], f = getSemanticInfo( + e, + VertexAttributeSemantic$1, + l + ), h = loadVertexAttribute( + e, + d, + f, + s, + c, + n, + r + ); + o.attributes.push(h.attribute), i.attributePlans.push(h); + } + return o; +} +function loadPrimitive(e, t, n, i) { + const r = new Primitive$1(), o = new PrimitiveLoadPlan(r); + e._primitiveLoadPlans.push(o); + const s = t.material; + defined(s) && (r.material = loadMaterial( + e, + e.gltfJson.materials[s], + i + )); + const c = defaultValue( + t.extensions, + defaultValue.EMPTY_OBJECT + ); + let l = !1; + const d = c.CESIUM_primitive_outline; + e._loadPrimitiveOutline && defined(d) && (l = !0, o.needsOutlines = !0, o.outlineIndices = loadPrimitiveOutline( + e, + d + )); + const f = e._loadForClassification, h = c.KHR_draco_mesh_compression; + let p = !1; + const m = t.attributes; + if (defined(m)) + for (const E in m) { + if (!m.hasOwnProperty(E)) + continue; + const A = m[E], D = getSemanticInfo( + e, + VertexAttributeSemantic$1, + E + ), P = D.modelSemantic; + if (f && !isClassificationAttribute(P)) + continue; + P === VertexAttributeSemantic$1.FEATURE_ID && (p = !0); + const I = loadVertexAttribute( + e, + A, + D, + h, + n, + l, + i + ); + o.attributePlans.push(I), r.attributes.push(I.attribute); + } + const _ = t.targets; + if (defined(_) && !f) + for (let E = 0; E < _.length; ++E) + r.morphTargets.push( + loadMorphTarget( + e, + _[E], + l, + o, + i + ) + ); + const y = t.indices; + if (defined(y)) { + const E = loadIndices( + e, + y, + h, + p, + l, + i + ); + defined(E) && (o.indicesPlan = E, r.indices = E.indices); + } + const C = c.EXT_structural_metadata, T = c.EXT_mesh_features, x = c.EXT_feature_metadata, b = defined(x); + defined(T) ? loadPrimitiveFeatures(e, r, T, i) : b && loadPrimitiveFeaturesLegacy( + e, + r, + x, + i + ), defined(C) ? loadPrimitiveMetadata(r, C) : b && loadPrimitiveMetadataLegacy(e, r, x); + const S = t.mode; + if (f && S !== PrimitiveType$1.TRIANGLES) + throw new RuntimeError( + "Only triangle meshes can be used for classification." + ); + return r.primitiveType = S, r; +} +function loadPrimitiveOutline(e, t) { + const n = t.indices, i = e.gltfJson.accessors[n]; + return loadAccessor(e, i, !1); +} +function loadPrimitiveFeatures(e, t, n, i) { + let r; + defined(n) && defined(n.featureIds) ? r = n.featureIds : r = []; + for (let o = 0; o < r.length; o++) { + const s = r[o], c = `featureId_${o}`; + let l; + defined(s.texture) ? l = loadFeatureIdTexture( + e, + s, + i, + c + ) : defined(s.attribute) ? l = loadFeatureIdAttribute(s, c) : l = loadDefaultFeatureIds(s, c), t.featureIds.push(l); + } +} +function loadPrimitiveFeaturesLegacy(e, t, n, i) { + const { featureTables: r } = e.gltfJson.extensions.EXT_feature_metadata; + let o = 0; + const s = n.featureIdAttributes; + if (defined(s)) + for (let l = 0; l < s.length; ++l) { + const d = s[l], f = d.featureTable, h = e._sortedPropertyTableIds.indexOf( + f + ), p = r[f].count, m = `featureId_${o}`; + o++; + let _; + defined(d.featureIds.attribute) ? _ = loadFeatureIdAttributeLegacy( + d, + h, + p, + m + ) : _ = loadFeatureIdImplicitRangeLegacy( + d, + h, + p, + m + ), t.featureIds.push(_); + } + const c = n.featureIdTextures; + if (defined(c)) + for (let l = 0; l < c.length; ++l) { + const d = c[l], f = d.featureTable, h = e._sortedPropertyTableIds.indexOf( + f + ), p = r[f].count, m = `featureId_${o}`; + o++; + const _ = loadFeatureIdTextureLegacy( + e, + d, + h, + i, + p, + m + ); + t.featureIds.push(_); + } +} +function loadPrimitiveMetadata(e, t) { + defined(t) && (defined(t.propertyTextures) && (e.propertyTextureIds = t.propertyTextures), defined(t.propertyAttributes) && (e.propertyAttributeIds = t.propertyAttributes)); +} +function loadPrimitiveMetadataLegacy(e, t, n) { + defined(n.featureTextures) && (t.propertyTextureIds = n.featureTextures.map( + function(i) { + return e._sortedFeatureTextureIds.indexOf(i); + } + )); +} +function loadInstances(e, t, n) { + const i = t.EXT_mesh_gpu_instancing, r = new Instances$1(), o = i.attributes; + if (defined(o)) + for (const d in o) { + if (!o.hasOwnProperty(d)) + continue; + const f = o[d]; + r.attributes.push( + loadInstancedAttribute( + e, + f, + o, + d, + n + ) + ); + } + const s = defaultValue( + i.extensions, + defaultValue.EMPTY_OBJECT + ), c = t.EXT_instance_features, l = s.EXT_feature_metadata; + return defined(c) ? loadInstanceFeatures(r, c) : defined(l) && loadInstanceFeaturesLegacy( + e.gltfJson, + r, + l, + e._sortedPropertyTableIds + ), r; +} +function loadInstanceFeatures(e, t) { + const n = t.featureIds; + for (let i = 0; i < n.length; i++) { + const r = n[i], o = `instanceFeatureId_${i}`; + let s; + defined(r.attribute) ? s = loadFeatureIdAttribute(r, o) : s = loadDefaultFeatureIds(r, o), e.featureIds.push(s); + } +} +function loadInstanceFeaturesLegacy(e, t, n, i) { + const r = e.extensions.EXT_feature_metadata.featureTables, o = n.featureIdAttributes; + if (defined(o)) + for (let s = 0; s < o.length; ++s) { + const c = o[s], l = c.featureTable, d = i.indexOf(l), f = r[l].count, h = `instanceFeatureId_${s}`; + let p; + defined(c.featureIds.attribute) ? p = loadFeatureIdAttributeLegacy( + c, + d, + f, + h + ) : p = loadFeatureIdImplicitRangeLegacy( + c, + d, + f, + h + ), t.featureIds.push(p); + } +} +function loadNode(e, t, n) { + const i = new Node$2(); + i.name = t.name, i.matrix = fromArray(Matrix4, t.matrix), i.translation = fromArray(Cartesian3, t.translation), i.rotation = fromArray(Quaternion, t.rotation), i.scale = fromArray(Cartesian3, t.scale); + const r = defaultValue( + t.extensions, + defaultValue.EMPTY_OBJECT + ), o = r.EXT_mesh_gpu_instancing, s = r.AGI_articulations; + if (defined(o)) { + if (e._loadForClassification) + throw new RuntimeError( + "Models with the EXT_mesh_gpu_instancing extension cannot be used for classification." + ); + i.instances = loadInstances(e, r, n); + } + defined(s) && (i.articulationName = s.articulationName); + const c = t.mesh; + if (defined(c)) { + const l = e.gltfJson.meshes[c], d = l.primitives; + for (let p = 0; p < d.length; ++p) + i.primitives.push( + loadPrimitive( + e, + d[p], + defined(i.instances), + n + ) + ); + const f = defaultValue(t.weights, l.weights), h = i.primitives[0].morphTargets; + i.morphWeights = defined(f) ? f.slice() : new Array(h.length).fill(0); + } + return i; +} +function loadNodes(e, t) { + const n = e.gltfJson.nodes; + if (!defined(n)) + return []; + const i = n.map(function(r, o) { + const s = loadNode(e, r, t); + return s.index = o, s; + }); + for (let r = 0; r < i.length; ++r) { + const o = n[r].children; + if (defined(o)) + for (let s = 0; s < o.length; ++s) + i[r].children.push(i[o[s]]); + } + return i; +} +function loadSkin(e, t, n) { + const i = new Skin(), r = t.joints; + i.joints = r.map((s) => n[s]); + const o = t.inverseBindMatrices; + if (defined(o)) { + const s = e.gltfJson.accessors[o]; + i.inverseBindMatrices = loadAccessor(e, s); + } else + i.inverseBindMatrices = new Array(r.length).fill( + Matrix4.IDENTITY + ); + return i; +} +function loadSkins(e, t) { + const n = e.gltfJson.skins; + if (e._loadForClassification || !defined(n)) + return []; + const i = n.map(function(o, s) { + const c = loadSkin(e, o, t); + return c.index = s, c; + }), r = e.gltfJson.nodes; + for (let o = 0; o < t.length; ++o) { + const s = r[o].skin; + defined(s) && (t[o].skin = i[s]); + } + return i; +} +async function loadStructuralMetadata(e, t, n, i) { + const r = new GltfStructuralMetadataLoader({ + gltf: e.gltfJson, + extension: t, + extensionLegacy: n, + gltfResource: e._gltfResource, + baseResource: e._baseResource, + supportedImageFormats: e._supportedImageFormats, + frameState: i, + asynchronous: e._asynchronous + }); + return e._structuralMetadataLoader = r, r.load(); +} +function loadAnimationSampler(e, t) { + const n = new AnimationSampler(), i = e.gltfJson.accessors, r = i[t.input]; + n.input = loadAccessor(e, r); + const o = t.interpolation; + n.interpolation = defaultValue( + InterpolationType$1[o], + InterpolationType$1.LINEAR + ); + const s = i[t.output]; + return n.output = loadAccessor(e, s, !0), n; +} +function loadAnimationTarget(e, t) { + const n = new AnimationTarget(), i = e.node; + if (!defined(i)) + return; + n.node = t[i]; + const r = e.path.toUpperCase(); + return n.path = AnimatedPropertyType$1[r], n; +} +function loadAnimationChannel(e, t, n) { + const i = new AnimationChannel(), r = e.sampler; + return i.sampler = t[r], i.target = loadAnimationTarget(e.target, n), i; +} +function loadAnimation(e, t, n) { + const i = new Animation(); + i.name = t.name; + const r = t.samplers.map(function(s, c) { + const l = loadAnimationSampler(e, s); + return l.index = c, l; + }), o = t.channels.map(function(s) { + return loadAnimationChannel(s, r, n); + }); + return i.samplers = r, i.channels = o, i; +} +function loadAnimations(e, t) { + const n = e.gltfJson.animations; + return e._loadForClassification || !defined(n) ? [] : n.map(function(r, o) { + const s = loadAnimation(e, r, t); + return s.index = o, s; + }); +} +function loadArticulationStage(e) { + const t = new ArticulationStage(); + t.name = e.name; + const n = e.type.toUpperCase(); + return t.type = ArticulationStageType$1[n], t.minimumValue = e.minimumValue, t.maximumValue = e.maximumValue, t.initialValue = e.initialValue, t; +} +function loadArticulation(e) { + const t = new Articulation(); + return t.name = e.name, t.stages = e.stages.map(loadArticulationStage), t; +} +function loadArticulations(e) { + var i; + const n = (i = defaultValue(e.extensions, defaultValue.EMPTY_OBJECT).AGI_articulations) == null ? void 0 : i.articulations; + return defined(n) ? n.map(loadArticulation) : []; +} +function getSceneNodeIds(e) { + let t; + return defined(e.scenes) && defined(e.scene) && (t = e.scenes[e.scene].nodes), t = defaultValue(t, e.nodes), t = defined(t) ? t : [], t; +} +function loadScene(e, t) { + const n = new Scene$2(), i = getSceneNodeIds(e); + return n.nodes = i.map(function(r) { + return t[r]; + }), n; +} +const scratchCenter$8 = new Cartesian3(); +function parse$1(e, t) { + const n = e.gltfJson, i = defaultValue(n.extensions, defaultValue.EMPTY_OBJECT), r = i.EXT_structural_metadata, o = i.EXT_feature_metadata, s = i.CESIUM_RTC; + if (defined(o)) { + const C = o.featureTables, T = o.featureTextures, x = defined(C) ? C : [], b = defined(T) ? T : []; + e._sortedPropertyTableIds = Object.keys(x).sort(), e._sortedFeatureTextureIds = Object.keys(b).sort(); + } + const c = loadNodes(e, t), l = loadSkins(e, c), d = loadAnimations(e, c), f = loadArticulations(n), h = loadScene(n, c), p = new Components$1(), m = new Asset(), _ = n.asset.copyright; + if (defined(_)) { + const C = _.split(";").map(function(T) { + return new Credit(T.trim()); + }); + m.credits = C; + } + if (p.asset = m, p.scene = h, p.nodes = c, p.skins = l, p.animations = d, p.articulations = f, p.upAxis = e._upAxis, p.forwardAxis = e._forwardAxis, defined(s)) { + const C = Cartesian3.fromArray( + s.center, + 0, + scratchCenter$8 + ); + p.transform = Matrix4.fromTranslation( + C, + p.transform + ); + } + if (e._components = p, defined(r) || defined(o)) { + const C = loadStructuralMetadata( + e, + r, + o, + t + ); + e._loaderPromises.push(C); + } + const y = []; + return y.push.apply(y, e._loaderPromises), e._incrementallyLoadTextures || y.push.apply(y, e._texturesPromises), Promise.all(y); +} +function unloadTextures(e) { + const t = e._textureLoaders; + for (let n = 0; n < t.length; ++n) + t[n] = !t[n].isDestroyed() && ResourceCache.unload(t[n]); + e._textureLoaders.length = 0; +} +function unloadBufferViewLoaders(e) { + const t = e._bufferViewLoaders; + for (let n = 0; n < t.length; ++n) + t[n] = !t[n].isDestroyed() && ResourceCache.unload(t[n]); + e._bufferViewLoaders.length = 0; +} +function unloadGeometry(e) { + const t = e._geometryLoaders; + for (let n = 0; n < t.length; ++n) + t[n] = !t[n].isDestroyed() && ResourceCache.unload(t[n]); + e._geometryLoaders.length = 0; +} +function unloadGeneratedAttributes(e) { + const t = e._postProcessBuffers; + for (let n = 0; n < t.length; n++) { + const i = t[n]; + i.isDestroyed() || i.destroy(); + } + t.length = 0; +} +function unloadStructuralMetadata(e) { + defined(e._structuralMetadataLoader) && !e._structuralMetadataLoader.isDestroyed() && (e._structuralMetadataLoader.destroy(), e._structuralMetadataLoader = void 0); +} +GltfLoader.prototype.isUnloaded = function() { + return this._state === GltfLoaderState.UNLOADED; +}; +GltfLoader.prototype.unload = function() { + defined(this._gltfJsonLoader) && !this._gltfJsonLoader.isDestroyed() && ResourceCache.unload(this._gltfJsonLoader), this._gltfJsonLoader = void 0, unloadTextures(this), unloadBufferViewLoaders(this), unloadGeometry(this), unloadGeneratedAttributes(this), unloadStructuralMetadata(this), this._components = void 0, this._typedArray = void 0, this._state = GltfLoaderState.UNLOADED; +}; +const PointCloudEyeDomeLightingShader = `uniform sampler2D u_pointCloud_colorGBuffer; +uniform sampler2D u_pointCloud_depthGBuffer; +uniform vec2 u_distanceAndEdlStrength; +in vec2 v_textureCoordinates; + +vec2 neighborContribution(float log2Depth, vec2 offset) +{ + float dist = u_distanceAndEdlStrength.x; + vec2 texCoordOrig = v_textureCoordinates + offset * dist; + vec2 texCoord0 = v_textureCoordinates + offset * floor(dist); + vec2 texCoord1 = v_textureCoordinates + offset * ceil(dist); + + float depthOrLogDepth0 = czm_unpackDepth(texture(u_pointCloud_depthGBuffer, texCoord0)); + float depthOrLogDepth1 = czm_unpackDepth(texture(u_pointCloud_depthGBuffer, texCoord1)); + + // ignore depth values that are the clear depth + if (depthOrLogDepth0 == 0.0 || depthOrLogDepth1 == 0.0) { + return vec2(0.0); + } + + // interpolate the two adjacent depth values + float depthMix = mix(depthOrLogDepth0, depthOrLogDepth1, fract(dist)); + vec4 eyeCoordinate = czm_windowToEyeCoordinates(texCoordOrig, depthMix); + return vec2(max(0.0, log2Depth - log2(-eyeCoordinate.z / eyeCoordinate.w)), 1.0); +} + +void main() +{ + float depthOrLogDepth = czm_unpackDepth(texture(u_pointCloud_depthGBuffer, v_textureCoordinates)); + + vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depthOrLogDepth); + eyeCoordinate /= eyeCoordinate.w; + + float log2Depth = log2(-eyeCoordinate.z); + + if (depthOrLogDepth == 0.0) // 0.0 is the clear value for the gbuffer + { + discard; + } + + vec4 color = texture(u_pointCloud_colorGBuffer, v_textureCoordinates); + + // sample from neighbors left, right, down, up + vec2 texelSize = 1.0 / czm_viewport.zw; + + vec2 responseAndCount = vec2(0.0); + + responseAndCount += neighborContribution(log2Depth, vec2(-texelSize.x, 0.0)); + responseAndCount += neighborContribution(log2Depth, vec2(+texelSize.x, 0.0)); + responseAndCount += neighborContribution(log2Depth, vec2(0.0, -texelSize.y)); + responseAndCount += neighborContribution(log2Depth, vec2(0.0, +texelSize.y)); + + float response = responseAndCount.x / responseAndCount.y; + float strength = u_distanceAndEdlStrength.y; + float shade = exp(-response * 300.0 * strength); + color.rgb *= shade; + out_FragColor = vec4(color); + + // Input and output depth are the same. + gl_FragDepth = depthOrLogDepth; +} +`; +function PointCloudEyeDomeLighting() { + this._framebuffer = new FramebufferManager({ + colorAttachmentsLength: 2, + depth: !0, + supportsDepthTexture: !0 + }), this._drawCommand = void 0, this._clearCommand = void 0, this._strength = 1, this._radius = 1; +} +Object.defineProperties(PointCloudEyeDomeLighting.prototype, { + framebuffer: { + get: function() { + return this._framebuffer.framebuffer; + } + }, + colorGBuffer: { + get: function() { + return this._framebuffer.getColorTexture(0); + } + }, + depthGBuffer: { + get: function() { + return this._framebuffer.getColorTexture(1); + } + } +}); +function destroyFramebuffer$1(e) { + e._framebuffer.destroy(), e._drawCommand = void 0, e._clearCommand = void 0; +} +const distanceAndEdlStrengthScratch = new Cartesian2(); +function createCommands$1(e, t) { + const n = new ShaderSource({ + defines: ["LOG_DEPTH_WRITE"], + sources: [PointCloudEyeDomeLightingShader] + }), i = { + u_pointCloud_colorGBuffer: function() { + return e.colorGBuffer; + }, + u_pointCloud_depthGBuffer: function() { + return e.depthGBuffer; + }, + u_distanceAndEdlStrength: function() { + return distanceAndEdlStrengthScratch.x = e._radius, distanceAndEdlStrengthScratch.y = e._strength, distanceAndEdlStrengthScratch; + } + }, r = RenderState.fromCache({ + blending: BlendingState$1.ALPHA_BLEND, + depthMask: !0, + depthTest: { + enabled: !0 + }, + stencilTest: StencilConstants$1.setCesium3DTileBit(), + stencilMask: StencilConstants$1.CESIUM_3D_TILE_MASK + }); + e._drawCommand = t.createViewportQuadCommand(n, { + uniformMap: i, + renderState: r, + pass: Pass$1.CESIUM_3D_TILE, + owner: e + }), e._clearCommand = new ClearCommand({ + framebuffer: e.framebuffer, + color: new Color(0, 0, 0, 0), + depth: 1, + renderState: RenderState.fromCache(), + pass: Pass$1.CESIUM_3D_TILE, + owner: e + }); +} +function createResources$3(e, t) { + const n = t.drawingBufferWidth, i = t.drawingBufferHeight; + e._framebuffer.update(t, n, i), createCommands$1(e, t); +} +function isSupported(e) { + return e.drawBuffers && e.fragmentDepth; +} +PointCloudEyeDomeLighting.isSupported = isSupported; +function getECShaderProgram(e, t) { + let n = e.shaderCache.getDerivedShaderProgram(t, "EC"); + if (!defined(n)) { + const i = t._attributeLocations, r = t.fragmentShaderSource.clone(); + r.sources.splice( + 0, + 0, + `layout (location = 0) out vec4 out_FragData_0; +layout (location = 1) out vec4 out_FragData_1;` + ), r.sources = r.sources.map(function(o) { + return o = ShaderSource.replaceMain( + o, + "czm_point_cloud_post_process_main" + ), o = o.replaceAll(/out_FragColor/g, "out_FragData_0"), o; + }), r.sources.push( + `void main() +{ + czm_point_cloud_post_process_main(); +#ifdef LOG_DEPTH + czm_writeLogDepth(); + out_FragData_1 = czm_packDepth(gl_FragDepth); +#else + out_FragData_1 = czm_packDepth(gl_FragCoord.z); +#endif +}` + ), n = e.shaderCache.createDerivedShaderProgram( + t, + "EC", + { + vertexShaderSource: t.vertexShaderSource, + fragmentShaderSource: r, + attributeLocations: i + } + ); + } + return n; +} +PointCloudEyeDomeLighting.prototype.update = function(e, t, n, i) { + if (!isSupported(e.context)) + return; + this._strength = n.eyeDomeLightingStrength, this._radius = n.eyeDomeLightingRadius * e.pixelRatio, createResources$3(this, e.context); + let r; + const o = e.commandList, s = o.length; + for (r = t; r < s; ++r) { + const d = o[r]; + if (d.primitiveType !== PrimitiveType$1.POINTS || d.pass === Pass$1.TRANSLUCENT) + continue; + let f, h, p = d.derivedCommands.pointCloudProcessor; + defined(p) && (f = p.command, h = p.originalShaderProgram), (!defined(f) || d.dirty || h !== d.shaderProgram || f.framebuffer !== this.framebuffer) && (f = DrawCommand.shallowClone(d, f), f.framebuffer = this.framebuffer, f.shaderProgram = getECShaderProgram( + e.context, + d.shaderProgram + ), f.castShadows = !1, f.receiveShadows = !1, defined(p) || (p = { + command: f, + originalShaderProgram: d.shaderProgram + }, d.derivedCommands.pointCloudProcessor = p), p.originalShaderProgram = d.shaderProgram), o[r] = f; + } + const c = this._clearCommand, l = this._drawCommand; + l.boundingVolume = i, o.push(l), o.push(c); +}; +PointCloudEyeDomeLighting.prototype.isDestroyed = function() { + return !1; +}; +PointCloudEyeDomeLighting.prototype.destroy = function() { + return destroyFramebuffer$1(this), destroyObject(this); +}; +function PointCloudShading(e) { + const t = defaultValue(e, {}); + this.attenuation = defaultValue(t.attenuation, !1), this.geometricErrorScale = defaultValue( + t.geometricErrorScale, + 1 + ), this.maximumAttenuation = t.maximumAttenuation, this.baseResolution = t.baseResolution, this.eyeDomeLighting = defaultValue(t.eyeDomeLighting, !0), this.eyeDomeLightingStrength = defaultValue( + t.eyeDomeLightingStrength, + 1 + ), this.eyeDomeLightingRadius = defaultValue( + t.eyeDomeLightingRadius, + 1 + ), this.backFaceCulling = defaultValue(t.backFaceCulling, !1), this.normalShading = defaultValue(t.normalShading, !0); +} +PointCloudShading.isSupported = function(e) { + return PointCloudEyeDomeLighting.isSupported(e.context); +}; +const SceneTransforms = {}, actualPositionScratch = new Cartesian4(0, 0, 0, 1); +let positionCC = new Cartesian4(); +const scratchViewport$1 = new BoundingRectangle(), scratchWindowCoord0 = new Cartesian2(), scratchWindowCoord1 = new Cartesian2(); +SceneTransforms.worldToWindowCoordinates = function(e, t, n) { + return SceneTransforms.worldWithEyeOffsetToWindowCoordinates( + e, + t, + Cartesian3.ZERO, + n + ); +}; +const scratchCartesian4$5 = new Cartesian4(), scratchEyeOffset = new Cartesian3(); +function worldToClip(e, t, n, i) { + const r = n.viewMatrix, o = Matrix4.multiplyByVector( + r, + Cartesian4.fromElements( + e.x, + e.y, + e.z, + 1, + scratchCartesian4$5 + ), + scratchCartesian4$5 + ), s = Cartesian3.multiplyComponents( + t, + Cartesian3.normalize(o, scratchEyeOffset), + scratchEyeOffset + ); + return o.x += t.x + s.x, o.y += t.y + s.y, o.z += s.z, Matrix4.multiplyByVector( + n.frustum.projectionMatrix, + o, + i + ); +} +const scratchMaxCartographic = new Cartographic( + Math.PI, + CesiumMath.PI_OVER_TWO +), scratchProjectedCartesian = new Cartesian3(), scratchCameraPosition$1 = new Cartesian3(); +SceneTransforms.worldWithEyeOffsetToWindowCoordinates = function(e, t, n, i) { + const r = e.frameState, o = SceneTransforms.computeActualEllipsoidPosition( + r, + t, + actualPositionScratch + ); + if (!defined(o)) + return; + const s = e.canvas, c = scratchViewport$1; + c.x = 0, c.y = 0, c.width = s.clientWidth, c.height = s.clientHeight; + const l = e.camera; + let d = !1; + if (r.mode === SceneMode$1.SCENE2D) { + const f = e.mapProjection, h = scratchMaxCartographic, p = f.project( + h, + scratchProjectedCartesian + ), m = Cartesian3.clone( + l.position, + scratchCameraPosition$1 + ), _ = l.frustum.clone(), y = Matrix4.computeViewportTransformation( + c, + 0, + 1, + new Matrix4() + ), C = l.frustum.projectionMatrix, T = l.positionWC.y, x = Cartesian3.fromElements( + CesiumMath.sign(T) * p.x - T, + 0, + -l.positionWC.x + ), b = Transforms.pointToGLWindowCoordinates( + C, + y, + x + ); + if (T === 0 || b.x <= 0 || b.x >= s.clientWidth) + d = !0; + else { + if (b.x > s.clientWidth * 0.5) { + c.width = b.x, l.frustum.right = p.x - T, positionCC = worldToClip(o, n, l, positionCC), SceneTransforms.clipToGLWindowCoordinates( + c, + positionCC, + scratchWindowCoord0 + ), c.x += b.x, l.position.x = -l.position.x; + const S = l.frustum.right; + l.frustum.right = -l.frustum.left, l.frustum.left = -S, positionCC = worldToClip(o, n, l, positionCC), SceneTransforms.clipToGLWindowCoordinates( + c, + positionCC, + scratchWindowCoord1 + ); + } else { + c.x += b.x, c.width -= b.x, l.frustum.left = -p.x - T, positionCC = worldToClip(o, n, l, positionCC), SceneTransforms.clipToGLWindowCoordinates( + c, + positionCC, + scratchWindowCoord0 + ), c.x = c.x - c.width, l.position.x = -l.position.x; + const S = l.frustum.left; + l.frustum.left = -l.frustum.right, l.frustum.right = -S, positionCC = worldToClip(o, n, l, positionCC), SceneTransforms.clipToGLWindowCoordinates( + c, + positionCC, + scratchWindowCoord1 + ); + } + Cartesian3.clone(m, l.position), l.frustum = _.clone(), i = Cartesian2.clone(scratchWindowCoord0, i), (i.x < 0 || i.x > s.clientWidth) && (i.x = scratchWindowCoord1.x); + } + } + if (r.mode !== SceneMode$1.SCENE2D || d) { + if (positionCC = worldToClip(o, n, l, positionCC), positionCC.z < 0 && !(l.frustum instanceof OrthographicFrustum) && !(l.frustum instanceof OrthographicOffCenterFrustum)) + return; + i = SceneTransforms.clipToGLWindowCoordinates( + c, + positionCC, + i + ); + } + return i.y = s.clientHeight - i.y, i; +}; +SceneTransforms.worldToDrawingBufferCoordinates = function(e, t, n) { + if (n = SceneTransforms.worldToWindowCoordinates(e, t, n), !!defined(n)) + return SceneTransforms.transformWindowToDrawingBuffer(e, n, n); +}; +const projectedPosition = new Cartesian3(), positionInCartographic = new Cartographic(); +SceneTransforms.computeActualEllipsoidPosition = function(e, t, n) { + const i = e.mode; + if (i === SceneMode$1.SCENE3D) + return Cartesian3.clone(t, n); + const r = e.mapProjection, o = r.ellipsoid.cartesianToCartographic( + t, + positionInCartographic + ); + if (!defined(o)) + return; + if (r.project(o, projectedPosition), i === SceneMode$1.COLUMBUS_VIEW) + return Cartesian3.fromElements( + projectedPosition.z, + projectedPosition.x, + projectedPosition.y, + n + ); + if (i === SceneMode$1.SCENE2D) + return Cartesian3.fromElements( + 0, + projectedPosition.x, + projectedPosition.y, + n + ); + const s = e.morphTime; + return Cartesian3.fromElements( + CesiumMath.lerp(projectedPosition.z, t.x, s), + CesiumMath.lerp(projectedPosition.x, t.y, s), + CesiumMath.lerp(projectedPosition.y, t.z, s), + n + ); +}; +const positionNDC = new Cartesian3(), positionWC = new Cartesian3(), viewportTransform = new Matrix4(); +SceneTransforms.clipToGLWindowCoordinates = function(e, t, n) { + return Cartesian3.divideByScalar(t, t.w, positionNDC), Matrix4.computeViewportTransformation(e, 0, 1, viewportTransform), Matrix4.multiplyByPoint(viewportTransform, positionNDC, positionWC), Cartesian2.fromCartesian3(positionWC, n); +}; +SceneTransforms.transformWindowToDrawingBuffer = function(e, t, n) { + const i = e.canvas, r = e.drawingBufferWidth / i.clientWidth, o = e.drawingBufferHeight / i.clientHeight; + return Cartesian2.fromElements( + t.x * r, + t.y * o, + n + ); +}; +const scratchNDC = new Cartesian4(), scratchWorldCoords = new Cartesian4(); +SceneTransforms.drawingBufferToWorldCoordinates = function(e, t, n, i) { + const o = e.context.uniformState, s = o.currentFrustum, c = s.x, l = s.y; + if (e.frameState.useLogDepth) { + const m = n * o.log2FarDepthFromNearPlusOne, _ = Math.pow(2, m) - 1; + n = l * (1 - c / (_ + c)) / (l - c); + } + const d = e.view.passState.viewport, f = Cartesian4.clone(Cartesian4.UNIT_W, scratchNDC); + f.x = (t.x - d.x) / d.width * 2 - 1, f.y = (t.y - d.y) / d.height * 2 - 1, f.z = n * 2 - 1, f.w = 1; + let h, p = e.camera.frustum; + if (defined(p.fovy)) { + h = Matrix4.multiplyByVector( + o.inverseViewProjection, + f, + scratchWorldCoords + ); + const m = 1 / h.w; + Cartesian3.multiplyByScalar(h, m, h); + } else { + const m = p.offCenterFrustum; + defined(m) && (p = m), h = scratchWorldCoords, h.x = (f.x * (p.right - p.left) + p.left + p.right) * 0.5, h.y = (f.y * (p.top - p.bottom) + p.bottom + p.top) * 0.5, h.z = (f.z * (c - l) - c - l) * 0.5, h.w = 1, h = Matrix4.multiplyByVector( + o.inverseView, + h, + h + ); + } + return Cartesian3.fromCartesian4(h, i); +}; +const B3dmParser = {}; +B3dmParser._deprecationWarning = deprecationWarning; +const sizeOfUint32$4 = Uint32Array.BYTES_PER_ELEMENT; +B3dmParser.parse = function(e, t) { + const n = defaultValue(t, 0); + t = n; + const i = new Uint8Array(e), r = new DataView(e); + t += sizeOfUint32$4; + const o = r.getUint32(t, !0); + if (o !== 1) + throw new RuntimeError( + `Only Batched 3D Model version 1 is supported. Version ${o} is not.` + ); + t += sizeOfUint32$4; + const s = r.getUint32(t, !0); + t += sizeOfUint32$4; + let c = r.getUint32(t, !0); + t += sizeOfUint32$4; + let l = r.getUint32(t, !0); + t += sizeOfUint32$4; + let d = r.getUint32(t, !0); + t += sizeOfUint32$4; + let f = r.getUint32(t, !0); + t += sizeOfUint32$4; + let h; + d >= 570425344 ? (t -= sizeOfUint32$4 * 2, h = c, d = l, f = 0, c = 0, l = 0, B3dmParser._deprecationWarning( + "b3dm-legacy-header", + "This b3dm header is using the legacy format [batchLength] [batchTableByteLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] from https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/Batched3DModel." + )) : f >= 570425344 && (t -= sizeOfUint32$4, h = d, d = c, f = l, c = 0, l = 0, B3dmParser._deprecationWarning( + "b3dm-legacy-header", + "This b3dm header is using the legacy format [batchTableJsonByteLength] [batchTableBinaryByteLength] [batchLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] from https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/Batched3DModel." + )); + let p; + c === 0 ? p = { + BATCH_LENGTH: defaultValue(h, 0) + } : (p = getJsonFromTypedArray( + i, + t, + c + ), t += c); + const m = new Uint8Array( + e, + t, + l + ); + t += l; + let _, y; + d > 0 && (_ = getJsonFromTypedArray( + i, + t, + d + ), t += d, f > 0 && (y = new Uint8Array( + e, + t, + f + ), y = new Uint8Array(y), t += f)); + const C = n + s - t; + if (C === 0) + throw new RuntimeError("glTF byte length must be greater than 0."); + let T; + return t % 4 === 0 ? T = new Uint8Array(e, t, C) : (B3dmParser._deprecationWarning( + "b3dm-glb-unaligned", + "The embedded glb is not aligned to a 4-byte boundary." + ), T = new Uint8Array( + i.subarray(t, t + C) + )), { + batchLength: h, + featureTableJson: p, + featureTableBinary: m, + batchTableJson: _, + batchTableBinary: y, + gltf: T + }; +}; +function Cesium3DTileFeatureTable(e, t) { + this.json = e, this.buffer = t, this._cachedTypedArrays = {}, this.featuresLength = 0; +} +function getTypedArrayFromBinary(e, t, n, i, r, o) { + const s = e._cachedTypedArrays; + let c = s[t]; + return defined(c) || (c = ComponentDatatype$1.createArrayBufferView( + n, + e.buffer.buffer, + e.buffer.byteOffset + o, + r * i + ), s[t] = c), c; +} +function getTypedArrayFromArray(e, t, n, i) { + const r = e._cachedTypedArrays; + let o = r[t]; + return defined(o) || (o = ComponentDatatype$1.createTypedArray(n, i), r[t] = o), o; +} +Cesium3DTileFeatureTable.prototype.getGlobalProperty = function(e, t, n) { + const i = this.json[e]; + if (defined(i)) + return defined(i.byteOffset) ? (t = defaultValue(t, ComponentDatatype$1.UNSIGNED_INT), n = defaultValue(n, 1), getTypedArrayFromBinary( + this, + e, + t, + n, + 1, + i.byteOffset + )) : i; +}; +Cesium3DTileFeatureTable.prototype.hasProperty = function(e) { + return defined(this.json[e]); +}; +Cesium3DTileFeatureTable.prototype.getPropertyArray = function(e, t, n) { + const i = this.json[e]; + if (defined(i)) + return defined(i.byteOffset) ? (defined(i.componentType) && (t = ComponentDatatype$1.fromName(i.componentType)), getTypedArrayFromBinary( + this, + e, + t, + n, + this.featuresLength, + i.byteOffset + )) : getTypedArrayFromArray(this, e, t, i); +}; +Cesium3DTileFeatureTable.prototype.getProperty = function(e, t, n, i, r) { + const o = this.json[e]; + if (!defined(o)) + return; + const s = this.getPropertyArray( + e, + t, + n + ); + if (n === 1) + return s[i]; + for (let c = 0; c < n; ++c) + r[c] = s[n * i + c]; + return r; +}; +function parseBatchTable(e) { + const t = e.count, n = e.batchTable, i = e.binaryBody, r = defaultValue( + e.parseAsPropertyAttributes, + !1 + ), o = e.customAttributeOutput, s = partitionProperties(n); + let c; + defined(s.jsonProperties) && (c = new JsonMetadataTable({ + count: t, + properties: s.jsonProperties + })); + let l; + defined(s.hierarchy) && (l = new BatchTableHierarchy({ + extension: s.hierarchy, + binaryBody: i + })); + const d = MetadataClass.BATCH_TABLE_CLASS_NAME, f = s.binaryProperties; + let h, p, m; + if (r) { + const C = transcodeBinaryPropertiesAsPropertyAttributes( + t, + d, + f, + i, + o + ); + m = C.transcodedSchema, p = [new PropertyAttribute({ + propertyAttribute: C.propertyAttributeJson, + class: C.transcodedClass + })]; + } else { + const C = transcodeBinaryProperties( + t, + d, + f, + i + ); + m = C.transcodedSchema; + const T = C.featureTableJson; + h = new MetadataTable({ + count: T.count, + properties: T.properties, + class: C.transcodedClass, + bufferViews: C.bufferViewsTypedArrays + }), p = []; + } + const _ = []; + if (defined(h) || defined(c) || defined(l)) { + const C = new PropertyTable({ + id: 0, + name: "Batch Table", + count: t, + metadataTable: h, + jsonMetadataTable: c, + batchTableHierarchy: l + }); + _.push(C); + } + const y = { + schema: m, + propertyTables: _, + propertyAttributes: p, + extensions: s.extensions, + extras: s.extras + }; + return new StructuralMetadata(y); +} +function partitionProperties(e) { + const t = e.HIERARCHY, n = e.extras, i = e.extensions; + let r; + defined(t) ? (parseBatchTable._deprecationWarning( + "batchTableHierarchyExtension", + "The batch table HIERARCHY property has been moved to an extension. Use extensions.3DTILES_batch_table_hierarchy instead." + ), r = t) : defined(i) && (r = i["3DTILES_batch_table_hierarchy"]); + let o; + const s = {}; + for (const c in e) { + if (!e.hasOwnProperty(c) || // these cases were handled above; + c === "HIERARCHY" || c === "extensions" || c === "extras") + continue; + const l = e[c]; + Array.isArray(l) ? (o = defined(o) ? o : {}, o[c] = l) : s[c] = l; + } + return { + binaryProperties: s, + jsonProperties: o, + hierarchy: r, + extras: n, + extensions: i + }; +} +function transcodeBinaryProperties(e, t, n, i) { + const r = {}, o = {}, s = {}; + let c = 0; + for (const h in n) { + if (!n.hasOwnProperty(h)) + continue; + if (!defined(i)) + throw new RuntimeError( + `Property ${h} requires a batch table binary.` + ); + const p = n[h], m = getBinaryAccessor(p); + o[h] = { + bufferView: c + }, r[h] = transcodePropertyType(p), s[c] = m.createArrayBufferView( + i.buffer, + i.byteOffset + p.byteOffset, + e + ), c++; + } + const l = { + classes: {} + }; + l.classes[t] = { + properties: r + }; + const d = MetadataSchema.fromJson(l); + return { + featureTableJson: { + class: t, + count: e, + properties: o + }, + bufferViewsTypedArrays: s, + transcodedSchema: d, + transcodedClass: d.classes[t] + }; +} +function transcodeBinaryPropertiesAsPropertyAttributes(e, t, n, i, r) { + const o = {}, s = {}; + let c = 0; + for (const h in n) { + if (!n.hasOwnProperty(h)) + continue; + const p = n[h]; + if (!defined(i) && !defined(p.typedArray)) + throw new RuntimeError( + `Property ${h} requires a batch table binary.` + ); + let m = ModelUtility.sanitizeGlslIdentifier(h); + (m === "" || o.hasOwnProperty(m)) && (m = `property_${c}`, c++); + const _ = transcodePropertyType(p); + _.name = h, o[m] = _; + let y = m.toUpperCase(); + y.startsWith("_") || (y = `_${y}`); + let C = p.typedArray; + defined(C) || (C = getBinaryAccessor(p).createArrayBufferView( + i.buffer, + i.byteOffset + p.byteOffset, + e + )); + const T = new ModelComponents.Attribute(); + T.name = y, T.count = e, T.type = p.type; + const x = ComponentDatatype$1.fromTypedArray( + C + ); + (x === ComponentDatatype$1.INT || x === ComponentDatatype$1.UNSIGNED_INT || x === ComponentDatatype$1.DOUBLE) && (parseBatchTable._oneTimeWarning( + "Cast pnts property to floats", + `Point cloud property "${y}" will be cast to a float array because INT, UNSIGNED_INT, and DOUBLE are not valid WebGL vertex attribute types. Some precision may be lost.` + ), C = new Float32Array(C)), T.componentDatatype = ComponentDatatype$1.fromTypedArray( + C + ), T.typedArray = C, r.push(T), s[m] = { + attribute: y + }; + } + const l = { + classes: {} + }; + l.classes[t] = { + properties: o + }; + const d = MetadataSchema.fromJson(l); + return { + class: t, + propertyAttributeJson: { + properties: s + }, + transcodedSchema: d, + transcodedClass: d.classes[t] + }; +} +function transcodePropertyType(e) { + const t = transcodeComponentType$1(e.componentType); + return { + type: e.type, + componentType: t + }; +} +function transcodeComponentType$1(e) { + switch (e) { + case "BYTE": + return "INT8"; + case "UNSIGNED_BYTE": + return "UINT8"; + case "SHORT": + return "INT16"; + case "UNSIGNED_SHORT": + return "UINT16"; + case "INT": + return "INT32"; + case "UNSIGNED_INT": + return "UINT32"; + case "FLOAT": + return "FLOAT32"; + case "DOUBLE": + return "FLOAT64"; + } +} +parseBatchTable._deprecationWarning = deprecationWarning; +parseBatchTable._oneTimeWarning = oneTimeWarning; +const B3dmLoaderState = { + UNLOADED: 0, + LOADING: 1, + PROCESSING: 2, + READY: 3, + FAILED: 4 +}, FeatureIdAttribute$2 = ModelComponents.FeatureIdAttribute; +function B3dmLoader(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.b3dmResource; + let n = e.baseResource; + const i = e.arrayBuffer, r = defaultValue(e.byteOffset, 0), o = defaultValue(e.releaseGltfJson, !1), s = defaultValue(e.asynchronous, !0), c = defaultValue( + e.incrementallyLoadTextures, + !0 + ), l = defaultValue(e.upAxis, Axis$1.Y), d = defaultValue(e.forwardAxis, Axis$1.X), f = defaultValue( + e.loadAttributesAsTypedArray, + !1 + ), h = defaultValue(e.loadAttributesFor2D, !1), p = defaultValue(e.enablePick, !1), m = defaultValue( + e.loadIndicesForWireframe, + !1 + ), _ = defaultValue(e.loadPrimitiveOutline, !0), y = defaultValue( + e.loadForClassification, + !1 + ); + n = defined(n) ? n : t.clone(), this._b3dmResource = t, this._baseResource = n, this._arrayBuffer = i, this._byteOffset = r, this._releaseGltfJson = o, this._asynchronous = s, this._incrementallyLoadTextures = c, this._upAxis = l, this._forwardAxis = d, this._loadAttributesAsTypedArray = f, this._loadAttributesFor2D = h, this._enablePick = p, this._loadIndicesForWireframe = m, this._loadPrimitiveOutline = _, this._loadForClassification = y, this._state = B3dmLoaderState.UNLOADED, this._promise = void 0, this._gltfLoader = void 0, this._batchLength = 0, this._propertyTable = void 0, this._batchTable = void 0, this._components = void 0, this._transform = Matrix4.IDENTITY; +} +defined(Object.create) && (B3dmLoader.prototype = Object.create(ResourceLoader.prototype), B3dmLoader.prototype.constructor = B3dmLoader); +Object.defineProperties(B3dmLoader.prototype, { + /** + * true if textures are loaded, useful when incrementallyLoadTextures is true + * + * @memberof B3dmLoader.prototype + * + * @type {boolean} + * @readonly + * @private + */ + texturesLoaded: { + get: function() { + var e; + return (e = this._gltfLoader) == null ? void 0 : e.texturesLoaded; + } + }, + /** + * The cache key of the resource + * + * @memberof B3dmLoader.prototype + * + * @type {string} + * @readonly + * @private + */ + cacheKey: { + get: function() { + } + }, + /** + * The loaded components. + * + * @memberof B3dmLoader.prototype + * + * @type {ModelComponents.Components} + * @readonly + * @private + */ + components: { + get: function() { + return this._components; + } + } +}); +B3dmLoader.prototype.load = function() { + if (defined(this._promise)) + return this._promise; + const e = B3dmParser.parse(this._arrayBuffer, this._byteOffset); + let t = e.batchLength; + const n = e.featureTableJson, i = e.featureTableBinary, r = e.batchTableJson, o = e.batchTableBinary, s = new Cesium3DTileFeatureTable( + n, + i + ); + t = s.getGlobalProperty("BATCH_LENGTH"), this._batchLength = t; + const c = s.getGlobalProperty( + "RTC_CENTER", + ComponentDatatype$1.FLOAT, + 3 + ); + defined(c) && (this._transform = Matrix4.fromTranslation(Cartesian3.fromArray(c))), this._batchTable = { + json: r, + binary: o + }; + const l = new GltfLoader({ + typedArray: e.gltf, + upAxis: this._upAxis, + forwardAxis: this._forwardAxis, + gltfResource: this._b3dmResource, + baseResource: this._baseResource, + releaseGltfJson: this._releaseGltfJson, + incrementallyLoadTextures: this._incrementallyLoadTextures, + loadAttributesAsTypedArray: this._loadAttributesAsTypedArray, + loadAttributesFor2D: this._loadAttributesFor2D, + enablePick: this._enablePick, + loadIndicesForWireframe: this._loadIndicesForWireframe, + loadPrimitiveOutline: this._loadPrimitiveOutline, + loadForClassification: this._loadForClassification, + renameBatchIdSemantic: !0 + }); + this._gltfLoader = l, this._state = B3dmLoaderState.LOADING; + const d = this; + return this._promise = l.load().then(function() { + if (!d.isDestroyed()) + return d._state = B3dmLoaderState.PROCESSING, d; + }).catch(function(f) { + if (!d.isDestroyed()) + return handleError$4(d, f); + }), this._promise; +}; +function handleError$4(e, t) { + return e.unload(), e._state = B3dmLoaderState.FAILED, t = e.getError("Failed to load b3dm", t), Promise.reject(t); +} +B3dmLoader.prototype.process = function(e) { + if (this._state === B3dmLoaderState.READY) + return !0; + if (this._state !== B3dmLoaderState.PROCESSING || !this._gltfLoader.process(e)) + return !1; + const n = this._gltfLoader.components; + return n.transform = Matrix4.multiplyTransformation( + this._transform, + n.transform, + n.transform + ), createStructuralMetadata$1(this, n), this._components = n, this._arrayBuffer = void 0, this._state = B3dmLoaderState.READY, !0; +}; +function createStructuralMetadata$1(e, t) { + const n = e._batchTable, i = e._batchLength; + if (i === 0) + return; + let r; + if (defined(n.json)) + r = parseBatchTable({ + count: i, + batchTable: n.json, + binaryBody: n.binary + }); + else { + const c = new PropertyTable({ + name: MetadataClass.BATCH_TABLE_CLASS_NAME, + count: i + }); + r = new StructuralMetadata({ + schema: {}, + propertyTables: [c] + }); + } + const o = t.scene.nodes, s = o.length; + for (let c = 0; c < s; c++) + processNode(o[c]); + t.structuralMetadata = r; +} +function processNode(e) { + const t = e.children.length; + for (let i = 0; i < t; i++) + processNode(e.children[i]); + const n = e.primitives.length; + for (let i = 0; i < n; i++) { + const r = e.primitives[i], o = ModelUtility.getAttributeBySemantic( + r, + VertexAttributeSemantic$1.FEATURE_ID + ); + if (defined(o)) { + o.setIndex = 0; + const s = new FeatureIdAttribute$2(); + s.propertyTableId = 0, s.setIndex = 0, s.positionalLabel = "featureId_0", r.featureIds.push(s); + } + } +} +B3dmLoader.prototype.unload = function() { + defined(this._gltfLoader) && !this._gltfLoader.isDestroyed() && this._gltfLoader.unload(), this._components = void 0, this._arrayBuffer = void 0; +}; +function GeoJsonLoader(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._geoJson = e.geoJson, this._components = void 0; +} +defined(Object.create) && (GeoJsonLoader.prototype = Object.create(ResourceLoader.prototype), GeoJsonLoader.prototype.constructor = GeoJsonLoader); +Object.defineProperties(GeoJsonLoader.prototype, { + /** + * The cache key of the resource. + * + * @memberof GeoJsonLoader.prototype + * + * @type {string} + * @readonly + * @private + */ + cacheKey: { + get: function() { + } + }, + /** + * The loaded components. + * + * @memberof GeoJsonLoader.prototype + * + * @type {ModelComponents.Components} + * @readonly + * @private + */ + components: { + get: function() { + return this._components; + } + } +}); +GeoJsonLoader.prototype.load = function() { + return Promise.resolve(this); +}; +GeoJsonLoader.prototype.process = function(e) { + return defined(this._components) || (this._components = parse(this._geoJson, e), this._geoJson = void 0), !0; +}; +function ParsedFeature() { + this.lines = void 0, this.points = void 0, this.properties = void 0; +} +function ParseResult() { + this.features = []; +} +function parsePosition(e) { + const t = e[0], n = e[1], i = defaultValue(e[2], 0); + return new Cartesian3(t, n, i); +} +function parseLineString(e) { + const t = e.length, n = new Array(t); + for (let r = 0; r < t; r++) + n[r] = parsePosition(e[r]); + return [n]; +} +function parseMultiLineString(e) { + const t = e.length, n = new Array(t); + for (let i = 0; i < t; i++) + n[i] = parseLineString(e[i])[0]; + return n; +} +function parsePolygon(e) { + const t = e.length, n = new Array(t); + for (let i = 0; i < t; i++) + n[i] = parseLineString(e[i])[0]; + return n; +} +function parseMultiPolygon(e) { + const t = e.length, n = []; + for (let i = 0; i < t; i++) + Array.prototype.push.apply(n, parsePolygon(e[i])); + return n; +} +function parsePoint(e) { + return [parsePosition(e)]; +} +function parseMultiPoint(e) { + const t = e.length, n = new Array(t); + for (let i = 0; i < t; i++) + n[i] = parsePosition(e[i]); + return n; +} +const geometryTypes$2 = { + LineString: parseLineString, + MultiLineString: parseMultiLineString, + MultiPolygon: parseMultiPolygon, + Polygon: parsePolygon, + MultiPoint: parseMultiPoint, + Point: parsePoint +}, primitiveTypes = { + LineString: PrimitiveType$1.LINES, + MultiLineString: PrimitiveType$1.LINES, + MultiPolygon: PrimitiveType$1.LINES, + Polygon: PrimitiveType$1.LINES, + MultiPoint: PrimitiveType$1.POINTS, + Point: PrimitiveType$1.POINTS +}; +function parseFeature(e, t) { + if (!defined(e.geometry)) + return; + const n = e.geometry.type, i = geometryTypes$2[n], r = primitiveTypes[n], o = e.geometry.coordinates; + if (!defined(i) || !defined(o)) + return; + const s = new ParsedFeature(); + r === PrimitiveType$1.LINES ? s.lines = i(o) : r === PrimitiveType$1.POINTS && (s.points = i(o)), s.properties = e.properties, t.features.push(s); +} +function parseFeatureCollection(e, t) { + const n = e.features, i = n.length; + for (let r = 0; r < i; r++) + parseFeature(n[r], t); +} +const geoJsonObjectTypes$1 = { + FeatureCollection: parseFeatureCollection, + Feature: parseFeature +}, scratchCartesian$9 = new Cartesian3(); +function createLinesPrimitive(e, t, n) { + let i = 0, r = 0; + const o = e.length; + for (let I = 0; I < o; I++) { + const M = e[I]; + if (defined(M.lines)) { + const R = M.lines.length; + for (let L = 0; L < R; L++) { + const g = M.lines[L]; + i += g.length, r += (g.length - 1) * 2; + } + } + } + const s = new Float32Array(i * 3), c = new Float32Array(i), l = IndexDatatype$1.createTypedArray( + i, + r + ), d = IndexDatatype$1.fromTypedArray(l), f = new Cartesian3( + Number.POSITIVE_INFINITY, + Number.POSITIVE_INFINITY, + Number.POSITIVE_INFINITY + ), h = new Cartesian3( + Number.NEGATIVE_INFINITY, + Number.NEGATIVE_INFINITY, + Number.NEGATIVE_INFINITY + ); + let p = 0, m = 0; + for (let I = 0; I < o; I++) { + const M = e[I]; + if (!defined(M.lines)) + continue; + const R = M.lines.length; + for (let L = 0; L < R; L++) { + const g = M.lines[L], w = g.length; + for (let O = 0; O < w; O++) { + const N = g[O], F = Cartesian3.fromDegrees( + N.x, + N.y, + N.z, + Ellipsoid.WGS84, + scratchCartesian$9 + ), B = Matrix4.multiplyByPoint( + t, + F, + scratchCartesian$9 + ); + Cartesian3.minimumByComponent(f, B, f), Cartesian3.maximumByComponent(h, B, h), Cartesian3.pack(B, s, p * 3), c[p] = I, O < w - 1 && (l[m * 2] = p, l[m * 2 + 1] = p + 1, m++), p++; + } + } + } + const _ = Buffer.createVertexBuffer({ + typedArray: s, + context: n.context, + usage: BufferUsage$1.STATIC_DRAW + }); + _.vertexArrayDestroyable = !1; + const y = Buffer.createVertexBuffer({ + typedArray: c, + context: n.context, + usage: BufferUsage$1.STATIC_DRAW + }); + y.vertexArrayDestroyable = !1; + const C = Buffer.createIndexBuffer({ + typedArray: l, + context: n.context, + usage: BufferUsage$1.STATIC_DRAW, + indexDatatype: d + }); + C.vertexArrayDestroyable = !1; + const T = new ModelComponents.Attribute(); + T.semantic = VertexAttributeSemantic$1.POSITION, T.componentDatatype = ComponentDatatype$1.FLOAT, T.type = AttributeType$1.VEC3, T.count = i, T.min = f, T.max = h, T.buffer = _; + const x = new ModelComponents.Attribute(); + x.semantic = VertexAttributeSemantic$1.FEATURE_ID, x.setIndex = 0, x.componentDatatype = ComponentDatatype$1.FLOAT, x.type = AttributeType$1.SCALAR, x.count = i, x.buffer = y; + const b = [T, x], S = new ModelComponents.Material(); + S.unlit = !0; + const E = new ModelComponents.Indices(); + E.indexDatatype = d, E.count = l.length, E.buffer = C; + const A = new ModelComponents.FeatureIdAttribute(); + A.featureCount = o, A.propertyTableId = 0, A.setIndex = 0, A.positionalLabel = "featureId_0"; + const D = [A], P = new ModelComponents.Primitive(); + return P.attributes = b, P.indices = E, P.featureIds = D, P.primitiveType = PrimitiveType$1.LINES, P.material = S, P; +} +function createPointsPrimitive(e, t, n) { + let i = 0; + const r = e.length; + for (let b = 0; b < r; b++) { + const S = e[b]; + defined(S.points) && (i += S.points.length); + } + const o = new Float32Array(i * 3), s = new Float32Array(i), c = new Cartesian3( + Number.POSITIVE_INFINITY, + Number.POSITIVE_INFINITY, + Number.POSITIVE_INFINITY + ), l = new Cartesian3( + Number.NEGATIVE_INFINITY, + Number.NEGATIVE_INFINITY, + Number.NEGATIVE_INFINITY + ); + let d = 0; + for (let b = 0; b < r; b++) { + const S = e[b]; + if (!defined(S.points)) + continue; + const E = S.points.length; + for (let A = 0; A < E; A++) { + const D = S.points[A], P = Cartesian3.fromDegrees( + D.x, + D.y, + D.z, + Ellipsoid.WGS84, + scratchCartesian$9 + ), I = Matrix4.multiplyByPoint( + t, + P, + scratchCartesian$9 + ); + Cartesian3.minimumByComponent(c, I, c), Cartesian3.maximumByComponent(l, I, l), Cartesian3.pack(I, o, d * 3), s[d] = b, d++; + } + } + const f = Buffer.createVertexBuffer({ + typedArray: o, + context: n.context, + usage: BufferUsage$1.STATIC_DRAW + }); + f.vertexArrayDestroyable = !1; + const h = Buffer.createVertexBuffer({ + typedArray: s, + context: n.context, + usage: BufferUsage$1.STATIC_DRAW + }); + h.vertexArrayDestroyable = !1; + const p = new ModelComponents.Attribute(); + p.semantic = VertexAttributeSemantic$1.POSITION, p.componentDatatype = ComponentDatatype$1.FLOAT, p.type = AttributeType$1.VEC3, p.count = i, p.min = c, p.max = l, p.buffer = f; + const m = new ModelComponents.Attribute(); + m.semantic = VertexAttributeSemantic$1.FEATURE_ID, m.setIndex = 0, m.componentDatatype = ComponentDatatype$1.FLOAT, m.type = AttributeType$1.SCALAR, m.count = i, m.buffer = h; + const _ = [p, m], y = new ModelComponents.Material(); + y.unlit = !0; + const C = new ModelComponents.FeatureIdAttribute(); + C.featureCount = r, C.propertyTableId = 0, C.setIndex = 0, C.positionalLabel = "featureId_0"; + const T = [C], x = new ModelComponents.Primitive(); + return x.attributes = _, x.featureIds = T, x.primitiveType = PrimitiveType$1.POINTS, x.material = y, x; +} +function parse(e, t) { + const n = new ParseResult(), i = geoJsonObjectTypes$1[e.type]; + defined(i) && i(e, n); + const r = n.features, o = r.length; + if (o === 0) + throw new RuntimeError("GeoJSON must have at least one feature"); + const s = {}; + for (let I = 0; I < o; I++) { + const M = r[I], R = defaultValue( + M.properties, + defaultValue.EMPTY_OBJECT + ); + for (const L in R) + R.hasOwnProperty(L) && (defined(s[L]) || (s[L] = new Array(o))); + } + for (let I = 0; I < o; I++) { + const M = r[I]; + for (const R in s) + if (s.hasOwnProperty(R)) { + const L = defaultValue(M.properties[R], ""); + s[R][I] = L; + } + } + const c = new JsonMetadataTable({ + count: o, + properties: s + }), d = [new PropertyTable({ + id: 0, + count: o, + jsonMetadataTable: c + })], f = MetadataSchema.fromJson({}), h = new StructuralMetadata({ + schema: f, + propertyTables: d + }), p = new Cartesian3( + Number.POSITIVE_INFINITY, + Number.POSITIVE_INFINITY, + Number.POSITIVE_INFINITY + ), m = new Cartesian3( + Number.NEGATIVE_INFINITY, + Number.NEGATIVE_INFINITY, + Number.NEGATIVE_INFINITY + ); + let _ = !1, y = !1; + for (let I = 0; I < o; I++) { + const M = r[I]; + if (defined(M.lines)) { + _ = !0; + const R = M.lines.length; + for (let L = 0; L < R; L++) { + const g = M.lines[L], w = g.length; + for (let O = 0; O < w; O++) + Cartesian3.minimumByComponent( + p, + g[O], + p + ), Cartesian3.maximumByComponent( + m, + g[O], + m + ); + } + } + if (defined(M.points)) { + y = !0; + const R = M.points.length; + for (let L = 0; L < R; L++) { + const g = M.points[L]; + Cartesian3.minimumByComponent(p, g, p), Cartesian3.maximumByComponent(m, g, m); + } + } + } + const C = Cartesian3.midpoint( + p, + m, + new Cartesian3() + ), T = Cartesian3.fromDegrees( + C.x, + C.y, + C.z, + Ellipsoid.WGS84, + new Cartesian3() + ), x = Transforms.eastNorthUpToFixedFrame( + T, + Ellipsoid.WGS84, + new Matrix4() + ), b = Matrix4.inverseTransformation(x, new Matrix4()), S = []; + _ && S.push(createLinesPrimitive(r, b, t)), y && S.push(createPointsPrimitive(r, b, t)); + const E = new ModelComponents.Node(); + E.index = 0, E.primitives = S; + const A = [E], D = new ModelComponents.Scene(); + D.nodes = A; + const P = new ModelComponents.Components(); + return P.scene = D, P.nodes = A, P.transform = x, P.structuralMetadata = h, P; +} +GeoJsonLoader.prototype.unload = function() { + this._components = void 0; +}; +const I3dmParser = {}; +I3dmParser._deprecationWarning = deprecationWarning; +const sizeOfUint32$3 = Uint32Array.BYTES_PER_ELEMENT; +I3dmParser.parse = function(e, t) { + const n = defaultValue(t, 0); + t = n; + const i = new Uint8Array(e), r = new DataView(e); + t += sizeOfUint32$3; + const o = r.getUint32(t, !0); + if (o !== 1) + throw new RuntimeError( + `Only Instanced 3D Model version 1 is supported. Version ${o} is not.` + ); + t += sizeOfUint32$3; + const s = r.getUint32(t, !0); + t += sizeOfUint32$3; + const c = r.getUint32(t, !0); + if (c === 0) + throw new RuntimeError( + "featureTableJsonByteLength is zero, the feature table must be defined." + ); + t += sizeOfUint32$3; + const l = r.getUint32(t, !0); + t += sizeOfUint32$3; + const d = r.getUint32(t, !0); + t += sizeOfUint32$3; + const f = r.getUint32(t, !0); + t += sizeOfUint32$3; + const h = r.getUint32(t, !0); + if (h !== 1 && h !== 0) + throw new RuntimeError( + `Only glTF format 0 (uri) or 1 (embedded) are supported. Format ${h} is not.` + ); + t += sizeOfUint32$3; + const p = getJsonFromTypedArray( + i, + t, + c + ); + t += c; + const m = new Uint8Array( + e, + t, + l + ); + t += l; + let _, y; + d > 0 && (_ = getJsonFromTypedArray( + i, + t, + d + ), t += d, f > 0 && (y = new Uint8Array( + e, + t, + f + ), y = new Uint8Array(y), t += f)); + const C = n + s - t; + if (C === 0) + throw new RuntimeError("glTF byte length must be greater than 0."); + let T; + return t % 4 === 0 ? T = new Uint8Array(e, t, C) : (I3dmParser._deprecationWarning( + "i3dm-glb-unaligned", + "The embedded glb is not aligned to a 4-byte boundary." + ), T = new Uint8Array( + i.subarray(t, t + C) + )), { + gltfFormat: h, + featureTableJson: p, + featureTableBinary: m, + batchTableJson: _, + batchTableBinary: y, + gltf: T + }; +}; +const I3dmLoaderState = { + NOT_LOADED: 0, + LOADING: 1, + PROCESSING: 2, + POST_PROCESSING: 3, + READY: 4, + FAILED: 5, + UNLOADED: 6 +}, Attribute$1 = ModelComponents.Attribute, FeatureIdAttribute$1 = ModelComponents.FeatureIdAttribute, Instances = ModelComponents.Instances; +function I3dmLoader(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.i3dmResource, n = e.arrayBuffer; + let i = e.baseResource; + const r = defaultValue(e.byteOffset, 0), o = defaultValue(e.releaseGltfJson, !1), s = defaultValue(e.asynchronous, !0), c = defaultValue( + e.incrementallyLoadTextures, + !0 + ), l = defaultValue(e.upAxis, Axis$1.Y), d = defaultValue(e.forwardAxis, Axis$1.X), f = defaultValue( + e.loadAttributesAsTypedArray, + !1 + ), h = defaultValue( + e.loadIndicesForWireframe, + !1 + ), p = defaultValue(e.loadPrimitiveOutline, !0), m = defaultValue(e.enablePick, !1); + i = defined(i) ? i : t.clone(), this._i3dmResource = t, this._baseResource = i, this._arrayBuffer = n, this._byteOffset = r, this._releaseGltfJson = o, this._asynchronous = s, this._incrementallyLoadTextures = c, this._upAxis = l, this._forwardAxis = d, this._loadAttributesAsTypedArray = f, this._loadIndicesForWireframe = h, this._loadPrimitiveOutline = p, this._enablePick = m, this._state = I3dmLoaderState.NOT_LOADED, this._promise = void 0, this._gltfLoader = void 0, this._buffers = [], this._components = void 0, this._transform = Matrix4.IDENTITY, this._batchTable = void 0, this._featureTable = void 0, this._instancesLength = 0; +} +defined(Object.create) && (I3dmLoader.prototype = Object.create(ResourceLoader.prototype), I3dmLoader.prototype.constructor = I3dmLoader); +Object.defineProperties(I3dmLoader.prototype, { + /** + * true if textures are loaded, useful when incrementallyLoadTextures is true + * + * @memberof I3dmLoader.prototype + * + * @type {boolean} + * @readonly + * @private + */ + texturesLoaded: { + get: function() { + var e; + return (e = this._gltfLoader) == null ? void 0 : e.texturesLoaded; + } + }, + /** + * The cache key of the resource + * + * @memberof I3dmLoader.prototype + * + * @type {string} + * @readonly + * @private + */ + cacheKey: { + get: function() { + } + }, + /** + * The loaded components. + * + * @memberof I3dmLoader.prototype + * + * @type {ModelComponents.Components} + * @default {@link Matrix4.IDENTITY} + * @readonly + * @private + */ + components: { + get: function() { + return this._components; + } + } +}); +I3dmLoader.prototype.load = function() { + if (defined(this._promise)) + return this._promise; + const e = I3dmParser.parse(this._arrayBuffer, this._byteOffset), t = e.featureTableJson, n = e.featureTableBinary, i = e.batchTableJson, r = e.batchTableBinary, o = e.gltfFormat, s = new Cesium3DTileFeatureTable( + t, + n + ); + this._featureTable = s; + const c = s.getGlobalProperty("INSTANCES_LENGTH"); + if (s.featuresLength = c, !defined(c)) + throw new RuntimeError( + "Feature table global property: INSTANCES_LENGTH must be defined" + ); + this._instancesLength = c; + const l = s.getGlobalProperty( + "RTC_CENTER", + ComponentDatatype$1.FLOAT, + 3 + ); + defined(l) && (this._transform = Matrix4.fromTranslation(Cartesian3.fromArray(l))), this._batchTable = { + json: i, + binary: r + }; + const d = { + upAxis: this._upAxis, + forwardAxis: this._forwardAxis, + releaseGltfJson: this._releaseGltfJson, + incrementallyLoadTextures: this._incrementallyLoadTextures, + loadAttributesAsTypedArray: this._loadAttributesAsTypedArray, + enablePick: this._enablePick, + loadIndicesForWireframe: this._loadIndicesForWireframe, + loadPrimitiveOutline: this._loadPrimitiveOutline + }; + if (o === 0) { + let h = getStringFromTypedArray(e.gltf); + h = h.replace(/[\s\0]+$/, ""); + const p = this._baseResource.getDerivedResource({ + url: h + }); + d.gltfResource = p, d.baseResource = p; + } else + d.gltfResource = this._i3dmResource, d.typedArray = e.gltf; + const f = new GltfLoader(d); + return this._gltfLoader = f, this._state = I3dmLoaderState.LOADING, this._promise = f.load().then(() => { + if (!this.isDestroyed()) + return this._state = I3dmLoaderState.PROCESSING, this; + }).catch((h) => { + if (!this.isDestroyed()) + throw handleError$3(this, h); + }), this._promise; +}; +function handleError$3(e, t) { + return e.unload(), e._state = I3dmLoaderState.FAILED, e.getError("Failed to load i3dm", t); +} +I3dmLoader.prototype.process = function(e) { + if (this._state === I3dmLoaderState.READY) + return !0; + const t = this._gltfLoader; + let n = !1; + if (this._state === I3dmLoaderState.PROCESSING && (n = t.process(e)), !n) + return !1; + const i = t.components; + return i.transform = Matrix4.multiplyTransformation( + this._transform, + i.transform, + i.transform + ), createInstances(this, i, e), createStructuralMetadata(this, i), this._components = i, this._arrayBuffer = void 0, this._state = I3dmLoaderState.READY, !0; +}; +function createStructuralMetadata(e, t) { + const n = e._batchTable, i = e._instancesLength; + if (i === 0) + return; + let r; + if (defined(n.json)) + r = parseBatchTable({ + count: i, + batchTable: n.json, + binaryBody: n.binary + }); + else { + const o = new PropertyTable({ + name: MetadataClass.BATCH_TABLE_CLASS_NAME, + count: i + }); + r = new StructuralMetadata({ + schema: {}, + propertyTables: [o] + }); + } + t.structuralMetadata = r; +} +const positionScratch$a = new Cartesian3(), propertyScratch1 = new Array(4), transformScratch$1 = new Matrix4(); +function createInstances(e, t, n) { + let i; + const r = e._featureTable, o = e._instancesLength; + if (o === 0) + return; + const s = r.getGlobalProperty( + "RTC_CENTER", + ComponentDatatype$1.FLOAT, + 3 + ), c = r.getGlobalProperty("EAST_NORTH_UP"), l = r.hasProperty("NORMAL_UP") || r.hasProperty("NORMAL_UP_OCT32P") || c, d = r.hasProperty("SCALE") || r.hasProperty("SCALE_NON_UNIFORM"), f = getPositions(r); + let h; + l && (h = new Float32Array(4 * o)); + let p; + d && (p = new Float32Array(3 * o)); + const m = new Float32Array(o), _ = Cartesian3.unpackArray(f); + let y = new Cartesian3(); + const C = new Cartesian3(), T = new Cartesian3(), x = new Cartesian3(), b = new Matrix3(), S = new Quaternion(), E = new Array(4), A = new Cartesian3(), D = new Array(3), P = new Matrix4(); + if (!defined(s) || Cartesian3.equals(Cartesian3.unpack(s), Cartesian3.ZERO)) { + const B = BoundingSphere.fromPoints(_); + for (i = 0; i < _.length; i++) + Cartesian3.subtract( + _[i], + B.center, + positionScratch$a + ), f[3 * i + 0] = positionScratch$a.x, f[3 * i + 1] = positionScratch$a.y, f[3 * i + 2] = positionScratch$a.z; + const V = Matrix4.fromTranslation( + B.center, + transformScratch$1 + ); + t.transform = Matrix4.multiplyTransformation( + V, + t.transform, + t.transform + ); + } + for (i = 0; i < o; i++) { + y = Cartesian3.clone(_[i]), defined(s) && Cartesian3.add( + y, + Cartesian3.unpack(s), + y + ), l && (processRotation( + r, + c, + i, + S, + y, + T, + C, + x, + b, + P + ), Quaternion.pack(S, E, 0), h[4 * i + 0] = E[0], h[4 * i + 1] = E[1], h[4 * i + 2] = E[2], h[4 * i + 3] = E[3]), d && (processScale(r, i, A), Cartesian3.pack(A, D, 0), p[3 * i + 0] = D[0], p[3 * i + 1] = D[1], p[3 * i + 2] = D[2]); + let B = r.getProperty( + "BATCH_ID", + ComponentDatatype$1.UNSIGNED_SHORT, + 1, + i + ); + defined(B) || (B = i), m[i] = B; + } + const I = new Instances(); + I.transformInWorldSpace = !0; + const M = e._buffers, R = new Attribute$1(); + if (R.name = "Instance Translation", R.semantic = InstanceAttributeSemantic$1.TRANSLATION, R.componentDatatype = ComponentDatatype$1.FLOAT, R.type = AttributeType$1.VEC3, R.count = o, R.typedArray = f, !l) { + const B = Buffer.createVertexBuffer({ + context: n.context, + typedArray: f, + usage: BufferUsage$1.STATIC_DRAW + }); + B.vertexArrayDestroyable = !1, M.push(B), R.buffer = B; + } + if (I.attributes.push(R), l) { + const B = new Attribute$1(); + B.name = "Instance Rotation", B.semantic = InstanceAttributeSemantic$1.ROTATION, B.componentDatatype = ComponentDatatype$1.FLOAT, B.type = AttributeType$1.VEC4, B.count = o, B.typedArray = h, I.attributes.push(B); + } + if (d) { + const B = new Attribute$1(); + if (B.name = "Instance Scale", B.semantic = InstanceAttributeSemantic$1.SCALE, B.componentDatatype = ComponentDatatype$1.FLOAT, B.type = AttributeType$1.VEC3, B.count = o, l) + B.typedArray = p; + else { + const V = Buffer.createVertexBuffer({ + context: n.context, + typedArray: p, + usage: BufferUsage$1.STATIC_DRAW + }); + V.vertexArrayDestroyable = !1, M.push(V), B.buffer = V; + } + I.attributes.push(B); + } + const L = new Attribute$1(); + L.name = "Instance Feature ID", L.setIndex = 0, L.semantic = InstanceAttributeSemantic$1.FEATURE_ID, L.componentDatatype = ComponentDatatype$1.FLOAT, L.type = AttributeType$1.SCALAR, L.count = o; + const g = Buffer.createVertexBuffer({ + context: n.context, + typedArray: m, + usage: BufferUsage$1.STATIC_DRAW + }); + g.vertexArrayDestroyable = !1, M.push(g), L.buffer = g, I.attributes.push(L); + const w = new FeatureIdAttribute$1(); + w.propertyTableId = 0, w.setIndex = 0, w.positionalLabel = "instanceFeatureId_0", I.featureIds.push(w); + const O = t.nodes, N = O.length; + let F = !1; + for (i = 0; i < N; i++) { + const B = O[i]; + B.primitives.length > 0 && (B.instances = F ? createInstancesCopy(I) : I, F = !0); + } +} +function createInstancesCopy(e) { + const t = new Instances(); + t.transformInWorldSpace = e.transformInWorldSpace; + const n = e.attributes, i = n.length; + for (let r = 0; r < i; r++) { + const o = clone$1(n[r], !1); + t.attributes.push(o); + } + return t.featureIds = e.featureIds, t; +} +function getPositions(e, t) { + if (e.hasProperty("POSITION")) + return e.getPropertyArray( + "POSITION", + ComponentDatatype$1.FLOAT, + 3 + ); + if (e.hasProperty("POSITION_QUANTIZED")) { + const n = e.getPropertyArray( + "POSITION_QUANTIZED", + ComponentDatatype$1.UNSIGNED_SHORT, + 3 + ), i = e.getGlobalProperty( + "QUANTIZED_VOLUME_OFFSET", + ComponentDatatype$1.FLOAT, + 3 + ); + if (!defined(i)) + throw new RuntimeError( + "Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions." + ); + const r = e.getGlobalProperty( + "QUANTIZED_VOLUME_SCALE", + ComponentDatatype$1.FLOAT, + 3 + ); + if (!defined(r)) + throw new RuntimeError( + "Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions." + ); + const o = new Float32Array(n.length); + for (let s = 0; s < n.length / 3; s++) + for (let c = 0; c < 3; c++) { + const l = 3 * s + c; + o[l] = n[l] / 65535 * r[c] + i[c]; + } + return o; + } else + throw new RuntimeError( + "Either POSITION or POSITION_QUANTIZED must be defined for each instance." + ); +} +const propertyScratch2 = new Array(4); +function processRotation(e, t, n, i, r, o, s, c, l, d) { + const f = e.getProperty( + "NORMAL_UP", + ComponentDatatype$1.FLOAT, + 3, + n, + propertyScratch1 + ), h = e.getProperty( + "NORMAL_RIGHT", + ComponentDatatype$1.FLOAT, + 3, + n, + propertyScratch2 + ); + let p = !1; + if (defined(f)) { + if (!defined(h)) + throw new RuntimeError( + "To define a custom orientation, both NORMAL_UP and NORMAL_RIGHT must be defined." + ); + Cartesian3.unpack(f, 0, o), Cartesian3.unpack(h, 0, s), p = !0; + } else { + const m = e.getProperty( + "NORMAL_UP_OCT32P", + ComponentDatatype$1.UNSIGNED_SHORT, + 2, + n, + propertyScratch1 + ), _ = e.getProperty( + "NORMAL_RIGHT_OCT32P", + ComponentDatatype$1.UNSIGNED_SHORT, + 2, + n, + propertyScratch2 + ); + if (defined(m)) { + if (!defined(_)) + throw new RuntimeError( + "To define a custom orientation with oct-encoded vectors, both NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P must be defined." + ); + AttributeCompression.octDecodeInRange( + m[0], + m[1], + 65535, + o + ), AttributeCompression.octDecodeInRange( + _[0], + _[1], + 65535, + s + ), p = !0; + } else t ? (Transforms.eastNorthUpToFixedFrame( + r, + Ellipsoid.WGS84, + d + ), Matrix4.getMatrix3(d, l)) : Matrix3.clone(Matrix3.IDENTITY, l); + } + p && (Cartesian3.cross( + s, + o, + c + ), Cartesian3.normalize(c, c), Matrix3.setColumn( + l, + 0, + s, + l + ), Matrix3.setColumn(l, 1, o, l), Matrix3.setColumn( + l, + 2, + c, + l + )), Quaternion.fromRotationMatrix(l, i); +} +function processScale(e, t, n) { + n = Cartesian3.fromElements(1, 1, 1, n); + const i = e.getProperty( + "SCALE", + ComponentDatatype$1.FLOAT, + 1, + t + ); + defined(i) && Cartesian3.multiplyByScalar(n, i, n); + const r = e.getProperty( + "SCALE_NON_UNIFORM", + ComponentDatatype$1.FLOAT, + 3, + t, + propertyScratch1 + ); + defined(r) && (n.x *= r[0], n.y *= r[1], n.z *= r[2]); +} +function unloadBuffers(e) { + const t = e._buffers, n = t.length; + for (let i = 0; i < n; i++) { + const r = t[i]; + r.isDestroyed() || r.destroy(); + } + t.length = 0; +} +I3dmLoader.prototype.isUnloaded = function() { + return this._state === I3dmLoaderState.UNLOADED; +}; +I3dmLoader.prototype.unload = function() { + defined(this._gltfLoader) && !this._gltfLoader.isDestroyed() && this._gltfLoader.unload(), unloadBuffers(this), this._components = void 0, this._arrayBuffer = void 0, this._state = I3dmLoaderState.UNLOADED; +}; +const ModelAnimationState = { + STOPPED: 0, + ANIMATING: 1 +}, ModelAnimationState$1 = Object.freeze(ModelAnimationState); +function Spline() { + this.times = void 0, this.points = void 0, DeveloperError.throwInstantiationError(); +} +Spline.getPointType = function(e) { + if (typeof e == "number") + return Number; + if (e instanceof Cartesian3) + return Cartesian3; + if (e instanceof Quaternion) + return Quaternion; +}; +Spline.prototype.evaluate = DeveloperError.throwInstantiationError; +Spline.prototype.findTimeInterval = function(e, t) { + const n = this.times, i = n.length; + if (t = defaultValue(t, 0), e >= n[t]) { + if (t + 1 < i && e < n[t + 1]) + return t; + if (t + 2 < i && e < n[t + 2]) + return t + 1; + } else if (t - 1 >= 0 && e >= n[t - 1]) + return t - 1; + let r; + if (e > n[t]) + for (r = t; r < i - 1 && !(e >= n[r] && e < n[r + 1]); ++r) + ; + else + for (r = t - 1; r >= 0 && !(e >= n[r] && e < n[r + 1]); --r) + ; + return r === i - 1 && (r = i - 2), r; +}; +Spline.prototype.wrapTime = function(e) { + const t = this.times, n = t[t.length - 1], i = t[0], r = n - i; + let o; + return e < i && (o = Math.floor((i - e) / r) + 1, e += o * r), e > n && (o = Math.floor((e - n) / r) + 1, e -= o * r), e; +}; +Spline.prototype.clampTime = function(e) { + const t = this.times; + return CesiumMath.clamp(e, t[0], t[t.length - 1]); +}; +function ConstantSpline(e) { + this._value = e, this._valueType = Spline.getPointType(e); +} +Object.defineProperties(ConstantSpline.prototype, { + /** + * The constant value that the spline evaluates to. + * + * @memberof ConstantSpline.prototype + * + * @type {number|Cartesian3|Quaternion} + * @readonly + */ + value: { + get: function() { + return this._value; + } + } +}); +ConstantSpline.prototype.findTimeInterval = function(e) { +}; +ConstantSpline.prototype.wrapTime = function(e) { + return 0; +}; +ConstantSpline.prototype.clampTime = function(e) { + return 0; +}; +ConstantSpline.prototype.evaluate = function(e, t) { + const n = this._value, i = this._valueType; + return i === Number ? n : i.clone(n, t); +}; +function LinearSpline(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.points, n = e.times; + this._times = n, this._points = t, this._pointType = Spline.getPointType(t[0]), this._lastTimeIndex = 0; +} +Object.defineProperties(LinearSpline.prototype, { + /** + * An array of times for the control points. + * + * @memberof LinearSpline.prototype + * + * @type {number[]} + * @readonly + */ + times: { + get: function() { + return this._times; + } + }, + /** + * An array of {@link Cartesian3} control points. + * + * @memberof LinearSpline.prototype + * + * @type {number[]|Cartesian3[]} + * @readonly + */ + points: { + get: function() { + return this._points; + } + } +}); +LinearSpline.prototype.findTimeInterval = Spline.prototype.findTimeInterval; +LinearSpline.prototype.wrapTime = Spline.prototype.wrapTime; +LinearSpline.prototype.clampTime = Spline.prototype.clampTime; +LinearSpline.prototype.evaluate = function(e, t) { + const n = this.points, i = this.times, r = this._lastTimeIndex = this.findTimeInterval( + e, + this._lastTimeIndex + ), o = (e - i[r]) / (i[r + 1] - i[r]); + return this._pointType === Number ? (1 - o) * n[r] + o * n[r + 1] : (defined(t) || (t = new Cartesian3()), Cartesian3.lerp(n[r], n[r + 1], o, t)); +}; +const TridiagonalSystemSolver = {}; +TridiagonalSystemSolver.solve = function(e, t, n, i) { + const r = new Array(n.length), o = new Array(i.length), s = new Array(i.length); + let c; + for (c = 0; c < o.length; c++) + o[c] = new Cartesian3(), s[c] = new Cartesian3(); + r[0] = n[0] / t[0], o[0] = Cartesian3.multiplyByScalar(i[0], 1 / t[0], o[0]); + let l; + for (c = 1; c < r.length; ++c) + l = 1 / (t[c] - r[c - 1] * e[c - 1]), r[c] = n[c] * l, o[c] = Cartesian3.subtract( + i[c], + Cartesian3.multiplyByScalar(o[c - 1], e[c - 1], o[c]), + o[c] + ), o[c] = Cartesian3.multiplyByScalar(o[c], l, o[c]); + for (l = 1 / (t[c] - r[c - 1] * e[c - 1]), o[c] = Cartesian3.subtract( + i[c], + Cartesian3.multiplyByScalar(o[c - 1], e[c - 1], o[c]), + o[c] + ), o[c] = Cartesian3.multiplyByScalar(o[c], l, o[c]), s[s.length - 1] = o[o.length - 1], c = s.length - 2; c >= 0; --c) + s[c] = Cartesian3.subtract( + o[c], + Cartesian3.multiplyByScalar(s[c + 1], r[c], s[c]), + s[c] + ); + return s; +}; +const scratchLower = [], scratchDiagonal = [], scratchUpper = [], scratchRight$3 = []; +function generateClamped(e, t, n) { + const i = scratchLower, r = scratchUpper, o = scratchDiagonal, s = scratchRight$3; + i.length = r.length = e.length - 1, o.length = s.length = e.length; + let c; + i[0] = o[0] = 1, r[0] = 0; + let l = s[0]; + for (defined(l) || (l = s[0] = new Cartesian3()), Cartesian3.clone(t, l), c = 1; c < i.length - 1; ++c) + i[c] = r[c] = 1, o[c] = 4, l = s[c], defined(l) || (l = s[c] = new Cartesian3()), Cartesian3.subtract(e[c + 1], e[c - 1], l), Cartesian3.multiplyByScalar(l, 3, l); + return i[c] = 0, r[c] = 1, o[c] = 4, l = s[c], defined(l) || (l = s[c] = new Cartesian3()), Cartesian3.subtract(e[c + 1], e[c - 1], l), Cartesian3.multiplyByScalar(l, 3, l), o[c + 1] = 1, l = s[c + 1], defined(l) || (l = s[c + 1] = new Cartesian3()), Cartesian3.clone(n, l), TridiagonalSystemSolver.solve(i, o, r, s); +} +function generateNatural(e) { + const t = scratchLower, n = scratchUpper, i = scratchDiagonal, r = scratchRight$3; + t.length = n.length = e.length - 1, i.length = r.length = e.length; + let o; + t[0] = n[0] = 1, i[0] = 2; + let s = r[0]; + for (defined(s) || (s = r[0] = new Cartesian3()), Cartesian3.subtract(e[1], e[0], s), Cartesian3.multiplyByScalar(s, 3, s), o = 1; o < t.length; ++o) + t[o] = n[o] = 1, i[o] = 4, s = r[o], defined(s) || (s = r[o] = new Cartesian3()), Cartesian3.subtract(e[o + 1], e[o - 1], s), Cartesian3.multiplyByScalar(s, 3, s); + return i[o] = 2, s = r[o], defined(s) || (s = r[o] = new Cartesian3()), Cartesian3.subtract(e[o], e[o - 1], s), Cartesian3.multiplyByScalar(s, 3, s), TridiagonalSystemSolver.solve(t, i, n, r); +} +function HermiteSpline(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.points, n = e.times, i = e.inTangents, r = e.outTangents; + this._times = n, this._points = t, this._pointType = Spline.getPointType(t[0]), this._inTangents = i, this._outTangents = r, this._lastTimeIndex = 0; +} +Object.defineProperties(HermiteSpline.prototype, { + /** + * An array of times for the control points. + * + * @memberof HermiteSpline.prototype + * + * @type {number[]} + * @readonly + */ + times: { + get: function() { + return this._times; + } + }, + /** + * An array of control points. + * + * @memberof HermiteSpline.prototype + * + * @type {Cartesian3[]} + * @readonly + */ + points: { + get: function() { + return this._points; + } + }, + /** + * An array of incoming tangents at each control point. + * + * @memberof HermiteSpline.prototype + * + * @type {Cartesian3[]} + * @readonly + */ + inTangents: { + get: function() { + return this._inTangents; + } + }, + /** + * An array of outgoing tangents at each control point. + * + * @memberof HermiteSpline.prototype + * + * @type {Cartesian3[]} + * @readonly + */ + outTangents: { + get: function() { + return this._outTangents; + } + } +}); +HermiteSpline.createC1 = function(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.times, n = e.points, i = e.tangents, r = i.slice(0, i.length - 1), o = i.slice(1, i.length); + return new HermiteSpline({ + times: t, + points: n, + inTangents: o, + outTangents: r + }); +}; +HermiteSpline.createNaturalCubic = function(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.times, n = e.points; + if (n.length < 3) + return new LinearSpline({ + points: n, + times: t + }); + const i = generateNatural(n), r = i.slice(0, i.length - 1), o = i.slice(1, i.length); + return new HermiteSpline({ + times: t, + points: n, + inTangents: o, + outTangents: r + }); +}; +HermiteSpline.createClampedCubic = function(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.times, n = e.points, i = e.firstTangent, r = e.lastTangent; + if (Spline.getPointType(n[0]), n.length < 3) + return new LinearSpline({ + points: n, + times: t + }); + const o = generateClamped(n, i, r), s = o.slice(0, o.length - 1), c = o.slice(1, o.length); + return new HermiteSpline({ + times: t, + points: n, + inTangents: c, + outTangents: s + }); +}; +HermiteSpline.hermiteCoefficientMatrix = new Matrix4( + 2, + -3, + 0, + 1, + -2, + 3, + 0, + 0, + 1, + -2, + 1, + 0, + 1, + -1, + 0, + 0 +); +HermiteSpline.prototype.findTimeInterval = Spline.prototype.findTimeInterval; +const scratchTimeVec$1 = new Cartesian4(), scratchTemp = new Cartesian3(); +HermiteSpline.prototype.wrapTime = Spline.prototype.wrapTime; +HermiteSpline.prototype.clampTime = Spline.prototype.clampTime; +HermiteSpline.prototype.evaluate = function(e, t) { + const n = this.points, i = this.times, r = this.inTangents, o = this.outTangents; + this._lastTimeIndex = this.findTimeInterval(e, this._lastTimeIndex); + const s = this._lastTimeIndex, c = i[s + 1] - i[s], l = (e - i[s]) / c, d = scratchTimeVec$1; + d.z = l, d.y = l * l, d.x = d.y * l, d.w = 1; + const f = Matrix4.multiplyByVector( + HermiteSpline.hermiteCoefficientMatrix, + d, + d + ); + f.z *= c, f.w *= c; + const h = this._pointType; + return h === Number ? n[s] * f.x + n[s + 1] * f.y + o[s] * f.z + r[s] * f.w : (defined(t) || (t = new h()), t = h.multiplyByScalar(n[s], f.x, t), h.multiplyByScalar(n[s + 1], f.y, scratchTemp), h.add(t, scratchTemp, t), h.multiplyByScalar(o[s], f.z, scratchTemp), h.add(t, scratchTemp, t), h.multiplyByScalar(r[s], f.w, scratchTemp), h.add(t, scratchTemp, t)); +}; +function SteppedSpline(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.points, n = e.times; + this._times = n, this._points = t, this._pointType = Spline.getPointType(t[0]), this._lastTimeIndex = 0; +} +Object.defineProperties(SteppedSpline.prototype, { + /** + * An array of times for the control points. + * + * @memberof SteppedSpline.prototype + * + * @type {number[]} + * @readonly + */ + times: { + get: function() { + return this._times; + } + }, + /** + * An array of control points. + * + * @memberof SteppedSpline.prototype + * + * @type {number[]|Cartesian3[]|Quaternion[]} + * @readonly + */ + points: { + get: function() { + return this._points; + } + } +}); +SteppedSpline.prototype.findTimeInterval = Spline.prototype.findTimeInterval; +SteppedSpline.prototype.wrapTime = Spline.prototype.wrapTime; +SteppedSpline.prototype.clampTime = Spline.prototype.clampTime; +SteppedSpline.prototype.evaluate = function(e, t) { + const n = this.points; + this._lastTimeIndex = this.findTimeInterval(e, this._lastTimeIndex); + const i = this._lastTimeIndex, r = this._pointType; + return r === Number ? n[i] : (defined(t) || (t = new r()), r.clone(n[i], t)); +}; +function createEvaluateFunction$1(e) { + const t = e.points, n = e.times; + return function(i, r) { + defined(r) || (r = new Quaternion()); + const o = e._lastTimeIndex = e.findTimeInterval( + i, + e._lastTimeIndex + ), s = (i - n[o]) / (n[o + 1] - n[o]), c = t[o], l = t[o + 1]; + return Quaternion.fastSlerp(c, l, s, r); + }; +} +function QuaternionSpline(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.points, n = e.times; + this._times = n, this._points = t, this._evaluateFunction = createEvaluateFunction$1(this), this._lastTimeIndex = 0; +} +Object.defineProperties(QuaternionSpline.prototype, { + /** + * An array of times for the control points. + * + * @memberof QuaternionSpline.prototype + * + * @type {number[]} + * @readonly + */ + times: { + get: function() { + return this._times; + } + }, + /** + * An array of {@link Quaternion} control points. + * + * @memberof QuaternionSpline.prototype + * + * @type {Quaternion[]} + * @readonly + */ + points: { + get: function() { + return this._points; + } + } +}); +QuaternionSpline.prototype.findTimeInterval = Spline.prototype.findTimeInterval; +QuaternionSpline.prototype.wrapTime = Spline.prototype.wrapTime; +QuaternionSpline.prototype.clampTime = Spline.prototype.clampTime; +QuaternionSpline.prototype.evaluate = function(e, t) { + return this._evaluateFunction(e, t); +}; +const AnimatedPropertyType = ModelComponents.AnimatedPropertyType; +function ModelAnimationChannel(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.channel, n = e.runtimeAnimation, i = e.runtimeNode; + this._channel = t, this._runtimeAnimation = n, this._runtimeNode = i, this._splines = [], this._path = void 0, initialize$c(this); +} +Object.defineProperties(ModelAnimationChannel.prototype, { + /** + * The glTF animation channel. + * + * @memberof ModelAnimationChannel.prototype + * + * @type {ModelComponents.AnimationChannel} + * @readonly + * + * @private + */ + channel: { + get: function() { + return this._channel; + } + }, + /** + * The runtime animation that owns this channel. + * + * @memberof ModelAnimationChannel.prototype + * + * @type {ModelAnimation} + * @readonly + * + * @private + */ + runtimeAnimation: { + get: function() { + return this._runtimeAnimation; + } + }, + /** + * The runtime node that this channel animates. + * + * @memberof ModelAnimationChannel.prototype + * + * @type {ModelRuntimeNode} + * @readonly + * + * @private + */ + runtimeNode: { + get: function() { + return this._runtimeNode; + } + }, + /** + * The splines used to evaluate this animation channel. + * + * @memberof ModelAnimationChannel.prototype + * + * @type {Spline[]} + * @readonly + * + * @private + */ + splines: { + get: function() { + return this._splines; + } + } +}); +function createCubicSpline(e, t) { + const n = [], i = [], r = [], o = t.length; + for (let s = 0; s < o; s += 3) + i.push(t[s]), n.push(t[s + 1]), r.push(t[s + 2]); + return i.splice(0, 1), r.length = r.length - 1, new HermiteSpline({ + times: e, + points: n, + inTangents: i, + outTangents: r + }); +} +function createSpline(e, t, n, i) { + if (e.length === 1 && t.length === 1) + return new ConstantSpline(t[0]); + switch (n) { + case InterpolationType$1.STEP: + return new SteppedSpline({ + times: e, + points: t + }); + case InterpolationType$1.CUBICSPLINE: + return createCubicSpline(e, t); + case InterpolationType$1.LINEAR: + return i === AnimatedPropertyType.ROTATION ? new QuaternionSpline({ + times: e, + points: t + }) : new LinearSpline({ + times: e, + points: t + }); + } +} +function createSplines(e, t, n, i, r) { + const o = []; + if (i === AnimatedPropertyType.WEIGHTS) { + const c = t.length / r; + let l, d; + for (l = 0; l < r; l++) { + const f = new Array(c); + let h = l; + if (n === InterpolationType$1.CUBICSPLINE) + for (d = 0; d < c; d += 3) + f[d] = t[h], f[d + 1] = t[h + r], f[d + 2] = t[h + 2 * r], h += r * 3; + else + for (d = 0; d < c; d++) + f[d] = t[h], h += r; + o.push(createSpline(e, f, n, i)); + } + } else + o.push(createSpline(e, t, n, i)); + return o; +} +const scratchCartesian3$a = new Cartesian3(), scratchQuaternion$1 = new Quaternion(); +function initialize$c(e) { + const t = e._channel, n = t.sampler, i = n.input, r = n.output, o = n.interpolation, c = t.target.path, l = e._runtimeNode, d = defined(l.morphWeights) ? l.morphWeights.length : 1, f = createSplines(i, r, o, c, d); + e._splines = f, e._path = c; +} +ModelAnimationChannel.prototype.animate = function(e) { + const t = this._splines, n = this._path, i = this._runtimeAnimation.model, r = this._runtimeNode; + if (n === AnimatedPropertyType.WEIGHTS) { + const o = r.morphWeights, s = o.length; + for (let c = 0; c < s; c++) { + const l = t[c], d = i.clampAnimations ? l.clampTime(e) : l.wrapTime(e); + o[c] = l.evaluate(d); + } + } else { + if (r.userAnimated) + return; + { + const o = t[0], s = i.clampAnimations ? o.clampTime(e) : o.wrapTime(e); + n === AnimatedPropertyType.TRANSLATION || n === AnimatedPropertyType.SCALE ? r[n] = o.evaluate( + s, + scratchCartesian3$a + ) : n === AnimatedPropertyType.ROTATION && (r[n] = o.evaluate( + s, + scratchQuaternion$1 + )); + } + } +}; +function ModelAnimation(e, t, n) { + this._animation = t, this._name = t.name, this._runtimeChannels = void 0, this._startTime = JulianDate.clone(n.startTime), this._delay = defaultValue(n.delay, 0), this._stopTime = JulianDate.clone(n.stopTime), this.removeOnStop = defaultValue(n.removeOnStop, !1), this._multiplier = defaultValue(n.multiplier, 1), this._reverse = defaultValue(n.reverse, !1), this._loop = defaultValue(n.loop, ModelAnimationLoop$1.NONE), this._animationTime = n.animationTime, this._prevAnimationDelta = void 0, this.start = new Event(), this.update = new Event(), this.stop = new Event(), this._state = ModelAnimationState$1.STOPPED, this._computedStartTime = void 0, this._duration = void 0; + const i = this; + this._raiseStartEvent = function() { + i.start.raiseEvent(e, i); + }, this._updateEventTime = 0, this._raiseUpdateEvent = function() { + i.update.raiseEvent(e, i, i._updateEventTime); + }, this._raiseStopEvent = function() { + i.stop.raiseEvent(e, i); + }, this._model = e, this._localStartTime = void 0, this._localStopTime = void 0, initialize$b(this); +} +Object.defineProperties(ModelAnimation.prototype, { + /** + * The glTF animation. + * + * @memberof ModelAnimation.prototype + * + * @type {ModelComponents.Animation} + * @readonly + * + * @private + */ + animation: { + get: function() { + return this._animation; + } + }, + /** + * The name that identifies this animation in the model, if it exists. + * + * @memberof ModelAnimation.prototype + * + * @type {string} + * @readonly + */ + name: { + get: function() { + return this._name; + } + }, + /** + * The runtime animation channels for this animation. + * + * @memberof ModelAnimation.prototype + * + * @type {ModelAnimationChannel[]} + * @readonly + * + * @private + */ + runtimeChannels: { + get: function() { + return this._runtimeChannels; + } + }, + /** + * The {@link Model} that owns this animation. + * + * @memberof ModelAnimation.prototype + * + * @type {Model} + * @readonly + * + * @private + */ + model: { + get: function() { + return this._model; + } + }, + /** + * The starting point of the animation in local animation time. This is the minimum + * time value across all of the keyframes belonging to this animation. + * + * @memberof ModelAnimation.prototype + * + * @type {number} + * @readonly + * + * @private + */ + localStartTime: { + get: function() { + return this._localStartTime; + } + }, + /** + * The stopping point of the animation in local animation time. This is the maximum + * time value across all of the keyframes belonging to this animation. + * + * @memberof ModelAnimation.prototype + * + * @type {number} + * @readonly + * + * @private + */ + localStopTime: { + get: function() { + return this._localStopTime; + } + }, + /** + * The scene time to start playing this animation. When this isundefined,
+ * the animation starts at the next frame.
+ *
+ * @memberof ModelAnimation.prototype
+ *
+ * @type {JulianDate}
+ * @readonly
+ *
+ * @default undefined
+ */
+ startTime: {
+ get: function() {
+ return this._startTime;
+ }
+ },
+ /**
+ * The delay, in seconds, from {@link ModelAnimation#startTime} to start playing.
+ *
+ * @memberof ModelAnimation.prototype
+ *
+ * @type {number}
+ * @readonly
+ *
+ * @default undefined
+ */
+ delay: {
+ get: function() {
+ return this._delay;
+ }
+ },
+ /**
+ * The scene time to stop playing this animation. When this is undefined,
+ * the animation is played for its full duration and perhaps repeated depending on
+ * {@link ModelAnimation#loop}.
+ *
+ * @memberof ModelAnimation.prototype
+ *
+ * @type {JulianDate}
+ * @readonly
+ *
+ * @default undefined
+ */
+ stopTime: {
+ get: function() {
+ return this._stopTime;
+ }
+ },
+ /**
+ * Values greater than 1.0 increase the speed that the animation is played relative
+ * to the scene clock speed; values less than 1.0 decrease the speed. A value of
+ * 1.0 plays the animation at the speed in the glTF animation mapped to the scene
+ * clock speed. For example, if the scene is played at 2x real-time, a two-second glTF animation
+ * will play in one second even if multiplier is 1.0.
+ *
+ * @memberof ModelAnimation.prototype
+ *
+ * @type {number}
+ * @readonly
+ *
+ * @default 1.0
+ */
+ multiplier: {
+ get: function() {
+ return this._multiplier;
+ }
+ },
+ /**
+ * When true, the animation is played in reverse.
+ *
+ * @memberof ModelAnimation.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default false
+ */
+ reverse: {
+ get: function() {
+ return this._reverse;
+ }
+ },
+ /**
+ * Determines if and how the animation is looped.
+ *
+ * @memberof ModelAnimation.prototype
+ *
+ * @type {ModelAnimationLoop}
+ * @readonly
+ *
+ * @default {@link ModelAnimationLoop.NONE}
+ */
+ loop: {
+ get: function() {
+ return this._loop;
+ }
+ },
+ /**
+ * If this is defined, it will be used to compute the local animation time
+ * instead of the scene's time.
+ *
+ * @memberof ModelAnimation.prototype
+ *
+ * @type {ModelAnimation.AnimationTimeCallback}
+ * @default undefined
+ */
+ animationTime: {
+ get: function() {
+ return this._animationTime;
+ }
+ }
+});
+function initialize$b(e) {
+ let t = Number.MAX_VALUE, n = -Number.MAX_VALUE;
+ const i = e._model.sceneGraph, o = e._animation.channels, s = o.length, c = [];
+ for (let l = 0; l < s; l++) {
+ const d = o[l], f = d.target;
+ if (!defined(f))
+ continue;
+ const h = f.node.index, p = i._runtimeNodes[h], m = new ModelAnimationChannel({
+ channel: d,
+ runtimeAnimation: e,
+ runtimeNode: p
+ }), _ = d.sampler.input;
+ t = Math.min(t, _[0]), n = Math.max(n, _[_.length - 1]), c.push(m);
+ }
+ e._runtimeChannels = c, e._localStartTime = t, e._localStopTime = n;
+}
+ModelAnimation.prototype.animate = function(e) {
+ const t = this._runtimeChannels, n = t.length;
+ for (let i = 0; i < n; i++)
+ t[i].animate(e);
+};
+function ModelAnimationCollection(e) {
+ this.animationAdded = new Event(), this.animationRemoved = new Event(), this.animateWhilePaused = !1, this._model = e, this._runtimeAnimations = [], this._previousTime = void 0;
+}
+Object.defineProperties(ModelAnimationCollection.prototype, {
+ /**
+ * The number of animations in the collection.
+ *
+ * @memberof ModelAnimationCollection.prototype
+ *
+ * @type {number}
+ * @readonly
+ */
+ length: {
+ get: function() {
+ return this._runtimeAnimations.length;
+ }
+ },
+ /**
+ * The model that owns this animation collection.
+ *
+ * @memberof ModelAnimationCollection.prototype
+ *
+ * @type {Model}
+ * @readonly
+ */
+ model: {
+ get: function() {
+ return this._model;
+ }
+ }
+});
+function addAnimation(e, t, n) {
+ const i = e._model, r = new ModelAnimation(i, t, n);
+ return e._runtimeAnimations.push(r), e.animationAdded.raiseEvent(i, r), r;
+}
+ModelAnimationCollection.prototype.add = function(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const n = this._model.sceneGraph.components.animations;
+ let i = e.index;
+ if (defined(i))
+ return addAnimation(this, n[i], e);
+ const r = n.length;
+ for (let o = 0; o < r; ++o)
+ if (n[o].name === e.name) {
+ i = o;
+ break;
+ }
+ return addAnimation(this, n[i], e);
+};
+ModelAnimationCollection.prototype.addAll = function(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const n = this._model.sceneGraph.components.animations, i = [], r = n.length;
+ for (let o = 0; o < r; ++o) {
+ const s = addAnimation(this, n[o], e);
+ i.push(s);
+ }
+ return i;
+};
+ModelAnimationCollection.prototype.remove = function(e) {
+ if (!defined(e))
+ return !1;
+ const t = this._runtimeAnimations, n = t.indexOf(e);
+ return n !== -1 ? (t.splice(n, 1), this.animationRemoved.raiseEvent(this._model, e), !0) : !1;
+};
+ModelAnimationCollection.prototype.removeAll = function() {
+ const e = this._model, t = this._runtimeAnimations, n = t.length;
+ this._runtimeAnimations.length = 0;
+ for (let i = 0; i < n; ++i)
+ this.animationRemoved.raiseEvent(e, t[i]);
+};
+ModelAnimationCollection.prototype.contains = function(e) {
+ return defined(e) ? this._runtimeAnimations.indexOf(e) !== -1 : !1;
+};
+ModelAnimationCollection.prototype.get = function(e) {
+ return this._runtimeAnimations[e];
+};
+const animationsToRemove = [];
+function createAnimationRemovedFunction(e, t, n) {
+ return function() {
+ e.animationRemoved.raiseEvent(t, n);
+ };
+}
+ModelAnimationCollection.prototype.update = function(e) {
+ const t = this._runtimeAnimations;
+ let n = t.length;
+ if (n === 0)
+ return this._previousTime = void 0, !1;
+ if (!this.animateWhilePaused && JulianDate.equals(e.time, this._previousTime))
+ return !1;
+ this._previousTime = JulianDate.clone(e.time, this._previousTime);
+ let i = !1;
+ const r = e.time, o = this._model;
+ for (let s = 0; s < n; ++s) {
+ const c = t[s];
+ defined(c._computedStartTime) || (c._computedStartTime = JulianDate.addSeconds(
+ defaultValue(c.startTime, r),
+ c.delay,
+ new JulianDate()
+ )), defined(c._duration) || (c._duration = c.localStopTime * (1 / c.multiplier));
+ const l = c._computedStartTime, d = c._duration, f = c.stopTime, h = JulianDate.lessThanOrEquals(l, r), p = defined(f) && JulianDate.greaterThan(r, f);
+ let m = 0;
+ if (d !== 0) {
+ const C = JulianDate.secondsDifference(
+ p ? f : r,
+ l
+ );
+ m = defined(c._animationTime) ? c._animationTime(d, C) : C / d;
+ }
+ const _ = c.loop === ModelAnimationLoop$1.REPEAT || c.loop === ModelAnimationLoop$1.MIRRORED_REPEAT, y = (h || _ && !defined(c.startTime)) && (m <= 1 || _) && !p;
+ if (m === c._prevAnimationDelta) {
+ const C = c._state === ModelAnimationState$1.STOPPED;
+ if (y !== C)
+ continue;
+ }
+ if (c._prevAnimationDelta = m, y || c._state === ModelAnimationState$1.ANIMATING) {
+ if (y && c._state === ModelAnimationState$1.STOPPED && (c._state = ModelAnimationState$1.ANIMATING, c.start.numberOfListeners > 0 && e.afterRender.push(c._raiseStartEvent)), c.loop === ModelAnimationLoop$1.REPEAT)
+ m = m - Math.floor(m);
+ else if (c.loop === ModelAnimationLoop$1.MIRRORED_REPEAT) {
+ const T = Math.floor(m), x = m - T;
+ m = T % 2 === 1 ? 1 - x : x;
+ }
+ c.reverse && (m = 1 - m);
+ let C = m * d * c.multiplier;
+ C = CesiumMath.clamp(
+ C,
+ c.localStartTime,
+ c.localStopTime
+ ), c.animate(C), c.update.numberOfListeners > 0 && (c._updateEventTime = C, e.afterRender.push(c._raiseUpdateEvent)), i = !0, y || (c._state = ModelAnimationState$1.STOPPED, c.stop.numberOfListeners > 0 && e.afterRender.push(c._raiseStopEvent), c.removeOnStop && animationsToRemove.push(c));
+ }
+ }
+ n = animationsToRemove.length;
+ for (let s = 0; s < n; ++s) {
+ const c = animationsToRemove[s];
+ t.splice(t.indexOf(c), 1), e.afterRender.push(
+ createAnimationRemovedFunction(this, o, c)
+ );
+ }
+ return animationsToRemove.length = 0, i;
+};
+function ModelFeature(e) {
+ this._model = e.model, this._featureTable = e.featureTable, this._featureId = e.featureId, this._color = void 0;
+}
+Object.defineProperties(ModelFeature.prototype, {
+ /**
+ * Gets or sets if the feature will be shown. This is set for all features
+ * when a style's show is evaluated.
+ *
+ * @memberof ModelFeature.prototype
+ *
+ * @type {boolean}
+ *
+ * @default true
+ */
+ show: {
+ get: function() {
+ return this._featureTable.getShow(this._featureId);
+ },
+ set: function(e) {
+ this._featureTable.setShow(this._featureId, e);
+ }
+ },
+ /**
+ * Gets or sets the highlight color multiplied with the feature's color. When
+ * this is white, the feature's color is not changed. This is set for all features
+ * when a style's color is evaluated.
+ *
+ * @memberof ModelFeature.prototype
+ *
+ * @type {Color}
+ *
+ * @default {@link Color.WHITE}
+ */
+ color: {
+ get: function() {
+ return defined(this._color) || (this._color = new Color()), this._featureTable.getColor(this._featureId, this._color);
+ },
+ set: function(e) {
+ this._featureTable.setColor(this._featureId, e);
+ }
+ },
+ /**
+ * All objects returned by {@link Scene#pick} have a primitive property. This returns
+ * the model containing the feature.
+ *
+ * @memberof ModelFeature.prototype
+ *
+ * @type {Model}
+ *
+ * @readonly
+ * @private
+ */
+ primitive: {
+ get: function() {
+ return this._model;
+ }
+ },
+ /**
+ * The {@link ModelFeatureTable} that this feature belongs to.
+ *
+ * @memberof ModelFeature.prototype
+ *
+ * @type {ModelFeatureTable}
+ *
+ * @readonly
+ * @private
+ */
+ featureTable: {
+ get: function() {
+ return this._featureTable;
+ }
+ },
+ /**
+ * Get the feature ID associated with this feature. For 3D Tiles 1.0, the
+ * batch ID is returned. For EXT_mesh_features, this is the feature ID from
+ * the selected feature ID set.
+ *
+ * @memberof ModelFeature.prototype
+ *
+ * @type {number}
+ *
+ * @readonly
+ * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
+ */
+ featureId: {
+ get: function() {
+ return this._featureId;
+ }
+ }
+});
+ModelFeature.prototype.hasProperty = function(e) {
+ return this._featureTable.hasProperty(this._featureId, e);
+};
+ModelFeature.prototype.getProperty = function(e) {
+ return this._featureTable.getProperty(this._featureId, e);
+};
+ModelFeature.prototype.getPropertyInherited = function(e) {
+ return this._featureTable.hasPropertyBySemantic(this._featureId, e) ? this._featureTable.getPropertyBySemantic(this._featureId, e) : this._featureTable.getProperty(this._featureId, e);
+};
+ModelFeature.prototype.getPropertyIds = function(e) {
+ return this._featureTable.getPropertyIds(e);
+};
+ModelFeature.prototype.setProperty = function(e, t) {
+ return this._featureTable.setProperty(this._featureId, e, t);
+};
+const StyleCommandsNeeded = {
+ ALL_OPAQUE: 0,
+ ALL_TRANSLUCENT: 1,
+ OPAQUE_AND_TRANSLUCENT: 2
+};
+StyleCommandsNeeded.getStyleCommandsNeeded = function(e, t) {
+ return t === 0 ? StyleCommandsNeeded.ALL_OPAQUE : t === e ? StyleCommandsNeeded.ALL_TRANSLUCENT : StyleCommandsNeeded.OPAQUE_AND_TRANSLUCENT;
+};
+const StyleCommandsNeeded$1 = Object.freeze(StyleCommandsNeeded), ModelType = {
+ /**
+ * An individual glTF model.
+ * + * Not to be confused with {@link ModelType.TILE_GLTF} + * which is for 3D Tiles + *
+ * + * @type {string} + * @constant + */ + GLTF: "GLTF", + /** + * A glTF model used as tile content in a 3D Tileset via + *3DTILES_content_gltf.
+ * + * Not to be confused with {@link ModelType.GLTF} + * which is for individual models + *
+ * + * @type {string} + * @constant + */ + TILE_GLTF: "TILE_GLTF", + /** + * A 3D Tiles 1.0 Batched 3D Model + * + * @type {string} + * @constant + */ + TILE_B3DM: "B3DM", + /** + * A 3D Tiles 1.0 Instanced 3D Model + * + * @type {string} + * @constant + */ + TILE_I3DM: "I3DM", + /** + * A 3D Tiles 1.0 Point Cloud + * + * @type {string} + * @constant + */ + TILE_PNTS: "PNTS", + /** + * GeoJSON content forMAXAR_content_geojson extension
+ *
+ * @type {string}
+ * @constant
+ */
+ TILE_GEOJSON: "TILE_GEOJSON"
+};
+ModelType.is3DTiles = function(e) {
+ switch (e) {
+ case ModelType.TILE_GLTF:
+ case ModelType.TILE_B3DM:
+ case ModelType.TILE_I3DM:
+ case ModelType.TILE_PNTS:
+ case ModelType.TILE_GEOJSON:
+ return !0;
+ case ModelType.GLTF:
+ return !1;
+ }
+};
+const ModelType$1 = Object.freeze(ModelType);
+function ModelFeatureTable(e) {
+ const t = e.model, n = e.propertyTable;
+ this._propertyTable = n, this._model = t, this._features = void 0, this._featuresLength = 0, this._batchTexture = void 0, this._styleCommandsNeededDirty = !1, this._styleCommandsNeeded = StyleCommandsNeeded$1.ALL_OPAQUE, initialize$a(this);
+}
+Object.defineProperties(ModelFeatureTable.prototype, {
+ /**
+ * The batch texture created for the features in this table.
+ *
+ * @memberof ModelFeatureTable.prototype
+ *
+ * @type {BatchTexture}
+ * @readonly
+ *
+ * @private
+ */
+ batchTexture: {
+ get: function() {
+ return this._batchTexture;
+ }
+ },
+ /**
+ * The number of features in this table.
+ *
+ * @memberof ModelFeatureTable.prototype
+ *
+ * @type {number}
+ * @readonly
+ *
+ * @private
+ */
+ featuresLength: {
+ get: function() {
+ return this._featuresLength;
+ }
+ },
+ /**
+ * Size of the batch texture. This does not count the property table size
+ * as that is counted separately through StructuralMetadata.
+ *
+ * @memberof ModelFeatureTable.prototype
+ *
+ * @type {number}
+ * @readonly
+ *
+ * @private
+ */
+ batchTextureByteLength: {
+ get: function() {
+ return defined(this._batchTexture) ? this._batchTexture.byteLength : 0;
+ }
+ },
+ /**
+ * A flag to indicate whether or not the types of style commands needed by this feature table have changed.
+ *
+ * @memberof ModelFeatureTable.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @private
+ */
+ styleCommandsNeededDirty: {
+ get: function() {
+ return this._styleCommandsNeededDirty;
+ }
+ }
+});
+function initialize$a(e) {
+ const t = e._model, n = ModelType$1.is3DTiles(t.type), i = e._propertyTable.count;
+ if (i === 0)
+ return;
+ let r;
+ const o = new Array(i);
+ if (n) {
+ const s = t.content;
+ for (r = 0; r < i; r++)
+ o[r] = new Cesium3DTileFeature(s, r);
+ } else
+ for (r = 0; r < i; r++)
+ o[r] = new ModelFeature({
+ model: t,
+ featureId: r,
+ featureTable: e
+ });
+ e._features = o, e._featuresLength = i, e._batchTexture = new BatchTexture({
+ featuresLength: i,
+ owner: e,
+ statistics: n ? t.content.tileset.statistics : void 0
+ });
+}
+ModelFeatureTable.prototype.update = function(e) {
+ this._styleCommandsNeededDirty = !1, this._batchTexture.update(void 0, e);
+ const t = StyleCommandsNeeded$1.getStyleCommandsNeeded(
+ this._featuresLength,
+ this._batchTexture.translucentFeaturesLength
+ );
+ this._styleCommandsNeeded !== t && (this._styleCommandsNeededDirty = !0, this._styleCommandsNeeded = t);
+};
+ModelFeatureTable.prototype.setShow = function(e, t) {
+ this._batchTexture.setShow(e, t);
+};
+ModelFeatureTable.prototype.setAllShow = function(e) {
+ this._batchTexture.setAllShow(e);
+};
+ModelFeatureTable.prototype.getShow = function(e) {
+ return this._batchTexture.getShow(e);
+};
+ModelFeatureTable.prototype.setColor = function(e, t) {
+ this._batchTexture.setColor(e, t);
+};
+ModelFeatureTable.prototype.setAllColor = function(e) {
+ this._batchTexture.setAllColor(e);
+};
+ModelFeatureTable.prototype.getColor = function(e, t) {
+ return this._batchTexture.getColor(e, t);
+};
+ModelFeatureTable.prototype.getPickColor = function(e) {
+ return this._batchTexture.getPickColor(e);
+};
+ModelFeatureTable.prototype.getFeature = function(e) {
+ return this._features[e];
+};
+ModelFeatureTable.prototype.hasProperty = function(e, t) {
+ return this._propertyTable.hasProperty(e, t);
+};
+ModelFeatureTable.prototype.hasPropertyBySemantic = function(e, t) {
+ return this._propertyTable.hasPropertyBySemantic(e, t);
+};
+ModelFeatureTable.prototype.getProperty = function(e, t) {
+ return this._propertyTable.getProperty(e, t);
+};
+ModelFeatureTable.prototype.getPropertyBySemantic = function(e, t) {
+ return this._propertyTable.getPropertyBySemantic(e, t);
+};
+ModelFeatureTable.prototype.getPropertyIds = function(e) {
+ return this._propertyTable.getPropertyIds(e);
+};
+ModelFeatureTable.prototype.setProperty = function(e, t, n) {
+ return this._propertyTable.setProperty(e, t, n);
+};
+ModelFeatureTable.prototype.isClass = function(e, t) {
+ return this._propertyTable.isClass(e, t);
+};
+ModelFeatureTable.prototype.isExactClass = function(e, t) {
+ return this._propertyTable.isExactClass(e, t);
+};
+ModelFeatureTable.prototype.getExactClassName = function(e) {
+ return this._propertyTable.getExactClassName(e);
+};
+const scratchColor$k = new Color();
+ModelFeatureTable.prototype.applyStyle = function(e) {
+ if (!defined(e)) {
+ this.setAllColor(BatchTexture.DEFAULT_COLOR_VALUE), this.setAllShow(BatchTexture.DEFAULT_SHOW_VALUE);
+ return;
+ }
+ for (let t = 0; t < this._featuresLength; t++) {
+ const n = this.getFeature(t), i = defined(e.color) ? defaultValue(
+ e.color.evaluateColor(n, scratchColor$k),
+ BatchTexture.DEFAULT_COLOR_VALUE
+ ) : BatchTexture.DEFAULT_COLOR_VALUE, r = defined(e.show) ? defaultValue(
+ e.show.evaluate(n),
+ BatchTexture.DEFAULT_SHOW_VALUE
+ ) : BatchTexture.DEFAULT_SHOW_VALUE;
+ this.setColor(t, i), this.setShow(t, r);
+ }
+};
+ModelFeatureTable.prototype.isDestroyed = function() {
+ return !1;
+};
+ModelFeatureTable.prototype.destroy = function(e) {
+ this._batchTexture = this._batchTexture && this._batchTexture.destroy(), destroyObject(this);
+};
+const ModelFS = `
+precision highp float;
+czm_modelMaterial defaultModelMaterial()
+{
+ czm_modelMaterial material;
+ material.diffuse = vec3(0.0);
+ material.specular = vec3(1.0);
+ material.roughness = 1.0;
+ material.occlusion = 1.0;
+ material.normalEC = vec3(0.0, 0.0, 1.0);
+ material.emissive = vec3(0.0);
+ material.alpha = 1.0;
+ return material;
+}
+
+vec4 handleAlpha(vec3 color, float alpha)
+{
+ #ifdef ALPHA_MODE_MASK
+ if (alpha < u_alphaCutoff) {
+ discard;
+ }
+ #endif
+
+ return vec4(color, alpha);
+}
+
+SelectedFeature selectedFeature;
+
+void main()
+{
+ #ifdef HAS_MODEL_SPLITTER
+ modelSplitterStage();
+ #endif
+
+ czm_modelMaterial material = defaultModelMaterial();
+
+ ProcessedAttributes attributes;
+ geometryStage(attributes);
+
+ FeatureIds featureIds;
+ featureIdStage(featureIds, attributes);
+
+ Metadata metadata;
+ MetadataClass metadataClass;
+ MetadataStatistics metadataStatistics;
+ metadataStage(metadata, metadataClass, metadataStatistics, attributes);
+
+ #ifdef HAS_SELECTED_FEATURE_ID
+ selectedFeatureIdStage(selectedFeature, featureIds);
+ #endif
+
+ #ifndef CUSTOM_SHADER_REPLACE_MATERIAL
+ materialStage(material, attributes, selectedFeature);
+ #endif
+
+ #ifdef HAS_CUSTOM_FRAGMENT_SHADER
+ customShaderStage(material, attributes, featureIds, metadata, metadataClass, metadataStatistics);
+ #endif
+
+ lightingStage(material, attributes);
+
+ #ifdef HAS_SELECTED_FEATURE_ID
+ cpuStylingStage(material, selectedFeature);
+ #endif
+
+ #ifdef HAS_MODEL_COLOR
+ modelColorStage(material);
+ #endif
+
+ #ifdef HAS_PRIMITIVE_OUTLINE
+ primitiveOutlineStage(material);
+ #endif
+
+ vec4 color = handleAlpha(material.diffuse, material.alpha);
+
+ #ifdef HAS_CLIPPING_PLANES
+ modelClippingPlanesStage(color);
+ #endif
+
+ #ifdef ENABLE_CLIPPING_POLYGONS
+ modelClippingPolygonsStage();
+ #endif
+
+ #if defined(HAS_SILHOUETTE) && defined(HAS_NORMALS)
+ silhouetteStage(color);
+ #endif
+
+ #ifdef HAS_ATMOSPHERE
+ atmosphereStage(color, attributes);
+ #endif
+
+ out_FragColor = color;
+}
+`, ModelVS = `precision highp float;
+
+czm_modelVertexOutput defaultVertexOutput(vec3 positionMC) {
+ czm_modelVertexOutput vsOutput;
+ vsOutput.positionMC = positionMC;
+ vsOutput.pointSize = 1.0;
+ return vsOutput;
+}
+
+void main()
+{
+ // Initialize the attributes struct with all
+ // attributes except quantized ones.
+ ProcessedAttributes attributes;
+ initializeAttributes(attributes);
+
+ // Dequantize the quantized ones and add them to the
+ // attributes struct.
+ #ifdef USE_DEQUANTIZATION
+ dequantizationStage(attributes);
+ #endif
+
+ #ifdef HAS_MORPH_TARGETS
+ morphTargetsStage(attributes);
+ #endif
+
+ #ifdef HAS_SKINNING
+ skinningStage(attributes);
+ #endif
+
+ #ifdef HAS_PRIMITIVE_OUTLINE
+ primitiveOutlineStage();
+ #endif
+
+ // Compute the bitangent according to the formula in the glTF spec.
+ // Normal and tangents can be affected by morphing and skinning, so
+ // the bitangent should not be computed until their values are finalized.
+ #ifdef HAS_BITANGENTS
+ attributes.bitangentMC = normalize(cross(attributes.normalMC, attributes.tangentMC) * attributes.tangentSignMC);
+ #endif
+
+ FeatureIds featureIds;
+ featureIdStage(featureIds, attributes);
+
+ #ifdef HAS_SELECTED_FEATURE_ID
+ SelectedFeature feature;
+ selectedFeatureIdStage(feature, featureIds);
+ // Handle any show properties that come from the style.
+ cpuStylingStage(attributes.positionMC, feature);
+ #endif
+
+ #if defined(USE_2D_POSITIONS) || defined(USE_2D_INSTANCING)
+ // The scene mode 2D pipeline stage and instancing stage add a different
+ // model view matrix to accurately project the model to 2D. However, the
+ // output positions and normals should be transformed by the 3D matrices
+ // to keep the data the same for the fragment shader.
+ mat4 modelView = czm_modelView3D;
+ mat3 normal = czm_normal3D;
+ #else
+ // These are used for individual model projection because they will
+ // automatically change based on the scene mode.
+ mat4 modelView = czm_modelView;
+ mat3 normal = czm_normal;
+ #endif
+
+ // Update the position for this instance in place
+ #ifdef HAS_INSTANCING
+
+ // The legacy instance stage is used when rendering i3dm models that
+ // encode instances transforms in world space, as opposed to glTF models
+ // that use EXT_mesh_gpu_instancing, where instance transforms are encoded
+ // in object space.
+ #ifdef USE_LEGACY_INSTANCING
+ mat4 instanceModelView;
+ mat3 instanceModelViewInverseTranspose;
+
+ legacyInstancingStage(attributes, instanceModelView, instanceModelViewInverseTranspose);
+
+ modelView = instanceModelView;
+ normal = instanceModelViewInverseTranspose;
+ #else
+ instancingStage(attributes);
+ #endif
+
+ #ifdef USE_PICKING
+ v_pickColor = a_pickColor;
+ #endif
+
+ #endif
+
+ Metadata metadata;
+ MetadataClass metadataClass;
+ MetadataStatistics metadataStatistics;
+ metadataStage(metadata, metadataClass, metadataStatistics, attributes);
+
+ #ifdef HAS_VERTICAL_EXAGGERATION
+ verticalExaggerationStage(attributes);
+ #endif
+
+ #ifdef HAS_CUSTOM_VERTEX_SHADER
+ czm_modelVertexOutput vsOutput = defaultVertexOutput(attributes.positionMC);
+ customShaderStage(vsOutput, attributes, featureIds, metadata, metadataClass, metadataStatistics);
+ #endif
+
+ // Compute the final position in each coordinate system needed.
+ // This returns the value that will be assigned to gl_Position.
+ vec4 positionClip = geometryStage(attributes, modelView, normal);
+
+ // This must go after the geometry stage as it needs v_positionWC
+ #ifdef HAS_ATMOSPHERE
+ atmosphereStage(attributes);
+ #endif
+
+ #ifdef ENABLE_CLIPPING_POLYGONS
+ modelClippingPolygonsStage(attributes);
+ #endif
+
+ #ifdef HAS_SILHOUETTE
+ silhouetteStage(attributes, positionClip);
+ #endif
+
+ #ifdef HAS_POINT_CLOUD_SHOW_STYLE
+ float show = pointCloudShowStylingStage(attributes, metadata);
+ #else
+ float show = 1.0;
+ #endif
+
+ #ifdef HAS_POINT_CLOUD_BACK_FACE_CULLING
+ show *= pointCloudBackFaceCullingStage();
+ #endif
+
+ #ifdef HAS_POINT_CLOUD_COLOR_STYLE
+ v_pointCloudColor = pointCloudColorStylingStage(attributes, metadata);
+ #endif
+
+ #ifdef PRIMITIVE_TYPE_POINTS
+ #ifdef HAS_CUSTOM_VERTEX_SHADER
+ gl_PointSize = vsOutput.pointSize;
+ #elif defined(HAS_POINT_CLOUD_POINT_SIZE_STYLE) || defined(HAS_POINT_CLOUD_ATTENUATION)
+ gl_PointSize = pointCloudPointSizeStylingStage(attributes, metadata);
+ #else
+ gl_PointSize = 1.0;
+ #endif
+
+ gl_PointSize *= show;
+ #endif
+
+ gl_Position = show * positionClip;
+}
+`;
+function ClassificationModelDrawCommand(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.command, n = e.primitiveRenderResources, i = n.model;
+ this._command = t, this._model = i, this._runtimePrimitive = n.runtimePrimitive, this._modelMatrix = t.modelMatrix, this._boundingVolume = t.boundingVolume, this._cullFace = t.renderState.cull.face;
+ const r = i.classificationType;
+ this._classificationType = r, this._classifiesTerrain = r !== ClassificationType$1.CESIUM_3D_TILE, this._classifies3DTiles = r !== ClassificationType$1.TERRAIN, this._useDebugWireframe = i._enableDebugWireframe && i.debugWireframe, this._pickId = n.pickId, this._commandListTerrain = [], this._commandList3DTiles = [], this._commandListIgnoreShow = [], this._commandListDebugWireframe = [], this._commandListTerrainPicking = [], this._commandList3DTilesPicking = [], initialize$9(this);
+}
+function getStencilDepthRenderState(e) {
+ return {
+ colorMask: {
+ red: !1,
+ green: !1,
+ blue: !1,
+ alpha: !1
+ },
+ stencilTest: {
+ enabled: !0,
+ frontFunction: e,
+ frontOperation: {
+ fail: StencilOperation$1.KEEP,
+ zFail: StencilOperation$1.DECREMENT_WRAP,
+ zPass: StencilOperation$1.KEEP
+ },
+ backFunction: e,
+ backOperation: {
+ fail: StencilOperation$1.KEEP,
+ zFail: StencilOperation$1.INCREMENT_WRAP,
+ zPass: StencilOperation$1.KEEP
+ },
+ reference: StencilConstants$1.CESIUM_3D_TILE_MASK,
+ mask: StencilConstants$1.CESIUM_3D_TILE_MASK
+ },
+ stencilMask: StencilConstants$1.CLASSIFICATION_MASK,
+ depthTest: {
+ enabled: !0,
+ func: DepthFunction$1.LESS_OR_EQUAL
+ },
+ depthMask: !1
+ };
+}
+const colorRenderState = {
+ stencilTest: {
+ enabled: !0,
+ frontFunction: StencilFunction$1.NOT_EQUAL,
+ frontOperation: {
+ fail: StencilOperation$1.ZERO,
+ zFail: StencilOperation$1.ZERO,
+ zPass: StencilOperation$1.ZERO
+ },
+ backFunction: StencilFunction$1.NOT_EQUAL,
+ backOperation: {
+ fail: StencilOperation$1.ZERO,
+ zFail: StencilOperation$1.ZERO,
+ zPass: StencilOperation$1.ZERO
+ },
+ reference: 0,
+ mask: StencilConstants$1.CLASSIFICATION_MASK
+ },
+ stencilMask: StencilConstants$1.CLASSIFICATION_MASK,
+ depthTest: {
+ enabled: !1
+ },
+ depthMask: !1,
+ blending: BlendingState$1.PRE_MULTIPLIED_ALPHA_BLEND
+}, pickRenderState = {
+ stencilTest: {
+ enabled: !0,
+ frontFunction: StencilFunction$1.NOT_EQUAL,
+ frontOperation: {
+ fail: StencilOperation$1.ZERO,
+ zFail: StencilOperation$1.ZERO,
+ zPass: StencilOperation$1.ZERO
+ },
+ backFunction: StencilFunction$1.NOT_EQUAL,
+ backOperation: {
+ fail: StencilOperation$1.ZERO,
+ zFail: StencilOperation$1.ZERO,
+ zPass: StencilOperation$1.ZERO
+ },
+ reference: 0,
+ mask: StencilConstants$1.CLASSIFICATION_MASK
+ },
+ stencilMask: StencilConstants$1.CLASSIFICATION_MASK,
+ depthTest: {
+ enabled: !1
+ },
+ depthMask: !1
+}, scratchDerivedCommands = [];
+function initialize$9(e) {
+ const t = e._command, n = scratchDerivedCommands;
+ if (e._useDebugWireframe) {
+ t.pass = Pass$1.OPAQUE, n.length = 0, n.push(t), e._commandListDebugWireframe = createBatchCommands(
+ e,
+ n,
+ e._commandListDebugWireframe
+ );
+ const o = e._commandListDebugWireframe, s = o.length;
+ for (let c = 0; c < s; c++) {
+ const l = o[c];
+ l.count *= 2, l.offset *= 2;
+ }
+ return;
+ }
+ const r = e.model.allowPicking;
+ if (e._classifiesTerrain) {
+ const o = Pass$1.TERRAIN_CLASSIFICATION, s = deriveStencilDepthCommand(t, o), c = deriveColorCommand(t, o);
+ n.length = 0, n.push(s, c), e._commandListTerrain = createBatchCommands(
+ e,
+ n,
+ e._commandListTerrain
+ ), r && (e._commandListTerrainPicking = createPickCommands(
+ e,
+ n,
+ e._commandListTerrainPicking
+ ));
+ }
+ if (e._classifies3DTiles) {
+ const o = Pass$1.CESIUM_3D_TILE_CLASSIFICATION, s = deriveStencilDepthCommand(t, o), c = deriveColorCommand(t, o);
+ n.length = 0, n.push(s, c), e._commandList3DTiles = createBatchCommands(
+ e,
+ n,
+ e._commandList3DTiles
+ ), r && (e._commandList3DTilesPicking = createPickCommands(
+ e,
+ n,
+ e._commandList3DTilesPicking
+ ));
+ }
+}
+function createBatchCommands(e, t, n) {
+ const i = e._runtimePrimitive, r = i.batchLengths, o = i.batchOffsets, s = r.length, c = t.length;
+ for (let l = 0; l < s; l++) {
+ const d = r[l], f = o[l];
+ for (let h = 0; h < c; h++) {
+ const p = t[h], m = DrawCommand.shallowClone(p);
+ m.count = d, m.offset = f, n.push(m);
+ }
+ }
+ return n;
+}
+function deriveStencilDepthCommand(e, t) {
+ const n = DrawCommand.shallowClone(e);
+ n.cull = !1, n.pass = t;
+ const i = t === Pass$1.TERRAIN_CLASSIFICATION ? StencilFunction$1.ALWAYS : StencilFunction$1.EQUAL, r = getStencilDepthRenderState(i);
+ return n.renderState = RenderState.fromCache(r), n;
+}
+function deriveColorCommand(e, t) {
+ const n = DrawCommand.shallowClone(e);
+ return n.cull = !1, n.pass = t, n.renderState = RenderState.fromCache(colorRenderState), n;
+}
+const scratchPickCommands = [];
+function createPickCommands(e, t, n) {
+ const i = RenderState.fromCache(pickRenderState), r = t[0], o = t[1], s = DrawCommand.shallowClone(r);
+ s.cull = !0, s.pickOnly = !0;
+ const c = DrawCommand.shallowClone(o);
+ c.cull = !0, c.pickOnly = !0, c.renderState = i, c.pickId = e._pickId;
+ const l = scratchPickCommands;
+ return l.length = 0, l.push(s, c), createBatchCommands(e, l, n);
+}
+Object.defineProperties(ClassificationModelDrawCommand.prototype, {
+ /**
+ * The main draw command that the other commands are derived from.
+ *
+ * @memberof ClassificationModelDrawCommand.prototype
+ * @type {DrawCommand}
+ *
+ * @readonly
+ * @private
+ */
+ command: {
+ get: function() {
+ return this._command;
+ }
+ },
+ /**
+ * The runtime primitive that the draw command belongs to.
+ *
+ * @memberof ClassificationModelDrawCommand.prototype
+ * @type {ModelRuntimePrimitive}
+ *
+ * @readonly
+ * @private
+ */
+ runtimePrimitive: {
+ get: function() {
+ return this._runtimePrimitive;
+ }
+ },
+ /**
+ * The batch lengths used to generate multiple draw commands.
+ *
+ * @memberof ClassificationModelDrawCommand.prototype
+ * @type {number[]}
+ *
+ * @readonly
+ * @private
+ */
+ batchLengths: {
+ get: function() {
+ return this._runtimePrimitive.batchLengths;
+ }
+ },
+ /**
+ * The batch offsets used to generate multiple draw commands.
+ *
+ * @memberof ClassificationModelDrawCommand.prototype
+ * @type {number[]}
+ *
+ * @readonly
+ * @private
+ */
+ batchOffsets: {
+ get: function() {
+ return this._runtimePrimitive.batchOffsets;
+ }
+ },
+ /**
+ * The model that the draw command belongs to.
+ *
+ * @memberof ClassificationModelDrawCommand.prototype
+ * @type {Model}
+ *
+ * @readonly
+ * @private
+ */
+ model: {
+ get: function() {
+ return this._model;
+ }
+ },
+ /**
+ * The classification type of the model that this draw command belongs to.
+ *
+ * @memberof ClassificationModelDrawCommand.prototype
+ * @type {ClassificationType}
+ *
+ * @readonly
+ * @private
+ */
+ classificationType: {
+ get: function() {
+ return this._classificationType;
+ }
+ },
+ /**
+ * The current model matrix applied to the draw commands.
+ *
+ * @memberof ClassificationModelDrawCommand.prototype
+ * @type {Matrix4}
+ *
+ * @readonly
+ * @private
+ */
+ modelMatrix: {
+ get: function() {
+ return this._modelMatrix;
+ },
+ set: function(e) {
+ this._modelMatrix = Matrix4.clone(e, this._modelMatrix);
+ const t = this._runtimePrimitive.boundingSphere;
+ this._boundingVolume = BoundingSphere.transform(
+ t,
+ this._modelMatrix,
+ this._boundingVolume
+ );
+ }
+ },
+ /**
+ * The bounding volume of the main draw command. This is equivalent
+ * to the primitive's bounding sphere transformed by the draw
+ * command's model matrix.
+ *
+ * @memberof ClassificationModelDrawCommand.prototype
+ * @type {BoundingSphere}
+ *
+ * @readonly
+ * @private
+ */
+ boundingVolume: {
+ get: function() {
+ return this._boundingVolume;
+ }
+ },
+ /**
+ * Culling is disabled for classification models, so this has no effect on
+ * how the model renders. This only exists to match the interface of
+ * {@link ModelDrawCommand}.
+ *
+ * @memberof ClassificationModelDrawCommand.prototype
+ * @type {CullFace}
+ *
+ * @private
+ */
+ cullFace: {
+ get: function() {
+ return this._cullFace;
+ },
+ set: function(e) {
+ this._cullFace = e;
+ }
+ }
+});
+ClassificationModelDrawCommand.prototype.pushCommands = function(e, t) {
+ const n = e.passes;
+ if (n.render) {
+ if (this._useDebugWireframe) {
+ t.push.apply(t, this._commandListDebugWireframe);
+ return;
+ }
+ if (this._classifiesTerrain && t.push.apply(t, this._commandListTerrain), this._classifies3DTiles && t.push.apply(t, this._commandList3DTiles), e.invertClassification && this._classifies3DTiles) {
+ if (this._commandListIgnoreShow.length === 0) {
+ const r = Pass$1.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW, o = deriveStencilDepthCommand(this._command, r), s = scratchDerivedCommands;
+ s.length = 0, s.push(o), this._commandListIgnoreShow = createBatchCommands(
+ this,
+ s,
+ this._commandListIgnoreShow
+ );
+ }
+ t.push.apply(t, this._commandListIgnoreShow);
+ }
+ }
+ return n.pick && (this._classifiesTerrain && t.push.apply(t, this._commandListTerrainPicking), this._classifies3DTiles && t.push.apply(t, this._commandList3DTilesPicking)), t;
+};
+function ModelDrawCommand(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.command, n = e.primitiveRenderResources, i = n.model;
+ this._model = i;
+ const r = n.runtimePrimitive;
+ this._runtimePrimitive = r;
+ const o = t.pass === Pass$1.TRANSLUCENT, c = !r.primitive.material.doubleSided && !o, l = n.hasSilhouette, d = !o && !l, f = n.hasSkipLevelOfDetail && !o, h = l;
+ this._command = t, this._modelMatrix = Matrix4.clone(t.modelMatrix), this._boundingVolume = BoundingSphere.clone(t.boundingVolume), this._modelMatrix2D = new Matrix4(), this._boundingVolume2D = new BoundingSphere(), this._modelMatrix2DDirty = !1, this._backFaceCulling = t.renderState.cull.enabled, this._cullFace = t.renderState.cull.face, this._shadows = i.shadows, this._debugShowBoundingVolume = t.debugShowBoundingVolume, this._usesBackFaceCulling = c, this._needsTranslucentCommand = d, this._needsSkipLevelOfDetailCommands = f, this._needsSilhouetteCommands = h, this._originalCommand = void 0, this._translucentCommand = void 0, this._skipLodBackfaceCommand = void 0, this._skipLodStencilCommand = void 0, this._silhouetteModelCommand = void 0, this._silhouetteColorCommand = void 0, this._derivedCommands = [], this._has2DCommands = !1, initialize$8(this);
+}
+function ModelDerivedCommand(e) {
+ this.command = e.command, this.updateShadows = e.updateShadows, this.updateBackFaceCulling = e.updateBackFaceCulling, this.updateCullFace = e.updateCullFace, this.updateDebugShowBoundingVolume = e.updateDebugShowBoundingVolume, this.is2D = defaultValue(e.is2D, !1), this.derivedCommand2D = void 0;
+}
+ModelDerivedCommand.clone = function(e) {
+ return new ModelDerivedCommand({
+ command: e.command,
+ updateShadows: e.updateShadows,
+ updateBackFaceCulling: e.updateBackFaceCulling,
+ updateCullFace: e.updateCullFace,
+ updateDebugShowBoundingVolume: e.updateDebugShowBoundingVolume,
+ is2D: e.is2D,
+ derivedCommand2D: e.derivedCommand2D
+ });
+};
+function initialize$8(e) {
+ const t = e._command;
+ t.modelMatrix = e._modelMatrix, t.boundingVolume = e._boundingVolume;
+ const n = e._model, i = e._usesBackFaceCulling, r = e._derivedCommands;
+ e._originalCommand = new ModelDerivedCommand({
+ command: t,
+ updateShadows: !0,
+ updateBackFaceCulling: i,
+ updateCullFace: i,
+ updateDebugShowBoundingVolume: !0,
+ is2D: !1
+ }), r.push(e._originalCommand), e._needsTranslucentCommand && (e._translucentCommand = new ModelDerivedCommand({
+ command: deriveTranslucentCommand(t),
+ updateShadows: !0,
+ updateBackFaceCulling: !1,
+ updateCullFace: !1,
+ updateDebugShowBoundingVolume: !0
+ }), r.push(e._translucentCommand)), e._needsSkipLevelOfDetailCommands && (e._skipLodBackfaceCommand = new ModelDerivedCommand({
+ command: deriveSkipLodBackfaceCommand(t),
+ updateShadows: !1,
+ updateBackFaceCulling: !1,
+ updateCullFace: i,
+ updateDebugShowBoundingVolume: !1
+ }), e._skipLodStencilCommand = new ModelDerivedCommand({
+ command: deriveSkipLodStencilCommand(t),
+ updateShadows: !0,
+ updateBackFaceCulling: i,
+ updateCullFace: i,
+ updateDebugShowBoundingVolume: !0
+ }), r.push(e._skipLodBackfaceCommand), r.push(e._skipLodStencilCommand)), e._needsSilhouetteCommands && (e._silhouetteModelCommand = new ModelDerivedCommand({
+ command: deriveSilhouetteModelCommand(t, n),
+ updateShadows: !0,
+ updateBackFaceCulling: i,
+ updateCullFace: i,
+ updateDebugShowBoundingVolume: !0
+ }), e._silhouetteColorCommand = new ModelDerivedCommand({
+ command: deriveSilhouetteColorCommand(t, n),
+ updateShadows: !1,
+ updateBackFaceCulling: !1,
+ updateCullFace: !1,
+ updateDebugShowBoundingVolume: !1
+ }), r.push(e._silhouetteModelCommand), r.push(e._silhouetteColorCommand));
+}
+Object.defineProperties(ModelDrawCommand.prototype, {
+ /**
+ * The main draw command that the other commands are derived from.
+ *
+ * @memberof ModelDrawCommand.prototype
+ * @type {DrawCommand}
+ *
+ * @readonly
+ * @private
+ */
+ command: {
+ get: function() {
+ return this._command;
+ }
+ },
+ /**
+ * The runtime primitive that the draw command belongs to.
+ *
+ * @memberof ModelDrawCommand.prototype
+ * @type {ModelRuntimePrimitive}
+ *
+ * @readonly
+ * @private
+ */
+ runtimePrimitive: {
+ get: function() {
+ return this._runtimePrimitive;
+ }
+ },
+ /**
+ * The model that the draw command belongs to.
+ *
+ * @memberof ModelDrawCommand.prototype
+ * @type {Model}
+ *
+ * @readonly
+ * @private
+ */
+ model: {
+ get: function() {
+ return this._model;
+ }
+ },
+ /**
+ * The primitive type of the draw command.
+ *
+ * @memberof ModelDrawCommand.prototype
+ * @type {PrimitiveType}
+ *
+ * @readonly
+ * @private
+ */
+ primitiveType: {
+ get: function() {
+ return this._command.primitiveType;
+ }
+ },
+ /**
+ * The current model matrix applied to the draw commands. If there are
+ * 2D draw commands, their model matrix will be derived from the 3D one.
+ *
+ * @memberof ModelDrawCommand.prototype
+ * @type {Matrix4}
+ *
+ * @readonly
+ * @private
+ */
+ modelMatrix: {
+ get: function() {
+ return this._modelMatrix;
+ },
+ set: function(e) {
+ this._modelMatrix = Matrix4.clone(e, this._modelMatrix), this._modelMatrix2DDirty = !0, this._boundingVolume = BoundingSphere.transform(
+ this.runtimePrimitive.boundingSphere,
+ this._modelMatrix,
+ this._boundingVolume
+ );
+ }
+ },
+ /**
+ * The bounding volume of the main draw command. This is equivalent
+ * to the primitive's bounding sphere transformed by the draw
+ * command's model matrix.
+ *
+ * @memberof ModelDrawCommand.prototype
+ * @type {BoundingSphere}
+ *
+ * @readonly
+ * @private
+ */
+ boundingVolume: {
+ get: function() {
+ return this._boundingVolume;
+ }
+ },
+ /**
+ * Whether the geometry casts or receives shadows from light sources.
+ *
+ * @memberof ModelDrawCommand.prototype
+ * @type {ShadowMode}
+ *
+ * @private
+ */
+ shadows: {
+ get: function() {
+ return this._shadows;
+ },
+ set: function(e) {
+ this._shadows = e, updateShadows(this);
+ }
+ },
+ /**
+ * Whether to cull back-facing geometry. When true, back face culling is
+ * determined by the material's doubleSided property; when false, back face
+ * culling is disabled. Back faces are not culled if the command is
+ * translucent.
+ *
+ * @memberof ModelDrawCommand.prototype
+ * @type {boolean}
+ *
+ * @private
+ */
+ backFaceCulling: {
+ get: function() {
+ return this._backFaceCulling;
+ },
+ set: function(e) {
+ this._backFaceCulling !== e && (this._backFaceCulling = e, updateBackFaceCulling(this));
+ }
+ },
+ /**
+ * Determines which faces to cull, if culling is enabled.
+ *
+ * @memberof ModelDrawCommand.prototype
+ * @type {CullFace}
+ *
+ * @private
+ */
+ cullFace: {
+ get: function() {
+ return this._cullFace;
+ },
+ set: function(e) {
+ this._cullFace !== e && (this._cullFace = e, updateCullFace(this));
+ }
+ },
+ /**
+ * Whether to draw the bounding sphere associated with this draw command.
+ *
+ * @memberof ModelDrawCommand.prototype
+ * @type {boolean}
+ *
+ * @private
+ */
+ debugShowBoundingVolume: {
+ get: function() {
+ return this._debugShowBoundingVolume;
+ },
+ set: function(e) {
+ this._debugShowBoundingVolume !== e && (this._debugShowBoundingVolume = e, updateDebugShowBoundingVolume(this));
+ }
+ }
+});
+function updateModelMatrix2D(e, t) {
+ const n = e._modelMatrix;
+ e._modelMatrix2D = Matrix4.clone(
+ n,
+ e._modelMatrix2D
+ ), e._modelMatrix2D[13] -= CesiumMath.sign(n[13]) * 2 * CesiumMath.PI * t.mapProjection.ellipsoid.maximumRadius, e._boundingVolume2D = BoundingSphere.transform(
+ e.runtimePrimitive.boundingSphere,
+ e._modelMatrix2D,
+ e._boundingVolume2D
+ );
+}
+function updateShadows(e) {
+ const t = e.shadows, n = ShadowMode$1.castShadows(t), i = ShadowMode$1.receiveShadows(t), r = e._derivedCommands;
+ for (let o = 0; o < r.length; ++o) {
+ const s = r[o];
+ if (s.updateShadows) {
+ const c = s.command;
+ c.castShadows = n, c.receiveShadows = i;
+ }
+ }
+}
+function updateBackFaceCulling(e) {
+ const t = e.backFaceCulling, n = e._derivedCommands;
+ for (let i = 0; i < n.length; ++i) {
+ const r = n[i];
+ if (r.updateBackFaceCulling) {
+ const o = r.command, s = clone$1(o.renderState, !0);
+ s.cull.enabled = t, o.renderState = RenderState.fromCache(s);
+ }
+ }
+}
+function updateCullFace(e) {
+ const t = e.cullFace, n = e._derivedCommands;
+ for (let i = 0; i < n.length; ++i) {
+ const r = n[i];
+ if (r.updateCullFace) {
+ const o = r.command, s = clone$1(o.renderState, !0);
+ s.cull.face = t, o.renderState = RenderState.fromCache(s);
+ }
+ }
+}
+function updateDebugShowBoundingVolume(e) {
+ const t = e.debugShowBoundingVolume, n = e._derivedCommands;
+ for (let i = 0; i < n.length; ++i) {
+ const r = n[i];
+ if (r.updateDebugShowBoundingVolume) {
+ const o = r.command;
+ o.debugShowBoundingVolume = t;
+ }
+ }
+}
+ModelDrawCommand.prototype.pushCommands = function(e, t) {
+ const n = shouldUse2DCommands(this, e);
+ n && !this._has2DCommands && (derive2DCommands(this), this._has2DCommands = !0, this._modelMatrix2DDirty = !0), this._modelMatrix2DDirty && (updateModelMatrix2D(this, e), this._modelMatrix2DDirty = !1);
+ const i = this.model.styleCommandsNeeded;
+ if (!(this._needsTranslucentCommand && defined(i) && (i !== StyleCommandsNeeded$1.ALL_OPAQUE && pushCommand$1(t, this._translucentCommand, n), i === StyleCommandsNeeded$1.ALL_TRANSLUCENT))) {
+ if (this._needsSkipLevelOfDetailCommands) {
+ const { tileset: r, tile: o } = this._model.content;
+ if (r.hasMixedContent) {
+ o._finalResolution || pushCommand$1(
+ r._backfaceCommands,
+ this._skipLodBackfaceCommand,
+ n
+ ), updateSkipLodStencilCommand(this, o, n), pushCommand$1(t, this._skipLodStencilCommand, n);
+ return;
+ }
+ }
+ if (this._needsSilhouetteCommands) {
+ pushCommand$1(t, this._silhouetteModelCommand, n);
+ return;
+ }
+ return pushCommand$1(t, this._originalCommand, n), t;
+ }
+};
+ModelDrawCommand.prototype.pushSilhouetteCommands = function(e, t) {
+ const n = shouldUse2DCommands(this, e);
+ return pushCommand$1(t, this._silhouetteColorCommand, n), t;
+};
+function pushCommand$1(e, t, n) {
+ e.push(t.command), n && e.push(t.derivedCommand2D.command);
+}
+function shouldUse2DCommands(e, t) {
+ if (t.mode !== SceneMode$1.SCENE2D || e.model._projectTo2D)
+ return !1;
+ const i = e.model.sceneGraph._boundingSphere2D, r = i.center.y - i.radius, o = i.center.y + i.radius, s = t.mapProjection.ellipsoid.maximumRadius * CesiumMath.PI;
+ return r < s && o > s || r < -s && o > -s;
+}
+function derive2DCommand(e, t) {
+ if (!defined(t))
+ return;
+ const n = ModelDerivedCommand.clone(t), i = DrawCommand.shallowClone(t.command);
+ return i.modelMatrix = e._modelMatrix2D, i.boundingVolume = e._boundingVolume2D, n.command = i, n.updateShadows = !1, n.is2D = !0, t.derivedCommand2D = n, e._derivedCommands.push(n), n;
+}
+function derive2DCommands(e) {
+ derive2DCommand(e, e._originalCommand), derive2DCommand(e, e._translucentCommand), derive2DCommand(e, e._skipLodBackfaceCommand), derive2DCommand(e, e._skipLodStencilCommand), derive2DCommand(e, e._silhouetteModelCommand), derive2DCommand(e, e._silhouetteColorCommand);
+}
+function deriveTranslucentCommand(e) {
+ const t = DrawCommand.shallowClone(e);
+ t.pass = Pass$1.TRANSLUCENT;
+ const n = clone$1(e.renderState, !0);
+ return n.cull.enabled = !1, n.depthMask = !1, n.blending = BlendingState$1.ALPHA_BLEND, t.renderState = RenderState.fromCache(n), t;
+}
+function deriveSilhouetteModelCommand(e, t) {
+ const n = t._silhouetteId % 255, i = DrawCommand.shallowClone(e), r = clone$1(e.renderState, !0);
+ return r.stencilTest = {
+ enabled: !0,
+ frontFunction: WebGLConstants$1.ALWAYS,
+ backFunction: WebGLConstants$1.ALWAYS,
+ reference: n,
+ mask: -1,
+ frontOperation: {
+ fail: WebGLConstants$1.KEEP,
+ zFail: WebGLConstants$1.KEEP,
+ zPass: WebGLConstants$1.REPLACE
+ },
+ backOperation: {
+ fail: WebGLConstants$1.KEEP,
+ zFail: WebGLConstants$1.KEEP,
+ zPass: WebGLConstants$1.REPLACE
+ }
+ }, t.isInvisible() && (r.colorMask = {
+ red: !1,
+ green: !1,
+ blue: !1,
+ alpha: !1
+ }), i.renderState = RenderState.fromCache(r), i;
+}
+function deriveSilhouetteColorCommand(e, t) {
+ const n = t._silhouetteId % 255, i = DrawCommand.shallowClone(e), r = clone$1(e.renderState, !0);
+ r.cull.enabled = !1, (e.pass === Pass$1.TRANSLUCENT || t.silhouetteColor.alpha < 1) && (i.pass = Pass$1.TRANSLUCENT, r.depthMask = !1, r.blending = BlendingState$1.ALPHA_BLEND), r.stencilTest = {
+ enabled: !0,
+ frontFunction: WebGLConstants$1.NOTEQUAL,
+ backFunction: WebGLConstants$1.NOTEQUAL,
+ reference: n,
+ mask: -1,
+ frontOperation: {
+ fail: WebGLConstants$1.KEEP,
+ zFail: WebGLConstants$1.KEEP,
+ zPass: WebGLConstants$1.KEEP
+ },
+ backOperation: {
+ fail: WebGLConstants$1.KEEP,
+ zFail: WebGLConstants$1.KEEP,
+ zPass: WebGLConstants$1.KEEP
+ }
+ };
+ const s = clone$1(e.uniformMap);
+ return s.model_silhouettePass = function() {
+ return !0;
+ }, i.renderState = RenderState.fromCache(r), i.uniformMap = s, i.castShadows = !1, i.receiveShadows = !1, i;
+}
+function updateSkipLodStencilCommand(e, t, n) {
+ const i = e._skipLodStencilCommand, r = i.command, o = t._selectionDepth, s = getLastSelectionDepth(r);
+ if (o !== s) {
+ const c = getStencilReference(o), l = clone$1(r.renderState, !0);
+ l.stencilTest.reference = c, r.renderState = RenderState.fromCache(l), n && (i.derivedCommand2D.renderState = l);
+ }
+}
+function getLastSelectionDepth(e) {
+ return (e.renderState.stencilTest.reference & StencilConstants$1.SKIP_LOD_MASK) >>> StencilConstants$1.SKIP_LOD_BIT_SHIFT;
+}
+function getStencilReference(e) {
+ return StencilConstants$1.CESIUM_3D_TILE_MASK | e << StencilConstants$1.SKIP_LOD_BIT_SHIFT;
+}
+function deriveSkipLodBackfaceCommand(e) {
+ const t = DrawCommand.shallowClone(e), n = clone$1(e.renderState, !0);
+ n.cull.enabled = !0, n.cull.face = CullFace$1.FRONT, n.colorMask = {
+ red: !1,
+ green: !1,
+ blue: !1,
+ alpha: !1
+ }, n.polygonOffset = {
+ enabled: !0,
+ factor: 5,
+ units: 5
+ };
+ const i = clone$1(t.uniformMap), r = new Cartesian2(5, 5);
+ return i.u_polygonOffset = function() {
+ return r;
+ }, t.renderState = RenderState.fromCache(n), t.uniformMap = i, t.castShadows = !1, t.receiveShadows = !1, t;
+}
+function deriveSkipLodStencilCommand(e) {
+ const t = DrawCommand.shallowClone(e), n = clone$1(e.renderState, !0), { stencilTest: i } = n;
+ return i.enabled = !0, i.mask = StencilConstants$1.SKIP_LOD_MASK, i.reference = StencilConstants$1.CESIUM_3D_TILE_MASK, i.frontFunction = StencilFunction$1.GREATER_OR_EQUAL, i.frontOperation.zPass = StencilOperation$1.REPLACE, i.backFunction = StencilFunction$1.GREATER_OR_EQUAL, i.backOperation.zPass = StencilOperation$1.REPLACE, n.stencilMask = StencilConstants$1.CESIUM_3D_TILE_MASK | StencilConstants$1.SKIP_LOD_MASK, t.renderState = RenderState.fromCache(n), t;
+}
+function buildDrawCommand(e, t) {
+ const n = e.shaderBuilder;
+ n.addVertexLines(ModelVS), n.addFragmentLines(ModelFS);
+ const i = getIndexBuffer$2(e), r = new VertexArray({
+ context: t.context,
+ indexBuffer: i,
+ attributes: e.attributes
+ }), o = e.model;
+ o._pipelineResources.push(r);
+ const s = n.buildShaderProgram(t.context);
+ o._pipelineResources.push(s);
+ const c = e.alphaOptions.pass, l = o.sceneGraph, d = t.mode === SceneMode$1.SCENE3D;
+ let f, h;
+ if (!d && !t.scene3DOnly && o._projectTo2D)
+ f = Matrix4.multiplyTransformation(
+ l._computedModelMatrix,
+ e.runtimeNode.computedTransform,
+ new Matrix4()
+ ), h = e.runtimePrimitive.boundingSphere2D;
+ else {
+ const x = d ? l._computedModelMatrix : l._computedModelMatrix2D;
+ f = Matrix4.multiplyTransformation(
+ x,
+ e.runtimeNode.computedTransform,
+ new Matrix4()
+ ), h = BoundingSphere.transform(
+ e.boundingSphere,
+ f,
+ e.boundingSphere
+ );
+ }
+ let p = clone$1(
+ RenderState.fromCache(e.renderStateOptions),
+ !0
+ );
+ p.cull.face = ModelUtility.getCullFace(
+ f,
+ e.primitiveType
+ ), p = RenderState.fromCache(p);
+ const m = defined(o.classificationType), _ = m ? !1 : ShadowMode$1.castShadows(o.shadows), y = m ? !1 : ShadowMode$1.receiveShadows(o.shadows), C = m ? void 0 : e.pickId, T = new DrawCommand({
+ boundingVolume: h,
+ modelMatrix: f,
+ uniformMap: e.uniformMap,
+ renderState: p,
+ vertexArray: r,
+ shaderProgram: s,
+ cull: o.cull,
+ pass: c,
+ count: e.count,
+ owner: o,
+ pickId: C,
+ instanceCount: e.instanceCount,
+ primitiveType: e.primitiveType,
+ debugShowBoundingVolume: o.debugShowBoundingVolume,
+ castShadows: _,
+ receiveShadows: y
+ });
+ return m ? new ClassificationModelDrawCommand({
+ primitiveRenderResources: e,
+ command: T
+ }) : new ModelDrawCommand({
+ primitiveRenderResources: e,
+ command: T
+ });
+}
+function getIndexBuffer$2(e) {
+ const t = e.wireframeIndexBuffer;
+ if (defined(t))
+ return t;
+ const n = e.indices;
+ if (defined(n))
+ return n.buffer;
+}
+const TilesetPipelineStage = {
+ name: "TilesetPipelineStage"
+ // Helps with debugging
+};
+TilesetPipelineStage.process = function(e, t, n) {
+ if (t.hasSkipLevelOfDetail(n)) {
+ e.shaderBuilder.addDefine(
+ "POLYGON_OFFSET",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ );
+ const o = {
+ u_polygonOffset: function() {
+ return Cartesian2.ZERO;
+ }
+ };
+ e.uniformMap = combine$2(
+ o,
+ e.uniformMap
+ ), e.hasSkipLevelOfDetail = !0;
+ }
+ const i = e.renderStateOptions;
+ i.stencilTest = StencilConstants$1.setCesium3DTileBit(), i.stencilMask = StencilConstants$1.CESIUM_3D_TILE_MASK;
+};
+const AtmosphereStageFS = `// robust iterative solution without trig functions
+// https://github.com/0xfaded/ellipse_demo/issues/1
+// https://stackoverflow.com/questions/22959698/distance-from-given-point-to-given-ellipse
+//
+// This version uses only a single iteration for best performance. For fog
+// rendering, the difference is negligible.
+vec2 nearestPointOnEllipseFast(vec2 pos, vec2 radii) {
+ vec2 p = abs(pos);
+ vec2 inverseRadii = 1.0 / radii;
+ vec2 evoluteScale = (radii.x * radii.x - radii.y * radii.y) * vec2(1.0, -1.0) * inverseRadii;
+
+ // We describe the ellipse parametrically: v = radii * vec2(cos(t), sin(t))
+ // but store the cos and sin of t in a vec2 for efficiency.
+ // Initial guess: t = cos(pi/4)
+ vec2 tTrigs = vec2(0.70710678118);
+ vec2 v = radii * tTrigs;
+
+ // Find the evolute of the ellipse (center of curvature) at v.
+ vec2 evolute = evoluteScale * tTrigs * tTrigs * tTrigs;
+ // Find the (approximate) intersection of p - evolute with the ellipsoid.
+ vec2 q = normalize(p - evolute) * length(v - evolute);
+ // Update the estimate of t.
+ tTrigs = (q + evolute) * inverseRadii;
+ tTrigs = normalize(clamp(tTrigs, 0.0, 1.0));
+ v = radii * tTrigs;
+
+ return v * sign(pos);
+}
+
+vec3 computeEllipsoidPositionWC(vec3 positionMC) {
+ // Get the world-space position and project onto a meridian plane of
+ // the ellipsoid
+ vec3 positionWC = (czm_model * vec4(positionMC, 1.0)).xyz;
+
+ vec2 positionEllipse = vec2(length(positionWC.xy), positionWC.z);
+ vec2 nearestPoint = nearestPointOnEllipseFast(positionEllipse, czm_ellipsoidRadii.xz);
+
+ // Reconstruct a 3D point in world space
+ return vec3(nearestPoint.x * normalize(positionWC.xy), nearestPoint.y);
+}
+
+void applyFog(inout vec4 color, vec4 groundAtmosphereColor, vec3 lightDirection, float distanceToCamera) {
+
+ vec3 fogColor = groundAtmosphereColor.rgb;
+
+ // If there is dynamic lighting, apply that to the fog.
+ const float NONE = 0.0;
+ if (czm_atmosphereDynamicLighting != NONE) {
+ float darken = clamp(dot(normalize(czm_viewerPositionWC), lightDirection), czm_fogMinimumBrightness, 1.0);
+ fogColor *= darken;
+ }
+
+ // Tonemap if HDR rendering is disabled
+ #ifndef HDR
+ fogColor.rgb = czm_pbrNeutralTonemapping(fogColor.rgb);
+ fogColor.rgb = czm_inverseGamma(fogColor.rgb);
+ #endif
+
+ // Matches the constant in GlobeFS.glsl. This makes the fog falloff
+ // more gradual.
+ const float fogModifier = 0.15;
+ vec3 withFog = czm_fog(distanceToCamera, color.rgb, fogColor, fogModifier);
+ color = vec4(withFog, color.a);
+}
+
+void atmosphereStage(inout vec4 color, in ProcessedAttributes attributes) {
+ vec3 rayleighColor;
+ vec3 mieColor;
+ float opacity;
+
+ vec3 positionWC;
+ vec3 lightDirection;
+
+ // When the camera is in space, compute the position per-fragment for
+ // more accurate ground atmosphere. All other cases will use
+ //
+ // The if condition will be added in https://github.com/CesiumGS/cesium/issues/11717
+ if (false) {
+ positionWC = computeEllipsoidPositionWC(attributes.positionMC);
+ lightDirection = czm_getDynamicAtmosphereLightDirection(positionWC, czm_atmosphereDynamicLighting);
+
+ // The fog color is derived from the ground atmosphere color
+ czm_computeGroundAtmosphereScattering(
+ positionWC,
+ lightDirection,
+ rayleighColor,
+ mieColor,
+ opacity
+ );
+ } else {
+ positionWC = attributes.positionWC;
+ lightDirection = czm_getDynamicAtmosphereLightDirection(positionWC, czm_atmosphereDynamicLighting);
+ rayleighColor = v_atmosphereRayleighColor;
+ mieColor = v_atmosphereMieColor;
+ opacity = v_atmosphereOpacity;
+ }
+
+ //color correct rayleigh and mie colors
+ const bool ignoreBlackPixels = true;
+ rayleighColor = czm_applyHSBShift(rayleighColor, czm_atmosphereHsbShift, ignoreBlackPixels);
+ mieColor = czm_applyHSBShift(mieColor, czm_atmosphereHsbShift, ignoreBlackPixels);
+
+ vec4 groundAtmosphereColor = czm_computeAtmosphereColor(positionWC, lightDirection, rayleighColor, mieColor, opacity);
+
+ if (u_isInFog) {
+ float distanceToCamera = length(attributes.positionEC);
+ applyFog(color, groundAtmosphereColor, lightDirection, distanceToCamera);
+ } else {
+ // Ground atmosphere
+ }
+}
+`, AtmosphereStageVS = `void atmosphereStage(ProcessedAttributes attributes) {
+ vec3 lightDirection = czm_getDynamicAtmosphereLightDirection(v_positionWC, czm_atmosphereDynamicLighting);
+
+ czm_computeGroundAtmosphereScattering(
+ // This assumes the geometry stage came before this.
+ v_positionWC,
+ lightDirection,
+ v_atmosphereRayleighColor,
+ v_atmosphereMieColor,
+ v_atmosphereOpacity
+ );
+}
+`, AtmospherePipelineStage = {
+ name: "AtmospherePipelineStage"
+ // Helps with debugging
+};
+AtmospherePipelineStage.process = function(e, t, n) {
+ const i = e.shaderBuilder;
+ i.addDefine("HAS_ATMOSPHERE", void 0, ShaderDestination$1.BOTH), i.addDefine(
+ "COMPUTE_POSITION_WC_ATMOSPHERE",
+ void 0,
+ ShaderDestination$1.BOTH
+ ), i.addVarying("vec3", "v_atmosphereRayleighColor"), i.addVarying("vec3", "v_atmosphereMieColor"), i.addVarying("float", "v_atmosphereOpacity"), i.addVertexLines([AtmosphereStageVS]), i.addFragmentLines([AtmosphereStageFS]), i.addUniform("bool", "u_isInFog", ShaderDestination$1.FRAGMENT), e.uniformMap.u_isInFog = function() {
+ const r = Cartesian3.distance(
+ n.camera.positionWC,
+ t.boundingSphere.center
+ );
+ return CesiumMath.fog(r, n.fog.density) > CesiumMath.EPSILON3;
+ };
+};
+const ImageBasedLightingStageFS = `/**
+ * Compute some metrics for a procedural sky lighting model
+ *
+ * @param {vec3} positionWC The position of the fragment in world coordinates.
+ * @param {vec3} reflectionWC A unit vector in the direction of the reflection, in world coordinates.
+ * @return {vec3} The dot products of the horizon and reflection directions with the nadir, and an atmosphere boundary distance.
+ */
+vec3 getProceduralSkyMetrics(vec3 positionWC, vec3 reflectionWC)
+{
+ // Figure out if the reflection vector hits the ellipsoid
+ float horizonDotNadir = 1.0 - min(1.0, czm_ellipsoidRadii.x / length(positionWC));
+ float reflectionDotNadir = dot(reflectionWC, normalize(positionWC));
+ float atmosphereHeight = 0.05;
+ float smoothstepHeight = smoothstep(0.0, atmosphereHeight, horizonDotNadir);
+ return vec3(horizonDotNadir, reflectionDotNadir, smoothstepHeight);
+}
+
+/**
+ * Compute the diffuse irradiance for a procedural sky lighting model.
+ *
+ * @param {vec3} skyMetrics The dot products of the horizon and reflection directions with the nadir, and an atmosphere boundary distance.
+ * @return {vec3} The computed diffuse irradiance.
+ */
+vec3 getProceduralDiffuseIrradiance(vec3 skyMetrics)
+{
+ vec3 blueSkyDiffuseColor = vec3(0.7, 0.85, 0.9);
+ float diffuseIrradianceFromEarth = (1.0 - skyMetrics.x) * (skyMetrics.y * 0.25 + 0.75) * skyMetrics.z;
+ float diffuseIrradianceFromSky = (1.0 - skyMetrics.z) * (1.0 - (skyMetrics.y * 0.25 + 0.25));
+ return blueSkyDiffuseColor * clamp(diffuseIrradianceFromEarth + diffuseIrradianceFromSky, 0.0, 1.0);
+}
+
+/**
+ * Compute the specular irradiance for a procedural sky lighting model.
+ *
+ * @param {vec3} reflectionWC The reflection vector in world coordinates.
+ * @param {vec3} skyMetrics The dot products of the horizon and reflection directions with the nadir, and an atmosphere boundary distance.
+ * @param {float} roughness The roughness of the material.
+ * @return {vec3} The computed specular irradiance.
+ */
+vec3 getProceduralSpecularIrradiance(vec3 reflectionWC, vec3 skyMetrics, float roughness)
+{
+ // Flipping the X vector is a cheap way to get the inverse of czm_temeToPseudoFixed, since that's a rotation about Z.
+ reflectionWC.x = -reflectionWC.x;
+ reflectionWC = -normalize(czm_temeToPseudoFixed * reflectionWC);
+ reflectionWC.x = -reflectionWC.x;
+
+ float inverseRoughness = 1.0 - roughness;
+ inverseRoughness *= inverseRoughness;
+ vec3 sceneSkyBox = czm_textureCube(czm_environmentMap, reflectionWC).rgb * inverseRoughness;
+
+ // Compute colors at different angles relative to the horizon
+ vec3 belowHorizonColor = mix(vec3(0.1, 0.15, 0.25), vec3(0.4, 0.7, 0.9), skyMetrics.z);
+ vec3 nadirColor = belowHorizonColor * 0.5;
+ vec3 aboveHorizonColor = mix(vec3(0.9, 1.0, 1.2), belowHorizonColor, roughness * 0.5);
+ vec3 blueSkyColor = mix(vec3(0.18, 0.26, 0.48), aboveHorizonColor, skyMetrics.y * inverseRoughness * 0.5 + 0.75);
+ vec3 zenithColor = mix(blueSkyColor, sceneSkyBox, skyMetrics.z);
+
+ // Compute blend zones
+ float blendRegionSize = 0.1 * ((1.0 - inverseRoughness) * 8.0 + 1.1 - skyMetrics.x);
+ float blendRegionOffset = roughness * -1.0;
+ float farAboveHorizon = clamp(skyMetrics.x - blendRegionSize * 0.5 + blendRegionOffset, 1.0e-10 - blendRegionSize, 0.99999);
+ float aroundHorizon = clamp(skyMetrics.x + blendRegionSize * 0.5, 1.0e-10 - blendRegionSize, 0.99999);
+ float farBelowHorizon = clamp(skyMetrics.x + blendRegionSize * 1.5, 1.0e-10 - blendRegionSize, 0.99999);
+
+ // Blend colors
+ float notDistantRough = (1.0 - skyMetrics.x * roughness * 0.8);
+ vec3 specularIrradiance = mix(zenithColor, aboveHorizonColor, smoothstep(farAboveHorizon, aroundHorizon, skyMetrics.y) * notDistantRough);
+ specularIrradiance = mix(specularIrradiance, belowHorizonColor, smoothstep(aroundHorizon, farBelowHorizon, skyMetrics.y) * inverseRoughness);
+ specularIrradiance = mix(specularIrradiance, nadirColor, smoothstep(farBelowHorizon, 1.0, skyMetrics.y) * inverseRoughness);
+
+ return specularIrradiance;
+}
+
+#ifdef USE_SUN_LUMINANCE
+float clampedDot(vec3 x, vec3 y)
+{
+ return clamp(dot(x, y), 0.001, 1.0);
+}
+/**
+ * Sun luminance following the "CIE Clear Sky Model"
+ * See page 40 of https://3dvar.com/Green2003Spherical.pdf
+ *
+ * @param {vec3} positionWC The position of the fragment in world coordinates.
+ * @param {vec3} normalEC The surface normal in eye coordinates.
+ * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.
+ * @return {float} The computed sun luminance.
+ */
+float getSunLuminance(vec3 positionWC, vec3 normalEC, vec3 lightDirectionEC)
+{
+ vec3 normalWC = normalize(czm_inverseViewRotation * normalEC);
+ vec3 lightDirectionWC = normalize(czm_inverseViewRotation * lightDirectionEC);
+ vec3 vWC = -normalize(positionWC);
+
+ // Angle between sun and zenith.
+ float LdotZenith = clampedDot(lightDirectionWC, vWC);
+ float S = acos(LdotZenith);
+ // Angle between zenith and current pixel
+ float NdotZenith = clampedDot(normalWC, vWC);
+ // Angle between sun and current pixel
+ float NdotL = clampedDot(normalEC, lightDirectionEC);
+ float gamma = acos(NdotL);
+
+ float numerator = ((0.91 + 10.0 * exp(-3.0 * gamma) + 0.45 * NdotL * NdotL) * (1.0 - exp(-0.32 / NdotZenith)));
+ float denominator = (0.91 + 10.0 * exp(-3.0 * S) + 0.45 * LdotZenith * LdotZenith) * (1.0 - exp(-0.32));
+ return model_luminanceAtZenith * (numerator / denominator);
+}
+#endif
+
+/**
+ * Compute the light contribution from a procedural sky model
+ *
+ * @param {vec3} positionEC The position of the fragment in eye coordinates.
+ * @param {vec3} normalEC The surface normal in eye coordinates.
+ * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.
+ * @param {czm_modelMaterial} The material properties.
+ * @return {vec3} The computed HDR color
+ */
+ vec3 proceduralIBL(
+ vec3 positionEC,
+ vec3 normalEC,
+ vec3 lightDirectionEC,
+ czm_modelMaterial material
+) {
+ vec3 viewDirectionEC = -normalize(positionEC);
+ vec3 positionWC = vec3(czm_inverseView * vec4(positionEC, 1.0));
+ vec3 reflectionWC = normalize(czm_inverseViewRotation * reflect(viewDirectionEC, normalEC));
+ vec3 skyMetrics = getProceduralSkyMetrics(positionWC, reflectionWC);
+
+ float roughness = material.roughness;
+ vec3 f0 = material.specular;
+
+ vec3 specularIrradiance = getProceduralSpecularIrradiance(reflectionWC, skyMetrics, roughness);
+ float NdotV = abs(dot(normalEC, viewDirectionEC)) + 0.001;
+ vec2 brdfLut = texture(czm_brdfLut, vec2(NdotV, roughness)).rg;
+ vec3 specularColor = czm_srgbToLinear(f0 * brdfLut.x + brdfLut.y);
+ vec3 specularContribution = specularIrradiance * specularColor * model_iblFactor.y;
+ #ifdef USE_SPECULAR
+ specularContribution *= material.specularWeight;
+ #endif
+
+ vec3 diffuseIrradiance = getProceduralDiffuseIrradiance(skyMetrics);
+ vec3 diffuseColor = material.diffuse;
+ vec3 diffuseContribution = diffuseIrradiance * diffuseColor * model_iblFactor.x;
+
+ vec3 iblColor = specularContribution + diffuseContribution;
+
+ #ifdef USE_SUN_LUMINANCE
+ iblColor *= getSunLuminance(positionWC, normalEC, lightDirectionEC);
+ #endif
+
+ return iblColor;
+}
+
+#ifdef DIFFUSE_IBL
+vec3 sampleDiffuseEnvironment(vec3 cubeDir)
+{
+ #ifdef CUSTOM_SPHERICAL_HARMONICS
+ return czm_sphericalHarmonics(cubeDir, model_sphericalHarmonicCoefficients);
+ #else
+ return czm_sphericalHarmonics(cubeDir, czm_sphericalHarmonicCoefficients);
+ #endif
+}
+#endif
+
+#ifdef SPECULAR_IBL
+vec3 sampleSpecularEnvironment(vec3 cubeDir, float roughness)
+{
+ #ifdef CUSTOM_SPECULAR_IBL
+ float lod = roughness * model_specularEnvironmentMapsMaximumLOD;
+ return czm_textureCube(model_specularEnvironmentMaps, cubeDir, lod).rgb;
+ #else
+ float lod = roughness * czm_specularEnvironmentMapsMaximumLOD;
+ return czm_textureCube(czm_specularEnvironmentMaps, cubeDir, lod).rgb;
+ #endif
+}
+vec3 computeSpecularIBL(vec3 cubeDir, float NdotV, vec3 f0, float roughness)
+{
+ // see https://bruop.github.io/ibl/ at Single Scattering Results
+ // Roughness dependent fresnel, from Fdez-Aguera
+ vec3 f90 = max(vec3(1.0 - roughness), f0);
+ vec3 F = fresnelSchlick2(f0, f90, NdotV);
+
+ vec2 brdfLut = texture(czm_brdfLut, vec2(NdotV, roughness)).rg;
+ vec3 specularSample = sampleSpecularEnvironment(cubeDir, roughness);
+
+ return specularSample * (F * brdfLut.x + brdfLut.y);
+}
+#endif
+
+#if defined(DIFFUSE_IBL) || defined(SPECULAR_IBL)
+/**
+ * Compute the light contributions from environment maps and spherical harmonic coefficients.
+ * See Fdez-Aguera, https://www.jcgt.org/published/0008/01/03/paper.pdf, for explanation
+ * of the single- and multi-scattering terms.
+ *
+ * @param {vec3} viewDirectionEC Unit vector pointing from the fragment to the eye position.
+ * @param {vec3} normalEC The surface normal in eye coordinates.
+ * @param {czm_modelMaterial} The material properties.
+ * @return {vec3} The computed HDR color.
+ */
+vec3 textureIBL(vec3 viewDirectionEC, vec3 normalEC, czm_modelMaterial material) {
+ vec3 f0 = material.specular;
+ float roughness = material.roughness;
+ float specularWeight = 1.0;
+ #ifdef USE_SPECULAR
+ specularWeight = material.specularWeight;
+ #endif
+ float NdotV = clamp(dot(normalEC, viewDirectionEC), 0.0, 1.0);
+
+ // see https://bruop.github.io/ibl/ at Single Scattering Results
+ // Roughness dependent fresnel, from Fdez-Aguera
+ vec3 f90 = max(vec3(1.0 - roughness), f0);
+ vec3 singleScatterFresnel = fresnelSchlick2(f0, f90, NdotV);
+
+ vec2 brdfLut = texture(czm_brdfLut, vec2(NdotV, roughness)).rg;
+ vec3 FssEss = specularWeight * (singleScatterFresnel * brdfLut.x + brdfLut.y);
+
+ #ifdef DIFFUSE_IBL
+ vec3 normalMC = normalize(model_iblReferenceFrameMatrix * normalEC);
+ vec3 irradiance = sampleDiffuseEnvironment(normalMC);
+
+ vec3 averageFresnel = f0 + (1.0 - f0) / 21.0;
+ float Ems = specularWeight * (1.0 - brdfLut.x - brdfLut.y);
+ vec3 FmsEms = FssEss * averageFresnel * Ems / (1.0 - averageFresnel * Ems);
+ vec3 dielectricScattering = (1.0 - FssEss - FmsEms) * material.diffuse;
+ vec3 diffuseContribution = irradiance * (FmsEms + dielectricScattering);
+ #else
+ vec3 diffuseContribution = vec3(0.0);
+ #endif
+
+ #ifdef USE_ANISOTROPY
+ // Bend normal to account for anisotropic distortion of specular reflection
+ vec3 anisotropyDirection = material.anisotropicB;
+ vec3 anisotropicTangent = cross(anisotropyDirection, viewDirectionEC);
+ vec3 anisotropicNormal = cross(anisotropicTangent, anisotropyDirection);
+ float bendFactor = 1.0 - material.anisotropyStrength * (1.0 - roughness);
+ float bendFactorPow4 = bendFactor * bendFactor * bendFactor * bendFactor;
+ vec3 bentNormal = normalize(mix(anisotropicNormal, normalEC, bendFactorPow4));
+ vec3 reflectEC = reflect(-viewDirectionEC, bentNormal);
+ #else
+ vec3 reflectEC = reflect(-viewDirectionEC, normalEC);
+ #endif
+
+ #ifdef SPECULAR_IBL
+ vec3 reflectMC = normalize(model_iblReferenceFrameMatrix * reflectEC);
+ vec3 radiance = sampleSpecularEnvironment(reflectMC, roughness);
+ vec3 specularContribution = radiance * FssEss;
+ #else
+ vec3 specularContribution = vec3(0.0);
+ #endif
+
+ return diffuseContribution + specularContribution;
+}
+#endif
+`, ImageBasedLightingPipelineStage = {
+ name: "ImageBasedLightingPipelineStage"
+ // Helps with debugging
+};
+ImageBasedLightingPipelineStage.process = function(e, t, n) {
+ const i = t.imageBasedLighting, r = e.shaderBuilder;
+ r.addDefine(
+ "USE_IBL_LIGHTING",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ), r.addUniform(
+ "vec2",
+ "model_iblFactor",
+ ShaderDestination$1.FRAGMENT
+ ), SpecularEnvironmentCubeMap.isSupported(n.context) && ((i.useSphericalHarmonics || i.useSpecularEnvironmentMaps || i.enabled) && r.addUniform(
+ "mat3",
+ "model_iblReferenceFrameMatrix",
+ ShaderDestination$1.FRAGMENT
+ ), defined(i.sphericalHarmonicCoefficients) ? (r.addDefine(
+ "DIFFUSE_IBL",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ), r.addDefine(
+ "CUSTOM_SPHERICAL_HARMONICS",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ), r.addUniform(
+ "vec3",
+ "model_sphericalHarmonicCoefficients[9]",
+ ShaderDestination$1.FRAGMENT
+ )) : i.useDefaultSphericalHarmonics && r.addDefine(
+ "DIFFUSE_IBL",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ), defined(i.specularEnvironmentCubeMap) && i.specularEnvironmentCubeMap.ready ? (r.addDefine(
+ "SPECULAR_IBL",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ), r.addDefine(
+ "CUSTOM_SPECULAR_IBL",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ), r.addUniform(
+ "samplerCube",
+ "model_specularEnvironmentMaps",
+ ShaderDestination$1.FRAGMENT
+ ), r.addUniform(
+ "float",
+ "model_specularEnvironmentMapsMaximumLOD",
+ ShaderDestination$1.FRAGMENT
+ )) : t.useDefaultSpecularMaps && r.addDefine(
+ "SPECULAR_IBL",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ )), defined(i.luminanceAtZenith) && (r.addDefine(
+ "USE_SUN_LUMINANCE",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ), r.addUniform(
+ "float",
+ "model_luminanceAtZenith",
+ ShaderDestination$1.FRAGMENT
+ )), r.addFragmentLines(ImageBasedLightingStageFS);
+ const o = {
+ model_iblFactor: function() {
+ return i.imageBasedLightingFactor;
+ },
+ model_iblReferenceFrameMatrix: function() {
+ return t._iblReferenceFrameMatrix;
+ },
+ model_luminanceAtZenith: function() {
+ return i.luminanceAtZenith;
+ },
+ model_sphericalHarmonicCoefficients: function() {
+ return i.sphericalHarmonicCoefficients;
+ },
+ model_specularEnvironmentMaps: function() {
+ return i.specularEnvironmentCubeMap.texture;
+ },
+ model_specularEnvironmentMapsMaximumLOD: function() {
+ return i.specularEnvironmentCubeMap.maximumMipmapLevel;
+ }
+ };
+ e.uniformMap = combine$2(o, e.uniformMap);
+};
+const articulationEpsilon = CesiumMath.EPSILON16;
+function ModelArticulationStage(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.stage, n = e.runtimeArticulation;
+ this._stage = t, this._runtimeArticulation = n, this._name = t.name, this._type = t.type, this._minimumValue = t.minimumValue, this._maximumValue = t.maximumValue, this._currentValue = t.initialValue;
+}
+Object.defineProperties(ModelArticulationStage.prototype, {
+ /**
+ * The internal articulation stage that this runtime stage represents.
+ *
+ * @memberof ModelArticulationStage.prototype
+ * @type {ModelComponents.ArticulationStage}
+ * @readonly
+ *
+ * @private
+ */
+ stage: {
+ get: function() {
+ return this._stage;
+ }
+ },
+ /**
+ * The runtime articulation that this stage belongs to.
+ *
+ * @memberof ModelArticulationStage.prototype
+ * @type {ModelArticulation}
+ * @readonly
+ *
+ * @private
+ */
+ runtimeArticulation: {
+ get: function() {
+ return this._runtimeArticulation;
+ }
+ },
+ /**
+ * The name of this articulation stage.
+ *
+ * @memberof ModelArticulationStage.prototype
+ * @type {string}
+ * @readonly
+ *
+ * @private
+ */
+ name: {
+ get: function() {
+ return this._name;
+ }
+ },
+ /**
+ * The type of this articulation stage. This specifies which of the
+ * node's properties is modified by the stage's value.
+ *
+ * @memberof ModelArticulationStage.prototype
+ * @type {ArticulationStageType}
+ * @readonly
+ *
+ * @private
+ */
+ type: {
+ get: function() {
+ return this._type;
+ }
+ },
+ /**
+ * The minimum value of this articulation stage.
+ *
+ * @memberof ModelArticulationStage.prototype
+ * @type {number}
+ * @readonly
+ *
+ * @private
+ */
+ minimumValue: {
+ get: function() {
+ return this._minimumValue;
+ }
+ },
+ /**
+ * The maximum value of this articulation stage.
+ *
+ * @memberof ModelArticulationStage.prototype
+ * @type {number}
+ * @readonly
+ *
+ * @private
+ */
+ maximumValue: {
+ get: function() {
+ return this._maximumValue;
+ }
+ },
+ /**
+ * The current value of this articulation stage.
+ *
+ * @memberof ModelArticulationStage.prototype
+ * @type {number}
+ *
+ * @private
+ */
+ currentValue: {
+ get: function() {
+ return this._currentValue;
+ },
+ set: function(e) {
+ e = CesiumMath.clamp(e, this.minimumValue, this.maximumValue), CesiumMath.equalsEpsilon(
+ this._currentValue,
+ e,
+ articulationEpsilon
+ ) || (this._currentValue = e, this.runtimeArticulation._dirty = !0);
+ }
+ }
+});
+const scratchArticulationCartesian = new Cartesian3(), scratchArticulationRotation = new Matrix3();
+ModelArticulationStage.prototype.applyStageToMatrix = function(e) {
+ const t = this.type, n = this.currentValue, i = scratchArticulationCartesian;
+ let r;
+ switch (t) {
+ case ArticulationStageType$1.XROTATE:
+ r = Matrix3.fromRotationX(
+ CesiumMath.toRadians(n),
+ scratchArticulationRotation
+ ), e = Matrix4.multiplyByMatrix3(e, r, e);
+ break;
+ case ArticulationStageType$1.YROTATE:
+ r = Matrix3.fromRotationY(
+ CesiumMath.toRadians(n),
+ scratchArticulationRotation
+ ), e = Matrix4.multiplyByMatrix3(e, r, e);
+ break;
+ case ArticulationStageType$1.ZROTATE:
+ r = Matrix3.fromRotationZ(
+ CesiumMath.toRadians(n),
+ scratchArticulationRotation
+ ), e = Matrix4.multiplyByMatrix3(e, r, e);
+ break;
+ case ArticulationStageType$1.XTRANSLATE:
+ i.x = n, i.y = 0, i.z = 0, e = Matrix4.multiplyByTranslation(e, i, e);
+ break;
+ case ArticulationStageType$1.YTRANSLATE:
+ i.x = 0, i.y = n, i.z = 0, e = Matrix4.multiplyByTranslation(e, i, e);
+ break;
+ case ArticulationStageType$1.ZTRANSLATE:
+ i.x = 0, i.y = 0, i.z = n, e = Matrix4.multiplyByTranslation(e, i, e);
+ break;
+ case ArticulationStageType$1.XSCALE:
+ i.x = n, i.y = 1, i.z = 1, e = Matrix4.multiplyByScale(e, i, e);
+ break;
+ case ArticulationStageType$1.YSCALE:
+ i.x = 1, i.y = n, i.z = 1, e = Matrix4.multiplyByScale(e, i, e);
+ break;
+ case ArticulationStageType$1.ZSCALE:
+ i.x = 1, i.y = 1, i.z = n, e = Matrix4.multiplyByScale(e, i, e);
+ break;
+ case ArticulationStageType$1.UNIFORMSCALE:
+ e = Matrix4.multiplyByUniformScale(e, n, e);
+ break;
+ }
+ return e;
+};
+function ModelArticulation(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.articulation, n = e.sceneGraph;
+ this._articulation = t, this._sceneGraph = n, this._name = t.name, this._runtimeStages = [], this._runtimeStagesByName = {}, this._runtimeNodes = [], this._dirty = !0, initialize$7(this);
+}
+Object.defineProperties(ModelArticulation.prototype, {
+ /**
+ * The internal articulation that this runtime articulation represents.
+ *
+ * @memberof ModelArticulation.prototype
+ * @type {ModelComponents.Articulation}
+ * @readonly
+ *
+ * @private
+ */
+ articulation: {
+ get: function() {
+ return this._articulation;
+ }
+ },
+ /**
+ * The scene graph that this articulation belongs to.
+ *
+ * @memberof ModelArticulation.prototype
+ * @type {ModelSceneGraph}
+ * @readonly
+ *
+ * @private
+ */
+ sceneGraph: {
+ get: function() {
+ return this._sceneGraph;
+ }
+ },
+ /**
+ * The name of this articulation.
+ *
+ * @memberof ModelArticulation.prototype
+ * @type {string}
+ * @readonly
+ *
+ * @private
+ */
+ name: {
+ get: function() {
+ return this._name;
+ }
+ },
+ /**
+ * The runtime stages that belong to this articulation.
+ *
+ * @memberof ModelArticulation.prototype
+ * @type {ModelArticulationStage[]}
+ * @readonly
+ *
+ * @private
+ */
+ runtimeStages: {
+ get: function() {
+ return this._runtimeStages;
+ }
+ },
+ /**
+ * The runtime nodes that are affected by this articulation.
+ *
+ * @memberof ModelArticulation.prototype
+ * @type {ModelRuntimeNode[]}
+ * @readonly
+ *
+ * @private
+ */
+ runtimeNodes: {
+ get: function() {
+ return this._runtimeNodes;
+ }
+ }
+});
+function initialize$7(e) {
+ const n = e.articulation.stages, i = n.length, r = e._runtimeStages, o = e._runtimeStagesByName;
+ for (let s = 0; s < i; s++) {
+ const c = n[s], l = new ModelArticulationStage({
+ stage: c,
+ runtimeArticulation: e
+ });
+ r.push(l);
+ const d = c.name;
+ o[d] = l;
+ }
+}
+ModelArticulation.prototype.setArticulationStage = function(e, t) {
+ const n = this._runtimeStagesByName[e];
+ defined(n) && (n.currentValue = t);
+};
+const scratchArticulationMatrix = new Matrix4(), scratchNodeMatrix = new Matrix4();
+ModelArticulation.prototype.apply = function() {
+ if (!this._dirty)
+ return;
+ this._dirty = !1;
+ let e = Matrix4.clone(
+ Matrix4.IDENTITY,
+ scratchArticulationMatrix
+ ), t;
+ const n = this._runtimeStages, i = n.length;
+ for (t = 0; t < i; t++)
+ e = n[t].applyStageToMatrix(e);
+ const r = this._runtimeNodes, o = r.length;
+ for (t = 0; t < o; t++) {
+ const s = r[t], c = Matrix4.multiplyTransformation(
+ s.originalTransform,
+ e,
+ scratchNodeMatrix
+ );
+ s.transform = c;
+ }
+};
+const ModelColorStageFS = `void modelColorStage(inout czm_modelMaterial material)
+{
+ material.diffuse = mix(material.diffuse, model_color.rgb, model_colorBlend);
+ float highlight = ceil(model_colorBlend);
+ material.diffuse *= mix(model_color.rgb, vec3(1.0), highlight);
+ material.alpha *= model_color.a;
+}
+`, ModelColorPipelineStage = {
+ name: "ModelColorPipelineStage",
+ // Helps with debugging
+ COLOR_UNIFORM_NAME: "model_color",
+ COLOR_BLEND_UNIFORM_NAME: "model_colorBlend"
+};
+ModelColorPipelineStage.process = function(e, t, n) {
+ const i = e.shaderBuilder;
+ i.addDefine(
+ "HAS_MODEL_COLOR",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ), i.addFragmentLines(ModelColorStageFS);
+ const r = {}, o = t.color;
+ o.alpha === 0 && !t.hasSilhouette(n) && (e.renderStateOptions.colorMask = {
+ red: !1,
+ green: !1,
+ blue: !1,
+ alpha: !1
+ }), o.alpha < 1 && (e.alphaOptions.pass = Pass$1.TRANSLUCENT), i.addUniform(
+ "vec4",
+ ModelColorPipelineStage.COLOR_UNIFORM_NAME,
+ ShaderDestination$1.FRAGMENT
+ ), r[ModelColorPipelineStage.COLOR_UNIFORM_NAME] = function() {
+ return t.color;
+ }, i.addUniform(
+ "float",
+ ModelColorPipelineStage.COLOR_BLEND_UNIFORM_NAME,
+ ShaderDestination$1.FRAGMENT
+ ), r[ModelColorPipelineStage.COLOR_BLEND_UNIFORM_NAME] = function() {
+ return ColorBlendMode$1.getColorBlend(
+ t.colorBlendMode,
+ t.colorBlendAmount
+ );
+ }, e.uniformMap = combine$2(
+ r,
+ e.uniformMap
+ );
+};
+const ModelClippingPlanesStageFS = `#ifdef USE_CLIPPING_PLANES_FLOAT_TEXTURE
+vec4 getClippingPlane(
+ highp sampler2D packedClippingPlanes,
+ int clippingPlaneNumber,
+ mat4 transform
+) {
+ int pixY = clippingPlaneNumber / CLIPPING_PLANES_TEXTURE_WIDTH;
+ int pixX = clippingPlaneNumber - (pixY * CLIPPING_PLANES_TEXTURE_WIDTH);
+ float pixelWidth = 1.0 / float(CLIPPING_PLANES_TEXTURE_WIDTH);
+ float pixelHeight = 1.0 / float(CLIPPING_PLANES_TEXTURE_HEIGHT);
+ float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel
+ float v = (float(pixY) + 0.5) * pixelHeight;
+ vec4 plane = texture(packedClippingPlanes, vec2(u, v));
+ return czm_transformPlane(plane, transform);
+}
+#else
+// Handle uint8 clipping texture instead
+vec4 getClippingPlane(
+ highp sampler2D packedClippingPlanes,
+ int clippingPlaneNumber,
+ mat4 transform
+) {
+ int clippingPlaneStartIndex = clippingPlaneNumber * 2; // clipping planes are two pixels each
+ int pixY = clippingPlaneStartIndex / CLIPPING_PLANES_TEXTURE_WIDTH;
+ int pixX = clippingPlaneStartIndex - (pixY * CLIPPING_PLANES_TEXTURE_WIDTH);
+ float pixelWidth = 1.0 / float(CLIPPING_PLANES_TEXTURE_WIDTH);
+ float pixelHeight = 1.0 / float(CLIPPING_PLANES_TEXTURE_HEIGHT);
+ float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel
+ float v = (float(pixY) + 0.5) * pixelHeight;
+ vec4 oct32 = texture(packedClippingPlanes, vec2(u, v)) * 255.0;
+ vec2 oct = vec2(oct32.x * 256.0 + oct32.y, oct32.z * 256.0 + oct32.w);
+ vec4 plane;
+ plane.xyz = czm_octDecode(oct, 65535.0);
+ plane.w = czm_unpackFloat(texture(packedClippingPlanes, vec2(u + pixelWidth, v)));
+ return czm_transformPlane(plane, transform);
+}
+#endif
+
+float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix) {
+ vec4 position = czm_windowToEyeCoordinates(fragCoord);
+ vec3 clipNormal = vec3(0.0);
+ vec3 clipPosition = vec3(0.0);
+ float pixelWidth = czm_metersPerPixel(position);
+
+ #ifdef UNION_CLIPPING_REGIONS
+ float clipAmount; // For union planes, we want to get the min distance. So we set the initial value to the first plane distance in the loop below.
+ #else
+ float clipAmount = 0.0;
+ bool clipped = true;
+ #endif
+
+ for (int i = 0; i < CLIPPING_PLANES_LENGTH; ++i) {
+ vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);
+ clipNormal = clippingPlane.xyz;
+ clipPosition = -clippingPlane.w * clipNormal;
+ float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;
+
+ #ifdef UNION_CLIPPING_REGIONS
+ clipAmount = czm_branchFreeTernary(i == 0, amount, min(amount, clipAmount));
+ if (amount <= 0.0) {
+ discard;
+ }
+ #else
+ clipAmount = max(amount, clipAmount);
+ clipped = clipped && (amount <= 0.0);
+ #endif
+ }
+
+ #ifndef UNION_CLIPPING_REGIONS
+ if (clipped) {
+ discard;
+ }
+ #endif
+
+ return clipAmount;
+}
+
+void modelClippingPlanesStage(inout vec4 color)
+{
+ float clipDistance = clip(gl_FragCoord, model_clippingPlanes, model_clippingPlanesMatrix);
+ vec4 clippingPlanesEdgeColor = vec4(1.0);
+ clippingPlanesEdgeColor.rgb = model_clippingPlanesEdgeStyle.rgb;
+ float clippingPlanesEdgeWidth = model_clippingPlanesEdgeStyle.a;
+
+ if (clipDistance > 0.0 && clipDistance < clippingPlanesEdgeWidth) {
+ color = clippingPlanesEdgeColor;
+ }
+}
+`, ModelClippingPlanesPipelineStage = {
+ name: "ModelClippingPlanesPipelineStage"
+ // Helps with debugging
+}, textureResolutionScratch$1 = new Cartesian2();
+ModelClippingPlanesPipelineStage.process = function(e, t, n) {
+ const i = t.clippingPlanes, r = n.context, o = e.shaderBuilder;
+ o.addDefine(
+ "HAS_CLIPPING_PLANES",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ), o.addDefine(
+ "CLIPPING_PLANES_LENGTH",
+ i.length,
+ ShaderDestination$1.FRAGMENT
+ ), i.unionClippingRegions && o.addDefine(
+ "UNION_CLIPPING_REGIONS",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ), ClippingPlaneCollection.useFloatTexture(r) && o.addDefine(
+ "USE_CLIPPING_PLANES_FLOAT_TEXTURE",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ );
+ const s = ClippingPlaneCollection.getTextureResolution(
+ i,
+ r,
+ textureResolutionScratch$1
+ );
+ o.addDefine(
+ "CLIPPING_PLANES_TEXTURE_WIDTH",
+ s.x,
+ ShaderDestination$1.FRAGMENT
+ ), o.addDefine(
+ "CLIPPING_PLANES_TEXTURE_HEIGHT",
+ s.y,
+ ShaderDestination$1.FRAGMENT
+ ), o.addUniform(
+ "sampler2D",
+ "model_clippingPlanes",
+ ShaderDestination$1.FRAGMENT
+ ), o.addUniform(
+ "vec4",
+ "model_clippingPlanesEdgeStyle",
+ ShaderDestination$1.FRAGMENT
+ ), o.addUniform(
+ "mat4",
+ "model_clippingPlanesMatrix",
+ ShaderDestination$1.FRAGMENT
+ ), o.addFragmentLines(ModelClippingPlanesStageFS);
+ const c = {
+ model_clippingPlanes: function() {
+ return i.texture;
+ },
+ model_clippingPlanesEdgeStyle: function() {
+ const l = Color.clone(i.edgeColor);
+ return l.alpha = i.edgeWidth, l;
+ },
+ model_clippingPlanesMatrix: function() {
+ return t._clippingPlanesMatrix;
+ }
+ };
+ e.uniformMap = combine$2(c, e.uniformMap);
+};
+const ModelClippingPolygonsStageVS = `void modelClippingPolygonsStage(ProcessedAttributes attributes)
+{
+ vec2 sphericalLatLong = czm_approximateSphericalCoordinates(v_positionWC);
+ sphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);
+
+ vec2 minDistance = vec2(czm_infinity);
+ v_regionIndex = -1;
+ v_clippingPosition = vec2(czm_infinity);
+
+ for (int regionIndex = 0; regionIndex < CLIPPING_POLYGON_REGIONS_LENGTH; regionIndex++) {
+ vec4 extents = czm_unpackClippingExtents(model_clippingExtents, regionIndex);
+ vec2 rectUv = (sphericalLatLong.yx - extents.yx) * extents.wz;
+
+ vec2 clamped = clamp(rectUv, vec2(0.0), vec2(1.0));
+ vec2 distance = abs(rectUv - clamped) * extents.wz;
+
+ if (minDistance.x > distance.x || minDistance.y > distance.y) {
+ minDistance = distance;
+ v_clippingPosition = rectUv;
+ }
+
+ float threshold = 0.01;
+ if (rectUv.x > threshold && rectUv.y > threshold && rectUv.x < 1.0 - threshold && rectUv.y < 1.0 - threshold) {
+ v_regionIndex = regionIndex;
+ }
+ }
+}
+`, ModelClippingPolygonsStageFS = `void modelClippingPolygonsStage()
+{
+ vec2 clippingPosition = v_clippingPosition;
+ int regionIndex = v_regionIndex;
+ czm_clipPolygons(model_clippingDistance, CLIPPING_POLYGON_REGIONS_LENGTH, clippingPosition, regionIndex);
+}
+`, ModelClippingPolygonsPipelineStage = {
+ name: "ModelClippingPolygonsPipelineStage"
+ // Helps with debugging
+};
+ModelClippingPolygonsPipelineStage.process = function(e, t, n) {
+ const i = t.clippingPolygons, r = e.shaderBuilder;
+ r.addDefine(
+ "ENABLE_CLIPPING_POLYGONS",
+ void 0,
+ ShaderDestination$1.BOTH
+ ), i.inverse && r.addDefine(
+ "CLIPPING_INVERSE",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ), r.addDefine(
+ "CLIPPING_POLYGON_REGIONS_LENGTH",
+ i.extentsCount,
+ ShaderDestination$1.BOTH
+ ), r.addUniform(
+ "sampler2D",
+ "model_clippingDistance",
+ ShaderDestination$1.FRAGMENT
+ ), r.addUniform(
+ "sampler2D",
+ "model_clippingExtents",
+ ShaderDestination$1.VERTEX
+ ), r.addVarying("vec2", "v_clippingPosition"), r.addVarying("int", "v_regionIndex", "flat"), r.addVertexLines(ModelClippingPolygonsStageVS), r.addFragmentLines(ModelClippingPolygonsStageFS);
+ const o = {
+ model_clippingDistance: function() {
+ return i.clippingTexture;
+ },
+ model_clippingExtents: function() {
+ return i.extentsTexture;
+ }
+ };
+ e.uniformMap = combine$2(o, e.uniformMap);
+};
+function ModelNode(e, t) {
+ this._model = e, this._runtimeNode = t;
+}
+Object.defineProperties(ModelNode.prototype, {
+ /**
+ * The value of the name property of this node.
+ *
+ * @memberof ModelNode.prototype
+ *
+ * @type {string}
+ * @readonly
+ */
+ name: {
+ get: function() {
+ return this._runtimeNode._name;
+ }
+ },
+ /**
+ * The index of the node in the glTF.
+ *
+ * @memberof ModelNode.prototype
+ *
+ * @type {number}
+ * @readonly
+ */
+ id: {
+ get: function() {
+ return this._runtimeNode._id;
+ }
+ },
+ /**
+ * Determines if this node and its children will be shown.
+ *
+ * @memberof ModelNode.prototype
+ * @type {boolean}
+ *
+ * @default true
+ */
+ show: {
+ get: function() {
+ return this._runtimeNode.show;
+ },
+ set: function(e) {
+ this._runtimeNode.show = e;
+ }
+ },
+ /**
+ * The node's 4x4 matrix transform from its local coordinates to
+ * its parent's. Setting the matrix to undefined will restore the
+ * node's original transform, and allow the node to be animated by
+ * any animations in the model again.
+ * + * For changes to take effect, this property must be assigned to; + * setting individual elements of the matrix will not work. + *
+ * + * @memberof ModelNode.prototype + * @type {Matrix4} + */ + matrix: { + get: function() { + return this._runtimeNode.transform; + }, + set: function(e) { + defined(e) ? (this._runtimeNode.transform = e, this._runtimeNode.userAnimated = !0, this._model._userAnimationDirty = !0) : (this._runtimeNode.transform = this.originalMatrix, this._runtimeNode.userAnimated = !1); + } + }, + /** + * Gets the node's original 4x4 matrix transform from its local + * coordinates to its parent's, without any node transformations + * or articulations applied. + * + * @memberof ModelNode.prototype + * @type {Matrix4} + */ + originalMatrix: { + get: function() { + return this._runtimeNode.originalTransform; + } + } +}); +const InstancingStageCommon = `mat4 getInstancingTransform() +{ + mat4 instancingTransform; + + #ifdef HAS_INSTANCE_MATRICES + instancingTransform = mat4( + a_instancingTransformRow0.x, a_instancingTransformRow1.x, a_instancingTransformRow2.x, 0.0, // Column 1 + a_instancingTransformRow0.y, a_instancingTransformRow1.y, a_instancingTransformRow2.y, 0.0, // Column 2 + a_instancingTransformRow0.z, a_instancingTransformRow1.z, a_instancingTransformRow2.z, 0.0, // Column 3 + a_instancingTransformRow0.w, a_instancingTransformRow1.w, a_instancingTransformRow2.w, 1.0 // Column 4 + ); + #else + vec3 translation = vec3(0.0, 0.0, 0.0); + vec3 scale = vec3(1.0, 1.0, 1.0); + + #ifdef HAS_INSTANCE_TRANSLATION + translation = a_instanceTranslation; + #endif + #ifdef HAS_INSTANCE_SCALE + scale = a_instanceScale; + #endif + + instancingTransform = mat4( + scale.x, 0.0, 0.0, 0.0, + 0.0, scale.y, 0.0, 0.0, + 0.0, 0.0, scale.z, 0.0, + translation.x, translation.y, translation.z, 1.0 + ); + #endif + + return instancingTransform; +} + +#ifdef USE_2D_INSTANCING +mat4 getInstancingTransform2D() +{ + mat4 instancingTransform2D; + + #ifdef HAS_INSTANCE_MATRICES + instancingTransform2D = mat4( + a_instancingTransform2DRow0.x, a_instancingTransform2DRow1.x, a_instancingTransform2DRow2.x, 0.0, // Column 1 + a_instancingTransform2DRow0.y, a_instancingTransform2DRow1.y, a_instancingTransform2DRow2.y, 0.0, // Column 2 + a_instancingTransform2DRow0.z, a_instancingTransform2DRow1.z, a_instancingTransform2DRow2.z, 0.0, // Column 3 + a_instancingTransform2DRow0.w, a_instancingTransform2DRow1.w, a_instancingTransform2DRow2.w, 1.0 // Column 4 + ); + #else + vec3 translation2D = vec3(0.0, 0.0, 0.0); + vec3 scale = vec3(1.0, 1.0, 1.0); + + #ifdef HAS_INSTANCE_TRANSLATION + translation2D = a_instanceTranslation2D; + #endif + #ifdef HAS_INSTANCE_SCALE + scale = a_instanceScale; + #endif + + instancingTransform2D = mat4( + scale.x, 0.0, 0.0, 0.0, + 0.0, scale.y, 0.0, 0.0, + 0.0, 0.0, scale.z, 0.0, + translation2D.x, translation2D.y, translation2D.z, 1.0 + ); + #endif + + return instancingTransform2D; +} +#endif +`, InstancingStageVS = `void instancingStage(inout ProcessedAttributes attributes) +{ + vec3 positionMC = attributes.positionMC; + + mat4 instancingTransform = getInstancingTransform(); + + attributes.positionMC = (instancingTransform * vec4(positionMC, 1.0)).xyz; + + #ifdef HAS_NORMALS + vec3 normalMC = attributes.normalMC; + attributes.normalMC = (instancingTransform * vec4(normalMC, 0.0)).xyz; + #endif + + #ifdef USE_2D_INSTANCING + mat4 instancingTransform2D = getInstancingTransform2D(); + attributes.position2D = (instancingTransform2D * vec4(positionMC, 1.0)).xyz; + #endif +} +`, LegacyInstancingStageVS = `void legacyInstancingStage( + inout ProcessedAttributes attributes, + out mat4 instanceModelView, + out mat3 instanceModelViewInverseTranspose) +{ + vec3 positionMC = attributes.positionMC; + + mat4 instancingTransform = getInstancingTransform(); + + mat4 instanceModel = instancingTransform * u_instance_nodeTransform; + instanceModelView = u_instance_modifiedModelView; + instanceModelViewInverseTranspose = mat3(u_instance_modifiedModelView * instanceModel); + + attributes.positionMC = (instanceModel * vec4(positionMC, 1.0)).xyz; + + #ifdef USE_2D_INSTANCING + mat4 instancingTransform2D = getInstancingTransform2D(); + attributes.position2D = (instancingTransform2D * vec4(positionMC, 1.0)).xyz; + #endif +} +`, modelViewScratch = new Matrix4(), nodeTransformScratch = new Matrix4(), modelView2DScratch = new Matrix4(), InstancingPipelineStage = { + name: "InstancingPipelineStage", + // Helps with debugging + // Expose some methods for testing + _getInstanceTransformsAsMatrices: getInstanceTransformsAsMatrices, + _transformsToTypedArray: transformsToTypedArray +}; +InstancingPipelineStage.process = function(e, t, n) { + const i = t.instances, r = i.attributes[0].count, o = e.shaderBuilder; + o.addDefine("HAS_INSTANCING"), o.addVertexLines(InstancingStageCommon); + const s = e.model, c = s.sceneGraph, l = e.runtimeNode, d = n.mode !== SceneMode$1.SCENE3D && !n.scene3DOnly && s._projectTo2D, f = s._enablePick && !n.context.webgl2, h = []; + processTransformAttributes( + e, + n, + i, + h, + d, + f + ), processFeatureIdAttributes( + e, + n, + i, + h + ); + const p = {}; + if (i.transformInWorldSpace ? (o.addDefine( + "USE_LEGACY_INSTANCING", + void 0, + ShaderDestination$1.VERTEX + ), o.addUniform( + "mat4", + "u_instance_modifiedModelView", + ShaderDestination$1.VERTEX + ), o.addUniform( + "mat4", + "u_instance_nodeTransform", + ShaderDestination$1.VERTEX + ), p.u_instance_modifiedModelView = function() { + let m = Matrix4.multiplyTransformation( + // For 3D Tiles, model.modelMatrix is the computed tile + // transform (which includes tileset.modelMatrix). This always applies + // for i3dm, since such models are always part of a tileset. + s.modelMatrix, + // For i3dm models, components.transform contains the RTC_CENTER + // translation. + c.components.transform, + modelViewScratch + ); + return d ? Matrix4.multiplyTransformation( + n.context.uniformState.view3D, + m, + modelViewScratch + ) : (n.mode !== SceneMode$1.SCENE3D && (m = Transforms.basisTo2D( + n.mapProjection, + m, + modelViewScratch + )), Matrix4.multiplyTransformation( + n.context.uniformState.view, + m, + modelViewScratch + )); + }, p.u_instance_nodeTransform = function() { + return Matrix4.multiplyTransformation( + // glTF y-up to 3D Tiles z-up + c.axisCorrectionMatrix, + // This transforms from the node's coordinate system to the root + // of the node hierarchy + l.computedTransform, + nodeTransformScratch + ); + }, o.addVertexLines(LegacyInstancingStageVS)) : o.addVertexLines(InstancingStageVS), d) { + o.addDefine( + "USE_2D_INSTANCING", + void 0, + ShaderDestination$1.VERTEX + ), o.addUniform("mat4", "u_modelView2D", ShaderDestination$1.VERTEX); + const m = n.context, _ = Matrix4.fromTranslation( + l.instancingReferencePoint2D, + new Matrix4() + ); + p.u_modelView2D = function() { + return Matrix4.multiplyTransformation( + m.uniformState.view, + _, + modelView2DScratch + ); + }; + } + e.uniformMap = combine$2(p, e.uniformMap), e.instanceCount = r, e.attributes.push.apply( + e.attributes, + h + ); +}; +const projectedTransformScratch = new Matrix4(), projectedPositionScratch = new Cartesian3(); +function projectTransformTo2D(e, t, n, i, r) { + let o = Matrix4.multiplyTransformation( + t, + e, + projectedTransformScratch + ); + return o = Matrix4.multiplyTransformation( + o, + n, + projectedTransformScratch + ), r = Transforms.basisTo2D( + i.mapProjection, + o, + r + ), r; +} +function projectPositionTo2D(e, t, n, i, r) { + const o = Matrix4.fromTranslation( + e, + projectedTransformScratch + ); + let s = Matrix4.multiplyTransformation( + t, + o, + projectedTransformScratch + ); + s = Matrix4.multiplyTransformation( + s, + n, + projectedTransformScratch + ); + const c = Matrix4.getTranslation( + s, + projectedPositionScratch + ); + return r = SceneTransforms.computeActualEllipsoidPosition( + i, + c, + r + ), r; +} +function getModelMatrixAndNodeTransform(e, t, n) { + const i = e.model, r = i.sceneGraph; + e.runtimeNode.node.instances.transformInWorldSpace ? (t = Matrix4.multiplyTransformation( + i.modelMatrix, + r.components.transform, + t + ), n = Matrix4.multiplyTransformation( + r.axisCorrectionMatrix, + e.runtimeNode.computedTransform, + n + )) : (t = Matrix4.clone(r.computedModelMatrix, t), t = Matrix4.multiplyTransformation( + t, + e.runtimeNode.computedTransform, + t + ), n = Matrix4.clone( + Matrix4.IDENTITY, + n + )); +} +const modelMatrixScratch$2 = new Matrix4(), nodeComputedTransformScratch = new Matrix4(), transformScratch = new Matrix4(), positionScratch$9 = new Cartesian3(); +function projectTransformsTo2D(e, t, n, i) { + const r = modelMatrixScratch$2, o = nodeComputedTransformScratch; + getModelMatrixAndNodeTransform( + t, + r, + o + ); + const c = t.runtimeNode.instancingReferencePoint2D, l = e.length; + for (let d = 0; d < l; d++) { + const f = e[d], h = projectTransformTo2D( + f, + r, + o, + n, + transformScratch + ), p = Matrix4.getTranslation( + h, + positionScratch$9 + ), m = Cartesian3.subtract( + p, + c, + p + ); + i[d] = Matrix4.setTranslation( + h, + m, + i[d] + ); + } + return i; +} +function projectTranslationsTo2D(e, t, n, i) { + const r = modelMatrixScratch$2, o = nodeComputedTransformScratch; + getModelMatrixAndNodeTransform( + t, + r, + o + ); + const c = t.runtimeNode.instancingReferencePoint2D, l = e.length; + for (let d = 0; d < l; d++) { + const f = e[d], h = projectPositionTo2D( + f, + r, + o, + n, + f + ); + i[d] = Cartesian3.subtract( + h, + c, + i[d] + ); + } + return i; +} +const scratchProjectedMin$1 = new Cartesian3(), scratchProjectedMax$1 = new Cartesian3(); +function computeReferencePoint2D(e, t) { + const n = e.runtimeNode, i = e.model.sceneGraph.computedModelMatrix, r = Matrix4.multiplyByPoint( + i, + n.instancingTranslationMin, + scratchProjectedMin$1 + ), o = SceneTransforms.computeActualEllipsoidPosition( + t, + r, + r + ), s = Matrix4.multiplyByPoint( + i, + n.instancingTranslationMax, + scratchProjectedMax$1 + ), c = SceneTransforms.computeActualEllipsoidPosition( + t, + s, + s + ); + n.instancingReferencePoint2D = Cartesian3.lerp( + o, + c, + 0.5, + new Cartesian3() + ); +} +function transformsToTypedArray(e) { + const n = e.length, i = new Float32Array(n * 12); + for (let r = 0; r < n; r++) { + const o = e[r], s = 12 * r; + i[s + 0] = o[0], i[s + 1] = o[4], i[s + 2] = o[8], i[s + 3] = o[12], i[s + 4] = o[1], i[s + 5] = o[5], i[s + 6] = o[9], i[s + 7] = o[13], i[s + 8] = o[2], i[s + 9] = o[6], i[s + 10] = o[10], i[s + 11] = o[14]; + } + return i; +} +function translationsToTypedArray(e) { + const n = e.length, i = new Float32Array(n * 3); + for (let r = 0; r < n; r++) { + const o = e[r], s = 3 * r; + i[s + 0] = o[0], i[s + 1] = o[4], i[s + 2] = o[8]; + } + return i; +} +function getInstanceTransformsAsMatrices(e, t, n) { + const i = new Array(t), r = ModelUtility.getAttributeBySemantic( + e, + InstanceAttributeSemantic$1.TRANSLATION + ), o = ModelUtility.getAttributeBySemantic( + e, + InstanceAttributeSemantic$1.ROTATION + ), s = ModelUtility.getAttributeBySemantic( + e, + InstanceAttributeSemantic$1.SCALE + ), c = new Cartesian3( + -Number.MAX_VALUE, + -Number.MAX_VALUE, + -Number.MAX_VALUE + ), l = new Cartesian3( + Number.MAX_VALUE, + Number.MAX_VALUE, + Number.MAX_VALUE + ), d = defined(r), f = defined(o), h = defined(s), p = d ? r.typedArray : new Float32Array(t * 3); + let m = f ? o.typedArray : new Float32Array(t * 4); + f && o.normalized && (m = AttributeCompression.dequantize( + m, + o.componentDatatype, + o.type, + t + )); + let _; + h ? _ = s.typedArray : (_ = new Float32Array(t * 3), _.fill(1)); + for (let C = 0; C < t; C++) { + const T = new Cartesian3( + p[C * 3], + p[C * 3 + 1], + p[C * 3 + 2] + ); + Cartesian3.maximumByComponent( + c, + T, + c + ), Cartesian3.minimumByComponent( + l, + T, + l + ); + const x = new Quaternion( + m[C * 4], + m[C * 4 + 1], + m[C * 4 + 2], + f ? m[C * 4 + 3] : 1 + ), b = new Cartesian3( + _[C * 3], + _[C * 3 + 1], + _[C * 3 + 2] + ), S = Matrix4.fromTranslationQuaternionRotationScale( + T, + x, + b, + new Matrix4() + ); + i[C] = S; + } + const y = n.runtimeNode; + return y.instancingTranslationMin = l, y.instancingTranslationMax = c, d && (r.typedArray = void 0), f && (o.typedArray = void 0), h && (s.typedArray = void 0), i; +} +function getInstanceTranslationsAsCartesian3s(e, t, n) { + const i = new Array(t), r = e.typedArray, o = new Cartesian3( + Number.MAX_VALUE, + Number.MAX_VALUE, + Number.MAX_VALUE + ), s = new Cartesian3( + -Number.MAX_VALUE, + -Number.MAX_VALUE, + -Number.MAX_VALUE + ); + for (let l = 0; l < t; l++) { + const d = new Cartesian3( + r[l * 3], + r[l * 3 + 1], + r[l * 3 + 2] + ); + i[l] = d, Cartesian3.minimumByComponent( + o, + d, + o + ), Cartesian3.maximumByComponent( + s, + d, + s + ); + } + const c = n.runtimeNode; + return c.instancingTranslationMin = o, c.instancingTranslationMax = s, e.typedArray = void 0, i; +} +function createVertexBuffer(e, t) { + const n = Buffer.createVertexBuffer({ + context: t.context, + typedArray: e, + usage: BufferUsage$1.STATIC_DRAW + }); + return n.vertexArrayDestroyable = !1, n; +} +function processTransformAttributes(e, t, n, i, r, o) { + const s = ModelUtility.getAttributeBySemantic( + n, + InstanceAttributeSemantic$1.ROTATION + ); + defined(s) ? processTransformMatrixAttributes( + e, + n, + i, + t, + r, + o + ) : processTransformVec3Attributes( + e, + n, + i, + t, + r + ); +} +function processTransformMatrixAttributes(e, t, n, i, r, o) { + const s = e.shaderBuilder, c = t.attributes[0].count, l = e.model, d = e.runtimeNode; + s.addDefine("HAS_INSTANCE_MATRICES"); + const f = "Transform"; + let h, p = d.instancingTransformsBuffer; + if (!defined(p)) { + h = getInstanceTransformsAsMatrices( + t, + c, + e + ); + const C = transformsToTypedArray(h); + p = createVertexBuffer(C, i), l._modelResources.push(p), o && (d.transformsTypedArray = C), d.instancingTransformsBuffer = p; + } + if (processMatrixAttributes( + e, + p, + n, + f + ), !r) + return; + const m = clone$1(i); + m.mode = SceneMode$1.COLUMBUS_VIEW, computeReferencePoint2D(e, m); + let _ = d.instancingTransformsBuffer2D; + if (!defined(_)) { + const C = projectTransformsTo2D( + h, + e, + m, + h + ), T = transformsToTypedArray(C); + _ = createVertexBuffer(T, i), l._modelResources.push(_), d.instancingTransformsBuffer2D = _; + } + processMatrixAttributes( + e, + _, + n, + "Transform2D" + ); +} +function processTransformVec3Attributes(e, t, n, i, r, o) { + const s = e.shaderBuilder, c = e.runtimeNode, l = ModelUtility.getAttributeBySemantic( + t, + InstanceAttributeSemantic$1.TRANSLATION + ), d = ModelUtility.getAttributeBySemantic( + t, + InstanceAttributeSemantic$1.SCALE + ); + if (defined(d) && (s.addDefine("HAS_INSTANCE_SCALE"), processVec3Attribute( + e, + d.buffer, + d.byteOffset, + d.byteStride, + n, + "Scale" + )), !defined(l)) + return; + let f; + const h = l.typedArray; + if (defined(h) ? f = getInstanceTranslationsAsCartesian3s( + l, + l.count, + e + ) : defined(c.instancingTranslationMin) || (c.instancingTranslationMin = l.min, c.instancingTranslationMax = l.max), s.addDefine("HAS_INSTANCE_TRANSLATION"), processVec3Attribute( + e, + l.buffer, + l.byteOffset, + l.byteStride, + n, + "Translation" + ), !r && !o) + return; + const m = clone$1(i); + m.mode = SceneMode$1.COLUMBUS_VIEW, computeReferencePoint2D(e, m); + let _ = c.instancingTranslationBuffer2D; + if (!defined(_)) { + const x = projectTranslationsTo2D( + f, + e, + m, + f + ), b = translationsToTypedArray(x); + _ = createVertexBuffer(b, i), e.model._modelResources.push(_), c.instancingTranslationBuffer2D = _; + } + if (!r) + return; + processVec3Attribute( + e, + _, + 0, + void 0, + n, + "Translation2D" + ); +} +function processMatrixAttributes(e, t, n, i) { + const o = ComponentDatatype$1.getSizeInBytes( + ComponentDatatype$1.FLOAT + ), s = o * 12, c = [ + { + index: e.attributeIndex++, + vertexBuffer: t, + componentsPerAttribute: 4, + componentDatatype: ComponentDatatype$1.FLOAT, + normalize: !1, + offsetInBytes: 0, + strideInBytes: s, + instanceDivisor: 1 + }, + { + index: e.attributeIndex++, + vertexBuffer: t, + componentsPerAttribute: 4, + componentDatatype: ComponentDatatype$1.FLOAT, + normalize: !1, + offsetInBytes: o * 4, + strideInBytes: s, + instanceDivisor: 1 + }, + { + index: e.attributeIndex++, + vertexBuffer: t, + componentsPerAttribute: 4, + componentDatatype: ComponentDatatype$1.FLOAT, + normalize: !1, + offsetInBytes: o * 8, + strideInBytes: s, + instanceDivisor: 1 + } + ], l = e.shaderBuilder; + l.addAttribute("vec4", `a_instancing${i}Row0`), l.addAttribute("vec4", `a_instancing${i}Row1`), l.addAttribute("vec4", `a_instancing${i}Row2`), n.push.apply( + n, + c + ); +} +function processVec3Attribute(e, t, n, i, r, o) { + r.push({ + index: e.attributeIndex++, + vertexBuffer: t, + componentsPerAttribute: 3, + componentDatatype: ComponentDatatype$1.FLOAT, + normalize: !1, + offsetInBytes: n, + strideInBytes: i, + instanceDivisor: 1 + }), e.shaderBuilder.addAttribute("vec3", `a_instance${o}`); +} +function processFeatureIdAttributes(e, t, n, i) { + const r = n.attributes, o = e.shaderBuilder; + for (let s = 0; s < r.length; s++) { + const c = r[s]; + c.semantic === InstanceAttributeSemantic$1.FEATURE_ID && (c.setIndex >= e.featureIdVertexAttributeSetIndex && (e.featureIdVertexAttributeSetIndex = c.setIndex + 1), i.push({ + index: e.attributeIndex++, + vertexBuffer: c.buffer, + componentsPerAttribute: AttributeType$1.getNumberOfComponents( + c.type + ), + componentDatatype: c.componentDatatype, + normalize: !1, + offsetInBytes: c.byteOffset, + strideInBytes: c.byteStride, + instanceDivisor: 1 + }), o.addAttribute( + "float", + `a_instanceFeatureId_${c.setIndex}` + )); + } +} +const ModelMatrixUpdateStage = {}; +ModelMatrixUpdateStage.name = "ModelMatrixUpdateStage"; +ModelMatrixUpdateStage.update = function(e, t, n) { + const i = n.mode !== SceneMode$1.SCENE3D; + if (!(i && t._model._projectTo2D) && e._transformDirty) { + const r = i ? t._computedModelMatrix2D : t._computedModelMatrix; + updateRuntimeNode( + e, + t, + r, + e.transformToRoot + ), e._transformDirty = !1; + } +}; +function updateRuntimeNode(e, t, n, i) { + let r; + i = Matrix4.multiplyTransformation( + i, + e.transform, + new Matrix4() + ), e.updateComputedTransform(); + const o = e.runtimePrimitives.length; + for (r = 0; r < o; r++) { + const l = e.runtimePrimitives[r].drawCommand; + l.modelMatrix = Matrix4.multiplyTransformation( + n, + i, + l.modelMatrix + ), l.cullFace = ModelUtility.getCullFace( + l.modelMatrix, + l.primitiveType + ); + } + const s = e.children.length; + for (r = 0; r < s; r++) { + const c = t._runtimeNodes[e.children[r]]; + c._transformToRoot = Matrix4.clone( + i, + c._transformToRoot + ), updateRuntimeNode( + c, + t, + n, + i + ), c._transformDirty = !1; + } +} +const NodeStatisticsPipelineStage = { + name: "NodeStatisticsPipelineStage", + // Helps with debugging + // Expose some methods for testing + _countInstancingAttributes: countInstancingAttributes, + _countGeneratedBuffers: countGeneratedBuffers +}; +NodeStatisticsPipelineStage.process = function(e, t, n) { + const i = e.model.statistics, r = t.instances, o = e.runtimeNode; + countInstancingAttributes(i, r), countGeneratedBuffers(i, o); +}; +function countInstancingAttributes(e, t) { + if (!defined(t)) + return; + const n = t.attributes, i = n.length; + for (let r = 0; r < i; r++) { + const o = n[r]; + defined(o.buffer) && e.addBuffer(o.buffer, !1); + } +} +function countGeneratedBuffers(e, t) { + defined(t.instancingTransformsBuffer) && e.addBuffer(t.instancingTransformsBuffer, !1), defined(t.instancingTransformsBuffer2D) && e.addBuffer(t.instancingTransformsBuffer2D, !1), defined(t.instancingTranslationBuffer2D) && e.addBuffer(t.instancingTranslationBuffer2D, !1); +} +function ModelRuntimeNode(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.node, n = e.transform, i = e.transformToRoot, r = e.sceneGraph, o = e.children; + this._node = t, this._name = t.name, this._id = t.index, this._sceneGraph = r, this._children = o, this._originalTransform = Matrix4.clone(n, this._originalTransform), this._transform = Matrix4.clone(n, this._transform), this._transformToRoot = Matrix4.clone(i, this._transformToRoot), this._computedTransform = new Matrix4(), this._transformDirty = !1, this._transformParameters = void 0, this._morphWeights = [], this._runtimeSkin = void 0, this._computedJointMatrices = [], this.show = !0, this.userAnimated = !1, this.pipelineStages = [], this.runtimePrimitives = [], this.updateStages = [], this.instancingTranslationMin = void 0, this.instancingTranslationMax = void 0, this.instancingTransformsBuffer = void 0, this.instancingTransformsBuffer2D = void 0, this.instancingTranslationBuffer2D = void 0, this.instancingReferencePoint2D = void 0, initialize$6(this); +} +Object.defineProperties(ModelRuntimeNode.prototype, { + /** + * The internal node this runtime node represents. + * + * @memberof ModelRuntimeNode.prototype + * @type {ModelComponents.Node} + * @readonly + * + * @private + */ + node: { + get: function() { + return this._node; + } + }, + /** + * The scene graph this node belongs to. + * + * @memberof ModelRuntimeNode.prototype + * @type {ModelSceneGraph} + * @readonly + * + * @private + */ + sceneGraph: { + get: function() { + return this._sceneGraph; + } + }, + /** + * The indices of the children of this node in the scene graph. + * + * @memberof ModelRuntimeNode.prototype + * @type {number[]} + * @readonly + * + * @private + */ + children: { + get: function() { + return this._children; + } + }, + /** + * The node's local space transform. This can be changed externally via + * the corresponding {@link ModelNode}, such that animation can be + * driven by another source, not just an animation in the model's asset. + * + * @memberof ModelRuntimeNode.prototype + * @type {Matrix4} + * + * @private + */ + transform: { + get: function() { + return this._transform; + }, + set: function(e) { + this._transformDirty = !0, this._transform = Matrix4.clone(e, this._transform); + } + }, + /** + * The transforms of all the node's ancestors, not including this node's + * transform. + * + * @see ModelRuntimeNode#computedTransform + * + * @memberof ModelRuntimeNode.prototype + * @type {Matrix4} + * @readonly + * + * @private + */ + transformToRoot: { + get: function() { + return this._transformToRoot; + } + }, + /** + * A transform from the node's local space to the model's scene graph space. + * This is the product of transformToRoot * transform. + * + * @memberof ModelRuntimeNode.prototype + * @type {Matrix4} + * @readonly + * + * @private + */ + computedTransform: { + get: function() { + return this._computedTransform; + } + }, + /** + * The node's original transform, as specified in the model. + * Does not include transformations from the node's ancestors. + * + * @memberof ModelRuntimeNode.prototype + * @type {Matrix4} + * @readonly + * + * @private + */ + originalTransform: { + get: function() { + return this._originalTransform; + } + }, + /** + * The node's local space translation. This is used internally to allow + * animations in the model's asset to affect the node's properties. + * + * If the node's transformation was originally described using a matrix + * in the model, then this will return undefined. + * + * @memberof ModelRuntimeNode.prototype + * @type {Cartesian3} + * + * @exception {DeveloperError} The translation of a node cannot be set if it was defined using a matrix in the model's asset. + * + * @private + */ + translation: { + get: function() { + return defined(this._transformParameters) ? this._transformParameters.translation : void 0; + }, + set: function(e) { + const t = this._transformParameters, n = t.translation; + Cartesian3.equals(n, e) || (t.translation = Cartesian3.clone( + e, + t.translation + ), updateTransformFromParameters(this, t)); + } + }, + /** + * The node's local space rotation. This is used internally to allow + * animations in the model's asset to affect the node's properties. + * + * If the node's transformation was originally described using a matrix + * in the model, then this will return undefined. + * + * @memberof ModelRuntimeNode.prototype + * @type {Quaternion} + * + * @exception {DeveloperError} The rotation of a node cannot be set if it was defined using a matrix in the model's asset. + * + * @private + */ + rotation: { + get: function() { + return defined(this._transformParameters) ? this._transformParameters.rotation : void 0; + }, + set: function(e) { + const t = this._transformParameters, n = t.rotation; + Quaternion.equals(n, e) || (t.rotation = Quaternion.clone( + e, + t.rotation + ), updateTransformFromParameters(this, t)); + } + }, + /** + * The node's local space scale. This is used internally to allow + * animations in the model's asset to affect the node's properties. + * + * If the node's transformation was originally described using a matrix + * in the model, then this will return undefined. + * + * @memberof ModelRuntimeNode.prototype + * @type {Cartesian3} + * + * @exception {DeveloperError} The scale of a node cannot be set if it was defined using a matrix in the model's asset. + * @private + */ + scale: { + get: function() { + return defined(this._transformParameters) ? this._transformParameters.scale : void 0; + }, + set: function(e) { + const t = this._transformParameters, n = t.scale; + Cartesian3.equals(n, e) || (t.scale = Cartesian3.clone( + e, + t.scale + ), updateTransformFromParameters(this, t)); + } + }, + /** + * The node's morph weights. This is used internally to allow animations + * in the model's asset to affect the node's properties. + * + * @memberof ModelRuntimeNode.prototype + * @type {number[]} + * + * @private + */ + morphWeights: { + get: function() { + return this._morphWeights; + }, + set: function(e) { + const t = e.length; + for (let n = 0; n < t; n++) + this._morphWeights[n] = e[n]; + } + }, + /** + * The skin applied to this node, if it exists. + * + * @memberof ModelRuntimeNode.prototype + * @type {ModelSkin} + * @readonly + * + * @private + */ + runtimeSkin: { + get: function() { + return this._runtimeSkin; + } + }, + /** + * The computed joint matrices of this node, derived from its skin. + * + * @memberof ModelRuntimeNode.prototype + * @type {Matrix4[]} + * @readonly + * + * @private + */ + computedJointMatrices: { + get: function() { + return this._computedJointMatrices; + } + } +}); +function initialize$6(e) { + const t = e.transform, n = e.transformToRoot, i = e._computedTransform; + e._computedTransform = Matrix4.multiply( + n, + t, + i + ); + const r = e.node; + defined(r.matrix) || (e._transformParameters = new TranslationRotationScale( + r.translation, + r.rotation, + r.scale + )), defined(r.morphWeights) && (e._morphWeights = r.morphWeights.slice()); + const o = r.articulationName; + if (defined(o)) { + const l = e.sceneGraph._runtimeArticulations[o]; + defined(l) && l.runtimeNodes.push(e); + } +} +function updateTransformFromParameters(e, t) { + e._transformDirty = !0, e._transform = Matrix4.fromTranslationRotationScale( + t, + e._transform + ); +} +ModelRuntimeNode.prototype.getChild = function(e) { + return this.sceneGraph._runtimeNodes[this.children[e]]; +}; +ModelRuntimeNode.prototype.configurePipeline = function() { + const e = this.node, t = this.pipelineStages; + t.length = 0; + const n = this.updateStages; + n.length = 0, defined(e.instances) && t.push(InstancingPipelineStage), t.push(NodeStatisticsPipelineStage), n.push(ModelMatrixUpdateStage); +}; +ModelRuntimeNode.prototype.updateComputedTransform = function() { + this._computedTransform = Matrix4.multiply( + this._transformToRoot, + this._transform, + this._computedTransform + ); +}; +ModelRuntimeNode.prototype.updateJointMatrices = function() { + const e = this._runtimeSkin; + if (!defined(e)) + return; + e.updateJointMatrices(); + const t = this._computedJointMatrices, n = e.jointMatrices, i = n.length; + for (let r = 0; r < i; r++) { + defined(t[r]) || (t[r] = new Matrix4()); + const o = Matrix4.multiplyTransformation( + this.transformToRoot, + this.transform, + t[r] + ), s = Matrix4.inverseTransformation( + o, + t[r] + ); + t[r] = Matrix4.multiplyTransformation( + s, + n[r], + t[r] + ); + } +}; +const AlphaPipelineStage = { + name: "AlphaPipelineStage" + // Helps with debugging +}; +AlphaPipelineStage.process = function(e, t, n) { + const i = e.alphaOptions, r = e.model; + i.pass = defaultValue(i.pass, r.opaquePass); + const o = e.renderStateOptions; + i.pass === Pass$1.TRANSLUCENT && (o.cull.enabled = !1, o.depthMask = !1, o.blending = BlendingState$1.ALPHA_BLEND); + const s = e.shaderBuilder, c = e.uniformMap; + defined(i.alphaCutoff) && (s.addDefine( + "ALPHA_MODE_MASK", + void 0, + ShaderDestination$1.FRAGMENT + ), s.addUniform( + "float", + "u_alphaCutoff", + ShaderDestination$1.FRAGMENT + ), c.u_alphaCutoff = function() { + return i.alphaCutoff; + }); +}; +const BatchTexturePipelineStage = { + name: "BatchTexturePipelineStage" + // Helps with debugging +}; +BatchTexturePipelineStage.process = function(e, t, n) { + const i = e.shaderBuilder, r = {}, o = e.model, s = o.featureTables[o.featureTableId], c = s.featuresLength; + i.addUniform("int", "model_featuresLength"), r.model_featuresLength = function() { + return c; + }; + const l = s.batchTexture; + i.addUniform("sampler2D", "model_batchTexture"), r.model_batchTexture = function() { + return defaultValue(l.batchTexture, l.defaultTexture); + }, i.addUniform("vec4", "model_textureStep"), r.model_textureStep = function() { + return l.textureStep; + }, l.textureDimensions.y > 1 && (i.addDefine("MULTILINE_BATCH_TEXTURE"), i.addUniform("vec2", "model_textureDimensions"), r.model_textureDimensions = function() { + return l.textureDimensions; + }), e.uniformMap = combine$2( + r, + e.uniformMap + ); +}; +const ClassificationPipelineStage = { + name: "ClassificationPipelineStage" + // Helps with debugging +}; +ClassificationPipelineStage.process = function(e, t, n) { + e.shaderBuilder.addDefine( + "HAS_CLASSIFICATION", + void 0, + ShaderDestination$1.BOTH + ); + const r = e.runtimePrimitive; + defined(r.batchLengths) || createClassificationBatches(t, r); +}; +function createClassificationBatches(e, t) { + const n = ModelUtility.getAttributeBySemantic( + e, + VertexAttributeSemantic$1.POSITION + ); + if (!defined(n)) + throw new RuntimeError( + "Primitives must have a position attribute to be used for classification." + ); + let i; + const r = e.indices, o = defined(r); + o && (i = r.typedArray, r.typedArray = void 0); + const s = o ? r.count : n.count, c = ModelUtility.getAttributeBySemantic( + e, + VertexAttributeSemantic$1.FEATURE_ID, + 0 + ); + if (!defined(c)) { + t.batchLengths = [s], t.batchOffsets = [0]; + return; + } + const l = c.typedArray; + c.typedArray = void 0; + const d = [], f = [0], h = o ? i[0] : 0; + let p = l[h], m = 0; + for (let y = 1; y < s; y++) { + const C = o ? i[y] : y, T = l[C]; + if (T !== p) { + const x = y - m, b = y; + d.push(x), f.push(b), m = b, p = T; + } + } + const _ = s - m; + d.push(_), t.batchLengths = d, t.batchOffsets = f; +} +const CPUStylingStageVS = `void filterByPassType(inout vec3 positionMC, vec4 featureColor) +{ + bool styleTranslucent = (featureColor.a != 1.0); + // Only render translucent features in the translucent pass (if the style or the original command has translucency). + if (czm_pass == czm_passTranslucent && !styleTranslucent && !model_commandTranslucent) + { + // If the model has a translucent silhouette, it needs to render during the silhouette color command, + // (i.e. the command where model_silhouettePass = true), even if the model isn't translucent. + #ifdef HAS_SILHOUETTE + positionMC *= float(model_silhouettePass); + #else + positionMC *= 0.0; + #endif + } + // If the current pass is not the translucent pass and the style is not translucent, don't render the feature. + else if (czm_pass != czm_passTranslucent && styleTranslucent) + { + positionMC *= 0.0; + } +} + +void cpuStylingStage(inout vec3 positionMC, inout SelectedFeature feature) +{ + float show = ceil(feature.color.a); + positionMC *= show; + + #if defined(HAS_SELECTED_FEATURE_ID_ATTRIBUTE) && !defined(HAS_CLASSIFICATION) + filterByPassType(positionMC, feature.color); + #endif +} +`, CPUStylingStageFS = `void filterByPassType(vec4 featureColor) +{ + bool styleTranslucent = (featureColor.a != 1.0); + // Only render translucent features in the translucent pass (if the style or the original command has translucency). + if (czm_pass == czm_passTranslucent && !styleTranslucent && !model_commandTranslucent) + { + // If the model has a translucent silhouette, it needs to render during the silhouette color command, + // (i.e. the command where model_silhouettePass = true), even if the model isn't translucent. + #ifdef HAS_SILHOUETTE + if(!model_silhouettePass) { + discard; + } + #else + discard; + #endif + } + // If the current pass is not the translucent pass and the style is not translucent, don't render the feature. + else if (czm_pass != czm_passTranslucent && styleTranslucent) + { + discard; + } +} + +void cpuStylingStage(inout czm_modelMaterial material, SelectedFeature feature) +{ + vec4 featureColor = feature.color; + if (featureColor.a == 0.0) + { + discard; + } + + // If a feature ID vertex attribute is used, the pass type filter is applied in the vertex shader. + // So, we only apply in in the fragment shader if the feature ID texture is used. + #if defined(HAS_SELECTED_FEATURE_ID_TEXTURE) && !defined(HAS_CLASSIFICATION) + filterByPassType(featureColor); + #endif + + featureColor = czm_gammaCorrect(featureColor); + + // Classification models compute the diffuse differently. + #ifdef HAS_CLASSIFICATION + material.diffuse = featureColor.rgb * featureColor.a; + #else + float highlight = ceil(model_colorBlend); + material.diffuse *= mix(featureColor.rgb, vec3(1.0), highlight); + #endif + + material.alpha *= featureColor.a; +} +`, CPUStylingPipelineStage = { + name: "CPUStylingPipelineStage" + // Helps with debugging +}; +CPUStylingPipelineStage.process = function(e, t, n) { + const i = e.model, r = e.shaderBuilder; + r.addVertexLines(CPUStylingStageVS), r.addFragmentLines(CPUStylingStageFS), r.addDefine("USE_CPU_STYLING", void 0, ShaderDestination$1.BOTH), defined(i.color) || (r.addUniform( + "float", + ModelColorPipelineStage.COLOR_BLEND_UNIFORM_NAME, + ShaderDestination$1.FRAGMENT + ), e.uniformMap[ModelColorPipelineStage.COLOR_BLEND_UNIFORM_NAME] = function() { + return ColorBlendMode$1.getColorBlend( + i.colorBlendMode, + i.colorBlendAmount + ); + }), r.addUniform( + "bool", + "model_commandTranslucent", + ShaderDestination$1.BOTH + ), e.uniformMap.model_commandTranslucent = function() { + return e.alphaOptions.pass === Pass$1.TRANSLUCENT; + }; +}; +const CustomShaderMode = { + /** + * The custom shader will be used to modify the results of the material stage + * before lighting is applied. + * + * @type {string} + * @constant + */ + MODIFY_MATERIAL: "MODIFY_MATERIAL", + /** + * The custom shader will be used instead of the material stage. This is a hint + * to optimize out the material processing code. + * + * @type {string} + * @constant + */ + REPLACE_MATERIAL: "REPLACE_MATERIAL" +}; +CustomShaderMode.getDefineName = function(e) { + return `CUSTOM_SHADER_${e}`; +}; +const CustomShaderMode$1 = Object.freeze(CustomShaderMode), CustomShaderStageVS = `void customShaderStage( + inout czm_modelVertexOutput vsOutput, + inout ProcessedAttributes attributes, + FeatureIds featureIds, + Metadata metadata, + MetadataClass metadataClass, + MetadataStatistics metadataStatistics +) { + // VertexInput and initializeInputStruct() are dynamically generated in JS, + // see CustomShaderPipelineStage.js + VertexInput vsInput; + initializeInputStruct(vsInput, attributes); + vsInput.featureIds = featureIds; + vsInput.metadata = metadata; + vsInput.metadataClass = metadataClass; + vsInput.metadataStatistics = metadataStatistics; + vertexMain(vsInput, vsOutput); + attributes.positionMC = vsOutput.positionMC; +} +`, CustomShaderStageFS = `void customShaderStage( + inout czm_modelMaterial material, + ProcessedAttributes attributes, + FeatureIds featureIds, + Metadata metadata, + MetadataClass metadataClass, + MetadataStatistics metadataStatistics +) { + // FragmentInput and initializeInputStruct() are dynamically generated in JS, + // see CustomShaderPipelineStage.js + FragmentInput fsInput; + initializeInputStruct(fsInput, attributes); + fsInput.featureIds = featureIds; + fsInput.metadata = metadata; + fsInput.metadataClass = metadataClass; + fsInput.metadataStatistics = metadataStatistics; + fragmentMain(fsInput, material); +} +`, FeatureIdStageFS = `void featureIdStage(out FeatureIds featureIds, ProcessedAttributes attributes) { + initializeFeatureIds(featureIds, attributes); + initializeFeatureIdAliases(featureIds); +} +`, FeatureIdStageVS = `void featureIdStage(out FeatureIds featureIds, ProcessedAttributes attributes) +{ + initializeFeatureIds(featureIds, attributes); + initializeFeatureIdAliases(featureIds); + setFeatureIdVaryings(); +} +`, FeatureIdPipelineStage = { + name: "FeatureIdPipelineStage", + // Helps with debugging + STRUCT_ID_FEATURE_IDS_VS: "FeatureIdsVS", + STRUCT_ID_FEATURE_IDS_FS: "FeatureIdsFS", + STRUCT_NAME_FEATURE_IDS: "FeatureIds", + FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS: "initializeFeatureIdsVS", + FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS: "initializeFeatureIdsFS", + FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_VS: "initializeFeatureIdAliasesVS", + FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_FS: "initializeFeatureIdAliasesFS", + FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS: "void initializeFeatureIds(out FeatureIds featureIds, ProcessedAttributes attributes)", + FUNCTION_SIGNATURE_INITIALIZE_FEATURE_ID_ALIASES: "void initializeFeatureIdAliases(inout FeatureIds featureIds)", + FUNCTION_ID_SET_FEATURE_ID_VARYINGS: "setFeatureIdVaryings", + FUNCTION_SIGNATURE_SET_FEATURE_ID_VARYINGS: "void setFeatureIdVaryings()" +}; +FeatureIdPipelineStage.process = function(e, t, n) { + const i = e.shaderBuilder; + declareStructsAndFunctions$1(i); + const r = e.runtimeNode.node.instances; + defined(r) && processInstanceFeatureIds(e, r, n), processPrimitiveFeatureIds(e, t, n), i.addVertexLines(FeatureIdStageVS), i.addFragmentLines(FeatureIdStageFS); +}; +function declareStructsAndFunctions$1(e) { + e.addStruct( + FeatureIdPipelineStage.STRUCT_ID_FEATURE_IDS_VS, + FeatureIdPipelineStage.STRUCT_NAME_FEATURE_IDS, + ShaderDestination$1.VERTEX + ), e.addStruct( + FeatureIdPipelineStage.STRUCT_ID_FEATURE_IDS_FS, + FeatureIdPipelineStage.STRUCT_NAME_FEATURE_IDS, + ShaderDestination$1.FRAGMENT + ), e.addFunction( + FeatureIdPipelineStage.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS, + FeatureIdPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS, + ShaderDestination$1.VERTEX + ), e.addFunction( + FeatureIdPipelineStage.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS, + FeatureIdPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS, + ShaderDestination$1.FRAGMENT + ), e.addFunction( + FeatureIdPipelineStage.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_VS, + FeatureIdPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_ID_ALIASES, + ShaderDestination$1.VERTEX + ), e.addFunction( + FeatureIdPipelineStage.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_FS, + FeatureIdPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_ID_ALIASES, + ShaderDestination$1.FRAGMENT + ), e.addFunction( + FeatureIdPipelineStage.FUNCTION_ID_SET_FEATURE_ID_VARYINGS, + FeatureIdPipelineStage.FUNCTION_SIGNATURE_SET_FEATURE_ID_VARYINGS, + ShaderDestination$1.VERTEX + ); +} +function processInstanceFeatureIds(e, t, n) { + const i = t.featureIds, r = t.attributes[0].count; + for (let o = 0; o < i.length; o++) { + const s = i[o], c = s.positionalLabel; + s instanceof ModelComponents.FeatureIdAttribute ? processInstanceAttribute(e, s, c) : processImplicitRange( + e, + s, + c, + r, + 1, + n + ); + const l = s.label; + defined(l) && addAlias(e, c, l, ShaderDestination$1.BOTH); + } +} +function processPrimitiveFeatureIds(e, t, n) { + const i = t.featureIds, o = ModelUtility.getAttributeBySemantic( + t, + VertexAttributeSemantic$1.POSITION + ).count; + for (let s = 0; s < i.length; s++) { + const c = i[s], l = c.positionalLabel; + let d = ShaderDestination$1.BOTH; + c instanceof ModelComponents.FeatureIdAttribute ? processAttribute$1(e, c, l) : c instanceof ModelComponents.FeatureIdImplicitRange ? processImplicitRange( + e, + c, + l, + o, + void 0, + n + ) : (processTexture$1(e, c, l, s, n), d = ShaderDestination$1.FRAGMENT); + const f = c.label; + defined(f) && addAlias(e, l, f, d); + } +} +function processInstanceAttribute(e, t, n) { + const i = e.shaderBuilder; + i.addStructField( + FeatureIdPipelineStage.STRUCT_ID_FEATURE_IDS_VS, + "int", + n + ), i.addStructField( + FeatureIdPipelineStage.STRUCT_ID_FEATURE_IDS_FS, + "int", + n + ); + const r = t.setIndex, o = n.replace(/_\d+$/, "_"), s = `a_${o}${r}`, c = `v_${o}${r}`, l = `featureIds.${n} = int(czm_round(${s}));`, d = `featureIds.${n} = int(czm_round(${c}));`; + i.addFunctionLines( + FeatureIdPipelineStage.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS, + [l] + ), i.addFunctionLines( + FeatureIdPipelineStage.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS, + [d] + ), i.addVarying("float", c), i.addFunctionLines( + FeatureIdPipelineStage.FUNCTION_ID_SET_FEATURE_ID_VARYINGS, + [`${c} = ${s};`] + ); +} +function processAttribute$1(e, t, n) { + const i = e.shaderBuilder; + i.addStructField( + FeatureIdPipelineStage.STRUCT_ID_FEATURE_IDS_VS, + "int", + n + ), i.addStructField( + FeatureIdPipelineStage.STRUCT_ID_FEATURE_IDS_FS, + "int", + n + ); + const r = t.setIndex, o = n.replace(/_\d+$/, "_"), s = [ + `featureIds.${n} = int(czm_round(attributes.${o}${r}));` + ]; + i.addFunctionLines( + FeatureIdPipelineStage.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS, + s + ), i.addFunctionLines( + FeatureIdPipelineStage.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS, + s + ); +} +function processImplicitRange(e, t, n, i, r, o) { + generateImplicitFeatureIdAttribute( + e, + t, + i, + r, + o + ); + const s = e.shaderBuilder, c = `a_implicit_${n}`; + s.addAttribute("float", c); + const l = `v_implicit_${n}`; + s.addVarying("float", l), s.addStructField( + FeatureIdPipelineStage.STRUCT_ID_FEATURE_IDS_VS, + "int", + n + ), s.addStructField( + FeatureIdPipelineStage.STRUCT_ID_FEATURE_IDS_FS, + "int", + n + ), s.addFunctionLines( + FeatureIdPipelineStage.FUNCTION_ID_SET_FEATURE_ID_VARYINGS, + [`${l} = ${c};`] + ), s.addFunctionLines( + FeatureIdPipelineStage.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS, + [`featureIds.${n} = int(czm_round(${c}));`] + ), s.addFunctionLines( + FeatureIdPipelineStage.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS, + [`featureIds.${n} = int(czm_round(${l}));`] + ); +} +function processTexture$1(e, t, n, i, r) { + const o = `u_featureIdTexture_${i}`, s = e.uniformMap, c = t.textureReader; + s[o] = function() { + return defaultValue( + c.texture, + r.context.defaultTexture + ); + }; + const l = c.channels, d = e.shaderBuilder; + d.addStructField( + FeatureIdPipelineStage.STRUCT_ID_FEATURE_IDS_FS, + "int", + n + ), d.addUniform( + "sampler2D", + o, + ShaderDestination$1.FRAGMENT + ); + const h = `v_texCoord_${c.texCoord}`; + let p = h; + const m = c.transform; + if (defined(m) && !Matrix3.equals(m, Matrix3.IDENTITY)) { + const C = `${o}Transform`; + d.addUniform( + "mat3", + C, + ShaderDestination$1.FRAGMENT + ), s[C] = function() { + return m; + }, p = `vec2(${C} * vec3(${h}, 1.0))`; + } + const _ = `texture(${o}, ${p}).${l}`, y = `featureIds.${n} = czm_unpackUint(${_});`; + d.addFunctionLines( + FeatureIdPipelineStage.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS, + [y] + ); +} +function addAlias(e, t, n, i) { + const r = e.shaderBuilder, o = ShaderDestination$1.includesVertexShader(i); + o && r.addStructField( + FeatureIdPipelineStage.STRUCT_ID_FEATURE_IDS_VS, + "int", + n + ), r.addStructField( + FeatureIdPipelineStage.STRUCT_ID_FEATURE_IDS_FS, + "int", + n + ); + const s = [ + `featureIds.${n} = featureIds.${t};` + ]; + o && r.addFunctionLines( + FeatureIdPipelineStage.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_VS, + s + ), r.addFunctionLines( + FeatureIdPipelineStage.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_FS, + s + ); +} +function generateImplicitFeatureIdAttribute(e, t, n, i, r) { + const o = e.model; + let s, c; + if (defined(t.repeat)) { + const d = generateImplicitFeatureIdTypedArray( + t, + n + ); + s = Buffer.createVertexBuffer({ + context: r.context, + typedArray: d, + usage: BufferUsage$1.STATIC_DRAW + }), s.vertexArrayDestroyable = !1, o._pipelineResources.push(s), o.statistics.addBuffer(s, !1); + } else + c = [t.offset]; + const l = { + index: e.attributeIndex++, + instanceDivisor: i, + value: c, + vertexBuffer: s, + normalize: !1, + componentsPerAttribute: 1, + componentDatatype: ComponentDatatype$1.FLOAT, + strideInBytes: ComponentDatatype$1.getSizeInBytes(ComponentDatatype$1.FLOAT), + offsetInBytes: 0 + }; + e.attributes.push(l); +} +function generateImplicitFeatureIdTypedArray(e, t) { + const n = e.offset, i = e.repeat, r = new Float32Array(t); + for (let o = 0; o < t; o++) + r[o] = n + Math.floor(o / i); + return r; +} +const MetadataStageFS = `void metadataStage( + out Metadata metadata, + out MetadataClass metadataClass, + out MetadataStatistics metadataStatistics, + ProcessedAttributes attributes + ) +{ + initializeMetadata(metadata, metadataClass, metadataStatistics, attributes); +} +`, MetadataStageVS = `void metadataStage( + out Metadata metadata, + out MetadataClass metadataClass, + out MetadataStatistics metadataStatistics, + ProcessedAttributes attributes + ) +{ + initializeMetadata(metadata, metadataClass, metadataStatistics, attributes); + setMetadataVaryings(); +} +`, MetadataPipelineStage = { + name: "MetadataPipelineStage", + STRUCT_ID_METADATA_VS: "MetadataVS", + STRUCT_ID_METADATA_FS: "MetadataFS", + STRUCT_NAME_METADATA: "Metadata", + STRUCT_ID_METADATA_CLASS_VS: "MetadataClassVS", + STRUCT_ID_METADATA_CLASS_FS: "MetadataClassFS", + STRUCT_NAME_METADATA_CLASS: "MetadataClass", + STRUCT_ID_METADATA_STATISTICS_VS: "MetadataStatisticsVS", + STRUCT_ID_METADATA_STATISTICS_FS: "MetadataStatisticsFS", + STRUCT_NAME_METADATA_STATISTICS: "MetadataStatistics", + FUNCTION_ID_INITIALIZE_METADATA_VS: "initializeMetadataVS", + FUNCTION_ID_INITIALIZE_METADATA_FS: "initializeMetadataFS", + FUNCTION_SIGNATURE_INITIALIZE_METADATA: "void initializeMetadata(out Metadata metadata, out MetadataClass metadataClass, out MetadataStatistics metadataStatistics, ProcessedAttributes attributes)", + FUNCTION_ID_SET_METADATA_VARYINGS: "setMetadataVaryings", + FUNCTION_SIGNATURE_SET_METADATA_VARYINGS: "void setMetadataVaryings()", + // Metadata class and statistics fields: + // - some must be renamed to avoid reserved words + // - some always have float/vec values, even for integer/ivec property types + METADATA_CLASS_FIELDS: [ + { specName: "noData", shaderName: "noData" }, + { specName: "default", shaderName: "defaultValue" }, + { specName: "min", shaderName: "minValue" }, + { specName: "max", shaderName: "maxValue" } + ], + METADATA_STATISTICS_FIELDS: [ + { specName: "min", shaderName: "minValue" }, + { specName: "max", shaderName: "maxValue" }, + { specName: "mean", shaderName: "mean", type: "float" }, + { specName: "median", shaderName: "median" }, + { + specName: "standardDeviation", + shaderName: "standardDeviation", + type: "float" + }, + { specName: "variance", shaderName: "variance", type: "float" }, + { specName: "sum", shaderName: "sum" } + ] +}; +MetadataPipelineStage.process = function(e, t, n) { + var h; + const { shaderBuilder: i, model: r } = e, { structuralMetadata: o = {}, content: s } = r, c = (h = s == null ? void 0 : s.tileset.metadataExtension) == null ? void 0 : h.statistics, l = getPropertyAttributesInfo( + o.propertyAttributes, + t, + c + ), d = getPropertyTexturesInfo( + o.propertyTextures, + c + ), f = l.concat(d); + declareMetadataTypeStructs(i, f), declareStructsAndFunctions(i), i.addVertexLines(MetadataStageVS), i.addFragmentLines(MetadataStageFS); + for (let p = 0; p < l.length; p++) { + const m = l[p]; + processPropertyAttributeProperty(e, m); + } + for (let p = 0; p < d.length; p++) { + const m = d[p]; + processPropertyTextureProperty(e, m); + } +}; +function getPropertyAttributesInfo(e, t, n) { + return defined(e) ? e.flatMap( + (i) => getPropertyAttributeInfo(i, t, n) + ) : []; +} +function getPropertyAttributeInfo(e, t, n) { + const { + getAttributeByName: i, + getAttributeInfo: r, + sanitizeGlslIdentifier: o + } = ModelUtility, s = e.class.id, c = n == null ? void 0 : n.classes[s], l = Object.entries(e.properties), d = new Array(l.length); + for (let f = 0; f < l.length; f++) { + const [h, p] = l[f], m = i(t, p.attribute), { glslType: _, variableName: y } = r(m); + d[f] = { + metadataVariable: o(h), + property: p, + type: p.classProperty.type, + glslType: _, + variableName: y, + propertyStatistics: c == null ? void 0 : c.properties[h], + shaderDestination: ShaderDestination$1.BOTH + }; + } + return d; +} +function getPropertyTexturesInfo(e, t) { + return defined(e) ? e.flatMap( + (n) => getPropertyTextureInfo(n, t) + ) : []; +} +function getPropertyTextureInfo(e, t) { + const { sanitizeGlslIdentifier: n } = ModelUtility, i = e.class.id, r = t == null ? void 0 : t.classes[i], o = Object.entries( + e.properties + ).filter(([c, l]) => l.isGpuCompatible()), s = new Array(o.length); + for (let c = 0; c < o.length; c++) { + const [l, d] = o[c]; + s[c] = { + metadataVariable: n(l), + property: d, + type: d.classProperty.type, + glslType: d.getGlslType(), + propertyStatistics: r == null ? void 0 : r.properties[l], + shaderDestination: ShaderDestination$1.FRAGMENT + }; + } + return s; +} +function declareMetadataTypeStructs(e, t) { + const n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(); + for (let c = 0; c < t.length; c++) { + const { type: l, glslType: d, propertyStatistics: f } = t[c]; + n.add(d), defined(f) && l !== MetadataType$1.ENUM && i.add(d); + } + const r = MetadataPipelineStage.METADATA_CLASS_FIELDS; + for (const c of n) { + const l = `${c}MetadataClass`; + s(l, c, r); + } + const o = MetadataPipelineStage.METADATA_STATISTICS_FIELDS; + for (const c of i) { + const l = `${c}MetadataStatistics`; + s(l, c, o); + } + function s(c, l, d) { + e.addStruct(c, c, ShaderDestination$1.BOTH); + for (let f = 0; f < d.length; f++) { + const { shaderName: h } = d[f], p = d[f].type === "float" ? convertToFloatComponents(l) : l; + e.addStructField(c, p, h); + } + } +} +const floatConversions = { + int: "float", + ivec2: "vec2", + ivec3: "vec3", + ivec4: "vec4" +}; +function convertToFloatComponents(e) { + const t = floatConversions[e]; + return defined(t) ? t : e; +} +function declareStructsAndFunctions(e) { + e.addStruct( + MetadataPipelineStage.STRUCT_ID_METADATA_VS, + MetadataPipelineStage.STRUCT_NAME_METADATA, + ShaderDestination$1.VERTEX + ), e.addStruct( + MetadataPipelineStage.STRUCT_ID_METADATA_FS, + MetadataPipelineStage.STRUCT_NAME_METADATA, + ShaderDestination$1.FRAGMENT + ), e.addStruct( + MetadataPipelineStage.STRUCT_ID_METADATA_CLASS_VS, + MetadataPipelineStage.STRUCT_NAME_METADATA_CLASS, + ShaderDestination$1.VERTEX + ), e.addStruct( + MetadataPipelineStage.STRUCT_ID_METADATA_CLASS_FS, + MetadataPipelineStage.STRUCT_NAME_METADATA_CLASS, + ShaderDestination$1.FRAGMENT + ), e.addStruct( + MetadataPipelineStage.STRUCT_ID_METADATA_STATISTICS_VS, + MetadataPipelineStage.STRUCT_NAME_METADATA_STATISTICS, + ShaderDestination$1.VERTEX + ), e.addStruct( + MetadataPipelineStage.STRUCT_ID_METADATA_STATISTICS_FS, + MetadataPipelineStage.STRUCT_NAME_METADATA_STATISTICS, + ShaderDestination$1.FRAGMENT + ), e.addFunction( + MetadataPipelineStage.FUNCTION_ID_INITIALIZE_METADATA_VS, + MetadataPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_METADATA, + ShaderDestination$1.VERTEX + ), e.addFunction( + MetadataPipelineStage.FUNCTION_ID_INITIALIZE_METADATA_FS, + MetadataPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_METADATA, + ShaderDestination$1.FRAGMENT + ), e.addFunction( + MetadataPipelineStage.FUNCTION_ID_SET_METADATA_VARYINGS, + MetadataPipelineStage.FUNCTION_SIGNATURE_SET_METADATA_VARYINGS, + ShaderDestination$1.VERTEX + ); +} +function processPropertyAttributeProperty(e, t) { + addPropertyAttributePropertyMetadata(e, t), addPropertyMetadataClass(e.shaderBuilder, t), addPropertyMetadataStatistics(e.shaderBuilder, t); +} +function addPropertyAttributePropertyMetadata(e, t) { + const { shaderBuilder: n } = e, { metadataVariable: i, property: r, glslType: o } = t, s = addValueTransformUniforms({ + valueExpression: `attributes.${t.variableName}`, + renderResources: e, + glslType: o, + metadataVariable: i, + shaderDestination: ShaderDestination$1.BOTH, + property: r + }); + n.addStructField( + MetadataPipelineStage.STRUCT_ID_METADATA_VS, + o, + i + ), n.addStructField( + MetadataPipelineStage.STRUCT_ID_METADATA_FS, + o, + i + ); + const c = `metadata.${i} = ${s};`; + n.addFunctionLines( + MetadataPipelineStage.FUNCTION_ID_INITIALIZE_METADATA_VS, + [c] + ), n.addFunctionLines( + MetadataPipelineStage.FUNCTION_ID_INITIALIZE_METADATA_FS, + [c] + ); +} +function processPropertyTextureProperty(e, t) { + addPropertyTexturePropertyMetadata(e, t), addPropertyMetadataClass(e.shaderBuilder, t), addPropertyMetadataStatistics(e.shaderBuilder, t); +} +function addPropertyTexturePropertyMetadata(e, t) { + const { shaderBuilder: n, uniformMap: i } = e, { metadataVariable: r, glslType: o, property: s } = t, { + texCoord: c, + channels: l, + index: d, + texture: f, + transform: h + } = s.textureReader, p = `u_propertyTexture_${d}`; + i.hasOwnProperty(p) || (n.addUniform( + "sampler2D", + p, + ShaderDestination$1.FRAGMENT + ), i[p] = () => f), n.addStructField( + MetadataPipelineStage.STRUCT_ID_METADATA_FS, + o, + r + ); + const m = `attributes.texCoord_${c}`; + let _ = m; + if (defined(h) && !Matrix3.equals(h, Matrix3.IDENTITY)) { + const b = `${p}Transform`; + n.addUniform( + "mat3", + b, + ShaderDestination$1.FRAGMENT + ), i[b] = function() { + return h; + }, _ = `vec2(${b} * vec3(${m}, 1.0))`; + } + const y = `texture(${p}, ${_}).${l}`, C = s.unpackInShader(y), T = addValueTransformUniforms({ + valueExpression: C, + renderResources: e, + glslType: o, + metadataVariable: r, + shaderDestination: ShaderDestination$1.FRAGMENT, + property: s + }), x = `metadata.${r} = ${T};`; + n.addFunctionLines( + MetadataPipelineStage.FUNCTION_ID_INITIALIZE_METADATA_FS, + [x] + ); +} +function addPropertyMetadataClass(e, t) { + const { classProperty: n } = t.property, { metadataVariable: i, glslType: r, shaderDestination: o } = t, s = getStructAssignments( + MetadataPipelineStage.METADATA_CLASS_FIELDS, + n, + `metadataClass.${i}`, + r + ), c = `${r}MetadataClass`; + e.addStructField( + MetadataPipelineStage.STRUCT_ID_METADATA_CLASS_FS, + c, + i + ), e.addFunctionLines( + MetadataPipelineStage.FUNCTION_ID_INITIALIZE_METADATA_FS, + s + ), ShaderDestination$1.includesVertexShader(o) && (e.addStructField( + MetadataPipelineStage.STRUCT_ID_METADATA_CLASS_VS, + c, + i + ), e.addFunctionLines( + MetadataPipelineStage.FUNCTION_ID_INITIALIZE_METADATA_VS, + s + )); +} +function addPropertyMetadataStatistics(e, t) { + const { propertyStatistics: n } = t; + if (!defined(n)) + return; + const { metadataVariable: i, type: r, glslType: o } = t; + if (r === MetadataType$1.ENUM) + return; + const s = MetadataPipelineStage.METADATA_STATISTICS_FIELDS, c = `metadataStatistics.${i}`, l = getStructAssignments( + s, + n, + c, + o + ), d = `${o}MetadataStatistics`; + e.addStructField( + MetadataPipelineStage.STRUCT_ID_METADATA_STATISTICS_FS, + d, + i + ), e.addFunctionLines( + MetadataPipelineStage.FUNCTION_ID_INITIALIZE_METADATA_FS, + l + ), ShaderDestination$1.includesVertexShader(t.shaderDestination) && (e.addStructField( + MetadataPipelineStage.STRUCT_ID_METADATA_STATISTICS_VS, + d, + i + ), e.addFunctionLines( + MetadataPipelineStage.FUNCTION_ID_INITIALIZE_METADATA_VS, + l + )); +} +function getStructAssignments(e, t, n, i) { + function r(o) { + const s = t[o.specName]; + if (defined(s)) + return `${n}.${o.shaderName} = ${i}(${s});`; + } + return defined(t) ? e.map(r).filter(defined) : []; +} +function addValueTransformUniforms(e) { + const { valueExpression: t, property: n } = e; + if (!n.hasValueTransform) + return t; + const i = e.metadataVariable, r = `u_${i}_offset`, o = `u_${i}_scale`, { shaderBuilder: s, uniformMap: c } = e.renderResources, { glslType: l, shaderDestination: d } = e; + s.addUniform(l, r, d), s.addUniform(l, o, d); + const { offset: f, scale: h } = n; + return c[r] = () => f, c[o] = () => h, `czm_valueTransform(${r}, ${o}, ${t})`; +} +const CustomShaderTranslucencyMode = { + /** + * Inherit translucency settings from the primitive's material. If the primitive used a + * translucent material, the custom shader will also be considered translucent. If the primitive + * used an opaque material, the custom shader will be considered opaque. + * + * @type {number} + * @constant + */ + INHERIT: 0, + /** + * Force the primitive to render the primitive as opaque, ignoring any material settings. + * + * @type {number} + * @constant + */ + OPAQUE: 1, + /** + * Force the primitive to render the primitive as translucent, ignoring any material settings. + * + * @type {number} + * @constant + */ + TRANSLUCENT: 2 +}, CustomShaderTranslucencyMode$1 = Object.freeze(CustomShaderTranslucencyMode), CustomShaderPipelineStage = { + name: "CustomShaderPipelineStage", + // Helps with debugging + STRUCT_ID_ATTRIBUTES_VS: "AttributesVS", + STRUCT_ID_ATTRIBUTES_FS: "AttributesFS", + STRUCT_NAME_ATTRIBUTES: "Attributes", + STRUCT_ID_VERTEX_INPUT: "VertexInput", + STRUCT_NAME_VERTEX_INPUT: "VertexInput", + STRUCT_ID_FRAGMENT_INPUT: "FragmentInput", + STRUCT_NAME_FRAGMENT_INPUT: "FragmentInput", + FUNCTION_ID_INITIALIZE_INPUT_STRUCT_VS: "initializeInputStructVS", + FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_VS: "void initializeInputStruct(out VertexInput vsInput, ProcessedAttributes attributes)", + FUNCTION_ID_INITIALIZE_INPUT_STRUCT_FS: "initializeInputStructFS", + FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_FS: "void initializeInputStruct(out FragmentInput fsInput, ProcessedAttributes attributes)", + // Expose method for testing. + _oneTimeWarning: oneTimeWarning +}; +CustomShaderPipelineStage.process = function(e, t, n) { + const { shaderBuilder: i, model: r, alphaOptions: o } = e, { customShader: s } = r, { lightingModel: c, translucencyMode: l } = s; + defined(c) && (e.lightingOptions.lightingModel = c), l === CustomShaderTranslucencyMode$1.TRANSLUCENT ? o.pass = Pass$1.TRANSLUCENT : l === CustomShaderTranslucencyMode$1.OPAQUE && (o.pass = void 0); + const d = generateShaderLines(s, t); + if (!d.customShaderEnabled) + return; + if (addLinesToShader(i, s, d), d.shouldComputePositionWC && i.addDefine( + "COMPUTE_POSITION_WC_CUSTOM_SHADER", + void 0, + ShaderDestination$1.BOTH + ), defined(s.vertexShaderText) && i.addDefine( + "HAS_CUSTOM_VERTEX_SHADER", + void 0, + ShaderDestination$1.VERTEX + ), defined(s.fragmentShaderText)) { + i.addDefine( + "HAS_CUSTOM_FRAGMENT_SHADER", + void 0, + ShaderDestination$1.FRAGMENT + ); + const p = CustomShaderMode$1.getDefineName(s.mode); + i.addDefine( + p, + void 0, + ShaderDestination$1.FRAGMENT + ); + } + const f = s.uniforms; + for (const p in f) + if (f.hasOwnProperty(p)) { + const m = f[p]; + i.addUniform(m.type, p); + } + const h = s.varyings; + for (const p in h) + if (h.hasOwnProperty(p)) { + const m = h[p]; + i.addVarying(m, p); + } + e.uniformMap = combine$2( + e.uniformMap, + s.uniformMap + ); +}; +function getAttributesByName(e) { + const t = {}; + for (let n = 0; n < e.length; n++) { + const i = ModelUtility.getAttributeInfo(e[n]); + t[i.variableName] = i; + } + return t; +} +const attributeTypeLUT = { + position: "vec3", + normal: "vec3", + tangent: "vec3", + bitangent: "vec3", + texCoord: "vec2", + color: "vec4", + joints: "ivec4", + weights: "vec4" +}, attributeDefaultValueLUT = { + position: "vec3(0.0)", + normal: "vec3(0.0, 0.0, 1.0)", + tangent: "vec3(1.0, 0.0, 0.0)", + bitangent: "vec3(0.0, 1.0, 0.0)", + texCoord: "vec2(0.0)", + color: "vec4(1.0)", + joints: "ivec4(0)", + weights: "vec4(0.0)" +}; +function inferAttributeDefaults(e) { + let t = e.replace(/_[0-9]+$/, ""); + t = t.replace(/(MC|EC)$/, ""); + const n = attributeTypeLUT[t], i = attributeDefaultValueLUT[t]; + if (defined(n)) + return { + attributeField: [n, e], + value: i + }; +} +function generateVertexShaderLines(e, t) { + if (!defined(e.vertexShaderText)) + return { enabled: !1 }; + const n = e.usedVariablesVertex.attributeSet, i = getPrimitiveAttributesUsedInShader( + t, + n, + !1 + ), r = getAttributesNeedingDefaults( + t, + n, + !1 + ); + let o; + const s = [], c = []; + for (const l in i) { + if (!i.hasOwnProperty(l)) + continue; + const f = [i[l].glslType, l]; + s.push(f), o = `vsInput.attributes.${l} = attributes.${l};`, c.push(o); + } + for (let l = 0; l < r.length; l++) { + const d = r[l], f = inferAttributeDefaults(d); + if (!defined(f)) + return CustomShaderPipelineStage._oneTimeWarning( + "CustomShaderPipelineStage.incompatiblePrimitiveVS", + `Primitive is missing attribute ${d}, disabling custom vertex shader` + ), { enabled: !1 }; + s.push(f.attributeField), o = `vsInput.attributes.${d} = ${f.value};`, c.push(o); + } + return { + enabled: !0, + attributeFields: s, + initializationLines: c + }; +} +function generatePositionBuiltins(e) { + const t = [], n = [], i = e.usedVariablesFragment.attributeSet; + return i.hasOwnProperty("positionWC") && (t.push(["vec3", "positionWC"]), n.push( + "fsInput.attributes.positionWC = attributes.positionWC;" + )), i.hasOwnProperty("positionEC") && (t.push(["vec3", "positionEC"]), n.push( + "fsInput.attributes.positionEC = attributes.positionEC;" + )), { + attributeFields: t, + initializationLines: n + }; +} +function generateFragmentShaderLines(e, t) { + if (!defined(e.fragmentShaderText)) + return { enabled: !1 }; + const n = e.usedVariablesFragment.attributeSet, i = getPrimitiveAttributesUsedInShader( + t, + n, + !0 + ), r = getAttributesNeedingDefaults( + t, + n, + !0 + ); + let o; + const s = [], c = []; + for (const d in i) { + if (!i.hasOwnProperty(d)) + continue; + const h = [i[d].glslType, d]; + s.push(h), o = `fsInput.attributes.${d} = attributes.${d};`, c.push(o); + } + for (let d = 0; d < r.length; d++) { + const f = r[d], h = inferAttributeDefaults(f); + if (!defined(h)) + return CustomShaderPipelineStage._oneTimeWarning( + "CustomShaderPipelineStage.incompatiblePrimitiveFS", + `Primitive is missing attribute ${f}, disabling custom fragment shader.` + ), { enabled: !1 }; + s.push(h.attributeField), o = `fsInput.attributes.${f} = ${h.value};`, c.push(o); + } + const l = generatePositionBuiltins(e); + return { + enabled: !0, + attributeFields: s.concat(l.attributeFields), + initializationLines: l.initializationLines.concat( + c + ) + }; +} +const builtinAttributes = { + positionWC: !0, + positionEC: !0 +}; +function getPrimitiveAttributesUsedInShader(e, t, n) { + const i = {}; + for (const r in e) { + if (!e.hasOwnProperty(r)) + continue; + const o = e[r]; + let s = r; + n && r === "normalMC" ? s = "normalEC" : n && r === "tangentMC" && (s = "tangentEC", o.glslType = "vec3"), t.hasOwnProperty(s) && (i[s] = o); + } + return i; +} +function getAttributesNeedingDefaults(e, t, n) { + const i = []; + for (const r in t) { + if (!t.hasOwnProperty(r) || builtinAttributes.hasOwnProperty(r)) + continue; + let o = r; + n && r === "normalEC" ? o = "normalMC" : n && r === "tangentEC" && (o = "tangentMC"), e.hasOwnProperty(o) || i.push(r); + } + return i; +} +function generateShaderLines(e, t) { + const n = getAttributesByName(t.attributes), i = generateVertexShaderLines(e, n), r = generateFragmentShaderLines( + e, + n + ), s = e.usedVariablesFragment.attributeSet.hasOwnProperty("positionWC") && r.enabled; + return { + vertexLines: i, + fragmentLines: r, + customShaderEnabled: i.enabled || r.enabled, + shouldComputePositionWC: s + }; +} +function addVertexLinesToShader(e, t) { + let n = CustomShaderPipelineStage.STRUCT_ID_ATTRIBUTES_VS; + e.addStruct( + n, + CustomShaderPipelineStage.STRUCT_NAME_ATTRIBUTES, + ShaderDestination$1.VERTEX + ); + const { attributeFields: i, initializationLines: r } = t; + for (let s = 0; s < i.length; s++) { + const [c, l] = i[s]; + e.addStructField(n, c, l); + } + n = CustomShaderPipelineStage.STRUCT_ID_VERTEX_INPUT, e.addStruct( + n, + CustomShaderPipelineStage.STRUCT_NAME_VERTEX_INPUT, + ShaderDestination$1.VERTEX + ), e.addStructField( + n, + CustomShaderPipelineStage.STRUCT_NAME_ATTRIBUTES, + "attributes" + ), e.addStructField( + n, + FeatureIdPipelineStage.STRUCT_NAME_FEATURE_IDS, + "featureIds" + ), e.addStructField( + n, + MetadataPipelineStage.STRUCT_NAME_METADATA, + "metadata" + ), e.addStructField( + n, + MetadataPipelineStage.STRUCT_NAME_METADATA_CLASS, + "metadataClass" + ), e.addStructField( + n, + MetadataPipelineStage.STRUCT_NAME_METADATA_STATISTICS, + "metadataStatistics" + ); + const o = CustomShaderPipelineStage.FUNCTION_ID_INITIALIZE_INPUT_STRUCT_VS; + e.addFunction( + o, + CustomShaderPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_VS, + ShaderDestination$1.VERTEX + ), e.addFunctionLines(o, r); +} +function addFragmentLinesToShader(e, t) { + let n = CustomShaderPipelineStage.STRUCT_ID_ATTRIBUTES_FS; + e.addStruct( + n, + CustomShaderPipelineStage.STRUCT_NAME_ATTRIBUTES, + ShaderDestination$1.FRAGMENT + ); + const { attributeFields: i, initializationLines: r } = t; + for (let s = 0; s < i.length; s++) { + const [c, l] = i[s]; + e.addStructField(n, c, l); + } + n = CustomShaderPipelineStage.STRUCT_ID_FRAGMENT_INPUT, e.addStruct( + n, + CustomShaderPipelineStage.STRUCT_NAME_FRAGMENT_INPUT, + ShaderDestination$1.FRAGMENT + ), e.addStructField( + n, + CustomShaderPipelineStage.STRUCT_NAME_ATTRIBUTES, + "attributes" + ), e.addStructField( + n, + FeatureIdPipelineStage.STRUCT_NAME_FEATURE_IDS, + "featureIds" + ), e.addStructField( + n, + MetadataPipelineStage.STRUCT_NAME_METADATA, + "metadata" + ), e.addStructField( + n, + MetadataPipelineStage.STRUCT_NAME_METADATA_CLASS, + "metadataClass" + ), e.addStructField( + n, + MetadataPipelineStage.STRUCT_NAME_METADATA_STATISTICS, + "metadataStatistics" + ); + const o = CustomShaderPipelineStage.FUNCTION_ID_INITIALIZE_INPUT_STRUCT_FS; + e.addFunction( + o, + CustomShaderPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_FS, + ShaderDestination$1.FRAGMENT + ), e.addFunctionLines(o, r); +} +const scratchShaderLines = []; +function addLinesToShader(e, t, n) { + const { vertexLines: i, fragmentLines: r } = n, o = scratchShaderLines; + i.enabled && (addVertexLinesToShader(e, i), o.length = 0, o.push( + "#line 0", + t.vertexShaderText, + CustomShaderStageVS + ), e.addVertexLines(o)), r.enabled && (addFragmentLinesToShader(e, r), o.length = 0, o.push( + "#line 0", + t.fragmentShaderText, + CustomShaderStageFS + ), e.addFragmentLines(o)); +} +const DequantizationPipelineStage = { + name: "DequantizationPipelineStage", + // Helps with debugging + FUNCTION_ID_DEQUANTIZATION_STAGE_VS: "dequantizationStage", + FUNCTION_SIGNATURE_DEQUANTIZATION_STAGE_VS: "void dequantizationStage(inout ProcessedAttributes attributes)" +}; +DequantizationPipelineStage.process = function(e, t, n) { + const i = e.shaderBuilder, r = e.model, o = defined(r.classificationType); + i.addDefine( + "USE_DEQUANTIZATION", + void 0, + ShaderDestination$1.VERTEX + ), i.addFunction( + DequantizationPipelineStage.FUNCTION_ID_DEQUANTIZATION_STAGE_VS, + DequantizationPipelineStage.FUNCTION_SIGNATURE_DEQUANTIZATION_STAGE_VS, + ShaderDestination$1.VERTEX + ); + const s = t.attributes; + for (let c = 0; c < s.length; c++) { + const l = s[c], d = l.quantization; + if (!defined(d)) + continue; + const f = l.semantic === VertexAttributeSemantic$1.POSITION, h = l.semantic === VertexAttributeSemantic$1.TEXCOORD; + if (o && !f && !h) + continue; + const p = ModelUtility.getAttributeInfo(l); + updateDequantizationFunction(i, p), addDequantizationUniforms(e, p); + } +}; +function addDequantizationUniforms(e, t) { + const n = e.shaderBuilder, i = e.uniformMap, r = t.variableName, o = t.attribute.quantization; + if (o.octEncoded) { + const s = `model_normalizationRange_${r}`; + n.addUniform( + "float", + s, + ShaderDestination$1.VERTEX + ), i[s] = function() { + return o.normalizationRange; + }; + } else { + const s = `model_quantizedVolumeOffset_${r}`, c = `model_quantizedVolumeStepSize_${r}`, l = t.glslType; + n.addUniform(l, s, ShaderDestination$1.VERTEX), n.addUniform(l, c, ShaderDestination$1.VERTEX); + let d = o.quantizedVolumeOffset, f = o.quantizedVolumeStepSize; + /^color_\d+$/.test(r) && (d = promoteToVec4(d, 0), f = promoteToVec4(f, 1)), i[s] = function() { + return d; + }, i[c] = function() { + return f; + }; + } +} +function promoteToVec4(e, t) { + return e instanceof Cartesian4 ? e : new Cartesian4(e.x, e.y, e.z, t); +} +function updateDequantizationFunction(e, t) { + const n = t.variableName, i = t.attribute.quantization; + let r; + i.octEncoded ? r = generateOctDecodeLine(n, i) : r = generateDequantizeLine(n), e.addFunctionLines( + DequantizationPipelineStage.FUNCTION_ID_DEQUANTIZATION_STAGE_VS, + [r] + ); +} +function generateOctDecodeLine(e, t) { + const n = `attributes.${e}`, i = `a_quantized_${e}`, r = `model_normalizationRange_${e}`, o = t.octEncodedZXY ? ".zxy" : ".xyz"; + return `${n} = czm_octDecode(${i}, ${r})${o};`; +} +function generateDequantizeLine(e) { + const t = `attributes.${e}`, n = `a_quantized_${e}`, i = `model_quantizedVolumeOffset_${e}`, r = `model_quantizedVolumeStepSize_${e}`; + return `${t} = ${i} + ${n} * ${r};`; +} +const GeometryStageFS = `void geometryStage(out ProcessedAttributes attributes) +{ + attributes.positionMC = v_positionMC; + attributes.positionEC = v_positionEC; + + #if defined(COMPUTE_POSITION_WC_CUSTOM_SHADER) || defined(COMPUTE_POSITION_WC_STYLE) || defined(COMPUTE_POSITION_WC_ATMOSPHERE) + attributes.positionWC = v_positionWC; + #endif + + #ifdef HAS_NORMALS + // renormalize after interpolation + attributes.normalEC = normalize(v_normalEC); + #endif + + #ifdef HAS_TANGENTS + attributes.tangentEC = normalize(v_tangentEC); + #endif + + #ifdef HAS_BITANGENTS + attributes.bitangentEC = normalize(v_bitangentEC); + #endif + + // Everything else is dynamically generated in GeometryPipelineStage + setDynamicVaryings(attributes); +} +`, GeometryStageVS = `vec4 geometryStage(inout ProcessedAttributes attributes, mat4 modelView, mat3 normal) +{ + vec4 computedPosition; + + // Compute positions in different coordinate systems + vec3 positionMC = attributes.positionMC; + v_positionMC = positionMC; + v_positionEC = (modelView * vec4(positionMC, 1.0)).xyz; + + #if defined(USE_2D_POSITIONS) || defined(USE_2D_INSTANCING) + vec3 position2D = attributes.position2D; + vec3 positionEC = (u_modelView2D * vec4(position2D, 1.0)).xyz; + computedPosition = czm_projection * vec4(positionEC, 1.0); + #else + computedPosition = czm_projection * vec4(v_positionEC, 1.0); + #endif + + // Sometimes the custom shader and/or style needs this + #if defined(COMPUTE_POSITION_WC_CUSTOM_SHADER) || defined(COMPUTE_POSITION_WC_STYLE) || defined(COMPUTE_POSITION_WC_ATMOSPHERE) || defined(ENABLE_CLIPPING_POLYGONS) + // Note that this is a 32-bit position which may result in jitter on small + // scales. + v_positionWC = (czm_model * vec4(positionMC, 1.0)).xyz; + #endif + + #ifdef HAS_NORMALS + v_normalEC = normalize(normal * attributes.normalMC); + #endif + + #ifdef HAS_TANGENTS + v_tangentEC = normalize(normal * attributes.tangentMC); + #endif + + #ifdef HAS_BITANGENTS + v_bitangentEC = normalize(normal * attributes.bitangentMC); + #endif + + // All other varyings need to be dynamically generated in + // GeometryPipelineStage + setDynamicVaryings(attributes); + + return computedPosition; +} +`, SelectedFeatureIdStageCommon = `vec2 computeSt(float featureId) +{ + float stepX = model_textureStep.x; + float centerX = model_textureStep.y; + + #ifdef MULTILINE_BATCH_TEXTURE + float stepY = model_textureStep.z; + float centerY = model_textureStep.w; + + float xId = mod(featureId, model_textureDimensions.x); + float yId = floor(featureId / model_textureDimensions.x); + + return vec2(centerX + (xId * stepX), centerY + (yId * stepY)); + #else + return vec2(centerX + (featureId * stepX), 0.5); + #endif +} + +void selectedFeatureIdStage(out SelectedFeature feature, FeatureIds featureIds) +{ + int featureId = featureIds.SELECTED_FEATURE_ID; + + + if (featureId < model_featuresLength) + { + vec2 featureSt = computeSt(float(featureId)); + + feature.id = featureId; + feature.st = featureSt; + feature.color = texture(model_batchTexture, featureSt); + } + // Floating point comparisons can be unreliable in GLSL, so we + // increment the feature ID to make sure it's always greater + // then the model_featuresLength - a condition we check for in the + // pick ID, to avoid sampling the pick texture if the feature ID is + // greater than the number of features. + else + { + feature.id = model_featuresLength + 1; + feature.st = vec2(0.0); + feature.color = vec4(1.0); + } + + #ifdef HAS_NULL_FEATURE_ID + if (featureId == model_nullFeatureId) { + feature.id = featureId; + feature.st = vec2(0.0); + feature.color = vec4(1.0); + } + #endif +} +`, SelectedFeatureIdPipelineStage = { + name: "SelectedFeatureIdPipelineStage", + // Helps with debugging + STRUCT_ID_SELECTED_FEATURE: "SelectedFeature", + STRUCT_NAME_SELECTED_FEATURE: "SelectedFeature", + FUNCTION_ID_FEATURE_VARYINGS_VS: "updateFeatureStructVS", + FUNCTION_ID_FEATURE_VARYINGS_FS: "updateFeatureStructFS", + FUNCTION_SIGNATURE_UPDATE_FEATURE: "void updateFeatureStruct(inout SelectedFeature feature)" +}; +SelectedFeatureIdPipelineStage.process = function(e, t, n) { + const i = e.shaderBuilder; + e.hasPropertyTable = !0; + const r = e.model, o = e.runtimeNode.node, s = getSelectedFeatureIds(r, o, t), c = s.shaderDestination; + i.addDefine( + "HAS_SELECTED_FEATURE_ID", + void 0, + c + ), i.addDefine( + "SELECTED_FEATURE_ID", + s.variableName, + c + ), i.addDefine( + s.featureIdDefine, + void 0, + c + ), updateFeatureStruct(i); + const l = s.featureIds.nullFeatureId, d = e.uniformMap; + defined(l) && (i.addDefine( + "HAS_NULL_FEATURE_ID", + void 0, + c + ), i.addUniform("int", "model_nullFeatureId", c), d.model_nullFeatureId = function() { + return l; + }), s.shaderDestination === ShaderDestination$1.BOTH && i.addVertexLines(SelectedFeatureIdStageCommon), i.addFragmentLines(SelectedFeatureIdStageCommon); +}; +function getFeatureIdDefine(e) { + return e instanceof ModelComponents.FeatureIdTexture ? "HAS_SELECTED_FEATURE_ID_TEXTURE" : "HAS_SELECTED_FEATURE_ID_ATTRIBUTE"; +} +function getShaderDestination(e) { + return e instanceof ModelComponents.FeatureIdTexture ? ShaderDestination$1.FRAGMENT : ShaderDestination$1.BOTH; +} +function getSelectedFeatureIds(e, t, n) { + let i, r; + return defined(t.instances) && (r = ModelUtility.getFeatureIdsByLabel( + t.instances.featureIds, + e.instanceFeatureIdLabel + ), defined(r)) ? (i = defaultValue(r.label, r.positionalLabel), { + featureIds: r, + variableName: i, + shaderDestination: getShaderDestination(r), + featureIdDefine: getFeatureIdDefine(r) + }) : (r = ModelUtility.getFeatureIdsByLabel( + n.featureIds, + e.featureIdLabel + ), i = defaultValue(r.label, r.positionalLabel), { + featureIds: r, + variableName: i, + shaderDestination: getShaderDestination(r), + featureIdDefine: getFeatureIdDefine(r) + }); +} +function updateFeatureStruct(e) { + e.addStructField( + SelectedFeatureIdPipelineStage.STRUCT_ID_SELECTED_FEATURE, + "int", + "id" + ), e.addStructField( + SelectedFeatureIdPipelineStage.STRUCT_ID_SELECTED_FEATURE, + "vec2", + "st" + ), e.addStructField( + SelectedFeatureIdPipelineStage.STRUCT_ID_SELECTED_FEATURE, + "vec4", + "color" + ); +} +const GeometryPipelineStage = { + name: "GeometryPipelineStage", + // Helps with debugging + STRUCT_ID_PROCESSED_ATTRIBUTES_VS: "ProcessedAttributesVS", + STRUCT_ID_PROCESSED_ATTRIBUTES_FS: "ProcessedAttributesFS", + STRUCT_NAME_PROCESSED_ATTRIBUTES: "ProcessedAttributes", + FUNCTION_ID_INITIALIZE_ATTRIBUTES: "initializeAttributes", + FUNCTION_SIGNATURE_INITIALIZE_ATTRIBUTES: "void initializeAttributes(out ProcessedAttributes attributes)", + FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS: "setDynamicVaryingsVS", + FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS: "setDynamicVaryingsFS", + FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS: "void setDynamicVaryings(inout ProcessedAttributes attributes)" +}; +GeometryPipelineStage.process = function(e, t, n) { + const { shaderBuilder: i, model: r } = e; + i.addStruct( + GeometryPipelineStage.STRUCT_ID_PROCESSED_ATTRIBUTES_VS, + "ProcessedAttributes", + ShaderDestination$1.VERTEX + ), i.addStruct( + GeometryPipelineStage.STRUCT_ID_PROCESSED_ATTRIBUTES_FS, + "ProcessedAttributes", + ShaderDestination$1.FRAGMENT + ), i.addStruct( + SelectedFeatureIdPipelineStage.STRUCT_ID_SELECTED_FEATURE, + SelectedFeatureIdPipelineStage.STRUCT_NAME_SELECTED_FEATURE, + ShaderDestination$1.BOTH + ), i.addFunction( + GeometryPipelineStage.FUNCTION_ID_INITIALIZE_ATTRIBUTES, + GeometryPipelineStage.FUNCTION_SIGNATURE_INITIALIZE_ATTRIBUTES, + ShaderDestination$1.VERTEX + ), i.addVarying("vec3", "v_positionWC"), i.addVarying("vec3", "v_positionEC"), i.addStructField( + GeometryPipelineStage.STRUCT_ID_PROCESSED_ATTRIBUTES_FS, + "vec3", + "positionWC" + ), i.addStructField( + GeometryPipelineStage.STRUCT_ID_PROCESSED_ATTRIBUTES_FS, + "vec3", + "positionEC" + ), i.addFunction( + GeometryPipelineStage.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS, + GeometryPipelineStage.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS, + ShaderDestination$1.VERTEX + ), i.addFunction( + GeometryPipelineStage.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS, + GeometryPipelineStage.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS, + ShaderDestination$1.FRAGMENT + ), r.type === ModelType$1.TILE_PNTS && i.addDefine( + "HAS_SRGB_COLOR", + void 0, + ShaderDestination$1.FRAGMENT + ), r.type !== ModelType$1.TILE_PNTS && r.useSRGBVertexColors && i.addDefine( + "USE_VCS_SRGB_VERTEX_COLORS", + void 0, + ShaderDestination$1.FRAGMENT + ), r.type !== ModelType$1.TILE_PNTS && r.useSRGBColorFactors && i.addDefine( + "USE_VCS_SRGB_COLOR_FACTORS", + void 0, + ShaderDestination$1.FRAGMENT + ); + const o = n.mode !== SceneMode$1.SCENE3D && !n.scene3DOnly && r._projectTo2D, s = defined(e.runtimeNode.node.instances), c = o && !s, l = t.attributes.length; + for (let d = 0; d < l; d++) { + const f = t.attributes[d], h = AttributeType$1.getAttributeLocationCount( + f.type + ), p = f.semantic === VertexAttributeSemantic$1.POSITION; + let m; + h > 1 ? (m = e.attributeIndex, e.attributeIndex += h) : p && !c ? m = 0 : m = e.attributeIndex++, processAttribute( + e, + f, + m, + h, + o, + s + ); + } + handleBitangents(i, t.attributes), t.primitiveType === PrimitiveType$1.POINTS && i.addDefine("PRIMITIVE_TYPE_POINTS"), i.addVertexLines(GeometryStageVS), i.addFragmentLines(GeometryStageFS); +}; +function processAttribute(e, t, n, i, r, o) { + const s = e.shaderBuilder, c = ModelUtility.getAttributeInfo(t), l = r && !o; + i > 1 ? addMatrixAttributeToRenderResources( + e, + t, + n, + i + ) : addAttributeToRenderResources( + e, + t, + n, + l + ), addAttributeDeclaration(s, c, l), addVaryingDeclaration(s, c), defined(t.semantic) && addSemanticDefine(s, t), updateAttributesStruct(s, c, r), updateInitializeAttributesFunction(s, c, l), updateSetDynamicVaryingsFunction(s, c); +} +function addSemanticDefine(e, t) { + const { semantic: n, setIndex: i } = t; + switch (n) { + case VertexAttributeSemantic$1.NORMAL: + e.addDefine("HAS_NORMALS"); + break; + case VertexAttributeSemantic$1.TANGENT: + e.addDefine("HAS_TANGENTS"); + break; + case VertexAttributeSemantic$1.FEATURE_ID: + e.addDefine(`HAS${n}_${i}`); + break; + case VertexAttributeSemantic$1.TEXCOORD: + case VertexAttributeSemantic$1.COLOR: + e.addDefine(`HAS_${n}_${i}`); + } +} +function addAttributeToRenderResources(e, t, n, i) { + const { quantization: r, semantic: o, setIndex: s } = t, { type: c, componentDatatype: l } = defined(r) ? r : t; + o === VertexAttributeSemantic$1.FEATURE_ID && s >= e.featureIdVertexAttributeSetIndex && (e.featureIdVertexAttributeSetIndex = s + 1); + const d = o === VertexAttributeSemantic$1.POSITION, f = d ? 0 : n, h = AttributeType$1.getNumberOfComponents(c), p = { + index: f, + value: defined(t.buffer) ? void 0 : t.constant, + vertexBuffer: t.buffer, + count: t.count, + componentsPerAttribute: h, + componentDatatype: l, + offsetInBytes: t.byteOffset, + strideInBytes: t.byteStride, + normalize: t.normalized + }; + if (e.attributes.push(p), !d || !i) + return; + const m = e.runtimePrimitive.positionBuffer2D, _ = { + index: n, + vertexBuffer: m, + count: t.count, + componentsPerAttribute: h, + componentDatatype: ComponentDatatype$1.FLOAT, + // Projected positions will always be floats. + offsetInBytes: 0, + strideInBytes: void 0, + normalize: t.normalized + }; + e.attributes.push(_); +} +function addMatrixAttributeToRenderResources(e, t, n, i) { + const { quantization: r, normalized: o } = t, { type: s, componentDatatype: c } = defined(r) ? r : t, d = AttributeType$1.getNumberOfComponents(s) / i, f = ComponentDatatype$1.getSizeInBytes( + c + ), h = d * f, p = t.byteStride; + for (let m = 0; m < i; m++) { + const _ = t.byteOffset + m * h, y = { + index: n + m, + vertexBuffer: t.buffer, + componentsPerAttribute: d, + componentDatatype: c, + offsetInBytes: _, + strideInBytes: p, + normalize: o + }; + e.attributes.push(y); + } +} +function addVaryingDeclaration(e, t) { + const n = t.variableName; + let i = `v_${n}`, r; + n === "normalMC" ? (i = "v_normalEC", r = t.glslType) : n === "tangentMC" ? (r = "vec3", i = "v_tangentEC") : r = t.glslType, e.addVarying(r, i); +} +function addAttributeDeclaration(e, t, n) { + const i = t.attribute.semantic, r = t.variableName; + let o, s; + t.isQuantized ? (o = `a_quantized_${r}`, s = t.quantizedGlslType) : (o = `a_${r}`, s = t.glslType); + const c = i === VertexAttributeSemantic$1.POSITION; + c ? e.setPositionAttribute(s, o) : e.addAttribute(s, o), c && n && e.addAttribute("vec3", "a_position2D"); +} +function updateAttributesStruct(e, t, n) { + const i = GeometryPipelineStage.STRUCT_ID_PROCESSED_ATTRIBUTES_VS, r = GeometryPipelineStage.STRUCT_ID_PROCESSED_ATTRIBUTES_FS, { variableName: o, glslType: s } = t; + o === "tangentMC" ? (e.addStructField(i, "vec3", "tangentMC"), e.addStructField(i, "float", "tangentSignMC"), e.addStructField(r, "vec3", "tangentEC")) : o === "normalMC" ? (e.addStructField(i, "vec3", "normalMC"), e.addStructField(r, "vec3", "normalEC")) : (e.addStructField(i, s, o), e.addStructField(r, s, o)), o === "positionMC" && n && e.addStructField(i, "vec3", "position2D"); +} +function updateInitializeAttributesFunction(e, t, n) { + const i = GeometryPipelineStage.FUNCTION_ID_INITIALIZE_ATTRIBUTES, r = t.variableName; + if (r === "positionMC" && n && e.addFunctionLines(i, ["attributes.position2D = a_position2D;"]), t.isQuantized) + return; + const s = []; + r === "tangentMC" ? (s.push("attributes.tangentMC = a_tangentMC.xyz;"), s.push("attributes.tangentSignMC = a_tangentMC.w;")) : s.push(`attributes.${r} = a_${r};`), e.addFunctionLines(i, s); +} +function updateSetDynamicVaryingsFunction(e, t) { + const { semantic: n, setIndex: i } = t.attribute; + if (defined(n) && !defined(i)) + return; + let r = GeometryPipelineStage.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS; + const o = t.variableName; + let s = `v_${o} = attributes.${o};`; + e.addFunctionLines(r, [s]), r = GeometryPipelineStage.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS, s = `attributes.${o} = v_${o};`, e.addFunctionLines(r, [s]); +} +function handleBitangents(e, t) { + let n = !1, i = !1; + for (let r = 0; r < t.length; r++) { + const o = t[r]; + o.semantic === VertexAttributeSemantic$1.NORMAL ? n = !0 : o.semantic === VertexAttributeSemantic$1.TANGENT && (i = !0); + } + !n || !i || (e.addDefine("HAS_BITANGENTS"), e.addVarying("vec3", "v_bitangentEC"), e.addStructField( + GeometryPipelineStage.STRUCT_ID_PROCESSED_ATTRIBUTES_VS, + "vec3", + "bitangentMC" + ), e.addStructField( + GeometryPipelineStage.STRUCT_ID_PROCESSED_ATTRIBUTES_FS, + "vec3", + "bitangentEC" + )); +} +const LightingStageFS = `#ifdef USE_IBL_LIGHTING +vec3 computeIBL(vec3 position, vec3 normal, vec3 lightDirection, vec3 lightColorHdr, czm_modelMaterial material) +{ + #if defined(DIFFUSE_IBL) || defined(SPECULAR_IBL) + // Environment maps were provided, use them for IBL + vec3 viewDirection = -normalize(position); + vec3 iblColor = textureIBL(viewDirection, normal, material); + #else + // Use procedural IBL if there are no environment maps + vec3 imageBasedLighting = proceduralIBL(position, normal, lightDirection, material); + float maximumComponent = czm_maximumComponent(lightColorHdr); + vec3 clampedLightColor = lightColorHdr / max(maximumComponent, 1.0); + vec3 iblColor = clampedLightColor * imageBasedLighting; + #endif + return iblColor * material.occlusion; +} +#endif + +#ifdef USE_CLEARCOAT +vec3 addClearcoatReflection(vec3 baseLayerColor, vec3 position, vec3 lightDirection, vec3 lightColorHdr, czm_modelMaterial material) +{ + vec3 viewDirection = -normalize(position); + vec3 halfwayDirection = normalize(viewDirection + lightDirection); + vec3 normal = material.clearcoatNormal; + float NdotL = clamp(dot(normal, lightDirection), 0.001, 1.0); + + // clearcoatF0 = vec3(pow((ior - 1.0) / (ior + 1.0), 2.0)), but without KHR_materials_ior, ior is a constant 1.5. + vec3 f0 = vec3(0.04); + vec3 f90 = vec3(1.0); + // Note: clearcoat Fresnel computed with dot(n, v) instead of dot(v, h). + // This is to make it energy conserving with a simple layering function. + float NdotV = clamp(dot(normal, viewDirection), 0.0, 1.0); + vec3 F = fresnelSchlick2(f0, f90, NdotV); + + // compute specular reflection from direct lighting + float roughness = material.clearcoatRoughness; + float alphaRoughness = roughness * roughness; + float directStrength = computeDirectSpecularStrength(normal, lightDirection, viewDirection, halfwayDirection, alphaRoughness); + vec3 directReflection = F * directStrength * NdotL; + vec3 color = lightColorHdr * directReflection; + + #ifdef SPECULAR_IBL + // Find the direction in which to sample the environment map + vec3 reflectMC = normalize(model_iblReferenceFrameMatrix * reflect(-viewDirection, normal)); + vec3 iblColor = computeSpecularIBL(reflectMC, NdotV, f0, roughness); + color += iblColor * material.occlusion; + #elif defined(USE_IBL_LIGHTING) + vec3 positionWC = vec3(czm_inverseView * vec4(position, 1.0)); + vec3 reflectionWC = normalize(czm_inverseViewRotation * reflect(viewDirection, normal)); + vec3 skyMetrics = getProceduralSkyMetrics(positionWC, reflectionWC); + + vec3 specularIrradiance = getProceduralSpecularIrradiance(reflectionWC, skyMetrics, roughness); + vec2 brdfLut = texture(czm_brdfLut, vec2(NdotV, roughness)).rg; + vec3 specularColor = czm_srgbToLinear(f0 * brdfLut.x + brdfLut.y); + vec3 iblColor = specularIrradiance * specularColor * model_iblFactor.y; + #ifdef USE_SUN_LUMINANCE + iblColor *= getSunLuminance(positionWC, normal, lightDirection); + #endif + float maximumComponent = czm_maximumComponent(lightColorHdr); + vec3 clampedLightColor = lightColorHdr / max(maximumComponent, 1.0); + color += clampedLightColor * iblColor * material.occlusion; + #endif + + float clearcoatFactor = material.clearcoatFactor; + vec3 clearcoatColor = color * clearcoatFactor; + + // Dim base layer based on transmission loss through clearcoat + return baseLayerColor * (1.0 - clearcoatFactor * F) + clearcoatColor; +} +#endif + +#if defined(LIGHTING_PBR) && defined(HAS_NORMALS) +vec3 computePbrLighting(in czm_modelMaterial material, in vec3 position) +{ + #ifdef USE_CUSTOM_LIGHT_COLOR + vec3 lightColorHdr = model_lightColorHdr; + #else + vec3 lightColorHdr = czm_lightColorHdr; + #endif + + vec3 viewDirection = -normalize(position); + vec3 normal = material.normalEC; + vec3 lightDirection = normalize(czm_lightDirectionEC); + + vec3 directColor = czm_pbrLighting(position, viewDirection, normal, lightDirection, material); + + // Accumulate colors from base layer + vec3 color = directColor + material.emissive; + #ifndef USE_VCS_CUSTOM_SHADING + #ifdef USE_IBL_LIGHTING + color += computeIBL(position, normal, lightDirection, lightColorHdr, material); + #endif + #endif + + #ifdef USE_CLEARCOAT + color = addClearcoatReflection(color, position, lightDirection, lightColorHdr, material); + #endif + + return color; +} +#endif + +/** + * Compute the material color under the current lighting conditions. + * All other material properties are passed through so further stages + * have access to them. + * + * @param {czm_modelMaterial} material The material properties from {@MaterialStageFS} + * @param {ProcessedAttributes} attributes + */ +void lightingStage(inout czm_modelMaterial material, ProcessedAttributes attributes) +{ + #ifdef LIGHTING_PBR + #ifdef HAS_NORMALS + vec3 color = computePbrLighting(material, attributes.positionEC); + #else + vec3 color = material.diffuse * material.occlusion + material.emissive; + #endif + // In HDR mode, the frame buffer is in linear color space. The + // post-processing stages (see PostProcessStageCollection) will handle + // tonemapping. However, if HDR is not enabled, we must tonemap else large + // values may be clamped to 1.0 + #ifndef HDR + #ifndef USE_VCS_CUSTOM_SHADING + // Custom VCS Shading, if VCS Shading is activated we do not do toneMapping for models, + color = czm_pbrNeutralTonemapping(color); + #endif + #endif + #else // unlit + vec3 color = material.diffuse; + #endif + + #ifdef HAS_POINT_CLOUD_COLOR_STYLE + // The colors resulting from point cloud styles are adjusted differently. + color = czm_gammaCorrect(color); + #elif !defined(HDR) + // If HDR is not enabled, the frame buffer stores sRGB colors rather than + // linear colors so the linear value must be converted. + color = czm_linearToSrgb(color); + #endif + + material.diffuse = color; +} +`, LightingModel = { + /** + * Use unlit shading, i.e. skip lighting calculations. The model's + * diffuse color (assumed to be linear RGB, not sRGB) is used directly + * when computingout_FragColor. The alpha mode is still
+ * applied.
+ *
+ * @type {number}
+ * @constant
+ */
+ UNLIT: 0,
+ /**
+ * Use physically-based rendering lighting calculations. This includes
+ * both PBR metallic roughness and PBR specular glossiness. Image-based
+ * lighting is also applied when possible.
+ *
+ * @type {number}
+ * @constant
+ */
+ PBR: 1
+}, LightingModel$1 = Object.freeze(LightingModel), LightingPipelineStage = {
+ name: "LightingPipelineStage"
+ // Helps with debugging
+};
+LightingPipelineStage.process = function(e, t) {
+ const { model: n, lightingOptions: i, shaderBuilder: r } = e;
+ if (defined(n.lightColor)) {
+ r.addDefine(
+ "USE_CUSTOM_LIGHT_COLOR",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ), r.addUniform(
+ "vec3",
+ "model_lightColorHdr",
+ ShaderDestination$1.FRAGMENT
+ );
+ const s = e.uniformMap;
+ s.model_lightColorHdr = function() {
+ return n.lightColor;
+ };
+ }
+ const { lightingModel: o } = i;
+ o === LightingModel$1.PBR ? (r.addDefine(
+ "LIGHTING_PBR",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ), typeof globalThis < "u" && globalThis.useVcsCustomShading && r.addDefine(
+ "USE_VCS_CUSTOM_SHADING",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ )) : r.addDefine(
+ "LIGHTING_UNLIT",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ), r.addFragmentLines(LightingStageFS);
+};
+const MaterialStageFS = `// If the style color is white, it implies the feature has not been styled.
+bool isDefaultStyleColor(vec3 color)
+{
+ return all(greaterThan(color, vec3(1.0 - czm_epsilon3)));
+}
+
+vec3 blend(vec3 sourceColor, vec3 styleColor, float styleColorBlend)
+{
+ vec3 blendColor = mix(sourceColor, styleColor, styleColorBlend);
+ vec3 color = isDefaultStyleColor(styleColor.rgb) ? sourceColor : blendColor;
+ return color;
+}
+
+vec2 computeTextureTransform(vec2 texCoord, mat3 textureTransform)
+{
+ return vec2(textureTransform * vec3(texCoord, 1.0));
+}
+
+#ifdef HAS_NORMAL_TEXTURE
+vec2 getNormalTexCoords()
+{
+ vec2 texCoord = TEXCOORD_NORMAL;
+ #ifdef HAS_NORMAL_TEXTURE_TRANSFORM
+ texCoord = vec2(u_normalTextureTransform * vec3(texCoord, 1.0));
+ #endif
+ return texCoord;
+}
+#endif
+
+#if defined(HAS_NORMAL_TEXTURE) || defined(HAS_CLEARCOAT_NORMAL_TEXTURE)
+vec3 computeTangent(in vec3 position, in vec2 normalTexCoords)
+{
+ vec2 tex_dx = dFdx(normalTexCoords);
+ vec2 tex_dy = dFdy(normalTexCoords);
+ float determinant = tex_dx.x * tex_dy.y - tex_dy.x * tex_dx.y;
+ vec3 tangent = tex_dy.t * dFdx(position) - tex_dx.t * dFdy(position);
+ return tangent / determinant;
+}
+#endif
+
+#ifdef USE_ANISOTROPY
+struct NormalInfo {
+ vec3 tangent;
+ vec3 bitangent;
+ vec3 normal;
+ vec3 geometryNormal;
+};
+
+NormalInfo getNormalInfo(ProcessedAttributes attributes)
+{
+ vec3 geometryNormal = attributes.normalEC;
+ #ifdef HAS_NORMAL_TEXTURE
+ vec2 normalTexCoords = getNormalTexCoords();
+ #endif
+
+ #ifdef HAS_BITANGENTS
+ vec3 tangent = attributes.tangentEC;
+ vec3 bitangent = attributes.bitangentEC;
+ #else // Assume HAS_NORMAL_TEXTURE
+ vec3 tangent = computeTangent(attributes.positionEC, normalTexCoords);
+ tangent = normalize(tangent - geometryNormal * dot(geometryNormal, tangent));
+ vec3 bitangent = normalize(cross(geometryNormal, tangent));
+ #endif
+
+ #ifdef HAS_NORMAL_TEXTURE
+ mat3 tbn = mat3(tangent, bitangent, geometryNormal);
+ vec3 normalSample = texture(u_normalTexture, normalTexCoords).rgb;
+ normalSample = 2.0 * normalSample - 1.0;
+ #ifdef HAS_NORMAL_TEXTURE_SCALE
+ normalSample.xy *= u_normalTextureScale;
+ #endif
+ vec3 normal = normalize(tbn * normalSample);
+ #else
+ vec3 normal = geometryNormal;
+ #endif
+
+ #ifdef HAS_DOUBLE_SIDED_MATERIAL
+ if (czm_backFacing()) {
+ tangent *= -1.0;
+ bitangent *= -1.0;
+ normal *= -1.0;
+ geometryNormal *= -1.0;
+ }
+ #endif
+
+ NormalInfo normalInfo;
+ normalInfo.tangent = tangent;
+ normalInfo.bitangent = bitangent;
+ normalInfo.normal = normal;
+ normalInfo.geometryNormal = geometryNormal;
+
+ return normalInfo;
+}
+#endif
+
+#if defined(HAS_NORMAL_TEXTURE) && !defined(HAS_WIREFRAME)
+vec3 getNormalFromTexture(ProcessedAttributes attributes, vec3 geometryNormal)
+{
+ vec2 normalTexCoords = getNormalTexCoords();
+
+ // If HAS_BITANGENTS is set, then HAS_TANGENTS is also set
+ #ifdef HAS_BITANGENTS
+ vec3 t = attributes.tangentEC;
+ vec3 b = attributes.bitangentEC;
+ #else
+ vec3 t = computeTangent(attributes.positionEC, normalTexCoords);
+ t = normalize(t - geometryNormal * dot(geometryNormal, t));
+ vec3 b = normalize(cross(geometryNormal, t));
+ #endif
+
+ mat3 tbn = mat3(t, b, geometryNormal);
+ vec3 normalSample = texture(u_normalTexture, normalTexCoords).rgb;
+ normalSample = 2.0 * normalSample - 1.0;
+ #ifdef HAS_NORMAL_TEXTURE_SCALE
+ normalSample.xy *= u_normalTextureScale;
+ #endif
+ return normalize(tbn * normalSample);
+}
+#endif
+
+#ifdef HAS_CLEARCOAT_NORMAL_TEXTURE
+vec3 getClearcoatNormalFromTexture(ProcessedAttributes attributes, vec3 geometryNormal)
+{
+ vec2 normalTexCoords = TEXCOORD_CLEARCOAT_NORMAL;
+ #ifdef HAS_CLEARCOAT_NORMAL_TEXTURE_TRANSFORM
+ normalTexCoords = vec2(u_clearcoatNormalTextureTransform * vec3(normalTexCoords, 1.0));
+ #endif
+
+ // If HAS_BITANGENTS is set, then HAS_TANGENTS is also set
+ #ifdef HAS_BITANGENTS
+ vec3 t = attributes.tangentEC;
+ vec3 b = attributes.bitangentEC;
+ #else
+ vec3 t = computeTangent(attributes.positionEC, normalTexCoords);
+ t = normalize(t - geometryNormal * dot(geometryNormal, t));
+ vec3 b = normalize(cross(geometryNormal, t));
+ #endif
+
+ mat3 tbn = mat3(t, b, geometryNormal);
+ vec3 normalSample = texture(u_clearcoatNormalTexture, normalTexCoords).rgb;
+ normalSample = 2.0 * normalSample - 1.0;
+ #ifdef HAS_CLEARCOAT_NORMAL_TEXTURE_SCALE
+ normalSample.xy *= u_clearcoatNormalTextureScale;
+ #endif
+ return normalize(tbn * normalSample);
+}
+#endif
+
+#ifdef HAS_NORMALS
+vec3 computeNormal(ProcessedAttributes attributes)
+{
+ // Geometry normal. This is already normalized
+ vec3 normal = attributes.normalEC;
+
+ #if defined(HAS_NORMAL_TEXTURE) && !defined(HAS_WIREFRAME)
+ normal = getNormalFromTexture(attributes, normal);
+ #endif
+
+ #ifdef HAS_DOUBLE_SIDED_MATERIAL
+ if (czm_backFacing()) {
+ normal = -normal;
+ }
+ #endif
+
+ return normal;
+}
+#endif
+
+#ifdef HAS_BASE_COLOR_TEXTURE
+vec4 getBaseColorFromTexture()
+{
+ vec2 baseColorTexCoords = TEXCOORD_BASE_COLOR;
+ #ifdef HAS_BASE_COLOR_TEXTURE_TRANSFORM
+ baseColorTexCoords = computeTextureTransform(baseColorTexCoords, u_baseColorTextureTransform);
+ #endif
+
+ vec4 baseColorWithAlpha = czm_srgbToLinear(texture(u_baseColorTexture, baseColorTexCoords));
+
+ #ifdef HAS_BASE_COLOR_FACTOR
+ // Custom VCS Color Handling, if VCS Shader is activated and the model has useSRGBColorFactors set we
+ // handle the baseColorFactor as SRGB values instead of linear color
+ #ifdef USE_VCS_SRGB_COLOR_FACTORS
+ baseColorWithAlpha *= czm_srgbToLinear(u_baseColorFactor);
+ #else
+ baseColorWithAlpha *= u_baseColorFactor;
+ #endif
+ #endif
+
+ return baseColorWithAlpha;
+}
+#endif
+
+#ifdef HAS_EMISSIVE_TEXTURE
+vec3 getEmissiveFromTexture()
+{
+ vec2 emissiveTexCoords = TEXCOORD_EMISSIVE;
+ #ifdef HAS_EMISSIVE_TEXTURE_TRANSFORM
+ emissiveTexCoords = computeTextureTransform(emissiveTexCoords, u_emissiveTextureTransform);
+ #endif
+
+ vec3 emissive = czm_srgbToLinear(texture(u_emissiveTexture, emissiveTexCoords).rgb);
+ #ifdef HAS_EMISSIVE_FACTOR
+ emissive *= u_emissiveFactor;
+ #endif
+
+ return emissive;
+}
+#endif
+
+#if defined(LIGHTING_PBR) && defined(USE_SPECULAR_GLOSSINESS)
+void setSpecularGlossiness(inout czm_modelMaterial material)
+{
+ #ifdef HAS_SPECULAR_GLOSSINESS_TEXTURE
+ vec2 specularGlossinessTexCoords = TEXCOORD_SPECULAR_GLOSSINESS;
+ #ifdef HAS_SPECULAR_GLOSSINESS_TEXTURE_TRANSFORM
+ specularGlossinessTexCoords = computeTextureTransform(specularGlossinessTexCoords, u_specularGlossinessTextureTransform);
+ #endif
+
+ vec4 specularGlossiness = czm_srgbToLinear(texture(u_specularGlossinessTexture, specularGlossinessTexCoords));
+ vec3 specular = specularGlossiness.rgb;
+ float glossiness = specularGlossiness.a;
+ #ifdef HAS_LEGACY_SPECULAR_FACTOR
+ specular *= u_legacySpecularFactor;
+ #endif
+
+ #ifdef HAS_GLOSSINESS_FACTOR
+ glossiness *= u_glossinessFactor;
+ #endif
+ #else
+ #ifdef HAS_LEGACY_SPECULAR_FACTOR
+ vec3 specular = clamp(u_legacySpecularFactor, vec3(0.0), vec3(1.0));
+ #else
+ vec3 specular = vec3(1.0);
+ #endif
+
+ #ifdef HAS_GLOSSINESS_FACTOR
+ float glossiness = clamp(u_glossinessFactor, 0.0, 1.0);
+ #else
+ float glossiness = 1.0;
+ #endif
+ #endif
+
+ #ifdef HAS_DIFFUSE_TEXTURE
+ vec2 diffuseTexCoords = TEXCOORD_DIFFUSE;
+ #ifdef HAS_DIFFUSE_TEXTURE_TRANSFORM
+ diffuseTexCoords = computeTextureTransform(diffuseTexCoords, u_diffuseTextureTransform);
+ #endif
+
+ vec4 diffuse = czm_srgbToLinear(texture(u_diffuseTexture, diffuseTexCoords));
+ #ifdef HAS_DIFFUSE_FACTOR
+ diffuse *= u_diffuseFactor;
+ #endif
+ #elif defined(HAS_DIFFUSE_FACTOR)
+ vec4 diffuse = clamp(u_diffuseFactor, vec4(0.0), vec4(1.0));
+ #else
+ vec4 diffuse = vec4(1.0);
+ #endif
+
+ material.diffuse = diffuse.rgb * (1.0 - czm_maximumComponent(specular));
+ // the specular glossiness extension's alpha overrides anything set
+ // by the base material.
+ material.alpha = diffuse.a;
+
+ material.specular = specular;
+
+ // glossiness is the opposite of roughness, but easier for artists to use.
+ material.roughness = 1.0 - glossiness;
+}
+#elif defined(LIGHTING_PBR)
+float setMetallicRoughness(inout czm_modelMaterial material)
+{
+ #ifdef HAS_METALLIC_ROUGHNESS_TEXTURE
+ vec2 metallicRoughnessTexCoords = TEXCOORD_METALLIC_ROUGHNESS;
+ #ifdef HAS_METALLIC_ROUGHNESS_TEXTURE_TRANSFORM
+ metallicRoughnessTexCoords = computeTextureTransform(metallicRoughnessTexCoords, u_metallicRoughnessTextureTransform);
+ #endif
+
+ vec3 metallicRoughness = texture(u_metallicRoughnessTexture, metallicRoughnessTexCoords).rgb;
+ float metalness = clamp(metallicRoughness.b, 0.0, 1.0);
+ float roughness = clamp(metallicRoughness.g, 0.0, 1.0);
+ #ifdef HAS_METALLIC_FACTOR
+ metalness = clamp(metalness * u_metallicFactor, 0.0, 1.0);
+ #endif
+
+ #ifdef HAS_ROUGHNESS_FACTOR
+ roughness = clamp(roughness * u_roughnessFactor, 0.0, 1.0);
+ #endif
+ #else
+ #ifdef HAS_METALLIC_FACTOR
+ float metalness = clamp(u_metallicFactor, 0.0, 1.0);
+ #else
+ float metalness = 1.0;
+ #endif
+
+ #ifdef HAS_ROUGHNESS_FACTOR
+ float roughness = clamp(u_roughnessFactor, 0.0, 1.0);
+ #else
+ float roughness = 1.0;
+ #endif
+ #endif
+
+ // dielectrics use f0 = 0.04, metals use albedo as f0
+ const vec3 REFLECTANCE_DIELECTRIC = vec3(0.04);
+ vec3 f0 = mix(REFLECTANCE_DIELECTRIC, material.baseColor.rgb, metalness);
+
+ material.specular = f0;
+
+ // diffuse only applies to dielectrics.
+ material.diffuse = mix(material.baseColor.rgb, vec3(0.0), metalness);
+
+ // This is perceptual roughness. The square of this value is used for direct lighting
+ material.roughness = roughness;
+
+ return metalness;
+}
+#ifdef USE_SPECULAR
+void setSpecular(inout czm_modelMaterial material, in float metalness)
+{
+ #ifdef HAS_SPECULAR_TEXTURE
+ vec2 specularTexCoords = TEXCOORD_SPECULAR;
+ #ifdef HAS_SPECULAR_TEXTURE_TRANSFORM
+ specularTexCoords = computeTextureTransform(specularTexCoords, u_specularTextureTransform);
+ #endif
+ float specularWeight = texture(u_specularTexture, specularTexCoords).a;
+ #ifdef HAS_SPECULAR_FACTOR
+ specularWeight *= u_specularFactor;
+ #endif
+ #else
+ #ifdef HAS_SPECULAR_FACTOR
+ float specularWeight = u_specularFactor;
+ #else
+ float specularWeight = 1.0;
+ #endif
+ #endif
+
+ #ifdef HAS_SPECULAR_COLOR_TEXTURE
+ vec2 specularColorTexCoords = TEXCOORD_SPECULAR_COLOR;
+ #ifdef HAS_SPECULAR_COLOR_TEXTURE_TRANSFORM
+ specularColorTexCoords = computeTextureTransform(specularColorTexCoords, u_specularColorTextureTransform);
+ #endif
+ vec3 specularColorSample = texture(u_specularColorTexture, specularColorTexCoords).rgb;
+ vec3 specularColorFactor = czm_srgbToLinear(specularColorSample);
+ #ifdef HAS_SPECULAR_COLOR_FACTOR
+ specularColorFactor *= u_specularColorFactor;
+ #endif
+ #else
+ #ifdef HAS_SPECULAR_COLOR_FACTOR
+ vec3 specularColorFactor = u_specularColorFactor;
+ #else
+ vec3 specularColorFactor = vec3(1.0);
+ #endif
+ #endif
+ material.specularWeight = specularWeight;
+ vec3 f0 = material.specular;
+ vec3 dielectricSpecularF0 = min(f0 * specularColorFactor, vec3(1.0));
+ material.specular = mix(dielectricSpecularF0, material.baseColor.rgb, metalness);
+}
+#endif
+#ifdef USE_ANISOTROPY
+void setAnisotropy(inout czm_modelMaterial material, in NormalInfo normalInfo)
+{
+ mat2 rotation = mat2(u_anisotropy.xy, -u_anisotropy.y, u_anisotropy.x);
+ float anisotropyStrength = u_anisotropy.z;
+
+ vec2 direction = vec2(1.0, 0.0);
+ #ifdef HAS_ANISOTROPY_TEXTURE
+ vec2 anisotropyTexCoords = TEXCOORD_ANISOTROPY;
+ #ifdef HAS_ANISOTROPY_TEXTURE_TRANSFORM
+ anisotropyTexCoords = computeTextureTransform(anisotropyTexCoords, u_anisotropyTextureTransform);
+ #endif
+ vec3 anisotropySample = texture(u_anisotropyTexture, anisotropyTexCoords).rgb;
+ direction = anisotropySample.rg * 2.0 - vec2(1.0);
+ anisotropyStrength *= anisotropySample.b;
+ #endif
+
+ direction = rotation * direction;
+ mat3 tbn = mat3(normalInfo.tangent, normalInfo.bitangent, normalInfo.normal);
+ vec3 anisotropicT = tbn * normalize(vec3(direction, 0.0));
+ vec3 anisotropicB = cross(normalInfo.geometryNormal, anisotropicT);
+
+ material.anisotropicT = anisotropicT;
+ material.anisotropicB = anisotropicB;
+ material.anisotropyStrength = anisotropyStrength;
+}
+#endif
+#ifdef USE_CLEARCOAT
+void setClearcoat(inout czm_modelMaterial material, in ProcessedAttributes attributes)
+{
+ #ifdef HAS_CLEARCOAT_TEXTURE
+ vec2 clearcoatTexCoords = TEXCOORD_CLEARCOAT;
+ #ifdef HAS_CLEARCOAT_TEXTURE_TRANSFORM
+ clearcoatTexCoords = computeTextureTransform(clearcoatTexCoords, u_clearcoatTextureTransform);
+ #endif
+ float clearcoatFactor = texture(u_clearcoatTexture, clearcoatTexCoords).r;
+ #ifdef HAS_CLEARCOAT_FACTOR
+ clearcoatFactor *= u_clearcoatFactor;
+ #endif
+ #else
+ #ifdef HAS_CLEARCOAT_FACTOR
+ float clearcoatFactor = u_clearcoatFactor;
+ #else
+ // PERFORMANCE_IDEA: this case should turn the whole extension off
+ float clearcoatFactor = 0.0;
+ #endif
+ #endif
+
+ #ifdef HAS_CLEARCOAT_ROUGHNESS_TEXTURE
+ vec2 clearcoatRoughnessTexCoords = TEXCOORD_CLEARCOAT_ROUGHNESS;
+ #ifdef HAS_CLEARCOAT_ROUGHNESS_TEXTURE_TRANSFORM
+ clearcoatRoughnessTexCoords = computeTextureTransform(clearcoatRoughnessTexCoords, u_clearcoatRoughnessTextureTransform);
+ #endif
+ float clearcoatRoughness = texture(u_clearcoatRoughnessTexture, clearcoatRoughnessTexCoords).g;
+ #ifdef HAS_CLEARCOAT_ROUGHNESS_FACTOR
+ clearcoatRoughness *= u_clearcoatRoughnessFactor;
+ #endif
+ #else
+ #ifdef HAS_CLEARCOAT_ROUGHNESS_FACTOR
+ float clearcoatRoughness = u_clearcoatRoughnessFactor;
+ #else
+ float clearcoatRoughness = 0.0;
+ #endif
+ #endif
+
+ material.clearcoatFactor = clearcoatFactor;
+ // This is perceptual roughness. The square of this value is used for direct lighting
+ material.clearcoatRoughness = clearcoatRoughness;
+ #ifdef HAS_CLEARCOAT_NORMAL_TEXTURE
+ material.clearcoatNormal = getClearcoatNormalFromTexture(attributes, attributes.normalEC);
+ #else
+ material.clearcoatNormal = attributes.normalEC;
+ #endif
+}
+#endif
+#endif
+
+void materialStage(inout czm_modelMaterial material, ProcessedAttributes attributes, SelectedFeature feature)
+{
+ #ifdef USE_ANISOTROPY
+ NormalInfo normalInfo = getNormalInfo(attributes);
+ material.normalEC = normalInfo.normal;
+ #elif defined(HAS_NORMALS)
+ material.normalEC = computeNormal(attributes);
+ #endif
+
+ vec4 baseColorWithAlpha = vec4(1.0);
+ // Regardless of whether we use PBR, set a base color
+ #ifdef HAS_BASE_COLOR_TEXTURE
+ baseColorWithAlpha = getBaseColorFromTexture();
+ #elif defined(HAS_BASE_COLOR_FACTOR)
+ // Custom VCS Color Handling, if VCS Shader is activated and the model has useSRGBColorFactors set we
+ // handle the baseColorFactor as SRGB values instead of linear color
+ #ifdef USE_VCS_SRGB_COLOR_FACTORS
+ baseColorWithAlpha *= czm_srgbToLinear(u_baseColorFactor);
+ #else
+ baseColorWithAlpha *= u_baseColorFactor;
+ #endif
+ #endif
+
+ #ifdef HAS_POINT_CLOUD_COLOR_STYLE
+ baseColorWithAlpha = v_pointCloudColor;
+ #elif defined(HAS_COLOR_0)
+ vec4 color = attributes.color_0;
+ // .pnts files store colors in the sRGB color space
+ #ifdef HAS_SRGB_COLOR
+ color = czm_srgbToLinear(color);
+ #elif defined(USE_VCS_SRGB_VERTEX_COLORS)
+ // Custom VCS Color Handling, if VCS Shader is activated and the model has useSRGBAVertexColor set we
+ // handle the baseColorFactor as SRGB values instead of linear color
+ color = czm_srgbToLinear(color);
+ #endif
+ baseColorWithAlpha *= color;
+ #endif
+
+ #ifdef USE_CPU_STYLING
+ baseColorWithAlpha.rgb = blend(baseColorWithAlpha.rgb, feature.color.rgb, model_colorBlend);
+ #endif
+ material.baseColor = baseColorWithAlpha;
+ material.diffuse = baseColorWithAlpha.rgb;
+ material.alpha = baseColorWithAlpha.a;
+
+ #ifdef HAS_OCCLUSION_TEXTURE
+ vec2 occlusionTexCoords = TEXCOORD_OCCLUSION;
+ #ifdef HAS_OCCLUSION_TEXTURE_TRANSFORM
+ occlusionTexCoords = computeTextureTransform(occlusionTexCoords, u_occlusionTextureTransform);
+ #endif
+ material.occlusion = texture(u_occlusionTexture, occlusionTexCoords).r;
+ #endif
+
+ #ifdef HAS_EMISSIVE_TEXTURE
+ material.emissive = getEmissiveFromTexture();
+ #elif defined(HAS_EMISSIVE_FACTOR)
+ material.emissive = u_emissiveFactor;
+ #endif
+
+ #if defined(LIGHTING_PBR) && defined(USE_SPECULAR_GLOSSINESS)
+ setSpecularGlossiness(material);
+ #elif defined(LIGHTING_PBR)
+ float metalness = setMetallicRoughness(material);
+ #ifdef USE_SPECULAR
+ setSpecular(material, metalness);
+ #endif
+ #ifdef USE_ANISOTROPY
+ setAnisotropy(material, normalInfo);
+ #endif
+ #ifdef USE_CLEARCOAT
+ setClearcoat(material, attributes);
+ #endif
+ #endif
+}
+`, {
+ Material: Material$1,
+ MetallicRoughness: MetallicRoughness$1,
+ SpecularGlossiness,
+ Specular,
+ Clearcoat
+} = ModelComponents, MaterialPipelineStage = {
+ name: "MaterialPipelineStage",
+ // Helps with debugging
+ // Expose some methods for testing
+ _processTexture: processTexture,
+ _processTextureTransform: processTextureTransform
+};
+MaterialPipelineStage.process = function(e, t, n) {
+ const i = t.material, { model: r, uniformMap: o, shaderBuilder: s } = e, c = defined(r.classificationType), l = c, {
+ defaultTexture: d,
+ defaultNormalTexture: f,
+ defaultEmissiveTexture: h
+ } = n.context;
+ processMaterialUniforms(
+ i,
+ o,
+ s,
+ d,
+ f,
+ h,
+ l
+ ), defined(i.specularGlossiness) ? processSpecularGlossinessUniforms(
+ i.specularGlossiness,
+ o,
+ s,
+ d,
+ l
+ ) : (defined(i.specular) && ModelUtility.supportedExtensions.KHR_materials_specular && processSpecularUniforms(
+ i.specular,
+ o,
+ s,
+ d,
+ l
+ ), defined(i.anisotropy) && ModelUtility.supportedExtensions.KHR_materials_anisotropy && processAnisotropyUniforms(
+ i.anisotropy,
+ o,
+ s,
+ d,
+ l
+ ), defined(i.clearcoat) && ModelUtility.supportedExtensions.KHR_materials_clearcoat && processClearcoatUniforms(
+ i.clearcoat,
+ o,
+ s,
+ d,
+ l
+ ), processMetallicRoughnessUniforms(
+ i.metallicRoughness,
+ o,
+ s,
+ d,
+ l
+ ));
+ const p = ModelUtility.getAttributeBySemantic(
+ t,
+ VertexAttributeSemantic$1.NORMAL
+ ), m = e.lightingOptions;
+ i.unlit || !p || c ? m.lightingModel = LightingModel$1.UNLIT : m.lightingModel = LightingModel$1.PBR;
+ const _ = r.backFaceCulling && !i.doubleSided;
+ e.renderStateOptions.cull.enabled = _;
+ const y = e.alphaOptions;
+ i.alphaMode === AlphaMode$1.BLEND ? y.pass = Pass$1.TRANSLUCENT : i.alphaMode === AlphaMode$1.MASK && (y.alphaCutoff = i.alphaCutoff), s.addFragmentLines(MaterialStageFS), i.doubleSided && s.addDefine(
+ "HAS_DOUBLE_SIDED_MATERIAL",
+ void 0,
+ ShaderDestination$1.BOTH
+ );
+};
+function processTextureTransform(e, t, n, i, r) {
+ const o = `HAS_${r}_TEXTURE_TRANSFORM`;
+ e.addDefine(
+ o,
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ );
+ const s = `${i}Transform`;
+ e.addUniform(
+ "mat3",
+ s,
+ ShaderDestination$1.FRAGMENT
+ ), t[s] = function() {
+ return n.transform;
+ };
+}
+function processTextureScale(e, t, n, i, r) {
+ const o = `HAS_${r}_TEXTURE_SCALE`;
+ e.addDefine(
+ o,
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ );
+ const s = `${i}Scale`;
+ e.addUniform(
+ "float",
+ s,
+ ShaderDestination$1.FRAGMENT
+ ), t[s] = function() {
+ return n.scale;
+ };
+}
+function processTexture(e, t, n, i, r, o) {
+ e.addUniform(
+ "sampler2D",
+ i,
+ ShaderDestination$1.FRAGMENT
+ ), t[i] = function() {
+ return defaultValue(n.texture, o);
+ };
+ const s = `HAS_${r}_TEXTURE`;
+ e.addDefine(s, void 0, ShaderDestination$1.FRAGMENT);
+ const l = `v_texCoord_${n.texCoord}`, d = `TEXCOORD_${r}`;
+ e.addDefine(
+ d,
+ l,
+ ShaderDestination$1.FRAGMENT
+ );
+ const f = n.transform;
+ defined(f) && !Matrix3.equals(f, Matrix3.IDENTITY) && processTextureTransform(
+ e,
+ t,
+ n,
+ i,
+ r
+ );
+ const { scale: h } = n;
+ defined(h) && h !== 1 && processTextureScale(
+ e,
+ t,
+ n,
+ i,
+ r
+ );
+}
+function processMaterialUniforms(e, t, n, i, r, o, s) {
+ const {
+ emissiveFactor: c,
+ emissiveTexture: l,
+ normalTexture: d,
+ occlusionTexture: f
+ } = e;
+ defined(c) && !Cartesian3.equals(c, Material$1.DEFAULT_EMISSIVE_FACTOR) && (n.addUniform(
+ "vec3",
+ "u_emissiveFactor",
+ ShaderDestination$1.FRAGMENT
+ ), t.u_emissiveFactor = function() {
+ return e.emissiveFactor;
+ }, n.addDefine(
+ "HAS_EMISSIVE_FACTOR",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ), defined(l) && !s && processTexture(
+ n,
+ t,
+ l,
+ "u_emissiveTexture",
+ "EMISSIVE",
+ o
+ )), defined(d) && !s && processTexture(
+ n,
+ t,
+ d,
+ "u_normalTexture",
+ "NORMAL",
+ r
+ ), defined(f) && !s && processTexture(
+ n,
+ t,
+ f,
+ "u_occlusionTexture",
+ "OCCLUSION",
+ i
+ );
+}
+function processSpecularGlossinessUniforms(e, t, n, i, r) {
+ const {
+ diffuseTexture: o,
+ diffuseFactor: s,
+ specularGlossinessTexture: c,
+ specularFactor: l,
+ glossinessFactor: d
+ } = e;
+ n.addDefine(
+ "USE_SPECULAR_GLOSSINESS",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ), defined(o) && !r && processTexture(
+ n,
+ t,
+ o,
+ "u_diffuseTexture",
+ "DIFFUSE",
+ i
+ ), defined(s) && !Cartesian4.equals(s, SpecularGlossiness.DEFAULT_DIFFUSE_FACTOR) && (n.addUniform(
+ "vec4",
+ "u_diffuseFactor",
+ ShaderDestination$1.FRAGMENT
+ ), t.u_diffuseFactor = function() {
+ return e.diffuseFactor;
+ }, n.addDefine(
+ "HAS_DIFFUSE_FACTOR",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ )), defined(c) && !r && processTexture(
+ n,
+ t,
+ c,
+ "u_specularGlossinessTexture",
+ "SPECULAR_GLOSSINESS",
+ i
+ ), defined(l) && !Cartesian3.equals(
+ l,
+ SpecularGlossiness.DEFAULT_SPECULAR_FACTOR
+ ) && (n.addUniform(
+ "vec3",
+ "u_legacySpecularFactor",
+ ShaderDestination$1.FRAGMENT
+ ), t.u_legacySpecularFactor = function() {
+ return e.specularFactor;
+ }, n.addDefine(
+ "HAS_LEGACY_SPECULAR_FACTOR",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ )), defined(d) && d !== SpecularGlossiness.DEFAULT_GLOSSINESS_FACTOR && (n.addUniform(
+ "float",
+ "u_glossinessFactor",
+ ShaderDestination$1.FRAGMENT
+ ), t.u_glossinessFactor = function() {
+ return e.glossinessFactor;
+ }, n.addDefine(
+ "HAS_GLOSSINESS_FACTOR",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ));
+}
+function processSpecularUniforms(e, t, n, i, r) {
+ const {
+ specularTexture: o,
+ specularFactor: s,
+ specularColorTexture: c,
+ specularColorFactor: l
+ } = e;
+ n.addDefine(
+ "USE_SPECULAR",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ), defined(o) && !r && processTexture(
+ n,
+ t,
+ o,
+ "u_specularTexture",
+ "SPECULAR",
+ i
+ ), defined(s) && s !== Specular.DEFAULT_SPECULAR_FACTOR && (n.addUniform(
+ "float",
+ "u_specularFactor",
+ ShaderDestination$1.FRAGMENT
+ ), t.u_specularFactor = function() {
+ return e.specularFactor;
+ }, n.addDefine(
+ "HAS_SPECULAR_FACTOR",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ )), defined(c) && !r && processTexture(
+ n,
+ t,
+ c,
+ "u_specularColorTexture",
+ "SPECULAR_COLOR",
+ i
+ ), defined(l) && !Cartesian3.equals(
+ l,
+ Specular.DEFAULT_SPECULAR_COLOR_FACTOR
+ ) && (n.addUniform(
+ "vec3",
+ "u_specularColorFactor",
+ ShaderDestination$1.FRAGMENT
+ ), t.u_specularColorFactor = function() {
+ return e.specularColorFactor;
+ }, n.addDefine(
+ "HAS_SPECULAR_COLOR_FACTOR",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ));
+}
+const scratchAnisotropy = new Cartesian3();
+function processAnisotropyUniforms(e, t, n, i, r) {
+ const {
+ anisotropyStrength: o,
+ anisotropyRotation: s,
+ anisotropyTexture: c
+ } = e;
+ n.addDefine(
+ "USE_ANISOTROPY",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ), defined(c) && !r && processTexture(
+ n,
+ t,
+ c,
+ "u_anisotropyTexture",
+ "ANISOTROPY",
+ i
+ );
+ const l = Math.cos(s), d = Math.sin(s);
+ n.addUniform("vec3", "u_anisotropy", ShaderDestination$1.FRAGMENT), t.u_anisotropy = function() {
+ return Cartesian3.fromElements(
+ l,
+ d,
+ o,
+ scratchAnisotropy
+ );
+ };
+}
+function processClearcoatUniforms(e, t, n, i, r) {
+ const {
+ clearcoatFactor: o,
+ clearcoatTexture: s,
+ clearcoatRoughnessFactor: c,
+ clearcoatRoughnessTexture: l,
+ clearcoatNormalTexture: d
+ } = e;
+ n.addDefine(
+ "USE_CLEARCOAT",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ), defined(o) && o !== Clearcoat.DEFAULT_CLEARCOAT_FACTOR && (n.addUniform(
+ "float",
+ "u_clearcoatFactor",
+ ShaderDestination$1.FRAGMENT
+ ), t.u_clearcoatFactor = function() {
+ return e.clearcoatFactor;
+ }, n.addDefine(
+ "HAS_CLEARCOAT_FACTOR",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ )), defined(s) && !r && processTexture(
+ n,
+ t,
+ s,
+ "u_clearcoatTexture",
+ "CLEARCOAT",
+ i
+ ), defined(c) && o !== Clearcoat.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR && (n.addUniform(
+ "float",
+ "u_clearcoatRoughnessFactor",
+ ShaderDestination$1.FRAGMENT
+ ), t.u_clearcoatRoughnessFactor = function() {
+ return e.clearcoatRoughnessFactor;
+ }, n.addDefine(
+ "HAS_CLEARCOAT_ROUGHNESS_FACTOR",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ )), defined(l) && !r && processTexture(
+ n,
+ t,
+ l,
+ "u_clearcoatRoughnessTexture",
+ "CLEARCOAT_ROUGHNESS",
+ i
+ ), defined(d) && !r && processTexture(
+ n,
+ t,
+ d,
+ "u_clearcoatNormalTexture",
+ "CLEARCOAT_NORMAL",
+ i
+ );
+}
+function processMetallicRoughnessUniforms(e, t, n, i, r) {
+ n.addDefine(
+ "USE_METALLIC_ROUGHNESS",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ );
+ const o = e.baseColorTexture;
+ defined(o) && !r && processTexture(
+ n,
+ t,
+ o,
+ "u_baseColorTexture",
+ "BASE_COLOR",
+ i
+ );
+ const s = e.baseColorFactor;
+ defined(s) && !Cartesian4.equals(
+ s,
+ MetallicRoughness$1.DEFAULT_BASE_COLOR_FACTOR
+ ) && (n.addUniform(
+ "vec4",
+ "u_baseColorFactor",
+ ShaderDestination$1.FRAGMENT
+ ), t.u_baseColorFactor = function() {
+ return e.baseColorFactor;
+ }, n.addDefine(
+ "HAS_BASE_COLOR_FACTOR",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ));
+ const c = e.metallicRoughnessTexture;
+ defined(c) && !r && processTexture(
+ n,
+ t,
+ c,
+ "u_metallicRoughnessTexture",
+ "METALLIC_ROUGHNESS",
+ i
+ );
+ const l = e.metallicFactor;
+ defined(l) && l !== MetallicRoughness$1.DEFAULT_METALLIC_FACTOR && (n.addUniform(
+ "float",
+ "u_metallicFactor",
+ ShaderDestination$1.FRAGMENT
+ ), t.u_metallicFactor = function() {
+ return e.metallicFactor;
+ }, n.addDefine(
+ "HAS_METALLIC_FACTOR",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ));
+ const d = e.roughnessFactor;
+ defined(d) && d !== MetallicRoughness$1.DEFAULT_ROUGHNESS_FACTOR && (n.addUniform(
+ "float",
+ "u_roughnessFactor",
+ ShaderDestination$1.FRAGMENT
+ ), t.u_roughnessFactor = function() {
+ return e.roughnessFactor;
+ }, n.addDefine(
+ "HAS_ROUGHNESS_FACTOR",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ));
+}
+const MorphTargetsStageVS = `void morphTargetsStage(inout ProcessedAttributes attributes)
+{
+ vec3 positionMC = attributes.positionMC;
+ attributes.positionMC = getMorphedPosition(positionMC);
+
+ #ifdef HAS_NORMALS
+ vec3 normalMC = attributes.normalMC;
+ attributes.normalMC = getMorphedNormal(normalMC);
+ #endif
+
+ #ifdef HAS_TANGENTS
+ vec3 tangentMC = attributes.tangentMC;
+ attributes.tangentMC = getMorphedTangent(tangentMC);
+ #endif
+}`, MorphTargetsPipelineStage = {
+ name: "MorphTargetsPipelineStage",
+ // Helps with debugging
+ FUNCTION_ID_GET_MORPHED_POSITION: "getMorphedPosition",
+ FUNCTION_SIGNATURE_GET_MORPHED_POSITION: "vec3 getMorphedPosition(in vec3 position)",
+ FUNCTION_ID_GET_MORPHED_NORMAL: "getMorphedNormal",
+ FUNCTION_SIGNATURE_GET_MORPHED_NORMAL: "vec3 getMorphedNormal(in vec3 normal)",
+ FUNCTION_ID_GET_MORPHED_TANGENT: "getMorphedTangent",
+ FUNCTION_SIGNATURE_GET_MORPHED_TANGENT: "vec3 getMorphedTangent(in vec3 tangent)"
+};
+MorphTargetsPipelineStage.process = function(e, t) {
+ const n = e.shaderBuilder;
+ n.addDefine(
+ "HAS_MORPH_TARGETS",
+ void 0,
+ ShaderDestination$1.VERTEX
+ ), addGetMorphedAttributeFunctionDeclarations(n);
+ const i = t.morphTargets.length;
+ for (let c = 0; c < i; c++) {
+ const l = t.morphTargets[c].attributes, d = l.length;
+ for (let f = 0; f < d; f++) {
+ const h = l[f], p = h.semantic;
+ p !== VertexAttributeSemantic$1.POSITION && p !== VertexAttributeSemantic$1.NORMAL && p !== VertexAttributeSemantic$1.TANGENT || (processMorphTargetAttribute(
+ e,
+ h,
+ e.attributeIndex,
+ c
+ ), e.attributeIndex++);
+ }
+ }
+ addGetMorphedAttributeFunctionReturns(n);
+ const o = e.runtimeNode.morphWeights.length;
+ n.addUniform(
+ "float",
+ `u_morphWeights[${o}]`,
+ ShaderDestination$1.VERTEX
+ ), n.addVertexLines(MorphTargetsStageVS);
+ const s = {
+ u_morphWeights: function() {
+ return e.runtimeNode.morphWeights;
+ }
+ };
+ e.uniformMap = combine$2(s, e.uniformMap);
+};
+const scratchAttributeInfo = {
+ attributeString: void 0,
+ functionId: void 0
+};
+function processMorphTargetAttribute(e, t, n, i) {
+ const r = e.shaderBuilder;
+ addMorphTargetAttributeToRenderResources(
+ e,
+ t,
+ n
+ );
+ const o = getMorphTargetAttributeInfo(
+ t,
+ scratchAttributeInfo
+ );
+ addMorphTargetAttributeDeclarationAndFunctionLine(
+ r,
+ o,
+ i
+ );
+}
+function addMorphTargetAttributeToRenderResources(e, t, n) {
+ const i = {
+ index: n,
+ value: defined(t.buffer) ? void 0 : t.constant,
+ vertexBuffer: t.buffer,
+ componentsPerAttribute: AttributeType$1.getNumberOfComponents(t.type),
+ componentDatatype: t.componentDatatype,
+ offsetInBytes: t.byteOffset,
+ strideInBytes: t.byteStride,
+ normalize: t.normalized
+ };
+ e.attributes.push(i);
+}
+function getMorphTargetAttributeInfo(e, t) {
+ switch (e.semantic) {
+ case VertexAttributeSemantic$1.POSITION:
+ t.attributeString = "Position", t.functionId = MorphTargetsPipelineStage.FUNCTION_ID_GET_MORPHED_POSITION;
+ break;
+ case VertexAttributeSemantic$1.NORMAL:
+ t.attributeString = "Normal", t.functionId = MorphTargetsPipelineStage.FUNCTION_ID_GET_MORPHED_NORMAL;
+ break;
+ case VertexAttributeSemantic$1.TANGENT:
+ t.attributeString = "Tangent", t.functionId = MorphTargetsPipelineStage.FUNCTION_ID_GET_MORPHED_TANGENT;
+ break;
+ }
+ return t;
+}
+function addMorphTargetAttributeDeclarationAndFunctionLine(e, t, n) {
+ const i = t.attributeString, r = `a_target${i}_${n}`, o = `morphed${i} += u_morphWeights[${n}] * a_target${i}_${n};`;
+ e.addAttribute("vec3", r), e.addFunctionLines(t.functionId, [o]);
+}
+function addGetMorphedAttributeFunctionDeclarations(e) {
+ e.addFunction(
+ MorphTargetsPipelineStage.FUNCTION_ID_GET_MORPHED_POSITION,
+ MorphTargetsPipelineStage.FUNCTION_SIGNATURE_GET_MORPHED_POSITION,
+ ShaderDestination$1.VERTEX
+ ), e.addFunctionLines(
+ MorphTargetsPipelineStage.FUNCTION_ID_GET_MORPHED_POSITION,
+ ["vec3 morphedPosition = position;"]
+ ), e.addFunction(
+ MorphTargetsPipelineStage.FUNCTION_ID_GET_MORPHED_NORMAL,
+ MorphTargetsPipelineStage.FUNCTION_SIGNATURE_GET_MORPHED_NORMAL,
+ ShaderDestination$1.VERTEX
+ ), e.addFunctionLines(
+ MorphTargetsPipelineStage.FUNCTION_ID_GET_MORPHED_NORMAL,
+ ["vec3 morphedNormal = normal;"]
+ ), e.addFunction(
+ MorphTargetsPipelineStage.FUNCTION_ID_GET_MORPHED_TANGENT,
+ MorphTargetsPipelineStage.FUNCTION_SIGNATURE_GET_MORPHED_TANGENT,
+ ShaderDestination$1.VERTEX
+ ), e.addFunctionLines(
+ MorphTargetsPipelineStage.FUNCTION_ID_GET_MORPHED_TANGENT,
+ ["vec3 morphedTangent = tangent;"]
+ );
+}
+function addGetMorphedAttributeFunctionReturns(e) {
+ e.addFunctionLines(
+ MorphTargetsPipelineStage.FUNCTION_ID_GET_MORPHED_POSITION,
+ ["return morphedPosition;"]
+ ), e.addFunctionLines(
+ MorphTargetsPipelineStage.FUNCTION_ID_GET_MORPHED_NORMAL,
+ ["return morphedNormal;"]
+ ), e.addFunctionLines(
+ MorphTargetsPipelineStage.FUNCTION_ID_GET_MORPHED_TANGENT,
+ ["return morphedTangent;"]
+ );
+}
+const PickingPipelineStage = {
+ name: "PickingPipelineStage"
+ // Helps with debugging
+};
+PickingPipelineStage.process = function(e, t, n) {
+ const i = n.context, r = e.runtimeNode, o = e.shaderBuilder, s = e.model, c = r.node.instances;
+ if (e.hasPropertyTable)
+ processPickTexture(e, t, c);
+ else if (defined(c))
+ processInstancedPickIds(e, i);
+ else {
+ const l = buildPickObject(e), d = i.createPickId(l);
+ s._pipelineResources.push(d), s._pickIds.push(d), o.addUniform(
+ "vec4",
+ "czm_pickColor",
+ ShaderDestination$1.FRAGMENT
+ );
+ const f = e.uniformMap;
+ f.czm_pickColor = function() {
+ return d.color;
+ }, e.pickId = "czm_pickColor";
+ }
+};
+function buildPickObject(e, t) {
+ const n = e.model;
+ if (defined(n.pickObject))
+ return n.pickObject;
+ const i = {
+ model: n,
+ node: e.runtimeNode,
+ primitive: e.runtimePrimitive
+ };
+ let r;
+ if (ModelType$1.is3DTiles(n.type)) {
+ const o = n.content;
+ r = {
+ content: o,
+ primitive: o.tileset,
+ detail: i
+ };
+ } else
+ r = {
+ primitive: n,
+ detail: i
+ };
+ return r.id = n.id, defined(t) && (r.instanceId = t), r;
+}
+function processPickTexture(e, t, n) {
+ const i = e.model;
+ let r, o;
+ const s = i.featureIdLabel, c = i.instanceFeatureIdLabel;
+ defined(i.featureTableId) ? r = i.featureTableId : defined(n) ? (o = ModelUtility.getFeatureIdsByLabel(
+ n.featureIds,
+ c
+ ), r = o.propertyTableId) : (o = ModelUtility.getFeatureIdsByLabel(
+ t.featureIds,
+ s
+ ), r = o.propertyTableId);
+ const l = i.featureTables[r];
+ e.shaderBuilder.addUniform(
+ "sampler2D",
+ "model_pickTexture",
+ ShaderDestination$1.FRAGMENT
+ );
+ const f = l.batchTexture;
+ e.uniformMap.model_pickTexture = function() {
+ return defaultValue(f.pickTexture, f.defaultTexture);
+ }, e.pickId = "((selectedFeature.id < int(model_featuresLength)) ? texture(model_pickTexture, selectedFeature.st) : vec4(0.0))";
+}
+function processInstancedPickIds(e, t) {
+ const n = e.instanceCount, i = new Array(n), r = new Uint8Array(n * 4), o = e.model, s = o._pipelineResources;
+ for (let h = 0; h < n; h++) {
+ const p = buildPickObject(e, h), m = t.createPickId(p);
+ s.push(m), i[h] = m;
+ const _ = m.color;
+ r[h * 4 + 0] = Color.floatToByte(_.red), r[h * 4 + 1] = Color.floatToByte(_.green), r[h * 4 + 2] = Color.floatToByte(_.blue), r[h * 4 + 3] = Color.floatToByte(_.alpha);
+ }
+ o._pickIds = i;
+ const c = Buffer.createVertexBuffer({
+ context: t,
+ typedArray: r,
+ usage: BufferUsage$1.STATIC_DRAW
+ });
+ c.vertexArrayDestroyable = !1, o.statistics.addBuffer(c, !1), s.push(c);
+ const d = {
+ index: e.attributeIndex++,
+ vertexBuffer: c,
+ componentsPerAttribute: 4,
+ componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE,
+ normalize: !0,
+ offsetInBytes: 0,
+ strideInBytes: 0,
+ instanceDivisor: 1
+ };
+ e.attributes.push(d);
+ const f = e.shaderBuilder;
+ f.addDefine("USE_PICKING", void 0, ShaderDestination$1.BOTH), f.addAttribute("vec4", "a_pickColor"), f.addVarying("vec4", "v_pickColor"), e.pickId = "v_pickColor";
+}
+const Cesium3DTileRefine = {
+ /**
+ * Render this tile and, if it doesn't meet the screen space error, also refine to its children.
+ *
+ * @type {number}
+ * @constant
+ */
+ ADD: 0,
+ /**
+ * Render this tile or, if it doesn't meet the screen space error, refine to its descendants instead.
+ *
+ * @type {number}
+ * @constant
+ */
+ REPLACE: 1
+}, Cesium3DTileRefine$1 = Object.freeze(Cesium3DTileRefine), PointCloudStylingStageVS = `float getPointSizeFromAttenuation(vec3 positionEC) {
+ // Variables are packed into a single vector to minimize gl.uniformXXX() calls
+ float pointSize = model_pointCloudParameters.x;
+ float geometricError = model_pointCloudParameters.y;
+ float depthMultiplier = model_pointCloudParameters.z;
+
+ float depth = -positionEC.z;
+ return min((geometricError / depth) * depthMultiplier, pointSize);
+}
+
+#ifdef HAS_POINT_CLOUD_SHOW_STYLE
+float pointCloudShowStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
+ float tiles3d_tileset_time = model_pointCloudParameters.w;
+ return float(getShowFromStyle(attributes, metadata, tiles3d_tileset_time));
+}
+#endif
+
+#ifdef HAS_POINT_CLOUD_COLOR_STYLE
+vec4 pointCloudColorStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
+ float tiles3d_tileset_time = model_pointCloudParameters.w;
+ return getColorFromStyle(attributes, metadata, tiles3d_tileset_time);
+}
+#endif
+
+#ifdef HAS_POINT_CLOUD_POINT_SIZE_STYLE
+float pointCloudPointSizeStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
+ float tiles3d_tileset_time = model_pointCloudParameters.w;
+ return float(getPointSizeFromStyle(attributes, metadata, tiles3d_tileset_time));
+}
+#elif defined(HAS_POINT_CLOUD_ATTENUATION)
+float pointCloudPointSizeStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
+ return getPointSizeFromAttenuation(v_positionEC);
+}
+#endif
+
+#ifdef HAS_POINT_CLOUD_BACK_FACE_CULLING
+float pointCloudBackFaceCullingStage() {
+ #if defined(HAS_NORMALS) && !defined(HAS_DOUBLE_SIDED_MATERIAL)
+ // This needs to be computed in eye coordinates so we can't use attributes.normalMC
+ return step(-v_normalEC.z, 0.0);
+ #else
+ return 1.0;
+ #endif
+}
+#endif`, scratchUniform = new Cartesian4(), PointCloudStylingPipelineStage = {
+ name: "PointCloudStylingPipelineStage"
+ // Helps with debugging
+};
+PointCloudStylingPipelineStage.process = function(e, t, n) {
+ const i = e.shaderBuilder, r = e.model, o = r.style, s = r.structuralMetadata, c = defined(s) ? s.propertyAttributes : void 0, l = defined(r.featureTableId) && r.featureTables[r.featureTableId].featuresLength > 0, d = !defined(c) && l;
+ if (defined(o) && !d) {
+ const y = getVariableSubstitutionMap(
+ c
+ ), C = getStyleShaderFunctionInfo(
+ o,
+ y
+ );
+ addShaderFunctionsAndDefines(i, C);
+ const x = getPropertyNames(C).indexOf("normalMC") >= 0, b = ModelUtility.getAttributeBySemantic(
+ t,
+ VertexAttributeSemantic$1.NORMAL
+ );
+ if (x && !b)
+ throw new RuntimeError(
+ "Style references the NORMAL semantic but the point cloud does not have normals"
+ );
+ i.addDefine(
+ "COMPUTE_POSITION_WC_STYLE",
+ void 0,
+ ShaderDestination$1.VERTEX
+ ), C.styleTranslucent && (e.alphaOptions.pass = Pass$1.TRANSLUCENT);
+ }
+ const f = r.pointCloudShading;
+ f.attenuation && i.addDefine(
+ "HAS_POINT_CLOUD_ATTENUATION",
+ void 0,
+ ShaderDestination$1.VERTEX
+ ), f.backFaceCulling && i.addDefine(
+ "HAS_POINT_CLOUD_BACK_FACE_CULLING",
+ void 0,
+ ShaderDestination$1.VERTEX
+ );
+ let h, p, m;
+ ModelType$1.is3DTiles(r.type) && (p = !0, h = r.content, m = h.tile.refine === Cesium3DTileRefine$1.ADD), i.addUniform(
+ "vec4",
+ "model_pointCloudParameters",
+ ShaderDestination$1.VERTEX
+ ), i.addVertexLines(PointCloudStylingStageVS);
+ const _ = e.uniformMap;
+ _.model_pointCloudParameters = function() {
+ const y = scratchUniform;
+ let C = 1;
+ p && (C = m ? 5 : h.tileset.memoryAdjustedScreenSpaceError), y.x = defaultValue(
+ f.maximumAttenuation,
+ C
+ ), y.x *= n.pixelRatio;
+ const T = getGeometricError$1(
+ e,
+ t,
+ f,
+ h
+ );
+ y.y = T * f.geometricErrorScale;
+ const x = n.context, b = n.camera.frustum;
+ let S;
+ return n.mode === SceneMode$1.SCENE2D || b instanceof OrthographicFrustum ? S = Number.POSITIVE_INFINITY : S = x.drawingBufferHeight / n.camera.frustum.sseDenominator, y.z = S, p && (y.w = h.tileset.timeSinceLoad), y;
+ };
+};
+const scratchDimensions$1 = new Cartesian3();
+function getGeometricError$1(e, t, n, i) {
+ if (defined(i)) {
+ const f = i.tile.geometricError;
+ if (f > 0)
+ return f;
+ }
+ if (defined(n.baseResolution))
+ return n.baseResolution;
+ const r = ModelUtility.getAttributeBySemantic(
+ t,
+ VertexAttributeSemantic$1.POSITION
+ ), o = r.count, s = e.runtimeNode.transform;
+ let c = Cartesian3.subtract(
+ r.max,
+ r.min,
+ scratchDimensions$1
+ );
+ c = Matrix4.multiplyByPointAsVector(
+ s,
+ c,
+ scratchDimensions$1
+ );
+ const l = c.x * c.y * c.z;
+ return CesiumMath.cbrt(l / o);
+}
+const scratchShaderFunctionInfo = {
+ colorStyleFunction: void 0,
+ showStyleFunction: void 0,
+ pointSizeStyleFunction: void 0,
+ styleTranslucent: !1
+}, builtinVariableSubstitutionMap$1 = {
+ POSITION: "attributes.positionMC",
+ POSITION_ABSOLUTE: "v_positionWC",
+ COLOR: "attributes.color_0",
+ NORMAL: "attributes.normalMC"
+};
+function getVariableSubstitutionMap(e) {
+ const t = clone$1(builtinVariableSubstitutionMap$1);
+ if (!defined(e))
+ return t;
+ for (let n = 0; n < e.length; n++) {
+ const r = e[n].properties;
+ for (const o in r)
+ r.hasOwnProperty(o) && (t[o] = `metadata.${o}`);
+ }
+ return t;
+}
+const parameterList = "ProcessedAttributes attributes, Metadata metadata, float tiles3d_tileset_time";
+function getStyleShaderFunctionInfo(e, t) {
+ const n = scratchShaderFunctionInfo, i = {
+ translucent: !1
+ };
+ return n.colorStyleFunction = e.getColorShaderFunction(
+ `getColorFromStyle(${parameterList})`,
+ t,
+ i
+ ), n.showStyleFunction = e.getShowShaderFunction(
+ `getShowFromStyle(${parameterList})`,
+ t,
+ i
+ ), n.pointSizeStyleFunction = e.getPointSizeShaderFunction(
+ `getPointSizeFromStyle(${parameterList})`,
+ t,
+ i
+ ), n.styleTranslucent = defined(n.colorStyleFunction) && i.translucent, n;
+}
+function addShaderFunctionsAndDefines(e, t) {
+ const n = t.colorStyleFunction;
+ defined(n) && (e.addDefine(
+ "HAS_POINT_CLOUD_COLOR_STYLE",
+ void 0,
+ ShaderDestination$1.BOTH
+ ), e.addVertexLines(n), e.addVarying("vec4", "v_pointCloudColor"));
+ const i = t.showStyleFunction;
+ defined(i) && (e.addDefine(
+ "HAS_POINT_CLOUD_SHOW_STYLE",
+ void 0,
+ ShaderDestination$1.VERTEX
+ ), e.addVertexLines(i));
+ const r = t.pointSizeStyleFunction;
+ defined(r) && (e.addDefine(
+ "HAS_POINT_CLOUD_POINT_SIZE_STYLE",
+ void 0,
+ ShaderDestination$1.VERTEX
+ ), e.addVertexLines(r));
+}
+function getBuiltinPropertyNames$1(e, t) {
+ const n = /attributes\.(\w+)/g;
+ let i = n.exec(e);
+ for (; i !== null; ) {
+ const r = i[1];
+ t.indexOf(r) === -1 && t.push(r), i = n.exec(e);
+ }
+}
+function getPropertyNames(e) {
+ const t = e.colorStyleFunction, n = e.showStyleFunction, i = e.pointSizeStyleFunction, r = [];
+ return defined(t) && getBuiltinPropertyNames$1(t, r), defined(n) && getBuiltinPropertyNames$1(n, r), defined(i) && getBuiltinPropertyNames$1(i, r), r;
+}
+const PrimitiveOutlineStageVS = `void primitiveOutlineStage() {
+ v_outlineCoordinates = a_outlineCoordinates;
+}
+`, PrimitiveOutlineStageFS = `void primitiveOutlineStage(inout czm_modelMaterial material) {
+ if (!model_showOutline) {
+ return;
+ }
+
+ float outlineX =
+ texture(model_outlineTexture, vec2(v_outlineCoordinates.x, 0.5)).r;
+ float outlineY =
+ texture(model_outlineTexture, vec2(v_outlineCoordinates.y, 0.5)).r;
+ float outlineZ =
+ texture(model_outlineTexture, vec2(v_outlineCoordinates.z, 0.5)).r;
+ float outlineness = max(outlineX, max(outlineY, outlineZ));
+
+ material.diffuse = mix(material.diffuse, model_outlineColor.rgb, model_outlineColor.a * outlineness);
+}
+
+`, PrimitiveOutlinePipelineStage = {
+ name: "PrimitiveOutlinePipelineStage"
+ // Helps with debugging
+};
+PrimitiveOutlinePipelineStage.process = function(e, t, n) {
+ const i = e.shaderBuilder, r = e.uniformMap;
+ i.addDefine(
+ "HAS_PRIMITIVE_OUTLINE",
+ void 0,
+ ShaderDestination$1.BOTH
+ ), i.addAttribute("vec3", "a_outlineCoordinates"), i.addVarying("vec3", "v_outlineCoordinates");
+ const o = t.outlineCoordinates, s = {
+ index: e.attributeIndex++,
+ vertexBuffer: o.buffer,
+ componentsPerAttribute: AttributeType$1.getNumberOfComponents(
+ o.type
+ ),
+ componentDatatype: o.componentDatatype,
+ offsetInBytes: o.byteOffset,
+ strideInBytes: o.byteStride,
+ normalize: o.normalized
+ };
+ e.attributes.push(s), i.addUniform(
+ "sampler2D",
+ "model_outlineTexture",
+ ShaderDestination$1.FRAGMENT
+ );
+ const c = PrimitiveOutlineGenerator.createTexture(
+ n.context
+ );
+ r.model_outlineTexture = function() {
+ return c;
+ };
+ const l = e.model;
+ i.addUniform(
+ "vec4",
+ "model_outlineColor",
+ ShaderDestination$1.FRAGMENT
+ ), r.model_outlineColor = function() {
+ return l.outlineColor;
+ }, i.addUniform(
+ "bool",
+ "model_showOutline",
+ ShaderDestination$1.FRAGMENT
+ ), r.model_showOutline = function() {
+ return l.showOutline;
+ }, i.addVertexLines(PrimitiveOutlineStageVS), i.addFragmentLines(PrimitiveOutlineStageFS);
+};
+const PrimitiveStatisticsPipelineStage = {
+ name: "PrimitiveStatisticsPipelineStage",
+ // Helps with debugging
+ // Expose some methods for testing
+ _countGeometry: countGeometry,
+ _count2DPositions: count2DPositions,
+ _countMorphTargetAttributes: countMorphTargetAttributes,
+ _countMaterialTextures: countMaterialTextures,
+ _countFeatureIdTextures: countFeatureIdTextures,
+ _countBinaryMetadata: countBinaryMetadata
+};
+PrimitiveStatisticsPipelineStage.process = function(e, t, n) {
+ const i = e.model, r = i.statistics;
+ countGeometry(r, t), count2DPositions(r, e.runtimePrimitive), countMorphTargetAttributes(r, t), countMaterialTextures(r, t.material), countFeatureIdTextures(r, t.featureIds), countBinaryMetadata(r, i);
+};
+function countGeometry(e, t) {
+ const n = defined(t.indices) ? t.indices.count : ModelUtility.getAttributeBySemantic(t, "POSITION").count, i = t.primitiveType;
+ i === PrimitiveType$1.POINTS ? e.pointsLength += n : PrimitiveType$1.isTriangles(i) && (e.trianglesLength += countTriangles(i, n));
+ const r = t.attributes, o = r.length;
+ for (let l = 0; l < o; l++) {
+ const d = r[l];
+ if (defined(d.buffer)) {
+ const f = defined(d.typedArray);
+ e.addBuffer(d.buffer, f);
+ }
+ }
+ const s = t.outlineCoordinates;
+ defined(s) && defined(s.buffer) && e.addBuffer(s.buffer, !1);
+ const c = t.indices;
+ if (defined(c) && defined(c.buffer)) {
+ const l = defined(c.typedArray);
+ e.addBuffer(c.buffer, l);
+ }
+}
+function countTriangles(e, t) {
+ switch (e) {
+ case PrimitiveType$1.TRIANGLES:
+ return t / 3;
+ case PrimitiveType$1.TRIANGLE_STRIP:
+ case PrimitiveType$1.TRIANGLE_FAN:
+ return Math.max(t - 2, 0);
+ default:
+ return 0;
+ }
+}
+function count2DPositions(e, t) {
+ const n = t.positionBuffer2D;
+ defined(n) && e.addBuffer(n, !0);
+}
+function countMorphTargetAttributes(e, t) {
+ const n = t.morphTargets;
+ if (!defined(n))
+ return;
+ const i = !1, r = n.length;
+ for (let o = 0; o < r; o++) {
+ const s = n[o].attributes, c = s.length;
+ for (let l = 0; l < c; l++) {
+ const d = s[l];
+ defined(d.buffer) && e.addBuffer(d.buffer, i);
+ }
+ }
+}
+function countMaterialTextures(e, t) {
+ const n = getAllTextureReaders(t), i = n.length;
+ for (let r = 0; r < i; r++) {
+ const o = n[r];
+ defined(o) && defined(o.texture) && e.addTexture(o.texture);
+ }
+}
+function getAllTextureReaders(e) {
+ const t = e.metallicRoughness, n = [
+ e.emissiveTexture,
+ e.normalTexture,
+ e.occlusionTexture,
+ t.baseColorTexture,
+ t.metallicRoughnessTexture
+ ], i = e.specularGlossiness;
+ return defined(i) && (n.push(i.diffuseTexture), n.push(i.specularGlossinessTexture)), n;
+}
+function countFeatureIdTextures(e, t) {
+ const n = t.length;
+ for (let i = 0; i < n; i++) {
+ const r = t[i];
+ if (r instanceof ModelComponents.FeatureIdTexture) {
+ const o = r.textureReader;
+ defined(o.texture) && e.addTexture(o.texture);
+ }
+ }
+}
+function countBinaryMetadata(e, t) {
+ const n = t.structuralMetadata;
+ defined(n) && (countPropertyTextures(e, n), e.propertyTablesByteLength += n.propertyTablesByteLength);
+ const i = t.featureTables;
+ if (!defined(i))
+ return;
+ const r = i.length;
+ for (let o = 0; o < r; o++) {
+ const s = i[o];
+ e.addBatchTexture(s.batchTexture);
+ }
+}
+function countPropertyTextures(e, t) {
+ const n = t.propertyTextures;
+ if (!defined(n))
+ return;
+ const i = n.length;
+ for (let r = 0; r < i; r++) {
+ const s = n[r].properties;
+ for (const c in s)
+ if (s.hasOwnProperty(c)) {
+ const d = s[c].textureReader;
+ defined(d.texture) && e.addTexture(d.texture);
+ }
+ }
+}
+const scratchModelMatrix$3 = new Matrix4(), scratchModelView2D = new Matrix4(), SceneMode2DPipelineStage = {
+ name: "SceneMode2DPipelineStage"
+ // Helps with debugging
+};
+SceneMode2DPipelineStage.process = function(e, t, n) {
+ const i = ModelUtility.getAttributeBySemantic(
+ t,
+ VertexAttributeSemantic$1.POSITION
+ ), r = e.shaderBuilder, o = e.model, s = o.sceneGraph.computedModelMatrix, c = e.runtimeNode.computedTransform, l = Matrix4.multiplyTransformation(
+ s,
+ c,
+ scratchModelMatrix$3
+ ), d = computeBoundingSphere2D(
+ e,
+ l,
+ n
+ ), f = e.runtimePrimitive;
+ f.boundingSphere2D = d;
+ const h = e.runtimeNode.node.instances;
+ if (defined(h))
+ return;
+ if (defined(i.typedArray)) {
+ const y = createPositionBufferFor2D(
+ i,
+ l,
+ d,
+ n
+ );
+ f.positionBuffer2D = y, o._modelResources.push(y), i.typedArray = void 0;
+ }
+ r.addDefine(
+ "USE_2D_POSITIONS",
+ void 0,
+ ShaderDestination$1.VERTEX
+ ), r.addUniform("mat4", "u_modelView2D", ShaderDestination$1.VERTEX);
+ const p = Matrix4.fromTranslation(
+ d.center,
+ new Matrix4()
+ ), m = n.context, _ = {
+ u_modelView2D: function() {
+ return Matrix4.multiplyTransformation(
+ m.uniformState.view,
+ p,
+ scratchModelView2D
+ );
+ }
+ };
+ e.uniformMap = combine$2(_, e.uniformMap);
+};
+const scratchProjectedMin = new Cartesian3(), scratchProjectedMax = new Cartesian3();
+function computeBoundingSphere2D(e, t, n) {
+ const i = Matrix4.multiplyByPoint(
+ t,
+ e.positionMin,
+ scratchProjectedMin
+ ), r = SceneTransforms.computeActualEllipsoidPosition(
+ n,
+ i,
+ i
+ ), o = Matrix4.multiplyByPoint(
+ t,
+ e.positionMax,
+ scratchProjectedMax
+ ), s = SceneTransforms.computeActualEllipsoidPosition(
+ n,
+ o,
+ o
+ );
+ return BoundingSphere.fromCornerPoints(
+ r,
+ s,
+ new BoundingSphere()
+ );
+}
+const scratchPosition$c = new Cartesian3();
+function dequantizePositionsTypedArray(e, t) {
+ const n = e.length, i = new Float32Array(n), r = t.quantizedVolumeOffset, o = t.quantizedVolumeStepSize;
+ for (let s = 0; s < n; s += 3) {
+ const c = Cartesian3.fromArray(
+ e,
+ s,
+ scratchPosition$c
+ ), l = Cartesian3.multiplyComponents(
+ c,
+ o,
+ c
+ ), d = Cartesian3.add(
+ l,
+ r,
+ l
+ );
+ i[s] = d.x, i[s + 1] = d.y, i[s + 2] = d.z;
+ }
+ return i;
+}
+function createPositionsTypedArrayFor2D(e, t, n, i) {
+ let r;
+ defined(e.quantization) ? r = dequantizePositionsTypedArray(
+ e.typedArray,
+ e.quantization
+ ) : r = e.typedArray.slice();
+ const o = e.byteOffset / Float32Array.BYTES_PER_ELEMENT, s = r.length, c = defined(e.byteStride) ? e.byteStride / Float32Array.BYTES_PER_ELEMENT : 3;
+ for (let l = o; l < s; l += c) {
+ const d = Cartesian3.fromArray(r, l, scratchPosition$c);
+ if (isNaN(d.x) || isNaN(d.y) || isNaN(d.z))
+ continue;
+ const f = Matrix4.multiplyByPoint(
+ t,
+ d,
+ d
+ ), h = SceneTransforms.computeActualEllipsoidPosition(
+ i,
+ f,
+ f
+ ), p = Cartesian3.subtract(
+ h,
+ n,
+ h
+ );
+ r[l] = p.x, r[l + 1] = p.y, r[l + 2] = p.z;
+ }
+ return r;
+}
+function createPositionBufferFor2D(e, t, n, i) {
+ const r = clone$1(i);
+ r.mode = SceneMode$1.COLUMBUS_VIEW;
+ const o = n.center, s = createPositionsTypedArrayFor2D(
+ e,
+ t,
+ o,
+ r
+ ), c = Buffer.createVertexBuffer({
+ context: i.context,
+ typedArray: s,
+ usage: BufferUsage$1.STATIC_DRAW
+ });
+ return c.vertexArrayDestroyable = !1, c;
+}
+const SkinningStageVS = `void skinningStage(inout ProcessedAttributes attributes)
+{
+ mat4 skinningMatrix = getSkinningMatrix();
+ mat3 skinningMatrixMat3 = mat3(skinningMatrix);
+
+ vec4 positionMC = vec4(attributes.positionMC, 1.0);
+ attributes.positionMC = vec3(skinningMatrix * positionMC);
+
+ #ifdef HAS_NORMALS
+ vec3 normalMC = attributes.normalMC;
+ attributes.normalMC = skinningMatrixMat3 * normalMC;
+ #endif
+
+ #ifdef HAS_TANGENTS
+ vec3 tangentMC = attributes.tangentMC;
+ attributes.tangentMC = skinningMatrixMat3 * tangentMC;
+ #endif
+}`, SkinningPipelineStage = {
+ name: "SkinningPipelineStage",
+ // Helps with debugging
+ FUNCTION_ID_GET_SKINNING_MATRIX: "getSkinningMatrix",
+ FUNCTION_SIGNATURE_GET_SKINNING_MATRIX: "mat4 getSkinningMatrix()"
+};
+SkinningPipelineStage.process = function(e, t) {
+ const n = e.shaderBuilder;
+ n.addDefine("HAS_SKINNING", void 0, ShaderDestination$1.VERTEX), addGetSkinningMatrixFunction(n, t);
+ const i = e.runtimeNode, r = i.computedJointMatrices;
+ n.addUniform(
+ "mat4",
+ `u_jointMatrices[${r.length}]`,
+ ShaderDestination$1.VERTEX
+ ), n.addVertexLines(SkinningStageVS);
+ const o = {
+ u_jointMatrices: function() {
+ return i.computedJointMatrices;
+ }
+ };
+ e.uniformMap = combine$2(o, e.uniformMap);
+};
+function getMaximumAttributeSetIndex(e) {
+ let t = -1;
+ const n = e.attributes, i = n.length;
+ for (let r = 0; r < i; r++) {
+ const o = n[r];
+ (o.semantic === VertexAttributeSemantic$1.JOINTS || o.semantic === VertexAttributeSemantic$1.WEIGHTS) && (t = Math.max(t, o.setIndex));
+ }
+ return t;
+}
+function addGetSkinningMatrixFunction(e, t) {
+ e.addFunction(
+ SkinningPipelineStage.FUNCTION_ID_GET_SKINNING_MATRIX,
+ SkinningPipelineStage.FUNCTION_SIGNATURE_GET_SKINNING_MATRIX,
+ ShaderDestination$1.VERTEX
+ ), e.addFunctionLines(
+ SkinningPipelineStage.FUNCTION_ID_GET_SKINNING_MATRIX,
+ ["mat4 skinnedMatrix = mat4(0);"]
+ );
+ let i, r;
+ const o = ["x", "y", "z", "w"], s = getMaximumAttributeSetIndex(t);
+ for (i = 0; i <= s; i++)
+ for (r = 0; r <= 3; r++) {
+ const l = o[r], d = `skinnedMatrix += a_weights_${i}.${l} * u_jointMatrices[int(a_joints_${i}.${l})];`;
+ e.addFunctionLines(
+ SkinningPipelineStage.FUNCTION_ID_GET_SKINNING_MATRIX,
+ [d]
+ );
+ }
+ e.addFunctionLines(
+ SkinningPipelineStage.FUNCTION_ID_GET_SKINNING_MATRIX,
+ ["return skinnedMatrix;"]
+ );
+}
+const VerticalExaggerationStageVS = `void verticalExaggerationStage(
+ inout ProcessedAttributes attributes
+) {
+ // Compute the distance from the camera to the local center of curvature.
+ vec4 vertexPositionENU = czm_modelToEnu * vec4(attributes.positionMC, 1.0);
+ vec2 vertexAzimuth = normalize(vertexPositionENU.xy);
+ // Curvature = 1 / radius of curvature.
+ float azimuthalCurvature = dot(vertexAzimuth * vertexAzimuth, czm_eyeEllipsoidCurvature);
+ float eyeToCenter = 1.0 / azimuthalCurvature + czm_eyeHeight;
+
+ // Compute the approximate ellipsoid normal at the vertex position.
+ // Uses a circular approximation for the Earth curvature along the geodesic.
+ vec3 vertexPositionEC = (czm_modelView * vec4(attributes.positionMC, 1.0)).xyz;
+ vec3 centerToVertex = eyeToCenter * czm_eyeEllipsoidNormalEC + vertexPositionEC;
+ vec3 vertexNormal = normalize(centerToVertex);
+
+ // Estimate the (sine of the) angle between the camera direction and the vertex normal
+ float verticalDistance = dot(vertexPositionEC, czm_eyeEllipsoidNormalEC);
+ float horizontalDistance = length(vertexPositionEC - verticalDistance * czm_eyeEllipsoidNormalEC);
+ float sinTheta = horizontalDistance / (eyeToCenter + verticalDistance);
+ bool isSmallAngle = clamp(sinTheta, 0.0, 0.05) == sinTheta;
+
+ // Approximate the change in height above the ellipsoid, from camera to vertex position.
+ float exactVersine = 1.0 - dot(czm_eyeEllipsoidNormalEC, vertexNormal);
+ float smallAngleVersine = 0.5 * sinTheta * sinTheta;
+ float versine = isSmallAngle ? smallAngleVersine : exactVersine;
+ float dHeight = dot(vertexPositionEC, vertexNormal) - eyeToCenter * versine;
+ float vertexHeight = czm_eyeHeight + dHeight;
+
+ // Transform the approximate vertex normal to model coordinates.
+ vec3 vertexNormalMC = (czm_inverseModelView * vec4(vertexNormal, 0.0)).xyz;
+ vertexNormalMC = normalize(vertexNormalMC);
+
+ // Compute the exaggeration and apply it along the approximate vertex normal.
+ float stretch = u_verticalExaggerationAndRelativeHeight.x;
+ float shift = u_verticalExaggerationAndRelativeHeight.y;
+ float exaggeration = (vertexHeight - shift) * (stretch - 1.0);
+ attributes.positionMC += exaggeration * vertexNormalMC;
+}
+`, VerticalExaggerationPipelineStage = {
+ name: "VerticalExaggerationPipelineStage"
+ // Helps with debugging
+}, scratchExaggerationUniform = new Cartesian2();
+VerticalExaggerationPipelineStage.process = function(e, t, n) {
+ const { shaderBuilder: i, uniformMap: r } = e;
+ i.addVertexLines(VerticalExaggerationStageVS), i.addDefine(
+ "HAS_VERTICAL_EXAGGERATION",
+ void 0,
+ ShaderDestination$1.VERTEX
+ ), i.addUniform(
+ "vec2",
+ "u_verticalExaggerationAndRelativeHeight",
+ ShaderDestination$1.VERTEX
+ ), r.u_verticalExaggerationAndRelativeHeight = function() {
+ return Cartesian2.fromElements(
+ n.verticalExaggeration,
+ n.verticalExaggerationRelativeHeight,
+ scratchExaggerationUniform
+ );
+ };
+};
+const WireframeIndexGenerator = {};
+function createWireframeFromTriangles(e) {
+ const t = IndexDatatype$1.createTypedArray(
+ e,
+ e * 2
+ ), n = e;
+ let i = 0;
+ for (let r = 0; r < n; r += 3)
+ t[i++] = r, t[i++] = r + 1, t[i++] = r + 1, t[i++] = r + 2, t[i++] = r + 2, t[i++] = r;
+ return t;
+}
+function createWireframeFromTriangleIndices(e, t) {
+ const n = t.length, i = IndexDatatype$1.createTypedArray(
+ e,
+ n * 2
+ );
+ let r = 0;
+ for (let o = 0; o < n; o += 3) {
+ const s = t[o], c = t[o + 1], l = t[o + 2];
+ i[r++] = s, i[r++] = c, i[r++] = c, i[r++] = l, i[r++] = l, i[r++] = s;
+ }
+ return i;
+}
+function createWireframeFromTriangleStrip(e) {
+ const t = e - 2, n = 2 + t * 4, i = IndexDatatype$1.createTypedArray(
+ e,
+ n
+ );
+ let r = 0;
+ i[r++] = 0, i[r++] = 1;
+ for (let o = 0; o < t; o++)
+ i[r++] = o + 1, i[r++] = o + 2, i[r++] = o + 2, i[r++] = o;
+ return i;
+}
+function createWireframeFromTriangleStripIndices(e, t) {
+ const i = t.length - 2, r = 2 + i * 4, o = IndexDatatype$1.createTypedArray(
+ e,
+ r
+ );
+ let s = 0;
+ o[s++] = t[0], o[s++] = t[1];
+ for (let c = 0; c < i; c++) {
+ const l = t[c], d = t[c + 1], f = t[c + 2];
+ o[s++] = d, o[s++] = f, o[s++] = f, o[s++] = l;
+ }
+ return o;
+}
+function createWireframeFromTriangleFan(e) {
+ const t = e - 2, n = 2 + t * 4, i = IndexDatatype$1.createTypedArray(
+ e,
+ n
+ );
+ let r = 0;
+ i[r++] = 0, i[r++] = 1;
+ for (let o = 0; o < t; o++)
+ i[r++] = o + 1, i[r++] = o + 2, i[r++] = o + 2, i[r++] = 0;
+ return i;
+}
+function createWireframeFromTriangleFanIndices(e, t) {
+ const i = t.length - 2, r = 2 + i * 4, o = IndexDatatype$1.createTypedArray(
+ e,
+ r
+ );
+ let s = 0;
+ const c = t[0];
+ o[s++] = c, o[s++] = t[1];
+ for (let l = 0; l < i; l++) {
+ const d = t[l + 1], f = t[l + 2];
+ o[s++] = d, o[s++] = f, o[s++] = f, o[s++] = c;
+ }
+ return o;
+}
+WireframeIndexGenerator.createWireframeIndices = function(e, t, n) {
+ const i = defined(n);
+ if (e === PrimitiveType$1.TRIANGLES)
+ return i ? createWireframeFromTriangleIndices(t, n) : createWireframeFromTriangles(t);
+ if (e === PrimitiveType$1.TRIANGLE_STRIP)
+ return i ? createWireframeFromTriangleStripIndices(t, n) : createWireframeFromTriangleStrip(t);
+ if (e === PrimitiveType$1.TRIANGLE_FAN)
+ return i ? createWireframeFromTriangleFanIndices(t, n) : createWireframeFromTriangleFan(t);
+};
+WireframeIndexGenerator.getWireframeIndicesCount = function(e, t) {
+ return e === PrimitiveType$1.TRIANGLES ? t * 2 : e === PrimitiveType$1.TRIANGLE_STRIP || e === PrimitiveType$1.TRIANGLE_FAN ? 2 + (t - 2) * 4 : t;
+};
+const WireframePipelineStage = {
+ name: "WireframePipelineStage"
+ // Helps with debugging
+};
+WireframePipelineStage.process = function(e, t, n) {
+ e.shaderBuilder.addDefine(
+ "HAS_WIREFRAME",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ );
+ const r = e.model, o = createWireframeIndexBuffer(
+ t,
+ e.indices,
+ n
+ );
+ r._pipelineResources.push(o), e.wireframeIndexBuffer = o, r.statistics.addBuffer(o, !1);
+ const c = e.primitiveType, l = e.count;
+ e.primitiveType = PrimitiveType$1.LINES, e.count = WireframeIndexGenerator.getWireframeIndicesCount(
+ c,
+ l
+ );
+};
+function createWireframeIndexBuffer(e, t, n) {
+ const r = ModelUtility.getAttributeBySemantic(
+ e,
+ VertexAttributeSemantic$1.POSITION
+ ).count, o = n.context.webgl2;
+ let s;
+ if (defined(t)) {
+ const f = t.buffer, h = t.count;
+ defined(f) && o ? (s = f.sizeInBytes === h ? new Uint8Array(h) : IndexDatatype$1.createTypedArray(r, h), f.getBufferData(s)) : s = t.typedArray;
+ }
+ const c = e.primitiveType, l = WireframeIndexGenerator.createWireframeIndices(
+ c,
+ r,
+ s
+ ), d = IndexDatatype$1.fromSizeInBytes(
+ l.BYTES_PER_ELEMENT
+ );
+ return Buffer.createIndexBuffer({
+ context: n.context,
+ typedArray: l,
+ usage: BufferUsage$1.STATIC_DRAW,
+ indexDatatype: d
+ });
+}
+function ModelRuntimePrimitive(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.primitive, n = e.node, i = e.model;
+ this.primitive = t, this.node = n, this.model = i, this.pipelineStages = [], this.drawCommand = void 0, this.boundingSphere = void 0, this.boundingSphere2D = void 0, this.positionBuffer2D = void 0, this.batchLengths = void 0, this.batchOffsets = void 0, this.updateStages = [];
+}
+ModelRuntimePrimitive.prototype.configurePipeline = function(e) {
+ const t = this.pipelineStages;
+ t.length = 0;
+ const n = this.primitive, i = this.node, r = this.model, o = r.customShader, s = r.style, c = e.context.webgl2, d = e.mode !== SceneMode$1.SCENE3D && !e.scene3DOnly && r._projectTo2D, f = e.verticalExaggeration !== 1, h = defined(n.morphTargets) && n.morphTargets.length > 0, p = defined(i.skin), m = defined(o), y = !(m && defined(o.fragmentShaderText)) || o.mode !== CustomShaderMode$1.REPLACE_MATERIAL, C = ModelUtility.hasQuantizedAttributes(
+ n.attributes
+ ), T = r.debugWireframe && PrimitiveType$1.isTriangles(n.primitiveType) && // Generating index buffers for wireframes is always possible in WebGL2.
+ // However, this will only work in WebGL1 if the model was constructed with
+ // enableDebugWireframe set to true.
+ (r._enableDebugWireframe || c), x = r.pointCloudShading, b = defined(x) && x.attenuation, S = defined(x) && x.backFaceCulling, E = n.primitiveType === PrimitiveType$1.POINTS && (defined(s) || b || S), A = r._enableShowOutline && defined(n.outlineCoordinates), D = inspectFeatureIds(r, i, n), P = defined(r.classificationType);
+ d && t.push(SceneMode2DPipelineStage), t.push(GeometryPipelineStage), T && t.push(WireframePipelineStage), P && t.push(ClassificationPipelineStage), h && t.push(MorphTargetsPipelineStage), p && t.push(SkinningPipelineStage), E && t.push(PointCloudStylingPipelineStage), C && t.push(DequantizationPipelineStage), y && t.push(MaterialPipelineStage), t.push(FeatureIdPipelineStage), t.push(MetadataPipelineStage), D.hasPropertyTable && (t.push(SelectedFeatureIdPipelineStage), t.push(BatchTexturePipelineStage), t.push(CPUStylingPipelineStage)), f && t.push(VerticalExaggerationPipelineStage), m && t.push(CustomShaderPipelineStage), t.push(LightingPipelineStage), r.allowPicking && t.push(PickingPipelineStage), A && t.push(PrimitiveOutlinePipelineStage), t.push(AlphaPipelineStage), t.push(PrimitiveStatisticsPipelineStage);
+};
+function inspectFeatureIds(e, t, n) {
+ let i;
+ return defined(t.instances) && (i = ModelUtility.getFeatureIdsByLabel(
+ t.instances.featureIds,
+ e.instanceFeatureIdLabel
+ ), defined(i)) ? {
+ hasFeatureIds: !0,
+ hasPropertyTable: defined(i.propertyTableId)
+ } : (i = ModelUtility.getFeatureIdsByLabel(
+ n.featureIds,
+ e.featureIdLabel
+ ), defined(i) ? {
+ hasFeatureIds: !0,
+ hasPropertyTable: defined(i.propertyTableId)
+ } : {
+ hasFeatureIds: !1,
+ hasPropertyTable: !1
+ });
+}
+function ModelSkin(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._sceneGraph = e.sceneGraph;
+ const t = e.skin;
+ this._skin = t, this._inverseBindMatrices = void 0, this._joints = [], this._jointMatrices = [], initialize$5(this);
+}
+Object.defineProperties(ModelSkin.prototype, {
+ /**
+ * The internal skin this runtime skin represents.
+ *
+ * @memberof ModelSkin.prototype
+ * @type {ModelComponents.Skin}
+ * @readonly
+ *
+ * @private
+ */
+ skin: {
+ get: function() {
+ return this._skin;
+ }
+ },
+ /**
+ * The scene graph this skin belongs to.
+ *
+ * @memberof ModelSkin.prototype
+ * @type {ModelSceneGraph}
+ * @readonly
+ *
+ * @private
+ */
+ sceneGraph: {
+ get: function() {
+ return this._sceneGraph;
+ }
+ },
+ /**
+ * The inverse bind matrices of the skin.
+ *
+ * @memberof ModelSkin.prototype
+ * @type {Matrix4[]}
+ * @readonly
+ *
+ * @private
+ */
+ inverseBindMatrices: {
+ get: function() {
+ return this._inverseBindMatrices;
+ }
+ },
+ /**
+ * The joints of the skin.
+ *
+ * @memberof ModelSkin.prototype
+ * @type {ModelRuntimeNode[]}
+ * @readonly
+ *
+ * @private
+ */
+ joints: {
+ get: function() {
+ return this._joints;
+ }
+ },
+ /**
+ * The joint matrices for the skin, where each joint matrix is computed as
+ * jointMatrix = jointWorldTransform * inverseBindMatrix.
+ *
+ * Each node that references this skin is responsible for pre-multiplying its inverse
+ * world transform to the joint matrices for its own use.
+ *
+ * @memberof ModelSkin.prototype
+ * @type {Matrix4[]}
+ * @readonly
+ *
+ * @private
+ */
+ jointMatrices: {
+ get: function() {
+ return this._jointMatrices;
+ }
+ }
+});
+function initialize$5(e) {
+ const t = e.skin, n = t.inverseBindMatrices;
+ e._inverseBindMatrices = n;
+ const i = t.joints, r = i.length, o = e.sceneGraph._runtimeNodes, s = e.joints, c = e._jointMatrices;
+ for (let l = 0; l < r; l++) {
+ const d = i[l].index, f = o[d];
+ s.push(f);
+ const h = n[l], p = computeJointMatrix(
+ f,
+ h,
+ new Matrix4()
+ );
+ c.push(p);
+ }
+}
+function computeJointMatrix(e, t, n) {
+ const i = Matrix4.multiplyTransformation(
+ e.transformToRoot,
+ e.transform,
+ n
+ );
+ return n = Matrix4.multiplyTransformation(
+ i,
+ t,
+ n
+ ), n;
+}
+ModelSkin.prototype.updateJointMatrices = function() {
+ const e = this._jointMatrices, t = e.length;
+ for (let n = 0; n < t; n++) {
+ const i = this.joints[n], r = this.inverseBindMatrices[n];
+ e[n] = computeJointMatrix(
+ i,
+ r,
+ e[n]
+ );
+ }
+};
+function ModelAlphaOptions() {
+ this.pass = void 0, this.alphaCutoff = void 0;
+}
+function ModelRenderResources(e) {
+ this.shaderBuilder = new ShaderBuilder(), this.model = e, this.uniformMap = {}, this.alphaOptions = new ModelAlphaOptions(), this.renderStateOptions = RenderState.getState(
+ RenderState.fromCache({
+ depthTest: {
+ enabled: !0,
+ func: DepthFunction$1.LESS_OR_EQUAL
+ }
+ })
+ ), this.hasSilhouette = !1, this.hasSkipLevelOfDetail = !1;
+}
+const ModelSilhouetteStageFS = `void silhouetteStage(inout vec4 color) {
+ if(model_silhouettePass) {
+ color = czm_gammaCorrect(model_silhouetteColor);
+ }
+}`, ModelSilhouetteStageVS = `void silhouetteStage(in ProcessedAttributes attributes, inout vec4 positionClip) {
+ #ifdef HAS_NORMALS
+ if(model_silhouettePass) {
+ vec3 normal = normalize(czm_normal3D * attributes.normalMC);
+ normal.x *= czm_projection[0][0];
+ normal.y *= czm_projection[1][1];
+ positionClip.xy += normal.xy * positionClip.w * model_silhouetteSize * czm_pixelRatio / czm_viewport.z;
+ }
+ #endif
+}
+`, ModelSilhouettePipelineStage = {
+ name: "ModelSilhouettePipelineStage"
+ // Helps with debugging
+};
+ModelSilhouettePipelineStage.silhouettesLength = 0;
+ModelSilhouettePipelineStage.process = function(e, t, n) {
+ defined(t._silhouetteId) || (t._silhouetteId = ++ModelSilhouettePipelineStage.silhouettesLength);
+ const i = e.shaderBuilder;
+ i.addDefine("HAS_SILHOUETTE", void 0, ShaderDestination$1.BOTH), i.addVertexLines(ModelSilhouetteStageVS), i.addFragmentLines(ModelSilhouetteStageFS), i.addUniform(
+ "vec4",
+ "model_silhouetteColor",
+ ShaderDestination$1.FRAGMENT
+ ), i.addUniform(
+ "float",
+ "model_silhouetteSize",
+ ShaderDestination$1.VERTEX
+ ), i.addUniform(
+ "bool",
+ "model_silhouettePass",
+ ShaderDestination$1.BOTH
+ );
+ const r = {
+ model_silhouetteColor: function() {
+ return t.silhouetteColor;
+ },
+ model_silhouetteSize: function() {
+ return t.silhouetteSize;
+ },
+ model_silhouettePass: function() {
+ return !1;
+ }
+ };
+ e.uniformMap = combine$2(r, e.uniformMap), e.hasSilhouette = !0;
+};
+const ModelSplitterStageFS = `void modelSplitterStage()
+{
+ // Don't split when rendering the shadow map, because it is rendered from
+ // the perspective of a totally different camera.
+#ifndef SHADOW_MAP
+ if (model_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
+ if (model_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;
+#endif
+}
+`, ModelSplitterPipelineStage = {
+ name: "ModelSplitterPipelineStage",
+ // Helps with debugging
+ SPLIT_DIRECTION_UNIFORM_NAME: "model_splitDirection"
+};
+ModelSplitterPipelineStage.process = function(e, t, n) {
+ const i = e.shaderBuilder;
+ i.addDefine(
+ "HAS_MODEL_SPLITTER",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ), i.addFragmentLines(ModelSplitterStageFS);
+ const r = {};
+ i.addUniform(
+ "float",
+ ModelSplitterPipelineStage.SPLIT_DIRECTION_UNIFORM_NAME,
+ ShaderDestination$1.FRAGMENT
+ ), r[ModelSplitterPipelineStage.SPLIT_DIRECTION_UNIFORM_NAME] = function() {
+ return t.splitDirection;
+ }, e.uniformMap = combine$2(
+ r,
+ e.uniformMap
+ );
+};
+function NodeRenderResources(e, t) {
+ this.model = e.model, this.shaderBuilder = e.shaderBuilder.clone(), this.uniformMap = clone$1(e.uniformMap), this.alphaOptions = clone$1(e.alphaOptions), this.renderStateOptions = clone$1(
+ e.renderStateOptions,
+ !0
+ ), this.hasSilhouette = e.hasSilhouette, this.hasSkipLevelOfDetail = e.hasSkipLevelOfDetail, this.runtimeNode = t, this.attributes = [], this.attributeIndex = 1, this.featureIdVertexAttributeSetIndex = 0, this.instanceCount = 0;
+}
+function ModelLightingOptions(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this.lightingModel = defaultValue(e.lightingModel, LightingModel$1.UNLIT);
+}
+function PrimitiveRenderResources(e, t) {
+ this.model = e.model, this.runtimeNode = e.runtimeNode, this.attributes = e.attributes.slice(), this.attributeIndex = e.attributeIndex, this.featureIdVertexAttributeSetIndex = e.featureIdVertexAttributeSetIndex, this.uniformMap = clone$1(e.uniformMap), this.alphaOptions = clone$1(e.alphaOptions), this.renderStateOptions = clone$1(e.renderStateOptions, !0), this.hasSilhouette = e.hasSilhouette, this.hasSkipLevelOfDetail = e.hasSkipLevelOfDetail, this.shaderBuilder = e.shaderBuilder.clone(), this.instanceCount = e.instanceCount, this.runtimePrimitive = t;
+ const n = t.primitive;
+ this.count = defined(n.indices) ? n.indices.count : ModelUtility.getAttributeBySemantic(n, "POSITION").count, this.hasPropertyTable = !1, this.indices = n.indices, this.wireframeIndexBuffer = void 0, this.primitiveType = n.primitiveType;
+ const i = ModelUtility.getPositionMinMax(
+ n,
+ this.runtimeNode.instancingTranslationMin,
+ this.runtimeNode.instancingTranslationMax
+ );
+ this.positionMin = Cartesian3.clone(i.min, new Cartesian3()), this.positionMax = Cartesian3.clone(i.max, new Cartesian3()), this.boundingSphere = BoundingSphere.fromCornerPoints(
+ this.positionMin,
+ this.positionMax,
+ new BoundingSphere()
+ ), this.lightingOptions = new ModelLightingOptions(), this.pickId = void 0;
+}
+function ModelSceneGraph(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.modelComponents;
+ this._model = e.model, this._components = t, this._pipelineStages = [], this._updateStages = [], this._runtimeNodes = [], this._rootNodes = [], this._skinnedNodes = [], this._runtimeSkins = [], this.modelPipelineStages = [], this._boundingSphere = void 0, this._boundingSphere2D = void 0, this._computedModelMatrix = Matrix4.clone(Matrix4.IDENTITY), this._computedModelMatrix2D = Matrix4.clone(Matrix4.IDENTITY), this._axisCorrectionMatrix = ModelUtility.getAxisCorrectionMatrix(
+ t.upAxis,
+ t.forwardAxis,
+ new Matrix4()
+ ), this._runtimeArticulations = {}, initialize$4(this);
+}
+Object.defineProperties(ModelSceneGraph.prototype, {
+ /**
+ * The model components this scene graph represents.
+ *
+ * @type {ModelComponents}
+ * @readonly
+ *
+ * @private
+ */
+ components: {
+ get: function() {
+ return this._components;
+ }
+ },
+ /**
+ * The axis-corrected model matrix.
+ *
+ * @type {Matrix4}
+ * @readonly
+ *
+ * @private
+ */
+ computedModelMatrix: {
+ get: function() {
+ return this._computedModelMatrix;
+ }
+ },
+ /**
+ * A matrix to correct from y-up in some model formats (e.g. glTF) to the
+ * z-up coordinate system Cesium uses.
+ *
+ * @type {Matrix4}
+ * @readonly
+ *
+ * @private
+ */
+ axisCorrectionMatrix: {
+ get: function() {
+ return this._axisCorrectionMatrix;
+ }
+ },
+ /**
+ * The bounding sphere containing all the primitives in the scene graph
+ * in model space.
+ *
+ * @type {BoundingSphere}
+ * @readonly
+ *
+ * @private
+ */
+ boundingSphere: {
+ get: function() {
+ return this._boundingSphere;
+ }
+ }
+});
+function initialize$4(e) {
+ const t = e._components, n = t.scene, r = e._model.modelMatrix;
+ computeModelMatrix(e, r);
+ const o = t.articulations, s = o.length, c = e._runtimeArticulations;
+ for (let x = 0; x < s; x++) {
+ const b = o[x], S = new ModelArticulation({
+ articulation: b,
+ sceneGraph: e
+ }), E = S.name;
+ c[E] = S;
+ }
+ const l = t.nodes, d = l.length;
+ e._runtimeNodes = new Array(d);
+ const h = n.nodes.length, p = Matrix4.IDENTITY;
+ for (let x = 0; x < h; x++) {
+ const b = n.nodes[x], S = traverseAndCreateSceneGraph(
+ e,
+ b,
+ p
+ );
+ e._rootNodes.push(S);
+ }
+ const m = t.skins, _ = e._runtimeSkins, y = m.length;
+ for (let x = 0; x < y; x++) {
+ const b = m[x];
+ _.push(
+ new ModelSkin({
+ skin: b,
+ sceneGraph: e
+ })
+ );
+ }
+ const C = e._skinnedNodes, T = C.length;
+ for (let x = 0; x < T; x++) {
+ const b = C[x], S = e._runtimeNodes[b], A = l[b].skin.index;
+ S._runtimeSkin = _[A], S.updateJointMatrices();
+ }
+ e.applyArticulations();
+}
+function computeModelMatrix(e, t) {
+ const n = e._components, i = e._model;
+ e._computedModelMatrix = Matrix4.multiplyTransformation(
+ t,
+ n.transform,
+ e._computedModelMatrix
+ ), e._computedModelMatrix = Matrix4.multiplyTransformation(
+ e._computedModelMatrix,
+ e._axisCorrectionMatrix,
+ e._computedModelMatrix
+ ), e._computedModelMatrix = Matrix4.multiplyByUniformScale(
+ e._computedModelMatrix,
+ i.computedScale,
+ e._computedModelMatrix
+ );
+}
+const scratchComputedTranslation$1 = new Cartesian3();
+function computeModelMatrix2D(e, t) {
+ const n = e._computedModelMatrix, i = Matrix4.getTranslation(
+ n,
+ scratchComputedTranslation$1
+ );
+ if (!Cartesian3.equals(i, Cartesian3.ZERO))
+ e._computedModelMatrix2D = Transforms.basisTo2D(
+ t.mapProjection,
+ n,
+ e._computedModelMatrix2D
+ );
+ else {
+ const r = e.boundingSphere.center, o = Transforms.ellipsoidTo2DModelMatrix(
+ t.mapProjection,
+ r,
+ e._computedModelMatrix2D
+ );
+ e._computedModelMatrix2D = Matrix4.multiply(
+ o,
+ n,
+ e._computedModelMatrix2D
+ );
+ }
+ e._boundingSphere2D = BoundingSphere.transform(
+ e._boundingSphere,
+ e._computedModelMatrix2D,
+ e._boundingSphere2D
+ );
+}
+function traverseAndCreateSceneGraph(e, t, n) {
+ const i = [], r = ModelUtility.getNodeTransform(t), o = t.children.length;
+ for (let f = 0; f < o; f++) {
+ const h = t.children[f], p = Matrix4.multiplyTransformation(
+ n,
+ r,
+ new Matrix4()
+ ), m = traverseAndCreateSceneGraph(
+ e,
+ h,
+ p
+ );
+ i.push(m);
+ }
+ const s = new ModelRuntimeNode({
+ node: t,
+ transform: r,
+ transformToRoot: n,
+ children: i,
+ sceneGraph: e
+ }), c = t.primitives.length;
+ for (let f = 0; f < c; f++)
+ s.runtimePrimitives.push(
+ new ModelRuntimePrimitive({
+ primitive: t.primitives[f],
+ node: t,
+ model: e._model
+ })
+ );
+ const l = t.index;
+ e._runtimeNodes[l] = s, defined(t.skin) && e._skinnedNodes.push(l);
+ const d = t.name;
+ if (defined(d)) {
+ const f = e._model, h = new ModelNode(f, s);
+ f._nodesByName[d] = h;
+ }
+ return l;
+}
+const scratchModelPositionMin = new Cartesian3(), scratchModelPositionMax = new Cartesian3(), scratchPrimitivePositionMin = new Cartesian3(), scratchPrimitivePositionMax = new Cartesian3();
+ModelSceneGraph.prototype.buildDrawCommands = function(e) {
+ const t = this._model, n = new ModelRenderResources(t);
+ t.statistics.clear(), this.configurePipeline(e);
+ const i = this.modelPipelineStages;
+ let r, o, s;
+ for (r = 0; r < i.length; r++)
+ i[r].process(n, t, e);
+ const c = Cartesian3.fromElements(
+ Number.MAX_VALUE,
+ Number.MAX_VALUE,
+ Number.MAX_VALUE,
+ scratchModelPositionMin
+ ), l = Cartesian3.fromElements(
+ -Number.MAX_VALUE,
+ -Number.MAX_VALUE,
+ -Number.MAX_VALUE,
+ scratchModelPositionMax
+ );
+ for (r = 0; r < this._runtimeNodes.length; r++) {
+ const d = this._runtimeNodes[r];
+ if (!defined(d))
+ continue;
+ d.configurePipeline();
+ const f = d.pipelineStages, h = new NodeRenderResources(
+ n,
+ d
+ );
+ for (o = 0; o < f.length; o++)
+ f[o].process(
+ h,
+ d.node,
+ e
+ );
+ const p = d.computedTransform;
+ for (o = 0; o < d.runtimePrimitives.length; o++) {
+ const m = d.runtimePrimitives[o];
+ m.configurePipeline(e);
+ const _ = m.pipelineStages, y = new PrimitiveRenderResources(
+ h,
+ m
+ );
+ for (s = 0; s < _.length; s++)
+ _[s].process(
+ y,
+ m.primitive,
+ e
+ );
+ m.boundingSphere = BoundingSphere.clone(
+ y.boundingSphere,
+ new BoundingSphere()
+ );
+ const C = Matrix4.multiplyByPoint(
+ p,
+ y.positionMin,
+ scratchPrimitivePositionMin
+ ), T = Matrix4.multiplyByPoint(
+ p,
+ y.positionMax,
+ scratchPrimitivePositionMax
+ );
+ Cartesian3.minimumByComponent(
+ c,
+ C,
+ c
+ ), Cartesian3.maximumByComponent(
+ l,
+ T,
+ l
+ );
+ const x = buildDrawCommand(
+ y,
+ e
+ );
+ m.drawCommand = x;
+ }
+ }
+ this._boundingSphere = BoundingSphere.fromCornerPoints(
+ c,
+ l,
+ new BoundingSphere()
+ ), this._boundingSphere = BoundingSphere.transformWithoutScale(
+ this._boundingSphere,
+ this._axisCorrectionMatrix,
+ this._boundingSphere
+ ), this._boundingSphere = BoundingSphere.transform(
+ this._boundingSphere,
+ this._components.transform,
+ this._boundingSphere
+ ), t._boundingSphere = BoundingSphere.transform(
+ this._boundingSphere,
+ t.modelMatrix,
+ t._boundingSphere
+ ), t._initialRadius = t._boundingSphere.radius, t._boundingSphere.radius *= t._clampedScale;
+};
+ModelSceneGraph.prototype.configurePipeline = function(e) {
+ const t = this.modelPipelineStages;
+ t.length = 0;
+ const n = this._model, i = e.fog.enabled && e.fog.renderable;
+ defined(n.color) && t.push(ModelColorPipelineStage), !defined(n.classificationType) && (typeof globalThis < "u" && globalThis.useVcsCustomShading || n.imageBasedLighting.enabled && t.push(ImageBasedLightingPipelineStage), n.isClippingEnabled() && t.push(ModelClippingPlanesPipelineStage), n.isClippingPolygonsEnabled() && t.push(ModelClippingPolygonsPipelineStage), n.hasSilhouette(e) && t.push(ModelSilhouettePipelineStage), defined(n.splitDirection) && n.splitDirection !== SplitDirection$1.NONE && t.push(ModelSplitterPipelineStage), ModelType$1.is3DTiles(n.type) && t.push(TilesetPipelineStage), i && t.push(AtmospherePipelineStage));
+};
+ModelSceneGraph.prototype.update = function(e, t) {
+ let n, i, r;
+ for (n = 0; n < this._runtimeNodes.length; n++) {
+ const o = this._runtimeNodes[n];
+ if (!defined(o))
+ continue;
+ for (i = 0; i < o.updateStages.length; i++)
+ o.updateStages[i].update(o, this, e);
+ const s = e.mode !== SceneMode$1.SCENE3D && this._model._projectTo2D;
+ for (t && !s && this.updateJointMatrices(), i = 0; i < o.runtimePrimitives.length; i++) {
+ const c = o.runtimePrimitives[i];
+ for (r = 0; r < c.updateStages.length; r++)
+ c.updateStages[r].update(c, this);
+ }
+ }
+};
+ModelSceneGraph.prototype.updateModelMatrix = function(e, t) {
+ computeModelMatrix(this, e), t.mode !== SceneMode$1.SCENE3D && computeModelMatrix2D(this, t);
+ const n = this._rootNodes;
+ for (let i = 0; i < n.length; i++) {
+ const r = this._runtimeNodes[n[i]];
+ r._transformDirty = !0;
+ }
+};
+ModelSceneGraph.prototype.updateJointMatrices = function() {
+ const e = this._skinnedNodes, t = e.length;
+ for (let n = 0; n < t; n++) {
+ const i = e[n];
+ this._runtimeNodes[i].updateJointMatrices();
+ }
+};
+function traverseSceneGraph(e, t, n, i, r) {
+ if (n && !t.show)
+ return;
+ const o = t.children.length;
+ for (let l = 0; l < o; l++) {
+ const d = t.getChild(l);
+ traverseSceneGraph(
+ e,
+ d,
+ n,
+ i,
+ r
+ );
+ }
+ const s = t.runtimePrimitives, c = s.length;
+ for (let l = 0; l < c; l++) {
+ const d = s[l];
+ i(d, r);
+ }
+}
+function forEachRuntimePrimitive(e, t, n, i) {
+ const r = e._rootNodes, o = r.length;
+ for (let s = 0; s < o; s++) {
+ const c = r[s], l = e._runtimeNodes[c];
+ traverseSceneGraph(
+ e,
+ l,
+ t,
+ n,
+ i
+ );
+ }
+}
+const scratchBackFaceCullingOptions = {
+ backFaceCulling: void 0
+};
+ModelSceneGraph.prototype.updateBackFaceCulling = function(e) {
+ const t = scratchBackFaceCullingOptions;
+ t.backFaceCulling = e, forEachRuntimePrimitive(
+ this,
+ !1,
+ updatePrimitiveBackFaceCulling,
+ t
+ );
+};
+function updatePrimitiveBackFaceCulling(e, t) {
+ const n = e.drawCommand;
+ n.backFaceCulling = t.backFaceCulling;
+}
+const scratchShadowOptions = {
+ shadowMode: void 0
+};
+ModelSceneGraph.prototype.updateShadows = function(e) {
+ const t = scratchShadowOptions;
+ t.shadowMode = e, forEachRuntimePrimitive(this, !1, updatePrimitiveShadows, t);
+};
+function updatePrimitiveShadows(e, t) {
+ const n = e.drawCommand;
+ n.shadows = t.shadowMode;
+}
+const scratchShowBoundingVolumeOptions = {
+ debugShowBoundingVolume: void 0
+};
+ModelSceneGraph.prototype.updateShowBoundingVolume = function(e) {
+ const t = scratchShowBoundingVolumeOptions;
+ t.debugShowBoundingVolume = e, forEachRuntimePrimitive(
+ this,
+ !1,
+ updatePrimitiveShowBoundingVolume,
+ t
+ );
+};
+function updatePrimitiveShowBoundingVolume(e, t) {
+ const n = e.drawCommand;
+ n.debugShowBoundingVolume = t.debugShowBoundingVolume;
+}
+const scratchSilhouetteCommands = [], scratchPushDrawCommandOptions = {
+ frameState: void 0,
+ hasSilhouette: void 0
+};
+ModelSceneGraph.prototype.pushDrawCommands = function(e) {
+ const t = scratchSilhouetteCommands;
+ t.length = 0;
+ const n = scratchPushDrawCommandOptions;
+ n.hasSilhouette = this._model.hasSilhouette(e), n.frameState = e, forEachRuntimePrimitive(
+ this,
+ !0,
+ pushPrimitiveDrawCommands,
+ n
+ ), e.commandList.push.apply(e.commandList, t);
+};
+function pushPrimitiveDrawCommands(e, t) {
+ const n = t.frameState, i = t.hasSilhouette, r = n.passes, o = scratchSilhouetteCommands, s = e.drawCommand;
+ s.pushCommands(n, n.commandList), i && !r.pick && s.pushSilhouetteCommands(n, o);
+}
+ModelSceneGraph.prototype.setArticulationStage = function(e, t) {
+ const n = e.split(" ");
+ if (n.length !== 2)
+ return;
+ const i = n[0], r = n[1], o = this._runtimeArticulations[i];
+ defined(o) && o.setArticulationStage(r, t);
+};
+ModelSceneGraph.prototype.applyArticulations = function() {
+ const e = this._runtimeArticulations;
+ for (const t in e)
+ e.hasOwnProperty(t) && e[t].apply();
+};
+function ModelStatistics() {
+ this.pointsLength = 0, this.trianglesLength = 0, this.geometryByteLength = 0, this.texturesByteLength = 0, this.propertyTablesByteLength = 0, this._bufferIdSet = {}, this._textureIdSet = {}, this._batchTextureIdMap = new AssociativeArray();
+}
+Object.defineProperties(ModelStatistics.prototype, {
+ /**
+ * Total size of the batch textures used for picking and styling.
+ * Batch textures are created asynchronously, so this iterates
+ * over the textures to ensure their memory values are accurate.
+ *
+ * @memberof ModelStatistics.prototype
+ *
+ * @type {number}
+ * @readonly
+ *
+ * @private
+ */
+ batchTexturesByteLength: {
+ get: function() {
+ const e = this._batchTextureIdMap.length, t = this._batchTextureIdMap.values;
+ let n = 0;
+ for (let i = 0; i < e; i++)
+ n += t[i].byteLength;
+ return n;
+ }
+ }
+});
+ModelStatistics.prototype.clear = function() {
+ this.pointsLength = 0, this.trianglesLength = 0, this.geometryByteLength = 0, this.texturesByteLength = 0, this.propertyTablesByteLength = 0, this._bufferIdSet = {}, this._textureIdSet = {}, this._batchTextureIdMap.removeAll();
+};
+ModelStatistics.prototype.addBuffer = function(e, t) {
+ if (!this._bufferIdSet.hasOwnProperty(e._id)) {
+ const n = t ? 2 : 1;
+ this.geometryByteLength += e.sizeInBytes * n;
+ }
+ this._bufferIdSet[e._id] = !0;
+};
+ModelStatistics.prototype.addTexture = function(e) {
+ this._textureIdSet.hasOwnProperty(e._id) || (this.texturesByteLength += e.sizeInBytes), this._textureIdSet[e._id] = !0;
+};
+ModelStatistics.prototype.addBatchTexture = function(e) {
+ this._batchTextureIdMap.contains(e._id) || this._batchTextureIdMap.set(e._id, e);
+};
+const PntsParser = {}, sizeOfUint32$2 = Uint32Array.BYTES_PER_ELEMENT;
+PntsParser.parse = function(e, t) {
+ t = defaultValue(t, 0);
+ const n = new Uint8Array(e), i = new DataView(e);
+ t += sizeOfUint32$2;
+ const r = i.getUint32(t, !0);
+ if (r !== 1)
+ throw new RuntimeError(
+ `Only Point Cloud tile version 1 is supported. Version ${r} is not.`
+ );
+ t += sizeOfUint32$2, t += sizeOfUint32$2;
+ const o = i.getUint32(t, !0);
+ if (o === 0)
+ throw new RuntimeError(
+ "Feature table must have a byte length greater than zero"
+ );
+ t += sizeOfUint32$2;
+ const s = i.getUint32(t, !0);
+ t += sizeOfUint32$2;
+ const c = i.getUint32(t, !0);
+ t += sizeOfUint32$2;
+ const l = i.getUint32(t, !0);
+ t += sizeOfUint32$2;
+ const d = getJsonFromTypedArray(
+ n,
+ t,
+ o
+ );
+ t += o;
+ const f = new Uint8Array(
+ e,
+ t,
+ s
+ );
+ t += s;
+ let h, p;
+ c > 0 && (h = getJsonFromTypedArray(
+ n,
+ t,
+ c
+ ), t += c, l > 0 && (p = new Uint8Array(
+ e,
+ t,
+ l
+ ), t += l));
+ const m = new Cesium3DTileFeatureTable(
+ d,
+ f
+ ), _ = m.getGlobalProperty("POINTS_LENGTH");
+ if (m.featuresLength = _, !defined(_))
+ throw new RuntimeError(
+ "Feature table global property: POINTS_LENGTH must be defined"
+ );
+ let y = m.getGlobalProperty(
+ "RTC_CENTER",
+ ComponentDatatype$1.FLOAT,
+ 3
+ );
+ defined(y) && (y = Cartesian3.unpack(y));
+ const C = parseDracoProperties(m, h);
+ if (C.rtcCenter = y, C.pointsLength = _, !C.hasPositions) {
+ const T = parsePositions(m);
+ C.positions = T, C.hasPositions = C.hasPositions || defined(T);
+ }
+ if (!C.hasPositions)
+ throw new RuntimeError(
+ "Either POSITION or POSITION_QUANTIZED must be defined."
+ );
+ if (!C.hasNormals) {
+ const T = parseNormals(m);
+ C.normals = T, C.hasNormals = C.hasNormals || defined(T);
+ }
+ if (!C.hasColors) {
+ const T = parseColors(m);
+ C.colors = T, C.hasColors = C.hasColors || defined(T), C.hasConstantColor = defined(C.constantColor), C.isTranslucent = defined(T) && T.isTranslucent;
+ }
+ if (!C.hasBatchIds) {
+ const T = parseBatchIds(m);
+ C.batchIds = T, C.hasBatchIds = C.hasBatchIds || defined(T);
+ }
+ if (C.hasBatchIds) {
+ const T = m.getGlobalProperty("BATCH_LENGTH");
+ if (!defined(T))
+ throw new RuntimeError(
+ "Global property: BATCH_LENGTH must be defined when BATCH_ID is defined."
+ );
+ C.batchLength = T;
+ }
+ return defined(p) && (p = new Uint8Array(p), C.batchTableJson = h, C.batchTableBinary = p), C;
+};
+function parseDracoProperties(e, t) {
+ const n = e.json;
+ let i, r, o;
+ const s = defined(n.extensions) ? n.extensions["3DTILES_draco_point_compression"] : void 0, c = defined(t) && defined(t.extensions) ? t.extensions["3DTILES_draco_point_compression"] : void 0;
+ defined(c) && (o = c.properties);
+ let l, d, f, h, p;
+ if (defined(s)) {
+ r = s.properties;
+ const _ = s.byteOffset, y = s.byteLength;
+ if (!defined(r) || !defined(_) || !defined(y))
+ throw new RuntimeError(
+ "Draco properties, byteOffset, and byteLength must be defined"
+ );
+ i = e.buffer.slice(
+ _,
+ _ + y
+ ), l = defined(r.POSITION), d = defined(r.RGB) || defined(r.RGBA), f = defined(r.NORMAL), h = defined(r.BATCH_ID), p = defined(r.RGBA);
+ }
+ let m;
+ return defined(i) && (m = {
+ buffer: i,
+ featureTableProperties: r,
+ batchTableProperties: o,
+ properties: combine$2(
+ r,
+ o
+ ),
+ dequantizeInShader: !0
+ }), {
+ draco: m,
+ hasPositions: l,
+ hasColors: d,
+ isTranslucent: p,
+ hasNormals: f,
+ hasBatchIds: h
+ };
+}
+function parsePositions(e) {
+ const t = e.json;
+ let n;
+ if (defined(t.POSITION))
+ return n = e.getPropertyArray(
+ "POSITION",
+ ComponentDatatype$1.FLOAT,
+ 3
+ ), {
+ name: VertexAttributeSemantic$1.POSITION,
+ semantic: VertexAttributeSemantic$1.POSITION,
+ typedArray: n,
+ isQuantized: !1,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ type: AttributeType$1.VEC3
+ };
+ if (defined(t.POSITION_QUANTIZED)) {
+ n = e.getPropertyArray(
+ "POSITION_QUANTIZED",
+ ComponentDatatype$1.UNSIGNED_SHORT,
+ 3
+ );
+ const i = e.getGlobalProperty(
+ "QUANTIZED_VOLUME_SCALE",
+ ComponentDatatype$1.FLOAT,
+ 3
+ );
+ if (!defined(i))
+ throw new RuntimeError(
+ "Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions."
+ );
+ const r = 65535, o = e.getGlobalProperty(
+ "QUANTIZED_VOLUME_OFFSET",
+ ComponentDatatype$1.FLOAT,
+ 3
+ );
+ if (!defined(o))
+ throw new RuntimeError(
+ "Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions."
+ );
+ return {
+ name: VertexAttributeSemantic$1.POSITION,
+ semantic: VertexAttributeSemantic$1.POSITION,
+ typedArray: n,
+ isQuantized: !0,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ type: AttributeType$1.VEC3,
+ quantizedRange: r,
+ quantizedVolumeOffset: Cartesian3.unpack(o),
+ quantizedVolumeScale: Cartesian3.unpack(i),
+ quantizedComponentDatatype: ComponentDatatype$1.UNSIGNED_SHORT,
+ quantizedType: AttributeType$1.VEC3
+ };
+ }
+}
+function parseColors(e) {
+ const t = e.json;
+ let n;
+ if (defined(t.RGBA))
+ return n = e.getPropertyArray(
+ "RGBA",
+ ComponentDatatype$1.UNSIGNED_BYTE,
+ 4
+ ), {
+ name: VertexAttributeSemantic$1.COLOR,
+ semantic: VertexAttributeSemantic$1.COLOR,
+ setIndex: 0,
+ typedArray: n,
+ componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE,
+ type: AttributeType$1.VEC4,
+ normalized: !0,
+ isRGB565: !1,
+ isTranslucent: !0
+ };
+ if (defined(t.RGB))
+ return n = e.getPropertyArray(
+ "RGB",
+ ComponentDatatype$1.UNSIGNED_BYTE,
+ 3
+ ), {
+ name: "COLOR",
+ semantic: VertexAttributeSemantic$1.COLOR,
+ setIndex: 0,
+ typedArray: n,
+ componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE,
+ type: AttributeType$1.VEC3,
+ normalized: !0,
+ isRGB565: !1,
+ isTranslucent: !1
+ };
+ if (defined(t.RGB565))
+ return n = e.getPropertyArray(
+ "RGB565",
+ ComponentDatatype$1.UNSIGNED_SHORT,
+ 1
+ ), {
+ name: "COLOR",
+ semantic: VertexAttributeSemantic$1.COLOR,
+ setIndex: 0,
+ typedArray: n,
+ // These settings are for the Model implementation
+ // which decodes on the CPU and uploads a VEC3 of float colors.
+ // PointCloud does the decoding on the GPU so uploads a
+ // UNSIGNED_SHORT instead.
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ type: AttributeType$1.VEC3,
+ normalized: !1,
+ isRGB565: !0,
+ isTranslucent: !1
+ };
+ if (defined(t.CONSTANT_RGBA)) {
+ const i = e.getGlobalProperty(
+ "CONSTANT_RGBA",
+ ComponentDatatype$1.UNSIGNED_BYTE,
+ 4
+ ), r = i[3], o = Color.fromBytes(
+ i[0],
+ i[1],
+ i[2],
+ r
+ ), s = r < 255;
+ return {
+ name: VertexAttributeSemantic$1.COLOR,
+ semantic: VertexAttributeSemantic$1.COLOR,
+ setIndex: 0,
+ constantColor: o,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ type: AttributeType$1.VEC4,
+ isQuantized: !1,
+ isTranslucent: s
+ };
+ }
+}
+function parseNormals(e) {
+ const t = e.json;
+ let n;
+ if (defined(t.NORMAL))
+ return n = e.getPropertyArray(
+ "NORMAL",
+ ComponentDatatype$1.FLOAT,
+ 3
+ ), {
+ name: VertexAttributeSemantic$1.NORMAL,
+ semantic: VertexAttributeSemantic$1.NORMAL,
+ typedArray: n,
+ octEncoded: !1,
+ octEncodedZXY: !1,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ type: AttributeType$1.VEC3
+ };
+ if (defined(t.NORMAL_OCT16P))
+ return n = e.getPropertyArray(
+ "NORMAL_OCT16P",
+ ComponentDatatype$1.UNSIGNED_BYTE,
+ 2
+ ), {
+ name: VertexAttributeSemantic$1.NORMAL,
+ semantic: VertexAttributeSemantic$1.NORMAL,
+ typedArray: n,
+ octEncoded: !0,
+ octEncodedZXY: !1,
+ quantizedRange: (1 << 8) - 1,
+ quantizedType: AttributeType$1.VEC2,
+ quantizedComponentDatatype: ComponentDatatype$1.UNSIGNED_BYTE,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ type: AttributeType$1.VEC3
+ };
+}
+function parseBatchIds(e) {
+ const t = e.json;
+ if (defined(t.BATCH_ID)) {
+ const n = e.getPropertyArray(
+ "BATCH_ID",
+ ComponentDatatype$1.UNSIGNED_SHORT,
+ 1
+ );
+ return {
+ name: VertexAttributeSemantic$1.FEATURE_ID,
+ semantic: VertexAttributeSemantic$1.FEATURE_ID,
+ setIndex: 0,
+ typedArray: n,
+ componentDatatype: ComponentDatatype$1.fromTypedArray(n),
+ type: AttributeType$1.SCALAR
+ };
+ }
+}
+const Components = ModelComponents.Components, Scene$1 = ModelComponents.Scene, Node$1 = ModelComponents.Node, Primitive = ModelComponents.Primitive, Attribute = ModelComponents.Attribute, Quantization = ModelComponents.Quantization, FeatureIdAttribute = ModelComponents.FeatureIdAttribute, Material = ModelComponents.Material, MetallicRoughness = ModelComponents.MetallicRoughness;
+function PntsLoader(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.arrayBuffer, n = defaultValue(e.byteOffset, 0);
+ this._arrayBuffer = t, this._byteOffset = n, this._loadAttributesFor2D = defaultValue(e.loadAttributesFor2D, !1), this._parsedContent = void 0, this._decodePromise = void 0, this._decodedAttributes = void 0, this._promise = void 0, this._error = void 0, this._state = ResourceLoaderState$1.UNLOADED, this._buffers = [], this._components = void 0, this._transform = Matrix4.IDENTITY;
+}
+defined(Object.create) && (PntsLoader.prototype = Object.create(ResourceLoader.prototype), PntsLoader.prototype.constructor = PntsLoader);
+Object.defineProperties(PntsLoader.prototype, {
+ /**
+ * The cache key of the resource
+ *
+ * @memberof PntsLoader.prototype
+ *
+ * @type {string}
+ * @readonly
+ * @private
+ */
+ cacheKey: {
+ get: function() {
+ }
+ },
+ /**
+ * The loaded components.
+ *
+ * @memberof PntsLoader.prototype
+ *
+ * @type {ModelComponents.Components}
+ * @readonly
+ * @private
+ */
+ components: {
+ get: function() {
+ return this._components;
+ }
+ },
+ /**
+ * A world-space transform to apply to the primitives.
+ * See {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/PointCloud#global-semantics}
+ *
+ * @memberof PntsLoader.prototype
+ *
+ * @type {Matrix4}
+ * @readonly
+ * @private
+ */
+ transform: {
+ get: function() {
+ return this._transform;
+ }
+ }
+});
+PntsLoader.prototype.load = function() {
+ if (defined(this._promise))
+ return this._promise;
+ this._parsedContent = PntsParser.parse(this._arrayBuffer, this._byteOffset), this._state = ResourceLoaderState$1.PROCESSING, this._promise = Promise.resolve(this);
+};
+PntsLoader.prototype.process = function(e) {
+ if (defined(this._error)) {
+ const t = this._error;
+ throw this._error = void 0, t;
+ }
+ if (this._state === ResourceLoaderState$1.READY)
+ return !0;
+ if (this._state === ResourceLoaderState$1.PROCESSING) {
+ if (defined(this._decodePromise))
+ return !1;
+ this._decodePromise = decodeDraco$1(this, e.context);
+ }
+ return !1;
+};
+function decodeDraco$1(e, t) {
+ const i = e._parsedContent.draco;
+ let r;
+ if (defined(i) ? r = DracoLoader.decodePointCloud(i, t) : r = Promise.resolve(), !!defined(r))
+ return e._decodePromise = r, r.then(function(o) {
+ if (!e.isDestroyed())
+ return defined(o) && processDracoAttributes(e, i, o), makeComponents(e, t), e._state = ResourceLoaderState$1.READY, e;
+ }).catch(function(o) {
+ e.unload(), e._state = ResourceLoaderState$1.FAILED;
+ const s = "Failed to load Draco pnts";
+ e._error = e.getError(s, o);
+ });
+}
+function processDracoAttributes(e, t, n) {
+ e._state = ResourceLoaderState$1.READY;
+ const i = e._parsedContent;
+ let r;
+ if (defined(n.POSITION)) {
+ if (r = {
+ name: "POSITION",
+ semantic: VertexAttributeSemantic$1.POSITION,
+ typedArray: n.POSITION.array,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ type: AttributeType$1.VEC3,
+ isQuantized: !1
+ }, defined(n.POSITION.data.quantization)) {
+ const c = n.POSITION.data.quantization, l = c.range, d = Cartesian3.fromElements(l, l, l), f = Cartesian3.unpack(c.minValues), h = (1 << c.quantizationBits) - 1;
+ r.isQuantized = !0, r.quantizedRange = h, r.quantizedVolumeOffset = f, r.quantizedVolumeScale = d, r.quantizedComponentDatatype = h <= 255 ? ComponentDatatype$1.UNSIGNED_BYTE : ComponentDatatype$1.UNSIGNED_SHORT, r.quantizedType = AttributeType$1.VEC3;
+ }
+ i.positions = r;
+ }
+ if (defined(n.NORMAL)) {
+ if (r = {
+ name: "NORMAL",
+ semantic: VertexAttributeSemantic$1.NORMAL,
+ typedArray: n.NORMAL.array,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ type: AttributeType$1.VEC3,
+ isQuantized: !1,
+ octEncoded: !1,
+ octEncodedZXY: !1
+ }, defined(n.NORMAL.data.quantization)) {
+ const c = (1 << n.NORMAL.data.quantization.quantizationBits) - 1;
+ r.quantizedRange = c, r.octEncoded = !0, r.octEncodedZXY = !0, r.quantizedComponentDatatype = ComponentDatatype$1.UNSIGNED_BYTE, r.quantizedType = AttributeType$1.VEC2;
+ }
+ i.normals = r;
+ }
+ if (defined(n.RGBA) ? i.colors = {
+ name: "COLOR",
+ semantic: VertexAttributeSemantic$1.COLOR,
+ setIndex: 0,
+ typedArray: n.RGBA.array,
+ componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE,
+ type: AttributeType$1.VEC4,
+ normalized: !0,
+ isTranslucent: !0
+ } : defined(n.RGB) && (i.colors = {
+ name: "COLOR",
+ semantic: VertexAttributeSemantic$1.COLOR,
+ setIndex: 0,
+ typedArray: n.RGB.array,
+ componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE,
+ type: AttributeType$1.VEC3,
+ normalized: !0,
+ isTranslucent: !1
+ }), defined(n.BATCH_ID)) {
+ const c = n.BATCH_ID.array;
+ i.batchIds = {
+ name: "_FEATURE_ID",
+ semantic: VertexAttributeSemantic$1.FEATURE_ID,
+ setIndex: 0,
+ typedArray: c,
+ componentDatatype: ComponentDatatype$1.fromTypedArray(c),
+ type: AttributeType$1.SCALAR
+ };
+ }
+ let o = i.batchTableJson;
+ const s = t.batchTableProperties;
+ for (const c in s)
+ if (s.hasOwnProperty(c)) {
+ const l = n[c];
+ defined(o) || (o = {}), i.hasDracoBatchTable = !0;
+ const d = l.data;
+ o[c] = {
+ byteOffset: d.byteOffset,
+ // Draco returns the results like glTF values, but here
+ // we want to transcode to a batch table. It's redundant
+ // but necessary to use parseBatchTable()
+ type: transcodeAttributeType(d.componentsPerAttribute),
+ componentType: transcodeComponentType(d.componentDatatype),
+ // Each property is stored as a separate typed array, so
+ // store it here. parseBatchTable() will check for this
+ // instead of the entire binary body.
+ typedArray: l.array
+ };
+ }
+ i.batchTableJson = o;
+}
+function transcodeAttributeType(e) {
+ switch (e) {
+ case 1:
+ return "SCALAR";
+ case 2:
+ return "VEC2";
+ case 3:
+ return "VEC3";
+ case 4:
+ return "VEC4";
+ }
+}
+function transcodeComponentType(e) {
+ switch (e) {
+ case WebGLConstants$1.BYTE:
+ return "BYTE";
+ case WebGLConstants$1.UNSIGNED_BYTE:
+ return "UNSIGNED_BYTE";
+ case WebGLConstants$1.SHORT:
+ return "SHORT";
+ case WebGLConstants$1.UNSIGNED_SHORT:
+ return "UNSIGNED_SHORT";
+ case WebGLConstants$1.INT:
+ return "INT";
+ case WebGLConstants$1.UNSIGNED_INT:
+ return "UNSIGNED_INT";
+ case WebGLConstants$1.DOUBLE:
+ return "DOUBLE";
+ case WebGLConstants$1.FLOAT:
+ return "FLOAT";
+ }
+}
+function makeAttribute(e, t, n) {
+ let i = t.typedArray, r;
+ if (t.octEncoded && (r = new Quantization(), r.octEncoded = t.octEncoded, r.octEncodedZXY = t.octEncodedZXY, r.normalizationRange = t.quantizedRange, r.type = t.quantizedType, r.componentDatatype = t.quantizedComponentDatatype), t.isQuantized) {
+ r = new Quantization();
+ const c = t.quantizedRange;
+ r.normalizationRange = c, r.quantizedVolumeOffset = Cartesian3.ZERO;
+ const l = t.quantizedVolumeScale;
+ r.quantizedVolumeDimensions = l, r.quantizedVolumeStepSize = Cartesian3.divideByScalar(
+ l,
+ c,
+ new Cartesian3()
+ ), r.componentDatatype = t.quantizedComponentDatatype, r.type = t.quantizedType;
+ }
+ const o = new Attribute();
+ if (o.name = t.name, o.semantic = t.semantic, o.setIndex = t.setIndex, o.componentDatatype = t.componentDatatype, o.type = t.type, o.normalized = defaultValue(t.normalized, !1), o.min = t.min, o.max = t.max, o.quantization = r, t.isRGB565 && (i = AttributeCompression.decodeRGB565(i)), defined(t.constantColor)) {
+ const c = new Array(4);
+ o.constant = Color.pack(t.constantColor, c);
+ } else {
+ const c = Buffer.createVertexBuffer({
+ typedArray: i,
+ context: n,
+ usage: BufferUsage$1.STATIC_DRAW
+ });
+ c.vertexArrayDestroyable = !1, e._buffers.push(c), o.buffer = c;
+ }
+ const s = e._loadAttributesFor2D;
+ return o.semantic === VertexAttributeSemantic$1.POSITION && s && (o.typedArray = i), o;
+}
+let randomNumberGenerator$1, randomValues$1;
+function getRandomValues$2(e) {
+ if (!defined(randomValues$1)) {
+ randomNumberGenerator$1 = new MersenneTwister$1(0), randomValues$1 = new Array(e);
+ for (let t = 0; t < e; ++t)
+ randomValues$1[t] = randomNumberGenerator$1.random();
+ }
+ return randomValues$1;
+}
+const scratchMin$2 = new Cartesian3(), scratchMax$2 = new Cartesian3(), scratchPosition$b = new Cartesian3();
+function computeApproximateExtrema(e) {
+ const t = e.typedArray, n = 20, i = t.length / 3, r = Math.min(i, n), o = getRandomValues$2(n), s = Number.MAX_VALUE, c = -Number.MAX_VALUE;
+ let l = Cartesian3.fromElements(s, s, s, scratchMin$2), d = Cartesian3.fromElements(c, c, c, scratchMax$2), f, h, p;
+ if (e.isQuantized)
+ l = Cartesian3.ZERO, d = e.quantizedVolumeScale;
+ else
+ for (f = 0; f < r; ++f)
+ h = Math.floor(o[f] * i), p = Cartesian3.unpack(t, h * 3, scratchPosition$b), Cartesian3.minimumByComponent(l, p, l), Cartesian3.maximumByComponent(d, p, d);
+ e.min = Cartesian3.clone(l), e.max = Cartesian3.clone(d);
+}
+const defaultColorAttribute = {
+ name: VertexAttributeSemantic$1.COLOR,
+ semantic: VertexAttributeSemantic$1.COLOR,
+ setIndex: 0,
+ constantColor: Color.DARKGRAY,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ type: AttributeType$1.VEC4,
+ isQuantized: !1,
+ isTranslucent: !1
+};
+function makeAttributes(e, t, n) {
+ const i = [];
+ let r;
+ const o = t.positions;
+ return defined(o) && (computeApproximateExtrema(o), r = makeAttribute(e, o, n), r.count = t.pointsLength, i.push(r)), defined(t.normals) && (r = makeAttribute(e, t.normals, n), i.push(r)), defined(t.colors) ? (r = makeAttribute(e, t.colors, n), i.push(r)) : (r = makeAttribute(e, defaultColorAttribute, n), i.push(r)), defined(t.batchIds) && (r = makeAttribute(e, t.batchIds, n), i.push(r)), i;
+}
+function makeStructuralMetadata(e, t) {
+ const n = e.batchLength, i = e.pointsLength, r = e.batchTableBinary, o = !defined(e.batchIds);
+ if (defined(r) || e.hasDracoBatchTable) {
+ const s = defaultValue(n, i);
+ return parseBatchTable({
+ count: s,
+ batchTable: e.batchTableJson,
+ binaryBody: r,
+ parseAsPropertyAttributes: o,
+ customAttributeOutput: t
+ });
+ }
+ return new StructuralMetadata({
+ schema: {},
+ propertyTables: []
+ });
+}
+function makeComponents(e, t) {
+ const n = e._parsedContent, i = new MetallicRoughness();
+ i.metallicFactor = 0, i.roughnessFactor = 0.9;
+ const r = new Material();
+ r.metallicRoughness = i;
+ const o = n.colors;
+ defined(o) && o.isTranslucent && (r.alphaMode = AlphaMode$1.BLEND);
+ const s = !defined(n.normals);
+ r.unlit = s;
+ const c = new Primitive();
+ if (c.attributes = makeAttributes(e, n, t), c.primitiveType = PrimitiveType$1.POINTS, c.material = r, defined(n.batchIds)) {
+ const m = new FeatureIdAttribute();
+ m.propertyTableId = 0, m.setIndex = 0, m.positionalLabel = "featureId_0", c.featureIds.push(m);
+ }
+ const l = new Node$1();
+ l.index = 0, l.primitives = [c];
+ const d = new Scene$1();
+ d.nodes = [l], d.upAxis = Axis$1.Z, d.forwardAxis = Axis$1.X;
+ const f = new Components();
+ f.scene = d, f.nodes = [l];
+ const h = [];
+ f.structuralMetadata = makeStructuralMetadata(
+ n,
+ h
+ ), h.length > 0 && addPropertyAttributesToPrimitive(
+ e,
+ c,
+ h,
+ t
+ ), defined(n.rtcCenter) && (f.transform = Matrix4.multiplyByTranslation(
+ f.transform,
+ n.rtcCenter,
+ f.transform
+ ));
+ const p = n.positions;
+ defined(p) && p.isQuantized && (f.transform = Matrix4.multiplyByTranslation(
+ f.transform,
+ p.quantizedVolumeOffset,
+ f.transform
+ )), e._components = f, e._parsedContent = void 0, e._arrayBuffer = void 0;
+}
+function addPropertyAttributesToPrimitive(e, t, n, i) {
+ const r = t.attributes, o = n.length;
+ for (let s = 0; s < o; s++) {
+ const c = n[s], l = Buffer.createVertexBuffer({
+ typedArray: c.typedArray,
+ context: i,
+ usage: BufferUsage$1.STATIC_DRAW
+ });
+ l.vertexArrayDestroyable = !1, e._buffers.push(l), c.buffer = l, c.typedArray = void 0, r.push(c);
+ }
+ t.propertyAttributeIds = [0];
+}
+PntsLoader.prototype.unload = function() {
+ const e = this._buffers;
+ for (let t = 0; t < e.length; t++)
+ e[t].destroy();
+ e.length = 0, this._components = void 0, this._parsedContent = void 0, this._arrayBuffer = void 0;
+};
+const scratchV0$2 = new Cartesian3(), scratchV1$2 = new Cartesian3(), scratchV2$1 = new Cartesian3(), scratchNodeComputedTransform = new Matrix4(), scratchModelMatrix$2 = new Matrix4(), scratchcomputedModelMatrix = new Matrix4(), scratchPickCartographic = new Cartographic(), scratchBoundingSphere$2 = new BoundingSphere();
+function pickModel(e, t, n, i, r, o, s) {
+ if (!e._ready || n.mode === SceneMode$1.MORPHING)
+ return;
+ let c = Number.MAX_VALUE;
+ const l = e.sceneGraph, d = l._runtimeNodes;
+ for (let f = 0; f < d.length; f++) {
+ const h = d[f], p = h.node;
+ let m = Matrix4.clone(
+ h.computedTransform,
+ scratchNodeComputedTransform
+ ), _ = Matrix4.clone(
+ l.computedModelMatrix,
+ scratchModelMatrix$2
+ );
+ const y = p.instances;
+ defined(y) && y.transformInWorldSpace && (_ = Matrix4.multiplyTransformation(
+ e.modelMatrix,
+ l.components.transform,
+ _
+ ), m = Matrix4.multiplyTransformation(
+ l.axisCorrectionMatrix,
+ h.computedTransform,
+ m
+ ));
+ let C = Matrix4.multiplyTransformation(
+ _,
+ m,
+ scratchcomputedModelMatrix
+ );
+ n.mode !== SceneMode$1.SCENE3D && (C = Transforms.basisTo2D(
+ n.mapProjection,
+ C,
+ C
+ ));
+ const T = [];
+ if (defined(y)) {
+ const b = y.attributes[0].count, S = y.attributes[0].componentDatatype, E = 12;
+ let A = h.transformsTypedArray;
+ if (!defined(A)) {
+ const D = h.instancingTransformsBuffer;
+ defined(D) && n.context.webgl2 && (A = ComponentDatatype$1.createTypedArray(
+ S,
+ b * E
+ ), D.getBufferData(A));
+ }
+ if (defined(A))
+ for (let D = 0; D < b; D++) {
+ const P = D * E, I = new Matrix4(
+ A[P],
+ A[P + 1],
+ A[P + 2],
+ A[P + 3],
+ A[P + 4],
+ A[P + 5],
+ A[P + 6],
+ A[P + 7],
+ A[P + 8],
+ A[P + 9],
+ A[P + 10],
+ A[P + 11],
+ 0,
+ 0,
+ 0,
+ 1
+ );
+ y.transformInWorldSpace ? (Matrix4.multiplyTransformation(
+ I,
+ m,
+ I
+ ), Matrix4.multiplyTransformation(_, I, I)) : Matrix4.multiplyTransformation(
+ I,
+ C,
+ I
+ ), T.push(I);
+ }
+ }
+ T.length === 0 && T.push(C);
+ const x = h.runtimePrimitives.length;
+ for (let b = 0; b < x; b++) {
+ const S = h.runtimePrimitives[b], E = S.primitive;
+ if (defined(S.boundingSphere) && !defined(y)) {
+ const $ = BoundingSphere.transform(
+ S.boundingSphere,
+ C,
+ scratchBoundingSphere$2
+ ), G = IntersectionTests.raySphere(
+ t,
+ $
+ );
+ if (!defined(G))
+ continue;
+ }
+ const A = ModelUtility.getAttributeBySemantic(
+ E,
+ VertexAttributeSemantic$1.POSITION
+ ), D = A.byteOffset, P = A.byteStride, I = A.count;
+ if (!defined(E.indices))
+ continue;
+ let M = E.indices.typedArray;
+ if (!defined(M)) {
+ const $ = E.indices.buffer, G = E.indices.count, q = E.indices.indexDatatype;
+ defined($) && n.context.webgl2 && (q === IndexDatatype$1.UNSIGNED_BYTE ? M = new Uint8Array(G) : q === IndexDatatype$1.UNSIGNED_SHORT ? M = new Uint16Array(G) : q === IndexDatatype$1.UNSIGNED_INT && (M = new Uint32Array(G)), $.getBufferData(M));
+ }
+ let R = A.typedArray, L = A.componentDatatype, g = A.type;
+ const w = A.quantization;
+ defined(w) && (L = A.quantization.componentDatatype, g = A.quantization.type);
+ const O = AttributeType$1.getNumberOfComponents(g), N = ComponentDatatype$1.getSizeInBytes(L), F = !defined(R) && defined(P) && P !== O * N;
+ let B = O, V = 0;
+ F && (B = P / N, V = D / N);
+ const U = I * B;
+ if (!defined(R)) {
+ const $ = A.buffer;
+ defined($) && n.context.webgl2 && (R = ComponentDatatype$1.createTypedArray(
+ L,
+ U
+ ), $.getBufferData(
+ R,
+ F ? 0 : D,
+ 0,
+ U
+ )), w && A.normalized && (R = AttributeCompression.dequantize(
+ R,
+ L,
+ g,
+ I
+ ));
+ }
+ if (!defined(M) || !defined(R))
+ return;
+ o = defaultValue(o, Ellipsoid.default), i = defaultValue(i, 1), r = defaultValue(r, 0);
+ const k = M.length;
+ for (let $ = 0; $ < k; $ += 3) {
+ const G = M[$], q = M[$ + 1], z = M[$ + 2];
+ for (const H of T) {
+ const Q = getVertexPosition(
+ R,
+ G,
+ V,
+ B,
+ w,
+ H,
+ i,
+ r,
+ o,
+ scratchV0$2
+ ), ne = getVertexPosition(
+ R,
+ q,
+ V,
+ B,
+ w,
+ H,
+ i,
+ r,
+ o,
+ scratchV1$2
+ ), K = getVertexPosition(
+ R,
+ z,
+ V,
+ B,
+ w,
+ H,
+ i,
+ r,
+ o,
+ scratchV2$1
+ ), Z = IntersectionTests.rayTriangleParametric(
+ t,
+ Q,
+ ne,
+ K,
+ defaultValue(e.backFaceCulling, !0)
+ );
+ defined(Z) && Z < c && Z >= 0 && (c = Z);
+ }
+ }
+ }
+ }
+ if (c !== Number.MAX_VALUE) {
+ if (s = Ray.getPoint(t, c, s), n.mode !== SceneMode$1.SCENE3D) {
+ Cartesian3.fromElements(s.y, s.z, s.x, s);
+ const f = n.mapProjection, h = f.ellipsoid, p = f.unproject(s, scratchPickCartographic);
+ h.cartographicToCartesian(p, s);
+ }
+ return s;
+ }
+}
+function getVertexPosition(e, t, n, i, r, o, s, c, l, d) {
+ const f = n + t * i;
+ if (d.x = e[f], d.y = e[f + 1], d.z = e[f + 2], defined(r))
+ if (r.octEncoded) {
+ if (d = AttributeCompression.octDecodeInRange(
+ d,
+ r.normalizationRange,
+ d
+ ), r.octEncodedZXY) {
+ const h = d.x;
+ d.x = d.z, d.z = d.y, d.y = h;
+ }
+ } else
+ d = Cartesian3.multiplyComponents(
+ d,
+ r.quantizedVolumeStepSize,
+ d
+ ), d = Cartesian3.add(
+ d,
+ r.quantizedVolumeOffset,
+ d
+ );
+ return d = Matrix4.multiplyByPoint(o, d, d), s !== 1 && VerticalExaggeration.getPosition(
+ d,
+ l,
+ s,
+ c,
+ d
+ ), d;
+}
+function Model(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._loader = e.loader, this._resource = e.resource, this.type = defaultValue(e.type, ModelType$1.GLTF), this.modelMatrix = Matrix4.clone(
+ defaultValue(e.modelMatrix, Matrix4.IDENTITY)
+ ), this._modelMatrix = Matrix4.clone(this.modelMatrix), this._scale = defaultValue(e.scale, 1), this._minimumPixelSize = defaultValue(e.minimumPixelSize, 0), this._maximumScale = e.maximumScale, this._clampedScale = defined(this._maximumScale) ? Math.min(this._scale, this._maximumScale) : this._scale, this._computedScale = this._clampedScale, this._updateModelMatrix = !1, this.referenceMatrix = void 0, this._iblReferenceFrameMatrix = Matrix3.clone(Matrix3.IDENTITY), this._resourcesLoaded = !1, this._drawCommandsBuilt = !1, this._ready = !1, this._customShader = e.customShader, this._content = e.content, this._texturesLoaded = !1, this._defaultTexture = void 0, this._activeAnimations = new ModelAnimationCollection(this), this._clampAnimations = defaultValue(e.clampAnimations, !0), this._userAnimationDirty = !1, this._id = e.id, this._idDirty = !1, this._color = Color.clone(e.color), this._colorBlendMode = defaultValue(
+ e.colorBlendMode,
+ ColorBlendMode$1.HIGHLIGHT
+ ), this._colorBlendAmount = defaultValue(e.colorBlendAmount, 0.5);
+ const t = defaultValue(e.silhouetteColor, Color.RED);
+ this._silhouetteColor = Color.clone(t), this._silhouetteSize = defaultValue(e.silhouetteSize, 0), this._silhouetteDirty = !1, this._silhouetteId = void 0, this._cull = defaultValue(e.cull, !0), this._opaquePass = defaultValue(e.opaquePass, Pass$1.OPAQUE), this._allowPicking = defaultValue(e.allowPicking, !0), this._show = defaultValue(e.show, !0), this._style = void 0, this._styleDirty = !1, this._styleCommandsNeeded = void 0;
+ let n = defaultValue(e.featureIdLabel, "featureId_0");
+ typeof n == "number" && (n = `featureId_${n}`), this._featureIdLabel = n;
+ let i = defaultValue(
+ e.instanceFeatureIdLabel,
+ "instanceFeatureId_0"
+ );
+ typeof i == "number" && (i = `instanceFeatureId_${i}`), this._instanceFeatureIdLabel = i, this._featureTables = [], this._featureTableId = void 0, this._featureTableIdDirty = !0, this._pipelineResources = [], this._modelResources = [], this._pickIds = [], this._boundingSphere = new BoundingSphere(), this._initialRadius = void 0, this._heightReference = defaultValue(
+ e.heightReference,
+ HeightReference$1.NONE
+ ), this._heightDirty = this._heightReference !== HeightReference$1.NONE, this._removeUpdateHeightCallback = void 0, this._verticalExaggerationOn = !1, this._clampedModelMatrix = void 0;
+ const r = e.scene;
+ defined(r) && defined(r.terrainProviderChanged) && (this._terrainProviderChangedCallback = r.terrainProviderChanged.addEventListener(
+ () => {
+ this._heightDirty = !0;
+ }
+ )), this._scene = r, this._distanceDisplayCondition = e.distanceDisplayCondition;
+ const o = new PointCloudShading(e.pointCloudShading);
+ this._pointCloudShading = o, this._attenuation = o.attenuation, this._pointCloudBackFaceCulling = o.backFaceCulling;
+ const s = e.clippingPlanes;
+ defined(s) && s.owner === void 0 ? ClippingPlaneCollection.setOwner(s, this, "_clippingPlanes") : this._clippingPlanes = s, this._clippingPlanesState = 0, this._clippingPlanesMatrix = Matrix4.clone(Matrix4.IDENTITY);
+ const c = e.clippingPolygons;
+ defined(c) && c.owner === void 0 ? ClippingPolygonCollection.setOwner(
+ c,
+ this,
+ "_clippingPolygons"
+ ) : this._clippingPolygons = c, this._clippingPolygonsState = 0, this._lightColor = Cartesian3.clone(e.lightColor), this._imageBasedLighting = defined(e.imageBasedLighting) ? e.imageBasedLighting : new ImageBasedLighting(), this._shouldDestroyImageBasedLighting = !defined(e.imageBasedLighting), this._backFaceCulling = defaultValue(e.backFaceCulling, !0), this._backFaceCullingDirty = !1, this._shadows = defaultValue(e.shadows, ShadowMode$1.ENABLED), this._shadowsDirty = !1, this._debugShowBoundingVolumeDirty = !1, this._debugShowBoundingVolume = defaultValue(
+ e.debugShowBoundingVolume,
+ !1
+ ), this._enableDebugWireframe = defaultValue(
+ e.enableDebugWireframe,
+ !1
+ ), this._enableShowOutline = defaultValue(e.enableShowOutline, !0), this._debugWireframe = defaultValue(e.debugWireframe, !1), this._debugWireframe === !0 && this._enableDebugWireframe === !1 && this.type === ModelType$1.GLTF && oneTimeWarning(
+ "model-debug-wireframe-ignored",
+ "enableDebugWireframe must be set to true in Model.fromGltf, otherwise debugWireframe will be ignored."
+ );
+ let l = e.credit;
+ typeof l == "string" && (l = new Credit(l)), this._credits = [], this._credit = l, this._resourceCredits = [], this._gltfCredits = [], this._showCreditsOnScreen = defaultValue(e.showCreditsOnScreen, !1), this._showCreditsOnScreenDirty = !0, this._splitDirection = defaultValue(
+ e.splitDirection,
+ SplitDirection$1.NONE
+ ), this._enableShowOutline = defaultValue(e.enableShowOutline, !0), this.showOutline = defaultValue(e.showOutline, !0), this.outlineColor = defaultValue(e.outlineColor, Color.BLACK), this._classificationType = e.classificationType, this._statistics = new ModelStatistics(), this._sceneMode = void 0, this._projectTo2D = defaultValue(e.projectTo2D, !1), this._enablePick = defaultValue(e.enablePick, !1), this._fogRenderable = void 0, this._skipLevelOfDetail = !1, this._ignoreCommands = defaultValue(e.ignoreCommands, !1), this._errorEvent = new Event(), this._readyEvent = new Event(), this._texturesReadyEvent = new Event(), this._sceneGraph = void 0, this._nodesByName = {}, this.pickObject = e.pickObject, this.useSRGBVertexColors = defaultValue(e.useSRGBVertexColors, !1), this.useSRGBColorFactors = defaultValue(e.useSRGBColorFactors, !1);
+}
+function handleError$2(e, t) {
+ if (e._errorEvent.numberOfListeners > 0) {
+ e._errorEvent.raiseEvent(t);
+ return;
+ }
+ console.log(t);
+}
+function createModelFeatureTables(e, t) {
+ const n = e._featureTables, i = t.propertyTables, r = i.length;
+ for (let o = 0; o < r; o++) {
+ const s = i[o], c = new ModelFeatureTable({
+ model: e,
+ propertyTable: s
+ });
+ n.push(c);
+ }
+ return n;
+}
+function selectFeatureTableId(e, t) {
+ const n = t._featureIdLabel, i = t._instanceFeatureIdLabel;
+ let r, o, s, c;
+ for (r = 0; r < e.nodes.length; r++)
+ if (c = e.nodes[r], defined(c.instances) && (s = ModelUtility.getFeatureIdsByLabel(
+ c.instances.featureIds,
+ i
+ ), defined(s) && defined(s.propertyTableId)))
+ return s.propertyTableId;
+ for (r = 0; r < e.nodes.length; r++)
+ for (c = e.nodes[r], o = 0; o < c.primitives.length; o++) {
+ const l = c.primitives[o], d = ModelUtility.getFeatureIdsByLabel(
+ l.featureIds,
+ n
+ );
+ if (defined(d))
+ return d.propertyTableId;
+ }
+ if (t._featureTables.length === 1)
+ return 0;
+}
+function isColorAlphaDirty(e, t) {
+ if (!defined(e) && !defined(t))
+ return !1;
+ if (defined(e) !== defined(t))
+ return !0;
+ const n = e.alpha, i = t.alpha;
+ return Math.floor(n) !== Math.floor(i) || Math.ceil(n) !== Math.ceil(i);
+}
+Object.defineProperties(Model.prototype, {
+ /**
+ * When true, this model is ready to render, i.e., the external binary, image,
+ * and shader files were downloaded and the WebGL resources were created.
+ *
+ * @memberof Model.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default false
+ */
+ ready: {
+ get: function() {
+ return this._ready;
+ }
+ },
+ /**
+ * Gets an event that is raised when the model encounters an asynchronous rendering error. By subscribing
+ * to the event, you will be notified of the error and can potentially recover from it. Event listeners
+ * are passed an instance of {@link ModelError}.
+ * @memberof Model.prototype
+ * @type {Event}
+ * @readonly
+ */
+ errorEvent: {
+ get: function() {
+ return this._errorEvent;
+ }
+ },
+ /**
+ * Gets an event that is raised when the model is loaded and ready for rendering, i.e. when the external resources
+ * have been downloaded and the WebGL resources are created. Event listeners
+ * are passed an instance of the {@link Model}.
+ *
+ * + * If {@link Model.incrementallyLoadTextures} is true, this event will be raised before all textures are loaded and ready for rendering. Subscribe to {@link Model.texturesReadyEvent} to be notified when the textures are ready. + *
+ * + * @memberof Model.prototype + * @type {Event} + * @readonly + */ + readyEvent: { + get: function() { + return this._readyEvent; + } + }, + /** + * Returns true if textures are loaded separately from the other glTF resources. + * + * @memberof Model.prototype + * + * @type {boolean} + * @readonly + * @private + */ + incrementallyLoadTextures: { + get: function() { + return defaultValue(this._loader.incrementallyLoadTextures, !1); + } + }, + /** + * Gets an event that, if {@link Model.incrementallyLoadTextures} is true, is raised when the model textures are loaded and ready for rendering, i.e. when the external resources + * have been downloaded and the WebGL resources are created. Event listeners + * are passed an instance of the {@link Model}. + * + * @memberof Model.prototype + * @type {Event} + * @readonly + */ + texturesReadyEvent: { + get: function() { + return this._texturesReadyEvent; + } + }, + /** + * @private + */ + loader: { + get: function() { + return this._loader; + } + }, + /** + * Get the estimated memory usage statistics for this model. + * + * @memberof Model.prototype + * + * @type {ModelStatistics} + * @readonly + * + * @private + */ + statistics: { + get: function() { + return this._statistics; + } + }, + /** + * The currently playing glTF animations. + * + * @memberof Model.prototype + * + * @type {ModelAnimationCollection} + * @readonly + */ + activeAnimations: { + get: function() { + return this._activeAnimations; + } + }, + /** + * Determines if the model's animations should hold a pose over frames where no keyframes are specified. + * + * @memberof Model.prototype + * @type {boolean} + * + * @default true + */ + clampAnimations: { + get: function() { + return this._clampAnimations; + }, + set: function(e) { + this._clampAnimations = e; + } + }, + /** + * Whether or not to cull the model using frustum/horizon culling. If the model is part of a 3D Tiles tileset, this property + * will always be false, since the 3D Tiles culling system is used. + * + * @memberof Model.prototype + * + * @type {boolean} + * @readonly + * + * @private + */ + cull: { + get: function() { + return this._cull; + } + }, + /** + * The pass to use in the {@link DrawCommand} for the opaque portions of the model. + * + * @memberof Model.prototype + * + * @type {Pass} + * @readonly + * + * @private + */ + opaquePass: { + get: function() { + return this._opaquePass; + } + }, + /** + * Point cloud shading settings for controlling point cloud attenuation + * and lighting. For 3D Tiles, this is inherited from the + * {@link Cesium3DTileset}. + * + * @memberof Model.prototype + * + * @type {PointCloudShading} + */ + pointCloudShading: { + get: function() { + return this._pointCloudShading; + }, + set: function(e) { + e !== this._pointCloudShading && this.resetDrawCommands(), this._pointCloudShading = e; + } + }, + /** + * The model's custom shader, if it exists. Using custom shaders with a {@link Cesium3DTileStyle} + * may lead to undefined behavior. + * + * @memberof Model.prototype + * + * @type {CustomShader} + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + */ + customShader: { + get: function() { + return this._customShader; + }, + set: function(e) { + e !== this._customShader && this.resetDrawCommands(), this._customShader = e; + } + }, + /** + * The scene graph of this model. + * + * @memberof Model.prototype + * + * @type {ModelSceneGraph} + * @private + */ + sceneGraph: { + get: function() { + return this._sceneGraph; + } + }, + /** + * The tile content this model belongs to, if it is loaded as part of a {@link Cesium3DTileset}. + * + * @memberof Model.prototype + * + * @type {Cesium3DTileContent} + * @readonly + * + * @private + */ + content: { + get: function() { + return this._content; + } + }, + /** + * The height reference of the model, which determines how the model is drawn + * relative to terrain. + * + * @memberof Model.prototype + * + * @type {HeightReference} + * @default {HeightReference.NONE} + * + */ + heightReference: { + get: function() { + return this._heightReference; + }, + set: function(e) { + e !== this._heightReference && (this._heightDirty = !0), this._heightReference = e; + } + }, + /** + * Gets or sets the distance display condition, which specifies at what distance + * from the camera this model will be displayed. + * + * @memberof Model.prototype + * + * @type {DistanceDisplayCondition} + * + * @default undefined + * + */ + distanceDisplayCondition: { + get: function() { + return this._distanceDisplayCondition; + }, + set: function(e) { + this._distanceDisplayCondition = DistanceDisplayCondition.clone( + e, + this._distanceDisplayCondition + ); + } + }, + /** + * The structural metadata from the EXT_structural_metadata extension + * + * @memberof Model.prototype + * + * @type {StructuralMetadata} + * @readonly + * + * @private + */ + structuralMetadata: { + get: function() { + return this._sceneGraph.components.structuralMetadata; + } + }, + /** + * The ID for the feature table to use for picking and styling in this model. + * + * @memberof Model.prototype + * + * @type {number} + * + * @private + */ + featureTableId: { + get: function() { + return this._featureTableId; + }, + set: function(e) { + this._featureTableId = e; + } + }, + /** + * The feature tables for this model. + * + * @memberof Model.prototype + * + * @type {Array} + * @readonly + * + * @private + */ + featureTables: { + get: function() { + return this._featureTables; + }, + set: function(e) { + this._featureTables = e; + } + }, + /** + * A user-defined object that is returned when the model is picked. + * + * @memberof Model.prototype + * + * @type {object} + * + * @default undefined + * + * @see Scene#pick + */ + id: { + get: function() { + return this._id; + }, + set: function(e) { + e !== this._id && (this._idDirty = !0), this._id = e; + } + }, + /** + * Whentrue, each primitive is pickable with {@link Scene#pick}. When false, GPU memory is saved.
+ *
+ * @memberof Model.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @private
+ */
+ allowPicking: {
+ get: function() {
+ return this._allowPicking;
+ }
+ },
+ /**
+ * The style to apply to the features in the model. Cannot be applied if a {@link CustomShader} is also applied.
+ *
+ * @memberof Model.prototype
+ *
+ * @type {Cesium3DTileStyle}
+ */
+ style: {
+ get: function() {
+ return this._style;
+ },
+ set: function(e) {
+ this._style = e, this._styleDirty = !0;
+ }
+ },
+ /**
+ * The color to blend with the model's rendered color.
+ *
+ * @memberof Model.prototype
+ *
+ * @type {Color}
+ *
+ * @default undefined
+ */
+ color: {
+ get: function() {
+ return this._color;
+ },
+ set: function(e) {
+ isColorAlphaDirty(e, this._color) && this.resetDrawCommands(), this._color = Color.clone(e, this._color);
+ }
+ },
+ /**
+ * Defines how the color blends with the model.
+ *
+ * @memberof Model.prototype
+ *
+ * @type {Cesium3DTileColorBlendMode|ColorBlendMode}
+ *
+ * @default ColorBlendMode.HIGHLIGHT
+ */
+ colorBlendMode: {
+ get: function() {
+ return this._colorBlendMode;
+ },
+ set: function(e) {
+ this._colorBlendMode = e;
+ }
+ },
+ /**
+ * Value used to determine the color strength when the colorBlendMode is MIX. A value of 0.0 results in the model's rendered color while a value of 1.0 results in a solid color, with any value in-between resulting in a mix of the two.
+ *
+ * @memberof Model.prototype
+ *
+ * @type {number}
+ *
+ * @default 0.5
+ */
+ colorBlendAmount: {
+ get: function() {
+ return this._colorBlendAmount;
+ },
+ set: function(e) {
+ this._colorBlendAmount = e;
+ }
+ },
+ /**
+ * The silhouette color.
+ *
+ * @memberof Model.prototype
+ *
+ * @type {Color}
+ *
+ * @default Color.RED
+ */
+ silhouetteColor: {
+ get: function() {
+ return this._silhouetteColor;
+ },
+ set: function(e) {
+ if (!Color.equals(e, this._silhouetteColor)) {
+ const t = isColorAlphaDirty(e, this._silhouetteColor);
+ this._silhouetteDirty = this._silhouetteDirty || t;
+ }
+ this._silhouetteColor = Color.clone(e, this._silhouetteColor);
+ }
+ },
+ /**
+ * The size of the silhouette in pixels.
+ *
+ * @memberof Model.prototype
+ *
+ * @type {number}
+ *
+ * @default 0.0
+ */
+ silhouetteSize: {
+ get: function() {
+ return this._silhouetteSize;
+ },
+ set: function(e) {
+ if (e !== this._silhouetteSize) {
+ const t = this._silhouetteSize, n = e > 0 && t === 0 || e === 0 && t > 0;
+ this._silhouetteDirty = this._silhouetteDirty || n, this._backFaceCullingDirty = this._backFaceCullingDirty || n;
+ }
+ this._silhouetteSize = e;
+ }
+ },
+ /**
+ * Gets the model's bounding sphere in world space. This does not take into account
+ * glTF animations, skins, or morph targets. It also does not account for
+ * {@link Model#minimumPixelSize}.
+ *
+ * @memberof Model.prototype
+ *
+ * @type {BoundingSphere}
+ * @readonly
+ */
+ boundingSphere: {
+ get: function() {
+ const e = defined(this._clampedModelMatrix) ? this._clampedModelMatrix : this.modelMatrix;
+ return updateBoundingSphere(this, e), this._boundingSphere;
+ }
+ },
+ /**
+ * This property is for debugging only; it is not for production use nor is it optimized.
+ * + * Draws the bounding sphere for each draw command in the model. + *
+ * + * @memberof Model.prototype + * + * @type {boolean} + * + * @default false + */ + debugShowBoundingVolume: { + get: function() { + return this._debugShowBoundingVolume; + }, + set: function(e) { + this._debugShowBoundingVolume !== e && (this._debugShowBoundingVolumeDirty = !0), this._debugShowBoundingVolume = e; + } + }, + /** + * This property is for debugging only; it is not for production use nor is it optimized. + *+ * Draws the model in wireframe. + *
+ * + * @memberof Model.prototype + * + * @type {boolean} + * + * @default false + */ + debugWireframe: { + get: function() { + return this._debugWireframe; + }, + set: function(e) { + this._debugWireframe !== e && this.resetDrawCommands(), this._debugWireframe = e, this._debugWireframe === !0 && this._enableDebugWireframe === !1 && this.type === ModelType$1.GLTF && oneTimeWarning( + "model-debug-wireframe-ignored", + "enableDebugWireframe must be set to true in Model.fromGltfAsync, otherwise debugWireframe will be ignored." + ); + } + }, + /** + * Whether or not to render the model. + * + * @memberof Model.prototype + * + * @type {boolean} + * + * @default true + */ + show: { + get: function() { + return this._show; + }, + set: function(e) { + this._show = e; + } + }, + /** + * Label of the feature ID set to use for picking and styling. + *+ * For EXT_mesh_features, this is the feature ID's label property, or + * "featureId_N" (where N is the index in the featureIds array) when not + * specified. EXT_feature_metadata did not have a label field, so such + * feature ID sets are always labeled "featureId_N" where N is the index in + * the list of all feature Ids, where feature ID attributes are listed before + * feature ID textures. + *
+ *+ * If featureIdLabel is set to an integer N, it is converted to + * the string "featureId_N" automatically. If both per-primitive and + * per-instance feature IDs are present, the instance feature IDs take + * priority. + *
+ * + * @memberof Model.prototype + * + * @type {string} + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + */ + featureIdLabel: { + get: function() { + return this._featureIdLabel; + }, + set: function(e) { + typeof e == "number" && (e = `featureId_${e}`), e !== this._featureIdLabel && (this._featureTableIdDirty = !0), this._featureIdLabel = e; + } + }, + /** + * Label of the instance feature ID set used for picking and styling. + *+ * If instanceFeatureIdLabel is set to an integer N, it is converted to + * the string "instanceFeatureId_N" automatically. + * If both per-primitive and per-instance feature IDs are present, the + * instance feature IDs take priority. + *
+ * + * @memberof Model.prototype + * + * @type {string} + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + */ + instanceFeatureIdLabel: { + get: function() { + return this._instanceFeatureIdLabel; + }, + set: function(e) { + typeof e == "number" && (e = `instanceFeatureId_${e}`), e !== this._instanceFeatureIdLabel && (this._featureTableIdDirty = !0), this._instanceFeatureIdLabel = e; + } + }, + /** + * The {@link ClippingPlaneCollection} used to selectively disable rendering the model. + * + * @memberof Model.prototype + * + * @type {ClippingPlaneCollection} + */ + clippingPlanes: { + get: function() { + return this._clippingPlanes; + }, + set: function(e) { + e !== this._clippingPlanes && (ClippingPlaneCollection.setOwner(e, this, "_clippingPlanes"), this.resetDrawCommands()); + } + }, + /** + * The {@link ClippingPolygonCollection} used to selectively disable rendering the model. + * + * @memberof Model.prototype + * + * @type {ClippingPolygonCollection} + */ + clippingPolygons: { + get: function() { + return this._clippingPolygons; + }, + set: function(e) { + e !== this._clippingPolygons && (ClippingPolygonCollection.setOwner(e, this, "_clippingPolygons"), this.resetDrawCommands()); + } + }, + /** + * The light color when shading the model. Whenundefined the scene's light color is used instead.
+ *
+ * Disabling additional light sources by setting
+ * model.imageBasedLighting.imageBasedLightingFactor = new Cartesian2(0.0, 0.0)
+ * will make the model much darker. Here, increasing the intensity of the light source will make the model brighter.
+ *
1.0 increase the size of the model; values
+ * less than 1.0 decrease.
+ *
+ * @memberof Model.prototype
+ *
+ * @type {number}
+ *
+ * @default 1.0
+ */
+ scale: {
+ get: function() {
+ return this._scale;
+ },
+ set: function(e) {
+ e !== this._scale && (this._updateModelMatrix = !0), this._scale = e;
+ }
+ },
+ /**
+ * The true scale of the model after being affected by the model's scale,
+ * minimum pixel size, and maximum scale parameters.
+ *
+ * @memberof Model.prototype
+ *
+ * @type {number}
+ * @readonly
+ *
+ * @private
+ */
+ computedScale: {
+ get: function() {
+ return this._computedScale;
+ }
+ },
+ /**
+ * The approximate minimum pixel size of the model regardless of zoom.
+ * This can be used to ensure that a model is visible even when the viewer
+ * zooms out. When 0.0, no minimum size is enforced.
+ *
+ * @memberof Model.prototype
+ *
+ * @type {number}
+ *
+ * @default 0.0
+ */
+ minimumPixelSize: {
+ get: function() {
+ return this._minimumPixelSize;
+ },
+ set: function(e) {
+ e !== this._minimumPixelSize && (this._updateModelMatrix = !0), this._minimumPixelSize = e;
+ }
+ },
+ /**
+ * The maximum scale size for a model. This can be used to give
+ * an upper limit to the {@link Model#minimumPixelSize}, ensuring that the model
+ * is never an unreasonable scale.
+ *
+ * @memberof Model.prototype
+ *
+ * @type {number}
+ */
+ maximumScale: {
+ get: function() {
+ return this._maximumScale;
+ },
+ set: function(e) {
+ e !== this._maximumScale && (this._updateModelMatrix = !0), this._maximumScale = e;
+ }
+ },
+ /**
+ * Determines whether the model casts or receives shadows from light sources.
+
+ * @memberof Model.prototype
+ *
+ * @type {ShadowMode}
+ *
+ * @default ShadowMode.ENABLED
+ */
+ shadows: {
+ get: function() {
+ return this._shadows;
+ },
+ set: function(e) {
+ e !== this._shadows && (this._shadowsDirty = !0), this._shadows = e;
+ }
+ },
+ /**
+ * Gets the credit that will be displayed for the model.
+ *
+ * @memberof Model.prototype
+ *
+ * @type {Credit}
+ * @readonly
+ */
+ credit: {
+ get: function() {
+ return this._credit;
+ }
+ },
+ /**
+ * Gets or sets whether the credits of the model will be displayed
+ * on the screen.
+ *
+ * @memberof Model.prototype
+ *
+ * @type {boolean}
+ *
+ * @default false
+ */
+ showCreditsOnScreen: {
+ get: function() {
+ return this._showCreditsOnScreen;
+ },
+ set: function(e) {
+ this._showCreditsOnScreen !== e && (this._showCreditsOnScreenDirty = !0), this._showCreditsOnScreen = e;
+ }
+ },
+ /**
+ * The {@link SplitDirection} to apply to this model.
+ *
+ * @memberof Model.prototype
+ *
+ * @type {SplitDirection}
+ *
+ * @default {@link SplitDirection.NONE}
+ */
+ splitDirection: {
+ get: function() {
+ return this._splitDirection;
+ },
+ set: function(e) {
+ this._splitDirection !== e && this.resetDrawCommands(), this._splitDirection = e;
+ }
+ },
+ /**
+ * Gets the model's classification type. This determines whether terrain,
+ * 3D Tiles, or both will be classified by this model.
+ * + * Additionally, there are a few requirements/limitations: + *
EXT_mesh_gpu_instancing extension.+ * The 3D Tiles or terrain receiving the classification must be opaque. + *
+ * + * @memberof Model.prototype + * + * @type {ClassificationType} + * @default undefined + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + * @readonly + */ + classificationType: { + get: function() { + return this._classificationType; + } + }, + /** + * Reference to the pick IDs. This is only used internally, e.g. for + * per-feature post-processing in {@link PostProcessStage}. + * + * @memberof Model.prototype + * + * @type {PickId[]} + * @readonly + * + * @private + */ + pickIds: { + get: function() { + return this._pickIds; + } + }, + /** + * The {@link StyleCommandsNeeded} for the style currently applied to + * the features in the model. This is used internally by the {@link ModelDrawCommand} + * when determining which commands to submit in an update. + * + * @memberof Model.prototype + * + * @type {StyleCommandsNeeded} + * @readonly + * + * @private + */ + styleCommandsNeeded: { + get: function() { + return this._styleCommandsNeeded; + } + } +}); +Model.prototype.getNode = function(e) { + return this._nodesByName[e]; +}; +Model.prototype.setArticulationStage = function(e, t) { + this._sceneGraph.setArticulationStage(e, t); +}; +Model.prototype.applyArticulations = function() { + this._sceneGraph.applyArticulations(); +}; +Model.prototype.makeStyleDirty = function() { + this._styleDirty = !0; +}; +Model.prototype.resetDrawCommands = function() { + this._drawCommandsBuilt = !1; +}; +const scratchIBLReferenceFrameMatrix4 = new Matrix4(), scratchIBLReferenceFrameMatrix3 = new Matrix3(), scratchClippingPlanesMatrix$2 = new Matrix4(); +Model.prototype.update = function(e) { + let t = !1; + try { + t = processLoader(this, e); + } catch (n) { + if (!this._loader.incrementallyLoadTextures && n.name === "TextureError") + handleError$2(this, n); + else { + const i = ModelUtility.getError( + "model", + this._resource, + n + ); + handleError$2(this, i); + } + } + if (updateCustomShader(this, e), updateImageBasedLighting(this, e), !this._resourcesLoaded && t) { + this._resourcesLoaded = !0; + const n = this._loader.components; + if (!defined(n)) { + if (this._loader.isUnloaded()) + return; + const o = ModelUtility.getError( + "model", + this._resource, + new RuntimeError("Failed to load model.") + ); + handleError$2(o), this._rejectLoad = this._rejectLoad && this._rejectLoad(o); + } + const i = n.structuralMetadata; + defined(i) && i.propertyTableCount > 0 && createModelFeatureTables(this, i); + const r = new ModelSceneGraph({ + model: this, + modelComponents: n + }); + this._sceneGraph = r, this._gltfCredits = r.components.asset.credits; + } + if (!(!this._resourcesLoaded || e.mode === SceneMode$1.MORPHING)) { + if (updateFeatureTableId(this), updateStyle(this), updateFeatureTables(this, e), updatePointCloudShading(this), updateSilhouette(this, e), updateSkipLevelOfDetail(this, e), updateClippingPlanes$2(this, e), updateClippingPolygons$1(this, e), updateSceneMode(this, e), updateFog(this, e), updateVerticalExaggeration$1(this, e), this._defaultTexture = e.context.defaultTexture, buildDrawCommands(this, e), updateModelMatrix(this), updateClamping(this), updateBoundingSphereAndScale(this, e), updateReferenceMatrices(this, e), !this._ready) { + e.afterRender.push(() => { + this._ready = !0, this._readyEvent.raiseEvent(this); + }); + return; + } + this._loader.incrementallyLoadTextures && !this._texturesLoaded && this._loader.texturesLoaded && (this.resetDrawCommands(), this._texturesLoaded = !0, this._texturesReadyEvent.raiseEvent(this)), updatePickIds(this), updateSceneGraph(this, e), updateShowCreditsOnScreen(this), submitDrawCommands(this, e); + } +}; +function processLoader(e, t) { + return !e._resourcesLoaded || e._loader.incrementallyLoadTextures && !e._texturesLoaded ? (t.afterRender.push(() => !0), e._loader.process(t)) : !0; +} +function updateCustomShader(e, t) { + defined(e._customShader) && e._customShader.update(t); +} +function updateImageBasedLighting(e, t) { + e._imageBasedLighting.update(t), e._imageBasedLighting.shouldRegenerateShaders && e.resetDrawCommands(); +} +function updateFeatureTableId(e) { + if (!e._featureTableIdDirty) + return; + e._featureTableIdDirty = !1; + const t = e._sceneGraph.components, n = t.structuralMetadata; + defined(n) && n.propertyTableCount > 0 && (e.featureTableId = selectFeatureTableId(t, e), e._styleDirty = !0, e.resetDrawCommands()); +} +function updateStyle(e) { + e._styleDirty && (e.applyStyle(e._style), e._styleDirty = !1); +} +function updateFeatureTables(e, t) { + const n = e._featureTables, i = n.length; + let r = !1; + for (let o = 0; o < i; o++) + n[o].update(t), n[o].styleCommandsNeededDirty && (r = !0); + r && updateStyleCommandsNeeded(e); +} +function updateStyleCommandsNeeded(e) { + const t = e.featureTables[e.featureTableId]; + e._styleCommandsNeeded = StyleCommandsNeeded$1.getStyleCommandsNeeded( + t.featuresLength, + t.batchTexture.translucentFeaturesLength + ); +} +function updatePointCloudShading(e) { + const t = e.pointCloudShading; + t.attenuation !== e._attenuation && (e.resetDrawCommands(), e._attenuation = t.attenuation), t.backFaceCulling !== e._pointCloudBackFaceCulling && (e.resetDrawCommands(), e._pointCloudBackFaceCulling = t.backFaceCulling); +} +function updateSilhouette(e, t) { + e._silhouetteDirty && (supportsSilhouettes(t) && e.resetDrawCommands(), e._silhouetteDirty = !1); +} +function updateSkipLevelOfDetail(e, t) { + const n = e.hasSkipLevelOfDetail(t); + n !== e._skipLevelOfDetail && (e.resetDrawCommands(), e._skipLevelOfDetail = n); +} +function updateClippingPlanes$2(e, t) { + let n = 0; + e.isClippingEnabled() && (e._clippingPlanes.owner === e && e._clippingPlanes.update(t), n = e._clippingPlanes.clippingPlanesState), n !== e._clippingPlanesState && (e.resetDrawCommands(), e._clippingPlanesState = n); +} +function updateClippingPolygons$1(e, t) { + let n = 0; + e.isClippingPolygonsEnabled() && (e._clippingPolygons.owner === e && (e._clippingPolygons.update(t), e._clippingPolygons.queueCommands(t)), n = e._clippingPolygons.clippingPolygonsState), n !== e._clippingPolygonsState && (e.resetDrawCommands(), e._clippingPolygonsState = n); +} +function updateSceneMode(e, t) { + t.mode !== e._sceneMode && (e._projectTo2D ? e.resetDrawCommands() : e._updateModelMatrix = !0, e._sceneMode = t.mode); +} +function updateFog(e, t) { + const n = t.fog.enabled && t.fog.renderable; + n !== e._fogRenderable && (e.resetDrawCommands(), e._fogRenderable = n); +} +function updateVerticalExaggeration$1(e, t) { + const n = t.verticalExaggeration !== 1; + e._verticalExaggerationOn !== n && (e.resetDrawCommands(), e._verticalExaggerationOn = n); +} +function buildDrawCommands(e, t) { + e._drawCommandsBuilt || (e.destroyPipelineResources(), e._sceneGraph.buildDrawCommands(t), e._drawCommandsBuilt = !0); +} +function updateModelMatrix(e, t) { + Matrix4.equals(e.modelMatrix, e._modelMatrix) || (e._updateModelMatrix = !0, e._modelMatrix = Matrix4.clone(e.modelMatrix, e._modelMatrix)); +} +const scratchPosition$a = new Cartesian3(), scratchCartographic$g = new Cartographic(); +function updateClamping(e) { + if (!e._updateModelMatrix && !e._heightDirty && e._minimumPixelSize === 0) + return; + defined(e._removeUpdateHeightCallback) && (e._removeUpdateHeightCallback(), e._removeUpdateHeightCallback = void 0); + const t = e._scene; + if (!defined(t) || e.heightReference === HeightReference$1.NONE) { + e._clampedModelMatrix = void 0; + return; + } + const n = defaultValue(t.ellipsoid, Ellipsoid.default), i = e.modelMatrix; + scratchPosition$a.x = i[12], scratchPosition$a.y = i[13], scratchPosition$a.z = i[14]; + const r = n.cartesianToCartographic(scratchPosition$a); + defined(e._clampedModelMatrix) || (e._clampedModelMatrix = Matrix4.clone(i, new Matrix4())), e._removeUpdateHeightCallback = t.updateHeight( + r, + getUpdateHeightCallback(e, n, r), + e.heightReference + ); + const o = t.getHeight(r, e.heightReference); + if (defined(o)) { + const s = getUpdateHeightCallback(e, n, r); + Cartographic.clone(r, scratchCartographic$g), scratchCartographic$g.height = o, s(scratchCartographic$g); + } + e._heightDirty = !1, e._updateModelMatrix = !0; +} +function updateBoundingSphereAndScale(e, t) { + if (!e._updateModelMatrix && e._minimumPixelSize === 0) + return; + const n = defined(e._clampedModelMatrix) ? e._clampedModelMatrix : e.modelMatrix; + updateBoundingSphere(e, n), updateComputedScale(e, n, t); +} +function updateBoundingSphere(e, t) { + e._clampedScale = defined(e._maximumScale) ? Math.min(e._scale, e._maximumScale) : e._scale, e._boundingSphere.center = Cartesian3.multiplyByScalar( + e._sceneGraph.boundingSphere.center, + e._clampedScale, + e._boundingSphere.center + ), e._boundingSphere.radius = e._initialRadius * e._clampedScale, e._boundingSphere = BoundingSphere.transform( + e._boundingSphere, + t, + e._boundingSphere + ); +} +function updateComputedScale(e, t, n) { + let i = e.scale; + if (e.minimumPixelSize !== 0 && !e._projectTo2D) { + const r = n.context, o = Math.max( + r.drawingBufferWidth, + r.drawingBufferHeight + ); + Matrix4.getTranslation(t, scratchPosition$a), e._sceneMode !== SceneMode$1.SCENE3D && SceneTransforms.computeActualEllipsoidPosition( + n, + scratchPosition$a, + scratchPosition$a + ); + const s = e._boundingSphere.radius, c = scaleInPixels(scratchPosition$a, s, n), l = 1 / c; + Math.min( + l * (2 * s), + o + ) < e.minimumPixelSize && (i = e.minimumPixelSize * c / (2 * e._initialRadius)); + } + e._computedScale = defined(e.maximumScale) ? Math.min(e.maximumScale, i) : i; +} +function updatePickIds(e) { + if (!e._idDirty) + return; + e._idDirty = !1; + const t = e._id, n = e._pickIds, i = n.length; + for (let r = 0; r < i; ++r) + n[r].object.id = t; +} +const yUpToZUp = new Matrix3(1, 0, 0, 0, 0, 1, 0, -1, 0); +function updateReferenceMatrices(e, t) { + const n = defined(e._clampedModelMatrix) ? e._clampedModelMatrix : e.modelMatrix, i = defaultValue(e.referenceMatrix, n), r = t.context, o = e._imageBasedLighting; + if (o.useSphericalHarmonicCoefficients || o.useSpecularEnvironmentMaps) { + let s = scratchIBLReferenceFrameMatrix3, c = scratchIBLReferenceFrameMatrix4; + c = Matrix4.multiply( + r.uniformState.view3D, + i, + c + ), s = Matrix4.getRotation( + c, + s + ), s = Matrix3.transpose( + s, + s + ), e._iblReferenceFrameMatrix = Matrix3.multiply( + yUpToZUp, + s, + e._iblReferenceFrameMatrix + ); + } + if (e.isClippingEnabled()) { + let s = scratchClippingPlanesMatrix$2; + s = Matrix4.multiply( + r.uniformState.view3D, + i, + s + ), s = Matrix4.multiply( + s, + e._clippingPlanes.modelMatrix, + s + ), e._clippingPlanesMatrix = Matrix4.inverseTranspose( + s, + e._clippingPlanesMatrix + ); + } +} +function updateSceneGraph(e, t) { + const n = e._sceneGraph; + if (e._updateModelMatrix || e._minimumPixelSize !== 0) { + const r = defined(e._clampedModelMatrix) ? e._clampedModelMatrix : e.modelMatrix; + n.updateModelMatrix(r, t), e._updateModelMatrix = !1; + } + e._backFaceCullingDirty && (n.updateBackFaceCulling(e._backFaceCulling), e._backFaceCullingDirty = !1), e._shadowsDirty && (n.updateShadows(e._shadows), e._shadowsDirty = !1), e._debugShowBoundingVolumeDirty && (n.updateShowBoundingVolume(e._debugShowBoundingVolume), e._debugShowBoundingVolumeDirty = !1); + let i = !1; + defined(e.classificationType) || (i = e._userAnimationDirty || e._activeAnimations.update(t)), n.update(t, i), e._userAnimationDirty = !1; +} +function updateShowCreditsOnScreen(e) { + if (!e._showCreditsOnScreenDirty) + return; + e._showCreditsOnScreenDirty = !1, e._credits.length = 0; + const t = e._showCreditsOnScreen; + if (defined(e._credit)) { + const s = Credit.clone(e._credit); + s.showOnScreen = s.showOnScreen || t, e._credits.push(s); + } + const n = e._resourceCredits, i = n.length; + for (let s = 0; s < i; s++) { + const c = Credit.clone(n[s]); + c.showOnScreen = c.showOnScreen || t, e._credits.push(c); + } + const r = e._gltfCredits, o = r.length; + for (let s = 0; s < o; s++) { + const c = Credit.clone(r[s]); + c.showOnScreen = c.showOnScreen || t, e._credits.push(c); + } +} +function submitDrawCommands(e, t) { + const n = passesDistanceDisplayCondition( + e, + t + ), i = e.isInvisible(), r = e.hasSilhouette(t), o = e._show && e._computedScale !== 0 && n && (!i || r), s = t.passes, c = s.render || s.pick && e.allowPicking; + o && !e._ignoreCommands && c && (addCreditsToCreditDisplay(e, t), e._sceneGraph.pushDrawCommands(t)); +} +const scratchBoundingSphere$1 = new BoundingSphere(); +function scaleInPixels(e, t, n) { + return scratchBoundingSphere$1.center = e, scratchBoundingSphere$1.radius = t, n.camera.getPixelSize( + scratchBoundingSphere$1, + n.context.drawingBufferWidth, + n.context.drawingBufferHeight + ); +} +const scratchUpdateHeightCartesian$1 = new Cartesian3(); +function getUpdateHeightCallback(e, t, n) { + return function(i) { + isHeightReferenceRelative(e.heightReference) && (i.height += n.height), t.cartographicToCartesian( + i, + scratchUpdateHeightCartesian$1 + ); + const r = e._clampedModelMatrix; + Matrix4.clone(e.modelMatrix, r), r[12] = scratchUpdateHeightCartesian$1.x, r[13] = scratchUpdateHeightCartesian$1.y, r[14] = scratchUpdateHeightCartesian$1.z, e._heightDirty = !0; + }; +} +const scratchDisplayConditionCartesian = new Cartesian3(); +function passesDistanceDisplayCondition(e, t) { + const n = e.distanceDisplayCondition; + if (!defined(n)) + return !0; + const i = n.near * n.near, r = n.far * n.far; + let o; + if (t.mode === SceneMode$1.SCENE2D) { + const c = (t.camera.frustum.right - t.camera.frustum.left) * 0.5; + o = c * c; + } else { + const s = Matrix4.getTranslation( + e.modelMatrix, + scratchDisplayConditionCartesian + ); + SceneTransforms.computeActualEllipsoidPosition( + t, + s, + s + ), o = Cartesian3.distanceSquared( + s, + t.camera.positionWC + ); + } + return o >= i && o <= r; +} +function addCreditsToCreditDisplay(e, t) { + const n = t.creditDisplay, i = e._credits, r = i.length; + for (let o = 0; o < r; o++) + n.addCreditToNextFrame(i[o]); +} +Model.prototype.isTranslucent = function() { + const e = this.color; + return defined(e) && e.alpha > 0 && e.alpha < 1; +}; +Model.prototype.isInvisible = function() { + const e = this.color; + return defined(e) && e.alpha === 0; +}; +function supportsSilhouettes(e) { + return e.context.stencilBuffer; +} +Model.prototype.hasSilhouette = function(e) { + return supportsSilhouettes(e) && this._silhouetteSize > 0 && this._silhouetteColor.alpha > 0 && !defined(this._classificationType); +}; +Model.prototype.hasSkipLevelOfDetail = function(e) { + if (!ModelType$1.is3DTiles(this.type)) + return !1; + const t = e.context.stencilBuffer, n = this._content.tileset; + return t && n.isSkippingLevelOfDetail; +}; +Model.prototype.isClippingEnabled = function() { + const e = this._clippingPlanes; + return defined(e) && e.enabled && e.length !== 0; +}; +Model.prototype.pick = function(e, t, n, i, r) { + return pickModel( + this, + e, + t, + n, + i, + r + ); +}; +Model.prototype.isClippingPolygonsEnabled = function() { + const e = this._clippingPolygons; + return defined(e) && e.enabled && e.length !== 0; +}; +Model.prototype.isDestroyed = function() { + return !1; +}; +Model.prototype.destroy = function() { + const e = this._loader; + defined(e) && e.destroy(); + const t = this._featureTables; + if (defined(t)) { + const r = t.length; + for (let o = 0; o < r; o++) + t[o].destroy(); + } + this.destroyPipelineResources(), this.destroyModelResources(), defined(this._removeUpdateHeightCallback) && (this._removeUpdateHeightCallback(), this._removeUpdateHeightCallback = void 0), defined(this._terrainProviderChangedCallback) && (this._terrainProviderChangedCallback(), this._terrainProviderChangedCallback = void 0); + const n = this._clippingPlanes; + defined(n) && !n.isDestroyed() && n.owner === this && n.destroy(), this._clippingPlanes = void 0; + const i = this._clippingPolygons; + defined(i) && !i.isDestroyed() && i.owner === this && i.destroy(), this._clippingPolygons = void 0, this._shouldDestroyImageBasedLighting && !this._imageBasedLighting.isDestroyed() && this._imageBasedLighting.destroy(), this._imageBasedLighting = void 0, destroyObject(this); +}; +Model.prototype.destroyPipelineResources = function() { + const e = this._pipelineResources; + for (let t = 0; t < e.length; t++) + e[t].destroy(); + this._pipelineResources.length = 0, this._pickIds.length = 0; +}; +Model.prototype.destroyModelResources = function() { + const e = this._modelResources; + for (let t = 0; t < e.length; t++) + e[t].destroy(); + this._modelResources.length = 0; +}; +Model.fromGltfAsync = async function(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = defaultValue(e.url, e.gltf), n = { + releaseGltfJson: e.releaseGltfJson, + asynchronous: e.asynchronous, + incrementallyLoadTextures: e.incrementallyLoadTextures, + upAxis: e.upAxis, + forwardAxis: e.forwardAxis, + loadAttributesFor2D: e.projectTo2D, + enablePick: e.enablePick, + loadIndicesForWireframe: e.enableDebugWireframe, + loadPrimitiveOutline: e.enableShowOutline, + loadForClassification: defined(e.classificationType) + }, i = defaultValue(e.basePath, ""), r = Resource.createIfNeeded(i); + defined(t.asset) ? (n.gltfJson = t, n.baseResource = r, n.gltfResource = r) : t instanceof Uint8Array ? (n.typedArray = t, n.baseResource = r, n.gltfResource = r) : n.gltfResource = Resource.createIfNeeded(t); + const o = new GltfLoader(n), c = defined(e.content) ? ModelType$1.TILE_GLTF : ModelType$1.GLTF, l = n.gltfResource, d = makeModelOptions$1(o, c, e); + d.resource = l; + try { + await o.load(); + } catch (m) { + throw o.destroy(), ModelUtility.getError("model", l, m); + } + const f = e.gltfCallback; + defined(f) && f(o.gltfJson); + const h = new Model(d), p = h._resource.credits; + if (defined(p)) { + const m = p.length; + for (let _ = 0; _ < m; _++) + h._resourceCredits.push(Credit.clone(p[_])); + } + return h; +}; +Model.fromB3dm = async function(e) { + const t = { + b3dmResource: e.resource, + arrayBuffer: e.arrayBuffer, + byteOffset: e.byteOffset, + releaseGltfJson: e.releaseGltfJson, + asynchronous: e.asynchronous, + incrementallyLoadTextures: e.incrementallyLoadTextures, + upAxis: e.upAxis, + forwardAxis: e.forwardAxis, + loadAttributesFor2D: e.projectTo2D, + enablePick: e.enablePick, + loadIndicesForWireframe: e.enableDebugWireframe, + loadPrimitiveOutline: e.enableShowOutline, + loadForClassification: defined(e.classificationType) + }, n = new B3dmLoader(t); + try { + await n.load(); + const i = makeModelOptions$1(n, ModelType$1.TILE_B3DM, e); + return new Model(i); + } catch (i) { + throw n.destroy(), i; + } +}; +Model.fromPnts = async function(e) { + const t = { + arrayBuffer: e.arrayBuffer, + byteOffset: e.byteOffset, + loadAttributesFor2D: e.projectTo2D + }, n = new PntsLoader(t); + try { + await n.load(); + const i = makeModelOptions$1(n, ModelType$1.TILE_PNTS, e); + return new Model(i); + } catch (i) { + throw n.destroy(), i; + } +}; +Model.fromI3dm = async function(e) { + const t = { + i3dmResource: e.resource, + arrayBuffer: e.arrayBuffer, + byteOffset: e.byteOffset, + releaseGltfJson: e.releaseGltfJson, + asynchronous: e.asynchronous, + incrementallyLoadTextures: e.incrementallyLoadTextures, + upAxis: e.upAxis, + forwardAxis: e.forwardAxis, + loadAttributesFor2D: e.projectTo2D, + enablePick: e.enablePick, + loadIndicesForWireframe: e.enableDebugWireframe, + loadPrimitiveOutline: e.enableShowOutline + }, n = new I3dmLoader(t); + try { + await n.load(); + const i = makeModelOptions$1(n, ModelType$1.TILE_I3DM, e); + return new Model(i); + } catch (i) { + throw n.destroy(), i; + } +}; +Model.fromGeoJson = async function(e) { + const t = { + geoJson: e.geoJson + }, n = new GeoJsonLoader(t), i = makeModelOptions$1( + n, + ModelType$1.TILE_GEOJSON, + e + ); + return new Model(i); +}; +const scratchColor$j = new Color(); +Model.prototype.applyColorAndShow = function(e) { + const t = Color.clone(this._color, scratchColor$j), n = defined(e) && defined(e.color), i = defined(e) && defined(e.show); + this._color = n ? e.color.evaluateColor(void 0, this._color) : Color.clone(Color.WHITE, this._color), this._show = i ? e.show.evaluate(void 0) : !0, isColorAlphaDirty(t, this._color) && this.resetDrawCommands(); +}; +Model.prototype.applyStyle = function(e) { + const t = this.type === ModelType$1.TILE_PNTS, n = defined(this.featureTableId) && this.featureTables[this.featureTableId].featuresLength > 0, i = defined(this.structuralMetadata) ? this.structuralMetadata.propertyAttributes : void 0, r = defined(i) && defined(i[0]); + if (t && (!n || r)) { + this.resetDrawCommands(); + return; + } + n ? (this.featureTables[this.featureTableId].applyStyle(e), updateStyleCommandsNeeded(this)) : (this.applyColorAndShow(e), this._styleCommandsNeeded = void 0); +}; +function makeModelOptions$1(e, t, n) { + return { + loader: e, + type: t, + resource: n.resource, + show: n.show, + modelMatrix: n.modelMatrix, + scale: n.scale, + minimumPixelSize: n.minimumPixelSize, + maximumScale: n.maximumScale, + id: n.id, + allowPicking: n.allowPicking, + clampAnimations: n.clampAnimations, + shadows: n.shadows, + debugShowBoundingVolume: n.debugShowBoundingVolume, + enableDebugWireframe: n.enableDebugWireframe, + debugWireframe: n.debugWireframe, + cull: n.cull, + opaquePass: n.opaquePass, + customShader: n.customShader, + content: n.content, + heightReference: n.heightReference, + scene: n.scene, + distanceDisplayCondition: n.distanceDisplayCondition, + color: n.color, + colorBlendAmount: n.colorBlendAmount, + colorBlendMode: n.colorBlendMode, + silhouetteColor: n.silhouetteColor, + silhouetteSize: n.silhouetteSize, + enableShowOutline: n.enableShowOutline, + showOutline: n.showOutline, + outlineColor: n.outlineColor, + clippingPlanes: n.clippingPlanes, + clippingPolygons: n.clippingPolygons, + lightColor: n.lightColor, + imageBasedLighting: n.imageBasedLighting, + backFaceCulling: n.backFaceCulling, + credit: n.credit, + showCreditsOnScreen: n.showCreditsOnScreen, + splitDirection: n.splitDirection, + projectTo2D: n.projectTo2D, + enablePick: n.enablePick, + featureIdLabel: n.featureIdLabel, + instanceFeatureIdLabel: n.instanceFeatureIdLabel, + pointCloudShading: n.pointCloudShading, + classificationType: n.classificationType, + pickObject: n.pickObject, + useSRGBColorFactors: n.useSRGBColorFactors, + useSRGBVertexColors: n.useSRGBVertexColors + }; +} +function Model3DTileContent(e, t, n) { + this._tileset = e, this._tile = t, this._resource = n, this._model = void 0, this._metadata = void 0, this._group = void 0, this._ready = !1; +} +Object.defineProperties(Model3DTileContent.prototype, { + featuresLength: { + get: function() { + const e = this._model, t = e.featureTables, n = e.featureTableId; + return defined(t) && defined(t[n]) ? t[n].featuresLength : 0; + } + }, + pointsLength: { + get: function() { + return this._model.statistics.pointsLength; + } + }, + trianglesLength: { + get: function() { + return this._model.statistics.trianglesLength; + } + }, + geometryByteLength: { + get: function() { + return this._model.statistics.geometryByteLength; + } + }, + texturesByteLength: { + get: function() { + return this._model.statistics.texturesByteLength; + } + }, + batchTableByteLength: { + get: function() { + const e = this._model.statistics; + return e.propertyTablesByteLength + e.batchTexturesByteLength; + } + }, + innerContents: { + get: function() { + } + }, + /** + * Returns true when the tile's content is ready to render; otherwise false + * + * @memberof Model3DTileContent.prototype + * + * @type {boolean} + * @readonly + * @private + */ + ready: { + get: function() { + return this._ready; + } + }, + tileset: { + get: function() { + return this._tileset; + } + }, + tile: { + get: function() { + return this._tile; + } + }, + url: { + get: function() { + return this._resource.getUrlComponent(!0); + } + }, + batchTable: { + get: function() { + const e = this._model, t = e.featureTables, n = e.featureTableId; + if (defined(t) && defined(t[n])) + return t[n]; + } + }, + metadata: { + get: function() { + return this._metadata; + }, + set: function(e) { + this._metadata = e; + } + }, + group: { + get: function() { + return this._group; + }, + set: function(e) { + this._group = e; + } + } +}); +Model3DTileContent.prototype.getFeature = function(e) { + const t = this._model, n = t.featureTableId; + return t.featureTables[n].getFeature(e); +}; +Model3DTileContent.prototype.hasProperty = function(e, t) { + const n = this._model, i = n.featureTableId; + return defined(i) ? n.featureTables[i].hasProperty(e, t) : !1; +}; +Model3DTileContent.prototype.applyDebugSettings = function(e, t) { + t = e ? t : Color.WHITE, this.featuresLength === 0 ? this._model.color = t : defined(this.batchTable) && this.batchTable.setAllColor(t); +}; +Model3DTileContent.prototype.applyStyle = function(e) { + this._model.style = e; +}; +Model3DTileContent.prototype.update = function(e, t) { + const n = this._model, i = this._tile; + n.colorBlendAmount = e.colorBlendAmount, n.colorBlendMode = e.colorBlendMode, n.modelMatrix = i.computedTransform, n.customShader = e.customShader, n.featureIdLabel = e.featureIdLabel, n.instanceFeatureIdLabel = e.instanceFeatureIdLabel, n.lightColor = e.lightColor, n.imageBasedLighting = e.imageBasedLighting, n.backFaceCulling = e.backFaceCulling, n.shadows = e.shadows, n.showCreditsOnScreen = e.showCreditsOnScreen, n.splitDirection = e.splitDirection, n.debugWireframe = e.debugWireframe, n.showOutline = e.showOutline, n.outlineColor = e.outlineColor, n.pointCloudShading = e.pointCloudShading; + const r = e.clippingPlanes; + n.referenceMatrix = e.clippingPlanesOriginMatrix, defined(r) && i.clippingPlanesDirty && (n._clippingPlanes = r.enabled && i._isClipped ? r : void 0), defined(r) && defined(n._clippingPlanes) && n._clippingPlanes !== r && (n._clippingPlanes = r, n._clippingPlanesState = 0); + const o = e.clippingPolygons; + defined(o) && i.clippingPolygonsDirty && (n._clippingPolygons = o.enabled && i._isClippedByPolygon ? o : void 0), defined(o) && defined(n._clippingPolygons) && n._clippingPolygons !== o && (n._clippingPolygons = o, n._clippingPolygonsState = 0), n.update(t), !this._ready && n.ready && (n.activeAnimations.addAll({ + loop: ModelAnimationLoop$1.REPEAT + }), this._ready = !0); +}; +Model3DTileContent.prototype.isDestroyed = function() { + return !1; +}; +Model3DTileContent.prototype.destroy = function() { + return this._model = this._model && this._model.destroy(), destroyObject(this); +}; +Model3DTileContent.fromGltf = async function(e, t, n, i) { + const r = new Model3DTileContent(e, t, n), s = makeModelOptions( + e, + t, + r, + { + gltf: i, + basePath: n + } + ), c = e.vectorClassificationOnly ? void 0 : e.classificationType; + s.classificationType = c; + const l = await Model.fromGltfAsync(s); + return r._model = l, r; +}; +Model3DTileContent.fromB3dm = async function(e, t, n, i, r) { + const o = new Model3DTileContent(e, t, n), c = makeModelOptions( + e, + t, + o, + { + arrayBuffer: i, + byteOffset: r, + resource: n + } + ), l = e.vectorClassificationOnly ? void 0 : e.classificationType; + c.classificationType = l; + const d = await Model.fromB3dm(c); + return o._model = d, o; +}; +Model3DTileContent.fromI3dm = async function(e, t, n, i, r) { + const o = new Model3DTileContent(e, t, n), c = makeModelOptions( + e, + t, + o, + { + arrayBuffer: i, + byteOffset: r, + resource: n + } + ), l = await Model.fromI3dm(c); + return o._model = l, o; +}; +Model3DTileContent.fromPnts = async function(e, t, n, i, r) { + const o = new Model3DTileContent(e, t, n), c = makeModelOptions( + e, + t, + o, + { + arrayBuffer: i, + byteOffset: r, + resource: n + } + ), l = await Model.fromPnts(c); + return o._model = l, o; +}; +Model3DTileContent.fromGeoJson = async function(e, t, n, i) { + const r = new Model3DTileContent(e, t, n), s = makeModelOptions( + e, + t, + r, + { + geoJson: i, + resource: n + } + ), c = await Model.fromGeoJson(s); + return r._model = c, r; +}; +Model3DTileContent.prototype.pick = function(e, t, n) { + if (!defined(this._model) || !this._ready) + return; + const i = t.verticalExaggeration, r = t.verticalExaggerationRelativeHeight; + return this._model.pick( + e, + t, + i, + r, + Ellipsoid.WGS84, + n + ); +}; +function makeModelOptions(e, t, n, i) { + const r = { + cull: !1, + // The model is already culled by 3D Tiles + releaseGltfJson: !0, + // Models are unique and will not benefit from caching so save memory + opaquePass: Pass$1.CESIUM_3D_TILE, + // Draw opaque portions of the model during the 3D Tiles pass + modelMatrix: t.computedTransform, + upAxis: e._modelUpAxis, + forwardAxis: e._modelForwardAxis, + incrementallyLoadTextures: !1, + customShader: e.customShader, + content: n, + colorBlendMode: e.colorBlendMode, + colorBlendAmount: e.colorBlendAmount, + lightColor: e.lightColor, + imageBasedLighting: e.imageBasedLighting, + featureIdLabel: e.featureIdLabel, + instanceFeatureIdLabel: e.instanceFeatureIdLabel, + pointCloudShading: e.pointCloudShading, + clippingPlanes: e.clippingPlanes, + backFaceCulling: e.backFaceCulling, + shadows: e.shadows, + showCreditsOnScreen: e.showCreditsOnScreen, + splitDirection: e.splitDirection, + enableDebugWireframe: e._enableDebugWireframe, + debugWireframe: e.debugWireframe, + projectTo2D: e._projectTo2D, + enablePick: e._enablePick, + enableShowOutline: e._enableShowOutline, + showOutline: e.showOutline, + outlineColor: e.outlineColor, + useSRGBVertexColors: e.useSRGBVertexColors, + useSRGBColorFactors: e.useSRGBColorFactors + }; + return combine$2(i, r); +} +function Tileset3DTileContent(e, t, n) { + this._tileset = e, this._tile = t, this._resource = n, this.featurePropertiesDirty = !1, this._metadata = void 0, this._group = void 0, this._ready = !1; +} +Object.defineProperties(Tileset3DTileContent.prototype, { + featuresLength: { + get: function() { + return 0; + } + }, + pointsLength: { + get: function() { + return 0; + } + }, + trianglesLength: { + get: function() { + return 0; + } + }, + geometryByteLength: { + get: function() { + return 0; + } + }, + texturesByteLength: { + get: function() { + return 0; + } + }, + batchTableByteLength: { + get: function() { + return 0; + } + }, + innerContents: { + get: function() { + } + }, + /** + * Returns true when the tile's content is ready to render; otherwise false + * + * @memberof Tileset3DTileContent.prototype + * + * @type {boolean} + * @readonly + * @private + */ + ready: { + get: function() { + return this._ready; + } + }, + tileset: { + get: function() { + return this._tileset; + } + }, + tile: { + get: function() { + return this._tile; + } + }, + url: { + get: function() { + return this._resource.getUrlComponent(!0); + } + }, + batchTable: { + get: function() { + } + }, + metadata: { + get: function() { + return this._metadata; + }, + set: function(e) { + this._metadata = e; + } + }, + group: { + get: function() { + return this._group; + }, + set: function(e) { + this._group = e; + } + } +}); +Tileset3DTileContent.fromJson = function(e, t, n, i) { + const r = new Tileset3DTileContent(e, t, n); + return r._tileset.loadTileset(r._resource, i, r._tile), r._ready = !0, r; +}; +Tileset3DTileContent.prototype.hasProperty = function(e, t) { + return !1; +}; +Tileset3DTileContent.prototype.getFeature = function(e) { +}; +Tileset3DTileContent.prototype.applyDebugSettings = function(e, t) { +}; +Tileset3DTileContent.prototype.applyStyle = function(e) { +}; +Tileset3DTileContent.prototype.update = function(e, t) { +}; +Tileset3DTileContent.prototype.pick = function(e, t, n) { +}; +Tileset3DTileContent.prototype.isDestroyed = function() { + return !1; +}; +Tileset3DTileContent.prototype.destroy = function() { + return destroyObject(this); +}; +const BillboardCollectionFS = `uniform sampler2D u_atlas; + +#ifdef VECTOR_TILE +uniform vec4 u_highlightColor; +#endif + +in vec2 v_textureCoordinates; +in vec4 v_pickColor; +in vec4 v_color; +in float v_splitDirection; + +#ifdef SDF +in vec4 v_outlineColor; +in float v_outlineWidth; +#endif + +#ifdef FRAGMENT_DEPTH_CHECK +in vec4 v_textureCoordinateBounds; // the min and max x and y values for the texture coordinates +in vec4 v_originTextureCoordinateAndTranslate; // texture coordinate at the origin, billboard translate (used for label glyphs) +in vec4 v_compressed; // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize +in mat2 v_rotationMatrix; + +const float SHIFT_LEFT12 = 4096.0; +const float SHIFT_LEFT1 = 2.0; + +const float SHIFT_RIGHT12 = 1.0 / 4096.0; +const float SHIFT_RIGHT1 = 1.0 / 2.0; + +float getGlobeDepth(vec2 adjustedST, vec2 depthLookupST, bool applyTranslate, vec2 dimensions, vec2 imageSize) +{ + vec2 lookupVector = imageSize * (depthLookupST - adjustedST); + lookupVector = v_rotationMatrix * lookupVector; + vec2 labelOffset = (dimensions - imageSize) * (depthLookupST - vec2(0.0, v_originTextureCoordinateAndTranslate.y)); // aligns label glyph with bounding rectangle. Will be zero for billboards because dimensions and imageSize will be equal + + vec2 translation = v_originTextureCoordinateAndTranslate.zw; + + if (applyTranslate) + { + // this is only needed for labels where the horizontal origin is not LEFT + // it moves the label back to where the "origin" should be since all label glyphs are set to HorizontalOrigin.LEFT + translation += (dimensions * v_originTextureCoordinateAndTranslate.xy * vec2(1.0, 0.0)); + } + + vec2 st = ((lookupVector - translation + labelOffset) + gl_FragCoord.xy) / czm_viewport.zw; + float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, st)); + + if (logDepthOrDepth == 0.0) + { + return 0.0; // not on the globe + } + + vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth); + return eyeCoordinate.z / eyeCoordinate.w; +} +#endif + + +#ifdef SDF + +// Get the distance from the edge of a glyph at a given position sampling an SDF texture. +float getDistance(vec2 position) +{ + return texture(u_atlas, position).r; +} + +// Samples the sdf texture at the given position and produces a color based on the fill color and the outline. +vec4 getSDFColor(vec2 position, float outlineWidth, vec4 outlineColor, float smoothing) +{ + float distance = getDistance(position); + + if (outlineWidth > 0.0) + { + // Don't get the outline edge exceed the SDF_EDGE + float outlineEdge = clamp(SDF_EDGE - outlineWidth, 0.0, SDF_EDGE); + float outlineFactor = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance); + vec4 sdfColor = mix(outlineColor, v_color, outlineFactor); + float alpha = smoothstep(outlineEdge - smoothing, outlineEdge + smoothing, distance); + return vec4(sdfColor.rgb, sdfColor.a * alpha); + } + else + { + float alpha = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance); + return vec4(v_color.rgb, v_color.a * alpha); + } +} +#endif + +void main() +{ + if (v_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard; + if (v_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard; + + vec4 color = texture(u_atlas, v_textureCoordinates); + +#ifdef SDF + float outlineWidth = v_outlineWidth; + vec4 outlineColor = v_outlineColor; + + // Get the current distance + float distance = getDistance(v_textureCoordinates); + +#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives)) + float smoothing = fwidth(distance); + // Get an offset that is approximately half the distance to the neighbor pixels + // 0.354 is approximately half of 1/sqrt(2) + vec2 sampleOffset = 0.354 * vec2(dFdx(v_textureCoordinates) + dFdy(v_textureCoordinates)); + + // Sample the center point + vec4 center = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing); + + // Sample the 4 neighbors + vec4 color1 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing); + vec4 color2 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing); + vec4 color3 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing); + vec4 color4 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing); + + // Equally weight the center sample and the 4 neighboring samples + color = (center + color1 + color2 + color3 + color4)/5.0; +#else + // If no derivatives available (IE 10?), just do a single sample + float smoothing = 1.0/32.0; + color = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing); +#endif + + color = czm_gammaCorrect(color); +#else + color = czm_gammaCorrect(color); + color *= czm_gammaCorrect(v_color); +#endif + +// Fully transparent parts of the billboard are not pickable. +#if !defined(OPAQUE) && !defined(TRANSLUCENT) + if (color.a < 0.005) // matches 0/255 and 1/255 + { + discard; + } +#else +// The billboard is rendered twice. The opaque pass discards translucent fragments +// and the translucent pass discards opaque fragments. +#ifdef OPAQUE + if (color.a < 0.995) // matches < 254/255 + { + discard; + } +#else + if (color.a >= 0.995) // matches 254/255 and 255/255 + { + discard; + } +#endif +#endif + +#ifdef VECTOR_TILE + color *= u_highlightColor; +#endif + out_FragColor = color; + +#ifdef LOG_DEPTH + czm_writeLogDepth(); +#endif + +#ifdef FRAGMENT_DEPTH_CHECK + float temp = v_compressed.y; + + temp = temp * SHIFT_RIGHT1; + + float temp2 = (temp - floor(temp)) * SHIFT_LEFT1; + bool enableDepthTest = temp2 != 0.0; + bool applyTranslate = floor(temp) != 0.0; + + if (enableDepthTest) { + temp = v_compressed.z; + temp = temp * SHIFT_RIGHT12; + + vec2 dimensions; + dimensions.y = (temp - floor(temp)) * SHIFT_LEFT12; + dimensions.x = floor(temp); + + temp = v_compressed.w; + temp = temp * SHIFT_RIGHT12; + + vec2 imageSize; + imageSize.y = (temp - floor(temp)) * SHIFT_LEFT12; + imageSize.x = floor(temp); + + vec2 adjustedST = v_textureCoordinates - v_textureCoordinateBounds.xy; + adjustedST = adjustedST / vec2(v_textureCoordinateBounds.z - v_textureCoordinateBounds.x, v_textureCoordinateBounds.w - v_textureCoordinateBounds.y); + + float epsilonEyeDepth = v_compressed.x + czm_epsilon1; + float globeDepth1 = getGlobeDepth(adjustedST, v_originTextureCoordinateAndTranslate.xy, applyTranslate, dimensions, imageSize); + + // negative values go into the screen + if (globeDepth1 != 0.0 && globeDepth1 > epsilonEyeDepth) + { + float globeDepth2 = getGlobeDepth(adjustedST, vec2(0.0, 1.0), applyTranslate, dimensions, imageSize); // top left corner + if (globeDepth2 != 0.0 && globeDepth2 > epsilonEyeDepth) + { + float globeDepth3 = getGlobeDepth(adjustedST, vec2(1.0, 1.0), applyTranslate, dimensions, imageSize); // top right corner + if (globeDepth3 != 0.0 && globeDepth3 > epsilonEyeDepth) + { + discard; + } + } + } + } +#endif + +} +`, BillboardCollectionVS = `#ifdef INSTANCED +in vec2 direction; +#endif +in vec4 positionHighAndScale; +in vec4 positionLowAndRotation; +in vec4 compressedAttribute0; // pixel offset, translate, horizontal origin, vertical origin, show, direction, texture coordinates (texture offset) +in vec4 compressedAttribute1; // aligned axis, translucency by distance, image width +in vec4 compressedAttribute2; // label horizontal origin, image height, color, pick color, size in meters, valid aligned axis, 13 bits free +in vec4 eyeOffset; // eye offset in meters, 4 bytes free (texture range) +in vec4 scaleByDistance; // near, nearScale, far, farScale +in vec4 pixelOffsetScaleByDistance; // near, nearScale, far, farScale +in vec4 compressedAttribute3; // distance display condition near, far, disableDepthTestDistance, dimensions +in vec2 sdf; // sdf outline color (rgb) and width (w) +in float splitDirection; // splitDirection +#if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK) +in vec4 textureCoordinateBoundsOrLabelTranslate; // the min and max x and y values for the texture coordinates +#endif +#ifdef VECTOR_TILE +in float a_batchId; +#endif + +out vec2 v_textureCoordinates; +#ifdef FRAGMENT_DEPTH_CHECK +out vec4 v_textureCoordinateBounds; +out vec4 v_originTextureCoordinateAndTranslate; +out vec4 v_compressed; // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize +out mat2 v_rotationMatrix; +#endif + +out vec4 v_pickColor; +out vec4 v_color; +out float v_splitDirection; +#ifdef SDF +out vec4 v_outlineColor; +out float v_outlineWidth; +#endif + +const float UPPER_BOUND = 32768.0; + +const float SHIFT_LEFT16 = 65536.0; +const float SHIFT_LEFT12 = 4096.0; +const float SHIFT_LEFT8 = 256.0; +const float SHIFT_LEFT7 = 128.0; +const float SHIFT_LEFT5 = 32.0; +const float SHIFT_LEFT3 = 8.0; +const float SHIFT_LEFT2 = 4.0; +const float SHIFT_LEFT1 = 2.0; + +const float SHIFT_RIGHT12 = 1.0 / 4096.0; +const float SHIFT_RIGHT8 = 1.0 / 256.0; +const float SHIFT_RIGHT7 = 1.0 / 128.0; +const float SHIFT_RIGHT5 = 1.0 / 32.0; +const float SHIFT_RIGHT3 = 1.0 / 8.0; +const float SHIFT_RIGHT2 = 1.0 / 4.0; +const float SHIFT_RIGHT1 = 1.0 / 2.0; + +vec4 addScreenSpaceOffset(vec4 positionEC, vec2 imageSize, float scale, vec2 direction, vec2 origin, vec2 translate, vec2 pixelOffset, vec3 alignedAxis, bool validAlignedAxis, float rotation, bool sizeInMeters, out mat2 rotationMatrix, out float mpp) +{ + // Note the halfSize cannot be computed in JavaScript because it is sent via + // compressed vertex attributes that coerce it to an integer. + vec2 halfSize = imageSize * scale * 0.5; + halfSize *= ((direction * 2.0) - 1.0); + + vec2 originTranslate = origin * abs(halfSize); + +#if defined(ROTATION) || defined(ALIGNED_AXIS) + if (validAlignedAxis || rotation != 0.0) + { + float angle = rotation; + if (validAlignedAxis) + { + vec4 projectedAlignedAxis = czm_modelView3D * vec4(alignedAxis, 0.0); + angle += sign(-projectedAlignedAxis.x) * acos(sign(projectedAlignedAxis.y) * (projectedAlignedAxis.y * projectedAlignedAxis.y) / + (projectedAlignedAxis.x * projectedAlignedAxis.x + projectedAlignedAxis.y * projectedAlignedAxis.y)); + } + + float cosTheta = cos(angle); + float sinTheta = sin(angle); + rotationMatrix = mat2(cosTheta, sinTheta, -sinTheta, cosTheta); + halfSize = rotationMatrix * halfSize; + } + else + { + rotationMatrix = mat2(1.0, 0.0, 0.0, 1.0); + } +#endif + + mpp = czm_metersPerPixel(positionEC); + positionEC.xy += (originTranslate + halfSize) * czm_branchFreeTernary(sizeInMeters, 1.0, mpp); + positionEC.xy += (translate + pixelOffset) * mpp; + + return positionEC; +} + +#ifdef VERTEX_DEPTH_CHECK +float getGlobeDepth(vec4 positionEC) +{ + vec4 posWC = czm_eyeToWindowCoordinates(positionEC); + + float globeDepth = czm_unpackDepth(texture(czm_globeDepthTexture, posWC.xy / czm_viewport.zw)); + + if (globeDepth == 0.0) + { + return 0.0; // not on the globe + } + + vec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth); + return eyeCoordinate.z / eyeCoordinate.w; +} +#endif +void main() +{ + // Modifying this shader may also require modifications to Billboard._computeScreenSpacePosition + + // unpack attributes + vec3 positionHigh = positionHighAndScale.xyz; + vec3 positionLow = positionLowAndRotation.xyz; + float scale = positionHighAndScale.w; + +#if defined(ROTATION) || defined(ALIGNED_AXIS) + float rotation = positionLowAndRotation.w; +#else + float rotation = 0.0; +#endif + + float compressed = compressedAttribute0.x; + + vec2 pixelOffset; + pixelOffset.x = floor(compressed * SHIFT_RIGHT7); + compressed -= pixelOffset.x * SHIFT_LEFT7; + pixelOffset.x -= UPPER_BOUND; + + vec2 origin; + origin.x = floor(compressed * SHIFT_RIGHT5); + compressed -= origin.x * SHIFT_LEFT5; + + origin.y = floor(compressed * SHIFT_RIGHT3); + compressed -= origin.y * SHIFT_LEFT3; + +#ifdef FRAGMENT_DEPTH_CHECK + vec2 depthOrigin = origin.xy; +#endif + origin -= vec2(1.0); + + float show = floor(compressed * SHIFT_RIGHT2); + compressed -= show * SHIFT_LEFT2; + +#ifdef INSTANCED + vec2 textureCoordinatesBottomLeft = czm_decompressTextureCoordinates(compressedAttribute0.w); + vec2 textureCoordinatesRange = czm_decompressTextureCoordinates(eyeOffset.w); + vec2 textureCoordinates = textureCoordinatesBottomLeft + direction * textureCoordinatesRange; +#else + vec2 direction; + direction.x = floor(compressed * SHIFT_RIGHT1); + direction.y = compressed - direction.x * SHIFT_LEFT1; + + vec2 textureCoordinates = czm_decompressTextureCoordinates(compressedAttribute0.w); +#endif + + float temp = compressedAttribute0.y * SHIFT_RIGHT8; + pixelOffset.y = -(floor(temp) - UPPER_BOUND); + + vec2 translate; + translate.y = (temp - floor(temp)) * SHIFT_LEFT16; + + temp = compressedAttribute0.z * SHIFT_RIGHT8; + translate.x = floor(temp) - UPPER_BOUND; + + translate.y += (temp - floor(temp)) * SHIFT_LEFT8; + translate.y -= UPPER_BOUND; + + temp = compressedAttribute1.x * SHIFT_RIGHT8; + float temp2 = floor(compressedAttribute2.w * SHIFT_RIGHT2); + + vec2 imageSize = vec2(floor(temp), temp2); + +#ifdef FRAGMENT_DEPTH_CHECK + float labelHorizontalOrigin = floor(compressedAttribute2.w - (temp2 * SHIFT_LEFT2)); + float applyTranslate = 0.0; + if (labelHorizontalOrigin != 0.0) // is a billboard, so set apply translate to false + { + applyTranslate = 1.0; + labelHorizontalOrigin -= 2.0; + depthOrigin.x = labelHorizontalOrigin + 1.0; + } + + depthOrigin = vec2(1.0) - (depthOrigin * 0.5); +#endif + +#ifdef EYE_DISTANCE_TRANSLUCENCY + vec4 translucencyByDistance; + translucencyByDistance.x = compressedAttribute1.z; + translucencyByDistance.z = compressedAttribute1.w; + + translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0; + + temp = compressedAttribute1.y * SHIFT_RIGHT8; + translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0; +#endif + +#if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK) + temp = compressedAttribute3.w; + temp = temp * SHIFT_RIGHT12; + + vec2 dimensions; + dimensions.y = (temp - floor(temp)) * SHIFT_LEFT12; + dimensions.x = floor(temp); +#endif + +#ifdef ALIGNED_AXIS + vec3 alignedAxis = czm_octDecode(floor(compressedAttribute1.y * SHIFT_RIGHT8)); + temp = compressedAttribute2.z * SHIFT_RIGHT5; + bool validAlignedAxis = (temp - floor(temp)) * SHIFT_LEFT1 > 0.0; +#else + vec3 alignedAxis = vec3(0.0); + bool validAlignedAxis = false; +#endif + + vec4 pickColor; + vec4 color; + + temp = compressedAttribute2.y; + temp = temp * SHIFT_RIGHT8; + pickColor.b = (temp - floor(temp)) * SHIFT_LEFT8; + temp = floor(temp) * SHIFT_RIGHT8; + pickColor.g = (temp - floor(temp)) * SHIFT_LEFT8; + pickColor.r = floor(temp); + + temp = compressedAttribute2.x; + temp = temp * SHIFT_RIGHT8; + color.b = (temp - floor(temp)) * SHIFT_LEFT8; + temp = floor(temp) * SHIFT_RIGHT8; + color.g = (temp - floor(temp)) * SHIFT_LEFT8; + color.r = floor(temp); + + temp = compressedAttribute2.z * SHIFT_RIGHT8; + bool sizeInMeters = floor((temp - floor(temp)) * SHIFT_LEFT7) > 0.0; + temp = floor(temp) * SHIFT_RIGHT8; + + pickColor.a = (temp - floor(temp)) * SHIFT_LEFT8; + pickColor /= 255.0; + + color.a = floor(temp); + color /= 255.0; + + /////////////////////////////////////////////////////////////////////////// + + vec4 p = czm_translateRelativeToEye(positionHigh, positionLow); + vec4 positionEC = czm_modelViewRelativeToEye * p; + +#if defined(FRAGMENT_DEPTH_CHECK) || defined(VERTEX_DEPTH_CHECK) + float eyeDepth = positionEC.z; +#endif + + positionEC = czm_eyeOffset(positionEC, eyeOffset.xyz); + positionEC.xyz *= show; + + /////////////////////////////////////////////////////////////////////////// + +#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(EYE_DISTANCE_PIXEL_OFFSET) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE) + float lengthSq; + if (czm_sceneMode == czm_sceneMode2D) + { + // 2D camera distance is a special case + // treat all billboards as flattened to the z=0.0 plane + lengthSq = czm_eyeHeight2D.y; + } + else + { + lengthSq = dot(positionEC.xyz, positionEC.xyz); + } +#endif + +#ifdef EYE_DISTANCE_SCALING + float distanceScale = czm_nearFarScalar(scaleByDistance, lengthSq); + scale *= distanceScale; + translate *= distanceScale; + // push vertex behind near plane for clipping + if (scale == 0.0) + { + positionEC.xyz = vec3(0.0); + } +#endif + + float translucency = 1.0; +#ifdef EYE_DISTANCE_TRANSLUCENCY + translucency = czm_nearFarScalar(translucencyByDistance, lengthSq); + // push vertex behind near plane for clipping + if (translucency == 0.0) + { + positionEC.xyz = vec3(0.0); + } +#endif + +#ifdef EYE_DISTANCE_PIXEL_OFFSET + float pixelOffsetScale = czm_nearFarScalar(pixelOffsetScaleByDistance, lengthSq); + pixelOffset *= pixelOffsetScale; +#endif + +#ifdef DISTANCE_DISPLAY_CONDITION + float nearSq = compressedAttribute3.x; + float farSq = compressedAttribute3.y; + if (lengthSq < nearSq || lengthSq > farSq) + { + positionEC.xyz = vec3(0.0); + } +#endif + + mat2 rotationMatrix; + float mpp; + +#ifdef DISABLE_DEPTH_DISTANCE + float disableDepthTestDistance = compressedAttribute3.z; +#endif + +#ifdef VERTEX_DEPTH_CHECK +if (lengthSq < disableDepthTestDistance) { + float depthsilon = 10.0; + + vec2 labelTranslate = textureCoordinateBoundsOrLabelTranslate.xy; + vec4 pEC1 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp); + float globeDepth1 = getGlobeDepth(pEC1); + + if (globeDepth1 != 0.0 && pEC1.z + depthsilon < globeDepth1) + { + vec4 pEC2 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0, 1.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp); + float globeDepth2 = getGlobeDepth(pEC2); + + if (globeDepth2 != 0.0 && pEC2.z + depthsilon < globeDepth2) + { + vec4 pEC3 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(1.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp); + float globeDepth3 = getGlobeDepth(pEC3); + if (globeDepth3 != 0.0 && pEC3.z + depthsilon < globeDepth3) + { + positionEC.xyz = vec3(0.0); + } + } + } +} +#endif + + positionEC = addScreenSpaceOffset(positionEC, imageSize, scale, direction, origin, translate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp); + gl_Position = czm_projection * positionEC; + v_textureCoordinates = textureCoordinates; + +#ifdef LOG_DEPTH + czm_vertexLogDepth(); +#endif + +#ifdef DISABLE_DEPTH_DISTANCE + if (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0) + { + disableDepthTestDistance = czm_minimumDisableDepthTestDistance; + } + + if (disableDepthTestDistance != 0.0) + { + // Don't try to "multiply both sides" by w. Greater/less-than comparisons won't work for negative values of w. + float zclip = gl_Position.z / gl_Position.w; + bool clipped = (zclip < -1.0 || zclip > 1.0); + if (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance))) + { + // Position z on the near plane. + gl_Position.z = -gl_Position.w; +#ifdef LOG_DEPTH + v_depthFromNearPlusOne = 1.0; +#endif + } + } +#endif + +#ifdef FRAGMENT_DEPTH_CHECK + if (sizeInMeters) { + translate /= mpp; + dimensions /= mpp; + imageSize /= mpp; + } + +#if defined(ROTATION) || defined(ALIGNED_AXIS) + v_rotationMatrix = rotationMatrix; +#else + v_rotationMatrix = mat2(1.0, 0.0, 0.0, 1.0); +#endif + + float enableDepthCheck = 0.0; + if (lengthSq < disableDepthTestDistance) + { + enableDepthCheck = 1.0; + } + + float dw = floor(clamp(dimensions.x, 0.0, SHIFT_LEFT12)); + float dh = floor(clamp(dimensions.y, 0.0, SHIFT_LEFT12)); + + float iw = floor(clamp(imageSize.x, 0.0, SHIFT_LEFT12)); + float ih = floor(clamp(imageSize.y, 0.0, SHIFT_LEFT12)); + + v_compressed.x = eyeDepth; + v_compressed.y = applyTranslate * SHIFT_LEFT1 + enableDepthCheck; + v_compressed.z = dw * SHIFT_LEFT12 + dh; + v_compressed.w = iw * SHIFT_LEFT12 + ih; + v_originTextureCoordinateAndTranslate.xy = depthOrigin; + v_originTextureCoordinateAndTranslate.zw = translate; + v_textureCoordinateBounds = textureCoordinateBoundsOrLabelTranslate; + +#endif + +#ifdef SDF + vec4 outlineColor; + float outlineWidth; + + temp = sdf.x; + temp = temp * SHIFT_RIGHT8; + outlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8; + temp = floor(temp) * SHIFT_RIGHT8; + outlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8; + outlineColor.r = floor(temp); + + temp = sdf.y; + temp = temp * SHIFT_RIGHT8; + float temp3 = (temp - floor(temp)) * SHIFT_LEFT8; + temp = floor(temp) * SHIFT_RIGHT8; + outlineWidth = (temp - floor(temp)) * SHIFT_LEFT8; + outlineColor.a = floor(temp); + outlineColor /= 255.0; + + v_outlineWidth = outlineWidth / 255.0; + v_outlineColor = outlineColor; + v_outlineColor.a *= translucency; +#endif + + v_pickColor = pickColor; + + v_color = color; + v_color.a *= translucency; + v_splitDirection = splitDirection; +} +`; +function Billboard(e, t) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + let n = e.translucencyByDistance, i = e.pixelOffsetScaleByDistance, r = e.scaleByDistance, o = e.distanceDisplayCondition; + defined(n) && (n = NearFarScalar.clone(n)), defined(i) && (i = NearFarScalar.clone( + i + )), defined(r) && (r = NearFarScalar.clone(r)), defined(o) && (o = DistanceDisplayCondition.clone( + o + )), this._show = defaultValue(e.show, !0), this._position = Cartesian3.clone( + defaultValue(e.position, Cartesian3.ZERO) + ), this._actualPosition = Cartesian3.clone(this._position), this._pixelOffset = Cartesian2.clone( + defaultValue(e.pixelOffset, Cartesian2.ZERO) + ), this._translate = new Cartesian2(0, 0), this._eyeOffset = Cartesian3.clone( + defaultValue(e.eyeOffset, Cartesian3.ZERO) + ), this._heightReference = defaultValue( + e.heightReference, + HeightReference$1.NONE + ), this._verticalOrigin = defaultValue( + e.verticalOrigin, + VerticalOrigin$1.CENTER + ), this._horizontalOrigin = defaultValue( + e.horizontalOrigin, + HorizontalOrigin$1.CENTER + ), this._scale = defaultValue(e.scale, 1), this._color = Color.clone(defaultValue(e.color, Color.WHITE)), this._rotation = defaultValue(e.rotation, 0), this._alignedAxis = Cartesian3.clone( + defaultValue(e.alignedAxis, Cartesian3.ZERO) + ), this._width = e.width, this._height = e.height, this._scaleByDistance = r, this._translucencyByDistance = n, this._pixelOffsetScaleByDistance = i, this._sizeInMeters = defaultValue(e.sizeInMeters, !1), this._distanceDisplayCondition = o, this._disableDepthTestDistance = e.disableDepthTestDistance, this._id = e.id, this._collection = defaultValue(e.collection, t), this._pickId = void 0, this._pickPrimitive = defaultValue(e._pickPrimitive, this), this._billboardCollection = t, this._dirty = !1, this._index = -1, this._batchIndex = void 0, this._imageIndex = -1, this._imageIndexPromise = void 0, this._imageId = void 0, this._image = void 0, this._imageSubRegion = void 0, this._imageWidth = void 0, this._imageHeight = void 0, this._labelDimensions = void 0, this._labelHorizontalOrigin = void 0, this._labelTranslate = void 0; + const s = e.image; + let c = e.imageId; + defined(s) && (defined(c) || (typeof s == "string" ? c = s : defined(s.src) ? c = s.src : c = createGuid()), this._imageId = c, this._image = s), defined(e.imageSubRegion) && (this._imageId = c, this._imageSubRegion = e.imageSubRegion), defined(this._billboardCollection._textureAtlas) && this._loadImage(), this._actualClampedPosition = void 0, this._removeCallbackFunc = void 0, this._mode = SceneMode$1.SCENE3D, this._clusterShow = !0, this._outlineColor = Color.clone( + defaultValue(e.outlineColor, Color.BLACK) + ), this._outlineWidth = defaultValue(e.outlineWidth, 0), this._updateClamping(), this._splitDirection = defaultValue( + e.splitDirection, + SplitDirection$1.NONE + ); +} +const SHOW_INDEX$7 = Billboard.SHOW_INDEX = 0, POSITION_INDEX$7 = Billboard.POSITION_INDEX = 1, PIXEL_OFFSET_INDEX$1 = Billboard.PIXEL_OFFSET_INDEX = 2, EYE_OFFSET_INDEX$1 = Billboard.EYE_OFFSET_INDEX = 3, HORIZONTAL_ORIGIN_INDEX$1 = Billboard.HORIZONTAL_ORIGIN_INDEX = 4, VERTICAL_ORIGIN_INDEX$1 = Billboard.VERTICAL_ORIGIN_INDEX = 5, SCALE_INDEX$3 = Billboard.SCALE_INDEX = 6, IMAGE_INDEX_INDEX$1 = Billboard.IMAGE_INDEX_INDEX = 7, COLOR_INDEX$5 = Billboard.COLOR_INDEX = 8, ROTATION_INDEX$1 = Billboard.ROTATION_INDEX = 9, ALIGNED_AXIS_INDEX$1 = Billboard.ALIGNED_AXIS_INDEX = 10, SCALE_BY_DISTANCE_INDEX$3 = Billboard.SCALE_BY_DISTANCE_INDEX = 11, TRANSLUCENCY_BY_DISTANCE_INDEX$3 = Billboard.TRANSLUCENCY_BY_DISTANCE_INDEX = 12, PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX$1 = Billboard.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX = 13, DISTANCE_DISPLAY_CONDITION$2 = Billboard.DISTANCE_DISPLAY_CONDITION = 14, DISABLE_DEPTH_DISTANCE$1 = Billboard.DISABLE_DEPTH_DISTANCE = 15; +Billboard.TEXTURE_COORDINATE_BOUNDS = 16; +const SDF_INDEX$1 = Billboard.SDF_INDEX = 17, SPLIT_DIRECTION_INDEX$3 = Billboard.SPLIT_DIRECTION_INDEX = 18; +Billboard.NUMBER_OF_PROPERTIES = 19; +function makeDirty$3(e, t) { + const n = e._billboardCollection; + defined(n) && (n._updateBillboard(e, t), e._dirty = !0); +} +Object.defineProperties(Billboard.prototype, { + /** + * Determines if this billboard will be shown. Use this to hide or show a billboard, instead + * of removing it and re-adding it to the collection. + * @memberof Billboard.prototype + * @type {boolean} + * @default true + */ + show: { + get: function() { + return this._show; + }, + set: function(e) { + this._show !== e && (this._show = e, makeDirty$3(this, SHOW_INDEX$7)); + } + }, + /** + * Gets or sets the Cartesian position of this billboard. + * @memberof Billboard.prototype + * @type {Cartesian3} + */ + position: { + get: function() { + return this._position; + }, + set: function(e) { + const t = this._position; + Cartesian3.equals(t, e) || (Cartesian3.clone(e, t), Cartesian3.clone(e, this._actualPosition), this._updateClamping(), makeDirty$3(this, POSITION_INDEX$7)); + } + }, + /** + * Gets or sets the height reference of this billboard. + * @memberof Billboard.prototype + * @type {HeightReference} + * @default HeightReference.NONE + */ + heightReference: { + get: function() { + return this._heightReference; + }, + set: function(e) { + const t = this._heightReference; + e !== t && (this._heightReference = e, this._updateClamping(), makeDirty$3(this, POSITION_INDEX$7)); + } + }, + /** + * Gets or sets the pixel offset in screen space from the origin of this billboard. This is commonly used + * to align multiple billboards and labels at the same position, e.g., an image and text. The + * screen space origin is the top, left corner of the canvas;x increases from
+ * left to right, and y increases from top to bottom.
+ * default |
+ * b.pixeloffset = new Cartesian2(50, 25); |
+ *
x points towards the viewer's right, y points up, and
+ * z points into the screen. Eye coordinates use the same scale as world and model coordinates,
+ * which is typically meters.
+ * ![]() |
+ * ![]() |
+ *
b.eyeOffset = new Cartesian3(0.0, 8000000.0, 0.0);

1.0 does not change the size of the billboard; a scale greater than
+ * 1.0 enlarges the billboard; a positive scale less than 1.0 shrinks
+ * the billboard.
+ * 
0.5, 1.0,
+ * and 2.0.
+ * 0.0 makes the billboard transparent, and 1.0 makes the billboard opaque.
+ * default![]() |
+ * alpha : 0.5![]() |
+ *
value's red, green,
+ * blue, and alpha properties as shown in Example 1. These components range from 0.0
+ * (no intensity) to 1.0 (full intensity).
+ * @memberof Billboard.prototype
+ * @type {Color}
+ *
+ * @example
+ * // Example 1. Assign yellow.
+ * b.color = Cesium.Color.YELLOW;
+ *
+ * @example
+ * // Example 2. Make a billboard 50% translucent.
+ * b.color = new Cesium.Color(1.0, 1.0, 1.0, 0.5);
+ */
+ color: {
+ get: function() {
+ return this._color;
+ },
+ set: function(e) {
+ const t = this._color;
+ Color.equals(t, e) || (Color.clone(e, t), makeDirty$3(this, COLOR_INDEX$5));
+ }
+ },
+ /**
+ * Gets or sets the rotation angle in radians.
+ * @memberof Billboard.prototype
+ * @type {number}
+ */
+ rotation: {
+ get: function() {
+ return this._rotation;
+ },
+ set: function(e) {
+ this._rotation !== e && (this._rotation = e, makeDirty$3(this, ROTATION_INDEX$1));
+ }
+ },
+ /**
+ * Gets or sets the aligned axis in world space. The aligned axis is the unit vector that the billboard up vector points towards.
+ * The default is the zero vector, which means the billboard is aligned to the screen up vector.
+ * @memberof Billboard.prototype
+ * @type {Cartesian3}
+ * @example
+ * // Example 1.
+ * // Have the billboard up vector point north
+ * billboard.alignedAxis = Cesium.Cartesian3.UNIT_Z;
+ *
+ * @example
+ * // Example 2.
+ * // Have the billboard point east.
+ * billboard.alignedAxis = Cesium.Cartesian3.UNIT_Z;
+ * billboard.rotation = -Cesium.Math.PI_OVER_TWO;
+ *
+ * @example
+ * // Example 3.
+ * // Reset the aligned axis
+ * billboard.alignedAxis = Cesium.Cartesian3.ZERO;
+ */
+ alignedAxis: {
+ get: function() {
+ return this._alignedAxis;
+ },
+ set: function(e) {
+ const t = this._alignedAxis;
+ Cartesian3.equals(t, e) || (Cartesian3.clone(e, t), makeDirty$3(this, ALIGNED_AXIS_INDEX$1));
+ }
+ },
+ /**
+ * Gets or sets a width for the billboard. If undefined, the image width will be used.
+ * @memberof Billboard.prototype
+ * @type {number}
+ */
+ width: {
+ get: function() {
+ return defaultValue(this._width, this._imageWidth);
+ },
+ set: function(e) {
+ this._width !== e && (this._width = e, makeDirty$3(this, IMAGE_INDEX_INDEX$1));
+ }
+ },
+ /**
+ * Gets or sets a height for the billboard. If undefined, the image height will be used.
+ * @memberof Billboard.prototype
+ * @type {number}
+ */
+ height: {
+ get: function() {
+ return defaultValue(this._height, this._imageHeight);
+ },
+ set: function(e) {
+ this._height !== e && (this._height = e, makeDirty$3(this, IMAGE_INDEX_INDEX$1));
+ }
+ },
+ /**
+ * Gets or sets if the billboard size is in meters or pixels. true to size the billboard in meters;
+ * otherwise, the size is in pixels.
+ * @memberof Billboard.prototype
+ * @type {boolean}
+ * @default false
+ */
+ sizeInMeters: {
+ get: function() {
+ return this._sizeInMeters;
+ },
+ set: function(e) {
+ this._sizeInMeters !== e && (this._sizeInMeters = e, makeDirty$3(this, COLOR_INDEX$5));
+ }
+ },
+ /**
+ * Gets or sets the condition specifying at what distance from the camera that this billboard will be displayed.
+ * @memberof Billboard.prototype
+ * @type {DistanceDisplayCondition}
+ * @default undefined
+ */
+ distanceDisplayCondition: {
+ get: function() {
+ return this._distanceDisplayCondition;
+ },
+ set: function(e) {
+ DistanceDisplayCondition.equals(e, this._distanceDisplayCondition) || (this._distanceDisplayCondition = DistanceDisplayCondition.clone(
+ e,
+ this._distanceDisplayCondition
+ ), makeDirty$3(this, DISTANCE_DISPLAY_CONDITION$2));
+ }
+ },
+ /**
+ * Gets or sets the distance from the camera at which to disable the depth test to, for example, prevent clipping against terrain.
+ * When set to zero, the depth test is always applied. When set to Number.POSITIVE_INFINITY, the depth test is never applied.
+ * @memberof Billboard.prototype
+ * @type {number}
+ */
+ disableDepthTestDistance: {
+ get: function() {
+ return this._disableDepthTestDistance;
+ },
+ set: function(e) {
+ this._disableDepthTestDistance !== e && (this._disableDepthTestDistance = e, makeDirty$3(this, DISABLE_DEPTH_DISTANCE$1));
+ }
+ },
+ /**
+ * Gets or sets the user-defined object returned when the billboard is picked.
+ * @memberof Billboard.prototype
+ * @type {*}
+ */
+ id: {
+ get: function() {
+ return this._id;
+ },
+ set: function(e) {
+ this._id = e, defined(this._pickId) && (this._pickId.object.id = e);
+ }
+ },
+ /**
+ * The primitive to return when picking this billboard.
+ * @memberof Billboard.prototype
+ * @private
+ */
+ pickPrimitive: {
+ get: function() {
+ return this._pickPrimitive;
+ },
+ set: function(e) {
+ this._pickPrimitive = e, defined(this._pickId) && (this._pickId.object.primitive = e);
+ }
+ },
+ /**
+ * @private
+ */
+ pickId: {
+ get: function() {
+ return this._pickId;
+ }
+ },
+ /**
+ * + * Gets or sets the image to be used for this billboard. If a texture has already been created for the + * given image, the existing texture is used. + *
+ *+ * This property can be set to a loaded Image, a URL which will be loaded as an Image automatically, + * a canvas, or another billboard's image property (from the same billboard collection). + *
+ * + * @memberof Billboard.prototype + * @type {string} + * @example + * // load an image from a URL + * b.image = 'some/image/url.png'; + * + * // assuming b1 and b2 are billboards in the same billboard collection, + * // use the same image for both billboards. + * b2.image = b1.image; + */ + image: { + get: function() { + return this._imageId; + }, + set: function(e) { + defined(e) ? typeof e == "string" ? this.setImage(e, e) : e instanceof Resource ? this.setImage(e.url, e) : defined(e.src) ? this.setImage(e.src, e) : defined(e.id) && e.id !== "" ? this.setImage(e.id, e) : this.setImage(createGuid(), e) : (this._imageIndex = -1, this._imageSubRegion = void 0, this._imageId = void 0, this._image = void 0, this._imageIndexPromise = void 0, makeDirty$3(this, IMAGE_INDEX_INDEX$1)); + } + }, + /** + * Whentrue, this billboard is ready to render, i.e., the image
+ * has been downloaded and the WebGL resources are created.
+ *
+ * @memberof Billboard.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default false
+ */
+ ready: {
+ get: function() {
+ return this._imageIndex !== -1;
+ }
+ },
+ /**
+ * Keeps track of the position of the billboard based on the height reference.
+ * @memberof Billboard.prototype
+ * @type {Cartesian3}
+ * @private
+ */
+ _clampedPosition: {
+ get: function() {
+ return this._actualClampedPosition;
+ },
+ set: function(e) {
+ this._actualClampedPosition = Cartesian3.clone(
+ e,
+ this._actualClampedPosition
+ ), makeDirty$3(this, POSITION_INDEX$7);
+ }
+ },
+ /**
+ * Determines whether or not this billboard will be shown or hidden because it was clustered.
+ * @memberof Billboard.prototype
+ * @type {boolean}
+ * @private
+ */
+ clusterShow: {
+ get: function() {
+ return this._clusterShow;
+ },
+ set: function(e) {
+ this._clusterShow !== e && (this._clusterShow = e, makeDirty$3(this, SHOW_INDEX$7));
+ }
+ },
+ /**
+ * The outline color of this Billboard. Effective only for SDF billboards like Label glyphs.
+ * @memberof Billboard.prototype
+ * @type {Color}
+ * @private
+ */
+ outlineColor: {
+ get: function() {
+ return this._outlineColor;
+ },
+ set: function(e) {
+ const t = this._outlineColor;
+ Color.equals(t, e) || (Color.clone(e, t), makeDirty$3(this, SDF_INDEX$1));
+ }
+ },
+ /**
+ * The outline width of this Billboard in pixels. Effective only for SDF billboards like Label glyphs.
+ * @memberof Billboard.prototype
+ * @type {number}
+ * @private
+ */
+ outlineWidth: {
+ get: function() {
+ return this._outlineWidth;
+ },
+ set: function(e) {
+ this._outlineWidth !== e && (this._outlineWidth = e, makeDirty$3(this, SDF_INDEX$1));
+ }
+ },
+ /**
+ * Gets or sets the {@link SplitDirection} of this billboard.
+ * @memberof Billboard.prototype
+ * @type {SplitDirection}
+ * @default {@link SplitDirection.NONE}
+ */
+ splitDirection: {
+ get: function() {
+ return this._splitDirection;
+ },
+ set: function(e) {
+ this._splitDirection !== e && (this._splitDirection = e, makeDirty$3(this, SPLIT_DIRECTION_INDEX$3));
+ }
+ }
+});
+Billboard.prototype.getPickId = function(e) {
+ return defined(this._pickId) || (this._pickId = e.createPickId({
+ primitive: this._pickPrimitive,
+ collection: this._collection,
+ id: this._id
+ })), this._pickId;
+};
+Billboard.prototype._updateClamping = function() {
+ Billboard._updateClamping(this._billboardCollection, this);
+};
+const scratchCartographic$f = new Cartographic();
+Billboard._updateClamping = function(e, t) {
+ const n = e._scene;
+ if (!defined(n))
+ return;
+ const i = defaultValue(n.ellipsoid, Ellipsoid.default), r = n.frameState.mode, o = r !== t._mode;
+ if (t._mode = r, (t._heightReference === HeightReference$1.NONE || o) && defined(t._removeCallbackFunc) && (t._removeCallbackFunc(), t._removeCallbackFunc = void 0, t._clampedPosition = void 0), t._heightReference === HeightReference$1.NONE || !defined(t._position))
+ return;
+ defined(t._removeCallbackFunc) && t._removeCallbackFunc();
+ const s = i.cartesianToCartographic(t._position);
+ if (!defined(s)) {
+ t._actualClampedPosition = void 0;
+ return;
+ }
+ function c(d) {
+ const f = i.cartographicToCartesian(
+ d,
+ t._clampedPosition
+ );
+ isHeightReferenceRelative(t._heightReference) && (t._mode === SceneMode$1.SCENE3D ? (d.height += s.height, i.cartographicToCartesian(
+ d,
+ f
+ )) : f.x += s.height), t._clampedPosition = f;
+ }
+ t._removeCallbackFunc = n.updateHeight(
+ s,
+ c,
+ t._heightReference
+ ), Cartographic.clone(s, scratchCartographic$f);
+ const l = n.getHeight(s, t._heightReference);
+ defined(l) && (scratchCartographic$f.height = l), c(scratchCartographic$f);
+};
+Billboard.prototype._loadImage = function() {
+ const e = this._billboardCollection._textureAtlas, t = this._imageId, n = this._image, i = this._imageSubRegion;
+ let r;
+ const o = this;
+ function s(l) {
+ if (o._imageId !== t || o._image !== n || !BoundingRectangle.equals(o._imageSubRegion, i))
+ return;
+ const d = e.textureCoordinates[l];
+ o._imageWidth = e.texture.width * d.width, o._imageHeight = e.texture.height * d.height, o._imageIndex = l, o._ready = !0, o._image = void 0, o._imageIndexPromise = void 0, makeDirty$3(o, IMAGE_INDEX_INDEX$1);
+ const f = o._billboardCollection._scene;
+ defined(f) && f.frameState.afterRender.push(() => !0);
+ }
+ if (defined(n) && (r = e.addImage(t, n)), defined(i) && (r = e.addSubRegion(t, i)), this._imageIndexPromise = r, !defined(r))
+ return;
+ const c = e.getImageIndex(t);
+ if (defined(c) && !defined(i)) {
+ s(c);
+ return;
+ }
+ r.then(s).catch(function(l) {
+ console.error(`Error loading image for billboard: ${l}`), o._imageIndexPromise = void 0;
+ });
+};
+Billboard.prototype.setImage = function(e, t) {
+ this._imageId !== e && (this._imageIndex = -1, this._imageSubRegion = void 0, this._imageId = e, this._image = t, defined(this._billboardCollection._textureAtlas) && this._loadImage());
+};
+Billboard.prototype.setImageSubRegion = function(e, t) {
+ this._imageId === e && BoundingRectangle.equals(this._imageSubRegion, t) || (this._imageIndex = -1, this._imageId = e, this._imageSubRegion = BoundingRectangle.clone(t), defined(this._billboardCollection._textureAtlas) && this._loadImage());
+};
+Billboard.prototype._setTranslate = function(e) {
+ const t = this._translate;
+ Cartesian2.equals(t, e) || (Cartesian2.clone(e, t), makeDirty$3(this, PIXEL_OFFSET_INDEX$1));
+};
+Billboard.prototype._getActualPosition = function() {
+ return defined(this._clampedPosition) ? this._clampedPosition : this._actualPosition;
+};
+Billboard.prototype._setActualPosition = function(e) {
+ defined(this._clampedPosition) || Cartesian3.clone(e, this._actualPosition), makeDirty$3(this, POSITION_INDEX$7);
+};
+const tempCartesian3$1 = new Cartesian4();
+Billboard._computeActualPosition = function(e, t, n, i) {
+ return defined(e._clampedPosition) ? (n.mode !== e._mode && e._updateClamping(), e._clampedPosition) : n.mode === SceneMode$1.SCENE3D ? t : (Matrix4.multiplyByPoint(i, t, tempCartesian3$1), SceneTransforms.computeActualEllipsoidPosition(
+ n,
+ tempCartesian3$1
+ ));
+};
+const scratchCartesian3$9 = new Cartesian3();
+Billboard._computeScreenSpacePosition = function(e, t, n, i, r, o) {
+ const s = Matrix4.multiplyByPoint(
+ e,
+ t,
+ scratchCartesian3$9
+ ), c = SceneTransforms.worldWithEyeOffsetToWindowCoordinates(
+ r,
+ s,
+ n,
+ o
+ );
+ if (defined(c))
+ return Cartesian2.add(c, i, c), c;
+};
+const scratchPixelOffset = new Cartesian2(0, 0);
+Billboard.prototype.computeScreenSpacePosition = function(e, t) {
+ const n = this._billboardCollection;
+ defined(t) || (t = new Cartesian2()), Cartesian2.clone(this._pixelOffset, scratchPixelOffset), Cartesian2.add(scratchPixelOffset, this._translate, scratchPixelOffset);
+ let i = n.modelMatrix, r = this._position;
+ if (defined(this._clampedPosition) && (r = this._clampedPosition, e.mode !== SceneMode$1.SCENE3D)) {
+ const s = e.mapProjection, c = s.ellipsoid, l = s.unproject(r, scratchCartographic$f);
+ r = c.cartographicToCartesian(l, scratchCartesian3$9), i = Matrix4.IDENTITY;
+ }
+ return Billboard._computeScreenSpacePosition(
+ i,
+ r,
+ this._eyeOffset,
+ scratchPixelOffset,
+ e,
+ t
+ );
+};
+Billboard.getScreenSpaceBoundingBox = function(e, t, n) {
+ let i = e.width, r = e.height;
+ const o = e.scale;
+ i *= o, r *= o;
+ let s = t.x;
+ e.horizontalOrigin === HorizontalOrigin$1.RIGHT ? s -= i : e.horizontalOrigin === HorizontalOrigin$1.CENTER && (s -= i * 0.5);
+ let c = t.y;
+ return e.verticalOrigin === VerticalOrigin$1.BOTTOM || e.verticalOrigin === VerticalOrigin$1.BASELINE ? c -= r : e.verticalOrigin === VerticalOrigin$1.CENTER && (c -= r * 0.5), defined(n) || (n = new BoundingRectangle()), n.x = s, n.y = c, n.width = i, n.height = r, n;
+};
+Billboard.prototype.equals = function(e) {
+ return this === e || defined(e) && this._id === e._id && Cartesian3.equals(this._position, e._position) && this._imageId === e._imageId && this._show === e._show && this._scale === e._scale && this._verticalOrigin === e._verticalOrigin && this._horizontalOrigin === e._horizontalOrigin && this._heightReference === e._heightReference && BoundingRectangle.equals(this._imageSubRegion, e._imageSubRegion) && Color.equals(this._color, e._color) && Cartesian2.equals(this._pixelOffset, e._pixelOffset) && Cartesian2.equals(this._translate, e._translate) && Cartesian3.equals(this._eyeOffset, e._eyeOffset) && NearFarScalar.equals(this._scaleByDistance, e._scaleByDistance) && NearFarScalar.equals(
+ this._translucencyByDistance,
+ e._translucencyByDistance
+ ) && NearFarScalar.equals(
+ this._pixelOffsetScaleByDistance,
+ e._pixelOffsetScaleByDistance
+ ) && DistanceDisplayCondition.equals(
+ this._distanceDisplayCondition,
+ e._distanceDisplayCondition
+ ) && this._disableDepthTestDistance === e._disableDepthTestDistance && this._splitDirection === e._splitDirection;
+};
+Billboard.prototype._destroy = function() {
+ defined(this._customData) && (this._billboardCollection._scene.globe._surface.removeTileCustomData(
+ this._customData
+ ), this._customData = void 0), defined(this._removeCallbackFunc) && (this._removeCallbackFunc(), this._removeCallbackFunc = void 0), this.image = void 0, this._pickId = this._pickId && this._pickId.destroy(), this._billboardCollection = void 0;
+};
+const BlendOption = {
+ /**
+ * The billboards, points, or labels in the collection are completely opaque.
+ * @type {number}
+ * @constant
+ */
+ OPAQUE: 0,
+ /**
+ * The billboards, points, or labels in the collection are completely translucent.
+ * @type {number}
+ * @constant
+ */
+ TRANSLUCENT: 1,
+ /**
+ * The billboards, points, or labels in the collection are both opaque and translucent.
+ * @type {number}
+ * @constant
+ */
+ OPAQUE_AND_TRANSLUCENT: 2
+}, BlendOption$1 = Object.freeze(BlendOption), SDFSettings = {
+ /**
+ * The font size in pixels
+ *
+ * @type {number}
+ * @constant
+ */
+ FONT_SIZE: 48,
+ /**
+ * Whitespace padding around glyphs.
+ *
+ * @type {number}
+ * @constant
+ */
+ PADDING: 10,
+ /**
+ * How many pixels around the glyph shape to use for encoding distance
+ *
+ * @type {number}
+ * @constant
+ */
+ RADIUS: 8,
+ /**
+ * How much of the radius (relative) is used for the inside part the glyph.
+ *
+ * @type {number}
+ * @constant
+ */
+ CUTOFF: 0.25
+}, SDFSettings$1 = Object.freeze(SDFSettings);
+function TextureAtlasNode(e, t, n, i, r) {
+ this.bottomLeft = defaultValue(e, Cartesian2.ZERO), this.topRight = defaultValue(t, Cartesian2.ZERO), this.childNode1 = n, this.childNode2 = i, this.imageIndex = r;
+}
+const defaultInitialSize = new Cartesian2(16, 16);
+function TextureAtlas(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = defaultValue(e.borderWidthInPixels, 1), n = defaultValue(e.initialSize, defaultInitialSize);
+ this._context = e.context, this._pixelFormat = defaultValue(e.pixelFormat, PixelFormat$1.RGBA), this._borderWidthInPixels = t, this._textureCoordinates = [], this._guid = createGuid(), this._idHash = {}, this._indexHash = {}, this._initialSize = n, this._root = void 0;
+}
+Object.defineProperties(TextureAtlas.prototype, {
+ /**
+ * The amount of spacing between adjacent images in pixels.
+ * @memberof TextureAtlas.prototype
+ * @type {number}
+ */
+ borderWidthInPixels: {
+ get: function() {
+ return this._borderWidthInPixels;
+ }
+ },
+ /**
+ * An array of {@link BoundingRectangle} texture coordinate regions for all the images in the texture atlas.
+ * The x and y values of the rectangle correspond to the bottom-left corner of the texture coordinate.
+ * The coordinates are in the order that the corresponding images were added to the atlas.
+ * @memberof TextureAtlas.prototype
+ * @type {BoundingRectangle[]}
+ */
+ textureCoordinates: {
+ get: function() {
+ return this._textureCoordinates;
+ }
+ },
+ /**
+ * The texture that all of the images are being written to.
+ * @memberof TextureAtlas.prototype
+ * @type {Texture}
+ */
+ texture: {
+ get: function() {
+ return defined(this._texture) || (this._texture = new Texture({
+ context: this._context,
+ width: this._initialSize.x,
+ height: this._initialSize.y,
+ pixelFormat: this._pixelFormat
+ })), this._texture;
+ }
+ },
+ /**
+ * The number of images in the texture atlas. This value increases
+ * every time addImage or addImages is called.
+ * Texture coordinates are subject to change if the texture atlas resizes, so it is
+ * important to check {@link TextureAtlas#getGUID} before using old values.
+ * @memberof TextureAtlas.prototype
+ * @type {number}
+ */
+ numberOfImages: {
+ get: function() {
+ return this._textureCoordinates.length;
+ }
+ },
+ /**
+ * The atlas' globally unique identifier (GUID).
+ * The GUID changes whenever the texture atlas is modified.
+ * Classes that use a texture atlas should check if the GUID
+ * has changed before processing the atlas data.
+ * @memberof TextureAtlas.prototype
+ * @type {string}
+ */
+ guid: {
+ get: function() {
+ return this._guid;
+ }
+ }
+});
+function resizeAtlas(e, t) {
+ const n = e._context, i = e.numberOfImages, r = 2, o = e._borderWidthInPixels;
+ if (i > 0) {
+ const s = e._texture.width, c = e._texture.height, l = r * (s + t.width + o), d = r * (c + t.height + o), f = s / l, h = c / d, p = new TextureAtlasNode(
+ new Cartesian2(s + o, o),
+ new Cartesian2(l, c)
+ ), m = new TextureAtlasNode(
+ new Cartesian2(),
+ new Cartesian2(l, c),
+ e._root,
+ p
+ ), _ = new TextureAtlasNode(
+ new Cartesian2(o, c + o),
+ new Cartesian2(l, d)
+ ), y = new TextureAtlasNode(
+ new Cartesian2(),
+ new Cartesian2(l, d),
+ m,
+ _
+ );
+ for (let x = 0; x < e._textureCoordinates.length; x++) {
+ const b = e._textureCoordinates[x];
+ defined(b) && (b.x *= f, b.y *= h, b.width *= f, b.height *= h);
+ }
+ const C = new Texture({
+ context: e._context,
+ width: l,
+ height: d,
+ pixelFormat: e._pixelFormat
+ }), T = new Framebuffer({
+ context: n,
+ colorTextures: [e._texture],
+ destroyAttachments: !1
+ });
+ T._bind(), C.copyFromFramebuffer(0, 0, 0, 0, l, d), T._unBind(), T.destroy(), e._texture = e._texture && e._texture.destroy(), e._texture = C, e._root = y;
+ } else {
+ let s = r * (t.width + 2 * o), c = r * (t.height + 2 * o);
+ s < e._initialSize.x && (s = e._initialSize.x), c < e._initialSize.y && (c = e._initialSize.y), e._texture = e._texture && e._texture.destroy(), e._texture = new Texture({
+ context: e._context,
+ width: s,
+ height: c,
+ pixelFormat: e._pixelFormat
+ }), e._root = new TextureAtlasNode(
+ new Cartesian2(o, o),
+ new Cartesian2(s, c)
+ );
+ }
+}
+function findNode$1(e, t, n) {
+ if (defined(t)) {
+ if (!defined(t.childNode1) && !defined(t.childNode2)) {
+ if (defined(t.imageIndex))
+ return;
+ const i = t.topRight.x - t.bottomLeft.x, r = t.topRight.y - t.bottomLeft.y, o = i - n.width, s = r - n.height;
+ if (o < 0 || s < 0)
+ return;
+ if (o === 0 && s === 0)
+ return t;
+ if (o > s) {
+ t.childNode1 = new TextureAtlasNode(
+ new Cartesian2(t.bottomLeft.x, t.bottomLeft.y),
+ new Cartesian2(t.bottomLeft.x + n.width, t.topRight.y)
+ );
+ const c = t.bottomLeft.x + n.width + e._borderWidthInPixels;
+ c < t.topRight.x && (t.childNode2 = new TextureAtlasNode(
+ new Cartesian2(c, t.bottomLeft.y),
+ new Cartesian2(t.topRight.x, t.topRight.y)
+ ));
+ } else {
+ t.childNode1 = new TextureAtlasNode(
+ new Cartesian2(t.bottomLeft.x, t.bottomLeft.y),
+ new Cartesian2(t.topRight.x, t.bottomLeft.y + n.height)
+ );
+ const c = t.bottomLeft.y + n.height + e._borderWidthInPixels;
+ c < t.topRight.y && (t.childNode2 = new TextureAtlasNode(
+ new Cartesian2(t.bottomLeft.x, c),
+ new Cartesian2(t.topRight.x, t.topRight.y)
+ ));
+ }
+ return findNode$1(e, t.childNode1, n);
+ }
+ return findNode$1(e, t.childNode1, n) || findNode$1(e, t.childNode2, n);
+ }
+}
+function addImage(e, t, n) {
+ const i = findNode$1(e, e._root, t);
+ if (defined(i)) {
+ i.imageIndex = n;
+ const r = e._texture.width, o = e._texture.height, s = i.topRight.x - i.bottomLeft.x, c = i.topRight.y - i.bottomLeft.y, l = i.bottomLeft.x / r, d = i.bottomLeft.y / o, f = s / r, h = c / o;
+ e._textureCoordinates[n] = new BoundingRectangle(l, d, f, h), e._texture.copyFrom({
+ source: t,
+ xOffset: i.bottomLeft.x,
+ yOffset: i.bottomLeft.y
+ });
+ } else
+ resizeAtlas(e, t), addImage(e, t, n);
+ e._guid = createGuid();
+}
+function getIndex$1(e, t) {
+ if (!defined(e) || e.isDestroyed())
+ return -1;
+ const n = e.numberOfImages;
+ return addImage(e, t, n), n;
+}
+TextureAtlas.prototype.getImageIndex = function(e) {
+ return this._indexHash[e];
+};
+TextureAtlas.prototype.addImageSync = function(e, t) {
+ let n = this._indexHash[e];
+ return defined(n) || (n = getIndex$1(this, t), this._idHash[e] = Promise.resolve(n), this._indexHash[e] = n), n;
+};
+TextureAtlas.prototype.addImage = function(e, t) {
+ let n = this._idHash[e];
+ if (defined(n))
+ return n;
+ typeof t == "function" ? t = t(e) : (typeof t == "string" || t instanceof Resource) && (t = Resource.createIfNeeded(t).fetchImage());
+ const i = this;
+ return n = Promise.resolve(t).then(function(r) {
+ const o = getIndex$1(i, r);
+ return i._indexHash[e] = o, o;
+ }), this._idHash[e] = n, n;
+};
+TextureAtlas.prototype.addSubRegion = function(e, t) {
+ const n = this._idHash[e];
+ if (!defined(n))
+ throw new RuntimeError(`image with id "${e}" not found in the atlas.`);
+ const i = this;
+ return Promise.resolve(n).then(function(r) {
+ if (r === -1)
+ return -1;
+ const o = i._texture.width, s = i._texture.height, c = i._textureCoordinates[r], l = c.x + t.x / o, d = c.y + t.y / s, f = t.width / o, h = t.height / s, p = i._textureCoordinates.push(new BoundingRectangle(l, d, f, h)) - 1;
+ return i._indexHash[e] = p, i._guid = createGuid(), p;
+ });
+};
+TextureAtlas.prototype.isDestroyed = function() {
+ return !1;
+};
+TextureAtlas.prototype.destroy = function() {
+ return this._texture = this._texture && this._texture.destroy(), destroyObject(this);
+};
+const SHOW_INDEX$6 = Billboard.SHOW_INDEX, POSITION_INDEX$6 = Billboard.POSITION_INDEX, PIXEL_OFFSET_INDEX = Billboard.PIXEL_OFFSET_INDEX, EYE_OFFSET_INDEX = Billboard.EYE_OFFSET_INDEX, HORIZONTAL_ORIGIN_INDEX = Billboard.HORIZONTAL_ORIGIN_INDEX, VERTICAL_ORIGIN_INDEX = Billboard.VERTICAL_ORIGIN_INDEX, SCALE_INDEX$2 = Billboard.SCALE_INDEX, IMAGE_INDEX_INDEX = Billboard.IMAGE_INDEX_INDEX, COLOR_INDEX$4 = Billboard.COLOR_INDEX, ROTATION_INDEX = Billboard.ROTATION_INDEX, ALIGNED_AXIS_INDEX = Billboard.ALIGNED_AXIS_INDEX, SCALE_BY_DISTANCE_INDEX$2 = Billboard.SCALE_BY_DISTANCE_INDEX, TRANSLUCENCY_BY_DISTANCE_INDEX$2 = Billboard.TRANSLUCENCY_BY_DISTANCE_INDEX, PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX = Billboard.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX, DISTANCE_DISPLAY_CONDITION_INDEX$2 = Billboard.DISTANCE_DISPLAY_CONDITION, DISABLE_DEPTH_DISTANCE = Billboard.DISABLE_DEPTH_DISTANCE, TEXTURE_COORDINATE_BOUNDS = Billboard.TEXTURE_COORDINATE_BOUNDS, SDF_INDEX = Billboard.SDF_INDEX, SPLIT_DIRECTION_INDEX$2 = Billboard.SPLIT_DIRECTION_INDEX, NUMBER_OF_PROPERTIES$4 = Billboard.NUMBER_OF_PROPERTIES;
+let attributeLocations$6;
+const attributeLocationsBatched$1 = {
+ positionHighAndScale: 0,
+ positionLowAndRotation: 1,
+ compressedAttribute0: 2,
+ // pixel offset, translate, horizontal origin, vertical origin, show, direction, texture coordinates
+ compressedAttribute1: 3,
+ // aligned axis, translucency by distance, image width
+ compressedAttribute2: 4,
+ // image height, color, pick color, size in meters, valid aligned axis, 13 bits free
+ eyeOffset: 5,
+ // 4 bytes free
+ scaleByDistance: 6,
+ pixelOffsetScaleByDistance: 7,
+ compressedAttribute3: 8,
+ textureCoordinateBoundsOrLabelTranslate: 9,
+ a_batchId: 10,
+ sdf: 11,
+ splitDirection: 12
+}, attributeLocationsInstanced$1 = {
+ direction: 0,
+ positionHighAndScale: 1,
+ positionLowAndRotation: 2,
+ // texture offset in w
+ compressedAttribute0: 3,
+ compressedAttribute1: 4,
+ compressedAttribute2: 5,
+ eyeOffset: 6,
+ // texture range in w
+ scaleByDistance: 7,
+ pixelOffsetScaleByDistance: 8,
+ compressedAttribute3: 9,
+ textureCoordinateBoundsOrLabelTranslate: 10,
+ a_batchId: 11,
+ sdf: 12,
+ splitDirection: 13
+};
+function BillboardCollection(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._scene = e.scene, this._batchTable = e.batchTable, this._textureAtlas = void 0, this._textureAtlasGUID = void 0, this._destroyTextureAtlas = !0, this._sp = void 0, this._spTranslucent = void 0, this._rsOpaque = void 0, this._rsTranslucent = void 0, this._vaf = void 0, this._billboards = [], this._billboardsToUpdate = [], this._billboardsToUpdateIndex = 0, this._billboardsRemoved = !1, this._createVertexArray = !1, this._shaderRotation = !1, this._compiledShaderRotation = !1, this._shaderAlignedAxis = !1, this._compiledShaderAlignedAxis = !1, this._shaderScaleByDistance = !1, this._compiledShaderScaleByDistance = !1, this._shaderTranslucencyByDistance = !1, this._compiledShaderTranslucencyByDistance = !1, this._shaderPixelOffsetScaleByDistance = !1, this._compiledShaderPixelOffsetScaleByDistance = !1, this._shaderDistanceDisplayCondition = !1, this._compiledShaderDistanceDisplayCondition = !1, this._shaderDisableDepthDistance = !1, this._compiledShaderDisableDepthDistance = !1, this._shaderClampToGround = !1, this._compiledShaderClampToGround = !1, this._propertiesChanged = new Uint32Array(NUMBER_OF_PROPERTIES$4), this._maxSize = 0, this._maxEyeOffset = 0, this._maxScale = 1, this._maxPixelOffset = 0, this._allHorizontalCenter = !0, this._allVerticalCenter = !0, this._allSizedInMeters = !0, this._baseVolume = new BoundingSphere(), this._baseVolumeWC = new BoundingSphere(), this._baseVolume2D = new BoundingSphere(), this._boundingVolume = new BoundingSphere(), this._boundingVolumeDirty = !1, this._colorCommands = [], this.show = defaultValue(e.show, !0), this.modelMatrix = Matrix4.clone(
+ defaultValue(e.modelMatrix, Matrix4.IDENTITY)
+ ), this._modelMatrix = Matrix4.clone(Matrix4.IDENTITY), this.debugShowBoundingVolume = defaultValue(
+ e.debugShowBoundingVolume,
+ !1
+ ), this.debugShowTextureAtlas = defaultValue(
+ e.debugShowTextureAtlas,
+ !1
+ ), this.blendOption = defaultValue(
+ e.blendOption,
+ BlendOption$1.OPAQUE_AND_TRANSLUCENT
+ ), this._blendOption = void 0, this._mode = SceneMode$1.SCENE3D, this._buffersUsage = [
+ BufferUsage$1.STATIC_DRAW,
+ // SHOW_INDEX
+ BufferUsage$1.STATIC_DRAW,
+ // POSITION_INDEX
+ BufferUsage$1.STATIC_DRAW,
+ // PIXEL_OFFSET_INDEX
+ BufferUsage$1.STATIC_DRAW,
+ // EYE_OFFSET_INDEX
+ BufferUsage$1.STATIC_DRAW,
+ // HORIZONTAL_ORIGIN_INDEX
+ BufferUsage$1.STATIC_DRAW,
+ // VERTICAL_ORIGIN_INDEX
+ BufferUsage$1.STATIC_DRAW,
+ // SCALE_INDEX
+ BufferUsage$1.STATIC_DRAW,
+ // IMAGE_INDEX_INDEX
+ BufferUsage$1.STATIC_DRAW,
+ // COLOR_INDEX
+ BufferUsage$1.STATIC_DRAW,
+ // ROTATION_INDEX
+ BufferUsage$1.STATIC_DRAW,
+ // ALIGNED_AXIS_INDEX
+ BufferUsage$1.STATIC_DRAW,
+ // SCALE_BY_DISTANCE_INDEX
+ BufferUsage$1.STATIC_DRAW,
+ // TRANSLUCENCY_BY_DISTANCE_INDEX
+ BufferUsage$1.STATIC_DRAW,
+ // PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX
+ BufferUsage$1.STATIC_DRAW,
+ // DISTANCE_DISPLAY_CONDITION_INDEX
+ BufferUsage$1.STATIC_DRAW,
+ // TEXTURE_COORDINATE_BOUNDS
+ BufferUsage$1.STATIC_DRAW
+ // SPLIT_DIRECTION_INDEX
+ ], this._highlightColor = Color.clone(Color.WHITE);
+ const t = this;
+ this._uniforms = {
+ u_atlas: function() {
+ return t._textureAtlas.texture;
+ },
+ u_highlightColor: function() {
+ return t._highlightColor;
+ }
+ };
+ const n = this._scene;
+ defined(n) && defined(n.terrainProviderChanged) && (this._removeCallbackFunc = n.terrainProviderChanged.addEventListener(
+ function() {
+ const i = this._billboards, r = i.length;
+ for (let o = 0; o < r; ++o)
+ defined(i[o]) && i[o]._updateClamping();
+ },
+ this
+ ));
+}
+Object.defineProperties(BillboardCollection.prototype, {
+ /**
+ * Returns the number of billboards in this collection. This is commonly used with
+ * {@link BillboardCollection#get} to iterate over all the billboards
+ * in the collection.
+ * @memberof BillboardCollection.prototype
+ * @type {number}
+ */
+ length: {
+ get: function() {
+ return removeBillboards(this), this._billboards.length;
+ }
+ },
+ /**
+ * Gets or sets the textureAtlas.
+ * @memberof BillboardCollection.prototype
+ * @type {TextureAtlas}
+ * @private
+ */
+ textureAtlas: {
+ get: function() {
+ return this._textureAtlas;
+ },
+ set: function(e) {
+ this._textureAtlas !== e && (this._textureAtlas = this._destroyTextureAtlas && this._textureAtlas && this._textureAtlas.destroy(), this._textureAtlas = e, this._createVertexArray = !0);
+ }
+ },
+ /**
+ * Gets or sets a value which determines if the texture atlas is
+ * destroyed when the collection is destroyed.
+ *
+ * If the texture atlas is used by more than one collection, set this to false,
+ * and explicitly destroy the atlas to avoid attempting to destroy it multiple times.
+ *
+ * @memberof BillboardCollection.prototype
+ * @type {boolean}
+ * @private
+ *
+ * @example
+ * // Set destroyTextureAtlas
+ * // Destroy a billboard collection but not its texture atlas.
+ *
+ * const atlas = new TextureAtlas({
+ * scene : scene,
+ * images : images
+ * });
+ * billboards.textureAtlas = atlas;
+ * billboards.destroyTextureAtlas = false;
+ * billboards = billboards.destroy();
+ * console.log(atlas.isDestroyed()); // False
+ */
+ destroyTextureAtlas: {
+ get: function() {
+ return this._destroyTextureAtlas;
+ },
+ set: function(e) {
+ this._destroyTextureAtlas = e;
+ }
+ }
+});
+function destroyBillboards(e) {
+ const t = e.length;
+ for (let n = 0; n < t; ++n)
+ e[n] && e[n]._destroy();
+}
+BillboardCollection.prototype.add = function(e) {
+ const t = new Billboard(e, this);
+ return t._index = this._billboards.length, this._billboards.push(t), this._createVertexArray = !0, t;
+};
+BillboardCollection.prototype.remove = function(e) {
+ return this.contains(e) ? (this._billboards[e._index] = void 0, this._billboardsRemoved = !0, this._createVertexArray = !0, e._destroy(), !0) : !1;
+};
+BillboardCollection.prototype.removeAll = function() {
+ destroyBillboards(this._billboards), this._billboards = [], this._billboardsToUpdate = [], this._billboardsToUpdateIndex = 0, this._billboardsRemoved = !1, this._createVertexArray = !0;
+};
+function removeBillboards(e) {
+ if (e._billboardsRemoved) {
+ e._billboardsRemoved = !1;
+ const t = [], n = e._billboards, i = n.length;
+ for (let r = 0, o = 0; r < i; ++r) {
+ const s = n[r];
+ defined(s) && (s._index = o++, t.push(s));
+ }
+ e._billboards = t;
+ }
+}
+BillboardCollection.prototype._updateBillboard = function(e, t) {
+ e._dirty || (this._billboardsToUpdate[this._billboardsToUpdateIndex++] = e), ++this._propertiesChanged[t];
+};
+BillboardCollection.prototype.contains = function(e) {
+ return defined(e) && e._billboardCollection === this;
+};
+BillboardCollection.prototype.get = function(e) {
+ return removeBillboards(this), this._billboards[e];
+};
+let getIndexBuffer$1;
+function getIndexBufferBatched$1(e) {
+ let n = e.cache.billboardCollection_indexBufferBatched;
+ if (defined(n))
+ return n;
+ const i = 16384 * 6 - 6, r = new Uint16Array(i);
+ for (let o = 0, s = 0; o < i; o += 6, s += 4)
+ r[o] = s, r[o + 1] = s + 1, r[o + 2] = s + 2, r[o + 3] = s + 0, r[o + 4] = s + 2, r[o + 5] = s + 3;
+ return n = Buffer.createIndexBuffer({
+ context: e,
+ typedArray: r,
+ usage: BufferUsage$1.STATIC_DRAW,
+ indexDatatype: IndexDatatype$1.UNSIGNED_SHORT
+ }), n.vertexArrayDestroyable = !1, e.cache.billboardCollection_indexBufferBatched = n, n;
+}
+function getIndexBufferInstanced$1(e) {
+ let t = e.cache.billboardCollection_indexBufferInstanced;
+ return defined(t) || (t = Buffer.createIndexBuffer({
+ context: e,
+ typedArray: new Uint16Array([0, 1, 2, 0, 2, 3]),
+ usage: BufferUsage$1.STATIC_DRAW,
+ indexDatatype: IndexDatatype$1.UNSIGNED_SHORT
+ }), t.vertexArrayDestroyable = !1, e.cache.billboardCollection_indexBufferInstanced = t), t;
+}
+function getVertexBufferInstanced$1(e) {
+ let t = e.cache.billboardCollection_vertexBufferInstanced;
+ return defined(t) || (t = Buffer.createVertexBuffer({
+ context: e,
+ typedArray: new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]),
+ usage: BufferUsage$1.STATIC_DRAW
+ }), t.vertexArrayDestroyable = !1, e.cache.billboardCollection_vertexBufferInstanced = t), t;
+}
+BillboardCollection.prototype.computeNewBuffersUsage = function() {
+ const e = this._buffersUsage;
+ let t = !1;
+ const n = this._propertiesChanged;
+ for (let i = 0; i < NUMBER_OF_PROPERTIES$4; ++i) {
+ const r = n[i] === 0 ? BufferUsage$1.STATIC_DRAW : BufferUsage$1.STREAM_DRAW;
+ t = t || e[i] !== r, e[i] = r;
+ }
+ return t;
+};
+function createVAF$2(e, t, n, i, r, o) {
+ const s = [
+ {
+ index: attributeLocations$6.positionHighAndScale,
+ componentsPerAttribute: 4,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ usage: n[POSITION_INDEX$6]
+ },
+ {
+ index: attributeLocations$6.positionLowAndRotation,
+ componentsPerAttribute: 4,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ usage: n[POSITION_INDEX$6]
+ },
+ {
+ index: attributeLocations$6.compressedAttribute0,
+ componentsPerAttribute: 4,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ usage: n[PIXEL_OFFSET_INDEX]
+ },
+ {
+ index: attributeLocations$6.compressedAttribute1,
+ componentsPerAttribute: 4,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ usage: n[TRANSLUCENCY_BY_DISTANCE_INDEX$2]
+ },
+ {
+ index: attributeLocations$6.compressedAttribute2,
+ componentsPerAttribute: 4,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ usage: n[COLOR_INDEX$4]
+ },
+ {
+ index: attributeLocations$6.eyeOffset,
+ componentsPerAttribute: 4,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ usage: n[EYE_OFFSET_INDEX]
+ },
+ {
+ index: attributeLocations$6.scaleByDistance,
+ componentsPerAttribute: 4,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ usage: n[SCALE_BY_DISTANCE_INDEX$2]
+ },
+ {
+ index: attributeLocations$6.pixelOffsetScaleByDistance,
+ componentsPerAttribute: 4,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ usage: n[PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX]
+ },
+ {
+ index: attributeLocations$6.compressedAttribute3,
+ componentsPerAttribute: 4,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ usage: n[DISTANCE_DISPLAY_CONDITION_INDEX$2]
+ },
+ {
+ index: attributeLocations$6.textureCoordinateBoundsOrLabelTranslate,
+ componentsPerAttribute: 4,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ usage: n[TEXTURE_COORDINATE_BOUNDS]
+ },
+ {
+ index: attributeLocations$6.splitDirection,
+ componentsPerAttribute: 1,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ usage: n[SPLIT_DIRECTION_INDEX$2]
+ }
+ ];
+ i && s.push({
+ index: attributeLocations$6.direction,
+ componentsPerAttribute: 2,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ vertexBuffer: getVertexBufferInstanced$1(e)
+ }), defined(r) && s.push({
+ index: attributeLocations$6.a_batchId,
+ componentsPerAttribute: 1,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ bufferUsage: BufferUsage$1.STATIC_DRAW
+ }), o && s.push({
+ index: attributeLocations$6.sdf,
+ componentsPerAttribute: 2,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ usage: n[SDF_INDEX]
+ });
+ const c = i ? t : 4 * t;
+ return new VertexArrayFacade(e, s, c, i);
+}
+const writePositionScratch$2 = new EncodedCartesian3();
+function writePositionScaleAndRotation(e, t, n, i, r) {
+ let o;
+ const s = i[attributeLocations$6.positionHighAndScale], c = i[attributeLocations$6.positionLowAndRotation], l = r._getActualPosition();
+ e._mode === SceneMode$1.SCENE3D && (BoundingSphere.expand(
+ e._baseVolume,
+ l,
+ e._baseVolume
+ ), e._boundingVolumeDirty = !0), EncodedCartesian3.fromCartesian(l, writePositionScratch$2);
+ const d = r.scale, f = r.rotation;
+ f !== 0 && (e._shaderRotation = !0), e._maxScale = Math.max(
+ e._maxScale,
+ d
+ );
+ const h = writePositionScratch$2.high, p = writePositionScratch$2.low;
+ e._instanced ? (o = r._index, s(o, h.x, h.y, h.z, d), c(o, p.x, p.y, p.z, f)) : (o = r._index * 4, s(o + 0, h.x, h.y, h.z, d), s(o + 1, h.x, h.y, h.z, d), s(o + 2, h.x, h.y, h.z, d), s(o + 3, h.x, h.y, h.z, d), c(o + 0, p.x, p.y, p.z, f), c(o + 1, p.x, p.y, p.z, f), c(o + 2, p.x, p.y, p.z, f), c(o + 3, p.x, p.y, p.z, f));
+}
+const scratchCartesian2$9 = new Cartesian2(), UPPER_BOUND = 32768, LEFT_SHIFT16$1 = 65536, LEFT_SHIFT12 = 4096, LEFT_SHIFT8$1 = 256, LEFT_SHIFT7 = 128, LEFT_SHIFT5 = 32, LEFT_SHIFT3 = 8, LEFT_SHIFT2 = 4, RIGHT_SHIFT8 = 1 / 256, LOWER_LEFT = 0, LOWER_RIGHT = 2, UPPER_RIGHT = 3, UPPER_LEFT = 1;
+function writeCompressedAttrib0$1(e, t, n, i, r) {
+ let o;
+ const s = i[attributeLocations$6.compressedAttribute0], c = r.pixelOffset, l = c.x, d = c.y, f = r._translate, h = f.x, p = f.y;
+ e._maxPixelOffset = Math.max(
+ e._maxPixelOffset,
+ Math.abs(l + h),
+ Math.abs(-d + p)
+ );
+ const m = r.horizontalOrigin;
+ let _ = r._verticalOrigin, y = r.show && r.clusterShow;
+ r.color.alpha === 0 && (y = !1), _ === VerticalOrigin$1.BASELINE && (_ = VerticalOrigin$1.BOTTOM), e._allHorizontalCenter = e._allHorizontalCenter && m === HorizontalOrigin$1.CENTER, e._allVerticalCenter = e._allVerticalCenter && _ === VerticalOrigin$1.CENTER;
+ let C = 0, T = 0, x = 0, b = 0;
+ const S = r._imageIndex;
+ if (S !== -1) {
+ const F = n[S];
+ C = F.x, T = F.y, x = F.width, b = F.height;
+ }
+ const E = C + x, A = T + b;
+ let D = Math.floor(
+ CesiumMath.clamp(l, -UPPER_BOUND, UPPER_BOUND) + UPPER_BOUND
+ ) * LEFT_SHIFT7;
+ D += (m + 1) * LEFT_SHIFT5, D += (_ + 1) * LEFT_SHIFT3, D += (y ? 1 : 0) * LEFT_SHIFT2;
+ let P = Math.floor(
+ CesiumMath.clamp(d, -UPPER_BOUND, UPPER_BOUND) + UPPER_BOUND
+ ) * LEFT_SHIFT8$1, I = Math.floor(
+ CesiumMath.clamp(h, -UPPER_BOUND, UPPER_BOUND) + UPPER_BOUND
+ ) * LEFT_SHIFT8$1;
+ const M = (CesiumMath.clamp(p, -UPPER_BOUND, UPPER_BOUND) + UPPER_BOUND) * RIGHT_SHIFT8, R = Math.floor(M), L = Math.floor(
+ (M - R) * LEFT_SHIFT8$1
+ );
+ P += R, I += L, scratchCartesian2$9.x = C, scratchCartesian2$9.y = T;
+ const g = AttributeCompression.compressTextureCoordinates(
+ scratchCartesian2$9
+ );
+ scratchCartesian2$9.x = E;
+ const w = AttributeCompression.compressTextureCoordinates(
+ scratchCartesian2$9
+ );
+ scratchCartesian2$9.y = A;
+ const O = AttributeCompression.compressTextureCoordinates(
+ scratchCartesian2$9
+ );
+ scratchCartesian2$9.x = C;
+ const N = AttributeCompression.compressTextureCoordinates(
+ scratchCartesian2$9
+ );
+ e._instanced ? (o = r._index, s(o, D, P, I, g)) : (o = r._index * 4, s(
+ o + 0,
+ D + LOWER_LEFT,
+ P,
+ I,
+ g
+ ), s(
+ o + 1,
+ D + LOWER_RIGHT,
+ P,
+ I,
+ w
+ ), s(
+ o + 2,
+ D + UPPER_RIGHT,
+ P,
+ I,
+ O
+ ), s(
+ o + 3,
+ D + UPPER_LEFT,
+ P,
+ I,
+ N
+ ));
+}
+function writeCompressedAttrib1$1(e, t, n, i, r) {
+ let o;
+ const s = i[attributeLocations$6.compressedAttribute1], c = r.alignedAxis;
+ Cartesian3.equals(c, Cartesian3.ZERO) || (e._shaderAlignedAxis = !0);
+ let l = 0, d = 1, f = 1, h = 1;
+ const p = r.translucencyByDistance;
+ defined(p) && (l = p.near, d = p.nearValue, f = p.far, h = p.farValue, (d !== 1 || h !== 1) && (e._shaderTranslucencyByDistance = !0));
+ let m = 0;
+ const _ = r._imageIndex;
+ _ !== -1 && (m = n[_].width);
+ const y = e._textureAtlas.texture.width, C = Math.round(
+ defaultValue(r.width, y * m)
+ );
+ e._maxSize = Math.max(
+ e._maxSize,
+ C
+ );
+ let T = CesiumMath.clamp(C, 0, LEFT_SHIFT16$1), x = 0;
+ Math.abs(Cartesian3.magnitudeSquared(c) - 1) < CesiumMath.EPSILON6 && (x = AttributeCompression.octEncodeFloat(c)), d = CesiumMath.clamp(d, 0, 1), d = d === 1 ? 255 : d * 255 | 0, T = T * LEFT_SHIFT8$1 + d, h = CesiumMath.clamp(h, 0, 1), h = h === 1 ? 255 : h * 255 | 0, x = x * LEFT_SHIFT8$1 + h, e._instanced ? (o = r._index, s(o, T, x, l, f)) : (o = r._index * 4, s(o + 0, T, x, l, f), s(o + 1, T, x, l, f), s(o + 2, T, x, l, f), s(o + 3, T, x, l, f));
+}
+function writeCompressedAttrib2(e, t, n, i, r) {
+ let o;
+ const s = i[attributeLocations$6.compressedAttribute2], c = r.color, l = defined(e._batchTable) ? Color.WHITE : r.getPickId(t.context).color, d = r.sizeInMeters ? 1 : 0, f = Math.abs(Cartesian3.magnitudeSquared(r.alignedAxis) - 1) < CesiumMath.EPSILON6 ? 1 : 0;
+ e._allSizedInMeters = e._allSizedInMeters && d === 1;
+ let h = 0;
+ const p = r._imageIndex;
+ p !== -1 && (h = n[p].height);
+ const m = e._textureAtlas.texture.dimensions, _ = Math.round(
+ defaultValue(r.height, m.y * h)
+ );
+ e._maxSize = Math.max(
+ e._maxSize,
+ _
+ );
+ let y = defaultValue(
+ r._labelHorizontalOrigin,
+ -2
+ );
+ y += 2;
+ const C = _ * LEFT_SHIFT2 + y;
+ let T = Color.floatToByte(c.red), x = Color.floatToByte(c.green), b = Color.floatToByte(c.blue);
+ const S = T * LEFT_SHIFT16$1 + x * LEFT_SHIFT8$1 + b;
+ T = Color.floatToByte(l.red), x = Color.floatToByte(l.green), b = Color.floatToByte(l.blue);
+ const E = T * LEFT_SHIFT16$1 + x * LEFT_SHIFT8$1 + b;
+ let A = Color.floatToByte(c.alpha) * LEFT_SHIFT16$1 + Color.floatToByte(l.alpha) * LEFT_SHIFT8$1;
+ A += d * 2 + f, e._instanced ? (o = r._index, s(o, S, E, A, C)) : (o = r._index * 4, s(o + 0, S, E, A, C), s(o + 1, S, E, A, C), s(o + 2, S, E, A, C), s(o + 3, S, E, A, C));
+}
+function writeEyeOffset(e, t, n, i, r) {
+ let o;
+ const s = i[attributeLocations$6.eyeOffset], c = r.eyeOffset;
+ let l = c.z;
+ if (r._heightReference !== HeightReference$1.NONE && (l *= 1.005), e._maxEyeOffset = Math.max(
+ e._maxEyeOffset,
+ Math.abs(c.x),
+ Math.abs(c.y),
+ Math.abs(l)
+ ), e._instanced) {
+ let d = 0, f = 0;
+ const h = r._imageIndex;
+ if (h !== -1) {
+ const m = n[h];
+ d = m.width, f = m.height;
+ }
+ scratchCartesian2$9.x = d, scratchCartesian2$9.y = f;
+ const p = AttributeCompression.compressTextureCoordinates(
+ scratchCartesian2$9
+ );
+ o = r._index, s(o, c.x, c.y, l, p);
+ } else
+ o = r._index * 4, s(o + 0, c.x, c.y, l, 0), s(o + 1, c.x, c.y, l, 0), s(o + 2, c.x, c.y, l, 0), s(o + 3, c.x, c.y, l, 0);
+}
+function writeScaleByDistance$1(e, t, n, i, r) {
+ let o;
+ const s = i[attributeLocations$6.scaleByDistance];
+ let c = 0, l = 1, d = 1, f = 1;
+ const h = r.scaleByDistance;
+ defined(h) && (c = h.near, l = h.nearValue, d = h.far, f = h.farValue, (l !== 1 || f !== 1) && (e._shaderScaleByDistance = !0)), e._instanced ? (o = r._index, s(o, c, l, d, f)) : (o = r._index * 4, s(o + 0, c, l, d, f), s(o + 1, c, l, d, f), s(o + 2, c, l, d, f), s(o + 3, c, l, d, f));
+}
+function writePixelOffsetScaleByDistance(e, t, n, i, r) {
+ let o;
+ const s = i[attributeLocations$6.pixelOffsetScaleByDistance];
+ let c = 0, l = 1, d = 1, f = 1;
+ const h = r.pixelOffsetScaleByDistance;
+ defined(h) && (c = h.near, l = h.nearValue, d = h.far, f = h.farValue, (l !== 1 || f !== 1) && (e._shaderPixelOffsetScaleByDistance = !0)), e._instanced ? (o = r._index, s(o, c, l, d, f)) : (o = r._index * 4, s(o + 0, c, l, d, f), s(o + 1, c, l, d, f), s(o + 2, c, l, d, f), s(o + 3, c, l, d, f));
+}
+function writeCompressedAttribute3(e, t, n, i, r) {
+ let o;
+ const s = i[attributeLocations$6.compressedAttribute3];
+ let c = 0, l = Number.MAX_VALUE;
+ const d = r.distanceDisplayCondition;
+ defined(d) && (c = d.near, l = d.far, c *= c, l *= l, e._shaderDistanceDisplayCondition = !0);
+ let f = r.disableDepthTestDistance;
+ const h = isHeightReferenceClamp(r.heightReference) && t.context.depthTexture;
+ defined(f) || (f = h ? 5e3 : 0), f *= f, (h || f > 0) && (e._shaderDisableDepthDistance = !0, f === Number.POSITIVE_INFINITY && (f = -1));
+ let p, m;
+ if (defined(r._labelDimensions))
+ m = r._labelDimensions.x, p = r._labelDimensions.y;
+ else {
+ let T = 0, x = 0;
+ const b = r._imageIndex;
+ if (b !== -1) {
+ const E = n[b];
+ T = E.height, x = E.width;
+ }
+ p = Math.round(
+ defaultValue(
+ r.height,
+ e._textureAtlas.texture.dimensions.y * T
+ )
+ );
+ const S = e._textureAtlas.texture.width;
+ m = Math.round(
+ defaultValue(r.width, S * x)
+ );
+ }
+ const _ = Math.floor(CesiumMath.clamp(m, 0, LEFT_SHIFT12)), y = Math.floor(CesiumMath.clamp(p, 0, LEFT_SHIFT12)), C = _ * LEFT_SHIFT12 + y;
+ e._instanced ? (o = r._index, s(o, c, l, f, C)) : (o = r._index * 4, s(o + 0, c, l, f, C), s(o + 1, c, l, f, C), s(o + 2, c, l, f, C), s(o + 3, c, l, f, C));
+}
+function writeTextureCoordinateBoundsOrLabelTranslate(e, t, n, i, r) {
+ if (isHeightReferenceClamp(r.heightReference)) {
+ const _ = e._scene, y = t.context, C = t.globeTranslucencyState.translucent, T = defined(_.globe) && _.globe.depthTestAgainstTerrain;
+ e._shaderClampToGround = y.depthTexture && !C && T;
+ }
+ let o;
+ const s = i[attributeLocations$6.textureCoordinateBoundsOrLabelTranslate];
+ if (ContextLimits.maximumVertexTextureImageUnits > 0) {
+ let _ = 0, y = 0;
+ defined(r._labelTranslate) && (_ = r._labelTranslate.x, y = r._labelTranslate.y), e._instanced ? (o = r._index, s(o, _, y, 0, 0)) : (o = r._index * 4, s(o + 0, _, y, 0, 0), s(o + 1, _, y, 0, 0), s(o + 2, _, y, 0, 0), s(o + 3, _, y, 0, 0));
+ return;
+ }
+ let c = 0, l = 0, d = 0, f = 0;
+ const h = r._imageIndex;
+ if (h !== -1) {
+ const _ = n[h];
+ c = _.x, l = _.y, d = _.width, f = _.height;
+ }
+ const p = c + d, m = l + f;
+ e._instanced ? (o = r._index, s(o, c, l, p, m)) : (o = r._index * 4, s(o + 0, c, l, p, m), s(o + 1, c, l, p, m), s(o + 2, c, l, p, m), s(o + 3, c, l, p, m));
+}
+function writeBatchId(e, t, n, i, r) {
+ if (!defined(e._batchTable))
+ return;
+ const o = i[attributeLocations$6.a_batchId], s = r._batchIndex;
+ let c;
+ e._instanced ? (c = r._index, o(c, s)) : (c = r._index * 4, o(c + 0, s), o(c + 1, s), o(c + 2, s), o(c + 3, s));
+}
+function writeSDF(e, t, n, i, r) {
+ if (!e._sdf)
+ return;
+ let o;
+ const s = i[attributeLocations$6.sdf], c = r.outlineColor, l = r.outlineWidth, d = Color.floatToByte(c.red), f = Color.floatToByte(c.green), h = Color.floatToByte(c.blue), p = d * LEFT_SHIFT16$1 + f * LEFT_SHIFT8$1 + h, m = l / SDFSettings$1.RADIUS, _ = Color.floatToByte(c.alpha) * LEFT_SHIFT16$1 + Color.floatToByte(m) * LEFT_SHIFT8$1;
+ e._instanced ? (o = r._index, s(o, p, _)) : (o = r._index * 4, s(o + 0, p + LOWER_LEFT, _), s(o + 1, p + LOWER_RIGHT, _), s(o + 2, p + UPPER_RIGHT, _), s(o + 3, p + UPPER_LEFT, _));
+}
+function writeSplitDirection(e, t, n, i, r) {
+ const o = i[attributeLocations$6.splitDirection];
+ let s = 0;
+ const c = r.splitDirection;
+ defined(c) && (s = c);
+ let l;
+ e._instanced ? (l = r._index, o(l, s)) : (l = r._index * 4, o(l + 0, s), o(l + 1, s), o(l + 2, s), o(l + 3, s));
+}
+function writeBillboard(e, t, n, i, r) {
+ writePositionScaleAndRotation(
+ e,
+ t,
+ n,
+ i,
+ r
+ ), writeCompressedAttrib0$1(
+ e,
+ t,
+ n,
+ i,
+ r
+ ), writeCompressedAttrib1$1(
+ e,
+ t,
+ n,
+ i,
+ r
+ ), writeCompressedAttrib2(
+ e,
+ t,
+ n,
+ i,
+ r
+ ), writeEyeOffset(
+ e,
+ t,
+ n,
+ i,
+ r
+ ), writeScaleByDistance$1(
+ e,
+ t,
+ n,
+ i,
+ r
+ ), writePixelOffsetScaleByDistance(
+ e,
+ t,
+ n,
+ i,
+ r
+ ), writeCompressedAttribute3(
+ e,
+ t,
+ n,
+ i,
+ r
+ ), writeTextureCoordinateBoundsOrLabelTranslate(
+ e,
+ t,
+ n,
+ i,
+ r
+ ), writeBatchId(
+ e,
+ t,
+ n,
+ i,
+ r
+ ), writeSDF(
+ e,
+ t,
+ n,
+ i,
+ r
+ ), writeSplitDirection(
+ e,
+ t,
+ n,
+ i,
+ r
+ );
+}
+function recomputeActualPositions$1(e, t, n, i, r, o) {
+ let s;
+ i.mode === SceneMode$1.SCENE3D ? (s = e._baseVolume, e._boundingVolumeDirty = !0) : s = e._baseVolume2D;
+ const c = [];
+ for (let l = 0; l < n; ++l) {
+ const d = t[l], f = d.position, h = Billboard._computeActualPosition(
+ d,
+ f,
+ i,
+ r
+ );
+ defined(h) && (d._setActualPosition(h), o ? c.push(h) : BoundingSphere.expand(s, h, s));
+ }
+ o && BoundingSphere.fromPoints(c, s);
+}
+function updateMode$2(e, t) {
+ const n = t.mode, i = e._billboards, r = e._billboardsToUpdate, o = e._modelMatrix;
+ e._createVertexArray || e._mode !== n || n !== SceneMode$1.SCENE3D && !Matrix4.equals(o, e.modelMatrix) ? (e._mode = n, Matrix4.clone(e.modelMatrix, o), e._createVertexArray = !0, (n === SceneMode$1.SCENE3D || n === SceneMode$1.SCENE2D || n === SceneMode$1.COLUMBUS_VIEW) && recomputeActualPositions$1(
+ e,
+ i,
+ i.length,
+ t,
+ o,
+ !0
+ )) : n === SceneMode$1.MORPHING ? recomputeActualPositions$1(
+ e,
+ i,
+ i.length,
+ t,
+ o,
+ !0
+ ) : (n === SceneMode$1.SCENE2D || n === SceneMode$1.COLUMBUS_VIEW) && recomputeActualPositions$1(
+ e,
+ r,
+ e._billboardsToUpdateIndex,
+ t,
+ o,
+ !1
+ );
+}
+function updateBoundingVolume$1(e, t, n) {
+ let i = 1;
+ (!e._allSizedInMeters || e._maxPixelOffset !== 0) && (i = t.camera.getPixelSize(
+ n,
+ t.context.drawingBufferWidth,
+ t.context.drawingBufferHeight
+ ));
+ let r = i * e._maxScale * e._maxSize * 2;
+ e._allHorizontalCenter && e._allVerticalCenter && (r *= 0.5);
+ const o = i * e._maxPixelOffset + e._maxEyeOffset;
+ n.radius += r + o;
+}
+function createDebugCommand(e, t) {
+ const i = t.createViewportQuadCommand(`uniform sampler2D billboard_texture;
+in vec2 v_textureCoordinates;
+void main()
+{
+ out_FragColor = texture(billboard_texture, v_textureCoordinates);
+}
+`, {
+ uniformMap: {
+ billboard_texture: function() {
+ return e._textureAtlas.texture;
+ }
+ }
+ });
+ return i.pass = Pass$1.OVERLAY, i;
+}
+const scratchWriterArray$2 = [];
+BillboardCollection.prototype.update = function(e) {
+ if (removeBillboards(this), !this.show)
+ return;
+ let t = this._billboards, n = t.length;
+ const i = e.context;
+ this._instanced = i.instancedArrays, attributeLocations$6 = this._instanced ? attributeLocationsInstanced$1 : attributeLocationsBatched$1, getIndexBuffer$1 = this._instanced ? getIndexBufferInstanced$1 : getIndexBufferBatched$1;
+ let r = this._textureAtlas;
+ if (!defined(r)) {
+ r = this._textureAtlas = new TextureAtlas({
+ context: i
+ });
+ for (let P = 0; P < n; ++P)
+ t[P]._loadImage();
+ }
+ const o = r.textureCoordinates;
+ if (o.length === 0)
+ return;
+ updateMode$2(this, e), t = this._billboards, n = t.length;
+ const s = this._billboardsToUpdate, c = this._billboardsToUpdateIndex, l = this._propertiesChanged, d = r.guid, f = this._createVertexArray || this._textureAtlasGUID !== d;
+ this._textureAtlasGUID = d;
+ let h;
+ const p = e.passes, m = p.pick;
+ if (f || !m && this.computeNewBuffersUsage()) {
+ this._createVertexArray = !1;
+ for (let P = 0; P < NUMBER_OF_PROPERTIES$4; ++P)
+ l[P] = 0;
+ if (this._vaf = this._vaf && this._vaf.destroy(), n > 0) {
+ this._vaf = createVAF$2(
+ i,
+ n,
+ this._buffersUsage,
+ this._instanced,
+ this._batchTable,
+ this._sdf
+ ), h = this._vaf.writers;
+ for (let P = 0; P < n; ++P) {
+ const I = this._billboards[P];
+ I._dirty = !1, writeBillboard(
+ this,
+ e,
+ o,
+ h,
+ I
+ );
+ }
+ this._vaf.commit(getIndexBuffer$1(i));
+ }
+ this._billboardsToUpdateIndex = 0;
+ } else if (c > 0) {
+ const P = scratchWriterArray$2;
+ P.length = 0, (l[POSITION_INDEX$6] || l[ROTATION_INDEX] || l[SCALE_INDEX$2]) && P.push(writePositionScaleAndRotation), (l[IMAGE_INDEX_INDEX] || l[PIXEL_OFFSET_INDEX] || l[HORIZONTAL_ORIGIN_INDEX] || l[VERTICAL_ORIGIN_INDEX] || l[SHOW_INDEX$6]) && (P.push(writeCompressedAttrib0$1), this._instanced && P.push(writeEyeOffset)), (l[IMAGE_INDEX_INDEX] || l[ALIGNED_AXIS_INDEX] || l[TRANSLUCENCY_BY_DISTANCE_INDEX$2]) && (P.push(writeCompressedAttrib1$1), P.push(writeCompressedAttrib2)), (l[IMAGE_INDEX_INDEX] || l[COLOR_INDEX$4]) && P.push(writeCompressedAttrib2), l[EYE_OFFSET_INDEX] && P.push(writeEyeOffset), l[SCALE_BY_DISTANCE_INDEX$2] && P.push(writeScaleByDistance$1), l[PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX] && P.push(writePixelOffsetScaleByDistance), (l[DISTANCE_DISPLAY_CONDITION_INDEX$2] || l[DISABLE_DEPTH_DISTANCE] || l[IMAGE_INDEX_INDEX] || l[POSITION_INDEX$6]) && P.push(writeCompressedAttribute3), (l[IMAGE_INDEX_INDEX] || l[POSITION_INDEX$6]) && P.push(writeTextureCoordinateBoundsOrLabelTranslate), l[SDF_INDEX] && P.push(writeSDF), l[SPLIT_DIRECTION_INDEX$2] && P.push(writeSplitDirection);
+ const I = P.length;
+ if (h = this._vaf.writers, c / n > 0.1) {
+ for (let M = 0; M < c; ++M) {
+ const R = s[M];
+ R._dirty = !1;
+ for (let L = 0; L < I; ++L)
+ P[L](this, e, o, h, R);
+ }
+ this._vaf.commit(getIndexBuffer$1(i));
+ } else {
+ for (let M = 0; M < c; ++M) {
+ const R = s[M];
+ R._dirty = !1;
+ for (let L = 0; L < I; ++L)
+ P[L](this, e, o, h, R);
+ this._instanced ? this._vaf.subCommit(R._index, 1) : this._vaf.subCommit(R._index * 4, 4);
+ }
+ this._vaf.endSubCommits();
+ }
+ this._billboardsToUpdateIndex = 0;
+ }
+ if (c > n * 1.5 && (s.length = n), !defined(this._vaf) || !defined(this._vaf.va))
+ return;
+ this._boundingVolumeDirty && (this._boundingVolumeDirty = !1, BoundingSphere.transform(
+ this._baseVolume,
+ this.modelMatrix,
+ this._baseVolumeWC
+ ));
+ let _, y = Matrix4.IDENTITY;
+ e.mode === SceneMode$1.SCENE3D ? (y = this.modelMatrix, _ = BoundingSphere.clone(
+ this._baseVolumeWC,
+ this._boundingVolume
+ )) : _ = BoundingSphere.clone(
+ this._baseVolume2D,
+ this._boundingVolume
+ ), updateBoundingVolume$1(this, e, _);
+ const C = this._blendOption !== this.blendOption;
+ if (this._blendOption = this.blendOption, C) {
+ this._blendOption === BlendOption$1.OPAQUE || this._blendOption === BlendOption$1.OPAQUE_AND_TRANSLUCENT ? this._rsOpaque = RenderState.fromCache({
+ depthTest: {
+ enabled: !0,
+ func: WebGLConstants$1.LESS
+ },
+ depthMask: !0
+ }) : this._rsOpaque = void 0;
+ const P = this._blendOption === BlendOption$1.TRANSLUCENT;
+ this._blendOption === BlendOption$1.TRANSLUCENT || this._blendOption === BlendOption$1.OPAQUE_AND_TRANSLUCENT ? this._rsTranslucent = RenderState.fromCache({
+ depthTest: {
+ enabled: !0,
+ func: P ? WebGLConstants$1.LEQUAL : WebGLConstants$1.LESS
+ },
+ depthMask: P,
+ blending: BlendingState$1.ALPHA_BLEND
+ }) : this._rsTranslucent = void 0;
+ }
+ this._shaderDisableDepthDistance = this._shaderDisableDepthDistance || e.minimumDisableDepthTestDistance !== 0;
+ let T, x, b, S, E;
+ const A = ContextLimits.maximumVertexTextureImageUnits > 0;
+ if (C || this._shaderRotation !== this._compiledShaderRotation || this._shaderAlignedAxis !== this._compiledShaderAlignedAxis || this._shaderScaleByDistance !== this._compiledShaderScaleByDistance || this._shaderTranslucencyByDistance !== this._compiledShaderTranslucencyByDistance || this._shaderPixelOffsetScaleByDistance !== this._compiledShaderPixelOffsetScaleByDistance || this._shaderDistanceDisplayCondition !== this._compiledShaderDistanceDisplayCondition || this._shaderDisableDepthDistance !== this._compiledShaderDisableDepthDistance || this._shaderClampToGround !== this._compiledShaderClampToGround || this._sdf !== this._compiledSDF) {
+ T = BillboardCollectionVS, x = BillboardCollectionFS, E = [], defined(this._batchTable) && (E.push("VECTOR_TILE"), T = this._batchTable.getVertexShaderCallback(
+ !1,
+ "a_batchId",
+ void 0
+ )(T), x = this._batchTable.getFragmentShaderCallback(
+ !1,
+ void 0
+ )(x)), b = new ShaderSource({
+ defines: E,
+ sources: [T]
+ }), this._instanced && b.defines.push("INSTANCED"), this._shaderRotation && b.defines.push("ROTATION"), this._shaderAlignedAxis && b.defines.push("ALIGNED_AXIS"), this._shaderScaleByDistance && b.defines.push("EYE_DISTANCE_SCALING"), this._shaderTranslucencyByDistance && b.defines.push("EYE_DISTANCE_TRANSLUCENCY"), this._shaderPixelOffsetScaleByDistance && b.defines.push("EYE_DISTANCE_PIXEL_OFFSET"), this._shaderDistanceDisplayCondition && b.defines.push("DISTANCE_DISPLAY_CONDITION"), this._shaderDisableDepthDistance && b.defines.push("DISABLE_DEPTH_DISTANCE"), this._shaderClampToGround && (A ? b.defines.push("VERTEX_DEPTH_CHECK") : b.defines.push("FRAGMENT_DEPTH_CHECK"));
+ const P = 1 - SDFSettings$1.CUTOFF;
+ this._sdf && b.defines.push("SDF");
+ const I = defined(this._batchTable) ? "VECTOR_TILE" : "";
+ this._blendOption === BlendOption$1.OPAQUE_AND_TRANSLUCENT && (S = new ShaderSource({
+ defines: ["OPAQUE", I],
+ sources: [x]
+ }), this._shaderClampToGround && (A ? S.defines.push("VERTEX_DEPTH_CHECK") : S.defines.push("FRAGMENT_DEPTH_CHECK")), this._sdf && (S.defines.push("SDF"), S.defines.push(`SDF_EDGE ${P}`)), this._sp = ShaderProgram.replaceCache({
+ context: i,
+ shaderProgram: this._sp,
+ vertexShaderSource: b,
+ fragmentShaderSource: S,
+ attributeLocations: attributeLocations$6
+ }), S = new ShaderSource({
+ defines: ["TRANSLUCENT", I],
+ sources: [x]
+ }), this._shaderClampToGround && (A ? S.defines.push("VERTEX_DEPTH_CHECK") : S.defines.push("FRAGMENT_DEPTH_CHECK")), this._sdf && (S.defines.push("SDF"), S.defines.push(`SDF_EDGE ${P}`)), this._spTranslucent = ShaderProgram.replaceCache({
+ context: i,
+ shaderProgram: this._spTranslucent,
+ vertexShaderSource: b,
+ fragmentShaderSource: S,
+ attributeLocations: attributeLocations$6
+ })), this._blendOption === BlendOption$1.OPAQUE && (S = new ShaderSource({
+ defines: [I],
+ sources: [x]
+ }), this._shaderClampToGround && (A ? S.defines.push("VERTEX_DEPTH_CHECK") : S.defines.push("FRAGMENT_DEPTH_CHECK")), this._sdf && (S.defines.push("SDF"), S.defines.push(`SDF_EDGE ${P}`)), this._sp = ShaderProgram.replaceCache({
+ context: i,
+ shaderProgram: this._sp,
+ vertexShaderSource: b,
+ fragmentShaderSource: S,
+ attributeLocations: attributeLocations$6
+ })), this._blendOption === BlendOption$1.TRANSLUCENT && (S = new ShaderSource({
+ defines: [I],
+ sources: [x]
+ }), this._shaderClampToGround && (A ? S.defines.push("VERTEX_DEPTH_CHECK") : S.defines.push("FRAGMENT_DEPTH_CHECK")), this._sdf && (S.defines.push("SDF"), S.defines.push(`SDF_EDGE ${P}`)), this._spTranslucent = ShaderProgram.replaceCache({
+ context: i,
+ shaderProgram: this._spTranslucent,
+ vertexShaderSource: b,
+ fragmentShaderSource: S,
+ attributeLocations: attributeLocations$6
+ })), this._compiledShaderRotation = this._shaderRotation, this._compiledShaderAlignedAxis = this._shaderAlignedAxis, this._compiledShaderScaleByDistance = this._shaderScaleByDistance, this._compiledShaderTranslucencyByDistance = this._shaderTranslucencyByDistance, this._compiledShaderPixelOffsetScaleByDistance = this._shaderPixelOffsetScaleByDistance, this._compiledShaderDistanceDisplayCondition = this._shaderDistanceDisplayCondition, this._compiledShaderDisableDepthDistance = this._shaderDisableDepthDistance, this._compiledShaderClampToGround = this._shaderClampToGround, this._compiledSDF = this._sdf;
+ }
+ const D = e.commandList;
+ if (p.render || p.pick) {
+ const P = this._colorCommands, I = this._blendOption === BlendOption$1.OPAQUE, M = this._blendOption === BlendOption$1.OPAQUE_AND_TRANSLUCENT, R = this._vaf.va, L = R.length;
+ let g = this._uniforms, w;
+ defined(this._batchTable) ? (g = this._batchTable.getUniformMapCallback()(g), w = this._batchTable.getPickId()) : w = "v_pickColor", P.length = L;
+ const O = M ? L * 2 : L;
+ for (let N = 0; N < O; ++N) {
+ let F = P[N];
+ defined(F) || (F = P[N] = new DrawCommand());
+ const B = I || M && N % 2 === 0;
+ F.pass = B || !M ? Pass$1.OPAQUE : Pass$1.TRANSLUCENT, F.owner = this;
+ const V = M ? Math.floor(N / 2) : N;
+ F.boundingVolume = _, F.modelMatrix = y, F.count = R[V].indicesCount, F.shaderProgram = B ? this._sp : this._spTranslucent, F.uniformMap = g, F.vertexArray = R[V].va, F.renderState = B ? this._rsOpaque : this._rsTranslucent, F.debugShowBoundingVolume = this.debugShowBoundingVolume, F.pickId = w, this._instanced && (F.count = 6, F.instanceCount = n), D.push(F);
+ }
+ this.debugShowTextureAtlas && (defined(this.debugCommand) || (this.debugCommand = createDebugCommand(this, e.context)), D.push(this.debugCommand));
+ }
+};
+BillboardCollection.prototype.isDestroyed = function() {
+ return !1;
+};
+BillboardCollection.prototype.destroy = function() {
+ return defined(this._removeCallbackFunc) && (this._removeCallbackFunc(), this._removeCallbackFunc = void 0), this._textureAtlas = this._destroyTextureAtlas && this._textureAtlas && this._textureAtlas.destroy(), this._sp = this._sp && this._sp.destroy(), this._spTranslucent = this._spTranslucent && this._spTranslucent.destroy(), this._vaf = this._vaf && this._vaf.destroy(), destroyBillboards(this._billboards), destroyObject(this);
+};
+function createBillboardPointCallback(e, t, n, i, r) {
+ return function() {
+ const o = document.createElement("canvas"), s = r + 2 * i;
+ o.height = o.width = s;
+ const c = o.getContext("2d");
+ return c.clearRect(0, 0, s, s), i !== 0 && (c.beginPath(), c.arc(s / 2, s / 2, s / 2, 0, 2 * Math.PI, !0), c.closePath(), c.fillStyle = n, c.fill(), e < 1 && (c.save(), c.globalCompositeOperation = "destination-out", c.beginPath(), c.arc(
+ s / 2,
+ s / 2,
+ r / 2,
+ 0,
+ 2 * Math.PI,
+ !0
+ ), c.closePath(), c.fillStyle = "black", c.fill(), c.restore())), c.beginPath(), c.arc(s / 2, s / 2, r / 2, 0, 2 * Math.PI, !0), c.closePath(), c.fillStyle = t, c.fill(), o;
+ };
+}
+function Cesium3DTilePointFeature(e, t, n, i, r) {
+ this._content = e, this._billboard = n, this._label = i, this._polyline = r, this._batchId = t, this._billboardImage = void 0, this._billboardColor = void 0, this._billboardOutlineColor = void 0, this._billboardOutlineWidth = void 0, this._billboardSize = void 0, this._pointSize = void 0, this._color = void 0, this._pointSize = void 0, this._pointOutlineColor = void 0, this._pointOutlineWidth = void 0, this._heightOffset = void 0, this._pickIds = new Array(3), setBillboardImage(this);
+}
+const scratchCartographic$e = new Cartographic();
+Object.defineProperties(Cesium3DTilePointFeature.prototype, {
+ /**
+ * Gets or sets if the feature will be shown. This is set for all features
+ * when a style's show is evaluated.
+ *
+ * @memberof Cesium3DTilePointFeature.prototype
+ *
+ * @type {boolean}
+ *
+ * @default true
+ */
+ show: {
+ get: function() {
+ return this._label.show;
+ },
+ set: function(e) {
+ this._label.show = e, this._billboard.show = e, this._polyline.show = e;
+ }
+ },
+ /**
+ * Gets or sets the color of the point of this feature.
+ *
+ * Only applied when image is undefined.
+ *
+ * Only applied when image is undefined.
+ *
+ * Only applied when image is undefined.
+ *
+ * Only applied when image is undefined.
+ *
+ * The color will be applied to the label if labelText is defined.
+ *
+ * The outline color will be applied to the label if labelText is defined.
+ *
+ * The outline width will be applied to the point if labelText is defined.
+ *
+ * Only applied when the labelText is defined.
+ *
+ * Only applied when labelText is defined.
+ *
+ * Only applied when labelText is defined.
+ *
+ * Only applied when labelText is defined.
+ *
+ * Only applied when labelText is defined.
+ *
+ * Only applied when heightOffset is defined.
+ *
+ * Only applied when heightOffset is defined.
+ *
primitive property. This returns
+ * the tileset containing the feature.
+ *
+ * @memberof Cesium3DTilePointFeature.prototype
+ *
+ * @type {Cesium3DTileset}
+ *
+ * @readonly
+ */
+ primitive: {
+ get: function() {
+ return this._content.tileset;
+ }
+ },
+ /**
+ * @private
+ */
+ pickIds: {
+ get: function() {
+ const e = this._pickIds;
+ return e[0] = this._billboard.pickId, e[1] = this._label.pickId, e[2] = this._polyline.pickId, e;
+ }
+ }
+});
+Cesium3DTilePointFeature.defaultColor = Color.WHITE;
+Cesium3DTilePointFeature.defaultPointOutlineColor = Color.BLACK;
+Cesium3DTilePointFeature.defaultPointOutlineWidth = 0;
+Cesium3DTilePointFeature.defaultPointSize = 8;
+function setBillboardImage(e) {
+ const t = e._billboard;
+ if (defined(e._billboardImage) && e._billboardImage !== t.image) {
+ t.image = e._billboardImage;
+ return;
+ }
+ if (defined(e._billboardImage))
+ return;
+ const n = defaultValue(
+ e._color,
+ Cesium3DTilePointFeature.defaultColor
+ ), i = defaultValue(
+ e._pointOutlineColor,
+ Cesium3DTilePointFeature.defaultPointOutlineColor
+ ), r = defaultValue(
+ e._pointOutlineWidth,
+ Cesium3DTilePointFeature.defaultPointOutlineWidth
+ ), o = defaultValue(
+ e._pointSize,
+ Cesium3DTilePointFeature.defaultPointSize
+ ), s = e._billboardColor, c = e._billboardOutlineColor, l = e._billboardOutlineWidth, d = e._billboardSize;
+ if (Color.equals(n, s) && Color.equals(i, c) && r === l && o === d)
+ return;
+ e._billboardColor = Color.clone(n, e._billboardColor), e._billboardOutlineColor = Color.clone(
+ i,
+ e._billboardOutlineColor
+ ), e._billboardOutlineWidth = r, e._billboardSize = o;
+ const f = n.alpha, h = n.toCssColorString(), p = i.toCssColorString(), m = JSON.stringify([
+ h,
+ o,
+ p,
+ r
+ ]);
+ t.setImage(
+ m,
+ createBillboardPointCallback(
+ f,
+ h,
+ p,
+ r,
+ o
+ )
+ );
+}
+Cesium3DTilePointFeature.prototype.hasProperty = function(e) {
+ return this._content.batchTable.hasProperty(this._batchId, e);
+};
+Cesium3DTilePointFeature.prototype.getPropertyIds = function(e) {
+ return this._content.batchTable.getPropertyIds(this._batchId, e);
+};
+Cesium3DTilePointFeature.prototype.getProperty = function(e) {
+ return this._content.batchTable.getProperty(this._batchId, e);
+};
+Cesium3DTilePointFeature.prototype.getPropertyInherited = function(e) {
+ return Cesium3DTileFeature.getPropertyInherited(
+ this._content,
+ this._batchId,
+ e
+ );
+};
+Cesium3DTilePointFeature.prototype.setProperty = function(e, t) {
+ this._content.batchTable.setProperty(this._batchId, e, t), this._content.featurePropertiesDirty = !0;
+};
+Cesium3DTilePointFeature.prototype.isExactClass = function(e) {
+ return this._content.batchTable.isExactClass(this._batchId, e);
+};
+Cesium3DTilePointFeature.prototype.isClass = function(e) {
+ return this._content.batchTable.isClass(this._batchId, e);
+};
+Cesium3DTilePointFeature.prototype.getExactClassName = function() {
+ return this._content.batchTable.getExactClassName(this._batchId);
+};
+function measureText(e, t, n, i, r) {
+ const o = e.measureText(t);
+ if (!!/\S/.test(t)) {
+ const c = document.defaultView.getComputedStyle(e.canvas).getPropertyValue("font-size").replace("px", ""), l = document.createElement("canvas"), d = 100, f = o.width + d | 0, h = 3 * c, p = h / 2;
+ l.width = f, l.height = h;
+ const m = l.getContext("2d");
+ m.font = n, m.fillStyle = "white", m.fillRect(0, 0, l.width + 1, l.height + 1), i && (m.strokeStyle = "black", m.lineWidth = e.lineWidth, m.strokeText(t, d / 2, p)), r && (m.fillStyle = "black", m.fillText(t, d / 2, p));
+ const _ = m.getImageData(0, 0, f, h).data, y = _.length, C = f * 4;
+ let T, x, b, S;
+ for (T = 0; T < y; ++T)
+ if (_[T] !== 255) {
+ b = T / C | 0;
+ break;
+ }
+ for (T = y - 1; T >= 0; --T)
+ if (_[T] !== 255) {
+ S = T / C | 0;
+ break;
+ }
+ let E = -1;
+ for (T = 0; T < f && E === -1; ++T)
+ for (x = 0; x < h; ++x) {
+ const A = T * 4 + x * C;
+ if (_[A] !== 255 || _[A + 1] !== 255 || _[A + 2] !== 255 || _[A + 3] !== 255) {
+ E = T;
+ break;
+ }
+ }
+ return {
+ width: o.width,
+ height: S - b,
+ ascent: p - b,
+ descent: S - p,
+ minx: E - d / 2
+ };
+ }
+ return {
+ width: o.width,
+ height: 0,
+ ascent: 0,
+ descent: 0,
+ minx: 0
+ };
+}
+let imageSmoothingEnabledName;
+function writeTextToCanvas(e, t) {
+ if (e === "")
+ return;
+ t = defaultValue(t, defaultValue.EMPTY_OBJECT);
+ const n = defaultValue(t.font, "10px sans-serif"), i = defaultValue(t.stroke, !1), r = defaultValue(t.fill, !0), o = defaultValue(t.strokeWidth, 1), s = defaultValue(
+ t.backgroundColor,
+ Color.TRANSPARENT
+ ), c = defaultValue(t.padding, 0), l = c * 2, d = document.createElement("canvas");
+ d.width = 1, d.height = 1, d.style.font = n;
+ const f = d.getContext("2d", { willReadFrequently: !0 });
+ defined(imageSmoothingEnabledName) || (defined(f.imageSmoothingEnabled) ? imageSmoothingEnabledName = "imageSmoothingEnabled" : defined(f.mozImageSmoothingEnabled) ? imageSmoothingEnabledName = "mozImageSmoothingEnabled" : defined(f.webkitImageSmoothingEnabled) ? imageSmoothingEnabledName = "webkitImageSmoothingEnabled" : defined(f.msImageSmoothingEnabled) && (imageSmoothingEnabledName = "msImageSmoothingEnabled")), f.font = n, f.lineJoin = "round", f.lineWidth = o, f[imageSmoothingEnabledName] = !1, d.style.visibility = "hidden", document.body.appendChild(d);
+ const h = measureText(f, e, n, i, r);
+ d.dimensions = h, document.body.removeChild(d), d.style.visibility = "";
+ const p = -h.minx, m = Math.ceil(h.width) + p + l, _ = h.height + l, y = _ - h.ascent + c, C = _ - y + l;
+ if (d.width = m, d.height = _, f.font = n, f.lineJoin = "round", f.lineWidth = o, f[imageSmoothingEnabledName] = !1, s !== Color.TRANSPARENT && (f.fillStyle = s.toCssColorString(), f.fillRect(0, 0, d.width, d.height)), i) {
+ const T = defaultValue(t.strokeColor, Color.BLACK);
+ f.strokeStyle = T.toCssColorString(), f.strokeText(e, p + c, C);
+ }
+ if (r) {
+ const T = defaultValue(t.fillColor, Color.WHITE);
+ f.fillStyle = T.toCssColorString(), f.fillText(e, p + c, C);
+ }
+ return d;
+}
+var bitmapSdf = calcSDF, INF = 1e20;
+function calcSDF(e, t) {
+ t || (t = {});
+ var n = t.cutoff == null ? 0.25 : t.cutoff, i = t.radius == null ? 8 : t.radius, r = t.channel || 0, o, s, c, l, d, f, h, p, m, _, y;
+ if (ArrayBuffer.isView(e) || Array.isArray(e)) {
+ if (!t.width || !t.height) throw Error("For raw data width and height should be provided by options");
+ o = t.width, s = t.height, l = e, t.stride ? f = t.stride : f = Math.floor(e.length / o / s);
+ } else
+ window.HTMLCanvasElement && e instanceof window.HTMLCanvasElement ? (p = e, h = p.getContext("2d"), o = p.width, s = p.height, m = h.getImageData(0, 0, o, s), l = m.data, f = 4) : window.CanvasRenderingContext2D && e instanceof window.CanvasRenderingContext2D ? (p = e.canvas, h = e, o = p.width, s = p.height, m = h.getImageData(0, 0, o, s), l = m.data, f = 4) : window.ImageData && e instanceof window.ImageData && (m = e, o = e.width, s = e.height, l = m.data, f = 4);
+ if (c = Math.max(o, s), window.Uint8ClampedArray && l instanceof window.Uint8ClampedArray || window.Uint8Array && l instanceof window.Uint8Array)
+ for (d = l, l = Array(o * s), _ = 0, y = Math.floor(d.length / f); _ < y; _++)
+ l[_] = d[_ * f + r] / 255;
+ else if (f !== 1) throw Error("Raw data can have only 1 value per pixel");
+ var C = Array(o * s), T = Array(o * s), x = Array(c), b = Array(c), S = Array(c + 1), E = Array(c);
+ for (_ = 0, y = o * s; _ < y; _++) {
+ var A = l[_];
+ C[_] = A === 1 ? 0 : A === 0 ? INF : Math.pow(Math.max(0, 0.5 - A), 2), T[_] = A === 1 ? INF : A === 0 ? 0 : Math.pow(Math.max(0, A - 0.5), 2);
+ }
+ edt(C, o, s, x, b, E, S), edt(T, o, s, x, b, E, S);
+ var D = window.Float32Array ? new Float32Array(o * s) : new Array(o * s);
+ for (_ = 0, y = o * s; _ < y; _++)
+ D[_] = Math.min(Math.max(1 - ((C[_] - T[_]) / i + n), 0), 1);
+ return D;
+}
+function edt(e, t, n, i, r, o, s) {
+ for (var c = 0; c < t; c++) {
+ for (var l = 0; l < n; l++)
+ i[l] = e[l * t + c];
+ for (edt1d(i, r, o, s, n), l = 0; l < n; l++)
+ e[l * t + c] = r[l];
+ }
+ for (l = 0; l < n; l++) {
+ for (c = 0; c < t; c++)
+ i[c] = e[l * t + c];
+ for (edt1d(i, r, o, s, t), c = 0; c < t; c++)
+ e[l * t + c] = Math.sqrt(r[c]);
+ }
+}
+function edt1d(e, t, n, i, r) {
+ n[0] = 0, i[0] = -INF, i[1] = +INF;
+ for (var o = 1, s = 0; o < r; o++) {
+ for (var c = (e[o] + o * o - (e[n[s]] + n[s] * n[s])) / (2 * o - 2 * n[s]); c <= i[s]; )
+ s--, c = (e[o] + o * o - (e[n[s]] + n[s] * n[s])) / (2 * o - 2 * n[s]);
+ s++, n[s] = o, i[s] = c, i[s + 1] = +INF;
+ }
+ for (o = 0, s = 0; o < r; o++) {
+ for (; i[s + 1] < o; ) s++;
+ t[o] = (o - n[s]) * (o - n[s]) + e[n[s]];
+ }
+}
+const bitmapSDF = /* @__PURE__ */ getDefaultExportFromCjs(bitmapSdf), LabelStyle = {
+ /**
+ * Fill the text of the label, but do not outline.
+ *
+ * @type {number}
+ * @constant
+ */
+ FILL: 0,
+ /**
+ * Outline the text of the label, but do not fill.
+ *
+ * @type {number}
+ * @constant
+ */
+ OUTLINE: 1,
+ /**
+ * Fill and outline the text of the label.
+ *
+ * @type {number}
+ * @constant
+ */
+ FILL_AND_OUTLINE: 2
+}, LabelStyle$1 = Object.freeze(LabelStyle), fontInfoCache = {};
+let fontInfoCacheLength = 0;
+const fontInfoCacheMaxSize = 256, defaultBackgroundColor$2 = new Color(0.165, 0.165, 0.165, 0.8), defaultBackgroundPadding$1 = new Cartesian2(7, 5), textTypes = Object.freeze({
+ LTR: 0,
+ RTL: 1,
+ WEAK: 2,
+ BRACKETS: 3
+});
+function rebindAllGlyphs$1(e) {
+ !e._rebindAllGlyphs && !e._repositionAllGlyphs && e._labelCollection._labelsToUpdate.push(e), e._rebindAllGlyphs = !0;
+}
+function repositionAllGlyphs$1(e) {
+ !e._rebindAllGlyphs && !e._repositionAllGlyphs && e._labelCollection._labelsToUpdate.push(e), e._repositionAllGlyphs = !0;
+}
+function getCSSValue(e, t) {
+ return document.defaultView.getComputedStyle(e, null).getPropertyValue(t);
+}
+function parseFont(e) {
+ let t = fontInfoCache[e._font];
+ if (!defined(t)) {
+ const n = document.createElement("div");
+ n.style.position = "absolute", n.style.opacity = 0, n.style.font = e._font, document.body.appendChild(n);
+ let i = parseFloat(getCSSValue(n, "line-height"));
+ isNaN(i) && (i = void 0), t = {
+ family: getCSSValue(n, "font-family"),
+ size: getCSSValue(n, "font-size").replace("px", ""),
+ style: getCSSValue(n, "font-style"),
+ weight: getCSSValue(n, "font-weight"),
+ lineHeight: i
+ }, document.body.removeChild(n), fontInfoCacheLength < fontInfoCacheMaxSize && (fontInfoCache[e._font] = t, fontInfoCacheLength++);
+ }
+ e._fontFamily = t.family, e._fontSize = t.size, e._fontStyle = t.style, e._fontWeight = t.weight, e._lineHeight = t.lineHeight;
+}
+function Label(e, t) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ let n = e.translucencyByDistance, i = e.pixelOffsetScaleByDistance, r = e.scaleByDistance, o = e.distanceDisplayCondition;
+ defined(n) && (n = NearFarScalar.clone(n)), defined(i) && (i = NearFarScalar.clone(
+ i
+ )), defined(r) && (r = NearFarScalar.clone(r)), defined(o) && (o = DistanceDisplayCondition.clone(
+ o
+ )), this._renderedText = void 0, this._text = void 0, this._show = defaultValue(e.show, !0), this._font = defaultValue(e.font, "30px sans-serif"), this._fillColor = Color.clone(defaultValue(e.fillColor, Color.WHITE)), this._outlineColor = Color.clone(
+ defaultValue(e.outlineColor, Color.BLACK)
+ ), this._outlineWidth = defaultValue(e.outlineWidth, 1), this._showBackground = defaultValue(e.showBackground, !1), this._backgroundColor = Color.clone(
+ defaultValue(e.backgroundColor, defaultBackgroundColor$2)
+ ), this._backgroundPadding = Cartesian2.clone(
+ defaultValue(e.backgroundPadding, defaultBackgroundPadding$1)
+ ), this._style = defaultValue(e.style, LabelStyle$1.FILL), this._verticalOrigin = defaultValue(
+ e.verticalOrigin,
+ VerticalOrigin$1.BASELINE
+ ), this._horizontalOrigin = defaultValue(
+ e.horizontalOrigin,
+ HorizontalOrigin$1.LEFT
+ ), this._pixelOffset = Cartesian2.clone(
+ defaultValue(e.pixelOffset, Cartesian2.ZERO)
+ ), this._eyeOffset = Cartesian3.clone(
+ defaultValue(e.eyeOffset, Cartesian3.ZERO)
+ ), this._position = Cartesian3.clone(
+ defaultValue(e.position, Cartesian3.ZERO)
+ ), this._scale = defaultValue(e.scale, 1), this._id = e.id, this._translucencyByDistance = n, this._pixelOffsetScaleByDistance = i, this._scaleByDistance = r, this._heightReference = defaultValue(
+ e.heightReference,
+ HeightReference$1.NONE
+ ), this._distanceDisplayCondition = o, this._disableDepthTestDistance = e.disableDepthTestDistance, this._labelCollection = t, this._glyphs = [], this._backgroundBillboard = void 0, this._batchIndex = void 0, this._rebindAllGlyphs = !0, this._repositionAllGlyphs = !0, this._actualClampedPosition = void 0, this._removeCallbackFunc = void 0, this._mode = void 0, this._clusterShow = !0, this.text = defaultValue(e.text, ""), this._relativeSize = 1, parseFont(this), this._updateClamping();
+}
+Object.defineProperties(Label.prototype, {
+ /**
+ * Determines if this label will be shown. Use this to hide or show a label, instead
+ * of removing it and re-adding it to the collection.
+ * @memberof Label.prototype
+ * @type {boolean}
+ * @default true
+ */
+ show: {
+ get: function() {
+ return this._show;
+ },
+ set: function(e) {
+ if (this._show !== e) {
+ this._show = e;
+ const t = this._glyphs;
+ for (let i = 0, r = t.length; i < r; i++) {
+ const o = t[i].billboard;
+ defined(o) && (o.show = e);
+ }
+ const n = this._backgroundBillboard;
+ defined(n) && (n.show = e);
+ }
+ }
+ },
+ /**
+ * Gets or sets the Cartesian position of this label.
+ * @memberof Label.prototype
+ * @type {Cartesian3}
+ */
+ position: {
+ get: function() {
+ return this._position;
+ },
+ set: function(e) {
+ const t = this._position;
+ if (!Cartesian3.equals(t, e)) {
+ Cartesian3.clone(e, t);
+ const n = this._glyphs;
+ for (let r = 0, o = n.length; r < o; r++) {
+ const s = n[r].billboard;
+ defined(s) && (s.position = e);
+ }
+ const i = this._backgroundBillboard;
+ defined(i) && (i.position = e), this._updateClamping();
+ }
+ }
+ },
+ /**
+ * Gets or sets the height reference of this billboard.
+ * @memberof Label.prototype
+ * @type {HeightReference}
+ * @default HeightReference.NONE
+ */
+ heightReference: {
+ get: function() {
+ return this._heightReference;
+ },
+ set: function(e) {
+ if (e !== this._heightReference) {
+ this._heightReference = e;
+ const t = this._glyphs;
+ for (let i = 0, r = t.length; i < r; i++) {
+ const o = t[i].billboard;
+ defined(o) && (o.heightReference = e);
+ }
+ const n = this._backgroundBillboard;
+ defined(n) && (n.heightReference = e), repositionAllGlyphs$1(this), this._updateClamping();
+ }
+ }
+ },
+ /**
+ * Gets or sets the text of this label.
+ * @memberof Label.prototype
+ * @type {string}
+ */
+ text: {
+ get: function() {
+ return this._text;
+ },
+ set: function(e) {
+ if (this._text !== e) {
+ this._text = e;
+ const t = e.replace(/\u00ad/g, "");
+ this._renderedText = Label.enableRightToLeftDetection ? reverseRtl(t) : t, rebindAllGlyphs$1(this);
+ }
+ }
+ },
+ /**
+ * Gets or sets the font used to draw this label. Fonts are specified using the same syntax as the CSS 'font' property.
+ * @memberof Label.prototype
+ * @type {string}
+ * @default '30px sans-serif'
+ * @see {@link http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#text-styles|HTML canvas 2D context text styles}
+ */
+ font: {
+ get: function() {
+ return this._font;
+ },
+ set: function(e) {
+ this._font !== e && (this._font = e, rebindAllGlyphs$1(this), parseFont(this));
+ }
+ },
+ /**
+ * Gets or sets the fill color of this label.
+ * @memberof Label.prototype
+ * @type {Color}
+ * @default Color.WHITE
+ * @see {@link http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#fill-and-stroke-styles|HTML canvas 2D context fill and stroke styles}
+ */
+ fillColor: {
+ get: function() {
+ return this._fillColor;
+ },
+ set: function(e) {
+ const t = this._fillColor;
+ Color.equals(t, e) || (Color.clone(e, t), rebindAllGlyphs$1(this));
+ }
+ },
+ /**
+ * Gets or sets the outline color of this label.
+ * @memberof Label.prototype
+ * @type {Color}
+ * @default Color.BLACK
+ * @see {@link http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#fill-and-stroke-styles|HTML canvas 2D context fill and stroke styles}
+ */
+ outlineColor: {
+ get: function() {
+ return this._outlineColor;
+ },
+ set: function(e) {
+ const t = this._outlineColor;
+ Color.equals(t, e) || (Color.clone(e, t), rebindAllGlyphs$1(this));
+ }
+ },
+ /**
+ * Gets or sets the outline width of this label.
+ * @memberof Label.prototype
+ * @type {number}
+ * @default 1.0
+ * @see {@link http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#fill-and-stroke-styles|HTML canvas 2D context fill and stroke styles}
+ */
+ outlineWidth: {
+ get: function() {
+ return this._outlineWidth;
+ },
+ set: function(e) {
+ this._outlineWidth !== e && (this._outlineWidth = e, rebindAllGlyphs$1(this));
+ }
+ },
+ /**
+ * Determines if a background behind this label will be shown.
+ * @memberof Label.prototype
+ * @default false
+ * @type {boolean}
+ */
+ showBackground: {
+ get: function() {
+ return this._showBackground;
+ },
+ set: function(e) {
+ this._showBackground !== e && (this._showBackground = e, rebindAllGlyphs$1(this));
+ }
+ },
+ /**
+ * Gets or sets the background color of this label.
+ * @memberof Label.prototype
+ * @type {Color}
+ * @default new Color(0.165, 0.165, 0.165, 0.8)
+ */
+ backgroundColor: {
+ get: function() {
+ return this._backgroundColor;
+ },
+ set: function(e) {
+ const t = this._backgroundColor;
+ if (!Color.equals(t, e)) {
+ Color.clone(e, t);
+ const n = this._backgroundBillboard;
+ defined(n) && (n.color = t);
+ }
+ }
+ },
+ /**
+ * Gets or sets the background padding, in pixels, of this label. The x value
+ * controls horizontal padding, and the y value controls vertical padding.
+ * @memberof Label.prototype
+ * @type {Cartesian2}
+ * @default new Cartesian2(7, 5)
+ */
+ backgroundPadding: {
+ get: function() {
+ return this._backgroundPadding;
+ },
+ set: function(e) {
+ const t = this._backgroundPadding;
+ Cartesian2.equals(t, e) || (Cartesian2.clone(e, t), repositionAllGlyphs$1(this));
+ }
+ },
+ /**
+ * Gets or sets the style of this label.
+ * @memberof Label.prototype
+ * @type {LabelStyle}
+ * @default LabelStyle.FILL
+ */
+ style: {
+ get: function() {
+ return this._style;
+ },
+ set: function(e) {
+ this._style !== e && (this._style = e, rebindAllGlyphs$1(this));
+ }
+ },
+ /**
+ * Gets or sets the pixel offset in screen space from the origin of this label. This is commonly used
+ * to align multiple labels and billboards at the same position, e.g., an image and text. The
+ * screen space origin is the top, left corner of the canvas; x increases from
+ * left to right, and y increases from top to bottom.
+ * default |
+ * l.pixeloffset = new Cartesian2(25, 75); |
+ *
x points towards the viewer's right, y points up, and
+ * z points into the screen. Eye coordinates use the same scale as world and model coordinates,
+ * which is typically meters.
+ * ![]() |
+ * ![]() |
+ *
l.eyeOffset = new Cartesian3(0.0, 8000000.0, 0.0);

1.0 does not change the size of the label; a scale greater than
+ * 1.0 enlarges the label; a positive scale less than 1.0 shrinks
+ * the label.
+ * 
0.5, 1.0,
+ * and 2.0.
+ * b3dm
+ *
+ * @type {string}
+ * @constant
+ * @private
+ */
+ BATCHED_3D_MODEL: "b3dm",
+ /**
+ * An Instanced 3D Model. This is a binary format with magic number
+ * i3dm
+ *
+ * @type {string}
+ * @constant
+ * @private
+ */
+ INSTANCED_3D_MODEL: "i3dm",
+ /**
+ * A Composite model. This is a binary format with magic number
+ * cmpt
+ *
+ * @type {string}
+ * @constant
+ * @private
+ */
+ COMPOSITE: "cmpt",
+ /**
+ * A Point Cloud model. This is a binary format with magic number
+ * pnts
+ *
+ * @type {string}
+ * @constant
+ * @private
+ */
+ POINT_CLOUD: "pnts",
+ /**
+ * Vector tiles. This is a binary format with magic number
+ * vctr
+ *
+ * @type {string}
+ * @constant
+ * @private
+ */
+ VECTOR: "vctr",
+ /**
+ * Geometry tiles. This is a binary format with magic number
+ * geom
+ *
+ * @type {string}
+ * @constant
+ * @private
+ */
+ GEOMETRY: "geom",
+ /**
+ * A glTF model in JSON + external BIN form. This is treated
+ * as a JSON format.
+ *
+ * @type {string}
+ * @constant
+ * @private
+ * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
+ */
+ GLTF: "gltf",
+ /**
+ * The binary form of a glTF file. Internally, the magic number is
+ * changed from glTF to glb to distinguish it from
+ * the JSON glTF format.
+ *
+ * @type {string}
+ * @constant
+ * @private
+ * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
+ */
+ GLTF_BINARY: "glb",
+ /**
+ * For implicit tiling, availability bitstreams are stored in binary subtree files.
+ * The magic number is subt
+ *
+ * @type {string}
+ * @constant
+ * @private
+ * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
+ */
+ IMPLICIT_SUBTREE: "subt",
+ /**
+ * For implicit tiling. Subtrees can also be represented as JSON files.
+ *
+ * @type {string}
+ * @constant
+ * @private
+ * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
+ */
+ IMPLICIT_SUBTREE_JSON: "subtreeJson",
+ /**
+ * Contents can reference another tileset.json to use
+ * as an external tileset. This is a JSON-based format.
+ *
+ * @type {string}
+ * @constant
+ * @private
+ */
+ EXTERNAL_TILESET: "externalTileset",
+ /**
+ * Multiple contents are handled separately from the other content types
+ * due to differences in request scheduling.
+ *
+ * @type {string}
+ * @constant
+ * @private
+ * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
+ */
+ MULTIPLE_CONTENT: "multipleContent",
+ /**
+ * GeoJSON content for MAXAR_content_geojson extension.
+ *
+ * @type {string}
+ * @constant
+ * @private
+ * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
+ */
+ GEOJSON: "geoJson",
+ /**
+ * Binary voxel content for 3DTILES_content_voxels extension.
+ *
+ * @type {string}
+ * @constant
+ * @private
+ * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
+ */
+ VOXEL_BINARY: "voxl",
+ /**
+ * Binary voxel content for 3DTILES_content_voxels extension.
+ *
+ * @type {string}
+ * @constant
+ * @private
+ * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
+ */
+ VOXEL_JSON: "voxelJson"
+};
+Cesium3DTileContentType.isBinaryFormat = function(e) {
+ switch (e) {
+ case Cesium3DTileContentType.BATCHED_3D_MODEL:
+ case Cesium3DTileContentType.INSTANCED_3D_MODEL:
+ case Cesium3DTileContentType.COMPOSITE:
+ case Cesium3DTileContentType.POINT_CLOUD:
+ case Cesium3DTileContentType.VECTOR:
+ case Cesium3DTileContentType.GEOMETRY:
+ case Cesium3DTileContentType.IMPLICIT_SUBTREE:
+ case Cesium3DTileContentType.VOXEL_BINARY:
+ case Cesium3DTileContentType.GLTF_BINARY:
+ return !0;
+ default:
+ return !1;
+ }
+};
+const Cesium3DTileContentType$1 = Object.freeze(Cesium3DTileContentType), Cesium3DTileOptimizationHint = {
+ NOT_COMPUTED: -1,
+ USE_OPTIMIZATION: 1,
+ SKIP_OPTIMIZATION: 0
+}, Cesium3DTileOptimizationHint$1 = Object.freeze(Cesium3DTileOptimizationHint), Cesium3DTilePass = {
+ RENDER: 0,
+ PICK: 1,
+ SHADOW: 2,
+ PRELOAD: 3,
+ PRELOAD_FLIGHT: 4,
+ REQUEST_RENDER_MODE_DEFER_CHECK: 5,
+ MOST_DETAILED_PRELOAD: 6,
+ MOST_DETAILED_PICK: 7,
+ NUMBER_OF_PASSES: 8
+}, passOptions = new Array(Cesium3DTilePass.NUMBER_OF_PASSES);
+passOptions[Cesium3DTilePass.RENDER] = Object.freeze({
+ pass: Cesium3DTilePass.RENDER,
+ isRender: !0,
+ requestTiles: !0,
+ ignoreCommands: !1
+});
+passOptions[Cesium3DTilePass.PICK] = Object.freeze({
+ pass: Cesium3DTilePass.PICK,
+ isRender: !1,
+ requestTiles: !1,
+ ignoreCommands: !1
+});
+passOptions[Cesium3DTilePass.SHADOW] = Object.freeze({
+ pass: Cesium3DTilePass.SHADOW,
+ isRender: !1,
+ requestTiles: !0,
+ ignoreCommands: !1
+});
+passOptions[Cesium3DTilePass.PRELOAD] = Object.freeze({
+ pass: Cesium3DTilePass.PRELOAD,
+ isRender: !1,
+ requestTiles: !0,
+ ignoreCommands: !0
+});
+passOptions[Cesium3DTilePass.PRELOAD_FLIGHT] = Object.freeze({
+ pass: Cesium3DTilePass.PRELOAD_FLIGHT,
+ isRender: !1,
+ requestTiles: !0,
+ ignoreCommands: !0
+});
+passOptions[Cesium3DTilePass.REQUEST_RENDER_MODE_DEFER_CHECK] = Object.freeze({
+ pass: Cesium3DTilePass.REQUEST_RENDER_MODE_DEFER_CHECK,
+ isRender: !1,
+ requestTiles: !0,
+ ignoreCommands: !0
+});
+passOptions[Cesium3DTilePass.MOST_DETAILED_PRELOAD] = Object.freeze({
+ pass: Cesium3DTilePass.MOST_DETAILED_PRELOAD,
+ isRender: !1,
+ requestTiles: !0,
+ ignoreCommands: !0
+});
+passOptions[Cesium3DTilePass.MOST_DETAILED_PICK] = Object.freeze({
+ pass: Cesium3DTilePass.MOST_DETAILED_PICK,
+ isRender: !1,
+ requestTiles: !1,
+ ignoreCommands: !1
+});
+Cesium3DTilePass.getPassOptions = function(e) {
+ return passOptions[e];
+};
+const Cesium3DTilePass$1 = Object.freeze(Cesium3DTilePass);
+function Empty3DTileContent(e, t) {
+ this._tileset = e, this._tile = t, this.featurePropertiesDirty = !1;
+}
+Object.defineProperties(Empty3DTileContent.prototype, {
+ featuresLength: {
+ get: function() {
+ return 0;
+ }
+ },
+ pointsLength: {
+ get: function() {
+ return 0;
+ }
+ },
+ trianglesLength: {
+ get: function() {
+ return 0;
+ }
+ },
+ geometryByteLength: {
+ get: function() {
+ return 0;
+ }
+ },
+ texturesByteLength: {
+ get: function() {
+ return 0;
+ }
+ },
+ batchTableByteLength: {
+ get: function() {
+ return 0;
+ }
+ },
+ innerContents: {
+ get: function() {
+ }
+ },
+ /**
+ * Returns true when the tile's content is ready to render; otherwise false
+ *
+ * @memberof Empty3DTileContent.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ * @private
+ */
+ ready: {
+ get: function() {
+ return !0;
+ }
+ },
+ tileset: {
+ get: function() {
+ return this._tileset;
+ }
+ },
+ tile: {
+ get: function() {
+ return this._tile;
+ }
+ },
+ url: {
+ get: function() {
+ }
+ },
+ metadata: {
+ get: function() {
+ },
+ set: function(e) {
+ }
+ },
+ batchTable: {
+ get: function() {
+ }
+ },
+ group: {
+ get: function() {
+ },
+ set: function(e) {
+ }
+ }
+});
+Empty3DTileContent.prototype.hasProperty = function(e, t) {
+ return !1;
+};
+Empty3DTileContent.prototype.getFeature = function(e) {
+};
+Empty3DTileContent.prototype.applyDebugSettings = function(e, t) {
+};
+Empty3DTileContent.prototype.applyStyle = function(e) {
+};
+Empty3DTileContent.prototype.update = function(e, t) {
+};
+Empty3DTileContent.prototype.pick = function(e, t, n) {
+};
+Empty3DTileContent.prototype.isDestroyed = function() {
+ return !1;
+};
+Empty3DTileContent.prototype.destroy = function() {
+ return destroyObject(this);
+};
+function ContentMetadata(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.content, n = e.class;
+ this._class = n, this._properties = t.properties, this._extensions = t.extensions, this._extras = t.extras;
+}
+Object.defineProperties(ContentMetadata.prototype, {
+ /**
+ * The class that properties conform to.
+ *
+ * @memberof ContentMetadata.prototype
+ * @type {MetadataClass}
+ * @readonly
+ * @private
+ */
+ class: {
+ get: function() {
+ return this._class;
+ }
+ },
+ /**
+ * Extra user-defined properties.
+ *
+ * @memberof ContentMetadata.prototype
+ * @type {object}
+ * @readonly
+ * @private
+ */
+ extras: {
+ get: function() {
+ return this._extras;
+ }
+ },
+ /**
+ * An object containing extensions.
+ *
+ * @memberof ContentMetadata.prototype
+ * @type {object}
+ * @readonly
+ * @private
+ */
+ extensions: {
+ get: function() {
+ return this._extensions;
+ }
+ }
+});
+ContentMetadata.prototype.hasProperty = function(e) {
+ return MetadataEntity.hasProperty(e, this._properties, this._class);
+};
+ContentMetadata.prototype.hasPropertyBySemantic = function(e) {
+ return MetadataEntity.hasPropertyBySemantic(
+ e,
+ this._properties,
+ this._class
+ );
+};
+ContentMetadata.prototype.getPropertyIds = function(e) {
+ return MetadataEntity.getPropertyIds(this._properties, this._class, e);
+};
+ContentMetadata.prototype.getProperty = function(e) {
+ return MetadataEntity.getProperty(e, this._properties, this._class);
+};
+ContentMetadata.prototype.setProperty = function(e, t) {
+ return MetadataEntity.setProperty(
+ e,
+ t,
+ this._properties,
+ this._class
+ );
+};
+ContentMetadata.prototype.getPropertyBySemantic = function(e) {
+ return MetadataEntity.getPropertyBySemantic(
+ e,
+ this._properties,
+ this._class
+ );
+};
+ContentMetadata.prototype.setPropertyBySemantic = function(e, t) {
+ return MetadataEntity.setPropertyBySemantic(
+ e,
+ t,
+ this._properties,
+ this._class
+ );
+};
+function findContentMetadata(e, t) {
+ const n = hasExtension(t, "3DTILES_metadata") ? t.extensions["3DTILES_metadata"] : t.metadata;
+ if (!defined(n))
+ return;
+ if (!defined(e.schema)) {
+ findContentMetadata._oneTimeWarning(
+ "findContentMetadata-missing-root-schema",
+ "Could not find a metadata schema for content metadata. For tilesets that contain external tilesets, make sure the schema is added to the root tileset.json."
+ );
+ return;
+ }
+ const i = defaultValue(
+ e.schema.classes,
+ defaultValue.EMPTY_OBJECT
+ );
+ if (defined(n.class)) {
+ const r = i[n.class];
+ return new ContentMetadata({
+ content: n,
+ class: r
+ });
+ }
+}
+findContentMetadata._oneTimeWarning = oneTimeWarning;
+function findGroupMetadata(e, t) {
+ const n = e.metadataExtension;
+ if (!defined(n))
+ return;
+ const i = n.groups, r = hasExtension(t, "3DTILES_metadata") ? t.extensions["3DTILES_metadata"].group : t.group;
+ if (typeof r == "number")
+ return i[r];
+ const o = n.groupIds.findIndex(function(s) {
+ return s === r;
+ });
+ return o >= 0 ? i[o] : void 0;
+}
+function TileMetadata(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.tile, n = e.class;
+ this._class = n, this._properties = t.properties, this._extensions = t.extensions, this._extras = t.extras;
+}
+Object.defineProperties(TileMetadata.prototype, {
+ /**
+ * The class that properties conform to.
+ *
+ * @memberof TileMetadata.prototype
+ * @type {MetadataClass}
+ * @readonly
+ * @private
+ */
+ class: {
+ get: function() {
+ return this._class;
+ }
+ },
+ /**
+ * Extra user-defined properties.
+ *
+ * @memberof TileMetadata.prototype
+ * @type {object}
+ * @readonly
+ * @private
+ */
+ extras: {
+ get: function() {
+ return this._extras;
+ }
+ },
+ /**
+ * An object containing extensions.
+ *
+ * @memberof TileMetadata.prototype
+ * @type {object}
+ * @readonly
+ * @private
+ */
+ extensions: {
+ get: function() {
+ return this._extensions;
+ }
+ }
+});
+TileMetadata.prototype.hasProperty = function(e) {
+ return MetadataEntity.hasProperty(e, this._properties, this._class);
+};
+TileMetadata.prototype.hasPropertyBySemantic = function(e) {
+ return MetadataEntity.hasPropertyBySemantic(
+ e,
+ this._properties,
+ this._class
+ );
+};
+TileMetadata.prototype.getPropertyIds = function(e) {
+ return MetadataEntity.getPropertyIds(this._properties, this._class, e);
+};
+TileMetadata.prototype.getProperty = function(e) {
+ return MetadataEntity.getProperty(e, this._properties, this._class);
+};
+TileMetadata.prototype.setProperty = function(e, t) {
+ return MetadataEntity.setProperty(
+ e,
+ t,
+ this._properties,
+ this._class
+ );
+};
+TileMetadata.prototype.getPropertyBySemantic = function(e) {
+ return MetadataEntity.getPropertyBySemantic(
+ e,
+ this._properties,
+ this._class
+ );
+};
+TileMetadata.prototype.setPropertyBySemantic = function(e, t) {
+ return MetadataEntity.setPropertyBySemantic(
+ e,
+ t,
+ this._properties,
+ this._class
+ );
+};
+function findTileMetadata(e, t) {
+ const n = hasExtension(t, "3DTILES_metadata") ? t.extensions["3DTILES_metadata"] : t.metadata;
+ if (!defined(n))
+ return;
+ if (!defined(e.schema)) {
+ findTileMetadata._oneTimeWarning(
+ "findTileMetadata-missing-root-schema",
+ "Could not find a metadata schema for tile metadata. For tilesets that contain external tilesets, make sure the schema is added to the root tileset.json."
+ );
+ return;
+ }
+ const i = defaultValue(
+ e.schema.classes,
+ defaultValue.EMPTY_OBJECT
+ );
+ if (defined(n.class)) {
+ const r = i[n.class];
+ return new TileMetadata({
+ tile: n,
+ class: r
+ });
+ }
+}
+findTileMetadata._oneTimeWarning = oneTimeWarning;
+function preprocess3DTileContent(e) {
+ const t = new Uint8Array(e);
+ let n = getMagic(t);
+ if (n === "glTF" && (n = "glb"), Cesium3DTileContentType$1.isBinaryFormat(n))
+ return {
+ // For binary files, the enum value is the magic number
+ contentType: n,
+ binaryPayload: t
+ };
+ const i = getJsonContent(t);
+ if (defined(i.root))
+ return {
+ contentType: Cesium3DTileContentType$1.EXTERNAL_TILESET,
+ jsonPayload: i
+ };
+ if (defined(i.asset))
+ return {
+ contentType: Cesium3DTileContentType$1.GLTF,
+ jsonPayload: i
+ };
+ if (defined(i.tileAvailability))
+ return {
+ contentType: Cesium3DTileContentType$1.IMPLICIT_SUBTREE_JSON,
+ jsonPayload: i
+ };
+ if (defined(i.type))
+ return {
+ contentType: Cesium3DTileContentType$1.GEOJSON,
+ jsonPayload: i
+ };
+ if (defined(i.voxelTable))
+ return {
+ contentType: Cesium3DTileContentType$1.VOXEL_JSON,
+ jsonPayload: i
+ };
+ throw new RuntimeError("Invalid tile content.");
+}
+function getJsonContent(e) {
+ let t;
+ try {
+ t = getJsonFromTypedArray(e);
+ } catch {
+ throw new RuntimeError("Invalid tile content.");
+ }
+ return t;
+}
+function Multiple3DTileContent(e, t, n, i) {
+ this._tileset = e, this._tile = t, this._tilesetResource = n, this._contents = [], this._contentsCreated = !1;
+ const r = defined(i.contents) ? i.contents : i.content;
+ this._innerContentHeaders = r, this._requestsInFlight = 0, this._cancelCount = 0;
+ const o = this._innerContentHeaders.length;
+ this._arrayFetchPromises = new Array(o), this._requests = new Array(o), this._ready = !1, this._innerContentResources = new Array(o), this._serverKeys = new Array(o);
+ for (let s = 0; s < o; s++) {
+ const c = n.getDerivedResource({
+ url: r[s].uri
+ }), l = RequestScheduler.getServerKey(
+ c.getUrlComponent()
+ );
+ this._innerContentResources[s] = c, this._serverKeys[s] = l;
+ }
+}
+Object.defineProperties(Multiple3DTileContent.prototype, {
+ /**
+ * Part of the {@link Cesium3DTileContent} interface. Multiple3DTileContent checks if any of the inner contents have dirty featurePropertiesDirty.
+ * @memberof Multiple3DTileContent.prototype
+ *
+ * @type {boolean}
+ *
+ * @private
+ */
+ featurePropertiesDirty: {
+ get: function() {
+ const e = this._contents, t = e.length;
+ for (let n = 0; n < t; ++n)
+ if (e[n].featurePropertiesDirty)
+ return !0;
+ return !1;
+ },
+ set: function(e) {
+ const t = this._contents, n = t.length;
+ for (let i = 0; i < n; ++i)
+ t[i].featurePropertiesDirty = e;
+ }
+ },
+ /**
+ * Part of the {@link Cesium3DTileContent} interface. Multiple3DTileContent
+ * always returns 0. Instead call featuresLength for a specific inner content.
+ *
+ * @memberof Multiple3DTileContent.prototype
+ *
+ * @type {number}
+ * @readonly
+ *
+ * @private
+ */
+ featuresLength: {
+ get: function() {
+ return 0;
+ }
+ },
+ /**
+ * Part of the {@link Cesium3DTileContent} interface. Multiple3DTileContent
+ * always returns 0. Instead, call pointsLength for a specific inner content.
+ *
+ * @memberof Multiple3DTileContent.prototype
+ *
+ * @type {number}
+ * @readonly
+ *
+ * @private
+ */
+ pointsLength: {
+ get: function() {
+ return 0;
+ }
+ },
+ /**
+ * Part of the {@link Cesium3DTileContent} interface. Multiple3DTileContent
+ * always returns 0. Instead call trianglesLength for a specific inner content.
+ *
+ * @memberof Multiple3DTileContent.prototype
+ *
+ * @type {number}
+ * @readonly
+ *
+ * @private
+ */
+ trianglesLength: {
+ get: function() {
+ return 0;
+ }
+ },
+ /**
+ * Part of the {@link Cesium3DTileContent} interface. Multiple3DTileContent
+ * always returns 0. Instead call geometryByteLength for a specific inner content.
+ *
+ * @memberof Multiple3DTileContent.prototype
+ *
+ * @type {number}
+ * @readonly
+ *
+ * @private
+ */
+ geometryByteLength: {
+ get: function() {
+ return 0;
+ }
+ },
+ /**
+ * Part of the {@link Cesium3DTileContent} interface. Multiple3DTileContent
+ * always returns 0. Instead call texturesByteLength for a specific inner content.
+ *
+ * @memberof Multiple3DTileContent.prototype
+ *
+ * @type {number}
+ * @readonly
+ *
+ * @private
+ */
+ texturesByteLength: {
+ get: function() {
+ return 0;
+ }
+ },
+ /**
+ * Part of the {@link Cesium3DTileContent} interface. Multiple3DTileContent
+ * always returns 0. Instead call batchTableByteLength for a specific inner content.
+ *
+ * @memberof Multiple3DTileContent.prototype
+ *
+ * @type {number}
+ * @readonly
+ *
+ * @private
+ */
+ batchTableByteLength: {
+ get: function() {
+ return 0;
+ }
+ },
+ innerContents: {
+ get: function() {
+ return this._contents;
+ }
+ },
+ /**
+ * Returns true when the tile's content is ready to render; otherwise false
+ *
+ * @memberof Multiple3DTileContent.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ * @private
+ */
+ ready: {
+ get: function() {
+ return this._contentsCreated ? this._ready : !1;
+ }
+ },
+ tileset: {
+ get: function() {
+ return this._tileset;
+ }
+ },
+ tile: {
+ get: function() {
+ return this._tile;
+ }
+ },
+ /**
+ * Part of the {@link Cesium3DTileContent} interface.
+ * Unlike other content types, Multiple3DTileContent does not
+ * have a single URL, so this returns undefined.
+ * @memberof Multiple3DTileContent.prototype
+ *
+ * @type {string}
+ * @readonly
+ * @private
+ */
+ url: {
+ get: function() {
+ }
+ },
+ /**
+ * Part of the {@link Cesium3DTileContent} interface. Multiple3DTileContent
+ * always returns undefined. Instead call metadata for a specific inner content.
+ * @memberof Multiple3DTileContent.prototype
+ * @private
+ */
+ metadata: {
+ get: function() {
+ },
+ set: function() {
+ }
+ },
+ /**
+ * Part of the {@link Cesium3DTileContent} interface. Multiple3DTileContent
+ * always returns undefined. Instead call batchTable for a specific inner content.
+ * @memberof Multiple3DTileContent.prototype
+ * @private
+ */
+ batchTable: {
+ get: function() {
+ }
+ },
+ /**
+ * Part of the {@link Cesium3DTileContent} interface. Multiple3DTileContent
+ * always returns undefined. Instead call group for a specific inner content.
+ * @memberof Multiple3DTileContent.prototype
+ * @private
+ */
+ group: {
+ get: function() {
+ },
+ set: function() {
+ }
+ },
+ /**
+ * Get an array of the inner content URLs, regardless of whether they've
+ * been fetched or not. This is intended for use with
+ * {@link Cesium3DTileset#debugShowUrl}.
+ * @memberof Multiple3DTileContent.prototype
+ *
+ * @type {string[]}
+ * @readonly
+ * @private
+ */
+ innerContentUrls: {
+ get: function() {
+ return this._innerContentHeaders.map(function(e) {
+ return e.uri;
+ });
+ }
+ }
+});
+function updatePendingRequests(e, t) {
+ e._requestsInFlight += t, e.tileset.statistics.numberOfPendingRequests += t;
+}
+function cancelPendingRequests(e, t) {
+ e._cancelCount++, e._tile._contentState = t;
+ const n = e.tileset.statistics;
+ n.numberOfPendingRequests -= e._requestsInFlight, n.numberOfAttemptedRequests += e._requestsInFlight, e._requestsInFlight = 0;
+ const i = e._innerContentHeaders.length;
+ e._arrayFetchPromises = new Array(i);
+}
+Multiple3DTileContent.prototype.requestInnerContents = function() {
+ if (!canScheduleAllRequests(this._serverKeys)) {
+ this.tileset.statistics.numberOfAttemptedRequests += this._serverKeys.length;
+ return;
+ }
+ const e = this._innerContentHeaders;
+ updatePendingRequests(this, e.length);
+ const t = this._cancelCount;
+ for (let n = 0; n < e.length; n++)
+ this._arrayFetchPromises[n] = requestInnerContent(
+ this,
+ n,
+ t,
+ this._tile._contentState
+ );
+ return createInnerContents(this);
+};
+function canScheduleAllRequests(e) {
+ const t = {};
+ for (let n = 0; n < e.length; n++) {
+ const i = e[n];
+ defined(t[i]) ? t[i]++ : t[i] = 1;
+ }
+ for (const n in t)
+ if (t.hasOwnProperty(n) && !RequestScheduler.serverHasOpenSlots(n, t[n]))
+ return !1;
+ return RequestScheduler.heapHasOpenSlots(e.length);
+}
+function requestInnerContent(e, t, n, i) {
+ const r = e._innerContentResources[t].clone(), o = e.tile, s = function() {
+ return o._priority;
+ }, c = e._serverKeys[t], l = new Request({
+ throttle: !0,
+ throttleByServer: !0,
+ type: RequestType$1.TILES3D,
+ priorityFunction: s,
+ serverKey: c
+ });
+ r.request = l, e._requests[t] = l;
+ const d = r.fetchArrayBuffer();
+ if (defined(d))
+ return d.then(function(f) {
+ if (!(n < e._cancelCount)) {
+ if (r.request.cancelled || r.request.state === RequestState$1.CANCELLED) {
+ cancelPendingRequests(e, i);
+ return;
+ }
+ return updatePendingRequests(e, -1), f;
+ }
+ }).catch(function(f) {
+ if (!(n < e._cancelCount)) {
+ if (r.request.cancelled || r.request.state === RequestState$1.CANCELLED) {
+ cancelPendingRequests(e, i);
+ return;
+ }
+ updatePendingRequests(e, -1), handleInnerContentFailed(e, t, f);
+ }
+ });
+}
+async function createInnerContents(e) {
+ const t = e._cancelCount, n = await Promise.all(e._arrayFetchPromises);
+ if (t < e._cancelCount)
+ return;
+ const i = n.map(
+ (o, s) => createInnerContent(e, o, s)
+ ), r = await Promise.all(i);
+ return e._contentsCreated = !0, e._contents = r.filter(defined), r;
+}
+async function createInnerContent(e, t, n) {
+ if (defined(t))
+ try {
+ const i = preprocess3DTileContent(t);
+ if (i.contentType === Cesium3DTileContentType$1.EXTERNAL_TILESET)
+ throw new RuntimeError(
+ "External tilesets are disallowed inside multiple contents"
+ );
+ e._disableSkipLevelOfDetail = e._disableSkipLevelOfDetail || i.contentType === Cesium3DTileContentType$1.GEOMETRY || i.contentType === Cesium3DTileContentType$1.VECTOR;
+ const r = e._tileset, o = e._innerContentResources[n], s = e._tile;
+ let c;
+ const l = Cesium3DTileContentFactory[i.contentType];
+ defined(i.binaryPayload) ? c = await Promise.resolve(
+ l(
+ r,
+ s,
+ o,
+ i.binaryPayload.buffer,
+ 0
+ )
+ ) : c = await Promise.resolve(
+ l(r, s, o, i.jsonPayload)
+ );
+ const d = e._innerContentHeaders[n];
+ if (s.hasImplicitContentMetadata) {
+ const h = s.implicitSubtree, p = s.implicitCoordinates;
+ c.metadata = h.getContentMetadataView(p, n);
+ } else s.hasImplicitContent || (c.metadata = findContentMetadata(r, d));
+ const f = findGroupMetadata(r, d);
+ return defined(f) && (c.group = new Cesium3DContentGroup({
+ metadata: f
+ })), c;
+ } catch (i) {
+ handleInnerContentFailed(e, n, i);
+ }
+}
+function handleInnerContentFailed(e, t, n) {
+ const i = e._tileset, r = e._innerContentResources[t].url, o = defined(n.message) ? n.message : n.toString();
+ i.tileFailed.numberOfListeners > 0 ? i.tileFailed.raiseEvent({
+ url: r,
+ message: o
+ }) : (console.log(`A content failed to load: ${r}`), console.log(`Error: ${o}`));
+}
+Multiple3DTileContent.prototype.cancelRequests = function() {
+ for (let e = 0; e < this._requests.length; e++) {
+ const t = this._requests[e];
+ defined(t) && t.cancel();
+ }
+};
+Multiple3DTileContent.prototype.hasProperty = function(e, t) {
+ return !1;
+};
+Multiple3DTileContent.prototype.getFeature = function(e) {
+};
+Multiple3DTileContent.prototype.applyDebugSettings = function(e, t) {
+ const n = this._contents, i = n.length;
+ for (let r = 0; r < i; ++r)
+ n[r].applyDebugSettings(e, t);
+};
+Multiple3DTileContent.prototype.applyStyle = function(e) {
+ const t = this._contents, n = t.length;
+ for (let i = 0; i < n; ++i)
+ t[i].applyStyle(e);
+};
+Multiple3DTileContent.prototype.update = function(e, t) {
+ const n = this._contents, i = n.length;
+ let r = !0;
+ for (let o = 0; o < i; ++o)
+ n[o].update(e, t), r = r && n[o].ready;
+ !this._ready && r && (this._ready = !0);
+};
+Multiple3DTileContent.prototype.pick = function(e, t, n) {
+ if (!this._ready)
+ return;
+ let i, r = Number.POSITIVE_INFINITY;
+ const o = this._contents, s = o.length;
+ for (let c = 0; c < s; ++c) {
+ const l = o[c].pick(e, t, n);
+ if (!defined(l))
+ continue;
+ const d = Cartesian3.distance(e.origin, l);
+ d < r && (i = l, r = d);
+ }
+ if (defined(i))
+ return n;
+};
+Multiple3DTileContent.prototype.isDestroyed = function() {
+ return !1;
+};
+Multiple3DTileContent.prototype.destroy = function() {
+ const e = this._contents, t = e.length;
+ for (let n = 0; n < t; ++n)
+ e[n].destroy();
+ return destroyObject(this);
+};
+const cos$2 = Math.cos, sin$2 = Math.sin, sqrt = Math.sqrt, RectangleGeometryLibrary = {};
+RectangleGeometryLibrary.computePosition = function(e, t, n, i, r, o, s) {
+ const c = t.radiiSquared, l = e.nwCorner, d = e.boundingRectangle;
+ let f = l.latitude - e.granYCos * i + r * e.granXSin;
+ const h = cos$2(f), p = sin$2(f), m = c.z * p;
+ let _ = l.longitude + i * e.granYSin + r * e.granXCos;
+ const y = h * cos$2(_), C = h * sin$2(_), T = c.x * y, x = c.y * C, b = sqrt(T * y + x * C + m * p);
+ if (o.x = T / b, o.y = x / b, o.z = m / b, n) {
+ const S = e.stNwCorner;
+ defined(S) ? (f = S.latitude - e.stGranYCos * i + r * e.stGranXSin, _ = S.longitude + i * e.stGranYSin + r * e.stGranXCos, s.x = (_ - e.stWest) * e.lonScalar, s.y = (f - e.stSouth) * e.latScalar) : (s.x = (_ - d.west) * e.lonScalar, s.y = (f - d.south) * e.latScalar);
+ }
+};
+const rotationMatrixScratch = new Matrix2();
+let nwCartesian = new Cartesian3();
+const centerScratch$5 = new Cartographic();
+let centerCartesian = new Cartesian3();
+const proj = new GeographicProjection();
+function getRotationOptions(e, t, n, i, r, o, s) {
+ const c = Math.cos(t), l = i * c, d = n * c, f = Math.sin(t), h = i * f, p = n * f;
+ proj._ellipsoid = Ellipsoid.default, nwCartesian = proj.project(e, nwCartesian), nwCartesian = Cartesian3.subtract(nwCartesian, centerCartesian, nwCartesian);
+ const m = Matrix2.fromRotation(t, rotationMatrixScratch);
+ nwCartesian = Matrix2.multiplyByVector(
+ m,
+ nwCartesian,
+ nwCartesian
+ ), nwCartesian = Cartesian3.add(nwCartesian, centerCartesian, nwCartesian), e = proj.unproject(nwCartesian, e), o -= 1, s -= 1;
+ const _ = e.latitude, y = _ + o * p, C = _ - l * s, T = _ - l * s + o * p, x = Math.max(_, y, C, T), b = Math.min(_, y, C, T), S = e.longitude, E = S + o * d, A = S + s * h, D = S + s * h + o * d, P = Math.max(S, E, A, D), I = Math.min(S, E, A, D);
+ return {
+ north: x,
+ south: b,
+ east: P,
+ west: I,
+ granYCos: l,
+ granYSin: h,
+ granXCos: d,
+ granXSin: p,
+ nwCorner: e
+ };
+}
+RectangleGeometryLibrary.computeOptions = function(e, t, n, i, r, o, s) {
+ let c = e.east, l = e.west, d = e.north, f = e.south, h = !1, p = !1;
+ d === CesiumMath.PI_OVER_TWO && (h = !0), f === -CesiumMath.PI_OVER_TWO && (p = !0);
+ let m;
+ const _ = d - f;
+ l > c ? m = CesiumMath.TWO_PI - l + c : m = c - l;
+ const y = Math.ceil(m / t) + 1, C = Math.ceil(_ / t) + 1, T = m / (y - 1), x = _ / (C - 1), b = Rectangle.northwest(e, o), S = Rectangle.center(e, centerScratch$5);
+ (n !== 0 || i !== 0) && (S.longitude < b.longitude && (S.longitude += CesiumMath.TWO_PI), proj._ellipsoid = Ellipsoid.default, centerCartesian = proj.project(S, centerCartesian));
+ const E = x, A = T, D = 0, P = 0, I = Rectangle.clone(
+ e,
+ r
+ ), M = {
+ granYCos: E,
+ granYSin: D,
+ granXCos: A,
+ granXSin: P,
+ nwCorner: b,
+ boundingRectangle: I,
+ width: y,
+ height: C,
+ northCap: h,
+ southCap: p
+ };
+ if (n !== 0) {
+ const R = getRotationOptions(
+ b,
+ n,
+ T,
+ x,
+ S,
+ y,
+ C
+ );
+ d = R.north, f = R.south, c = R.east, l = R.west, M.granYCos = R.granYCos, M.granYSin = R.granYSin, M.granXCos = R.granXCos, M.granXSin = R.granXSin, I.north = d, I.south = f, I.east = c, I.west = l;
+ }
+ if (i !== 0) {
+ n = n - i;
+ const R = Rectangle.northwest(I, s), L = getRotationOptions(
+ R,
+ n,
+ T,
+ x,
+ S,
+ y,
+ C
+ );
+ M.stGranYCos = L.granYCos, M.stGranXCos = L.granXCos, M.stGranYSin = L.granYSin, M.stGranXSin = L.granXSin, M.stNwCorner = R, M.stWest = L.west, M.stSouth = L.south;
+ }
+ return M;
+};
+const bottomBoundingSphere$3 = new BoundingSphere(), topBoundingSphere$3 = new BoundingSphere(), positionScratch$8 = new Cartesian3(), rectangleScratch$6 = new Rectangle();
+function constructRectangle$1(e, t) {
+ const n = e._ellipsoid, i = t.height, r = t.width, o = t.northCap, s = t.southCap;
+ let c = i, l = 2, d = 0, f = 4;
+ o && (l -= 1, c -= 1, d += 1, f -= 2), s && (l -= 1, c -= 1, d += 1, f -= 2), d += l * r + 2 * c - f;
+ const h = new Float64Array(d * 3);
+ let p = 0, m = 0, _;
+ const y = positionScratch$8;
+ if (o)
+ RectangleGeometryLibrary.computePosition(
+ t,
+ n,
+ !1,
+ m,
+ 0,
+ y
+ ), h[p++] = y.x, h[p++] = y.y, h[p++] = y.z;
+ else
+ for (_ = 0; _ < r; _++)
+ RectangleGeometryLibrary.computePosition(
+ t,
+ n,
+ !1,
+ m,
+ _,
+ y
+ ), h[p++] = y.x, h[p++] = y.y, h[p++] = y.z;
+ for (_ = r - 1, m = 1; m < i; m++)
+ RectangleGeometryLibrary.computePosition(
+ t,
+ n,
+ !1,
+ m,
+ _,
+ y
+ ), h[p++] = y.x, h[p++] = y.y, h[p++] = y.z;
+ if (m = i - 1, !s)
+ for (_ = r - 2; _ >= 0; _--)
+ RectangleGeometryLibrary.computePosition(
+ t,
+ n,
+ !1,
+ m,
+ _,
+ y
+ ), h[p++] = y.x, h[p++] = y.y, h[p++] = y.z;
+ for (_ = 0, m = i - 2; m > 0; m--)
+ RectangleGeometryLibrary.computePosition(
+ t,
+ n,
+ !1,
+ m,
+ _,
+ y
+ ), h[p++] = y.x, h[p++] = y.y, h[p++] = y.z;
+ const C = h.length / 3 * 2, T = IndexDatatype$1.createTypedArray(
+ h.length / 3,
+ C
+ );
+ let x = 0;
+ for (let S = 0; S < h.length / 3 - 1; S++)
+ T[x++] = S, T[x++] = S + 1;
+ T[x++] = h.length / 3 - 1, T[x++] = 0;
+ const b = new Geometry({
+ attributes: new GeometryAttributes(),
+ primitiveType: PrimitiveType$1.LINES
+ });
+ return b.attributes.position = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.DOUBLE,
+ componentsPerAttribute: 3,
+ values: h
+ }), b.indices = T, b;
+}
+function constructExtrudedRectangle$1(e, t) {
+ const n = e._surfaceHeight, i = e._extrudedHeight, r = e._ellipsoid, o = constructRectangle$1(e, t), s = t.height, c = t.width, l = PolygonPipeline.scaleToGeodeticHeight(
+ o.attributes.position.values,
+ n,
+ r,
+ !1
+ );
+ let d = l.length;
+ const f = new Float64Array(d * 2);
+ f.set(l);
+ const h = PolygonPipeline.scaleToGeodeticHeight(
+ o.attributes.position.values,
+ i,
+ r
+ );
+ f.set(h, d), o.attributes.position.values = f;
+ const p = t.northCap, m = t.southCap;
+ let _ = 4;
+ p && (_ -= 1), m && (_ -= 1);
+ const y = (f.length / 3 + _) * 2, C = IndexDatatype$1.createTypedArray(
+ f.length / 3,
+ y
+ );
+ d = f.length / 6;
+ let T = 0;
+ for (let b = 0; b < d - 1; b++)
+ C[T++] = b, C[T++] = b + 1, C[T++] = b + d, C[T++] = b + d + 1;
+ C[T++] = d - 1, C[T++] = 0, C[T++] = d + d - 1, C[T++] = d, C[T++] = 0, C[T++] = d;
+ let x;
+ if (p)
+ x = s - 1;
+ else {
+ const b = c - 1;
+ C[T++] = b, C[T++] = b + d, x = c + s - 2;
+ }
+ if (C[T++] = x, C[T++] = x + d, !m) {
+ const b = c + x - 1;
+ C[T++] = b, C[T] = b + d;
+ }
+ return o.indices = C, o;
+}
+function RectangleOutlineGeometry(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.rectangle, n = defaultValue(
+ e.granularity,
+ CesiumMath.RADIANS_PER_DEGREE
+ ), i = defaultValue(e.ellipsoid, Ellipsoid.default), r = defaultValue(e.rotation, 0), o = defaultValue(e.height, 0), s = defaultValue(e.extrudedHeight, o);
+ this._rectangle = Rectangle.clone(t), this._granularity = n, this._ellipsoid = i, this._surfaceHeight = Math.max(o, s), this._rotation = r, this._extrudedHeight = Math.min(o, s), this._offsetAttribute = e.offsetAttribute, this._workerName = "createRectangleOutlineGeometry";
+}
+RectangleOutlineGeometry.packedLength = Rectangle.packedLength + Ellipsoid.packedLength + 5;
+RectangleOutlineGeometry.pack = function(e, t, n) {
+ return n = defaultValue(n, 0), Rectangle.pack(e._rectangle, t, n), n += Rectangle.packedLength, Ellipsoid.pack(e._ellipsoid, t, n), n += Ellipsoid.packedLength, t[n++] = e._granularity, t[n++] = e._surfaceHeight, t[n++] = e._rotation, t[n++] = e._extrudedHeight, t[n] = defaultValue(e._offsetAttribute, -1), t;
+};
+const scratchRectangle$8 = new Rectangle(), scratchEllipsoid$d = Ellipsoid.clone(Ellipsoid.UNIT_SPHERE), scratchOptions$l = {
+ rectangle: scratchRectangle$8,
+ ellipsoid: scratchEllipsoid$d,
+ granularity: void 0,
+ height: void 0,
+ rotation: void 0,
+ extrudedHeight: void 0,
+ offsetAttribute: void 0
+};
+RectangleOutlineGeometry.unpack = function(e, t, n) {
+ t = defaultValue(t, 0);
+ const i = Rectangle.unpack(e, t, scratchRectangle$8);
+ t += Rectangle.packedLength;
+ const r = Ellipsoid.unpack(e, t, scratchEllipsoid$d);
+ t += Ellipsoid.packedLength;
+ const o = e[t++], s = e[t++], c = e[t++], l = e[t++], d = e[t];
+ return defined(n) ? (n._rectangle = Rectangle.clone(i, n._rectangle), n._ellipsoid = Ellipsoid.clone(r, n._ellipsoid), n._surfaceHeight = s, n._rotation = c, n._extrudedHeight = l, n._offsetAttribute = d === -1 ? void 0 : d, n) : (scratchOptions$l.granularity = o, scratchOptions$l.height = s, scratchOptions$l.rotation = c, scratchOptions$l.extrudedHeight = l, scratchOptions$l.offsetAttribute = d === -1 ? void 0 : d, new RectangleOutlineGeometry(scratchOptions$l));
+};
+const nwScratch$1 = new Cartographic();
+RectangleOutlineGeometry.createGeometry = function(e) {
+ const t = e._rectangle, n = e._ellipsoid, i = RectangleGeometryLibrary.computeOptions(
+ t,
+ e._granularity,
+ e._rotation,
+ 0,
+ rectangleScratch$6,
+ nwScratch$1
+ );
+ let r, o;
+ if (CesiumMath.equalsEpsilon(
+ t.north,
+ t.south,
+ CesiumMath.EPSILON10
+ ) || CesiumMath.equalsEpsilon(
+ t.east,
+ t.west,
+ CesiumMath.EPSILON10
+ ))
+ return;
+ const s = e._surfaceHeight, c = e._extrudedHeight, l = !CesiumMath.equalsEpsilon(
+ s,
+ c,
+ 0,
+ CesiumMath.EPSILON2
+ );
+ let d;
+ if (l) {
+ if (r = constructExtrudedRectangle$1(e, i), defined(e._offsetAttribute)) {
+ const p = r.attributes.position.values.length / 3;
+ let m = new Uint8Array(p);
+ e._offsetAttribute === GeometryOffsetAttribute$1.TOP ? m = m.fill(1, 0, p / 2) : (d = e._offsetAttribute === GeometryOffsetAttribute$1.NONE ? 0 : 1, m = m.fill(d)), r.attributes.applyOffset = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: m
+ });
+ }
+ const f = BoundingSphere.fromRectangle3D(
+ t,
+ n,
+ s,
+ topBoundingSphere$3
+ ), h = BoundingSphere.fromRectangle3D(
+ t,
+ n,
+ c,
+ bottomBoundingSphere$3
+ );
+ o = BoundingSphere.union(f, h);
+ } else {
+ if (r = constructRectangle$1(e, i), r.attributes.position.values = PolygonPipeline.scaleToGeodeticHeight(
+ r.attributes.position.values,
+ s,
+ n,
+ !1
+ ), defined(e._offsetAttribute)) {
+ const f = r.attributes.position.values.length;
+ d = e._offsetAttribute === GeometryOffsetAttribute$1.NONE ? 0 : 1;
+ const h = new Uint8Array(f / 3).fill(d);
+ r.attributes.applyOffset = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: h
+ });
+ }
+ o = BoundingSphere.fromRectangle3D(
+ t,
+ n,
+ s
+ );
+ }
+ return new Geometry({
+ attributes: r.attributes,
+ indices: r.indices,
+ primitiveType: PrimitiveType$1.LINES,
+ boundingSphere: o,
+ offsetAttribute: e._offsetAttribute
+ });
+};
+function TileBoundingRegion(e) {
+ this.rectangle = Rectangle.clone(e.rectangle), this.minimumHeight = defaultValue(e.minimumHeight, 0), this.maximumHeight = defaultValue(e.maximumHeight, 0), this.southwestCornerCartesian = new Cartesian3(), this.northeastCornerCartesian = new Cartesian3(), this.westNormal = new Cartesian3(), this.southNormal = new Cartesian3(), this.eastNormal = new Cartesian3(), this.northNormal = new Cartesian3();
+ const t = defaultValue(e.ellipsoid, Ellipsoid.WGS84);
+ computeBox(this, e.rectangle, t), this._orientedBoundingBox = void 0, this._boundingSphere = void 0, defaultValue(e.computeBoundingVolumes, !0) && this.computeBoundingVolumes(t);
+}
+Object.defineProperties(TileBoundingRegion.prototype, {
+ /**
+ * The underlying bounding volume
+ *
+ * @memberof TileBoundingRegion.prototype
+ *
+ * @type {object}
+ * @readonly
+ */
+ boundingVolume: {
+ get: function() {
+ return this._orientedBoundingBox;
+ }
+ },
+ /**
+ * The underlying bounding sphere
+ *
+ * @memberof TileBoundingRegion.prototype
+ *
+ * @type {BoundingSphere}
+ * @readonly
+ */
+ boundingSphere: {
+ get: function() {
+ return this._boundingSphere;
+ }
+ }
+});
+TileBoundingRegion.prototype.computeBoundingVolumes = function(e) {
+ this._orientedBoundingBox = OrientedBoundingBox.fromRectangle(
+ this.rectangle,
+ this.minimumHeight,
+ this.maximumHeight,
+ e
+ ), this._boundingSphere = BoundingSphere.fromOrientedBoundingBox(
+ this._orientedBoundingBox
+ );
+};
+const cartesian3Scratch$2 = new Cartesian3(), cartesian3Scratch2 = new Cartesian3(), cartesian3Scratch3 = new Cartesian3(), westNormalScratch = new Cartesian3(), eastWestNormalScratch = new Cartesian3(), westernMidpointScratch = new Cartesian3(), easternMidpointScratch = new Cartesian3(), cartographicScratch$3 = new Cartographic(), planeScratch = new Plane(Cartesian3.UNIT_X, 0), rayScratch = new Ray();
+function computeBox(e, t, n) {
+ n.cartographicToCartesian(
+ Rectangle.southwest(t),
+ e.southwestCornerCartesian
+ ), n.cartographicToCartesian(
+ Rectangle.northeast(t),
+ e.northeastCornerCartesian
+ ), cartographicScratch$3.longitude = t.west, cartographicScratch$3.latitude = (t.south + t.north) * 0.5, cartographicScratch$3.height = 0;
+ const i = n.cartographicToCartesian(
+ cartographicScratch$3,
+ westernMidpointScratch
+ ), r = Cartesian3.cross(
+ i,
+ Cartesian3.UNIT_Z,
+ westNormalScratch
+ );
+ Cartesian3.normalize(r, e.westNormal), cartographicScratch$3.longitude = t.east;
+ const o = n.cartographicToCartesian(
+ cartographicScratch$3,
+ easternMidpointScratch
+ ), s = Cartesian3.cross(
+ Cartesian3.UNIT_Z,
+ o,
+ cartesian3Scratch$2
+ );
+ Cartesian3.normalize(s, e.eastNormal);
+ let c = Cartesian3.subtract(
+ i,
+ o,
+ cartesian3Scratch$2
+ );
+ Cartesian3.magnitude(c) === 0 && (c = Cartesian3.clone(r, c));
+ const l = Cartesian3.normalize(
+ c,
+ eastWestNormalScratch
+ ), d = t.south;
+ let f;
+ if (d > 0) {
+ cartographicScratch$3.longitude = (t.west + t.east) * 0.5, cartographicScratch$3.latitude = d;
+ const y = n.cartographicToCartesian(
+ cartographicScratch$3,
+ rayScratch.origin
+ );
+ Cartesian3.clone(l, rayScratch.direction);
+ const C = Plane.fromPointNormal(
+ e.southwestCornerCartesian,
+ e.westNormal,
+ planeScratch
+ );
+ IntersectionTests.rayPlane(
+ rayScratch,
+ C,
+ e.southwestCornerCartesian
+ ), f = n.geodeticSurfaceNormal(
+ y,
+ cartesian3Scratch2
+ );
+ } else
+ f = n.geodeticSurfaceNormalCartographic(
+ Rectangle.southeast(t),
+ cartesian3Scratch2
+ );
+ const h = Cartesian3.cross(
+ f,
+ c,
+ cartesian3Scratch3
+ );
+ Cartesian3.normalize(h, e.southNormal);
+ const p = t.north;
+ let m;
+ if (p < 0) {
+ cartographicScratch$3.longitude = (t.west + t.east) * 0.5, cartographicScratch$3.latitude = p;
+ const y = n.cartographicToCartesian(
+ cartographicScratch$3,
+ rayScratch.origin
+ );
+ Cartesian3.negate(l, rayScratch.direction);
+ const C = Plane.fromPointNormal(
+ e.northeastCornerCartesian,
+ e.eastNormal,
+ planeScratch
+ );
+ IntersectionTests.rayPlane(
+ rayScratch,
+ C,
+ e.northeastCornerCartesian
+ ), m = n.geodeticSurfaceNormal(
+ y,
+ cartesian3Scratch2
+ );
+ } else
+ m = n.geodeticSurfaceNormalCartographic(
+ Rectangle.northwest(t),
+ cartesian3Scratch2
+ );
+ const _ = Cartesian3.cross(
+ c,
+ m,
+ cartesian3Scratch3
+ );
+ Cartesian3.normalize(_, e.northNormal);
+}
+const southwestCornerScratch = new Cartesian3(), northeastCornerScratch = new Cartesian3(), negativeUnitY = new Cartesian3(0, -1, 0), negativeUnitZ = new Cartesian3(0, 0, -1), vectorScratch = new Cartesian3();
+function distanceToCameraRegion(e, t) {
+ const n = t.camera, i = n.positionWC, r = n.positionCartographic;
+ let o = 0;
+ if (!Rectangle.contains(e.rectangle, r)) {
+ let d = e.southwestCornerCartesian, f = e.northeastCornerCartesian, h = e.westNormal, p = e.southNormal, m = e.eastNormal, _ = e.northNormal;
+ t.mode !== SceneMode$1.SCENE3D && (d = t.mapProjection.project(
+ Rectangle.southwest(e.rectangle),
+ southwestCornerScratch
+ ), d.z = d.y, d.y = d.x, d.x = 0, f = t.mapProjection.project(
+ Rectangle.northeast(e.rectangle),
+ northeastCornerScratch
+ ), f.z = f.y, f.y = f.x, f.x = 0, h = negativeUnitY, m = Cartesian3.UNIT_Y, p = negativeUnitZ, _ = Cartesian3.UNIT_Z);
+ const y = Cartesian3.subtract(
+ i,
+ d,
+ vectorScratch
+ ), C = Cartesian3.dot(
+ y,
+ h
+ ), T = Cartesian3.dot(
+ y,
+ p
+ ), x = Cartesian3.subtract(
+ i,
+ f,
+ vectorScratch
+ ), b = Cartesian3.dot(
+ x,
+ m
+ ), S = Cartesian3.dot(
+ x,
+ _
+ );
+ C > 0 ? o += C * C : b > 0 && (o += b * b), T > 0 ? o += T * T : S > 0 && (o += S * S);
+ }
+ let s, c, l;
+ if (t.mode === SceneMode$1.SCENE3D ? (s = r.height, c = e.minimumHeight, l = e.maximumHeight) : (s = i.x, c = 0, l = 0), s > l) {
+ const d = s - l;
+ o += d * d;
+ } else if (s < c) {
+ const d = c - s;
+ o += d * d;
+ }
+ return Math.sqrt(o);
+}
+TileBoundingRegion.prototype.distanceToCamera = function(e) {
+ const t = distanceToCameraRegion(this, e);
+ if (e.mode === SceneMode$1.SCENE3D && defined(this._orientedBoundingBox)) {
+ const n = Math.sqrt(
+ this._orientedBoundingBox.distanceSquaredTo(e.camera.positionWC)
+ );
+ return Math.max(t, n);
+ }
+ return t;
+};
+TileBoundingRegion.prototype.intersectPlane = function(e) {
+ return this._orientedBoundingBox.intersectPlane(e);
+};
+TileBoundingRegion.prototype.createDebugVolume = function(e) {
+ const t = new Matrix4.clone(Matrix4.IDENTITY), n = new RectangleOutlineGeometry({
+ rectangle: this.rectangle,
+ height: this.minimumHeight,
+ extrudedHeight: this.maximumHeight
+ }), i = new GeometryInstance({
+ geometry: n,
+ id: "outline",
+ modelMatrix: t,
+ attributes: {
+ color: ColorGeometryInstanceAttribute.fromColor(e)
+ }
+ });
+ return new Primitive$3({
+ geometryInstances: i,
+ appearance: new PerInstanceColorAppearance({
+ translucent: !1,
+ flat: !0
+ }),
+ asynchronous: !1
+ });
+};
+const CoplanarPolygonGeometryLibrary = {}, scratchIntersectionPoint = new Cartesian3(), scratchXAxis = new Cartesian3(), scratchYAxis = new Cartesian3(), scratchZAxis = new Cartesian3(), obbScratch = new OrientedBoundingBox();
+CoplanarPolygonGeometryLibrary.validOutline = function(e) {
+ const n = OrientedBoundingBox.fromPoints(
+ e,
+ obbScratch
+ ).halfAxes, i = Matrix3.getColumn(n, 0, scratchXAxis), r = Matrix3.getColumn(n, 1, scratchYAxis), o = Matrix3.getColumn(n, 2, scratchZAxis), s = Cartesian3.magnitude(i), c = Cartesian3.magnitude(r), l = Cartesian3.magnitude(o);
+ return !(s === 0 && (c === 0 || l === 0) || c === 0 && l === 0);
+};
+CoplanarPolygonGeometryLibrary.computeProjectTo2DArguments = function(e, t, n, i) {
+ const r = OrientedBoundingBox.fromPoints(
+ e,
+ obbScratch
+ ), o = r.halfAxes, s = Matrix3.getColumn(o, 0, scratchXAxis), c = Matrix3.getColumn(o, 1, scratchYAxis), l = Matrix3.getColumn(o, 2, scratchZAxis), d = Cartesian3.magnitude(s), f = Cartesian3.magnitude(c), h = Cartesian3.magnitude(l), p = Math.min(d, f, h);
+ if (d === 0 && (f === 0 || h === 0) || f === 0 && h === 0)
+ return !1;
+ let m, _;
+ return (p === f || p === h) && (m = s), p === d ? m = c : p === h && (_ = c), (p === d || p === f) && (_ = l), Cartesian3.normalize(m, n), Cartesian3.normalize(_, i), Cartesian3.clone(r.center, t), !0;
+};
+function projectTo2D(e, t, n, i, r) {
+ const o = Cartesian3.subtract(e, t, scratchIntersectionPoint), s = Cartesian3.dot(n, o), c = Cartesian3.dot(i, o);
+ return Cartesian2.fromElements(s, c, r);
+}
+CoplanarPolygonGeometryLibrary.createProjectPointsTo2DFunction = function(e, t, n) {
+ return function(i) {
+ const r = new Array(i.length);
+ for (let o = 0; o < i.length; o++)
+ r[o] = projectTo2D(i[o], e, t, n);
+ return r;
+ };
+};
+CoplanarPolygonGeometryLibrary.createProjectPointTo2DFunction = function(e, t, n) {
+ return function(i, r) {
+ return projectTo2D(i, e, t, n, r);
+ };
+};
+function createGeometryFromPositions$1(e) {
+ const t = e.length, n = new Float64Array(t * 3), i = IndexDatatype$1.createTypedArray(t, t * 2);
+ let r = 0, o = 0;
+ for (let c = 0; c < t; c++) {
+ const l = e[c];
+ n[r++] = l.x, n[r++] = l.y, n[r++] = l.z, i[o++] = c, i[o++] = (c + 1) % t;
+ }
+ const s = new GeometryAttributes({
+ position: new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.DOUBLE,
+ componentsPerAttribute: 3,
+ values: n
+ })
+ });
+ return new Geometry({
+ attributes: s,
+ indices: i,
+ primitiveType: PrimitiveType$1.LINES
+ });
+}
+function CoplanarPolygonOutlineGeometry(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.polygonHierarchy;
+ this._polygonHierarchy = t, this._workerName = "createCoplanarPolygonOutlineGeometry", this.packedLength = PolygonGeometryLibrary.computeHierarchyPackedLength(
+ t,
+ Cartesian3
+ ) + 1;
+}
+CoplanarPolygonOutlineGeometry.fromPositions = function(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = {
+ polygonHierarchy: {
+ positions: e.positions
+ }
+ };
+ return new CoplanarPolygonOutlineGeometry(t);
+};
+CoplanarPolygonOutlineGeometry.pack = function(e, t, n) {
+ return n = defaultValue(n, 0), n = PolygonGeometryLibrary.packPolygonHierarchy(
+ e._polygonHierarchy,
+ t,
+ n,
+ Cartesian3
+ ), t[n] = e.packedLength, t;
+};
+const scratchOptions$k = {
+ polygonHierarchy: {}
+};
+CoplanarPolygonOutlineGeometry.unpack = function(e, t, n) {
+ t = defaultValue(t, 0);
+ const i = PolygonGeometryLibrary.unpackPolygonHierarchy(
+ e,
+ t,
+ Cartesian3
+ );
+ t = i.startingIndex, delete i.startingIndex;
+ const r = e[t];
+ return defined(n) || (n = new CoplanarPolygonOutlineGeometry(scratchOptions$k)), n._polygonHierarchy = i, n.packedLength = r, n;
+};
+CoplanarPolygonOutlineGeometry.createGeometry = function(e) {
+ const t = e._polygonHierarchy;
+ let n = t.positions;
+ if (n = arrayRemoveDuplicates(
+ n,
+ Cartesian3.equalsEpsilon,
+ !0
+ ), n.length < 3 || !CoplanarPolygonGeometryLibrary.validOutline(n))
+ return;
+ const r = PolygonGeometryLibrary.polygonOutlinesFromHierarchy(
+ t,
+ !1
+ );
+ if (r.length === 0)
+ return;
+ const o = [];
+ for (let l = 0; l < r.length; l++) {
+ const d = new GeometryInstance({
+ geometry: createGeometryFromPositions$1(r[l])
+ });
+ o.push(d);
+ }
+ const s = GeometryPipeline.combineInstances(o)[0], c = BoundingSphere.fromPoints(t.positions);
+ return new Geometry({
+ attributes: s.attributes,
+ indices: s.indices,
+ primitiveType: s.primitiveType,
+ boundingSphere: c
+ });
+};
+let centerCartographicScratch$1 = new Cartographic();
+function TileBoundingS2Cell(e) {
+ const t = S2Cell.fromToken(e.token), n = defaultValue(e.minimumHeight, 0), i = defaultValue(e.maximumHeight, 0), r = defaultValue(e.ellipsoid, Ellipsoid.WGS84);
+ this.s2Cell = t, this.minimumHeight = n, this.maximumHeight = i, this.ellipsoid = r;
+ const o = computeBoundingPlanes(
+ t,
+ n,
+ i,
+ r
+ );
+ this._boundingPlanes = o;
+ const s = computeVertices(o);
+ this._vertices = s, this._edgeNormals = new Array(6), this._edgeNormals[0] = computeEdgeNormals(
+ o[0],
+ s.slice(0, 4)
+ );
+ let c;
+ for (c = 0; c < 4; c++)
+ this._edgeNormals[0][c] = Cartesian3.negate(
+ this._edgeNormals[0][c],
+ this._edgeNormals[0][c]
+ );
+ for (this._edgeNormals[1] = computeEdgeNormals(
+ o[1],
+ s.slice(4, 8)
+ ), c = 0; c < 4; c++)
+ this._edgeNormals[2 + c] = computeEdgeNormals(o[2 + c], [
+ s[c % 4],
+ s[(c + 1) % 4],
+ s[4 + (c + 1) % 4],
+ s[4 + c]
+ ]);
+ for (this._planeVertices = [
+ this._vertices.slice(0, 4),
+ this._vertices.slice(4, 8)
+ ], c = 0; c < 4; c++)
+ this._planeVertices.push([
+ this._vertices[c % 4],
+ this._vertices[(c + 1) % 4],
+ this._vertices[4 + (c + 1) % 4],
+ this._vertices[4 + c]
+ ]);
+ const l = t.getCenter();
+ centerCartographicScratch$1 = r.cartesianToCartographic(
+ l,
+ centerCartographicScratch$1
+ ), centerCartographicScratch$1.height = (i + n) / 2, this.center = r.cartographicToCartesian(
+ centerCartographicScratch$1,
+ l
+ ), this._boundingSphere = BoundingSphere.fromPoints(s);
+}
+const centerGeodeticNormalScratch = new Cartesian3(), topCartographicScratch = new Cartographic(), topScratch = new Cartesian3(), vertexCartographicScratch = new Cartographic(), vertexScratch = new Cartesian3(), vertexGeodeticNormalScratch = new Cartesian3(), sideNormalScratch = new Cartesian3(), sideScratch = new Cartesian3();
+function computeBoundingPlanes(e, t, n, i) {
+ const r = new Array(6), o = e.getCenter(), s = i.geodeticSurfaceNormal(
+ o,
+ centerGeodeticNormalScratch
+ ), c = i.cartesianToCartographic(
+ o,
+ topCartographicScratch
+ );
+ c.height = n;
+ const l = i.cartographicToCartesian(c, topScratch), d = Plane.fromPointNormal(l, s);
+ r[0] = d;
+ let f = 0, h;
+ const p = [];
+ let m, _;
+ for (h = 0; h < 4; h++) {
+ m = e.getVertex(h), p[h] = m, _ = i.cartesianToCartographic(
+ m,
+ vertexCartographicScratch
+ ), _.height = t;
+ const C = Plane.getPointDistance(
+ d,
+ i.cartographicToCartesian(_, vertexScratch)
+ );
+ C < f && (f = C);
+ }
+ const y = Plane.clone(d);
+ for (y.normal = Cartesian3.negate(
+ y.normal,
+ y.normal
+ ), y.distance = y.distance * -1 + f, r[1] = y, h = 0; h < 4; h++) {
+ m = p[h];
+ const C = p[(h + 1) % 4], T = i.geodeticSurfaceNormal(
+ m,
+ vertexGeodeticNormalScratch
+ ), x = Cartesian3.subtract(C, m, sideScratch);
+ let b = Cartesian3.cross(x, T, sideNormalScratch);
+ b = Cartesian3.normalize(b, b), r[2 + h] = Plane.fromPointNormal(m, b);
+ }
+ return r;
+}
+let n0Scratch = new Cartesian3(), n1Scratch = new Cartesian3(), n2Scratch = new Cartesian3(), x0Scratch = new Cartesian3(), x1Scratch = new Cartesian3(), x2Scratch = new Cartesian3();
+const t0Scratch = new Cartesian3(), t1Scratch = new Cartesian3(), t2Scratch = new Cartesian3();
+let f0Scratch = new Cartesian3(), f1Scratch = new Cartesian3(), f2Scratch = new Cartesian3(), sScratch = new Cartesian3();
+const matrixScratch = new Matrix3();
+function computeIntersection(e, t, n) {
+ n0Scratch = e.normal, n1Scratch = t.normal, n2Scratch = n.normal, x0Scratch = Cartesian3.multiplyByScalar(e.normal, -e.distance, x0Scratch), x1Scratch = Cartesian3.multiplyByScalar(t.normal, -t.distance, x1Scratch), x2Scratch = Cartesian3.multiplyByScalar(n.normal, -n.distance, x2Scratch), f0Scratch = Cartesian3.multiplyByScalar(
+ Cartesian3.cross(n1Scratch, n2Scratch, t0Scratch),
+ Cartesian3.dot(x0Scratch, n0Scratch),
+ f0Scratch
+ ), f1Scratch = Cartesian3.multiplyByScalar(
+ Cartesian3.cross(n2Scratch, n0Scratch, t1Scratch),
+ Cartesian3.dot(x1Scratch, n1Scratch),
+ f1Scratch
+ ), f2Scratch = Cartesian3.multiplyByScalar(
+ Cartesian3.cross(n0Scratch, n1Scratch, t2Scratch),
+ Cartesian3.dot(x2Scratch, n2Scratch),
+ f2Scratch
+ ), matrixScratch[0] = n0Scratch.x, matrixScratch[1] = n1Scratch.x, matrixScratch[2] = n2Scratch.x, matrixScratch[3] = n0Scratch.y, matrixScratch[4] = n1Scratch.y, matrixScratch[5] = n2Scratch.y, matrixScratch[6] = n0Scratch.z, matrixScratch[7] = n1Scratch.z, matrixScratch[8] = n2Scratch.z;
+ const i = Matrix3.determinant(matrixScratch);
+ return sScratch = Cartesian3.add(f0Scratch, f1Scratch, sScratch), sScratch = Cartesian3.add(sScratch, f2Scratch, sScratch), new Cartesian3(
+ sScratch.x / i,
+ sScratch.y / i,
+ sScratch.z / i
+ );
+}
+function computeVertices(e) {
+ const t = new Array(8);
+ for (let n = 0; n < 4; n++)
+ t[n] = computeIntersection(
+ e[0],
+ e[2 + (n + 3) % 4],
+ e[2 + n % 4]
+ ), t[n + 4] = computeIntersection(
+ e[1],
+ e[2 + (n + 3) % 4],
+ e[2 + n % 4]
+ );
+ return t;
+}
+let edgeScratch = new Cartesian3(), edgeNormalScratch = new Cartesian3();
+function computeEdgeNormals(e, t) {
+ const n = [];
+ for (let i = 0; i < 4; i++)
+ edgeScratch = Cartesian3.subtract(
+ t[(i + 1) % 4],
+ t[i],
+ edgeScratch
+ ), edgeNormalScratch = Cartesian3.cross(
+ e.normal,
+ edgeScratch,
+ edgeNormalScratch
+ ), edgeNormalScratch = Cartesian3.normalize(
+ edgeNormalScratch,
+ edgeNormalScratch
+ ), n[i] = Cartesian3.clone(edgeNormalScratch);
+ return n;
+}
+Object.defineProperties(TileBoundingS2Cell.prototype, {
+ /**
+ * The underlying bounding volume.
+ *
+ * @memberof TileBoundingS2Cell.prototype
+ *
+ * @type {object}
+ * @readonly
+ */
+ boundingVolume: {
+ get: function() {
+ return this;
+ }
+ },
+ /**
+ * The underlying bounding sphere.
+ *
+ * @memberof TileBoundingS2Cell.prototype
+ *
+ * @type {BoundingSphere}
+ * @readonly
+ */
+ boundingSphere: {
+ get: function() {
+ return this._boundingSphere;
+ }
+ }
+});
+const facePointScratch = new Cartesian3();
+TileBoundingS2Cell.prototype.distanceToCamera = function(e) {
+ const t = e.camera.positionWC, n = [], i = [];
+ let r;
+ Plane.getPointDistance(this._boundingPlanes[0], t) > 0 ? (n.push(0), i.push(this._planeVertices[0]), r = this._edgeNormals[0]) : Plane.getPointDistance(this._boundingPlanes[1], t) > 0 && (n.push(1), i.push(this._planeVertices[1]), r = this._edgeNormals[1]);
+ let o, s;
+ for (o = 0; o < 4; o++)
+ s = 2 + o, Plane.getPointDistance(this._boundingPlanes[s], t) > 0 && (n.push(s), i.push(this._planeVertices[s]), r = this._edgeNormals[s]);
+ if (n.length === 0)
+ return 0;
+ let c, l;
+ if (n.length === 1)
+ return l = this._boundingPlanes[n[0]], c = closestPointPolygon(
+ Plane.projectPointOntoPlane(l, t, facePointScratch),
+ i[0],
+ l,
+ r
+ ), Cartesian3.distance(c, t);
+ if (n.length === 2) {
+ if (n[0] === 0) {
+ const p = [
+ this._vertices[4 * n[0] + (n[1] - 2)],
+ this._vertices[4 * n[0] + (n[1] - 2 + 1) % 4]
+ ];
+ return c = closestPointLineSegment(t, p[0], p[1]), Cartesian3.distance(c, t);
+ }
+ let f = Number.MAX_VALUE, h;
+ for (o = 0; o < 2; o++)
+ l = this._boundingPlanes[n[o]], c = closestPointPolygon(
+ Plane.projectPointOntoPlane(l, t, facePointScratch),
+ i[o],
+ l,
+ this._edgeNormals[n[o]]
+ ), h = Cartesian3.distanceSquared(c, t), h < f && (f = h);
+ return Math.sqrt(f);
+ } else if (n.length > 3)
+ return c = closestPointPolygon(
+ Plane.projectPointOntoPlane(
+ this._boundingPlanes[1],
+ t,
+ facePointScratch
+ ),
+ this._planeVertices[1],
+ this._boundingPlanes[1],
+ this._edgeNormals[1]
+ ), Cartesian3.distance(c, t);
+ const d = n[1] === 2 && n[2] === 5 ? 0 : 1;
+ return n[0] === 0 ? Cartesian3.distance(
+ t,
+ this._vertices[(n[1] - 2 + d) % 4]
+ ) : Cartesian3.distance(
+ t,
+ this._vertices[4 + (n[1] - 2 + d) % 4]
+ );
+};
+const dScratch = new Cartesian3(), pL0Scratch = new Cartesian3();
+function closestPointLineSegment(e, t, n) {
+ const i = Cartesian3.subtract(n, t, dScratch), r = Cartesian3.subtract(e, t, pL0Scratch);
+ let o = Cartesian3.dot(i, r);
+ if (o <= 0)
+ return t;
+ const s = Cartesian3.dot(i, i);
+ return o >= s ? n : (o = o / s, new Cartesian3(
+ (1 - o) * t.x + o * n.x,
+ (1 - o) * t.y + o * n.y,
+ (1 - o) * t.z + o * n.z
+ ));
+}
+const edgePlaneScratch = new Plane(Cartesian3.UNIT_X, 0);
+function closestPointPolygon(e, t, n, i) {
+ let r = Number.MAX_VALUE, o, s, c;
+ for (let l = 0; l < t.length; l++) {
+ const d = Plane.fromPointNormal(
+ t[l],
+ i[l],
+ edgePlaneScratch
+ );
+ Plane.getPointDistance(d, e) < 0 || (c = closestPointLineSegment(
+ e,
+ t[l],
+ t[(l + 1) % 4]
+ ), o = Cartesian3.distance(e, c), o < r && (r = o, s = c));
+ }
+ return defined(s) ? s : e;
+}
+TileBoundingS2Cell.prototype.intersectPlane = function(e) {
+ let t = 0, n = 0;
+ for (let i = 0; i < this._vertices.length; i++)
+ Cartesian3.dot(e.normal, this._vertices[i]) + e.distance < 0 ? n++ : t++;
+ return t === this._vertices.length ? Intersect$1.INSIDE : n === this._vertices.length ? Intersect$1.OUTSIDE : Intersect$1.INTERSECTING;
+};
+TileBoundingS2Cell.prototype.createDebugVolume = function(e) {
+ const t = new Matrix4.clone(Matrix4.IDENTITY), n = new CoplanarPolygonOutlineGeometry({
+ polygonHierarchy: {
+ positions: this._planeVertices[0]
+ }
+ }), i = CoplanarPolygonOutlineGeometry.createGeometry(
+ n
+ ), r = new GeometryInstance({
+ geometry: i,
+ id: "outline",
+ modelMatrix: t,
+ attributes: {
+ color: ColorGeometryInstanceAttribute.fromColor(e)
+ }
+ }), o = new CoplanarPolygonOutlineGeometry({
+ polygonHierarchy: {
+ positions: this._planeVertices[1]
+ }
+ }), s = CoplanarPolygonOutlineGeometry.createGeometry(
+ o
+ ), c = new GeometryInstance({
+ geometry: s,
+ id: "outline",
+ modelMatrix: t,
+ attributes: {
+ color: ColorGeometryInstanceAttribute.fromColor(e)
+ }
+ }), l = [];
+ for (let d = 0; d < 4; d++) {
+ const f = new CoplanarPolygonOutlineGeometry({
+ polygonHierarchy: {
+ positions: this._planeVertices[2 + d]
+ }
+ }), h = CoplanarPolygonOutlineGeometry.createGeometry(
+ f
+ );
+ l[d] = new GeometryInstance({
+ geometry: h,
+ id: "outline",
+ modelMatrix: t,
+ attributes: {
+ color: ColorGeometryInstanceAttribute.fromColor(e)
+ }
+ });
+ }
+ return new Primitive$3({
+ geometryInstances: [
+ l[0],
+ l[1],
+ l[2],
+ l[3],
+ c,
+ r
+ ],
+ appearance: new PerInstanceColorAppearance({
+ translucent: !1,
+ flat: !0
+ }),
+ asynchronous: !1
+ });
+};
+const defaultRadii$1 = new Cartesian3(1, 1, 1), cos$1 = Math.cos, sin$1 = Math.sin;
+function EllipsoidOutlineGeometry(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = defaultValue(e.radii, defaultRadii$1), n = defaultValue(e.innerRadii, t), i = defaultValue(e.minimumClock, 0), r = defaultValue(e.maximumClock, CesiumMath.TWO_PI), o = defaultValue(e.minimumCone, 0), s = defaultValue(e.maximumCone, CesiumMath.PI), c = Math.round(defaultValue(e.stackPartitions, 10)), l = Math.round(defaultValue(e.slicePartitions, 8)), d = Math.round(defaultValue(e.subdivisions, 128));
+ this._radii = Cartesian3.clone(t), this._innerRadii = Cartesian3.clone(n), this._minimumClock = i, this._maximumClock = r, this._minimumCone = o, this._maximumCone = s, this._stackPartitions = c, this._slicePartitions = l, this._subdivisions = d, this._offsetAttribute = e.offsetAttribute, this._workerName = "createEllipsoidOutlineGeometry";
+}
+EllipsoidOutlineGeometry.packedLength = 2 * Cartesian3.packedLength + 8;
+EllipsoidOutlineGeometry.pack = function(e, t, n) {
+ return n = defaultValue(n, 0), Cartesian3.pack(e._radii, t, n), n += Cartesian3.packedLength, Cartesian3.pack(e._innerRadii, t, n), n += Cartesian3.packedLength, t[n++] = e._minimumClock, t[n++] = e._maximumClock, t[n++] = e._minimumCone, t[n++] = e._maximumCone, t[n++] = e._stackPartitions, t[n++] = e._slicePartitions, t[n++] = e._subdivisions, t[n] = defaultValue(e._offsetAttribute, -1), t;
+};
+const scratchRadii$2 = new Cartesian3(), scratchInnerRadii$1 = new Cartesian3(), scratchOptions$j = {
+ radii: scratchRadii$2,
+ innerRadii: scratchInnerRadii$1,
+ minimumClock: void 0,
+ maximumClock: void 0,
+ minimumCone: void 0,
+ maximumCone: void 0,
+ stackPartitions: void 0,
+ slicePartitions: void 0,
+ subdivisions: void 0,
+ offsetAttribute: void 0
+};
+EllipsoidOutlineGeometry.unpack = function(e, t, n) {
+ t = defaultValue(t, 0);
+ const i = Cartesian3.unpack(e, t, scratchRadii$2);
+ t += Cartesian3.packedLength;
+ const r = Cartesian3.unpack(e, t, scratchInnerRadii$1);
+ t += Cartesian3.packedLength;
+ const o = e[t++], s = e[t++], c = e[t++], l = e[t++], d = e[t++], f = e[t++], h = e[t++], p = e[t];
+ return defined(n) ? (n._radii = Cartesian3.clone(i, n._radii), n._innerRadii = Cartesian3.clone(r, n._innerRadii), n._minimumClock = o, n._maximumClock = s, n._minimumCone = c, n._maximumCone = l, n._stackPartitions = d, n._slicePartitions = f, n._subdivisions = h, n._offsetAttribute = p === -1 ? void 0 : p, n) : (scratchOptions$j.minimumClock = o, scratchOptions$j.maximumClock = s, scratchOptions$j.minimumCone = c, scratchOptions$j.maximumCone = l, scratchOptions$j.stackPartitions = d, scratchOptions$j.slicePartitions = f, scratchOptions$j.subdivisions = h, scratchOptions$j.offsetAttribute = p === -1 ? void 0 : p, new EllipsoidOutlineGeometry(scratchOptions$j));
+};
+EllipsoidOutlineGeometry.createGeometry = function(e) {
+ const t = e._radii;
+ if (t.x <= 0 || t.y <= 0 || t.z <= 0)
+ return;
+ const n = e._innerRadii;
+ if (n.x <= 0 || n.y <= 0 || n.z <= 0)
+ return;
+ const i = e._minimumClock, r = e._maximumClock, o = e._minimumCone, s = e._maximumCone, c = e._subdivisions, l = Ellipsoid.fromCartesian3(t);
+ let d = e._slicePartitions + 1, f = e._stackPartitions + 1;
+ d = Math.round(
+ d * Math.abs(r - i) / CesiumMath.TWO_PI
+ ), f = Math.round(
+ f * Math.abs(s - o) / CesiumMath.PI
+ ), d < 2 && (d = 2), f < 2 && (f = 2);
+ let h = 0, p = 1;
+ const m = n.x !== t.x || n.y !== t.y || n.z !== t.z;
+ let _ = !1, y = !1;
+ m && (p = 2, o > 0 && (_ = !0, h += d), s < Math.PI && (y = !0, h += d));
+ const C = c * p * (f + d), T = new Float64Array(C * 3), x = 2 * (C + h - (d + f) * p), b = IndexDatatype$1.createTypedArray(C, x);
+ let S, E, A, D, P = 0;
+ const I = new Array(f), M = new Array(f);
+ for (S = 0; S < f; S++)
+ D = o + S * (s - o) / (f - 1), I[S] = sin$1(D), M[S] = cos$1(D);
+ const R = new Array(c), L = new Array(c);
+ for (S = 0; S < c; S++)
+ A = i + S * (r - i) / (c - 1), R[S] = sin$1(A), L[S] = cos$1(A);
+ for (S = 0; S < f; S++)
+ for (E = 0; E < c; E++)
+ T[P++] = t.x * I[S] * L[E], T[P++] = t.y * I[S] * R[E], T[P++] = t.z * M[S];
+ if (m)
+ for (S = 0; S < f; S++)
+ for (E = 0; E < c; E++)
+ T[P++] = n.x * I[S] * L[E], T[P++] = n.y * I[S] * R[E], T[P++] = n.z * M[S];
+ for (I.length = c, M.length = c, S = 0; S < c; S++)
+ D = o + S * (s - o) / (c - 1), I[S] = sin$1(D), M[S] = cos$1(D);
+ for (R.length = d, L.length = d, S = 0; S < d; S++)
+ A = i + S * (r - i) / (d - 1), R[S] = sin$1(A), L[S] = cos$1(A);
+ for (S = 0; S < c; S++)
+ for (E = 0; E < d; E++)
+ T[P++] = t.x * I[S] * L[E], T[P++] = t.y * I[S] * R[E], T[P++] = t.z * M[S];
+ if (m)
+ for (S = 0; S < c; S++)
+ for (E = 0; E < d; E++)
+ T[P++] = n.x * I[S] * L[E], T[P++] = n.y * I[S] * R[E], T[P++] = n.z * M[S];
+ for (P = 0, S = 0; S < f * p; S++) {
+ const O = S * c;
+ for (E = 0; E < c - 1; E++)
+ b[P++] = O + E, b[P++] = O + E + 1;
+ }
+ let g = f * c * p;
+ for (S = 0; S < d; S++)
+ for (E = 0; E < c - 1; E++)
+ b[P++] = g + S + E * d, b[P++] = g + S + (E + 1) * d;
+ if (m)
+ for (g = f * c * p + d * c, S = 0; S < d; S++)
+ for (E = 0; E < c - 1; E++)
+ b[P++] = g + S + E * d, b[P++] = g + S + (E + 1) * d;
+ if (m) {
+ let O = f * c * p, N = O + c * d;
+ if (_)
+ for (S = 0; S < d; S++)
+ b[P++] = O + S, b[P++] = N + S;
+ if (y)
+ for (O += c * d - d, N += c * d - d, S = 0; S < d; S++)
+ b[P++] = O + S, b[P++] = N + S;
+ }
+ const w = new GeometryAttributes({
+ position: new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.DOUBLE,
+ componentsPerAttribute: 3,
+ values: T
+ })
+ });
+ if (defined(e._offsetAttribute)) {
+ const O = T.length, N = e._offsetAttribute === GeometryOffsetAttribute$1.NONE ? 0 : 1, F = new Uint8Array(O / 3).fill(N);
+ w.applyOffset = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: F
+ });
+ }
+ return new Geometry({
+ attributes: w,
+ indices: b,
+ primitiveType: PrimitiveType$1.LINES,
+ boundingSphere: BoundingSphere.fromEllipsoid(l),
+ offsetAttribute: e._offsetAttribute
+ });
+};
+function SphereOutlineGeometry(e) {
+ const t = defaultValue(e.radius, 1), i = {
+ radii: new Cartesian3(t, t, t),
+ stackPartitions: e.stackPartitions,
+ slicePartitions: e.slicePartitions,
+ subdivisions: e.subdivisions
+ };
+ this._ellipsoidGeometry = new EllipsoidOutlineGeometry(i), this._workerName = "createSphereOutlineGeometry";
+}
+SphereOutlineGeometry.packedLength = EllipsoidOutlineGeometry.packedLength;
+SphereOutlineGeometry.pack = function(e, t, n) {
+ return EllipsoidOutlineGeometry.pack(
+ e._ellipsoidGeometry,
+ t,
+ n
+ );
+};
+const scratchEllipsoidGeometry$1 = new EllipsoidOutlineGeometry(), scratchOptions$i = {
+ radius: void 0,
+ radii: new Cartesian3(),
+ stackPartitions: void 0,
+ slicePartitions: void 0,
+ subdivisions: void 0
+};
+SphereOutlineGeometry.unpack = function(e, t, n) {
+ const i = EllipsoidOutlineGeometry.unpack(
+ e,
+ t,
+ scratchEllipsoidGeometry$1
+ );
+ return scratchOptions$i.stackPartitions = i._stackPartitions, scratchOptions$i.slicePartitions = i._slicePartitions, scratchOptions$i.subdivisions = i._subdivisions, defined(n) ? (Cartesian3.clone(i._radii, scratchOptions$i.radii), n._ellipsoidGeometry = new EllipsoidOutlineGeometry(scratchOptions$i), n) : (scratchOptions$i.radius = i._radii.x, new SphereOutlineGeometry(scratchOptions$i));
+};
+SphereOutlineGeometry.createGeometry = function(e) {
+ return EllipsoidOutlineGeometry.createGeometry(
+ e._ellipsoidGeometry
+ );
+};
+function TileBoundingSphere(e, t) {
+ t === 0 && (t = CesiumMath.EPSILON7), this._boundingSphere = new BoundingSphere(e, t);
+}
+Object.defineProperties(TileBoundingSphere.prototype, {
+ /**
+ * The center of the bounding sphere
+ *
+ * @memberof TileBoundingSphere.prototype
+ *
+ * @type {Cartesian3}
+ * @readonly
+ */
+ center: {
+ get: function() {
+ return this._boundingSphere.center;
+ }
+ },
+ /**
+ * The radius of the bounding sphere
+ *
+ * @memberof TileBoundingSphere.prototype
+ *
+ * @type {number}
+ * @readonly
+ */
+ radius: {
+ get: function() {
+ return this._boundingSphere.radius;
+ }
+ },
+ /**
+ * The underlying bounding volume
+ *
+ * @memberof TileBoundingSphere.prototype
+ *
+ * @type {object}
+ * @readonly
+ */
+ boundingVolume: {
+ get: function() {
+ return this._boundingSphere;
+ }
+ },
+ /**
+ * The underlying bounding sphere
+ *
+ * @memberof TileBoundingSphere.prototype
+ *
+ * @type {BoundingSphere}
+ * @readonly
+ */
+ boundingSphere: {
+ get: function() {
+ return this._boundingSphere;
+ }
+ }
+});
+TileBoundingSphere.prototype.distanceToCamera = function(e) {
+ const t = this._boundingSphere;
+ return Math.max(
+ 0,
+ Cartesian3.distance(t.center, e.camera.positionWC) - t.radius
+ );
+};
+TileBoundingSphere.prototype.intersectPlane = function(e) {
+ return BoundingSphere.intersectPlane(this._boundingSphere, e);
+};
+TileBoundingSphere.prototype.update = function(e, t) {
+ Cartesian3.clone(e, this._boundingSphere.center), this._boundingSphere.radius = t;
+};
+TileBoundingSphere.prototype.createDebugVolume = function(e) {
+ const t = new SphereOutlineGeometry({
+ radius: this.radius
+ }), n = Matrix4.fromTranslation(
+ this.center,
+ new Matrix4.clone(Matrix4.IDENTITY)
+ ), i = new GeometryInstance({
+ geometry: t,
+ id: "outline",
+ modelMatrix: n,
+ attributes: {
+ color: ColorGeometryInstanceAttribute.fromColor(e)
+ }
+ });
+ return new Primitive$3({
+ geometryInstances: i,
+ appearance: new PerInstanceColorAppearance({
+ translucent: !1,
+ flat: !0
+ }),
+ asynchronous: !1
+ });
+};
+const scratchU = new Cartesian3(), scratchV = new Cartesian3(), scratchW = new Cartesian3(), scratchCartesian$8 = new Cartesian3();
+function computeMissingVector(e, t, n) {
+ n = Cartesian3.cross(e, t, n);
+ const i = Cartesian3.magnitude(n);
+ return Cartesian3.multiplyByScalar(
+ n,
+ CesiumMath.EPSILON7 / i,
+ n
+ );
+}
+function findOrthogonalVector(e, t) {
+ const n = Cartesian3.normalize(e, scratchCartesian$8), i = Cartesian3.equalsEpsilon(
+ n,
+ Cartesian3.UNIT_X,
+ CesiumMath.EPSILON6
+ ) ? Cartesian3.UNIT_Y : Cartesian3.UNIT_X;
+ return computeMissingVector(e, i, t);
+}
+function checkHalfAxes(e) {
+ let t = Matrix3.getColumn(e, 0, scratchU), n = Matrix3.getColumn(e, 1, scratchV), i = Matrix3.getColumn(e, 2, scratchW);
+ const r = Cartesian3.equals(t, Cartesian3.ZERO), o = Cartesian3.equals(n, Cartesian3.ZERO), s = Cartesian3.equals(i, Cartesian3.ZERO);
+ return !r && !o && !s ? e : r && o && s ? (e[0] = CesiumMath.EPSILON7, e[4] = CesiumMath.EPSILON7, e[8] = CesiumMath.EPSILON7, e) : (r && !o && !s ? t = computeMissingVector(n, i, t) : !r && o && !s ? n = computeMissingVector(t, i, n) : !r && !o && s ? i = computeMissingVector(n, t, i) : r ? o ? s || (t = findOrthogonalVector(i, t), n = computeMissingVector(i, t, n)) : (t = findOrthogonalVector(n, t), i = computeMissingVector(n, t, i)) : (n = findOrthogonalVector(t, n), i = computeMissingVector(n, t, i)), Matrix3.setColumn(e, 0, t, e), Matrix3.setColumn(e, 1, n, e), Matrix3.setColumn(e, 2, i, e), e);
+}
+function TileOrientedBoundingBox(e, t) {
+ t = checkHalfAxes(t), this._orientedBoundingBox = new OrientedBoundingBox(e, t), this._boundingSphere = BoundingSphere.fromOrientedBoundingBox(
+ this._orientedBoundingBox
+ );
+}
+Object.defineProperties(TileOrientedBoundingBox.prototype, {
+ /**
+ * The underlying bounding volume.
+ *
+ * @memberof TileOrientedBoundingBox.prototype
+ *
+ * @type {OrientedBoundingBox}
+ * @readonly
+ */
+ boundingVolume: {
+ get: function() {
+ return this._orientedBoundingBox;
+ }
+ },
+ /**
+ * The underlying bounding sphere.
+ *
+ * @memberof TileOrientedBoundingBox.prototype
+ *
+ * @type {BoundingSphere}
+ * @readonly
+ */
+ boundingSphere: {
+ get: function() {
+ return this._boundingSphere;
+ }
+ }
+});
+TileOrientedBoundingBox.prototype.distanceToCamera = function(e) {
+ return Math.sqrt(
+ this._orientedBoundingBox.distanceSquaredTo(e.camera.positionWC)
+ );
+};
+TileOrientedBoundingBox.prototype.intersectPlane = function(e) {
+ return this._orientedBoundingBox.intersectPlane(e);
+};
+TileOrientedBoundingBox.prototype.update = function(e, t) {
+ Cartesian3.clone(e, this._orientedBoundingBox.center), t = checkHalfAxes(t), Matrix3.clone(t, this._orientedBoundingBox.halfAxes), BoundingSphere.fromOrientedBoundingBox(
+ this._orientedBoundingBox,
+ this._boundingSphere
+ );
+};
+TileOrientedBoundingBox.prototype.createDebugVolume = function(e) {
+ const t = new BoxOutlineGeometry({
+ // Make a 2x2x2 cube
+ minimum: new Cartesian3(-1, -1, -1),
+ maximum: new Cartesian3(1, 1, 1)
+ }), n = Matrix4.fromRotationTranslation(
+ this.boundingVolume.halfAxes,
+ this.boundingVolume.center
+ ), i = new GeometryInstance({
+ geometry: t,
+ id: "outline",
+ modelMatrix: n,
+ attributes: {
+ color: ColorGeometryInstanceAttribute.fromColor(e)
+ }
+ });
+ return new Primitive$3({
+ geometryInstances: i,
+ appearance: new PerInstanceColorAppearance({
+ translucent: !1,
+ flat: !0
+ }),
+ asynchronous: !1
+ });
+};
+function Cesium3DTile(e, t, n, i) {
+ this._tileset = e, this._header = n;
+ const r = defined(n.contents), o = r && n.contents.length > 1 || hasExtension(n, "3DTILES_multiple_contents"), s = r && !o ? n.contents[0] : n.content;
+ this._contentHeader = s, this.transform = defined(n.transform) ? Matrix4.unpack(n.transform) : Matrix4.clone(Matrix4.IDENTITY);
+ const c = defined(i) ? i.computedTransform : e.modelMatrix, l = Matrix4.multiply(
+ c,
+ this.transform,
+ new Matrix4()
+ ), d = defined(i) ? i._initialTransform : Matrix4.IDENTITY;
+ this._initialTransform = Matrix4.multiply(
+ d,
+ this.transform,
+ new Matrix4()
+ ), this.computedTransform = l, this.metadata = findTileMetadata(e, n), this._verticalExaggeration = 1, this._verticalExaggerationRelativeHeight = 0, this._boundingVolume = this.createBoundingVolume(
+ n.boundingVolume,
+ l
+ ), this._boundingVolume2D = void 0;
+ let f;
+ defined(s) && defined(s.boundingVolume) && (f = this.createBoundingVolume(
+ s.boundingVolume,
+ l
+ )), this._contentBoundingVolume = f, this._contentBoundingVolume2D = void 0;
+ let h;
+ defined(n.viewerRequestVolume) && (h = this.createBoundingVolume(
+ n.viewerRequestVolume,
+ l
+ )), this._viewerRequestVolume = h, this.geometricError = n.geometricError, this._geometricError = n.geometricError, defined(this._geometricError) || (this._geometricError = defined(i) ? i._geometricError : e._geometricError, Cesium3DTile._deprecationWarning(
+ "geometricErrorUndefined",
+ "Required property geometricError is undefined for this tile. Using parent's geometric error instead."
+ )), this.updateGeometricErrorScale();
+ let p;
+ defined(n.refine) ? ((n.refine === "replace" || n.refine === "add") && Cesium3DTile._deprecationWarning(
+ "lowercase-refine",
+ `This tile uses a lowercase refine "${n.refine}". Instead use "${n.refine.toUpperCase()}".`
+ ), p = n.refine.toUpperCase() === "REPLACE" ? Cesium3DTileRefine$1.REPLACE : Cesium3DTileRefine$1.ADD) : defined(i) ? p = i.refine : p = Cesium3DTileRefine$1.REPLACE, this.refine = p, this.children = [], this.parent = i;
+ let m, _ = !1, y, C, T;
+ if (t = Resource.createIfNeeded(t), o)
+ y = Cesium3DTileContentState$1.UNLOADED, C = t.clone();
+ else if (defined(s)) {
+ let E = s.uri;
+ defined(s.url) && (Cesium3DTile._deprecationWarning(
+ "contentUrl",
+ 'This tileset JSON uses the "content.url" property which has been deprecated. Use "content.uri" instead.'
+ ), E = s.url), E === "" ? (Cesium3DTile._deprecationWarning(
+ "contentUriEmpty",
+ "content.uri property is an empty string, which creates a circular dependency, making this tileset invalid. Omit the content property instead"
+ ), m = new Empty3DTileContent(e, this), _ = !0, y = Cesium3DTileContentState$1.READY) : (y = Cesium3DTileContentState$1.UNLOADED, C = t.getDerivedResource({
+ url: E
+ }), T = RequestScheduler.getServerKey(
+ C.getUrlComponent()
+ ));
+ } else
+ m = new Empty3DTileContent(e, this), _ = !0, y = Cesium3DTileContentState$1.READY;
+ this._content = m, this._contentResource = C, this._contentState = y, this._expiredContent = void 0, this._serverKey = T, this.hasEmptyContent = _, this.hasTilesetContent = !1, this.hasImplicitContent = !1, this.hasImplicitContentMetadata = !1, this.hasMultipleContents = o, this.cacheNode = void 0;
+ const x = n.expire;
+ let b, S;
+ defined(x) && (b = x.duration, defined(x.date) && (S = JulianDate.fromIso8601(x.date))), this.expireDuration = b, this.expireDate = S, this.lastStyleTime = 0, this._optimChildrenWithinParent = Cesium3DTileOptimizationHint$1.NOT_COMPUTED, this.clippingPlanesDirty = !1, this.clippingPolygonsDirty = !1, this.priorityDeferred = !1, this.implicitTileset = void 0, this.implicitCoordinates = void 0, this.implicitSubtree = void 0, this._distanceToCamera = 0, this._centerZDepth = 0, this._screenSpaceError = 0, this._screenSpaceErrorProgressiveResolution = 0, this._visibilityPlaneMask = 0, this._visible = !1, this._inRequestVolume = !1, this._finalResolution = !0, this._depth = 0, this._stackLength = 0, this._selectionDepth = 0, this._updatedVisibilityFrame = 0, this._touchedFrame = 0, this._visitedFrame = 0, this._selectedFrame = 0, this._wasSelectedLastFrame = !1, this._requestedFrame = 0, this._ancestorWithContent = void 0, this._ancestorWithContentAvailable = void 0, this._refines = !1, this._shouldSelect = !1, this._isClipped = !0, this._isClippedByPolygon = !1, this._clippingPlanesState = 0, this._clippingPolygonsState = 0, this._debugBoundingVolume = void 0, this._debugContentBoundingVolume = void 0, this._debugViewerRequestVolume = void 0, this._debugColor = Color.fromRandom({ alpha: 1 }), this._debugColorizeTiles = !1, this._priority = 0, this._priorityHolder = this, this._priorityProgressiveResolution = !1, this._priorityProgressiveResolutionScreenSpaceErrorLeaf = !1, this._priorityReverseScreenSpaceError = 0, this._foveatedFactor = 0, this._wasMinPriorityChild = !1, this._loadTimestamp = new JulianDate(), this._commandsLength = 0, this._color = void 0, this._colorDirty = !1, this._request = void 0;
+}
+Cesium3DTile._deprecationWarning = deprecationWarning;
+Object.defineProperties(Cesium3DTile.prototype, {
+ /**
+ * The tileset containing this tile.
+ *
+ * @memberof Cesium3DTile.prototype
+ *
+ * @type {Cesium3DTileset}
+ * @readonly
+ */
+ tileset: {
+ get: function() {
+ return this._tileset;
+ }
+ },
+ /**
+ * The tile's content. This represents the actual tile's payload,
+ * not the content's metadata in the tileset JSON file.
+ *
+ * @memberof Cesium3DTile.prototype
+ *
+ * @type {Cesium3DTileContent}
+ * @readonly
+ */
+ content: {
+ get: function() {
+ return this._content;
+ }
+ },
+ /**
+ * Get the tile's bounding volume.
+ *
+ * @memberof Cesium3DTile.prototype
+ *
+ * @type {TileBoundingVolume}
+ * @readonly
+ * @private
+ */
+ boundingVolume: {
+ get: function() {
+ return this._boundingVolume;
+ }
+ },
+ /**
+ * Get the bounding volume of the tile's contents. This defaults to the
+ * tile's bounding volume when the content's bounding volume is
+ * undefined.
+ *
+ * @memberof Cesium3DTile.prototype
+ *
+ * @type {TileBoundingVolume}
+ * @readonly
+ * @private
+ */
+ contentBoundingVolume: {
+ get: function() {
+ return defaultValue(this._contentBoundingVolume, this._boundingVolume);
+ }
+ },
+ /**
+ * Get the bounding sphere derived from the tile's bounding volume.
+ *
+ * @memberof Cesium3DTile.prototype
+ *
+ * @type {BoundingSphere}
+ * @readonly
+ */
+ boundingSphere: {
+ get: function() {
+ return this._boundingVolume.boundingSphere;
+ }
+ },
+ /**
+ * Determines if the tile is visible within the current field of view
+ *
+ * @memberof Cesium3DTile.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @private
+ */
+ isVisible: {
+ get: function() {
+ return this._visible && this._inRequestVolume;
+ }
+ },
+ /**
+ * Returns the extras property in the tileset JSON for this tile, which contains application specific metadata.
+ * Returns undefined if extras does not exist.
+ *
+ * @memberof Cesium3DTile.prototype
+ *
+ * @type {object}
+ * @readonly
+ * @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification#specifying-extensions-and-application-specific-extras|Extras in the 3D Tiles specification.}
+ */
+ extras: {
+ get: function() {
+ return this._header.extras;
+ }
+ },
+ /**
+ * Gets or sets the tile's highlight color.
+ *
+ * @memberof Cesium3DTile.prototype
+ *
+ * @type {Color}
+ *
+ * @default {@link Color.WHITE}
+ *
+ * @private
+ */
+ color: {
+ get: function() {
+ return defined(this._color) || (this._color = new Color()), Color.clone(this._color);
+ },
+ set: function(e) {
+ this._color = Color.clone(e, this._color), this._colorDirty = !0;
+ }
+ },
+ /**
+ * Determines if the tile's content is renderable. false if the
+ * tile has empty content or if it points to an external tileset or implicit content
+ *
+ * @memberof Cesium3DTile.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @private
+ */
+ hasRenderableContent: {
+ get: function() {
+ return !this.hasEmptyContent && !this.hasTilesetContent && !this.hasImplicitContent;
+ }
+ },
+ /**
+ * Determines if the tile has available content to render. true if the tile's
+ * content is ready or if it has expired content that renders while new content loads; otherwise,
+ * false.
+ *
+ * @memberof Cesium3DTile.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @private
+ */
+ contentAvailable: {
+ get: function() {
+ return this.contentReady && this.hasRenderableContent || defined(this._expiredContent) && !this.contentFailed;
+ }
+ },
+ /**
+ * Determines if the tile's content is ready. This is automatically true for
+ * tile's with empty content.
+ *
+ * @memberof Cesium3DTile.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @private
+ */
+ contentReady: {
+ get: function() {
+ return this._contentState === Cesium3DTileContentState$1.READY;
+ }
+ },
+ /**
+ * Determines if the tile's content has not be requested. true if tile's
+ * content has not be requested; otherwise, false.
+ *
+ * @memberof Cesium3DTile.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @private
+ */
+ contentUnloaded: {
+ get: function() {
+ return this._contentState === Cesium3DTileContentState$1.UNLOADED;
+ }
+ },
+ /**
+ * Determines if the tile has renderable content which is unloaded
+ *
+ * @memberof Cesium3DTile.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @private
+ */
+ hasUnloadedRenderableContent: {
+ get: function() {
+ return this.hasRenderableContent && this.contentUnloaded;
+ }
+ },
+ /**
+ * Determines if the tile's content is expired. true if tile's
+ * content is expired; otherwise, false.
+ *
+ * @memberof Cesium3DTile.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @private
+ */
+ contentExpired: {
+ get: function() {
+ return this._contentState === Cesium3DTileContentState$1.EXPIRED;
+ }
+ },
+ /**
+ * Determines if the tile's content failed to load. true if the tile's
+ * content failed to load; otherwise, false.
+ *
+ * @memberof Cesium3DTile.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @private
+ */
+ contentFailed: {
+ get: function() {
+ return this._contentState === Cesium3DTileContentState$1.FAILED;
+ }
+ },
+ /**
+ * Returns the number of draw commands used by this tile.
+ *
+ * @readonly
+ *
+ * @private
+ */
+ commandsLength: {
+ get: function() {
+ return this._commandsLength;
+ }
+ }
+});
+const scratchCartesian$7 = new Cartesian3();
+function isPriorityDeferred(e, t) {
+ const { tileset: n, boundingSphere: i } = e, { radius: r, center: o } = i, { camera: s } = t, c = Cartesian3.multiplyByScalar(
+ s.directionWC,
+ e._centerZDepth,
+ scratchCartesian$7
+ ), l = Cartesian3.add(
+ s.positionWC,
+ c,
+ scratchCartesian$7
+ ), d = Cartesian3.subtract(
+ l,
+ o,
+ scratchCartesian$7
+ );
+ if (Cartesian3.magnitude(d) > r) {
+ const S = Cartesian3.normalize(d, scratchCartesian$7), E = Cartesian3.multiplyByScalar(
+ S,
+ r,
+ scratchCartesian$7
+ ), A = Cartesian3.add(
+ o,
+ E,
+ scratchCartesian$7
+ ), D = Cartesian3.subtract(
+ A,
+ s.positionWC,
+ scratchCartesian$7
+ ), P = Cartesian3.normalize(
+ D,
+ scratchCartesian$7
+ );
+ e._foveatedFactor = 1 - Math.abs(Cartesian3.dot(s.directionWC, P));
+ } else
+ e._foveatedFactor = 0;
+ const p = e.refine === Cesium3DTileRefine$1.REPLACE, m = n.isSkippingLevelOfDetail;
+ if (p && !m || !n.foveatedScreenSpaceError || n.foveatedConeSize === 1 || e._priorityProgressiveResolution && p && m || n._pass === Cesium3DTilePass$1.PRELOAD_FLIGHT || n._pass === Cesium3DTilePass$1.PRELOAD)
+ return !1;
+ const _ = 1 - Math.cos(s.frustum.fov * 0.5), y = n.foveatedConeSize * _;
+ if (e._foveatedFactor <= y)
+ return !1;
+ const C = _ - y, T = CesiumMath.clamp(
+ (e._foveatedFactor - y) / C,
+ 0,
+ 1
+ ), x = n.foveatedInterpolationCallback(
+ n.foveatedMinimumScreenSpaceErrorRelaxation,
+ n.memoryAdjustedScreenSpaceError,
+ T
+ ), b = e._screenSpaceError === 0 && defined(e.parent) ? e.parent._screenSpaceError * 0.5 : e._screenSpaceError;
+ return n.memoryAdjustedScreenSpaceError - x <= b;
+}
+const scratchJulianDate$2 = new JulianDate();
+Cesium3DTile.prototype.getScreenSpaceError = function(e, t, n) {
+ const i = this._tileset, r = defaultValue(n, 1), o = defined(this.parent) ? this.parent.geometricError : i._scaledGeometricError, s = t ? o : this.geometricError;
+ if (s === 0)
+ return 0;
+ const { camera: c, context: l } = e;
+ let d = c.frustum;
+ const f = l.drawingBufferWidth, h = l.drawingBufferHeight * r;
+ let p;
+ if (e.mode === SceneMode$1.SCENE2D || d instanceof OrthographicFrustum) {
+ const m = d.offCenterFrustum;
+ defined(m) && (d = m);
+ const _ = Math.max(d.top - d.bottom, d.right - d.left) / Math.max(f, h);
+ p = s / _;
+ } else {
+ const m = Math.max(this._distanceToCamera, CesiumMath.EPSILON7), _ = d.sseDenominator;
+ if (p = s * h / (m * _), i.dynamicScreenSpaceError) {
+ const y = i._dynamicScreenSpaceErrorComputedDensity, C = i.dynamicScreenSpaceErrorFactor, T = CesiumMath.fog(m, y) * C;
+ p -= T;
+ }
+ }
+ return p /= e.pixelRatio, p;
+};
+function isPriorityProgressiveResolution(e, t) {
+ if (e.progressiveResolutionHeightFraction <= 0 || e.progressiveResolutionHeightFraction > 0.5)
+ return !1;
+ const n = e.memoryAdjustedScreenSpaceError;
+ let i = t._screenSpaceErrorProgressiveResolution > n;
+ t._priorityProgressiveResolutionScreenSpaceErrorLeaf = !1;
+ const r = t.parent, o = t._screenSpaceErrorProgressiveResolution <= n, s = defined(r) && r._screenSpaceErrorProgressiveResolution > n;
+ return o && s && (t._priorityProgressiveResolutionScreenSpaceErrorLeaf = !0, i = !0), i;
+}
+function getPriorityReverseScreenSpaceError(e, t) {
+ const n = t.parent, r = defined(n) && (!e.isSkippingLevelOfDetail || t._screenSpaceError === 0 || n.hasTilesetContent || n.hasImplicitContent) ? n._screenSpaceError : t._screenSpaceError;
+ return e.root._screenSpaceError - r;
+}
+Cesium3DTile.prototype.updateVisibility = function(e) {
+ const { parent: t, tileset: n } = this;
+ if (this._updatedVisibilityFrame === n._updatedVisibilityFrame)
+ return;
+ const i = defined(t) ? t.computedTransform : n.modelMatrix, r = defined(t) ? t._visibilityPlaneMask : CullingVolume.MASK_INDETERMINATE;
+ this.updateTransform(i, e), this._distanceToCamera = this.distanceToTile(e), this._centerZDepth = this.distanceToTileCenter(e), this._screenSpaceError = this.getScreenSpaceError(e, !1), this._screenSpaceErrorProgressiveResolution = this.getScreenSpaceError(
+ e,
+ !1,
+ n.progressiveResolutionHeightFraction
+ ), this._visibilityPlaneMask = this.visibility(
+ e,
+ r
+ ), this._visible = this._visibilityPlaneMask !== CullingVolume.MASK_OUTSIDE, this._inRequestVolume = this.insideViewerRequestVolume(e), this._priorityReverseScreenSpaceError = getPriorityReverseScreenSpaceError(
+ n,
+ this
+ ), this._priorityProgressiveResolution = isPriorityProgressiveResolution(
+ n,
+ this
+ ), this.priorityDeferred = isPriorityDeferred(this, e), this._updatedVisibilityFrame = n._updatedVisibilityFrame;
+};
+Cesium3DTile.prototype.updateExpiration = function() {
+ if (defined(this.expireDate) && this.contentReady && !this.hasEmptyContent && !this.hasMultipleContents) {
+ const e = JulianDate.now(scratchJulianDate$2);
+ JulianDate.lessThan(this.expireDate, e) && (this._contentState = Cesium3DTileContentState$1.EXPIRED, this._expiredContent = this._content);
+ }
+};
+function updateExpireDate(e) {
+ if (!defined(e.expireDuration))
+ return;
+ const t = JulianDate.now(scratchJulianDate$2);
+ JulianDate.addSeconds(
+ t,
+ e.expireDuration,
+ t
+ ), defined(e.expireDate) ? JulianDate.lessThan(e.expireDate, t) && JulianDate.clone(t, e.expireDate) : e.expireDate = JulianDate.clone(t);
+}
+function createPriorityFunction(e) {
+ return function() {
+ return e._priority;
+ };
+}
+Cesium3DTile.prototype.requestContent = function() {
+ if (!this.hasEmptyContent)
+ return this.hasMultipleContents ? requestMultipleContents(this) : requestSingleContent(this);
+};
+function requestMultipleContents(e) {
+ let t = e._content;
+ const n = e._tileset;
+ if (!defined(t)) {
+ const r = hasExtension(e._header, "3DTILES_multiple_contents") ? e._header.extensions["3DTILES_multiple_contents"] : e._header;
+ t = new Multiple3DTileContent(
+ n,
+ e,
+ e._contentResource.clone(),
+ r
+ ), e._content = t;
+ }
+ const i = t.requestInnerContents();
+ if (defined(i))
+ return e._contentState = Cesium3DTileContentState$1.LOADING, i.then((r) => {
+ if (!e.isDestroyed() && defined(r))
+ return e._contentState = Cesium3DTileContentState$1.PROCESSING, t;
+ }).catch((r) => {
+ if (!e.isDestroyed())
+ throw e._contentState = Cesium3DTileContentState$1.FAILED, r;
+ });
+}
+async function processArrayBuffer(e, t, n, i, r) {
+ const o = e._contentState;
+ e._contentState = Cesium3DTileContentState$1.LOADING, ++t.statistics.numberOfPendingRequests;
+ let s;
+ try {
+ s = await r;
+ } catch (c) {
+ if (--t.statistics.numberOfPendingRequests, e.isDestroyed())
+ return;
+ if (n.cancelled || n.state === RequestState$1.CANCELLED) {
+ e._contentState = o, ++t.statistics.numberOfAttemptedRequests;
+ return;
+ }
+ throw e._contentState = Cesium3DTileContentState$1.FAILED, c;
+ }
+ if (e.isDestroyed()) {
+ --t.statistics.numberOfPendingRequests;
+ return;
+ }
+ if (n.cancelled || n.state === RequestState$1.CANCELLED) {
+ e._contentState = o, --t.statistics.numberOfPendingRequests, ++t.statistics.numberOfAttemptedRequests;
+ return;
+ }
+ try {
+ const c = await makeContent(e, s);
+ return --t.statistics.numberOfPendingRequests, e.isDestroyed() ? void 0 : (i && (e.expireDate = void 0), e._content = c, e._contentState = Cesium3DTileContentState$1.PROCESSING, c);
+ } catch (c) {
+ if (--t.statistics.numberOfPendingRequests, e.isDestroyed())
+ return;
+ throw e._contentState = Cesium3DTileContentState$1.FAILED, c;
+ }
+}
+function requestSingleContent(e) {
+ const t = e._contentResource.clone(), n = e.contentExpired;
+ n && t.setQueryParameters({
+ expired: e.expireDate.toString()
+ });
+ const i = new Request({
+ throttle: !0,
+ throttleByServer: !0,
+ type: RequestType$1.TILES3D,
+ priorityFunction: createPriorityFunction(e),
+ serverKey: e._serverKey
+ });
+ e._request = i, t.request = i;
+ const r = e._tileset, o = t.fetchArrayBuffer();
+ if (!defined(o)) {
+ ++r.statistics.numberOfAttemptedRequests;
+ return;
+ }
+ return processArrayBuffer(e, r, i, n, o);
+}
+async function makeContent(e, t) {
+ const n = preprocess3DTileContent(t), i = e._tileset;
+ i._disableSkipLevelOfDetail = i._disableSkipLevelOfDetail || n.contentType === Cesium3DTileContentType$1.GEOMETRY || n.contentType === Cesium3DTileContentType$1.VECTOR, (n.contentType === Cesium3DTileContentType$1.IMPLICIT_SUBTREE || n.contentType === Cesium3DTileContentType$1.IMPLICIT_SUBTREE_JSON) && (e.hasImplicitContent = !0), n.contentType === Cesium3DTileContentType$1.EXTERNAL_TILESET && (e.hasTilesetContent = !0);
+ let r;
+ const o = Cesium3DTileContentFactory[n.contentType];
+ if (e.isDestroyed())
+ return;
+ defined(n.binaryPayload) ? r = await Promise.resolve(
+ o(
+ i,
+ e,
+ e._contentResource,
+ n.binaryPayload.buffer,
+ 0
+ )
+ ) : r = await Promise.resolve(
+ o(
+ i,
+ e,
+ e._contentResource,
+ n.jsonPayload
+ )
+ );
+ const s = e._contentHeader;
+ if (e.hasImplicitContentMetadata) {
+ const l = e.implicitSubtree, d = e.implicitCoordinates;
+ r.metadata = l.getContentMetadataView(d, 0);
+ } else e.hasImplicitContent || (r.metadata = findContentMetadata(i, s));
+ const c = findGroupMetadata(i, s);
+ return defined(c) && (r.group = new Cesium3DContentGroup({
+ metadata: c
+ })), r;
+}
+Cesium3DTile.prototype.cancelRequests = function() {
+ this.hasMultipleContents ? this._content.cancelRequests() : this._request.cancel();
+};
+Cesium3DTile.prototype.unloadContent = function() {
+ this.hasRenderableContent && (this._content = this._content && this._content.destroy(), this._contentState = Cesium3DTileContentState$1.UNLOADED, this.lastStyleTime = 0, this.clippingPlanesDirty = this._clippingPlanesState === 0, this._clippingPlanesState = 0, this.clippingPolygonsDirty = this._clippingPolygonsState === 0, this._clippingPolygonsState = 0, this._debugColorizeTiles = !1, this._debugBoundingVolume = this._debugBoundingVolume && this._debugBoundingVolume.destroy(), this._debugContentBoundingVolume = this._debugContentBoundingVolume && this._debugContentBoundingVolume.destroy(), this._debugViewerRequestVolume = this._debugViewerRequestVolume && this._debugViewerRequestVolume.destroy());
+};
+const scratchProjectedBoundingSphere = new BoundingSphere();
+function getBoundingVolume(e, t) {
+ if (t.mode !== SceneMode$1.SCENE3D && !defined(e._boundingVolume2D)) {
+ const n = e._boundingVolume.boundingSphere, i = BoundingSphere.projectTo2D(
+ n,
+ t.mapProjection,
+ scratchProjectedBoundingSphere
+ );
+ e._boundingVolume2D = new TileBoundingSphere(
+ i.center,
+ i.radius
+ );
+ }
+ return t.mode !== SceneMode$1.SCENE3D ? e._boundingVolume2D : e._boundingVolume;
+}
+function getContentBoundingVolume(e, t) {
+ if (t.mode !== SceneMode$1.SCENE3D && !defined(e._contentBoundingVolume2D)) {
+ const n = e._contentBoundingVolume.boundingSphere, i = BoundingSphere.projectTo2D(
+ n,
+ t.mapProjection,
+ scratchProjectedBoundingSphere
+ );
+ e._contentBoundingVolume2D = new TileBoundingSphere(
+ i.center,
+ i.radius
+ );
+ }
+ return t.mode !== SceneMode$1.SCENE3D ? e._contentBoundingVolume2D : e._contentBoundingVolume;
+}
+Cesium3DTile.prototype.visibility = function(e, t) {
+ const n = e.cullingVolume, i = getBoundingVolume(this, e), r = this._tileset, o = r.clippingPlanes;
+ if (defined(o) && o.enabled) {
+ const c = o.computeIntersectionWithBoundingVolume(
+ i,
+ r.clippingPlanesOriginMatrix
+ );
+ if (this._isClipped = c !== Intersect$1.INSIDE, c === Intersect$1.OUTSIDE)
+ return CullingVolume.MASK_OUTSIDE;
+ }
+ const s = r.clippingPolygons;
+ if (defined(s) && s.enabled) {
+ const c = s.computeIntersectionWithBoundingVolume(
+ i
+ );
+ this._isClippedByPolygon = c !== Intersect$1.OUTSIDE;
+ }
+ return n.computeVisibilityWithPlaneMask(
+ i,
+ t
+ );
+};
+Cesium3DTile.prototype.contentVisibility = function(e) {
+ if (!defined(this._contentBoundingVolume) || this._visibilityPlaneMask === CullingVolume.MASK_INSIDE)
+ return Intersect$1.INSIDE;
+ const t = e.cullingVolume, n = getContentBoundingVolume(this, e), i = this._tileset, r = i.clippingPlanes;
+ if (defined(r) && r.enabled) {
+ const s = r.computeIntersectionWithBoundingVolume(
+ n,
+ i.clippingPlanesOriginMatrix
+ );
+ if (this._isClipped = s !== Intersect$1.INSIDE, s === Intersect$1.OUTSIDE)
+ return Intersect$1.OUTSIDE;
+ }
+ const o = i.clippingPolygons;
+ if (defined(o) && o.enabled) {
+ const s = o.computeIntersectionWithBoundingVolume(
+ n
+ );
+ if (this._isClippedByPolygon = s !== Intersect$1.OUTSIDE, s === Intersect$1.INSIDE)
+ return Intersect$1.OUTSIDE;
+ }
+ return t.computeVisibility(n);
+};
+Cesium3DTile.prototype.distanceToTile = function(e) {
+ return getBoundingVolume(this, e).distanceToCamera(e);
+};
+const scratchToTileCenter = new Cartesian3();
+Cesium3DTile.prototype.distanceToTileCenter = function(e) {
+ const n = getBoundingVolume(this, e).boundingVolume, i = Cartesian3.subtract(
+ n.center,
+ e.camera.positionWC,
+ scratchToTileCenter
+ );
+ return Cartesian3.dot(e.camera.directionWC, i);
+};
+Cesium3DTile.prototype.insideViewerRequestVolume = function(e) {
+ const t = this._viewerRequestVolume;
+ return !defined(t) || t.distanceToCamera(e) === 0;
+};
+const scratchMatrix$3 = new Matrix3(), scratchScale$7 = new Cartesian3(), scratchHalfAxes = new Matrix3(), scratchCenter$7 = new Cartesian3(), scratchRectangle$7 = new Rectangle(), scratchOrientedBoundingBox = new OrientedBoundingBox(), scratchTransform = new Matrix4();
+function createBox(e, t, n) {
+ let i = Cartesian3.fromElements(e[0], e[1], e[2], scratchCenter$7), r = Matrix3.fromArray(e, 3, scratchHalfAxes);
+ i = Matrix4.multiplyByPoint(t, i, i);
+ const o = Matrix4.getMatrix3(t, scratchMatrix$3);
+ return r = Matrix3.multiply(o, r, r), defined(n) ? (n.update(i, r), n) : new TileOrientedBoundingBox(i, r);
+}
+function createBoxFromTransformedRegion(e, t, n, i) {
+ const r = Rectangle.unpack(e, 0, scratchRectangle$7), o = e[4], s = e[5], c = OrientedBoundingBox.fromRectangle(
+ r,
+ o,
+ s,
+ Ellipsoid.WGS84,
+ scratchOrientedBoundingBox
+ );
+ let l = c.center, d = c.halfAxes;
+ t = Matrix4.multiplyTransformation(
+ t,
+ Matrix4.inverseTransformation(n, scratchTransform),
+ scratchTransform
+ ), l = Matrix4.multiplyByPoint(t, l, l);
+ const f = Matrix4.getMatrix3(t, scratchMatrix$3);
+ return d = Matrix3.multiply(f, d, d), defined(i) && i instanceof TileOrientedBoundingBox ? (i.update(l, d), i) : new TileOrientedBoundingBox(l, d);
+}
+function createRegion(e, t, n, i) {
+ if (!Matrix4.equalsEpsilon(t, n, CesiumMath.EPSILON8))
+ return createBoxFromTransformedRegion(
+ e,
+ t,
+ n,
+ i
+ );
+ const r = Rectangle.unpack(e, 0, scratchRectangle$7);
+ return defined(i) ? (i.rectangle = Rectangle.clone(r, i.rectangle), i.minimumHeight = e[4], i.maximumHeight = e[5], i.computeBoundingVolumes(Ellipsoid.WGS84), i) : new TileBoundingRegion({
+ rectangle: r,
+ minimumHeight: e[4],
+ maximumHeight: e[5]
+ });
+}
+function createSphere(e, t, n) {
+ let i = Cartesian3.fromElements(
+ e[0],
+ e[1],
+ e[2],
+ scratchCenter$7
+ ), r = e[3];
+ i = Matrix4.multiplyByPoint(t, i, i);
+ const o = Matrix4.getScale(t, scratchScale$7), s = Cartesian3.maximumComponent(o);
+ return r *= s, defined(n) ? (n.update(i, r), n) : new TileBoundingSphere(i, r);
+}
+Cesium3DTile.prototype.createBoundingVolume = function(e, t, n) {
+ const i = this.metadata;
+ let r;
+ if (defined(i) && (r = BoundingVolumeSemantics.parseBoundingVolumeSemantic(
+ "TILE",
+ i
+ )), defined(r) && (e = r), !defined(e))
+ throw new RuntimeError("boundingVolume must be defined");
+ if (hasExtension(e, "3DTILES_bounding_volume_S2"))
+ return new TileBoundingS2Cell(
+ e.extensions["3DTILES_bounding_volume_S2"]
+ );
+ const { box: o, region: s, sphere: c } = e;
+ if (defined(o)) {
+ const l = createBox(o, t, n);
+ return this._verticalExaggeration !== 1 && exaggerateBoundingBox(
+ l,
+ this._verticalExaggeration,
+ this._verticalExaggerationRelativeHeight
+ ), l;
+ }
+ if (defined(s)) {
+ const l = createRegion(
+ s,
+ t,
+ this._initialTransform,
+ n
+ );
+ return this._verticalExaggeration === 1 || (l instanceof TileOrientedBoundingBox ? exaggerateBoundingBox(
+ l,
+ this._verticalExaggeration,
+ this._verticalExaggerationRelativeHeight
+ ) : (l.minimumHeight = VerticalExaggeration.getHeight(
+ l.minimumHeight,
+ this._verticalExaggeration,
+ this._verticalExaggerationRelativeHeight
+ ), l.maximumHeight = VerticalExaggeration.getHeight(
+ l.maximumHeight,
+ this._verticalExaggeration,
+ this._verticalExaggerationRelativeHeight
+ ), l.computeBoundingVolumes(Ellipsoid.WGS84))), l;
+ }
+ if (defined(c)) {
+ const l = createSphere(c, t, n);
+ if (this._verticalExaggeration !== 1) {
+ const d = VerticalExaggeration.getPosition(
+ l.center,
+ Ellipsoid.WGS84,
+ this._verticalExaggeration,
+ this._verticalExaggerationRelativeHeight,
+ scratchCenter$7
+ ), f = l.radius * this._verticalExaggeration;
+ l.update(d, f);
+ }
+ return l;
+ }
+ throw new RuntimeError(
+ "boundingVolume must contain a sphere, region, or box"
+ );
+};
+const scratchExaggeratedCorners = Cartesian3.unpackArray(
+ new Array(8 * 3).fill(0)
+);
+function exaggerateBoundingBox(e, t, n) {
+ const i = e.boundingVolume.computeCorners(scratchExaggeratedCorners).map(
+ (o) => VerticalExaggeration.getPosition(
+ o,
+ Ellipsoid.WGS84,
+ t,
+ n,
+ o
+ )
+ ), r = OrientedBoundingBox.fromPoints(
+ i,
+ scratchOrientedBoundingBox
+ );
+ e.update(
+ r.center,
+ r.halfAxes
+ );
+}
+Cesium3DTile.prototype.updateTransform = function(e, t) {
+ e = defaultValue(e, Matrix4.IDENTITY);
+ const n = Matrix4.multiplyTransformation(
+ e,
+ this.transform,
+ scratchTransform
+ ), i = !Matrix4.equals(
+ n,
+ this.computedTransform
+ ), r = defined(t) && (this._verticalExaggeration !== t.verticalExaggeration || this._verticalExaggerationRelativeHeight !== t.verticalExaggerationRelativeHeight);
+ if (!i && !r)
+ return;
+ i && Matrix4.clone(n, this.computedTransform), r && (this._verticalExaggeration = t.verticalExaggeration, this._verticalExaggerationRelativeHeight = t.verticalExaggerationRelativeHeight);
+ const o = this._header, s = this._contentHeader;
+ this._boundingVolume = this.createBoundingVolume(
+ o.boundingVolume,
+ this.computedTransform,
+ this._boundingVolume
+ ), defined(this._contentBoundingVolume) && (this._contentBoundingVolume = this.createBoundingVolume(
+ s.boundingVolume,
+ this.computedTransform,
+ this._contentBoundingVolume
+ )), defined(this._viewerRequestVolume) && (this._viewerRequestVolume = this.createBoundingVolume(
+ o.viewerRequestVolume,
+ this.computedTransform,
+ this._viewerRequestVolume
+ )), this.updateGeometricErrorScale(), this._debugBoundingVolume = this._debugBoundingVolume && this._debugBoundingVolume.destroy(), this._debugContentBoundingVolume = this._debugContentBoundingVolume && this._debugContentBoundingVolume.destroy(), this._debugViewerRequestVolume = this._debugViewerRequestVolume && this._debugViewerRequestVolume.destroy();
+};
+Cesium3DTile.prototype.updateGeometricErrorScale = function() {
+ const e = Matrix4.getScale(this.computedTransform, scratchScale$7), t = Cartesian3.maximumComponent(e);
+ if (this.geometricError = this._geometricError * t, !defined(this.parent)) {
+ const n = this._tileset;
+ n._scaledGeometricError = n._geometricError * t;
+ }
+};
+function applyDebugSettings$1(e, t, n, i) {
+ if (!i.isRender)
+ return;
+ const r = defined(e._contentHeader) && defined(e._contentHeader.boundingVolume), o = t.debugShowBoundingVolume || t.debugShowContentBoundingVolume && !r;
+ if (o) {
+ let l;
+ e._finalResolution ? e.hasRenderableContent ? l = Color.WHITE : l = Color.DARKGRAY : l = Color.YELLOW, defined(e._debugBoundingVolume) || (e._debugBoundingVolume = e._boundingVolume.createDebugVolume(l)), e._debugBoundingVolume.update(n);
+ const d = e._debugBoundingVolume.getGeometryInstanceAttributes(
+ "outline"
+ );
+ d.color = ColorGeometryInstanceAttribute.toValue(
+ l,
+ d.color
+ );
+ } else !o && defined(e._debugBoundingVolume) && (e._debugBoundingVolume = e._debugBoundingVolume.destroy());
+ t.debugShowContentBoundingVolume && r ? (defined(e._debugContentBoundingVolume) || (e._debugContentBoundingVolume = e._contentBoundingVolume.createDebugVolume(
+ Color.BLUE
+ )), e._debugContentBoundingVolume.update(n)) : !t.debugShowContentBoundingVolume && defined(e._debugContentBoundingVolume) && (e._debugContentBoundingVolume = e._debugContentBoundingVolume.destroy()), t.debugShowViewerRequestVolume && defined(e._viewerRequestVolume) ? (defined(e._debugViewerRequestVolume) || (e._debugViewerRequestVolume = e._viewerRequestVolume.createDebugVolume(
+ Color.YELLOW
+ )), e._debugViewerRequestVolume.update(n)) : !t.debugShowViewerRequestVolume && defined(e._debugViewerRequestVolume) && (e._debugViewerRequestVolume = e._debugViewerRequestVolume.destroy());
+ const s = t.debugColorizeTiles && !e._debugColorizeTiles || defined(t._heatmap.tilePropertyName), c = !t.debugColorizeTiles && e._debugColorizeTiles;
+ s ? (t._heatmap.colorize(e, n), e._debugColorizeTiles = !0, e.color = e._debugColor) : c && (e._debugColorizeTiles = !1, e.color = Color.WHITE), e._colorDirty && (e._colorDirty = !1, e._content.applyDebugSettings(!0, e._color)), c && t.makeStyleDirty();
+}
+function updateContent(e, t, n) {
+ const i = e._expiredContent;
+ if (!e.hasMultipleContents && defined(i)) {
+ if (!e.contentReady) {
+ try {
+ i.update(t, n);
+ } catch {
+ }
+ return;
+ }
+ e._expiredContent.destroy(), e._expiredContent = void 0;
+ }
+ if (defined(e.content))
+ try {
+ e.content.update(t, n);
+ } catch (r) {
+ throw e._contentState = Cesium3DTileContentState$1.FAILED, r;
+ }
+}
+function updateClippingPlanes$1(e, t) {
+ const n = t.clippingPlanes;
+ let i = 0;
+ defined(n) && e._isClipped && n.enabled && (i = n.clippingPlanesState), i !== e._clippingPlanesState && (e._clippingPlanesState = i, e.clippingPlanesDirty = !0);
+}
+function updateClippingPolygons(e, t) {
+ const n = t.clippingPolygons;
+ let i = 0;
+ defined(n) && e._isClippedByPolygon && n.enabled && (i = n.clippingPolygonsState), i !== e._clippingPolygonsState && (e._clippingPolygonsState = i, e.clippingPolygonsDirty = !0);
+}
+Cesium3DTile.prototype.update = function(e, t, n) {
+ const { commandList: i } = t, r = i.length;
+ updateClippingPlanes$1(this, e), updateClippingPolygons(this, e), applyDebugSettings$1(this, e, t, n), updateContent(this, e, t);
+ const o = i.length;
+ this._commandsLength = o - r;
+ for (let s = r; s < o; ++s) {
+ const c = i[s], l = c.pass === Pass$1.TRANSLUCENT;
+ c.depthForTranslucentClassification = l;
+ }
+ this.clippingPlanesDirty = !1, this.clippingPolygonsDirty = !1;
+};
+const scratchCommandList$1 = [];
+Cesium3DTile.prototype.process = function(e, t) {
+ !this.contentExpired && !this.contentReady && this._content.ready && (updateExpireDate(this), this._selectedFrame = 0, this.lastStyleTime = 0, JulianDate.now(this._loadTimestamp), this._contentState = Cesium3DTileContentState$1.READY, !this.hasTilesetContent && !this.hasImplicitContent && (e._statistics.incrementLoadCounts(this.content), ++e._statistics.numberOfTilesWithContentReady, ++e._statistics.numberOfLoadedTilesTotal, e._cache.add(this)));
+ const n = t.commandList;
+ t.commandList = scratchCommandList$1;
+ try {
+ this._content.update(e, t);
+ } catch (i) {
+ throw this._contentState = Cesium3DTileContentState$1.FAILED, i;
+ }
+ scratchCommandList$1.length = 0, t.commandList = n;
+};
+function isolateDigits(e, t, n) {
+ const i = e * Math.pow(10, t);
+ return parseInt(i) * Math.pow(10, n);
+}
+function priorityNormalizeAndClamp(e, t, n) {
+ return Math.max(
+ CesiumMath.normalize(e, t, n) - CesiumMath.EPSILON7,
+ 0
+ );
+}
+Cesium3DTile.prototype.updatePriority = function() {
+ const e = this.tileset, t = e.preferLeaves, n = e._minimumPriority, i = e._maximumPriority, r = 4, o = 1, s = 0, c = r, l = s + c, d = r, f = l + d, h = o, p = Math.pow(
+ 10,
+ f
+ ), m = f + h, _ = o, y = Math.pow(10, m), C = m + _, T = Math.pow(10, C);
+ let x = priorityNormalizeAndClamp(
+ this._depth,
+ n.depth,
+ i.depth
+ );
+ x = t ? 1 - x : x;
+ const S = !e.isSkippingLevelOfDetail && this.refine === Cesium3DTileRefine$1.REPLACE ? priorityNormalizeAndClamp(
+ this._priorityHolder._distanceToCamera,
+ n.distance,
+ i.distance
+ ) : priorityNormalizeAndClamp(
+ this._priorityReverseScreenSpaceError,
+ n.reverseScreenSpaceError,
+ i.reverseScreenSpaceError
+ ), E = isolateDigits(
+ S,
+ c,
+ s
+ ), A = this._priorityProgressiveResolution ? 0 : p, D = priorityNormalizeAndClamp(
+ this._priorityHolder._foveatedFactor,
+ n.foveatedFactor,
+ i.foveatedFactor
+ ), P = isolateDigits(
+ D,
+ d,
+ l
+ ), I = this.priorityDeferred ? y : 0, M = e._pass === Cesium3DTilePass$1.PRELOAD_FLIGHT ? 0 : T;
+ this._priority = x + E + A + P + I + M;
+};
+Cesium3DTile.prototype.isDestroyed = function() {
+ return !1;
+};
+Cesium3DTile.prototype.destroy = function() {
+ return this._content = this._content && this._content.destroy(), this._expiredContent = this._expiredContent && !this._expiredContent.isDestroyed() && this._expiredContent.destroy(), this._debugBoundingVolume = this._debugBoundingVolume && this._debugBoundingVolume.destroy(), this._debugContentBoundingVolume = this._debugContentBoundingVolume && this._debugContentBoundingVolume.destroy(), this._debugViewerRequestVolume = this._debugViewerRequestVolume && this._debugViewerRequestVolume.destroy(), destroyObject(this);
+};
+function GroupMetadata(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.id, n = e.group, i = e.class, r = defined(n.properties) ? n.properties : {};
+ this._class = i, this._properties = r, this._id = t, this._extras = n.extras, this._extensions = n.extensions;
+}
+Object.defineProperties(GroupMetadata.prototype, {
+ /**
+ * The class that properties conform to.
+ *
+ * @memberof GroupMetadata.prototype
+ * @type {MetadataClass}
+ * @readonly
+ * @private
+ */
+ class: {
+ get: function() {
+ return this._class;
+ }
+ },
+ /**
+ * The ID of the group.
+ *
+ * @memberof GroupMetadata.prototype
+ * @type {string}
+ * @readonly
+ * @private
+ */
+ id: {
+ get: function() {
+ return this._id;
+ }
+ },
+ /**
+ * Extra user-defined properties.
+ *
+ * @memberof GroupMetadata.prototype
+ * @type {*}
+ * @readonly
+ * @private
+ */
+ extras: {
+ get: function() {
+ return this._extras;
+ }
+ },
+ /**
+ * An object containing extensions.
+ *
+ * @memberof GroupMetadata.prototype
+ * @type {object}
+ * @readonly
+ * @private
+ */
+ extensions: {
+ get: function() {
+ return this._extensions;
+ }
+ }
+});
+GroupMetadata.prototype.hasProperty = function(e) {
+ return MetadataEntity.hasProperty(e, this._properties, this._class);
+};
+GroupMetadata.prototype.hasPropertyBySemantic = function(e) {
+ return MetadataEntity.hasPropertyBySemantic(
+ e,
+ this._properties,
+ this._class
+ );
+};
+GroupMetadata.prototype.getPropertyIds = function(e) {
+ return MetadataEntity.getPropertyIds(this._properties, this._class, e);
+};
+GroupMetadata.prototype.getProperty = function(e) {
+ return MetadataEntity.getProperty(e, this._properties, this._class);
+};
+GroupMetadata.prototype.setProperty = function(e, t) {
+ return MetadataEntity.setProperty(
+ e,
+ t,
+ this._properties,
+ this._class
+ );
+};
+GroupMetadata.prototype.getPropertyBySemantic = function(e) {
+ return MetadataEntity.getPropertyBySemantic(
+ e,
+ this._properties,
+ this._class
+ );
+};
+GroupMetadata.prototype.setPropertyBySemantic = function(e, t) {
+ return MetadataEntity.setPropertyBySemantic(
+ e,
+ t,
+ this._properties,
+ this._class
+ );
+};
+function TilesetMetadata(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.tileset, n = e.class, i = defined(t.properties) ? t.properties : {};
+ this._class = n, this._properties = i, this._extras = t.extras, this._extensions = t.extensions;
+}
+Object.defineProperties(TilesetMetadata.prototype, {
+ /**
+ * The class that properties conform to.
+ *
+ * @memberof TilesetMetadata.prototype
+ * @type {MetadataClass}
+ * @readonly
+ * @private
+ */
+ class: {
+ get: function() {
+ return this._class;
+ }
+ },
+ /**
+ * Extra user-defined properties.
+ *
+ * @memberof TilesetMetadata.prototype
+ * @type {*}
+ * @readonly
+ * @private
+ */
+ extras: {
+ get: function() {
+ return this._extras;
+ }
+ },
+ /**
+ * An object containing extensions.
+ *
+ * @memberof TilesetMetadata.prototype
+ * @type {object}
+ * @readonly
+ * @private
+ */
+ extensions: {
+ get: function() {
+ return this._extensions;
+ }
+ }
+});
+TilesetMetadata.prototype.hasProperty = function(e) {
+ return MetadataEntity.hasProperty(e, this._properties, this._class);
+};
+TilesetMetadata.prototype.hasPropertyBySemantic = function(e) {
+ return MetadataEntity.hasPropertyBySemantic(
+ e,
+ this._properties,
+ this._class
+ );
+};
+TilesetMetadata.prototype.getPropertyIds = function(e) {
+ return MetadataEntity.getPropertyIds(this._properties, this._class, e);
+};
+TilesetMetadata.prototype.getProperty = function(e) {
+ return MetadataEntity.getProperty(e, this._properties, this._class);
+};
+TilesetMetadata.prototype.setProperty = function(e, t) {
+ return MetadataEntity.setProperty(
+ e,
+ t,
+ this._properties,
+ this._class
+ );
+};
+TilesetMetadata.prototype.getPropertyBySemantic = function(e) {
+ return MetadataEntity.getPropertyBySemantic(
+ e,
+ this._properties,
+ this._class
+ );
+};
+TilesetMetadata.prototype.setPropertyBySemantic = function(e, t) {
+ return MetadataEntity.setPropertyBySemantic(
+ e,
+ t,
+ this._properties,
+ this._class
+ );
+};
+function Cesium3DTilesetMetadata(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.metadataJson, n = e.schema, i = defaultValue(t.metadata, t.tileset);
+ let r;
+ defined(i) && (r = new TilesetMetadata({
+ tileset: i,
+ class: n.classes[i.class]
+ }));
+ let o = [];
+ const s = [], c = t.groups;
+ if (Array.isArray(c)) {
+ const l = c.length;
+ for (let d = 0; d < l; d++) {
+ const f = c[d];
+ s.push(
+ new GroupMetadata({
+ group: f,
+ class: n.classes[f.class]
+ })
+ );
+ }
+ } else if (defined(c)) {
+ o = Object.keys(c).sort();
+ const l = o.length;
+ for (let d = 0; d < l; d++) {
+ const f = o[d];
+ if (c.hasOwnProperty(f)) {
+ const h = c[f];
+ s.push(
+ new GroupMetadata({
+ id: f,
+ group: c[f],
+ class: n.classes[h.class]
+ })
+ );
+ }
+ }
+ }
+ this._schema = n, this._groups = s, this._groupIds = o, this._tileset = r, this._statistics = t.statistics, this._extras = t.extras, this._extensions = t.extensions;
+}
+Object.defineProperties(Cesium3DTilesetMetadata.prototype, {
+ /**
+ * Schema containing classes and enums.
+ *
+ * @memberof Cesium3DTilesetMetadata.prototype
+ * @type {MetadataSchema}
+ * @readonly
+ * @private
+ */
+ schema: {
+ get: function() {
+ return this._schema;
+ }
+ },
+ /**
+ * Metadata about groups of content.
+ *
+ * @memberof Cesium3DTilesetMetadata.prototype
+ * @type {GroupMetadata[]}
+ * @readonly
+ * @private
+ */
+ groups: {
+ get: function() {
+ return this._groups;
+ }
+ },
+ /**
+ * The IDs of the group metadata in the corresponding groups dictionary.
+ * Only populated if using the legacy schema.
+ *
+ * @memberof Cesium3DTilesetMetadata.prototype
+ * @type {}
+ * @readonly
+ * @private
+ */
+ groupIds: {
+ get: function() {
+ return this._groupIds;
+ }
+ },
+ /**
+ * Metadata about the tileset as a whole.
+ *
+ * @memberof Cesium3DTilesetMetadata.prototype
+ * @type {TilesetMetadata}
+ * @readonly
+ * @private
+ */
+ tileset: {
+ get: function() {
+ return this._tileset;
+ }
+ },
+ /**
+ * Statistics about the metadata.
+ * + * See the {@link https://github.com/CesiumGS/3d-tiles/blob/main/extensions/3DTILES_metadata/schema/statistics.schema.json|statistics schema reference} + * in the 3D Tiles spec for the full set of properties. + *
+ * + * @memberof Cesium3DTilesetMetadata.prototype + * @type {object} + * @readonly + * @private + */ + statistics: { + get: function() { + return this._statistics; + } + }, + /** + * Extra user-defined properties. + * + * @memberof Cesium3DTilesetMetadata.prototype + * @type {*} + * @readonly + * @private + */ + extras: { + get: function() { + return this._extras; + } + }, + /** + * An object containing extensions. + * + * @memberof Cesium3DTilesetMetadata.prototype + * @type {object} + * @readonly + * @private + */ + extensions: { + get: function() { + return this._extensions; + } + } +}); +const Cesium3DTileOptimizations = {}, scratchAxis$1 = new Cartesian3(); +Cesium3DTileOptimizations.checkChildrenWithinParent = function(e) { + const t = e.children, n = t.length, i = e.boundingVolume; + if (i instanceof TileOrientedBoundingBox || i instanceof TileBoundingRegion) { + const r = i._orientedBoundingBox; + e._optimChildrenWithinParent = Cesium3DTileOptimizationHint$1.USE_OPTIMIZATION; + for (let o = 0; o < n; ++o) { + const c = t[o].boundingVolume; + if (!(c instanceof TileOrientedBoundingBox || c instanceof TileBoundingRegion)) { + e._optimChildrenWithinParent = Cesium3DTileOptimizationHint$1.SKIP_OPTIMIZATION; + break; + } + const l = c._orientedBoundingBox, d = Cartesian3.subtract( + l.center, + r.center, + scratchAxis$1 + ), f = Cartesian3.magnitude(d); + Cartesian3.divideByScalar(d, f, d); + const h = Math.abs(r.halfAxes[0] * d.x) + Math.abs(r.halfAxes[1] * d.y) + Math.abs(r.halfAxes[2] * d.z) + Math.abs(r.halfAxes[3] * d.x) + Math.abs(r.halfAxes[4] * d.y) + Math.abs(r.halfAxes[5] * d.z) + Math.abs(r.halfAxes[6] * d.x) + Math.abs(r.halfAxes[7] * d.y) + Math.abs(r.halfAxes[8] * d.z), p = Math.abs(l.halfAxes[0] * d.x) + Math.abs(l.halfAxes[1] * d.y) + Math.abs(l.halfAxes[2] * d.z) + Math.abs(l.halfAxes[3] * d.x) + Math.abs(l.halfAxes[4] * d.y) + Math.abs(l.halfAxes[5] * d.z) + Math.abs(l.halfAxes[6] * d.x) + Math.abs(l.halfAxes[7] * d.y) + Math.abs(l.halfAxes[8] * d.z); + if (h <= p + f) { + e._optimChildrenWithinParent = Cesium3DTileOptimizationHint$1.SKIP_OPTIMIZATION; + break; + } + } + } + return e._optimChildrenWithinParent === Cesium3DTileOptimizationHint$1.USE_OPTIMIZATION; +}; +function DoublyLinkedList() { + this.head = void 0, this.tail = void 0, this._length = 0; +} +Object.defineProperties(DoublyLinkedList.prototype, { + length: { + get: function() { + return this._length; + } + } +}); +function DoublyLinkedListNode(e, t, n) { + this.item = e, this.previous = t, this.next = n; +} +DoublyLinkedList.prototype.add = function(e) { + const t = new DoublyLinkedListNode(e, this.tail, void 0); + return defined(this.tail) ? (this.tail.next = t, this.tail = t) : (this.head = t, this.tail = t), ++this._length, t; +}; +function remove$2(e, t) { + defined(t.previous) && defined(t.next) ? (t.previous.next = t.next, t.next.previous = t.previous) : defined(t.previous) ? (t.previous.next = void 0, e.tail = t.previous) : defined(t.next) ? (t.next.previous = void 0, e.head = t.next) : (e.head = void 0, e.tail = void 0), t.next = void 0, t.previous = void 0; +} +DoublyLinkedList.prototype.remove = function(e) { + defined(e) && (remove$2(this, e), --this._length); +}; +DoublyLinkedList.prototype.splice = function(e, t) { + if (e === t) + return; + remove$2(this, t); + const n = e.next; + e.next = t, this.tail === e ? this.tail = t : n.previous = t, t.next = n, t.previous = e; +}; +function Cesium3DTilesetCache() { + this._list = new DoublyLinkedList(), this._sentinel = this._list.add(), this._trimTiles = !1; +} +Cesium3DTilesetCache.prototype.reset = function() { + this._list.splice(this._list.tail, this._sentinel); +}; +Cesium3DTilesetCache.prototype.touch = function(e) { + const t = e.cacheNode; + defined(t) && this._list.splice(this._sentinel, t); +}; +Cesium3DTilesetCache.prototype.add = function(e) { + defined(e.cacheNode) || (e.cacheNode = this._list.add(e)); +}; +Cesium3DTilesetCache.prototype.unloadTile = function(e, t, n) { + const i = t.cacheNode; + defined(i) && (this._list.remove(i), t.cacheNode = void 0, n(e, t)); +}; +Cesium3DTilesetCache.prototype.unloadTiles = function(e, t) { + const n = this._trimTiles; + this._trimTiles = !1; + const i = this._list, r = this._sentinel; + let o = i.head; + for (; o !== r && (e.totalMemoryUsageInBytes > e.cacheBytes || n); ) { + const s = o.item; + o = o.next, this.unloadTile(e, s, t); + } +}; +Cesium3DTilesetCache.prototype.trim = function() { + this._trimTiles = !0; +}; +function Cesium3DTilesetHeatmap(e) { + this.tilePropertyName = e, this._minimum = Number.MAX_VALUE, this._maximum = -Number.MAX_VALUE, this._previousMinimum = Number.MAX_VALUE, this._previousMaximum = -Number.MAX_VALUE, this._referenceMinimum = {}, this._referenceMaximum = {}; +} +function getHeatmapValue(e, t) { + let n; + return t === "_loadTimestamp" ? n = JulianDate.toDate(e).getTime() : n = e, n; +} +Cesium3DTilesetHeatmap.prototype.setReferenceMinimumMaximum = function(e, t, n) { + this._referenceMinimum[n] = getHeatmapValue( + e, + n + ), this._referenceMaximum[n] = getHeatmapValue( + t, + n + ); +}; +function getHeatmapValueAndUpdateMinimumMaximum(e, t) { + const n = e.tilePropertyName; + if (defined(n)) { + const i = getHeatmapValue( + t[n], + n + ); + return defined(i) ? (e._maximum = Math.max(i, e._maximum), e._minimum = Math.min(i, e._minimum), i) : (e.tilePropertyName = void 0, i); + } +} +const heatmapColors = [ + new Color(0.1, 0.1, 0.1, 1), + // Dark Gray + new Color(0.153, 0.278, 0.878, 1), + // Blue + new Color(0.827, 0.231, 0.49, 1), + // Pink + new Color(0.827, 0.188, 0.22, 1), + // Red + new Color(1, 0.592, 0.259, 1), + // Orange + new Color(1, 0.843, 0, 1) +]; +Cesium3DTilesetHeatmap.prototype.colorize = function(e, t) { + const n = this.tilePropertyName; + if (!defined(n) || !e.contentAvailable || e._selectedFrame !== t.frameNumber) + return; + const i = getHeatmapValueAndUpdateMinimumMaximum(this, e), r = this._previousMinimum, o = this._previousMaximum; + if (r === Number.MAX_VALUE || o === -Number.MAX_VALUE) + return; + const s = o - r + CesiumMath.EPSILON7, l = CesiumMath.clamp( + i - r, + 0, + s + ) / s, d = heatmapColors.length - 1, f = l * d, h = Math.floor(f), p = Math.ceil(f), m = f - h, _ = heatmapColors[h], y = heatmapColors[p], C = Color.clone(Color.WHITE); + C.red = CesiumMath.lerp(_.red, y.red, m), C.green = CesiumMath.lerp(_.green, y.green, m), C.blue = CesiumMath.lerp(_.blue, y.blue, m), e._debugColor = C; +}; +Cesium3DTilesetHeatmap.prototype.resetMinimumMaximum = function() { + const e = this.tilePropertyName; + if (defined(e)) { + const t = this._referenceMinimum[e], n = this._referenceMaximum[e], i = defined(t) && defined(n); + this._previousMinimum = i ? t : this._minimum, this._previousMaximum = i ? n : this._maximum, this._minimum = Number.MAX_VALUE, this._maximum = -Number.MAX_VALUE; + } +}; +function Cesium3DTilesetStatistics() { + this.selected = 0, this.visited = 0, this.numberOfCommands = 0, this.numberOfAttemptedRequests = 0, this.numberOfPendingRequests = 0, this.numberOfTilesProcessing = 0, this.numberOfTilesWithContentReady = 0, this.numberOfTilesTotal = 0, this.numberOfLoadedTilesTotal = 0, this.numberOfFeaturesSelected = 0, this.numberOfFeaturesLoaded = 0, this.numberOfPointsSelected = 0, this.numberOfPointsLoaded = 0, this.numberOfTrianglesSelected = 0, this.numberOfTilesStyled = 0, this.numberOfFeaturesStyled = 0, this.numberOfTilesCulledWithChildrenUnion = 0, this.geometryByteLength = 0, this.texturesByteLength = 0, this.batchTableByteLength = 0; +} +Cesium3DTilesetStatistics.prototype.clear = function() { + this.selected = 0, this.visited = 0, this.numberOfCommands = 0, this.numberOfAttemptedRequests = 0, this.numberOfFeaturesSelected = 0, this.numberOfPointsSelected = 0, this.numberOfTrianglesSelected = 0, this.numberOfTilesStyled = 0, this.numberOfFeaturesStyled = 0, this.numberOfTilesCulledWithChildrenUnion = 0; +}; +function updatePointAndFeatureCounts(e, t, n, i) { + const r = t.innerContents, o = t.pointsLength, s = t.trianglesLength, c = t.featuresLength, l = t.geometryByteLength, d = t.texturesByteLength, f = t.batchTableByteLength; + if (i ? (e.numberOfFeaturesLoaded += n ? -c : c, e.numberOfPointsLoaded += n ? -o : o, e.geometryByteLength += n ? -l : l, e.texturesByteLength += n ? -d : d, e.batchTableByteLength += n ? -f : f) : (e.numberOfFeaturesSelected += n ? -c : c, e.numberOfPointsSelected += n ? -o : o, e.numberOfTrianglesSelected += n ? -s : s), defined(r)) { + const h = r.length; + for (let p = 0; p < h; ++p) + updatePointAndFeatureCounts(e, r[p], n, i); + } +} +Cesium3DTilesetStatistics.prototype.incrementSelectionCounts = function(e) { + updatePointAndFeatureCounts(this, e, !1, !1); +}; +Cesium3DTilesetStatistics.prototype.incrementLoadCounts = function(e) { + updatePointAndFeatureCounts(this, e, !1, !0); +}; +Cesium3DTilesetStatistics.prototype.decrementLoadCounts = function(e) { + updatePointAndFeatureCounts(this, e, !0, !0); +}; +Cesium3DTilesetStatistics.clone = function(e, t) { + t.selected = e.selected, t.visited = e.visited, t.numberOfCommands = e.numberOfCommands, t.selected = e.selected, t.numberOfAttemptedRequests = e.numberOfAttemptedRequests, t.numberOfPendingRequests = e.numberOfPendingRequests, t.numberOfTilesProcessing = e.numberOfTilesProcessing, t.numberOfTilesWithContentReady = e.numberOfTilesWithContentReady, t.numberOfTilesTotal = e.numberOfTilesTotal, t.numberOfFeaturesSelected = e.numberOfFeaturesSelected, t.numberOfFeaturesLoaded = e.numberOfFeaturesLoaded, t.numberOfPointsSelected = e.numberOfPointsSelected, t.numberOfPointsLoaded = e.numberOfPointsLoaded, t.numberOfTrianglesSelected = e.numberOfTrianglesSelected, t.numberOfTilesStyled = e.numberOfTilesStyled, t.numberOfFeaturesStyled = e.numberOfFeaturesStyled, t.numberOfTilesCulledWithChildrenUnion = e.numberOfTilesCulledWithChildrenUnion, t.geometryByteLength = e.geometryByteLength, t.texturesByteLength = e.texturesByteLength, t.batchTableByteLength = e.batchTableByteLength; +}; +function Cesium3DTileStyleEngine() { + this._style = void 0, this._styleDirty = !1, this._lastStyleTime = 0; +} +Object.defineProperties(Cesium3DTileStyleEngine.prototype, { + style: { + get: function() { + return this._style; + }, + set: function(e) { + e !== this._style && (this._style = e, this._styleDirty = !0); + } + } +}); +Cesium3DTileStyleEngine.prototype.makeDirty = function() { + this._styleDirty = !0; +}; +Cesium3DTileStyleEngine.prototype.resetDirty = function() { + this._styleDirty = !1; +}; +Cesium3DTileStyleEngine.prototype.applyStyle = function(e) { + if (!defined(e.root) || defined(this._style) && !this._style._ready) + return; + const t = this._styleDirty; + t && ++this._lastStyleTime; + const n = this._lastStyleTime, i = e._statistics, r = t ? e._selectedTiles : e._selectedTilesToStyle, o = r.length; + for (let s = 0; s < o; ++s) { + const c = r[s]; + if (c.lastStyleTime !== n) { + const l = c.content; + c.lastStyleTime = n, l.applyStyle(this._style), i.numberOfFeaturesStyled += l.featuresLength, ++i.numberOfTilesStyled; + } + } +}; +function ImplicitTileset(e, t, n) { + const i = hasExtension(t, "3DTILES_implicit_tiling") ? t.extensions["3DTILES_implicit_tiling"] : t.implicitTiling; + this.baseResource = e, this.geometricError = t.geometricError, this.metadataSchema = n; + const r = t.boundingVolume; + if (!defined(r.box) && !defined(r.region) && !hasExtension(r, "3DTILES_bounding_volume_S2") && !hasExtension(r, "3DTILES_bounding_volume_cylinder")) + throw new RuntimeError( + "Only box, region, 3DTILES_bounding_volume_S2, and 3DTILES_bounding_volume_cylinder are supported for implicit tiling" + ); + this.boundingVolume = r, this.refine = t.refine, this.subtreeUriTemplate = new Resource({ url: i.subtrees.uri }), this.contentUriTemplates = [], this.contentHeaders = []; + const o = gatherContentHeaders(t); + for (let s = 0; s < o.length; s++) { + const c = o[s]; + this.contentHeaders.push(clone$1(c, !0)); + const l = new Resource({ url: c.uri }); + this.contentUriTemplates.push(l); + } + this.contentCount = this.contentHeaders.length, this.tileHeader = makeTileHeaderTemplate(t), this.subdivisionScheme = ImplicitSubdivisionScheme$1[i.subdivisionScheme], this.branchingFactor = ImplicitSubdivisionScheme$1.getBranchingFactor( + this.subdivisionScheme + ), this.subtreeLevels = i.subtreeLevels, defined(i.availableLevels) ? this.availableLevels = i.availableLevels : this.availableLevels = i.maximumLevel + 1; +} +function gatherContentHeaders(e) { + if (hasExtension(e, "3DTILES_multiple_contents")) { + const t = e.extensions["3DTILES_multiple_contents"]; + return defined(t.contents) ? t.contents : t.content; + } + return defined(e.contents) ? e.contents : defined(e.content) ? [e.content] : []; +} +function makeTileHeaderTemplate(e) { + const t = clone$1(e, !0); + return defined(t.extensions) && (delete t.extensions["3DTILES_implicit_tiling"], delete t.extensions["3DTILES_multiple_contents"], Object.keys(t.extensions).length === 0 && delete t.extensions), delete t.implicitTiling, delete t.contents, delete t.content, t; +} +const MortonOrder = {}; +function insertOneSpacing(e) { + return e = (e ^ e << 8) & 16711935, e = (e ^ e << 4) & 252645135, e = (e ^ e << 2) & 858993459, e = (e ^ e << 1) & 1431655765, e; +} +function insertTwoSpacing(e) { + return e = (e ^ e << 16) & 50331903, e = (e ^ e << 8) & 50393103, e = (e ^ e << 4) & 51130563, e = (e ^ e << 2) & 153391689, e; +} +function removeOneSpacing(e) { + return e &= 1431655765, e = (e ^ e >> 1) & 858993459, e = (e ^ e >> 2) & 252645135, e = (e ^ e >> 4) & 16711935, e = (e ^ e >> 8) & 65535, e; +} +function removeTwoSpacing(e) { + return e &= 153391689, e = (e ^ e >> 2) & 51130563, e = (e ^ e >> 4) & 50393103, e = (e ^ e >> 8) & 4278190335, e = (e ^ e >> 16) & 1023, e; +} +MortonOrder.encode2D = function(e, t) { + return (insertOneSpacing(e) | insertOneSpacing(t) << 1) >>> 0; +}; +MortonOrder.decode2D = function(e, t) { + return defined(t) || (t = new Array(2)), t[0] = removeOneSpacing(e), t[1] = removeOneSpacing(e >> 1), t; +}; +MortonOrder.encode3D = function(e, t, n) { + return insertTwoSpacing(e) | insertTwoSpacing(t) << 1 | insertTwoSpacing(n) << 2; +}; +MortonOrder.decode3D = function(e, t) { + return defined(t) || (t = new Array(3)), t[0] = removeTwoSpacing(e), t[1] = removeTwoSpacing(e >> 1), t[2] = removeTwoSpacing(e >> 2), t; +}; +function ImplicitTileCoordinates(e) { + this.subdivisionScheme = e.subdivisionScheme, this.subtreeLevels = e.subtreeLevels, this.level = e.level, this.x = e.x, this.y = e.y, this.z = void 0, e.subdivisionScheme === ImplicitSubdivisionScheme$1.OCTREE && (this.z = e.z); +} +Object.defineProperties(ImplicitTileCoordinates.prototype, { + /** + * An index in the range of [0, branchingFactor) that indicates + * which child of the parent cell these coordinates correspond to. + * This can be viewed as a morton index within the parent tile. + *+ * This is the last 3 bits of the morton index of the tile, but it can + * be computed more directly by concatenating the bits [z0] y0 x0 + *
+ * + * @type {number} + * @readonly + * @private + */ + childIndex: { + get: function() { + let e = 0; + return e |= this.x & 1, e |= (this.y & 1) << 1, this.subdivisionScheme === ImplicitSubdivisionScheme$1.OCTREE && (e |= (this.z & 1) << 2), e; + } + }, + /** + * Get the Morton index for this tile within the current level by interleaving + * the bits of the x, y and z coordinates. + * + * @type {number} + * @readonly + * @private + */ + mortonIndex: { + get: function() { + return this.subdivisionScheme === ImplicitSubdivisionScheme$1.OCTREE ? MortonOrder.encode3D(this.x, this.y, this.z) : MortonOrder.encode2D(this.x, this.y); + } + }, + /** + * Get the tile index by adding the Morton index to the level offset + * + * @type {number} + * @readonly + * @private + */ + tileIndex: { + get: function() { + const e = this.subdivisionScheme === ImplicitSubdivisionScheme$1.OCTREE ? ( + // (8^N - 1) / (8-1) + ((1 << 3 * this.level) - 1) / 7 + ) : ( + // (4^N - 1) / (4-1) + ((1 << 2 * this.level) - 1) / 3 + ), t = this.mortonIndex; + return e + t; + } + } +}); +ImplicitTileCoordinates.prototype.getDescendantCoordinates = function(e) { + const t = this.level + e.level, n = (this.x << e.level) + e.x, i = (this.y << e.level) + e.y; + if (this.subdivisionScheme === ImplicitSubdivisionScheme$1.OCTREE) { + const r = (this.z << e.level) + e.z; + return new ImplicitTileCoordinates({ + subdivisionScheme: this.subdivisionScheme, + subtreeLevels: this.subtreeLevels, + level: t, + x: n, + y: i, + z: r + }); + } + return new ImplicitTileCoordinates({ + subdivisionScheme: this.subdivisionScheme, + subtreeLevels: this.subtreeLevels, + level: t, + x: n, + y: i + }); +}; +ImplicitTileCoordinates.prototype.getAncestorCoordinates = function(e) { + const t = 1 << e, n = this.level - e, i = Math.floor(this.x / t), r = Math.floor(this.y / t); + if (this.subdivisionScheme === ImplicitSubdivisionScheme$1.OCTREE) { + const o = Math.floor(this.z / t); + return new ImplicitTileCoordinates({ + subdivisionScheme: this.subdivisionScheme, + subtreeLevels: this.subtreeLevels, + level: n, + x: i, + y: r, + z: o + }); + } + return new ImplicitTileCoordinates({ + subdivisionScheme: this.subdivisionScheme, + subtreeLevels: this.subtreeLevels, + level: n, + x: i, + y: r + }); +}; +ImplicitTileCoordinates.prototype.getOffsetCoordinates = function(e) { + const t = e.level - this.level, n = 1 << t, i = e.x % n, r = e.y % n; + if (this.subdivisionScheme === ImplicitSubdivisionScheme$1.OCTREE) { + const o = e.z % n; + return new ImplicitTileCoordinates({ + subdivisionScheme: this.subdivisionScheme, + subtreeLevels: this.subtreeLevels, + level: t, + x: i, + y: r, + z: o + }); + } + return new ImplicitTileCoordinates({ + subdivisionScheme: this.subdivisionScheme, + subtreeLevels: this.subtreeLevels, + level: t, + x: i, + y: r + }); +}; +ImplicitTileCoordinates.prototype.getChildCoordinates = function(e) { + const t = this.level + 1, n = 2 * this.x + e % 2, i = 2 * this.y + Math.floor(e / 2) % 2; + if (this.subdivisionScheme === ImplicitSubdivisionScheme$1.OCTREE) { + const r = 2 * this.z + Math.floor(e / 4) % 2; + return new ImplicitTileCoordinates({ + subdivisionScheme: this.subdivisionScheme, + subtreeLevels: this.subtreeLevels, + level: t, + x: n, + y: i, + z: r + }); + } + return new ImplicitTileCoordinates({ + subdivisionScheme: this.subdivisionScheme, + subtreeLevels: this.subtreeLevels, + level: t, + x: n, + y: i + }); +}; +ImplicitTileCoordinates.prototype.getSubtreeCoordinates = function() { + return this.getAncestorCoordinates(this.level % this.subtreeLevels); +}; +ImplicitTileCoordinates.prototype.getParentSubtreeCoordinates = function() { + return this.getAncestorCoordinates( + this.level % this.subtreeLevels + this.subtreeLevels + ); +}; +ImplicitTileCoordinates.prototype.isAncestor = function(e) { + const t = e.level - this.level; + if (t <= 0) + return !1; + const n = e.x >> t, i = e.y >> t, r = this.x === n, o = this.y === i; + if (this.subdivisionScheme === ImplicitSubdivisionScheme$1.OCTREE) { + const s = e.z >> t, c = this.z === s; + return r && o && c; + } + return r && o; +}; +ImplicitTileCoordinates.prototype.isEqual = function(e) { + return this.subdivisionScheme === e.subdivisionScheme && this.subtreeLevels === e.subtreeLevels && this.level === e.level && this.x === e.x && this.y === e.y && (this.subdivisionScheme === ImplicitSubdivisionScheme$1.OCTREE ? this.z === e.z : !0); +}; +ImplicitTileCoordinates.prototype.isImplicitTilesetRoot = function() { + return this.level === 0; +}; +ImplicitTileCoordinates.prototype.isSubtreeRoot = function() { + return this.level % this.subtreeLevels === 0; +}; +ImplicitTileCoordinates.prototype.isBottomOfSubtree = function() { + return this.level % this.subtreeLevels === this.subtreeLevels - 1; +}; +ImplicitTileCoordinates.prototype.getTemplateValues = function() { + const e = { + level: this.level, + x: this.x, + y: this.y + }; + return this.subdivisionScheme === ImplicitSubdivisionScheme$1.OCTREE && (e.z = this.z), e; +}; +const scratchCoordinatesArray = [0, 0, 0]; +ImplicitTileCoordinates.fromMortonIndex = function(e, t, n, i) { + let r; + return e === ImplicitSubdivisionScheme$1.OCTREE ? (r = MortonOrder.decode3D( + i, + scratchCoordinatesArray + ), new ImplicitTileCoordinates({ + subdivisionScheme: e, + subtreeLevels: t, + level: n, + x: r[0], + y: r[1], + z: r[2] + })) : (r = MortonOrder.decode2D(i, scratchCoordinatesArray), new ImplicitTileCoordinates({ + subdivisionScheme: e, + subtreeLevels: t, + level: n, + x: r[0], + y: r[1] + })); +}; +ImplicitTileCoordinates.fromTileIndex = function(e, t, n) { + let i, r, o; + return e === ImplicitSubdivisionScheme$1.OCTREE ? (i = Math.floor(CesiumMath.log2(7 * n + 1) / 3), r = ((1 << 3 * i) - 1) / 7, o = n - r) : (i = Math.floor(CesiumMath.log2(3 * n + 1) / 2), r = ((1 << 2 * i) - 1) / 3, o = n - r), ImplicitTileCoordinates.fromMortonIndex( + e, + t, + i, + o + ); +}; +function Cesium3DTilesetTraversal() { +} +Cesium3DTilesetTraversal.selectTiles = function(e, t) { + DeveloperError.throwInstantiationError(); +}; +Cesium3DTilesetTraversal.sortChildrenByDistanceToCamera = function(e, t) { + return t._distanceToCamera === 0 && e._distanceToCamera === 0 ? t._centerZDepth - e._centerZDepth : t._distanceToCamera - e._distanceToCamera; +}; +Cesium3DTilesetTraversal.canTraverse = function(e) { + return e.children.length === 0 ? !1 : e.hasTilesetContent || e.hasImplicitContent ? !e.contentExpired : e._screenSpaceError > e.tileset.memoryAdjustedScreenSpaceError; +}; +Cesium3DTilesetTraversal.selectTile = function(e, t) { + if (e.contentVisibility(t) === Intersect$1.OUTSIDE) + return; + e._wasSelectedLastFrame = !0; + const { content: n, tileset: i } = e; + n.featurePropertiesDirty ? (n.featurePropertiesDirty = !1, e.lastStyleTime = 0, i._selectedTilesToStyle.push(e)) : e._selectedFrame < t.frameNumber - 1 && (i._selectedTilesToStyle.push(e), e._wasSelectedLastFrame = !1), e._selectedFrame = t.frameNumber, i._selectedTiles.push(e); +}; +Cesium3DTilesetTraversal.visitTile = function(e, t) { + ++e.tileset._statistics.visited, e._visitedFrame = t.frameNumber; +}; +Cesium3DTilesetTraversal.touchTile = function(e, t) { + e._touchedFrame !== t.frameNumber && (e.tileset._cache.touch(e), e._touchedFrame = t.frameNumber); +}; +Cesium3DTilesetTraversal.loadTile = function(e, t) { + const { tileset: n } = e; + if (e._requestedFrame === t.frameNumber || !e.hasUnloadedRenderableContent && !e.contentExpired || !isOnScreenLongEnough(e, t)) + return; + const i = t.camera.timeSinceMoved < n.foveatedTimeDelay; + e.priorityDeferred && i || (e._requestedFrame = t.frameNumber, n._requestedTiles.push(e)); +}; +function isOnScreenLongEnough(e, t) { + const { tileset: n } = e; + if (!n._cullRequestsWhileMoving) + return !0; + const { + positionWCDeltaMagnitude: i, + positionWCDeltaMagnitudeLastFrame: r + } = t.camera, o = i !== 0 ? i : r, s = Math.max(e.boundingSphere.radius * 2, 1); + return n.cullRequestsWhileMovingMultiplier * o / s < 1; +} +Cesium3DTilesetTraversal.updateTile = function(e, t) { + updateTileVisibility(e, t), e.updateExpiration(), e._wasMinPriorityChild = !1, e._priorityHolder = e, updateMinimumMaximumPriority(e), e._shouldSelect = !1, e._finalResolution = !0; +}; +function updateTileVisibility(e, t) { + if (e.updateVisibility(t), !e.isVisible) + return; + const n = e.children.length > 0; + if ((e.hasTilesetContent || e.hasImplicitContent) && n) { + const o = e.children[0]; + updateTileVisibility(o, t), e._visible = o._visible; + return; + } + if (meetsScreenSpaceErrorEarly(e, t)) { + e._visible = !1; + return; + } + const i = e.refine === Cesium3DTileRefine$1.REPLACE, r = e._optimChildrenWithinParent === Cesium3DTileOptimizationHint$1.USE_OPTIMIZATION; + if (i && r && n && !anyChildrenVisible(e, t)) { + ++e.tileset._statistics.numberOfTilesCulledWithChildrenUnion, e._visible = !1; + return; + } +} +function meetsScreenSpaceErrorEarly(e, t) { + const { parent: n, tileset: i } = e; + return !defined(n) || n.hasTilesetContent || n.hasImplicitContent || n.refine !== Cesium3DTileRefine$1.ADD ? !1 : e.getScreenSpaceError(t, !0) <= i.memoryAdjustedScreenSpaceError; +} +function anyChildrenVisible(e, t) { + let n = !1; + const i = e.children; + for (let r = 0; r < i.length; ++r) { + const o = i[r]; + o.updateVisibility(t), n = n || o.isVisible; + } + return n; +} +function updateMinimumMaximumPriority(e) { + const t = e.tileset._minimumPriority, n = e.tileset._maximumPriority, i = e._priorityHolder; + n.distance = Math.max( + i._distanceToCamera, + n.distance + ), t.distance = Math.min( + i._distanceToCamera, + t.distance + ), n.depth = Math.max(e._depth, n.depth), t.depth = Math.min(e._depth, t.depth), n.foveatedFactor = Math.max( + i._foveatedFactor, + n.foveatedFactor + ), t.foveatedFactor = Math.min( + i._foveatedFactor, + t.foveatedFactor + ), n.reverseScreenSpaceError = Math.max( + e._priorityReverseScreenSpaceError, + n.reverseScreenSpaceError + ), t.reverseScreenSpaceError = Math.min( + e._priorityReverseScreenSpaceError, + t.reverseScreenSpaceError + ); +} +function Cesium3DTilesetMostDetailedTraversal() { +} +const traversal$2 = { + stack: new ManagedArray(), + stackMaximumLength: 0 +}; +Cesium3DTilesetMostDetailedTraversal.selectTiles = function(e, t) { + e._selectedTiles.length = 0, e._requestedTiles.length = 0, e.hasMixedContent = !1; + let n = !0; + const i = e.root; + if (i.updateVisibility(t), !i.isVisible) + return n; + const { touchTile: r, visitTile: o } = Cesium3DTilesetTraversal, s = traversal$2.stack; + for (s.push(i); s.length > 0; ) { + traversal$2.stackMaximumLength = Math.max( + traversal$2.stackMaximumLength, + s.length + ); + const c = s.pop(), l = c.refine === Cesium3DTileRefine$1.ADD, d = c.refine === Cesium3DTileRefine$1.REPLACE, f = canTraverse(c); + f && updateAndPushChildren$2(c, s, t), (l || d && !f) && (loadTile(e, c), r(c, t), selectDesiredTile$2(c, t), c.hasRenderableContent && !c.contentAvailable && (n = !1)), o(c, t); + } + return traversal$2.stack.trim(traversal$2.stackMaximumLength), n; +}; +function canTraverse(e) { + return e.children.length === 0 ? !1 : e.hasTilesetContent || e.hasImplicitContent ? !e.contentExpired : (e.hasEmptyContent, !0); +} +function updateAndPushChildren$2(e, t, n) { + const { children: i } = e; + for (let r = 0; r < i.length; ++r) { + const o = i[r]; + o.updateVisibility(n), o.isVisible && t.push(o); + } +} +function loadTile(e, t) { + (t.hasUnloadedRenderableContent || t.contentExpired) && (t._priority = 0, e._requestedTiles.push(t)); +} +function selectDesiredTile$2(e, t) { + e.contentAvailable && e.contentVisibility(t) !== Intersect$1.OUTSIDE && e.tileset._selectedTiles.push(e); +} +function Cesium3DTilesetBaseTraversal() { +} +const traversal$1 = { + stack: new ManagedArray(), + stackMaximumLength: 0 +}, emptyTraversal = { + stack: new ManagedArray(), + stackMaximumLength: 0 +}; +Cesium3DTilesetBaseTraversal.selectTiles = function(e, t) { + if (e._requestedTiles.length = 0, e.debugFreezeFrame) + return; + e._selectedTiles.length = 0, e._selectedTilesToStyle.length = 0, e._emptyTiles.length = 0, e.hasMixedContent = !1; + const n = e.root; + if (Cesium3DTilesetTraversal.updateTile(n, t), !n.isVisible || n.getScreenSpaceError(t, !0) <= e.memoryAdjustedScreenSpaceError) + return; + executeTraversal$1(n, t), traversal$1.stack.trim(traversal$1.stackMaximumLength), emptyTraversal.stack.trim(emptyTraversal.stackMaximumLength); + const i = e._requestedTiles; + for (let r = 0; r < i.length; ++r) + i[r].updatePriority(); +}; +function selectDesiredTile$1(e, t) { + e.contentAvailable && Cesium3DTilesetTraversal.selectTile(e, t); +} +function updateAndPushChildren$1(e, t, n) { + const i = e.refine === Cesium3DTileRefine$1.REPLACE, { tileset: r, children: o } = e, { updateTile: s, loadTile: c, touchTile: l } = Cesium3DTilesetTraversal; + for (let _ = 0; _ < o.length; ++_) + s(o[_], n); + o.sort(Cesium3DTilesetTraversal.sortChildrenByDistanceToCamera); + const d = i && e.hasRenderableContent; + let f = !0, h = !1, p = -1, m = Number.MAX_VALUE; + for (let _ = 0; _ < o.length; ++_) { + const y = o[_]; + if (y.isVisible ? (t.push(y), y._foveatedFactor < m && (p = _, m = y._foveatedFactor), h = !0) : (d || r.loadSiblings) && (y._foveatedFactor < m && (p = _, m = y._foveatedFactor), c(y, n), l(y, n)), d) { + let C; + y._inRequestVolume ? y.hasRenderableContent ? C = y.contentAvailable : C = executeEmptyTraversal(y, n) : C = !1, f = f && C; + } + } + if (h || (f = !1), p !== -1 && i) { + const _ = o[p]; + _._wasMinPriorityChild = !0; + const y = (e._wasMinPriorityChild || e === r.root) && m <= e._priorityHolder._foveatedFactor ? e._priorityHolder : e; + y._foveatedFactor = Math.min( + _._foveatedFactor, + y._foveatedFactor + ), y._distanceToCamera = Math.min( + _._distanceToCamera, + y._distanceToCamera + ); + for (let C = 0; C < o.length; ++C) + o[C]._priorityHolder = y; + } + return f; +} +function executeTraversal$1(e, t) { + const { tileset: n } = e, { + canTraverse: i, + loadTile: r, + visitTile: o, + touchTile: s + } = Cesium3DTilesetTraversal, c = traversal$1.stack; + for (c.push(e); c.length > 0; ) { + traversal$1.stackMaximumLength = Math.max( + traversal$1.stackMaximumLength, + c.length + ); + const l = c.pop(), d = l.parent, f = !defined(d) || d._refines; + l._refines = i(l) ? updateAndPushChildren$1(l, c, t) && f : !1; + const h = !l._refines && f; + l.hasRenderableContent ? l.refine === Cesium3DTileRefine$1.ADD ? (selectDesiredTile$1(l, t), r(l, t)) : l.refine === Cesium3DTileRefine$1.REPLACE && (r(l, t), h && selectDesiredTile$1(l, t)) : (n._emptyTiles.push(l), r(l, t), h && selectDesiredTile$1(l, t)), o(l, t), s(l, t); + } +} +function executeEmptyTraversal(e, t) { + const { + canTraverse: n, + updateTile: i, + loadTile: r, + touchTile: o + } = Cesium3DTilesetTraversal; + let s = !0; + const c = emptyTraversal.stack; + for (c.push(e); c.length > 0; ) { + emptyTraversal.stackMaximumLength = Math.max( + emptyTraversal.stackMaximumLength, + c.length + ); + const l = c.pop(), d = l.children, f = d.length, h = !l.hasRenderableContent && n(l); + if (!h && !l.contentAvailable && (s = !1), i(l, t), l.isVisible || (r(l, t), o(l, t)), h) + for (let p = 0; p < f; ++p) { + const m = d[p]; + c.push(m); + } + } + return e.hasEmptyContent || s; +} +function Cesium3DTilesetSkipTraversal() { +} +const traversal = { + stack: new ManagedArray(), + stackMaximumLength: 0 +}, descendantTraversal = { + stack: new ManagedArray(), + stackMaximumLength: 0 +}, selectionTraversal = { + stack: new ManagedArray(), + stackMaximumLength: 0, + ancestorStack: new ManagedArray(), + ancestorStackMaximumLength: 0 +}, descendantSelectionDepth = 2; +Cesium3DTilesetSkipTraversal.selectTiles = function(e, t) { + if (e._requestedTiles.length = 0, e.debugFreezeFrame) + return; + e._selectedTiles.length = 0, e._selectedTilesToStyle.length = 0, e._emptyTiles.length = 0, e.hasMixedContent = !1; + const n = e.root; + if (Cesium3DTilesetTraversal.updateTile(n, t), !n.isVisible || n.getScreenSpaceError(t, !0) <= e.memoryAdjustedScreenSpaceError) + return; + executeTraversal(n, t), traverseAndSelect(n, t), traversal.stack.trim(traversal.stackMaximumLength), descendantTraversal.stack.trim(descendantTraversal.stackMaximumLength), selectionTraversal.stack.trim(selectionTraversal.stackMaximumLength), selectionTraversal.ancestorStack.trim( + selectionTraversal.ancestorStackMaximumLength + ); + const i = e._requestedTiles; + for (let r = 0; r < i.length; ++r) + i[r].updatePriority(); +}; +function selectDescendants(e, t) { + const { updateTile: n, touchTile: i, selectTile: r } = Cesium3DTilesetTraversal, o = descendantTraversal.stack; + for (o.push(e); o.length > 0; ) { + descendantTraversal.stackMaximumLength = Math.max( + descendantTraversal.stackMaximumLength, + o.length + ); + const c = o.pop().children; + for (let l = 0; l < c.length; ++l) { + const d = c[l]; + d.isVisible && (d.contentAvailable ? (n(d, t), i(d, t), r(d, t)) : d._depth - e._depth < descendantSelectionDepth && o.push(d)); + } + } +} +function selectDesiredTile(e, t) { + const n = e.contentAvailable ? e : e._ancestorWithContentAvailable; + defined(n) ? n._shouldSelect = !0 : selectDescendants(e, t); +} +function updateTileAncestorContentLinks(e, t) { + e._ancestorWithContent = void 0, e._ancestorWithContentAvailable = void 0; + const { parent: n } = e; + if (!defined(n)) + return; + const i = !n.hasUnloadedRenderableContent || n._requestedFrame === t.frameNumber; + e._ancestorWithContent = i ? n : n._ancestorWithContent, e._ancestorWithContentAvailable = n.contentAvailable ? n : n._ancestorWithContentAvailable; +} +function reachedSkippingThreshold(e, t) { + const n = t._ancestorWithContent; + return !e.immediatelyLoadDesiredLevelOfDetail && (t._priorityProgressiveResolutionScreenSpaceErrorLeaf || defined(n) && t._screenSpaceError < n._screenSpaceError / e.skipScreenSpaceErrorFactor && t._depth > n._depth + e.skipLevels); +} +function updateAndPushChildren(e, t, n) { + const { tileset: i, children: r } = e, { updateTile: o, loadTile: s, touchTile: c } = Cesium3DTilesetTraversal; + for (let d = 0; d < r.length; ++d) + o(r[d], n); + r.sort(Cesium3DTilesetTraversal.sortChildrenByDistanceToCamera); + let l = !1; + for (let d = 0; d < r.length; ++d) { + const f = r[d]; + f.isVisible ? (t.push(f), l = !0) : i.loadSiblings && (s(f, n), c(f, n)); + } + return l; +} +function inBaseTraversal(e, t) { + const { tileset: n } = e; + return n.immediatelyLoadDesiredLevelOfDetail ? !1 : defined(e._ancestorWithContent) ? e._screenSpaceError === 0 ? e.parent._screenSpaceError > t : e._screenSpaceError > t : !0; +} +function executeTraversal(e, t) { + const { tileset: n } = e, i = n.immediatelyLoadDesiredLevelOfDetail ? Number.MAX_VALUE : Math.max( + n.baseScreenSpaceError, + n.memoryAdjustedScreenSpaceError + ), { + canTraverse: r, + loadTile: o, + visitTile: s, + touchTile: c + } = Cesium3DTilesetTraversal, l = traversal.stack; + for (l.push(e); l.length > 0; ) { + traversal.stackMaximumLength = Math.max( + traversal.stackMaximumLength, + l.length + ); + const d = l.pop(); + updateTileAncestorContentLinks(d, t); + const f = d.parent, h = !defined(f) || f._refines; + d._refines = r(d) ? updateAndPushChildren(d, l, t) && h : !1; + const p = !d._refines && h; + d.hasRenderableContent ? d.refine === Cesium3DTileRefine$1.ADD ? (selectDesiredTile(d, t), o(d, t)) : d.refine === Cesium3DTileRefine$1.REPLACE && (inBaseTraversal(d, i) ? (o(d, t), p && selectDesiredTile(d, t)) : p ? (selectDesiredTile(d, t), o(d, t)) : reachedSkippingThreshold(n, d) && o(d, t)) : (n._emptyTiles.push(d), o(d, t), p && selectDesiredTile(d, t)), s(d, t), c(d, t); + } +} +function traverseAndSelect(e, t) { + const { selectTile: n, canTraverse: i } = Cesium3DTilesetTraversal, { stack: r, ancestorStack: o } = selectionTraversal; + let s; + for (r.push(e); r.length > 0 || o.length > 0; ) { + if (selectionTraversal.stackMaximumLength = Math.max( + selectionTraversal.stackMaximumLength, + r.length + ), selectionTraversal.ancestorStackMaximumLength = Math.max( + selectionTraversal.ancestorStackMaximumLength, + o.length + ), o.length > 0) { + const d = o.peek(); + if (d._stackLength === r.length) { + o.pop(), d !== s && (d._finalResolution = !1), n(d, t); + continue; + } + } + const c = r.pop(); + if (!defined(c)) + continue; + const l = i(c); + if (c._shouldSelect) + if (c.refine === Cesium3DTileRefine$1.ADD) + n(c, t); + else { + if (c._selectionDepth = o.length, c._selectionDepth > 0 && (c.tileset.hasMixedContent = !0), s = c, !l) { + n(c, t); + continue; + } + o.push(c), c._stackLength = r.length; + } + if (l) { + const d = c.children; + for (let f = 0; f < d.length; ++f) { + const h = d[f]; + h.isVisible && r.push(h); + } + } + } +} +function Cesium3DTileset(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._url = void 0, this._basePath = void 0, this._root = void 0, this._resource = void 0, this._asset = void 0, this._properties = void 0, this._geometricError = void 0, this._scaledGeometricError = void 0, this._extensionsUsed = void 0, this._extensions = void 0, this._modelUpAxis = void 0, this._modelForwardAxis = void 0, this._cache = new Cesium3DTilesetCache(), this._processingQueue = [], this._selectedTiles = [], this._emptyTiles = [], this._requestedTiles = [], this._selectedTilesToStyle = [], this._loadTimestamp = void 0, this._timeSinceLoad = 0, this._updatedVisibilityFrame = 0, this._updatedModelMatrixFrame = 0, this._modelMatrixChanged = !1, this._previousModelMatrix = void 0, this._extras = void 0, this._credits = void 0, this._showCreditsOnScreen = defaultValue(e.showCreditsOnScreen, !1), this._cullWithChildrenBounds = defaultValue( + e.cullWithChildrenBounds, + !0 + ), this._allTilesAdditive = !0, this._hasMixedContent = !1, this._stencilClearCommand = void 0, this._backfaceCommands = new ManagedArray(), this._maximumScreenSpaceError = defaultValue( + e.maximumScreenSpaceError, + 16 + ), this._memoryAdjustedScreenSpaceError = this._maximumScreenSpaceError, this._cacheBytes = defaultValue(e.cacheBytes, 512 * 1024 * 1024); + const t = defaultValue( + e.maximumCacheOverflowBytes, + 512 * 1024 * 1024 + ); + this._maximumCacheOverflowBytes = t, this._styleEngine = new Cesium3DTileStyleEngine(), this._styleApplied = !1, this._modelMatrix = defined(e.modelMatrix) ? Matrix4.clone(e.modelMatrix) : Matrix4.clone(Matrix4.IDENTITY), this._addHeightCallbacks = [], this._statistics = new Cesium3DTilesetStatistics(), this._statisticsLast = new Cesium3DTilesetStatistics(), this._statisticsPerPass = new Array(Cesium3DTilePass$1.NUMBER_OF_PASSES); + for (let r = 0; r < Cesium3DTilePass$1.NUMBER_OF_PASSES; ++r) + this._statisticsPerPass[r] = new Cesium3DTilesetStatistics(); + this._requestedTilesInFlight = [], this._maximumPriority = { + foveatedFactor: -Number.MAX_VALUE, + depth: -Number.MAX_VALUE, + distance: -Number.MAX_VALUE, + reverseScreenSpaceError: -Number.MAX_VALUE + }, this._minimumPriority = { + foveatedFactor: Number.MAX_VALUE, + depth: Number.MAX_VALUE, + distance: Number.MAX_VALUE, + reverseScreenSpaceError: Number.MAX_VALUE + }, this._heatmap = new Cesium3DTilesetHeatmap( + e.debugHeatmapTilePropertyName + ), this.cullRequestsWhileMoving = defaultValue( + e.cullRequestsWhileMoving, + !0 + ), this._cullRequestsWhileMoving = !1, this.cullRequestsWhileMovingMultiplier = defaultValue( + e.cullRequestsWhileMovingMultiplier, + 60 + ), this.progressiveResolutionHeightFraction = CesiumMath.clamp( + defaultValue(e.progressiveResolutionHeightFraction, 0.3), + 0, + 0.5 + ), this.preferLeaves = defaultValue(e.preferLeaves, !1), this._tilesLoaded = !1, this._initialTilesLoaded = !1, this._tileDebugLabels = void 0, this._classificationType = e.classificationType, this._ellipsoid = defaultValue(e.ellipsoid, Ellipsoid.WGS84), this._initialClippingPlanesOriginMatrix = Matrix4.IDENTITY, this._clippingPlanesOriginMatrix = void 0, this._clippingPlanesOriginMatrixDirty = !0, this._vectorClassificationOnly = defaultValue( + e.vectorClassificationOnly, + !1 + ), this._vectorKeepDecodedPositions = defaultValue( + e.vectorKeepDecodedPositions, + !1 + ), this.preloadWhenHidden = defaultValue(e.preloadWhenHidden, !1), this.preloadFlightDestinations = defaultValue( + e.preloadFlightDestinations, + !0 + ), this._pass = void 0, this.dynamicScreenSpaceError = defaultValue( + e.dynamicScreenSpaceError, + !0 + ), this.foveatedScreenSpaceError = defaultValue( + e.foveatedScreenSpaceError, + !0 + ), this._foveatedConeSize = defaultValue(e.foveatedConeSize, 0.1), this._foveatedMinimumScreenSpaceErrorRelaxation = defaultValue( + e.foveatedMinimumScreenSpaceErrorRelaxation, + 0 + ), this.foveatedInterpolationCallback = defaultValue( + e.foveatedInterpolationCallback, + CesiumMath.lerp + ), this.foveatedTimeDelay = defaultValue(e.foveatedTimeDelay, 0.2), this.dynamicScreenSpaceErrorDensity = defaultValue( + e.dynamicScreenSpaceErrorDensity, + 2e-4 + ), this.dynamicScreenSpaceErrorFactor = defaultValue( + e.dynamicScreenSpaceErrorFactor, + 24 + ), this.dynamicScreenSpaceErrorHeightFalloff = defaultValue( + e.dynamicScreenSpaceErrorHeightFalloff, + 0.25 + ), this._dynamicScreenSpaceErrorComputedDensity = 0, this.shadows = defaultValue(e.shadows, ShadowMode$1.ENABLED), this.show = defaultValue(e.show, !0), this.colorBlendMode = Cesium3DTileColorBlendMode$1.HIGHLIGHT, this.colorBlendAmount = 0.5, this._pointCloudShading = new PointCloudShading(e.pointCloudShading), this._pointCloudEyeDomeLighting = new PointCloudEyeDomeLighting(), this.loadProgress = new Event(), this.allTilesLoaded = new Event(), this.initialTilesLoaded = new Event(), this.tileLoad = new Event(), this.tileUnload = new Event(), this.tileFailed = new Event(), this.tileVisible = new Event(), this.skipLevelOfDetail = defaultValue(e.skipLevelOfDetail, !1), this._disableSkipLevelOfDetail = !1, this.baseScreenSpaceError = defaultValue(e.baseScreenSpaceError, 1024), this.skipScreenSpaceErrorFactor = defaultValue( + e.skipScreenSpaceErrorFactor, + 16 + ), this.skipLevels = defaultValue(e.skipLevels, 1), this.immediatelyLoadDesiredLevelOfDetail = defaultValue( + e.immediatelyLoadDesiredLevelOfDetail, + !1 + ), this.loadSiblings = defaultValue(e.loadSiblings, !1), this._clippingPlanes = void 0, defined(e.clippingPlanes) && ClippingPlaneCollection.setOwner( + e.clippingPlanes, + this, + "_clippingPlanes" + ), this._clippingPolygons = void 0, defined(e.clippingPolygons) && ClippingPolygonCollection.setOwner( + e.clippingPolygons, + this, + "_clippingPolygons" + ), defined(e.imageBasedLighting) ? (this._imageBasedLighting = e.imageBasedLighting, this._shouldDestroyImageBasedLighting = !1) : (this._imageBasedLighting = new ImageBasedLighting(), this._shouldDestroyImageBasedLighting = !0), this.lightColor = e.lightColor, this.backFaceCulling = defaultValue(e.backFaceCulling, !0), this._enableShowOutline = defaultValue(e.enableShowOutline, !0), this.showOutline = defaultValue(e.showOutline, !0), this.outlineColor = defaultValue(e.outlineColor, Color.BLACK), this.splitDirection = defaultValue( + e.splitDirection, + SplitDirection$1.NONE + ), this.enableCollision = defaultValue(e.enableCollision, !1), this._projectTo2D = defaultValue(e.projectTo2D, !1), this._enablePick = defaultValue(e.enablePick, !1), this.debugFreezeFrame = defaultValue(e.debugFreezeFrame, !1), this.debugColorizeTiles = defaultValue(e.debugColorizeTiles, !1), this._enableDebugWireframe = defaultValue( + e.enableDebugWireframe, + !1 + ), this.debugWireframe = defaultValue(e.debugWireframe, !1), this.debugWireframe === !0 && this._enableDebugWireframe === !1 && oneTimeWarning( + "tileset-debug-wireframe-ignored", + "enableDebugWireframe must be set to true in the Cesium3DTileset constructor, otherwise debugWireframe will be ignored." + ), this.debugShowBoundingVolume = defaultValue( + e.debugShowBoundingVolume, + !1 + ), this.debugShowContentBoundingVolume = defaultValue( + e.debugShowContentBoundingVolume, + !1 + ), this.debugShowViewerRequestVolume = defaultValue( + e.debugShowViewerRequestVolume, + !1 + ), this._tileDebugLabels = void 0, this.debugPickedTileLabelOnly = !1, this.debugPickedTile = void 0, this.debugPickPosition = void 0, this.debugShowGeometricError = defaultValue( + e.debugShowGeometricError, + !1 + ), this.debugShowRenderingStatistics = defaultValue( + e.debugShowRenderingStatistics, + !1 + ), this.debugShowMemoryUsage = defaultValue(e.debugShowMemoryUsage, !1), this.debugShowUrl = defaultValue(e.debugShowUrl, !1), this.examineVectorLinesFunction = void 0, this._metadataExtension = void 0, this._customShader = e.customShader; + let n = defaultValue(e.featureIdLabel, "featureId_0"); + typeof n == "number" && (n = `featureId_${n}`), this._featureIdLabel = n; + let i = defaultValue( + e.instanceFeatureIdLabel, + "instanceFeatureId_0" + ); + typeof i == "number" && (i = `instanceFeatureId_${i}`), this._instanceFeatureIdLabel = i, this.useSRGBVertexColors = defaultValue(e.useSRGBVertexColors, !1), this.useSRGBColorFactors = defaultValue(e.useSRGBColorFactors, !1); +} +Object.defineProperties(Cesium3DTileset.prototype, { + /** + * NOTE: This getter exists so that `Picking.js` can differentiate between + * PrimitiveCollection and Cesium3DTileset objects without inflating + * the size of the module via `instanceof Cesium3DTileset` + * @private + */ + isCesium3DTileset: { + get: function() { + return !0; + } + }, + /** + * Gets the tileset's asset object property, which contains metadata about the tileset. + *+ * See the {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification#reference-asset|asset schema reference} + * in the 3D Tiles spec for the full set of properties. + *
+ * + * @memberof Cesium3DTileset.prototype + * + * @type {object} + * @readonly + */ + asset: { + get: function() { + return this._asset; + } + }, + /** + * Gets the tileset's extensions object property. + * + * @memberof Cesium3DTileset.prototype + * + * @type {object} + * @readonly + */ + extensions: { + get: function() { + return this._extensions; + } + }, + /** + * The {@link ClippingPlaneCollection} used to selectively disable rendering the tileset. + * + * @memberof Cesium3DTileset.prototype + * + * @type {ClippingPlaneCollection} + */ + clippingPlanes: { + get: function() { + return this._clippingPlanes; + }, + set: function(e) { + ClippingPlaneCollection.setOwner(e, this, "_clippingPlanes"); + } + }, + /** + * The {@link ClippingPolygonCollection} used to selectively disable rendering the tileset. + * + * @memberof Cesium3DTileset.prototype + * + * @type {ClippingPolygonCollection} + */ + clippingPolygons: { + get: function() { + return this._clippingPolygons; + }, + set: function(e) { + ClippingPolygonCollection.setOwner(e, this, "_clippingPolygons"); + } + }, + /** + * Gets the tileset's properties dictionary object, which contains metadata about per-feature properties. + *+ * See the {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification#reference-properties|properties schema reference} + * in the 3D Tiles spec for the full set of properties. + *
+ * + * @memberof Cesium3DTileset.prototype + * + * @type {object} + * @readonly + * + * @example + * console.log(`Maximum building height: ${tileset.properties.height.maximum}`); + * console.log(`Minimum building height: ${tileset.properties.height.minimum}`); + * + * @see Cesium3DTileFeature#getProperty + * @see Cesium3DTileFeature#setProperty + */ + properties: { + get: function() { + return this._properties; + } + }, + /** + * Whentrue, all tiles that meet the screen space error this frame are loaded. The tileset is
+ * completely loaded for this view.
+ *
+ * @memberof Cesium3DTileset.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default false
+ *
+ * @see Cesium3DTileset#allTilesLoaded
+ */
+ tilesLoaded: {
+ get: function() {
+ return this._tilesLoaded;
+ }
+ },
+ /**
+ * The resource used to fetch the tileset JSON file
+ *
+ * @memberof Cesium3DTileset.prototype
+ *
+ * @type {Resource}
+ * @readonly
+ */
+ resource: {
+ get: function() {
+ return this._resource;
+ }
+ },
+ /**
+ * The base path that non-absolute paths in tileset JSON file are relative to.
+ *
+ * @memberof Cesium3DTileset.prototype
+ *
+ * @type {string}
+ * @readonly
+ * @deprecated
+ */
+ basePath: {
+ get: function() {
+ return deprecationWarning(
+ "Cesium3DTileset.basePath",
+ "Cesium3DTileset.basePath has been deprecated. All tiles are relative to the url of the tileset JSON file that contains them. Use the url property instead."
+ ), this._basePath;
+ }
+ },
+ /**
+ * The style, defined using the
+ * {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/Styling|3D Tiles Styling language},
+ * applied to each feature in the tileset.
+ *
+ * Assign undefined to remove the style, which will restore the visual
+ * appearance of the tileset to its default when no style was applied.
+ *
+ * The style is applied to a tile before the {@link Cesium3DTileset#tileVisible}
+ * event is raised, so code in tileVisible can manually set a feature's
+ * properties (e.g. color and show) after the style is applied. When
+ * a new style is assigned any manually set properties are overwritten.
+ *
+ * Use an always "true" condition to specify the Color for all objects that are not + * overridden by pre-existing conditions. Otherwise, the default color Cesium.Color.White + * will be used. Similarly, use an always "true" condition to specify the show property + * for all objects that are not overridden by pre-existing conditions. Otherwise, the + * default show value true will be used. + *
+ * + * @memberof Cesium3DTileset.prototype + * + * @type {Cesium3DTileStyle|undefined} + * + * @default undefined + * + * @example + * tileset.style = new Cesium.Cesium3DTileStyle({ + * color : { + * conditions : [ + * ['${Height} >= 100', 'color("purple", 0.5)'], + * ['${Height} >= 50', 'color("red")'], + * ['true', 'color("blue")'] + * ] + * }, + * show : '${Height} > 0', + * meta : { + * description : '"Building id ${id} has height ${Height}."' + * } + * }); + * + * @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/Styling|3D Tiles Styling language} + */ + style: { + get: function() { + return this._styleEngine.style; + }, + set: function(e) { + this._styleEngine.style = e; + } + }, + /** + * A custom shader to apply to all tiles in the tileset. Only used for + * contents that use {@link Model}. Using custom shaders with a + * {@link Cesium3DTileStyle} may lead to undefined behavior. + * + * @memberof Cesium3DTileset.prototype + * + * @type {CustomShader|undefined} + * + * @default undefined + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + */ + customShader: { + get: function() { + return this._customShader; + }, + set: function(e) { + this._customShader = e; + } + }, + /** + * Whether the tileset is rendering different levels of detail in the same view. + * Only relevant if {@link Cesium3DTileset.isSkippingLevelOfDetail} is true. + * + * @memberof Cesium3DTileset.prototype + * + * @type {boolean} + * @private + */ + hasMixedContent: { + get: function() { + return this._hasMixedContent; + }, + set: function(e) { + this._hasMixedContent = e; + } + }, + /** + * Whether this tileset is actually skipping levels of detail. + * The user option may have been disabled if all tiles are using additive refinement, + * or if some tiles have a content type for which rendering does not support skipping + * + * @memberof Cesium3DTileset.prototype + * + * @type {boolean} + * @private + * @readonly + */ + isSkippingLevelOfDetail: { + get: function() { + return this.skipLevelOfDetail && !defined(this._classificationType) && !this._disableSkipLevelOfDetail && !this._allTilesAdditive; + } + }, + /** + * The tileset's schema, groups, tileset metadata and other details from the + * 3DTILES_metadata extension or a 3D Tiles 1.1 tileset JSON. This getter is + * for internal use by other classes. + * + * @memberof Cesium3DTileset.prototype + * @type {Cesium3DTilesetMetadata} + * @private + * @readonly + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + */ + metadataExtension: { + get: function() { + return this._metadataExtension; + } + }, + /** + * The metadata properties attached to the tileset as a whole. + * + * @memberof Cesium3DTileset.prototype + * + * @type {TilesetMetadata} + * @private + * @readonly + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + */ + metadata: { + get: function() { + if (defined(this._metadataExtension)) + return this._metadataExtension.tileset; + } + }, + /** + * The metadata schema used in this tileset. Shorthand for + *tileset.metadataExtension.schema
+ *
+ * @memberof Cesium3DTileset.prototype
+ *
+ * @type {MetadataSchema}
+ * @private
+ * @readonly
+ *
+ * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
+ */
+ schema: {
+ get: function() {
+ if (defined(this._metadataExtension))
+ return this._metadataExtension.schema;
+ }
+ },
+ /**
+ * The maximum screen space error used to drive level of detail refinement. This value helps determine when a tile
+ * refines to its descendants, and therefore plays a major role in balancing performance with visual quality.
+ *
+ * A tile's screen space error is roughly equivalent to the number of pixels wide that would be drawn if a sphere with a
+ * radius equal to the tile's geometric error were rendered at the tile's position. If this value exceeds
+ * maximumScreenSpaceError the tile refines to its descendants.
+ *
+ * Depending on the tileset, maximumScreenSpaceError may need to be tweaked to achieve the right balance.
+ * Higher values provide better performance but lower visual quality.
+ *
maximumScreenSpaceError must be greater than or equal to zero.
+ */
+ maximumScreenSpaceError: {
+ get: function() {
+ return this._maximumScreenSpaceError;
+ },
+ set: function(e) {
+ this._maximumScreenSpaceError = e, this._memoryAdjustedScreenSpaceError = e;
+ }
+ },
+ /**
+ * The amount of GPU memory (in bytes) used to cache tiles. This memory usage is estimated from
+ * geometry, textures, and batch table textures of loaded tiles. For point clouds, this value also
+ * includes per-point metadata.
+ * + * Tiles not in view are unloaded to enforce this. + *
+ *+ * If decreasing this value results in unloading tiles, the tiles are unloaded the next frame. + *
+ *
+ * If tiles sized more than cacheBytes are needed to meet the
+ * desired screen space error, determined by {@link Cesium3DTileset#maximumScreenSpaceError},
+ * for the current view, then the memory usage of the tiles loaded will exceed
+ * cacheBytes by up to maximumCacheOverflowBytes.
+ * For example, if cacheBytes is 500000, but 600000 bytes
+ * of tiles are needed to meet the screen space error, then 600000 bytes of tiles
+ * may be loaded (if maximumCacheOverflowBytes is at least 100000).
+ * When these tiles go out of view, they will be unloaded.
+ *
cacheBytes must be typeof 'number' and greater than or equal to 0
+ * @see Cesium3DTileset#totalMemoryUsageInBytes
+ */
+ cacheBytes: {
+ get: function() {
+ return this._cacheBytes;
+ },
+ set: function(e) {
+ this._cacheBytes = e;
+ }
+ },
+ /**
+ * The maximum additional amount of GPU memory (in bytes) that will be used to cache tiles.
+ *
+ * If tiles sized more than cacheBytes plus maximumCacheOverflowBytes
+ * are needed to meet the desired screen space error, determined by
+ * {@link Cesium3DTileset#maximumScreenSpaceError} for the current view, then
+ * {@link Cesium3DTileset#memoryAdjustedScreenSpaceError} will be adjusted
+ * until the tiles required to meet the adjusted screen space error use less
+ * than cacheBytes plus maximumCacheOverflowBytes.
+ *
maximumCacheOverflowBytes must be typeof 'number' and greater than or equal to 0
+ * @see Cesium3DTileset#totalMemoryUsageInBytes
+ */
+ maximumCacheOverflowBytes: {
+ get: function() {
+ return this._maximumCacheOverflowBytes;
+ },
+ set: function(e) {
+ this._maximumCacheOverflowBytes = e;
+ }
+ },
+ /**
+ * If loading the level of detail required by @{link Cesium3DTileset#maximumScreenSpaceError}
+ * results in the memory usage exceeding @{link Cesium3DTileset#cacheBytes}
+ * plus @{link Cesium3DTileset#maximumCacheOverflowBytes}, level of detail refinement
+ * will instead use this (larger) adjusted screen space error to achieve the
+ * best possible visual quality within the available memory
+ *
+ * @memberof Cesium3DTileset.prototype
+ *
+ * @type {number}
+ * @readonly
+ *
+ * @private
+ */
+ memoryAdjustedScreenSpaceError: {
+ get: function() {
+ return this._memoryAdjustedScreenSpaceError;
+ }
+ },
+ /**
+ * Options for controlling point size based on geometric error and eye dome lighting.
+ *
+ * @memberof Cesium3DTileset.prototype
+ *
+ * @type {PointCloudShading}
+ */
+ pointCloudShading: {
+ get: function() {
+ return this._pointCloudShading;
+ },
+ set: function(e) {
+ this._pointCloudShading = e;
+ }
+ },
+ /**
+ * The root tile.
+ *
+ * @memberOf Cesium3DTileset.prototype
+ *
+ * @type {Cesium3DTile}
+ * @readonly
+ */
+ root: {
+ get: function() {
+ return this._root;
+ }
+ },
+ /**
+ * The tileset's bounding sphere.
+ *
+ * @memberof Cesium3DTileset.prototype
+ *
+ * @type {BoundingSphere}
+ * @readonly
+ *
+ * @example
+ * const tileset = await Cesium.Cesium3DTileset.fromUrl("http://localhost:8002/tilesets/Seattle/tileset.json");
+ *
+ * viewer.scene.primitives.add(tileset);
+ *
+ * // Set the camera to view the newly added tileset
+ * viewer.camera.viewBoundingSphere(tileset.boundingSphere, new Cesium.HeadingPitchRange(0, -0.5, 0));
+ */
+ boundingSphere: {
+ get: function() {
+ return this._root.updateTransform(this._modelMatrix), this._root.boundingSphere;
+ }
+ },
+ /**
+ * A 4x4 transformation matrix that transforms the entire tileset.
+ *
+ * @memberof Cesium3DTileset.prototype
+ *
+ * @type {Matrix4}
+ * @default Matrix4.IDENTITY
+ *
+ * @example
+ * // Adjust a tileset's height from the globe's surface.
+ * const heightOffset = 20.0;
+ * const boundingSphere = tileset.boundingSphere;
+ * const cartographic = Cesium.Cartographic.fromCartesian(boundingSphere.center);
+ * const surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0);
+ * const offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, heightOffset);
+ * const translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3());
+ * tileset.modelMatrix = Cesium.Matrix4.fromTranslation(translation);
+ */
+ modelMatrix: {
+ get: function() {
+ return this._modelMatrix;
+ },
+ set: function(e) {
+ this._modelMatrix = Matrix4.clone(e, this._modelMatrix);
+ }
+ },
+ /**
+ * Returns the time, in milliseconds, since the tileset was loaded and first updated.
+ *
+ * @memberof Cesium3DTileset.prototype
+ *
+ * @type {number}
+ * @readonly
+ */
+ timeSinceLoad: {
+ get: function() {
+ return this._timeSinceLoad;
+ }
+ },
+ /**
+ * The total amount of GPU memory in bytes used by the tileset. This value is estimated from
+ * geometry, texture, batch table textures, and binary metadata of loaded tiles.
+ *
+ * @memberof Cesium3DTileset.prototype
+ *
+ * @type {number}
+ * @readonly
+ *
+ * @see Cesium3DTileset#cacheBytes
+ */
+ totalMemoryUsageInBytes: {
+ get: function() {
+ const e = this._statistics;
+ return e.texturesByteLength + e.geometryByteLength + e.batchTableByteLength;
+ }
+ },
+ /**
+ * @private
+ */
+ clippingPlanesOriginMatrix: {
+ get: function() {
+ return defined(this._clippingPlanesOriginMatrix) ? (this._clippingPlanesOriginMatrixDirty && (Matrix4.multiply(
+ this.root.computedTransform,
+ this._initialClippingPlanesOriginMatrix,
+ this._clippingPlanesOriginMatrix
+ ), this._clippingPlanesOriginMatrixDirty = !1), this._clippingPlanesOriginMatrix) : Matrix4.IDENTITY;
+ }
+ },
+ /**
+ * @private
+ */
+ styleEngine: {
+ get: function() {
+ return this._styleEngine;
+ }
+ },
+ /**
+ * @private
+ */
+ statistics: {
+ get: function() {
+ return this._statistics;
+ }
+ },
+ /**
+ * Determines whether terrain, 3D Tiles, or both will be classified by this tileset.
+ * + * This option is only applied to tilesets containing batched 3D models, + * glTF content, geometry data, or vector data. Even when undefined, vector + * and geometry data must render as classifications and will default to + * rendering on both terrain and other 3D Tiles tilesets. + *
+ *+ * When enabled for batched 3D model and glTF tilesets, there are a few + * requirements/limitations on the glTF: + *
EXT_mesh_gpu_instancing extension.POSITION semantic is required._BATCHIDs and an index buffer are both present, all indices with the same batch id must occupy contiguous sections of the index buffer._BATCHIDs are present with no index buffer, all positions with the same batch id must occupy contiguous sections of the position buffer.+ * Additionally, classification is not supported for points or instanced 3D + * models. + *
+ *+ * The 3D Tiles or terrain receiving the classification must be opaque. + *
+ * + * @memberof Cesium3DTileset.prototype + * + * @type {ClassificationType} + * @default undefined + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + * @readonly + */ + classificationType: { + get: function() { + return this._classificationType; + } + }, + /** + * Gets an ellipsoid describing the shape of the globe. + * + * @memberof Cesium3DTileset.prototype + * + * @type {Ellipsoid} + * @readonly + */ + ellipsoid: { + get: function() { + return this._ellipsoid; + } + }, + /** + * Optimization option. Used when {@link Cesium3DTileset#foveatedScreenSpaceError} is true to control the cone size that determines which tiles are deferred. + * Tiles that are inside this cone are loaded immediately. Tiles outside the cone are potentially deferred based on how far outside the cone they are and {@link Cesium3DTileset#foveatedInterpolationCallback} and {@link Cesium3DTileset#foveatedMinimumScreenSpaceErrorRelaxation}. + * Setting this to 0.0 means the cone will be the line formed by the camera position and its view direction. Setting this to 1.0 means the cone encompasses the entire field of view of the camera, essentially disabling the effect. + * + * @memberof Cesium3DTileset.prototype + * + * @type {number} + * @default 0.3 + */ + foveatedConeSize: { + get: function() { + return this._foveatedConeSize; + }, + set: function(e) { + this._foveatedConeSize = e; + } + }, + /** + * Optimization option. Used when {@link Cesium3DTileset#foveatedScreenSpaceError} is true to control the starting screen space error relaxation for tiles outside the foveated cone. + * The screen space error will be raised starting with this value up to {@link Cesium3DTileset#maximumScreenSpaceError} based on the provided {@link Cesium3DTileset#foveatedInterpolationCallback}. + * + * @memberof Cesium3DTileset.prototype + * + * @type {number} + * @default 0.0 + */ + foveatedMinimumScreenSpaceErrorRelaxation: { + get: function() { + return this._foveatedMinimumScreenSpaceErrorRelaxation; + }, + set: function(e) { + this._foveatedMinimumScreenSpaceErrorRelaxation = e; + } + }, + /** + * Returns theextras property at the top-level of the tileset JSON, which contains application specific metadata.
+ * Returns undefined if extras does not exist.
+ *
+ * @memberof Cesium3DTileset.prototype
+ *
+ * @type {*}
+ * @readonly
+ *
+ * @see {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification#specifying-extensions-and-application-specific-extras|Extras in the 3D Tiles specification.}
+ */
+ extras: {
+ get: function() {
+ return this._extras;
+ }
+ },
+ /**
+ * The properties for managing image-based lighting on this tileset.
+ *
+ * @memberof Cesium3DTileset.prototype
+ *
+ * @type {ImageBasedLighting}
+ */
+ imageBasedLighting: {
+ get: function() {
+ return this._imageBasedLighting;
+ },
+ set: function(e) {
+ e !== this._imageBasedLighting && (this._shouldDestroyImageBasedLighting && !this._imageBasedLighting.isDestroyed() && this._imageBasedLighting.destroy(), this._imageBasedLighting = e, this._shouldDestroyImageBasedLighting = !1);
+ }
+ },
+ /**
+ * Indicates that only the tileset's vector tiles should be used for classification.
+ *
+ * @memberof Cesium3DTileset.prototype
+ *
+ * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
+ *
+ * @type {boolean}
+ * @default false
+ */
+ vectorClassificationOnly: {
+ get: function() {
+ return this._vectorClassificationOnly;
+ }
+ },
+ /**
+ * Whether vector tiles should keep decoded positions in memory.
+ * This is used with {@link Cesium3DTileFeature.getPolylinePositions}.
+ *
+ * @memberof Cesium3DTileset.prototype
+ *
+ * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
+ *
+ * @type {boolean}
+ * @default false
+ */
+ vectorKeepDecodedPositions: {
+ get: function() {
+ return this._vectorKeepDecodedPositions;
+ }
+ },
+ /**
+ * Determines whether the credits of the tileset will be displayed on the screen
+ *
+ * @memberof Cesium3DTileset.prototype
+ *
+ * @type {boolean}
+ * @default false
+ */
+ showCreditsOnScreen: {
+ get: function() {
+ return this._showCreditsOnScreen;
+ },
+ set: function(e) {
+ this._showCreditsOnScreen = e, createCredits(this);
+ }
+ },
+ /**
+ * Label of the feature ID set to use for picking and styling.
+ * + * For EXT_mesh_features, this is the feature ID's label property, or + * "featureId_N" (where N is the index in the featureIds array) when not + * specified. EXT_feature_metadata did not have a label field, so such + * feature ID sets are always labeled "featureId_N" where N is the index in + * the list of all feature Ids, where feature ID attributes are listed before + * feature ID textures. + *
+ *+ * If featureIdLabel is set to an integer N, it is converted to + * the string "featureId_N" automatically. If both per-primitive and + * per-instance feature IDs are present, the instance feature IDs take + * priority. + *
+ * + * @memberof Cesium3DTileset.prototype + * + * @type {string} + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + */ + featureIdLabel: { + get: function() { + return this._featureIdLabel; + }, + set: function(e) { + typeof e == "number" && (e = `featureId_${e}`), this._featureIdLabel = e; + } + }, + /** + * Label of the instance feature ID set used for picking and styling. + *+ * If instanceFeatureIdLabel is set to an integer N, it is converted to + * the string "instanceFeatureId_N" automatically. + * If both per-primitive and per-instance feature IDs are present, the + * instance feature IDs take priority. + *
+ * + * @memberof Cesium3DTileset.prototype + * + * @type {string} + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + */ + instanceFeatureIdLabel: { + get: function() { + return this._instanceFeatureIdLabel; + }, + set: function(e) { + typeof e == "number" && (e = `instanceFeatureId_${e}`), this._instanceFeatureIdLabel = e; + } + } +}); +Cesium3DTileset.fromIonAssetId = async function(e, t) { + const n = await IonResource.fromAssetId(e); + return Cesium3DTileset.fromUrl(n, t); +}; +Cesium3DTileset.fromUrl = async function(e, t) { + t = defaultValue(t, defaultValue.EMPTY_OBJECT); + const n = Resource.createIfNeeded(e); + let i; + n.extension === "json" ? i = n.getBaseUri(!0) : n.isDataUri && (i = ""); + const r = await Cesium3DTileset.loadJson(n), o = await processMetadataExtension( + n, + r + ), s = new Cesium3DTileset(t); + s._resource = n, s._url = n.url, s._basePath = i, s._metadataExtension = o, s._geometricError = r.geometricError, s._scaledGeometricError = r.geometricError; + const c = r.asset; + s._asset = c, s._extras = r.extras, createCredits(s); + const l = defined(r.asset.gltfUpAxis) ? Axis$1.fromName(r.asset.gltfUpAxis) : Axis$1.Y, d = defaultValue(t.modelUpAxis, l), f = defaultValue(t.modelForwardAxis, Axis$1.X); + s._properties = r.properties, s._extensionsUsed = r.extensionsUsed, s._extensions = r.extensions, s._modelUpAxis = d, s._modelForwardAxis = f, s._root = s.loadTileset(n, r); + const p = s._root.createBoundingVolume( + r.root.boundingVolume, + Matrix4.IDENTITY + ).boundingSphere.center, m = s._ellipsoid.cartesianToCartographic( + p + ); + return defined(m) && m.height > ApproximateTerrainHeights._defaultMinTerrainHeight && (s._initialClippingPlanesOriginMatrix = Transforms.eastNorthUpToFixedFrame( + p + )), s._clippingPlanesOriginMatrix = Matrix4.clone( + s._initialClippingPlanesOriginMatrix + ), s; +}; +Cesium3DTileset.loadJson = function(e) { + return Resource.createIfNeeded(e).fetchJson(); +}; +Cesium3DTileset.prototype.makeStyleDirty = function() { + this._styleEngine.makeDirty(); +}; +Cesium3DTileset.prototype.loadTileset = function(e, t, n) { + const i = t.asset; + if (!defined(i)) + throw new RuntimeError("Tileset must have an asset property."); + if (i.version !== "0.0" && i.version !== "1.0" && i.version !== "1.1") + throw new RuntimeError( + "The tileset must be 3D Tiles version 0.0, 1.0, or 1.1" + ); + defined(t.extensionsRequired) && Cesium3DTileset.checkSupportedExtensions(t.extensionsRequired); + const r = this._statistics, o = i.tilesetVersion; + defined(o) && (this._basePath += `?v=${o}`, e = e.clone(), e.setQueryParameters({ v: o })); + const s = makeTile(this, e, t.root, n); + defined(n) && (n.children.push(s), s._depth = n._depth + 1); + const c = []; + for (c.push(s); c.length > 0; ) { + const l = c.pop(); + ++r.numberOfTilesTotal, this._allTilesAdditive = this._allTilesAdditive && l.refine === Cesium3DTileRefine$1.ADD; + const d = l._header.children; + if (defined(d)) + for (let f = 0; f < d.length; ++f) { + const h = d[f], p = makeTile(this, e, h, l); + l.children.push(p), p._depth = l._depth + 1, c.push(p); + } + this._cullWithChildrenBounds && Cesium3DTileOptimizations.checkChildrenWithinParent(l); + } + return s; +}; +function makeTile(e, t, n, i) { + if (!(defined(n.implicitTiling) || hasExtension(n, "3DTILES_implicit_tiling"))) + return new Cesium3DTile(e, t, n, i); + const o = e.schema, s = new ImplicitTileset( + t, + n, + o + ), c = new ImplicitTileCoordinates({ + subdivisionScheme: s.subdivisionScheme, + subtreeLevels: s.subtreeLevels, + level: 0, + x: 0, + y: 0, + // The constructor will only use this for octrees. + z: 0 + }), l = s.subtreeUriTemplate.getDerivedResource({ + templateValues: c.getTemplateValues() + }).url, f = clone$1(n, !0); + f.contents = [ + { + uri: l + } + ], delete f.content, delete f.extensions; + const h = new Cesium3DTile(e, t, f, i); + return h.implicitTileset = s, h.implicitCoordinates = c, h; +} +async function processMetadataExtension(e, t) { + const n = hasExtension(t, "3DTILES_metadata") ? t.extensions["3DTILES_metadata"] : t; + let i; + if (defined(n.schemaUri)) + e = e.getDerivedResource({ + url: n.schemaUri + }), i = ResourceCache.getSchemaLoader({ + resource: e + }); + else if (defined(n.schema)) + i = ResourceCache.getSchemaLoader({ + schema: n.schema + }); + else + return; + await i.load(); + const r = new Cesium3DTilesetMetadata({ + schema: i.schema, + metadataJson: n + }); + return ResourceCache.unload(i), r; +} +const scratchPositionNormal$2 = new Cartesian3(), scratchCartographic$c = new Cartographic(), scratchMatrix$2 = new Matrix4(), scratchCenter$6 = new Cartesian3(), scratchPosition$8 = new Cartesian3(), scratchDirection$1 = new Cartesian3(), scratchHalfHeight = new Cartesian3(); +function updateDynamicScreenSpaceError(e, t) { + let n, i, r, o, s; + const c = t.camera, l = e._root, d = l.contentBoundingVolume; + if (d instanceof TileBoundingRegion) + n = Cartesian3.normalize(c.positionWC, scratchPositionNormal$2), i = c.directionWC, r = c.positionCartographic.height, o = d.minimumHeight, s = d.maximumHeight; + else { + const y = Matrix4.inverseTransformation( + l.computedTransform, + scratchMatrix$2 + ), C = t.mapProjection.ellipsoid, T = d.boundingVolume, x = Matrix4.multiplyByPoint( + y, + T.center, + scratchCenter$6 + ); + if (Cartesian3.magnitude(x) > C.minimumRadius) { + const b = Cartographic.fromCartesian( + x, + C, + scratchCartographic$c + ); + n = Cartesian3.normalize(c.positionWC, scratchPositionNormal$2), i = c.directionWC, r = c.positionCartographic.height, o = 0, s = b.height * 2; + } else { + const b = Matrix4.multiplyByPoint( + y, + c.positionWC, + scratchPosition$8 + ); + if (n = Cartesian3.UNIT_Z, i = Matrix4.multiplyByPointAsVector( + y, + c.directionWC, + scratchDirection$1 + ), i = Cartesian3.normalize(i, i), r = b.z, d instanceof TileOrientedBoundingBox) { + const S = Matrix3.getColumn( + T.halfAxes, + 2, + scratchHalfHeight + ), E = Cartesian3.magnitude(S); + o = x.z - E, s = x.z + E; + } else if (d instanceof TileBoundingSphere) { + const S = T.radius; + o = x.z - S, s = x.z + S; + } + } + } + const f = e.dynamicScreenSpaceErrorHeightFalloff, h = o + (s - o) * f, p = s, m = CesiumMath.clamp( + (r - h) / (p - h), + 0, + 1 + ); + let _ = 1 - Math.abs(Cartesian3.dot(i, n)); + _ = _ * (1 - m), e._dynamicScreenSpaceErrorComputedDensity = e.dynamicScreenSpaceErrorDensity * _; +} +function requestContent(e, t) { + if (t.hasEmptyContent) + return; + const { statistics: n } = e, i = t.contentExpired, r = t.requestContent(); + defined(r) && (r.then((o) => { + !defined(o) || t.isDestroyed() || e.isDestroyed() || (e._processingQueue.push(t), ++n.numberOfTilesProcessing); + }).catch((o) => { + handleTileFailure(o, e, t); + }), i && (t.hasTilesetContent || t.hasImplicitContent ? destroySubtree(e, t) : (n.decrementLoadCounts(t.content), --n.numberOfTilesWithContentReady)), e._requestedTilesInFlight.push(t)); +} +function sortTilesByPriority(e, t) { + return e._priority - t._priority; +} +Cesium3DTileset.prototype.postPassesUpdate = function(e) { + defined(this._root) && (cancelOutOfViewRequests(this, e), raiseLoadProgressEvent(this, e), this._cache.unloadTiles(this, unloadTile), this._styleApplied && this._styleEngine.resetDirty(), this._styleApplied = !1); +}; +Cesium3DTileset.prototype.prePassesUpdate = function(e) { + if (!defined(this._root)) + return; + processTiles(this, e); + const t = this._clippingPlanes; + this._clippingPlanesOriginMatrixDirty = !0, defined(t) && t.enabled && t.update(e); + const n = this._clippingPolygons; + defined(n) && n.enabled && n.update(e), defined(this._loadTimestamp) || (this._loadTimestamp = JulianDate.clone(e.time)), this._timeSinceLoad = Math.max( + JulianDate.secondsDifference(e.time, this._loadTimestamp) * 1e3, + 0 + ), this.dynamicScreenSpaceError && updateDynamicScreenSpaceError(this, e), e.newFrame && this._cache.reset(); +}; +function cancelOutOfViewRequests(e, t) { + const n = e._requestedTilesInFlight; + let i = 0; + for (let r = 0; r < n.length; ++r) { + const o = n[r], s = t.frameNumber - o._touchedFrame >= 1; + if (o._contentState !== Cesium3DTileContentState$1.LOADING) { + ++i; + continue; + } else if (s) { + o.cancelRequests(), ++i; + continue; + } + i > 0 && (n[r - i] = o); + } + n.length -= i; +} +function requestTiles(e) { + const t = e._requestedTiles; + t.sort(sortTilesByPriority); + for (let n = 0; n < t.length; ++n) + requestContent(e, t[n]); +} +function handleTileFailure(e, t, n) { + if (t.isDestroyed()) + return; + let i; + n.isDestroyed() || (i = n._contentResource.url); + const r = defined(e.message) ? e.message : e.toString(); + t.tileFailed.numberOfListeners > 0 ? t.tileFailed.raiseEvent({ + url: i, + message: r + }) : (console.log(`A 3D tile failed to load: ${i}`), console.log(`Error: ${r}`)); +} +function filterProcessingQueue(e) { + const t = e._processingQueue; + let n = 0; + for (let i = 0; i < t.length; ++i) { + const r = t[i]; + if (r.isDestroyed() || r._contentState !== Cesium3DTileContentState$1.PROCESSING) { + ++n; + continue; + } + n > 0 && (t[i - n] = r); + } + t.length -= n; +} +const scratchUpdateHeightCartographic = new Cartographic(), scratchUpdateHeightCartographic2 = new Cartographic(), scratchUpdateHeightCartesian = new Cartesian3(); +function processUpdateHeight(e, t, n) { + if (!e.enableCollision || !e.show) + return; + const i = e._addHeightCallbacks, r = t.boundingSphere; + for (const o of i) { + if (o.invoked || t._wasSelectedLastFrame) + continue; + const s = o.ellipsoid, c = Cartographic.clone( + o.positionCartographic, + scratchUpdateHeightCartographic + ), l = Cartographic.fromCartesian( + r.center, + s, + scratchUpdateHeightCartographic2 + ); + defined(l) && (c.height = l.height); + const d = Cartographic.toCartesian( + c, + s, + scratchUpdateHeightCartesian + ); + Cartesian3.distance(d, r.center) <= r.radius && (o.invoked = !0, n.afterRender.push(() => { + defined(o.callback) && o.callback(c), o.invoked = !1; + })); + } +} +function processTiles(e, t) { + filterProcessingQueue(e); + const n = e._processingQueue, { cacheBytes: i, maximumCacheOverflowBytes: r, statistics: o } = e, s = i + r; + let c = !1; + for (let l = 0; l < n.length; ++l) { + if (e.totalMemoryUsageInBytes > s) { + c = !0; + break; + } + const d = n[l]; + try { + d.process(e, t), d.contentReady && (--o.numberOfTilesProcessing, e.tileLoad.raiseEvent(d)); + } catch (f) { + --o.numberOfTilesProcessing, handleTileFailure(f, e, d); + } + } + e.totalMemoryUsageInBytes < i ? decreaseScreenSpaceError(e) : c && n.length > 0 && increaseScreenSpaceError(e); +} +function increaseScreenSpaceError(e) { + e._memoryAdjustedScreenSpaceError *= 1.02; + const t = e._processingQueue; + for (let n = 0; n < t.length; ++n) + t[n].updatePriority(); + t.sort(sortTilesByPriority); +} +function decreaseScreenSpaceError(e) { + e._memoryAdjustedScreenSpaceError = Math.max( + e.memoryAdjustedScreenSpaceError / 1.02, + e.maximumScreenSpaceError + ); +} +const scratchCartesian$6 = new Cartesian3(), stringOptions = { + maximumFractionDigits: 3 +}; +function formatMemoryString(e) { + const t = e / 1048576; + return t < 1 ? t.toLocaleString(void 0, stringOptions) : Math.round(t).toLocaleString(); +} +function computeTileLabelPosition(e) { + const { halfAxes: t, radius: n, center: i } = e.boundingVolume.boundingVolume; + let r = Cartesian3.clone(i, scratchCartesian$6); + if (defined(t)) + r.x += 0.75 * (t[0] + t[3] + t[6]), r.y += 0.75 * (t[1] + t[4] + t[7]), r.z += 0.75 * (t[2] + t[5] + t[8]); + else if (defined(n)) { + let o = Cartesian3.normalize(i, scratchCartesian$6); + o = Cartesian3.multiplyByScalar( + o, + 0.75 * n, + scratchCartesian$6 + ), r = Cartesian3.add(o, i, scratchCartesian$6); + } + return r; +} +function addTileDebugLabel(e, t, n) { + let i = "", r = 0; + if (t.debugShowGeometricError && (i += ` +Geometric error: ${e.geometricError}`, r++), t.debugShowRenderingStatistics && (i += ` +Commands: ${e.commandsLength}`, r++, e.content.pointsLength > 0 && (i += ` +Points: ${e.content.pointsLength}`, r++), e.content.trianglesLength > 0 && (i += ` +Triangles: ${e.content.trianglesLength}`, r++), i += ` +Features: ${e.content.featuresLength}`, r++), t.debugShowMemoryUsage && (i += ` +Texture Memory: ${formatMemoryString( + e.content.texturesByteLength + )}`, i += ` +Geometry Memory: ${formatMemoryString( + e.content.geometryByteLength + )}`, r += 2), t.debugShowUrl) + if (e.hasMultipleContents) { + i += ` +Urls:`; + const s = e.content.innerContentUrls; + for (let c = 0; c < s.length; c++) + i += ` +- ${s[c]}`; + r += s.length; + } else + i += ` +Url: ${e._contentHeader.uri}`, r++; + const o = { + text: i.substring(1), + position: n, + font: `${19 - r}px sans-serif`, + showBackground: !0, + disableDepthTestDistance: Number.POSITIVE_INFINITY + }; + return t._tileDebugLabels.add(o); +} +function updateTileDebugLabels(e, t) { + const n = e._selectedTiles, i = n.length, r = e._emptyTiles, o = r.length; + if (e._tileDebugLabels.removeAll(), e.debugPickedTileLabelOnly) { + if (defined(e.debugPickedTile)) { + const s = defined(e.debugPickPosition) ? e.debugPickPosition : computeTileLabelPosition(e.debugPickedTile), c = addTileDebugLabel( + e.debugPickedTile, + e, + s + ); + c.pixelOffset = new Cartesian2(15, -15); + } + } else { + for (let s = 0; s < i; ++s) { + const c = n[s]; + addTileDebugLabel(c, e, computeTileLabelPosition(c)); + } + for (let s = 0; s < o; ++s) { + const c = r[s]; + (c.hasTilesetContent || c.hasImplicitContent) && addTileDebugLabel(c, e, computeTileLabelPosition(c)); + } + } + e._tileDebugLabels.update(t); +} +function updateTiles(e, t, n) { + e._styleEngine.applyStyle(e), e._styleApplied = !0; + const { commandList: i, context: r } = t, o = i.length, s = e._selectedTiles, c = e.isSkippingLevelOfDetail && e._hasMixedContent && r.stencilBuffer && s.length > 0; + e._backfaceCommands.length = 0, c && (defined(e._stencilClearCommand) || (e._stencilClearCommand = new ClearCommand({ + stencil: 0, + pass: Pass$1.CESIUM_3D_TILE, + renderState: RenderState.fromCache({ + stencilMask: StencilConstants$1.SKIP_LOD_MASK + }) + })), i.push(e._stencilClearCommand)); + const { statistics: l, tileVisible: d } = e, f = n.isRender, h = i.length; + for (let _ = 0; _ < s.length; ++_) { + const y = s[_]; + f && d.raiseEvent(y), processUpdateHeight(e, y, t), y.update(e, t, n), l.incrementSelectionCounts(y.content), ++l.selected; + } + const p = e._emptyTiles; + for (let _ = 0; _ < p.length; ++_) + p[_].update(e, t, n); + let m = i.length - h; + if (e._backfaceCommands.trim(), c) { + const _ = e._backfaceCommands.values, y = _.length; + i.length += y; + for (let C = m - 1; C >= 0; --C) + i[h + y + C] = i[h + C]; + for (let C = 0; C < y; ++C) + i[h + C] = _[C]; + } + m = i.length - o, l.numberOfCommands = m, f && (e.pointCloudShading.attenuation && e.pointCloudShading.eyeDomeLighting && m > 0 && e._pointCloudEyeDomeLighting.update( + t, + o, + e.pointCloudShading, + e.boundingSphere + ), e.debugShowGeometricError || e.debugShowRenderingStatistics || e.debugShowMemoryUsage || e.debugShowUrl ? (defined(e._tileDebugLabels) || (e._tileDebugLabels = new LabelCollection()), updateTileDebugLabels(e, t)) : e._tileDebugLabels = e._tileDebugLabels && e._tileDebugLabels.destroy()); +} +const scratchStack = []; +function destroySubtree(e, t) { + const n = t, i = scratchStack; + for (i.push(t); i.length > 0; ) { + t = i.pop(); + const r = t.children; + for (let o = 0; o < r.length; ++o) + i.push(r[o]); + t !== n && (destroyTile(e, t), --e._statistics.numberOfTilesTotal); + } + n.children = []; +} +function unloadTile(e, t) { + e.tileUnload.raiseEvent(t), e._statistics.decrementLoadCounts(t.content), --e._statistics.numberOfTilesWithContentReady, t.unloadContent(); +} +function destroyTile(e, t) { + e._cache.unloadTile(e, t, unloadTile), t.destroy(); +} +Cesium3DTileset.prototype.trimLoadedTiles = function() { + this._cache.trim(); +}; +function raiseLoadProgressEvent(e, t) { + const n = e._statistics, i = e._statisticsLast, r = n.numberOfPendingRequests, o = n.numberOfTilesProcessing, s = i.numberOfPendingRequests, c = i.numberOfTilesProcessing; + Cesium3DTilesetStatistics.clone(n, i); + const l = r !== s || o !== c; + l && t.afterRender.push(function() { + return e.loadProgress.raiseEvent( + r, + o + ), !0; + }), e._tilesLoaded = n.numberOfPendingRequests === 0 && n.numberOfTilesProcessing === 0 && n.numberOfAttemptedRequests === 0, l && e._tilesLoaded && (t.afterRender.push(function() { + return e.allTilesLoaded.raiseEvent(), !0; + }), e._initialTilesLoaded || (e._initialTilesLoaded = !0, t.afterRender.push(function() { + return e.initialTilesLoaded.raiseEvent(), !0; + }))); +} +function resetMinimumMaximum(e) { + e._heatmap.resetMinimumMaximum(), e._minimumPriority.depth = Number.MAX_VALUE, e._maximumPriority.depth = -Number.MAX_VALUE, e._minimumPriority.foveatedFactor = Number.MAX_VALUE, e._maximumPriority.foveatedFactor = -Number.MAX_VALUE, e._minimumPriority.distance = Number.MAX_VALUE, e._maximumPriority.distance = -Number.MAX_VALUE, e._minimumPriority.reverseScreenSpaceError = Number.MAX_VALUE, e._maximumPriority.reverseScreenSpaceError = -Number.MAX_VALUE; +} +function detectModelMatrixChanged(e, t) { + t.frameNumber === e._updatedModelMatrixFrame && defined(e._previousModelMatrix) || (e._updatedModelMatrixFrame = t.frameNumber, e._modelMatrixChanged = !Matrix4.equals( + e.modelMatrix, + e._previousModelMatrix + ), e._modelMatrixChanged && (e._previousModelMatrix = Matrix4.clone( + e.modelMatrix, + e._previousModelMatrix + ))); +} +function update$3(e, t, n, i) { + if (t.mode === SceneMode$1.MORPHING || !defined(e._root)) + return !1; + const r = e._statistics; + r.clear(), ++e._updatedVisibilityFrame, resetMinimumMaximum(e), detectModelMatrixChanged(e, t), e._cullRequestsWhileMoving = e.cullRequestsWhileMoving && !e._modelMatrixChanged; + const o = e.getTraversal(i).selectTiles(e, t); + if (i.requestTiles && requestTiles(e), updateTiles(e, t, i), Cesium3DTilesetStatistics.clone(r, n), i.isRender) { + const s = e._credits; + if (defined(s) && r.selected !== 0) + for (let c = 0; c < s.length; ++c) { + const l = s[c]; + t.creditDisplay.addCreditToNextFrame(l); + } + } + return o; +} +function createCredits(e) { + let t = e._credits; + defined(t) || (t = []), t.length = 0, defined(e.resource.credits) && e.resource.credits.forEach((i) => { + t.push(Credit.clone(i)); + }); + const n = e.asset.extras; + if (defined(n) && defined(n.cesium) && defined(n.cesium.credits)) { + const i = n.cesium.credits; + for (let r = 0; r < i.length; ++r) { + const o = i[r]; + t.push(new Credit(o.html)); + } + } + t.forEach( + (i) => i.showOnScreen = i.showOnScreen || e._showCreditsOnScreen + ), e._credits = t; +} +Cesium3DTileset.prototype.getTraversal = function(e) { + const { pass: t } = e; + return t === Cesium3DTilePass$1.MOST_DETAILED_PRELOAD || t === Cesium3DTilePass$1.MOST_DETAILED_PICK ? Cesium3DTilesetMostDetailedTraversal : this.isSkippingLevelOfDetail ? Cesium3DTilesetSkipTraversal : Cesium3DTilesetBaseTraversal; +}; +Cesium3DTileset.prototype.update = function(e) { + this.updateForPass(e, e.tilesetPassState); +}; +Cesium3DTileset.prototype.updateForPass = function(e, t) { + const n = t.pass; + if (n === Cesium3DTilePass$1.PRELOAD && (!this.preloadWhenHidden || this.show) || n === Cesium3DTilePass$1.PRELOAD_FLIGHT && (!this.preloadFlightDestinations || !this.show && !this.preloadWhenHidden) || n === Cesium3DTilePass$1.REQUEST_RENDER_MODE_DEFER_CHECK && (!this._cullRequestsWhileMoving && this.foveatedTimeDelay <= 0 || !this.show)) + return; + const i = e.commandList, r = e.camera, o = e.cullingVolume; + t.ready = !1; + const s = Cesium3DTilePass$1.getPassOptions(n), c = s.ignoreCommands, l = defaultValue( + t.commandList, + i + ), d = l.length; + e.commandList = l, e.camera = defaultValue(t.camera, r), e.cullingVolume = defaultValue( + t.cullingVolume, + o + ); + const f = this._clippingPolygons; + defined(f) && f.enabled && f.queueCommands(e); + const h = this._statisticsPerPass[n]; + (this.show || c) && (this._pass = n, t.ready = update$3( + this, + e, + h, + s + )), c && (l.length = d), e.commandList = i, e.camera = r, e.cullingVolume = o; +}; +Cesium3DTileset.prototype.hasExtension = function(e) { + return defined(this._extensionsUsed) ? this._extensionsUsed.indexOf(e) > -1 : !1; +}; +Cesium3DTileset.prototype.isDestroyed = function() { + return !1; +}; +Cesium3DTileset.prototype.destroy = function() { + if (this._tileDebugLabels = this._tileDebugLabels && this._tileDebugLabels.destroy(), this._clippingPlanes = this._clippingPlanes && this._clippingPlanes.destroy(), this._clippingPolygons = this._clippingPolygons && this._clippingPolygons.destroy(), defined(this._root)) { + const e = scratchStack; + for (e.push(this._root); e.length > 0; ) { + const t = e.pop(); + t.destroy(); + const n = t.children; + for (let i = 0; i < n.length; ++i) + e.push(n[i]); + } + } + return this._root = void 0, this._shouldDestroyImageBasedLighting && !this._imageBasedLighting.isDestroyed() && this._imageBasedLighting.destroy(), this._imageBasedLighting = void 0, destroyObject(this); +}; +Cesium3DTileset.supportedExtensions = { + "3DTILES_metadata": !0, + "3DTILES_implicit_tiling": !0, + "3DTILES_content_gltf": !0, + "3DTILES_multiple_contents": !0, + "3DTILES_bounding_volume_S2": !0, + "3DTILES_batch_table_hierarchy": !0, + "3DTILES_draco_point_compression": !0, + MAXAR_content_geojson: !0 +}; +Cesium3DTileset.checkSupportedExtensions = function(e) { + for (let t = 0; t < e.length; t++) + if (!Cesium3DTileset.supportedExtensions[e[t]]) + throw new RuntimeError( + `Unsupported 3D Tiles Extension: ${e[t]}` + ); +}; +const scratchGetHeightRay$1 = new Ray(), scratchIntersection = new Cartesian3(), scratchGetHeightCartographic$1 = new Cartographic(); +Cesium3DTileset.prototype.getHeight = function(e, t) { + var s; + let n = t.ellipsoid; + defined(n) || (n = Ellipsoid.WGS84); + const i = scratchGetHeightRay$1, r = n.cartographicToCartesian( + e, + i.direction + ); + Cartesian3.normalize(i.direction, i.direction), i.direction = Cartesian3.normalize(r, i.direction), i.direction = Cartesian3.negate(r, i.direction), i.origin = Cartesian3.multiplyByScalar( + i.direction, + -2 * n.maximumRadius, + i.origin + ); + const o = this.pick(i, t.frameState, scratchIntersection); + if (defined(o)) + return (s = n.cartesianToCartographic( + o, + scratchGetHeightCartographic$1 + )) == null ? void 0 : s.height; +}; +Cesium3DTileset.prototype.updateHeight = function(e, t, n) { + n = defaultValue(n, Ellipsoid.WGS84); + const i = { + positionCartographic: e, + ellipsoid: n, + callback: t, + invoked: !1 + }, r = () => { + const o = this._addHeightCallbacks, s = o.length; + for (let c = 0; c < s; ++c) + if (o[c] === i) { + o.splice(c, 1); + break; + } + i.callback && (i.callback = void 0); + }; + return this._addHeightCallbacks.push(i), r; +}; +const scratchSphereIntersection = new Interval(), scratchPickIntersection = new Cartesian3(); +Cesium3DTileset.prototype.pick = function(e, t, n) { + if (!t.context.webgl2 && !this._enablePick) + return; + const i = this._selectedTiles, r = i.length, o = []; + for (let l = 0; l < r; ++l) { + const d = i[l], f = IntersectionTests.raySphere( + e, + d.contentBoundingVolume.boundingSphere, + scratchSphereIntersection + ); + !defined(f) || !defined(d.content) || o.push(d); + } + const s = o.length; + o.sort((l, d) => { + const f = BoundingSphere.distanceSquaredTo( + l.contentBoundingVolume.boundingSphere, + e.origin + ), h = BoundingSphere.distanceSquaredTo( + d.contentBoundingVolume.boundingSphere, + e.origin + ); + return f - h; + }); + let c; + for (let l = 0; l < s; ++l) { + const f = o[l].content.pick( + e, + t, + scratchPickIntersection + ); + if (defined(f)) + return c = Cartesian3.clone(f, n), c; + } +}; +const modelMatrixScratch$1 = new Matrix4(); +function Cesium3DTilesetVisualizer(e, t) { + t.collectionChanged.addEventListener( + Cesium3DTilesetVisualizer.prototype._onCollectionChanged, + this + ), this._scene = e, this._primitives = e.primitives, this._entityCollection = t, this._tilesetHash = {}, this._entitiesToVisualize = new AssociativeArray(), this._onCollectionChanged(t, t.values, [], []); +} +Cesium3DTilesetVisualizer.prototype.update = function(e) { + const t = this._entitiesToVisualize.values, n = this._tilesetHash, i = this._primitives; + for (let r = 0, o = t.length; r < o; r++) { + const s = t[r], c = s._tileset; + let l; + const d = n[s.id], f = s.isShowing && s.isAvailable(e) && Property.getValueOrDefault(c._show, e, !0); + let h; + f && (h = s.computeModelMatrix(e, modelMatrixScratch$1), l = Resource.createIfNeeded( + Property.getValueOrUndefined(c._uri, e) + )); + const p = defined(d) ? d.tilesetPrimitive : void 0; + if (!f) { + defined(p) && (p.show = !1); + continue; + } + (!defined(d) || l.url !== d.url) && (defined(p) && i.removeAndDestroy(p), delete n[s.id], createTileset(l, n, s, i)), defined(p) && (p.show = !0, defined(h) && (p.modelMatrix = h), p.maximumScreenSpaceError = Property.getValueOrDefault( + c.maximumScreenSpaceError, + e, + p.maximumScreenSpaceError + )); + } + return !0; +}; +Cesium3DTilesetVisualizer.prototype.isDestroyed = function() { + return !1; +}; +Cesium3DTilesetVisualizer.prototype.destroy = function() { + this._entityCollection.collectionChanged.removeEventListener( + Cesium3DTilesetVisualizer.prototype._onCollectionChanged, + this + ); + const e = this._entitiesToVisualize.values, t = this._tilesetHash, n = this._primitives; + for (let i = e.length - 1; i > -1; i--) + removeTileset(this, e[i], t, n); + return destroyObject(this); +}; +Cesium3DTilesetVisualizer.prototype.getBoundingSphere = function(e, t) { + const n = this._tilesetHash[e.id]; + if (!defined(n) || n.loadFail) + return BoundingSphereState$1.FAILED; + const i = n.tilesetPrimitive; + return defined(i) ? i.show ? (BoundingSphere.clone(i.boundingSphere, t), BoundingSphereState$1.DONE) : BoundingSphereState$1.FAILED : BoundingSphereState$1.PENDING; +}; +Cesium3DTilesetVisualizer.prototype._onCollectionChanged = function(e, t, n, i) { + let r, o; + const s = this._entitiesToVisualize, c = this._tilesetHash, l = this._primitives; + for (r = t.length - 1; r > -1; r--) + o = t[r], defined(o._tileset) && s.set(o.id, o); + for (r = i.length - 1; r > -1; r--) + o = i[r], defined(o._tileset) ? s.set(o.id, o) : (removeTileset(this, o, c, l), s.remove(o.id)); + for (r = n.length - 1; r > -1; r--) + o = n[r], removeTileset(this, o, c, l), s.remove(o.id); +}; +function removeTileset(e, t, n, i) { + const r = n[t.id]; + defined(r) && (defined(r.tilesetPrimitive) && i.removeAndDestroy(r.tilesetPrimitive), delete n[t.id]); +} +async function createTileset(e, t, n, i) { + t[n.id] = { + url: e.url, + loadFail: !1 + }; + try { + const r = await Cesium3DTileset.fromUrl(e); + if (r.id = n, i.add(r), !defined(t[n.id])) + return; + t[n.id].tilesetPrimitive = r; + } catch (r) { + console.error(r), t[n.id].loadFail = !0; + } +} +const defaultEvenColor$1 = Color.WHITE, defaultOddColor$1 = Color.BLACK, defaultRepeat$1 = new Cartesian2(2, 2); +function CheckerboardMaterialProperty(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._definitionChanged = new Event(), this._evenColor = void 0, this._evenColorSubscription = void 0, this._oddColor = void 0, this._oddColorSubscription = void 0, this._repeat = void 0, this._repeatSubscription = void 0, this.evenColor = e.evenColor, this.oddColor = e.oddColor, this.repeat = e.repeat; +} +Object.defineProperties(CheckerboardMaterialProperty.prototype, { + /** + * Gets a value indicating if this property is constant. A property is considered + * constant if getValue always returns the same result for the current definition. + * @memberof CheckerboardMaterialProperty.prototype + * + * @type {boolean} + * @readonly + */ + isConstant: { + get: function() { + return Property.isConstant(this._evenColor) && // + Property.isConstant(this._oddColor) && // + Property.isConstant(this._repeat); + } + }, + /** + * Gets the event that is raised whenever the definition of this property changes. + * The definition is considered to have changed if a call to getValue would return + * a different result for the same time. + * @memberof CheckerboardMaterialProperty.prototype + * + * @type {Event} + * @readonly + */ + definitionChanged: { + get: function() { + return this._definitionChanged; + } + }, + /** + * Gets or sets the Property specifying the first {@link Color}. + * @memberof CheckerboardMaterialProperty.prototype + * @type {Property|undefined} + * @default Color.WHITE + */ + evenColor: createPropertyDescriptor("evenColor"), + /** + * Gets or sets the Property specifying the second {@link Color}. + * @memberof CheckerboardMaterialProperty.prototype + * @type {Property|undefined} + * @default Color.BLACK + */ + oddColor: createPropertyDescriptor("oddColor"), + /** + * Gets or sets the {@link Cartesian2} Property specifying how many times the tiles repeat in each direction. + * @memberof CheckerboardMaterialProperty.prototype + * @type {Property|undefined} + * @default new Cartesian2(2.0, 2.0) + */ + repeat: createPropertyDescriptor("repeat") +}); +CheckerboardMaterialProperty.prototype.getType = function(e) { + return "Checkerboard"; +}; +const timeScratch$j = new JulianDate(); +CheckerboardMaterialProperty.prototype.getValue = function(e, t) { + return defined(e) || (e = JulianDate.now(timeScratch$j)), defined(t) || (t = {}), t.lightColor = Property.getValueOrClonedDefault( + this._evenColor, + e, + defaultEvenColor$1, + t.lightColor + ), t.darkColor = Property.getValueOrClonedDefault( + this._oddColor, + e, + defaultOddColor$1, + t.darkColor + ), t.repeat = Property.getValueOrDefault(this._repeat, e, defaultRepeat$1), t; +}; +CheckerboardMaterialProperty.prototype.equals = function(e) { + return this === e || // + e instanceof CheckerboardMaterialProperty && // + Property.equals(this._evenColor, e._evenColor) && // + Property.equals(this._oddColor, e._oddColor) && // + Property.equals(this._repeat, e._repeat); +}; +const entityOptionsScratch$1 = { + id: void 0 +}; +function fireChangedEvent(e) { + if (e._firing) { + e._refire = !0; + return; + } + if (e._suspendCount === 0) { + const t = e._addedEntities, n = e._removedEntities, i = e._changedEntities; + if (i.length !== 0 || t.length !== 0 || n.length !== 0) { + e._firing = !0; + do { + e._refire = !1; + const r = t.values.slice(0), o = n.values.slice(0), s = i.values.slice(0); + t.removeAll(), n.removeAll(), i.removeAll(), e._collectionChanged.raiseEvent( + e, + r, + o, + s + ); + } while (e._refire); + e._firing = !1; + } + } +} +function EntityCollection(e) { + this._owner = e, this._entities = new AssociativeArray(), this._addedEntities = new AssociativeArray(), this._removedEntities = new AssociativeArray(), this._changedEntities = new AssociativeArray(), this._suspendCount = 0, this._collectionChanged = new Event(), this._id = createGuid(), this._show = !0, this._firing = !1, this._refire = !1; +} +EntityCollection.prototype.suspendEvents = function() { + this._suspendCount++; +}; +EntityCollection.prototype.resumeEvents = function() { + this._suspendCount--, fireChangedEvent(this); +}; +Object.defineProperties(EntityCollection.prototype, { + /** + * Gets the event that is fired when entities are added or removed from the collection. + * The generated event is a {@link EntityCollection.CollectionChangedEventCallback}. + * @memberof EntityCollection.prototype + * @readonly + * @type {Event
+ *
+ * Corner has a smooth edge.
+ * @type {number}
+ * @constant
+ */
+ ROUNDED: 0,
+ /**
+ *
+ *
+ * Corner point is the intersection of adjacent edges.
+ * @type {number}
+ * @constant
+ */
+ MITERED: 1,
+ /**
+ *
+ *
+ * Corner is clipped.
+ * @type {number}
+ * @constant
+ */
+ BEVELED: 2
+}, CornerType$1 = Object.freeze(CornerType), scratch2Array = [new Cartesian3(), new Cartesian3()], scratchCartesian1$6 = new Cartesian3(), scratchCartesian2$8 = new Cartesian3(), scratchCartesian3$8 = new Cartesian3(), scratchCartesian4$4 = new Cartesian3(), scratchCartesian5$1 = new Cartesian3(), scratchCartesian6 = new Cartesian3(), scratchCartesian7 = new Cartesian3(), scratchCartesian8 = new Cartesian3(), scratchCartesian9 = new Cartesian3(), scratch1$2 = new Cartesian3(), scratch2$2 = new Cartesian3(), PolylineVolumeGeometryLibrary = {};
+let cartographic = new Cartographic();
+function scaleToSurface$2(e, t) {
+ const n = new Array(e.length);
+ for (let i = 0; i < e.length; i++) {
+ const r = e[i];
+ cartographic = t.cartesianToCartographic(r, cartographic), n[i] = cartographic.height, e[i] = t.scaleToGeodeticSurface(r, r);
+ }
+ return n;
+}
+function subdivideHeights(e, t, n, i) {
+ const r = e[0], o = e[1], s = Cartesian3.angleBetween(r, o), c = Math.ceil(s / i), l = new Array(c);
+ let d;
+ if (t === n) {
+ for (d = 0; d < c; d++)
+ l[d] = t;
+ return l.push(n), l;
+ }
+ const h = (n - t) / c;
+ for (d = 1; d < c; d++) {
+ const p = t + d * h;
+ l[d] = p;
+ }
+ return l[0] = t, l.push(n), l;
+}
+const nextScratch = new Cartesian3(), prevScratch = new Cartesian3();
+function computeRotationAngle(e, t, n, i) {
+ const r = new EllipsoidTangentPlane(n, i), o = r.projectPointOntoPlane(
+ Cartesian3.add(n, e, nextScratch),
+ nextScratch
+ ), s = r.projectPointOntoPlane(
+ Cartesian3.add(n, t, prevScratch),
+ prevScratch
+ ), c = Cartesian2.angleBetween(o, s);
+ return s.x * o.y - s.y * o.x >= 0 ? -c : c;
+}
+const negativeX = new Cartesian3(-1, 0, 0);
+let transform$2 = new Matrix4();
+const translation = new Matrix4();
+let rotationZ = new Matrix3();
+const scaleMatrix = Matrix3.IDENTITY.clone(), westScratch$1 = new Cartesian3(), finalPosScratch = new Cartesian4(), heightCartesian = new Cartesian3();
+function addPosition(e, t, n, i, r, o, s, c) {
+ let l = westScratch$1, d = finalPosScratch;
+ transform$2 = Transforms.eastNorthUpToFixedFrame(e, r, transform$2), l = Matrix4.multiplyByPointAsVector(transform$2, negativeX, l), l = Cartesian3.normalize(l, l);
+ const f = computeRotationAngle(l, t, e, r);
+ rotationZ = Matrix3.fromRotationZ(f, rotationZ), heightCartesian.z = o, transform$2 = Matrix4.multiplyTransformation(
+ transform$2,
+ Matrix4.fromRotationTranslation(rotationZ, heightCartesian, translation),
+ transform$2
+ );
+ const h = scaleMatrix;
+ h[0] = s;
+ for (let p = 0; p < c; p++)
+ for (let m = 0; m < n.length; m += 3)
+ d = Cartesian3.fromArray(n, m, d), d = Matrix3.multiplyByVector(
+ h,
+ d,
+ d
+ ), d = Matrix4.multiplyByPoint(
+ transform$2,
+ d,
+ d
+ ), i.push(d.x, d.y, d.z);
+ return i;
+}
+const centerScratch$4 = new Cartesian3();
+function addPositions(e, t, n, i, r, o, s) {
+ for (let c = 0; c < e.length; c += 3) {
+ const l = Cartesian3.fromArray(e, c, centerScratch$4);
+ i = addPosition(
+ l,
+ t,
+ n,
+ i,
+ r,
+ o[c / 3],
+ s,
+ 1
+ );
+ }
+ return i;
+}
+function convertShapeTo3DDuplicate(e, t) {
+ const n = e.length, i = new Array(n * 6);
+ let r = 0;
+ const o = t.x + t.width / 2, s = t.y + t.height / 2;
+ let c = e[0];
+ i[r++] = c.x - o, i[r++] = 0, i[r++] = c.y - s;
+ for (let l = 1; l < n; l++) {
+ c = e[l];
+ const d = c.x - o, f = c.y - s;
+ i[r++] = d, i[r++] = 0, i[r++] = f, i[r++] = d, i[r++] = 0, i[r++] = f;
+ }
+ return c = e[0], i[r++] = c.x - o, i[r++] = 0, i[r++] = c.y - s, i;
+}
+function convertShapeTo3D(e, t) {
+ const n = e.length, i = new Array(n * 3);
+ let r = 0;
+ const o = t.x + t.width / 2, s = t.y + t.height / 2;
+ for (let c = 0; c < n; c++)
+ i[r++] = e[c].x - o, i[r++] = 0, i[r++] = e[c].y - s;
+ return i;
+}
+const quaterion$1 = new Quaternion(), startPointScratch = new Cartesian3(), rotMatrix$1 = new Matrix3();
+function computeRoundCorner$1(e, t, n, i, r, o, s, c, l, d) {
+ const f = Cartesian3.angleBetween(
+ Cartesian3.subtract(t, e, scratch1$2),
+ Cartesian3.subtract(n, e, scratch2$2)
+ ), h = i === CornerType$1.BEVELED ? 0 : Math.ceil(f / CesiumMath.toRadians(5));
+ let p;
+ r ? p = Matrix3.fromQuaternion(
+ Quaternion.fromAxisAngle(
+ Cartesian3.negate(e, scratch1$2),
+ f / (h + 1),
+ quaterion$1
+ ),
+ rotMatrix$1
+ ) : p = Matrix3.fromQuaternion(
+ Quaternion.fromAxisAngle(e, f / (h + 1), quaterion$1),
+ rotMatrix$1
+ );
+ let m, _;
+ if (t = Cartesian3.clone(t, startPointScratch), h > 0) {
+ const y = d ? 2 : 1;
+ for (let C = 0; C < h; C++)
+ t = Matrix3.multiplyByVector(p, t, t), m = Cartesian3.subtract(t, e, scratch1$2), m = Cartesian3.normalize(m, m), r || (m = Cartesian3.negate(m, m)), _ = o.scaleToGeodeticSurface(t, scratch2$2), s = addPosition(
+ _,
+ m,
+ c,
+ s,
+ o,
+ l,
+ 1,
+ y
+ );
+ } else
+ m = Cartesian3.subtract(t, e, scratch1$2), m = Cartesian3.normalize(m, m), r || (m = Cartesian3.negate(m, m)), _ = o.scaleToGeodeticSurface(t, scratch2$2), s = addPosition(
+ _,
+ m,
+ c,
+ s,
+ o,
+ l,
+ 1,
+ 1
+ ), n = Cartesian3.clone(n, startPointScratch), m = Cartesian3.subtract(n, e, scratch1$2), m = Cartesian3.normalize(m, m), r || (m = Cartesian3.negate(m, m)), _ = o.scaleToGeodeticSurface(n, scratch2$2), s = addPosition(
+ _,
+ m,
+ c,
+ s,
+ o,
+ l,
+ 1,
+ 1
+ );
+ return s;
+}
+PolylineVolumeGeometryLibrary.removeDuplicatesFromShape = function(e) {
+ const t = e.length, n = [];
+ for (let i = t - 1, r = 0; r < t; i = r++) {
+ const o = e[i], s = e[r];
+ Cartesian2.equals(o, s) || n.push(s);
+ }
+ return n;
+};
+PolylineVolumeGeometryLibrary.angleIsGreaterThanPi = function(e, t, n, i) {
+ const r = new EllipsoidTangentPlane(n, i), o = r.projectPointOntoPlane(
+ Cartesian3.add(n, e, nextScratch),
+ nextScratch
+ ), s = r.projectPointOntoPlane(
+ Cartesian3.add(n, t, prevScratch),
+ prevScratch
+ );
+ return s.x * o.y - s.y * o.x >= 0;
+};
+const scratchForwardProjection$1 = new Cartesian3(), scratchBackwardProjection$1 = new Cartesian3();
+PolylineVolumeGeometryLibrary.computePositions = function(e, t, n, i, r) {
+ const o = i._ellipsoid, s = scaleToSurface$2(e, o), c = i._granularity, l = i._cornerType, d = r ? convertShapeTo3DDuplicate(t, n) : convertShapeTo3D(t, n), f = r ? convertShapeTo3D(t, n) : void 0, h = n.height / 2, p = n.width / 2;
+ let m = e.length, _ = [], y = r ? [] : void 0, C = scratchCartesian1$6, T = scratchCartesian2$8, x = scratchCartesian3$8, b = scratchCartesian4$4, S = scratchCartesian5$1, E = scratchCartesian6, A = scratchCartesian7, D = scratchCartesian8, P = scratchCartesian9, I = e[0], M = e[1];
+ b = o.geodeticSurfaceNormal(I, b), C = Cartesian3.subtract(M, I, C), C = Cartesian3.normalize(C, C), D = Cartesian3.cross(b, C, D), D = Cartesian3.normalize(D, D);
+ let R = s[0], L = s[1];
+ r && (y = addPosition(
+ I,
+ D,
+ f,
+ y,
+ o,
+ R + h,
+ 1,
+ 1
+ )), P = Cartesian3.clone(I, P), I = M, T = Cartesian3.negate(C, T);
+ let g, w;
+ for (let F = 1; F < m - 1; F++) {
+ const B = r ? 2 : 1;
+ if (M = e[F + 1], I.equals(M)) {
+ oneTimeWarning(
+ "Positions are too close and are considered equivalent with rounding error."
+ );
+ continue;
+ }
+ C = Cartesian3.subtract(M, I, C), C = Cartesian3.normalize(C, C), x = Cartesian3.add(C, T, x), x = Cartesian3.normalize(x, x), b = o.geodeticSurfaceNormal(I, b);
+ const V = Cartesian3.multiplyByScalar(
+ b,
+ Cartesian3.dot(C, b),
+ scratchForwardProjection$1
+ );
+ Cartesian3.subtract(C, V, V), Cartesian3.normalize(V, V);
+ const U = Cartesian3.multiplyByScalar(
+ b,
+ Cartesian3.dot(T, b),
+ scratchBackwardProjection$1
+ );
+ if (Cartesian3.subtract(T, U, U), Cartesian3.normalize(U, U), !CesiumMath.equalsEpsilon(
+ Math.abs(Cartesian3.dot(V, U)),
+ 1,
+ CesiumMath.EPSILON7
+ )) {
+ x = Cartesian3.cross(
+ x,
+ b,
+ x
+ ), x = Cartesian3.cross(
+ b,
+ x,
+ x
+ ), x = Cartesian3.normalize(x, x);
+ const $ = 1 / Math.max(
+ 0.25,
+ Cartesian3.magnitude(
+ Cartesian3.cross(x, T, scratch1$2)
+ )
+ ), G = PolylineVolumeGeometryLibrary.angleIsGreaterThanPi(
+ C,
+ T,
+ I,
+ o
+ );
+ G ? (S = Cartesian3.add(
+ I,
+ Cartesian3.multiplyByScalar(
+ x,
+ $ * p,
+ x
+ ),
+ S
+ ), E = Cartesian3.add(
+ S,
+ Cartesian3.multiplyByScalar(D, p, E),
+ E
+ ), scratch2Array[0] = Cartesian3.clone(P, scratch2Array[0]), scratch2Array[1] = Cartesian3.clone(E, scratch2Array[1]), g = subdivideHeights(
+ scratch2Array,
+ R + h,
+ L + h,
+ c
+ ), w = PolylinePipeline.generateArc({
+ positions: scratch2Array,
+ granularity: c,
+ ellipsoid: o
+ }), _ = addPositions(
+ w,
+ D,
+ d,
+ _,
+ o,
+ g,
+ 1
+ ), D = Cartesian3.cross(b, C, D), D = Cartesian3.normalize(D, D), A = Cartesian3.add(
+ S,
+ Cartesian3.multiplyByScalar(D, p, A),
+ A
+ ), l === CornerType$1.ROUNDED || l === CornerType$1.BEVELED ? computeRoundCorner$1(
+ S,
+ E,
+ A,
+ l,
+ G,
+ o,
+ _,
+ d,
+ L + h,
+ r
+ ) : (x = Cartesian3.negate(x, x), _ = addPosition(
+ I,
+ x,
+ d,
+ _,
+ o,
+ L + h,
+ $,
+ B
+ )), P = Cartesian3.clone(A, P)) : (S = Cartesian3.add(
+ I,
+ Cartesian3.multiplyByScalar(
+ x,
+ $ * p,
+ x
+ ),
+ S
+ ), E = Cartesian3.add(
+ S,
+ Cartesian3.multiplyByScalar(D, -p, E),
+ E
+ ), scratch2Array[0] = Cartesian3.clone(P, scratch2Array[0]), scratch2Array[1] = Cartesian3.clone(E, scratch2Array[1]), g = subdivideHeights(
+ scratch2Array,
+ R + h,
+ L + h,
+ c
+ ), w = PolylinePipeline.generateArc({
+ positions: scratch2Array,
+ granularity: c,
+ ellipsoid: o
+ }), _ = addPositions(
+ w,
+ D,
+ d,
+ _,
+ o,
+ g,
+ 1
+ ), D = Cartesian3.cross(b, C, D), D = Cartesian3.normalize(D, D), A = Cartesian3.add(
+ S,
+ Cartesian3.multiplyByScalar(D, -p, A),
+ A
+ ), l === CornerType$1.ROUNDED || l === CornerType$1.BEVELED ? computeRoundCorner$1(
+ S,
+ E,
+ A,
+ l,
+ G,
+ o,
+ _,
+ d,
+ L + h,
+ r
+ ) : _ = addPosition(
+ I,
+ x,
+ d,
+ _,
+ o,
+ L + h,
+ $,
+ B
+ ), P = Cartesian3.clone(A, P)), T = Cartesian3.negate(C, T);
+ } else
+ _ = addPosition(
+ P,
+ D,
+ d,
+ _,
+ o,
+ R + h,
+ 1,
+ 1
+ ), P = I;
+ R = L, L = s[F + 1], I = M;
+ }
+ scratch2Array[0] = Cartesian3.clone(P, scratch2Array[0]), scratch2Array[1] = Cartesian3.clone(I, scratch2Array[1]), g = subdivideHeights(
+ scratch2Array,
+ R + h,
+ L + h,
+ c
+ ), w = PolylinePipeline.generateArc({
+ positions: scratch2Array,
+ granularity: c,
+ ellipsoid: o
+ }), _ = addPositions(
+ w,
+ D,
+ d,
+ _,
+ o,
+ g,
+ 1
+ ), r && (y = addPosition(
+ I,
+ D,
+ f,
+ y,
+ o,
+ L + h,
+ 1,
+ 1
+ )), m = _.length;
+ const O = r ? m + y.length : m, N = new Float64Array(O);
+ return N.set(_), r && N.set(y, m), N;
+};
+const CorridorGeometryLibrary = {}, scratch1$1 = new Cartesian3(), scratch2$1 = new Cartesian3(), scratch3 = new Cartesian3(), scratch4 = new Cartesian3(), scaleArray2 = [new Cartesian3(), new Cartesian3()], cartesian1$2 = new Cartesian3(), cartesian2$2 = new Cartesian3(), cartesian3$2 = new Cartesian3(), cartesian4$1 = new Cartesian3(), cartesian5$1 = new Cartesian3(), cartesian6$1 = new Cartesian3(), cartesian7 = new Cartesian3(), cartesian8 = new Cartesian3(), cartesian9 = new Cartesian3(), cartesian10 = new Cartesian3(), quaterion = new Quaternion(), rotMatrix = new Matrix3();
+function computeRoundCorner(e, t, n, i, r) {
+ const o = Cartesian3.angleBetween(
+ Cartesian3.subtract(t, e, scratch1$1),
+ Cartesian3.subtract(n, e, scratch2$1)
+ ), s = i === CornerType$1.BEVELED ? 1 : Math.ceil(o / CesiumMath.toRadians(5)) + 1, c = s * 3, l = new Array(c);
+ l[c - 3] = n.x, l[c - 2] = n.y, l[c - 1] = n.z;
+ let d;
+ r ? d = Matrix3.fromQuaternion(
+ Quaternion.fromAxisAngle(
+ Cartesian3.negate(e, scratch1$1),
+ o / s,
+ quaterion
+ ),
+ rotMatrix
+ ) : d = Matrix3.fromQuaternion(
+ Quaternion.fromAxisAngle(e, o / s, quaterion),
+ rotMatrix
+ );
+ let f = 0;
+ t = Cartesian3.clone(t, scratch1$1);
+ for (let h = 0; h < s; h++)
+ t = Matrix3.multiplyByVector(d, t, t), l[f++] = t.x, l[f++] = t.y, l[f++] = t.z;
+ return l;
+}
+function addEndCaps(e) {
+ let t = cartesian1$2, n = cartesian2$2, i = cartesian3$2, r = e[1];
+ n = Cartesian3.fromArray(
+ e[1],
+ r.length - 3,
+ n
+ ), i = Cartesian3.fromArray(e[0], 0, i), t = Cartesian3.midpoint(n, i, t);
+ const o = computeRoundCorner(
+ t,
+ n,
+ i,
+ CornerType$1.ROUNDED,
+ !1
+ ), s = e.length - 1, c = e[s - 1];
+ r = e[s], n = Cartesian3.fromArray(
+ c,
+ c.length - 3,
+ n
+ ), i = Cartesian3.fromArray(r, 0, i), t = Cartesian3.midpoint(n, i, t);
+ const l = computeRoundCorner(
+ t,
+ n,
+ i,
+ CornerType$1.ROUNDED,
+ !1
+ );
+ return [o, l];
+}
+function computeMiteredCorner(e, t, n, i) {
+ let r = scratch1$1;
+ return i || (t = Cartesian3.negate(
+ t,
+ t
+ )), r = Cartesian3.add(e, t, r), [
+ r.x,
+ r.y,
+ r.z,
+ n.x,
+ n.y,
+ n.z
+ ];
+}
+function addShiftedPositions(e, t, n, i) {
+ const r = new Array(e.length), o = new Array(e.length), s = Cartesian3.multiplyByScalar(t, n, scratch1$1), c = Cartesian3.negate(s, scratch2$1);
+ let l = 0, d = e.length - 1;
+ for (let f = 0; f < e.length; f += 3) {
+ const h = Cartesian3.fromArray(e, f, scratch3), p = Cartesian3.add(h, c, scratch4);
+ r[l++] = p.x, r[l++] = p.y, r[l++] = p.z;
+ const m = Cartesian3.add(h, s, scratch4);
+ o[d--] = m.z, o[d--] = m.y, o[d--] = m.x;
+ }
+ return i.push(r, o), i;
+}
+CorridorGeometryLibrary.addAttribute = function(e, t, n, i) {
+ const r = t.x, o = t.y, s = t.z;
+ defined(n) && (e[n] = r, e[n + 1] = o, e[n + 2] = s), defined(i) && (e[i] = s, e[i - 1] = o, e[i - 2] = r);
+};
+const scratchForwardProjection = new Cartesian3(), scratchBackwardProjection = new Cartesian3();
+CorridorGeometryLibrary.computePositions = function(e) {
+ const t = e.granularity, n = e.positions, i = e.ellipsoid, r = e.width / 2, o = e.cornerType, s = e.saveAttributes;
+ let c = cartesian1$2, l = cartesian2$2, d = cartesian3$2, f = cartesian4$1, h = cartesian5$1, p = cartesian6$1, m = cartesian7, _ = cartesian8, y = cartesian9, C = cartesian10, T = [];
+ const x = s ? [] : void 0, b = s ? [] : void 0;
+ let S = n[0], E = n[1];
+ l = Cartesian3.normalize(
+ Cartesian3.subtract(E, S, l),
+ l
+ ), c = i.geodeticSurfaceNormal(S, c), f = Cartesian3.normalize(Cartesian3.cross(c, l, f), f), s && (x.push(f.x, f.y, f.z), b.push(c.x, c.y, c.z)), m = Cartesian3.clone(S, m), S = E, d = Cartesian3.negate(l, d);
+ let A;
+ const D = [];
+ let P;
+ const I = n.length;
+ for (P = 1; P < I - 1; P++) {
+ c = i.geodeticSurfaceNormal(S, c), E = n[P + 1], l = Cartesian3.normalize(
+ Cartesian3.subtract(E, S, l),
+ l
+ ), h = Cartesian3.normalize(
+ Cartesian3.add(l, d, h),
+ h
+ );
+ const R = Cartesian3.multiplyByScalar(
+ c,
+ Cartesian3.dot(l, c),
+ scratchForwardProjection
+ );
+ Cartesian3.subtract(l, R, R), Cartesian3.normalize(R, R);
+ const L = Cartesian3.multiplyByScalar(
+ c,
+ Cartesian3.dot(d, c),
+ scratchBackwardProjection
+ );
+ if (Cartesian3.subtract(d, L, L), Cartesian3.normalize(L, L), !CesiumMath.equalsEpsilon(
+ Math.abs(Cartesian3.dot(R, L)),
+ 1,
+ CesiumMath.EPSILON7
+ )) {
+ h = Cartesian3.cross(
+ h,
+ c,
+ h
+ ), h = Cartesian3.cross(
+ c,
+ h,
+ h
+ ), h = Cartesian3.normalize(h, h);
+ const w = r / Math.max(
+ 0.25,
+ Cartesian3.magnitude(
+ Cartesian3.cross(h, d, scratch1$1)
+ )
+ ), O = PolylineVolumeGeometryLibrary.angleIsGreaterThanPi(
+ l,
+ d,
+ S,
+ i
+ );
+ h = Cartesian3.multiplyByScalar(
+ h,
+ w,
+ h
+ ), O ? (_ = Cartesian3.add(S, h, _), C = Cartesian3.add(
+ _,
+ Cartesian3.multiplyByScalar(f, r, C),
+ C
+ ), y = Cartesian3.add(
+ _,
+ Cartesian3.multiplyByScalar(f, r * 2, y),
+ y
+ ), scaleArray2[0] = Cartesian3.clone(m, scaleArray2[0]), scaleArray2[1] = Cartesian3.clone(C, scaleArray2[1]), A = PolylinePipeline.generateArc({
+ positions: scaleArray2,
+ granularity: t,
+ ellipsoid: i
+ }), T = addShiftedPositions(
+ A,
+ f,
+ r,
+ T
+ ), s && (x.push(f.x, f.y, f.z), b.push(c.x, c.y, c.z)), p = Cartesian3.clone(y, p), f = Cartesian3.normalize(
+ Cartesian3.cross(c, l, f),
+ f
+ ), y = Cartesian3.add(
+ _,
+ Cartesian3.multiplyByScalar(f, r * 2, y),
+ y
+ ), m = Cartesian3.add(
+ _,
+ Cartesian3.multiplyByScalar(f, r, m),
+ m
+ ), o === CornerType$1.ROUNDED || o === CornerType$1.BEVELED ? D.push({
+ leftPositions: computeRoundCorner(
+ _,
+ p,
+ y,
+ o,
+ O
+ )
+ }) : D.push({
+ leftPositions: computeMiteredCorner(
+ S,
+ Cartesian3.negate(h, h),
+ y,
+ O
+ )
+ })) : (y = Cartesian3.add(S, h, y), C = Cartesian3.add(
+ y,
+ Cartesian3.negate(
+ Cartesian3.multiplyByScalar(f, r, C),
+ C
+ ),
+ C
+ ), _ = Cartesian3.add(
+ y,
+ Cartesian3.negate(
+ Cartesian3.multiplyByScalar(f, r * 2, _),
+ _
+ ),
+ _
+ ), scaleArray2[0] = Cartesian3.clone(m, scaleArray2[0]), scaleArray2[1] = Cartesian3.clone(C, scaleArray2[1]), A = PolylinePipeline.generateArc({
+ positions: scaleArray2,
+ granularity: t,
+ ellipsoid: i
+ }), T = addShiftedPositions(
+ A,
+ f,
+ r,
+ T
+ ), s && (x.push(f.x, f.y, f.z), b.push(c.x, c.y, c.z)), p = Cartesian3.clone(_, p), f = Cartesian3.normalize(
+ Cartesian3.cross(c, l, f),
+ f
+ ), _ = Cartesian3.add(
+ y,
+ Cartesian3.negate(
+ Cartesian3.multiplyByScalar(f, r * 2, _),
+ _
+ ),
+ _
+ ), m = Cartesian3.add(
+ y,
+ Cartesian3.negate(
+ Cartesian3.multiplyByScalar(f, r, m),
+ m
+ ),
+ m
+ ), o === CornerType$1.ROUNDED || o === CornerType$1.BEVELED ? D.push({
+ rightPositions: computeRoundCorner(
+ y,
+ p,
+ _,
+ o,
+ O
+ )
+ }) : D.push({
+ rightPositions: computeMiteredCorner(
+ S,
+ h,
+ _,
+ O
+ )
+ })), d = Cartesian3.negate(l, d);
+ }
+ S = E;
+ }
+ c = i.geodeticSurfaceNormal(S, c), scaleArray2[0] = Cartesian3.clone(m, scaleArray2[0]), scaleArray2[1] = Cartesian3.clone(S, scaleArray2[1]), A = PolylinePipeline.generateArc({
+ positions: scaleArray2,
+ granularity: t,
+ ellipsoid: i
+ }), T = addShiftedPositions(
+ A,
+ f,
+ r,
+ T
+ ), s && (x.push(f.x, f.y, f.z), b.push(c.x, c.y, c.z));
+ let M;
+ return o === CornerType$1.ROUNDED && (M = addEndCaps(T)), {
+ positions: T,
+ corners: D,
+ lefts: x,
+ normals: b,
+ endPositions: M
+ };
+};
+const cartesian1$1 = new Cartesian3(), cartesian2$1 = new Cartesian3(), cartesian3$1 = new Cartesian3(), cartesian4 = new Cartesian3(), cartesian5 = new Cartesian3(), cartesian6 = new Cartesian3(), scratch1 = new Cartesian3(), scratch2 = new Cartesian3();
+function scaleToSurface$1(e, t) {
+ for (let n = 0; n < e.length; n++)
+ e[n] = t.scaleToGeodeticSurface(e[n], e[n]);
+ return e;
+}
+function addNormals(e, t, n, i, r, o) {
+ const s = e.normals, c = e.tangents, l = e.bitangents, d = Cartesian3.normalize(
+ Cartesian3.cross(n, t, scratch1),
+ scratch1
+ );
+ o.normal && CorridorGeometryLibrary.addAttribute(s, t, i, r), o.tangent && CorridorGeometryLibrary.addAttribute(c, d, i, r), o.bitangent && CorridorGeometryLibrary.addAttribute(l, n, i, r);
+}
+function combine$1(e, t, n) {
+ const i = e.positions, r = e.corners, o = e.endPositions, s = e.lefts, c = e.normals, l = new GeometryAttributes();
+ let d, f = 0, h = 0, p, m = 0, _;
+ for (p = 0; p < i.length; p += 2)
+ _ = i[p].length - 3, f += _, m += _ * 2, h += i[p + 1].length - 3;
+ for (f += 3, h += 3, p = 0; p < r.length; p++) {
+ d = r[p];
+ const H = r[p].leftPositions;
+ defined(H) ? (_ = H.length, f += _, m += _) : (_ = r[p].rightPositions.length, h += _, m += _);
+ }
+ const y = defined(o);
+ let C;
+ y && (C = o[0].length - 3, f += C, h += C, C /= 3, m += C * 6);
+ const T = f + h, x = new Float64Array(T), b = t.normal ? new Float32Array(T) : void 0, S = t.tangent ? new Float32Array(T) : void 0, E = t.bitangent ? new Float32Array(T) : void 0, A = {
+ normals: b,
+ tangents: S,
+ bitangents: E
+ };
+ let D = 0, P = T - 1, I, M, R, L, g = cartesian1$1, w = cartesian2$1, O, N;
+ const F = C / 2, B = IndexDatatype$1.createTypedArray(T / 3, m);
+ let V = 0;
+ if (y) {
+ N = cartesian3$1, O = cartesian4;
+ const H = o[0];
+ for (g = Cartesian3.fromArray(c, 0, g), w = Cartesian3.fromArray(s, 0, w), p = 0; p < F; p++)
+ N = Cartesian3.fromArray(
+ H,
+ (F - 1 - p) * 3,
+ N
+ ), O = Cartesian3.fromArray(
+ H,
+ (F + p) * 3,
+ O
+ ), CorridorGeometryLibrary.addAttribute(x, O, D), CorridorGeometryLibrary.addAttribute(
+ x,
+ N,
+ void 0,
+ P
+ ), addNormals(A, g, w, D, P, t), M = D / 3, L = M + 1, I = (P - 2) / 3, R = I - 1, B[V++] = I, B[V++] = M, B[V++] = R, B[V++] = R, B[V++] = M, B[V++] = L, D += 3, P -= 3;
+ }
+ let U = 0, k = 0, $ = i[U++], G = i[U++];
+ x.set($, D), x.set(G, P - G.length + 1), w = Cartesian3.fromArray(s, k, w);
+ let q, z;
+ for (_ = G.length - 3, p = 0; p < _; p += 3)
+ q = n.geodeticSurfaceNormal(
+ Cartesian3.fromArray($, p, scratch1),
+ scratch1
+ ), z = n.geodeticSurfaceNormal(
+ Cartesian3.fromArray(G, _ - p, scratch2),
+ scratch2
+ ), g = Cartesian3.normalize(
+ Cartesian3.add(q, z, g),
+ g
+ ), addNormals(A, g, w, D, P, t), M = D / 3, L = M + 1, I = (P - 2) / 3, R = I - 1, B[V++] = I, B[V++] = M, B[V++] = R, B[V++] = R, B[V++] = M, B[V++] = L, D += 3, P -= 3;
+ for (q = n.geodeticSurfaceNormal(
+ Cartesian3.fromArray($, _, scratch1),
+ scratch1
+ ), z = n.geodeticSurfaceNormal(
+ Cartesian3.fromArray(G, _, scratch2),
+ scratch2
+ ), g = Cartesian3.normalize(
+ Cartesian3.add(q, z, g),
+ g
+ ), k += 3, p = 0; p < r.length; p++) {
+ let H;
+ d = r[p];
+ const Q = d.leftPositions, ne = d.rightPositions;
+ let K, Z, ee = cartesian6, oe = cartesian3$1, X = cartesian4;
+ if (g = Cartesian3.fromArray(c, k, g), defined(Q)) {
+ for (addNormals(A, g, w, void 0, P, t), P -= 3, K = L, Z = R, H = 0; H < Q.length / 3; H++)
+ ee = Cartesian3.fromArray(Q, H * 3, ee), B[V++] = K, B[V++] = Z - H - 1, B[V++] = Z - H, CorridorGeometryLibrary.addAttribute(
+ x,
+ ee,
+ void 0,
+ P
+ ), oe = Cartesian3.fromArray(
+ x,
+ (Z - H - 1) * 3,
+ oe
+ ), X = Cartesian3.fromArray(x, K * 3, X), w = Cartesian3.normalize(
+ Cartesian3.subtract(oe, X, w),
+ w
+ ), addNormals(A, g, w, void 0, P, t), P -= 3;
+ ee = Cartesian3.fromArray(
+ x,
+ K * 3,
+ ee
+ ), oe = Cartesian3.subtract(
+ Cartesian3.fromArray(x, Z * 3, oe),
+ ee,
+ oe
+ ), X = Cartesian3.subtract(
+ Cartesian3.fromArray(x, (Z - H) * 3, X),
+ ee,
+ X
+ ), w = Cartesian3.normalize(
+ Cartesian3.add(oe, X, w),
+ w
+ ), addNormals(A, g, w, D, void 0, t), D += 3;
+ } else {
+ for (addNormals(A, g, w, D, void 0, t), D += 3, K = R, Z = L, H = 0; H < ne.length / 3; H++)
+ ee = Cartesian3.fromArray(ne, H * 3, ee), B[V++] = K, B[V++] = Z + H, B[V++] = Z + H + 1, CorridorGeometryLibrary.addAttribute(
+ x,
+ ee,
+ D
+ ), oe = Cartesian3.fromArray(
+ x,
+ K * 3,
+ oe
+ ), X = Cartesian3.fromArray(
+ x,
+ (Z + H) * 3,
+ X
+ ), w = Cartesian3.normalize(
+ Cartesian3.subtract(oe, X, w),
+ w
+ ), addNormals(A, g, w, D, void 0, t), D += 3;
+ ee = Cartesian3.fromArray(
+ x,
+ K * 3,
+ ee
+ ), oe = Cartesian3.subtract(
+ Cartesian3.fromArray(x, (Z + H) * 3, oe),
+ ee,
+ oe
+ ), X = Cartesian3.subtract(
+ Cartesian3.fromArray(x, Z * 3, X),
+ ee,
+ X
+ ), w = Cartesian3.normalize(
+ Cartesian3.negate(Cartesian3.add(X, oe, w), w),
+ w
+ ), addNormals(A, g, w, void 0, P, t), P -= 3;
+ }
+ for ($ = i[U++], G = i[U++], $.splice(0, 3), G.splice(G.length - 3, 3), x.set($, D), x.set(G, P - G.length + 1), _ = G.length - 3, k += 3, w = Cartesian3.fromArray(s, k, w), H = 0; H < G.length; H += 3)
+ q = n.geodeticSurfaceNormal(
+ Cartesian3.fromArray($, H, scratch1),
+ scratch1
+ ), z = n.geodeticSurfaceNormal(
+ Cartesian3.fromArray(G, _ - H, scratch2),
+ scratch2
+ ), g = Cartesian3.normalize(
+ Cartesian3.add(q, z, g),
+ g
+ ), addNormals(A, g, w, D, P, t), L = D / 3, M = L - 1, R = (P - 2) / 3, I = R + 1, B[V++] = I, B[V++] = M, B[V++] = R, B[V++] = R, B[V++] = M, B[V++] = L, D += 3, P -= 3;
+ D -= 3, P += 3;
+ }
+ if (g = Cartesian3.fromArray(
+ c,
+ c.length - 3,
+ g
+ ), addNormals(A, g, w, D, P, t), y) {
+ D += 3, P -= 3, N = cartesian3$1, O = cartesian4;
+ const H = o[1];
+ for (p = 0; p < F; p++)
+ N = Cartesian3.fromArray(
+ H,
+ (C - p - 1) * 3,
+ N
+ ), O = Cartesian3.fromArray(H, p * 3, O), CorridorGeometryLibrary.addAttribute(
+ x,
+ N,
+ void 0,
+ P
+ ), CorridorGeometryLibrary.addAttribute(x, O, D), addNormals(A, g, w, D, P, t), L = D / 3, M = L - 1, R = (P - 2) / 3, I = R + 1, B[V++] = I, B[V++] = M, B[V++] = R, B[V++] = R, B[V++] = M, B[V++] = L, D += 3, P -= 3;
+ }
+ if (l.position = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.DOUBLE,
+ componentsPerAttribute: 3,
+ values: x
+ }), t.st) {
+ const H = new Float32Array(T / 3 * 2);
+ let Q, ne, K = 0;
+ if (y) {
+ f /= 3, h /= 3;
+ const Z = Math.PI / (C + 1);
+ ne = 1 / (f - C + 1), Q = 1 / (h - C + 1);
+ let ee;
+ const oe = C / 2;
+ for (p = oe + 1; p < C + 1; p++)
+ ee = CesiumMath.PI_OVER_TWO + Z * p, H[K++] = Q * (1 + Math.cos(ee)), H[K++] = 0.5 * (1 + Math.sin(ee));
+ for (p = 1; p < h - C + 1; p++)
+ H[K++] = p * Q, H[K++] = 0;
+ for (p = C; p > oe; p--)
+ ee = CesiumMath.PI_OVER_TWO - p * Z, H[K++] = 1 - Q * (1 + Math.cos(ee)), H[K++] = 0.5 * (1 + Math.sin(ee));
+ for (p = oe; p > 0; p--)
+ ee = CesiumMath.PI_OVER_TWO - Z * p, H[K++] = 1 - ne * (1 + Math.cos(ee)), H[K++] = 0.5 * (1 + Math.sin(ee));
+ for (p = f - C; p > 0; p--)
+ H[K++] = p * ne, H[K++] = 1;
+ for (p = 1; p < oe + 1; p++)
+ ee = CesiumMath.PI_OVER_TWO + Z * p, H[K++] = ne * (1 + Math.cos(ee)), H[K++] = 0.5 * (1 + Math.sin(ee));
+ } else {
+ for (f /= 3, h /= 3, ne = 1 / (f - 1), Q = 1 / (h - 1), p = 0; p < h; p++)
+ H[K++] = p * Q, H[K++] = 0;
+ for (p = f; p > 0; p--)
+ H[K++] = (p - 1) * ne, H[K++] = 1;
+ }
+ l.st = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 2,
+ values: H
+ });
+ }
+ return t.normal && (l.normal = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 3,
+ values: A.normals
+ })), t.tangent && (l.tangent = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 3,
+ values: A.tangents
+ })), t.bitangent && (l.bitangent = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 3,
+ values: A.bitangents
+ })), {
+ attributes: l,
+ indices: B
+ };
+}
+function extrudedAttributes(e, t) {
+ if (!t.normal && !t.tangent && !t.bitangent && !t.st)
+ return e;
+ const n = e.position.values;
+ let i, r;
+ (t.normal || t.bitangent) && (i = e.normal.values, r = e.bitangent.values);
+ const o = e.position.values.length / 18, s = o * 3, c = o * 2, l = s * 2;
+ let d;
+ if (t.normal || t.bitangent || t.tangent) {
+ const f = t.normal ? new Float32Array(s * 6) : void 0, h = t.tangent ? new Float32Array(s * 6) : void 0, p = t.bitangent ? new Float32Array(s * 6) : void 0;
+ let m = cartesian1$1, _ = cartesian2$1, y = cartesian3$1, C = cartesian4, T = cartesian5, x = cartesian6, b = l;
+ for (d = 0; d < s; d += 3) {
+ const S = b + l;
+ m = Cartesian3.fromArray(n, d, m), _ = Cartesian3.fromArray(
+ n,
+ d + s,
+ _
+ ), y = Cartesian3.fromArray(
+ n,
+ (d + 3) % s,
+ y
+ ), _ = Cartesian3.subtract(
+ _,
+ m,
+ _
+ ), y = Cartesian3.subtract(
+ y,
+ m,
+ y
+ ), C = Cartesian3.normalize(
+ Cartesian3.cross(_, y, C),
+ C
+ ), t.normal && (CorridorGeometryLibrary.addAttribute(f, C, S), CorridorGeometryLibrary.addAttribute(
+ f,
+ C,
+ S + 3
+ ), CorridorGeometryLibrary.addAttribute(f, C, b), CorridorGeometryLibrary.addAttribute(f, C, b + 3)), (t.tangent || t.bitangent) && (x = Cartesian3.fromArray(i, d, x), t.bitangent && (CorridorGeometryLibrary.addAttribute(
+ p,
+ x,
+ S
+ ), CorridorGeometryLibrary.addAttribute(
+ p,
+ x,
+ S + 3
+ ), CorridorGeometryLibrary.addAttribute(
+ p,
+ x,
+ b
+ ), CorridorGeometryLibrary.addAttribute(
+ p,
+ x,
+ b + 3
+ )), t.tangent && (T = Cartesian3.normalize(
+ Cartesian3.cross(x, C, T),
+ T
+ ), CorridorGeometryLibrary.addAttribute(
+ h,
+ T,
+ S
+ ), CorridorGeometryLibrary.addAttribute(
+ h,
+ T,
+ S + 3
+ ), CorridorGeometryLibrary.addAttribute(h, T, b), CorridorGeometryLibrary.addAttribute(
+ h,
+ T,
+ b + 3
+ ))), b += 6;
+ }
+ if (t.normal) {
+ for (f.set(i), d = 0; d < s; d += 3)
+ f[d + s] = -i[d], f[d + s + 1] = -i[d + 1], f[d + s + 2] = -i[d + 2];
+ e.normal.values = f;
+ } else
+ e.normal = void 0;
+ if (t.bitangent ? (p.set(r), p.set(r, s), e.bitangent.values = p) : e.bitangent = void 0, t.tangent) {
+ const S = e.tangent.values;
+ h.set(S), h.set(S, s), e.tangent.values = h;
+ }
+ }
+ if (t.st) {
+ const f = e.st.values, h = new Float32Array(c * 6);
+ h.set(f), h.set(f, c);
+ let p = c * 2;
+ for (let m = 0; m < 2; m++) {
+ for (h[p++] = f[0], h[p++] = f[1], d = 2; d < c; d += 2) {
+ const _ = f[d], y = f[d + 1];
+ h[p++] = _, h[p++] = y, h[p++] = _, h[p++] = y;
+ }
+ h[p++] = f[0], h[p++] = f[1];
+ }
+ e.st.values = h;
+ }
+ return e;
+}
+function addWallPositions$1(e, t, n) {
+ n[t++] = e[0], n[t++] = e[1], n[t++] = e[2];
+ for (let i = 3; i < e.length; i += 3) {
+ const r = e[i], o = e[i + 1], s = e[i + 2];
+ n[t++] = r, n[t++] = o, n[t++] = s, n[t++] = r, n[t++] = o, n[t++] = s;
+ }
+ return n[t++] = e[0], n[t++] = e[1], n[t++] = e[2], n;
+}
+function computePositionsExtruded$1(e, t) {
+ const n = new VertexFormat({
+ position: t.position,
+ normal: t.normal || t.bitangent || e.shadowVolume,
+ tangent: t.tangent,
+ bitangent: t.normal || t.bitangent,
+ st: t.st
+ }), i = e.ellipsoid, r = CorridorGeometryLibrary.computePositions(e), o = combine$1(r, n, i), s = e.height, c = e.extrudedHeight;
+ let l = o.attributes;
+ const d = o.indices;
+ let f = l.position.values, h = f.length;
+ const p = new Float64Array(h * 6);
+ let m = new Float64Array(h);
+ m.set(f);
+ let _ = new Float64Array(h * 4);
+ f = PolygonPipeline.scaleToGeodeticHeight(
+ f,
+ s,
+ i
+ ), _ = addWallPositions$1(f, 0, _), m = PolygonPipeline.scaleToGeodeticHeight(
+ m,
+ c,
+ i
+ ), _ = addWallPositions$1(
+ m,
+ h * 2,
+ _
+ ), p.set(f), p.set(m, h), p.set(_, h * 2), l.position.values = p, l = extrudedAttributes(l, t);
+ let y;
+ const C = h / 3;
+ if (e.shadowVolume) {
+ const I = l.normal.values;
+ h = I.length;
+ let M = new Float32Array(h * 6);
+ for (y = 0; y < h; y++)
+ I[y] = -I[y];
+ M.set(I, h), M = addWallPositions$1(I, h * 4, M), l.extrudeDirection = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ componentsPerAttribute: 3,
+ values: M
+ }), t.normal || (l.normal = void 0);
+ }
+ if (defined(e.offsetAttribute)) {
+ let I = new Uint8Array(C * 6);
+ if (e.offsetAttribute === GeometryOffsetAttribute$1.TOP)
+ I = I.fill(1, 0, C).fill(1, C * 2, C * 4);
+ else {
+ const M = e.offsetAttribute === GeometryOffsetAttribute$1.NONE ? 0 : 1;
+ I = I.fill(M);
+ }
+ l.applyOffset = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: I
+ });
+ }
+ const T = d.length, x = C + C, b = IndexDatatype$1.createTypedArray(
+ p.length / 3,
+ T * 2 + x * 3
+ );
+ b.set(d);
+ let S = T;
+ for (y = 0; y < T; y += 3) {
+ const I = d[y], M = d[y + 1], R = d[y + 2];
+ b[S++] = R + C, b[S++] = M + C, b[S++] = I + C;
+ }
+ let E, A, D, P;
+ for (y = 0; y < x; y += 2)
+ E = y + x, A = E + x, D = E + 1, P = A + 1, b[S++] = E, b[S++] = A, b[S++] = D, b[S++] = D, b[S++] = A, b[S++] = P;
+ return {
+ attributes: l,
+ indices: b
+ };
+}
+const scratchCartesian1$5 = new Cartesian3(), scratchCartesian2$7 = new Cartesian3(), scratchCartographic$b = new Cartographic();
+function computeOffsetPoints(e, t, n, i, r, o) {
+ const s = Cartesian3.subtract(
+ t,
+ e,
+ scratchCartesian1$5
+ );
+ Cartesian3.normalize(s, s);
+ const c = n.geodeticSurfaceNormal(e, scratchCartesian2$7), l = Cartesian3.cross(
+ s,
+ c,
+ scratchCartesian1$5
+ );
+ Cartesian3.multiplyByScalar(l, i, l);
+ let d = r.latitude, f = r.longitude, h = o.latitude, p = o.longitude;
+ Cartesian3.add(e, l, scratchCartesian2$7), n.cartesianToCartographic(scratchCartesian2$7, scratchCartographic$b);
+ let m = scratchCartographic$b.latitude, _ = scratchCartographic$b.longitude;
+ d = Math.min(d, m), f = Math.min(f, _), h = Math.max(h, m), p = Math.max(p, _), Cartesian3.subtract(e, l, scratchCartesian2$7), n.cartesianToCartographic(scratchCartesian2$7, scratchCartographic$b), m = scratchCartographic$b.latitude, _ = scratchCartographic$b.longitude, d = Math.min(d, m), f = Math.min(f, _), h = Math.max(h, m), p = Math.max(p, _), r.latitude = d, r.longitude = f, o.latitude = h, o.longitude = p;
+}
+const scratchCartesianOffset = new Cartesian3(), scratchCartesianEnds = new Cartesian3(), scratchCartographicMin = new Cartographic(), scratchCartographicMax = new Cartographic();
+function computeRectangle$2(e, t, n, i, r) {
+ e = scaleToSurface$1(e, t);
+ const o = arrayRemoveDuplicates(
+ e,
+ Cartesian3.equalsEpsilon
+ ), s = o.length;
+ if (s < 2 || n <= 0)
+ return new Rectangle();
+ const c = n * 0.5;
+ scratchCartographicMin.latitude = Number.POSITIVE_INFINITY, scratchCartographicMin.longitude = Number.POSITIVE_INFINITY, scratchCartographicMax.latitude = Number.NEGATIVE_INFINITY, scratchCartographicMax.longitude = Number.NEGATIVE_INFINITY;
+ let l, d;
+ if (i === CornerType$1.ROUNDED) {
+ const p = o[0];
+ Cartesian3.subtract(p, o[1], scratchCartesianOffset), Cartesian3.normalize(scratchCartesianOffset, scratchCartesianOffset), Cartesian3.multiplyByScalar(
+ scratchCartesianOffset,
+ c,
+ scratchCartesianOffset
+ ), Cartesian3.add(p, scratchCartesianOffset, scratchCartesianEnds), t.cartesianToCartographic(
+ scratchCartesianEnds,
+ scratchCartographic$b
+ ), l = scratchCartographic$b.latitude, d = scratchCartographic$b.longitude, scratchCartographicMin.latitude = Math.min(
+ scratchCartographicMin.latitude,
+ l
+ ), scratchCartographicMin.longitude = Math.min(
+ scratchCartographicMin.longitude,
+ d
+ ), scratchCartographicMax.latitude = Math.max(
+ scratchCartographicMax.latitude,
+ l
+ ), scratchCartographicMax.longitude = Math.max(
+ scratchCartographicMax.longitude,
+ d
+ );
+ }
+ for (let p = 0; p < s - 1; ++p)
+ computeOffsetPoints(
+ o[p],
+ o[p + 1],
+ t,
+ c,
+ scratchCartographicMin,
+ scratchCartographicMax
+ );
+ const f = o[s - 1];
+ Cartesian3.subtract(f, o[s - 2], scratchCartesianOffset), Cartesian3.normalize(scratchCartesianOffset, scratchCartesianOffset), Cartesian3.multiplyByScalar(
+ scratchCartesianOffset,
+ c,
+ scratchCartesianOffset
+ ), Cartesian3.add(f, scratchCartesianOffset, scratchCartesianEnds), computeOffsetPoints(
+ f,
+ scratchCartesianEnds,
+ t,
+ c,
+ scratchCartographicMin,
+ scratchCartographicMax
+ ), i === CornerType$1.ROUNDED && (t.cartesianToCartographic(
+ scratchCartesianEnds,
+ scratchCartographic$b
+ ), l = scratchCartographic$b.latitude, d = scratchCartographic$b.longitude, scratchCartographicMin.latitude = Math.min(
+ scratchCartographicMin.latitude,
+ l
+ ), scratchCartographicMin.longitude = Math.min(
+ scratchCartographicMin.longitude,
+ d
+ ), scratchCartographicMax.latitude = Math.max(
+ scratchCartographicMax.latitude,
+ l
+ ), scratchCartographicMax.longitude = Math.max(
+ scratchCartographicMax.longitude,
+ d
+ ));
+ const h = defined(r) ? r : new Rectangle();
+ return h.north = scratchCartographicMax.latitude, h.south = scratchCartographicMin.latitude, h.east = scratchCartographicMax.longitude, h.west = scratchCartographicMin.longitude, h;
+}
+function CorridorGeometry(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.positions, n = e.width, i = defaultValue(e.height, 0), r = defaultValue(e.extrudedHeight, i);
+ this._positions = t, this._ellipsoid = Ellipsoid.clone(
+ defaultValue(e.ellipsoid, Ellipsoid.default)
+ ), this._vertexFormat = VertexFormat.clone(
+ defaultValue(e.vertexFormat, VertexFormat.DEFAULT)
+ ), this._width = n, this._height = Math.max(i, r), this._extrudedHeight = Math.min(i, r), this._cornerType = defaultValue(e.cornerType, CornerType$1.ROUNDED), this._granularity = defaultValue(
+ e.granularity,
+ CesiumMath.RADIANS_PER_DEGREE
+ ), this._shadowVolume = defaultValue(e.shadowVolume, !1), this._workerName = "createCorridorGeometry", this._offsetAttribute = e.offsetAttribute, this._rectangle = void 0, this.packedLength = 1 + t.length * Cartesian3.packedLength + Ellipsoid.packedLength + VertexFormat.packedLength + 7;
+}
+CorridorGeometry.pack = function(e, t, n) {
+ n = defaultValue(n, 0);
+ const i = e._positions, r = i.length;
+ t[n++] = r;
+ for (let o = 0; o < r; ++o, n += Cartesian3.packedLength)
+ Cartesian3.pack(i[o], t, n);
+ return Ellipsoid.pack(e._ellipsoid, t, n), n += Ellipsoid.packedLength, VertexFormat.pack(e._vertexFormat, t, n), n += VertexFormat.packedLength, t[n++] = e._width, t[n++] = e._height, t[n++] = e._extrudedHeight, t[n++] = e._cornerType, t[n++] = e._granularity, t[n++] = e._shadowVolume ? 1 : 0, t[n] = defaultValue(e._offsetAttribute, -1), t;
+};
+const scratchEllipsoid$c = Ellipsoid.clone(Ellipsoid.UNIT_SPHERE), scratchVertexFormat$a = new VertexFormat(), scratchOptions$h = {
+ positions: void 0,
+ ellipsoid: scratchEllipsoid$c,
+ vertexFormat: scratchVertexFormat$a,
+ width: void 0,
+ height: void 0,
+ extrudedHeight: void 0,
+ cornerType: void 0,
+ granularity: void 0,
+ shadowVolume: void 0,
+ offsetAttribute: void 0
+};
+CorridorGeometry.unpack = function(e, t, n) {
+ t = defaultValue(t, 0);
+ const i = e[t++], r = new Array(i);
+ for (let _ = 0; _ < i; ++_, t += Cartesian3.packedLength)
+ r[_] = Cartesian3.unpack(e, t);
+ const o = Ellipsoid.unpack(e, t, scratchEllipsoid$c);
+ t += Ellipsoid.packedLength;
+ const s = VertexFormat.unpack(
+ e,
+ t,
+ scratchVertexFormat$a
+ );
+ t += VertexFormat.packedLength;
+ const c = e[t++], l = e[t++], d = e[t++], f = e[t++], h = e[t++], p = e[t++] === 1, m = e[t];
+ return defined(n) ? (n._positions = r, n._ellipsoid = Ellipsoid.clone(o, n._ellipsoid), n._vertexFormat = VertexFormat.clone(s, n._vertexFormat), n._width = c, n._height = l, n._extrudedHeight = d, n._cornerType = f, n._granularity = h, n._shadowVolume = p, n._offsetAttribute = m === -1 ? void 0 : m, n) : (scratchOptions$h.positions = r, scratchOptions$h.width = c, scratchOptions$h.height = l, scratchOptions$h.extrudedHeight = d, scratchOptions$h.cornerType = f, scratchOptions$h.granularity = h, scratchOptions$h.shadowVolume = p, scratchOptions$h.offsetAttribute = m === -1 ? void 0 : m, new CorridorGeometry(scratchOptions$h));
+};
+CorridorGeometry.computeRectangle = function(e, t) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const n = e.positions, i = e.width, r = defaultValue(e.ellipsoid, Ellipsoid.default), o = defaultValue(e.cornerType, CornerType$1.ROUNDED);
+ return computeRectangle$2(n, r, i, o, t);
+};
+CorridorGeometry.createGeometry = function(e) {
+ let t = e._positions;
+ const n = e._width, i = e._ellipsoid;
+ t = scaleToSurface$1(t, i);
+ const r = arrayRemoveDuplicates(
+ t,
+ Cartesian3.equalsEpsilon
+ );
+ if (r.length < 2 || n <= 0)
+ return;
+ const o = e._height, s = e._extrudedHeight, c = !CesiumMath.equalsEpsilon(
+ o,
+ s,
+ 0,
+ CesiumMath.EPSILON2
+ ), l = e._vertexFormat, d = {
+ ellipsoid: i,
+ positions: r,
+ width: n,
+ cornerType: e._cornerType,
+ granularity: e._granularity,
+ saveAttributes: !0
+ };
+ let f;
+ if (c)
+ d.height = o, d.extrudedHeight = s, d.shadowVolume = e._shadowVolume, d.offsetAttribute = e._offsetAttribute, f = computePositionsExtruded$1(d, l);
+ else {
+ const m = CorridorGeometryLibrary.computePositions(d);
+ if (f = combine$1(m, l, i), f.attributes.position.values = PolygonPipeline.scaleToGeodeticHeight(
+ f.attributes.position.values,
+ o,
+ i
+ ), defined(e._offsetAttribute)) {
+ const _ = e._offsetAttribute === GeometryOffsetAttribute$1.NONE ? 0 : 1, y = f.attributes.position.values.length, C = new Uint8Array(y / 3).fill(_);
+ f.attributes.applyOffset = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: C
+ });
+ }
+ }
+ const h = f.attributes, p = BoundingSphere.fromVertices(
+ h.position.values,
+ void 0,
+ 3
+ );
+ return l.position || (f.attributes.position.values = void 0), new Geometry({
+ attributes: h,
+ indices: f.indices,
+ primitiveType: PrimitiveType$1.TRIANGLES,
+ boundingSphere: p,
+ offsetAttribute: e._offsetAttribute
+ });
+};
+CorridorGeometry.createShadowVolume = function(e, t, n) {
+ const i = e._granularity, r = e._ellipsoid, o = t(i, r), s = n(i, r);
+ return new CorridorGeometry({
+ positions: e._positions,
+ width: e._width,
+ cornerType: e._cornerType,
+ ellipsoid: r,
+ granularity: i,
+ extrudedHeight: o,
+ height: s,
+ vertexFormat: VertexFormat.POSITION_ONLY,
+ shadowVolume: !0
+ });
+};
+Object.defineProperties(CorridorGeometry.prototype, {
+ /**
+ * @private
+ */
+ rectangle: {
+ get: function() {
+ return defined(this._rectangle) || (this._rectangle = computeRectangle$2(
+ this._positions,
+ this._ellipsoid,
+ this._width,
+ this._cornerType
+ )), this._rectangle;
+ }
+ },
+ /**
+ * For remapping texture coordinates when rendering CorridorGeometries as GroundPrimitives.
+ *
+ * Corridors don't support stRotation,
+ * so just return the corners of the original system.
+ * @private
+ */
+ textureCoordinateRotationPoints: {
+ get: function() {
+ return [0, 0, 0, 1, 1, 0];
+ }
+ }
+});
+const cartesian1 = new Cartesian3(), cartesian2 = new Cartesian3(), cartesian3 = new Cartesian3();
+function scaleToSurface(e, t) {
+ for (let n = 0; n < e.length; n++)
+ e[n] = t.scaleToGeodeticSurface(e[n], e[n]);
+ return e;
+}
+function combine(e, t) {
+ const n = [], i = e.positions, r = e.corners, o = e.endPositions, s = new GeometryAttributes();
+ let c, l = 0, d = 0, f, h = 0, p;
+ for (f = 0; f < i.length; f += 2)
+ p = i[f].length - 3, l += p, h += p / 3 * 4, d += i[f + 1].length - 3;
+ for (l += 3, d += 3, f = 0; f < r.length; f++) {
+ c = r[f];
+ const O = r[f].leftPositions;
+ defined(O) ? (p = O.length, l += p, h += p / 3 * 2) : (p = r[f].rightPositions.length, d += p, h += p / 3 * 2);
+ }
+ const m = defined(o);
+ let _;
+ m && (_ = o[0].length - 3, l += _, d += _, _ /= 3, h += _ * 4);
+ const y = l + d, C = new Float64Array(y);
+ let T = 0, x = y - 1, b, S, E, A, D, P;
+ const I = _ / 2, M = IndexDatatype$1.createTypedArray(y / 3, h + 4);
+ let R = 0;
+ if (M[R++] = T / 3, M[R++] = (x - 2) / 3, m) {
+ n.push(T / 3), P = cartesian1, D = cartesian2;
+ const O = o[0];
+ for (f = 0; f < I; f++)
+ P = Cartesian3.fromArray(
+ O,
+ (I - 1 - f) * 3,
+ P
+ ), D = Cartesian3.fromArray(
+ O,
+ (I + f) * 3,
+ D
+ ), CorridorGeometryLibrary.addAttribute(C, D, T), CorridorGeometryLibrary.addAttribute(
+ C,
+ P,
+ void 0,
+ x
+ ), S = T / 3, A = S + 1, b = (x - 2) / 3, E = b - 1, M[R++] = b, M[R++] = E, M[R++] = S, M[R++] = A, T += 3, x -= 3;
+ }
+ let L = 0, g = i[L++], w = i[L++];
+ for (C.set(g, T), C.set(w, x - w.length + 1), p = w.length - 3, n.push(T / 3, (x - 2) / 3), f = 0; f < p; f += 3)
+ S = T / 3, A = S + 1, b = (x - 2) / 3, E = b - 1, M[R++] = b, M[R++] = E, M[R++] = S, M[R++] = A, T += 3, x -= 3;
+ for (f = 0; f < r.length; f++) {
+ let O;
+ c = r[f];
+ const N = c.leftPositions, F = c.rightPositions;
+ let B, V = cartesian3;
+ if (defined(N)) {
+ for (x -= 3, B = E, n.push(A), O = 0; O < N.length / 3; O++)
+ V = Cartesian3.fromArray(N, O * 3, V), M[R++] = B - O - 1, M[R++] = B - O, CorridorGeometryLibrary.addAttribute(
+ C,
+ V,
+ void 0,
+ x
+ ), x -= 3;
+ n.push(B - Math.floor(N.length / 6)), t === CornerType$1.BEVELED && n.push((x - 2) / 3 + 1), T += 3;
+ } else {
+ for (T += 3, B = A, n.push(E), O = 0; O < F.length / 3; O++)
+ V = Cartesian3.fromArray(F, O * 3, V), M[R++] = B + O, M[R++] = B + O + 1, CorridorGeometryLibrary.addAttribute(
+ C,
+ V,
+ T
+ ), T += 3;
+ n.push(B + Math.floor(F.length / 6)), t === CornerType$1.BEVELED && n.push(T / 3 - 1), x -= 3;
+ }
+ for (g = i[L++], w = i[L++], g.splice(0, 3), w.splice(w.length - 3, 3), C.set(g, T), C.set(w, x - w.length + 1), p = w.length - 3, O = 0; O < w.length; O += 3)
+ A = T / 3, S = A - 1, E = (x - 2) / 3, b = E + 1, M[R++] = b, M[R++] = E, M[R++] = S, M[R++] = A, T += 3, x -= 3;
+ T -= 3, x += 3, n.push(T / 3, (x - 2) / 3);
+ }
+ if (m) {
+ T += 3, x -= 3, P = cartesian1, D = cartesian2;
+ const O = o[1];
+ for (f = 0; f < I; f++)
+ P = Cartesian3.fromArray(
+ O,
+ (_ - f - 1) * 3,
+ P
+ ), D = Cartesian3.fromArray(O, f * 3, D), CorridorGeometryLibrary.addAttribute(
+ C,
+ P,
+ void 0,
+ x
+ ), CorridorGeometryLibrary.addAttribute(C, D, T), A = T / 3, S = A - 1, E = (x - 2) / 3, b = E + 1, M[R++] = b, M[R++] = E, M[R++] = S, M[R++] = A, T += 3, x -= 3;
+ n.push(T / 3);
+ } else
+ n.push(T / 3, (x - 2) / 3);
+ return M[R++] = T / 3, M[R++] = (x - 2) / 3, s.position = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.DOUBLE,
+ componentsPerAttribute: 3,
+ values: C
+ }), {
+ attributes: s,
+ indices: M,
+ wallIndices: n
+ };
+}
+function computePositionsExtruded(e) {
+ const t = e.ellipsoid, n = CorridorGeometryLibrary.computePositions(e), i = combine(n, e.cornerType), r = i.wallIndices, o = e.height, s = e.extrudedHeight, c = i.attributes, l = i.indices;
+ let d = c.position.values, f = d.length, h = new Float64Array(f);
+ h.set(d);
+ const p = new Float64Array(f * 2);
+ if (d = PolygonPipeline.scaleToGeodeticHeight(
+ d,
+ o,
+ t
+ ), h = PolygonPipeline.scaleToGeodeticHeight(
+ h,
+ s,
+ t
+ ), p.set(d), p.set(h, f), c.position.values = p, f /= 3, defined(e.offsetAttribute)) {
+ let b = new Uint8Array(f * 2);
+ if (e.offsetAttribute === GeometryOffsetAttribute$1.TOP)
+ b = b.fill(1, 0, f);
+ else {
+ const S = e.offsetAttribute === GeometryOffsetAttribute$1.NONE ? 0 : 1;
+ b = b.fill(S);
+ }
+ c.applyOffset = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: b
+ });
+ }
+ let m;
+ const _ = l.length, y = IndexDatatype$1.createTypedArray(
+ p.length / 3,
+ (_ + r.length) * 2
+ );
+ y.set(l);
+ let C = _;
+ for (m = 0; m < _; m += 2) {
+ const b = l[m], S = l[m + 1];
+ y[C++] = b + f, y[C++] = S + f;
+ }
+ let T, x;
+ for (m = 0; m < r.length; m++)
+ T = r[m], x = T + f, y[C++] = T, y[C++] = x;
+ return {
+ attributes: c,
+ indices: y
+ };
+}
+function CorridorOutlineGeometry(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.positions, n = e.width, i = defaultValue(e.height, 0), r = defaultValue(e.extrudedHeight, i);
+ this._positions = t, this._ellipsoid = Ellipsoid.clone(
+ defaultValue(e.ellipsoid, Ellipsoid.default)
+ ), this._width = n, this._height = Math.max(i, r), this._extrudedHeight = Math.min(i, r), this._cornerType = defaultValue(e.cornerType, CornerType$1.ROUNDED), this._granularity = defaultValue(
+ e.granularity,
+ CesiumMath.RADIANS_PER_DEGREE
+ ), this._offsetAttribute = e.offsetAttribute, this._workerName = "createCorridorOutlineGeometry", this.packedLength = 1 + t.length * Cartesian3.packedLength + Ellipsoid.packedLength + 6;
+}
+CorridorOutlineGeometry.pack = function(e, t, n) {
+ n = defaultValue(n, 0);
+ const i = e._positions, r = i.length;
+ t[n++] = r;
+ for (let o = 0; o < r; ++o, n += Cartesian3.packedLength)
+ Cartesian3.pack(i[o], t, n);
+ return Ellipsoid.pack(e._ellipsoid, t, n), n += Ellipsoid.packedLength, t[n++] = e._width, t[n++] = e._height, t[n++] = e._extrudedHeight, t[n++] = e._cornerType, t[n++] = e._granularity, t[n] = defaultValue(e._offsetAttribute, -1), t;
+};
+const scratchEllipsoid$b = Ellipsoid.clone(Ellipsoid.UNIT_SPHERE), scratchOptions$g = {
+ positions: void 0,
+ ellipsoid: scratchEllipsoid$b,
+ width: void 0,
+ height: void 0,
+ extrudedHeight: void 0,
+ cornerType: void 0,
+ granularity: void 0,
+ offsetAttribute: void 0
+};
+CorridorOutlineGeometry.unpack = function(e, t, n) {
+ t = defaultValue(t, 0);
+ const i = e[t++], r = new Array(i);
+ for (let p = 0; p < i; ++p, t += Cartesian3.packedLength)
+ r[p] = Cartesian3.unpack(e, t);
+ const o = Ellipsoid.unpack(e, t, scratchEllipsoid$b);
+ t += Ellipsoid.packedLength;
+ const s = e[t++], c = e[t++], l = e[t++], d = e[t++], f = e[t++], h = e[t];
+ return defined(n) ? (n._positions = r, n._ellipsoid = Ellipsoid.clone(o, n._ellipsoid), n._width = s, n._height = c, n._extrudedHeight = l, n._cornerType = d, n._granularity = f, n._offsetAttribute = h === -1 ? void 0 : h, n) : (scratchOptions$g.positions = r, scratchOptions$g.width = s, scratchOptions$g.height = c, scratchOptions$g.extrudedHeight = l, scratchOptions$g.cornerType = d, scratchOptions$g.granularity = f, scratchOptions$g.offsetAttribute = h === -1 ? void 0 : h, new CorridorOutlineGeometry(scratchOptions$g));
+};
+CorridorOutlineGeometry.createGeometry = function(e) {
+ let t = e._positions;
+ const n = e._width, i = e._ellipsoid;
+ t = scaleToSurface(t, i);
+ const r = arrayRemoveDuplicates(
+ t,
+ Cartesian3.equalsEpsilon
+ );
+ if (r.length < 2 || n <= 0)
+ return;
+ const o = e._height, s = e._extrudedHeight, c = !CesiumMath.equalsEpsilon(
+ o,
+ s,
+ 0,
+ CesiumMath.EPSILON2
+ ), l = {
+ ellipsoid: i,
+ positions: r,
+ width: n,
+ cornerType: e._cornerType,
+ granularity: e._granularity,
+ saveAttributes: !1
+ };
+ let d;
+ if (c)
+ l.height = o, l.extrudedHeight = s, l.offsetAttribute = e._offsetAttribute, d = computePositionsExtruded(l);
+ else {
+ const p = CorridorGeometryLibrary.computePositions(l);
+ if (d = combine(p, l.cornerType), d.attributes.position.values = PolygonPipeline.scaleToGeodeticHeight(
+ d.attributes.position.values,
+ o,
+ i
+ ), defined(e._offsetAttribute)) {
+ const m = d.attributes.position.values.length, _ = e._offsetAttribute === GeometryOffsetAttribute$1.NONE ? 0 : 1, y = new Uint8Array(m / 3).fill(_);
+ d.attributes.applyOffset = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: y
+ });
+ }
+ }
+ const f = d.attributes, h = BoundingSphere.fromVertices(
+ f.position.values,
+ void 0,
+ 3
+ );
+ return new Geometry({
+ attributes: f,
+ indices: d.indices,
+ primitiveType: PrimitiveType$1.LINES,
+ boundingSphere: h,
+ offsetAttribute: e._offsetAttribute
+ });
+};
+const defaultZIndex$1 = new ConstantProperty(0);
+function GroundGeometryUpdater(e) {
+ GeometryUpdater.call(this, e), this._zIndex = 0, this._terrainOffsetProperty = void 0;
+}
+defined(Object.create) && (GroundGeometryUpdater.prototype = Object.create(GeometryUpdater.prototype), GroundGeometryUpdater.prototype.constructor = GroundGeometryUpdater);
+Object.defineProperties(GroundGeometryUpdater.prototype, {
+ /**
+ * Gets the zindex
+ * @type {number}
+ * @memberof GroundGeometryUpdater.prototype
+ * @readonly
+ */
+ zIndex: {
+ get: function() {
+ return this._zIndex;
+ }
+ },
+ /**
+ * Gets the terrain offset property
+ * @type {TerrainOffsetProperty}
+ * @memberof GroundGeometryUpdater.prototype
+ * @readonly
+ * @private
+ */
+ terrainOffsetProperty: {
+ get: function() {
+ return this._terrainOffsetProperty;
+ }
+ }
+});
+GroundGeometryUpdater.prototype._isOnTerrain = function(e, t) {
+ return this._fillEnabled && !defined(t.height) && !defined(t.extrudedHeight) && GroundPrimitive.isSupported(this._scene);
+};
+GroundGeometryUpdater.prototype._getIsClosed = function(e) {
+ const t = e.height, n = e.extrudedHeight;
+ return t === 0 || defined(n) && n !== t;
+};
+GroundGeometryUpdater.prototype._computeCenter = DeveloperError.throwInstantiationError;
+GroundGeometryUpdater.prototype._onEntityPropertyChanged = function(e, t, n, i) {
+ if (GeometryUpdater.prototype._onEntityPropertyChanged.call(
+ this,
+ e,
+ t,
+ n,
+ i
+ ), this._observedPropertyNames.indexOf(t) === -1)
+ return;
+ const r = this._entity[this._geometryPropertyName];
+ if (!defined(r))
+ return;
+ defined(r.zIndex) && (defined(r.height) || defined(r.extrudedHeight)) && oneTimeWarning(oneTimeWarning.geometryZIndex), this._zIndex = defaultValue(r.zIndex, defaultZIndex$1), defined(this._terrainOffsetProperty) && (this._terrainOffsetProperty.destroy(), this._terrainOffsetProperty = void 0);
+ const o = r.heightReference, s = r.extrudedHeightReference;
+ if (defined(o) || defined(s)) {
+ const c = new CallbackProperty(
+ this._computeCenter.bind(this),
+ !this._dynamic
+ );
+ this._terrainOffsetProperty = new TerrainOffsetProperty(
+ this._scene,
+ c,
+ o,
+ s
+ );
+ }
+};
+GroundGeometryUpdater.prototype.destroy = function() {
+ defined(this._terrainOffsetProperty) && (this._terrainOffsetProperty.destroy(), this._terrainOffsetProperty = void 0), GeometryUpdater.prototype.destroy.call(this);
+};
+GroundGeometryUpdater.getGeometryHeight = function(e, t) {
+ if (!defined(e)) {
+ t !== HeightReference$1.NONE && oneTimeWarning(oneTimeWarning.geometryHeightReference);
+ return;
+ }
+ return isHeightReferenceClamp(t) ? 0 : e;
+};
+GroundGeometryUpdater.getGeometryExtrudedHeight = function(e, t) {
+ if (!defined(e)) {
+ t !== HeightReference$1.NONE && oneTimeWarning(oneTimeWarning.geometryExtrudedHeightReference);
+ return;
+ }
+ return isHeightReferenceClamp(t) ? GroundGeometryUpdater.CLAMP_TO_GROUND : e;
+};
+GroundGeometryUpdater.CLAMP_TO_GROUND = "clamp";
+GroundGeometryUpdater.computeGeometryOffsetAttribute = function(e, t, n, i) {
+ (!defined(e) || !defined(t)) && (t = HeightReference$1.NONE), (!defined(n) || !defined(i)) && (i = HeightReference$1.NONE);
+ let r = 0;
+ if (t !== HeightReference$1.NONE && r++, i === HeightReference$1.RELATIVE_TO_GROUND && r++, r === 2)
+ return GeometryOffsetAttribute$1.ALL;
+ if (r === 1)
+ return GeometryOffsetAttribute$1.TOP;
+};
+const scratchColor$e = new Color(), defaultOffset$9 = Cartesian3.ZERO, offsetScratch$8 = new Cartesian3(), scratchRectangle$6 = new Rectangle();
+function CorridorGeometryOptions(e) {
+ this.id = e, this.vertexFormat = void 0, this.positions = void 0, this.width = void 0, this.cornerType = void 0, this.height = void 0, this.extrudedHeight = void 0, this.granularity = void 0, this.offsetAttribute = void 0;
+}
+function CorridorGeometryUpdater(e, t) {
+ GroundGeometryUpdater.call(this, {
+ entity: e,
+ scene: t,
+ geometryOptions: new CorridorGeometryOptions(e),
+ geometryPropertyName: "corridor",
+ observedPropertyNames: ["availability", "corridor"]
+ }), this._onEntityPropertyChanged(e, "corridor", e.corridor, void 0);
+}
+defined(Object.create) && (CorridorGeometryUpdater.prototype = Object.create(
+ GroundGeometryUpdater.prototype
+), CorridorGeometryUpdater.prototype.constructor = CorridorGeometryUpdater);
+CorridorGeometryUpdater.prototype.createFillGeometryInstance = function(e) {
+ const t = this._entity, n = t.isAvailable(e), i = {
+ show: new ShowGeometryInstanceAttribute(
+ n && t.isShowing && this._showProperty.getValue(e) && this._fillProperty.getValue(e)
+ ),
+ distanceDisplayCondition: DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(
+ this._distanceDisplayConditionProperty.getValue(e)
+ ),
+ offset: void 0,
+ color: void 0
+ };
+ if (this._materialProperty instanceof ColorMaterialProperty) {
+ let r;
+ defined(this._materialProperty.color) && (this._materialProperty.color.isConstant || n) && (r = this._materialProperty.color.getValue(e, scratchColor$e)), defined(r) || (r = Color.WHITE), i.color = ColorGeometryInstanceAttribute.fromColor(r);
+ }
+ return defined(this._options.offsetAttribute) && (i.offset = OffsetGeometryInstanceAttribute.fromCartesian3(
+ Property.getValueOrDefault(
+ this._terrainOffsetProperty,
+ e,
+ defaultOffset$9,
+ offsetScratch$8
+ )
+ )), new GeometryInstance({
+ id: t,
+ geometry: new CorridorGeometry(this._options),
+ attributes: i
+ });
+};
+CorridorGeometryUpdater.prototype.createOutlineGeometryInstance = function(e) {
+ const t = this._entity, n = t.isAvailable(e), i = Property.getValueOrDefault(
+ this._outlineColorProperty,
+ e,
+ Color.BLACK,
+ scratchColor$e
+ ), r = {
+ show: new ShowGeometryInstanceAttribute(
+ n && t.isShowing && this._showProperty.getValue(e) && this._showOutlineProperty.getValue(e)
+ ),
+ color: ColorGeometryInstanceAttribute.fromColor(i),
+ distanceDisplayCondition: DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition(
+ this._distanceDisplayConditionProperty.getValue(e)
+ ),
+ offset: void 0
+ };
+ return defined(this._options.offsetAttribute) && (r.offset = OffsetGeometryInstanceAttribute.fromCartesian3(
+ Property.getValueOrDefault(
+ this._terrainOffsetProperty,
+ e,
+ defaultOffset$9,
+ offsetScratch$8
+ )
+ )), new GeometryInstance({
+ id: t,
+ geometry: new CorridorOutlineGeometry(this._options),
+ attributes: r
+ });
+};
+CorridorGeometryUpdater.prototype._computeCenter = function(e, t) {
+ const n = Property.getValueOrUndefined(
+ this._entity.corridor.positions,
+ e
+ );
+ if (!(!defined(n) || n.length === 0))
+ return Cartesian3.clone(
+ n[Math.floor(n.length / 2)],
+ t
+ );
+};
+CorridorGeometryUpdater.prototype._isHidden = function(e, t) {
+ return !defined(t.positions) || !defined(t.width) || GeometryUpdater.prototype._isHidden.call(this, e, t);
+};
+CorridorGeometryUpdater.prototype._isDynamic = function(e, t) {
+ return !t.positions.isConstant || //
+ !Property.isConstant(t.height) || //
+ !Property.isConstant(t.extrudedHeight) || //
+ !Property.isConstant(t.granularity) || //
+ !Property.isConstant(t.width) || //
+ !Property.isConstant(t.outlineWidth) || //
+ !Property.isConstant(t.cornerType) || //
+ !Property.isConstant(t.zIndex) || //
+ this._onTerrain && !Property.isConstant(this._materialProperty) && !(this._materialProperty instanceof ColorMaterialProperty);
+};
+CorridorGeometryUpdater.prototype._setStaticOptions = function(e, t) {
+ let n = Property.getValueOrUndefined(
+ t.height,
+ Iso8601.MINIMUM_VALUE
+ );
+ const i = Property.getValueOrDefault(
+ t.heightReference,
+ Iso8601.MINIMUM_VALUE,
+ HeightReference$1.NONE
+ );
+ let r = Property.getValueOrUndefined(
+ t.extrudedHeight,
+ Iso8601.MINIMUM_VALUE
+ );
+ const o = Property.getValueOrDefault(
+ t.extrudedHeightReference,
+ Iso8601.MINIMUM_VALUE,
+ HeightReference$1.NONE
+ );
+ defined(r) && !defined(n) && (n = 0);
+ const s = this._options;
+ s.vertexFormat = this._materialProperty instanceof ColorMaterialProperty ? PerInstanceColorAppearance.VERTEX_FORMAT : MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat, s.positions = t.positions.getValue(
+ Iso8601.MINIMUM_VALUE,
+ s.positions
+ ), s.width = t.width.getValue(Iso8601.MINIMUM_VALUE), s.granularity = Property.getValueOrUndefined(
+ t.granularity,
+ Iso8601.MINIMUM_VALUE
+ ), s.cornerType = Property.getValueOrUndefined(
+ t.cornerType,
+ Iso8601.MINIMUM_VALUE
+ ), s.offsetAttribute = GroundGeometryUpdater.computeGeometryOffsetAttribute(
+ n,
+ i,
+ r,
+ o
+ ), s.height = GroundGeometryUpdater.getGeometryHeight(
+ n,
+ i
+ ), r = GroundGeometryUpdater.getGeometryExtrudedHeight(
+ r,
+ o
+ ), r === GroundGeometryUpdater.CLAMP_TO_GROUND && (r = ApproximateTerrainHeights.getMinimumMaximumHeights(
+ CorridorGeometry.computeRectangle(s, scratchRectangle$6)
+ ).minimumTerrainHeight), s.extrudedHeight = r;
+};
+CorridorGeometryUpdater.DynamicGeometryUpdater = DynamicCorridorGeometryUpdater;
+function DynamicCorridorGeometryUpdater(e, t, n) {
+ DynamicGeometryUpdater$1.call(
+ this,
+ e,
+ t,
+ n
+ );
+}
+defined(Object.create) && (DynamicCorridorGeometryUpdater.prototype = Object.create(
+ DynamicGeometryUpdater$1.prototype
+), DynamicCorridorGeometryUpdater.prototype.constructor = DynamicCorridorGeometryUpdater);
+DynamicCorridorGeometryUpdater.prototype._isHidden = function(e, t, n) {
+ const i = this._options;
+ return !defined(i.positions) || !defined(i.width) || DynamicGeometryUpdater$1.prototype._isHidden.call(
+ this,
+ e,
+ t,
+ n
+ );
+};
+DynamicCorridorGeometryUpdater.prototype._setOptions = function(e, t, n) {
+ const i = this._options;
+ let r = Property.getValueOrUndefined(t.height, n);
+ const o = Property.getValueOrDefault(
+ t.heightReference,
+ n,
+ HeightReference$1.NONE
+ );
+ let s = Property.getValueOrUndefined(
+ t.extrudedHeight,
+ n
+ );
+ const c = Property.getValueOrDefault(
+ t.extrudedHeightReference,
+ n,
+ HeightReference$1.NONE
+ );
+ defined(s) && !defined(r) && (r = 0), i.positions = Property.getValueOrUndefined(t.positions, n), i.width = Property.getValueOrUndefined(t.width, n), i.granularity = Property.getValueOrUndefined(
+ t.granularity,
+ n
+ ), i.cornerType = Property.getValueOrUndefined(t.cornerType, n), i.offsetAttribute = GroundGeometryUpdater.computeGeometryOffsetAttribute(
+ r,
+ o,
+ s,
+ c
+ ), i.height = GroundGeometryUpdater.getGeometryHeight(
+ r,
+ o
+ ), s = GroundGeometryUpdater.getGeometryExtrudedHeight(
+ s,
+ c
+ ), s === GroundGeometryUpdater.CLAMP_TO_GROUND && (s = ApproximateTerrainHeights.getMinimumMaximumHeights(
+ CorridorGeometry.computeRectangle(i, scratchRectangle$6)
+ ).minimumTerrainHeight), i.extrudedHeight = s;
+};
+function DataSource() {
+ DeveloperError.throwInstantiationError();
+}
+Object.defineProperties(DataSource.prototype, {
+ /**
+ * Gets a human-readable name for this instance.
+ * @memberof DataSource.prototype
+ * @type {string}
+ */
+ name: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * Gets the preferred clock settings for this data source.
+ * @memberof DataSource.prototype
+ * @type {DataSourceClock}
+ */
+ clock: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * Gets the collection of {@link Entity} instances.
+ * @memberof DataSource.prototype
+ * @type {EntityCollection}
+ */
+ entities: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * Gets a value indicating if the data source is currently loading data.
+ * @memberof DataSource.prototype
+ * @type {boolean}
+ */
+ isLoading: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * Gets an event that will be raised when the underlying data changes.
+ * @memberof DataSource.prototype
+ * @type {Event}
+ */
+ changedEvent: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * Gets an event that will be raised if an error is encountered during processing.
+ * @memberof DataSource.prototype
+ * @type {Eventvalue's red, green,
+ * blue, and alpha properties as shown in Example 1. These components range from 0.0
+ * (no intensity) to 1.0 (full intensity).
+ * @memberof PointPrimitive.prototype
+ * @type {Color}
+ *
+ * @example
+ * // Example 1. Assign yellow.
+ * p.color = Cesium.Color.YELLOW;
+ *
+ * @example
+ * // Example 2. Make a pointPrimitive 50% translucent.
+ * p.color = new Cesium.Color(1.0, 1.0, 1.0, 0.5);
+ */
+ color: {
+ get: function() {
+ return this._color;
+ },
+ set: function(e) {
+ const t = this._color;
+ Color.equals(t, e) || (Color.clone(e, t), makeDirty$1(this, COLOR_INDEX$3));
+ }
+ },
+ /**
+ * Gets or sets the outline color of the point.
+ * @memberof PointPrimitive.prototype
+ * @type {Color}
+ */
+ outlineColor: {
+ get: function() {
+ return this._outlineColor;
+ },
+ set: function(e) {
+ const t = this._outlineColor;
+ Color.equals(t, e) || (Color.clone(e, t), makeDirty$1(this, OUTLINE_COLOR_INDEX$1));
+ }
+ },
+ /**
+ * Gets or sets the outline width in pixels. This width adds to pixelSize,
+ * increasing the total size of the point.
+ * @memberof PointPrimitive.prototype
+ * @type {number}
+ */
+ outlineWidth: {
+ get: function() {
+ return this._outlineWidth;
+ },
+ set: function(e) {
+ this._outlineWidth !== e && (this._outlineWidth = e, makeDirty$1(this, OUTLINE_WIDTH_INDEX$1));
+ }
+ },
+ /**
+ * Gets or sets the condition specifying at what distance from the camera that this point will be displayed.
+ * @memberof PointPrimitive.prototype
+ * @type {DistanceDisplayCondition}
+ * @default undefined
+ */
+ distanceDisplayCondition: {
+ get: function() {
+ return this._distanceDisplayCondition;
+ },
+ set: function(e) {
+ DistanceDisplayCondition.equals(this._distanceDisplayCondition, e) || (this._distanceDisplayCondition = DistanceDisplayCondition.clone(
+ e,
+ this._distanceDisplayCondition
+ ), makeDirty$1(this, DISTANCE_DISPLAY_CONDITION_INDEX$1));
+ }
+ },
+ /**
+ * Gets or sets the distance from the camera at which to disable the depth test to, for example, prevent clipping against terrain.
+ * When set to zero, the depth test is always applied. When set to Number.POSITIVE_INFINITY, the depth test is never applied.
+ * @memberof PointPrimitive.prototype
+ * @type {number}
+ * @default 0.0
+ */
+ disableDepthTestDistance: {
+ get: function() {
+ return this._disableDepthTestDistance;
+ },
+ set: function(e) {
+ this._disableDepthTestDistance !== e && (this._disableDepthTestDistance = e, makeDirty$1(this, DISABLE_DEPTH_DISTANCE_INDEX$1));
+ }
+ },
+ /**
+ * Gets or sets the user-defined value returned when the point is picked.
+ * @memberof PointPrimitive.prototype
+ * @type {*}
+ */
+ id: {
+ get: function() {
+ return this._id;
+ },
+ set: function(e) {
+ this._id = e, defined(this._pickId) && (this._pickId.object.id = e);
+ }
+ },
+ /**
+ * @private
+ */
+ pickId: {
+ get: function() {
+ return this._pickId;
+ }
+ },
+ /**
+ * Determines whether or not this point will be shown or hidden because it was clustered.
+ * @memberof PointPrimitive.prototype
+ * @type {boolean}
+ * @private
+ */
+ clusterShow: {
+ get: function() {
+ return this._clusterShow;
+ },
+ set: function(e) {
+ this._clusterShow !== e && (this._clusterShow = e, makeDirty$1(this, SHOW_INDEX$3));
+ }
+ },
+ /**
+ * The {@link SplitDirection} to apply to this point.
+ * @memberof PointPrimitive.prototype
+ * @type {SplitDirection}
+ * @default {@link SplitDirection.NONE}
+ */
+ splitDirection: {
+ get: function() {
+ return this._splitDirection;
+ },
+ set: function(e) {
+ this._splitDirection !== e && (this._splitDirection = e, makeDirty$1(this, SPLIT_DIRECTION_INDEX$1));
+ }
+ }
+});
+PointPrimitive.prototype.getPickId = function(e) {
+ return defined(this._pickId) || (this._pickId = e.createPickId({
+ primitive: this,
+ collection: this._collection,
+ id: this._id
+ })), this._pickId;
+};
+PointPrimitive.prototype._getActualPosition = function() {
+ return this._actualPosition;
+};
+PointPrimitive.prototype._setActualPosition = function(e) {
+ Cartesian3.clone(e, this._actualPosition), makeDirty$1(this, POSITION_INDEX$3);
+};
+const tempCartesian3 = new Cartesian4();
+PointPrimitive._computeActualPosition = function(e, t, n) {
+ return t.mode === SceneMode$1.SCENE3D ? e : (Matrix4.multiplyByPoint(n, e, tempCartesian3), SceneTransforms.computeActualEllipsoidPosition(
+ t,
+ tempCartesian3
+ ));
+};
+const scratchCartesian4$3 = new Cartesian4();
+PointPrimitive._computeScreenSpacePosition = function(e, t, n, i) {
+ const r = Matrix4.multiplyByVector(
+ e,
+ Cartesian4.fromElements(
+ t.x,
+ t.y,
+ t.z,
+ 1,
+ scratchCartesian4$3
+ ),
+ scratchCartesian4$3
+ );
+ return SceneTransforms.worldToWindowCoordinates(
+ n,
+ r,
+ i
+ );
+};
+PointPrimitive.prototype.computeScreenSpacePosition = function(e, t) {
+ const n = this._pointPrimitiveCollection;
+ defined(t) || (t = new Cartesian2());
+ const i = n.modelMatrix, r = PointPrimitive._computeScreenSpacePosition(
+ i,
+ this._actualPosition,
+ e,
+ t
+ );
+ if (defined(r))
+ return r.y = e.canvas.clientHeight - r.y, r;
+};
+PointPrimitive.getScreenSpaceBoundingBox = function(e, t, n) {
+ const i = e.pixelSize, r = i * 0.5, o = t.x - r, s = t.y - r, c = i, l = i;
+ return defined(n) || (n = new BoundingRectangle()), n.x = o, n.y = s, n.width = c, n.height = l, n;
+};
+PointPrimitive.prototype.equals = function(e) {
+ return this === e || defined(e) && this._id === e._id && Cartesian3.equals(this._position, e._position) && Color.equals(this._color, e._color) && this._pixelSize === e._pixelSize && this._outlineWidth === e._outlineWidth && this._show === e._show && Color.equals(this._outlineColor, e._outlineColor) && NearFarScalar.equals(this._scaleByDistance, e._scaleByDistance) && NearFarScalar.equals(
+ this._translucencyByDistance,
+ e._translucencyByDistance
+ ) && DistanceDisplayCondition.equals(
+ this._distanceDisplayCondition,
+ e._distanceDisplayCondition
+ ) && this._disableDepthTestDistance === e._disableDepthTestDistance && this._splitDirection === e._splitDirection;
+};
+PointPrimitive.prototype._destroy = function() {
+ this._pickId = this._pickId && this._pickId.destroy(), this._pointPrimitiveCollection = void 0;
+};
+const PointPrimitiveCollectionFS = `in vec4 v_color;
+in vec4 v_outlineColor;
+in float v_innerPercent;
+in float v_pixelDistance;
+in vec4 v_pickColor;
+in float v_splitDirection;
+
+void main()
+{
+ if (v_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
+ if (v_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;
+
+ // The distance in UV space from this fragment to the center of the point, at most 0.5.
+ float distanceToCenter = length(gl_PointCoord - vec2(0.5));
+ // The max distance stops one pixel shy of the edge to leave space for anti-aliasing.
+ float maxDistance = max(0.0, 0.5 - v_pixelDistance);
+ float wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);
+ float innerAlpha = 1.0 - smoothstep(maxDistance * v_innerPercent, 0.5 * v_innerPercent, distanceToCenter);
+
+ vec4 color = mix(v_outlineColor, v_color, innerAlpha);
+ color.a *= wholeAlpha;
+
+// Fully transparent parts of the billboard are not pickable.
+#if !defined(OPAQUE) && !defined(TRANSLUCENT)
+ if (color.a < 0.005) // matches 0/255 and 1/255
+ {
+ discard;
+ }
+#else
+// The billboard is rendered twice. The opaque pass discards translucent fragments
+// and the translucent pass discards opaque fragments.
+#ifdef OPAQUE
+ if (color.a < 0.995) // matches < 254/255
+ {
+ discard;
+ }
+#else
+ if (color.a >= 0.995) // matches 254/255 and 255/255
+ {
+ discard;
+ }
+#endif
+#endif
+
+ out_FragColor = czm_gammaCorrect(color);
+ czm_writeLogDepth();
+}
+`, PointPrimitiveCollectionVS = `uniform float u_maxTotalPointSize;
+
+in vec4 positionHighAndSize;
+in vec4 positionLowAndOutline;
+in vec4 compressedAttribute0; // color, outlineColor, pick color
+in vec4 compressedAttribute1; // show, translucency by distance, some free space
+in vec4 scaleByDistance; // near, nearScale, far, farScale
+in vec4 distanceDisplayConditionAndDisableDepthAndSplitDirection; // near, far, disableDepthTestDistance, splitDirection
+
+out vec4 v_color;
+out vec4 v_outlineColor;
+out float v_innerPercent;
+out float v_pixelDistance;
+out vec4 v_pickColor;
+out float v_splitDirection;
+
+const float SHIFT_LEFT8 = 256.0;
+const float SHIFT_RIGHT8 = 1.0 / 256.0;
+
+void main()
+{
+ // Modifying this shader may also require modifications to PointPrimitive._computeScreenSpacePosition
+
+ // unpack attributes
+ vec3 positionHigh = positionHighAndSize.xyz;
+ vec3 positionLow = positionLowAndOutline.xyz;
+ float outlineWidthBothSides = 2.0 * positionLowAndOutline.w;
+ float totalSize = positionHighAndSize.w + outlineWidthBothSides;
+ float outlinePercent = outlineWidthBothSides / totalSize;
+ // Scale in response to browser-zoom.
+ totalSize *= czm_pixelRatio;
+
+ float temp = compressedAttribute1.x * SHIFT_RIGHT8;
+ float show = floor(temp);
+
+#ifdef EYE_DISTANCE_TRANSLUCENCY
+ vec4 translucencyByDistance;
+ translucencyByDistance.x = compressedAttribute1.z;
+ translucencyByDistance.z = compressedAttribute1.w;
+
+ translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;
+
+ temp = compressedAttribute1.y * SHIFT_RIGHT8;
+ translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;
+#endif
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ vec4 color;
+ vec4 outlineColor;
+ vec4 pickColor;
+
+ // compressedAttribute0.z => pickColor.rgb
+
+ temp = compressedAttribute0.z * SHIFT_RIGHT8;
+ pickColor.b = (temp - floor(temp)) * SHIFT_LEFT8;
+ temp = floor(temp) * SHIFT_RIGHT8;
+ pickColor.g = (temp - floor(temp)) * SHIFT_LEFT8;
+ pickColor.r = floor(temp);
+
+ // compressedAttribute0.x => color.rgb
+
+ temp = compressedAttribute0.x * SHIFT_RIGHT8;
+ color.b = (temp - floor(temp)) * SHIFT_LEFT8;
+ temp = floor(temp) * SHIFT_RIGHT8;
+ color.g = (temp - floor(temp)) * SHIFT_LEFT8;
+ color.r = floor(temp);
+
+ // compressedAttribute0.y => outlineColor.rgb
+
+ temp = compressedAttribute0.y * SHIFT_RIGHT8;
+ outlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8;
+ temp = floor(temp) * SHIFT_RIGHT8;
+ outlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8;
+ outlineColor.r = floor(temp);
+
+ // compressedAttribute0.w => color.a, outlineColor.a, pickColor.a
+
+ temp = compressedAttribute0.w * SHIFT_RIGHT8;
+ pickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;
+ pickColor = pickColor / 255.0;
+
+ temp = floor(temp) * SHIFT_RIGHT8;
+ outlineColor.a = (temp - floor(temp)) * SHIFT_LEFT8;
+ outlineColor /= 255.0;
+ color.a = floor(temp);
+ color /= 255.0;
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
+ vec4 positionEC = czm_modelViewRelativeToEye * p;
+
+ ///////////////////////////////////////////////////////////////////////////
+
+#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)
+ float lengthSq;
+ if (czm_sceneMode == czm_sceneMode2D)
+ {
+ // 2D camera distance is a special case
+ // treat all billboards as flattened to the z=0.0 plane
+ lengthSq = czm_eyeHeight2D.y;
+ }
+ else
+ {
+ lengthSq = dot(positionEC.xyz, positionEC.xyz);
+ }
+#endif
+
+#ifdef EYE_DISTANCE_SCALING
+ totalSize *= czm_nearFarScalar(scaleByDistance, lengthSq);
+#endif
+ if (totalSize > 0.0) {
+ // Add padding for anti-aliasing on both sides.
+ totalSize += 3.0;
+ }
+
+ // Clamp to max point size.
+ totalSize = min(totalSize, u_maxTotalPointSize);
+ // If size is too small, push vertex behind near plane for clipping.
+ // Note that context.minimumAliasedPointSize "will be at most 1.0".
+ if (totalSize < 1.0)
+ {
+ positionEC.xyz = vec3(0.0);
+ totalSize = 1.0;
+ }
+
+ float translucency = 1.0;
+#ifdef EYE_DISTANCE_TRANSLUCENCY
+ translucency = czm_nearFarScalar(translucencyByDistance, lengthSq);
+ // push vertex behind near plane for clipping
+ if (translucency < 0.004)
+ {
+ positionEC.xyz = vec3(0.0);
+ }
+#endif
+
+#ifdef DISTANCE_DISPLAY_CONDITION
+ float nearSq = distanceDisplayConditionAndDisableDepthAndSplitDirection.x;
+ float farSq = distanceDisplayConditionAndDisableDepthAndSplitDirection.y;
+ if (lengthSq < nearSq || lengthSq > farSq) {
+ // push vertex behind camera to force it to be clipped
+ positionEC.xyz = vec3(0.0, 0.0, 1.0);
+ }
+#endif
+
+ gl_Position = czm_projection * positionEC;
+ czm_vertexLogDepth();
+
+#ifdef DISABLE_DEPTH_DISTANCE
+ float disableDepthTestDistance = distanceDisplayConditionAndDisableDepthAndSplitDirection.z;
+ if (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)
+ {
+ disableDepthTestDistance = czm_minimumDisableDepthTestDistance;
+ }
+
+ if (disableDepthTestDistance != 0.0)
+ {
+ // Don't try to "multiply both sides" by w. Greater/less-than comparisons won't work for negative values of w.
+ float zclip = gl_Position.z / gl_Position.w;
+ bool clipped = (zclip < -1.0 || zclip > 1.0);
+ if (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))
+ {
+ // Position z on the near plane.
+ gl_Position.z = -gl_Position.w;
+#ifdef LOG_DEPTH
+ czm_vertexLogDepth(vec4(czm_currentFrustum.x));
+#endif
+ }
+ }
+#endif
+
+ v_color = color;
+ v_color.a *= translucency * show;
+ v_outlineColor = outlineColor;
+ v_outlineColor.a *= translucency * show;
+
+ v_innerPercent = 1.0 - outlinePercent;
+ v_pixelDistance = 2.0 / totalSize;
+ gl_PointSize = totalSize * show;
+ gl_Position *= show;
+
+ v_pickColor = pickColor;
+ v_splitDirection = distanceDisplayConditionAndDisableDepthAndSplitDirection.w;
+}
+`, SHOW_INDEX$2 = PointPrimitive.SHOW_INDEX, POSITION_INDEX$2 = PointPrimitive.POSITION_INDEX, COLOR_INDEX$2 = PointPrimitive.COLOR_INDEX, OUTLINE_COLOR_INDEX = PointPrimitive.OUTLINE_COLOR_INDEX, OUTLINE_WIDTH_INDEX = PointPrimitive.OUTLINE_WIDTH_INDEX, PIXEL_SIZE_INDEX = PointPrimitive.PIXEL_SIZE_INDEX, SCALE_BY_DISTANCE_INDEX = PointPrimitive.SCALE_BY_DISTANCE_INDEX, TRANSLUCENCY_BY_DISTANCE_INDEX = PointPrimitive.TRANSLUCENCY_BY_DISTANCE_INDEX, DISTANCE_DISPLAY_CONDITION_INDEX = PointPrimitive.DISTANCE_DISPLAY_CONDITION_INDEX, DISABLE_DEPTH_DISTANCE_INDEX = PointPrimitive.DISABLE_DEPTH_DISTANCE_INDEX, SPLIT_DIRECTION_INDEX = PointPrimitive.SPLIT_DIRECTION_INDEX, NUMBER_OF_PROPERTIES$1 = PointPrimitive.NUMBER_OF_PROPERTIES, attributeLocations$2 = {
+ positionHighAndSize: 0,
+ positionLowAndOutline: 1,
+ compressedAttribute0: 2,
+ // color, outlineColor, pick color
+ compressedAttribute1: 3,
+ // show, translucency by distance, some free space
+ scaleByDistance: 4,
+ distanceDisplayConditionAndDisableDepthAndSplitDirection: 5
+};
+function PointPrimitiveCollection(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._sp = void 0, this._spTranslucent = void 0, this._rsOpaque = void 0, this._rsTranslucent = void 0, this._vaf = void 0, this._pointPrimitives = [], this._pointPrimitivesToUpdate = [], this._pointPrimitivesToUpdateIndex = 0, this._pointPrimitivesRemoved = !1, this._createVertexArray = !1, this._shaderScaleByDistance = !1, this._compiledShaderScaleByDistance = !1, this._shaderTranslucencyByDistance = !1, this._compiledShaderTranslucencyByDistance = !1, this._shaderDistanceDisplayCondition = !1, this._compiledShaderDistanceDisplayCondition = !1, this._shaderDisableDepthDistance = !1, this._compiledShaderDisableDepthDistance = !1, this._propertiesChanged = new Uint32Array(NUMBER_OF_PROPERTIES$1), this._maxPixelSize = 1, this._baseVolume = new BoundingSphere(), this._baseVolumeWC = new BoundingSphere(), this._baseVolume2D = new BoundingSphere(), this._boundingVolume = new BoundingSphere(), this._boundingVolumeDirty = !1, this._colorCommands = [], this.show = defaultValue(e.show, !0), this.modelMatrix = Matrix4.clone(
+ defaultValue(e.modelMatrix, Matrix4.IDENTITY)
+ ), this._modelMatrix = Matrix4.clone(Matrix4.IDENTITY), this.debugShowBoundingVolume = defaultValue(
+ e.debugShowBoundingVolume,
+ !1
+ ), this.blendOption = defaultValue(
+ e.blendOption,
+ BlendOption$1.OPAQUE_AND_TRANSLUCENT
+ ), this._blendOption = void 0, this._mode = SceneMode$1.SCENE3D, this._maxTotalPointSize = 1, this._buffersUsage = [
+ BufferUsage$1.STATIC_DRAW,
+ // SHOW_INDEX
+ BufferUsage$1.STATIC_DRAW,
+ // POSITION_INDEX
+ BufferUsage$1.STATIC_DRAW,
+ // COLOR_INDEX
+ BufferUsage$1.STATIC_DRAW,
+ // OUTLINE_COLOR_INDEX
+ BufferUsage$1.STATIC_DRAW,
+ // OUTLINE_WIDTH_INDEX
+ BufferUsage$1.STATIC_DRAW,
+ // PIXEL_SIZE_INDEX
+ BufferUsage$1.STATIC_DRAW,
+ // SCALE_BY_DISTANCE_INDEX
+ BufferUsage$1.STATIC_DRAW,
+ // TRANSLUCENCY_BY_DISTANCE_INDEX
+ BufferUsage$1.STATIC_DRAW
+ // DISTANCE_DISPLAY_CONDITION_INDEX
+ ];
+ const t = this;
+ this._uniforms = {
+ u_maxTotalPointSize: function() {
+ return t._maxTotalPointSize;
+ }
+ };
+}
+Object.defineProperties(PointPrimitiveCollection.prototype, {
+ /**
+ * Returns the number of points in this collection. This is commonly used with
+ * {@link PointPrimitiveCollection#get} to iterate over all the points
+ * in the collection.
+ * @memberof PointPrimitiveCollection.prototype
+ * @type {number}
+ */
+ length: {
+ get: function() {
+ return removePointPrimitives(this), this._pointPrimitives.length;
+ }
+ }
+});
+function destroyPointPrimitives(e) {
+ const t = e.length;
+ for (let n = 0; n < t; ++n)
+ e[n] && e[n]._destroy();
+}
+PointPrimitiveCollection.prototype.add = function(e) {
+ const t = new PointPrimitive(e, this);
+ return t._index = this._pointPrimitives.length, this._pointPrimitives.push(t), this._createVertexArray = !0, t;
+};
+PointPrimitiveCollection.prototype.remove = function(e) {
+ return this.contains(e) ? (this._pointPrimitives[e._index] = null, this._pointPrimitivesRemoved = !0, this._createVertexArray = !0, e._destroy(), !0) : !1;
+};
+PointPrimitiveCollection.prototype.removeAll = function() {
+ destroyPointPrimitives(this._pointPrimitives), this._pointPrimitives = [], this._pointPrimitivesToUpdate = [], this._pointPrimitivesToUpdateIndex = 0, this._pointPrimitivesRemoved = !1, this._createVertexArray = !0;
+};
+function removePointPrimitives(e) {
+ if (e._pointPrimitivesRemoved) {
+ e._pointPrimitivesRemoved = !1;
+ const t = [], n = e._pointPrimitives, i = n.length;
+ for (let r = 0, o = 0; r < i; ++r) {
+ const s = n[r];
+ s && (s._index = o++, t.push(s));
+ }
+ e._pointPrimitives = t;
+ }
+}
+PointPrimitiveCollection.prototype._updatePointPrimitive = function(e, t) {
+ e._dirty || (this._pointPrimitivesToUpdate[this._pointPrimitivesToUpdateIndex++] = e), ++this._propertiesChanged[t];
+};
+PointPrimitiveCollection.prototype.contains = function(e) {
+ return defined(e) && e._pointPrimitiveCollection === this;
+};
+PointPrimitiveCollection.prototype.get = function(e) {
+ return removePointPrimitives(this), this._pointPrimitives[e];
+};
+PointPrimitiveCollection.prototype.computeNewBuffersUsage = function() {
+ const e = this._buffersUsage;
+ let t = !1;
+ const n = this._propertiesChanged;
+ for (let i = 0; i < NUMBER_OF_PROPERTIES$1; ++i) {
+ const r = n[i] === 0 ? BufferUsage$1.STATIC_DRAW : BufferUsage$1.STREAM_DRAW;
+ t = t || e[i] !== r, e[i] = r;
+ }
+ return t;
+};
+function createVAF$1(e, t, n) {
+ return new VertexArrayFacade(
+ e,
+ [
+ {
+ index: attributeLocations$2.positionHighAndSize,
+ componentsPerAttribute: 4,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ usage: n[POSITION_INDEX$2]
+ },
+ {
+ index: attributeLocations$2.positionLowAndShow,
+ componentsPerAttribute: 4,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ usage: n[POSITION_INDEX$2]
+ },
+ {
+ index: attributeLocations$2.compressedAttribute0,
+ componentsPerAttribute: 4,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ usage: n[COLOR_INDEX$2]
+ },
+ {
+ index: attributeLocations$2.compressedAttribute1,
+ componentsPerAttribute: 4,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ usage: n[TRANSLUCENCY_BY_DISTANCE_INDEX]
+ },
+ {
+ index: attributeLocations$2.scaleByDistance,
+ componentsPerAttribute: 4,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ usage: n[SCALE_BY_DISTANCE_INDEX]
+ },
+ {
+ index: attributeLocations$2.distanceDisplayConditionAndDisableDepthAndSplitDirection,
+ componentsPerAttribute: 4,
+ componentDatatype: ComponentDatatype$1.FLOAT,
+ usage: n[DISTANCE_DISPLAY_CONDITION_INDEX]
+ }
+ ],
+ t
+ );
+}
+const writePositionScratch$1 = new EncodedCartesian3();
+function writePositionSizeAndOutline(e, t, n, i) {
+ const r = i._index, o = i._getActualPosition();
+ e._mode === SceneMode$1.SCENE3D && (BoundingSphere.expand(
+ e._baseVolume,
+ o,
+ e._baseVolume
+ ), e._boundingVolumeDirty = !0), EncodedCartesian3.fromCartesian(o, writePositionScratch$1);
+ const s = i.pixelSize, c = i.outlineWidth;
+ e._maxPixelSize = Math.max(
+ e._maxPixelSize,
+ s + c
+ );
+ const l = n[attributeLocations$2.positionHighAndSize], d = writePositionScratch$1.high;
+ l(r, d.x, d.y, d.z, s);
+ const f = n[attributeLocations$2.positionLowAndOutline], h = writePositionScratch$1.low;
+ f(r, h.x, h.y, h.z, c);
+}
+const LEFT_SHIFT16 = 65536, LEFT_SHIFT8 = 256;
+function writeCompressedAttrib0(e, t, n, i) {
+ const r = i._index, o = i.color, s = i.getPickId(t).color, c = i.outlineColor;
+ let l = Color.floatToByte(o.red), d = Color.floatToByte(o.green), f = Color.floatToByte(o.blue);
+ const h = l * LEFT_SHIFT16 + d * LEFT_SHIFT8 + f;
+ l = Color.floatToByte(c.red), d = Color.floatToByte(c.green), f = Color.floatToByte(c.blue);
+ const p = l * LEFT_SHIFT16 + d * LEFT_SHIFT8 + f;
+ l = Color.floatToByte(s.red), d = Color.floatToByte(s.green), f = Color.floatToByte(s.blue);
+ const m = l * LEFT_SHIFT16 + d * LEFT_SHIFT8 + f, _ = Color.floatToByte(o.alpha) * LEFT_SHIFT16 + Color.floatToByte(c.alpha) * LEFT_SHIFT8 + Color.floatToByte(s.alpha), y = n[attributeLocations$2.compressedAttribute0];
+ y(r, h, p, m, _);
+}
+function writeCompressedAttrib1(e, t, n, i) {
+ const r = i._index;
+ let o = 0, s = 1, c = 1, l = 1;
+ const d = i.translucencyByDistance;
+ defined(d) && (o = d.near, s = d.nearValue, c = d.far, l = d.farValue, (s !== 1 || l !== 1) && (e._shaderTranslucencyByDistance = !0));
+ let f = i.show && i.clusterShow;
+ i.color.alpha === 0 && i.outlineColor.alpha === 0 && (f = !1), s = CesiumMath.clamp(s, 0, 1), s = s === 1 ? 255 : s * 255 | 0;
+ const h = (f ? 1 : 0) * LEFT_SHIFT8 + s;
+ l = CesiumMath.clamp(l, 0, 1), l = l === 1 ? 255 : l * 255 | 0;
+ const p = l, m = n[attributeLocations$2.compressedAttribute1];
+ m(r, h, p, o, c);
+}
+function writeScaleByDistance(e, t, n, i) {
+ const r = i._index, o = n[attributeLocations$2.scaleByDistance];
+ let s = 0, c = 1, l = 1, d = 1;
+ const f = i.scaleByDistance;
+ defined(f) && (s = f.near, c = f.nearValue, l = f.far, d = f.farValue, (c !== 1 || d !== 1) && (e._shaderScaleByDistance = !0)), o(r, s, c, l, d);
+}
+function writeDistanceDisplayConditionAndDepthDisableAndSplitDirection(e, t, n, i) {
+ const r = i._index, o = n[attributeLocations$2.distanceDisplayConditionAndDisableDepthAndSplitDirection];
+ let s = 0, c = Number.MAX_VALUE;
+ const l = i.distanceDisplayCondition;
+ defined(l) && (s = l.near, c = l.far, s *= s, c *= c, e._shaderDistanceDisplayCondition = !0);
+ let d = i.disableDepthTestDistance;
+ d *= d, d > 0 && (e._shaderDisableDepthDistance = !0, d === Number.POSITIVE_INFINITY && (d = -1));
+ let f = 0;
+ const h = i.splitDirection;
+ defined(h) && (f = h), o(r, s, c, d, f);
+}
+function writePointPrimitive(e, t, n, i) {
+ writePositionSizeAndOutline(
+ e,
+ t,
+ n,
+ i
+ ), writeCompressedAttrib0(
+ e,
+ t,
+ n,
+ i
+ ), writeCompressedAttrib1(
+ e,
+ t,
+ n,
+ i
+ ), writeScaleByDistance(
+ e,
+ t,
+ n,
+ i
+ ), writeDistanceDisplayConditionAndDepthDisableAndSplitDirection(
+ e,
+ t,
+ n,
+ i
+ );
+}
+function recomputeActualPositions(e, t, n, i, r, o) {
+ let s;
+ i.mode === SceneMode$1.SCENE3D ? (s = e._baseVolume, e._boundingVolumeDirty = !0) : s = e._baseVolume2D;
+ const c = [];
+ for (let l = 0; l < n; ++l) {
+ const d = t[l], f = d.position, h = PointPrimitive._computeActualPosition(
+ f,
+ i,
+ r
+ );
+ defined(h) && (d._setActualPosition(h), o ? c.push(h) : BoundingSphere.expand(s, h, s));
+ }
+ o && BoundingSphere.fromPoints(c, s);
+}
+function updateMode(e, t) {
+ const n = t.mode, i = e._pointPrimitives, r = e._pointPrimitivesToUpdate, o = e._modelMatrix;
+ e._createVertexArray || e._mode !== n || n !== SceneMode$1.SCENE3D && !Matrix4.equals(o, e.modelMatrix) ? (e._mode = n, Matrix4.clone(e.modelMatrix, o), e._createVertexArray = !0, (n === SceneMode$1.SCENE3D || n === SceneMode$1.SCENE2D || n === SceneMode$1.COLUMBUS_VIEW) && recomputeActualPositions(
+ e,
+ i,
+ i.length,
+ t,
+ o,
+ !0
+ )) : n === SceneMode$1.MORPHING ? recomputeActualPositions(
+ e,
+ i,
+ i.length,
+ t,
+ o,
+ !0
+ ) : (n === SceneMode$1.SCENE2D || n === SceneMode$1.COLUMBUS_VIEW) && recomputeActualPositions(
+ e,
+ r,
+ e._pointPrimitivesToUpdateIndex,
+ t,
+ o,
+ !1
+ );
+}
+function updateBoundingVolume(e, t, n) {
+ const r = t.camera.getPixelSize(
+ n,
+ t.context.drawingBufferWidth,
+ t.context.drawingBufferHeight
+ ) * e._maxPixelSize;
+ n.radius += r;
+}
+const scratchWriterArray$1 = [];
+PointPrimitiveCollection.prototype.update = function(e) {
+ if (removePointPrimitives(this), !this.show)
+ return;
+ this._maxTotalPointSize = ContextLimits.maximumAliasedPointSize, updateMode(this, e);
+ const n = this._pointPrimitives.length, i = this._pointPrimitivesToUpdate, r = this._pointPrimitivesToUpdateIndex, o = this._propertiesChanged, s = this._createVertexArray;
+ let c;
+ const l = e.context, d = e.passes, f = d.pick;
+ if (s || !f && this.computeNewBuffersUsage()) {
+ this._createVertexArray = !1;
+ for (let E = 0; E < NUMBER_OF_PROPERTIES$1; ++E)
+ o[E] = 0;
+ if (this._vaf = this._vaf && this._vaf.destroy(), n > 0) {
+ this._vaf = createVAF$1(l, n, this._buffersUsage), c = this._vaf.writers;
+ for (let E = 0; E < n; ++E) {
+ const A = this._pointPrimitives[E];
+ A._dirty = !1, writePointPrimitive(this, l, c, A);
+ }
+ this._vaf.commit();
+ }
+ this._pointPrimitivesToUpdateIndex = 0;
+ } else if (r > 0) {
+ const E = scratchWriterArray$1;
+ E.length = 0, (o[POSITION_INDEX$2] || o[OUTLINE_WIDTH_INDEX] || o[PIXEL_SIZE_INDEX]) && E.push(writePositionSizeAndOutline), (o[COLOR_INDEX$2] || o[OUTLINE_COLOR_INDEX]) && E.push(writeCompressedAttrib0), (o[SHOW_INDEX$2] || o[TRANSLUCENCY_BY_DISTANCE_INDEX]) && E.push(writeCompressedAttrib1), o[SCALE_BY_DISTANCE_INDEX] && E.push(writeScaleByDistance), (o[DISTANCE_DISPLAY_CONDITION_INDEX] || o[DISABLE_DEPTH_DISTANCE_INDEX] || o[SPLIT_DIRECTION_INDEX]) && E.push(
+ writeDistanceDisplayConditionAndDepthDisableAndSplitDirection
+ );
+ const A = E.length;
+ if (c = this._vaf.writers, r / n > 0.1) {
+ for (let D = 0; D < r; ++D) {
+ const P = i[D];
+ P._dirty = !1;
+ for (let I = 0; I < A; ++I)
+ E[I](this, l, c, P);
+ }
+ this._vaf.commit();
+ } else {
+ for (let D = 0; D < r; ++D) {
+ const P = i[D];
+ P._dirty = !1;
+ for (let I = 0; I < A; ++I)
+ E[I](this, l, c, P);
+ this._vaf.subCommit(P._index, 1);
+ }
+ this._vaf.endSubCommits();
+ }
+ this._pointPrimitivesToUpdateIndex = 0;
+ }
+ if (r > n * 1.5 && (i.length = n), !defined(this._vaf) || !defined(this._vaf.va))
+ return;
+ this._boundingVolumeDirty && (this._boundingVolumeDirty = !1, BoundingSphere.transform(
+ this._baseVolume,
+ this.modelMatrix,
+ this._baseVolumeWC
+ ));
+ let h, p = Matrix4.IDENTITY;
+ e.mode === SceneMode$1.SCENE3D ? (p = this.modelMatrix, h = BoundingSphere.clone(
+ this._baseVolumeWC,
+ this._boundingVolume
+ )) : h = BoundingSphere.clone(
+ this._baseVolume2D,
+ this._boundingVolume
+ ), updateBoundingVolume(this, e, h);
+ const m = this._blendOption !== this.blendOption;
+ this._blendOption = this.blendOption, m && (this._blendOption === BlendOption$1.OPAQUE || this._blendOption === BlendOption$1.OPAQUE_AND_TRANSLUCENT ? this._rsOpaque = RenderState.fromCache({
+ depthTest: {
+ enabled: !0,
+ func: WebGLConstants$1.LEQUAL
+ },
+ depthMask: !0
+ }) : this._rsOpaque = void 0, this._blendOption === BlendOption$1.TRANSLUCENT || this._blendOption === BlendOption$1.OPAQUE_AND_TRANSLUCENT ? this._rsTranslucent = RenderState.fromCache({
+ depthTest: {
+ enabled: !0,
+ func: WebGLConstants$1.LEQUAL
+ },
+ depthMask: !1,
+ blending: BlendingState$1.ALPHA_BLEND
+ }) : this._rsTranslucent = void 0), this._shaderDisableDepthDistance = this._shaderDisableDepthDistance || e.minimumDisableDepthTestDistance !== 0;
+ let _, y;
+ (m || this._shaderScaleByDistance && !this._compiledShaderScaleByDistance || this._shaderTranslucencyByDistance && !this._compiledShaderTranslucencyByDistance || this._shaderDistanceDisplayCondition && !this._compiledShaderDistanceDisplayCondition || this._shaderDisableDepthDistance !== this._compiledShaderDisableDepthDistance) && (_ = new ShaderSource({
+ sources: [PointPrimitiveCollectionVS]
+ }), this._shaderScaleByDistance && _.defines.push("EYE_DISTANCE_SCALING"), this._shaderTranslucencyByDistance && _.defines.push("EYE_DISTANCE_TRANSLUCENCY"), this._shaderDistanceDisplayCondition && _.defines.push("DISTANCE_DISPLAY_CONDITION"), this._shaderDisableDepthDistance && _.defines.push("DISABLE_DEPTH_DISTANCE"), this._blendOption === BlendOption$1.OPAQUE_AND_TRANSLUCENT && (y = new ShaderSource({
+ defines: ["OPAQUE"],
+ sources: [PointPrimitiveCollectionFS]
+ }), this._sp = ShaderProgram.replaceCache({
+ context: l,
+ shaderProgram: this._sp,
+ vertexShaderSource: _,
+ fragmentShaderSource: y,
+ attributeLocations: attributeLocations$2
+ }), y = new ShaderSource({
+ defines: ["TRANSLUCENT"],
+ sources: [PointPrimitiveCollectionFS]
+ }), this._spTranslucent = ShaderProgram.replaceCache({
+ context: l,
+ shaderProgram: this._spTranslucent,
+ vertexShaderSource: _,
+ fragmentShaderSource: y,
+ attributeLocations: attributeLocations$2
+ })), this._blendOption === BlendOption$1.OPAQUE && (y = new ShaderSource({
+ sources: [PointPrimitiveCollectionFS]
+ }), this._sp = ShaderProgram.replaceCache({
+ context: l,
+ shaderProgram: this._sp,
+ vertexShaderSource: _,
+ fragmentShaderSource: y,
+ attributeLocations: attributeLocations$2
+ })), this._blendOption === BlendOption$1.TRANSLUCENT && (y = new ShaderSource({
+ sources: [PointPrimitiveCollectionFS]
+ }), this._spTranslucent = ShaderProgram.replaceCache({
+ context: l,
+ shaderProgram: this._spTranslucent,
+ vertexShaderSource: _,
+ fragmentShaderSource: y,
+ attributeLocations: attributeLocations$2
+ })), this._compiledShaderScaleByDistance = this._shaderScaleByDistance, this._compiledShaderTranslucencyByDistance = this._shaderTranslucencyByDistance, this._compiledShaderDistanceDisplayCondition = this._shaderDistanceDisplayCondition, this._compiledShaderDisableDepthDistance = this._shaderDisableDepthDistance);
+ let C, T, x, b;
+ const S = e.commandList;
+ if (d.render || f) {
+ const E = this._colorCommands, A = this._blendOption === BlendOption$1.OPAQUE, D = this._blendOption === BlendOption$1.OPAQUE_AND_TRANSLUCENT;
+ C = this._vaf.va, T = C.length, E.length = T;
+ const P = D ? T * 2 : T;
+ for (b = 0; b < P; ++b) {
+ const I = A || D && b % 2 === 0;
+ x = E[b], defined(x) || (x = E[b] = new DrawCommand()), x.primitiveType = PrimitiveType$1.POINTS, x.pass = I || !D ? Pass$1.OPAQUE : Pass$1.TRANSLUCENT, x.owner = this;
+ const M = D ? Math.floor(b / 2) : b;
+ x.boundingVolume = h, x.modelMatrix = p, x.shaderProgram = I ? this._sp : this._spTranslucent, x.uniformMap = this._uniforms, x.vertexArray = C[M].va, x.renderState = I ? this._rsOpaque : this._rsTranslucent, x.debugShowBoundingVolume = this.debugShowBoundingVolume, x.pickId = "v_pickColor", S.push(x);
+ }
+ }
+};
+PointPrimitiveCollection.prototype.isDestroyed = function() {
+ return !1;
+};
+PointPrimitiveCollection.prototype.destroy = function() {
+ return this._sp = this._sp && this._sp.destroy(), this._spTranslucent = this._spTranslucent && this._spTranslucent.destroy(), this._spPick = this._spPick && this._spPick.destroy(), this._vaf = this._vaf && this._vaf.destroy(), destroyPointPrimitives(this._pointPrimitives), destroyObject(this);
+};
+const ARRAY_TYPES = [
+ Int8Array,
+ Uint8Array,
+ Uint8ClampedArray,
+ Int16Array,
+ Uint16Array,
+ Int32Array,
+ Uint32Array,
+ Float32Array,
+ Float64Array
+], VERSION = 1, HEADER_SIZE = 8;
+class KDBush {
+ /**
+ * Creates an index from raw `ArrayBuffer` data.
+ * @param {ArrayBuffer} data
+ */
+ static from(t) {
+ if (!(t instanceof ArrayBuffer))
+ throw new Error("Data must be an instance of ArrayBuffer.");
+ const [n, i] = new Uint8Array(t, 0, 2);
+ if (n !== 219)
+ throw new Error("Data does not appear to be in a KDBush format.");
+ const r = i >> 4;
+ if (r !== VERSION)
+ throw new Error(`Got v${r} data when expected v${VERSION}.`);
+ const o = ARRAY_TYPES[i & 15];
+ if (!o)
+ throw new Error("Unrecognized array type.");
+ const [s] = new Uint16Array(t, 2, 1), [c] = new Uint32Array(t, 4, 1);
+ return new KDBush(c, s, o, t);
+ }
+ /**
+ * Creates an index that will hold a given number of items.
+ * @param {number} numItems
+ * @param {number} [nodeSize=64] Size of the KD-tree node (64 by default).
+ * @param {TypedArrayConstructor} [ArrayType=Float64Array] The array type used for coordinates storage (`Float64Array` by default).
+ * @param {ArrayBuffer} [data] (For internal use only)
+ */
+ constructor(t, n = 64, i = Float64Array, r) {
+ if (isNaN(t) || t < 0) throw new Error(`Unpexpected numItems value: ${t}.`);
+ this.numItems = +t, this.nodeSize = Math.min(Math.max(+n, 2), 65535), this.ArrayType = i, this.IndexArrayType = t < 65536 ? Uint16Array : Uint32Array;
+ const o = ARRAY_TYPES.indexOf(this.ArrayType), s = t * 2 * this.ArrayType.BYTES_PER_ELEMENT, c = t * this.IndexArrayType.BYTES_PER_ELEMENT, l = (8 - c % 8) % 8;
+ if (o < 0)
+ throw new Error(`Unexpected typed array class: ${i}.`);
+ r && r instanceof ArrayBuffer ? (this.data = r, this.ids = new this.IndexArrayType(this.data, HEADER_SIZE, t), this.coords = new this.ArrayType(this.data, HEADER_SIZE + c + l, t * 2), this._pos = t * 2, this._finished = !0) : (this.data = new ArrayBuffer(HEADER_SIZE + s + c + l), this.ids = new this.IndexArrayType(this.data, HEADER_SIZE, t), this.coords = new this.ArrayType(this.data, HEADER_SIZE + c + l, t * 2), this._pos = 0, this._finished = !1, new Uint8Array(this.data, 0, 2).set([219, (VERSION << 4) + o]), new Uint16Array(this.data, 2, 1)[0] = n, new Uint32Array(this.data, 4, 1)[0] = t);
+ }
+ /**
+ * Add a point to the index.
+ * @param {number} x
+ * @param {number} y
+ * @returns {number} An incremental index associated with the added item (starting from `0`).
+ */
+ add(t, n) {
+ const i = this._pos >> 1;
+ return this.ids[i] = i, this.coords[this._pos++] = t, this.coords[this._pos++] = n, i;
+ }
+ /**
+ * Perform indexing of the added points.
+ */
+ finish() {
+ const t = this._pos >> 1;
+ if (t !== this.numItems)
+ throw new Error(`Added ${t} items when expected ${this.numItems}.`);
+ return sort$1(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0), this._finished = !0, this;
+ }
+ /**
+ * Search the index for items within a given bounding box.
+ * @param {number} minX
+ * @param {number} minY
+ * @param {number} maxX
+ * @param {number} maxY
+ * @returns {number[]} An array of indices correponding to the found items.
+ */
+ range(t, n, i, r) {
+ if (!this._finished) throw new Error("Data not yet indexed - call index.finish().");
+ const { ids: o, coords: s, nodeSize: c } = this, l = [0, o.length - 1, 0], d = [];
+ for (; l.length; ) {
+ const f = l.pop() || 0, h = l.pop() || 0, p = l.pop() || 0;
+ if (h - p <= c) {
+ for (let C = p; C <= h; C++) {
+ const T = s[2 * C], x = s[2 * C + 1];
+ T >= t && T <= i && x >= n && x <= r && d.push(o[C]);
+ }
+ continue;
+ }
+ const m = p + h >> 1, _ = s[2 * m], y = s[2 * m + 1];
+ _ >= t && _ <= i && y >= n && y <= r && d.push(o[m]), (f === 0 ? t <= _ : n <= y) && (l.push(p), l.push(m - 1), l.push(1 - f)), (f === 0 ? i >= _ : r >= y) && (l.push(m + 1), l.push(h), l.push(1 - f));
+ }
+ return d;
+ }
+ /**
+ * Search the index for items within a given radius.
+ * @param {number} qx
+ * @param {number} qy
+ * @param {number} r Query radius.
+ * @returns {number[]} An array of indices correponding to the found items.
+ */
+ within(t, n, i) {
+ if (!this._finished) throw new Error("Data not yet indexed - call index.finish().");
+ const { ids: r, coords: o, nodeSize: s } = this, c = [0, r.length - 1, 0], l = [], d = i * i;
+ for (; c.length; ) {
+ const f = c.pop() || 0, h = c.pop() || 0, p = c.pop() || 0;
+ if (h - p <= s) {
+ for (let C = p; C <= h; C++)
+ sqDist(o[2 * C], o[2 * C + 1], t, n) <= d && l.push(r[C]);
+ continue;
+ }
+ const m = p + h >> 1, _ = o[2 * m], y = o[2 * m + 1];
+ sqDist(_, y, t, n) <= d && l.push(r[m]), (f === 0 ? t - i <= _ : n - i <= y) && (c.push(p), c.push(m - 1), c.push(1 - f)), (f === 0 ? t + i >= _ : n + i >= y) && (c.push(m + 1), c.push(h), c.push(1 - f));
+ }
+ return l;
+ }
+}
+function sort$1(e, t, n, i, r, o) {
+ if (r - i <= n) return;
+ const s = i + r >> 1;
+ select(e, t, s, i, r, o), sort$1(e, t, n, i, s - 1, 1 - o), sort$1(e, t, n, s + 1, r, 1 - o);
+}
+function select(e, t, n, i, r, o) {
+ for (; r > i; ) {
+ if (r - i > 600) {
+ const d = r - i + 1, f = n - i + 1, h = Math.log(d), p = 0.5 * Math.exp(2 * h / 3), m = 0.5 * Math.sqrt(h * p * (d - p) / d) * (f - d / 2 < 0 ? -1 : 1), _ = Math.max(i, Math.floor(n - f * p / d + m)), y = Math.min(r, Math.floor(n + (d - f) * p / d + m));
+ select(e, t, n, _, y, o);
+ }
+ const s = t[2 * n + o];
+ let c = i, l = r;
+ for (swapItem(e, t, i, n), t[2 * r + o] > s && swapItem(e, t, i, r); c < l; ) {
+ for (swapItem(e, t, c, l), c++, l--; t[2 * c + o] < s; ) c++;
+ for (; t[2 * l + o] > s; ) l--;
+ }
+ t[2 * i + o] === s ? swapItem(e, t, i, l) : (l++, swapItem(e, t, l, r)), l <= n && (i = l + 1), n <= l && (r = l - 1);
+ }
+}
+function swapItem(e, t, n, i) {
+ swap$2(e, n, i), swap$2(t, 2 * n, 2 * i), swap$2(t, 2 * n + 1, 2 * i + 1);
+}
+function swap$2(e, t, n) {
+ const i = e[t];
+ e[t] = e[n], e[n] = i;
+}
+function sqDist(e, t, n, i) {
+ const r = e - n, o = t - i;
+ return r * r + o * o;
+}
+function EntityCluster(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._enabled = defaultValue(e.enabled, !1), this._pixelRange = defaultValue(e.pixelRange, 80), this._minimumClusterSize = defaultValue(e.minimumClusterSize, 2), this._clusterBillboards = defaultValue(e.clusterBillboards, !0), this._clusterLabels = defaultValue(e.clusterLabels, !0), this._clusterPoints = defaultValue(e.clusterPoints, !0), this._labelCollection = void 0, this._billboardCollection = void 0, this._pointCollection = void 0, this._clusterBillboardCollection = void 0, this._clusterLabelCollection = void 0, this._clusterPointCollection = void 0, this._collectionIndicesByEntity = {}, this._unusedLabelIndices = [], this._unusedBillboardIndices = [], this._unusedPointIndices = [], this._previousClusters = [], this._previousHeight = void 0, this._enabledDirty = !1, this._clusterDirty = !1, this._cluster = void 0, this._removeEventListener = void 0, this._clusterEvent = new Event(), this.show = defaultValue(e.show, !0);
+}
+function expandBoundingBox(e, t) {
+ e.x -= t, e.y -= t, e.width += t * 2, e.height += t * 2;
+}
+const labelBoundingBoxScratch = new BoundingRectangle();
+function getBoundingBox(e, t, n, i, r) {
+ if (defined(e._labelCollection) && i._clusterLabels ? r = Label.getScreenSpaceBoundingBox(e, t, r) : defined(e._billboardCollection) && i._clusterBillboards ? r = Billboard.getScreenSpaceBoundingBox(e, t, r) : defined(e._pointPrimitiveCollection) && i._clusterPoints && (r = PointPrimitive.getScreenSpaceBoundingBox(e, t, r)), expandBoundingBox(r, n), i._clusterLabels && !defined(e._labelCollection) && defined(e.id) && hasLabelIndex(i, e.id.id) && defined(e.id._label)) {
+ const o = i._collectionIndicesByEntity[e.id.id].labelIndex, s = i._labelCollection.get(o), c = Label.getScreenSpaceBoundingBox(
+ s,
+ t,
+ labelBoundingBoxScratch
+ );
+ expandBoundingBox(c, n), r = BoundingRectangle.union(r, c, r);
+ }
+ return r;
+}
+function addNonClusteredItem(e, t) {
+ if (e.clusterShow = !0, !defined(e._labelCollection) && defined(e.id) && hasLabelIndex(t, e.id.id) && defined(e.id._label)) {
+ const n = t._collectionIndicesByEntity[e.id.id].labelIndex, i = t._labelCollection.get(n);
+ i.clusterShow = !0;
+ }
+}
+function addCluster(e, t, n, i) {
+ const r = {
+ billboard: i._clusterBillboardCollection.add(),
+ label: i._clusterLabelCollection.add(),
+ point: i._clusterPointCollection.add()
+ };
+ r.billboard.show = !1, r.point.show = !1, r.label.show = !0, r.label.text = t.toLocaleString(), r.label.id = n, r.billboard.position = r.label.position = r.point.position = e, i._clusterEvent.raiseEvent(n, r);
+}
+function hasLabelIndex(e, t) {
+ return defined(e) && defined(e._collectionIndicesByEntity[t]) && defined(e._collectionIndicesByEntity[t].labelIndex);
+}
+function getScreenSpacePositions(e, t, n, i, r) {
+ if (!defined(e))
+ return;
+ const o = e.length;
+ for (let s = 0; s < o; ++s) {
+ const c = e.get(s);
+ if (c.clusterShow = !1, !c.show || r._scene.mode === SceneMode$1.SCENE3D && !i.isPointVisible(c.position))
+ continue;
+ const l = r._clusterLabels && defined(c._labelCollection), d = r._clusterBillboards && defined(c.id._billboard), f = r._clusterPoints && defined(c.id._point);
+ if (l && (f || d))
+ continue;
+ const h = c.computeScreenSpacePosition(n);
+ defined(h) && t.push({
+ index: s,
+ collection: e,
+ clustered: !1,
+ coord: h
+ });
+ }
+}
+const pointBoundinRectangleScratch = new BoundingRectangle(), totalBoundingRectangleScratch = new BoundingRectangle(), neighborBoundingRectangleScratch = new BoundingRectangle();
+function createDeclutterCallback(e) {
+ return function(t) {
+ if (defined(t) && t < 0.05 || !e.enabled)
+ return;
+ const n = e._scene, i = e._labelCollection, r = e._billboardCollection, o = e._pointCollection;
+ if (!defined(i) && !defined(r) && !defined(o) || !e._clusterBillboards && !e._clusterLabels && !e._clusterPoints)
+ return;
+ let s = e._clusterLabelCollection, c = e._clusterBillboardCollection, l = e._clusterPointCollection;
+ defined(s) ? s.removeAll() : s = e._clusterLabelCollection = new LabelCollection(
+ {
+ scene: n
+ }
+ ), defined(c) ? c.removeAll() : c = e._clusterBillboardCollection = new BillboardCollection(
+ {
+ scene: n
+ }
+ ), defined(l) ? l.removeAll() : l = e._clusterPointCollection = new PointPrimitiveCollection();
+ const d = e._pixelRange, f = e._minimumClusterSize, h = e._previousClusters, p = [], m = e._previousHeight, _ = n.camera.positionCartographic.height, y = n.ellipsoid, C = n.camera.positionWC, T = new EllipsoidalOccluder(y, C), x = [];
+ e._clusterLabels && getScreenSpacePositions(
+ i,
+ x,
+ n,
+ T,
+ e
+ ), e._clusterBillboards && getScreenSpacePositions(
+ r,
+ x,
+ n,
+ T,
+ e
+ ), e._clusterPoints && getScreenSpacePositions(
+ o,
+ x,
+ n,
+ T,
+ e
+ );
+ let b, S, E, A, D, P, I, M, R, L, g, w;
+ if (x.length > 0) {
+ const O = new KDBush(x.length, 64, Uint32Array);
+ for (let N = 0; N < x.length; ++N)
+ O.add(x[N].coord.x, x[N].coord.y);
+ if (O.finish(), _ < m)
+ for (E = h.length, b = 0; b < E; ++b) {
+ const N = h[b];
+ if (!T.isPointVisible(N.position))
+ continue;
+ const F = Billboard._computeScreenSpacePosition(
+ Matrix4.IDENTITY,
+ N.position,
+ Cartesian3.ZERO,
+ Cartesian2.ZERO,
+ n
+ );
+ if (!defined(F))
+ continue;
+ const B = 1 - _ / m;
+ let V = N.width = N.width * B, U = N.height = N.height * B;
+ V = Math.max(V, N.minimumWidth), U = Math.max(U, N.minimumHeight);
+ const k = F.x - V * 0.5, $ = F.y - U * 0.5, G = F.x + V, q = F.y + U;
+ for (D = O.range(k, $, G, q), P = D.length, L = 0, R = [], S = 0; S < P; ++S)
+ I = D[S], M = x[I], M.clustered || (++L, g = M.collection, w = M.index, R.push(g.get(w).id));
+ if (L >= f)
+ for (addCluster(N.position, L, R, e), p.push(N), S = 0; S < P; ++S)
+ x[D[S]].clustered = !0;
+ }
+ for (E = x.length, b = 0; b < E; ++b) {
+ const N = x[b];
+ if (N.clustered)
+ continue;
+ N.clustered = !0, g = N.collection, w = N.index;
+ const F = g.get(w);
+ A = getBoundingBox(
+ F,
+ N.coord,
+ d,
+ e,
+ pointBoundinRectangleScratch
+ );
+ const B = BoundingRectangle.clone(
+ A,
+ totalBoundingRectangleScratch
+ );
+ D = O.range(
+ A.x,
+ A.y,
+ A.x + A.width,
+ A.y + A.height
+ ), P = D.length;
+ const V = Cartesian3.clone(F.position);
+ for (L = 1, R = [F.id], S = 0; S < P; ++S)
+ if (I = D[S], M = x[I], !M.clustered) {
+ const U = M.collection.get(
+ M.index
+ ), k = getBoundingBox(
+ U,
+ M.coord,
+ d,
+ e,
+ neighborBoundingRectangleScratch
+ );
+ Cartesian3.add(
+ U.position,
+ V,
+ V
+ ), BoundingRectangle.union(B, k, B), ++L, R.push(U.id);
+ }
+ if (L >= f) {
+ const U = Cartesian3.multiplyByScalar(
+ V,
+ 1 / L,
+ V
+ );
+ for (addCluster(U, L, R, e), p.push({
+ position: U,
+ width: B.width,
+ height: B.height,
+ minimumWidth: A.width,
+ minimumHeight: A.height
+ }), S = 0; S < P; ++S)
+ x[D[S]].clustered = !0;
+ } else
+ addNonClusteredItem(F, e);
+ }
+ }
+ s.length === 0 && (s.destroy(), e._clusterLabelCollection = void 0), c.length === 0 && (c.destroy(), e._clusterBillboardCollection = void 0), l.length === 0 && (l.destroy(), e._clusterPointCollection = void 0), e._previousClusters = p, e._previousHeight = _;
+ };
+}
+EntityCluster.prototype._initialize = function(e) {
+ this._scene = e;
+ const t = createDeclutterCallback(this);
+ this._cluster = t, this._removeEventListener = e.camera.changed.addEventListener(t);
+};
+Object.defineProperties(EntityCluster.prototype, {
+ /**
+ * Gets or sets whether clustering is enabled.
+ * @memberof EntityCluster.prototype
+ * @type {boolean}
+ */
+ enabled: {
+ get: function() {
+ return this._enabled;
+ },
+ set: function(e) {
+ this._enabledDirty = e !== this._enabled, this._enabled = e;
+ }
+ },
+ /**
+ * Gets or sets the pixel range to extend the screen space bounding box.
+ * @memberof EntityCluster.prototype
+ * @type {number}
+ */
+ pixelRange: {
+ get: function() {
+ return this._pixelRange;
+ },
+ set: function(e) {
+ this._clusterDirty = this._clusterDirty || e !== this._pixelRange, this._pixelRange = e;
+ }
+ },
+ /**
+ * Gets or sets the minimum number of screen space objects that can be clustered.
+ * @memberof EntityCluster.prototype
+ * @type {number}
+ */
+ minimumClusterSize: {
+ get: function() {
+ return this._minimumClusterSize;
+ },
+ set: function(e) {
+ this._clusterDirty = this._clusterDirty || e !== this._minimumClusterSize, this._minimumClusterSize = e;
+ }
+ },
+ /**
+ * Gets the event that will be raised when a new cluster will be displayed. The signature of the event listener is {@link EntityCluster.newClusterCallback}.
+ * @memberof EntityCluster.prototype
+ * @type {EventsetInterpolationOptions to set this.
+ * @memberof SampledPositionProperty.prototype
+ *
+ * @type {number}
+ * @default 1
+ * @readonly
+ */
+ interpolationDegree: {
+ get: function() {
+ return this._property.interpolationDegree;
+ }
+ },
+ /**
+ * Gets the interpolation algorithm to use when retrieving a value. Call setInterpolationOptions to set this.
+ * @memberof SampledPositionProperty.prototype
+ *
+ * @type {InterpolationAlgorithm}
+ * @default LinearApproximation
+ * @readonly
+ */
+ interpolationAlgorithm: {
+ get: function() {
+ return this._property.interpolationAlgorithm;
+ }
+ },
+ /**
+ * The number of derivatives contained by this property; i.e. 0 for just position, 1 for velocity, etc.
+ * @memberof SampledPositionProperty.prototype
+ *
+ * @type {number}
+ * @default 0
+ */
+ numberOfDerivatives: {
+ get: function() {
+ return this._numberOfDerivatives;
+ }
+ },
+ /**
+ * Gets or sets the type of extrapolation to perform when a value
+ * is requested at a time after any available samples.
+ * @memberof SampledPositionProperty.prototype
+ * @type {ExtrapolationType}
+ * @default ExtrapolationType.NONE
+ */
+ forwardExtrapolationType: {
+ get: function() {
+ return this._property.forwardExtrapolationType;
+ },
+ set: function(e) {
+ this._property.forwardExtrapolationType = e;
+ }
+ },
+ /**
+ * Gets or sets the amount of time to extrapolate forward before
+ * the property becomes undefined. A value of 0 will extrapolate forever.
+ * @memberof SampledPositionProperty.prototype
+ * @type {number}
+ * @default 0
+ */
+ forwardExtrapolationDuration: {
+ get: function() {
+ return this._property.forwardExtrapolationDuration;
+ },
+ set: function(e) {
+ this._property.forwardExtrapolationDuration = e;
+ }
+ },
+ /**
+ * Gets or sets the type of extrapolation to perform when a value
+ * is requested at a time before any available samples.
+ * @memberof SampledPositionProperty.prototype
+ * @type {ExtrapolationType}
+ * @default ExtrapolationType.NONE
+ */
+ backwardExtrapolationType: {
+ get: function() {
+ return this._property.backwardExtrapolationType;
+ },
+ set: function(e) {
+ this._property.backwardExtrapolationType = e;
+ }
+ },
+ /**
+ * Gets or sets the amount of time to extrapolate backward
+ * before the property becomes undefined. A value of 0 will extrapolate forever.
+ * @memberof SampledPositionProperty.prototype
+ * @type {number}
+ * @default 0
+ */
+ backwardExtrapolationDuration: {
+ get: function() {
+ return this._property.backwardExtrapolationDuration;
+ },
+ set: function(e) {
+ this._property.backwardExtrapolationDuration = e;
+ }
+ }
+});
+const timeScratch$6 = new JulianDate();
+SampledPositionProperty.prototype.getValue = function(e, t) {
+ return defined(e) || (e = JulianDate.now(timeScratch$6)), this.getValueInReferenceFrame(e, ReferenceFrame$1.FIXED, t);
+};
+SampledPositionProperty.prototype.getValueInReferenceFrame = function(e, t, n) {
+ if (n = this._property.getValue(e, n), defined(n))
+ return PositionProperty.convertToReferenceFrame(
+ e,
+ n,
+ this._referenceFrame,
+ t,
+ n
+ );
+};
+SampledPositionProperty.prototype.setInterpolationOptions = function(e) {
+ this._property.setInterpolationOptions(e);
+};
+SampledPositionProperty.prototype.addSample = function(e, t, n) {
+ this._numberOfDerivatives, this._property.addSample(e, t, n);
+};
+SampledPositionProperty.prototype.addSamples = function(e, t, n) {
+ this._property.addSamples(e, t, n);
+};
+SampledPositionProperty.prototype.addSamplesPackedArray = function(e, t) {
+ this._property.addSamplesPackedArray(e, t);
+};
+SampledPositionProperty.prototype.removeSample = function(e) {
+ return this._property.removeSample(e);
+};
+SampledPositionProperty.prototype.removeSamples = function(e) {
+ this._property.removeSamples(e);
+};
+SampledPositionProperty.prototype.equals = function(e) {
+ return this === e || //
+ e instanceof SampledPositionProperty && Property.equals(this._property, e._property) && //
+ this._referenceFrame === e._referenceFrame;
+};
+const StripeOrientation = {
+ /**
+ * Horizontal orientation.
+ * @type {number}
+ */
+ HORIZONTAL: 0,
+ /**
+ * Vertical orientation.
+ * @type {number}
+ */
+ VERTICAL: 1
+}, StripeOrientation$1 = Object.freeze(StripeOrientation), defaultOrientation = StripeOrientation$1.HORIZONTAL, defaultEvenColor = Color.WHITE, defaultOddColor = Color.BLACK, defaultOffset$7 = 0, defaultRepeat = 1;
+function StripeMaterialProperty(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._definitionChanged = new Event(), this._orientation = void 0, this._orientationSubscription = void 0, this._evenColor = void 0, this._evenColorSubscription = void 0, this._oddColor = void 0, this._oddColorSubscription = void 0, this._offset = void 0, this._offsetSubscription = void 0, this._repeat = void 0, this._repeatSubscription = void 0, this.orientation = e.orientation, this.evenColor = e.evenColor, this.oddColor = e.oddColor, this.offset = e.offset, this.repeat = e.repeat;
+}
+Object.defineProperties(StripeMaterialProperty.prototype, {
+ /**
+ * Gets a value indicating if this property is constant. A property is considered
+ * constant if getValue always returns the same result for the current definition.
+ * @memberof StripeMaterialProperty.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ */
+ isConstant: {
+ get: function() {
+ return Property.isConstant(this._orientation) && //
+ Property.isConstant(this._evenColor) && //
+ Property.isConstant(this._oddColor) && //
+ Property.isConstant(this._offset) && //
+ Property.isConstant(this._repeat);
+ }
+ },
+ /**
+ * Gets the event that is raised whenever the definition of this property changes.
+ * The definition is considered to have changed if a call to getValue would return
+ * a different result for the same time.
+ * @memberof StripeMaterialProperty.prototype
+ *
+ * @type {Event}
+ * @readonly
+ */
+ definitionChanged: {
+ get: function() {
+ return this._definitionChanged;
+ }
+ },
+ /**
+ * Gets or sets the Property specifying the {@link StripeOrientation}/
+ * @memberof StripeMaterialProperty.prototype
+ * @type {Property|undefined}
+ * @default StripeOrientation.HORIZONTAL
+ */
+ orientation: createPropertyDescriptor("orientation"),
+ /**
+ * Gets or sets the Property specifying the first {@link Color}.
+ * @memberof StripeMaterialProperty.prototype
+ * @type {Property|undefined}
+ * @default Color.WHITE
+ */
+ evenColor: createPropertyDescriptor("evenColor"),
+ /**
+ * Gets or sets the Property specifying the second {@link Color}.
+ * @memberof StripeMaterialProperty.prototype
+ * @type {Property|undefined}
+ * @default Color.BLACK
+ */
+ oddColor: createPropertyDescriptor("oddColor"),
+ /**
+ * Gets or sets the numeric Property specifying the point into the pattern
+ * to begin drawing; with 0.0 being the beginning of the even color, 1.0 the beginning
+ * of the odd color, 2.0 being the even color again, and any multiple or fractional values
+ * being in between.
+ * @memberof StripeMaterialProperty.prototype
+ * @type {Property|undefined}
+ * @default 0.0
+ */
+ offset: createPropertyDescriptor("offset"),
+ /**
+ * Gets or sets the numeric Property specifying how many times the stripes repeat.
+ * @memberof StripeMaterialProperty.prototype
+ * @type {Property|undefined}
+ * @default 1.0
+ */
+ repeat: createPropertyDescriptor("repeat")
+});
+StripeMaterialProperty.prototype.getType = function(e) {
+ return "Stripe";
+};
+const timeScratch$5 = new JulianDate();
+StripeMaterialProperty.prototype.getValue = function(e, t) {
+ return defined(e) || (e = JulianDate.now(timeScratch$5)), defined(t) || (t = {}), t.horizontal = Property.getValueOrDefault(this._orientation, e, defaultOrientation) === StripeOrientation$1.HORIZONTAL, t.evenColor = Property.getValueOrClonedDefault(
+ this._evenColor,
+ e,
+ defaultEvenColor,
+ t.evenColor
+ ), t.oddColor = Property.getValueOrClonedDefault(
+ this._oddColor,
+ e,
+ defaultOddColor,
+ t.oddColor
+ ), t.offset = Property.getValueOrDefault(this._offset, e, defaultOffset$7), t.repeat = Property.getValueOrDefault(this._repeat, e, defaultRepeat), t;
+};
+StripeMaterialProperty.prototype.equals = function(e) {
+ return this === e || //
+ e instanceof StripeMaterialProperty && //
+ Property.equals(this._orientation, e._orientation) && //
+ Property.equals(this._evenColor, e._evenColor) && //
+ Property.equals(this._oddColor, e._oddColor) && //
+ Property.equals(this._offset, e._offset) && //
+ Property.equals(this._repeat, e._repeat);
+};
+function TimeIntervalCollectionPositionProperty(e) {
+ this._definitionChanged = new Event(), this._intervals = new TimeIntervalCollection(), this._intervals.changedEvent.addEventListener(
+ TimeIntervalCollectionPositionProperty.prototype._intervalsChanged,
+ this
+ ), this._referenceFrame = defaultValue(e, ReferenceFrame$1.FIXED);
+}
+Object.defineProperties(TimeIntervalCollectionPositionProperty.prototype, {
+ /**
+ * Gets a value indicating if this property is constant. A property is considered
+ * constant if getValue always returns the same result for the current definition.
+ * @memberof TimeIntervalCollectionPositionProperty.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ */
+ isConstant: {
+ get: function() {
+ return this._intervals.isEmpty;
+ }
+ },
+ /**
+ * Gets the event that is raised whenever the definition of this property changes.
+ * The definition is considered to have changed if a call to getValue would return
+ * a different result for the same time.
+ * @memberof TimeIntervalCollectionPositionProperty.prototype
+ *
+ * @type {Event}
+ * @readonly
+ */
+ definitionChanged: {
+ get: function() {
+ return this._definitionChanged;
+ }
+ },
+ /**
+ * Gets the interval collection.
+ * @memberof TimeIntervalCollectionPositionProperty.prototype
+ * @type {TimeIntervalCollection}
+ * @readonly
+ */
+ intervals: {
+ get: function() {
+ return this._intervals;
+ }
+ },
+ /**
+ * Gets the reference frame in which the position is defined.
+ * @memberof TimeIntervalCollectionPositionProperty.prototype
+ * @type {ReferenceFrame}
+ * @readonly
+ * @default ReferenceFrame.FIXED;
+ */
+ referenceFrame: {
+ get: function() {
+ return this._referenceFrame;
+ }
+ }
+});
+const timeScratch$4 = new JulianDate();
+TimeIntervalCollectionPositionProperty.prototype.getValue = function(e, t) {
+ return defined(e) || (e = JulianDate.now(timeScratch$4)), this.getValueInReferenceFrame(e, ReferenceFrame$1.FIXED, t);
+};
+TimeIntervalCollectionPositionProperty.prototype.getValueInReferenceFrame = function(e, t, n) {
+ const i = this._intervals.findDataForIntervalContainingDate(e);
+ if (defined(i))
+ return PositionProperty.convertToReferenceFrame(
+ e,
+ i,
+ this._referenceFrame,
+ t,
+ n
+ );
+};
+TimeIntervalCollectionPositionProperty.prototype.equals = function(e) {
+ return this === e || //
+ e instanceof TimeIntervalCollectionPositionProperty && //
+ this._intervals.equals(e._intervals, Property.equals) && //
+ this._referenceFrame === e._referenceFrame;
+};
+TimeIntervalCollectionPositionProperty.prototype._intervalsChanged = function() {
+ this._definitionChanged.raiseEvent(this);
+};
+function TimeIntervalCollectionProperty() {
+ this._definitionChanged = new Event(), this._intervals = new TimeIntervalCollection(), this._intervals.changedEvent.addEventListener(
+ TimeIntervalCollectionProperty.prototype._intervalsChanged,
+ this
+ );
+}
+Object.defineProperties(TimeIntervalCollectionProperty.prototype, {
+ /**
+ * Gets a value indicating if this property is constant. A property is considered
+ * constant if getValue always returns the same result for the current definition.
+ * @memberof TimeIntervalCollectionProperty.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ */
+ isConstant: {
+ get: function() {
+ return this._intervals.isEmpty;
+ }
+ },
+ /**
+ * Gets the event that is raised whenever the definition of this property changes.
+ * The definition is changed whenever setValue is called with data different
+ * than the current value.
+ * @memberof TimeIntervalCollectionProperty.prototype
+ *
+ * @type {Event}
+ * @readonly
+ */
+ definitionChanged: {
+ get: function() {
+ return this._definitionChanged;
+ }
+ },
+ /**
+ * Gets the interval collection.
+ * @memberof TimeIntervalCollectionProperty.prototype
+ *
+ * @type {TimeIntervalCollection}
+ * @readonly
+ */
+ intervals: {
+ get: function() {
+ return this._intervals;
+ }
+ }
+});
+const timeScratch$3 = new JulianDate();
+TimeIntervalCollectionProperty.prototype.getValue = function(e, t) {
+ defined(e) || (e = JulianDate.now(timeScratch$3));
+ const n = this._intervals.findDataForIntervalContainingDate(e);
+ return defined(n) && typeof n.clone == "function" ? n.clone(t) : n;
+};
+TimeIntervalCollectionProperty.prototype.equals = function(e) {
+ return this === e || //
+ e instanceof TimeIntervalCollectionProperty && //
+ this._intervals.equals(e._intervals, Property.equals);
+};
+TimeIntervalCollectionProperty.prototype._intervalsChanged = function() {
+ this._definitionChanged.raiseEvent(this);
+};
+function VelocityVectorProperty(e, t) {
+ this._position = void 0, this._subscription = void 0, this._definitionChanged = new Event(), this._normalize = defaultValue(t, !0), this.position = e;
+}
+Object.defineProperties(VelocityVectorProperty.prototype, {
+ /**
+ * Gets a value indicating if this property is constant.
+ * @memberof VelocityVectorProperty.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ */
+ isConstant: {
+ get: function() {
+ return Property.isConstant(this._position);
+ }
+ },
+ /**
+ * Gets the event that is raised whenever the definition of this property changes.
+ * @memberof VelocityVectorProperty.prototype
+ *
+ * @type {Event}
+ * @readonly
+ */
+ definitionChanged: {
+ get: function() {
+ return this._definitionChanged;
+ }
+ },
+ /**
+ * Gets or sets the position property used to compute the velocity vector.
+ * @memberof VelocityVectorProperty.prototype
+ *
+ * @type {Property|undefined}
+ */
+ position: {
+ get: function() {
+ return this._position;
+ },
+ set: function(e) {
+ const t = this._position;
+ t !== e && (defined(t) && this._subscription(), this._position = e, defined(e) && (this._subscription = e._definitionChanged.addEventListener(
+ function() {
+ this._definitionChanged.raiseEvent(this);
+ },
+ this
+ )), this._definitionChanged.raiseEvent(this));
+ }
+ },
+ /**
+ * Gets or sets whether the vector produced by this property
+ * will be normalized or not.
+ * @memberof VelocityVectorProperty.prototype
+ *
+ * @type {boolean}
+ */
+ normalize: {
+ get: function() {
+ return this._normalize;
+ },
+ set: function(e) {
+ this._normalize !== e && (this._normalize = e, this._definitionChanged.raiseEvent(this));
+ }
+ }
+});
+const position1Scratch = new Cartesian3(), position2Scratch = new Cartesian3(), timeScratch$2 = new JulianDate(), timeNowScratch = new JulianDate(), step = 1 / 60;
+VelocityVectorProperty.prototype.getValue = function(e, t) {
+ return this._getValue(e, t);
+};
+VelocityVectorProperty.prototype._getValue = function(e, t, n) {
+ defined(e) || (e = JulianDate.now(timeNowScratch)), defined(t) || (t = new Cartesian3());
+ const i = this._position;
+ if (Property.isConstant(i))
+ return this._normalize ? void 0 : Cartesian3.clone(Cartesian3.ZERO, t);
+ let r = i.getValue(e, position1Scratch), o = i.getValue(
+ JulianDate.addSeconds(e, step, timeScratch$2),
+ position2Scratch
+ );
+ if (!defined(r) || !defined(o) && (o = r, r = i.getValue(
+ JulianDate.addSeconds(e, -step, timeScratch$2),
+ position2Scratch
+ ), !defined(r)))
+ return;
+ if (Cartesian3.equals(r, o))
+ return this._normalize ? void 0 : Cartesian3.clone(Cartesian3.ZERO, t);
+ defined(n) && r.clone(n);
+ const s = Cartesian3.subtract(o, r, t);
+ return this._normalize ? Cartesian3.normalize(s, t) : Cartesian3.divideByScalar(s, step, t);
+};
+VelocityVectorProperty.prototype.equals = function(e) {
+ return this === e || //
+ e instanceof VelocityVectorProperty && Property.equals(this._position, e._position);
+};
+function VelocityOrientationProperty(e, t) {
+ this._velocityVectorProperty = new VelocityVectorProperty(e, !0), this._subscription = void 0, this._ellipsoid = void 0, this._definitionChanged = new Event(), this.ellipsoid = defaultValue(t, Ellipsoid.default);
+ const n = this;
+ this._velocityVectorProperty.definitionChanged.addEventListener(function() {
+ n._definitionChanged.raiseEvent(n);
+ });
+}
+Object.defineProperties(VelocityOrientationProperty.prototype, {
+ /**
+ * Gets a value indicating if this property is constant.
+ * @memberof VelocityOrientationProperty.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ */
+ isConstant: {
+ get: function() {
+ return Property.isConstant(this._velocityVectorProperty);
+ }
+ },
+ /**
+ * Gets the event that is raised whenever the definition of this property changes.
+ * @memberof VelocityOrientationProperty.prototype
+ *
+ * @type {Event}
+ * @readonly
+ */
+ definitionChanged: {
+ get: function() {
+ return this._definitionChanged;
+ }
+ },
+ /**
+ * Gets or sets the position property used to compute orientation.
+ * @memberof VelocityOrientationProperty.prototype
+ *
+ * @type {Property|undefined}
+ */
+ position: {
+ get: function() {
+ return this._velocityVectorProperty.position;
+ },
+ set: function(e) {
+ this._velocityVectorProperty.position = e;
+ }
+ },
+ /**
+ * Gets or sets the ellipsoid used to determine which way is up.
+ * @memberof VelocityOrientationProperty.prototype
+ *
+ * @type {Property|undefined}
+ */
+ ellipsoid: {
+ get: function() {
+ return this._ellipsoid;
+ },
+ set: function(e) {
+ this._ellipsoid !== e && (this._ellipsoid = e, this._definitionChanged.raiseEvent(this));
+ }
+ }
+});
+const positionScratch$4 = new Cartesian3(), velocityScratch = new Cartesian3(), rotationScratch$1 = new Matrix3(), timeScratch$1 = new JulianDate();
+VelocityOrientationProperty.prototype.getValue = function(e, t) {
+ defined(e) || (e = JulianDate.now(timeScratch$1));
+ const n = this._velocityVectorProperty._getValue(
+ e,
+ velocityScratch,
+ positionScratch$4
+ );
+ if (defined(n))
+ return Transforms.rotationMatrixFromPositionVelocity(
+ positionScratch$4,
+ n,
+ this._ellipsoid,
+ rotationScratch$1
+ ), Quaternion.fromRotationMatrix(rotationScratch$1, t);
+};
+VelocityOrientationProperty.prototype.equals = function(e) {
+ return this === e || //
+ e instanceof VelocityOrientationProperty && Property.equals(
+ this._velocityVectorProperty,
+ e._velocityVectorProperty
+ ) && (this._ellipsoid === e._ellipsoid || this._ellipsoid.equals(e._ellipsoid));
+};
+const SensorVolumePortionToDisplay = {
+ /**
+ * 0x0000. Display the complete sensor volume.
+ *
+ * @type {Number}
+ * @constant
+ */
+ COMPLETE: 0,
+ /**
+ * 0x0001. Display the portion of the sensor volume that lies below the true horizon of the ellipsoid.
+ *
+ * @type {Number}
+ * @constant
+ */
+ BELOW_ELLIPSOID_HORIZON: 1,
+ /**
+ * 0x0002. Display the portion of the sensor volume that lies above the true horizon of the ellipsoid.
+ *
+ * @type {Number}
+ * @constant
+ */
+ ABOVE_ELLIPSOID_HORIZON: 2
+};
+SensorVolumePortionToDisplay.validate = function(e) {
+ return e === SensorVolumePortionToDisplay.COMPLETE || e === SensorVolumePortionToDisplay.BELOW_ELLIPSOID_HORIZON || e === SensorVolumePortionToDisplay.ABOVE_ELLIPSOID_HORIZON;
+};
+SensorVolumePortionToDisplay.toString = function(e) {
+ switch (e) {
+ case SensorVolumePortionToDisplay.COMPLETE:
+ return "COMPLETE";
+ case SensorVolumePortionToDisplay.BELOW_ELLIPSOID_HORIZON:
+ return "BELOW_ELLIPSOID_HORIZON";
+ case SensorVolumePortionToDisplay.ABOVE_ELLIPSOID_HORIZON:
+ return "ABOVE_ELLIPSOID_HORIZON";
+ default:
+ throw new DeveloperError(
+ "SensorVolumePortionToDisplay value is not valid and cannot be converted to a String."
+ );
+ }
+};
+function UnitCartesian3() {
+}
+UnitCartesian3.packedLength = Cartesian3.packedLength;
+UnitCartesian3.unpack = Cartesian3.unpack;
+UnitCartesian3.pack = Cartesian3.pack;
+let currentId;
+function createReferenceProperty(e, t) {
+ return t[0] === "#" && (t = currentId + t), ReferenceProperty.fromString(e, t);
+}
+function createSpecializedProperty(e, t, n) {
+ if (defined(n.reference))
+ return createReferenceProperty(t, n.reference);
+ if (defined(n.velocityReference)) {
+ const i = createReferenceProperty(
+ t,
+ n.velocityReference
+ );
+ switch (e) {
+ case Cartesian3:
+ case UnitCartesian3:
+ return new VelocityVectorProperty(
+ i,
+ e === UnitCartesian3
+ );
+ case Quaternion:
+ return new VelocityOrientationProperty(i);
+ }
+ }
+ throw new RuntimeError(`${JSON.stringify(n)} is not valid CZML.`);
+}
+function createAdapterProperty(e, t) {
+ return new CallbackProperty(function(n, i) {
+ return t(e.getValue(n, i));
+ }, e.isConstant);
+}
+const scratchCartesian$4 = new Cartesian3(), scratchSpherical = new Spherical(), scratchCartographic$a = new Cartographic(), scratchTimeInterval$1 = new TimeInterval(), scratchQuaternion = new Quaternion();
+function unwrapColorInterval(e) {
+ let t = e.rgbaf;
+ if (defined(t))
+ return t;
+ const n = e.rgba;
+ if (!defined(n))
+ return;
+ const i = n.length;
+ if (i === Color.packedLength)
+ return [
+ Color.byteToFloat(n[0]),
+ Color.byteToFloat(n[1]),
+ Color.byteToFloat(n[2]),
+ Color.byteToFloat(n[3])
+ ];
+ t = new Array(i);
+ for (let r = 0; r < i; r += 5)
+ t[r] = n[r], t[r + 1] = Color.byteToFloat(n[r + 1]), t[r + 2] = Color.byteToFloat(n[r + 2]), t[r + 3] = Color.byteToFloat(n[r + 3]), t[r + 4] = Color.byteToFloat(n[r + 4]);
+ return t;
+}
+function unwrapUriInterval(e, t) {
+ const n = defaultValue(e.uri, e);
+ return defined(t) ? t.getDerivedResource({
+ url: n
+ }) : Resource.createIfNeeded(n);
+}
+function unwrapRectangleInterval(e) {
+ let t = e.wsen;
+ if (defined(t))
+ return t;
+ const n = e.wsenDegrees;
+ if (!defined(n))
+ return;
+ const i = n.length;
+ if (i === Rectangle.packedLength)
+ return [
+ CesiumMath.toRadians(n[0]),
+ CesiumMath.toRadians(n[1]),
+ CesiumMath.toRadians(n[2]),
+ CesiumMath.toRadians(n[3])
+ ];
+ t = new Array(i);
+ for (let r = 0; r < i; r += 5)
+ t[r] = n[r], t[r + 1] = CesiumMath.toRadians(n[r + 1]), t[r + 2] = CesiumMath.toRadians(n[r + 2]), t[r + 3] = CesiumMath.toRadians(n[r + 3]), t[r + 4] = CesiumMath.toRadians(n[r + 4]);
+ return t;
+}
+function convertUnitSphericalToCartesian(e) {
+ const t = e.length;
+ if (scratchSpherical.magnitude = 1, t === 2)
+ return scratchSpherical.clock = e[0], scratchSpherical.cone = e[1], Cartesian3.fromSpherical(scratchSpherical, scratchCartesian$4), [scratchCartesian$4.x, scratchCartesian$4.y, scratchCartesian$4.z];
+ const n = new Array(t / 3 * 4);
+ for (let i = 0, r = 0; i < t; i += 3, r += 4)
+ n[r] = e[i], scratchSpherical.clock = e[i + 1], scratchSpherical.cone = e[i + 2], Cartesian3.fromSpherical(scratchSpherical, scratchCartesian$4), n[r + 1] = scratchCartesian$4.x, n[r + 2] = scratchCartesian$4.y, n[r + 3] = scratchCartesian$4.z;
+ return n;
+}
+function convertSphericalToCartesian(e) {
+ const t = e.length;
+ if (t === 3)
+ return scratchSpherical.clock = e[0], scratchSpherical.cone = e[1], scratchSpherical.magnitude = e[2], Cartesian3.fromSpherical(scratchSpherical, scratchCartesian$4), [scratchCartesian$4.x, scratchCartesian$4.y, scratchCartesian$4.z];
+ const n = new Array(t);
+ for (let i = 0; i < t; i += 4)
+ n[i] = e[i], scratchSpherical.clock = e[i + 1], scratchSpherical.cone = e[i + 2], scratchSpherical.magnitude = e[i + 3], Cartesian3.fromSpherical(scratchSpherical, scratchCartesian$4), n[i + 1] = scratchCartesian$4.x, n[i + 2] = scratchCartesian$4.y, n[i + 3] = scratchCartesian$4.z;
+ return n;
+}
+function convertCartographicRadiansToCartesian(e) {
+ const t = e.length;
+ if (t === 3)
+ return scratchCartographic$a.longitude = e[0], scratchCartographic$a.latitude = e[1], scratchCartographic$a.height = e[2], Ellipsoid.default.cartographicToCartesian(
+ scratchCartographic$a,
+ scratchCartesian$4
+ ), [scratchCartesian$4.x, scratchCartesian$4.y, scratchCartesian$4.z];
+ const n = new Array(t);
+ for (let i = 0; i < t; i += 4)
+ n[i] = e[i], scratchCartographic$a.longitude = e[i + 1], scratchCartographic$a.latitude = e[i + 2], scratchCartographic$a.height = e[i + 3], Ellipsoid.default.cartographicToCartesian(
+ scratchCartographic$a,
+ scratchCartesian$4
+ ), n[i + 1] = scratchCartesian$4.x, n[i + 2] = scratchCartesian$4.y, n[i + 3] = scratchCartesian$4.z;
+ return n;
+}
+function convertCartographicDegreesToCartesian(e) {
+ const t = e.length;
+ if (t === 3)
+ return scratchCartographic$a.longitude = CesiumMath.toRadians(
+ e[0]
+ ), scratchCartographic$a.latitude = CesiumMath.toRadians(e[1]), scratchCartographic$a.height = e[2], Ellipsoid.default.cartographicToCartesian(
+ scratchCartographic$a,
+ scratchCartesian$4
+ ), [scratchCartesian$4.x, scratchCartesian$4.y, scratchCartesian$4.z];
+ const n = new Array(t);
+ for (let i = 0; i < t; i += 4)
+ n[i] = e[i], scratchCartographic$a.longitude = CesiumMath.toRadians(
+ e[i + 1]
+ ), scratchCartographic$a.latitude = CesiumMath.toRadians(
+ e[i + 2]
+ ), scratchCartographic$a.height = e[i + 3], Ellipsoid.default.cartographicToCartesian(
+ scratchCartographic$a,
+ scratchCartesian$4
+ ), n[i + 1] = scratchCartesian$4.x, n[i + 2] = scratchCartesian$4.y, n[i + 3] = scratchCartesian$4.z;
+ return n;
+}
+function unwrapCartesianInterval(e) {
+ const t = e.cartesian;
+ if (defined(t))
+ return t;
+ const n = e.cartesianVelocity;
+ if (defined(n))
+ return n;
+ const i = e.unitCartesian;
+ if (defined(i))
+ return i;
+ const r = e.unitSpherical;
+ if (defined(r))
+ return convertUnitSphericalToCartesian(r);
+ const o = e.spherical;
+ if (defined(o))
+ return convertSphericalToCartesian(o);
+ const s = e.cartographicRadians;
+ if (defined(s))
+ return convertCartographicRadiansToCartesian(s);
+ const c = e.cartographicDegrees;
+ if (defined(c))
+ return convertCartographicDegreesToCartesian(c);
+ throw new RuntimeError(
+ `${JSON.stringify(e)} is not a valid CZML interval.`
+ );
+}
+function normalizePackedCartesianArray(e, t) {
+ Cartesian3.unpack(e, t, scratchCartesian$4), Cartesian3.normalize(scratchCartesian$4, scratchCartesian$4), Cartesian3.pack(scratchCartesian$4, e, t);
+}
+function unwrapUnitCartesianInterval(e) {
+ const t = unwrapCartesianInterval(e);
+ if (t.length === 3)
+ return normalizePackedCartesianArray(t, 0), t;
+ for (let n = 1; n < t.length; n += 4)
+ normalizePackedCartesianArray(t, n);
+ return t;
+}
+function normalizePackedQuaternionArray(e, t) {
+ Quaternion.unpack(e, t, scratchQuaternion), Quaternion.normalize(scratchQuaternion, scratchQuaternion), Quaternion.pack(scratchQuaternion, e, t);
+}
+function unwrapQuaternionInterval(e) {
+ const t = e.unitQuaternion;
+ if (defined(t)) {
+ if (t.length === 4)
+ return normalizePackedQuaternionArray(t, 0), t;
+ for (let n = 1; n < t.length; n += 5)
+ normalizePackedQuaternionArray(t, n);
+ }
+ return t;
+}
+function getPropertyType(e) {
+ return typeof e == "boolean" ? Boolean : typeof e == "number" ? Number : typeof e == "string" ? String : e.hasOwnProperty("array") ? Array : e.hasOwnProperty("boolean") ? Boolean : e.hasOwnProperty("boundingRectangle") ? BoundingRectangle : e.hasOwnProperty("cartesian2") ? Cartesian2 : e.hasOwnProperty("cartesian") || e.hasOwnProperty("spherical") || e.hasOwnProperty("cartographicRadians") || e.hasOwnProperty("cartographicDegrees") ? Cartesian3 : e.hasOwnProperty("unitCartesian") || e.hasOwnProperty("unitSpherical") ? UnitCartesian3 : e.hasOwnProperty("rgba") || e.hasOwnProperty("rgbaf") ? Color : e.hasOwnProperty("arcType") ? ArcType$1 : e.hasOwnProperty("classificationType") ? ClassificationType$1 : e.hasOwnProperty("colorBlendMode") ? ColorBlendMode$1 : e.hasOwnProperty("cornerType") ? CornerType$1 : e.hasOwnProperty("heightReference") ? HeightReference$1 : e.hasOwnProperty("horizontalOrigin") ? HorizontalOrigin$1 : e.hasOwnProperty("date") ? JulianDate : e.hasOwnProperty("labelStyle") ? LabelStyle$1 : e.hasOwnProperty("number") ? Number : e.hasOwnProperty("nearFarScalar") ? NearFarScalar : e.hasOwnProperty("distanceDisplayCondition") ? DistanceDisplayCondition : e.hasOwnProperty("object") || e.hasOwnProperty("value") ? Object : e.hasOwnProperty("unitQuaternion") ? Quaternion : e.hasOwnProperty("shadowMode") ? ShadowMode$1 : e.hasOwnProperty("string") ? String : e.hasOwnProperty("stripeOrientation") ? StripeOrientation$1 : e.hasOwnProperty("wsen") || e.hasOwnProperty("wsenDegrees") ? Rectangle : e.hasOwnProperty("uri") ? Uri : e.hasOwnProperty("verticalOrigin") ? VerticalOrigin$1 : Object;
+}
+function unwrapInterval(e, t, n) {
+ switch (e) {
+ case ArcType$1:
+ return ArcType$1[defaultValue(t.arcType, t)];
+ case Array:
+ return t.array;
+ case Boolean:
+ return defaultValue(t.boolean, t);
+ case BoundingRectangle:
+ return t.boundingRectangle;
+ case Cartesian2:
+ return t.cartesian2;
+ case Cartesian3:
+ return unwrapCartesianInterval(t);
+ case UnitCartesian3:
+ return unwrapUnitCartesianInterval(t);
+ case Color:
+ return unwrapColorInterval(t);
+ case ClassificationType$1:
+ return ClassificationType$1[defaultValue(t.classificationType, t)];
+ case ColorBlendMode$1:
+ return ColorBlendMode$1[defaultValue(t.colorBlendMode, t)];
+ case CornerType$1:
+ return CornerType$1[defaultValue(t.cornerType, t)];
+ case HeightReference$1:
+ return HeightReference$1[defaultValue(t.heightReference, t)];
+ case HorizontalOrigin$1:
+ return HorizontalOrigin$1[defaultValue(t.horizontalOrigin, t)];
+ case Image:
+ return unwrapUriInterval(t, n);
+ case JulianDate:
+ return JulianDate.fromIso8601(
+ defaultValue(t.date, t)
+ );
+ case LabelStyle$1:
+ return LabelStyle$1[defaultValue(t.labelStyle, t)];
+ case Number:
+ return defaultValue(t.number, t);
+ case NearFarScalar:
+ return t.nearFarScalar;
+ case DistanceDisplayCondition:
+ return t.distanceDisplayCondition;
+ case Object:
+ return defaultValue(
+ defaultValue(t.object, t.value),
+ t
+ );
+ case Quaternion:
+ return unwrapQuaternionInterval(t);
+ case Rotation:
+ return defaultValue(t.number, t);
+ case SensorVolumePortionToDisplay:
+ return SensorVolumePortionToDisplay[defaultValue(t.portionToDisplay, t)];
+ case ShadowMode$1:
+ return ShadowMode$1[defaultValue(
+ defaultValue(t.shadowMode, t.shadows),
+ t
+ )];
+ case String:
+ return defaultValue(t.string, t);
+ case StripeOrientation$1:
+ return StripeOrientation$1[defaultValue(t.stripeOrientation, t)];
+ case Rectangle:
+ return unwrapRectangleInterval(t);
+ case Uri:
+ return unwrapUriInterval(t, n);
+ case VerticalOrigin$1:
+ return VerticalOrigin$1[defaultValue(t.verticalOrigin, t)];
+ default:
+ throw new RuntimeError(`Unknown CzmlDataSource interval type: ${e}`);
+ }
+}
+const interpolators = {
+ HERMITE: HermitePolynomialApproximation,
+ LAGRANGE: LagrangePolynomialApproximation,
+ LINEAR: LinearApproximation
+};
+function updateInterpolationSettings(e, t) {
+ const n = e.interpolationAlgorithm, i = e.interpolationDegree;
+ (defined(n) || defined(i)) && t.setInterpolationOptions({
+ interpolationAlgorithm: interpolators[n],
+ interpolationDegree: i
+ });
+ const r = e.forwardExtrapolationType;
+ defined(r) && (t.forwardExtrapolationType = ExtrapolationType$1[r]);
+ const o = e.forwardExtrapolationDuration;
+ defined(o) && (t.forwardExtrapolationDuration = o);
+ const s = e.backwardExtrapolationType;
+ defined(s) && (t.backwardExtrapolationType = ExtrapolationType$1[s]);
+ const c = e.backwardExtrapolationDuration;
+ defined(c) && (t.backwardExtrapolationDuration = c);
+}
+const iso8601Scratch = {
+ iso8601: void 0
+};
+function intervalFromString(e) {
+ if (defined(e))
+ return iso8601Scratch.iso8601 = e, TimeInterval.fromIso8601(iso8601Scratch);
+}
+function wrapPropertyInInfiniteInterval(e) {
+ const t = Iso8601.MAXIMUM_INTERVAL.clone();
+ return t.data = e, t;
+}
+function convertPropertyToComposite(e) {
+ const t = new CompositeProperty();
+ return t.intervals.addInterval(wrapPropertyInInfiniteInterval(e)), t;
+}
+function convertPositionPropertyToComposite(e) {
+ const t = new CompositePositionProperty(e.referenceFrame);
+ return t.intervals.addInterval(wrapPropertyInInfiniteInterval(e)), t;
+}
+function processProperty(e, t, n, i, r, o, s) {
+ let c = intervalFromString(i.interval);
+ defined(r) && (defined(c) ? c = TimeInterval.intersect(
+ c,
+ r,
+ scratchTimeInterval$1
+ ) : c = r);
+ let l, d, f;
+ const h = !defined(i.reference) && !defined(i.velocityReference), p = defined(c) && !c.equals(Iso8601.MAXIMUM_INTERVAL);
+ if (i.delete === !0) {
+ if (!p) {
+ t[n] = void 0;
+ return;
+ }
+ return removePropertyData(t[n], c);
+ }
+ let m = !1;
+ if (h) {
+ if (d = unwrapInterval(e, i, o), !defined(d))
+ return;
+ l = defaultValue(e.packedLength, 1), f = defaultValue(d.length, 1), m = !defined(i.array) && typeof d != "string" && f > l && e !== Object;
+ }
+ const _ = typeof e.unpack == "function" && e !== Rotation;
+ if (!m && !p) {
+ h ? t[n] = new ConstantProperty(
+ _ ? e.unpack(d, 0) : d
+ ) : t[n] = createSpecializedProperty(
+ e,
+ s,
+ i
+ );
+ return;
+ }
+ let y = t[n], C;
+ const T = i.epoch;
+ if (defined(T) && (C = JulianDate.fromIso8601(T)), m && !p) {
+ y instanceof SampledProperty || (t[n] = y = new SampledProperty(e)), y.addSamplesPackedArray(d, C), updateInterpolationSettings(i, y);
+ return;
+ }
+ let x;
+ if (!m && p) {
+ c = c.clone(), h ? c.data = _ ? e.unpack(d, 0) : d : c.data = createSpecializedProperty(
+ e,
+ s,
+ i
+ ), defined(y) || (t[n] = y = h ? new TimeIntervalCollectionProperty() : new CompositeProperty()), h && y instanceof TimeIntervalCollectionProperty ? y.intervals.addInterval(c) : y instanceof CompositeProperty ? (h && (c.data = new ConstantProperty(c.data)), y.intervals.addInterval(c)) : (t[n] = y = convertPropertyToComposite(y), h && (c.data = new ConstantProperty(c.data)), y.intervals.addInterval(c));
+ return;
+ }
+ defined(y) || (t[n] = y = new CompositeProperty()), y instanceof CompositeProperty || (t[n] = y = convertPropertyToComposite(y));
+ const b = y.intervals;
+ x = b.findInterval(c), (!defined(x) || !(x.data instanceof SampledProperty)) && (x = c.clone(), x.data = new SampledProperty(e), b.addInterval(x)), x.data.addSamplesPackedArray(d, C), updateInterpolationSettings(i, x.data);
+}
+function removePropertyData(e, t) {
+ if (e instanceof SampledProperty) {
+ e.removeSamples(t);
+ return;
+ } else if (e instanceof TimeIntervalCollectionProperty) {
+ e.intervals.removeInterval(t);
+ return;
+ } else if (e instanceof CompositeProperty) {
+ const n = e.intervals;
+ for (let i = 0; i < n.length; ++i) {
+ const r = TimeInterval.intersect(
+ n.get(i),
+ t,
+ scratchTimeInterval$1
+ );
+ r.isEmpty || removePropertyData(r.data, t);
+ }
+ n.removeInterval(t);
+ return;
+ }
+}
+function processPacketData(e, t, n, i, r, o, s) {
+ if (defined(i))
+ if (Array.isArray(i))
+ for (let c = 0, l = i.length; c < l; ++c)
+ processProperty(
+ e,
+ t,
+ n,
+ i[c],
+ r,
+ o,
+ s
+ );
+ else
+ processProperty(
+ e,
+ t,
+ n,
+ i,
+ r,
+ o,
+ s
+ );
+}
+function processPositionProperty(e, t, n, i, r, o) {
+ let s = intervalFromString(n.interval);
+ defined(i) && (defined(s) ? s = TimeInterval.intersect(
+ s,
+ i,
+ scratchTimeInterval$1
+ ) : s = i);
+ const c = defined(n.cartesianVelocity) ? 1 : 0, l = Cartesian3.packedLength * (c + 1);
+ let d, f;
+ const h = !defined(n.reference), p = defined(s) && !s.equals(Iso8601.MAXIMUM_INTERVAL);
+ if (n.delete === !0) {
+ if (!p) {
+ e[t] = void 0;
+ return;
+ }
+ return removePositionPropertyData(e[t], s);
+ }
+ let m, _ = !1;
+ if (h && (defined(n.referenceFrame) && (m = ReferenceFrame$1[n.referenceFrame]), m = defaultValue(m, ReferenceFrame$1.FIXED), d = unwrapCartesianInterval(n), f = defaultValue(d.length, 1), _ = f > l), !_ && !p) {
+ h ? e[t] = new ConstantPositionProperty(
+ Cartesian3.unpack(d),
+ m
+ ) : e[t] = createReferenceProperty(
+ o,
+ n.reference
+ );
+ return;
+ }
+ let y = e[t], C;
+ const T = n.epoch;
+ if (defined(T) && (C = JulianDate.fromIso8601(T)), _ && !p) {
+ (!(y instanceof SampledPositionProperty) || defined(m) && y.referenceFrame !== m) && (e[t] = y = new SampledPositionProperty(
+ m,
+ c
+ )), y.addSamplesPackedArray(d, C), updateInterpolationSettings(n, y);
+ return;
+ }
+ let x;
+ if (!_ && p) {
+ s = s.clone(), h ? s.data = Cartesian3.unpack(d) : s.data = createReferenceProperty(
+ o,
+ n.reference
+ ), defined(y) || (h ? y = new TimeIntervalCollectionPositionProperty(m) : y = new CompositePositionProperty(m), e[t] = y), h && y instanceof TimeIntervalCollectionPositionProperty && defined(m) && y.referenceFrame === m ? y.intervals.addInterval(s) : y instanceof CompositePositionProperty ? (h && (s.data = new ConstantPositionProperty(
+ s.data,
+ m
+ )), y.intervals.addInterval(s)) : (e[t] = y = convertPositionPropertyToComposite(
+ y
+ ), h && (s.data = new ConstantPositionProperty(
+ s.data,
+ m
+ )), y.intervals.addInterval(s));
+ return;
+ }
+ defined(y) ? y instanceof CompositePositionProperty || (e[t] = y = convertPositionPropertyToComposite(
+ y
+ )) : e[t] = y = new CompositePositionProperty(
+ m
+ );
+ const b = y.intervals;
+ x = b.findInterval(s), (!defined(x) || !(x.data instanceof SampledPositionProperty) || defined(m) && x.data.referenceFrame !== m) && (x = s.clone(), x.data = new SampledPositionProperty(
+ m,
+ c
+ ), b.addInterval(x)), x.data.addSamplesPackedArray(d, C), updateInterpolationSettings(n, x.data);
+}
+function removePositionPropertyData(e, t) {
+ if (e instanceof SampledPositionProperty) {
+ e.removeSamples(t);
+ return;
+ } else if (e instanceof TimeIntervalCollectionPositionProperty) {
+ e.intervals.removeInterval(t);
+ return;
+ } else if (e instanceof CompositePositionProperty) {
+ const n = e.intervals;
+ for (let i = 0; i < n.length; ++i) {
+ const r = TimeInterval.intersect(
+ n.get(i),
+ t,
+ scratchTimeInterval$1
+ );
+ r.isEmpty || removePositionPropertyData(r.data, t);
+ }
+ n.removeInterval(t);
+ return;
+ }
+}
+function processPositionPacketData(e, t, n, i, r, o) {
+ if (defined(n))
+ if (Array.isArray(n))
+ for (let s = 0, c = n.length; s < c; ++s)
+ processPositionProperty(
+ e,
+ t,
+ n[s],
+ i,
+ r,
+ o
+ );
+ else
+ processPositionProperty(
+ e,
+ t,
+ n,
+ i,
+ r,
+ o
+ );
+}
+function processShapePacketData(e, t, n, i) {
+ defined(n.references) ? processReferencesArrayPacketData(
+ e,
+ t,
+ n.references,
+ n.interval,
+ i,
+ PropertyArray,
+ CompositeProperty
+ ) : (defined(n.cartesian2) ? n.array = Cartesian2.unpackArray(n.cartesian2) : defined(n.cartesian) && (n.array = Cartesian2.unpackArray(n.cartesian)), defined(n.array) && processPacketData(
+ Array,
+ e,
+ t,
+ n,
+ void 0,
+ void 0,
+ i
+ ));
+}
+function processMaterialProperty(e, t, n, i, r, o) {
+ let s = intervalFromString(n.interval);
+ defined(i) && (defined(s) ? s = TimeInterval.intersect(
+ s,
+ i,
+ scratchTimeInterval$1
+ ) : s = i);
+ let c = e[t], l, d;
+ if (defined(s)) {
+ c instanceof CompositeMaterialProperty || (c = new CompositeMaterialProperty(), e[t] = c);
+ const h = c.intervals;
+ d = h.findInterval({
+ start: s.start,
+ stop: s.stop
+ }), defined(d) ? l = d.data : (d = s.clone(), h.addInterval(d));
+ } else
+ l = c;
+ let f;
+ defined(n.solidColor) ? (l instanceof ColorMaterialProperty || (l = new ColorMaterialProperty()), f = n.solidColor, processPacketData(
+ Color,
+ l,
+ "color",
+ f.color,
+ void 0,
+ void 0,
+ o
+ )) : defined(n.grid) ? (l instanceof GridMaterialProperty || (l = new GridMaterialProperty()), f = n.grid, processPacketData(
+ Color,
+ l,
+ "color",
+ f.color,
+ void 0,
+ r,
+ o
+ ), processPacketData(
+ Number,
+ l,
+ "cellAlpha",
+ f.cellAlpha,
+ void 0,
+ r,
+ o
+ ), processPacketData(
+ Cartesian2,
+ l,
+ "lineCount",
+ f.lineCount,
+ void 0,
+ r,
+ o
+ ), processPacketData(
+ Cartesian2,
+ l,
+ "lineThickness",
+ f.lineThickness,
+ void 0,
+ r,
+ o
+ ), processPacketData(
+ Cartesian2,
+ l,
+ "lineOffset",
+ f.lineOffset,
+ void 0,
+ r,
+ o
+ )) : defined(n.image) ? (l instanceof ImageMaterialProperty || (l = new ImageMaterialProperty()), f = n.image, processPacketData(
+ Image,
+ l,
+ "image",
+ f.image,
+ void 0,
+ r,
+ o
+ ), processPacketData(
+ Cartesian2,
+ l,
+ "repeat",
+ f.repeat,
+ void 0,
+ r,
+ o
+ ), processPacketData(
+ Color,
+ l,
+ "color",
+ f.color,
+ void 0,
+ r,
+ o
+ ), processPacketData(
+ Boolean,
+ l,
+ "transparent",
+ f.transparent,
+ void 0,
+ r,
+ o
+ )) : defined(n.stripe) ? (l instanceof StripeMaterialProperty || (l = new StripeMaterialProperty()), f = n.stripe, processPacketData(
+ StripeOrientation$1,
+ l,
+ "orientation",
+ f.orientation,
+ void 0,
+ r,
+ o
+ ), processPacketData(
+ Color,
+ l,
+ "evenColor",
+ f.evenColor,
+ void 0,
+ r,
+ o
+ ), processPacketData(
+ Color,
+ l,
+ "oddColor",
+ f.oddColor,
+ void 0,
+ r,
+ o
+ ), processPacketData(
+ Number,
+ l,
+ "offset",
+ f.offset,
+ void 0,
+ r,
+ o
+ ), processPacketData(
+ Number,
+ l,
+ "repeat",
+ f.repeat,
+ void 0,
+ r,
+ o
+ )) : defined(n.polylineOutline) ? (l instanceof PolylineOutlineMaterialProperty || (l = new PolylineOutlineMaterialProperty()), f = n.polylineOutline, processPacketData(
+ Color,
+ l,
+ "color",
+ f.color,
+ void 0,
+ r,
+ o
+ ), processPacketData(
+ Color,
+ l,
+ "outlineColor",
+ f.outlineColor,
+ void 0,
+ r,
+ o
+ ), processPacketData(
+ Number,
+ l,
+ "outlineWidth",
+ f.outlineWidth,
+ void 0,
+ r,
+ o
+ )) : defined(n.polylineGlow) ? (l instanceof PolylineGlowMaterialProperty || (l = new PolylineGlowMaterialProperty()), f = n.polylineGlow, processPacketData(
+ Color,
+ l,
+ "color",
+ f.color,
+ void 0,
+ r,
+ o
+ ), processPacketData(
+ Number,
+ l,
+ "glowPower",
+ f.glowPower,
+ void 0,
+ r,
+ o
+ ), processPacketData(
+ Number,
+ l,
+ "taperPower",
+ f.taperPower,
+ void 0,
+ r,
+ o
+ )) : defined(n.polylineArrow) ? (l instanceof PolylineArrowMaterialProperty || (l = new PolylineArrowMaterialProperty()), f = n.polylineArrow, processPacketData(
+ Color,
+ l,
+ "color",
+ f.color,
+ void 0,
+ void 0,
+ o
+ )) : defined(n.polylineDash) ? (l instanceof PolylineDashMaterialProperty || (l = new PolylineDashMaterialProperty()), f = n.polylineDash, processPacketData(
+ Color,
+ l,
+ "color",
+ f.color,
+ void 0,
+ void 0,
+ o
+ ), processPacketData(
+ Color,
+ l,
+ "gapColor",
+ f.gapColor,
+ void 0,
+ void 0,
+ o
+ ), processPacketData(
+ Number,
+ l,
+ "dashLength",
+ f.dashLength,
+ void 0,
+ r,
+ o
+ ), processPacketData(
+ Number,
+ l,
+ "dashPattern",
+ f.dashPattern,
+ void 0,
+ r,
+ o
+ )) : defined(n.checkerboard) && (l instanceof CheckerboardMaterialProperty || (l = new CheckerboardMaterialProperty()), f = n.checkerboard, processPacketData(
+ Color,
+ l,
+ "evenColor",
+ f.evenColor,
+ void 0,
+ r,
+ o
+ ), processPacketData(
+ Color,
+ l,
+ "oddColor",
+ f.oddColor,
+ void 0,
+ r,
+ o
+ ), processPacketData(
+ Cartesian2,
+ l,
+ "repeat",
+ f.repeat,
+ void 0,
+ r,
+ o
+ )), defined(d) ? d.data = l : e[t] = l;
+}
+function processMaterialPacketData(e, t, n, i, r, o) {
+ if (defined(n))
+ if (Array.isArray(n))
+ for (let s = 0, c = n.length; s < c; ++s)
+ processMaterialProperty(
+ e,
+ t,
+ n[s],
+ i,
+ r,
+ o
+ );
+ else
+ processMaterialProperty(
+ e,
+ t,
+ n,
+ i,
+ r,
+ o
+ );
+}
+function processName(e, t, n, i) {
+ const r = t.name;
+ defined(r) && (e.name = t.name);
+}
+function processDescription$2(e, t, n, i) {
+ const r = t.description;
+ defined(r) && processPacketData(
+ String,
+ e,
+ "description",
+ r,
+ void 0,
+ i,
+ n
+ );
+}
+function processPosition(e, t, n, i) {
+ const r = t.position;
+ defined(r) && processPositionPacketData(
+ e,
+ "position",
+ r,
+ void 0,
+ i,
+ n
+ );
+}
+function processViewFrom(e, t, n, i) {
+ const r = t.viewFrom;
+ defined(r) && processPacketData(
+ Cartesian3,
+ e,
+ "viewFrom",
+ r,
+ void 0,
+ i,
+ n
+ );
+}
+function processOrientation(e, t, n, i) {
+ const r = t.orientation;
+ defined(r) && processPacketData(
+ Quaternion,
+ e,
+ "orientation",
+ r,
+ void 0,
+ i,
+ n
+ );
+}
+function processProperties(e, t, n, i) {
+ const r = t.properties;
+ if (defined(r)) {
+ defined(e.properties) || (e.properties = new PropertyBag());
+ for (const o in r)
+ if (r.hasOwnProperty(o)) {
+ e.properties.hasProperty(o) || e.properties.addProperty(o);
+ const s = r[o];
+ if (Array.isArray(s))
+ for (let c = 0, l = s.length; c < l; ++c)
+ processProperty(
+ getPropertyType(s[c]),
+ e.properties,
+ o,
+ s[c],
+ void 0,
+ i,
+ n
+ );
+ else
+ processProperty(
+ getPropertyType(s),
+ e.properties,
+ o,
+ s,
+ void 0,
+ i,
+ n
+ );
+ }
+ }
+}
+function processReferencesArrayPacketData(e, t, n, i, r, o, s) {
+ const c = n.map(function(l) {
+ return createReferenceProperty(r, l);
+ });
+ if (defined(i)) {
+ i = intervalFromString(i);
+ let l = e[t];
+ if (!(l instanceof s)) {
+ const d = new s();
+ d.intervals.addInterval(wrapPropertyInInfiniteInterval(l)), e[t] = l = d;
+ }
+ i.data = new o(c), l.intervals.addInterval(i);
+ } else
+ e[t] = new o(c);
+}
+function processArrayPacketData(e, t, n, i) {
+ const r = n.references;
+ defined(r) ? processReferencesArrayPacketData(
+ e,
+ t,
+ r,
+ n.interval,
+ i,
+ PropertyArray,
+ CompositeProperty
+ ) : processPacketData(
+ Array,
+ e,
+ t,
+ n,
+ void 0,
+ void 0,
+ i
+ );
+}
+function processArray(e, t, n, i) {
+ if (defined(n))
+ if (Array.isArray(n))
+ for (let r = 0, o = n.length; r < o; ++r)
+ processArrayPacketData(
+ e,
+ t,
+ n[r],
+ i
+ );
+ else
+ processArrayPacketData(e, t, n, i);
+}
+function processPositionArrayPacketData(e, t, n, i) {
+ const r = n.references;
+ defined(r) ? processReferencesArrayPacketData(
+ e,
+ t,
+ r,
+ n.interval,
+ i,
+ PositionPropertyArray,
+ CompositePositionProperty
+ ) : (defined(n.cartesian) ? n.array = Cartesian3.unpackArray(n.cartesian) : defined(n.cartographicRadians) ? n.array = Cartesian3.fromRadiansArrayHeights(
+ n.cartographicRadians,
+ Ellipsoid.default
+ ) : defined(n.cartographicDegrees) && (n.array = Cartesian3.fromDegreesArrayHeights(
+ n.cartographicDegrees,
+ Ellipsoid.default
+ )), defined(n.array) && processPacketData(
+ Array,
+ e,
+ t,
+ n,
+ void 0,
+ void 0,
+ i
+ ));
+}
+function processPositionArray(e, t, n, i) {
+ if (defined(n))
+ if (Array.isArray(n))
+ for (let r = 0, o = n.length; r < o; ++r)
+ processPositionArrayPacketData(
+ e,
+ t,
+ n[r],
+ i
+ );
+ else
+ processPositionArrayPacketData(
+ e,
+ t,
+ n,
+ i
+ );
+}
+function unpackCartesianArray(e) {
+ return Cartesian3.unpackArray(e);
+}
+function unpackCartographicRadiansArray(e) {
+ return Cartesian3.fromRadiansArrayHeights(e, Ellipsoid.default);
+}
+function unpackCartographicDegreesArray(e) {
+ return Cartesian3.fromDegreesArrayHeights(e, Ellipsoid.default);
+}
+function processPositionArrayOfArraysPacketData(e, t, n, i) {
+ const r = n.references;
+ if (defined(r)) {
+ const o = r.map(function(s) {
+ const c = {};
+ return processReferencesArrayPacketData(
+ c,
+ "positions",
+ s,
+ n.interval,
+ i,
+ PositionPropertyArray,
+ CompositePositionProperty
+ ), c.positions;
+ });
+ e[t] = new PositionPropertyArray(o);
+ } else
+ defined(n.cartesian) ? n.array = n.cartesian.map(unpackCartesianArray) : defined(n.cartographicRadians) ? n.array = n.cartographicRadians.map(
+ unpackCartographicRadiansArray
+ ) : defined(n.cartographicDegrees) && (n.array = n.cartographicDegrees.map(
+ unpackCartographicDegreesArray
+ )), defined(n.array) && processPacketData(
+ Array,
+ e,
+ t,
+ n,
+ void 0,
+ void 0,
+ i
+ );
+}
+function processPositionArrayOfArrays(e, t, n, i) {
+ if (defined(n))
+ if (Array.isArray(n))
+ for (let r = 0, o = n.length; r < o; ++r)
+ processPositionArrayOfArraysPacketData(
+ e,
+ t,
+ n[r],
+ i
+ );
+ else
+ processPositionArrayOfArraysPacketData(
+ e,
+ t,
+ n,
+ i
+ );
+}
+function processShape(e, t, n, i) {
+ if (defined(n))
+ if (Array.isArray(n))
+ for (let r = 0, o = n.length; r < o; r++)
+ processShapePacketData(
+ e,
+ t,
+ n[r],
+ i
+ );
+ else
+ processShapePacketData(e, t, n, i);
+}
+function processAvailability(e, t, n, i) {
+ const r = t.availability;
+ if (!defined(r))
+ return;
+ let o;
+ if (Array.isArray(r))
+ for (let s = 0, c = r.length; s < c; ++s)
+ defined(o) || (o = new TimeIntervalCollection()), o.addInterval(intervalFromString(r[s]));
+ else
+ o = new TimeIntervalCollection(), o.addInterval(intervalFromString(r));
+ e.availability = o;
+}
+function processAlignedAxis(e, t, n, i, r) {
+ defined(t) && processPacketData(
+ UnitCartesian3,
+ e,
+ "alignedAxis",
+ t,
+ n,
+ i,
+ r
+ );
+}
+function processBillboard(e, t, n, i) {
+ const r = t.billboard;
+ if (!defined(r))
+ return;
+ const o = intervalFromString(r.interval);
+ let s = e.billboard;
+ defined(s) || (e.billboard = s = new BillboardGraphics()), processPacketData(
+ Boolean,
+ s,
+ "show",
+ r.show,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Image,
+ s,
+ "image",
+ r.image,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Number,
+ s,
+ "scale",
+ r.scale,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Cartesian2,
+ s,
+ "pixelOffset",
+ r.pixelOffset,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Cartesian3,
+ s,
+ "eyeOffset",
+ r.eyeOffset,
+ o,
+ i,
+ n
+ ), processPacketData(
+ HorizontalOrigin$1,
+ s,
+ "horizontalOrigin",
+ r.horizontalOrigin,
+ o,
+ i,
+ n
+ ), processPacketData(
+ VerticalOrigin$1,
+ s,
+ "verticalOrigin",
+ r.verticalOrigin,
+ o,
+ i,
+ n
+ ), processPacketData(
+ HeightReference$1,
+ s,
+ "heightReference",
+ r.heightReference,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Color,
+ s,
+ "color",
+ r.color,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Rotation,
+ s,
+ "rotation",
+ r.rotation,
+ o,
+ i,
+ n
+ ), processAlignedAxis(
+ s,
+ r.alignedAxis,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Boolean,
+ s,
+ "sizeInMeters",
+ r.sizeInMeters,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Number,
+ s,
+ "width",
+ r.width,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Number,
+ s,
+ "height",
+ r.height,
+ o,
+ i,
+ n
+ ), processPacketData(
+ NearFarScalar,
+ s,
+ "scaleByDistance",
+ r.scaleByDistance,
+ o,
+ i,
+ n
+ ), processPacketData(
+ NearFarScalar,
+ s,
+ "translucencyByDistance",
+ r.translucencyByDistance,
+ o,
+ i,
+ n
+ ), processPacketData(
+ NearFarScalar,
+ s,
+ "pixelOffsetScaleByDistance",
+ r.pixelOffsetScaleByDistance,
+ o,
+ i,
+ n
+ ), processPacketData(
+ BoundingRectangle,
+ s,
+ "imageSubRegion",
+ r.imageSubRegion,
+ o,
+ i,
+ n
+ ), processPacketData(
+ DistanceDisplayCondition,
+ s,
+ "distanceDisplayCondition",
+ r.distanceDisplayCondition,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Number,
+ s,
+ "disableDepthTestDistance",
+ r.disableDepthTestDistance,
+ o,
+ i,
+ n
+ );
+}
+function processBox(e, t, n, i) {
+ const r = t.box;
+ if (!defined(r))
+ return;
+ const o = intervalFromString(r.interval);
+ let s = e.box;
+ defined(s) || (e.box = s = new BoxGraphics()), processPacketData(
+ Boolean,
+ s,
+ "show",
+ r.show,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Cartesian3,
+ s,
+ "dimensions",
+ r.dimensions,
+ o,
+ i,
+ n
+ ), processPacketData(
+ HeightReference$1,
+ s,
+ "heightReference",
+ r.heightReference,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Boolean,
+ s,
+ "fill",
+ r.fill,
+ o,
+ i,
+ n
+ ), processMaterialPacketData(
+ s,
+ "material",
+ r.material,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Boolean,
+ s,
+ "outline",
+ r.outline,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Color,
+ s,
+ "outlineColor",
+ r.outlineColor,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Number,
+ s,
+ "outlineWidth",
+ r.outlineWidth,
+ o,
+ i,
+ n
+ ), processPacketData(
+ ShadowMode$1,
+ s,
+ "shadows",
+ r.shadows,
+ o,
+ i,
+ n
+ ), processPacketData(
+ DistanceDisplayCondition,
+ s,
+ "distanceDisplayCondition",
+ r.distanceDisplayCondition,
+ o,
+ i,
+ n
+ );
+}
+function processCorridor(e, t, n, i) {
+ const r = t.corridor;
+ if (!defined(r))
+ return;
+ const o = intervalFromString(r.interval);
+ let s = e.corridor;
+ defined(s) || (e.corridor = s = new CorridorGraphics()), processPacketData(
+ Boolean,
+ s,
+ "show",
+ r.show,
+ o,
+ i,
+ n
+ ), processPositionArray(
+ s,
+ "positions",
+ r.positions,
+ n
+ ), processPacketData(
+ Number,
+ s,
+ "width",
+ r.width,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Number,
+ s,
+ "height",
+ r.height,
+ o,
+ i,
+ n
+ ), processPacketData(
+ HeightReference$1,
+ s,
+ "heightReference",
+ r.heightReference,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Number,
+ s,
+ "extrudedHeight",
+ r.extrudedHeight,
+ o,
+ i,
+ n
+ ), processPacketData(
+ HeightReference$1,
+ s,
+ "extrudedHeightReference",
+ r.extrudedHeightReference,
+ o,
+ i,
+ n
+ ), processPacketData(
+ CornerType$1,
+ s,
+ "cornerType",
+ r.cornerType,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Number,
+ s,
+ "granularity",
+ r.granularity,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Boolean,
+ s,
+ "fill",
+ r.fill,
+ o,
+ i,
+ n
+ ), processMaterialPacketData(
+ s,
+ "material",
+ r.material,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Boolean,
+ s,
+ "outline",
+ r.outline,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Color,
+ s,
+ "outlineColor",
+ r.outlineColor,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Number,
+ s,
+ "outlineWidth",
+ r.outlineWidth,
+ o,
+ i,
+ n
+ ), processPacketData(
+ ShadowMode$1,
+ s,
+ "shadows",
+ r.shadows,
+ o,
+ i,
+ n
+ ), processPacketData(
+ DistanceDisplayCondition,
+ s,
+ "distanceDisplayCondition",
+ r.distanceDisplayCondition,
+ o,
+ i,
+ n
+ ), processPacketData(
+ ClassificationType$1,
+ s,
+ "classificationType",
+ r.classificationType,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Number,
+ s,
+ "zIndex",
+ r.zIndex,
+ o,
+ i,
+ n
+ );
+}
+function processCylinder(e, t, n, i) {
+ const r = t.cylinder;
+ if (!defined(r))
+ return;
+ const o = intervalFromString(r.interval);
+ let s = e.cylinder;
+ defined(s) || (e.cylinder = s = new CylinderGraphics()), processPacketData(
+ Boolean,
+ s,
+ "show",
+ r.show,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Number,
+ s,
+ "length",
+ r.length,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Number,
+ s,
+ "topRadius",
+ r.topRadius,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Number,
+ s,
+ "bottomRadius",
+ r.bottomRadius,
+ o,
+ i,
+ n
+ ), processPacketData(
+ HeightReference$1,
+ s,
+ "heightReference",
+ r.heightReference,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Boolean,
+ s,
+ "fill",
+ r.fill,
+ o,
+ i,
+ n
+ ), processMaterialPacketData(
+ s,
+ "material",
+ r.material,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Boolean,
+ s,
+ "outline",
+ r.outline,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Color,
+ s,
+ "outlineColor",
+ r.outlineColor,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Number,
+ s,
+ "outlineWidth",
+ r.outlineWidth,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Number,
+ s,
+ "numberOfVerticalLines",
+ r.numberOfVerticalLines,
+ o,
+ i,
+ n
+ ), processPacketData(
+ Number,
+ s,
+ "slices",
+ r.slices,
+ o,
+ i,
+ n
+ ), processPacketData(
+ ShadowMode$1,
+ s,
+ "shadows",
+ r.shadows,
+ o,
+ i,
+ n
+ ), processPacketData(
+ DistanceDisplayCondition,
+ s,
+ "distanceDisplayCondition",
+ r.distanceDisplayCondition,
+ o,
+ i,
+ n
+ );
+}
+function processDocument$1(e, t) {
+ const n = e.version;
+ if (defined(n) && typeof n == "string") {
+ const o = n.split(".");
+ if (o.length === 2) {
+ if (o[0] !== "1")
+ throw new RuntimeError("Cesium only supports CZML version 1.");
+ t._version = n;
+ }
+ }
+ if (!defined(t._version))
+ throw new RuntimeError(
+ "CZML version information invalid. It is expected to be a property on the document object in the + * Note: Depending on the destroyPrimitives constructor option, the primitive may already be destroyed. + *
+ * @memberof PrimitiveCollection.prototype + * @type {Event} + * @readonly + */ + primitiveRemoved: { + get: function() { + return this._primitiveRemoved; + } + } +}); +PrimitiveCollection.prototype.add = function(e, t) { + const n = defined(t), i = e._external = e._external || {}, r = i._composites = i._composites || {}; + return r[this._guid] = { + collection: this + }, n ? this._primitives.splice(t, 0, e) : this._primitives.push(e), this._primitiveAdded.raiseEvent(e), e; +}; +PrimitiveCollection.prototype.remove = function(e) { + if (this.contains(e)) { + const t = this._primitives.indexOf(e); + if (t !== -1) + return this._primitives.splice(t, 1), delete e._external._composites[this._guid], this.destroyPrimitives && e.destroy(), this._primitiveRemoved.raiseEvent(e), !0; + } + return !1; +}; +PrimitiveCollection.prototype.removeAndDestroy = function(e) { + const t = this.remove(e); + return t && !this.destroyPrimitives && e.destroy(), t; +}; +PrimitiveCollection.prototype.removeAll = function() { + const e = this._primitives, t = e.length; + for (let n = 0; n < t; ++n) + delete e[n]._external._composites[this._guid], this.destroyPrimitives && e[n].destroy(), this._primitiveRemoved.raiseEvent(e[n]); + this._primitives = []; +}; +PrimitiveCollection.prototype.contains = function(e) { + return !!(defined(e) && e._external && e._external._composites && e._external._composites[this._guid]); +}; +function getPrimitiveIndex(e, t) { + return e._primitives.indexOf(t); +} +PrimitiveCollection.prototype.raise = function(e) { + if (defined(e)) { + const t = getPrimitiveIndex(this, e), n = this._primitives; + if (t !== n.length - 1) { + const i = n[t]; + n[t] = n[t + 1], n[t + 1] = i; + } + } +}; +PrimitiveCollection.prototype.raiseToTop = function(e) { + if (defined(e)) { + const t = getPrimitiveIndex(this, e), n = this._primitives; + t !== n.length - 1 && (n.splice(t, 1), n.push(e)); + } +}; +PrimitiveCollection.prototype.lower = function(e) { + if (defined(e)) { + const t = getPrimitiveIndex(this, e), n = this._primitives; + if (t !== 0) { + const i = n[t]; + n[t] = n[t - 1], n[t - 1] = i; + } + } +}; +PrimitiveCollection.prototype.lowerToBottom = function(e) { + if (defined(e)) { + const t = getPrimitiveIndex(this, e), n = this._primitives; + t !== 0 && (n.splice(t, 1), n.unshift(e)); + } +}; +PrimitiveCollection.prototype.get = function(e) { + return this._primitives[e]; +}; +PrimitiveCollection.prototype.update = function(e) { + if (!this.show) + return; + const t = this._primitives; + for (let n = 0; n < t.length; ++n) + t[n].update(e); +}; +PrimitiveCollection.prototype.prePassesUpdate = function(e) { + const t = this._primitives; + for (let n = 0; n < t.length; ++n) { + const i = t[n]; + defined(i.prePassesUpdate) && i.prePassesUpdate(e); + } +}; +PrimitiveCollection.prototype.updateForPass = function(e, t) { + const n = this._primitives; + for (let i = 0; i < n.length; ++i) { + const r = n[i]; + defined(r.updateForPass) && r.updateForPass(e, t); + } +}; +PrimitiveCollection.prototype.postPassesUpdate = function(e) { + const t = this._primitives; + for (let n = 0; n < t.length; ++n) { + const i = t[n]; + defined(i.postPassesUpdate) && i.postPassesUpdate(e); + } +}; +PrimitiveCollection.prototype.isDestroyed = function() { + return !1; +}; +PrimitiveCollection.prototype.destroy = function() { + return this.removeAll(), destroyObject(this); +}; +function OrderedGroundPrimitiveCollection() { + this._length = 0, this._collections = {}, this._collectionsArray = [], this.show = !0; +} +Object.defineProperties(OrderedGroundPrimitiveCollection.prototype, { + /** + * Gets the number of primitives in the collection. + * + * @memberof OrderedGroundPrimitiveCollection.prototype + * + * @type {number} + * @readonly + */ + length: { + get: function() { + return this._length; + } + } +}); +OrderedGroundPrimitiveCollection.prototype.add = function(e, t) { + t = defaultValue(t, 0); + let n = this._collections[t]; + if (!defined(n)) { + n = new PrimitiveCollection({ destroyPrimitives: !1 }), n._zIndex = t, this._collections[t] = n; + const i = this._collectionsArray; + let r = 0; + for (; r < i.length && i[r]._zIndex < t; ) + r++; + i.splice(r, 0, n); + } + return n.add(e), this._length++, e._zIndex = t, e; +}; +OrderedGroundPrimitiveCollection.prototype.set = function(e, t) { + return t === e._zIndex || (this.remove(e, !0), this.add(e, t)), e; +}; +OrderedGroundPrimitiveCollection.prototype.remove = function(e, t) { + if (this.contains(e)) { + const n = e._zIndex, i = this._collections[n]; + let r; + return t ? r = i.remove(e) : r = i.removeAndDestroy(e), r && this._length--, i.length === 0 && (this._collectionsArray.splice( + this._collectionsArray.indexOf(i), + 1 + ), this._collections[n] = void 0, i.destroy()), r; + } + return !1; +}; +OrderedGroundPrimitiveCollection.prototype.removeAll = function() { + const e = this._collectionsArray; + for (let t = 0; t < e.length; t++) { + const n = e[t]; + n.destroyPrimitives = !0, n.destroy(); + } + this._collections = {}, this._collectionsArray = [], this._length = 0; +}; +OrderedGroundPrimitiveCollection.prototype.contains = function(e) { + if (!defined(e)) + return !1; + const t = this._collections[e._zIndex]; + return defined(t) && t.contains(e); +}; +OrderedGroundPrimitiveCollection.prototype.update = function(e) { + if (!this.show) + return; + const t = this._collectionsArray; + for (let n = 0; n < t.length; n++) + t[n].update(e); +}; +OrderedGroundPrimitiveCollection.prototype.isDestroyed = function() { + return !1; +}; +OrderedGroundPrimitiveCollection.prototype.destroy = function() { + return this.removeAll(), destroyObject(this); +}; +function DynamicGeometryBatch(e, t) { + this._primitives = e, this._orderedGroundPrimitives = t, this._dynamicUpdaters = new AssociativeArray(); +} +DynamicGeometryBatch.prototype.add = function(e, t) { + this._dynamicUpdaters.set( + t.id, + t.createDynamicUpdater( + this._primitives, + this._orderedGroundPrimitives + ) + ); +}; +DynamicGeometryBatch.prototype.remove = function(e) { + const t = e.id, n = this._dynamicUpdaters.get(t); + defined(n) && (this._dynamicUpdaters.remove(t), n.destroy()); +}; +DynamicGeometryBatch.prototype.update = function(e) { + const t = this._dynamicUpdaters.values; + for (let n = 0, i = t.length; n < i; n++) + t[n].update(e); + return !0; +}; +DynamicGeometryBatch.prototype.removeAllPrimitives = function() { + const e = this._dynamicUpdaters.values; + for (let t = 0, n = e.length; t < n; t++) + e[t].destroy(); + this._dynamicUpdaters.removeAll(); +}; +DynamicGeometryBatch.prototype.getBoundingSphere = function(e, t) { + return e = this._dynamicUpdaters.get(e.id), defined(e) && defined(e.getBoundingSphere) ? e.getBoundingSphere(t) : BoundingSphereState$1.FAILED; +}; +const EllipseGeometryLibrary = {}, rotAxis = new Cartesian3(), tempVec = new Cartesian3(), unitQuat = new Quaternion(), rotMtx = new Matrix3(); +function pointOnEllipsoid(e, t, n, i, r, o, s, c, l, d) { + const f = e + t; + Cartesian3.multiplyByScalar(i, Math.cos(f), rotAxis), Cartesian3.multiplyByScalar(n, Math.sin(f), tempVec), Cartesian3.add(rotAxis, tempVec, rotAxis); + let h = Math.cos(e); + h = h * h; + let p = Math.sin(e); + p = p * p; + const _ = o / Math.sqrt(s * h + r * p) / c; + return Quaternion.fromAxisAngle(rotAxis, _, unitQuat), Matrix3.fromQuaternion(unitQuat, rotMtx), Matrix3.multiplyByVector(rotMtx, l, d), Cartesian3.normalize(d, d), Cartesian3.multiplyByScalar(d, c, d), d; +} +const scratchCartesian1$4 = new Cartesian3(), scratchCartesian2$6 = new Cartesian3(), scratchCartesian3$7 = new Cartesian3(), scratchNormal$6 = new Cartesian3(); +EllipseGeometryLibrary.raisePositionsToHeight = function(e, t, n) { + const i = t.ellipsoid, r = t.height, o = t.extrudedHeight, s = n ? e.length / 3 * 2 : e.length / 3, c = new Float64Array(s * 3), l = e.length, d = n ? l : 0; + for (let f = 0; f < l; f += 3) { + const h = f + 1, p = f + 2, m = Cartesian3.fromArray(e, f, scratchCartesian1$4); + i.scaleToGeodeticSurface(m, m); + const _ = Cartesian3.clone(m, scratchCartesian2$6), y = i.geodeticSurfaceNormal(m, scratchNormal$6), C = Cartesian3.multiplyByScalar( + y, + r, + scratchCartesian3$7 + ); + Cartesian3.add(m, C, m), n && (Cartesian3.multiplyByScalar(y, o, C), Cartesian3.add(_, C, _), c[f + d] = _.x, c[h + d] = _.y, c[p + d] = _.z), c[f] = m.x, c[h] = m.y, c[p] = m.z; + } + return c; +}; +const unitPosScratch = new Cartesian3(), eastVecScratch = new Cartesian3(), northVecScratch = new Cartesian3(); +EllipseGeometryLibrary.computeEllipsePositions = function(e, t, n) { + const i = e.semiMinorAxis, r = e.semiMajorAxis, o = e.rotation, s = e.center, c = e.granularity * 8, l = i * i, d = r * r, f = r * i, h = Cartesian3.magnitude(s), p = Cartesian3.normalize(s, unitPosScratch); + let m = Cartesian3.cross(Cartesian3.UNIT_Z, s, eastVecScratch); + m = Cartesian3.normalize(m, m); + const _ = Cartesian3.cross(p, m, northVecScratch); + let y = 1 + Math.ceil(CesiumMath.PI_OVER_TWO / c); + const C = CesiumMath.PI_OVER_TWO / (y - 1); + let T = CesiumMath.PI_OVER_TWO - y * C; + T < 0 && (y -= Math.ceil(Math.abs(T) / C)); + const x = 2 * (y * (y + 2)), b = t ? new Array(x * 3) : void 0; + let S = 0, E = scratchCartesian1$4, A = scratchCartesian2$6; + const D = y * 4 * 3; + let P = D - 1, I = 0; + const M = n ? new Array(D) : void 0; + let R, L, g, w, O; + for (T = CesiumMath.PI_OVER_TWO, E = pointOnEllipsoid( + T, + o, + _, + m, + l, + f, + d, + h, + p, + E + ), t && (b[S++] = E.x, b[S++] = E.y, b[S++] = E.z), n && (M[P--] = E.z, M[P--] = E.y, M[P--] = E.x), T = CesiumMath.PI_OVER_TWO - C, R = 1; R < y + 1; ++R) { + if (E = pointOnEllipsoid( + T, + o, + _, + m, + l, + f, + d, + h, + p, + E + ), A = pointOnEllipsoid( + Math.PI - T, + o, + _, + m, + l, + f, + d, + h, + p, + A + ), t) { + for (b[S++] = E.x, b[S++] = E.y, b[S++] = E.z, g = 2 * R + 2, L = 1; L < g - 1; ++L) + w = L / (g - 1), O = Cartesian3.lerp( + E, + A, + w, + scratchCartesian3$7 + ), b[S++] = O.x, b[S++] = O.y, b[S++] = O.z; + b[S++] = A.x, b[S++] = A.y, b[S++] = A.z; + } + n && (M[P--] = E.z, M[P--] = E.y, M[P--] = E.x, M[I++] = A.x, M[I++] = A.y, M[I++] = A.z), T = CesiumMath.PI_OVER_TWO - (R + 1) * C; + } + for (R = y; R > 1; --R) { + if (T = CesiumMath.PI_OVER_TWO - (R - 1) * C, E = pointOnEllipsoid( + -T, + o, + _, + m, + l, + f, + d, + h, + p, + E + ), A = pointOnEllipsoid( + T + Math.PI, + o, + _, + m, + l, + f, + d, + h, + p, + A + ), t) { + for (b[S++] = E.x, b[S++] = E.y, b[S++] = E.z, g = 2 * (R - 1) + 2, L = 1; L < g - 1; ++L) + w = L / (g - 1), O = Cartesian3.lerp( + E, + A, + w, + scratchCartesian3$7 + ), b[S++] = O.x, b[S++] = O.y, b[S++] = O.z; + b[S++] = A.x, b[S++] = A.y, b[S++] = A.z; + } + n && (M[P--] = E.z, M[P--] = E.y, M[P--] = E.x, M[I++] = A.x, M[I++] = A.y, M[I++] = A.z); + } + T = CesiumMath.PI_OVER_TWO, E = pointOnEllipsoid( + -T, + o, + _, + m, + l, + f, + d, + h, + p, + E + ); + const N = {}; + return t && (b[S++] = E.x, b[S++] = E.y, b[S++] = E.z, N.positions = b, N.numPts = y), n && (M[P--] = E.z, M[P--] = E.y, M[P--] = E.x, N.outerPositions = M), N; +}; +const scratchCartesian1$3 = new Cartesian3(), scratchCartesian2$5 = new Cartesian3(), scratchCartesian3$6 = new Cartesian3(), scratchCartesian4$2 = new Cartesian3(), texCoordScratch = new Cartesian2(), textureMatrixScratch$1 = new Matrix3(), tangentMatrixScratch = new Matrix3(), quaternionScratch$2 = new Quaternion(), scratchNormal$5 = new Cartesian3(), scratchTangent$3 = new Cartesian3(), scratchBitangent$3 = new Cartesian3(), scratchCartographic$9 = new Cartographic(), projectedCenterScratch = new Cartesian3(), scratchMinTexCoord = new Cartesian2(), scratchMaxTexCoord = new Cartesian2(); +function computeTopBottomAttributes(e, t, n) { + const i = t.vertexFormat, r = t.center, o = t.semiMajorAxis, s = t.semiMinorAxis, c = t.ellipsoid, l = t.stRotation, d = n ? e.length / 3 * 2 : e.length / 3, f = t.shadowVolume, h = i.st ? new Float32Array(d * 2) : void 0, p = i.normal ? new Float32Array(d * 3) : void 0, m = i.tangent ? new Float32Array(d * 3) : void 0, _ = i.bitangent ? new Float32Array(d * 3) : void 0, y = f ? new Float32Array(d * 3) : void 0; + let C = 0, T = scratchNormal$5, x = scratchTangent$3, b = scratchBitangent$3; + const S = new GeographicProjection(c), E = S.project( + c.cartesianToCartographic(r, scratchCartographic$9), + projectedCenterScratch + ), A = c.scaleToGeodeticSurface( + r, + scratchCartesian1$3 + ); + c.geodeticSurfaceNormal(A, A); + let D = textureMatrixScratch$1, P = tangentMatrixScratch; + if (l !== 0) { + let O = Quaternion.fromAxisAngle( + A, + l, + quaternionScratch$2 + ); + D = Matrix3.fromQuaternion(O, D), O = Quaternion.fromAxisAngle( + A, + -l, + quaternionScratch$2 + ), P = Matrix3.fromQuaternion(O, P); + } else + D = Matrix3.clone(Matrix3.IDENTITY, D), P = Matrix3.clone(Matrix3.IDENTITY, P); + const I = Cartesian2.fromElements( + Number.POSITIVE_INFINITY, + Number.POSITIVE_INFINITY, + scratchMinTexCoord + ), M = Cartesian2.fromElements( + Number.NEGATIVE_INFINITY, + Number.NEGATIVE_INFINITY, + scratchMaxTexCoord + ); + let R = e.length; + const L = n ? R : 0, g = L / 3 * 2; + for (let O = 0; O < R; O += 3) { + const N = O + 1, F = O + 2, B = Cartesian3.fromArray(e, O, scratchCartesian1$3); + if (i.st) { + const V = Matrix3.multiplyByVector( + D, + B, + scratchCartesian2$5 + ), U = S.project( + c.cartesianToCartographic(V, scratchCartographic$9), + scratchCartesian3$6 + ); + Cartesian3.subtract(U, E, U), texCoordScratch.x = (U.x + o) / (2 * o), texCoordScratch.y = (U.y + s) / (2 * s), I.x = Math.min(texCoordScratch.x, I.x), I.y = Math.min(texCoordScratch.y, I.y), M.x = Math.max(texCoordScratch.x, M.x), M.y = Math.max(texCoordScratch.y, M.y), n && (h[C + g] = texCoordScratch.x, h[C + 1 + g] = texCoordScratch.y), h[C++] = texCoordScratch.x, h[C++] = texCoordScratch.y; + } + (i.normal || i.tangent || i.bitangent || f) && (T = c.geodeticSurfaceNormal(B, T), f && (y[O + L] = -T.x, y[N + L] = -T.y, y[F + L] = -T.z), (i.normal || i.tangent || i.bitangent) && ((i.tangent || i.bitangent) && (x = Cartesian3.normalize( + Cartesian3.cross(Cartesian3.UNIT_Z, T, x), + x + ), Matrix3.multiplyByVector(P, x, x)), i.normal && (p[O] = T.x, p[N] = T.y, p[F] = T.z, n && (p[O + L] = -T.x, p[N + L] = -T.y, p[F + L] = -T.z)), i.tangent && (m[O] = x.x, m[N] = x.y, m[F] = x.z, n && (m[O + L] = -x.x, m[N + L] = -x.y, m[F + L] = -x.z)), i.bitangent && (b = Cartesian3.normalize( + Cartesian3.cross(T, x, b), + b + ), _[O] = b.x, _[N] = b.y, _[F] = b.z, n && (_[O + L] = b.x, _[N + L] = b.y, _[F + L] = b.z)))); + } + if (i.st) { + R = h.length; + for (let O = 0; O < R; O += 2) + h[O] = (h[O] - I.x) / (M.x - I.x), h[O + 1] = (h[O + 1] - I.y) / (M.y - I.y); + } + const w = new GeometryAttributes(); + if (i.position) { + const O = EllipseGeometryLibrary.raisePositionsToHeight( + e, + t, + n + ); + w.position = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.DOUBLE, + componentsPerAttribute: 3, + values: O + }); + } + if (i.st && (w.st = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 2, + values: h + })), i.normal && (w.normal = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 3, + values: p + })), i.tangent && (w.tangent = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 3, + values: m + })), i.bitangent && (w.bitangent = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 3, + values: _ + })), f && (w.extrudeDirection = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 3, + values: y + })), n && defined(t.offsetAttribute)) { + let O = new Uint8Array(d); + if (t.offsetAttribute === GeometryOffsetAttribute$1.TOP) + O = O.fill(1, 0, d / 2); + else { + const N = t.offsetAttribute === GeometryOffsetAttribute$1.NONE ? 0 : 1; + O = O.fill(N); + } + w.applyOffset = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE, + componentsPerAttribute: 1, + values: O + }); + } + return w; +} +function topIndices(e) { + const t = new Array(12 * (e * (e + 1)) - 6); + let n = 0, i, r, o, s, c; + for (i = 0, o = 1, s = 0; s < 3; s++) + t[n++] = o++, t[n++] = i, t[n++] = o; + for (s = 2; s < e + 1; ++s) { + for (o = s * (s + 1) - 1, i = (s - 1) * s - 1, t[n++] = o++, t[n++] = i, t[n++] = o, r = 2 * s, c = 0; c < r - 1; ++c) + t[n++] = o, t[n++] = i++, t[n++] = i, t[n++] = o++, t[n++] = i, t[n++] = o; + t[n++] = o++, t[n++] = i, t[n++] = o; + } + for (r = e * 2, ++o, ++i, s = 0; s < r - 1; ++s) + t[n++] = o, t[n++] = i++, t[n++] = i, t[n++] = o++, t[n++] = i, t[n++] = o; + for (t[n++] = o, t[n++] = i++, t[n++] = i, t[n++] = o++, t[n++] = i++, t[n++] = i, ++i, s = e - 1; s > 1; --s) { + for (t[n++] = i++, t[n++] = i, t[n++] = o, r = 2 * s, c = 0; c < r - 1; ++c) + t[n++] = o, t[n++] = i++, t[n++] = i, t[n++] = o++, t[n++] = i, t[n++] = o; + t[n++] = i++, t[n++] = i++, t[n++] = o++; + } + for (s = 0; s < 3; s++) + t[n++] = i++, t[n++] = i, t[n++] = o; + return t; +} +let boundingSphereCenter$1 = new Cartesian3(); +function computeEllipse$1(e) { + const t = e.center; + boundingSphereCenter$1 = Cartesian3.multiplyByScalar( + e.ellipsoid.geodeticSurfaceNormal(t, boundingSphereCenter$1), + e.height, + boundingSphereCenter$1 + ), boundingSphereCenter$1 = Cartesian3.add( + t, + boundingSphereCenter$1, + boundingSphereCenter$1 + ); + const n = new BoundingSphere( + boundingSphereCenter$1, + e.semiMajorAxis + ), i = EllipseGeometryLibrary.computeEllipsePositions( + e, + !0, + !1 + ), r = i.positions, o = i.numPts, s = computeTopBottomAttributes(r, e, !1); + let c = topIndices(o); + return c = IndexDatatype$1.createTypedArray(r.length / 3, c), { + boundingSphere: n, + attributes: s, + indices: c + }; +} +function computeWallAttributes(e, t) { + const n = t.vertexFormat, i = t.center, r = t.semiMajorAxis, o = t.semiMinorAxis, s = t.ellipsoid, c = t.height, l = t.extrudedHeight, d = t.stRotation, f = e.length / 3 * 2, h = new Float64Array(f * 3), p = n.st ? new Float32Array(f * 2) : void 0, m = n.normal ? new Float32Array(f * 3) : void 0, _ = n.tangent ? new Float32Array(f * 3) : void 0, y = n.bitangent ? new Float32Array(f * 3) : void 0, C = t.shadowVolume, T = C ? new Float32Array(f * 3) : void 0; + let x = 0, b = scratchNormal$5, S = scratchTangent$3, E = scratchBitangent$3; + const A = new GeographicProjection(s), D = A.project( + s.cartesianToCartographic(i, scratchCartographic$9), + projectedCenterScratch + ), P = s.scaleToGeodeticSurface( + i, + scratchCartesian1$3 + ); + s.geodeticSurfaceNormal(P, P); + const I = Quaternion.fromAxisAngle( + P, + d, + quaternionScratch$2 + ), M = Matrix3.fromQuaternion(I, textureMatrixScratch$1), R = Cartesian2.fromElements( + Number.POSITIVE_INFINITY, + Number.POSITIVE_INFINITY, + scratchMinTexCoord + ), L = Cartesian2.fromElements( + Number.NEGATIVE_INFINITY, + Number.NEGATIVE_INFINITY, + scratchMaxTexCoord + ); + let g = e.length; + const w = g / 3 * 2; + for (let N = 0; N < g; N += 3) { + const F = N + 1, B = N + 2; + let V = Cartesian3.fromArray(e, N, scratchCartesian1$3), U; + if (n.st) { + const $ = Matrix3.multiplyByVector( + M, + V, + scratchCartesian2$5 + ), G = A.project( + s.cartesianToCartographic($, scratchCartographic$9), + scratchCartesian3$6 + ); + Cartesian3.subtract(G, D, G), texCoordScratch.x = (G.x + r) / (2 * r), texCoordScratch.y = (G.y + o) / (2 * o), R.x = Math.min(texCoordScratch.x, R.x), R.y = Math.min(texCoordScratch.y, R.y), L.x = Math.max(texCoordScratch.x, L.x), L.y = Math.max(texCoordScratch.y, L.y), p[x + w] = texCoordScratch.x, p[x + 1 + w] = texCoordScratch.y, p[x++] = texCoordScratch.x, p[x++] = texCoordScratch.y; + } + V = s.scaleToGeodeticSurface(V, V), U = Cartesian3.clone(V, scratchCartesian2$5), b = s.geodeticSurfaceNormal(V, b), C && (T[N + g] = -b.x, T[F + g] = -b.y, T[B + g] = -b.z); + let k = Cartesian3.multiplyByScalar( + b, + c, + scratchCartesian4$2 + ); + if (V = Cartesian3.add(V, k, V), k = Cartesian3.multiplyByScalar( + b, + l, + k + ), U = Cartesian3.add( + U, + k, + U + ), n.position && (h[N + g] = U.x, h[F + g] = U.y, h[B + g] = U.z, h[N] = V.x, h[F] = V.y, h[B] = V.z), n.normal || n.tangent || n.bitangent) { + E = Cartesian3.clone(b, E); + const $ = Cartesian3.fromArray( + e, + (N + 3) % g, + scratchCartesian4$2 + ); + Cartesian3.subtract($, V, $); + const G = Cartesian3.subtract( + U, + V, + scratchCartesian3$6 + ); + b = Cartesian3.normalize( + Cartesian3.cross(G, $, b), + b + ), n.normal && (m[N] = b.x, m[F] = b.y, m[B] = b.z, m[N + g] = b.x, m[F + g] = b.y, m[B + g] = b.z), n.tangent && (S = Cartesian3.normalize( + Cartesian3.cross(E, b, S), + S + ), _[N] = S.x, _[F] = S.y, _[B] = S.z, _[N + g] = S.x, _[N + 1 + g] = S.y, _[N + 2 + g] = S.z), n.bitangent && (y[N] = E.x, y[F] = E.y, y[B] = E.z, y[N + g] = E.x, y[F + g] = E.y, y[B + g] = E.z); + } + } + if (n.st) { + g = p.length; + for (let N = 0; N < g; N += 2) + p[N] = (p[N] - R.x) / (L.x - R.x), p[N + 1] = (p[N + 1] - R.y) / (L.y - R.y); + } + const O = new GeometryAttributes(); + if (n.position && (O.position = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.DOUBLE, + componentsPerAttribute: 3, + values: h + })), n.st && (O.st = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 2, + values: p + })), n.normal && (O.normal = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 3, + values: m + })), n.tangent && (O.tangent = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 3, + values: _ + })), n.bitangent && (O.bitangent = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 3, + values: y + })), C && (O.extrudeDirection = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 3, + values: T + })), defined(t.offsetAttribute)) { + let N = new Uint8Array(f); + if (t.offsetAttribute === GeometryOffsetAttribute$1.TOP) + N = N.fill(1, 0, f / 2); + else { + const F = t.offsetAttribute === GeometryOffsetAttribute$1.NONE ? 0 : 1; + N = N.fill(F); + } + O.applyOffset = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE, + componentsPerAttribute: 1, + values: N + }); + } + return O; +} +function computeWallIndices(e) { + const t = e.length / 3, n = IndexDatatype$1.createTypedArray(t, t * 6); + let i = 0; + for (let r = 0; r < t; r++) { + const o = r, s = r + t, c = (o + 1) % t, l = c + t; + n[i++] = o, n[i++] = s, n[i++] = c, n[i++] = c, n[i++] = s, n[i++] = l; + } + return n; +} +const topBoundingSphere$2 = new BoundingSphere(), bottomBoundingSphere$2 = new BoundingSphere(); +function computeExtrudedEllipse$1(e) { + const t = e.center, n = e.ellipsoid, i = e.semiMajorAxis; + let r = Cartesian3.multiplyByScalar( + n.geodeticSurfaceNormal(t, scratchCartesian1$3), + e.height, + scratchCartesian1$3 + ); + topBoundingSphere$2.center = Cartesian3.add( + t, + r, + topBoundingSphere$2.center + ), topBoundingSphere$2.radius = i, r = Cartesian3.multiplyByScalar( + n.geodeticSurfaceNormal(t, r), + e.extrudedHeight, + r + ), bottomBoundingSphere$2.center = Cartesian3.add( + t, + r, + bottomBoundingSphere$2.center + ), bottomBoundingSphere$2.radius = i; + const o = EllipseGeometryLibrary.computeEllipsePositions( + e, + !0, + !0 + ), s = o.positions, c = o.numPts, l = o.outerPositions, d = BoundingSphere.union( + topBoundingSphere$2, + bottomBoundingSphere$2 + ), f = computeTopBottomAttributes( + s, + e, + !0 + ); + let h = topIndices(c); + const p = h.length; + h.length = p * 2; + const m = s.length / 3; + for (let S = 0; S < p; S += 3) + h[S + p] = h[S + 2] + m, h[S + 1 + p] = h[S + 1] + m, h[S + 2 + p] = h[S] + m; + const _ = IndexDatatype$1.createTypedArray( + m * 2 / 3, + h + ), y = new Geometry({ + attributes: f, + indices: _, + primitiveType: PrimitiveType$1.TRIANGLES + }), C = computeWallAttributes(l, e); + h = computeWallIndices(l); + const T = IndexDatatype$1.createTypedArray( + l.length * 2 / 3, + h + ), x = new Geometry({ + attributes: C, + indices: T, + primitiveType: PrimitiveType$1.TRIANGLES + }), b = GeometryPipeline.combineInstances([ + new GeometryInstance({ + geometry: y + }), + new GeometryInstance({ + geometry: x + }) + ]); + return { + boundingSphere: d, + attributes: b[0].attributes, + indices: b[0].indices + }; +} +function computeRectangle$1(e, t, n, i, r, o, s) { + const l = EllipseGeometryLibrary.computeEllipsePositions( + { + center: e, + semiMajorAxis: t, + semiMinorAxis: n, + rotation: i, + granularity: r + }, + !1, + !0 + ).outerPositions, d = l.length / 3, f = new Array(d); + for (let p = 0; p < d; ++p) + f[p] = Cartesian3.fromArray(l, p * 3); + const h = Rectangle.fromCartesianArray(f, o, s); + return h.width > CesiumMath.PI && (h.north = h.north > 0 ? CesiumMath.PI_OVER_TWO - CesiumMath.EPSILON7 : h.north, h.south = h.south < 0 ? CesiumMath.EPSILON7 - CesiumMath.PI_OVER_TWO : h.south, h.east = CesiumMath.PI, h.west = -CesiumMath.PI), h; +} +function EllipseGeometry(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.center, n = defaultValue(e.ellipsoid, Ellipsoid.default), i = e.semiMajorAxis, r = e.semiMinorAxis, o = defaultValue( + e.granularity, + CesiumMath.RADIANS_PER_DEGREE + ), s = defaultValue(e.vertexFormat, VertexFormat.DEFAULT), c = defaultValue(e.height, 0), l = defaultValue(e.extrudedHeight, c); + this._center = Cartesian3.clone(t), this._semiMajorAxis = i, this._semiMinorAxis = r, this._ellipsoid = Ellipsoid.clone(n), this._rotation = defaultValue(e.rotation, 0), this._stRotation = defaultValue(e.stRotation, 0), this._height = Math.max(l, c), this._granularity = o, this._vertexFormat = VertexFormat.clone(s), this._extrudedHeight = Math.min(l, c), this._shadowVolume = defaultValue(e.shadowVolume, !1), this._workerName = "createEllipseGeometry", this._offsetAttribute = e.offsetAttribute, this._rectangle = void 0, this._textureCoordinateRotationPoints = void 0; +} +EllipseGeometry.packedLength = Cartesian3.packedLength + Ellipsoid.packedLength + VertexFormat.packedLength + 9; +EllipseGeometry.pack = function(e, t, n) { + return n = defaultValue(n, 0), Cartesian3.pack(e._center, t, n), n += Cartesian3.packedLength, Ellipsoid.pack(e._ellipsoid, t, n), n += Ellipsoid.packedLength, VertexFormat.pack(e._vertexFormat, t, n), n += VertexFormat.packedLength, t[n++] = e._semiMajorAxis, t[n++] = e._semiMinorAxis, t[n++] = e._rotation, t[n++] = e._stRotation, t[n++] = e._height, t[n++] = e._granularity, t[n++] = e._extrudedHeight, t[n++] = e._shadowVolume ? 1 : 0, t[n] = defaultValue(e._offsetAttribute, -1), t; +}; +const scratchCenter$5 = new Cartesian3(), scratchEllipsoid$a = new Ellipsoid(), scratchVertexFormat$8 = new VertexFormat(), scratchOptions$d = { + center: scratchCenter$5, + ellipsoid: scratchEllipsoid$a, + vertexFormat: scratchVertexFormat$8, + semiMajorAxis: void 0, + semiMinorAxis: void 0, + rotation: void 0, + stRotation: void 0, + height: void 0, + granularity: void 0, + extrudedHeight: void 0, + shadowVolume: void 0, + offsetAttribute: void 0 +}; +EllipseGeometry.unpack = function(e, t, n) { + t = defaultValue(t, 0); + const i = Cartesian3.unpack(e, t, scratchCenter$5); + t += Cartesian3.packedLength; + const r = Ellipsoid.unpack(e, t, scratchEllipsoid$a); + t += Ellipsoid.packedLength; + const o = VertexFormat.unpack( + e, + t, + scratchVertexFormat$8 + ); + t += VertexFormat.packedLength; + const s = e[t++], c = e[t++], l = e[t++], d = e[t++], f = e[t++], h = e[t++], p = e[t++], m = e[t++] === 1, _ = e[t]; + return defined(n) ? (n._center = Cartesian3.clone(i, n._center), n._ellipsoid = Ellipsoid.clone(r, n._ellipsoid), n._vertexFormat = VertexFormat.clone(o, n._vertexFormat), n._semiMajorAxis = s, n._semiMinorAxis = c, n._rotation = l, n._stRotation = d, n._height = f, n._granularity = h, n._extrudedHeight = p, n._shadowVolume = m, n._offsetAttribute = _ === -1 ? void 0 : _, n) : (scratchOptions$d.height = f, scratchOptions$d.extrudedHeight = p, scratchOptions$d.granularity = h, scratchOptions$d.stRotation = d, scratchOptions$d.rotation = l, scratchOptions$d.semiMajorAxis = s, scratchOptions$d.semiMinorAxis = c, scratchOptions$d.shadowVolume = m, scratchOptions$d.offsetAttribute = _ === -1 ? void 0 : _, new EllipseGeometry(scratchOptions$d)); +}; +EllipseGeometry.computeRectangle = function(e, t) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const n = e.center, i = defaultValue(e.ellipsoid, Ellipsoid.default), r = e.semiMajorAxis, o = e.semiMinorAxis, s = defaultValue( + e.granularity, + CesiumMath.RADIANS_PER_DEGREE + ), c = defaultValue(e.rotation, 0); + return computeRectangle$1( + n, + r, + o, + c, + s, + i, + t + ); +}; +EllipseGeometry.createGeometry = function(e) { + if (e._semiMajorAxis <= 0 || e._semiMinorAxis <= 0) + return; + const t = e._height, n = e._extrudedHeight, i = !CesiumMath.equalsEpsilon( + t, + n, + 0, + CesiumMath.EPSILON2 + ); + e._center = e._ellipsoid.scaleToGeodeticSurface( + e._center, + e._center + ); + const r = { + center: e._center, + semiMajorAxis: e._semiMajorAxis, + semiMinorAxis: e._semiMinorAxis, + ellipsoid: e._ellipsoid, + rotation: e._rotation, + height: t, + granularity: e._granularity, + vertexFormat: e._vertexFormat, + stRotation: e._stRotation + }; + let o; + if (i) + r.extrudedHeight = n, r.shadowVolume = e._shadowVolume, r.offsetAttribute = e._offsetAttribute, o = computeExtrudedEllipse$1(r); + else if (o = computeEllipse$1(r), defined(e._offsetAttribute)) { + const s = o.attributes.position.values.length, c = e._offsetAttribute === GeometryOffsetAttribute$1.NONE ? 0 : 1, l = new Uint8Array(s / 3).fill(c); + o.attributes.applyOffset = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE, + componentsPerAttribute: 1, + values: l + }); + } + return new Geometry({ + attributes: o.attributes, + indices: o.indices, + primitiveType: PrimitiveType$1.TRIANGLES, + boundingSphere: o.boundingSphere, + offsetAttribute: e._offsetAttribute + }); +}; +EllipseGeometry.createShadowVolume = function(e, t, n) { + const i = e._granularity, r = e._ellipsoid, o = t(i, r), s = n(i, r); + return new EllipseGeometry({ + center: e._center, + semiMajorAxis: e._semiMajorAxis, + semiMinorAxis: e._semiMinorAxis, + ellipsoid: r, + rotation: e._rotation, + stRotation: e._stRotation, + granularity: i, + extrudedHeight: o, + height: s, + vertexFormat: VertexFormat.POSITION_ONLY, + shadowVolume: !0 + }); +}; +function textureCoordinateRotationPoints$1(e) { + const t = -e._stRotation; + if (t === 0) + return [0, 0, 0, 1, 1, 0]; + const i = EllipseGeometryLibrary.computeEllipsePositions( + { + center: e._center, + semiMajorAxis: e._semiMajorAxis, + semiMinorAxis: e._semiMinorAxis, + rotation: e._rotation, + granularity: e._granularity + }, + !1, + !0 + ).outerPositions, r = i.length / 3, o = new Array(r); + for (let l = 0; l < r; ++l) + o[l] = Cartesian3.fromArray(i, l * 3); + const s = e._ellipsoid, c = e.rectangle; + return Geometry._textureCoordinateRotationPoints( + o, + t, + s, + c + ); +} +Object.defineProperties(EllipseGeometry.prototype, { + /** + * @private + */ + rectangle: { + get: function() { + return defined(this._rectangle) || (this._rectangle = computeRectangle$1( + this._center, + this._semiMajorAxis, + this._semiMinorAxis, + this._rotation, + this._granularity, + this._ellipsoid + )), this._rectangle; + } + }, + /** + * For remapping texture coordinates when rendering EllipseGeometries as GroundPrimitives. + * @private + */ + textureCoordinateRotationPoints: { + get: function() { + return defined(this._textureCoordinateRotationPoints) || (this._textureCoordinateRotationPoints = textureCoordinateRotationPoints$1( + this + )), this._textureCoordinateRotationPoints; + } + } +}); +const scratchCartesian1$2 = new Cartesian3(); +let boundingSphereCenter = new Cartesian3(); +function computeEllipse(e) { + const t = e.center; + boundingSphereCenter = Cartesian3.multiplyByScalar( + e.ellipsoid.geodeticSurfaceNormal(t, boundingSphereCenter), + e.height, + boundingSphereCenter + ), boundingSphereCenter = Cartesian3.add( + t, + boundingSphereCenter, + boundingSphereCenter + ); + const n = new BoundingSphere( + boundingSphereCenter, + e.semiMajorAxis + ), i = EllipseGeometryLibrary.computeEllipsePositions( + e, + !1, + !0 + ).outerPositions, r = new GeometryAttributes({ + position: new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.DOUBLE, + componentsPerAttribute: 3, + values: EllipseGeometryLibrary.raisePositionsToHeight( + i, + e, + !1 + ) + }) + }), o = i.length / 3, s = IndexDatatype$1.createTypedArray(o, o * 2); + let c = 0; + for (let l = 0; l < o; ++l) + s[c++] = l, s[c++] = (l + 1) % o; + return { + boundingSphere: n, + attributes: r, + indices: s + }; +} +const topBoundingSphere$1 = new BoundingSphere(), bottomBoundingSphere$1 = new BoundingSphere(); +function computeExtrudedEllipse(e) { + const t = e.center, n = e.ellipsoid, i = e.semiMajorAxis; + let r = Cartesian3.multiplyByScalar( + n.geodeticSurfaceNormal(t, scratchCartesian1$2), + e.height, + scratchCartesian1$2 + ); + topBoundingSphere$1.center = Cartesian3.add( + t, + r, + topBoundingSphere$1.center + ), topBoundingSphere$1.radius = i, r = Cartesian3.multiplyByScalar( + n.geodeticSurfaceNormal(t, r), + e.extrudedHeight, + r + ), bottomBoundingSphere$1.center = Cartesian3.add( + t, + r, + bottomBoundingSphere$1.center + ), bottomBoundingSphere$1.radius = i; + let o = EllipseGeometryLibrary.computeEllipsePositions( + e, + !1, + !0 + ).outerPositions; + const s = new GeometryAttributes({ + position: new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.DOUBLE, + componentsPerAttribute: 3, + values: EllipseGeometryLibrary.raisePositionsToHeight( + o, + e, + !0 + ) + }) + }); + o = s.position.values; + const c = BoundingSphere.union( + topBoundingSphere$1, + bottomBoundingSphere$1 + ); + let l = o.length / 3; + if (defined(e.offsetAttribute)) { + let _ = new Uint8Array(l); + if (e.offsetAttribute === GeometryOffsetAttribute$1.TOP) + _ = _.fill(1, 0, l / 2); + else { + const y = e.offsetAttribute === GeometryOffsetAttribute$1.NONE ? 0 : 1; + _ = _.fill(y); + } + s.applyOffset = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE, + componentsPerAttribute: 1, + values: _ + }); + } + let d = defaultValue(e.numberOfVerticalLines, 16); + d = CesiumMath.clamp( + d, + 0, + l / 2 + ); + const f = IndexDatatype$1.createTypedArray( + l, + l * 2 + d * 2 + ); + l /= 2; + let h = 0, p; + for (p = 0; p < l; ++p) + f[h++] = p, f[h++] = (p + 1) % l, f[h++] = p + l, f[h++] = (p + 1) % l + l; + let m; + if (d > 0) { + const _ = Math.min(d, l); + m = Math.round(l / _); + const y = Math.min(m * d, l); + for (p = 0; p < y; p += m) + f[h++] = p, f[h++] = p + l; + } + return { + boundingSphere: c, + attributes: s, + indices: f + }; +} +function EllipseOutlineGeometry(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.center, n = defaultValue(e.ellipsoid, Ellipsoid.default), i = e.semiMajorAxis, r = e.semiMinorAxis, o = defaultValue( + e.granularity, + CesiumMath.RADIANS_PER_DEGREE + ), s = defaultValue(e.height, 0), c = defaultValue(e.extrudedHeight, s); + this._center = Cartesian3.clone(t), this._semiMajorAxis = i, this._semiMinorAxis = r, this._ellipsoid = Ellipsoid.clone(n), this._rotation = defaultValue(e.rotation, 0), this._height = Math.max(c, s), this._granularity = o, this._extrudedHeight = Math.min(c, s), this._numberOfVerticalLines = Math.max( + defaultValue(e.numberOfVerticalLines, 16), + 0 + ), this._offsetAttribute = e.offsetAttribute, this._workerName = "createEllipseOutlineGeometry"; +} +EllipseOutlineGeometry.packedLength = Cartesian3.packedLength + Ellipsoid.packedLength + 8; +EllipseOutlineGeometry.pack = function(e, t, n) { + return n = defaultValue(n, 0), Cartesian3.pack(e._center, t, n), n += Cartesian3.packedLength, Ellipsoid.pack(e._ellipsoid, t, n), n += Ellipsoid.packedLength, t[n++] = e._semiMajorAxis, t[n++] = e._semiMinorAxis, t[n++] = e._rotation, t[n++] = e._height, t[n++] = e._granularity, t[n++] = e._extrudedHeight, t[n++] = e._numberOfVerticalLines, t[n] = defaultValue(e._offsetAttribute, -1), t; +}; +const scratchCenter$4 = new Cartesian3(), scratchEllipsoid$9 = new Ellipsoid(), scratchOptions$c = { + center: scratchCenter$4, + ellipsoid: scratchEllipsoid$9, + semiMajorAxis: void 0, + semiMinorAxis: void 0, + rotation: void 0, + height: void 0, + granularity: void 0, + extrudedHeight: void 0, + numberOfVerticalLines: void 0, + offsetAttribute: void 0 +}; +EllipseOutlineGeometry.unpack = function(e, t, n) { + t = defaultValue(t, 0); + const i = Cartesian3.unpack(e, t, scratchCenter$4); + t += Cartesian3.packedLength; + const r = Ellipsoid.unpack(e, t, scratchEllipsoid$9); + t += Ellipsoid.packedLength; + const o = e[t++], s = e[t++], c = e[t++], l = e[t++], d = e[t++], f = e[t++], h = e[t++], p = e[t]; + return defined(n) ? (n._center = Cartesian3.clone(i, n._center), n._ellipsoid = Ellipsoid.clone(r, n._ellipsoid), n._semiMajorAxis = o, n._semiMinorAxis = s, n._rotation = c, n._height = l, n._granularity = d, n._extrudedHeight = f, n._numberOfVerticalLines = h, n._offsetAttribute = p === -1 ? void 0 : p, n) : (scratchOptions$c.height = l, scratchOptions$c.extrudedHeight = f, scratchOptions$c.granularity = d, scratchOptions$c.rotation = c, scratchOptions$c.semiMajorAxis = o, scratchOptions$c.semiMinorAxis = s, scratchOptions$c.numberOfVerticalLines = h, scratchOptions$c.offsetAttribute = p === -1 ? void 0 : p, new EllipseOutlineGeometry(scratchOptions$c)); +}; +EllipseOutlineGeometry.createGeometry = function(e) { + if (e._semiMajorAxis <= 0 || e._semiMinorAxis <= 0) + return; + const t = e._height, n = e._extrudedHeight, i = !CesiumMath.equalsEpsilon( + t, + n, + 0, + CesiumMath.EPSILON2 + ); + e._center = e._ellipsoid.scaleToGeodeticSurface( + e._center, + e._center + ); + const r = { + center: e._center, + semiMajorAxis: e._semiMajorAxis, + semiMinorAxis: e._semiMinorAxis, + ellipsoid: e._ellipsoid, + rotation: e._rotation, + height: t, + granularity: e._granularity, + numberOfVerticalLines: e._numberOfVerticalLines + }; + let o; + if (i) + r.extrudedHeight = n, r.offsetAttribute = e._offsetAttribute, o = computeExtrudedEllipse(r); + else if (o = computeEllipse(r), defined(e._offsetAttribute)) { + const s = o.attributes.position.values.length, c = e._offsetAttribute === GeometryOffsetAttribute$1.NONE ? 0 : 1, l = new Uint8Array(s / 3).fill(c); + o.attributes.applyOffset = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE, + componentsPerAttribute: 1, + values: l + }); + } + return new Geometry({ + attributes: o.attributes, + indices: o.indices, + primitiveType: PrimitiveType$1.LINES, + boundingSphere: o.boundingSphere, + offsetAttribute: e._offsetAttribute + }); +}; +const scratchColor$c = new Color(), defaultOffset$6 = Cartesian3.ZERO, offsetScratch$6 = new Cartesian3(), scratchRectangle$5 = new Rectangle(); +function EllipseGeometryOptions(e) { + this.id = e, this.vertexFormat = void 0, this.center = void 0, this.semiMajorAxis = void 0, this.semiMinorAxis = void 0, this.rotation = void 0, this.height = void 0, this.extrudedHeight = void 0, this.granularity = void 0, this.stRotation = void 0, this.numberOfVerticalLines = void 0, this.offsetAttribute = void 0; +} +function EllipseGeometryUpdater(e, t) { + GroundGeometryUpdater.call(this, { + entity: e, + scene: t, + geometryOptions: new EllipseGeometryOptions(e), + geometryPropertyName: "ellipse", + observedPropertyNames: ["availability", "position", "ellipse"] + }), this._onEntityPropertyChanged(e, "ellipse", e.ellipse, void 0); +} +defined(Object.create) && (EllipseGeometryUpdater.prototype = Object.create( + GroundGeometryUpdater.prototype +), EllipseGeometryUpdater.prototype.constructor = EllipseGeometryUpdater); +EllipseGeometryUpdater.prototype.createFillGeometryInstance = function(e) { + const t = this._entity, n = t.isAvailable(e), i = { + show: new ShowGeometryInstanceAttribute( + n && t.isShowing && this._showProperty.getValue(e) && this._fillProperty.getValue(e) + ), + distanceDisplayCondition: DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition( + this._distanceDisplayConditionProperty.getValue(e) + ), + offset: void 0, + color: void 0 + }; + if (this._materialProperty instanceof ColorMaterialProperty) { + let r; + defined(this._materialProperty.color) && (this._materialProperty.color.isConstant || n) && (r = this._materialProperty.color.getValue(e, scratchColor$c)), defined(r) || (r = Color.WHITE), i.color = ColorGeometryInstanceAttribute.fromColor(r); + } + return defined(this._options.offsetAttribute) && (i.offset = OffsetGeometryInstanceAttribute.fromCartesian3( + Property.getValueOrDefault( + this._terrainOffsetProperty, + e, + defaultOffset$6, + offsetScratch$6 + ) + )), new GeometryInstance({ + id: t, + geometry: new EllipseGeometry(this._options), + attributes: i + }); +}; +EllipseGeometryUpdater.prototype.createOutlineGeometryInstance = function(e) { + const t = this._entity, n = t.isAvailable(e), i = Property.getValueOrDefault( + this._outlineColorProperty, + e, + Color.BLACK, + scratchColor$c + ), r = this._distanceDisplayConditionProperty.getValue( + e + ), o = { + show: new ShowGeometryInstanceAttribute( + n && t.isShowing && this._showProperty.getValue(e) && this._showOutlineProperty.getValue(e) + ), + color: ColorGeometryInstanceAttribute.fromColor(i), + distanceDisplayCondition: DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition( + r + ), + offset: void 0 + }; + return defined(this._options.offsetAttribute) && (o.offset = OffsetGeometryInstanceAttribute.fromCartesian3( + Property.getValueOrDefault( + this._terrainOffsetProperty, + e, + defaultOffset$6, + offsetScratch$6 + ) + )), new GeometryInstance({ + id: t, + geometry: new EllipseOutlineGeometry(this._options), + attributes: o + }); +}; +EllipseGeometryUpdater.prototype._computeCenter = function(e, t) { + return Property.getValueOrUndefined(this._entity.position, e, t); +}; +EllipseGeometryUpdater.prototype._isHidden = function(e, t) { + const n = e.position; + return !defined(n) || !defined(t.semiMajorAxis) || !defined(t.semiMinorAxis) || GeometryUpdater.prototype._isHidden.call(this, e, t); +}; +EllipseGeometryUpdater.prototype._isDynamic = function(e, t) { + return !e.position.isConstant || // + !t.semiMajorAxis.isConstant || // + !t.semiMinorAxis.isConstant || // + !Property.isConstant(t.rotation) || // + !Property.isConstant(t.height) || // + !Property.isConstant(t.extrudedHeight) || // + !Property.isConstant(t.granularity) || // + !Property.isConstant(t.stRotation) || // + !Property.isConstant(t.outlineWidth) || // + !Property.isConstant(t.numberOfVerticalLines) || // + !Property.isConstant(t.zIndex) || // + this._onTerrain && !Property.isConstant(this._materialProperty) && !(this._materialProperty instanceof ColorMaterialProperty); +}; +EllipseGeometryUpdater.prototype._setStaticOptions = function(e, t) { + let n = Property.getValueOrUndefined( + t.height, + Iso8601.MINIMUM_VALUE + ); + const i = Property.getValueOrDefault( + t.heightReference, + Iso8601.MINIMUM_VALUE, + HeightReference$1.NONE + ); + let r = Property.getValueOrUndefined( + t.extrudedHeight, + Iso8601.MINIMUM_VALUE + ); + const o = Property.getValueOrDefault( + t.extrudedHeightReference, + Iso8601.MINIMUM_VALUE, + HeightReference$1.NONE + ); + defined(r) && !defined(n) && (n = 0); + const s = this._options; + s.vertexFormat = this._materialProperty instanceof ColorMaterialProperty ? PerInstanceColorAppearance.VERTEX_FORMAT : MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat, s.center = e.position.getValue( + Iso8601.MINIMUM_VALUE, + s.center + ), s.semiMajorAxis = t.semiMajorAxis.getValue( + Iso8601.MINIMUM_VALUE, + s.semiMajorAxis + ), s.semiMinorAxis = t.semiMinorAxis.getValue( + Iso8601.MINIMUM_VALUE, + s.semiMinorAxis + ), s.rotation = Property.getValueOrUndefined( + t.rotation, + Iso8601.MINIMUM_VALUE + ), s.granularity = Property.getValueOrUndefined( + t.granularity, + Iso8601.MINIMUM_VALUE + ), s.stRotation = Property.getValueOrUndefined( + t.stRotation, + Iso8601.MINIMUM_VALUE + ), s.numberOfVerticalLines = Property.getValueOrUndefined( + t.numberOfVerticalLines, + Iso8601.MINIMUM_VALUE + ), s.offsetAttribute = GroundGeometryUpdater.computeGeometryOffsetAttribute( + n, + i, + r, + o + ), s.height = GroundGeometryUpdater.getGeometryHeight( + n, + i + ), r = GroundGeometryUpdater.getGeometryExtrudedHeight( + r, + o + ), r === GroundGeometryUpdater.CLAMP_TO_GROUND && (r = ApproximateTerrainHeights.getMinimumMaximumHeights( + EllipseGeometry.computeRectangle(s, scratchRectangle$5) + ).minimumTerrainHeight), s.extrudedHeight = r; +}; +EllipseGeometryUpdater.DynamicGeometryUpdater = DynamicEllipseGeometryUpdater; +function DynamicEllipseGeometryUpdater(e, t, n) { + DynamicGeometryUpdater$1.call( + this, + e, + t, + n + ); +} +defined(Object.create) && (DynamicEllipseGeometryUpdater.prototype = Object.create( + DynamicGeometryUpdater$1.prototype +), DynamicEllipseGeometryUpdater.prototype.constructor = DynamicEllipseGeometryUpdater); +DynamicEllipseGeometryUpdater.prototype._isHidden = function(e, t, n) { + const i = this._options; + return !defined(i.center) || !defined(i.semiMajorAxis) || !defined(i.semiMinorAxis) || DynamicGeometryUpdater$1.prototype._isHidden.call(this, e, t, n); +}; +DynamicEllipseGeometryUpdater.prototype._setOptions = function(e, t, n) { + const i = this._options; + let r = Property.getValueOrUndefined(t.height, n); + const o = Property.getValueOrDefault( + t.heightReference, + n, + HeightReference$1.NONE + ); + let s = Property.getValueOrUndefined( + t.extrudedHeight, + n + ); + const c = Property.getValueOrDefault( + t.extrudedHeightReference, + n, + HeightReference$1.NONE + ); + defined(s) && !defined(r) && (r = 0), i.center = Property.getValueOrUndefined( + e.position, + n, + i.center + ), i.semiMajorAxis = Property.getValueOrUndefined( + t.semiMajorAxis, + n + ), i.semiMinorAxis = Property.getValueOrUndefined( + t.semiMinorAxis, + n + ), i.rotation = Property.getValueOrUndefined(t.rotation, n), i.granularity = Property.getValueOrUndefined(t.granularity, n), i.stRotation = Property.getValueOrUndefined(t.stRotation, n), i.numberOfVerticalLines = Property.getValueOrUndefined( + t.numberOfVerticalLines, + n + ), i.offsetAttribute = GroundGeometryUpdater.computeGeometryOffsetAttribute( + r, + o, + s, + c + ), i.height = GroundGeometryUpdater.getGeometryHeight( + r, + o + ), s = GroundGeometryUpdater.getGeometryExtrudedHeight( + s, + c + ), s === GroundGeometryUpdater.CLAMP_TO_GROUND && (s = ApproximateTerrainHeights.getMinimumMaximumHeights( + EllipseGeometry.computeRectangle(i, scratchRectangle$5) + ).minimumTerrainHeight), i.extrudedHeight = s; +}; +const scratchPosition$7 = new Cartesian3(), scratchNormal$4 = new Cartesian3(), scratchTangent$2 = new Cartesian3(), scratchBitangent$2 = new Cartesian3(), scratchNormalST = new Cartesian3(), defaultRadii = new Cartesian3(1, 1, 1), cos = Math.cos, sin = Math.sin; +function EllipsoidGeometry(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = defaultValue(e.radii, defaultRadii), n = defaultValue(e.innerRadii, t), i = defaultValue(e.minimumClock, 0), r = defaultValue(e.maximumClock, CesiumMath.TWO_PI), o = defaultValue(e.minimumCone, 0), s = defaultValue(e.maximumCone, CesiumMath.PI), c = Math.round(defaultValue(e.stackPartitions, 64)), l = Math.round(defaultValue(e.slicePartitions, 64)), d = defaultValue(e.vertexFormat, VertexFormat.DEFAULT); + this._radii = Cartesian3.clone(t), this._innerRadii = Cartesian3.clone(n), this._minimumClock = i, this._maximumClock = r, this._minimumCone = o, this._maximumCone = s, this._stackPartitions = c, this._slicePartitions = l, this._vertexFormat = VertexFormat.clone(d), this._offsetAttribute = e.offsetAttribute, this._workerName = "createEllipsoidGeometry"; +} +EllipsoidGeometry.packedLength = 2 * Cartesian3.packedLength + VertexFormat.packedLength + 7; +EllipsoidGeometry.pack = function(e, t, n) { + return n = defaultValue(n, 0), Cartesian3.pack(e._radii, t, n), n += Cartesian3.packedLength, Cartesian3.pack(e._innerRadii, t, n), n += Cartesian3.packedLength, VertexFormat.pack(e._vertexFormat, t, n), n += VertexFormat.packedLength, t[n++] = e._minimumClock, t[n++] = e._maximumClock, t[n++] = e._minimumCone, t[n++] = e._maximumCone, t[n++] = e._stackPartitions, t[n++] = e._slicePartitions, t[n] = defaultValue(e._offsetAttribute, -1), t; +}; +const scratchRadii$1 = new Cartesian3(), scratchInnerRadii = new Cartesian3(), scratchVertexFormat$7 = new VertexFormat(), scratchOptions$b = { + radii: scratchRadii$1, + innerRadii: scratchInnerRadii, + vertexFormat: scratchVertexFormat$7, + minimumClock: void 0, + maximumClock: void 0, + minimumCone: void 0, + maximumCone: void 0, + stackPartitions: void 0, + slicePartitions: void 0, + offsetAttribute: void 0 +}; +EllipsoidGeometry.unpack = function(e, t, n) { + t = defaultValue(t, 0); + const i = Cartesian3.unpack(e, t, scratchRadii$1); + t += Cartesian3.packedLength; + const r = Cartesian3.unpack(e, t, scratchInnerRadii); + t += Cartesian3.packedLength; + const o = VertexFormat.unpack( + e, + t, + scratchVertexFormat$7 + ); + t += VertexFormat.packedLength; + const s = e[t++], c = e[t++], l = e[t++], d = e[t++], f = e[t++], h = e[t++], p = e[t]; + return defined(n) ? (n._radii = Cartesian3.clone(i, n._radii), n._innerRadii = Cartesian3.clone(r, n._innerRadii), n._vertexFormat = VertexFormat.clone(o, n._vertexFormat), n._minimumClock = s, n._maximumClock = c, n._minimumCone = l, n._maximumCone = d, n._stackPartitions = f, n._slicePartitions = h, n._offsetAttribute = p === -1 ? void 0 : p, n) : (scratchOptions$b.minimumClock = s, scratchOptions$b.maximumClock = c, scratchOptions$b.minimumCone = l, scratchOptions$b.maximumCone = d, scratchOptions$b.stackPartitions = f, scratchOptions$b.slicePartitions = h, scratchOptions$b.offsetAttribute = p === -1 ? void 0 : p, new EllipsoidGeometry(scratchOptions$b)); +}; +EllipsoidGeometry.createGeometry = function(e) { + const t = e._radii; + if (t.x <= 0 || t.y <= 0 || t.z <= 0) + return; + const n = e._innerRadii; + if (n.x <= 0 || n.y <= 0 || n.z <= 0) + return; + const i = e._minimumClock, r = e._maximumClock, o = e._minimumCone, s = e._maximumCone, c = e._vertexFormat; + let l = e._slicePartitions + 1, d = e._stackPartitions + 1; + l = Math.round( + l * Math.abs(r - i) / CesiumMath.TWO_PI + ), d = Math.round( + d * Math.abs(s - o) / CesiumMath.PI + ), l < 2 && (l = 2), d < 2 && (d = 2); + let f, h, p = 0; + const m = [o], _ = [i]; + for (f = 0; f < d; f++) + m.push( + o + f * (s - o) / (d - 1) + ); + for (m.push(s), h = 0; h < l; h++) + _.push( + i + h * (r - i) / (l - 1) + ); + _.push(r); + const y = m.length, C = _.length; + let T = 0, x = 1; + const b = n.x !== t.x || n.y !== t.y || n.z !== t.z; + let S = !1, E = !1, A = !1; + b && (x = 2, o > 0 && (S = !0, T += l - 1), s < Math.PI && (E = !0, T += l - 1), (r - i) % CesiumMath.TWO_PI ? (A = !0, T += (d - 1) * 2 + 1) : T += 1); + const D = C * y * x, P = new Float64Array(D * 3), I = new Array(D).fill(!1), M = new Array(D).fill(!1), R = l * d * x, L = 6 * (R + T + 1 - (l + d) * x), g = IndexDatatype$1.createTypedArray(R, L), w = c.normal ? new Float32Array(D * 3) : void 0, O = c.tangent ? new Float32Array(D * 3) : void 0, N = c.bitangent ? new Float32Array(D * 3) : void 0, F = c.st ? new Float32Array(D * 2) : void 0, B = new Array(y), V = new Array(y); + for (f = 0; f < y; f++) + B[f] = sin(m[f]), V[f] = cos(m[f]); + const U = new Array(C), k = new Array(C); + for (h = 0; h < C; h++) + k[h] = cos(_[h]), U[h] = sin(_[h]); + for (f = 0; f < y; f++) + for (h = 0; h < C; h++) + P[p++] = t.x * B[f] * k[h], P[p++] = t.y * B[f] * U[h], P[p++] = t.z * V[f]; + let $ = D / 2; + if (b) + for (f = 0; f < y; f++) + for (h = 0; h < C; h++) + P[p++] = n.x * B[f] * k[h], P[p++] = n.y * B[f] * U[h], P[p++] = n.z * V[f], I[$] = !0, f > 0 && f !== y - 1 && h !== 0 && h !== C - 1 && (M[$] = !0), $++; + p = 0; + let G, q; + for (f = 1; f < y - 2; f++) + for (G = f * C, q = (f + 1) * C, h = 1; h < C - 2; h++) + g[p++] = q + h, g[p++] = q + h + 1, g[p++] = G + h + 1, g[p++] = q + h, g[p++] = G + h + 1, g[p++] = G + h; + if (b) { + const ce = y * C; + for (f = 1; f < y - 2; f++) + for (G = ce + f * C, q = ce + (f + 1) * C, h = 1; h < C - 2; h++) + g[p++] = q + h, g[p++] = G + h, g[p++] = G + h + 1, g[p++] = q + h, g[p++] = G + h + 1, g[p++] = q + h + 1; + } + let z, H; + if (b) { + if (S) + for (H = y * C, f = 1; f < C - 2; f++) + g[p++] = f, g[p++] = f + 1, g[p++] = H + f + 1, g[p++] = f, g[p++] = H + f + 1, g[p++] = H + f; + if (E) + for (z = y * C - C, H = y * C * x - C, f = 1; f < C - 2; f++) + g[p++] = z + f + 1, g[p++] = z + f, g[p++] = H + f, g[p++] = z + f + 1, g[p++] = H + f, g[p++] = H + f + 1; + } + if (A) { + for (f = 1; f < y - 2; f++) + H = C * y + C * f, z = C * f, g[p++] = H, g[p++] = z + C, g[p++] = z, g[p++] = H, g[p++] = H + C, g[p++] = z + C; + for (f = 1; f < y - 2; f++) + H = C * y + C * (f + 1) - 1, z = C * (f + 1) - 1, g[p++] = z + C, g[p++] = H, g[p++] = z, g[p++] = z + C, g[p++] = H + C, g[p++] = H; + } + const Q = new GeometryAttributes(); + c.position && (Q.position = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.DOUBLE, + componentsPerAttribute: 3, + values: P + })); + let ne = 0, K = 0, Z = 0, ee = 0; + const oe = D / 2; + let X; + const fe = Ellipsoid.fromCartesian3(t), de = Ellipsoid.fromCartesian3(n); + if (c.st || c.normal || c.tangent || c.bitangent) { + for (f = 0; f < D; f++) { + X = I[f] ? de : fe; + const ce = Cartesian3.fromArray(P, f * 3, scratchPosition$7), ye = X.geodeticSurfaceNormal(ce, scratchNormal$4); + if (M[f] && Cartesian3.negate(ye, ye), c.st) { + const ge = Cartesian2.negate(ye, scratchNormalST); + F[ne++] = Math.atan2(ge.y, ge.x) / CesiumMath.TWO_PI + 0.5, F[ne++] = Math.asin(ye.z) / Math.PI + 0.5; + } + if (c.normal && (w[K++] = ye.x, w[K++] = ye.y, w[K++] = ye.z), c.tangent || c.bitangent) { + const ge = scratchTangent$2; + let re = 0, be; + if (I[f] && (re = oe), !S && f >= re && f < re + C * 2 ? be = Cartesian3.UNIT_X : be = Cartesian3.UNIT_Z, Cartesian3.cross(be, ye, ge), Cartesian3.normalize(ge, ge), c.tangent && (O[Z++] = ge.x, O[Z++] = ge.y, O[Z++] = ge.z), c.bitangent) { + const pe = Cartesian3.cross(ye, ge, scratchBitangent$2); + Cartesian3.normalize(pe, pe), N[ee++] = pe.x, N[ee++] = pe.y, N[ee++] = pe.z; + } + } + } + c.st && (Q.st = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 2, + values: F + })), c.normal && (Q.normal = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 3, + values: w + })), c.tangent && (Q.tangent = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 3, + values: O + })), c.bitangent && (Q.bitangent = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 3, + values: N + })); + } + if (defined(e._offsetAttribute)) { + const ce = P.length, ye = e._offsetAttribute === GeometryOffsetAttribute$1.NONE ? 0 : 1, ge = new Uint8Array(ce / 3).fill(ye); + Q.applyOffset = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE, + componentsPerAttribute: 1, + values: ge + }); + } + return new Geometry({ + attributes: Q, + indices: g, + primitiveType: PrimitiveType$1.TRIANGLES, + boundingSphere: BoundingSphere.fromEllipsoid(fe), + offsetAttribute: e._offsetAttribute + }); +}; +let unitEllipsoidGeometry; +EllipsoidGeometry.getUnitEllipsoid = function() { + return defined(unitEllipsoidGeometry) || (unitEllipsoidGeometry = EllipsoidGeometry.createGeometry( + new EllipsoidGeometry({ + radii: new Cartesian3(1, 1, 1), + vertexFormat: VertexFormat.POSITION_ONLY + }) + )), unitEllipsoidGeometry; +}; +const defaultMaterial$1 = new ColorMaterialProperty(Color.WHITE), defaultOffset$5 = Cartesian3.ZERO, offsetScratch$5 = new Cartesian3(), radiiScratch = new Cartesian3(), innerRadiiScratch = new Cartesian3(), scratchColor$b = new Color(), unitSphere = new Cartesian3(1, 1, 1); +function EllipsoidGeometryOptions(e) { + this.id = e, this.vertexFormat = void 0, this.radii = void 0, this.innerRadii = void 0, this.minimumClock = void 0, this.maximumClock = void 0, this.minimumCone = void 0, this.maximumCone = void 0, this.stackPartitions = void 0, this.slicePartitions = void 0, this.subdivisions = void 0, this.offsetAttribute = void 0; +} +function EllipsoidGeometryUpdater(e, t) { + GeometryUpdater.call(this, { + entity: e, + scene: t, + geometryOptions: new EllipsoidGeometryOptions(e), + geometryPropertyName: "ellipsoid", + observedPropertyNames: [ + "availability", + "position", + "orientation", + "ellipsoid" + ] + }), this._onEntityPropertyChanged( + e, + "ellipsoid", + e.ellipsoid, + void 0 + ); +} +defined(Object.create) && (EllipsoidGeometryUpdater.prototype = Object.create(GeometryUpdater.prototype), EllipsoidGeometryUpdater.prototype.constructor = EllipsoidGeometryUpdater); +Object.defineProperties(EllipsoidGeometryUpdater.prototype, { + /** + * Gets the terrain offset property + * @type {TerrainOffsetProperty} + * @memberof EllipsoidGeometryUpdater.prototype + * @readonly + * @private + */ + terrainOffsetProperty: { + get: function() { + return this._terrainOffsetProperty; + } + } +}); +EllipsoidGeometryUpdater.prototype.createFillGeometryInstance = function(e, t, n) { + const i = this._entity, r = i.isAvailable(e); + let o; + const s = new ShowGeometryInstanceAttribute( + r && i.isShowing && this._showProperty.getValue(e) && this._fillProperty.getValue(e) + ), c = this._distanceDisplayConditionProperty.getValue( + e + ), l = DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition( + c + ), d = { + show: s, + distanceDisplayCondition: l, + color: void 0, + offset: void 0 + }; + if (this._materialProperty instanceof ColorMaterialProperty) { + let f; + defined(this._materialProperty.color) && (this._materialProperty.color.isConstant || r) && (f = this._materialProperty.color.getValue(e, scratchColor$b)), defined(f) || (f = Color.WHITE), o = ColorGeometryInstanceAttribute.fromColor(f), d.color = o; + } + return defined(this._options.offsetAttribute) && (d.offset = OffsetGeometryInstanceAttribute.fromCartesian3( + Property.getValueOrDefault( + this._terrainOffsetProperty, + e, + defaultOffset$5, + offsetScratch$5 + ) + )), new GeometryInstance({ + id: i, + geometry: new EllipsoidGeometry(this._options), + modelMatrix: t ? void 0 : i.computeModelMatrixForHeightReference( + e, + i.ellipsoid.heightReference, + this._options.radii.z * 0.5, + this._scene.ellipsoid, + n + ), + attributes: d + }); +}; +EllipsoidGeometryUpdater.prototype.createOutlineGeometryInstance = function(e, t, n) { + const i = this._entity, r = i.isAvailable(e), o = Property.getValueOrDefault( + this._outlineColorProperty, + e, + Color.BLACK, + scratchColor$b + ), s = this._distanceDisplayConditionProperty.getValue( + e + ), c = { + show: new ShowGeometryInstanceAttribute( + r && i.isShowing && this._showProperty.getValue(e) && this._showOutlineProperty.getValue(e) + ), + color: ColorGeometryInstanceAttribute.fromColor(o), + distanceDisplayCondition: DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition( + s + ), + offset: void 0 + }; + return defined(this._options.offsetAttribute) && (c.offset = OffsetGeometryInstanceAttribute.fromCartesian3( + Property.getValueOrDefault( + this._terrainOffsetProperty, + e, + defaultOffset$5, + offsetScratch$5 + ) + )), new GeometryInstance({ + id: i, + geometry: new EllipsoidOutlineGeometry(this._options), + modelMatrix: t ? void 0 : i.computeModelMatrixForHeightReference( + e, + i.ellipsoid.heightReference, + this._options.radii.z * 0.5, + this._scene.ellipsoid, + n + ), + attributes: c + }); +}; +EllipsoidGeometryUpdater.prototype._computeCenter = function(e, t) { + return Property.getValueOrUndefined(this._entity.position, e, t); +}; +EllipsoidGeometryUpdater.prototype._isHidden = function(e, t) { + return !defined(e.position) || !defined(t.radii) || GeometryUpdater.prototype._isHidden.call(this, e, t); +}; +EllipsoidGeometryUpdater.prototype._isDynamic = function(e, t) { + return !e.position.isConstant || // + !Property.isConstant(e.orientation) || // + !t.radii.isConstant || // + !Property.isConstant(t.innerRadii) || // + !Property.isConstant(t.stackPartitions) || // + !Property.isConstant(t.slicePartitions) || // + !Property.isConstant(t.outlineWidth) || // + !Property.isConstant(t.minimumClock) || // + !Property.isConstant(t.maximumClock) || // + !Property.isConstant(t.minimumCone) || // + !Property.isConstant(t.maximumCone) || // + !Property.isConstant(t.subdivisions); +}; +EllipsoidGeometryUpdater.prototype._setStaticOptions = function(e, t) { + const n = Property.getValueOrDefault( + t.heightReference, + Iso8601.MINIMUM_VALUE, + HeightReference$1.NONE + ), i = this._options; + i.vertexFormat = this._materialProperty instanceof ColorMaterialProperty ? PerInstanceColorAppearance.VERTEX_FORMAT : MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat, i.radii = t.radii.getValue( + Iso8601.MINIMUM_VALUE, + i.radii + ), i.innerRadii = Property.getValueOrUndefined( + t.innerRadii, + i.radii + ), i.minimumClock = Property.getValueOrUndefined( + t.minimumClock, + Iso8601.MINIMUM_VALUE + ), i.maximumClock = Property.getValueOrUndefined( + t.maximumClock, + Iso8601.MINIMUM_VALUE + ), i.minimumCone = Property.getValueOrUndefined( + t.minimumCone, + Iso8601.MINIMUM_VALUE + ), i.maximumCone = Property.getValueOrUndefined( + t.maximumCone, + Iso8601.MINIMUM_VALUE + ), i.stackPartitions = Property.getValueOrUndefined( + t.stackPartitions, + Iso8601.MINIMUM_VALUE + ), i.slicePartitions = Property.getValueOrUndefined( + t.slicePartitions, + Iso8601.MINIMUM_VALUE + ), i.subdivisions = Property.getValueOrUndefined( + t.subdivisions, + Iso8601.MINIMUM_VALUE + ), i.offsetAttribute = n !== HeightReference$1.NONE ? GeometryOffsetAttribute$1.ALL : void 0; +}; +EllipsoidGeometryUpdater.prototype._onEntityPropertyChanged = heightReferenceOnEntityPropertyChanged; +EllipsoidGeometryUpdater.DynamicGeometryUpdater = DynamicEllipsoidGeometryUpdater; +function DynamicEllipsoidGeometryUpdater(e, t, n) { + DynamicGeometryUpdater$1.call( + this, + e, + t, + n + ), this._scene = e._scene, this._modelMatrix = new Matrix4(), this._attributes = void 0, this._outlineAttributes = void 0, this._lastSceneMode = void 0, this._lastShow = void 0, this._lastOutlineShow = void 0, this._lastOutlineWidth = void 0, this._lastOutlineColor = void 0, this._lastOffset = new Cartesian3(), this._material = {}; +} +defined(Object.create) && (DynamicEllipsoidGeometryUpdater.prototype = Object.create( + DynamicGeometryUpdater$1.prototype +), DynamicEllipsoidGeometryUpdater.prototype.constructor = DynamicEllipsoidGeometryUpdater); +DynamicEllipsoidGeometryUpdater.prototype.update = function(e) { + const t = this._entity, n = t.ellipsoid; + if (!t.isShowing || !t.isAvailable(e) || !Property.getValueOrDefault(n.show, e, !0)) { + defined(this._primitive) && (this._primitive.show = !1), defined(this._outlinePrimitive) && (this._outlinePrimitive.show = !1); + return; + } + const i = Property.getValueOrUndefined( + n.radii, + e, + radiiScratch + ); + let r = defined(i) ? t.computeModelMatrixForHeightReference( + e, + n.heightReference, + i.z * 0.5, + this._scene.ellipsoid, + this._modelMatrix + ) : void 0; + if (!defined(r) || !defined(i)) { + defined(this._primitive) && (this._primitive.show = !1), defined(this._outlinePrimitive) && (this._outlinePrimitive.show = !1); + return; + } + const o = Property.getValueOrDefault(n.fill, e, !0), s = Property.getValueOrDefault( + n.outline, + e, + !1 + ), c = Property.getValueOrClonedDefault( + n.outlineColor, + e, + Color.BLACK, + scratchColor$b + ), l = MaterialProperty.getValue( + e, + defaultValue(n.material, defaultMaterial$1), + this._material + ), d = Property.getValueOrUndefined( + n.innerRadii, + e, + innerRadiiScratch + ), f = Property.getValueOrUndefined( + n.minimumClock, + e + ), h = Property.getValueOrUndefined( + n.maximumClock, + e + ), p = Property.getValueOrUndefined(n.minimumCone, e), m = Property.getValueOrUndefined(n.maximumCone, e), _ = Property.getValueOrUndefined( + n.stackPartitions, + e + ), y = Property.getValueOrUndefined( + n.slicePartitions, + e + ), C = Property.getValueOrUndefined( + n.subdivisions, + e + ), T = Property.getValueOrDefault( + n.outlineWidth, + e, + 1 + ), x = Property.getValueOrDefault( + n.heightReference, + e, + HeightReference$1.NONE + ), b = x !== HeightReference$1.NONE ? GeometryOffsetAttribute$1.ALL : void 0, S = this._scene.mode, E = S === SceneMode$1.SCENE3D && x === HeightReference$1.NONE, A = this._options, D = this._geometryUpdater.shadowsProperty.getValue(e), I = this._geometryUpdater.distanceDisplayConditionProperty.getValue( + e + ), M = Property.getValueOrDefault( + this._geometryUpdater.terrainOffsetProperty, + e, + defaultOffset$5, + offsetScratch$5 + ); + if (!E || this._lastSceneMode !== S || !defined(this._primitive) || // + A.stackPartitions !== _ || A.slicePartitions !== y || // + defined(d) && !Cartesian3.equals(A.innerRadii !== d) || A.minimumClock !== f || // + A.maximumClock !== h || A.minimumCone !== p || // + A.maximumCone !== m || A.subdivisions !== C || // + this._lastOutlineWidth !== T || A.offsetAttribute !== b) { + const L = this._primitives; + L.removeAndDestroy(this._primitive), L.removeAndDestroy(this._outlinePrimitive), this._primitive = void 0, this._outlinePrimitive = void 0, this._lastSceneMode = S, this._lastOutlineWidth = T, A.stackPartitions = _, A.slicePartitions = y, A.subdivisions = C, A.offsetAttribute = b, A.radii = Cartesian3.clone(E ? unitSphere : i, A.radii), defined(d) ? E ? A.innerRadii = Cartesian3.fromElements( + d.x / i.x, + d.y / i.y, + d.z / i.z, + A.innerRadii + ) : A.innerRadii = Cartesian3.clone(d, A.innerRadii) : A.innerRadii = void 0, A.minimumClock = f, A.maximumClock = h, A.minimumCone = p, A.maximumCone = m; + const g = new MaterialAppearance({ + material: l, + translucent: l.isTranslucent(), + closed: !0 + }); + A.vertexFormat = g.vertexFormat; + const w = this._geometryUpdater.createFillGeometryInstance( + e, + E, + this._modelMatrix + ); + this._primitive = L.add( + new Primitive$3({ + geometryInstances: w, + appearance: g, + asynchronous: !1, + shadows: D + }) + ); + const O = this._geometryUpdater.createOutlineGeometryInstance( + e, + E, + this._modelMatrix + ); + this._outlinePrimitive = L.add( + new Primitive$3({ + geometryInstances: O, + appearance: new PerInstanceColorAppearance({ + flat: !0, + translucent: O.attributes.color.value[3] !== 255, + renderState: { + lineWidth: this._geometryUpdater._scene.clampLineWidth( + T + ) + } + }), + asynchronous: !1, + shadows: D + }) + ), this._lastShow = o, this._lastOutlineShow = s, this._lastOutlineColor = Color.clone(c, this._lastOutlineColor), this._lastDistanceDisplayCondition = I, this._lastOffset = Cartesian3.clone(M, this._lastOffset); + } else if (this._primitive.ready) { + const L = this._primitive, g = this._outlinePrimitive; + L.show = !0, g.show = !0, L.appearance.material = l; + let w = this._attributes; + defined(w) || (w = L.getGeometryInstanceAttributes(t), this._attributes = w), o !== this._lastShow && (w.show = ShowGeometryInstanceAttribute.toValue( + o, + w.show + ), this._lastShow = o); + let O = this._outlineAttributes; + defined(O) || (O = g.getGeometryInstanceAttributes( + t + ), this._outlineAttributes = O), s !== this._lastOutlineShow && (O.show = ShowGeometryInstanceAttribute.toValue( + s, + O.show + ), this._lastOutlineShow = s), Color.equals(c, this._lastOutlineColor) || (O.color = ColorGeometryInstanceAttribute.toValue( + c, + O.color + ), Color.clone(c, this._lastOutlineColor)), DistanceDisplayCondition.equals( + I, + this._lastDistanceDisplayCondition + ) || (w.distanceDisplayCondition = DistanceDisplayConditionGeometryInstanceAttribute.toValue( + I, + w.distanceDisplayCondition + ), O.distanceDisplayCondition = DistanceDisplayConditionGeometryInstanceAttribute.toValue( + I, + O.distanceDisplayCondition + ), DistanceDisplayCondition.clone( + I, + this._lastDistanceDisplayCondition + )), Cartesian3.equals(M, this._lastOffset) || (w.offset = OffsetGeometryInstanceAttribute.toValue( + M, + w.offset + ), O.offset = OffsetGeometryInstanceAttribute.toValue( + M, + w.offset + ), Cartesian3.clone(M, this._lastOffset)); + } + E && (i.x = Math.max(i.x, 1e-3), i.y = Math.max(i.y, 1e-3), i.z = Math.max(i.z, 1e-3), r = Matrix4.multiplyByScale(r, i, r), this._primitive.modelMatrix = r, this._outlinePrimitive.modelMatrix = r); +}; +function PlaneGeometry(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = defaultValue(e.vertexFormat, VertexFormat.DEFAULT); + this._vertexFormat = t, this._workerName = "createPlaneGeometry"; +} +PlaneGeometry.packedLength = VertexFormat.packedLength; +PlaneGeometry.pack = function(e, t, n) { + return n = defaultValue(n, 0), VertexFormat.pack(e._vertexFormat, t, n), t; +}; +const scratchVertexFormat$6 = new VertexFormat(), scratchOptions$a = { + vertexFormat: scratchVertexFormat$6 +}; +PlaneGeometry.unpack = function(e, t, n) { + t = defaultValue(t, 0); + const i = VertexFormat.unpack( + e, + t, + scratchVertexFormat$6 + ); + return defined(n) ? (n._vertexFormat = VertexFormat.clone(i, n._vertexFormat), n) : new PlaneGeometry(scratchOptions$a); +}; +const min$1 = new Cartesian3(-0.5, -0.5, 0), max$1 = new Cartesian3(0.5, 0.5, 0); +PlaneGeometry.createGeometry = function(e) { + const t = e._vertexFormat, n = new GeometryAttributes(); + let i, r; + if (t.position) { + if (r = new Float64Array(4 * 3), r[0] = min$1.x, r[1] = min$1.y, r[2] = 0, r[3] = max$1.x, r[4] = min$1.y, r[5] = 0, r[6] = max$1.x, r[7] = max$1.y, r[8] = 0, r[9] = min$1.x, r[10] = max$1.y, r[11] = 0, n.position = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.DOUBLE, + componentsPerAttribute: 3, + values: r + }), t.normal) { + const o = new Float32Array(12); + o[0] = 0, o[1] = 0, o[2] = 1, o[3] = 0, o[4] = 0, o[5] = 1, o[6] = 0, o[7] = 0, o[8] = 1, o[9] = 0, o[10] = 0, o[11] = 1, n.normal = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 3, + values: o + }); + } + if (t.st) { + const o = new Float32Array(8); + o[0] = 0, o[1] = 0, o[2] = 1, o[3] = 0, o[4] = 1, o[5] = 1, o[6] = 0, o[7] = 1, n.st = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 2, + values: o + }); + } + if (t.tangent) { + const o = new Float32Array(12); + o[0] = 1, o[1] = 0, o[2] = 0, o[3] = 1, o[4] = 0, o[5] = 0, o[6] = 1, o[7] = 0, o[8] = 0, o[9] = 1, o[10] = 0, o[11] = 0, n.tangent = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 3, + values: o + }); + } + if (t.bitangent) { + const o = new Float32Array(12); + o[0] = 0, o[1] = 1, o[2] = 0, o[3] = 0, o[4] = 1, o[5] = 0, o[6] = 0, o[7] = 1, o[8] = 0, o[9] = 0, o[10] = 1, o[11] = 0, n.bitangent = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 3, + values: o + }); + } + i = new Uint16Array(2 * 3), i[0] = 0, i[1] = 1, i[2] = 2, i[3] = 0, i[4] = 2, i[5] = 3; + } + return new Geometry({ + attributes: n, + indices: i, + primitiveType: PrimitiveType$1.TRIANGLES, + boundingSphere: new BoundingSphere(Cartesian3.ZERO, Math.sqrt(2)) + }); +}; +function PlaneOutlineGeometry() { + this._workerName = "createPlaneOutlineGeometry"; +} +PlaneOutlineGeometry.packedLength = 0; +PlaneOutlineGeometry.pack = function(e, t) { + return t; +}; +PlaneOutlineGeometry.unpack = function(e, t, n) { + return defined(n) ? n : new PlaneOutlineGeometry(); +}; +const min = new Cartesian3(-0.5, -0.5, 0), max = new Cartesian3(0.5, 0.5, 0); +PlaneOutlineGeometry.createGeometry = function() { + const e = new GeometryAttributes(), t = new Uint16Array(4 * 2), n = new Float64Array(4 * 3); + return n[0] = min.x, n[1] = min.y, n[2] = min.z, n[3] = max.x, n[4] = min.y, n[5] = min.z, n[6] = max.x, n[7] = max.y, n[8] = min.z, n[9] = min.x, n[10] = max.y, n[11] = min.z, e.position = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.DOUBLE, + componentsPerAttribute: 3, + values: n + }), t[0] = 0, t[1] = 1, t[2] = 1, t[3] = 2, t[4] = 2, t[5] = 3, t[6] = 3, t[7] = 0, new Geometry({ + attributes: e, + indices: t, + primitiveType: PrimitiveType$1.LINES, + boundingSphere: new BoundingSphere(Cartesian3.ZERO, Math.sqrt(2)) + }); +}; +const positionScratch$3 = new Cartesian3(), scratchColor$a = new Color(); +function PlaneGeometryOptions(e) { + this.id = e, this.vertexFormat = void 0, this.plane = void 0, this.dimensions = void 0; +} +function PlaneGeometryUpdater(e, t) { + GeometryUpdater.call(this, { + entity: e, + scene: t, + geometryOptions: new PlaneGeometryOptions(e), + geometryPropertyName: "plane", + observedPropertyNames: ["availability", "position", "orientation", "plane"] + }), this._onEntityPropertyChanged(e, "plane", e.plane, void 0); +} +defined(Object.create) && (PlaneGeometryUpdater.prototype = Object.create(GeometryUpdater.prototype), PlaneGeometryUpdater.prototype.constructor = PlaneGeometryUpdater); +PlaneGeometryUpdater.prototype.createFillGeometryInstance = function(e) { + const t = this._entity, n = t.isAvailable(e); + let i, r; + const o = new ShowGeometryInstanceAttribute( + n && t.isShowing && this._showProperty.getValue(e) && this._fillProperty.getValue(e) + ), s = this._distanceDisplayConditionProperty.getValue( + e + ), c = DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition( + s + ); + if (this._materialProperty instanceof ColorMaterialProperty) { + let m; + defined(this._materialProperty.color) && (this._materialProperty.color.isConstant || n) && (m = this._materialProperty.color.getValue(e, scratchColor$a)), defined(m) || (m = Color.WHITE), r = ColorGeometryInstanceAttribute.fromColor(m), i = { + show: o, + distanceDisplayCondition: c, + color: r + }; + } else + i = { + show: o, + distanceDisplayCondition: c + }; + const l = t.plane, d = this._options; + let f = t.computeModelMatrix(e); + const h = Property.getValueOrDefault( + l.plane, + e, + d.plane + ), p = Property.getValueOrUndefined( + l.dimensions, + e, + d.dimensions + ); + return d.plane = h, d.dimensions = p, f = createPrimitiveMatrix( + h, + p, + f, + f + ), new GeometryInstance({ + id: t, + geometry: new PlaneGeometry(this._options), + modelMatrix: f, + attributes: i + }); +}; +PlaneGeometryUpdater.prototype.createOutlineGeometryInstance = function(e) { + const t = this._entity, n = t.isAvailable(e), i = Property.getValueOrDefault( + this._outlineColorProperty, + e, + Color.BLACK, + scratchColor$a + ), r = this._distanceDisplayConditionProperty.getValue( + e + ), o = t.plane, s = this._options; + let c = t.computeModelMatrix(e); + const l = Property.getValueOrDefault( + o.plane, + e, + s.plane + ), d = Property.getValueOrUndefined( + o.dimensions, + e, + s.dimensions + ); + return s.plane = l, s.dimensions = d, c = createPrimitiveMatrix( + l, + d, + c, + c + ), new GeometryInstance({ + id: t, + geometry: new PlaneOutlineGeometry(), + modelMatrix: c, + attributes: { + show: new ShowGeometryInstanceAttribute( + n && t.isShowing && this._showProperty.getValue(e) && this._showOutlineProperty.getValue(e) + ), + color: ColorGeometryInstanceAttribute.fromColor(i), + distanceDisplayCondition: DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition( + r + ) + } + }); +}; +PlaneGeometryUpdater.prototype._isHidden = function(e, t) { + return !defined(t.plane) || !defined(t.dimensions) || !defined(e.position) || GeometryUpdater.prototype._isHidden.call(this, e, t); +}; +PlaneGeometryUpdater.prototype._getIsClosed = function(e) { + return !1; +}; +PlaneGeometryUpdater.prototype._isDynamic = function(e, t) { + return !e.position.isConstant || // + !Property.isConstant(e.orientation) || // + !t.plane.isConstant || // + !t.dimensions.isConstant || // + !Property.isConstant(t.outlineWidth); +}; +PlaneGeometryUpdater.prototype._setStaticOptions = function(e, t) { + const n = this._materialProperty instanceof ColorMaterialProperty, i = this._options; + i.vertexFormat = n ? PerInstanceColorAppearance.VERTEX_FORMAT : MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat, i.plane = t.plane.getValue(Iso8601.MINIMUM_VALUE, i.plane), i.dimensions = t.dimensions.getValue( + Iso8601.MINIMUM_VALUE, + i.dimensions + ); +}; +PlaneGeometryUpdater.DynamicGeometryUpdater = DynamicPlaneGeometryUpdater; +function DynamicPlaneGeometryUpdater(e, t, n) { + DynamicGeometryUpdater$1.call( + this, + e, + t, + n + ); +} +defined(Object.create) && (DynamicPlaneGeometryUpdater.prototype = Object.create( + DynamicGeometryUpdater$1.prototype +), DynamicPlaneGeometryUpdater.prototype.constructor = DynamicPlaneGeometryUpdater); +DynamicPlaneGeometryUpdater.prototype._isHidden = function(e, t, n) { + const i = this._options, r = Property.getValueOrUndefined( + e.position, + n, + positionScratch$3 + ); + return !defined(r) || !defined(i.plane) || !defined(i.dimensions) || DynamicGeometryUpdater$1.prototype._isHidden.call(this, e, t, n); +}; +DynamicPlaneGeometryUpdater.prototype._setOptions = function(e, t, n) { + const i = this._options; + i.plane = Property.getValueOrDefault(t.plane, n, i.plane), i.dimensions = Property.getValueOrUndefined( + t.dimensions, + n, + i.dimensions + ); +}; +const scratchAxis = new Cartesian3(), scratchUp$2 = new Cartesian3(), scratchTranslation$2 = new Cartesian3(), scratchScale$6 = new Cartesian3(), scratchRotation$4 = new Matrix3(), scratchRotationScale$1 = new Matrix3(), scratchLocalTransform = new Matrix4(); +function createPrimitiveMatrix(e, t, n, i) { + const r = e.normal, o = e.distance, s = Cartesian3.multiplyByScalar( + r, + -o, + scratchTranslation$2 + ); + let c = Cartesian3.clone(Cartesian3.UNIT_Z, scratchUp$2); + CesiumMath.equalsEpsilon( + Math.abs(Cartesian3.dot(c, r)), + 1, + CesiumMath.EPSILON8 + ) && (c = Cartesian3.clone(Cartesian3.UNIT_Y, c)); + const l = Cartesian3.cross(c, r, scratchAxis); + c = Cartesian3.cross(r, l, c), Cartesian3.normalize(l, l), Cartesian3.normalize(c, c); + const d = scratchRotation$4; + Matrix3.setColumn(d, 0, l, d), Matrix3.setColumn(d, 1, c, d), Matrix3.setColumn(d, 2, r, d); + const f = Cartesian3.fromElements( + t.x, + t.y, + 1, + scratchScale$6 + ), h = Matrix3.multiplyByScale( + d, + f, + scratchRotationScale$1 + ), p = Matrix4.fromRotationTranslation( + h, + s, + scratchLocalTransform + ); + return Matrix4.multiplyTransformation(n, p, i); +} +PlaneGeometryUpdater.createPrimitiveMatrix = createPrimitiveMatrix; +const scratchPosition$6 = new Cartesian3(), scratchBR = new BoundingRectangle(), stScratch$1 = new Cartesian2(), textureCoordinatesOrigin = new Cartesian2(), scratchNormal$3 = new Cartesian3(), scratchTangent$1 = new Cartesian3(), scratchBitangent$1 = new Cartesian3(), centerScratch$3 = new Cartesian3(), axis1Scratch = new Cartesian3(), axis2Scratch = new Cartesian3(), quaternionScratch$1 = new Quaternion(), textureMatrixScratch = new Matrix3(), tangentRotationScratch = new Matrix3(), surfaceNormalScratch = new Cartesian3(); +function createGeometryFromPolygon(e, t, n, i, r, o, s, c, l) { + const d = e.positions; + let f = PolygonPipeline.triangulate(e.positions2D, e.holes); + f.length < 3 && (f = [0, 1, 2]); + const h = IndexDatatype$1.createTypedArray( + d.length, + f.length + ); + h.set(f); + let p = textureMatrixScratch; + if (i !== 0) { + let R = Quaternion.fromAxisAngle( + s, + i, + quaternionScratch$1 + ); + if (p = Matrix3.fromQuaternion(R, p), t.tangent || t.bitangent) { + R = Quaternion.fromAxisAngle( + s, + -i, + quaternionScratch$1 + ); + const L = Matrix3.fromQuaternion( + R, + tangentRotationScratch + ); + c = Cartesian3.normalize( + Matrix3.multiplyByVector(L, c, c), + c + ), t.bitangent && (l = Cartesian3.normalize( + Cartesian3.cross(s, c, l), + l + )); + } + } else + p = Matrix3.clone(Matrix3.IDENTITY, p); + const m = textureCoordinatesOrigin; + t.st && (m.x = n.x, m.y = n.y); + const _ = d.length, y = _ * 3, C = new Float64Array(y), T = t.normal ? new Float32Array(y) : void 0, x = t.tangent ? new Float32Array(y) : void 0, b = t.bitangent ? new Float32Array(y) : void 0, S = t.st ? new Float32Array(_ * 2) : void 0; + let E = 0, A = 0, D = 0, P = 0, I = 0; + for (let R = 0; R < _; R++) { + const L = d[R]; + if (C[E++] = L.x, C[E++] = L.y, C[E++] = L.z, t.st) + if (defined(r) && r.positions.length === _) + S[I++] = r.positions[R].x, S[I++] = r.positions[R].y; + else { + const g = Matrix3.multiplyByVector( + p, + L, + scratchPosition$6 + ), w = o(g, stScratch$1); + Cartesian2.subtract(w, m, w); + const O = CesiumMath.clamp(w.x / n.width, 0, 1), N = CesiumMath.clamp(w.y / n.height, 0, 1); + S[I++] = O, S[I++] = N; + } + t.normal && (T[A++] = s.x, T[A++] = s.y, T[A++] = s.z), t.tangent && (x[P++] = c.x, x[P++] = c.y, x[P++] = c.z), t.bitangent && (b[D++] = l.x, b[D++] = l.y, b[D++] = l.z); + } + const M = new GeometryAttributes(); + return t.position && (M.position = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.DOUBLE, + componentsPerAttribute: 3, + values: C + })), t.normal && (M.normal = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 3, + values: T + })), t.tangent && (M.tangent = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 3, + values: x + })), t.bitangent && (M.bitangent = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 3, + values: b + })), t.st && (M.st = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 2, + values: S + })), new Geometry({ + attributes: M, + indices: h, + primitiveType: PrimitiveType$1.TRIANGLES + }); +} +function CoplanarPolygonGeometry(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.polygonHierarchy, n = e.textureCoordinates, i = defaultValue(e.vertexFormat, VertexFormat.DEFAULT); + this._vertexFormat = VertexFormat.clone(i), this._polygonHierarchy = t, this._stRotation = defaultValue(e.stRotation, 0), this._ellipsoid = Ellipsoid.clone( + defaultValue(e.ellipsoid, Ellipsoid.default) + ), this._workerName = "createCoplanarPolygonGeometry", this._textureCoordinates = n, this.packedLength = PolygonGeometryLibrary.computeHierarchyPackedLength( + t, + Cartesian3 + ) + VertexFormat.packedLength + Ellipsoid.packedLength + (defined(n) ? PolygonGeometryLibrary.computeHierarchyPackedLength( + n, + Cartesian2 + ) : 1) + 2; +} +CoplanarPolygonGeometry.fromPositions = function(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = { + polygonHierarchy: { + positions: e.positions + }, + vertexFormat: e.vertexFormat, + stRotation: e.stRotation, + ellipsoid: e.ellipsoid, + textureCoordinates: e.textureCoordinates + }; + return new CoplanarPolygonGeometry(t); +}; +CoplanarPolygonGeometry.pack = function(e, t, n) { + return n = defaultValue(n, 0), n = PolygonGeometryLibrary.packPolygonHierarchy( + e._polygonHierarchy, + t, + n, + Cartesian3 + ), Ellipsoid.pack(e._ellipsoid, t, n), n += Ellipsoid.packedLength, VertexFormat.pack(e._vertexFormat, t, n), n += VertexFormat.packedLength, t[n++] = e._stRotation, defined(e._textureCoordinates) ? n = PolygonGeometryLibrary.packPolygonHierarchy( + e._textureCoordinates, + t, + n, + Cartesian2 + ) : t[n++] = -1, t[n++] = e.packedLength, t; +}; +const scratchEllipsoid$8 = Ellipsoid.clone(Ellipsoid.UNIT_SPHERE), scratchVertexFormat$5 = new VertexFormat(), scratchOptions$9 = { + polygonHierarchy: {} +}; +CoplanarPolygonGeometry.unpack = function(e, t, n) { + t = defaultValue(t, 0); + const i = PolygonGeometryLibrary.unpackPolygonHierarchy( + e, + t, + Cartesian3 + ); + t = i.startingIndex, delete i.startingIndex; + const r = Ellipsoid.unpack(e, t, scratchEllipsoid$8); + t += Ellipsoid.packedLength; + const o = VertexFormat.unpack( + e, + t, + scratchVertexFormat$5 + ); + t += VertexFormat.packedLength; + const s = e[t++], c = e[t] === -1 ? void 0 : PolygonGeometryLibrary.unpackPolygonHierarchy( + e, + t, + Cartesian2 + ); + defined(c) ? (t = c.startingIndex, delete c.startingIndex) : t++; + const l = e[t++]; + return defined(n) || (n = new CoplanarPolygonGeometry(scratchOptions$9)), n._polygonHierarchy = i, n._ellipsoid = Ellipsoid.clone(r, n._ellipsoid), n._vertexFormat = VertexFormat.clone(o, n._vertexFormat), n._stRotation = s, n._textureCoordinates = c, n.packedLength = l, n; +}; +CoplanarPolygonGeometry.createGeometry = function(e) { + const t = e._vertexFormat, n = e._polygonHierarchy, i = e._stRotation, r = e._textureCoordinates, o = defined(r); + let s = n.positions; + if (s = arrayRemoveDuplicates( + s, + Cartesian3.equalsEpsilon, + !0 + ), s.length < 3) + return; + let c = scratchNormal$3, l = scratchTangent$1, d = scratchBitangent$1, f = axis1Scratch; + const h = axis2Scratch; + if (!CoplanarPolygonGeometryLibrary.computeProjectTo2DArguments( + s, + centerScratch$3, + f, + h + )) + return; + if (c = Cartesian3.cross(f, h, c), c = Cartesian3.normalize(c, c), !Cartesian3.equalsEpsilon( + centerScratch$3, + Cartesian3.ZERO, + CesiumMath.EPSILON6 + )) { + const I = e._ellipsoid.geodeticSurfaceNormal( + centerScratch$3, + surfaceNormalScratch + ); + Cartesian3.dot(c, I) < 0 && (c = Cartesian3.negate(c, c), f = Cartesian3.negate(f, f)); + } + const m = CoplanarPolygonGeometryLibrary.createProjectPointsTo2DFunction( + centerScratch$3, + f, + h + ), _ = CoplanarPolygonGeometryLibrary.createProjectPointTo2DFunction( + centerScratch$3, + f, + h + ); + t.tangent && (l = Cartesian3.clone(f, l)), t.bitangent && (d = Cartesian3.clone(h, d)); + const y = PolygonGeometryLibrary.polygonsFromHierarchy( + n, + o, + m, + !1 + ), C = y.hierarchy, T = y.polygons, x = function(I) { + return I; + }, b = o ? PolygonGeometryLibrary.polygonsFromHierarchy( + r, + !0, + x, + !1 + ).polygons : void 0; + if (C.length === 0) + return; + s = C[0].outerRing; + const S = BoundingSphere.fromPoints(s), E = PolygonGeometryLibrary.computeBoundingRectangle( + c, + _, + s, + i, + scratchBR + ), A = []; + for (let I = 0; I < T.length; I++) { + const M = new GeometryInstance({ + geometry: createGeometryFromPolygon( + T[I], + t, + E, + i, + o ? b[I] : void 0, + _, + c, + l, + d + ) + }); + A.push(M); + } + const D = GeometryPipeline.combineInstances(A)[0]; + D.attributes.position.values = new Float64Array( + D.attributes.position.values + ), D.indices = IndexDatatype$1.createTypedArray( + D.attributes.position.values.length / 3, + D.indices + ); + const P = D.attributes; + return t.position || delete P.position, new Geometry({ + attributes: P, + indices: D.indices, + primitiveType: D.primitiveType, + boundingSphere: S + }); +}; +const createGeometryFromPositionsPositions = [], createGeometryFromPositionsSubdivided = []; +function createGeometryFromPositions(e, t, n, i, r) { + const s = EllipsoidTangentPlane.fromPoints(t, e).projectPointsOntoPlane( + t, + createGeometryFromPositionsPositions + ); + PolygonPipeline.computeWindingOrder2D( + s + ) === WindingOrder$1.CLOCKWISE && (s.reverse(), t = t.slice().reverse()); + let l, d, f = t.length, h = 0; + if (i) + for (l = new Float64Array(f * 2 * 3), d = 0; d < f; d++) { + const _ = t[d], y = t[(d + 1) % f]; + l[h++] = _.x, l[h++] = _.y, l[h++] = _.z, l[h++] = y.x, l[h++] = y.y, l[h++] = y.z; + } + else { + let _ = 0; + if (r === ArcType$1.GEODESIC) + for (d = 0; d < f; d++) + _ += PolygonGeometryLibrary.subdivideLineCount( + t[d], + t[(d + 1) % f], + n + ); + else if (r === ArcType$1.RHUMB) + for (d = 0; d < f; d++) + _ += PolygonGeometryLibrary.subdivideRhumbLineCount( + e, + t[d], + t[(d + 1) % f], + n + ); + for (l = new Float64Array(_ * 3), d = 0; d < f; d++) { + let y; + r === ArcType$1.GEODESIC ? y = PolygonGeometryLibrary.subdivideLine( + t[d], + t[(d + 1) % f], + n, + createGeometryFromPositionsSubdivided + ) : r === ArcType$1.RHUMB && (y = PolygonGeometryLibrary.subdivideRhumbLine( + e, + t[d], + t[(d + 1) % f], + n, + createGeometryFromPositionsSubdivided + )); + const C = y.length; + for (let T = 0; T < C; ++T) + l[h++] = y[T]; + } + } + f = l.length / 3; + const p = f * 2, m = IndexDatatype$1.createTypedArray(f, p); + for (h = 0, d = 0; d < f - 1; d++) + m[h++] = d, m[h++] = d + 1; + return m[h++] = f - 1, m[h++] = 0, new GeometryInstance({ + geometry: new Geometry({ + attributes: new GeometryAttributes({ + position: new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.DOUBLE, + componentsPerAttribute: 3, + values: l + }) + }), + indices: m, + primitiveType: PrimitiveType$1.LINES + }) + }); +} +function createGeometryFromPositionsExtruded(e, t, n, i, r) { + const s = EllipsoidTangentPlane.fromPoints(t, e).projectPointsOntoPlane( + t, + createGeometryFromPositionsPositions + ); + PolygonPipeline.computeWindingOrder2D( + s + ) === WindingOrder$1.CLOCKWISE && (s.reverse(), t = t.slice().reverse()); + let l, d, f = t.length; + const h = new Array(f); + let p = 0; + if (i) + for (l = new Float64Array(f * 2 * 3 * 2), d = 0; d < f; ++d) { + h[d] = p / 3; + const C = t[d], T = t[(d + 1) % f]; + l[p++] = C.x, l[p++] = C.y, l[p++] = C.z, l[p++] = T.x, l[p++] = T.y, l[p++] = T.z; + } + else { + let C = 0; + if (r === ArcType$1.GEODESIC) + for (d = 0; d < f; d++) + C += PolygonGeometryLibrary.subdivideLineCount( + t[d], + t[(d + 1) % f], + n + ); + else if (r === ArcType$1.RHUMB) + for (d = 0; d < f; d++) + C += PolygonGeometryLibrary.subdivideRhumbLineCount( + e, + t[d], + t[(d + 1) % f], + n + ); + for (l = new Float64Array(C * 3 * 2), d = 0; d < f; ++d) { + h[d] = p / 3; + let T; + r === ArcType$1.GEODESIC ? T = PolygonGeometryLibrary.subdivideLine( + t[d], + t[(d + 1) % f], + n, + createGeometryFromPositionsSubdivided + ) : r === ArcType$1.RHUMB && (T = PolygonGeometryLibrary.subdivideRhumbLine( + e, + t[d], + t[(d + 1) % f], + n, + createGeometryFromPositionsSubdivided + )); + const x = T.length; + for (let b = 0; b < x; ++b) + l[p++] = T[b]; + } + } + f = l.length / (3 * 2); + const m = h.length, _ = (f * 2 + m) * 2, y = IndexDatatype$1.createTypedArray( + f + m, + _ + ); + for (p = 0, d = 0; d < f; ++d) + y[p++] = d, y[p++] = (d + 1) % f, y[p++] = d + f, y[p++] = (d + 1) % f + f; + for (d = 0; d < m; d++) { + const C = h[d]; + y[p++] = C, y[p++] = C + f; + } + return new GeometryInstance({ + geometry: new Geometry({ + attributes: new GeometryAttributes({ + position: new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.DOUBLE, + componentsPerAttribute: 3, + values: l + }) + }), + indices: y, + primitiveType: PrimitiveType$1.LINES + }) + }); +} +function PolygonOutlineGeometry(e) { + const t = e.polygonHierarchy, n = defaultValue(e.ellipsoid, Ellipsoid.default), i = defaultValue( + e.granularity, + CesiumMath.RADIANS_PER_DEGREE + ), r = defaultValue(e.perPositionHeight, !1), o = r && defined(e.extrudedHeight), s = defaultValue(e.arcType, ArcType$1.GEODESIC); + let c = defaultValue(e.height, 0), l = defaultValue(e.extrudedHeight, c); + if (!o) { + const d = Math.max(c, l); + l = Math.min(c, l), c = d; + } + this._ellipsoid = Ellipsoid.clone(n), this._granularity = i, this._height = c, this._extrudedHeight = l, this._arcType = s, this._polygonHierarchy = t, this._perPositionHeight = r, this._perPositionHeightExtrude = o, this._offsetAttribute = e.offsetAttribute, this._workerName = "createPolygonOutlineGeometry", this.packedLength = PolygonGeometryLibrary.computeHierarchyPackedLength( + t, + Cartesian3 + ) + Ellipsoid.packedLength + 8; +} +PolygonOutlineGeometry.pack = function(e, t, n) { + return n = defaultValue(n, 0), n = PolygonGeometryLibrary.packPolygonHierarchy( + e._polygonHierarchy, + t, + n, + Cartesian3 + ), Ellipsoid.pack(e._ellipsoid, t, n), n += Ellipsoid.packedLength, t[n++] = e._height, t[n++] = e._extrudedHeight, t[n++] = e._granularity, t[n++] = e._perPositionHeightExtrude ? 1 : 0, t[n++] = e._perPositionHeight ? 1 : 0, t[n++] = e._arcType, t[n++] = defaultValue(e._offsetAttribute, -1), t[n] = e.packedLength, t; +}; +const scratchEllipsoid$7 = Ellipsoid.clone(Ellipsoid.UNIT_SPHERE), dummyOptions = { + polygonHierarchy: {} +}; +PolygonOutlineGeometry.unpack = function(e, t, n) { + t = defaultValue(t, 0); + const i = PolygonGeometryLibrary.unpackPolygonHierarchy( + e, + t, + Cartesian3 + ); + t = i.startingIndex, delete i.startingIndex; + const r = Ellipsoid.unpack(e, t, scratchEllipsoid$7); + t += Ellipsoid.packedLength; + const o = e[t++], s = e[t++], c = e[t++], l = e[t++] === 1, d = e[t++] === 1, f = e[t++], h = e[t++], p = e[t]; + return defined(n) || (n = new PolygonOutlineGeometry(dummyOptions)), n._polygonHierarchy = i, n._ellipsoid = Ellipsoid.clone(r, n._ellipsoid), n._height = o, n._extrudedHeight = s, n._granularity = c, n._perPositionHeight = d, n._perPositionHeightExtrude = l, n._arcType = f, n._offsetAttribute = h === -1 ? void 0 : h, n.packedLength = p, n; +}; +PolygonOutlineGeometry.fromPositions = function(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = { + polygonHierarchy: { + positions: e.positions + }, + height: e.height, + extrudedHeight: e.extrudedHeight, + ellipsoid: e.ellipsoid, + granularity: e.granularity, + perPositionHeight: e.perPositionHeight, + arcType: e.arcType, + offsetAttribute: e.offsetAttribute + }; + return new PolygonOutlineGeometry(t); +}; +PolygonOutlineGeometry.createGeometry = function(e) { + const t = e._ellipsoid, n = e._granularity, i = e._polygonHierarchy, r = e._perPositionHeight, o = e._arcType, s = PolygonGeometryLibrary.polygonOutlinesFromHierarchy( + i, + !r, + t + ); + if (s.length === 0) + return; + let c; + const l = [], d = CesiumMath.chordLength( + n, + t.maximumRadius + ), f = e._height, h = e._extrudedHeight, p = e._perPositionHeightExtrude || !CesiumMath.equalsEpsilon(f, h, 0, CesiumMath.EPSILON2); + let m, _; + if (p) + for (_ = 0; _ < s.length; _++) { + if (c = createGeometryFromPositionsExtruded( + t, + s[_], + d, + r, + o + ), c.geometry = PolygonGeometryLibrary.scaleToGeodeticHeightExtruded( + c.geometry, + f, + h, + t, + r + ), defined(e._offsetAttribute)) { + const T = c.geometry.attributes.position.values.length / 3; + let x = new Uint8Array(T); + e._offsetAttribute === GeometryOffsetAttribute$1.TOP ? x = x.fill(1, 0, T / 2) : (m = e._offsetAttribute === GeometryOffsetAttribute$1.NONE ? 0 : 1, x = x.fill(m)), c.geometry.attributes.applyOffset = new GeometryAttribute( + { + componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE, + componentsPerAttribute: 1, + values: x + } + ); + } + l.push(c); + } + else + for (_ = 0; _ < s.length; _++) { + if (c = createGeometryFromPositions( + t, + s[_], + d, + r, + o + ), c.geometry.attributes.position.values = PolygonPipeline.scaleToGeodeticHeight( + c.geometry.attributes.position.values, + f, + t, + !r + ), defined(e._offsetAttribute)) { + const T = c.geometry.attributes.position.values.length; + m = e._offsetAttribute === GeometryOffsetAttribute$1.NONE ? 0 : 1; + const x = new Uint8Array(T / 3).fill(m); + c.geometry.attributes.applyOffset = new GeometryAttribute( + { + componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE, + componentsPerAttribute: 1, + values: x + } + ); + } + l.push(c); + } + const y = GeometryPipeline.combineInstances(l)[0], C = BoundingSphere.fromVertices( + y.attributes.position.values + ); + return new Geometry({ + attributes: y.attributes, + indices: y.indices, + primitiveType: y.primitiveType, + boundingSphere: C, + offsetAttribute: e._offsetAttribute + }); +}; +const heightAndPerPositionHeightWarning = "Entity polygons cannot have both height and perPositionHeight. height will be ignored", heightReferenceAndPerPositionHeightWarning = "heightReference is not supported for entity polygons with perPositionHeight. heightReference will be ignored", scratchColor$9 = new Color(), defaultOffset$4 = Cartesian3.ZERO, offsetScratch$4 = new Cartesian3(), scratchRectangle$4 = new Rectangle(), scratch2DPositions = [], cart2Scratch = new Cartesian2(); +function PolygonGeometryOptions(e) { + this.id = e, this.vertexFormat = void 0, this.polygonHierarchy = void 0, this.perPositionHeight = void 0, this.closeTop = void 0, this.closeBottom = void 0, this.height = void 0, this.extrudedHeight = void 0, this.granularity = void 0, this.stRotation = void 0, this.offsetAttribute = void 0, this.arcType = void 0, this.textureCoordinates = void 0; +} +function PolygonGeometryUpdater(e, t) { + GroundGeometryUpdater.call(this, { + entity: e, + scene: t, + geometryOptions: new PolygonGeometryOptions(e), + geometryPropertyName: "polygon", + observedPropertyNames: ["availability", "polygon"] + }), this._onEntityPropertyChanged(e, "polygon", e.polygon, void 0); +} +defined(Object.create) && (PolygonGeometryUpdater.prototype = Object.create( + GroundGeometryUpdater.prototype +), PolygonGeometryUpdater.prototype.constructor = PolygonGeometryUpdater); +PolygonGeometryUpdater.prototype.createFillGeometryInstance = function(e) { + const t = this._entity, n = t.isAvailable(e), i = this._options, r = { + show: new ShowGeometryInstanceAttribute( + n && t.isShowing && this._showProperty.getValue(e) && this._fillProperty.getValue(e) + ), + distanceDisplayCondition: DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition( + this._distanceDisplayConditionProperty.getValue(e) + ), + offset: void 0, + color: void 0 + }; + if (this._materialProperty instanceof ColorMaterialProperty) { + let s; + defined(this._materialProperty.color) && (this._materialProperty.color.isConstant || n) && (s = this._materialProperty.color.getValue(e, scratchColor$9)), defined(s) || (s = Color.WHITE), r.color = ColorGeometryInstanceAttribute.fromColor(s); + } + defined(i.offsetAttribute) && (r.offset = OffsetGeometryInstanceAttribute.fromCartesian3( + Property.getValueOrDefault( + this._terrainOffsetProperty, + e, + defaultOffset$4, + offsetScratch$4 + ) + )); + let o; + return i.perPositionHeight && !defined(i.extrudedHeight) ? o = new CoplanarPolygonGeometry(i) : o = new PolygonGeometry(i), new GeometryInstance({ + id: t, + geometry: o, + attributes: r + }); +}; +PolygonGeometryUpdater.prototype.createOutlineGeometryInstance = function(e) { + const t = this._entity, n = t.isAvailable(e), i = this._options, r = Property.getValueOrDefault( + this._outlineColorProperty, + e, + Color.BLACK, + scratchColor$9 + ), o = this._distanceDisplayConditionProperty.getValue( + e + ), s = { + show: new ShowGeometryInstanceAttribute( + n && t.isShowing && this._showProperty.getValue(e) && this._showOutlineProperty.getValue(e) + ), + color: ColorGeometryInstanceAttribute.fromColor(r), + distanceDisplayCondition: DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition( + o + ), + offset: void 0 + }; + defined(i.offsetAttribute) && (s.offset = OffsetGeometryInstanceAttribute.fromCartesian3( + Property.getValueOrDefault( + this._terrainOffsetProperty, + e, + defaultOffset$4, + offsetScratch$4 + ) + )); + let c; + return i.perPositionHeight && !defined(i.extrudedHeight) ? c = new CoplanarPolygonOutlineGeometry(i) : c = new PolygonOutlineGeometry(i), new GeometryInstance({ + id: t, + geometry: c, + attributes: s + }); +}; +PolygonGeometryUpdater.prototype._computeCenter = function(e, t) { + const n = Property.getValueOrUndefined( + this._entity.polygon.hierarchy, + e + ); + if (!defined(n)) + return; + const i = n.positions; + if (i.length === 0) + return; + const r = this._scene.ellipsoid, o = EllipsoidTangentPlane.fromPoints(i, r), s = o.projectPointsOntoPlane( + i, + scratch2DPositions + ), c = s.length; + let l = 0, d = c - 1, f = new Cartesian2(); + for (let p = 0; p < c; d = p++) { + const m = s[p], _ = s[d], y = m.x * _.y - _.x * m.y; + let C = Cartesian2.add(m, _, cart2Scratch); + C = Cartesian2.multiplyByScalar(C, y, C), f = Cartesian2.add(f, C, f), l += y; + } + const h = 1 / (l * 3); + return f = Cartesian2.multiplyByScalar(f, h, f), o.projectPointOntoEllipsoid(f, t); +}; +PolygonGeometryUpdater.prototype._isHidden = function(e, t) { + return !defined(t.hierarchy) || GeometryUpdater.prototype._isHidden.call(this, e, t); +}; +PolygonGeometryUpdater.prototype._isOnTerrain = function(e, t) { + const n = GroundGeometryUpdater.prototype._isOnTerrain.call( + this, + e, + t + ), i = t.perPositionHeight, r = defined(i) && (i.isConstant ? i.getValue(Iso8601.MINIMUM_VALUE) : !0); + return n && !r; +}; +PolygonGeometryUpdater.prototype._isDynamic = function(e, t) { + return !t.hierarchy.isConstant || // + !Property.isConstant(t.height) || // + !Property.isConstant(t.extrudedHeight) || // + !Property.isConstant(t.granularity) || // + !Property.isConstant(t.stRotation) || // + !Property.isConstant(t.textureCoordinates) || // + !Property.isConstant(t.outlineWidth) || // + !Property.isConstant(t.perPositionHeight) || // + !Property.isConstant(t.closeTop) || // + !Property.isConstant(t.closeBottom) || // + !Property.isConstant(t.zIndex) || // + !Property.isConstant(t.arcType) || // + this._onTerrain && !Property.isConstant(this._materialProperty) && !(this._materialProperty instanceof ColorMaterialProperty); +}; +PolygonGeometryUpdater.prototype._setStaticOptions = function(e, t) { + const n = this._materialProperty instanceof ColorMaterialProperty, i = this._options; + i.vertexFormat = n ? PerInstanceColorAppearance.VERTEX_FORMAT : MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat; + const r = t.hierarchy.getValue(Iso8601.MINIMUM_VALUE); + let o = Property.getValueOrUndefined( + t.height, + Iso8601.MINIMUM_VALUE + ); + const s = Property.getValueOrDefault( + t.heightReference, + Iso8601.MINIMUM_VALUE, + HeightReference$1.NONE + ); + let c = Property.getValueOrUndefined( + t.extrudedHeight, + Iso8601.MINIMUM_VALUE + ); + const l = Property.getValueOrDefault( + t.extrudedHeightReference, + Iso8601.MINIMUM_VALUE, + HeightReference$1.NONE + ), d = Property.getValueOrDefault( + t.perPositionHeight, + Iso8601.MINIMUM_VALUE, + !1 + ); + o = GroundGeometryUpdater.getGeometryHeight( + o, + s + ); + let f; + if (d ? (defined(o) && (o = void 0, oneTimeWarning(heightAndPerPositionHeightWarning)), s !== HeightReference$1.NONE && d && (o = void 0, oneTimeWarning(heightReferenceAndPerPositionHeightWarning))) : (defined(c) && !defined(o) && (o = 0), f = GroundGeometryUpdater.computeGeometryOffsetAttribute( + o, + s, + c, + l + )), i.polygonHierarchy = r, i.granularity = Property.getValueOrUndefined( + t.granularity, + Iso8601.MINIMUM_VALUE + ), i.stRotation = Property.getValueOrUndefined( + t.stRotation, + Iso8601.MINIMUM_VALUE + ), i.perPositionHeight = d, i.closeTop = Property.getValueOrDefault( + t.closeTop, + Iso8601.MINIMUM_VALUE, + !0 + ), i.closeBottom = Property.getValueOrDefault( + t.closeBottom, + Iso8601.MINIMUM_VALUE, + !0 + ), i.offsetAttribute = f, i.height = o, i.arcType = Property.getValueOrDefault( + t.arcType, + Iso8601.MINIMUM_VALUE, + ArcType$1.GEODESIC + ), i.textureCoordinates = Property.getValueOrUndefined( + t.textureCoordinates, + Iso8601.MINIMUM_VALUE + ), c = GroundGeometryUpdater.getGeometryExtrudedHeight( + c, + l + ), c === GroundGeometryUpdater.CLAMP_TO_GROUND) { + const h = PolygonGeometry.computeRectangleFromPositions( + i.polygonHierarchy.positions, + i.ellipsoid, + i.arcType, + scratchRectangle$4 + ); + c = ApproximateTerrainHeights.getMinimumMaximumHeights( + h + ).minimumTerrainHeight; + } + i.extrudedHeight = c; +}; +PolygonGeometryUpdater.prototype._getIsClosed = function(e) { + const t = e.height, n = e.extrudedHeight, i = defined(n) && n !== t; + return !e.perPositionHeight && (!i && t === 0 || i && e.closeTop && e.closeBottom); +}; +PolygonGeometryUpdater.DynamicGeometryUpdater = DyanmicPolygonGeometryUpdater; +function DyanmicPolygonGeometryUpdater(e, t, n) { + DynamicGeometryUpdater$1.call( + this, + e, + t, + n + ); +} +defined(Object.create) && (DyanmicPolygonGeometryUpdater.prototype = Object.create( + DynamicGeometryUpdater$1.prototype +), DyanmicPolygonGeometryUpdater.prototype.constructor = DyanmicPolygonGeometryUpdater); +DyanmicPolygonGeometryUpdater.prototype._isHidden = function(e, t, n) { + return !defined(this._options.polygonHierarchy) || DynamicGeometryUpdater$1.prototype._isHidden.call(this, e, t, n); +}; +DyanmicPolygonGeometryUpdater.prototype._setOptions = function(e, t, n) { + const i = this._options; + i.polygonHierarchy = Property.getValueOrUndefined( + t.hierarchy, + n + ); + let r = Property.getValueOrUndefined(t.height, n); + const o = Property.getValueOrDefault( + t.heightReference, + n, + HeightReference$1.NONE + ), s = Property.getValueOrDefault( + t.extrudedHeightReference, + n, + HeightReference$1.NONE + ); + let c = Property.getValueOrUndefined( + t.extrudedHeight, + n + ); + const l = Property.getValueOrUndefined( + t.perPositionHeight, + n + ); + r = GroundGeometryUpdater.getGeometryHeight( + r, + s + ); + let d; + if (l ? (defined(r) && (r = void 0, oneTimeWarning(heightAndPerPositionHeightWarning)), o !== HeightReference$1.NONE && l && (r = void 0, oneTimeWarning(heightReferenceAndPerPositionHeightWarning))) : (defined(c) && !defined(r) && (r = 0), d = GroundGeometryUpdater.computeGeometryOffsetAttribute( + r, + o, + c, + s + )), i.granularity = Property.getValueOrUndefined(t.granularity, n), i.stRotation = Property.getValueOrUndefined(t.stRotation, n), i.textureCoordinates = Property.getValueOrUndefined( + t.textureCoordinates, + n + ), i.perPositionHeight = Property.getValueOrUndefined( + t.perPositionHeight, + n + ), i.closeTop = Property.getValueOrDefault(t.closeTop, n, !0), i.closeBottom = Property.getValueOrDefault( + t.closeBottom, + n, + !0 + ), i.offsetAttribute = d, i.height = r, i.arcType = Property.getValueOrDefault( + t.arcType, + n, + ArcType$1.GEODESIC + ), c = GroundGeometryUpdater.getGeometryExtrudedHeight( + c, + s + ), c === GroundGeometryUpdater.CLAMP_TO_GROUND) { + const f = PolygonGeometry.computeRectangleFromPositions( + i.polygonHierarchy.positions, + i.ellipsoid, + i.arcType, + scratchRectangle$4 + ); + c = ApproximateTerrainHeights.getMinimumMaximumHeights( + f + ).minimumTerrainHeight; + } + i.extrudedHeight = c; +}; +function computeAttributes$1(e, t, n, i) { + const r = new GeometryAttributes(); + i.position && (r.position = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.DOUBLE, + componentsPerAttribute: 3, + values: e + })); + const o = t.length, s = e.length / 3, c = (s - o * 2) / (o * 2), l = PolygonPipeline.triangulate(t), d = (c - 1) * o * 6 + l.length * 2, f = IndexDatatype$1.createTypedArray(s, d); + let h, p, m, _, y, C; + const T = o * 2; + let x = 0; + for (h = 0; h < c - 1; h++) { + for (p = 0; p < o - 1; p++) + m = p * 2 + h * o * 2, C = m + T, _ = m + 1, y = _ + T, f[x++] = _, f[x++] = m, f[x++] = y, f[x++] = y, f[x++] = m, f[x++] = C; + m = o * 2 - 2 + h * o * 2, _ = m + 1, y = _ + T, C = m + T, f[x++] = _, f[x++] = m, f[x++] = y, f[x++] = y, f[x++] = m, f[x++] = C; + } + if (i.st || i.tangent || i.bitangent) { + const E = new Float32Array(s * 2), A = 1 / (c - 1), D = 1 / n.height, P = n.height / 2; + let I, M, R = 0; + for (h = 0; h < c; h++) { + for (I = h * A, M = D * (t[0].y + P), E[R++] = I, E[R++] = M, p = 1; p < o; p++) + M = D * (t[p].y + P), E[R++] = I, E[R++] = M, E[R++] = I, E[R++] = M; + M = D * (t[0].y + P), E[R++] = I, E[R++] = M; + } + for (p = 0; p < o; p++) + I = 0, M = D * (t[p].y + P), E[R++] = I, E[R++] = M; + for (p = 0; p < o; p++) + I = (c - 1) * A, M = D * (t[p].y + P), E[R++] = I, E[R++] = M; + r.st = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 2, + values: new Float32Array(E) + }); + } + const b = s - o * 2; + for (h = 0; h < l.length; h += 3) { + const E = l[h] + b, A = l[h + 1] + b, D = l[h + 2] + b; + f[x++] = E, f[x++] = A, f[x++] = D, f[x++] = D + o, f[x++] = A + o, f[x++] = E + o; + } + let S = new Geometry({ + attributes: r, + indices: f, + boundingSphere: BoundingSphere.fromVertices(e), + primitiveType: PrimitiveType$1.TRIANGLES + }); + if (i.normal && (S = GeometryPipeline.computeNormal(S)), i.tangent || i.bitangent) { + try { + S = GeometryPipeline.computeTangentAndBitangent(S); + } catch { + oneTimeWarning( + "polyline-volume-tangent-bitangent", + "Unable to compute tangents and bitangents for polyline volume geometry" + ); + } + i.tangent || (S.attributes.tangent = void 0), i.bitangent || (S.attributes.bitangent = void 0), i.st || (S.attributes.st = void 0); + } + return S; +} +function PolylineVolumeGeometry(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.polylinePositions, n = e.shapePositions; + this._positions = t, this._shape = n, this._ellipsoid = Ellipsoid.clone( + defaultValue(e.ellipsoid, Ellipsoid.default) + ), this._cornerType = defaultValue(e.cornerType, CornerType$1.ROUNDED), this._vertexFormat = VertexFormat.clone( + defaultValue(e.vertexFormat, VertexFormat.DEFAULT) + ), this._granularity = defaultValue( + e.granularity, + CesiumMath.RADIANS_PER_DEGREE + ), this._workerName = "createPolylineVolumeGeometry"; + let i = 1 + t.length * Cartesian3.packedLength; + i += 1 + n.length * Cartesian2.packedLength, this.packedLength = i + Ellipsoid.packedLength + VertexFormat.packedLength + 2; +} +PolylineVolumeGeometry.pack = function(e, t, n) { + n = defaultValue(n, 0); + let i; + const r = e._positions; + let o = r.length; + for (t[n++] = o, i = 0; i < o; ++i, n += Cartesian3.packedLength) + Cartesian3.pack(r[i], t, n); + const s = e._shape; + for (o = s.length, t[n++] = o, i = 0; i < o; ++i, n += Cartesian2.packedLength) + Cartesian2.pack(s[i], t, n); + return Ellipsoid.pack(e._ellipsoid, t, n), n += Ellipsoid.packedLength, VertexFormat.pack(e._vertexFormat, t, n), n += VertexFormat.packedLength, t[n++] = e._cornerType, t[n] = e._granularity, t; +}; +const scratchEllipsoid$6 = Ellipsoid.clone(Ellipsoid.UNIT_SPHERE), scratchVertexFormat$4 = new VertexFormat(), scratchOptions$8 = { + polylinePositions: void 0, + shapePositions: void 0, + ellipsoid: scratchEllipsoid$6, + vertexFormat: scratchVertexFormat$4, + cornerType: void 0, + granularity: void 0 +}; +PolylineVolumeGeometry.unpack = function(e, t, n) { + t = defaultValue(t, 0); + let i, r = e[t++]; + const o = new Array(r); + for (i = 0; i < r; ++i, t += Cartesian3.packedLength) + o[i] = Cartesian3.unpack(e, t); + r = e[t++]; + const s = new Array(r); + for (i = 0; i < r; ++i, t += Cartesian2.packedLength) + s[i] = Cartesian2.unpack(e, t); + const c = Ellipsoid.unpack(e, t, scratchEllipsoid$6); + t += Ellipsoid.packedLength; + const l = VertexFormat.unpack( + e, + t, + scratchVertexFormat$4 + ); + t += VertexFormat.packedLength; + const d = e[t++], f = e[t]; + return defined(n) ? (n._positions = o, n._shape = s, n._ellipsoid = Ellipsoid.clone(c, n._ellipsoid), n._vertexFormat = VertexFormat.clone(l, n._vertexFormat), n._cornerType = d, n._granularity = f, n) : (scratchOptions$8.polylinePositions = o, scratchOptions$8.shapePositions = s, scratchOptions$8.cornerType = d, scratchOptions$8.granularity = f, new PolylineVolumeGeometry(scratchOptions$8)); +}; +const brScratch$1 = new BoundingRectangle(); +PolylineVolumeGeometry.createGeometry = function(e) { + const t = e._positions, n = arrayRemoveDuplicates( + t, + Cartesian3.equalsEpsilon + ); + let i = e._shape; + if (i = PolylineVolumeGeometryLibrary.removeDuplicatesFromShape(i), n.length < 2 || i.length < 3) + return; + PolygonPipeline.computeWindingOrder2D(i) === WindingOrder$1.CLOCKWISE && i.reverse(); + const r = BoundingRectangle.fromPoints(i, brScratch$1), o = PolylineVolumeGeometryLibrary.computePositions( + n, + i, + r, + e, + !0 + ); + return computeAttributes$1( + o, + i, + r, + e._vertexFormat + ); +}; +function computeAttributes(e, t) { + const n = new GeometryAttributes(); + n.position = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.DOUBLE, + componentsPerAttribute: 3, + values: e + }); + const i = t.length, r = n.position.values.length / 3, s = e.length / 3 / i, c = IndexDatatype$1.createTypedArray( + r, + 2 * i * (s + 1) + ); + let l, d, f = 0; + l = 0; + let h = l * i; + for (d = 0; d < i - 1; d++) + c[f++] = d + h, c[f++] = d + h + 1; + for (c[f++] = i - 1 + h, c[f++] = h, l = s - 1, h = l * i, d = 0; d < i - 1; d++) + c[f++] = d + h, c[f++] = d + h + 1; + for (c[f++] = i - 1 + h, c[f++] = h, l = 0; l < s - 1; l++) { + const m = i * l, _ = m + i; + for (d = 0; d < i; d++) + c[f++] = d + m, c[f++] = d + _; + } + return new Geometry({ + attributes: n, + indices: IndexDatatype$1.createTypedArray(r, c), + boundingSphere: BoundingSphere.fromVertices(e), + primitiveType: PrimitiveType$1.LINES + }); +} +function PolylineVolumeOutlineGeometry(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.polylinePositions, n = e.shapePositions; + this._positions = t, this._shape = n, this._ellipsoid = Ellipsoid.clone( + defaultValue(e.ellipsoid, Ellipsoid.default) + ), this._cornerType = defaultValue(e.cornerType, CornerType$1.ROUNDED), this._granularity = defaultValue( + e.granularity, + CesiumMath.RADIANS_PER_DEGREE + ), this._workerName = "createPolylineVolumeOutlineGeometry"; + let i = 1 + t.length * Cartesian3.packedLength; + i += 1 + n.length * Cartesian2.packedLength, this.packedLength = i + Ellipsoid.packedLength + 2; +} +PolylineVolumeOutlineGeometry.pack = function(e, t, n) { + n = defaultValue(n, 0); + let i; + const r = e._positions; + let o = r.length; + for (t[n++] = o, i = 0; i < o; ++i, n += Cartesian3.packedLength) + Cartesian3.pack(r[i], t, n); + const s = e._shape; + for (o = s.length, t[n++] = o, i = 0; i < o; ++i, n += Cartesian2.packedLength) + Cartesian2.pack(s[i], t, n); + return Ellipsoid.pack(e._ellipsoid, t, n), n += Ellipsoid.packedLength, t[n++] = e._cornerType, t[n] = e._granularity, t; +}; +const scratchEllipsoid$5 = Ellipsoid.clone(Ellipsoid.UNIT_SPHERE), scratchOptions$7 = { + polylinePositions: void 0, + shapePositions: void 0, + ellipsoid: scratchEllipsoid$5, + height: void 0, + cornerType: void 0, + granularity: void 0 +}; +PolylineVolumeOutlineGeometry.unpack = function(e, t, n) { + t = defaultValue(t, 0); + let i, r = e[t++]; + const o = new Array(r); + for (i = 0; i < r; ++i, t += Cartesian3.packedLength) + o[i] = Cartesian3.unpack(e, t); + r = e[t++]; + const s = new Array(r); + for (i = 0; i < r; ++i, t += Cartesian2.packedLength) + s[i] = Cartesian2.unpack(e, t); + const c = Ellipsoid.unpack(e, t, scratchEllipsoid$5); + t += Ellipsoid.packedLength; + const l = e[t++], d = e[t]; + return defined(n) ? (n._positions = o, n._shape = s, n._ellipsoid = Ellipsoid.clone(c, n._ellipsoid), n._cornerType = l, n._granularity = d, n) : (scratchOptions$7.polylinePositions = o, scratchOptions$7.shapePositions = s, scratchOptions$7.cornerType = l, scratchOptions$7.granularity = d, new PolylineVolumeOutlineGeometry(scratchOptions$7)); +}; +const brScratch = new BoundingRectangle(); +PolylineVolumeOutlineGeometry.createGeometry = function(e) { + const t = e._positions, n = arrayRemoveDuplicates( + t, + Cartesian3.equalsEpsilon + ); + let i = e._shape; + if (i = PolylineVolumeGeometryLibrary.removeDuplicatesFromShape(i), n.length < 2 || i.length < 3) + return; + PolygonPipeline.computeWindingOrder2D(i) === WindingOrder$1.CLOCKWISE && i.reverse(); + const r = BoundingRectangle.fromPoints(i, brScratch), o = PolylineVolumeGeometryLibrary.computePositions( + n, + i, + r, + e, + !1 + ); + return computeAttributes(o, i); +}; +const scratchColor$8 = new Color(); +function PolylineVolumeGeometryOptions(e) { + this.id = e, this.vertexFormat = void 0, this.polylinePositions = void 0, this.shapePositions = void 0, this.cornerType = void 0, this.granularity = void 0; +} +function PolylineVolumeGeometryUpdater(e, t) { + GeometryUpdater.call(this, { + entity: e, + scene: t, + geometryOptions: new PolylineVolumeGeometryOptions(e), + geometryPropertyName: "polylineVolume", + observedPropertyNames: ["availability", "polylineVolume"] + }), this._onEntityPropertyChanged( + e, + "polylineVolume", + e.polylineVolume, + void 0 + ); +} +defined(Object.create) && (PolylineVolumeGeometryUpdater.prototype = Object.create( + GeometryUpdater.prototype +), PolylineVolumeGeometryUpdater.prototype.constructor = PolylineVolumeGeometryUpdater); +PolylineVolumeGeometryUpdater.prototype.createFillGeometryInstance = function(e) { + const t = this._entity, n = t.isAvailable(e); + let i, r; + const o = new ShowGeometryInstanceAttribute( + n && t.isShowing && this._showProperty.getValue(e) && this._fillProperty.getValue(e) + ), s = this._distanceDisplayConditionProperty.getValue( + e + ), c = DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition( + s + ); + if (this._materialProperty instanceof ColorMaterialProperty) { + let l; + defined(this._materialProperty.color) && (this._materialProperty.color.isConstant || n) && (l = this._materialProperty.color.getValue(e, scratchColor$8)), defined(l) || (l = Color.WHITE), r = ColorGeometryInstanceAttribute.fromColor(l), i = { + show: o, + distanceDisplayCondition: c, + color: r + }; + } else + i = { + show: o, + distanceDisplayCondition: c + }; + return new GeometryInstance({ + id: t, + geometry: new PolylineVolumeGeometry(this._options), + attributes: i + }); +}; +PolylineVolumeGeometryUpdater.prototype.createOutlineGeometryInstance = function(e) { + const t = this._entity, n = t.isAvailable(e), i = Property.getValueOrDefault( + this._outlineColorProperty, + e, + Color.BLACK, + scratchColor$8 + ), r = this._distanceDisplayConditionProperty.getValue( + e + ); + return new GeometryInstance({ + id: t, + geometry: new PolylineVolumeOutlineGeometry(this._options), + attributes: { + show: new ShowGeometryInstanceAttribute( + n && t.isShowing && this._showProperty.getValue(e) && this._showOutlineProperty.getValue(e) + ), + color: ColorGeometryInstanceAttribute.fromColor(i), + distanceDisplayCondition: DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition( + r + ) + } + }); +}; +PolylineVolumeGeometryUpdater.prototype._isHidden = function(e, t) { + return !defined(t.positions) || !defined(t.shape) || GeometryUpdater.prototype._isHidden.call(this, e, t); +}; +PolylineVolumeGeometryUpdater.prototype._isDynamic = function(e, t) { + return !t.positions.isConstant || // + !t.shape.isConstant || // + !Property.isConstant(t.granularity) || // + !Property.isConstant(t.outlineWidth) || // + !Property.isConstant(t.cornerType); +}; +PolylineVolumeGeometryUpdater.prototype._setStaticOptions = function(e, t) { + const n = t.granularity, i = t.cornerType, r = this._options, o = this._materialProperty instanceof ColorMaterialProperty; + r.vertexFormat = o ? PerInstanceColorAppearance.VERTEX_FORMAT : MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat, r.polylinePositions = t.positions.getValue( + Iso8601.MINIMUM_VALUE, + r.polylinePositions + ), r.shapePositions = t.shape.getValue( + Iso8601.MINIMUM_VALUE, + r.shape + ), r.granularity = defined(n) ? n.getValue(Iso8601.MINIMUM_VALUE) : void 0, r.cornerType = defined(i) ? i.getValue(Iso8601.MINIMUM_VALUE) : void 0; +}; +PolylineVolumeGeometryUpdater.DynamicGeometryUpdater = DynamicPolylineVolumeGeometryUpdater; +function DynamicPolylineVolumeGeometryUpdater(e, t, n) { + DynamicGeometryUpdater$1.call( + this, + e, + t, + n + ); +} +defined(Object.create) && (DynamicPolylineVolumeGeometryUpdater.prototype = Object.create( + DynamicGeometryUpdater$1.prototype +), DynamicPolylineVolumeGeometryUpdater.prototype.constructor = DynamicPolylineVolumeGeometryUpdater); +DynamicPolylineVolumeGeometryUpdater.prototype._isHidden = function(e, t, n) { + const i = this._options; + return !defined(i.polylinePositions) || !defined(i.shapePositions) || DynamicGeometryUpdater$1.prototype._isHidden.call( + this, + e, + t, + n + ); +}; +DynamicPolylineVolumeGeometryUpdater.prototype._setOptions = function(e, t, n) { + const i = this._options; + i.polylinePositions = Property.getValueOrUndefined( + t.positions, + n, + i.polylinePositions + ), i.shapePositions = Property.getValueOrUndefined( + t.shape, + n + ), i.granularity = Property.getValueOrUndefined( + t.granularity, + n + ), i.cornerType = Property.getValueOrUndefined( + t.cornerType, + n + ); +}; +const positionScratch$2 = new Cartesian3(), normalScratch$2 = new Cartesian3(), tangentScratch = new Cartesian3(), bitangentScratch = new Cartesian3(), rectangleScratch$5 = new Rectangle(), stScratch = new Cartesian2(), bottomBoundingSphere = new BoundingSphere(), topBoundingSphere = new BoundingSphere(); +function createAttributes(e, t) { + const n = new Geometry({ + attributes: new GeometryAttributes(), + primitiveType: PrimitiveType$1.TRIANGLES + }); + return n.attributes.position = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.DOUBLE, + componentsPerAttribute: 3, + values: t.positions + }), e.normal && (n.attributes.normal = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 3, + values: t.normals + })), e.tangent && (n.attributes.tangent = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 3, + values: t.tangents + })), e.bitangent && (n.attributes.bitangent = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 3, + values: t.bitangents + })), n; +} +function calculateAttributes(e, t, n, i) { + const r = e.length, o = t.normal ? new Float32Array(r) : void 0, s = t.tangent ? new Float32Array(r) : void 0, c = t.bitangent ? new Float32Array(r) : void 0; + let l = 0; + const d = bitangentScratch, f = tangentScratch; + let h = normalScratch$2; + if (t.normal || t.tangent || t.bitangent) + for (let p = 0; p < r; p += 3) { + const m = Cartesian3.fromArray(e, p, positionScratch$2), _ = l + 1, y = l + 2; + h = n.geodeticSurfaceNormal(m, h), (t.tangent || t.bitangent) && (Cartesian3.cross(Cartesian3.UNIT_Z, h, f), Matrix3.multiplyByVector(i, f, f), Cartesian3.normalize(f, f), t.bitangent && Cartesian3.normalize( + Cartesian3.cross(h, f, d), + d + )), t.normal && (o[l] = h.x, o[_] = h.y, o[y] = h.z), t.tangent && (s[l] = f.x, s[_] = f.y, s[y] = f.z), t.bitangent && (c[l] = d.x, c[_] = d.y, c[y] = d.z), l += 3; + } + return createAttributes(t, { + positions: e, + normals: o, + tangents: s, + bitangents: c + }); +} +const v1Scratch = new Cartesian3(), v2Scratch = new Cartesian3(); +function calculateAttributesWall(e, t, n) { + const i = e.length, r = t.normal ? new Float32Array(i) : void 0, o = t.tangent ? new Float32Array(i) : void 0, s = t.bitangent ? new Float32Array(i) : void 0; + let c = 0, l = 0, d = 0, f = !0, h = bitangentScratch, p = tangentScratch, m = normalScratch$2; + if (t.normal || t.tangent || t.bitangent) + for (let _ = 0; _ < i; _ += 6) { + const y = Cartesian3.fromArray(e, _, positionScratch$2), C = Cartesian3.fromArray(e, (_ + 6) % i, v1Scratch); + if (f) { + const T = Cartesian3.fromArray(e, (_ + 3) % i, v2Scratch); + Cartesian3.subtract(C, y, C), Cartesian3.subtract(T, y, T), m = Cartesian3.normalize(Cartesian3.cross(T, C, m), m), f = !1; + } + Cartesian3.equalsEpsilon(C, y, CesiumMath.EPSILON10) && (f = !0), (t.tangent || t.bitangent) && (h = n.geodeticSurfaceNormal(y, h), t.tangent && (p = Cartesian3.normalize( + Cartesian3.cross(h, m, p), + p + ))), t.normal && (r[c++] = m.x, r[c++] = m.y, r[c++] = m.z, r[c++] = m.x, r[c++] = m.y, r[c++] = m.z), t.tangent && (o[l++] = p.x, o[l++] = p.y, o[l++] = p.z, o[l++] = p.x, o[l++] = p.y, o[l++] = p.z), t.bitangent && (s[d++] = h.x, s[d++] = h.y, s[d++] = h.z, s[d++] = h.x, s[d++] = h.y, s[d++] = h.z); + } + return createAttributes(t, { + positions: e, + normals: r, + tangents: o, + bitangents: s + }); +} +function constructRectangle(e, t) { + const n = e._vertexFormat, i = e._ellipsoid, r = t.height, o = t.width, s = t.northCap, c = t.southCap; + let l = 0, d = r, f = r, h = 0; + s && (l = 1, f -= 1, h += 1), c && (d -= 1, f -= 1, h += 1), h += o * f; + const p = n.position ? new Float64Array(h * 3) : void 0, m = n.st ? new Float32Array(h * 2) : void 0; + let _ = 0, y = 0; + const C = positionScratch$2, T = stScratch; + let x = Number.MAX_VALUE, b = Number.MAX_VALUE, S = -Number.MAX_VALUE, E = -Number.MAX_VALUE; + for (let L = l; L < d; ++L) + for (let g = 0; g < o; ++g) + RectangleGeometryLibrary.computePosition( + t, + i, + n.st, + L, + g, + C, + T + ), p[_++] = C.x, p[_++] = C.y, p[_++] = C.z, n.st && (m[y++] = T.x, m[y++] = T.y, x = Math.min(x, T.x), b = Math.min(b, T.y), S = Math.max(S, T.x), E = Math.max(E, T.y)); + if (s && (RectangleGeometryLibrary.computePosition( + t, + i, + n.st, + 0, + 0, + C, + T + ), p[_++] = C.x, p[_++] = C.y, p[_++] = C.z, n.st && (m[y++] = T.x, m[y++] = T.y, x = T.x, b = T.y, S = T.x, E = T.y)), c && (RectangleGeometryLibrary.computePosition( + t, + i, + n.st, + r - 1, + 0, + C, + T + ), p[_++] = C.x, p[_++] = C.y, p[_] = C.z, n.st && (m[y++] = T.x, m[y] = T.y, x = Math.min(x, T.x), b = Math.min(b, T.y), S = Math.max(S, T.x), E = Math.max(E, T.y))), n.st && (x < 0 || b < 0 || S > 1 || E > 1)) + for (let L = 0; L < m.length; L += 2) + m[L] = (m[L] - x) / (S - x), m[L + 1] = (m[L + 1] - b) / (E - b); + const A = calculateAttributes( + p, + n, + i, + t.tangentRotationMatrix + ); + let D = 6 * (o - 1) * (f - 1); + s && (D += 3 * (o - 1)), c && (D += 3 * (o - 1)); + const P = IndexDatatype$1.createTypedArray(h, D); + let I = 0, M = 0, R; + for (R = 0; R < f - 1; ++R) { + for (let L = 0; L < o - 1; ++L) { + const g = I, w = g + o, O = w + 1, N = g + 1; + P[M++] = g, P[M++] = w, P[M++] = N, P[M++] = N, P[M++] = w, P[M++] = O, ++I; + } + ++I; + } + if (s || c) { + let L = h - 1; + const g = h - 1; + s && c && (L = h - 2); + let w, O; + if (I = 0, s) + for (R = 0; R < o - 1; R++) + w = I, O = w + 1, P[M++] = L, P[M++] = w, P[M++] = O, ++I; + if (c) + for (I = (f - 1) * o, R = 0; R < o - 1; R++) + w = I, O = w + 1, P[M++] = w, P[M++] = g, P[M++] = O, ++I; + } + return A.indices = P, n.st && (A.attributes.st = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 2, + values: m + })), A; +} +function addWallPositions(e, t, n, i, r) { + return e[t++] = i[n], e[t++] = i[n + 1], e[t++] = i[n + 2], e[t++] = r[n], e[t++] = r[n + 1], e[t] = r[n + 2], e; +} +function addWallTextureCoordinates(e, t, n, i) { + return e[t++] = i[n], e[t++] = i[n + 1], e[t++] = i[n], e[t] = i[n + 1], e; +} +const scratchVertexFormat$3 = new VertexFormat(); +function constructExtrudedRectangle(e, t) { + const n = e._shadowVolume, i = e._offsetAttribute, r = e._vertexFormat, o = e._extrudedHeight, s = e._surfaceHeight, c = e._ellipsoid, l = t.height, d = t.width; + let f; + if (n) { + const re = VertexFormat.clone( + r, + scratchVertexFormat$3 + ); + re.normal = !0, e._vertexFormat = re; + } + const h = constructRectangle(e, t); + n && (e._vertexFormat = r); + let p = PolygonPipeline.scaleToGeodeticHeight( + h.attributes.position.values, + s, + c, + !1 + ); + p = new Float64Array(p); + let m = p.length; + const _ = m * 2, y = new Float64Array(_); + y.set(p); + const C = PolygonPipeline.scaleToGeodeticHeight( + h.attributes.position.values, + o, + c + ); + y.set(C, m), h.attributes.position.values = y; + const T = r.normal ? new Float32Array(_) : void 0, x = r.tangent ? new Float32Array(_) : void 0, b = r.bitangent ? new Float32Array(_) : void 0, S = r.st ? new Float32Array(_ / 3 * 2) : void 0; + let E, A; + if (r.normal) { + for (A = h.attributes.normal.values, T.set(A), f = 0; f < m; f++) + A[f] = -A[f]; + T.set(A, m), h.attributes.normal.values = T; + } + if (n) { + A = h.attributes.normal.values, r.normal || (h.attributes.normal = void 0); + const re = new Float32Array(_); + for (f = 0; f < m; f++) + A[f] = -A[f]; + re.set(A, m), h.attributes.extrudeDirection = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 3, + values: re + }); + } + let D; + const P = defined(i); + if (P) { + const re = m / 3 * 2; + let be = new Uint8Array(re); + i === GeometryOffsetAttribute$1.TOP ? be = be.fill(1, 0, re / 2) : (D = i === GeometryOffsetAttribute$1.NONE ? 0 : 1, be = be.fill(D)), h.attributes.applyOffset = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE, + componentsPerAttribute: 1, + values: be + }); + } + if (r.tangent) { + const re = h.attributes.tangent.values; + for (x.set(re), f = 0; f < m; f++) + re[f] = -re[f]; + x.set(re, m), h.attributes.tangent.values = x; + } + if (r.bitangent) { + const re = h.attributes.bitangent.values; + b.set(re), b.set(re, m), h.attributes.bitangent.values = b; + } + r.st && (E = h.attributes.st.values, S.set(E), S.set(E, m / 3 * 2), h.attributes.st.values = S); + const I = h.indices, M = I.length, R = m / 3, L = IndexDatatype$1.createTypedArray( + _ / 3, + M * 2 + ); + for (L.set(I), f = 0; f < M; f += 3) + L[f + M] = I[f + 2] + R, L[f + 1 + M] = I[f + 1] + R, L[f + 2 + M] = I[f] + R; + h.indices = L; + const g = t.northCap, w = t.southCap; + let O = l, N = 2, F = 0, B = 4, V = 4; + g && (N -= 1, O -= 1, F += 1, B -= 2, V -= 1), w && (N -= 1, O -= 1, F += 1, B -= 2, V -= 1), F += N * d + 2 * O - B; + const U = (F + V) * 2; + let k = new Float64Array(U * 3); + const $ = n ? new Float32Array(U * 3) : void 0; + let G = P ? new Uint8Array(U) : void 0, q = r.st ? new Float32Array(U * 2) : void 0; + const z = i === GeometryOffsetAttribute$1.TOP; + P && !z && (D = i === GeometryOffsetAttribute$1.ALL ? 1 : 0, G = G.fill(D)); + let H = 0, Q = 0, ne = 0, K = 0; + const Z = d * O; + let ee; + for (f = 0; f < Z; f += d) + ee = f * 3, k = addWallPositions( + k, + H, + ee, + p, + C + ), H += 6, r.st && (q = addWallTextureCoordinates( + q, + Q, + f * 2, + E + ), Q += 4), n && (ne += 3, $[ne++] = A[ee], $[ne++] = A[ee + 1], $[ne++] = A[ee + 2]), z && (G[K++] = 1, K += 1); + if (w) { + const re = g ? Z + 1 : Z; + for (ee = re * 3, f = 0; f < 2; f++) + k = addWallPositions( + k, + H, + ee, + p, + C + ), H += 6, r.st && (q = addWallTextureCoordinates( + q, + Q, + re * 2, + E + ), Q += 4), n && (ne += 3, $[ne++] = A[ee], $[ne++] = A[ee + 1], $[ne++] = A[ee + 2]), z && (G[K++] = 1, K += 1); + } else + for (f = Z - d; f < Z; f++) + ee = f * 3, k = addWallPositions( + k, + H, + ee, + p, + C + ), H += 6, r.st && (q = addWallTextureCoordinates( + q, + Q, + f * 2, + E + ), Q += 4), n && (ne += 3, $[ne++] = A[ee], $[ne++] = A[ee + 1], $[ne++] = A[ee + 2]), z && (G[K++] = 1, K += 1); + for (f = Z - 1; f > 0; f -= d) + ee = f * 3, k = addWallPositions( + k, + H, + ee, + p, + C + ), H += 6, r.st && (q = addWallTextureCoordinates( + q, + Q, + f * 2, + E + ), Q += 4), n && (ne += 3, $[ne++] = A[ee], $[ne++] = A[ee + 1], $[ne++] = A[ee + 2]), z && (G[K++] = 1, K += 1); + if (g) { + const re = Z; + for (ee = re * 3, f = 0; f < 2; f++) + k = addWallPositions( + k, + H, + ee, + p, + C + ), H += 6, r.st && (q = addWallTextureCoordinates( + q, + Q, + re * 2, + E + ), Q += 4), n && (ne += 3, $[ne++] = A[ee], $[ne++] = A[ee + 1], $[ne++] = A[ee + 2]), z && (G[K++] = 1, K += 1); + } else + for (f = d - 1; f >= 0; f--) + ee = f * 3, k = addWallPositions( + k, + H, + ee, + p, + C + ), H += 6, r.st && (q = addWallTextureCoordinates( + q, + Q, + f * 2, + E + ), Q += 4), n && (ne += 3, $[ne++] = A[ee], $[ne++] = A[ee + 1], $[ne++] = A[ee + 2]), z && (G[K++] = 1, K += 1); + let oe = calculateAttributesWall(k, r, c); + r.st && (oe.attributes.st = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 2, + values: q + })), n && (oe.attributes.extrudeDirection = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 3, + values: $ + })), P && (oe.attributes.applyOffset = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE, + componentsPerAttribute: 1, + values: G + })); + const X = IndexDatatype$1.createTypedArray( + U, + F * 6 + ); + let fe, de, ce, ye; + m = k.length / 3; + let ge = 0; + for (f = 0; f < m - 1; f += 2) { + fe = f, ye = (fe + 2) % m; + const re = Cartesian3.fromArray(k, fe * 3, v1Scratch), be = Cartesian3.fromArray(k, ye * 3, v2Scratch); + Cartesian3.equalsEpsilon(re, be, CesiumMath.EPSILON10) || (de = (fe + 1) % m, ce = (de + 2) % m, X[ge++] = fe, X[ge++] = de, X[ge++] = ye, X[ge++] = ye, X[ge++] = de, X[ge++] = ce); + } + return oe.indices = X, oe = GeometryPipeline.combineInstances([ + new GeometryInstance({ + geometry: h + }), + new GeometryInstance({ + geometry: oe + }) + ]), oe[0]; +} +const scratchRectanglePoints = [ + new Cartesian3(), + new Cartesian3(), + new Cartesian3(), + new Cartesian3() +], nwScratch = new Cartographic(), stNwScratch = new Cartographic(); +function computeRectangle(e, t, n, i, r) { + if (n === 0) + return Rectangle.clone(e, r); + const o = RectangleGeometryLibrary.computeOptions( + e, + t, + n, + 0, + rectangleScratch$5, + nwScratch + ), s = o.height, c = o.width, l = scratchRectanglePoints; + return RectangleGeometryLibrary.computePosition( + o, + i, + !1, + 0, + 0, + l[0] + ), RectangleGeometryLibrary.computePosition( + o, + i, + !1, + 0, + c - 1, + l[1] + ), RectangleGeometryLibrary.computePosition( + o, + i, + !1, + s - 1, + 0, + l[2] + ), RectangleGeometryLibrary.computePosition( + o, + i, + !1, + s - 1, + c - 1, + l[3] + ), Rectangle.fromCartesianArray(l, i, r); +} +function RectangleGeometry(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.rectangle, n = defaultValue(e.height, 0), i = defaultValue(e.extrudedHeight, n); + this._rectangle = Rectangle.clone(t), this._granularity = defaultValue( + e.granularity, + CesiumMath.RADIANS_PER_DEGREE + ), this._ellipsoid = Ellipsoid.clone( + defaultValue(e.ellipsoid, Ellipsoid.default) + ), this._surfaceHeight = Math.max(n, i), this._rotation = defaultValue(e.rotation, 0), this._stRotation = defaultValue(e.stRotation, 0), this._vertexFormat = VertexFormat.clone( + defaultValue(e.vertexFormat, VertexFormat.DEFAULT) + ), this._extrudedHeight = Math.min(n, i), this._shadowVolume = defaultValue(e.shadowVolume, !1), this._workerName = "createRectangleGeometry", this._offsetAttribute = e.offsetAttribute, this._rotatedRectangle = void 0, this._textureCoordinateRotationPoints = void 0; +} +RectangleGeometry.packedLength = Rectangle.packedLength + Ellipsoid.packedLength + VertexFormat.packedLength + 7; +RectangleGeometry.pack = function(e, t, n) { + return n = defaultValue(n, 0), Rectangle.pack(e._rectangle, t, n), n += Rectangle.packedLength, Ellipsoid.pack(e._ellipsoid, t, n), n += Ellipsoid.packedLength, VertexFormat.pack(e._vertexFormat, t, n), n += VertexFormat.packedLength, t[n++] = e._granularity, t[n++] = e._surfaceHeight, t[n++] = e._rotation, t[n++] = e._stRotation, t[n++] = e._extrudedHeight, t[n++] = e._shadowVolume ? 1 : 0, t[n] = defaultValue(e._offsetAttribute, -1), t; +}; +const scratchRectangle$3 = new Rectangle(), scratchEllipsoid$4 = Ellipsoid.clone(Ellipsoid.UNIT_SPHERE), scratchOptions$6 = { + rectangle: scratchRectangle$3, + ellipsoid: scratchEllipsoid$4, + vertexFormat: scratchVertexFormat$3, + granularity: void 0, + height: void 0, + rotation: void 0, + stRotation: void 0, + extrudedHeight: void 0, + shadowVolume: void 0, + offsetAttribute: void 0 +}; +RectangleGeometry.unpack = function(e, t, n) { + t = defaultValue(t, 0); + const i = Rectangle.unpack(e, t, scratchRectangle$3); + t += Rectangle.packedLength; + const r = Ellipsoid.unpack(e, t, scratchEllipsoid$4); + t += Ellipsoid.packedLength; + const o = VertexFormat.unpack( + e, + t, + scratchVertexFormat$3 + ); + t += VertexFormat.packedLength; + const s = e[t++], c = e[t++], l = e[t++], d = e[t++], f = e[t++], h = e[t++] === 1, p = e[t]; + return defined(n) ? (n._rectangle = Rectangle.clone(i, n._rectangle), n._ellipsoid = Ellipsoid.clone(r, n._ellipsoid), n._vertexFormat = VertexFormat.clone(o, n._vertexFormat), n._granularity = s, n._surfaceHeight = c, n._rotation = l, n._stRotation = d, n._extrudedHeight = f, n._shadowVolume = h, n._offsetAttribute = p === -1 ? void 0 : p, n) : (scratchOptions$6.granularity = s, scratchOptions$6.height = c, scratchOptions$6.rotation = l, scratchOptions$6.stRotation = d, scratchOptions$6.extrudedHeight = f, scratchOptions$6.shadowVolume = h, scratchOptions$6.offsetAttribute = p === -1 ? void 0 : p, new RectangleGeometry(scratchOptions$6)); +}; +RectangleGeometry.computeRectangle = function(e, t) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const n = e.rectangle, i = defaultValue( + e.granularity, + CesiumMath.RADIANS_PER_DEGREE + ), r = defaultValue(e.ellipsoid, Ellipsoid.default), o = defaultValue(e.rotation, 0); + return computeRectangle(n, i, o, r, t); +}; +const tangentRotationMatrixScratch = new Matrix3(), quaternionScratch = new Quaternion(), centerScratch$2 = new Cartographic(); +RectangleGeometry.createGeometry = function(e) { + if (CesiumMath.equalsEpsilon( + e._rectangle.north, + e._rectangle.south, + CesiumMath.EPSILON10 + ) || CesiumMath.equalsEpsilon( + e._rectangle.east, + e._rectangle.west, + CesiumMath.EPSILON10 + )) + return; + let t = e._rectangle; + const n = e._ellipsoid, i = e._rotation, r = e._stRotation, o = e._vertexFormat, s = RectangleGeometryLibrary.computeOptions( + t, + e._granularity, + i, + r, + rectangleScratch$5, + nwScratch, + stNwScratch + ), c = tangentRotationMatrixScratch; + if (r !== 0 || i !== 0) { + const m = Rectangle.center(t, centerScratch$2), _ = n.geodeticSurfaceNormalCartographic(m, v1Scratch); + Quaternion.fromAxisAngle(_, -r, quaternionScratch), Matrix3.fromQuaternion(quaternionScratch, c); + } else + Matrix3.clone(Matrix3.IDENTITY, c); + const l = e._surfaceHeight, d = e._extrudedHeight, f = !CesiumMath.equalsEpsilon( + l, + d, + 0, + CesiumMath.EPSILON2 + ); + s.lonScalar = 1 / e._rectangle.width, s.latScalar = 1 / e._rectangle.height, s.tangentRotationMatrix = c; + let h, p; + if (t = e._rectangle, f) { + h = constructExtrudedRectangle(e, s); + const m = BoundingSphere.fromRectangle3D( + t, + n, + l, + topBoundingSphere + ), _ = BoundingSphere.fromRectangle3D( + t, + n, + d, + bottomBoundingSphere + ); + p = BoundingSphere.union(m, _); + } else { + if (h = constructRectangle(e, s), h.attributes.position.values = PolygonPipeline.scaleToGeodeticHeight( + h.attributes.position.values, + l, + n, + !1 + ), defined(e._offsetAttribute)) { + const m = h.attributes.position.values.length, _ = e._offsetAttribute === GeometryOffsetAttribute$1.NONE ? 0 : 1, y = new Uint8Array(m / 3).fill(_); + h.attributes.applyOffset = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE, + componentsPerAttribute: 1, + values: y + }); + } + p = BoundingSphere.fromRectangle3D( + t, + n, + l + ); + } + return o.position || delete h.attributes.position, new Geometry({ + attributes: h.attributes, + indices: h.indices, + primitiveType: h.primitiveType, + boundingSphere: p, + offsetAttribute: e._offsetAttribute + }); +}; +RectangleGeometry.createShadowVolume = function(e, t, n) { + const i = e._granularity, r = e._ellipsoid, o = t(i, r), s = n(i, r); + return new RectangleGeometry({ + rectangle: e._rectangle, + rotation: e._rotation, + ellipsoid: r, + stRotation: e._stRotation, + granularity: i, + extrudedHeight: s, + height: o, + vertexFormat: VertexFormat.POSITION_ONLY, + shadowVolume: !0 + }); +}; +const unrotatedTextureRectangleScratch = new Rectangle(), points2DScratch = [new Cartesian2(), new Cartesian2(), new Cartesian2()], rotation2DScratch = new Matrix2(), rectangleCenterScratch$1 = new Cartographic(); +function textureCoordinateRotationPoints(e) { + if (e._stRotation === 0) + return [0, 0, 0, 1, 1, 0]; + const t = Rectangle.clone( + e._rectangle, + unrotatedTextureRectangleScratch + ), n = e._granularity, i = e._ellipsoid, r = e._rotation - e._stRotation, o = computeRectangle( + t, + n, + r, + i, + unrotatedTextureRectangleScratch + ), s = points2DScratch; + s[0].x = o.west, s[0].y = o.south, s[1].x = o.west, s[1].y = o.north, s[2].x = o.east, s[2].y = o.south; + const c = e.rectangle, l = Matrix2.fromRotation( + e._stRotation, + rotation2DScratch + ), d = Rectangle.center( + c, + rectangleCenterScratch$1 + ); + for (let _ = 0; _ < 3; ++_) { + const y = s[_]; + y.x -= d.longitude, y.y -= d.latitude, Matrix2.multiplyByVector(l, y, y), y.x += d.longitude, y.y += d.latitude, y.x = (y.x - c.west) / c.width, y.y = (y.y - c.south) / c.height; + } + const f = s[0], h = s[1], p = s[2], m = new Array(6); + return Cartesian2.pack(f, m), Cartesian2.pack(h, m, 2), Cartesian2.pack(p, m, 4), m; +} +Object.defineProperties(RectangleGeometry.prototype, { + /** + * @private + */ + rectangle: { + get: function() { + return defined(this._rotatedRectangle) || (this._rotatedRectangle = computeRectangle( + this._rectangle, + this._granularity, + this._rotation, + this._ellipsoid + )), this._rotatedRectangle; + } + }, + /** + * For remapping texture coordinates when rendering RectangleGeometries as GroundPrimitives. + * This version permits skew in textures by computing offsets directly in cartographic space and + * more accurately approximates rendering RectangleGeometries with height as standard Primitives. + * @see Geometry#_textureCoordinateRotationPoints + * @private + */ + textureCoordinateRotationPoints: { + get: function() { + return defined(this._textureCoordinateRotationPoints) || (this._textureCoordinateRotationPoints = textureCoordinateRotationPoints( + this + )), this._textureCoordinateRotationPoints; + } + } +}); +const scratchColor$7 = new Color(), defaultOffset$3 = Cartesian3.ZERO, offsetScratch$3 = new Cartesian3(), scratchRectangle$2 = new Rectangle(), scratchCenterRect = new Rectangle(), scratchCarto = new Cartographic(); +function RectangleGeometryOptions(e) { + this.id = e, this.vertexFormat = void 0, this.rectangle = void 0, this.height = void 0, this.extrudedHeight = void 0, this.granularity = void 0, this.stRotation = void 0, this.rotation = void 0, this.offsetAttribute = void 0; +} +function RectangleGeometryUpdater(e, t) { + GroundGeometryUpdater.call(this, { + entity: e, + scene: t, + geometryOptions: new RectangleGeometryOptions(e), + geometryPropertyName: "rectangle", + observedPropertyNames: ["availability", "rectangle"] + }), this._onEntityPropertyChanged( + e, + "rectangle", + e.rectangle, + void 0 + ); +} +defined(Object.create) && (RectangleGeometryUpdater.prototype = Object.create( + GroundGeometryUpdater.prototype +), RectangleGeometryUpdater.prototype.constructor = RectangleGeometryUpdater); +RectangleGeometryUpdater.prototype.createFillGeometryInstance = function(e) { + const t = this._entity, n = t.isAvailable(e), i = { + show: new ShowGeometryInstanceAttribute( + n && t.isShowing && this._showProperty.getValue(e) && this._fillProperty.getValue(e) + ), + distanceDisplayCondition: DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition( + this._distanceDisplayConditionProperty.getValue(e) + ), + offset: void 0, + color: void 0 + }; + if (this._materialProperty instanceof ColorMaterialProperty) { + let r; + defined(this._materialProperty.color) && (this._materialProperty.color.isConstant || n) && (r = this._materialProperty.color.getValue(e, scratchColor$7)), defined(r) || (r = Color.WHITE), i.color = ColorGeometryInstanceAttribute.fromColor(r); + } + return defined(this._options.offsetAttribute) && (i.offset = OffsetGeometryInstanceAttribute.fromCartesian3( + Property.getValueOrDefault( + this._terrainOffsetProperty, + e, + defaultOffset$3, + offsetScratch$3 + ) + )), new GeometryInstance({ + id: t, + geometry: new RectangleGeometry(this._options), + attributes: i + }); +}; +RectangleGeometryUpdater.prototype.createOutlineGeometryInstance = function(e) { + const t = this._entity, n = t.isAvailable(e), i = Property.getValueOrDefault( + this._outlineColorProperty, + e, + Color.BLACK, + scratchColor$7 + ), r = this._distanceDisplayConditionProperty.getValue( + e + ), o = { + show: new ShowGeometryInstanceAttribute( + n && t.isShowing && this._showProperty.getValue(e) && this._showOutlineProperty.getValue(e) + ), + color: ColorGeometryInstanceAttribute.fromColor(i), + distanceDisplayCondition: DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition( + r + ), + offset: void 0 + }; + return defined(this._options.offsetAttribute) && (o.offset = OffsetGeometryInstanceAttribute.fromCartesian3( + Property.getValueOrDefault( + this._terrainOffsetProperty, + e, + defaultOffset$3, + offsetScratch$3 + ) + )), new GeometryInstance({ + id: t, + geometry: new RectangleOutlineGeometry(this._options), + attributes: o + }); +}; +RectangleGeometryUpdater.prototype._computeCenter = function(e, t) { + const n = Property.getValueOrUndefined( + this._entity.rectangle.coordinates, + e, + scratchCenterRect + ); + if (!defined(n)) + return; + const i = Rectangle.center(n, scratchCarto); + return Cartographic.toCartesian(i, Ellipsoid.default, t); +}; +RectangleGeometryUpdater.prototype._isHidden = function(e, t) { + return !defined(t.coordinates) || GeometryUpdater.prototype._isHidden.call(this, e, t); +}; +RectangleGeometryUpdater.prototype._isDynamic = function(e, t) { + return !t.coordinates.isConstant || // + !Property.isConstant(t.height) || // + !Property.isConstant(t.extrudedHeight) || // + !Property.isConstant(t.granularity) || // + !Property.isConstant(t.stRotation) || // + !Property.isConstant(t.rotation) || // + !Property.isConstant(t.outlineWidth) || // + !Property.isConstant(t.zIndex) || // + this._onTerrain && !Property.isConstant(this._materialProperty) && !(this._materialProperty instanceof ColorMaterialProperty); +}; +RectangleGeometryUpdater.prototype._setStaticOptions = function(e, t) { + const n = this._materialProperty instanceof ColorMaterialProperty; + let i = Property.getValueOrUndefined( + t.height, + Iso8601.MINIMUM_VALUE + ); + const r = Property.getValueOrDefault( + t.heightReference, + Iso8601.MINIMUM_VALUE, + HeightReference$1.NONE + ); + let o = Property.getValueOrUndefined( + t.extrudedHeight, + Iso8601.MINIMUM_VALUE + ); + const s = Property.getValueOrDefault( + t.extrudedHeightReference, + Iso8601.MINIMUM_VALUE, + HeightReference$1.NONE + ); + defined(o) && !defined(i) && (i = 0); + const c = this._options; + c.vertexFormat = n ? PerInstanceColorAppearance.VERTEX_FORMAT : MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat, c.rectangle = t.coordinates.getValue( + Iso8601.MINIMUM_VALUE, + c.rectangle + ), c.granularity = Property.getValueOrUndefined( + t.granularity, + Iso8601.MINIMUM_VALUE + ), c.stRotation = Property.getValueOrUndefined( + t.stRotation, + Iso8601.MINIMUM_VALUE + ), c.rotation = Property.getValueOrUndefined( + t.rotation, + Iso8601.MINIMUM_VALUE + ), c.offsetAttribute = GroundGeometryUpdater.computeGeometryOffsetAttribute( + i, + r, + o, + s + ), c.height = GroundGeometryUpdater.getGeometryHeight( + i, + r + ), o = GroundGeometryUpdater.getGeometryExtrudedHeight( + o, + s + ), o === GroundGeometryUpdater.CLAMP_TO_GROUND && (o = ApproximateTerrainHeights.getMinimumMaximumHeights( + RectangleGeometry.computeRectangle(c, scratchRectangle$2) + ).minimumTerrainHeight), c.extrudedHeight = o; +}; +RectangleGeometryUpdater.DynamicGeometryUpdater = DynamicRectangleGeometryUpdater; +function DynamicRectangleGeometryUpdater(e, t, n) { + DynamicGeometryUpdater$1.call( + this, + e, + t, + n + ); +} +defined(Object.create) && (DynamicRectangleGeometryUpdater.prototype = Object.create( + DynamicGeometryUpdater$1.prototype +), DynamicRectangleGeometryUpdater.prototype.constructor = DynamicRectangleGeometryUpdater); +DynamicRectangleGeometryUpdater.prototype._isHidden = function(e, t, n) { + return !defined(this._options.rectangle) || DynamicGeometryUpdater$1.prototype._isHidden.call( + this, + e, + t, + n + ); +}; +DynamicRectangleGeometryUpdater.prototype._setOptions = function(e, t, n) { + const i = this._options; + let r = Property.getValueOrUndefined(t.height, n); + const o = Property.getValueOrDefault( + t.heightReference, + n, + HeightReference$1.NONE + ); + let s = Property.getValueOrUndefined( + t.extrudedHeight, + n + ); + const c = Property.getValueOrDefault( + t.extrudedHeightReference, + n, + HeightReference$1.NONE + ); + defined(s) && !defined(r) && (r = 0), i.rectangle = Property.getValueOrUndefined( + t.coordinates, + n, + i.rectangle + ), i.granularity = Property.getValueOrUndefined( + t.granularity, + n + ), i.stRotation = Property.getValueOrUndefined(t.stRotation, n), i.rotation = Property.getValueOrUndefined(t.rotation, n), i.offsetAttribute = GroundGeometryUpdater.computeGeometryOffsetAttribute( + r, + o, + s, + c + ), i.height = GroundGeometryUpdater.getGeometryHeight( + r, + o + ), s = GroundGeometryUpdater.getGeometryExtrudedHeight( + s, + c + ), s === GroundGeometryUpdater.CLAMP_TO_GROUND && (s = ApproximateTerrainHeights.getMinimumMaximumHeights( + RectangleGeometry.computeRectangle(i, scratchRectangle$2) + ).minimumTerrainHeight), i.extrudedHeight = s; +}; +const WallGeometryLibrary = {}; +function latLonEquals(e, t) { + return CesiumMath.equalsEpsilon(e.latitude, t.latitude, CesiumMath.EPSILON10) && CesiumMath.equalsEpsilon(e.longitude, t.longitude, CesiumMath.EPSILON10); +} +const scratchCartographic1 = new Cartographic(), scratchCartographic2 = new Cartographic(); +function removeDuplicates$1(e, t, n, i) { + t = arrayRemoveDuplicates(t, Cartesian3.equalsEpsilon); + const r = t.length; + if (r < 2) + return; + const o = defined(i), s = defined(n), c = new Array(r), l = new Array(r), d = new Array(r), f = t[0]; + c[0] = f; + const h = e.cartesianToCartographic(f, scratchCartographic1); + s && (h.height = n[0]), l[0] = h.height, o ? d[0] = i[0] : d[0] = 0; + const p = l[0], m = d[0]; + let _ = p === m, y = 1; + for (let C = 1; C < r; ++C) { + const T = t[C], x = e.cartesianToCartographic(T, scratchCartographic2); + s && (x.height = n[C]), _ = _ && x.height === 0, latLonEquals(h, x) ? h.height < x.height && (l[y - 1] = x.height) : (c[y] = T, l[y] = x.height, o ? d[y] = i[C] : d[y] = 0, _ = _ && l[y] === d[y], Cartographic.clone(x, h), ++y); + } + if (!(_ || y < 2)) + return c.length = y, l.length = y, d.length = y, { + positions: c, + topHeights: l, + bottomHeights: d + }; +} +const positionsArrayScratch = new Array(2), heightsArrayScratch = new Array(2), generateArcOptionsScratch$1 = { + positions: void 0, + height: void 0, + granularity: void 0, + ellipsoid: void 0 +}; +WallGeometryLibrary.computePositions = function(e, t, n, i, r, o) { + const s = removeDuplicates$1( + e, + t, + n, + i + ); + if (!defined(s)) + return; + t = s.positions, n = s.topHeights, i = s.bottomHeights; + const c = t.length, l = c - 2; + let d, f; + const h = CesiumMath.chordLength( + r, + e.maximumRadius + ), p = generateArcOptionsScratch$1; + if (p.minDistance = h, p.ellipsoid = e, o) { + let m = 0, _; + for (_ = 0; _ < c - 1; _++) + m += PolylinePipeline.numberOfPoints( + t[_], + t[_ + 1], + h + ) + 1; + d = new Float64Array(m * 3), f = new Float64Array(m * 3); + const y = positionsArrayScratch, C = heightsArrayScratch; + p.positions = y, p.height = C; + let T = 0; + for (_ = 0; _ < c - 1; _++) { + y[0] = t[_], y[1] = t[_ + 1], C[0] = n[_], C[1] = n[_ + 1]; + const x = PolylinePipeline.generateArc(p); + d.set(x, T), C[0] = i[_], C[1] = i[_ + 1], f.set( + PolylinePipeline.generateArc(p), + T + ), T += x.length; + } + } else + p.positions = t, p.height = n, d = new Float64Array( + PolylinePipeline.generateArc(p) + ), p.height = i, f = new Float64Array( + PolylinePipeline.generateArc(p) + ); + return { + bottomPositions: f, + topPositions: d, + numCorners: l + }; +}; +const scratchCartesian3Position1$1 = new Cartesian3(), scratchCartesian3Position2$1 = new Cartesian3(), scratchCartesian3Position4 = new Cartesian3(), scratchCartesian3Position5 = new Cartesian3(), scratchBitangent = new Cartesian3(), scratchTangent = new Cartesian3(), scratchNormal$2 = new Cartesian3(); +function WallGeometry(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.positions, n = e.maximumHeights, i = e.minimumHeights, r = defaultValue(e.vertexFormat, VertexFormat.DEFAULT), o = defaultValue( + e.granularity, + CesiumMath.RADIANS_PER_DEGREE + ), s = defaultValue(e.ellipsoid, Ellipsoid.default); + this._positions = t, this._minimumHeights = i, this._maximumHeights = n, this._vertexFormat = VertexFormat.clone(r), this._granularity = o, this._ellipsoid = Ellipsoid.clone(s), this._workerName = "createWallGeometry"; + let c = 1 + t.length * Cartesian3.packedLength + 2; + defined(i) && (c += i.length), defined(n) && (c += n.length), this.packedLength = c + Ellipsoid.packedLength + VertexFormat.packedLength + 1; +} +WallGeometry.pack = function(e, t, n) { + n = defaultValue(n, 0); + let i; + const r = e._positions; + let o = r.length; + for (t[n++] = o, i = 0; i < o; ++i, n += Cartesian3.packedLength) + Cartesian3.pack(r[i], t, n); + const s = e._minimumHeights; + if (o = defined(s) ? s.length : 0, t[n++] = o, defined(s)) + for (i = 0; i < o; ++i) + t[n++] = s[i]; + const c = e._maximumHeights; + if (o = defined(c) ? c.length : 0, t[n++] = o, defined(c)) + for (i = 0; i < o; ++i) + t[n++] = c[i]; + return Ellipsoid.pack(e._ellipsoid, t, n), n += Ellipsoid.packedLength, VertexFormat.pack(e._vertexFormat, t, n), n += VertexFormat.packedLength, t[n] = e._granularity, t; +}; +const scratchEllipsoid$3 = Ellipsoid.clone(Ellipsoid.UNIT_SPHERE), scratchVertexFormat$2 = new VertexFormat(), scratchOptions$5 = { + positions: void 0, + minimumHeights: void 0, + maximumHeights: void 0, + ellipsoid: scratchEllipsoid$3, + vertexFormat: scratchVertexFormat$2, + granularity: void 0 +}; +WallGeometry.unpack = function(e, t, n) { + t = defaultValue(t, 0); + let i, r = e[t++]; + const o = new Array(r); + for (i = 0; i < r; ++i, t += Cartesian3.packedLength) + o[i] = Cartesian3.unpack(e, t); + r = e[t++]; + let s; + if (r > 0) + for (s = new Array(r), i = 0; i < r; ++i) + s[i] = e[t++]; + r = e[t++]; + let c; + if (r > 0) + for (c = new Array(r), i = 0; i < r; ++i) + c[i] = e[t++]; + const l = Ellipsoid.unpack(e, t, scratchEllipsoid$3); + t += Ellipsoid.packedLength; + const d = VertexFormat.unpack( + e, + t, + scratchVertexFormat$2 + ); + t += VertexFormat.packedLength; + const f = e[t]; + return defined(n) ? (n._positions = o, n._minimumHeights = s, n._maximumHeights = c, n._ellipsoid = Ellipsoid.clone(l, n._ellipsoid), n._vertexFormat = VertexFormat.clone(d, n._vertexFormat), n._granularity = f, n) : (scratchOptions$5.positions = o, scratchOptions$5.minimumHeights = s, scratchOptions$5.maximumHeights = c, scratchOptions$5.granularity = f, new WallGeometry(scratchOptions$5)); +}; +WallGeometry.fromConstantHeights = function(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.positions; + let n, i; + const r = e.minimumHeight, o = e.maximumHeight, s = defined(r), c = defined(o); + if (s || c) { + const d = t.length; + n = s ? new Array(d) : void 0, i = c ? new Array(d) : void 0; + for (let f = 0; f < d; ++f) + s && (n[f] = r), c && (i[f] = o); + } + const l = { + positions: t, + maximumHeights: i, + minimumHeights: n, + ellipsoid: e.ellipsoid, + vertexFormat: e.vertexFormat + }; + return new WallGeometry(l); +}; +WallGeometry.createGeometry = function(e) { + const t = e._positions, n = e._minimumHeights, i = e._maximumHeights, r = e._vertexFormat, o = e._granularity, s = e._ellipsoid, c = WallGeometryLibrary.computePositions( + s, + t, + i, + n, + o, + !0 + ); + if (!defined(c)) + return; + const l = c.bottomPositions, d = c.topPositions, f = c.numCorners; + let h = d.length, p = h * 2; + const m = r.position ? new Float64Array(p) : void 0, _ = r.normal ? new Float32Array(p) : void 0, y = r.tangent ? new Float32Array(p) : void 0, C = r.bitangent ? new Float32Array(p) : void 0, T = r.st ? new Float32Array(p / 3 * 2) : void 0; + let x = 0, b = 0, S = 0, E = 0, A = 0, D = scratchNormal$2, P = scratchTangent, I = scratchBitangent, M = !0; + h /= 3; + let R, L = 0; + const g = 1 / (h - f - 1); + for (R = 0; R < h; ++R) { + const B = R * 3, V = Cartesian3.fromArray( + d, + B, + scratchCartesian3Position1$1 + ), U = Cartesian3.fromArray( + l, + B, + scratchCartesian3Position2$1 + ); + if (r.position && (m[x++] = U.x, m[x++] = U.y, m[x++] = U.z, m[x++] = V.x, m[x++] = V.y, m[x++] = V.z), r.st && (T[A++] = L, T[A++] = 0, T[A++] = L, T[A++] = 1), r.normal || r.tangent || r.bitangent) { + let k = Cartesian3.clone( + Cartesian3.ZERO, + scratchCartesian3Position5 + ); + const $ = Cartesian3.subtract( + V, + s.geodeticSurfaceNormal( + V, + scratchCartesian3Position2$1 + ), + scratchCartesian3Position2$1 + ); + if (R + 1 < h && (k = Cartesian3.fromArray( + d, + B + 3, + scratchCartesian3Position5 + )), M) { + const G = Cartesian3.subtract( + k, + V, + scratchCartesian3Position4 + ), q = Cartesian3.subtract( + $, + V, + scratchCartesian3Position1$1 + ); + D = Cartesian3.normalize( + Cartesian3.cross(q, G, D), + D + ), M = !1; + } + Cartesian3.equalsEpsilon(V, k, CesiumMath.EPSILON10) ? M = !0 : (L += g, r.tangent && (P = Cartesian3.normalize( + Cartesian3.subtract(k, V, P), + P + )), r.bitangent && (I = Cartesian3.normalize( + Cartesian3.cross(D, P, I), + I + ))), r.normal && (_[b++] = D.x, _[b++] = D.y, _[b++] = D.z, _[b++] = D.x, _[b++] = D.y, _[b++] = D.z), r.tangent && (y[E++] = P.x, y[E++] = P.y, y[E++] = P.z, y[E++] = P.x, y[E++] = P.y, y[E++] = P.z), r.bitangent && (C[S++] = I.x, C[S++] = I.y, C[S++] = I.z, C[S++] = I.x, C[S++] = I.y, C[S++] = I.z); + } + } + const w = new GeometryAttributes(); + r.position && (w.position = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.DOUBLE, + componentsPerAttribute: 3, + values: m + })), r.normal && (w.normal = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 3, + values: _ + })), r.tangent && (w.tangent = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 3, + values: y + })), r.bitangent && (w.bitangent = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 3, + values: C + })), r.st && (w.st = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 2, + values: T + })); + const O = p / 3; + p -= 6 * (f + 1); + const N = IndexDatatype$1.createTypedArray(O, p); + let F = 0; + for (R = 0; R < O - 2; R += 2) { + const B = R, V = R + 2, U = Cartesian3.fromArray( + m, + B * 3, + scratchCartesian3Position1$1 + ), k = Cartesian3.fromArray( + m, + V * 3, + scratchCartesian3Position2$1 + ); + if (Cartesian3.equalsEpsilon(U, k, CesiumMath.EPSILON10)) + continue; + const $ = R + 1, G = R + 3; + N[F++] = $, N[F++] = B, N[F++] = G, N[F++] = G, N[F++] = B, N[F++] = V; + } + return new Geometry({ + attributes: w, + indices: N, + primitiveType: PrimitiveType$1.TRIANGLES, + boundingSphere: new BoundingSphere.fromVertices(m) + }); +}; +const scratchCartesian3Position1 = new Cartesian3(), scratchCartesian3Position2 = new Cartesian3(); +function WallOutlineGeometry(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.positions, n = e.maximumHeights, i = e.minimumHeights, r = defaultValue( + e.granularity, + CesiumMath.RADIANS_PER_DEGREE + ), o = defaultValue(e.ellipsoid, Ellipsoid.default); + this._positions = t, this._minimumHeights = i, this._maximumHeights = n, this._granularity = r, this._ellipsoid = Ellipsoid.clone(o), this._workerName = "createWallOutlineGeometry"; + let s = 1 + t.length * Cartesian3.packedLength + 2; + defined(i) && (s += i.length), defined(n) && (s += n.length), this.packedLength = s + Ellipsoid.packedLength + 1; +} +WallOutlineGeometry.pack = function(e, t, n) { + n = defaultValue(n, 0); + let i; + const r = e._positions; + let o = r.length; + for (t[n++] = o, i = 0; i < o; ++i, n += Cartesian3.packedLength) + Cartesian3.pack(r[i], t, n); + const s = e._minimumHeights; + if (o = defined(s) ? s.length : 0, t[n++] = o, defined(s)) + for (i = 0; i < o; ++i) + t[n++] = s[i]; + const c = e._maximumHeights; + if (o = defined(c) ? c.length : 0, t[n++] = o, defined(c)) + for (i = 0; i < o; ++i) + t[n++] = c[i]; + return Ellipsoid.pack(e._ellipsoid, t, n), n += Ellipsoid.packedLength, t[n] = e._granularity, t; +}; +const scratchEllipsoid$2 = Ellipsoid.clone(Ellipsoid.UNIT_SPHERE), scratchOptions$4 = { + positions: void 0, + minimumHeights: void 0, + maximumHeights: void 0, + ellipsoid: scratchEllipsoid$2, + granularity: void 0 +}; +WallOutlineGeometry.unpack = function(e, t, n) { + t = defaultValue(t, 0); + let i, r = e[t++]; + const o = new Array(r); + for (i = 0; i < r; ++i, t += Cartesian3.packedLength) + o[i] = Cartesian3.unpack(e, t); + r = e[t++]; + let s; + if (r > 0) + for (s = new Array(r), i = 0; i < r; ++i) + s[i] = e[t++]; + r = e[t++]; + let c; + if (r > 0) + for (c = new Array(r), i = 0; i < r; ++i) + c[i] = e[t++]; + const l = Ellipsoid.unpack(e, t, scratchEllipsoid$2); + t += Ellipsoid.packedLength; + const d = e[t]; + return defined(n) ? (n._positions = o, n._minimumHeights = s, n._maximumHeights = c, n._ellipsoid = Ellipsoid.clone(l, n._ellipsoid), n._granularity = d, n) : (scratchOptions$4.positions = o, scratchOptions$4.minimumHeights = s, scratchOptions$4.maximumHeights = c, scratchOptions$4.granularity = d, new WallOutlineGeometry(scratchOptions$4)); +}; +WallOutlineGeometry.fromConstantHeights = function(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.positions; + let n, i; + const r = e.minimumHeight, o = e.maximumHeight, s = defined(r), c = defined(o); + if (s || c) { + const d = t.length; + n = s ? new Array(d) : void 0, i = c ? new Array(d) : void 0; + for (let f = 0; f < d; ++f) + s && (n[f] = r), c && (i[f] = o); + } + const l = { + positions: t, + maximumHeights: i, + minimumHeights: n, + ellipsoid: e.ellipsoid + }; + return new WallOutlineGeometry(l); +}; +WallOutlineGeometry.createGeometry = function(e) { + const t = e._positions, n = e._minimumHeights, i = e._maximumHeights, r = e._granularity, o = e._ellipsoid, s = WallGeometryLibrary.computePositions( + o, + t, + i, + n, + r, + !1 + ); + if (!defined(s)) + return; + const c = s.bottomPositions, l = s.topPositions; + let d = l.length, f = d * 2; + const h = new Float64Array(f); + let p = 0; + d /= 3; + let m; + for (m = 0; m < d; ++m) { + const x = m * 3, b = Cartesian3.fromArray( + l, + x, + scratchCartesian3Position1 + ), S = Cartesian3.fromArray( + c, + x, + scratchCartesian3Position2 + ); + h[p++] = S.x, h[p++] = S.y, h[p++] = S.z, h[p++] = b.x, h[p++] = b.y, h[p++] = b.z; + } + const _ = new GeometryAttributes({ + position: new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.DOUBLE, + componentsPerAttribute: 3, + values: h + }) + }), y = f / 3; + f = 2 * y - 4 + y; + const C = IndexDatatype$1.createTypedArray(y, f); + let T = 0; + for (m = 0; m < y - 2; m += 2) { + const x = m, b = m + 2, S = Cartesian3.fromArray( + h, + x * 3, + scratchCartesian3Position1 + ), E = Cartesian3.fromArray( + h, + b * 3, + scratchCartesian3Position2 + ); + if (Cartesian3.equalsEpsilon(S, E, CesiumMath.EPSILON10)) + continue; + const A = m + 1, D = m + 3; + C[T++] = A, C[T++] = x, C[T++] = A, C[T++] = D, C[T++] = x, C[T++] = b; + } + return C[T++] = y - 2, C[T++] = y - 1, new Geometry({ + attributes: _, + indices: C, + primitiveType: PrimitiveType$1.LINES, + boundingSphere: new BoundingSphere.fromVertices(h) + }); +}; +const scratchColor$6 = new Color(); +function WallGeometryOptions(e) { + this.id = e, this.vertexFormat = void 0, this.positions = void 0, this.minimumHeights = void 0, this.maximumHeights = void 0, this.granularity = void 0; +} +function WallGeometryUpdater(e, t) { + GeometryUpdater.call(this, { + entity: e, + scene: t, + geometryOptions: new WallGeometryOptions(e), + geometryPropertyName: "wall", + observedPropertyNames: ["availability", "wall"] + }), this._onEntityPropertyChanged(e, "wall", e.wall, void 0); +} +defined(Object.create) && (WallGeometryUpdater.prototype = Object.create(GeometryUpdater.prototype), WallGeometryUpdater.prototype.constructor = WallGeometryUpdater); +WallGeometryUpdater.prototype.createFillGeometryInstance = function(e) { + const t = this._entity, n = t.isAvailable(e); + let i, r; + const o = new ShowGeometryInstanceAttribute( + n && t.isShowing && this._showProperty.getValue(e) && this._fillProperty.getValue(e) + ), s = this._distanceDisplayConditionProperty.getValue( + e + ), c = DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition( + s + ); + if (this._materialProperty instanceof ColorMaterialProperty) { + let l; + defined(this._materialProperty.color) && (this._materialProperty.color.isConstant || n) && (l = this._materialProperty.color.getValue(e, scratchColor$6)), defined(l) || (l = Color.WHITE), r = ColorGeometryInstanceAttribute.fromColor(l), i = { + show: o, + distanceDisplayCondition: c, + color: r + }; + } else + i = { + show: o, + distanceDisplayCondition: c + }; + return new GeometryInstance({ + id: t, + geometry: new WallGeometry(this._options), + attributes: i + }); +}; +WallGeometryUpdater.prototype.createOutlineGeometryInstance = function(e) { + const t = this._entity, n = t.isAvailable(e), i = Property.getValueOrDefault( + this._outlineColorProperty, + e, + Color.BLACK, + scratchColor$6 + ), r = this._distanceDisplayConditionProperty.getValue( + e + ); + return new GeometryInstance({ + id: t, + geometry: new WallOutlineGeometry(this._options), + attributes: { + show: new ShowGeometryInstanceAttribute( + n && t.isShowing && this._showProperty.getValue(e) && this._showOutlineProperty.getValue(e) + ), + color: ColorGeometryInstanceAttribute.fromColor(i), + distanceDisplayCondition: DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition( + r + ) + } + }); +}; +WallGeometryUpdater.prototype._isHidden = function(e, t) { + return !defined(t.positions) || GeometryUpdater.prototype._isHidden.call(this, e, t); +}; +WallGeometryUpdater.prototype._getIsClosed = function(e) { + return !1; +}; +WallGeometryUpdater.prototype._isDynamic = function(e, t) { + return !t.positions.isConstant || // + !Property.isConstant(t.minimumHeights) || // + !Property.isConstant(t.maximumHeights) || // + !Property.isConstant(t.outlineWidth) || // + !Property.isConstant(t.granularity); +}; +WallGeometryUpdater.prototype._setStaticOptions = function(e, t) { + const n = t.minimumHeights, i = t.maximumHeights, r = t.granularity, o = this._materialProperty instanceof ColorMaterialProperty, s = this._options; + s.vertexFormat = o ? PerInstanceColorAppearance.VERTEX_FORMAT : MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat, s.positions = t.positions.getValue( + Iso8601.MINIMUM_VALUE, + s.positions + ), s.minimumHeights = defined(n) ? n.getValue(Iso8601.MINIMUM_VALUE, s.minimumHeights) : void 0, s.maximumHeights = defined(i) ? i.getValue(Iso8601.MINIMUM_VALUE, s.maximumHeights) : void 0, s.granularity = defined(r) ? r.getValue(Iso8601.MINIMUM_VALUE) : void 0; +}; +WallGeometryUpdater.DynamicGeometryUpdater = DynamicWallGeometryUpdater; +function DynamicWallGeometryUpdater(e, t, n) { + DynamicGeometryUpdater$1.call( + this, + e, + t, + n + ); +} +defined(Object.create) && (DynamicWallGeometryUpdater.prototype = Object.create( + DynamicGeometryUpdater$1.prototype +), DynamicWallGeometryUpdater.prototype.constructor = DynamicWallGeometryUpdater); +DynamicWallGeometryUpdater.prototype._isHidden = function(e, t, n) { + return !defined(this._options.positions) || DynamicGeometryUpdater$1.prototype._isHidden.call(this, e, t, n); +}; +DynamicWallGeometryUpdater.prototype._setOptions = function(e, t, n) { + const i = this._options; + i.positions = Property.getValueOrUndefined( + t.positions, + n, + i.positions + ), i.minimumHeights = Property.getValueOrUndefined( + t.minimumHeights, + n, + i.minimumHeights + ), i.maximumHeights = Property.getValueOrUndefined( + t.maximumHeights, + n, + i.maximumHeights + ), i.granularity = Property.getValueOrUndefined(t.granularity, n); +}; +const geometryUpdaters = [ + BoxGeometryUpdater, + CylinderGeometryUpdater, + CorridorGeometryUpdater, + EllipseGeometryUpdater, + EllipsoidGeometryUpdater, + PlaneGeometryUpdater, + PolygonGeometryUpdater, + PolylineVolumeGeometryUpdater, + RectangleGeometryUpdater, + WallGeometryUpdater +]; +function GeometryUpdaterSet(e, t) { + this.entity = e, this.scene = t; + const n = new Array(geometryUpdaters.length), i = new Event(), r = new EventHelper(); + for (let o = 0; o < n.length; o++) { + const s = new geometryUpdaters[o](e, t); + r.add(s.geometryChanged, (c) => { + i.raiseEvent(c); + }), n[o] = s; + } + this.updaters = n, this.geometryChanged = i, this.eventHelper = r, this._removeEntitySubscription = e.definitionChanged.addEventListener( + GeometryUpdaterSet.prototype._onEntityPropertyChanged, + this + ); +} +GeometryUpdaterSet.prototype._onEntityPropertyChanged = function(e, t, n, i) { + const r = this.updaters; + for (let o = 0; o < r.length; o++) + r[o]._onEntityPropertyChanged( + e, + t, + n, + i + ); +}; +GeometryUpdaterSet.prototype.forEach = function(e) { + const t = this.updaters; + for (let n = 0; n < t.length; n++) + e(t[n]); +}; +GeometryUpdaterSet.prototype.destroy = function() { + this.eventHelper.removeAll(); + const e = this.updaters; + for (let t = 0; t < e.length; t++) + e[t].destroy(); + this._removeEntitySubscription(), destroyObject(this); +}; +GeometryUpdaterSet.registerUpdater = function(e) { + geometryUpdaters.includes(e) || geometryUpdaters.push(e); +}; +GeometryUpdaterSet.unregisterUpdater = function(e) { + if (geometryUpdaters.includes(e)) { + const t = geometryUpdaters.indexOf(e); + geometryUpdaters.splice(t, 1); + } +}; +const colorScratch$6 = new Color(), distanceDisplayConditionScratch$7 = new DistanceDisplayCondition(), defaultDistanceDisplayCondition$6 = new DistanceDisplayCondition(), defaultOffset$2 = Cartesian3.ZERO, offsetScratch$2 = new Cartesian3(); +function Batch$5(e, t, n, i, r, o, s) { + this.translucent = t, this.appearanceType = n, this.depthFailAppearanceType = i, this.depthFailMaterialProperty = r, this.depthFailMaterial = void 0, this.closed = o, this.shadows = s, this.primitives = e, this.createPrimitive = !1, this.waitingOnCreate = !1, this.primitive = void 0, this.oldPrimitive = void 0, this.geometry = new AssociativeArray(), this.updaters = new AssociativeArray(), this.updatersWithAttributes = new AssociativeArray(), this.attributes = new AssociativeArray(), this.subscriptions = new AssociativeArray(), this.showsUpdated = new AssociativeArray(), this.itemsToRemove = [], this.invalidated = !1; + let c; + defined(r) && (c = r.definitionChanged.addEventListener( + Batch$5.prototype.onMaterialChanged, + this + )), this.removeMaterialSubscription = c; +} +Batch$5.prototype.onMaterialChanged = function() { + this.invalidated = !0; +}; +Batch$5.prototype.isMaterial = function(e) { + const t = this.depthFailMaterialProperty, n = e.depthFailMaterialProperty; + return n === t ? !0 : defined(t) ? t.equals(n) : !1; +}; +Batch$5.prototype.add = function(e, t) { + const n = e.id; + if (this.createPrimitive = !0, this.geometry.set(n, t), this.updaters.set(n, e), !e.hasConstantFill || !e.fillMaterialProperty.isConstant || !Property.isConstant(e.distanceDisplayConditionProperty) || !Property.isConstant(e.terrainOffsetProperty)) + this.updatersWithAttributes.set(n, e); + else { + const i = this; + this.subscriptions.set( + n, + e.entity.definitionChanged.addEventListener(function(r, o, s, c) { + o === "isShowing" && i.showsUpdated.set(e.id, e); + }) + ); + } +}; +Batch$5.prototype.remove = function(e) { + const t = e.id; + if (this.createPrimitive = this.geometry.remove(t) || this.createPrimitive, this.updaters.remove(t)) { + this.updatersWithAttributes.remove(t); + const n = this.subscriptions.get(t); + return defined(n) && (n(), this.subscriptions.remove(t), this.showsUpdated.remove(t)), !0; + } + return !1; +}; +Batch$5.prototype.update = function(e) { + let t = !0, n = 0, i = this.primitive; + const r = this.primitives; + let o; + if (this.createPrimitive) { + const s = this.geometry.values; + if (s.length > 0) { + defined(i) && (defined(this.oldPrimitive) ? r.remove(i) : this.oldPrimitive = i); + let l; + defined(this.depthFailAppearanceType) && (defined(this.depthFailMaterialProperty) && (this.depthFailMaterial = MaterialProperty.getValue( + e, + this.depthFailMaterialProperty, + this.depthFailMaterial + )), l = new this.depthFailAppearanceType({ + material: this.depthFailMaterial, + translucent: this.translucent, + closed: this.closed + })), i = new Primitive$3({ + show: !1, + asynchronous: !0, + geometryInstances: s.slice(), + appearance: new this.appearanceType({ + translucent: this.translucent, + closed: this.closed + }), + depthFailAppearance: l, + shadows: this.shadows + }), r.add(i), t = !1; + } else { + defined(i) && (r.remove(i), i = void 0); + const l = this.oldPrimitive; + defined(l) && (r.remove(l), this.oldPrimitive = void 0); + } + this.attributes.removeAll(), this.primitive = i, this.createPrimitive = !1, this.waitingOnCreate = !0; + } else if (defined(i) && i.ready) { + i.show = !0, defined(this.oldPrimitive) && (r.remove(this.oldPrimitive), this.oldPrimitive = void 0), defined(this.depthFailAppearanceType) && !(this.depthFailMaterialProperty instanceof ColorMaterialProperty) && (this.depthFailMaterial = MaterialProperty.getValue( + e, + this.depthFailMaterialProperty, + this.depthFailMaterial + ), this.primitive.depthFailAppearance.material = this.depthFailMaterial); + const s = this.updatersWithAttributes.values, c = s.length, l = this.waitingOnCreate; + for (o = 0; o < c; o++) { + const d = s[o], f = this.geometry.get(d.id); + let h = this.attributes.get(f.id.id); + if (defined(h) || (h = i.getGeometryInstanceAttributes(f.id), this.attributes.set(f.id.id, h)), !d.fillMaterialProperty.isConstant || l) { + const C = d.fillMaterialProperty.color, T = Property.getValueOrDefault( + C, + e, + Color.WHITE, + colorScratch$6 + ); + Color.equals(h._lastColor, T) || (h._lastColor = Color.clone( + T, + h._lastColor + ), h.color = ColorGeometryInstanceAttribute.toValue( + T, + h.color + ), (this.translucent && h.color[3] === 255 || !this.translucent && h.color[3] !== 255) && (this.itemsToRemove[n++] = d)); + } + if (defined(this.depthFailAppearanceType) && d.depthFailMaterialProperty instanceof ColorMaterialProperty && (!d.depthFailMaterialProperty.isConstant || l)) { + const C = d.depthFailMaterialProperty.color, T = Property.getValueOrDefault( + C, + e, + Color.WHITE, + colorScratch$6 + ); + Color.equals(h._lastDepthFailColor, T) || (h._lastDepthFailColor = Color.clone( + T, + h._lastDepthFailColor + ), h.depthFailColor = ColorGeometryInstanceAttribute.toValue( + T, + h.depthFailColor + )); + } + const p = d.entity.isShowing && (d.hasConstantFill || d.isFilled(e)), m = h.show[0] === 1; + p !== m && (h.show = ShowGeometryInstanceAttribute.toValue( + p, + h.show + )); + const _ = d.distanceDisplayConditionProperty; + if (!Property.isConstant(_)) { + const C = Property.getValueOrDefault( + _, + e, + defaultDistanceDisplayCondition$6, + distanceDisplayConditionScratch$7 + ); + DistanceDisplayCondition.equals( + C, + h._lastDistanceDisplayCondition + ) || (h._lastDistanceDisplayCondition = DistanceDisplayCondition.clone( + C, + h._lastDistanceDisplayCondition + ), h.distanceDisplayCondition = DistanceDisplayConditionGeometryInstanceAttribute.toValue( + C, + h.distanceDisplayCondition + )); + } + const y = d.terrainOffsetProperty; + if (!Property.isConstant(y)) { + const C = Property.getValueOrDefault( + y, + e, + defaultOffset$2, + offsetScratch$2 + ); + Cartesian3.equals(C, h._lastOffset) || (h._lastOffset = Cartesian3.clone( + C, + h._lastOffset + ), h.offset = OffsetGeometryInstanceAttribute.toValue( + C, + h.offset + )); + } + } + this.updateShows(i), this.waitingOnCreate = !1; + } else defined(i) && !i.ready && (t = !1); + return this.itemsToRemove.length = n, t; +}; +Batch$5.prototype.updateShows = function(e) { + const t = this.showsUpdated.values, n = t.length; + for (let i = 0; i < n; i++) { + const r = t[i], o = this.geometry.get(r.id); + let s = this.attributes.get(o.id.id); + defined(s) || (s = e.getGeometryInstanceAttributes(o.id), this.attributes.set(o.id.id, s)); + const c = r.entity.isShowing, l = s.show[0] === 1; + c !== l && (s.show = ShowGeometryInstanceAttribute.toValue( + c, + s.show + ), o.attributes.show.value[0] = s.show[0]); + } + this.showsUpdated.removeAll(); +}; +Batch$5.prototype.contains = function(e) { + return this.updaters.contains(e.id); +}; +Batch$5.prototype.getBoundingSphere = function(e, t) { + const n = this.primitive; + if (!n.ready) + return BoundingSphereState$1.PENDING; + const i = n.getGeometryInstanceAttributes(e.entity); + return !defined(i) || !defined(i.boundingSphere) || // + defined(i.show) && i.show[0] === 0 ? BoundingSphereState$1.FAILED : (i.boundingSphere.clone(t), BoundingSphereState$1.DONE); +}; +Batch$5.prototype.destroy = function() { + const e = this.primitive, t = this.primitives; + defined(e) && t.remove(e); + const n = this.oldPrimitive; + defined(n) && t.remove(n), defined(this.removeMaterialSubscription) && this.removeMaterialSubscription(); +}; +function StaticGeometryColorBatch(e, t, n, i, r) { + this._solidItems = [], this._translucentItems = [], this._primitives = e, this._appearanceType = t, this._depthFailAppearanceType = n, this._closed = i, this._shadows = r; +} +StaticGeometryColorBatch.prototype.add = function(e, t) { + let n, i; + const r = t.createFillGeometryInstance(e); + r.attributes.color.value[3] === 255 ? (n = this._solidItems, i = !1) : (n = this._translucentItems, i = !0); + const o = n.length; + for (let c = 0; c < o; c++) { + const l = n[c]; + if (l.isMaterial(t)) { + l.add(t, r); + return; + } + } + const s = new Batch$5( + this._primitives, + i, + this._appearanceType, + this._depthFailAppearanceType, + t.depthFailMaterialProperty, + this._closed, + this._shadows + ); + s.add(t, r), n.push(s); +}; +function removeItem(e, t) { + const n = e.length; + for (let i = n - 1; i >= 0; i--) { + const r = e[i]; + if (r.remove(t)) + return r.updaters.length === 0 && (e.splice(i, 1), r.destroy()), !0; + } + return !1; +} +StaticGeometryColorBatch.prototype.remove = function(e) { + removeItem(this._solidItems, e) || removeItem(this._translucentItems, e); +}; +function moveItems(e, t, n) { + let i = !1; + const r = t.length; + for (let o = 0; o < r; ++o) { + const s = t[o], c = s.itemsToRemove, l = c.length; + if (l > 0) + for (o = 0; o < l; o++) { + const d = c[o]; + s.remove(d), e.add(n, d), i = !0; + } + } + return i; +} +function updateItems(e, t, n, i) { + let r = t.length, o; + for (o = r - 1; o >= 0; o--) { + const s = t[o]; + if (s.invalidated) { + t.splice(o, 1); + const c = s.updaters.values, l = c.length; + for (let d = 0; d < l; d++) + e.add(n, c[d]); + s.destroy(); + } + } + for (r = t.length, o = 0; o < r; ++o) + i = t[o].update(n) && i; + return i; +} +StaticGeometryColorBatch.prototype.update = function(e) { + let t = updateItems(this, this._solidItems, e, !0); + t = updateItems(this, this._translucentItems, e, t) && t; + const n = moveItems(this, this._solidItems, e), i = moveItems(this, this._translucentItems, e); + return (n || i) && (t = updateItems(this, this._solidItems, e, t) && t, t = updateItems(this, this._translucentItems, e, t) && t), t; +}; +function getBoundingSphere(e, t, n) { + const i = e.length; + for (let r = 0; r < i; r++) { + const o = e[r]; + if (o.contains(t)) + return o.getBoundingSphere(t, n); + } + return BoundingSphereState$1.FAILED; +} +StaticGeometryColorBatch.prototype.getBoundingSphere = function(e, t) { + const n = getBoundingSphere(this._solidItems, e, t); + return n === BoundingSphereState$1.FAILED ? getBoundingSphere(this._translucentItems, e, t) : n; +}; +function removeAllPrimitives(e) { + const t = e.length; + for (let n = 0; n < t; n++) + e[n].destroy(); + e.length = 0; +} +StaticGeometryColorBatch.prototype.removeAllPrimitives = function() { + removeAllPrimitives(this._solidItems), removeAllPrimitives(this._translucentItems); +}; +const distanceDisplayConditionScratch$6 = new DistanceDisplayCondition(), defaultDistanceDisplayCondition$5 = new DistanceDisplayCondition(), defaultOffset$1 = Cartesian3.ZERO, offsetScratch$1 = new Cartesian3(); +function Batch$4(e, t, n, i, r, o, s) { + this.primitives = e, this.appearanceType = t, this.materialProperty = n, this.depthFailAppearanceType = i, this.depthFailMaterialProperty = r, this.closed = o, this.shadows = s, this.updaters = new AssociativeArray(), this.createPrimitive = !0, this.primitive = void 0, this.oldPrimitive = void 0, this.geometry = new AssociativeArray(), this.material = void 0, this.depthFailMaterial = void 0, this.updatersWithAttributes = new AssociativeArray(), this.attributes = new AssociativeArray(), this.invalidated = !1, this.removeMaterialSubscription = n.definitionChanged.addEventListener( + Batch$4.prototype.onMaterialChanged, + this + ), this.subscriptions = new AssociativeArray(), this.showsUpdated = new AssociativeArray(); +} +Batch$4.prototype.onMaterialChanged = function() { + this.invalidated = !0; +}; +Batch$4.prototype.isMaterial = function(e) { + const t = this.materialProperty, n = e.fillMaterialProperty, i = this.depthFailMaterialProperty, r = e.depthFailMaterialProperty; + if (n === t && r === i) + return !0; + let o = defined(t) && t.equals(n); + return o = (!defined(i) && !defined(r) || defined(i) && i.equals(r)) && o, o; +}; +Batch$4.prototype.add = function(e, t) { + const n = t.id; + if (this.updaters.set(n, t), this.geometry.set(n, t.createFillGeometryInstance(e)), !t.hasConstantFill || !t.fillMaterialProperty.isConstant || !Property.isConstant(t.distanceDisplayConditionProperty) || !Property.isConstant(t.terrainOffsetProperty)) + this.updatersWithAttributes.set(n, t); + else { + const i = this; + this.subscriptions.set( + n, + t.entity.definitionChanged.addEventListener(function(r, o, s, c) { + o === "isShowing" && i.showsUpdated.set(t.id, t); + }) + ); + } + this.createPrimitive = !0; +}; +Batch$4.prototype.remove = function(e) { + const t = e.id; + if (this.createPrimitive = this.geometry.remove(t) || this.createPrimitive, this.updaters.remove(t)) { + this.updatersWithAttributes.remove(t); + const n = this.subscriptions.get(t); + return defined(n) && (n(), this.subscriptions.remove(t), this.showsUpdated.remove(t)), !0; + } + return !1; +}; +const colorScratch$5 = new Color(); +Batch$4.prototype.update = function(e) { + let t = !0, n = this.primitive; + const i = this.primitives, r = this.geometry.values; + let o; + if (this.createPrimitive) { + if (r.length > 0) { + defined(n) && (defined(this.oldPrimitive) ? i.remove(n) : this.oldPrimitive = n), this.material = MaterialProperty.getValue( + e, + this.materialProperty, + this.material + ); + let c; + defined(this.depthFailMaterialProperty) && (this.depthFailMaterial = MaterialProperty.getValue( + e, + this.depthFailMaterialProperty, + this.depthFailMaterial + ), c = new this.depthFailAppearanceType({ + material: this.depthFailMaterial, + translucent: this.depthFailMaterial.isTranslucent(), + closed: this.closed + })), n = new Primitive$3({ + show: !1, + asynchronous: !0, + geometryInstances: r.slice(), + appearance: new this.appearanceType({ + material: this.material, + translucent: this.material.isTranslucent(), + closed: this.closed + }), + depthFailAppearance: c, + shadows: this.shadows + }), i.add(n), t = !1; + } else { + defined(n) && (i.remove(n), n = void 0); + const c = this.oldPrimitive; + defined(c) && (i.remove(c), this.oldPrimitive = void 0); + } + this.attributes.removeAll(), this.primitive = n, this.createPrimitive = !1; + } else if (defined(n) && n.ready) { + n.show = !0, defined(this.oldPrimitive) && (i.remove(this.oldPrimitive), this.oldPrimitive = void 0), this.material = MaterialProperty.getValue( + e, + this.materialProperty, + this.material + ), this.primitive.appearance.material = this.material, defined(this.depthFailAppearanceType) && !(this.depthFailMaterialProperty instanceof ColorMaterialProperty) && (this.depthFailMaterial = MaterialProperty.getValue( + e, + this.depthFailMaterialProperty, + this.depthFailMaterial + ), this.primitive.depthFailAppearance.material = this.depthFailMaterial); + const s = this.updatersWithAttributes.values, c = s.length; + for (o = 0; o < c; o++) { + const l = s[o], d = l.entity, f = this.geometry.get(l.id); + let h = this.attributes.get(f.id.id); + if (defined(h) || (h = n.getGeometryInstanceAttributes(f.id), this.attributes.set(f.id.id, h)), defined(this.depthFailAppearanceType) && this.depthFailMaterialProperty instanceof ColorMaterialProperty && !l.depthFailMaterialProperty.isConstant) { + const C = l.depthFailMaterialProperty.color, T = Property.getValueOrDefault( + C, + e, + Color.WHITE, + colorScratch$5 + ); + Color.equals(h._lastDepthFailColor, T) || (h._lastDepthFailColor = Color.clone( + T, + h._lastDepthFailColor + ), h.depthFailColor = ColorGeometryInstanceAttribute.toValue( + T, + h.depthFailColor + )); + } + const p = d.isShowing && (l.hasConstantFill || l.isFilled(e)), m = h.show[0] === 1; + p !== m && (h.show = ShowGeometryInstanceAttribute.toValue( + p, + h.show + )); + const _ = l.distanceDisplayConditionProperty; + if (!Property.isConstant(_)) { + const C = Property.getValueOrDefault( + _, + e, + defaultDistanceDisplayCondition$5, + distanceDisplayConditionScratch$6 + ); + DistanceDisplayCondition.equals( + C, + h._lastDistanceDisplayCondition + ) || (h._lastDistanceDisplayCondition = DistanceDisplayCondition.clone( + C, + h._lastDistanceDisplayCondition + ), h.distanceDisplayCondition = DistanceDisplayConditionGeometryInstanceAttribute.toValue( + C, + h.distanceDisplayCondition + )); + } + const y = l.terrainOffsetProperty; + if (!Property.isConstant(y)) { + const C = Property.getValueOrDefault( + y, + e, + defaultOffset$1, + offsetScratch$1 + ); + Cartesian3.equals(C, h._lastOffset) || (h._lastOffset = Cartesian3.clone( + C, + h._lastOffset + ), h.offset = OffsetGeometryInstanceAttribute.toValue( + C, + h.offset + )); + } + } + this.updateShows(n); + } else defined(n) && !n.ready && (t = !1); + return t; +}; +Batch$4.prototype.updateShows = function(e) { + const t = this.showsUpdated.values, n = t.length; + for (let i = 0; i < n; i++) { + const r = t[i], o = r.entity, s = this.geometry.get(r.id); + let c = this.attributes.get(s.id.id); + defined(c) || (c = e.getGeometryInstanceAttributes(s.id), this.attributes.set(s.id.id, c)); + const l = o.isShowing, d = c.show[0] === 1; + l !== d && (c.show = ShowGeometryInstanceAttribute.toValue( + l, + c.show + ), s.attributes.show.value[0] = c.show[0]); + } + this.showsUpdated.removeAll(); +}; +Batch$4.prototype.contains = function(e) { + return this.updaters.contains(e.id); +}; +Batch$4.prototype.getBoundingSphere = function(e, t) { + const n = this.primitive; + if (!n.ready) + return BoundingSphereState$1.PENDING; + const i = n.getGeometryInstanceAttributes(e.entity); + return !defined(i) || !defined(i.boundingSphere) || defined(i.show) && i.show[0] === 0 ? BoundingSphereState$1.FAILED : (i.boundingSphere.clone(t), BoundingSphereState$1.DONE); +}; +Batch$4.prototype.destroy = function() { + const e = this.primitive, t = this.primitives; + defined(e) && t.remove(e); + const n = this.oldPrimitive; + defined(n) && t.remove(n), this.removeMaterialSubscription(); +}; +function StaticGeometryPerMaterialBatch(e, t, n, i, r) { + this._items = [], this._primitives = e, this._appearanceType = t, this._depthFailAppearanceType = n, this._closed = i, this._shadows = r; +} +StaticGeometryPerMaterialBatch.prototype.add = function(e, t) { + const n = this._items, i = n.length; + for (let o = 0; o < i; o++) { + const s = n[o]; + if (s.isMaterial(t)) { + s.add(e, t); + return; + } + } + const r = new Batch$4( + this._primitives, + this._appearanceType, + t.fillMaterialProperty, + this._depthFailAppearanceType, + t.depthFailMaterialProperty, + this._closed, + this._shadows + ); + r.add(e, t), n.push(r); +}; +StaticGeometryPerMaterialBatch.prototype.remove = function(e) { + const t = this._items, n = t.length; + for (let i = n - 1; i >= 0; i--) { + const r = t[i]; + if (r.remove(e)) { + r.updaters.length === 0 && (t.splice(i, 1), r.destroy()); + break; + } + } +}; +StaticGeometryPerMaterialBatch.prototype.update = function(e) { + let t; + const n = this._items, i = n.length; + for (t = i - 1; t >= 0; t--) { + const o = n[t]; + if (o.invalidated) { + n.splice(t, 1); + const s = o.updaters.values, c = s.length; + for (let l = 0; l < c; l++) + this.add(e, s[l]); + o.destroy(); + } + } + let r = !0; + for (t = 0; t < n.length; t++) + r = n[t].update(e) && r; + return r; +}; +StaticGeometryPerMaterialBatch.prototype.getBoundingSphere = function(e, t) { + const n = this._items, i = n.length; + for (let r = 0; r < i; r++) { + const o = n[r]; + if (o.contains(e)) + return o.getBoundingSphere(e, t); + } + return BoundingSphereState$1.FAILED; +}; +StaticGeometryPerMaterialBatch.prototype.removeAllPrimitives = function() { + const e = this._items, t = e.length; + for (let n = 0; n < t; n++) + e[n].destroy(); + this._items.length = 0; +}; +function quickselect(e, t, n = 0, i = e.length - 1, r = defaultCompare) { + for (; i > n; ) { + if (i - n > 600) { + const l = i - n + 1, d = t - n + 1, f = Math.log(l), h = 0.5 * Math.exp(2 * f / 3), p = 0.5 * Math.sqrt(f * h * (l - h) / l) * (d - l / 2 < 0 ? -1 : 1), m = Math.max(n, Math.floor(t - d * h / l + p)), _ = Math.min(i, Math.floor(t + (l - d) * h / l + p)); + quickselect(e, t, m, _, r); + } + const o = e[t]; + let s = n, c = i; + for (swap$1(e, n, t), r(e[i], o) > 0 && swap$1(e, n, i); s < c; ) { + for (swap$1(e, s, c), s++, c--; r(e[s], o) < 0; ) s++; + for (; r(e[c], o) > 0; ) c--; + } + r(e[n], o) === 0 ? swap$1(e, n, c) : (c++, swap$1(e, c, i)), c <= t && (n = c + 1), t <= c && (i = c - 1); + } +} +function swap$1(e, t, n) { + const i = e[t]; + e[t] = e[n], e[n] = i; +} +function defaultCompare(e, t) { + return e < t ? -1 : e > t ? 1 : 0; +} +class RBush { + constructor(t = 9) { + this._maxEntries = Math.max(4, t), this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4)), this.clear(); + } + all() { + return this._all(this.data, []); + } + search(t) { + let n = this.data; + const i = []; + if (!intersects(t, n)) return i; + const r = this.toBBox, o = []; + for (; n; ) { + for (let s = 0; s < n.children.length; s++) { + const c = n.children[s], l = n.leaf ? r(c) : c; + intersects(t, l) && (n.leaf ? i.push(c) : contains$1(t, l) ? this._all(c, i) : o.push(c)); + } + n = o.pop(); + } + return i; + } + collides(t) { + let n = this.data; + if (!intersects(t, n)) return !1; + const i = []; + for (; n; ) { + for (let r = 0; r < n.children.length; r++) { + const o = n.children[r], s = n.leaf ? this.toBBox(o) : o; + if (intersects(t, s)) { + if (n.leaf || contains$1(t, s)) return !0; + i.push(o); + } + } + n = i.pop(); + } + return !1; + } + load(t) { + if (!(t && t.length)) return this; + if (t.length < this._minEntries) { + for (let i = 0; i < t.length; i++) + this.insert(t[i]); + return this; + } + let n = this._build(t.slice(), 0, t.length - 1, 0); + if (!this.data.children.length) + this.data = n; + else if (this.data.height === n.height) + this._splitRoot(this.data, n); + else { + if (this.data.height < n.height) { + const i = this.data; + this.data = n, n = i; + } + this._insert(n, this.data.height - n.height - 1, !0); + } + return this; + } + insert(t) { + return t && this._insert(t, this.data.height - 1), this; + } + clear() { + return this.data = createNode([]), this; + } + remove(t, n) { + if (!t) return this; + let i = this.data; + const r = this.toBBox(t), o = [], s = []; + let c, l, d; + for (; i || o.length; ) { + if (i || (i = o.pop(), l = o[o.length - 1], c = s.pop(), d = !0), i.leaf) { + const f = findItem(t, i.children, n); + if (f !== -1) + return i.children.splice(f, 1), o.push(i), this._condense(o), this; + } + !d && !i.leaf && contains$1(i, r) ? (o.push(i), s.push(c), c = 0, l = i, i = i.children[0]) : l ? (c++, i = l.children[c], d = !1) : i = null; + } + return this; + } + toBBox(t) { + return t; + } + compareMinX(t, n) { + return t.minX - n.minX; + } + compareMinY(t, n) { + return t.minY - n.minY; + } + toJSON() { + return this.data; + } + fromJSON(t) { + return this.data = t, this; + } + _all(t, n) { + const i = []; + for (; t; ) + t.leaf ? n.push(...t.children) : i.push(...t.children), t = i.pop(); + return n; + } + _build(t, n, i, r) { + const o = i - n + 1; + let s = this._maxEntries, c; + if (o <= s) + return c = createNode(t.slice(n, i + 1)), calcBBox(c, this.toBBox), c; + r || (r = Math.ceil(Math.log(o) / Math.log(s)), s = Math.ceil(o / Math.pow(s, r - 1))), c = createNode([]), c.leaf = !1, c.height = r; + const l = Math.ceil(o / s), d = l * Math.ceil(Math.sqrt(s)); + multiSelect(t, n, i, d, this.compareMinX); + for (let f = n; f <= i; f += d) { + const h = Math.min(f + d - 1, i); + multiSelect(t, f, h, l, this.compareMinY); + for (let p = f; p <= h; p += l) { + const m = Math.min(p + l - 1, h); + c.children.push(this._build(t, p, m, r - 1)); + } + } + return calcBBox(c, this.toBBox), c; + } + _chooseSubtree(t, n, i, r) { + for (; r.push(n), !(n.leaf || r.length - 1 === i); ) { + let o = 1 / 0, s = 1 / 0, c; + for (let l = 0; l < n.children.length; l++) { + const d = n.children[l], f = bboxArea(d), h = enlargedArea(t, d) - f; + h < s ? (s = h, o = f < o ? f : o, c = d) : h === s && f < o && (o = f, c = d); + } + n = c || n.children[0]; + } + return n; + } + _insert(t, n, i) { + const r = i ? t : this.toBBox(t), o = [], s = this._chooseSubtree(r, this.data, n, o); + for (s.children.push(t), extend(s, r); n >= 0 && o[n].children.length > this._maxEntries; ) + this._split(o, n), n--; + this._adjustParentBBoxes(r, o, n); + } + // split overflowed node into two + _split(t, n) { + const i = t[n], r = i.children.length, o = this._minEntries; + this._chooseSplitAxis(i, o, r); + const s = this._chooseSplitIndex(i, o, r), c = createNode(i.children.splice(s, i.children.length - s)); + c.height = i.height, c.leaf = i.leaf, calcBBox(i, this.toBBox), calcBBox(c, this.toBBox), n ? t[n - 1].children.push(c) : this._splitRoot(i, c); + } + _splitRoot(t, n) { + this.data = createNode([t, n]), this.data.height = t.height + 1, this.data.leaf = !1, calcBBox(this.data, this.toBBox); + } + _chooseSplitIndex(t, n, i) { + let r, o = 1 / 0, s = 1 / 0; + for (let c = n; c <= i - n; c++) { + const l = distBBox(t, 0, c, this.toBBox), d = distBBox(t, c, i, this.toBBox), f = intersectionArea(l, d), h = bboxArea(l) + bboxArea(d); + f < o ? (o = f, r = c, s = h < s ? h : s) : f === o && h < s && (s = h, r = c); + } + return r || i - n; + } + // sorts node children by the best axis for split + _chooseSplitAxis(t, n, i) { + const r = t.leaf ? this.compareMinX : compareNodeMinX, o = t.leaf ? this.compareMinY : compareNodeMinY, s = this._allDistMargin(t, n, i, r), c = this._allDistMargin(t, n, i, o); + s < c && t.children.sort(r); + } + // total margin of all possible split distributions where each node is at least m full + _allDistMargin(t, n, i, r) { + t.children.sort(r); + const o = this.toBBox, s = distBBox(t, 0, n, o), c = distBBox(t, i - n, i, o); + let l = bboxMargin(s) + bboxMargin(c); + for (let d = n; d < i - n; d++) { + const f = t.children[d]; + extend(s, t.leaf ? o(f) : f), l += bboxMargin(s); + } + for (let d = i - n - 1; d >= n; d--) { + const f = t.children[d]; + extend(c, t.leaf ? o(f) : f), l += bboxMargin(c); + } + return l; + } + _adjustParentBBoxes(t, n, i) { + for (let r = i; r >= 0; r--) + extend(n[r], t); + } + _condense(t) { + for (let n = t.length - 1, i; n >= 0; n--) + t[n].children.length === 0 ? n > 0 ? (i = t[n - 1].children, i.splice(i.indexOf(t[n]), 1)) : this.clear() : calcBBox(t[n], this.toBBox); + } +} +function findItem(e, t, n) { + if (!n) return t.indexOf(e); + for (let i = 0; i < t.length; i++) + if (n(e, t[i])) return i; + return -1; +} +function calcBBox(e, t) { + distBBox(e, 0, e.children.length, t, e); +} +function distBBox(e, t, n, i, r) { + r || (r = createNode(null)), r.minX = 1 / 0, r.minY = 1 / 0, r.maxX = -1 / 0, r.maxY = -1 / 0; + for (let o = t; o < n; o++) { + const s = e.children[o]; + extend(r, e.leaf ? i(s) : s); + } + return r; +} +function extend(e, t) { + return e.minX = Math.min(e.minX, t.minX), e.minY = Math.min(e.minY, t.minY), e.maxX = Math.max(e.maxX, t.maxX), e.maxY = Math.max(e.maxY, t.maxY), e; +} +function compareNodeMinX(e, t) { + return e.minX - t.minX; +} +function compareNodeMinY(e, t) { + return e.minY - t.minY; +} +function bboxArea(e) { + return (e.maxX - e.minX) * (e.maxY - e.minY); +} +function bboxMargin(e) { + return e.maxX - e.minX + (e.maxY - e.minY); +} +function enlargedArea(e, t) { + return (Math.max(t.maxX, e.maxX) - Math.min(t.minX, e.minX)) * (Math.max(t.maxY, e.maxY) - Math.min(t.minY, e.minY)); +} +function intersectionArea(e, t) { + const n = Math.max(e.minX, t.minX), i = Math.max(e.minY, t.minY), r = Math.min(e.maxX, t.maxX), o = Math.min(e.maxY, t.maxY); + return Math.max(0, r - n) * Math.max(0, o - i); +} +function contains$1(e, t) { + return e.minX <= t.minX && e.minY <= t.minY && t.maxX <= e.maxX && t.maxY <= e.maxY; +} +function intersects(e, t) { + return t.minX <= e.maxX && t.minY <= e.maxY && t.maxX >= e.minX && t.maxY >= e.minY; +} +function createNode(e) { + return { + children: e, + height: 1, + leaf: !0, + minX: 1 / 0, + minY: 1 / 0, + maxX: -1 / 0, + maxY: -1 / 0 + }; +} +function multiSelect(e, t, n, i, r) { + const o = [t, n]; + for (; o.length; ) { + if (n = o.pop(), t = o.pop(), n - t <= i) continue; + const s = t + Math.ceil((n - t) / i / 2) * i; + quickselect(e, s, t, n, r), o.push(t, s, s, n); + } +} +function RectangleCollisionChecker() { + this._tree = new RBush(); +} +function RectangleWithId() { + this.minX = 0, this.minY = 0, this.maxX = 0, this.maxY = 0, this.id = ""; +} +RectangleWithId.fromRectangleAndId = function(e, t, n) { + return n.minX = t.west, n.minY = t.south, n.maxX = t.east, n.maxY = t.north, n.id = e, n; +}; +RectangleCollisionChecker.prototype.insert = function(e, t) { + const n = RectangleWithId.fromRectangleAndId( + e, + t, + new RectangleWithId() + ); + this._tree.insert(n); +}; +function idCompare(e, t) { + return e.id === t.id; +} +const removalScratch = new RectangleWithId(); +RectangleCollisionChecker.prototype.remove = function(e, t) { + const n = RectangleWithId.fromRectangleAndId( + e, + t, + removalScratch + ); + this._tree.remove(n, idCompare); +}; +const collisionScratch = new RectangleWithId(); +RectangleCollisionChecker.prototype.collides = function(e) { + const t = RectangleWithId.fromRectangleAndId( + "", + e, + collisionScratch + ); + return this._tree.collides(t); +}; +const colorScratch$4 = new Color(), distanceDisplayConditionScratch$5 = new DistanceDisplayCondition(), defaultDistanceDisplayCondition$4 = new DistanceDisplayCondition(); +function Batch$3(e, t, n, i) { + this.primitives = e, this.zIndex = i, this.classificationType = t, this.color = n, this.createPrimitive = !1, this.waitingOnCreate = !1, this.primitive = void 0, this.oldPrimitive = void 0, this.geometry = new AssociativeArray(), this.updaters = new AssociativeArray(), this.updatersWithAttributes = new AssociativeArray(), this.attributes = new AssociativeArray(), this.subscriptions = new AssociativeArray(), this.showsUpdated = new AssociativeArray(), this.itemsToRemove = [], this.isDirty = !1, this.rectangleCollisionCheck = new RectangleCollisionChecker(); +} +Batch$3.prototype.overlapping = function(e) { + return this.rectangleCollisionCheck.collides(e); +}; +Batch$3.prototype.add = function(e, t) { + const n = e.id; + if (this.createPrimitive = !0, this.geometry.set(n, t), this.updaters.set(n, e), this.rectangleCollisionCheck.insert(n, t.geometry.rectangle), !e.hasConstantFill || !e.fillMaterialProperty.isConstant || !Property.isConstant(e.distanceDisplayConditionProperty)) + this.updatersWithAttributes.set(n, e); + else { + const i = this; + this.subscriptions.set( + n, + e.entity.definitionChanged.addEventListener(function(r, o, s, c) { + o === "isShowing" && i.showsUpdated.set(e.id, e); + }) + ); + } +}; +Batch$3.prototype.remove = function(e) { + const t = e.id, n = this.geometry.get(t); + if (this.createPrimitive = this.geometry.remove(t) || this.createPrimitive, this.updaters.remove(t)) { + this.rectangleCollisionCheck.remove( + t, + n.geometry.rectangle + ), this.updatersWithAttributes.remove(t); + const i = this.subscriptions.get(t); + return defined(i) && (i(), this.subscriptions.remove(t), this.showsUpdated.remove(t)), !0; + } + return !1; +}; +Batch$3.prototype.update = function(e) { + let t = !0; + const n = 0; + let i = this.primitive; + const r = this.primitives; + let o; + if (this.createPrimitive) { + const s = this.geometry.values; + if (s.length > 0) + defined(i) && (defined(this.oldPrimitive) ? r.remove(i) : this.oldPrimitive = i), i = new GroundPrimitive({ + show: !1, + asynchronous: !0, + geometryInstances: s.slice(), + classificationType: this.classificationType + }), r.add(i, this.zIndex), t = !1; + else { + defined(i) && (r.remove(i), i = void 0); + const l = this.oldPrimitive; + defined(l) && (r.remove(l), this.oldPrimitive = void 0); + } + this.attributes.removeAll(), this.primitive = i, this.createPrimitive = !1, this.waitingOnCreate = !0; + } else if (defined(i) && i.ready) { + i.show = !0, defined(this.oldPrimitive) && (r.remove(this.oldPrimitive), this.oldPrimitive = void 0); + const s = this.updatersWithAttributes.values, c = s.length, l = this.waitingOnCreate; + for (o = 0; o < c; o++) { + const d = s[o], f = this.geometry.get(d.id); + let h = this.attributes.get(f.id.id); + if (defined(h) || (h = i.getGeometryInstanceAttributes(f.id), this.attributes.set(f.id.id, h)), !d.fillMaterialProperty.isConstant || l) { + const y = d.fillMaterialProperty.color, C = Property.getValueOrDefault( + y, + e, + Color.WHITE, + colorScratch$4 + ); + Color.equals(h._lastColor, C) || (h._lastColor = Color.clone(C, h._lastColor), h.color = ColorGeometryInstanceAttribute.toValue( + C, + h.color + )); + } + const p = d.entity.isShowing && (d.hasConstantFill || d.isFilled(e)), m = h.show[0] === 1; + p !== m && (h.show = ShowGeometryInstanceAttribute.toValue( + p, + h.show + )); + const _ = d.distanceDisplayConditionProperty; + if (!Property.isConstant(_)) { + const y = Property.getValueOrDefault( + _, + e, + defaultDistanceDisplayCondition$4, + distanceDisplayConditionScratch$5 + ); + DistanceDisplayCondition.equals( + y, + h._lastDistanceDisplayCondition + ) || (h._lastDistanceDisplayCondition = DistanceDisplayCondition.clone( + y, + h._lastDistanceDisplayCondition + ), h.distanceDisplayCondition = DistanceDisplayConditionGeometryInstanceAttribute.toValue( + y, + h.distanceDisplayCondition + )); + } + } + this.updateShows(i), this.waitingOnCreate = !1; + } else defined(i) && !i.ready && (t = !1); + return this.itemsToRemove.length = n, t; +}; +Batch$3.prototype.updateShows = function(e) { + const t = this.showsUpdated.values, n = t.length; + for (let i = 0; i < n; i++) { + const r = t[i], o = this.geometry.get(r.id); + let s = this.attributes.get(o.id.id); + defined(s) || (s = e.getGeometryInstanceAttributes(o.id), this.attributes.set(o.id.id, s)); + const c = r.entity.isShowing, l = s.show[0] === 1; + c !== l && (s.show = ShowGeometryInstanceAttribute.toValue( + c, + s.show + ), o.attributes.show.value[0] = s.show[0]); + } + this.showsUpdated.removeAll(); +}; +Batch$3.prototype.contains = function(e) { + return this.updaters.contains(e.id); +}; +Batch$3.prototype.getBoundingSphere = function(e, t) { + const n = this.primitive; + if (!n.ready) + return BoundingSphereState$1.PENDING; + const i = n.getBoundingSphere(e.entity); + return defined(i) ? (i.clone(t), BoundingSphereState$1.DONE) : BoundingSphereState$1.FAILED; +}; +Batch$3.prototype.removeAllPrimitives = function() { + const e = this.primitives, t = this.primitive; + defined(t) && (e.remove(t), this.primitive = void 0, this.geometry.removeAll(), this.updaters.removeAll()); + const n = this.oldPrimitive; + defined(n) && (e.remove(n), this.oldPrimitive = void 0); +}; +function StaticGroundGeometryColorBatch(e, t) { + this._batches = [], this._primitives = e, this._classificationType = t; +} +StaticGroundGeometryColorBatch.prototype.add = function(e, t) { + const n = t.createFillGeometryInstance(e), i = this._batches, r = Property.getValueOrDefault(t.zIndex, 0); + let o; + const s = i.length; + for (let c = 0; c < s; ++c) { + const l = i[c]; + if (l.zIndex === r && !l.overlapping(n.geometry.rectangle)) { + o = l; + break; + } + } + return defined(o) || (o = new Batch$3( + this._primitives, + this._classificationType, + n.attributes.color.value, + r + ), i.push(o)), o.add(t, n), o; +}; +StaticGroundGeometryColorBatch.prototype.remove = function(e) { + const t = this._batches, n = t.length; + for (let i = 0; i < n; ++i) + if (t[i].remove(e)) + return; +}; +StaticGroundGeometryColorBatch.prototype.update = function(e) { + let t, n, i = !0; + const r = this._batches, o = r.length; + for (t = 0; t < o; ++t) + i = r[t].update(e) && i; + for (t = 0; t < o; ++t) { + const s = r[t], c = s.itemsToRemove, l = c.length; + for (let d = 0; d < l; d++) { + n = c[d], s.remove(n); + const f = this.add(e, n); + s.isDirty = !0, f.isDirty = !0; + } + } + for (t = o - 1; t >= 0; --t) { + const s = r[t]; + s.isDirty && (i = r[t].update(e) && i, s.isDirty = !1), s.geometry.length === 0 && r.splice(t, 1); + } + return i; +}; +StaticGroundGeometryColorBatch.prototype.getBoundingSphere = function(e, t) { + const n = this._batches, i = n.length; + for (let r = 0; r < i; ++r) { + const o = n[r]; + if (o.contains(e)) + return o.getBoundingSphere(e, t); + } + return BoundingSphereState$1.FAILED; +}; +StaticGroundGeometryColorBatch.prototype.removeAllPrimitives = function() { + const e = this._batches, t = e.length; + for (let n = 0; n < t; ++n) + e[n].removeAllPrimitives(); +}; +const distanceDisplayConditionScratch$4 = new DistanceDisplayCondition(), defaultDistanceDisplayCondition$3 = new DistanceDisplayCondition(); +function Batch$2(e, t, n, i, r, o) { + this.primitives = e, this.classificationType = t, this.appearanceType = n, this.materialProperty = i, this.updaters = new AssociativeArray(), this.createPrimitive = !0, this.primitive = void 0, this.oldPrimitive = void 0, this.geometry = new AssociativeArray(), this.material = void 0, this.updatersWithAttributes = new AssociativeArray(), this.attributes = new AssociativeArray(), this.invalidated = !1, this.removeMaterialSubscription = i.definitionChanged.addEventListener( + Batch$2.prototype.onMaterialChanged, + this + ), this.subscriptions = new AssociativeArray(), this.showsUpdated = new AssociativeArray(), this.usingSphericalTextureCoordinates = r, this.zIndex = o, this.rectangleCollisionCheck = new RectangleCollisionChecker(); +} +Batch$2.prototype.onMaterialChanged = function() { + this.invalidated = !0; +}; +Batch$2.prototype.overlapping = function(e) { + return this.rectangleCollisionCheck.collides(e); +}; +Batch$2.prototype.isMaterial = function(e) { + const t = this.materialProperty, n = e.fillMaterialProperty; + return n === t || n instanceof ColorMaterialProperty && t instanceof ColorMaterialProperty ? !0 : defined(t) && t.equals(n); +}; +Batch$2.prototype.add = function(e, t, n) { + const i = t.id; + if (this.updaters.set(i, t), this.geometry.set(i, n), this.rectangleCollisionCheck.insert(i, n.geometry.rectangle), !t.hasConstantFill || !t.fillMaterialProperty.isConstant || !Property.isConstant(t.distanceDisplayConditionProperty)) + this.updatersWithAttributes.set(i, t); + else { + const r = this; + this.subscriptions.set( + i, + t.entity.definitionChanged.addEventListener(function(o, s, c, l) { + s === "isShowing" && r.showsUpdated.set(t.id, t); + }) + ); + } + this.createPrimitive = !0; +}; +Batch$2.prototype.remove = function(e) { + const t = e.id, n = this.geometry.get(t); + if (this.createPrimitive = this.geometry.remove(t) || this.createPrimitive, this.updaters.remove(t)) { + this.rectangleCollisionCheck.remove( + t, + n.geometry.rectangle + ), this.updatersWithAttributes.remove(t); + const i = this.subscriptions.get(t); + return defined(i) && (i(), this.subscriptions.remove(t)), !0; + } + return !1; +}; +Batch$2.prototype.update = function(e) { + let t = !0, n = this.primitive; + const i = this.primitives, r = this.geometry.values; + let o; + if (this.createPrimitive) { + if (r.length > 0) + defined(n) && (defined(this.oldPrimitive) ? i.remove(n) : this.oldPrimitive = n), this.material = MaterialProperty.getValue( + e, + this.materialProperty, + this.material + ), n = new GroundPrimitive({ + show: !1, + asynchronous: !0, + geometryInstances: r.slice(), + appearance: new this.appearanceType({ + material: this.material + // translucent and closed properties overridden + }), + classificationType: this.classificationType + }), i.add(n, this.zIndex), t = !1; + else { + defined(n) && (i.remove(n), n = void 0); + const c = this.oldPrimitive; + defined(c) && (i.remove(c), this.oldPrimitive = void 0); + } + this.attributes.removeAll(), this.primitive = n, this.createPrimitive = !1; + } else if (defined(n) && n.ready) { + n.show = !0, defined(this.oldPrimitive) && (i.remove(this.oldPrimitive), this.oldPrimitive = void 0), this.material = MaterialProperty.getValue( + e, + this.materialProperty, + this.material + ), this.primitive.appearance.material = this.material; + const s = this.updatersWithAttributes.values, c = s.length; + for (o = 0; o < c; o++) { + const l = s[o], d = l.entity, f = this.geometry.get(l.id); + let h = this.attributes.get(f.id.id); + defined(h) || (h = n.getGeometryInstanceAttributes(f.id), this.attributes.set(f.id.id, h)); + const p = d.isShowing && (l.hasConstantFill || l.isFilled(e)), m = h.show[0] === 1; + p !== m && (h.show = ShowGeometryInstanceAttribute.toValue( + p, + h.show + )); + const _ = l.distanceDisplayConditionProperty; + if (!Property.isConstant(_)) { + const y = Property.getValueOrDefault( + _, + e, + defaultDistanceDisplayCondition$3, + distanceDisplayConditionScratch$4 + ); + DistanceDisplayCondition.equals( + y, + h._lastDistanceDisplayCondition + ) || (h._lastDistanceDisplayCondition = DistanceDisplayCondition.clone( + y, + h._lastDistanceDisplayCondition + ), h.distanceDisplayCondition = DistanceDisplayConditionGeometryInstanceAttribute.toValue( + y, + h.distanceDisplayCondition + )); + } + } + this.updateShows(n); + } else defined(n) && !n.ready && (t = !1); + return t; +}; +Batch$2.prototype.updateShows = function(e) { + const t = this.showsUpdated.values, n = t.length; + for (let i = 0; i < n; i++) { + const r = t[i], o = r.entity, s = this.geometry.get(r.id); + let c = this.attributes.get(s.id.id); + defined(c) || (c = e.getGeometryInstanceAttributes(s.id), this.attributes.set(s.id.id, c)); + const l = o.isShowing, d = c.show[0] === 1; + l !== d && (c.show = ShowGeometryInstanceAttribute.toValue( + l, + c.show + ), s.attributes.show.value[0] = c.show[0]); + } + this.showsUpdated.removeAll(); +}; +Batch$2.prototype.contains = function(e) { + return this.updaters.contains(e.id); +}; +Batch$2.prototype.getBoundingSphere = function(e, t) { + const n = this.primitive; + if (!n.ready) + return BoundingSphereState$1.PENDING; + const i = n.getGeometryInstanceAttributes(e.entity); + return !defined(i) || !defined(i.boundingSphere) || defined(i.show) && i.show[0] === 0 ? BoundingSphereState$1.FAILED : (i.boundingSphere.clone(t), BoundingSphereState$1.DONE); +}; +Batch$2.prototype.destroy = function() { + const e = this.primitive, t = this.primitives; + defined(e) && t.remove(e); + const n = this.oldPrimitive; + defined(n) && t.remove(n), this.removeMaterialSubscription(); +}; +function StaticGroundGeometryPerMaterialBatch(e, t, n) { + this._items = [], this._primitives = e, this._classificationType = t, this._appearanceType = n; +} +StaticGroundGeometryPerMaterialBatch.prototype.add = function(e, t) { + const n = this._items, i = n.length, r = t.createFillGeometryInstance(e), o = ShadowVolumeAppearance.shouldUseSphericalCoordinates( + r.geometry.rectangle + ), s = Property.getValueOrDefault(t.zIndex, 0); + for (let l = 0; l < i; ++l) { + const d = n[l]; + if (d.isMaterial(t) && d.usingSphericalTextureCoordinates === o && d.zIndex === s && !d.overlapping(r.geometry.rectangle)) { + d.add(e, t, r); + return; + } + } + const c = new Batch$2( + this._primitives, + this._classificationType, + this._appearanceType, + t.fillMaterialProperty, + o, + s + ); + c.add(e, t, r), n.push(c); +}; +StaticGroundGeometryPerMaterialBatch.prototype.remove = function(e) { + const t = this._items, n = t.length; + for (let i = n - 1; i >= 0; i--) { + const r = t[i]; + if (r.remove(e)) { + r.updaters.length === 0 && (t.splice(i, 1), r.destroy()); + break; + } + } +}; +StaticGroundGeometryPerMaterialBatch.prototype.update = function(e) { + let t; + const n = this._items, i = n.length; + for (t = i - 1; t >= 0; t--) { + const o = n[t]; + if (o.invalidated) { + n.splice(t, 1); + const s = o.updaters.values, c = s.length; + for (let l = 0; l < c; l++) + this.add(e, s[l]); + o.destroy(); + } + } + let r = !0; + for (t = 0; t < n.length; t++) + r = n[t].update(e) && r; + return r; +}; +StaticGroundGeometryPerMaterialBatch.prototype.getBoundingSphere = function(e, t) { + const n = this._items, i = n.length; + for (let r = 0; r < i; r++) { + const o = n[r]; + if (o.contains(e)) + return o.getBoundingSphere(e, t); + } + return BoundingSphereState$1.FAILED; +}; +StaticGroundGeometryPerMaterialBatch.prototype.removeAllPrimitives = function() { + const e = this._items, t = e.length; + for (let n = 0; n < t; n++) + e[n].destroy(); + this._items.length = 0; +}; +const colorScratch$3 = new Color(), distanceDisplayConditionScratch$3 = new DistanceDisplayCondition(), defaultDistanceDisplayCondition$2 = new DistanceDisplayCondition(), defaultOffset = Cartesian3.ZERO, offsetScratch = new Cartesian3(); +function Batch$1(e, t, n, i) { + this.translucent = t, this.width = n, this.shadows = i, this.primitives = e, this.createPrimitive = !1, this.waitingOnCreate = !1, this.primitive = void 0, this.oldPrimitive = void 0, this.geometry = new AssociativeArray(), this.updaters = new AssociativeArray(), this.updatersWithAttributes = new AssociativeArray(), this.attributes = new AssociativeArray(), this.itemsToRemove = [], this.subscriptions = new AssociativeArray(), this.showsUpdated = new AssociativeArray(); +} +Batch$1.prototype.add = function(e, t) { + const n = e.id; + if (this.createPrimitive = !0, this.geometry.set(n, t), this.updaters.set(n, e), !e.hasConstantOutline || !e.outlineColorProperty.isConstant || !Property.isConstant(e.distanceDisplayConditionProperty) || !Property.isConstant(e.terrainOffsetProperty)) + this.updatersWithAttributes.set(n, e); + else { + const i = this; + this.subscriptions.set( + n, + e.entity.definitionChanged.addEventListener(function(r, o, s, c) { + o === "isShowing" && i.showsUpdated.set(e.id, e); + }) + ); + } +}; +Batch$1.prototype.remove = function(e) { + const t = e.id; + if (this.createPrimitive = this.geometry.remove(t) || this.createPrimitive, this.updaters.remove(t)) { + this.updatersWithAttributes.remove(t); + const n = this.subscriptions.get(t); + return defined(n) && (n(), this.subscriptions.remove(t), this.showsUpdated.remove(t)), !0; + } + return !1; +}; +Batch$1.prototype.update = function(e) { + let t = !0, n = 0, i = this.primitive; + const r = this.primitives; + let o; + if (this.createPrimitive) { + const s = this.geometry.values; + if (s.length > 0) + defined(i) && (defined(this.oldPrimitive) ? r.remove(i) : this.oldPrimitive = i), i = new Primitive$3({ + show: !1, + asynchronous: !0, + geometryInstances: s.slice(), + appearance: new PerInstanceColorAppearance({ + flat: !0, + translucent: this.translucent, + renderState: { + lineWidth: this.width + } + }), + shadows: this.shadows + }), r.add(i), t = !1; + else { + defined(i) && (r.remove(i), i = void 0); + const l = this.oldPrimitive; + defined(l) && (r.remove(l), this.oldPrimitive = void 0); + } + this.attributes.removeAll(), this.primitive = i, this.createPrimitive = !1, this.waitingOnCreate = !0; + } else if (defined(i) && i.ready) { + i.show = !0, defined(this.oldPrimitive) && (r.remove(this.oldPrimitive), this.oldPrimitive = void 0); + const s = this.updatersWithAttributes.values, c = s.length, l = this.waitingOnCreate; + for (o = 0; o < c; o++) { + const d = s[o], f = this.geometry.get(d.id); + let h = this.attributes.get(f.id.id); + if (defined(h) || (h = i.getGeometryInstanceAttributes(f.id), this.attributes.set(f.id.id, h)), !d.outlineColorProperty.isConstant || l) { + const C = d.outlineColorProperty, T = Property.getValueOrDefault( + C, + e, + Color.WHITE, + colorScratch$3 + ); + Color.equals(h._lastColor, T) || (h._lastColor = Color.clone( + T, + h._lastColor + ), h.color = ColorGeometryInstanceAttribute.toValue( + T, + h.color + ), (this.translucent && h.color[3] === 255 || !this.translucent && h.color[3] !== 255) && (this.itemsToRemove[n++] = d)); + } + const p = d.entity.isShowing && (d.hasConstantOutline || d.isOutlineVisible(e)), m = h.show[0] === 1; + p !== m && (h.show = ShowGeometryInstanceAttribute.toValue( + p, + h.show + )); + const _ = d.distanceDisplayConditionProperty; + if (!Property.isConstant(_)) { + const C = Property.getValueOrDefault( + _, + e, + defaultDistanceDisplayCondition$2, + distanceDisplayConditionScratch$3 + ); + DistanceDisplayCondition.equals( + C, + h._lastDistanceDisplayCondition + ) || (h._lastDistanceDisplayCondition = DistanceDisplayCondition.clone( + C, + h._lastDistanceDisplayCondition + ), h.distanceDisplayCondition = DistanceDisplayConditionGeometryInstanceAttribute.toValue( + C, + h.distanceDisplayCondition + )); + } + const y = d.terrainOffsetProperty; + if (!Property.isConstant(y)) { + const C = Property.getValueOrDefault( + y, + e, + defaultOffset, + offsetScratch + ); + Cartesian3.equals(C, h._lastOffset) || (h._lastOffset = Cartesian3.clone( + C, + h._lastOffset + ), h.offset = OffsetGeometryInstanceAttribute.toValue( + C, + h.offset + )); + } + } + this.updateShows(i), this.waitingOnCreate = !1; + } else defined(i) && !i.ready && (t = !1); + return this.itemsToRemove.length = n, t; +}; +Batch$1.prototype.updateShows = function(e) { + const t = this.showsUpdated.values, n = t.length; + for (let i = 0; i < n; i++) { + const r = t[i], o = this.geometry.get(r.id); + let s = this.attributes.get(o.id.id); + defined(s) || (s = e.getGeometryInstanceAttributes(o.id), this.attributes.set(o.id.id, s)); + const c = r.entity.isShowing, l = s.show[0] === 1; + c !== l && (s.show = ShowGeometryInstanceAttribute.toValue( + c, + s.show + ), o.attributes.show.value[0] = s.show[0]); + } + this.showsUpdated.removeAll(); +}; +Batch$1.prototype.contains = function(e) { + return this.updaters.contains(e.id); +}; +Batch$1.prototype.getBoundingSphere = function(e, t) { + const n = this.primitive; + if (!n.ready) + return BoundingSphereState$1.PENDING; + const i = n.getGeometryInstanceAttributes(e.entity); + return !defined(i) || !defined(i.boundingSphere) || // + defined(i.show) && i.show[0] === 0 ? BoundingSphereState$1.FAILED : (i.boundingSphere.clone(t), BoundingSphereState$1.DONE); +}; +Batch$1.prototype.removeAllPrimitives = function() { + const e = this.primitives, t = this.primitive; + defined(t) && (e.remove(t), this.primitive = void 0, this.geometry.removeAll(), this.updaters.removeAll()); + const n = this.oldPrimitive; + defined(n) && (e.remove(n), this.oldPrimitive = void 0); +}; +function StaticOutlineGeometryBatch(e, t, n) { + this._primitives = e, this._scene = t, this._shadows = n, this._solidBatches = new AssociativeArray(), this._translucentBatches = new AssociativeArray(); +} +StaticOutlineGeometryBatch.prototype.add = function(e, t) { + const n = t.createOutlineGeometryInstance(e), i = this._scene.clampLineWidth(t.outlineWidth); + let r, o; + n.attributes.color.value[3] === 255 ? (r = this._solidBatches, o = r.get(i), defined(o) || (o = new Batch$1(this._primitives, !1, i, this._shadows), r.set(i, o)), o.add(t, n)) : (r = this._translucentBatches, o = r.get(i), defined(o) || (o = new Batch$1(this._primitives, !0, i, this._shadows), r.set(i, o)), o.add(t, n)); +}; +StaticOutlineGeometryBatch.prototype.remove = function(e) { + let t; + const n = this._solidBatches.values, i = n.length; + for (t = 0; t < i; t++) + if (n[t].remove(e)) + return; + const r = this._translucentBatches.values, o = r.length; + for (t = 0; t < o; t++) + if (r[t].remove(e)) + return; +}; +StaticOutlineGeometryBatch.prototype.update = function(e) { + let t, n, i, r; + const o = this._solidBatches.values, s = o.length, c = this._translucentBatches.values, l = c.length; + let d, f = !0, h = !1; + do { + for (h = !1, n = 0; n < s; n++) { + r = o[n], f = r.update(e), d = r.itemsToRemove; + const p = d.length; + if (p > 0) + for (h = !0, t = 0; t < p; t++) + i = d[t], r.remove(i), this.add(e, i); + } + for (n = 0; n < l; n++) { + r = c[n], f = r.update(e), d = r.itemsToRemove; + const p = d.length; + if (p > 0) + for (h = !0, t = 0; t < p; t++) + i = d[t], r.remove(i), this.add(e, i); + } + } while (h); + return f; +}; +StaticOutlineGeometryBatch.prototype.getBoundingSphere = function(e, t) { + let n; + const i = this._solidBatches.values, r = i.length; + for (n = 0; n < r; n++) { + const c = i[n]; + if (c.contains(e)) + return c.getBoundingSphere(e, t); + } + const o = this._translucentBatches.values, s = o.length; + for (n = 0; n < s; n++) { + const c = o[n]; + if (c.contains(e)) + return c.getBoundingSphere(e, t); + } + return BoundingSphereState$1.FAILED; +}; +StaticOutlineGeometryBatch.prototype.removeAllPrimitives = function() { + let e; + const t = this._solidBatches.values, n = t.length; + for (e = 0; e < n; e++) + t[e].removeAllPrimitives(); + const i = this._translucentBatches.values, r = i.length; + for (e = 0; e < r; e++) + i[e].removeAllPrimitives(); +}; +const emptyArray$1 = []; +function GeometryVisualizer(e, t, n, i) { + n = defaultValue(n, e.primitives), i = defaultValue(i, e.groundPrimitives), this._scene = e, this._primitives = n, this._groundPrimitives = i, this._entityCollection = void 0, this._addedObjects = new AssociativeArray(), this._removedObjects = new AssociativeArray(), this._changedObjects = new AssociativeArray(); + const r = ShadowMode$1.NUMBER_OF_SHADOW_MODES; + this._outlineBatches = new Array(r * 2), this._closedColorBatches = new Array(r * 2), this._closedMaterialBatches = new Array(r * 2), this._openColorBatches = new Array(r * 2), this._openMaterialBatches = new Array(r * 2); + const o = Entity.supportsMaterialsforEntitiesOnTerrain( + e + ); + this._supportsMaterialsforEntitiesOnTerrain = o; + let s; + for (s = 0; s < r; ++s) + this._outlineBatches[s] = new StaticOutlineGeometryBatch( + n, + e, + s + ), this._outlineBatches[r + s] = new StaticOutlineGeometryBatch(n, e, s), this._closedColorBatches[s] = new StaticGeometryColorBatch( + n, + PerInstanceColorAppearance, + void 0, + !0, + s + ), this._closedColorBatches[r + s] = new StaticGeometryColorBatch( + n, + PerInstanceColorAppearance, + void 0, + !0, + s + ), this._closedMaterialBatches[s] = new StaticGeometryPerMaterialBatch( + n, + MaterialAppearance, + void 0, + !0, + s + ), this._closedMaterialBatches[r + s] = new StaticGeometryPerMaterialBatch( + n, + MaterialAppearance, + void 0, + !0, + s + ), this._openColorBatches[s] = new StaticGeometryColorBatch( + n, + PerInstanceColorAppearance, + void 0, + !1, + s + ), this._openColorBatches[r + s] = new StaticGeometryColorBatch( + n, + PerInstanceColorAppearance, + void 0, + !1, + s + ), this._openMaterialBatches[s] = new StaticGeometryPerMaterialBatch( + n, + MaterialAppearance, + void 0, + !1, + s + ), this._openMaterialBatches[r + s] = new StaticGeometryPerMaterialBatch( + n, + MaterialAppearance, + void 0, + !1, + s + ); + const c = ClassificationType$1.NUMBER_OF_CLASSIFICATION_TYPES, l = new Array(c), d = []; + if (o) + for (s = 0; s < c; ++s) + d.push( + new StaticGroundGeometryPerMaterialBatch( + i, + s, + MaterialAppearance + ) + ), l[s] = new StaticGroundGeometryColorBatch( + i, + s + ); + else + for (s = 0; s < c; ++s) + l[s] = new StaticGroundGeometryColorBatch( + i, + s + ); + this._groundColorBatches = l, this._groundMaterialBatches = d, this._dynamicBatch = new DynamicGeometryBatch(n, i), this._batches = this._outlineBatches.concat( + this._closedColorBatches, + this._closedMaterialBatches, + this._openColorBatches, + this._openMaterialBatches, + this._groundColorBatches, + this._groundMaterialBatches, + this._dynamicBatch + ), this._subscriptions = new AssociativeArray(), this._updaterSets = new AssociativeArray(), this._entityCollection = t, t.collectionChanged.addEventListener( + GeometryVisualizer.prototype._onCollectionChanged, + this + ), this._onCollectionChanged( + t, + t.values, + emptyArray$1 + ); +} +GeometryVisualizer.registerUpdater = function(e) { + GeometryUpdaterSet.registerUpdater(e); +}; +GeometryVisualizer.unregisterUpdater = function(e) { + GeometryUpdaterSet.unregisterUpdater(e); +}; +GeometryVisualizer.prototype.update = function(e) { + const t = this._addedObjects, n = t.values, i = this._removedObjects, r = i.values, o = this._changedObjects, s = o.values; + let c, l, d, f; + const h = this; + for (c = s.length - 1; c > -1; c--) + l = s[c], d = l.id, f = this._updaterSets.get(d), f.entity === l ? f.forEach(function(y) { + h._removeUpdater(y), h._insertUpdaterIntoBatch(e, y); + }) : (r.push(l), n.push(l)); + for (c = r.length - 1; c > -1; c--) + l = r[c], d = l.id, f = this._updaterSets.get(d), f.forEach(this._removeUpdater.bind(this)), f.destroy(), this._updaterSets.remove(d), this._subscriptions.get(d)(), this._subscriptions.remove(d); + for (c = n.length - 1; c > -1; c--) + l = n[c], d = l.id, f = new GeometryUpdaterSet(l, this._scene), this._updaterSets.set(d, f), f.forEach(function(y) { + h._insertUpdaterIntoBatch(e, y); + }), this._subscriptions.set( + d, + f.geometryChanged.addEventListener( + GeometryVisualizer._onGeometryChanged, + this + ) + ); + t.removeAll(), i.removeAll(), o.removeAll(); + let p = !0; + const m = this._batches, _ = m.length; + for (c = 0; c < _; c++) + p = m[c].update(e) && p; + return p; +}; +const getBoundingSphereArrayScratch$2 = [], getBoundingSphereBoundingSphereScratch$2 = new BoundingSphere(); +GeometryVisualizer.prototype.getBoundingSphere = function(e, t) { + const n = getBoundingSphereArrayScratch$2, i = getBoundingSphereBoundingSphereScratch$2; + let r = 0, o = BoundingSphereState$1.DONE; + const s = this._batches, c = s.length, l = e.id, d = this._updaterSets.get(l).updaters; + for (let f = 0; f < d.length; f++) { + const h = d[f]; + for (let p = 0; p < c; p++) { + if (o = s[p].getBoundingSphere(h, i), o === BoundingSphereState$1.PENDING) + return BoundingSphereState$1.PENDING; + o === BoundingSphereState$1.DONE && (n[r] = BoundingSphere.clone( + i, + n[r] + ), r++); + } + } + return r === 0 ? BoundingSphereState$1.FAILED : (n.length = r, BoundingSphere.fromBoundingSpheres(n, t), BoundingSphereState$1.DONE); +}; +GeometryVisualizer.prototype.isDestroyed = function() { + return !1; +}; +GeometryVisualizer.prototype.destroy = function() { + this._entityCollection.collectionChanged.removeEventListener( + GeometryVisualizer.prototype._onCollectionChanged, + this + ), this._addedObjects.removeAll(), this._removedObjects.removeAll(); + let e; + const t = this._batches; + let n = t.length; + for (e = 0; e < n; e++) + t[e].removeAllPrimitives(); + const i = this._subscriptions.values; + for (n = i.length, e = 0; e < n; e++) + i[e](); + this._subscriptions.removeAll(); + const r = this._updaterSets.values; + for (n = r.length, e = 0; e < n; e++) + r[e].destroy(); + return this._updaterSets.removeAll(), destroyObject(this); +}; +GeometryVisualizer.prototype._removeUpdater = function(e) { + const t = this._batches, n = t.length; + for (let i = 0; i < n; i++) + t[i].remove(e); +}; +GeometryVisualizer.prototype._insertUpdaterIntoBatch = function(e, t) { + if (t.isDynamic) { + this._dynamicBatch.add(e, t); + return; + } + let n; + (t.outlineEnabled || t.fillEnabled) && (n = t.shadowsProperty.getValue(e)); + const i = ShadowMode$1.NUMBER_OF_SHADOW_MODES; + if (t.outlineEnabled && (defined(t.terrainOffsetProperty) ? this._outlineBatches[i + n].add(e, t) : this._outlineBatches[n].add(e, t)), t.fillEnabled) + if (t.onTerrain) { + const r = t.classificationTypeProperty.getValue( + e + ); + t.fillMaterialProperty instanceof ColorMaterialProperty ? this._groundColorBatches[r].add(e, t) : this._groundMaterialBatches[r].add(e, t); + } else t.isClosed ? t.fillMaterialProperty instanceof ColorMaterialProperty ? defined(t.terrainOffsetProperty) ? this._closedColorBatches[i + n].add( + e, + t + ) : this._closedColorBatches[n].add(e, t) : defined(t.terrainOffsetProperty) ? this._closedMaterialBatches[i + n].add( + e, + t + ) : this._closedMaterialBatches[n].add(e, t) : t.fillMaterialProperty instanceof ColorMaterialProperty ? defined(t.terrainOffsetProperty) ? this._openColorBatches[i + n].add( + e, + t + ) : this._openColorBatches[n].add(e, t) : defined(t.terrainOffsetProperty) ? this._openMaterialBatches[i + n].add( + e, + t + ) : this._openMaterialBatches[n].add(e, t); +}; +GeometryVisualizer._onGeometryChanged = function(e) { + const t = this._removedObjects, n = this._changedObjects, i = e.entity, r = i.id; + !defined(t.get(r)) && !defined(n.get(r)) && n.set(r, i); +}; +GeometryVisualizer.prototype._onCollectionChanged = function(e, t, n) { + const i = this._addedObjects, r = this._removedObjects, o = this._changedObjects; + let s, c, l; + for (s = n.length - 1; s > -1; s--) + l = n[s], c = l.id, i.remove(c) || (r.set(c, l), o.remove(c)); + for (s = t.length - 1; s > -1; s--) + l = t[s], c = l.id, r.remove(c) ? o.set(c, l) : i.set(c, l); +}; +const defaultScale$1 = 1, defaultFont = "30px sans-serif", defaultStyle = LabelStyle$1.FILL, defaultFillColor = Color.WHITE, defaultOutlineColor$1 = Color.BLACK, defaultOutlineWidth$1 = 1, defaultShowBackground = !1, defaultBackgroundColor$1 = new Color(0.165, 0.165, 0.165, 0.8), defaultBackgroundPadding = new Cartesian2(7, 5), defaultPixelOffset = Cartesian2.ZERO, defaultEyeOffset = Cartesian3.ZERO, defaultHeightReference$1 = HeightReference$1.NONE, defaultHorizontalOrigin = HorizontalOrigin$1.CENTER, defaultVerticalOrigin = VerticalOrigin$1.CENTER, positionScratch$1 = new Cartesian3(), fillColorScratch = new Color(), outlineColorScratch$1 = new Color(), backgroundColorScratch = new Color(), backgroundPaddingScratch = new Cartesian2(), eyeOffsetScratch = new Cartesian3(), pixelOffsetScratch = new Cartesian2(), translucencyByDistanceScratch$1 = new NearFarScalar(), pixelOffsetScaleByDistanceScratch = new NearFarScalar(), scaleByDistanceScratch$1 = new NearFarScalar(), distanceDisplayConditionScratch$2 = new DistanceDisplayCondition(); +function EntityData$2(e) { + this.entity = e, this.label = void 0, this.index = void 0; +} +function LabelVisualizer(e, t) { + t.collectionChanged.addEventListener( + LabelVisualizer.prototype._onCollectionChanged, + this + ), this._cluster = e, this._entityCollection = t, this._items = new AssociativeArray(), this._onCollectionChanged(t, t.values, [], []); +} +LabelVisualizer.prototype.update = function(e) { + const t = this._items.values, n = this._cluster; + for (let i = 0, r = t.length; i < r; i++) { + const o = t[i], s = o.entity, c = s._label; + let l, d = o.label, f = s.isShowing && s.isAvailable(e) && Property.getValueOrDefault(c._show, e, !0), h; + if (f && (h = Property.getValueOrUndefined( + s._position, + e, + positionScratch$1 + ), l = Property.getValueOrUndefined(c._text, e), f = defined(h) && defined(l)), !f) { + returnPrimitive$1(o, s, n); + continue; + } + Property.isConstant(s._position) || (n._clusterDirty = !0); + let p = !1; + const m = Property.getValueOrDefault( + c._heightReference, + e, + defaultHeightReference$1 + ); + defined(d) || (d = n.getLabel(s), d.id = s, o.label = d, p = Cartesian3.equals(d.position, h) && d.heightReference === m), d.show = !0, d.position = h, d.text = l, d.scale = Property.getValueOrDefault( + c._scale, + e, + defaultScale$1 + ), d.font = Property.getValueOrDefault( + c._font, + e, + defaultFont + ), d.style = Property.getValueOrDefault( + c._style, + e, + defaultStyle + ), d.fillColor = Property.getValueOrDefault( + c._fillColor, + e, + defaultFillColor, + fillColorScratch + ), d.outlineColor = Property.getValueOrDefault( + c._outlineColor, + e, + defaultOutlineColor$1, + outlineColorScratch$1 + ), d.outlineWidth = Property.getValueOrDefault( + c._outlineWidth, + e, + defaultOutlineWidth$1 + ), d.showBackground = Property.getValueOrDefault( + c._showBackground, + e, + defaultShowBackground + ), d.backgroundColor = Property.getValueOrDefault( + c._backgroundColor, + e, + defaultBackgroundColor$1, + backgroundColorScratch + ), d.backgroundPadding = Property.getValueOrDefault( + c._backgroundPadding, + e, + defaultBackgroundPadding, + backgroundPaddingScratch + ), d.pixelOffset = Property.getValueOrDefault( + c._pixelOffset, + e, + defaultPixelOffset, + pixelOffsetScratch + ), d.eyeOffset = Property.getValueOrDefault( + c._eyeOffset, + e, + defaultEyeOffset, + eyeOffsetScratch + ), d.heightReference = m, d.horizontalOrigin = Property.getValueOrDefault( + c._horizontalOrigin, + e, + defaultHorizontalOrigin + ), d.verticalOrigin = Property.getValueOrDefault( + c._verticalOrigin, + e, + defaultVerticalOrigin + ), d.translucencyByDistance = Property.getValueOrUndefined( + c._translucencyByDistance, + e, + translucencyByDistanceScratch$1 + ), d.pixelOffsetScaleByDistance = Property.getValueOrUndefined( + c._pixelOffsetScaleByDistance, + e, + pixelOffsetScaleByDistanceScratch + ), d.scaleByDistance = Property.getValueOrUndefined( + c._scaleByDistance, + e, + scaleByDistanceScratch$1 + ), d.distanceDisplayCondition = Property.getValueOrUndefined( + c._distanceDisplayCondition, + e, + distanceDisplayConditionScratch$2 + ), d.disableDepthTestDistance = Property.getValueOrUndefined( + c._disableDepthTestDistance, + e + ), p && d._updateClamping(); + } + return !0; +}; +LabelVisualizer.prototype.getBoundingSphere = function(e, t) { + const n = this._items.get(e.id); + if (!defined(n) || !defined(n.label)) + return BoundingSphereState$1.FAILED; + const i = n.label; + return t.center = Cartesian3.clone( + defaultValue(i._clampedPosition, i.position), + t.center + ), t.radius = 0, BoundingSphereState$1.DONE; +}; +LabelVisualizer.prototype.isDestroyed = function() { + return !1; +}; +LabelVisualizer.prototype.destroy = function() { + this._entityCollection.collectionChanged.removeEventListener( + LabelVisualizer.prototype._onCollectionChanged, + this + ); + const e = this._entityCollection.values; + for (let t = 0; t < e.length; t++) + this._cluster.removeLabel(e[t]); + return destroyObject(this); +}; +LabelVisualizer.prototype._onCollectionChanged = function(e, t, n, i) { + let r, o; + const s = this._items, c = this._cluster; + for (r = t.length - 1; r > -1; r--) + o = t[r], defined(o._label) && defined(o._position) && s.set(o.id, new EntityData$2(o)); + for (r = i.length - 1; r > -1; r--) + o = i[r], defined(o._label) && defined(o._position) ? s.contains(o.id) || s.set(o.id, new EntityData$2(o)) : (returnPrimitive$1(s.get(o.id), o, c), s.remove(o.id)); + for (r = n.length - 1; r > -1; r--) + o = n[r], returnPrimitive$1(s.get(o.id), o, c), s.remove(o.id); +}; +function returnPrimitive$1(e, t, n) { + defined(e) && (e.label = void 0, n.removeLabel(t)); +} +const defaultScale = 1, defaultMinimumPixelSize = 0, defaultIncrementallyLoadTextures = !0, defaultClampAnimations = !0, defaultShadows$1 = ShadowMode$1.ENABLED, defaultHeightReference = HeightReference$1.NONE, defaultSilhouetteColor = Color.RED, defaultSilhouetteSize = 0, defaultColor$2 = Color.WHITE, defaultColorBlendMode = ColorBlendMode$1.HIGHLIGHT, defaultColorBlendAmount = 0.5, defaultImageBasedLightingFactor = new Cartesian2(1, 1), modelMatrixScratch = new Matrix4(), nodeMatrixScratch = new Matrix4(), scratchColor$5 = new Color(), scratchArray$2 = new Array(4), scratchCartesian$3 = new Cartesian3(); +function ModelVisualizer(e, t) { + t.collectionChanged.addEventListener( + ModelVisualizer.prototype._onCollectionChanged, + this + ), this._scene = e, this._primitives = e.primitives, this._entityCollection = t, this._modelHash = {}, this._entitiesToVisualize = new AssociativeArray(), this._onCollectionChanged(t, t.values, [], []); +} +async function createModelPrimitive(e, t, n, i) { + const r = e._primitives, o = e._modelHash; + try { + const s = await Model.fromGltfAsync({ + url: n, + incrementallyLoadTextures: i, + scene: e._scene + }); + if (e.isDestroyed() || !defined(o[t.id])) + return; + s.id = t, r.add(s), o[t.id].modelPrimitive = s, s.errorEvent.addEventListener((c) => { + defined(o[t.id]) && (console.log(c), c.name !== "TextureError" && s.incrementallyLoadTextures && (o[t.id].loadFailed = !0)); + }); + } catch (s) { + if (e.isDestroyed() || !defined(o[t.id])) + return; + console.log(s), o[t.id].loadFailed = !0; + } +} +ModelVisualizer.prototype.update = function(e) { + const t = this._entitiesToVisualize.values, n = this._modelHash, i = this._primitives; + for (let r = 0, o = t.length; r < o; r++) { + const s = t[r], c = s._model; + let l, d = n[s.id], f = s.isShowing && s.isAvailable(e) && Property.getValueOrDefault(c._show, e, !0), h; + if (f && (h = s.computeModelMatrix(e, modelMatrixScratch), l = Resource.createIfNeeded( + Property.getValueOrUndefined(c._uri, e) + ), f = defined(h) && defined(l)), !f) { + defined(d) && d.modelPrimitive && (d.modelPrimitive.show = !1); + continue; + } + if (!defined(d) || l.url !== d.url) { + defined(d == null ? void 0 : d.modelPrimitive) && (i.removeAndDestroy(d.modelPrimitive), delete n[s.id]), d = { + modelPrimitive: void 0, + url: l.url, + animationsRunning: !1, + nodeTransformationsScratch: {}, + articulationsScratch: {}, + loadFailed: !1, + modelUpdated: !1 + }, n[s.id] = d; + const _ = Property.getValueOrDefault( + c._incrementallyLoadTextures, + e, + defaultIncrementallyLoadTextures + ); + createModelPrimitive(this, s, l, _); + } + const p = d.modelPrimitive; + if (!defined(p)) + continue; + p.show = !0, p.scale = Property.getValueOrDefault( + c._scale, + e, + defaultScale + ), p.minimumPixelSize = Property.getValueOrDefault( + c._minimumPixelSize, + e, + defaultMinimumPixelSize + ), p.maximumScale = Property.getValueOrUndefined( + c._maximumScale, + e + ), p.modelMatrix = Matrix4.clone(h, p.modelMatrix), p.shadows = Property.getValueOrDefault( + c._shadows, + e, + defaultShadows$1 + ), p.heightReference = Property.getValueOrDefault( + c._heightReference, + e, + defaultHeightReference + ), p.distanceDisplayCondition = Property.getValueOrUndefined( + c._distanceDisplayCondition, + e + ), p.silhouetteColor = Property.getValueOrDefault( + c._silhouetteColor, + e, + defaultSilhouetteColor, + scratchColor$5 + ), p.silhouetteSize = Property.getValueOrDefault( + c._silhouetteSize, + e, + defaultSilhouetteSize + ), p.color = Property.getValueOrDefault( + c._color, + e, + defaultColor$2, + scratchColor$5 + ), p.colorBlendMode = Property.getValueOrDefault( + c._colorBlendMode, + e, + defaultColorBlendMode + ), p.colorBlendAmount = Property.getValueOrDefault( + c._colorBlendAmount, + e, + defaultColorBlendAmount + ), p.clippingPlanes = Property.getValueOrUndefined( + c._clippingPlanes, + e + ), p.clampAnimations = Property.getValueOrDefault( + c._clampAnimations, + e, + defaultClampAnimations + ), p.imageBasedLighting.imageBasedLightingFactor = Property.getValueOrDefault( + c._imageBasedLightingFactor, + e, + defaultImageBasedLightingFactor + ); + let m = Property.getValueOrUndefined( + c._lightColor, + e + ); + if (defined(m) && (Color.pack(m, scratchArray$2, 0), m = Cartesian3.unpack(scratchArray$2, 0, scratchCartesian$3)), p.lightColor = m, p.customShader = Property.getValueOrUndefined( + c._customShader, + e + ), n[s.id].modelUpdated = !0, p.ready) { + const _ = Property.getValueOrDefault( + c._runAnimations, + e, + !0 + ); + d.animationsRunning !== _ && (_ ? p.activeAnimations.addAll({ + loop: ModelAnimationLoop$1.REPEAT + }) : p.activeAnimations.removeAll(), d.animationsRunning = _); + const y = Property.getValueOrUndefined( + c._nodeTransformations, + e, + d.nodeTransformationsScratch + ); + if (defined(y)) { + const x = Object.keys(y); + for (let b = 0, S = x.length; b < S; ++b) { + const E = x[b], A = y[E]; + if (!defined(A)) + continue; + const D = p.getNode(E); + if (!defined(D)) + continue; + const P = Matrix4.fromTranslationRotationScale( + A, + nodeMatrixScratch + ); + D.matrix = Matrix4.multiply( + D.originalMatrix, + P, + P + ); + } + } + let C = !1; + const T = Property.getValueOrUndefined( + c._articulations, + e, + d.articulationsScratch + ); + if (defined(T)) { + const x = Object.keys(T); + for (let b = 0, S = x.length; b < S; ++b) { + const E = x[b], A = T[E]; + defined(A) && (C = !0, p.setArticulationStage(E, A)); + } + } + C && p.applyArticulations(); + } + } + return !0; +}; +ModelVisualizer.prototype.isDestroyed = function() { + return !1; +}; +ModelVisualizer.prototype.destroy = function() { + this._entityCollection.collectionChanged.removeEventListener( + ModelVisualizer.prototype._onCollectionChanged, + this + ); + const e = this._entitiesToVisualize.values, t = this._modelHash, n = this._primitives; + for (let i = e.length - 1; i > -1; i--) + removeModel(this, e[i], t, n); + return destroyObject(this); +}; +const scratchPosition$5 = new Cartesian3(), scratchCartographic$8 = new Cartographic(); +ModelVisualizer.prototype.getBoundingSphere = function(e, t) { + const n = this._modelHash[e.id]; + if (!defined(n) || n.loadFailed) + return BoundingSphereState$1.FAILED; + const i = n.modelPrimitive; + if (!defined(i) || !i.show || !i.ready || !n.modelUpdated) + return BoundingSphereState$1.PENDING; + const r = this._scene, o = defaultValue(r.ellipsoid, Ellipsoid.default); + if (i.heightReference !== HeightReference$1.NONE) { + const c = i.modelMatrix; + scratchPosition$5.x = c[12], scratchPosition$5.y = c[13], scratchPosition$5.z = c[14]; + const l = o.cartesianToCartographic( + scratchPosition$5, + scratchCartographic$8 + ), d = r.getHeight(l, i.heightReference); + return defined(d) && (isHeightReferenceClamp(i.heightReference) ? l.height = d : l.height += d), BoundingSphere.clone(i.boundingSphere, t), t.center = o.cartographicToCartesian(l), BoundingSphereState$1.DONE; + } + return BoundingSphere.clone(i.boundingSphere, t), BoundingSphereState$1.DONE; +}; +ModelVisualizer.prototype._onCollectionChanged = function(e, t, n, i) { + let r, o; + const s = this._entitiesToVisualize, c = this._modelHash, l = this._primitives; + for (r = t.length - 1; r > -1; r--) + o = t[r], defined(o._model) && defined(o._position) && s.set(o.id, o); + for (r = i.length - 1; r > -1; r--) + o = i[r], defined(o._model) && defined(o._position) ? (clearNodeTransformationsArticulationsScratch(o, c), s.set(o.id, o)) : (removeModel(this, o, c, l), s.remove(o.id)); + for (r = n.length - 1; r > -1; r--) + o = n[r], removeModel(this, o, c, l), s.remove(o.id); +}; +function removeModel(e, t, n, i) { + const r = n[t.id]; + defined(r) && (i.removeAndDestroy(r.modelPrimitive), delete n[t.id]); +} +function clearNodeTransformationsArticulationsScratch(e, t) { + const n = t[e.id]; + defined(n) && (n.nodeTransformationsScratch = {}, n.articulationsScratch = {}); +} +function ScaledPositionProperty(e) { + this._definitionChanged = new Event(), this._value = void 0, this._removeSubscription = void 0, this.setValue(e); +} +Object.defineProperties(ScaledPositionProperty.prototype, { + isConstant: { + get: function() { + return Property.isConstant(this._value); + } + }, + definitionChanged: { + get: function() { + return this._definitionChanged; + } + }, + referenceFrame: { + get: function() { + return defined(this._value) ? this._value.referenceFrame : ReferenceFrame$1.FIXED; + } + } +}); +const timeScratch = new JulianDate(); +ScaledPositionProperty.prototype.getValue = function(e, t) { + return defined(e) || (e = JulianDate.now(timeScratch)), this.getValueInReferenceFrame(e, ReferenceFrame$1.FIXED, t); +}; +ScaledPositionProperty.prototype.setValue = function(e) { + this._value !== e && (this._value = e, defined(this._removeSubscription) && (this._removeSubscription(), this._removeSubscription = void 0), defined(e) && (this._removeSubscription = e.definitionChanged.addEventListener( + this._raiseDefinitionChanged, + this + )), this._definitionChanged.raiseEvent(this)); +}; +ScaledPositionProperty.prototype.getValueInReferenceFrame = function(e, t, n) { + if (defined(this._value)) + return n = this._value.getValueInReferenceFrame(e, t, n), defined(n) ? Ellipsoid.default.scaleToGeodeticSurface(n, n) : void 0; +}; +ScaledPositionProperty.prototype.equals = function(e) { + return this === e || e instanceof ScaledPositionProperty && this._value === e._value; +}; +ScaledPositionProperty.prototype._raiseDefinitionChanged = function() { + this._definitionChanged.raiseEvent(this); +}; +const defaultResolution = 60, defaultWidth = 1, scratchTimeInterval = new TimeInterval(), subSampleCompositePropertyScratch = new TimeInterval(), subSampleIntervalPropertyScratch = new TimeInterval(); +function EntityData$1(e) { + this.entity = e, this.polyline = void 0, this.index = void 0, this.updater = void 0; +} +function subSampleSampledProperty(e, t, n, i, r, o, s, c, l) { + let d = c, f; + f = e.getValueInReferenceFrame(t, o, l[d]), defined(f) && (l[d++] = f); + let h = !defined(r) || JulianDate.lessThanOrEquals(r, t) || JulianDate.greaterThanOrEquals(r, n), p = 0; + const m = i.length; + let _ = i[p]; + const y = n; + let C = !1, T, x, b; + for (; p < m; ) { + if (!h && JulianDate.greaterThanOrEquals(_, r) && (f = e.getValueInReferenceFrame( + r, + o, + l[d] + ), defined(f) && (l[d++] = f), h = !0), JulianDate.greaterThan(_, t) && JulianDate.lessThan(_, y) && !_.equals(r) && (f = e.getValueInReferenceFrame( + _, + o, + l[d] + ), defined(f) && (l[d++] = f)), p < m - 1) { + if (s > 0 && !C) { + const S = i[p + 1], E = JulianDate.secondsDifference(S, _); + C = E > s, C && (T = Math.ceil(E / s), x = 0, b = E / Math.max(T, 2), T = Math.max(T - 1, 1)); + } + if (C && x < T) { + _ = JulianDate.addSeconds( + _, + b, + new JulianDate() + ), x++; + continue; + } + } + C = !1, p++, _ = i[p]; + } + return f = e.getValueInReferenceFrame(n, o, l[d]), defined(f) && (l[d++] = f), d; +} +function subSampleGenericProperty(e, t, n, i, r, o, s, c) { + let l, d = 0, f = s, h = t; + const p = Math.max(o, 60); + let m = !defined(i) || JulianDate.lessThanOrEquals(i, t) || JulianDate.greaterThanOrEquals(i, n); + for (; JulianDate.lessThan(h, n); ) + !m && JulianDate.greaterThanOrEquals(h, i) && (m = !0, l = e.getValueInReferenceFrame( + i, + r, + c[f] + ), defined(l) && (c[f] = l, f++)), l = e.getValueInReferenceFrame( + h, + r, + c[f] + ), defined(l) && (c[f] = l, f++), d++, h = JulianDate.addSeconds(t, p * d, new JulianDate()); + return l = e.getValueInReferenceFrame(n, r, c[f]), defined(l) && (c[f] = l, f++), f; +} +function subSampleIntervalProperty(e, t, n, i, r, o, s, c) { + subSampleIntervalPropertyScratch.start = t, subSampleIntervalPropertyScratch.stop = n; + let l = s; + const d = e.intervals; + for (let f = 0; f < d.length; f++) { + const h = d.get(f); + if (!TimeInterval.intersect( + h, + subSampleIntervalPropertyScratch, + scratchTimeInterval + ).isEmpty) { + let p = h.start; + h.isStartIncluded || (h.isStopIncluded ? p = h.stop : p = JulianDate.addSeconds( + h.start, + JulianDate.secondsDifference(h.stop, h.start) / 2, + new JulianDate() + )); + const m = e.getValueInReferenceFrame( + p, + r, + c[l] + ); + defined(m) && (c[l] = m, l++); + } + } + return l; +} +function subSampleConstantProperty(e, t, n, i, r, o, s, c) { + const l = e.getValueInReferenceFrame( + t, + r, + c[s] + ); + return defined(l) && (c[s++] = l), s; +} +function subSampleCompositeProperty(e, t, n, i, r, o, s, c) { + subSampleCompositePropertyScratch.start = t, subSampleCompositePropertyScratch.stop = n; + let l = s; + const d = e.intervals; + for (let f = 0; f < d.length; f++) { + const h = d.get(f); + if (!TimeInterval.intersect( + h, + subSampleCompositePropertyScratch, + scratchTimeInterval + ).isEmpty) { + const p = h.start, m = h.stop; + let _ = t; + JulianDate.greaterThan(p, _) && (_ = p); + let y = n; + JulianDate.lessThan(m, y) && (y = m), l = reallySubSample( + h.data, + _, + y, + i, + r, + o, + l, + c + ); + } + } + return l; +} +function reallySubSample(e, t, n, i, r, o, s, c) { + for (; e instanceof ReferenceProperty; ) + e = e.resolvedProperty; + if (e instanceof SampledPositionProperty) { + const l = e._property._times; + s = subSampleSampledProperty( + e, + t, + n, + l, + i, + r, + o, + s, + c + ); + } else e instanceof CompositePositionProperty ? s = subSampleCompositeProperty( + e, + t, + n, + i, + r, + o, + s, + c + ) : e instanceof TimeIntervalCollectionPositionProperty ? s = subSampleIntervalProperty( + e, + t, + n, + i, + r, + o, + s, + c + ) : e instanceof ConstantPositionProperty || e instanceof ScaledPositionProperty && Property.isConstant(e) ? s = subSampleConstantProperty( + e, + t, + n, + i, + r, + o, + s, + c + ) : s = subSampleGenericProperty( + e, + t, + n, + i, + r, + o, + s, + c + ); + return s; +} +function subSample(e, t, n, i, r, o, s) { + defined(s) || (s = []); + const c = reallySubSample( + e, + t, + n, + i, + r, + o, + 0, + s + ); + return s.length = c, s; +} +const toFixedScratch = new Matrix3(); +function PolylineUpdater(e, t) { + this._unusedIndexes = [], this._polylineCollection = new PolylineCollection(), this._scene = e, this._referenceFrame = t, e.primitives.add(this._polylineCollection); +} +PolylineUpdater.prototype.update = function(e) { + if (this._referenceFrame === ReferenceFrame$1.INERTIAL) { + const t = Transforms.computeIcrfToCentralBodyFixedMatrix( + e, + toFixedScratch + ); + Matrix4.fromRotationTranslation( + t, + Cartesian3.ZERO, + this._polylineCollection.modelMatrix + ); + } +}; +PolylineUpdater.prototype.updateObject = function(e, t) { + const n = t.entity, i = n._path, r = n._position; + let o, s; + const c = i._show; + let l = t.polyline, d = n.isShowing && n.isAvailable(e) && (!defined(c) || c.getValue(e)); + if (d) { + const h = Property.getValueOrUndefined(i._leadTime, e), p = Property.getValueOrUndefined( + i._trailTime, + e + ), m = n._availability, _ = defined(m), y = defined(h), C = defined(p); + if (d = _ || y && C, d) { + if (C && (o = JulianDate.addSeconds(e, -p, new JulianDate())), y && (s = JulianDate.addSeconds(e, h, new JulianDate())), _) { + const T = m.start, x = m.stop; + (!C || JulianDate.greaterThan(T, o)) && (o = T), (!y || JulianDate.lessThan(x, s)) && (s = x); + } + d = JulianDate.lessThan(o, s); + } + } + if (!d) { + defined(l) && (this._unusedIndexes.push(t.index), t.polyline = void 0, l.show = !1, t.index = void 0); + return; + } + if (!defined(l)) { + const h = this._unusedIndexes; + if (h.length > 0) { + const m = h.pop(); + l = this._polylineCollection.get(m), t.index = m; + } else + t.index = this._polylineCollection.length, l = this._polylineCollection.add(); + l.id = n, t.polyline = l; + } + const f = Property.getValueOrDefault( + i._resolution, + e, + defaultResolution + ); + l.show = !0, l.positions = subSample( + r, + o, + s, + e, + this._referenceFrame, + f, + l.positions.slice() + ), l.material = MaterialProperty.getValue( + e, + i._material, + l.material + ), l.width = Property.getValueOrDefault( + i._width, + e, + defaultWidth + ), l.distanceDisplayCondition = Property.getValueOrUndefined( + i._distanceDisplayCondition, + e, + l.distanceDisplayCondition + ); +}; +PolylineUpdater.prototype.removeObject = function(e) { + const t = e.polyline; + defined(t) && (this._unusedIndexes.push(e.index), e.polyline = void 0, t.show = !1, t.id = void 0, e.index = void 0); +}; +PolylineUpdater.prototype.destroy = function() { + return this._scene.primitives.remove(this._polylineCollection), destroyObject(this); +}; +function PathVisualizer(e, t) { + t.collectionChanged.addEventListener( + PathVisualizer.prototype._onCollectionChanged, + this + ), this._scene = e, this._updaters = {}, this._entityCollection = t, this._items = new AssociativeArray(), this._onCollectionChanged(t, t.values, [], []); +} +PathVisualizer.prototype.update = function(e) { + const t = this._updaters; + for (const i in t) + t.hasOwnProperty(i) && t[i].update(e); + const n = this._items.values; + if (n.length === 0 && defined(this._updaters) && Object.keys(this._updaters).length > 0) { + for (const i in t) + t.hasOwnProperty(i) && t[i].destroy(); + this._updaters = {}; + } + for (let i = 0, r = n.length; i < r; i++) { + const o = n[i], c = o.entity._position, l = o.updater; + let d = ReferenceFrame$1.FIXED; + this._scene.mode === SceneMode$1.SCENE3D && (d = c.referenceFrame); + let f = this._updaters[d]; + if (l === f && defined(f)) { + f.updateObject(e, o); + continue; + } + defined(l) && l.removeObject(o), defined(f) || (f = new PolylineUpdater(this._scene, d), f.update(e), this._updaters[d] = f), o.updater = f, defined(f) && f.updateObject(e, o); + } + return !0; +}; +PathVisualizer.prototype.isDestroyed = function() { + return !1; +}; +PathVisualizer.prototype.destroy = function() { + this._entityCollection.collectionChanged.removeEventListener( + PathVisualizer.prototype._onCollectionChanged, + this + ); + const e = this._updaters; + for (const t in e) + e.hasOwnProperty(t) && e[t].destroy(); + return destroyObject(this); +}; +PathVisualizer.prototype._onCollectionChanged = function(e, t, n, i) { + let r, o, s; + const c = this._items; + for (r = t.length - 1; r > -1; r--) + o = t[r], defined(o._path) && defined(o._position) && c.set(o.id, new EntityData$1(o)); + for (r = i.length - 1; r > -1; r--) + o = i[r], defined(o._path) && defined(o._position) ? c.contains(o.id) || c.set(o.id, new EntityData$1(o)) : (s = c.get(o.id), defined(s) && (defined(s.updater) && s.updater.removeObject(s), c.remove(o.id))); + for (r = n.length - 1; r > -1; r--) + o = n[r], s = c.get(o.id), defined(s) && (defined(s.updater) && s.updater.removeObject(s), c.remove(o.id)); +}; +PathVisualizer._subSample = subSample; +const defaultColor$1 = Color.WHITE, defaultOutlineColor = Color.BLACK, defaultOutlineWidth = 0, defaultPixelSize = 1, defaultDisableDepthTestDistance = 0, defaultSplitDirection = SplitDirection$1.NONE, colorScratch$2 = new Color(), positionScratch = new Cartesian3(), outlineColorScratch = new Color(), scaleByDistanceScratch = new NearFarScalar(), translucencyByDistanceScratch = new NearFarScalar(), distanceDisplayConditionScratch$1 = new DistanceDisplayCondition(); +function EntityData(e) { + this.entity = e, this.pointPrimitive = void 0, this.billboard = void 0, this.color = void 0, this.outlineColor = void 0, this.pixelSize = void 0, this.outlineWidth = void 0; +} +function PointVisualizer(e, t) { + t.collectionChanged.addEventListener( + PointVisualizer.prototype._onCollectionChanged, + this + ), this._cluster = e, this._entityCollection = t, this._items = new AssociativeArray(), this._onCollectionChanged(t, t.values, [], []); +} +PointVisualizer.prototype.update = function(e) { + const t = this._items.values, n = this._cluster; + for (let i = 0, r = t.length; i < r; i++) { + const o = t[i], s = o.entity, c = s._point; + let l = o.pointPrimitive, d = o.billboard; + const f = Property.getValueOrDefault( + c._heightReference, + e, + HeightReference$1.NONE + ); + let h = s.isShowing && s.isAvailable(e) && Property.getValueOrDefault(c._show, e, !0), p; + if (h && (p = Property.getValueOrUndefined( + s._position, + e, + positionScratch + ), h = defined(p)), !h) { + returnPrimitive(o, s, n); + continue; + } + Property.isConstant(s._position) || (n._clusterDirty = !0); + let m = !1, _ = !1; + if (f !== HeightReference$1.NONE && !defined(d) ? (defined(l) && (returnPrimitive(o, s, n), l = void 0), d = n.getBillboard(s), d.id = s, d.image = void 0, o.billboard = d, m = !0, _ = Cartesian3.equals(d.position, p) && d.heightReference === f) : f === HeightReference$1.NONE && !defined(l) && (defined(d) && (returnPrimitive(o, s, n), d = void 0), l = n.getPoint(s), l.id = s, o.pointPrimitive = l), defined(l)) + l.show = !0, l.position = p, l.scaleByDistance = Property.getValueOrUndefined( + c._scaleByDistance, + e, + scaleByDistanceScratch + ), l.translucencyByDistance = Property.getValueOrUndefined( + c._translucencyByDistance, + e, + translucencyByDistanceScratch + ), l.color = Property.getValueOrDefault( + c._color, + e, + defaultColor$1, + colorScratch$2 + ), l.outlineColor = Property.getValueOrDefault( + c._outlineColor, + e, + defaultOutlineColor, + outlineColorScratch + ), l.outlineWidth = Property.getValueOrDefault( + c._outlineWidth, + e, + defaultOutlineWidth + ), l.pixelSize = Property.getValueOrDefault( + c._pixelSize, + e, + defaultPixelSize + ), l.distanceDisplayCondition = Property.getValueOrUndefined( + c._distanceDisplayCondition, + e, + distanceDisplayConditionScratch$1 + ), l.disableDepthTestDistance = Property.getValueOrDefault( + c._disableDepthTestDistance, + e, + defaultDisableDepthTestDistance + ), l.splitDirection = Property.getValueOrDefault( + c._splitDirection, + e, + defaultSplitDirection + ); + else if (defined(d)) { + d.show = !0, d.position = p, d.scaleByDistance = Property.getValueOrUndefined( + c._scaleByDistance, + e, + scaleByDistanceScratch + ), d.translucencyByDistance = Property.getValueOrUndefined( + c._translucencyByDistance, + e, + translucencyByDistanceScratch + ), d.distanceDisplayCondition = Property.getValueOrUndefined( + c._distanceDisplayCondition, + e, + distanceDisplayConditionScratch$1 + ), d.disableDepthTestDistance = Property.getValueOrDefault( + c._disableDepthTestDistance, + e, + defaultDisableDepthTestDistance + ), d.splitDirection = Property.getValueOrDefault( + c._splitDirection, + e, + defaultSplitDirection + ), d.heightReference = f; + const y = Property.getValueOrDefault( + c._color, + e, + defaultColor$1, + colorScratch$2 + ), C = Property.getValueOrDefault( + c._outlineColor, + e, + defaultOutlineColor, + outlineColorScratch + ), T = Math.round( + Property.getValueOrDefault( + c._outlineWidth, + e, + defaultOutlineWidth + ) + ); + let x = Math.max( + 1, + Math.round( + Property.getValueOrDefault( + c._pixelSize, + e, + defaultPixelSize + ) + ) + ); + if (T > 0 ? (d.scale = 1, m = m || // + T !== o.outlineWidth || // + x !== o.pixelSize || // + !Color.equals(y, o.color) || // + !Color.equals(C, o.outlineColor)) : (d.scale = x / 50, x = 50, m = m || // + T !== o.outlineWidth || // + !Color.equals(y, o.color) || // + !Color.equals(C, o.outlineColor)), m) { + o.color = Color.clone(y, o.color), o.outlineColor = Color.clone(C, o.outlineColor), o.pixelSize = x, o.outlineWidth = T; + const b = y.alpha, S = y.toCssColorString(), E = C.toCssColorString(), A = JSON.stringify([ + S, + x, + E, + T + ]); + d.setImage( + A, + createBillboardPointCallback( + b, + S, + E, + T, + x + ) + ); + } + _ && d._updateClamping(); + } + } + return !0; +}; +PointVisualizer.prototype.getBoundingSphere = function(e, t) { + const n = this._items.get(e.id); + if (!defined(n) || !(defined(n.pointPrimitive) || defined(n.billboard))) + return BoundingSphereState$1.FAILED; + if (defined(n.pointPrimitive)) + t.center = Cartesian3.clone( + n.pointPrimitive.position, + t.center + ); + else { + const i = n.billboard; + if (!defined(i._clampedPosition)) + return BoundingSphereState$1.PENDING; + t.center = Cartesian3.clone(i._clampedPosition, t.center); + } + return t.radius = 0, BoundingSphereState$1.DONE; +}; +PointVisualizer.prototype.isDestroyed = function() { + return !1; +}; +PointVisualizer.prototype.destroy = function() { + this._entityCollection.collectionChanged.removeEventListener( + PointVisualizer.prototype._onCollectionChanged, + this + ); + const e = this._entityCollection.values; + for (let t = 0; t < e.length; t++) + this._cluster.removePoint(e[t]); + return destroyObject(this); +}; +PointVisualizer.prototype._onCollectionChanged = function(e, t, n, i) { + let r, o; + const s = this._items, c = this._cluster; + for (r = t.length - 1; r > -1; r--) + o = t[r], defined(o._point) && defined(o._position) && s.set(o.id, new EntityData(o)); + for (r = i.length - 1; r > -1; r--) + o = i[r], defined(o._point) && defined(o._position) ? s.contains(o.id) || s.set(o.id, new EntityData(o)) : (returnPrimitive(s.get(o.id), o, c), s.remove(o.id)); + for (r = n.length - 1; r > -1; r--) + o = n[r], returnPrimitive(s.get(o.id), o, c), s.remove(o.id); +}; +function returnPrimitive(e, t, n) { + if (defined(e)) { + const i = e.pointPrimitive; + if (defined(i)) { + e.pointPrimitive = void 0, n.removePoint(t); + return; + } + const r = e.billboard; + defined(r) && (e.billboard = void 0, n.removeBillboard(t)); + } +} +const scratchInterpolateColorsArray = []; +function interpolateColors$1(e, t, n, i, r) { + const o = scratchInterpolateColorsArray; + o.length = r; + let s; + const c = n.red, l = n.green, d = n.blue, f = n.alpha, h = i.red, p = i.green, m = i.blue, _ = i.alpha; + if (Color.equals(n, i)) { + for (s = 0; s < r; s++) + o[s] = Color.clone(n); + return o; + } + const y = (h - c) / r, C = (p - l) / r, T = (m - d) / r, x = (_ - f) / r; + for (s = 0; s < r; s++) + o[s] = new Color( + c + s * y, + l + s * C, + d + s * T, + f + s * x + ); + return o; +} +function PolylineGeometry(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.positions, n = e.colors, i = defaultValue(e.width, 1), r = defaultValue(e.colorsPerVertex, !1); + this._positions = t, this._colors = n, this._width = i, this._colorsPerVertex = r, this._vertexFormat = VertexFormat.clone( + defaultValue(e.vertexFormat, VertexFormat.DEFAULT) + ), this._arcType = defaultValue(e.arcType, ArcType$1.GEODESIC), this._granularity = defaultValue( + e.granularity, + CesiumMath.RADIANS_PER_DEGREE + ), this._ellipsoid = Ellipsoid.clone( + defaultValue(e.ellipsoid, Ellipsoid.default) + ), this._workerName = "createPolylineGeometry"; + let o = 1 + t.length * Cartesian3.packedLength; + o += defined(n) ? 1 + n.length * Color.packedLength : 1, this.packedLength = o + Ellipsoid.packedLength + VertexFormat.packedLength + 4; +} +PolylineGeometry.pack = function(e, t, n) { + n = defaultValue(n, 0); + let i; + const r = e._positions; + let o = r.length; + for (t[n++] = o, i = 0; i < o; ++i, n += Cartesian3.packedLength) + Cartesian3.pack(r[i], t, n); + const s = e._colors; + for (o = defined(s) ? s.length : 0, t[n++] = o, i = 0; i < o; ++i, n += Color.packedLength) + Color.pack(s[i], t, n); + return Ellipsoid.pack(e._ellipsoid, t, n), n += Ellipsoid.packedLength, VertexFormat.pack(e._vertexFormat, t, n), n += VertexFormat.packedLength, t[n++] = e._width, t[n++] = e._colorsPerVertex ? 1 : 0, t[n++] = e._arcType, t[n] = e._granularity, t; +}; +const scratchEllipsoid$1 = Ellipsoid.clone(Ellipsoid.UNIT_SPHERE), scratchVertexFormat$1 = new VertexFormat(), scratchOptions$3 = { + positions: void 0, + colors: void 0, + ellipsoid: scratchEllipsoid$1, + vertexFormat: scratchVertexFormat$1, + width: void 0, + colorsPerVertex: void 0, + arcType: void 0, + granularity: void 0 +}; +PolylineGeometry.unpack = function(e, t, n) { + t = defaultValue(t, 0); + let i, r = e[t++]; + const o = new Array(r); + for (i = 0; i < r; ++i, t += Cartesian3.packedLength) + o[i] = Cartesian3.unpack(e, t); + r = e[t++]; + const s = r > 0 ? new Array(r) : void 0; + for (i = 0; i < r; ++i, t += Color.packedLength) + s[i] = Color.unpack(e, t); + const c = Ellipsoid.unpack(e, t, scratchEllipsoid$1); + t += Ellipsoid.packedLength; + const l = VertexFormat.unpack( + e, + t, + scratchVertexFormat$1 + ); + t += VertexFormat.packedLength; + const d = e[t++], f = e[t++] === 1, h = e[t++], p = e[t]; + return defined(n) ? (n._positions = o, n._colors = s, n._ellipsoid = Ellipsoid.clone(c, n._ellipsoid), n._vertexFormat = VertexFormat.clone(l, n._vertexFormat), n._width = d, n._colorsPerVertex = f, n._arcType = h, n._granularity = p, n) : (scratchOptions$3.positions = o, scratchOptions$3.colors = s, scratchOptions$3.width = d, scratchOptions$3.colorsPerVertex = f, scratchOptions$3.arcType = h, scratchOptions$3.granularity = p, new PolylineGeometry(scratchOptions$3)); +}; +const scratchCartesian3$5 = new Cartesian3(), scratchPosition$4 = new Cartesian3(), scratchPrevPosition = new Cartesian3(), scratchNextPosition = new Cartesian3(); +PolylineGeometry.createGeometry = function(e) { + const t = e._width, n = e._vertexFormat; + let i = e._colors; + const r = e._colorsPerVertex, o = e._arcType, s = e._granularity, c = e._ellipsoid; + let l, d, f; + const h = []; + let p = arrayRemoveDuplicates( + e._positions, + Cartesian3.equalsEpsilon, + !1, + h + ); + if (defined(i) && h.length > 0) { + let O = 0, N = h[0]; + i = i.filter(function(F, B) { + let V = !1; + return r ? V = B === N || B === 0 && N === 1 : V = B + 1 === N, V ? (O++, N = h[O], !1) : !0; + }); + } + let m = p.length; + if (m < 2 || t <= 0) + return; + if (o === ArcType$1.GEODESIC || o === ArcType$1.RHUMB) { + let O, N; + o === ArcType$1.GEODESIC ? (O = CesiumMath.chordLength( + s, + c.maximumRadius + ), N = PolylinePipeline.numberOfPoints) : (O = s, N = PolylinePipeline.numberOfPointsRhumbLine); + const F = PolylinePipeline.extractHeights(p, c); + if (defined(i)) { + let B = 1; + for (l = 0; l < m - 1; ++l) + B += N( + p[l], + p[l + 1], + O + ); + const V = new Array(B); + let U = 0; + for (l = 0; l < m - 1; ++l) { + const k = p[l], $ = p[l + 1], G = i[l], q = N(k, $, O); + if (r && l < B) { + const z = i[l + 1], H = interpolateColors$1( + k, + $, + G, + z, + q + ), Q = H.length; + for (d = 0; d < Q; ++d) + V[U++] = H[d]; + } else + for (d = 0; d < q; ++d) + V[U++] = Color.clone(G); + } + V[U] = Color.clone(i[i.length - 1]), i = V, scratchInterpolateColorsArray.length = 0; + } + o === ArcType$1.GEODESIC ? p = PolylinePipeline.generateCartesianArc({ + positions: p, + minDistance: O, + ellipsoid: c, + height: F + }) : p = PolylinePipeline.generateCartesianRhumbArc({ + positions: p, + granularity: O, + ellipsoid: c, + height: F + }); + } + m = p.length; + const _ = m * 4 - 4, y = new Float64Array(_ * 3), C = new Float64Array(_ * 3), T = new Float64Array(_ * 3), x = new Float32Array(_ * 2), b = n.st ? new Float32Array(_ * 2) : void 0, S = defined(i) ? new Uint8Array(_ * 4) : void 0; + let E = 0, A = 0, D = 0, P = 0, I; + for (d = 0; d < m; ++d) { + d === 0 ? (I = scratchCartesian3$5, Cartesian3.subtract(p[0], p[1], I), Cartesian3.add(p[0], I, I)) : I = p[d - 1], Cartesian3.clone(I, scratchPrevPosition), Cartesian3.clone(p[d], scratchPosition$4), d === m - 1 ? (I = scratchCartesian3$5, Cartesian3.subtract( + p[m - 1], + p[m - 2], + I + ), Cartesian3.add(p[m - 1], I, I)) : I = p[d + 1], Cartesian3.clone(I, scratchNextPosition); + let O, N; + defined(S) && (d !== 0 && !r ? O = i[d - 1] : O = i[d], d !== m - 1 && (N = i[d])); + const F = d === 0 ? 2 : 0, B = d === m - 1 ? 2 : 4; + for (f = F; f < B; ++f) { + Cartesian3.pack(scratchPosition$4, y, E), Cartesian3.pack(scratchPrevPosition, C, E), Cartesian3.pack(scratchNextPosition, T, E), E += 3; + const V = f - 2 < 0 ? -1 : 1; + if (x[A++] = 2 * (f % 2) - 1, x[A++] = V * t, n.st && (b[D++] = d / (m - 1), b[D++] = Math.max(x[A - 2], 0)), defined(S)) { + const U = f < 2 ? O : N; + S[P++] = Color.floatToByte(U.red), S[P++] = Color.floatToByte(U.green), S[P++] = Color.floatToByte(U.blue), S[P++] = Color.floatToByte(U.alpha); + } + } + } + const M = new GeometryAttributes(); + M.position = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.DOUBLE, + componentsPerAttribute: 3, + values: y + }), M.prevPosition = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.DOUBLE, + componentsPerAttribute: 3, + values: C + }), M.nextPosition = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.DOUBLE, + componentsPerAttribute: 3, + values: T + }), M.expandAndWidth = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 2, + values: x + }), n.st && (M.st = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.FLOAT, + componentsPerAttribute: 2, + values: b + })), defined(S) && (M.color = new GeometryAttribute({ + componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE, + componentsPerAttribute: 4, + values: S, + normalize: !0 + })); + const R = IndexDatatype$1.createTypedArray(_, m * 6 - 6); + let L = 0, g = 0; + const w = m - 1; + for (d = 0; d < w; ++d) + R[g++] = L, R[g++] = L + 2, R[g++] = L + 1, R[g++] = L + 1, R[g++] = L + 2, R[g++] = L + 3, L += 4; + return new Geometry({ + attributes: M, + indices: R, + primitiveType: PrimitiveType$1.TRIANGLES, + boundingSphere: BoundingSphere.fromPoints(p), + geometryType: GeometryType$1.POLYLINES + }); +}; +const defaultZIndex = new ConstantProperty(0), polylineCollections = {}, scratchColor$4 = new Color(), defaultMaterial = new ColorMaterialProperty(Color.WHITE), defaultShow = new ConstantProperty(!0), defaultShadows = new ConstantProperty(ShadowMode$1.DISABLED), defaultDistanceDisplayCondition$1 = new ConstantProperty( + new DistanceDisplayCondition() +), defaultClassificationType = new ConstantProperty(ClassificationType$1.BOTH); +function GeometryOptions() { + this.vertexFormat = void 0, this.positions = void 0, this.width = void 0, this.arcType = void 0, this.granularity = void 0; +} +function GroundGeometryOptions() { + this.positions = void 0, this.width = void 0, this.arcType = void 0, this.granularity = void 0; +} +function PolylineGeometryUpdater(e, t) { + this._entity = e, this._scene = t, this._entitySubscription = e.definitionChanged.addEventListener( + PolylineGeometryUpdater.prototype._onEntityPropertyChanged, + this + ), this._fillEnabled = !1, this._dynamic = !1, this._geometryChanged = new Event(), this._showProperty = void 0, this._materialProperty = void 0, this._shadowsProperty = void 0, this._distanceDisplayConditionProperty = void 0, this._classificationTypeProperty = void 0, this._depthFailMaterialProperty = void 0, this._geometryOptions = new GeometryOptions(), this._groundGeometryOptions = new GroundGeometryOptions(), this._id = `polyline-${e.id}`, this._clampToGround = !1, this._supportsPolylinesOnTerrain = Entity.supportsPolylinesOnTerrain(t), this._zIndex = 0, this._onEntityPropertyChanged(e, "polyline", e.polyline, void 0); +} +Object.defineProperties(PolylineGeometryUpdater.prototype, { + /** + * Gets the unique ID associated with this updater + * @memberof PolylineGeometryUpdater.prototype + * @type {string} + * @readonly + */ + id: { + get: function() { + return this._id; + } + }, + /** + * Gets the entity associated with this geometry. + * @memberof PolylineGeometryUpdater.prototype + * + * @type {Entity} + * @readonly + */ + entity: { + get: function() { + return this._entity; + } + }, + /** + * Gets a value indicating if the geometry has a fill component. + * @memberof PolylineGeometryUpdater.prototype + * + * @type {boolean} + * @readonly + */ + fillEnabled: { + get: function() { + return this._fillEnabled; + } + }, + /** + * Gets a value indicating if fill visibility varies with simulation time. + * @memberof PolylineGeometryUpdater.prototype + * + * @type {boolean} + * @readonly + */ + hasConstantFill: { + get: function() { + return !this._fillEnabled || !defined(this._entity.availability) && Property.isConstant(this._showProperty); + } + }, + /** + * Gets the material property used to fill the geometry. + * @memberof PolylineGeometryUpdater.prototype + * + * @type {MaterialProperty} + * @readonly + */ + fillMaterialProperty: { + get: function() { + return this._materialProperty; + } + }, + /** + * Gets the material property used to fill the geometry when it fails the depth test. + * @memberof PolylineGeometryUpdater.prototype + * + * @type {MaterialProperty} + * @readonly + */ + depthFailMaterialProperty: { + get: function() { + return this._depthFailMaterialProperty; + } + }, + /** + * Gets a value indicating if the geometry has an outline component. + * @memberof PolylineGeometryUpdater.prototype + * + * @type {boolean} + * @readonly + */ + outlineEnabled: { + value: !1 + }, + /** + * Gets a value indicating if outline visibility varies with simulation time. + * @memberof PolylineGeometryUpdater.prototype + * + * @type {boolean} + * @readonly + */ + hasConstantOutline: { + value: !0 + }, + /** + * Gets the {@link Color} property for the geometry outline. + * @memberof PolylineGeometryUpdater.prototype + * + * @type {Property} + * @readonly + */ + outlineColorProperty: { + value: void 0 + }, + /** + * Gets the property specifying whether the geometry + * casts or receives shadows from light sources. + * @memberof PolylineGeometryUpdater.prototype + * + * @type {Property} + * @readonly + */ + shadowsProperty: { + get: function() { + return this._shadowsProperty; + } + }, + /** + * Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this geometry will be displayed. + * @memberof PolylineGeometryUpdater.prototype + * + * @type {Property} + * @readonly + */ + distanceDisplayConditionProperty: { + get: function() { + return this._distanceDisplayConditionProperty; + } + }, + /** + * Gets or sets the {@link ClassificationType} Property specifying if this geometry will classify terrain, 3D Tiles, or both when on the ground. + * @memberof PolylineGeometryUpdater.prototype + * + * @type {Property} + * @readonly + */ + classificationTypeProperty: { + get: function() { + return this._classificationTypeProperty; + } + }, + /** + * Gets a value indicating if the geometry is time-varying. + * + * @memberof PolylineGeometryUpdater.prototype + * + * @type {boolean} + * @readonly + */ + isDynamic: { + get: function() { + return this._dynamic; + } + }, + /** + * Gets a value indicating if the geometry is closed. + * This property is only valid for static geometry. + * @memberof PolylineGeometryUpdater.prototype + * + * @type {boolean} + * @readonly + */ + isClosed: { + value: !1 + }, + /** + * Gets an event that is raised whenever the public properties + * of this updater change. + * @memberof PolylineGeometryUpdater.prototype + * + * @type {boolean} + * @readonly + */ + geometryChanged: { + get: function() { + return this._geometryChanged; + } + }, + /** + * Gets a value indicating if the path of the line. + * @memberof PolylineGeometryUpdater.prototype + * + * @type {ArcType} + * @readonly + */ + arcType: { + get: function() { + return this._arcType; + } + }, + /** + * Gets a value indicating if the geometry is clamped to the ground. + * Returns false if polylines on terrain is not supported. + * @memberof PolylineGeometryUpdater.prototype + * + * @type {boolean} + * @readonly + */ + clampToGround: { + get: function() { + return this._clampToGround && this._supportsPolylinesOnTerrain; + } + }, + /** + * Gets the zindex + * @type {number} + * @memberof PolylineGeometryUpdater.prototype + * @readonly + */ + zIndex: { + get: function() { + return this._zIndex; + } + } +}); +PolylineGeometryUpdater.prototype.isOutlineVisible = function(e) { + return !1; +}; +PolylineGeometryUpdater.prototype.isFilled = function(e) { + const t = this._entity, n = this._fillEnabled && t.isAvailable(e) && this._showProperty.getValue(e); + return defaultValue(n, !1); +}; +PolylineGeometryUpdater.prototype.createFillGeometryInstance = function(e) { + const t = this._entity, n = t.isAvailable(e), i = new ShowGeometryInstanceAttribute( + n && t.isShowing && this._showProperty.getValue(e) + ), r = this._distanceDisplayConditionProperty.getValue( + e + ), o = DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition( + r + ), s = { + show: i, + distanceDisplayCondition: o + }; + let c; + return this._materialProperty instanceof ColorMaterialProperty && (defined(this._materialProperty.color) && (this._materialProperty.color.isConstant || n) && (c = this._materialProperty.color.getValue(e, scratchColor$4)), defined(c) || (c = Color.WHITE), s.color = ColorGeometryInstanceAttribute.fromColor(c)), this.clampToGround ? new GeometryInstance({ + id: t, + geometry: new GroundPolylineGeometry(this._groundGeometryOptions), + attributes: s + }) : (defined(this._depthFailMaterialProperty) && this._depthFailMaterialProperty instanceof ColorMaterialProperty && (defined(this._depthFailMaterialProperty.color) && (this._depthFailMaterialProperty.color.isConstant || n) && (c = this._depthFailMaterialProperty.color.getValue( + e, + scratchColor$4 + )), defined(c) || (c = Color.WHITE), s.depthFailColor = ColorGeometryInstanceAttribute.fromColor( + c + )), new GeometryInstance({ + id: t, + geometry: new PolylineGeometry(this._geometryOptions), + attributes: s + })); +}; +PolylineGeometryUpdater.prototype.createOutlineGeometryInstance = function(e) { +}; +PolylineGeometryUpdater.prototype.isDestroyed = function() { + return !1; +}; +PolylineGeometryUpdater.prototype.destroy = function() { + this._entitySubscription(), destroyObject(this); +}; +PolylineGeometryUpdater.prototype._onEntityPropertyChanged = function(e, t, n, i) { + if (!(t === "availability" || t === "polyline")) + return; + const r = this._entity.polyline; + if (!defined(r)) { + this._fillEnabled && (this._fillEnabled = !1, this._geometryChanged.raiseEvent(this)); + return; + } + const o = r.positions, s = r.show; + if (defined(s) && s.isConstant && !s.getValue(Iso8601.MINIMUM_VALUE) || // + !defined(o)) { + this._fillEnabled && (this._fillEnabled = !1, this._geometryChanged.raiseEvent(this)); + return; + } + const c = r.zIndex, l = defaultValue(r.material, defaultMaterial), d = l instanceof ColorMaterialProperty; + this._materialProperty = l, this._depthFailMaterialProperty = r.depthFailMaterial, this._showProperty = defaultValue(s, defaultShow), this._shadowsProperty = defaultValue(r.shadows, defaultShadows), this._distanceDisplayConditionProperty = defaultValue( + r.distanceDisplayCondition, + defaultDistanceDisplayCondition$1 + ), this._classificationTypeProperty = defaultValue( + r.classificationType, + defaultClassificationType + ), this._fillEnabled = !0, this._zIndex = defaultValue(c, defaultZIndex); + const f = r.width, h = r.arcType, p = r.clampToGround, m = r.granularity; + if (!o.isConstant || !Property.isConstant(f) || !Property.isConstant(h) || !Property.isConstant(m) || !Property.isConstant(p) || !Property.isConstant(c)) + this._dynamic || (this._dynamic = !0, this._geometryChanged.raiseEvent(this)); + else { + const _ = this._geometryOptions, y = o.getValue( + Iso8601.MINIMUM_VALUE, + _.positions + ); + if (!defined(y) || y.length < 2) { + this._fillEnabled && (this._fillEnabled = !1, this._geometryChanged.raiseEvent(this)); + return; + } + let C; + d && (!defined(this._depthFailMaterialProperty) || this._depthFailMaterialProperty instanceof ColorMaterialProperty) ? C = PolylineColorAppearance.VERTEX_FORMAT : C = PolylineMaterialAppearance.VERTEX_FORMAT, _.vertexFormat = C, _.positions = y, _.width = defined(f) ? f.getValue(Iso8601.MINIMUM_VALUE) : void 0, _.arcType = defined(h) ? h.getValue(Iso8601.MINIMUM_VALUE) : void 0, _.granularity = defined(m) ? m.getValue(Iso8601.MINIMUM_VALUE) : void 0; + const T = this._groundGeometryOptions; + T.positions = y, T.width = _.width, T.arcType = _.arcType, T.granularity = _.granularity, this._clampToGround = defined(p) ? p.getValue(Iso8601.MINIMUM_VALUE) : !1, !this._clampToGround && defined(c) && oneTimeWarning( + "Entity polylines must have clampToGround: true when using zIndex. zIndex will be ignored." + ), this._dynamic = !1, this._geometryChanged.raiseEvent(this); + } +}; +PolylineGeometryUpdater.prototype.createDynamicUpdater = function(e, t) { + return new DynamicGeometryUpdater(e, t, this); +}; +const generateCartesianArcOptions = { + positions: void 0, + granularity: void 0, + height: void 0, + ellipsoid: void 0 +}; +function DynamicGeometryUpdater(e, t, n) { + this._line = void 0, this._primitives = e, this._groundPrimitives = t, this._groundPolylinePrimitive = void 0, this._material = void 0, this._geometryUpdater = n, this._positions = []; +} +function getLine(e) { + if (defined(e._line)) + return e._line; + const t = e._primitives, n = e._geometryUpdater._scene.id + t._guid; + let i = polylineCollections[n]; + !defined(i) || i.isDestroyed() ? (i = new PolylineCollection(), polylineCollections[n] = i, t.add(i)) : t.contains(i) || t.add(i); + const r = i.add(); + return r.id = e._geometryUpdater._entity, e._line = r, r; +} +DynamicGeometryUpdater.prototype.update = function(e) { + const t = this._geometryUpdater, n = t._entity, i = n.polyline, r = i.positions; + let o = Property.getValueOrUndefined( + r, + e, + this._positions + ); + t._clampToGround = Property.getValueOrDefault( + i._clampToGround, + e, + !1 + ), t._groundGeometryOptions.positions = o, t._groundGeometryOptions.width = Property.getValueOrDefault( + i._width, + e, + 1 + ), t._groundGeometryOptions.arcType = Property.getValueOrDefault( + i._arcType, + e, + ArcType$1.GEODESIC + ), t._groundGeometryOptions.granularity = Property.getValueOrDefault( + i._granularity, + e, + 9999 + ); + const s = this._groundPrimitives; + if (defined(this._groundPolylinePrimitive) && (s.remove(this._groundPolylinePrimitive), this._groundPolylinePrimitive = void 0), t.clampToGround) { + if (!n.isShowing || !n.isAvailable(e) || !Property.getValueOrDefault(i._show, e, !0) || !defined(o) || o.length < 2) + return; + const h = t.fillMaterialProperty; + let p; + if (h instanceof ColorMaterialProperty) + p = new PolylineColorAppearance(); + else { + const m = MaterialProperty.getValue( + e, + h, + this._material + ); + p = new PolylineMaterialAppearance({ + material: m, + translucent: m.isTranslucent() + }), this._material = m; + } + this._groundPolylinePrimitive = s.add( + new GroundPolylinePrimitive({ + geometryInstances: t.createFillGeometryInstance(e), + appearance: p, + classificationType: t.classificationTypeProperty.getValue( + e + ), + asynchronous: !1 + }), + Property.getValueOrUndefined(t.zIndex, e) + ), defined(this._line) && (this._line.show = !1); + return; + } + const c = getLine(this); + if (!n.isShowing || !n.isAvailable(e) || !Property.getValueOrDefault(i._show, e, !0)) { + c.show = !1; + return; + } + if (!defined(o) || o.length < 2) { + c.show = !1; + return; + } + let l = ArcType$1.GEODESIC; + l = Property.getValueOrDefault(i._arcType, e, l); + const d = t._scene.globe, f = t._scene.ellipsoid; + l !== ArcType$1.NONE && defined(d) && (generateCartesianArcOptions.ellipsoid = f, generateCartesianArcOptions.positions = o, generateCartesianArcOptions.granularity = Property.getValueOrUndefined( + i._granularity, + e + ), generateCartesianArcOptions.height = PolylinePipeline.extractHeights( + o, + f + ), l === ArcType$1.GEODESIC ? o = PolylinePipeline.generateCartesianArc( + generateCartesianArcOptions + ) : o = PolylinePipeline.generateCartesianRhumbArc( + generateCartesianArcOptions + )), c.show = !0, c.positions = o.slice(), c.material = MaterialProperty.getValue( + e, + t.fillMaterialProperty, + c.material + ), c.width = Property.getValueOrDefault(i._width, e, 1), c.distanceDisplayCondition = Property.getValueOrUndefined( + i._distanceDisplayCondition, + e, + c.distanceDisplayCondition + ); +}; +DynamicGeometryUpdater.prototype.getBoundingSphere = function(e) { + if (this._geometryUpdater.clampToGround) { + const t = this._groundPolylinePrimitive; + if (defined(t) && t.show && t.ready) { + const n = t.getGeometryInstanceAttributes( + this._geometryUpdater._entity + ); + if (defined(n) && defined(n.boundingSphere)) + return BoundingSphere.clone(n.boundingSphere, e), BoundingSphereState$1.DONE; + } + return defined(t) && !t.ready ? BoundingSphereState$1.PENDING : BoundingSphereState$1.DONE; + } else { + const t = getLine(this); + if (t.show && t.positions.length > 0) + return BoundingSphere.fromPoints(t.positions, e), BoundingSphereState$1.DONE; + } + return BoundingSphereState$1.FAILED; +}; +DynamicGeometryUpdater.prototype.isDestroyed = function() { + return !1; +}; +DynamicGeometryUpdater.prototype.destroy = function() { + const t = this._geometryUpdater._scene.id + this._primitives._guid, n = polylineCollections[t]; + defined(n) && (n.remove(this._line), n.length === 0 && (this._primitives.removeAndDestroy(n), delete polylineCollections[t])), defined(this._groundPolylinePrimitive) && this._groundPrimitives.remove(this._groundPolylinePrimitive), destroyObject(this); +}; +const scratchColor$3 = new Color(), distanceDisplayConditionScratch = new DistanceDisplayCondition(), defaultDistanceDisplayCondition = new DistanceDisplayCondition(); +function Batch(e, t, n, i, r) { + let o; + n instanceof ColorMaterialProperty ? o = PolylineColorAppearance : o = PolylineMaterialAppearance, this.orderedGroundPrimitives = e, this.classificationType = t, this.appearanceType = o, this.materialProperty = n, this.updaters = new AssociativeArray(), this.createPrimitive = !0, this.primitive = void 0, this.oldPrimitive = void 0, this.geometry = new AssociativeArray(), this.material = void 0, this.updatersWithAttributes = new AssociativeArray(), this.attributes = new AssociativeArray(), this.invalidated = !1, this.removeMaterialSubscription = n.definitionChanged.addEventListener( + Batch.prototype.onMaterialChanged, + this + ), this.subscriptions = new AssociativeArray(), this.showsUpdated = new AssociativeArray(), this.zIndex = i, this._asynchronous = r; +} +Batch.prototype.onMaterialChanged = function() { + this.invalidated = !0; +}; +Batch.prototype.isMaterial = function(e) { + const t = this.materialProperty, n = e.fillMaterialProperty; + return n === t || n instanceof ColorMaterialProperty && t instanceof ColorMaterialProperty ? !0 : defined(t) && t.equals(n); +}; +Batch.prototype.add = function(e, t, n) { + const i = t.id; + if (this.updaters.set(i, t), this.geometry.set(i, n), !t.hasConstantFill || !t.fillMaterialProperty.isConstant || !Property.isConstant(t.distanceDisplayConditionProperty)) + this.updatersWithAttributes.set(i, t); + else { + const r = this; + this.subscriptions.set( + i, + t.entity.definitionChanged.addEventListener(function(o, s, c, l) { + s === "isShowing" && r.showsUpdated.set(t.id, t); + }) + ); + } + this.createPrimitive = !0; +}; +Batch.prototype.remove = function(e) { + const t = e.id; + if (this.createPrimitive = this.geometry.remove(t) || this.createPrimitive, this.updaters.remove(t)) { + this.updatersWithAttributes.remove(t); + const n = this.subscriptions.get(t); + return defined(n) && (n(), this.subscriptions.remove(t)), !0; + } + return !1; +}; +Batch.prototype.update = function(e) { + let t = !0, n = this.primitive; + const i = this.orderedGroundPrimitives, r = this.geometry.values; + let o; + if (this.createPrimitive) { + if (r.length > 0) + defined(n) && (defined(this.oldPrimitive) ? i.remove(n) : this.oldPrimitive = n), n = new GroundPolylinePrimitive({ + show: !1, + asynchronous: this._asynchronous, + geometryInstances: r.slice(), + appearance: new this.appearanceType(), + classificationType: this.classificationType + }), this.appearanceType === PolylineMaterialAppearance && (this.material = MaterialProperty.getValue( + e, + this.materialProperty, + this.material + ), n.appearance.material = this.material), i.add(n, this.zIndex), t = !1; + else { + defined(n) && (i.remove(n), n = void 0); + const c = this.oldPrimitive; + defined(c) && (i.remove(c), this.oldPrimitive = void 0); + } + this.attributes.removeAll(), this.primitive = n, this.createPrimitive = !1; + } else if (defined(n) && n.ready) { + n.show = !0, defined(this.oldPrimitive) && (i.remove(this.oldPrimitive), this.oldPrimitive = void 0), this.appearanceType === PolylineMaterialAppearance && (this.material = MaterialProperty.getValue( + e, + this.materialProperty, + this.material + ), this.primitive.appearance.material = this.material); + const s = this.updatersWithAttributes.values, c = s.length; + for (o = 0; o < c; o++) { + const l = s[o], d = l.entity, f = this.geometry.get(l.id); + let h = this.attributes.get(f.id.id); + if (defined(h) || (h = n.getGeometryInstanceAttributes(f.id), this.attributes.set(f.id.id, h)), !l.fillMaterialProperty.isConstant) { + const y = l.fillMaterialProperty.color, C = Property.getValueOrDefault( + y, + e, + Color.WHITE, + scratchColor$3 + ); + Color.equals(h._lastColor, C) || (h._lastColor = Color.clone( + C, + h._lastColor + ), h.color = ColorGeometryInstanceAttribute.toValue( + C, + h.color + )); + } + const p = d.isShowing && (l.hasConstantFill || l.isFilled(e)), m = h.show[0] === 1; + p !== m && (h.show = ShowGeometryInstanceAttribute.toValue( + p, + h.show + )); + const _ = l.distanceDisplayConditionProperty; + if (!Property.isConstant(_)) { + const y = Property.getValueOrDefault( + _, + e, + defaultDistanceDisplayCondition, + distanceDisplayConditionScratch + ); + DistanceDisplayCondition.equals( + y, + h._lastDistanceDisplayCondition + ) || (h._lastDistanceDisplayCondition = DistanceDisplayCondition.clone( + y, + h._lastDistanceDisplayCondition + ), h.distanceDisplayCondition = DistanceDisplayConditionGeometryInstanceAttribute.toValue( + y, + h.distanceDisplayCondition + )); + } + } + this.updateShows(n); + } else defined(n) && !n.ready && (t = !1); + return t; +}; +Batch.prototype.updateShows = function(e) { + const t = this.showsUpdated.values, n = t.length; + for (let i = 0; i < n; i++) { + const r = t[i], o = r.entity, s = this.geometry.get(r.id); + let c = this.attributes.get(s.id.id); + defined(c) || (c = e.getGeometryInstanceAttributes(s.id), this.attributes.set(s.id.id, c)); + const l = o.isShowing, d = c.show[0] === 1; + l !== d && (c.show = ShowGeometryInstanceAttribute.toValue( + l, + c.show + ), s.attributes.show.value[0] = c.show[0]); + } + this.showsUpdated.removeAll(); +}; +Batch.prototype.contains = function(e) { + return this.updaters.contains(e.id); +}; +Batch.prototype.getBoundingSphere = function(e, t) { + const n = this.primitive; + if (!n.ready) + return BoundingSphereState$1.PENDING; + const i = n.getGeometryInstanceAttributes(e.entity); + return !defined(i) || !defined(i.boundingSphere) || defined(i.show) && i.show[0] === 0 ? BoundingSphereState$1.FAILED : (i.boundingSphere.clone(t), BoundingSphereState$1.DONE); +}; +Batch.prototype.destroy = function() { + const e = this.primitive, t = this.orderedGroundPrimitives; + defined(e) && t.remove(e); + const n = this.oldPrimitive; + defined(n) && t.remove(n), this.removeMaterialSubscription(); +}; +function StaticGroundPolylinePerMaterialBatch(e, t, n) { + this._items = [], this._orderedGroundPrimitives = e, this._classificationType = t, this._asynchronous = defaultValue(n, !0); +} +StaticGroundPolylinePerMaterialBatch.prototype.add = function(e, t) { + const n = this._items, i = n.length, r = t.createFillGeometryInstance(e), o = Property.getValueOrDefault(t.zIndex, 0); + for (let c = 0; c < i; ++c) { + const l = n[c]; + if (l.isMaterial(t) && l.zIndex === o) { + l.add(e, t, r); + return; + } + } + const s = new Batch( + this._orderedGroundPrimitives, + this._classificationType, + t.fillMaterialProperty, + o, + this._asynchronous + ); + s.add(e, t, r), n.push(s); +}; +StaticGroundPolylinePerMaterialBatch.prototype.remove = function(e) { + const t = this._items, n = t.length; + for (let i = n - 1; i >= 0; i--) { + const r = t[i]; + if (r.remove(e)) { + r.updaters.length === 0 && (t.splice(i, 1), r.destroy()); + break; + } + } +}; +StaticGroundPolylinePerMaterialBatch.prototype.update = function(e) { + let t; + const n = this._items, i = n.length; + for (t = i - 1; t >= 0; t--) { + const o = n[t]; + if (o.invalidated) { + n.splice(t, 1); + const s = o.updaters.values, c = s.length; + for (let l = 0; l < c; l++) + this.add(e, s[l]); + o.destroy(); + } + } + let r = !0; + for (t = 0; t < n.length; t++) + r = n[t].update(e) && r; + return r; +}; +StaticGroundPolylinePerMaterialBatch.prototype.getBoundingSphere = function(e, t) { + const n = this._items, i = n.length; + for (let r = 0; r < i; r++) { + const o = n[r]; + if (o.contains(e)) + return o.getBoundingSphere(e, t); + } + return BoundingSphereState$1.FAILED; +}; +StaticGroundPolylinePerMaterialBatch.prototype.removeAllPrimitives = function() { + const e = this._items, t = e.length; + for (let n = 0; n < t; n++) + e[n].destroy(); + this._items.length = 0; +}; +const emptyArray = []; +function removeUpdater(e, t) { + const n = e._batches, i = n.length; + for (let r = 0; r < i; r++) + n[r].remove(t); +} +function insertUpdaterIntoBatch(e, t, n) { + if (n.isDynamic) { + e._dynamicBatch.add(t, n); + return; + } + if (n.clampToGround && n.fillEnabled) { + const s = n.classificationTypeProperty.getValue( + t + ); + e._groundBatches[s].add(t, n); + return; + } + let i; + n.fillEnabled && (i = n.shadowsProperty.getValue(t)); + let r = 0; + defined(n.depthFailMaterialProperty) && (r = n.depthFailMaterialProperty instanceof ColorMaterialProperty ? 1 : 2); + let o; + defined(i) && (o = i + r * ShadowMode$1.NUMBER_OF_SHADOW_MODES), n.fillEnabled && (n.fillMaterialProperty instanceof ColorMaterialProperty ? e._colorBatches[o].add(t, n) : e._materialBatches[o].add(t, n)); +} +function PolylineVisualizer(e, t, n, i) { + i = defaultValue(i, e.groundPrimitives), n = defaultValue(n, e.primitives), this._scene = e, this._primitives = n, this._entityCollection = void 0, this._addedObjects = new AssociativeArray(), this._removedObjects = new AssociativeArray(), this._changedObjects = new AssociativeArray(); + let r; + const o = ShadowMode$1.NUMBER_OF_SHADOW_MODES; + for (this._colorBatches = new Array(o * 3), this._materialBatches = new Array(o * 3), r = 0; r < o; ++r) + this._colorBatches[r] = new StaticGeometryColorBatch( + n, + PolylineColorAppearance, + void 0, + !1, + r + ), this._materialBatches[r] = new StaticGeometryPerMaterialBatch( + n, + PolylineMaterialAppearance, + void 0, + !1, + r + ), this._colorBatches[r + o] = new StaticGeometryColorBatch( + n, + PolylineColorAppearance, + PolylineColorAppearance, + !1, + r + ), this._materialBatches[r + o] = new StaticGeometryPerMaterialBatch( + n, + PolylineMaterialAppearance, + PolylineColorAppearance, + !1, + r + ), this._colorBatches[r + o * 2] = new StaticGeometryColorBatch( + n, + PolylineColorAppearance, + PolylineMaterialAppearance, + !1, + r + ), this._materialBatches[r + o * 2] = new StaticGeometryPerMaterialBatch( + n, + PolylineMaterialAppearance, + PolylineMaterialAppearance, + !1, + r + ); + this._dynamicBatch = new DynamicGeometryBatch(n, i); + const s = ClassificationType$1.NUMBER_OF_CLASSIFICATION_TYPES; + for (this._groundBatches = new Array(s), r = 0; r < s; ++r) + this._groundBatches[r] = new StaticGroundPolylinePerMaterialBatch( + i, + r + ); + this._batches = this._colorBatches.concat( + this._materialBatches, + this._dynamicBatch, + this._groundBatches + ), this._subscriptions = new AssociativeArray(), this._updaters = new AssociativeArray(), this._entityCollection = t, t.collectionChanged.addEventListener( + PolylineVisualizer.prototype._onCollectionChanged, + this + ), this._onCollectionChanged( + t, + t.values, + emptyArray + ); +} +PolylineVisualizer.prototype.update = function(e) { + const t = this._addedObjects, n = t.values, i = this._removedObjects, r = i.values, o = this._changedObjects, s = o.values; + let c, l, d, f; + for (c = s.length - 1; c > -1; c--) + l = s[c], d = l.id, f = this._updaters.get(d), f.entity === l ? (removeUpdater(this, f), insertUpdaterIntoBatch(this, e, f)) : (r.push(l), n.push(l)); + for (c = r.length - 1; c > -1; c--) + l = r[c], d = l.id, f = this._updaters.get(d), removeUpdater(this, f), f.destroy(), this._updaters.remove(d), this._subscriptions.get(d)(), this._subscriptions.remove(d); + for (c = n.length - 1; c > -1; c--) + l = n[c], d = l.id, f = new PolylineGeometryUpdater(l, this._scene), this._updaters.set(d, f), insertUpdaterIntoBatch(this, e, f), this._subscriptions.set( + d, + f.geometryChanged.addEventListener( + PolylineVisualizer._onGeometryChanged, + this + ) + ); + t.removeAll(), i.removeAll(), o.removeAll(); + let h = !0; + const p = this._batches, m = p.length; + for (c = 0; c < m; c++) + h = p[c].update(e) && h; + return h; +}; +const getBoundingSphereArrayScratch$1 = [], getBoundingSphereBoundingSphereScratch$1 = new BoundingSphere(); +PolylineVisualizer.prototype.getBoundingSphere = function(e, t) { + const n = getBoundingSphereArrayScratch$1, i = getBoundingSphereBoundingSphereScratch$1; + let r = 0, o = BoundingSphereState$1.DONE; + const s = this._batches, c = s.length, l = this._updaters.get(e.id); + for (let d = 0; d < c; d++) { + if (o = s[d].getBoundingSphere(l, i), o === BoundingSphereState$1.PENDING) + return BoundingSphereState$1.PENDING; + o === BoundingSphereState$1.DONE && (n[r] = BoundingSphere.clone( + i, + n[r] + ), r++); + } + return r === 0 ? BoundingSphereState$1.FAILED : (n.length = r, BoundingSphere.fromBoundingSpheres(n, t), BoundingSphereState$1.DONE); +}; +PolylineVisualizer.prototype.isDestroyed = function() { + return !1; +}; +PolylineVisualizer.prototype.destroy = function() { + this._entityCollection.collectionChanged.removeEventListener( + PolylineVisualizer.prototype._onCollectionChanged, + this + ), this._addedObjects.removeAll(), this._removedObjects.removeAll(); + let e; + const t = this._batches; + let n = t.length; + for (e = 0; e < n; e++) + t[e].removeAllPrimitives(); + const i = this._subscriptions.values; + for (n = i.length, e = 0; e < n; e++) + i[e](); + return this._subscriptions.removeAll(), destroyObject(this); +}; +PolylineVisualizer._onGeometryChanged = function(e) { + const t = this._removedObjects, n = this._changedObjects, i = e.entity, r = i.id; + !defined(t.get(r)) && !defined(n.get(r)) && n.set(r, i); +}; +PolylineVisualizer.prototype._onCollectionChanged = function(e, t, n) { + const i = this._addedObjects, r = this._removedObjects, o = this._changedObjects; + let s, c, l; + for (s = n.length - 1; s > -1; s--) + l = n[s], c = l.id, i.remove(c) || (r.set(c, l), o.remove(c)); + for (s = t.length - 1; s > -1; s--) + l = t[s], c = l.id, r.remove(c) ? o.set(c, l) : i.set(c, l); +}; +function DataSourceDisplay(e) { + GroundPrimitive.initializeTerrainHeights(), GroundPolylinePrimitive.initializeTerrainHeights(); + const t = e.scene, n = e.dataSourceCollection; + this._eventHelper = new EventHelper(), this._eventHelper.add( + n.dataSourceAdded, + this._onDataSourceAdded, + this + ), this._eventHelper.add( + n.dataSourceRemoved, + this._onDataSourceRemoved, + this + ), this._eventHelper.add( + n.dataSourceMoved, + this._onDataSourceMoved, + this + ), this._eventHelper.add(t.postRender, this._postRender, this), this._dataSourceCollection = n, this._scene = t, this._visualizersCallback = defaultValue( + e.visualizersCallback, + DataSourceDisplay.defaultVisualizersCallback + ); + let i = !1; + const r = new PrimitiveCollection(), o = new PrimitiveCollection(); + n.length > 0 && (t.primitives.add(r), t.groundPrimitives.add(o), i = !0), this._primitives = r, this._groundPrimitives = o; + for (let d = 0, f = n.length; d < f; d++) + this._onDataSourceAdded(n, n.get(d)); + const s = new CustomDataSource(); + this._onDataSourceAdded(void 0, s), this._defaultDataSource = s; + let c, l; + if (!i) { + const d = this, f = function() { + t.primitives.add(r), t.groundPrimitives.add(o), c(), l(), d._removeDefaultDataSourceListener = void 0, d._removeDataSourceCollectionListener = void 0; + }; + c = s.entities.collectionChanged.addEventListener( + f + ), l = n.dataSourceAdded.addEventListener( + f + ); + } + this._removeDefaultDataSourceListener = c, this._removeDataSourceCollectionListener = l, this._ready = !1; +} +const ExtraVisualizers = []; +DataSourceDisplay.registerVisualizer = function(e) { + ExtraVisualizers.includes(e) || ExtraVisualizers.push(e); +}; +DataSourceDisplay.unregisterVisualizer = function(e) { + if (ExtraVisualizers.includes(e)) { + const t = ExtraVisualizers.indexOf(e); + ExtraVisualizers.splice(t, 1); + } +}; +DataSourceDisplay.defaultVisualizersCallback = function(e, t, n) { + const i = n.entities; + return [ + new BillboardVisualizer(t, i), + new GeometryVisualizer( + e, + i, + n._primitives, + n._groundPrimitives + ), + new LabelVisualizer(t, i), + new ModelVisualizer(e, i), + new Cesium3DTilesetVisualizer(e, i), + new PointVisualizer(t, i), + new PathVisualizer(e, i), + new PolylineVisualizer( + e, + i, + n._primitives, + n._groundPrimitives + ), + ...ExtraVisualizers.map( + (r) => new r(e, i) + ) + ]; +}; +Object.defineProperties(DataSourceDisplay.prototype, { + /** + * Gets the scene associated with this display. + * @memberof DataSourceDisplay.prototype + * @type {Scene} + */ + scene: { + get: function() { + return this._scene; + } + }, + /** + * Gets the collection of data sources to display. + * @memberof DataSourceDisplay.prototype + * @type {DataSourceCollection} + */ + dataSources: { + get: function() { + return this._dataSourceCollection; + } + }, + /** + * Gets the default data source instance which can be used to + * manually create and visualize entities not tied to + * a specific data source. This instance is always available + * and does not appear in the list dataSources collection. + * @memberof DataSourceDisplay.prototype + * @type {CustomDataSource} + */ + defaultDataSource: { + get: function() { + return this._defaultDataSource; + } + }, + /** + * Gets a value indicating whether or not all entities in the data source are ready + * @memberof DataSourceDisplay.prototype + * @type {boolean} + * @readonly + */ + ready: { + get: function() { + return this._ready; + } + } +}); +DataSourceDisplay.prototype.isDestroyed = function() { + return !1; +}; +DataSourceDisplay.prototype.destroy = function() { + this._eventHelper.removeAll(); + const e = this._dataSourceCollection; + for (let t = 0, n = e.length; t < n; ++t) + this._onDataSourceRemoved( + this._dataSourceCollection, + e.get(t) + ); + return this._onDataSourceRemoved(void 0, this._defaultDataSource), defined(this._removeDefaultDataSourceListener) ? (this._removeDefaultDataSourceListener(), this._removeDataSourceCollectionListener()) : (this._scene.primitives.remove(this._primitives), this._scene.groundPrimitives.remove(this._groundPrimitives)), destroyObject(this); +}; +DataSourceDisplay.prototype.update = function(e) { + if (!ApproximateTerrainHeights.initialized) + return this._ready = !1, !1; + let t = !0, n, i, r, o; + const s = this._dataSourceCollection, c = s.length; + for (n = 0; n < c; n++) { + const l = s.get(n); + for (defined(l.update) && (t = l.update(e) && t), r = l._visualizers, o = r.length, i = 0; i < o; i++) + t = r[i].update(e) && t; + } + for (r = this._defaultDataSource._visualizers, o = r.length, i = 0; i < o; i++) + t = r[i].update(e) && t; + return !this._ready && t && this._scene.requestRender(), this._ready = t, t; +}; +DataSourceDisplay.prototype._postRender = function() { + const e = this._scene.frameState, t = this._dataSourceCollection, n = t.length; + for (let i = 0; i < n; i++) { + const r = t.get(i), o = r.credit; + defined(o) && e.creditDisplay.addCreditToNextFrame(o); + const s = r._resourceCredits; + if (defined(s)) { + const c = s.length; + for (let l = 0; l < c; l++) + e.creditDisplay.addCreditToNextFrame(s[l]); + } + } +}; +const getBoundingSphereArrayScratch = [], getBoundingSphereBoundingSphereScratch = new BoundingSphere(); +DataSourceDisplay.prototype.getBoundingSphere = function(e, t, n) { + if (!this._ready) + return BoundingSphereState$1.PENDING; + let i, r, o = this._defaultDataSource; + if (!o.entities.contains(e)) { + o = void 0; + const p = this._dataSourceCollection; + for (r = p.length, i = 0; i < r; i++) { + const m = p.get(i); + if (m.entities.contains(e)) { + o = m; + break; + } + } + } + if (!defined(o)) + return BoundingSphereState$1.FAILED; + const s = getBoundingSphereArrayScratch, c = getBoundingSphereBoundingSphereScratch; + let l = 0, d = BoundingSphereState$1.DONE; + const f = o._visualizers, h = f.length; + for (i = 0; i < h; i++) { + const p = f[i]; + if (defined(p.getBoundingSphere)) { + if (d = f[i].getBoundingSphere(e, c), !t && d === BoundingSphereState$1.PENDING) + return BoundingSphereState$1.PENDING; + d === BoundingSphereState$1.DONE && (s[l] = BoundingSphere.clone( + c, + s[l] + ), l++); + } + } + return l === 0 ? BoundingSphereState$1.FAILED : (s.length = l, BoundingSphere.fromBoundingSpheres(s, n), BoundingSphereState$1.DONE); +}; +DataSourceDisplay.prototype._onDataSourceAdded = function(e, t) { + const n = this._scene, i = this._primitives, r = this._groundPrimitives, o = i.add(new PrimitiveCollection()), s = r.add( + new OrderedGroundPrimitiveCollection() + ); + t._primitives = o, t._groundPrimitives = s; + const c = t.clustering; + c._initialize(n), o.add(c), t._visualizers = this._visualizersCallback( + n, + c, + t + ); +}; +DataSourceDisplay.prototype._onDataSourceRemoved = function(e, t) { + const n = this._primitives, i = this._groundPrimitives, r = t._primitives, o = t._groundPrimitives, s = t.clustering; + r.remove(s); + const c = t._visualizers, l = c.length; + for (let d = 0; d < l; d++) + c[d].destroy(); + n.remove(r), i.remove(o), t._visualizers = void 0; +}; +DataSourceDisplay.prototype._onDataSourceMoved = function(e, t, n) { + const i = this._primitives, r = this._groundPrimitives, o = e._primitives, s = e._groundPrimitives; + t === n + 1 ? (i.raise(o), r.raise(s)) : t === n - 1 ? (i.lower(o), r.lower(s)) : t === 0 ? (i.lowerToBottom(o), r.lowerToBottom(s), i.raise(o), r.raise(s)) : (i.raiseToTop(o), r.raiseToTop(s)); +}; +function HeadingPitchRange(e, t, n) { + this.heading = defaultValue(e, 0), this.pitch = defaultValue(t, 0), this.range = defaultValue(n, 0); +} +HeadingPitchRange.clone = function(e, t) { + if (defined(e)) + return defined(t) || (t = new HeadingPitchRange()), t.heading = e.heading, t.pitch = e.pitch, t.range = e.range, t; +}; +const updateTransformMatrix3Scratch1 = new Matrix3(), updateTransformMatrix3Scratch2 = new Matrix3(), updateTransformMatrix3Scratch3 = new Matrix3(), updateTransformMatrix4Scratch = new Matrix4(), updateTransformCartesian3Scratch1 = new Cartesian3(), updateTransformCartesian3Scratch2 = new Cartesian3(), updateTransformCartesian3Scratch3 = new Cartesian3(), updateTransformCartesian3Scratch4 = new Cartesian3(), updateTransformCartesian3Scratch5 = new Cartesian3(), updateTransformCartesian3Scratch6 = new Cartesian3(), deltaTime = new JulianDate(), northUpAxisFactor = 1.25; +function updateTransform(e, t, n, i, r, o, s) { + const c = e.scene.mode; + let l = r.getValue(o, e._lastCartesian); + if (defined(l)) { + let d = !1, f = !1, h, p, m; + if (c === SceneMode$1.SCENE3D) { + JulianDate.addSeconds(o, 1e-3, deltaTime); + let x = r.getValue( + deltaTime, + updateTransformCartesian3Scratch1 + ); + if (defined(x) || (JulianDate.addSeconds(o, -1e-3, deltaTime), x = r.getValue( + deltaTime, + updateTransformCartesian3Scratch1 + ), f = !0), defined(x)) { + let b = Transforms.computeFixedToIcrfMatrix( + o, + updateTransformMatrix3Scratch1 + ), S = Transforms.computeFixedToIcrfMatrix( + deltaTime, + updateTransformMatrix3Scratch2 + ), E; + !defined(b) || !defined(S) ? (E = Transforms.computeTemeToPseudoFixedMatrix( + o, + updateTransformMatrix3Scratch3 + ), b = Matrix3.transpose( + E, + updateTransformMatrix3Scratch1 + ), S = Transforms.computeTemeToPseudoFixedMatrix( + deltaTime, + updateTransformMatrix3Scratch2 + ), Matrix3.transpose(S, S)) : E = Matrix3.transpose( + b, + updateTransformMatrix3Scratch3 + ); + const A = Matrix3.multiplyByVector( + b, + l, + updateTransformCartesian3Scratch5 + ), D = Matrix3.multiplyByVector( + S, + x, + updateTransformCartesian3Scratch6 + ); + Cartesian3.subtract( + A, + D, + updateTransformCartesian3Scratch4 + ); + const P = Cartesian3.magnitude(updateTransformCartesian3Scratch4) * 1e3, I = CesiumMath.GRAVITATIONALPARAMETER, M = -I / (P * P - 2 * I / Cartesian3.magnitude(A)); + M < 0 || M > northUpAxisFactor * s.maximumRadius ? (h = updateTransformCartesian3Scratch2, Cartesian3.normalize(l, h), Cartesian3.negate(h, h), m = Cartesian3.clone( + Cartesian3.UNIT_Z, + updateTransformCartesian3Scratch3 + ), p = Cartesian3.cross( + m, + h, + updateTransformCartesian3Scratch1 + ), Cartesian3.magnitude(p) > CesiumMath.EPSILON7 && (Cartesian3.normalize(h, h), Cartesian3.normalize(p, p), m = Cartesian3.cross( + h, + p, + updateTransformCartesian3Scratch3 + ), Cartesian3.normalize(m, m), d = !0)) : Cartesian3.equalsEpsilon( + l, + x, + CesiumMath.EPSILON7 + ) || (m = updateTransformCartesian3Scratch2, Cartesian3.normalize(A, m), Cartesian3.normalize(D, D), p = Cartesian3.cross( + m, + D, + updateTransformCartesian3Scratch3 + ), f && (p = Cartesian3.multiplyByScalar(p, -1, p)), Cartesian3.equalsEpsilon( + p, + Cartesian3.ZERO, + CesiumMath.EPSILON7 + ) || (h = Cartesian3.cross( + p, + m, + updateTransformCartesian3Scratch1 + ), Matrix3.multiplyByVector(E, h, h), Matrix3.multiplyByVector(E, p, p), Matrix3.multiplyByVector(E, m, m), Cartesian3.normalize(h, h), Cartesian3.normalize(p, p), Cartesian3.normalize(m, m), d = !0)); + } + } + defined(e.boundingSphere) && (l = e.boundingSphere.center); + let _, y, C; + i && (_ = Cartesian3.clone( + t.position, + updateTransformCartesian3Scratch4 + ), y = Cartesian3.clone( + t.direction, + updateTransformCartesian3Scratch5 + ), C = Cartesian3.clone(t.up, updateTransformCartesian3Scratch6)); + const T = updateTransformMatrix4Scratch; + d ? (T[0] = h.x, T[1] = h.y, T[2] = h.z, T[3] = 0, T[4] = p.x, T[5] = p.y, T[6] = p.z, T[7] = 0, T[8] = m.x, T[9] = m.y, T[10] = m.z, T[11] = 0, T[12] = l.x, T[13] = l.y, T[14] = l.z, T[15] = 0) : Transforms.eastNorthUpToFixedFrame(l, s, T), t._setTransform(T), i && (Cartesian3.clone(_, t.position), Cartesian3.clone(y, t.direction), Cartesian3.clone(C, t.up), Cartesian3.cross(y, C, t.right)); + } + if (n) { + const d = c === SceneMode$1.SCENE2D || Cartesian3.equals(e._offset3D, Cartesian3.ZERO) ? void 0 : e._offset3D; + t.lookAtTransform(t.transform, d); + } +} +function EntityView(e, t, n) { + this.entity = e, this.scene = t, this.ellipsoid = defaultValue(n, Ellipsoid.default), this.boundingSphere = void 0, this._lastEntity = void 0, this._mode = void 0, this._lastCartesian = new Cartesian3(), this._defaultOffset3D = void 0, this._offset3D = new Cartesian3(); +} +Object.defineProperties(EntityView, { + /** + * Gets or sets a camera offset that will be used to + * initialize subsequent EntityViews. + * @memberof EntityView + * @type {Cartesian3} + */ + defaultOffset3D: { + get: function() { + return this._defaultOffset3D; + }, + set: function(e) { + this._defaultOffset3D = Cartesian3.clone(e, new Cartesian3()); + } + } +}); +EntityView.defaultOffset3D = new Cartesian3(-14e3, 3500, 3500); +const scratchHeadingPitchRange = new HeadingPitchRange(), scratchCartesian$2 = new Cartesian3(); +EntityView.prototype.update = function(e, t) { + const n = this.scene, i = this.ellipsoid, r = n.mode; + if (r === SceneMode$1.MORPHING) + return; + const o = this.entity, s = o.position; + if (!defined(s)) + return; + const c = o !== this._lastEntity, l = r !== this._mode, d = n.camera; + let f = c || l, h = !0; + if (c) { + const p = o.viewFrom, m = defined(p); + if (!m && defined(t)) { + scratchHeadingPitchRange.pitch = -CesiumMath.PI_OVER_FOUR, scratchHeadingPitchRange.range = 0; + const _ = s.getValue(e, scratchCartesian$2); + if (defined(_)) { + const y = 2 - 1 / Math.max( + 1, + Cartesian3.magnitude(_) / i.maximumRadius + ); + scratchHeadingPitchRange.pitch *= y; + } + d.viewBoundingSphere(t, scratchHeadingPitchRange), this.boundingSphere = t, f = !1, h = !1; + } else (!m || !defined(p.getValue(e, this._offset3D))) && Cartesian3.clone(EntityView._defaultOffset3D, this._offset3D); + } else !l && this._mode !== SceneMode$1.SCENE2D && Cartesian3.clone(d.position, this._offset3D); + this._lastEntity = o, this._mode = r, updateTransform( + this, + d, + f, + h, + s, + e, + i + ); +}; +function PinBuilder() { + this._cache = {}; +} +PinBuilder.prototype.fromColor = function(e, t) { + return createPin(void 0, void 0, e, t, this._cache); +}; +PinBuilder.prototype.fromUrl = function(e, t, n) { + return createPin(e, void 0, t, n, this._cache); +}; +PinBuilder.prototype.fromMakiIconId = function(e, t, n) { + return createPin( + buildModuleUrl(`Assets/Textures/maki/${encodeURIComponent(e)}.png`), + void 0, + t, + n, + this._cache + ); +}; +PinBuilder.prototype.fromText = function(e, t, n) { + return createPin(void 0, e, t, n, this._cache); +}; +const colorScratch$1 = new Color(); +function drawPin(e, t, n) { + e.save(), e.scale(n / 24, n / 24), e.fillStyle = t.toCssColorString(), e.strokeStyle = t.brighten(0.6, colorScratch$1).toCssColorString(), e.lineWidth = 0.846, e.beginPath(), e.moveTo(6.72, 0.422), e.lineTo(17.28, 0.422), e.bezierCurveTo(18.553, 0.422, 19.577, 1.758, 19.577, 3.415), e.lineTo(19.577, 10.973), e.bezierCurveTo(19.577, 12.63, 18.553, 13.966, 17.282, 13.966), e.lineTo(14.386, 14.008), e.lineTo(11.826, 23.578), e.lineTo(9.614, 14.008), e.lineTo(6.719, 13.965), e.bezierCurveTo(5.446, 13.983, 4.422, 12.629, 4.422, 10.972), e.lineTo(4.422, 3.416), e.bezierCurveTo(4.423, 1.76, 5.447, 0.423, 6.718, 0.423), e.closePath(), e.fill(), e.stroke(), e.restore(); +} +function drawIcon(e, t, n) { + const i = n / 2.5; + let r = i, o = i; + t.width > t.height ? o = i * (t.height / t.width) : t.width < t.height && (r = i * (t.width / t.height)); + const s = Math.round((n - r) / 2), c = Math.round(7 / 24 * n - o / 2); + e.globalCompositeOperation = "destination-out", e.drawImage(t, s - 1, c, r, o), e.drawImage(t, s, c - 1, r, o), e.drawImage(t, s + 1, c, r, o), e.drawImage(t, s, c + 1, r, o), e.globalCompositeOperation = "destination-over", e.fillStyle = Color.BLACK.toCssColorString(), e.fillRect(s - 1, c - 1, r + 2, o + 2), e.globalCompositeOperation = "destination-out", e.drawImage(t, s, c, r, o), e.globalCompositeOperation = "destination-over", e.fillStyle = Color.WHITE.toCssColorString(), e.fillRect(s - 1, c - 2, r + 2, o + 2); +} +const stringifyScratch = new Array(4); +function createPin(e, t, n, i, r) { + stringifyScratch[0] = e, stringifyScratch[1] = t, stringifyScratch[2] = n, stringifyScratch[3] = i; + const o = JSON.stringify(stringifyScratch), s = r[o]; + if (defined(s)) + return s; + const c = document.createElement("canvas"); + c.width = i, c.height = i; + const l = c.getContext("2d"); + if (drawPin(l, n, i), defined(e)) { + const f = Resource.createIfNeeded(e).fetchImage().then(function(h) { + return drawIcon(l, h, i), r[o] = c, c; + }); + return r[o] = f, f; + } else if (defined(t)) { + const d = writeTextToCanvas(t, { + font: `bold ${i}px sans-serif` + }); + drawIcon(l, d, i); + } + return r[o] = c, c; +} +function identity(e) { + return e; +} +function transform$1(e) { + if (e == null) return identity; + var t, n, i = e.scale[0], r = e.scale[1], o = e.translate[0], s = e.translate[1]; + return function(c, l) { + l || (t = n = 0); + var d = 2, f = c.length, h = new Array(f); + for (h[0] = (t += c[0]) * i + o, h[1] = (n += c[1]) * r + s; d < f; ) h[d] = c[d], ++d; + return h; + }; +} +function reverse(e, t) { + for (var n, i = e.length, r = i - t; r < --i; ) n = e[r], e[r++] = e[i], e[i] = n; +} +function feature(e, t) { + return typeof t == "string" && (t = e.objects[t]), t.type === "GeometryCollection" ? { type: "FeatureCollection", features: t.geometries.map(function(n) { + return feature$1(e, n); + }) } : feature$1(e, t); +} +function feature$1(e, t) { + var n = t.id, i = t.bbox, r = t.properties == null ? {} : t.properties, o = object(e, t); + return n == null && i == null ? { type: "Feature", properties: r, geometry: o } : i == null ? { type: "Feature", id: n, properties: r, geometry: o } : { type: "Feature", id: n, bbox: i, properties: r, geometry: o }; +} +function object(e, t) { + var n = transform$1(e.transform), i = e.arcs; + function r(f, h) { + h.length && h.pop(); + for (var p = i[f < 0 ? ~f : f], m = 0, _ = p.length; m < _; ++m) + h.push(n(p[m], m)); + f < 0 && reverse(h, _); + } + function o(f) { + return n(f); + } + function s(f) { + for (var h = [], p = 0, m = f.length; p < m; ++p) r(f[p], h); + return h.length < 2 && h.push(h[0]), h; + } + function c(f) { + for (var h = s(f); h.length < 4; ) h.push(h[0]); + return h; + } + function l(f) { + return f.map(c); + } + function d(f) { + var h = f.type, p; + switch (h) { + case "GeometryCollection": + return { type: h, geometries: f.geometries.map(d) }; + case "Point": + p = o(f.coordinates); + break; + case "MultiPoint": + p = f.coordinates.map(o); + break; + case "LineString": + p = s(f.arcs); + break; + case "MultiLineString": + p = f.arcs.map(s); + break; + case "Polygon": + p = l(f.arcs); + break; + case "MultiPolygon": + p = f.arcs.map(l); + break; + default: + return null; + } + return { type: h, coordinates: p }; + } + return d(t); +} +function defaultCrsFunction(e) { + return Cartesian3.fromDegrees(e[0], e[1], e[2]); +} +const crsNames = { + "urn:ogc:def:crs:OGC:1.3:CRS84": defaultCrsFunction, + "EPSG:4326": defaultCrsFunction, + "urn:ogc:def:crs:EPSG::4326": defaultCrsFunction +}, crsLinkHrefs = {}, crsLinkTypes = {}; +let defaultMarkerSize = 48, defaultMarkerSymbol, defaultMarkerColor = Color.ROYALBLUE, defaultStroke = Color.YELLOW, defaultStrokeWidth = 2, defaultFill = Color.fromBytes(255, 255, 0, 100), defaultClampToGround = !1; +const sizes = { + small: 24, + medium: 48, + large: 64 +}, simpleStyleIdentifiers = [ + "title", + "description", + // + "marker-size", + "marker-symbol", + "marker-color", + "stroke", + // + "stroke-opacity", + "stroke-width", + "fill", + "fill-opacity" +]; +function defaultDescribe(e, t) { + let n = ""; + for (const i in e) + if (e.hasOwnProperty(i)) { + if (i === t || simpleStyleIdentifiers.indexOf(i) !== -1) + continue; + const r = e[i]; + defined(r) && (typeof r == "object" ? n += `crsLinkHrefs, assuming
+ * the link has a type specified.
+ * @memberof GeoJsonDataSource
+ * @type {object}
+ */
+ crsLinkHrefs: {
+ get: function() {
+ return crsLinkHrefs;
+ }
+ },
+ /**
+ * Gets an object that maps the type property of a crs link to a callback function
+ * which takes the crs properties object and returns a Promise that resolves
+ * to a function that takes a GeoJSON coordinate and transforms it into a WGS84 Earth-fixed Cartesian.
+ * Items in crsLinkHrefs take precedence over this object.
+ * @memberof GeoJsonDataSource
+ * @type {object}
+ */
+ crsLinkTypes: {
+ get: function() {
+ return crsLinkTypes;
+ }
+ }
+});
+Object.defineProperties(GeoJsonDataSource.prototype, {
+ /**
+ * Gets or sets a human-readable name for this instance.
+ * @memberof GeoJsonDataSource.prototype
+ * @type {string}
+ */
+ name: {
+ get: function() {
+ return this._name;
+ },
+ set: function(e) {
+ this._name !== e && (this._name = e, this._changed.raiseEvent(this));
+ }
+ },
+ /**
+ * This DataSource only defines static data, therefore this property is always undefined.
+ * @memberof GeoJsonDataSource.prototype
+ * @type {DataSourceClock}
+ */
+ clock: {
+ value: void 0,
+ writable: !1
+ },
+ /**
+ * Gets the collection of {@link Entity} instances.
+ * @memberof GeoJsonDataSource.prototype
+ * @type {EntityCollection}
+ */
+ entities: {
+ get: function() {
+ return this._entityCollection;
+ }
+ },
+ /**
+ * Gets a value indicating if the data source is currently loading data.
+ * @memberof GeoJsonDataSource.prototype
+ * @type {boolean}
+ */
+ isLoading: {
+ get: function() {
+ return this._isLoading;
+ }
+ },
+ /**
+ * Gets an event that will be raised when the underlying data changes.
+ * @memberof GeoJsonDataSource.prototype
+ * @type {Event}
+ */
+ changedEvent: {
+ get: function() {
+ return this._changed;
+ }
+ },
+ /**
+ * Gets an event that will be raised if an error is encountered during processing.
+ * @memberof GeoJsonDataSource.prototype
+ * @type {Event}
+ */
+ errorEvent: {
+ get: function() {
+ return this._error;
+ }
+ },
+ /**
+ * Gets an event that will be raised when the data source either starts or stops loading.
+ * @memberof GeoJsonDataSource.prototype
+ * @type {Event}
+ */
+ loadingEvent: {
+ get: function() {
+ return this._loading;
+ }
+ },
+ /**
+ * Gets whether or not this data source should be displayed.
+ * @memberof GeoJsonDataSource.prototype
+ * @type {boolean}
+ */
+ show: {
+ get: function() {
+ return this._entityCollection.show;
+ },
+ set: function(e) {
+ this._entityCollection.show = e;
+ }
+ },
+ /**
+ * Gets or sets the clustering options for this data source. This object can be shared between multiple data sources.
+ *
+ * @memberof GeoJsonDataSource.prototype
+ * @type {EntityCluster}
+ */
+ clustering: {
+ get: function() {
+ return this._entityCluster;
+ },
+ set: function(e) {
+ this._entityCluster = e;
+ }
+ },
+ /**
+ * Gets the credit that will be displayed for the data source
+ * @memberof GeoJsonDataSource.prototype
+ * @type {Credit}
+ */
+ credit: {
+ get: function() {
+ return this._credit;
+ }
+ }
+});
+GeoJsonDataSource.prototype.load = function(e, t) {
+ return preload(this, e, t, !0);
+};
+GeoJsonDataSource.prototype.process = function(e, t) {
+ return preload(this, e, t, !1);
+};
+function preload(e, t, n, i) {
+ DataSource.setLoading(e, !0), n = defaultValue(n, defaultValue.EMPTY_OBJECT);
+ let r = n.credit;
+ typeof r == "string" && (r = new Credit(r)), e._credit = r;
+ let o = t, s = n.sourceUri;
+ if (typeof t == "string" || t instanceof Resource) {
+ t = Resource.createIfNeeded(t), o = t.fetchJson(), s = defaultValue(s, t.getUrlComponent());
+ const c = e._resourceCredits, l = t.credits;
+ if (defined(l)) {
+ const d = l.length;
+ for (let f = 0; f < d; f++)
+ c.push(l[f]);
+ }
+ }
+ return n = {
+ describe: defaultValue(n.describe, defaultDescribeProperty),
+ markerSize: defaultValue(n.markerSize, defaultMarkerSize),
+ markerSymbol: defaultValue(n.markerSymbol, defaultMarkerSymbol),
+ markerColor: defaultValue(n.markerColor, defaultMarkerColor),
+ strokeWidthProperty: new ConstantProperty(
+ defaultValue(n.strokeWidth, defaultStrokeWidth)
+ ),
+ strokeMaterialProperty: new ColorMaterialProperty(
+ defaultValue(n.stroke, defaultStroke)
+ ),
+ fillMaterialProperty: new ColorMaterialProperty(
+ defaultValue(n.fill, defaultFill)
+ ),
+ clampToGround: defaultValue(n.clampToGround, defaultClampToGround)
+ }, Promise.resolve(o).then(function(c) {
+ return load$3(e, c, n, s, i);
+ }).catch(function(c) {
+ throw DataSource.setLoading(e, !1), e._error.raiseEvent(e, c), c;
+ });
+}
+GeoJsonDataSource.prototype.update = function(e) {
+ return !0;
+};
+function load$3(e, t, n, i, r) {
+ let o;
+ defined(i) && (o = getFilenameFromUri(i)), defined(o) && e._name !== o && (e._name = o, e._changed.raiseEvent(e));
+ const s = geoJsonObjectTypes[t.type];
+ if (!defined(s))
+ throw new RuntimeError(`Unsupported GeoJSON object type: ${t.type}`);
+ const c = t.crs;
+ let l = c !== null ? defaultCrsFunction : null;
+ if (defined(c)) {
+ if (!defined(c.properties))
+ throw new RuntimeError("crs.properties is undefined.");
+ const d = c.properties;
+ if (c.type === "name") {
+ if (l = crsNames[d.name], !defined(l))
+ throw new RuntimeError(`Unknown crs name: ${d.name}`);
+ } else if (c.type === "link") {
+ let f = crsLinkHrefs[d.href];
+ if (defined(f) || (f = crsLinkTypes[d.type]), !defined(f))
+ throw new RuntimeError(
+ `Unable to resolve crs link: ${JSON.stringify(d)}`
+ );
+ l = f(d);
+ } else if (c.type === "EPSG") {
+ if (l = crsNames[`EPSG:${d.code}`], !defined(l))
+ throw new RuntimeError(`Unknown crs EPSG code: ${d.code}`);
+ } else
+ throw new RuntimeError(`Unknown crs type: ${c.type}`);
+ }
+ return Promise.resolve(l).then(function(d) {
+ return r && e._entityCollection.removeAll(), d !== null && s(e, t, t, d, n), Promise.all(e._promises).then(function() {
+ return e._promises.length = 0, DataSource.setLoading(e, !1), e;
+ });
+ });
+}
+var version = "4.0.0";
+function isUndefined(e) {
+ return e === void 0;
+}
+function isBoolean(e) {
+ return typeof e == "boolean";
+}
+function defaults(e, t) {
+ for (var n in t)
+ t.hasOwnProperty(n) && isUndefined(e[n]) && (e[n] = t[n]);
+ return e;
+}
+function ellipsis(e, t, n) {
+ var i;
+ return e.length > t && (n == null ? (n = "…", i = 3) : i = n.length, e = e.substring(0, t - i) + n), e;
+}
+function remove$1(e, t) {
+ for (var n = e.length - 1; n >= 0; n--)
+ e[n] === t && e.splice(n, 1);
+}
+function removeWithPredicate(e, t) {
+ for (var n = e.length - 1; n >= 0; n--)
+ t(e[n]) === !0 && e.splice(n, 1);
+}
+function assertNever(e) {
+ throw new Error("Unhandled case for value: '".concat(e, "'"));
+}
+var letterRe = /[A-Za-z]/, digitRe = /[\d]/, whitespaceRe = /\s/, quoteRe = /['"]/, controlCharsRe = /[\x00-\x1F\x7F]/, alphaCharsStr = /A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source, emojiStr = /\u2700-\u27bf\udde6-\uddff\ud800-\udbff\udc00-\udfff\ufe0e\ufe0f\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0\ud83c\udffb-\udfff\u200d\u3299\u3297\u303d\u3030\u24c2\ud83c\udd70-\udd71\udd7e-\udd7f\udd8e\udd91-\udd9a\udde6-\uddff\ude01-\ude02\ude1a\ude2f\ude32-\ude3a\ude50-\ude51\u203c\u2049\u25aa-\u25ab\u25b6\u25c0\u25fb-\u25fe\u00a9\u00ae\u2122\u2139\udc04\u2600-\u26FF\u2b05\u2b06\u2b07\u2b1b\u2b1c\u2b50\u2b55\u231a\u231b\u2328\u23cf\u23e9-\u23f3\u23f8-\u23fa\udccf\u2935\u2934\u2190-\u21ff/.source, marksStr = /\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F/.source, alphaCharsAndMarksStr = alphaCharsStr + emojiStr + marksStr, decimalNumbersStr = /0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19/.source, alphaNumericAndMarksCharsStr = alphaCharsAndMarksStr + decimalNumbersStr, alphaNumericAndMarksRe = new RegExp("[".concat(alphaNumericAndMarksCharsStr, "]")), HtmlTag = (
+ /** @class */
+ function() {
+ function e(t) {
+ t === void 0 && (t = {}), this.tagName = "", this.attrs = {}, this.innerHTML = "", this.tagName = t.tagName || "", this.attrs = t.attrs || {}, this.innerHTML = t.innerHtml || t.innerHTML || "";
+ }
+ return e.prototype.setTagName = function(t) {
+ return this.tagName = t, this;
+ }, e.prototype.getTagName = function() {
+ return this.tagName || "";
+ }, e.prototype.setAttr = function(t, n) {
+ var i = this.getAttrs();
+ return i[t] = n, this;
+ }, e.prototype.getAttr = function(t) {
+ return this.getAttrs()[t];
+ }, e.prototype.setAttrs = function(t) {
+ return Object.assign(this.getAttrs(), t), this;
+ }, e.prototype.getAttrs = function() {
+ return this.attrs || (this.attrs = {});
+ }, e.prototype.setClass = function(t) {
+ return this.setAttr("class", t);
+ }, e.prototype.addClass = function(t) {
+ for (var n = this.getClass(), i = n ? n.split(whitespaceRe) : [], r = t.split(whitespaceRe), o; o = r.shift(); )
+ i.indexOf(o) === -1 && i.push(o);
+ return this.getAttrs().class = i.join(" "), this;
+ }, e.prototype.removeClass = function(t) {
+ for (var n = this.getClass(), i = n ? n.split(whitespaceRe) : [], r = t.split(whitespaceRe), o; i.length && (o = r.shift()); ) {
+ var s = i.indexOf(o);
+ s !== -1 && i.splice(s, 1);
+ }
+ return this.getAttrs().class = i.join(" "), this;
+ }, e.prototype.getClass = function() {
+ return this.getAttrs().class || "";
+ }, e.prototype.hasClass = function(t) {
+ return (" " + this.getClass() + " ").indexOf(" " + t + " ") !== -1;
+ }, e.prototype.setInnerHTML = function(t) {
+ return this.innerHTML = t, this;
+ }, e.prototype.setInnerHtml = function(t) {
+ return this.setInnerHTML(t);
+ }, e.prototype.getInnerHTML = function() {
+ return this.innerHTML || "";
+ }, e.prototype.getInnerHtml = function() {
+ return this.getInnerHTML();
+ }, e.prototype.toAnchorString = function() {
+ var t = this.getTagName(), n = this.buildAttrsStr();
+ return n = n ? " " + n : "", ["<", t, n, ">", this.getInnerHtml(), "", t, ">"].join("");
+ }, e.prototype.buildAttrsStr = function() {
+ if (!this.attrs)
+ return "";
+ var t = this.getAttrs(), n = [];
+ for (var i in t)
+ t.hasOwnProperty(i) && n.push(i + '="' + t[i] + '"');
+ return n.join(" ");
+ }, e;
+ }()
+);
+function truncateSmart(e, t, n) {
+ var i, r;
+ n == null ? (n = "…", r = 3, i = 8) : (r = n.length, i = n.length);
+ var o = function(x) {
+ var b = {}, S = x, E = S.match(/^([a-z]+):\/\//i);
+ return E && (b.scheme = E[1], S = S.substr(E[0].length)), E = S.match(/^(.*?)(?=(\?|#|\/|$))/i), E && (b.host = E[1], S = S.substr(E[0].length)), E = S.match(/^\/(.*?)(?=(\?|#|$))/i), E && (b.path = E[1], S = S.substr(E[0].length)), E = S.match(/^\?(.*?)(?=(#|$))/i), E && (b.query = E[1], S = S.substr(E[0].length)), E = S.match(/^#(.*?)$/i), E && (b.fragment = E[1]), b;
+ }, s = function(x) {
+ var b = "";
+ return x.scheme && x.host && (b += x.scheme + "://"), x.host && (b += x.host), x.path && (b += "/" + x.path), x.query && (b += "?" + x.query), x.fragment && (b += "#" + x.fragment), b;
+ }, c = function(x, b) {
+ var S = b / 2, E = Math.ceil(S), A = -1 * Math.floor(S), D = "";
+ return A < 0 && (D = x.substr(A)), x.substr(0, E) + n + D;
+ };
+ if (e.length <= t)
+ return e;
+ var l = t - r, d = o(e);
+ if (d.query) {
+ var f = d.query.match(/^(.*?)(?=(\?|\#))(.*?)$/i);
+ f && (d.query = d.query.substr(0, f[1].length), e = s(d));
+ }
+ if (e.length <= t || (d.host && (d.host = d.host.replace(/^www\./, ""), e = s(d)), e.length <= t))
+ return e;
+ var h = "";
+ if (d.host && (h += d.host), h.length >= l)
+ return d.host.length == t ? (d.host.substr(0, t - r) + n).substr(0, l + i) : c(h, l).substr(0, l + i);
+ var p = "";
+ if (d.path && (p += "/" + d.path), d.query && (p += "?" + d.query), p)
+ if ((h + p).length >= l) {
+ if ((h + p).length == t)
+ return (h + p).substr(0, t);
+ var m = l - h.length;
+ return (h + c(p, m)).substr(0, l + i);
+ } else
+ h += p;
+ if (d.fragment) {
+ var _ = "#" + d.fragment;
+ if ((h + _).length >= l) {
+ if ((h + _).length == t)
+ return (h + _).substr(0, t);
+ var y = l - h.length;
+ return (h + c(_, y)).substr(0, l + i);
+ } else
+ h += _;
+ }
+ if (d.scheme && d.host) {
+ var C = d.scheme + "://";
+ if ((h + C).length < l)
+ return (C + h).substr(0, t);
+ }
+ if (h.length <= t)
+ return h;
+ var T = "";
+ return l > 0 && (T = h.substr(-1 * Math.floor(l / 2))), (h.substr(0, Math.ceil(l / 2)) + n + T).substr(0, l + i);
+}
+function truncateMiddle(e, t, n) {
+ if (e.length <= t)
+ return e;
+ var i, r;
+ n == null ? (n = "…", i = 8, r = 3) : (i = n.length, r = n.length);
+ var o = t - r, s = "";
+ return o > 0 && (s = e.substr(-1 * Math.floor(o / 2))), (e.substr(0, Math.ceil(o / 2)) + n + s).substr(0, o + i);
+}
+function truncateEnd(e, t, n) {
+ return ellipsis(e, t, n);
+}
+var AnchorTagBuilder = (
+ /** @class */
+ function() {
+ function e(t) {
+ t === void 0 && (t = {}), this.newWindow = !1, this.truncate = {}, this.className = "", this.newWindow = t.newWindow || !1, this.truncate = t.truncate || {}, this.className = t.className || "";
+ }
+ return e.prototype.build = function(t) {
+ return new HtmlTag({
+ tagName: "a",
+ attrs: this.createAttrs(t),
+ innerHtml: this.processAnchorText(t.getAnchorText())
+ });
+ }, e.prototype.createAttrs = function(t) {
+ var n = {
+ href: t.getAnchorHref()
+ // we'll always have the `href` attribute
+ }, i = this.createCssClass(t);
+ return i && (n.class = i), this.newWindow && (n.target = "_blank", n.rel = "noopener noreferrer"), this.truncate && this.truncate.length && this.truncate.length < t.getAnchorText().length && (n.title = t.getAnchorHref()), n;
+ }, e.prototype.createCssClass = function(t) {
+ var n = this.className;
+ if (n) {
+ for (var i = [n], r = t.getCssClassSuffixes(), o = 0, s = r.length; o < s; o++)
+ i.push(n + "-" + r[o]);
+ return i.join(" ");
+ } else
+ return "";
+ }, e.prototype.processAnchorText = function(t) {
+ return t = this.doTruncate(t), t;
+ }, e.prototype.doTruncate = function(t) {
+ var n = this.truncate;
+ if (!n || !n.length)
+ return t;
+ var i = n.length, r = n.location;
+ return r === "smart" ? truncateSmart(t, i) : r === "middle" ? truncateMiddle(t, i) : truncateEnd(t, i);
+ }, e;
+ }()
+), extendStatics = function(e, t) {
+ return extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
+ n.__proto__ = i;
+ } || function(n, i) {
+ for (var r in i) Object.prototype.hasOwnProperty.call(i, r) && (n[r] = i[r]);
+ }, extendStatics(e, t);
+};
+function __extends(e, t) {
+ if (typeof t != "function" && t !== null)
+ throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
+ extendStatics(e, t);
+ function n() {
+ this.constructor = e;
+ }
+ e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
+}
+var __assign = function() {
+ return __assign = Object.assign || function(t) {
+ for (var n, i = 1, r = arguments.length; i < r; i++) {
+ n = arguments[i];
+ for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]);
+ }
+ return t;
+ }, __assign.apply(this, arguments);
+};
+typeof SuppressedError == "function" && SuppressedError;
+var AbstractMatch = (
+ /** @class */
+ function() {
+ function e(t) {
+ this._ = null, this.matchedText = "", this.offset = 0, this.tagBuilder = t.tagBuilder, this.matchedText = t.matchedText, this.offset = t.offset;
+ }
+ return e.prototype.getMatchedText = function() {
+ return this.matchedText;
+ }, e.prototype.setOffset = function(t) {
+ this.offset = t;
+ }, e.prototype.getOffset = function() {
+ return this.offset;
+ }, e.prototype.getCssClassSuffixes = function() {
+ return [this.type];
+ }, e.prototype.buildTag = function() {
+ return this.tagBuilder.build(this);
+ }, e;
+ }()
+), tldRegexStr = "(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|travelchannel|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|volkswagen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|etisalat|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hoteles|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|католик|اتصالات|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abarth|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|vuelos|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dabur|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|loans|locus|lotte|lotto|macys|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|adac|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fiat|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shaw|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|诺基亚|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)", tldRegex = new RegExp("^" + tldRegexStr + "$"), urlSuffixStartCharsRe = /[\/?#]/, urlSuffixAllowedSpecialCharsRe = /[-+&@#/%=~_()|'$*\[\]{}\u2713]/, urlSuffixNotAllowedAsLastCharRe = /[?!:,.;^]/, httpSchemeRe = /https?:\/\//i, httpSchemePrefixRe = new RegExp("^" + httpSchemeRe.source, "i"), urlSuffixedCharsNotAllowedAtEndRe = new RegExp(urlSuffixNotAllowedAsLastCharRe.source + "$"), invalidSchemeRe = /^(javascript|vbscript):/i, schemeUrlRe = /^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/, tldUrlHostRe = /^(?:\/\/)?([^/#?:]+)/;
+function isSchemeStartChar(e) {
+ return letterRe.test(e);
+}
+function isSchemeChar(e) {
+ return letterRe.test(e) || digitRe.test(e) || e === "+" || e === "-" || e === ".";
+}
+function isDomainLabelStartChar(e) {
+ return alphaNumericAndMarksRe.test(e);
+}
+function isDomainLabelChar(e) {
+ return e === "_" || isDomainLabelStartChar(e);
+}
+function isPathChar(e) {
+ return alphaNumericAndMarksRe.test(e) || urlSuffixAllowedSpecialCharsRe.test(e) || urlSuffixNotAllowedAsLastCharRe.test(e);
+}
+function isUrlSuffixStartChar(e) {
+ return urlSuffixStartCharsRe.test(e);
+}
+function isKnownTld(e) {
+ return tldRegex.test(e.toLowerCase());
+}
+function isValidSchemeUrl(e) {
+ if (invalidSchemeRe.test(e))
+ return !1;
+ var t = e.match(schemeUrlRe);
+ if (!t)
+ return !1;
+ var n = !!t[1], i = t[2];
+ return n ? !0 : !(i.indexOf(".") === -1 || !letterRe.test(i));
+}
+function isValidTldMatch(e) {
+ var t = e.match(tldUrlHostRe);
+ if (!t)
+ return !1;
+ var n = t[0], i = n.split(".");
+ if (i.length < 2)
+ return !1;
+ var r = i[i.length - 1];
+ return !!isKnownTld(r);
+}
+var ipV4Re = /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/, ipV4PartRe = /[:/?#]/;
+function isValidIpV4Address(e) {
+ var t = e.split(ipV4PartRe, 1)[0];
+ return ipV4Re.test(t);
+}
+var wwwPrefixRegex = /^(https?:\/\/)?(www\.)?/i, protocolRelativeRegex = /^\/\//, UrlMatch = (
+ /** @class */
+ function(e) {
+ __extends(t, e);
+ function t(n) {
+ var i = e.call(this, n) || this;
+ return i.type = "url", i.url = "", i.urlMatchType = "scheme", i.protocolRelativeMatch = !1, i.stripPrefix = {
+ scheme: !0,
+ www: !0
+ }, i.stripTrailingSlash = !0, i.decodePercentEncoding = !0, i.protocolPrepended = !1, i.urlMatchType = n.urlMatchType, i.url = n.url, i.protocolRelativeMatch = n.protocolRelativeMatch, i.stripPrefix = n.stripPrefix, i.stripTrailingSlash = n.stripTrailingSlash, i.decodePercentEncoding = n.decodePercentEncoding, i;
+ }
+ return t.prototype.getType = function() {
+ return "url";
+ }, t.prototype.getUrlMatchType = function() {
+ return this.urlMatchType;
+ }, t.prototype.getUrl = function() {
+ var n = this.url;
+ return !this.protocolRelativeMatch && this.urlMatchType !== "scheme" && !this.protocolPrepended && (n = this.url = "http://" + n, this.protocolPrepended = !0), n;
+ }, t.prototype.getAnchorHref = function() {
+ var n = this.getUrl();
+ return n.replace(/&/g, "&");
+ }, t.prototype.getAnchorText = function() {
+ var n = this.getMatchedText();
+ return this.protocolRelativeMatch && (n = stripProtocolRelativePrefix(n)), this.stripPrefix.scheme && (n = stripSchemePrefix(n)), this.stripPrefix.www && (n = stripWwwPrefix(n)), this.stripTrailingSlash && (n = removeTrailingSlash(n)), this.decodePercentEncoding && (n = removePercentEncoding(n)), n;
+ }, t;
+ }(AbstractMatch)
+);
+function stripSchemePrefix(e) {
+ return e.replace(httpSchemePrefixRe, "");
+}
+function stripWwwPrefix(e) {
+ return e.replace(wwwPrefixRegex, "$1");
+}
+function stripProtocolRelativePrefix(e) {
+ return e.replace(protocolRelativeRegex, "");
+}
+function removeTrailingSlash(e) {
+ return e.charAt(e.length - 1) === "/" && (e = e.slice(0, -1)), e;
+}
+function removePercentEncoding(e) {
+ var t = e.replace(/%22/gi, """).replace(/%26/gi, "&").replace(/%27/gi, "'").replace(/%3C/gi, "<").replace(/%3E/gi, ">");
+ try {
+ return decodeURIComponent(t);
+ } catch {
+ return t;
+ }
+}
+var mailtoSchemePrefixRe = /^mailto:/i, emailLocalPartCharRegex = new RegExp("[".concat(alphaNumericAndMarksCharsStr, "!#$%&'*+/=?^_`{|}~-]"));
+function isEmailLocalPartStartChar(e) {
+ return alphaNumericAndMarksRe.test(e);
+}
+function isEmailLocalPartChar(e) {
+ return emailLocalPartCharRegex.test(e);
+}
+function isValidEmail(e) {
+ var t = e.split(".").pop() || "";
+ return isKnownTld(t);
+}
+var EmailMatch = (
+ /** @class */
+ function(e) {
+ __extends(t, e);
+ function t(n) {
+ var i = e.call(this, n) || this;
+ return i.type = "email", i.email = "", i.email = n.email, i;
+ }
+ return t.prototype.getType = function() {
+ return "email";
+ }, t.prototype.getEmail = function() {
+ return this.email;
+ }, t.prototype.getAnchorHref = function() {
+ return "mailto:" + this.email;
+ }, t.prototype.getAnchorText = function() {
+ return this.email;
+ }, t;
+ }(AbstractMatch)
+);
+function isHashtagTextChar(e) {
+ return e === "_" || alphaNumericAndMarksRe.test(e);
+}
+function isValidHashtag(e) {
+ return e.length <= 140;
+}
+var hashtagServices = ["twitter", "facebook", "instagram", "tiktok"], HashtagMatch = (
+ /** @class */
+ function(e) {
+ __extends(t, e);
+ function t(n) {
+ var i = e.call(this, n) || this;
+ return i.type = "hashtag", i.serviceName = "twitter", i.hashtag = "", i.serviceName = n.serviceName, i.hashtag = n.hashtag, i;
+ }
+ return t.prototype.getType = function() {
+ return "hashtag";
+ }, t.prototype.getServiceName = function() {
+ return this.serviceName;
+ }, t.prototype.getHashtag = function() {
+ return this.hashtag;
+ }, t.prototype.getAnchorHref = function() {
+ var n = this.serviceName, i = this.hashtag;
+ switch (n) {
+ case "twitter":
+ return "https://twitter.com/hashtag/" + i;
+ case "facebook":
+ return "https://www.facebook.com/hashtag/" + i;
+ case "instagram":
+ return "https://instagram.com/explore/tags/" + i;
+ case "tiktok":
+ return "https://www.tiktok.com/tag/" + i;
+ default:
+ throw assertNever(n), new Error("Invalid hashtag service: ".concat(n));
+ }
+ }, t.prototype.getAnchorText = function() {
+ return "#" + this.hashtag;
+ }, t.prototype.getCssClassSuffixes = function() {
+ var n = e.prototype.getCssClassSuffixes.call(this), i = this.getServiceName();
+ return i && n.push(i), n;
+ }, t;
+ }(AbstractMatch)
+), mentionRegexes = {
+ twitter: /^@\w{1,15}$/,
+ instagram: /^@[_\w]{1,30}$/,
+ soundcloud: /^@[-a-z0-9_]{3,25}$/,
+ // TikTok usernames are 1-24 characters containing letters, numbers, underscores
+ // and periods, but cannot end in a period: https://support.tiktok.com/en/getting-started/setting-up-your-profile/changing-your-username
+ tiktok: /^@[.\w]{1,23}[\w]$/
+}, mentionTextCharRe = /[-\w.]/;
+function isMentionTextChar(e) {
+ return mentionTextCharRe.test(e);
+}
+function isValidMention(e, t) {
+ var n = mentionRegexes[t];
+ return n.test(e);
+}
+var mentionServices = ["twitter", "instagram", "soundcloud", "tiktok"], MentionMatch = (
+ /** @class */
+ function(e) {
+ __extends(t, e);
+ function t(n) {
+ var i = e.call(this, n) || this;
+ return i.type = "mention", i.serviceName = "twitter", i.mention = "", i.mention = n.mention, i.serviceName = n.serviceName, i;
+ }
+ return t.prototype.getType = function() {
+ return "mention";
+ }, t.prototype.getMention = function() {
+ return this.mention;
+ }, t.prototype.getServiceName = function() {
+ return this.serviceName;
+ }, t.prototype.getAnchorHref = function() {
+ switch (this.serviceName) {
+ case "twitter":
+ return "https://twitter.com/" + this.mention;
+ case "instagram":
+ return "https://instagram.com/" + this.mention;
+ case "soundcloud":
+ return "https://soundcloud.com/" + this.mention;
+ case "tiktok":
+ return "https://www.tiktok.com/@" + this.mention;
+ default:
+ throw new Error("Unknown service name to point mention to: " + this.serviceName);
+ }
+ }, t.prototype.getAnchorText = function() {
+ return "@" + this.mention;
+ }, t.prototype.getCssClassSuffixes = function() {
+ var n = e.prototype.getCssClassSuffixes.call(this), i = this.getServiceName();
+ return i && n.push(i), n;
+ }, t;
+ }(AbstractMatch)
+), separatorCharRe = /[-. ]/, hasDelimCharsRe = /[-. ()]/, controlCharRe = /[,;]/, mostPhoneNumbers = /(?:(?:(?:(\+)?\d{1,3}[-. ]?)?\(?\d{3}\)?[-. ]?\d{3}[-. ]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-. ]?(?:\d[-. ]?){6,12}\d+))([,;]+[0-9]+#?)*/, japanesePhoneRe = /(0([1-9]-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/, validPhoneNumberRe = new RegExp("^".concat(mostPhoneNumbers.source, "|").concat(japanesePhoneRe.source, "$"));
+function isPhoneNumberSeparatorChar(e) {
+ return separatorCharRe.test(e);
+}
+function isPhoneNumberControlChar(e) {
+ return controlCharRe.test(e);
+}
+function isValidPhoneNumber(e) {
+ var t = e.charAt(0) === "+" || hasDelimCharsRe.test(e);
+ return t && validPhoneNumberRe.test(e);
+}
+var PhoneMatch = (
+ /** @class */
+ function(e) {
+ __extends(t, e);
+ function t(n) {
+ var i = e.call(this, n) || this;
+ return i.type = "phone", i.number = "", i.plusSign = !1, i.number = n.number, i.plusSign = n.plusSign, i;
+ }
+ return t.prototype.getType = function() {
+ return "phone";
+ }, t.prototype.getPhoneNumber = function() {
+ return this.number;
+ }, t.prototype.getNumber = function() {
+ return this.getPhoneNumber();
+ }, t.prototype.getAnchorHref = function() {
+ return "tel:" + (this.plusSign ? "+" : "") + this.number;
+ }, t.prototype.getAnchorText = function() {
+ return this.matchedText;
+ }, t;
+ }(AbstractMatch)
+);
+function parseMatches(e, t) {
+ for (var n = t.tagBuilder, i = t.stripPrefix, r = t.stripTrailingSlash, o = t.decodePercentEncoding, s = t.hashtagServiceName, c = t.mentionServiceName, l = [], d = e.length, f = [], h = 0; h < d; h++) {
+ var p = e.charAt(h);
+ if (f.length === 0)
+ C(p);
+ else
+ for (var m = f.length - 1; m >= 0; m--) {
+ var _ = f[m];
+ switch (_.state) {
+ case 11:
+ A(_, p);
+ break;
+ case 12:
+ D(_, p);
+ break;
+ case 0:
+ T(_, p);
+ break;
+ case 1:
+ x(_, p);
+ break;
+ case 2:
+ b(_, p);
+ break;
+ case 3:
+ S(_, p);
+ break;
+ case 4:
+ E(_, p);
+ break;
+ case 5:
+ P(_, p);
+ break;
+ case 6:
+ I(_, p);
+ break;
+ case 7:
+ M(_, p);
+ break;
+ case 13:
+ R(_, p);
+ break;
+ case 14:
+ L(_, p);
+ break;
+ case 8:
+ g(_, p);
+ break;
+ case 9:
+ w(_, p);
+ break;
+ case 10:
+ O(_, p);
+ break;
+ case 15:
+ N(_, p);
+ break;
+ case 16:
+ F(_, p);
+ break;
+ case 17:
+ B(_, p);
+ break;
+ case 18:
+ V(_, p);
+ break;
+ case 19:
+ U(_, p);
+ break;
+ case 20:
+ k(_, p);
+ break;
+ case 21:
+ $(_, p);
+ break;
+ case 22:
+ G(_, p);
+ break;
+ case 23:
+ q(_, p);
+ break;
+ case 24:
+ z(_, p);
+ break;
+ case 25:
+ H(_, p);
+ break;
+ case 26:
+ Q(_, p);
+ break;
+ case 27:
+ ne(_, p);
+ break;
+ case 28:
+ K(_, p);
+ break;
+ case 29:
+ Z(_, p);
+ break;
+ case 30:
+ ee(_, p);
+ break;
+ case 31:
+ oe(_, p);
+ break;
+ case 32:
+ fe(_, p);
+ break;
+ case 33:
+ de(_, p);
+ break;
+ case 34:
+ ce(_, p);
+ break;
+ case 35:
+ ye(_, p);
+ break;
+ case 36:
+ ge(_, p);
+ break;
+ case 37:
+ X(_, p);
+ break;
+ case 38:
+ re(_, p);
+ break;
+ case 39:
+ be(_, p);
+ break;
+ case 40:
+ pe(_, p);
+ break;
+ case 41:
+ Te(_, p);
+ break;
+ default:
+ assertNever(_.state);
+ }
+ }
+ }
+ for (var y = f.length - 1; y >= 0; y--)
+ f.forEach(function(W) {
+ return xe(W);
+ });
+ return l;
+ function C(W) {
+ if (W === "#")
+ f.push(createHashtagStateMachine(
+ h,
+ 28
+ /* HashtagHashChar */
+ ));
+ else if (W === "@")
+ f.push(createMentionStateMachine(
+ h,
+ 30
+ /* MentionAtChar */
+ ));
+ else if (W === "/")
+ f.push(createTldUrlStateMachine(
+ h,
+ 11
+ /* ProtocolRelativeSlash1 */
+ ));
+ else if (W === "+")
+ f.push(createPhoneNumberStateMachine(
+ h,
+ 37
+ /* PhoneNumberPlus */
+ ));
+ else if (W === "(")
+ f.push(createPhoneNumberStateMachine(
+ h,
+ 32
+ /* PhoneNumberOpenParen */
+ ));
+ else {
+ if (digitRe.test(W) && (f.push(createPhoneNumberStateMachine(
+ h,
+ 38
+ /* PhoneNumberDigit */
+ )), f.push(createIpV4UrlStateMachine(
+ h,
+ 13
+ /* IpV4Digit */
+ ))), isEmailLocalPartStartChar(W)) {
+ var j = W.toLowerCase() === "m" ? 15 : 22;
+ f.push(createEmailStateMachine(h, j));
+ }
+ isSchemeStartChar(W) && f.push(createSchemeUrlStateMachine(
+ h,
+ 0
+ /* SchemeChar */
+ )), alphaNumericAndMarksRe.test(W) && f.push(createTldUrlStateMachine(
+ h,
+ 5
+ /* DomainLabelChar */
+ ));
+ }
+ }
+ function T(W, j) {
+ j === ":" ? W.state = 2 : j === "-" ? W.state = 1 : isSchemeChar(j) || remove$1(f, W);
+ }
+ function x(W, j) {
+ j === "-" || (j === "/" ? (remove$1(f, W), f.push(createTldUrlStateMachine(
+ h,
+ 11
+ /* ProtocolRelativeSlash1 */
+ ))) : isSchemeChar(j) ? W.state = 0 : remove$1(f, W));
+ }
+ function b(W, j) {
+ j === "/" ? W.state = 3 : j === "." ? remove$1(f, W) : isDomainLabelStartChar(j) ? (W.state = 5, isSchemeStartChar(j) && f.push(createSchemeUrlStateMachine(
+ h,
+ 0
+ /* SchemeChar */
+ ))) : remove$1(f, W);
+ }
+ function S(W, j) {
+ j === "/" ? W.state = 4 : isPathChar(j) ? (W.state = 10, W.acceptStateReached = !0) : xe(W);
+ }
+ function E(W, j) {
+ j === "/" ? W.state = 10 : isDomainLabelStartChar(j) ? (W.state = 5, W.acceptStateReached = !0) : remove$1(f, W);
+ }
+ function A(W, j) {
+ j === "/" ? W.state = 12 : remove$1(f, W);
+ }
+ function D(W, j) {
+ isDomainLabelStartChar(j) ? W.state = 5 : remove$1(f, W);
+ }
+ function P(W, j) {
+ j === "." ? W.state = 7 : j === "-" ? W.state = 6 : j === ":" ? W.state = 8 : isUrlSuffixStartChar(j) ? W.state = 10 : isDomainLabelChar(j) || xe(W);
+ }
+ function I(W, j) {
+ j === "-" || (j === "." ? xe(W) : isDomainLabelStartChar(j) ? W.state = 5 : xe(W));
+ }
+ function M(W, j) {
+ j === "." ? xe(W) : isDomainLabelStartChar(j) ? (W.state = 5, W.acceptStateReached = !0) : xe(W);
+ }
+ function R(W, j) {
+ j === "." ? W.state = 14 : j === ":" ? W.state = 8 : digitRe.test(j) || (isUrlSuffixStartChar(j) ? W.state = 10 : alphaNumericAndMarksRe.test(j) ? remove$1(f, W) : xe(W));
+ }
+ function L(W, j) {
+ digitRe.test(j) ? (W.octetsEncountered++, W.octetsEncountered === 4 && (W.acceptStateReached = !0), W.state = 13) : xe(W);
+ }
+ function g(W, j) {
+ digitRe.test(j) ? W.state = 9 : xe(W);
+ }
+ function w(W, j) {
+ digitRe.test(j) || (isUrlSuffixStartChar(j) ? W.state = 10 : xe(W));
+ }
+ function O(W, j) {
+ isPathChar(j) || xe(W);
+ }
+ function N(W, j) {
+ j.toLowerCase() === "a" ? W.state = 16 : G(W, j);
+ }
+ function F(W, j) {
+ j.toLowerCase() === "i" ? W.state = 17 : G(W, j);
+ }
+ function B(W, j) {
+ j.toLowerCase() === "l" ? W.state = 18 : G(W, j);
+ }
+ function V(W, j) {
+ j.toLowerCase() === "t" ? W.state = 19 : G(W, j);
+ }
+ function U(W, j) {
+ j.toLowerCase() === "o" ? W.state = 20 : G(W, j);
+ }
+ function k(W, j) {
+ j.toLowerCase() === ":" ? W.state = 21 : G(W, j);
+ }
+ function $(W, j) {
+ isEmailLocalPartChar(j) ? W.state = 22 : remove$1(f, W);
+ }
+ function G(W, j) {
+ j === "." ? W.state = 23 : j === "@" ? W.state = 24 : isEmailLocalPartChar(j) ? W.state = 22 : remove$1(f, W);
+ }
+ function q(W, j) {
+ j === "." || j === "@" ? remove$1(f, W) : isEmailLocalPartChar(j) ? W.state = 22 : remove$1(f, W);
+ }
+ function z(W, j) {
+ isDomainLabelStartChar(j) ? W.state = 25 : remove$1(f, W);
+ }
+ function H(W, j) {
+ j === "." ? W.state = 27 : j === "-" ? W.state = 26 : isDomainLabelChar(j) || xe(W);
+ }
+ function Q(W, j) {
+ j === "-" || j === "." ? xe(W) : isDomainLabelChar(j) ? W.state = 25 : xe(W);
+ }
+ function ne(W, j) {
+ j === "." || j === "-" ? xe(W) : isDomainLabelStartChar(j) ? (W.state = 25, W.acceptStateReached = !0) : xe(W);
+ }
+ function K(W, j) {
+ isHashtagTextChar(j) ? (W.state = 29, W.acceptStateReached = !0) : remove$1(f, W);
+ }
+ function Z(W, j) {
+ isHashtagTextChar(j) || xe(W);
+ }
+ function ee(W, j) {
+ isMentionTextChar(j) ? (W.state = 31, W.acceptStateReached = !0) : remove$1(f, W);
+ }
+ function oe(W, j) {
+ isMentionTextChar(j) || (alphaNumericAndMarksRe.test(j) ? remove$1(f, W) : xe(W));
+ }
+ function X(W, j) {
+ digitRe.test(j) ? W.state = 38 : (remove$1(f, W), C(j));
+ }
+ function fe(W, j) {
+ digitRe.test(j) ? W.state = 33 : remove$1(f, W), C(j);
+ }
+ function de(W, j) {
+ digitRe.test(j) ? W.state = 34 : remove$1(f, W);
+ }
+ function ce(W, j) {
+ digitRe.test(j) ? W.state = 35 : remove$1(f, W);
+ }
+ function ye(W, j) {
+ j === ")" ? W.state = 36 : remove$1(f, W);
+ }
+ function ge(W, j) {
+ digitRe.test(j) ? W.state = 38 : isPhoneNumberSeparatorChar(j) ? W.state = 39 : remove$1(f, W);
+ }
+ function re(W, j) {
+ W.acceptStateReached = !0, isPhoneNumberControlChar(j) ? W.state = 40 : j === "#" ? W.state = 41 : digitRe.test(j) || (j === "(" ? W.state = 32 : isPhoneNumberSeparatorChar(j) ? W.state = 39 : (xe(W), isSchemeStartChar(j) && f.push(createSchemeUrlStateMachine(
+ h,
+ 0
+ /* SchemeChar */
+ ))));
+ }
+ function be(W, j) {
+ digitRe.test(j) ? W.state = 38 : j === "(" ? W.state = 32 : (xe(W), C(j));
+ }
+ function pe(W, j) {
+ isPhoneNumberControlChar(j) || (j === "#" ? W.state = 41 : digitRe.test(j) ? W.state = 38 : xe(W));
+ }
+ function Te(W, j) {
+ isPhoneNumberControlChar(j) ? W.state = 40 : digitRe.test(j) ? remove$1(f, W) : xe(W);
+ }
+ function xe(W) {
+ if (remove$1(f, W), !!W.acceptStateReached) {
+ var j = W.startIdx, se = e.slice(W.startIdx, h);
+ if (se = excludeUnbalancedTrailingBracesAndPunctuation(se), W.type === "url") {
+ var Pe = e.charAt(W.startIdx - 1);
+ if (Pe === "@")
+ return;
+ var le = W.matchType;
+ if (le === "scheme") {
+ var De = httpSchemeRe.exec(se);
+ if (De && (j = j + De.index, se = se.slice(De.index)), !isValidSchemeUrl(se))
+ return;
+ } else if (le === "tld") {
+ if (!isValidTldMatch(se))
+ return;
+ } else if (le === "ipV4") {
+ if (!isValidIpV4Address(se))
+ return;
+ } else
+ assertNever(le);
+ l.push(new UrlMatch({
+ tagBuilder: n,
+ matchedText: se,
+ offset: j,
+ urlMatchType: le,
+ url: se,
+ protocolRelativeMatch: se.slice(0, 2) === "//",
+ // TODO: Do these settings need to be passed to the match,
+ // or should we handle them here in UrlMatcher?
+ stripPrefix: i,
+ stripTrailingSlash: r,
+ decodePercentEncoding: o
+ }));
+ } else if (W.type === "email")
+ isValidEmail(se) && l.push(new EmailMatch({
+ tagBuilder: n,
+ matchedText: se,
+ offset: j,
+ email: se.replace(mailtoSchemePrefixRe, "")
+ }));
+ else if (W.type === "hashtag")
+ isValidHashtag(se) && l.push(new HashtagMatch({
+ tagBuilder: n,
+ matchedText: se,
+ offset: j,
+ serviceName: s,
+ hashtag: se.slice(1)
+ }));
+ else if (W.type === "mention")
+ isValidMention(se, c) && l.push(new MentionMatch({
+ tagBuilder: n,
+ matchedText: se,
+ offset: j,
+ serviceName: c,
+ mention: se.slice(1)
+ // strip off the '@' character at the beginning
+ }));
+ else if (W.type === "phone") {
+ if (se = se.replace(/ +$/g, ""), isValidPhoneNumber(se)) {
+ var Me = se.replace(/[^0-9,;#]/g, "");
+ l.push(new PhoneMatch({
+ tagBuilder: n,
+ matchedText: se,
+ offset: j,
+ number: Me,
+ plusSign: se.charAt(0) === "+"
+ }));
+ }
+ } else
+ assertNever(W);
+ }
+ }
+}
+var openBraceRe = /[\(\{\[]/, closeBraceRe = /[\)\}\]]/, oppositeBrace = {
+ ")": "(",
+ "}": "{",
+ "]": "["
+};
+function excludeUnbalancedTrailingBracesAndPunctuation(e) {
+ for (var t = {
+ "(": 0,
+ "{": 0,
+ "[": 0
+ }, n = 0; n < e.length; n++) {
+ var i = e.charAt(n);
+ openBraceRe.test(i) ? t[i]++ : closeBraceRe.test(i) && t[oppositeBrace[i]]--;
+ }
+ for (var r = e.length - 1, o; r >= 0; )
+ if (o = e.charAt(r), closeBraceRe.test(o)) {
+ var s = oppositeBrace[o];
+ if (t[s] < 0)
+ t[s]++, r--;
+ else
+ break;
+ } else if (urlSuffixedCharsNotAllowedAtEndRe.test(o))
+ r--;
+ else
+ break;
+ return e.slice(0, r + 1);
+}
+function createSchemeUrlStateMachine(e, t) {
+ return {
+ type: "url",
+ startIdx: e,
+ state: t,
+ acceptStateReached: !1,
+ matchType: "scheme"
+ };
+}
+function createTldUrlStateMachine(e, t) {
+ return {
+ type: "url",
+ startIdx: e,
+ state: t,
+ acceptStateReached: !1,
+ matchType: "tld"
+ };
+}
+function createIpV4UrlStateMachine(e, t) {
+ return {
+ type: "url",
+ startIdx: e,
+ state: t,
+ acceptStateReached: !1,
+ matchType: "ipV4",
+ octetsEncountered: 1
+ // starts at 1 because we create this machine when encountering the first octet
+ };
+}
+function createEmailStateMachine(e, t) {
+ return {
+ type: "email",
+ startIdx: e,
+ state: t,
+ acceptStateReached: !1
+ };
+}
+function createHashtagStateMachine(e, t) {
+ return {
+ type: "hashtag",
+ startIdx: e,
+ state: t,
+ acceptStateReached: !1
+ };
+}
+function createMentionStateMachine(e, t) {
+ return {
+ type: "mention",
+ startIdx: e,
+ state: t,
+ acceptStateReached: !1
+ };
+}
+function createPhoneNumberStateMachine(e, t) {
+ return {
+ type: "phone",
+ startIdx: e,
+ state: t,
+ acceptStateReached: !1
+ };
+}
+function parseHtml(e, t) {
+ for (var n = t.onOpenTag, i = t.onCloseTag, r = t.onText, o = t.onComment, s = t.onDoctype, c = new CurrentTag(), l = 0, d = e.length, f = 0, h = 0, p = c; l < d; ) {
+ var m = e.charAt(l);
+ switch (f) {
+ case 0:
+ _(m);
+ break;
+ case 1:
+ y(m);
+ break;
+ case 2:
+ T(m);
+ break;
+ case 3:
+ C(m);
+ break;
+ case 4:
+ x(m);
+ break;
+ case 5:
+ b(m);
+ break;
+ case 6:
+ S(m);
+ break;
+ case 7:
+ E(m);
+ break;
+ case 8:
+ A(m);
+ break;
+ case 9:
+ D(m);
+ break;
+ case 10:
+ P(m);
+ break;
+ case 11:
+ I(m);
+ break;
+ case 12:
+ M(m);
+ break;
+ case 13:
+ R();
+ break;
+ case 14:
+ L(m);
+ break;
+ case 15:
+ g(m);
+ break;
+ case 16:
+ w(m);
+ break;
+ case 17:
+ O(m);
+ break;
+ case 18:
+ N(m);
+ break;
+ case 19:
+ F(m);
+ break;
+ case 20:
+ B(m);
+ break;
+ default:
+ assertNever(f);
+ }
+ l++;
+ }
+ h < l && $();
+ function _(z) {
+ z === "<" && U();
+ }
+ function y(z) {
+ z === "!" ? f = 13 : z === "/" ? (f = 2, p = new CurrentTag(__assign(__assign({}, p), { isClosing: !0 }))) : z === "<" ? U() : letterRe.test(z) ? (f = 3, p = new CurrentTag(__assign(__assign({}, p), { isOpening: !0 }))) : (f = 0, p = c);
+ }
+ function C(z) {
+ whitespaceRe.test(z) ? (p = new CurrentTag(__assign(__assign({}, p), { name: G() })), f = 4) : z === "<" ? U() : z === "/" ? (p = new CurrentTag(__assign(__assign({}, p), { name: G() })), f = 12) : z === ">" ? (p = new CurrentTag(__assign(__assign({}, p), { name: G() })), k()) : !letterRe.test(z) && !digitRe.test(z) && z !== ":" && V();
+ }
+ function T(z) {
+ z === ">" ? V() : letterRe.test(z) ? f = 3 : V();
+ }
+ function x(z) {
+ whitespaceRe.test(z) || (z === "/" ? f = 12 : z === ">" ? k() : z === "<" ? U() : z === "=" || quoteRe.test(z) || controlCharsRe.test(z) ? V() : f = 5);
+ }
+ function b(z) {
+ whitespaceRe.test(z) ? f = 6 : z === "/" ? f = 12 : z === "=" ? f = 7 : z === ">" ? k() : z === "<" ? U() : quoteRe.test(z) && V();
+ }
+ function S(z) {
+ whitespaceRe.test(z) || (z === "/" ? f = 12 : z === "=" ? f = 7 : z === ">" ? k() : z === "<" ? U() : quoteRe.test(z) ? V() : f = 5);
+ }
+ function E(z) {
+ whitespaceRe.test(z) || (z === '"' ? f = 8 : z === "'" ? f = 9 : /[>=`]/.test(z) ? V() : z === "<" ? U() : f = 10);
+ }
+ function A(z) {
+ z === '"' && (f = 11);
+ }
+ function D(z) {
+ z === "'" && (f = 11);
+ }
+ function P(z) {
+ whitespaceRe.test(z) ? f = 4 : z === ">" ? k() : z === "<" && U();
+ }
+ function I(z) {
+ whitespaceRe.test(z) ? f = 4 : z === "/" ? f = 12 : z === ">" ? k() : z === "<" ? U() : (f = 4, q());
+ }
+ function M(z) {
+ z === ">" ? (p = new CurrentTag(__assign(__assign({}, p), { isClosing: !0 })), k()) : f = 4;
+ }
+ function R(z) {
+ e.substr(l, 2) === "--" ? (l += 2, p = new CurrentTag(__assign(__assign({}, p), { type: "comment" })), f = 14) : e.substr(l, 7).toUpperCase() === "DOCTYPE" ? (l += 7, p = new CurrentTag(__assign(__assign({}, p), { type: "doctype" })), f = 20) : V();
+ }
+ function L(z) {
+ z === "-" ? f = 15 : z === ">" ? V() : f = 16;
+ }
+ function g(z) {
+ z === "-" ? f = 18 : z === ">" ? V() : f = 16;
+ }
+ function w(z) {
+ z === "-" && (f = 17);
+ }
+ function O(z) {
+ z === "-" ? f = 18 : f = 16;
+ }
+ function N(z) {
+ z === ">" ? k() : z === "!" ? f = 19 : z === "-" || (f = 16);
+ }
+ function F(z) {
+ z === "-" ? f = 17 : z === ">" ? k() : f = 16;
+ }
+ function B(z) {
+ z === ">" ? k() : z === "<" && U();
+ }
+ function V() {
+ f = 0, p = c;
+ }
+ function U() {
+ f = 1, p = new CurrentTag({ idx: l });
+ }
+ function k() {
+ var z = e.slice(h, p.idx);
+ z && r(z, h), p.type === "comment" ? o(p.idx) : p.type === "doctype" ? s(p.idx) : (p.isOpening && n(p.name, p.idx), p.isClosing && i(p.name, p.idx)), V(), h = l + 1;
+ }
+ function $() {
+ var z = e.slice(h, l);
+ r(z, h), h = l + 1;
+ }
+ function G() {
+ var z = p.idx + (p.isClosing ? 2 : 1);
+ return e.slice(z, l).toLowerCase();
+ }
+ function q() {
+ l--;
+ }
+}
+var CurrentTag = (
+ /** @class */
+ /* @__PURE__ */ function() {
+ function e(t) {
+ t === void 0 && (t = {}), this.idx = t.idx !== void 0 ? t.idx : -1, this.type = t.type || "tag", this.name = t.name || "", this.isOpening = !!t.isOpening, this.isClosing = !!t.isClosing;
+ }
+ return e;
+ }()
+), Autolinker = (
+ /** @class */
+ function() {
+ function e(t) {
+ t === void 0 && (t = {}), this.version = e.version, this.urls = {}, this.email = !0, this.phone = !0, this.hashtag = !1, this.mention = !1, this.newWindow = !0, this.stripPrefix = {
+ scheme: !0,
+ www: !0
+ }, this.stripTrailingSlash = !0, this.decodePercentEncoding = !0, this.truncate = {
+ length: 0,
+ location: "end"
+ }, this.className = "", this.replaceFn = null, this.context = void 0, this.sanitizeHtml = !1, this.tagBuilder = null, this.urls = normalizeUrlsCfg(t.urls), this.email = isBoolean(t.email) ? t.email : this.email, this.phone = isBoolean(t.phone) ? t.phone : this.phone, this.hashtag = t.hashtag || this.hashtag, this.mention = t.mention || this.mention, this.newWindow = isBoolean(t.newWindow) ? t.newWindow : this.newWindow, this.stripPrefix = normalizeStripPrefixCfg(t.stripPrefix), this.stripTrailingSlash = isBoolean(t.stripTrailingSlash) ? t.stripTrailingSlash : this.stripTrailingSlash, this.decodePercentEncoding = isBoolean(t.decodePercentEncoding) ? t.decodePercentEncoding : this.decodePercentEncoding, this.sanitizeHtml = t.sanitizeHtml || !1;
+ var n = this.mention;
+ if (n !== !1 && mentionServices.indexOf(n) === -1)
+ throw new Error("invalid `mention` cfg '".concat(n, "' - see docs"));
+ var i = this.hashtag;
+ if (i !== !1 && hashtagServices.indexOf(i) === -1)
+ throw new Error("invalid `hashtag` cfg '".concat(i, "' - see docs"));
+ this.truncate = normalizeTruncateCfg(t.truncate), this.className = t.className || this.className, this.replaceFn = t.replaceFn || this.replaceFn, this.context = t.context || this;
+ }
+ return e.link = function(t, n) {
+ var i = new e(n);
+ return i.link(t);
+ }, e.parse = function(t, n) {
+ var i = new e(n);
+ return i.parse(t);
+ }, e.prototype.parse = function(t) {
+ var n = this, i = ["a", "style", "script"], r = 0, o = [];
+ return parseHtml(t, {
+ onOpenTag: function(s) {
+ i.indexOf(s) >= 0 && r++;
+ },
+ onText: function(s, c) {
+ if (r === 0) {
+ var l = /( | |<|<|>|>|"|"|')/gi, d = s.split(l), f = c;
+ d.forEach(function(h, p) {
+ if (p % 2 === 0) {
+ var m = n.parseText(h, f);
+ o.push.apply(o, m);
+ }
+ f += h.length;
+ });
+ }
+ },
+ onCloseTag: function(s) {
+ i.indexOf(s) >= 0 && (r = Math.max(r - 1, 0));
+ },
+ onComment: function(s) {
+ },
+ onDoctype: function(s) {
+ }
+ // no need to process doctype nodes
+ }), o = this.compactMatches(o), o = this.removeUnwantedMatches(o), o;
+ }, e.prototype.compactMatches = function(t) {
+ t.sort(function(l, d) {
+ return l.getOffset() - d.getOffset();
+ });
+ for (var n = 0; n < t.length - 1; ) {
+ var i = t[n], r = i.getOffset(), o = i.getMatchedText().length, s = r + o;
+ if (n + 1 < t.length) {
+ if (t[n + 1].getOffset() === r) {
+ var c = t[n + 1].getMatchedText().length > o ? n : n + 1;
+ t.splice(c, 1);
+ continue;
+ }
+ if (t[n + 1].getOffset() < s) {
+ t.splice(n + 1, 1);
+ continue;
+ }
+ }
+ n++;
+ }
+ return t;
+ }, e.prototype.removeUnwantedMatches = function(t) {
+ return this.hashtag || removeWithPredicate(t, function(n) {
+ return n.getType() === "hashtag";
+ }), this.email || removeWithPredicate(t, function(n) {
+ return n.getType() === "email";
+ }), this.phone || removeWithPredicate(t, function(n) {
+ return n.getType() === "phone";
+ }), this.mention || removeWithPredicate(t, function(n) {
+ return n.getType() === "mention";
+ }), this.urls.schemeMatches || removeWithPredicate(t, function(n) {
+ return n.getType() === "url" && n.getUrlMatchType() === "scheme";
+ }), this.urls.tldMatches || removeWithPredicate(t, function(n) {
+ return n.getType() === "url" && n.getUrlMatchType() === "tld";
+ }), this.urls.ipV4Matches || removeWithPredicate(t, function(n) {
+ return n.getType() === "url" && n.getUrlMatchType() === "ipV4";
+ }), t;
+ }, e.prototype.parseText = function(t, n) {
+ n === void 0 && (n = 0), n = n || 0;
+ for (var i = parseMatches(t, {
+ tagBuilder: this.getTagBuilder(),
+ stripPrefix: this.stripPrefix,
+ stripTrailingSlash: this.stripTrailingSlash,
+ decodePercentEncoding: this.decodePercentEncoding,
+ hashtagServiceName: this.hashtag,
+ mentionServiceName: this.mention || "twitter"
+ }), r = 0, o = i.length; r < o; r++)
+ i[r].setOffset(n + i[r].getOffset());
+ return i;
+ }, e.prototype.link = function(t) {
+ if (!t)
+ return "";
+ this.sanitizeHtml && (t = t.replace(//g, ">"));
+ for (var n = this.parse(t), i = [], r = 0, o = 0, s = n.length; o < s; o++) {
+ var c = n[o];
+ i.push(t.substring(r, c.getOffset())), i.push(this.createMatchReturnVal(c)), r = c.getOffset() + c.getMatchedText().length;
+ }
+ return i.push(t.substring(r)), i.join("");
+ }, e.prototype.createMatchReturnVal = function(t) {
+ var n;
+ if (this.replaceFn && (n = this.replaceFn.call(this.context, t)), typeof n == "string")
+ return n;
+ if (n === !1)
+ return t.getMatchedText();
+ if (n instanceof HtmlTag)
+ return n.toAnchorString();
+ var i = t.buildTag();
+ return i.toAnchorString();
+ }, e.prototype.getTagBuilder = function() {
+ var t = this.tagBuilder;
+ return t || (t = this.tagBuilder = new AnchorTagBuilder({
+ newWindow: this.newWindow,
+ truncate: this.truncate,
+ className: this.className
+ })), t;
+ }, e.version = version, e;
+ }()
+);
+function normalizeUrlsCfg(e) {
+ return e == null && (e = !0), isBoolean(e) ? { schemeMatches: e, tldMatches: e, ipV4Matches: e } : {
+ schemeMatches: isBoolean(e.schemeMatches) ? e.schemeMatches : !0,
+ tldMatches: isBoolean(e.tldMatches) ? e.tldMatches : !0,
+ ipV4Matches: isBoolean(e.ipV4Matches) ? e.ipV4Matches : !0
+ };
+}
+function normalizeStripPrefixCfg(e) {
+ return e == null && (e = !0), isBoolean(e) ? { scheme: e, www: e } : {
+ scheme: isBoolean(e.scheme) ? e.scheme : !0,
+ www: isBoolean(e.www) ? e.www : !0
+ };
+}
+function normalizeTruncateCfg(e) {
+ return typeof e == "number" ? { length: e, location: "end" } : defaults(e || {}, {
+ length: Number.POSITIVE_INFINITY,
+ location: "end"
+ });
+}
+let parser$1;
+typeof DOMParser < "u" && (parser$1 = new DOMParser());
+const autolinker$1 = new Autolinker({
+ stripPrefix: !1,
+ email: !1,
+ replaceFn: function(e, t) {
+ return t.urlMatchType === "scheme" || t.urlMatchType === "www";
+ }
+}), BILLBOARD_SIZE$2 = 32, BILLBOARD_NEAR_DISTANCE$1 = 2414016, BILLBOARD_NEAR_RATIO$1 = 1, BILLBOARD_FAR_DISTANCE$1 = 16093e3, BILLBOARD_FAR_RATIO$1 = 0.1, gpxNamespaces = [null, void 0, "http://www.topografix.com/GPX/1/1"], namespaces$1 = {
+ gpx: gpxNamespaces
+};
+function readBlobAsText$1(e) {
+ return new Promise((t, n) => {
+ const i = new FileReader();
+ i.addEventListener("load", function() {
+ t(i.result);
+ }), i.addEventListener("error", function() {
+ n(i.error);
+ }), i.readAsText(e);
+ });
+}
+function getOrCreateEntity(e, t) {
+ let n = queryStringAttribute$1(e, "id");
+ return n = defined(n) ? n : createGuid(), t.getOrCreateEntity(n);
+}
+function readCoordinateFromNode(e) {
+ const t = queryNumericAttribute$1(e, "lon"), n = queryNumericAttribute$1(e, "lat"), i = queryNumericValue$1(e, "ele", namespaces$1.gpx);
+ return Cartesian3.fromDegrees(t, n, i);
+}
+function queryNumericAttribute$1(e, t) {
+ if (!defined(e))
+ return;
+ const n = e.getAttribute(t);
+ if (n !== null) {
+ const i = parseFloat(n);
+ return isNaN(i) ? void 0 : i;
+ }
+}
+function queryStringAttribute$1(e, t) {
+ if (!defined(e))
+ return;
+ const n = e.getAttribute(t);
+ return n !== null ? n : void 0;
+}
+function queryFirstNode$1(e, t, n) {
+ if (!defined(e))
+ return;
+ const i = e.childNodes, r = i.length;
+ for (let o = 0; o < r; o++) {
+ const s = i[o];
+ if (s.localName === t && n.indexOf(s.namespaceURI) !== -1)
+ return s;
+ }
+}
+function queryNodes$1(e, t, n) {
+ if (!defined(e))
+ return;
+ const i = [], r = e.getElementsByTagName(t), o = r.length;
+ for (let s = 0; s < o; s++) {
+ const c = r[s];
+ c.localName === t && n.indexOf(c.namespaceURI) !== -1 && i.push(c);
+ }
+ return i;
+}
+function queryNumericValue$1(e, t, n) {
+ const i = queryFirstNode$1(e, t, n);
+ if (defined(i)) {
+ const r = parseFloat(i.textContent);
+ return isNaN(r) ? void 0 : r;
+ }
+}
+function queryStringValue$1(e, t, n) {
+ const i = queryFirstNode$1(e, t, n);
+ if (defined(i))
+ return i.textContent.trim();
+}
+function createDefaultBillboard$1(e) {
+ const t = new BillboardGraphics();
+ return t.width = BILLBOARD_SIZE$2, t.height = BILLBOARD_SIZE$2, t.scaleByDistance = new NearFarScalar(
+ BILLBOARD_NEAR_DISTANCE$1,
+ BILLBOARD_NEAR_RATIO$1,
+ BILLBOARD_FAR_DISTANCE$1,
+ BILLBOARD_FAR_RATIO$1
+ ), t.pixelOffsetScaleByDistance = new NearFarScalar(
+ BILLBOARD_NEAR_DISTANCE$1,
+ BILLBOARD_NEAR_RATIO$1,
+ BILLBOARD_FAR_DISTANCE$1,
+ BILLBOARD_FAR_RATIO$1
+ ), t.verticalOrigin = new ConstantProperty(VerticalOrigin$1.BOTTOM), t.image = e, t;
+}
+function createDefaultLabel$1() {
+ const e = new LabelGraphics();
+ return e.translucencyByDistance = new NearFarScalar(3e6, 1, 5e6, 0), e.pixelOffset = new Cartesian2(17, 0), e.horizontalOrigin = HorizontalOrigin$1.LEFT, e.font = "16px sans-serif", e.style = LabelStyle$1.FILL_AND_OUTLINE, e;
+}
+function createDefaultPolyline(e) {
+ const t = new PolylineGraphics();
+ return t.width = 4, t.material = new PolylineOutlineMaterialProperty(), t.material.color = defined(e) ? e : Color.RED, t.material.outlineWidth = 2, t.material.outlineColor = Color.BLACK, t;
+}
+const descriptiveInfoTypes = {
+ time: {
+ text: "Time",
+ tag: "time"
+ },
+ comment: {
+ text: "Comment",
+ tag: "cmt"
+ },
+ description: {
+ text: "Description",
+ tag: "desc"
+ },
+ source: {
+ text: "Source",
+ tag: "src"
+ },
+ number: {
+ text: "GPS track/route number",
+ tag: "number"
+ },
+ type: {
+ text: "Type",
+ tag: "type"
+ }
+};
+let scratchDiv$1;
+typeof document < "u" && (scratchDiv$1 = document.createElement("div"));
+function processDescription$1(e, t) {
+ let n, i = "";
+ const r = Object.keys(descriptiveInfoTypes), o = r.length;
+ for (n = 0; n < o; n++) {
+ const f = r[n], h = descriptiveInfoTypes[f];
+ h.value = defaultValue(
+ queryStringValue$1(e, h.tag, namespaces$1.gpx),
+ ""
+ ), defined(h.value) && h.value !== "" && (i = `${i}${h.text}: ${h.value}
`); + } + if (!defined(i) || i === "") + return; + i = autolinker$1.link(i), scratchDiv$1.innerHTML = i; + const s = scratchDiv$1.querySelectorAll("a"); + for (n = 0; n < s.length; n++) + s[n].setAttribute("target", "_blank"); + const c = Color.WHITE, l = Color.BLACK; + let d = '| ${defaultValue( + y.displayName, + s + )} | ${defaultValue(y.value, "")} |
|---|
| ${r} | ${t(o)} |
| ${r} | ${o} |
{z}: The level of the tile in the tiling scheme. Level zero is the root of the quadtree pyramid.{x}: The tile X coordinate in the tiling scheme, where 0 is the Westernmost tile.{y}: The tile Y coordinate in the tiling scheme, where 0 is the Northernmost tile.{s}: One of the available subdomains, used to overcome browser limits on the number of simultaneous requests per host.{reverseX}: The tile X coordinate in the tiling scheme, where 0 is the Easternmost tile.{reverseY}: The tile Y coordinate in the tiling scheme, where 0 is the Southernmost tile.{reverseZ}: The level of the tile in the tiling scheme, where level zero is the maximum level of the quadtree pyramid. In order to use reverseZ, maximumLevel must be defined.{westDegrees}: The Western edge of the tile in geodetic degrees.{southDegrees}: The Southern edge of the tile in geodetic degrees.{eastDegrees}: The Eastern edge of the tile in geodetic degrees.{northDegrees}: The Northern edge of the tile in geodetic degrees.{westProjected}: The Western edge of the tile in projected coordinates of the tiling scheme.{southProjected}: The Southern edge of the tile in projected coordinates of the tiling scheme.{eastProjected}: The Eastern edge of the tile in projected coordinates of the tiling scheme.{northProjected}: The Northern edge of the tile in projected coordinates of the tiling scheme.{width}: The width of each tile in pixels.{height}: The height of each tile in pixels.{z}: The zero padding for the level of the tile in the tiling scheme.{x}: The zero padding for the tile X coordinate in the tiling scheme.{y}: The zero padding for the the tile Y coordinate in the tiling scheme.{reverseX}: The zero padding for the tile reverseX coordinate in the tiling scheme.{reverseY}: The zero padding for the tile reverseY coordinate in the tiling scheme.{reverseZ}: The zero padding for the reverseZ coordinate of the tile in the tiling scheme.{i}: The pixel column (horizontal coordinate) of the picked position, where the Westernmost pixel is 0.{j}: The pixel row (vertical coordinate) of the picked position, where the Northernmost pixel is 0.{reverseI}: The pixel column (horizontal coordinate) of the picked position, where the Easternmost pixel is 0.{reverseJ}: The pixel row (vertical coordinate) of the picked position, where the Southernmost pixel is 0.{longitudeDegrees}: The longitude of the picked position in degrees.{latitudeDegrees}: The latitude of the picked position in degrees.{longitudeProjected}: The longitude of the picked position in the projected coordinates of the tiling scheme.{latitudeProjected}: The latitude of the picked position in the projected coordinates of the tiling scheme.{format}: The format in which to get feature information, as specified in the {@link GetFeatureInfoFormat}.GetFeatureInfo service on the WMS server and attempt to interpret the features included in the response. If false,
+ * {@link WebMapServiceImageryProvider#pickFeatures} will immediately return undefined (indicating no pickable
+ * features) without communicating with the server. Set this property to false if you know your data
+ * source does not support picking features or if you don't want this provider's features to be pickable.
+ * @memberof WebMapServiceImageryProvider.prototype
+ * @type {boolean}
+ * @default true
+ */
+ enablePickFeatures: {
+ get: function() {
+ return this._tileProvider.enablePickFeatures;
+ },
+ set: function(e) {
+ this._tileProvider.enablePickFeatures = e;
+ }
+ },
+ /**
+ * Gets or sets a clock that is used to get keep the time used for time dynamic parameters.
+ * @memberof WebMapServiceImageryProvider.prototype
+ * @type {Clock}
+ */
+ clock: {
+ get: function() {
+ return this._timeDynamicImagery.clock;
+ },
+ set: function(e) {
+ this._timeDynamicImagery.clock = e;
+ }
+ },
+ /**
+ * Gets or sets a time interval collection that is used to get time dynamic parameters. The data of each
+ * TimeInterval is an object containing the keys and values of the properties that are used during
+ * tile requests.
+ * @memberof WebMapServiceImageryProvider.prototype
+ * @type {TimeIntervalCollection}
+ */
+ times: {
+ get: function() {
+ return this._timeDynamicImagery.times;
+ },
+ set: function(e) {
+ this._timeDynamicImagery.times = e;
+ }
+ },
+ /**
+ * Gets the getFeatureInfo URL of the WMS server.
+ * @memberof WebMapServiceImageryProvider.prototype
+ * @type {Resource|string}
+ * @readonly
+ */
+ getFeatureInfoUrl: {
+ get: function() {
+ return this._getFeatureInfoUrl;
+ }
+ }
+});
+WebMapServiceImageryProvider.prototype.getTileCredits = function(e, t, n) {
+ return this._tileProvider.getTileCredits(e, t, n);
+};
+WebMapServiceImageryProvider.prototype.requestImage = function(e, t, n, i) {
+ let r;
+ const o = this._timeDynamicImagery;
+ let s;
+ return defined(o) && (s = o.currentInterval, r = o.getFromCache(e, t, n, i)), defined(r) || (r = requestImage$1(this, e, t, n, i, s)), defined(r) && defined(o) && o.checkApproachingInterval(e, t, n, i), r;
+};
+WebMapServiceImageryProvider.prototype.pickFeatures = function(e, t, n, i, r) {
+ const o = this._timeDynamicImagery, s = defined(o) ? o.currentInterval : void 0;
+ return pickFeatures(this, e, t, n, i, r, s);
+};
+WebMapServiceImageryProvider.DefaultParameters = Object.freeze({
+ service: "WMS",
+ version: "1.1.1",
+ request: "GetMap",
+ styles: "",
+ format: "image/jpeg"
+});
+WebMapServiceImageryProvider.GetFeatureInfoDefaultParameters = Object.freeze({
+ service: "WMS",
+ version: "1.1.1",
+ request: "GetFeatureInfo"
+});
+WebMapServiceImageryProvider.DefaultGetFeatureInfoFormats = Object.freeze([
+ Object.freeze(new GetFeatureInfoFormat("json", "application/json")),
+ Object.freeze(new GetFeatureInfoFormat("xml", "text/xml")),
+ Object.freeze(new GetFeatureInfoFormat("text", "text/html"))
+]);
+function objectToLowercase(e) {
+ const t = {};
+ for (const n in e)
+ e.hasOwnProperty(n) && (t[n.toLowerCase()] = e[n]);
+ return t;
+}
+const defaultParameters = Object.freeze({
+ service: "WMTS",
+ version: "1.0.0",
+ request: "GetTile"
+});
+function WebMapTileServiceImageryProvider(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._defaultAlpha = void 0, this._defaultNightAlpha = void 0, this._defaultDayAlpha = void 0, this._defaultBrightness = void 0, this._defaultContrast = void 0, this._defaultHue = void 0, this._defaultSaturation = void 0, this._defaultGamma = void 0, this._defaultMinificationFilter = void 0, this._defaultMagnificationFilter = void 0;
+ const t = Resource.createIfNeeded(e.url), n = e.style, i = e.tileMatrixSetID, r = t.url, o = r.match(/{/g);
+ if (!defined(o) || o.length === 1 && /{s}/.test(r))
+ t.setQueryParameters(defaultParameters), this._useKvp = !0;
+ else {
+ const f = {
+ style: n,
+ Style: n,
+ TileMatrixSet: i
+ };
+ t.setTemplateValues(f), this._useKvp = !1;
+ }
+ this._resource = t, this._layer = e.layer, this._style = n, this._tileMatrixSetID = i, this._tileMatrixLabels = e.tileMatrixLabels, this._format = defaultValue(e.format, "image/jpeg"), this._tileDiscardPolicy = e.tileDiscardPolicy, this._tilingScheme = defined(e.tilingScheme) ? e.tilingScheme : new WebMercatorTilingScheme({ ellipsoid: e.ellipsoid }), this._tileWidth = defaultValue(e.tileWidth, 256), this._tileHeight = defaultValue(e.tileHeight, 256), this._minimumLevel = defaultValue(e.minimumLevel, 0), this._maximumLevel = e.maximumLevel, this._rectangle = defaultValue(
+ e.rectangle,
+ this._tilingScheme.rectangle
+ ), this._dimensions = e.dimensions;
+ const s = this;
+ this._reload = void 0, defined(e.times) && (this._timeDynamicImagery = new TimeDynamicImagery({
+ clock: e.clock,
+ times: e.times,
+ requestImageFunction: function(f, h, p, m, _) {
+ return requestImage(s, f, h, p, m, _);
+ },
+ reloadFunction: function() {
+ defined(s._reload) && s._reload();
+ }
+ }));
+ const c = this._tilingScheme.positionToTileXY(
+ Rectangle.southwest(this._rectangle),
+ this._minimumLevel
+ ), l = this._tilingScheme.positionToTileXY(
+ Rectangle.northeast(this._rectangle),
+ this._minimumLevel
+ );
+ (Math.abs(l.x - c.x) + 1) * (Math.abs(l.y - c.y) + 1), this._errorEvent = new Event();
+ const d = e.credit;
+ this._credit = typeof d == "string" ? new Credit(d) : d, this._subdomains = e.subdomains, Array.isArray(this._subdomains) ? this._subdomains = this._subdomains.slice() : defined(this._subdomains) && this._subdomains.length > 0 ? this._subdomains = this._subdomains.split("") : this._subdomains = ["a", "b", "c"];
+}
+function requestImage(e, t, n, i, r, o) {
+ const s = e._tileMatrixLabels, c = defined(s) ? s[i] : i.toString(), l = e._subdomains, d = e._dimensions, f = defined(o) ? o.data : void 0;
+ let h, p;
+ if (!e._useKvp)
+ p = {
+ TileMatrix: c,
+ TileRow: n.toString(),
+ TileCol: t.toString(),
+ s: l[(t + n + i) % l.length]
+ }, h = e._resource.getDerivedResource({
+ request: r
+ }), h.setTemplateValues(p), defined(d) && h.setTemplateValues(d), defined(f) && h.setTemplateValues(f);
+ else {
+ let m = {};
+ m.tilematrix = c, m.layer = e._layer, m.style = e._style, m.tilerow = n, m.tilecol = t, m.tilematrixset = e._tileMatrixSetID, m.format = e._format, defined(d) && (m = combine$2(m, d)), defined(f) && (m = combine$2(m, f)), p = {
+ s: l[(t + n + i) % l.length]
+ }, h = e._resource.getDerivedResource({
+ queryParameters: m,
+ request: r
+ }), h.setTemplateValues(p);
+ }
+ return ImageryProvider.loadImage(e, h);
+}
+Object.defineProperties(WebMapTileServiceImageryProvider.prototype, {
+ /**
+ * Gets the URL of the service hosting the imagery.
+ * @memberof WebMapTileServiceImageryProvider.prototype
+ * @type {string}
+ * @readonly
+ */
+ url: {
+ get: function() {
+ return this._resource.url;
+ }
+ },
+ /**
+ * Gets the proxy used by this provider.
+ * @memberof WebMapTileServiceImageryProvider.prototype
+ * @type {Proxy}
+ * @readonly
+ */
+ proxy: {
+ get: function() {
+ return this._resource.proxy;
+ }
+ },
+ /**
+ * Gets the width of each tile, in pixels.
+ * @memberof WebMapTileServiceImageryProvider.prototype
+ * @type {number}
+ * @readonly
+ */
+ tileWidth: {
+ get: function() {
+ return this._tileWidth;
+ }
+ },
+ /**
+ * Gets the height of each tile, in pixels.
+ * @memberof WebMapTileServiceImageryProvider.prototype
+ * @type {number}
+ * @readonly
+ */
+ tileHeight: {
+ get: function() {
+ return this._tileHeight;
+ }
+ },
+ /**
+ * Gets the maximum level-of-detail that can be requested.
+ * @memberof WebMapTileServiceImageryProvider.prototype
+ * @type {number|undefined}
+ * @readonly
+ */
+ maximumLevel: {
+ get: function() {
+ return this._maximumLevel;
+ }
+ },
+ /**
+ * Gets the minimum level-of-detail that can be requested.
+ * @memberof WebMapTileServiceImageryProvider.prototype
+ * @type {number}
+ * @readonly
+ */
+ minimumLevel: {
+ get: function() {
+ return this._minimumLevel;
+ }
+ },
+ /**
+ * Gets the tiling scheme used by this provider.
+ * @memberof WebMapTileServiceImageryProvider.prototype
+ * @type {TilingScheme}
+ * @readonly
+ */
+ tilingScheme: {
+ get: function() {
+ return this._tilingScheme;
+ }
+ },
+ /**
+ * Gets the rectangle, in radians, of the imagery provided by this instance.
+ * @memberof WebMapTileServiceImageryProvider.prototype
+ * @type {Rectangle}
+ * @readonly
+ */
+ rectangle: {
+ get: function() {
+ return this._rectangle;
+ }
+ },
+ /**
+ * Gets the tile discard policy. If not undefined, the discard policy is responsible
+ * for filtering out "missing" tiles via its shouldDiscardImage function. If this function
+ * returns undefined, no tiles are filtered.
+ * @memberof WebMapTileServiceImageryProvider.prototype
+ * @type {TileDiscardPolicy}
+ * @readonly
+ */
+ tileDiscardPolicy: {
+ get: function() {
+ return this._tileDiscardPolicy;
+ }
+ },
+ /**
+ * Gets an event that is raised when the imagery provider encounters an asynchronous error. By subscribing
+ * to the event, you will be notified of the error and can potentially recover from it. Event listeners
+ * are passed an instance of {@link TileProviderError}.
+ * @memberof WebMapTileServiceImageryProvider.prototype
+ * @type {Event}
+ * @readonly
+ */
+ errorEvent: {
+ get: function() {
+ return this._errorEvent;
+ }
+ },
+ /**
+ * Gets the mime type of images returned by this imagery provider.
+ * @memberof WebMapTileServiceImageryProvider.prototype
+ * @type {string}
+ * @readonly
+ */
+ format: {
+ get: function() {
+ return this._format;
+ }
+ },
+ /**
+ * Gets the credit to display when this imagery provider is active. Typically this is used to credit
+ * the source of the imagery.
+ * @memberof WebMapTileServiceImageryProvider.prototype
+ * @type {Credit}
+ * @readonly
+ */
+ credit: {
+ get: function() {
+ return this._credit;
+ }
+ },
+ /**
+ * Gets a value indicating whether or not the images provided by this imagery provider
+ * include an alpha channel. If this property is false, an alpha channel, if present, will
+ * be ignored. If this property is true, any images without an alpha channel will be treated
+ * as if their alpha is 1.0 everywhere. When this property is false, memory usage
+ * and texture upload time are reduced.
+ * @memberof WebMapTileServiceImageryProvider.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ hasAlphaChannel: {
+ get: function() {
+ return !0;
+ }
+ },
+ /**
+ * Gets or sets a clock that is used to get keep the time used for time dynamic parameters.
+ * @memberof WebMapTileServiceImageryProvider.prototype
+ * @type {Clock}
+ */
+ clock: {
+ get: function() {
+ return this._timeDynamicImagery.clock;
+ },
+ set: function(e) {
+ this._timeDynamicImagery.clock = e;
+ }
+ },
+ /**
+ * Gets or sets a time interval collection that is used to get time dynamic parameters. The data of each
+ * TimeInterval is an object containing the keys and values of the properties that are used during
+ * tile requests.
+ * @memberof WebMapTileServiceImageryProvider.prototype
+ * @type {TimeIntervalCollection}
+ */
+ times: {
+ get: function() {
+ return this._timeDynamicImagery.times;
+ },
+ set: function(e) {
+ this._timeDynamicImagery.times = e;
+ }
+ },
+ /**
+ * Gets or sets an object that contains static dimensions and their values.
+ * @memberof WebMapTileServiceImageryProvider.prototype
+ * @type {object}
+ */
+ dimensions: {
+ get: function() {
+ return this._dimensions;
+ },
+ set: function(e) {
+ this._dimensions !== e && (this._dimensions = e, defined(this._reload) && this._reload());
+ }
+ }
+});
+WebMapTileServiceImageryProvider.prototype.getTileCredits = function(e, t, n) {
+};
+WebMapTileServiceImageryProvider.prototype.requestImage = function(e, t, n, i) {
+ let r;
+ const o = this._timeDynamicImagery;
+ let s;
+ return defined(o) && (s = o.currentInterval, r = o.getFromCache(e, t, n, i)), defined(r) || (r = requestImage(this, e, t, n, i, s)), defined(r) && defined(o) && o.checkApproachingInterval(e, t, n, i), r;
+};
+WebMapTileServiceImageryProvider.prototype.pickFeatures = function(e, t, n, i, r) {
+};
+const ImageryProviderAsyncMapping = {
+ ARCGIS_MAPSERVER: ArcGisMapServerImageryProvider.fromUrl,
+ BING: async (e, t) => BingMapsImageryProvider.fromUrl(e, t),
+ GOOGLE_EARTH: async (e, t) => {
+ const n = t.channel;
+ return delete t.channel, GoogleEarthEnterpriseMapsProvider.fromUrl(e, n, t);
+ },
+ MAPBOX: (e, t) => new MapboxImageryProvider({
+ url: e,
+ ...t
+ }),
+ SINGLE_TILE: SingleTileImageryProvider.fromUrl,
+ TMS: TileMapServiceImageryProvider.fromUrl,
+ URL_TEMPLATE: (e, t) => new UrlTemplateImageryProvider({
+ url: e,
+ ...t
+ }),
+ WMS: (e, t) => new WebMapServiceImageryProvider({
+ url: e,
+ ...t
+ }),
+ WMTS: (e, t) => new WebMapTileServiceImageryProvider({
+ url: e,
+ ...t
+ })
+};
+function IonImageryProvider(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._defaultAlpha = void 0, this._defaultNightAlpha = void 0, this._defaultDayAlpha = void 0, this._defaultBrightness = void 0, this._defaultContrast = void 0, this._defaultHue = void 0, this._defaultSaturation = void 0, this._defaultGamma = void 0, this._defaultMinificationFilter = void 0, this._defaultMagnificationFilter = void 0, this._tileCredits = void 0, this._errorEvent = new Event();
+}
+Object.defineProperties(IonImageryProvider.prototype, {
+ /**
+ * Gets the rectangle, in radians, of the imagery provided by the instance.
+ * @memberof IonImageryProvider.prototype
+ * @type {Rectangle}
+ * @readonly
+ */
+ rectangle: {
+ get: function() {
+ return this._imageryProvider.rectangle;
+ }
+ },
+ /**
+ * Gets the width of each tile, in pixels.
+ * @memberof IonImageryProvider.prototype
+ * @type {number}
+ * @readonly
+ */
+ tileWidth: {
+ get: function() {
+ return this._imageryProvider.tileWidth;
+ }
+ },
+ /**
+ * Gets the height of each tile, in pixels.
+ * @memberof IonImageryProvider.prototype
+ * @type {number}
+ * @readonly
+ */
+ tileHeight: {
+ get: function() {
+ return this._imageryProvider.tileHeight;
+ }
+ },
+ /**
+ * Gets the maximum level-of-detail that can be requested.
+ * @memberof IonImageryProvider.prototype
+ * @type {number|undefined}
+ * @readonly
+ */
+ maximumLevel: {
+ get: function() {
+ return this._imageryProvider.maximumLevel;
+ }
+ },
+ /**
+ * Gets the minimum level-of-detail that can be requested. Generally,
+ * a minimum level should only be used when the rectangle of the imagery is small
+ * enough that the number of tiles at the minimum level is small. An imagery
+ * provider with more than a few tiles at the minimum level will lead to
+ * rendering problems.
+ * @memberof IonImageryProvider.prototype
+ * @type {number}
+ * @readonly
+ */
+ minimumLevel: {
+ get: function() {
+ return this._imageryProvider.minimumLevel;
+ }
+ },
+ /**
+ * Gets the tiling scheme used by the provider.
+ * @memberof IonImageryProvider.prototype
+ * @type {TilingScheme}
+ * @readonly
+ */
+ tilingScheme: {
+ get: function() {
+ return this._imageryProvider.tilingScheme;
+ }
+ },
+ /**
+ * Gets the tile discard policy. If not undefined, the discard policy is responsible
+ * for filtering out "missing" tiles via its shouldDiscardImage function. If this function
+ * returns undefined, no tiles are filtered.
+ * @memberof IonImageryProvider.prototype
+ * @type {TileDiscardPolicy}
+ * @readonly
+ */
+ tileDiscardPolicy: {
+ get: function() {
+ return this._imageryProvider.tileDiscardPolicy;
+ }
+ },
+ /**
+ * Gets an event that is raised when the imagery provider encounters an asynchronous error. By subscribing
+ * to the event, you will be notified of the error and can potentially recover from it. Event listeners
+ * are passed an instance of {@link TileProviderError}.
+ * @memberof IonImageryProvider.prototype
+ * @type {Event}
+ * @readonly
+ */
+ errorEvent: {
+ get: function() {
+ return this._errorEvent;
+ }
+ },
+ /**
+ * Gets the credit to display when this imagery provider is active. Typically this is used to credit
+ * the source of the imagery.
+ * @memberof IonImageryProvider.prototype
+ * @type {Credit}
+ * @readonly
+ */
+ credit: {
+ get: function() {
+ return this._imageryProvider.credit;
+ }
+ },
+ /**
+ * Gets a value indicating whether or not the images provided by this imagery provider
+ * include an alpha channel. If this property is false, an alpha channel, if present, will
+ * be ignored. If this property is true, any images without an alpha channel will be treated
+ * as if their alpha is 1.0 everywhere. When this property is false, memory usage
+ * and texture upload time are reduced.
+ * @memberof IonImageryProvider.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ hasAlphaChannel: {
+ get: function() {
+ return this._imageryProvider.hasAlphaChannel;
+ }
+ },
+ /**
+ * Gets the proxy used by this provider.
+ * @memberof IonImageryProvider.prototype
+ * @type {Proxy}
+ * @readonly
+ * @default undefined
+ */
+ proxy: {
+ get: function() {
+ }
+ }
+});
+IonImageryProvider.fromAssetId = async function(e, t) {
+ t = defaultValue(t, defaultValue.EMPTY_OBJECT);
+ const n = IonResource._createEndpointResource(
+ e,
+ t
+ ), i = e.toString() + t.accessToken + t.server;
+ let r = IonImageryProvider._endpointCache[i];
+ defined(r) || (r = n.fetchJson(), IonImageryProvider._endpointCache[i] = r);
+ const o = await r;
+ if (o.type !== "IMAGERY")
+ throw new RuntimeError(
+ `Cesium ion asset ${e} is not an imagery asset.`
+ );
+ let s;
+ const c = o.externalType;
+ if (!defined(c))
+ s = await TileMapServiceImageryProvider.fromUrl(
+ new IonResource(o, n)
+ );
+ else {
+ const d = ImageryProviderAsyncMapping[c];
+ if (!defined(d))
+ throw new RuntimeError(
+ `Unrecognized Cesium ion imagery type: ${c}`
+ );
+ const f = { ...o.options }, h = f.url;
+ delete f.url, s = await d(h, f);
+ }
+ const l = new IonImageryProvider(t);
+ return s.errorEvent.addEventListener(function(d) {
+ d.provider = l, l._errorEvent.raiseEvent(d);
+ }), l._tileCredits = IonResource.getCreditsFromEndpoint(
+ o,
+ n
+ ), l._imageryProvider = s, l;
+};
+IonImageryProvider.prototype.getTileCredits = function(e, t, n) {
+ const i = this._imageryProvider.getTileCredits(e, t, n);
+ return defined(i) ? this._tileCredits.concat(i) : this._tileCredits;
+};
+IonImageryProvider.prototype.requestImage = function(e, t, n, i) {
+ return this._imageryProvider.requestImage(e, t, n, i);
+};
+IonImageryProvider.prototype.pickFeatures = function(e, t, n, i, r) {
+ return this._imageryProvider.pickFeatures(e, t, n, i, r);
+};
+IonImageryProvider._endpointCache = {};
+const IonWorldImageryStyle = {
+ /**
+ * Aerial imagery.
+ *
+ * @type {number}
+ * @constant
+ */
+ AERIAL: 2,
+ /**
+ * Aerial imagery with a road overlay.
+ *
+ * @type {number}
+ * @constant
+ */
+ AERIAL_WITH_LABELS: 3,
+ /**
+ * Roads without additional imagery.
+ *
+ * @type {number}
+ * @constant
+ */
+ ROAD: 4
+}, IonWorldImageryStyle$1 = Object.freeze(IonWorldImageryStyle);
+function createWorldImageryAsync(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = defaultValue(e.style, IonWorldImageryStyle$1.AERIAL);
+ return IonImageryProvider.fromAssetId(t);
+}
+function Imagery(e, t, n, i, r) {
+ if (this.imageryLayer = e, this.x = t, this.y = n, this.level = i, this.request = void 0, i !== 0) {
+ const o = t / 2 | 0, s = n / 2 | 0, c = i - 1;
+ this.parent = e.getImageryFromCache(
+ o,
+ s,
+ c
+ );
+ }
+ this.state = ImageryState$1.UNLOADED, this.imageUrl = void 0, this.image = void 0, this.texture = void 0, this.textureWebMercator = void 0, this.credits = void 0, this.referenceCount = 0, !defined(r) && e.ready && (r = e.imageryProvider.tilingScheme.tileXYToRectangle(t, n, i)), this.rectangle = r;
+}
+Imagery.createPlaceholder = function(e) {
+ const t = new Imagery(e, 0, 0, 0);
+ return t.addReference(), t.state = ImageryState$1.PLACEHOLDER, t;
+};
+Imagery.prototype.addReference = function() {
+ ++this.referenceCount;
+};
+Imagery.prototype.releaseReference = function() {
+ return --this.referenceCount, this.referenceCount === 0 ? (this.imageryLayer.removeImageryFromCache(this), defined(this.parent) && this.parent.releaseReference(), defined(this.image) && defined(this.image.destroy) && this.image.destroy(), defined(this.texture) && this.texture.destroy(), defined(this.textureWebMercator) && this.texture !== this.textureWebMercator && this.textureWebMercator.destroy(), destroyObject(this), 0) : this.referenceCount;
+};
+Imagery.prototype.processStateMachine = function(e, t, n) {
+ this.state === ImageryState$1.UNLOADED && !n && (this.state = ImageryState$1.TRANSITIONING, this.imageryLayer._requestImagery(this)), this.state === ImageryState$1.RECEIVED && (this.state = ImageryState$1.TRANSITIONING, this.imageryLayer._createTexture(e.context, this));
+ const i = this.state === ImageryState$1.READY && t && !this.texture;
+ (this.state === ImageryState$1.TEXTURE_LOADED || i) && (this.state = ImageryState$1.TRANSITIONING, this.imageryLayer._reprojectTexture(
+ e,
+ this,
+ t
+ ));
+};
+function TileImagery(e, t, n) {
+ this.readyImagery = void 0, this.loadingImagery = e, this.textureCoordinateRectangle = t, this.textureTranslationAndScale = void 0, this.useWebMercatorT = n;
+}
+TileImagery.prototype.freeResources = function() {
+ defined(this.readyImagery) && this.readyImagery.releaseReference(), defined(this.loadingImagery) && this.loadingImagery.releaseReference();
+};
+TileImagery.prototype.processStateMachine = function(e, t, n) {
+ const i = this.loadingImagery, r = i.imageryLayer;
+ if (i.processStateMachine(
+ t,
+ !this.useWebMercatorT,
+ n
+ ), i.state === ImageryState$1.READY)
+ return defined(this.readyImagery) && this.readyImagery.releaseReference(), this.readyImagery = this.loadingImagery, this.loadingImagery = void 0, this.textureTranslationAndScale = r._calculateTextureTranslationAndScale(
+ e,
+ this
+ ), !0;
+ let o = i.parent, s;
+ for (; defined(o) && (o.state !== ImageryState$1.READY || !this.useWebMercatorT && !defined(o.texture)); )
+ o.state !== ImageryState$1.FAILED && o.state !== ImageryState$1.INVALID && (s = s || o), o = o.parent;
+ return this.readyImagery !== o && (defined(this.readyImagery) && this.readyImagery.releaseReference(), this.readyImagery = o, defined(o) && (o.addReference(), this.textureTranslationAndScale = r._calculateTextureTranslationAndScale(
+ e,
+ this
+ ))), i.state === ImageryState$1.FAILED || i.state === ImageryState$1.INVALID ? defined(s) ? (s.processStateMachine(
+ t,
+ !this.useWebMercatorT,
+ n
+ ), !1) : !0 : !1;
+};
+function ImageryLayer(e, t) {
+ this._imageryProvider = e, this._readyEvent = new Event(), this._errorEvent = new Event(), t = defaultValue(t, defaultValue.EMPTY_OBJECT), e = defaultValue(e, defaultValue.EMPTY_OBJECT), this.alpha = defaultValue(
+ t.alpha,
+ defaultValue(e._defaultAlpha, 1)
+ ), this.nightAlpha = defaultValue(
+ t.nightAlpha,
+ defaultValue(e._defaultNightAlpha, 1)
+ ), this.dayAlpha = defaultValue(
+ t.dayAlpha,
+ defaultValue(e._defaultDayAlpha, 1)
+ ), this.brightness = defaultValue(
+ t.brightness,
+ defaultValue(
+ e._defaultBrightness,
+ ImageryLayer.DEFAULT_BRIGHTNESS
+ )
+ ), this.contrast = defaultValue(
+ t.contrast,
+ defaultValue(
+ e._defaultContrast,
+ ImageryLayer.DEFAULT_CONTRAST
+ )
+ ), this.hue = defaultValue(
+ t.hue,
+ defaultValue(e._defaultHue, ImageryLayer.DEFAULT_HUE)
+ ), this.saturation = defaultValue(
+ t.saturation,
+ defaultValue(
+ e._defaultSaturation,
+ ImageryLayer.DEFAULT_SATURATION
+ )
+ ), this.gamma = defaultValue(
+ t.gamma,
+ defaultValue(e._defaultGamma, ImageryLayer.DEFAULT_GAMMA)
+ ), this.splitDirection = defaultValue(
+ t.splitDirection,
+ ImageryLayer.DEFAULT_SPLIT
+ ), this.minificationFilter = defaultValue(
+ t.minificationFilter,
+ defaultValue(
+ e._defaultMinificationFilter,
+ ImageryLayer.DEFAULT_MINIFICATION_FILTER
+ )
+ ), this.magnificationFilter = defaultValue(
+ t.magnificationFilter,
+ defaultValue(
+ e._defaultMagnificationFilter,
+ ImageryLayer.DEFAULT_MAGNIFICATION_FILTER
+ )
+ ), this.show = defaultValue(t.show, !0), this._minimumTerrainLevel = t.minimumTerrainLevel, this._maximumTerrainLevel = t.maximumTerrainLevel, this._rectangle = defaultValue(t.rectangle, Rectangle.MAX_VALUE), this._maximumAnisotropy = t.maximumAnisotropy, this._imageryCache = {}, this._skeletonPlaceholder = new TileImagery(Imagery.createPlaceholder(this)), this._show = !0, this._layerIndex = -1, this._isBaseLayer = !1, this._requestImageError = void 0, this._reprojectComputeCommands = [], this.cutoutRectangle = t.cutoutRectangle, this.colorToAlpha = t.colorToAlpha, this.colorToAlphaThreshold = defaultValue(
+ t.colorToAlphaThreshold,
+ ImageryLayer.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD
+ );
+}
+Object.defineProperties(ImageryLayer.prototype, {
+ /**
+ * Gets the imagery provider for this layer. This should not be called before {@link ImageryLayer#ready} returns true.
+ * @memberof ImageryLayer.prototype
+ * @type {ImageryProvider}
+ * @readonly
+ */
+ imageryProvider: {
+ get: function() {
+ return this._imageryProvider;
+ }
+ },
+ /**
+ * Returns true when the terrain provider has been successfully created. Otherwise, returns false.
+ * @memberof ImageryLayer.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ ready: {
+ get: function() {
+ return defined(this._imageryProvider);
+ }
+ },
+ /**
+ * Gets an event that is raised when the imagery provider encounters an asynchronous error. By subscribing
+ * to the event, you will be notified of the error and can potentially recover from it. Event listeners
+ * are passed an instance of the thrown error.
+ * @memberof Imagery.prototype
+ * @type {EventRENDERED_AND_KICKED
+ * or REFINED_AND_KICKED.
+ *
+ * @param {TileSelectionResult} value The selection result to test.
+ * @returns {boolean} true if the tile was kicked, no matter if it was originally rendered or refined.
+ */
+ wasKicked: function(e) {
+ return e >= TileSelectionResult.RENDERED_AND_KICKED;
+ },
+ /**
+ * Determines the original selection result prior to being kicked or CULLED_BUT_NEEDED.
+ * If the tile wasn't kicked or CULLED_BUT_NEEDED, the original value is returned.
+ * @param {TileSelectionResult} value The selection result.
+ * @returns {TileSelectionResult} The original selection result prior to kicking.
+ */
+ originalResult: function(e) {
+ return e & 3;
+ },
+ /**
+ * Converts this selection result to a kick.
+ * @param {TileSelectionResult} value The original selection result.
+ * @returns {TileSelectionResult} The kicked form of the selection result.
+ */
+ kick: function(e) {
+ return e | 4;
+ }
+};
+function TerrainFillMesh(e) {
+ this.tile = e, this.frameLastUpdated = void 0, this.westMeshes = [], this.westTiles = [], this.southMeshes = [], this.southTiles = [], this.eastMeshes = [], this.eastTiles = [], this.northMeshes = [], this.northTiles = [], this.southwestMesh = void 0, this.southwestTile = void 0, this.southeastMesh = void 0, this.southeastTile = void 0, this.northwestMesh = void 0, this.northwestTile = void 0, this.northeastMesh = void 0, this.northeastTile = void 0, this.changedThisFrame = !0, this.visitedFrame = void 0, this.enqueuedFrame = void 0, this.mesh = void 0, this.vertexArray = void 0, this.waterMaskTexture = void 0, this.waterMaskTranslationAndScale = new Cartesian4();
+}
+TerrainFillMesh.prototype.update = function(e, t, n) {
+ this.changedThisFrame && (createFillMesh(e, t, this.tile, n), this.changedThisFrame = !1);
+};
+TerrainFillMesh.prototype.destroy = function(e) {
+ this._destroyVertexArray(e), defined(this.waterMaskTexture) && (--this.waterMaskTexture.referenceCount, this.waterMaskTexture.referenceCount === 0 && this.waterMaskTexture.destroy(), this.waterMaskTexture = void 0);
+};
+TerrainFillMesh.prototype._destroyVertexArray = function(e) {
+ defined(this.vertexArray) && (defined(e) ? e.push(this.vertexArray) : GlobeSurfaceTile._freeVertexArray(this.vertexArray), this.vertexArray = void 0);
+};
+const traversalQueueScratch = new Queue();
+TerrainFillMesh.updateFillTiles = function(e, t, n, i) {
+ const r = e._quadtree, o = r._levelZeroTiles, s = r._lastSelectionFrameNumber, c = traversalQueueScratch;
+ c.clear();
+ for (let d = 0; d < t.length; ++d) {
+ const f = t[d];
+ defined(f.data.vertexArray) && c.enqueue(t[d]);
+ }
+ let l = c.dequeue();
+ for (; l !== void 0; ) {
+ const d = l.findTileToWest(o), f = l.findTileToSouth(o), h = l.findTileToEast(o), p = l.findTileToNorth(o);
+ visitRenderedTiles(
+ e,
+ n,
+ l,
+ d,
+ s,
+ TileEdge.EAST,
+ !1,
+ c,
+ i
+ ), visitRenderedTiles(
+ e,
+ n,
+ l,
+ f,
+ s,
+ TileEdge.NORTH,
+ !1,
+ c,
+ i
+ ), visitRenderedTiles(
+ e,
+ n,
+ l,
+ h,
+ s,
+ TileEdge.WEST,
+ !1,
+ c,
+ i
+ ), visitRenderedTiles(
+ e,
+ n,
+ l,
+ p,
+ s,
+ TileEdge.SOUTH,
+ !1,
+ c,
+ i
+ );
+ const m = d.findTileToNorth(o), _ = d.findTileToSouth(o), y = h.findTileToNorth(o), C = h.findTileToSouth(o);
+ visitRenderedTiles(
+ e,
+ n,
+ l,
+ m,
+ s,
+ TileEdge.SOUTHEAST,
+ !1,
+ c,
+ i
+ ), visitRenderedTiles(
+ e,
+ n,
+ l,
+ y,
+ s,
+ TileEdge.SOUTHWEST,
+ !1,
+ c,
+ i
+ ), visitRenderedTiles(
+ e,
+ n,
+ l,
+ _,
+ s,
+ TileEdge.NORTHEAST,
+ !1,
+ c,
+ i
+ ), visitRenderedTiles(
+ e,
+ n,
+ l,
+ C,
+ s,
+ TileEdge.NORTHWEST,
+ !1,
+ c,
+ i
+ ), l = c.dequeue();
+ }
+};
+function visitRenderedTiles(e, t, n, i, r, o, s, c, l) {
+ if (i === void 0)
+ return;
+ let d = i;
+ for (; d && (d._lastSelectionResultFrame !== r || TileSelectionResult.wasKicked(d._lastSelectionResult) || TileSelectionResult.originalResult(d._lastSelectionResult) === TileSelectionResult.CULLED); ) {
+ if (s)
+ return;
+ const f = d.parent;
+ if (o >= TileEdge.NORTHWEST && f !== void 0)
+ switch (o) {
+ case TileEdge.NORTHWEST:
+ d = d === f.northwestChild ? f : void 0;
+ break;
+ case TileEdge.NORTHEAST:
+ d = d === f.northeastChild ? f : void 0;
+ break;
+ case TileEdge.SOUTHWEST:
+ d = d === f.southwestChild ? f : void 0;
+ break;
+ case TileEdge.SOUTHEAST:
+ d = d === f.southeastChild ? f : void 0;
+ break;
+ }
+ else
+ d = f;
+ }
+ if (d !== void 0) {
+ if (d._lastSelectionResult === TileSelectionResult.RENDERED) {
+ if (defined(d.data.vertexArray))
+ return;
+ visitTile$1(
+ e,
+ t,
+ n,
+ d,
+ o,
+ r,
+ c,
+ l
+ );
+ return;
+ }
+ if (TileSelectionResult.originalResult(i._lastSelectionResult) !== TileSelectionResult.CULLED)
+ switch (o) {
+ case TileEdge.WEST:
+ visitRenderedTiles(
+ e,
+ t,
+ n,
+ i.northwestChild,
+ r,
+ o,
+ !0,
+ c,
+ l
+ ), visitRenderedTiles(
+ e,
+ t,
+ n,
+ i.southwestChild,
+ r,
+ o,
+ !0,
+ c,
+ l
+ );
+ break;
+ case TileEdge.EAST:
+ visitRenderedTiles(
+ e,
+ t,
+ n,
+ i.southeastChild,
+ r,
+ o,
+ !0,
+ c,
+ l
+ ), visitRenderedTiles(
+ e,
+ t,
+ n,
+ i.northeastChild,
+ r,
+ o,
+ !0,
+ c,
+ l
+ );
+ break;
+ case TileEdge.SOUTH:
+ visitRenderedTiles(
+ e,
+ t,
+ n,
+ i.southwestChild,
+ r,
+ o,
+ !0,
+ c,
+ l
+ ), visitRenderedTiles(
+ e,
+ t,
+ n,
+ i.southeastChild,
+ r,
+ o,
+ !0,
+ c,
+ l
+ );
+ break;
+ case TileEdge.NORTH:
+ visitRenderedTiles(
+ e,
+ t,
+ n,
+ i.northeastChild,
+ r,
+ o,
+ !0,
+ c,
+ l
+ ), visitRenderedTiles(
+ e,
+ t,
+ n,
+ i.northwestChild,
+ r,
+ o,
+ !0,
+ c,
+ l
+ );
+ break;
+ case TileEdge.NORTHWEST:
+ visitRenderedTiles(
+ e,
+ t,
+ n,
+ i.northwestChild,
+ r,
+ o,
+ !0,
+ c,
+ l
+ );
+ break;
+ case TileEdge.NORTHEAST:
+ visitRenderedTiles(
+ e,
+ t,
+ n,
+ i.northeastChild,
+ r,
+ o,
+ !0,
+ c,
+ l
+ );
+ break;
+ case TileEdge.SOUTHWEST:
+ visitRenderedTiles(
+ e,
+ t,
+ n,
+ i.southwestChild,
+ r,
+ o,
+ !0,
+ c,
+ l
+ );
+ break;
+ case TileEdge.SOUTHEAST:
+ visitRenderedTiles(
+ e,
+ t,
+ n,
+ i.southeastChild,
+ r,
+ o,
+ !0,
+ c,
+ l
+ );
+ break;
+ default:
+ throw new DeveloperError("Invalid edge");
+ }
+ }
+}
+function visitTile$1(e, t, n, i, r, o, s, c) {
+ const l = i.data;
+ if (l.fill === void 0)
+ l.fill = new TerrainFillMesh(i);
+ else if (l.fill.visitedFrame === o)
+ return;
+ l.fill.enqueuedFrame !== o && (l.fill.enqueuedFrame = o, l.fill.changedThisFrame = !1, s.enqueue(i)), propagateEdge(
+ e,
+ t,
+ n,
+ i,
+ r,
+ c
+ );
+}
+function propagateEdge(e, t, n, i, r, o) {
+ const s = i.data.fill;
+ let c;
+ const l = n.data.fill;
+ defined(l) ? (l.visitedFrame = t.frameNumber, l.changedThisFrame && (createFillMesh(
+ e,
+ t,
+ n,
+ o
+ ), l.changedThisFrame = !1), c = n.data.fill.mesh) : c = n.data.mesh;
+ let d, f;
+ switch (r) {
+ case TileEdge.WEST:
+ d = s.westMeshes, f = s.westTiles;
+ break;
+ case TileEdge.SOUTH:
+ d = s.southMeshes, f = s.southTiles;
+ break;
+ case TileEdge.EAST:
+ d = s.eastMeshes, f = s.eastTiles;
+ break;
+ case TileEdge.NORTH:
+ d = s.northMeshes, f = s.northTiles;
+ break;
+ case TileEdge.NORTHWEST:
+ s.changedThisFrame = s.changedThisFrame || s.northwestMesh !== c, s.northwestMesh = c, s.northwestTile = n;
+ return;
+ case TileEdge.NORTHEAST:
+ s.changedThisFrame = s.changedThisFrame || s.northeastMesh !== c, s.northeastMesh = c, s.northeastTile = n;
+ return;
+ case TileEdge.SOUTHWEST:
+ s.changedThisFrame = s.changedThisFrame || s.southwestMesh !== c, s.southwestMesh = c, s.southwestTile = n;
+ return;
+ case TileEdge.SOUTHEAST:
+ s.changedThisFrame = s.changedThisFrame || s.southeastMesh !== c, s.southeastMesh = c, s.southeastTile = n;
+ return;
+ }
+ if (n.level <= i.level) {
+ s.changedThisFrame = s.changedThisFrame || d[0] !== c || d.length !== 1, d[0] = c, f[0] = n, d.length = 1, f.length = 1;
+ return;
+ }
+ let h, p, m, _;
+ const y = n.rectangle;
+ let C;
+ const T = i.rectangle;
+ switch (r) {
+ case TileEdge.WEST:
+ for (C = (T.north - T.south) * CesiumMath.EPSILON5, h = 0; h < f.length && (m = f[h], _ = m.rectangle, !CesiumMath.greaterThan(
+ y.north,
+ _.south,
+ C
+ )); ++h)
+ ;
+ for (p = h; p < f.length && (m = f[p], _ = m.rectangle, !CesiumMath.greaterThanOrEquals(
+ y.south,
+ _.north,
+ C
+ )); ++p)
+ ;
+ break;
+ case TileEdge.SOUTH:
+ for (C = (T.east - T.west) * CesiumMath.EPSILON5, h = 0; h < f.length && (m = f[h], _ = m.rectangle, !CesiumMath.lessThan(
+ y.west,
+ _.east,
+ C
+ )); ++h)
+ ;
+ for (p = h; p < f.length && (m = f[p], _ = m.rectangle, !CesiumMath.lessThanOrEquals(
+ y.east,
+ _.west,
+ C
+ )); ++p)
+ ;
+ break;
+ case TileEdge.EAST:
+ for (C = (T.north - T.south) * CesiumMath.EPSILON5, h = 0; h < f.length && (m = f[h], _ = m.rectangle, !CesiumMath.lessThan(
+ y.south,
+ _.north,
+ C
+ )); ++h)
+ ;
+ for (p = h; p < f.length && (m = f[p], _ = m.rectangle, !CesiumMath.lessThanOrEquals(
+ y.north,
+ _.south,
+ C
+ )); ++p)
+ ;
+ break;
+ case TileEdge.NORTH:
+ for (C = (T.east - T.west) * CesiumMath.EPSILON5, h = 0; h < f.length && (m = f[h], _ = m.rectangle, !CesiumMath.greaterThan(
+ y.east,
+ _.west,
+ C
+ )); ++h)
+ ;
+ for (p = h; p < f.length && (m = f[p], _ = m.rectangle, !CesiumMath.greaterThanOrEquals(
+ y.west,
+ _.east,
+ C
+ )); ++p)
+ ;
+ break;
+ }
+ p - h === 1 ? (s.changedThisFrame = s.changedThisFrame || d[h] !== c, d[h] = c, f[h] = n) : (s.changedThisFrame = !0, d.splice(h, p - h, c), f.splice(h, p - h, n));
+}
+const cartographicScratch$1 = new Cartographic(), centerCartographicScratch = new Cartographic(), cartesianScratch = new Cartesian3(), normalScratch$1 = new Cartesian3(), octEncodedNormalScratch = new Cartesian2(), uvScratch2 = new Cartesian2(), uvScratch = new Cartesian2();
+function HeightAndNormal() {
+ this.height = 0, this.encodedNormal = new Cartesian2();
+}
+function fillMissingCorner(e, t, n, i, r, o, s, c, l) {
+ if (defined(r))
+ return r;
+ let d;
+ if (defined(o) && defined(s))
+ d = (o.height + s.height) * 0.5;
+ else if (defined(o))
+ d = o.height;
+ else if (defined(s))
+ d = s.height;
+ else if (defined(c))
+ d = c.height;
+ else {
+ const h = e.tile.data.tileBoundingRegion;
+ let p = 0, m = 0;
+ defined(h) && (p = h.minimumHeight, m = h.maximumHeight), d = (p + m) * 0.5;
+ }
+ return getVertexWithHeightAtCorner(e, t, n, i, d, l), l;
+}
+const heightRangeScratch = {
+ minimumHeight: 0,
+ maximumHeight: 0
+}, scratchCenter$3 = new Cartesian3(), swVertexScratch = new HeightAndNormal(), seVertexScratch = new HeightAndNormal(), nwVertexScratch = new HeightAndNormal(), neVertexScratch = new HeightAndNormal(), heightmapBuffer = typeof Uint8Array < "u" ? new Uint8Array(9 * 9) : void 0, scratchCreateMeshSyncOptions = {
+ tilingScheme: void 0,
+ x: 0,
+ y: 0,
+ level: 0,
+ exaggeration: 1,
+ exaggerationRelativeHeight: 0
+};
+function createFillMesh(e, t, n, i) {
+ GlobeSurfaceTile.initialize(
+ n,
+ e.terrainProvider,
+ e._imageryLayers
+ );
+ const r = n.data, o = r.fill, s = n.rectangle, c = t.verticalExaggeration, l = t.verticalExaggerationRelativeHeight, d = c !== 1, f = n.tilingScheme.ellipsoid;
+ let h = getCorner(
+ o,
+ f,
+ 0,
+ 1,
+ o.northwestTile,
+ o.northwestMesh,
+ o.northTiles,
+ o.northMeshes,
+ o.westTiles,
+ o.westMeshes,
+ nwVertexScratch
+ ), p = getCorner(
+ o,
+ f,
+ 0,
+ 0,
+ o.southwestTile,
+ o.southwestMesh,
+ o.westTiles,
+ o.westMeshes,
+ o.southTiles,
+ o.southMeshes,
+ swVertexScratch
+ ), m = getCorner(
+ o,
+ f,
+ 1,
+ 0,
+ o.southeastTile,
+ o.southeastMesh,
+ o.southTiles,
+ o.southMeshes,
+ o.eastTiles,
+ o.eastMeshes,
+ seVertexScratch
+ ), _ = getCorner(
+ o,
+ f,
+ 1,
+ 1,
+ o.northeastTile,
+ o.northeastMesh,
+ o.eastTiles,
+ o.eastMeshes,
+ o.northTiles,
+ o.northMeshes,
+ neVertexScratch
+ );
+ h = fillMissingCorner(
+ o,
+ f,
+ 0,
+ 1,
+ h,
+ p,
+ _,
+ m,
+ nwVertexScratch
+ ), p = fillMissingCorner(
+ o,
+ f,
+ 0,
+ 0,
+ p,
+ h,
+ m,
+ _,
+ swVertexScratch
+ ), m = fillMissingCorner(
+ o,
+ f,
+ 1,
+ 1,
+ m,
+ p,
+ _,
+ h,
+ seVertexScratch
+ ), _ = fillMissingCorner(
+ o,
+ f,
+ 1,
+ 1,
+ _,
+ m,
+ h,
+ p,
+ neVertexScratch
+ );
+ const y = p.height, C = m.height, T = h.height, x = _.height;
+ let b = Math.min(
+ y,
+ C,
+ T,
+ x
+ ), S = Math.max(
+ y,
+ C,
+ T,
+ x
+ );
+ const E = (b + S) * 0.5;
+ let A, D;
+ const P = e.getLevelMaximumGeometricError(n.level), I = f.maximumRadius - P;
+ let M = Math.acos(I / f.maximumRadius) * 4;
+ if (M *= 1.5, s.width > M && S - b <= P) {
+ const g = new HeightmapTerrainData({
+ width: 9,
+ height: 9,
+ buffer: heightmapBuffer,
+ structure: {
+ // Use the maximum as the constant height so that this tile's skirt
+ // covers any cracks with adjacent tiles.
+ heightOffset: S
+ }
+ }), w = scratchCreateMeshSyncOptions;
+ w.tilingScheme = n.tilingScheme, w.x = n.x, w.y = n.y, w.level = n.level, w.exaggeration = c, w.exaggerationRelativeHeight = l, o.mesh = g._createMeshSync(w);
+ } else {
+ const g = d, w = Rectangle.center(
+ s,
+ centerCartographicScratch
+ );
+ w.height = E;
+ const O = f.cartographicToCartesian(
+ w,
+ scratchCenter$3
+ ), N = new TerrainEncoding(
+ O,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ !0,
+ !0,
+ g,
+ c,
+ l
+ );
+ let F = 5, B;
+ for (B = o.westMeshes, A = 0, D = B.length; A < D; ++A)
+ F += B[A].eastIndicesNorthToSouth.length;
+ for (B = o.southMeshes, A = 0, D = B.length; A < D; ++A)
+ F += B[A].northIndicesWestToEast.length;
+ for (B = o.eastMeshes, A = 0, D = B.length; A < D; ++A)
+ F += B[A].westIndicesSouthToNorth.length;
+ for (B = o.northMeshes, A = 0, D = B.length; A < D; ++A)
+ F += B[A].southIndicesEastToWest.length;
+ const V = heightRangeScratch;
+ V.minimumHeight = b, V.maximumHeight = S;
+ const U = N.stride;
+ let k = new Float32Array(F * U), $ = 0;
+ const G = $;
+ $ = addVertexWithComputedPosition(
+ f,
+ s,
+ N,
+ k,
+ $,
+ 0,
+ 1,
+ h.height,
+ h.encodedNormal,
+ 1,
+ V
+ ), $ = addEdge(
+ o,
+ f,
+ N,
+ k,
+ $,
+ o.westTiles,
+ o.westMeshes,
+ TileEdge.EAST,
+ V
+ );
+ const q = $;
+ $ = addVertexWithComputedPosition(
+ f,
+ s,
+ N,
+ k,
+ $,
+ 0,
+ 0,
+ p.height,
+ p.encodedNormal,
+ 0,
+ V
+ ), $ = addEdge(
+ o,
+ f,
+ N,
+ k,
+ $,
+ o.southTiles,
+ o.southMeshes,
+ TileEdge.NORTH,
+ V
+ );
+ const z = $;
+ $ = addVertexWithComputedPosition(
+ f,
+ s,
+ N,
+ k,
+ $,
+ 1,
+ 0,
+ m.height,
+ m.encodedNormal,
+ 0,
+ V
+ ), $ = addEdge(
+ o,
+ f,
+ N,
+ k,
+ $,
+ o.eastTiles,
+ o.eastMeshes,
+ TileEdge.WEST,
+ V
+ );
+ const H = $;
+ $ = addVertexWithComputedPosition(
+ f,
+ s,
+ N,
+ k,
+ $,
+ 1,
+ 1,
+ _.height,
+ _.encodedNormal,
+ 1,
+ V
+ ), $ = addEdge(
+ o,
+ f,
+ N,
+ k,
+ $,
+ o.northTiles,
+ o.northMeshes,
+ TileEdge.SOUTH,
+ V
+ ), b = V.minimumHeight, S = V.maximumHeight;
+ const Q = OrientedBoundingBox.fromRectangle(
+ s,
+ b,
+ S,
+ n.tilingScheme.ellipsoid
+ ), ne = WebMercatorProjection.geodeticLatitudeToMercatorAngle(
+ s.south
+ ), K = 1 / (WebMercatorProjection.geodeticLatitudeToMercatorAngle(s.north) - ne), Z = (WebMercatorProjection.geodeticLatitudeToMercatorAngle(
+ w.latitude
+ ) - ne) * K, ee = f.geodeticSurfaceNormalCartographic(
+ cartographicScratch$1,
+ normalScratch$1
+ ), oe = AttributeCompression.octEncode(
+ ee,
+ octEncodedNormalScratch
+ ), X = $;
+ N.encode(
+ k,
+ $ * U,
+ Q.center,
+ Cartesian2.fromElements(0.5, 0.5, uvScratch),
+ E,
+ oe,
+ Z,
+ ee
+ ), ++$;
+ const fe = $, de = fe < 256 ? 1 : 2, ce = (fe - 1) * 3, ye = ce * de, ge = (k.length - fe * U) * Float32Array.BYTES_PER_ELEMENT;
+ let re;
+ if (ge >= ye) {
+ const j = fe * U * Float32Array.BYTES_PER_ELEMENT;
+ re = fe < 256 ? new Uint8Array(k.buffer, j, ce) : new Uint16Array(k.buffer, j, ce);
+ } else
+ re = fe < 256 ? new Uint8Array(ce) : new Uint16Array(ce);
+ k = new Float32Array(k.buffer, 0, fe * U);
+ let be = 0;
+ for (A = 0; A < fe - 2; ++A)
+ re[be++] = X, re[be++] = A, re[be++] = A + 1;
+ re[be++] = X, re[be++] = A, re[be++] = 0;
+ const pe = [];
+ for (A = q; A >= G; --A)
+ pe.push(A);
+ const Te = [];
+ for (A = z; A >= q; --A)
+ Te.push(A);
+ const xe = [];
+ for (A = H; A >= z; --A)
+ xe.push(A);
+ const W = [];
+ for (W.push(0), A = X - 1; A >= H; --A)
+ W.push(A);
+ o.mesh = new TerrainMesh(
+ N.center,
+ k,
+ re,
+ ce,
+ fe,
+ b,
+ S,
+ BoundingSphere.fromOrientedBoundingBox(Q),
+ computeOccludeePoint$1(
+ e,
+ Q.center,
+ s,
+ b,
+ S
+ ),
+ N.stride,
+ Q,
+ N,
+ pe,
+ Te,
+ xe,
+ W
+ );
+ }
+ const R = t.context;
+ o._destroyVertexArray(i), o.vertexArray = GlobeSurfaceTile._createVertexArrayForMesh(
+ R,
+ o.mesh
+ ), r.processImagery(
+ n,
+ e.terrainProvider,
+ t,
+ !0
+ );
+ const L = o.waterMaskTexture;
+ if (o.waterMaskTexture = void 0, e.terrainProvider.hasWaterMask) {
+ const g = r._findAncestorTileWithTerrainData(n);
+ defined(g) && defined(g.data.waterMaskTexture) && (o.waterMaskTexture = g.data.waterMaskTexture, ++o.waterMaskTexture.referenceCount, r._computeWaterMaskTranslationAndScale(
+ n,
+ g,
+ o.waterMaskTranslationAndScale
+ ));
+ }
+ defined(L) && (--L.referenceCount, L.referenceCount === 0 && L.destroy());
+}
+function addVertexWithComputedPosition(e, t, n, i, r, o, s, c, l, d, f) {
+ const h = cartographicScratch$1;
+ h.longitude = CesiumMath.lerp(t.west, t.east, o), h.latitude = CesiumMath.lerp(t.south, t.north, s), h.height = c;
+ const p = e.cartographicToCartesian(
+ h,
+ cartesianScratch
+ );
+ let m;
+ n.hasGeodeticSurfaceNormals && (m = e.geodeticSurfaceNormal(
+ p,
+ normalScratch$1
+ ));
+ const _ = uvScratch2;
+ return _.x = o, _.y = s, n.encode(
+ i,
+ r * n.stride,
+ p,
+ _,
+ c,
+ l,
+ d,
+ m
+ ), f.minimumHeight = Math.min(f.minimumHeight, c), f.maximumHeight = Math.max(f.maximumHeight, c), r + 1;
+}
+const sourceRectangleScratch = new Rectangle();
+function transformTextureCoordinates(e, t, n, i) {
+ let r = e.rectangle;
+ const o = t.rectangle;
+ t.x === 0 && n.x === 1 && e.x === e.tilingScheme.getNumberOfXTilesAtLevel(e.level) - 1 ? (r = Rectangle.clone(
+ e.rectangle,
+ sourceRectangleScratch
+ ), r.west -= CesiumMath.TWO_PI, r.east -= CesiumMath.TWO_PI) : e.x === 0 && n.x === 0 && t.x === t.tilingScheme.getNumberOfXTilesAtLevel(t.level) - 1 && (r = Rectangle.clone(
+ e.rectangle,
+ sourceRectangleScratch
+ ), r.west += CesiumMath.TWO_PI, r.east += CesiumMath.TWO_PI);
+ const s = r.east - r.west, c = (o.west - r.west) / s, l = (o.east - r.west) / s, d = r.north - r.south, f = (o.south - r.south) / d, h = (o.north - r.south) / d;
+ let p = (n.x - c) / (l - c), m = (n.y - f) / (h - f);
+ return Math.abs(p) < Math.EPSILON5 ? p = 0 : Math.abs(p - 1) < Math.EPSILON5 && (p = 1), Math.abs(m) < Math.EPSILON5 ? m = 0 : Math.abs(m - 1) < Math.EPSILON5 && (m = 1), i.x = p, i.y = m, i;
+}
+const encodedNormalScratch = new Cartesian2();
+function getVertexFromTileAtCorner(e, t, n, i, r) {
+ const o = e.encoding, s = e.vertices;
+ if (r.height = o.decodeHeight(s, t), o.hasVertexNormals)
+ o.getOctEncodedNormal(
+ s,
+ t,
+ r.encodedNormal
+ );
+ else {
+ const c = r.encodedNormal;
+ c.x = 0, c.y = 0;
+ }
+}
+const encodedNormalScratch2 = new Cartesian2(), cartesianScratch2 = new Cartesian3();
+function getInterpolatedVertexAtCorner(e, t, n, i, r, o, s, c, l, d) {
+ const f = i.encoding, h = i.vertices, p = transformTextureCoordinates(
+ t,
+ n,
+ f.decodeTextureCoordinates(
+ h,
+ r,
+ uvScratch
+ ),
+ uvScratch
+ ), m = transformTextureCoordinates(
+ t,
+ n,
+ f.decodeTextureCoordinates(
+ h,
+ o,
+ uvScratch2
+ ),
+ uvScratch2
+ );
+ let _;
+ l ? _ = (s - p.x) / (m.x - p.x) : _ = (c - p.y) / (m.y - p.y);
+ const y = f.decodeHeight(h, r), C = f.decodeHeight(h, o), T = n.rectangle;
+ cartographicScratch$1.longitude = CesiumMath.lerp(
+ T.west,
+ T.east,
+ s
+ ), cartographicScratch$1.latitude = CesiumMath.lerp(
+ T.south,
+ T.north,
+ c
+ ), d.height = cartographicScratch$1.height = CesiumMath.lerp(
+ y,
+ C,
+ _
+ );
+ let x;
+ if (f.hasVertexNormals) {
+ const b = f.getOctEncodedNormal(
+ h,
+ r,
+ encodedNormalScratch
+ ), S = f.getOctEncodedNormal(
+ h,
+ o,
+ encodedNormalScratch2
+ ), E = AttributeCompression.octDecode(
+ b.x,
+ b.y,
+ cartesianScratch
+ ), A = AttributeCompression.octDecode(
+ S.x,
+ S.y,
+ cartesianScratch2
+ );
+ x = Cartesian3.lerp(E, A, _, cartesianScratch), Cartesian3.normalize(x, x), AttributeCompression.octEncode(x, d.encodedNormal);
+ } else
+ x = e.geodeticSurfaceNormalCartographic(
+ cartographicScratch$1,
+ cartesianScratch
+ ), AttributeCompression.octEncode(x, d.encodedNormal);
+}
+function getVertexWithHeightAtCorner(e, t, n, i, r, o) {
+ o.height = r;
+ const s = t.geodeticSurfaceNormalCartographic(
+ cartographicScratch$1,
+ cartesianScratch
+ );
+ AttributeCompression.octEncode(s, o.encodedNormal);
+}
+function getCorner(e, t, n, i, r, o, s, c, l, d, f) {
+ if (getCornerFromEdge(
+ e,
+ t,
+ c,
+ s,
+ !1,
+ n,
+ i,
+ f
+ ) || getCornerFromEdge(
+ e,
+ t,
+ d,
+ l,
+ !0,
+ n,
+ i,
+ f
+ ))
+ return f;
+ let p;
+ if (meshIsUsable(r, o))
+ return n === 0 ? i === 0 ? p = o.eastIndicesNorthToSouth[0] : p = o.southIndicesEastToWest[0] : i === 0 ? p = o.northIndicesWestToEast[0] : p = o.westIndicesSouthToNorth[0], getVertexFromTileAtCorner(o, p, n, i, f), f;
+ let m;
+ if (n === 0 ? i === 0 ? m = getClosestHeightToCorner(
+ e.westMeshes,
+ e.westTiles,
+ TileEdge.EAST,
+ e.southMeshes,
+ e.southTiles,
+ TileEdge.NORTH
+ ) : m = getClosestHeightToCorner(
+ e.northMeshes,
+ e.northTiles,
+ TileEdge.SOUTH,
+ e.westMeshes,
+ e.westTiles,
+ TileEdge.EAST
+ ) : i === 0 ? m = getClosestHeightToCorner(
+ e.southMeshes,
+ e.southTiles,
+ TileEdge.NORTH,
+ e.eastMeshes,
+ e.eastTiles,
+ TileEdge.WEST
+ ) : m = getClosestHeightToCorner(
+ e.eastMeshes,
+ e.eastTiles,
+ TileEdge.WEST,
+ e.northMeshes,
+ e.northTiles,
+ TileEdge.SOUTH
+ ), defined(m))
+ return getVertexWithHeightAtCorner(
+ e,
+ t,
+ n,
+ i,
+ m,
+ f
+ ), f;
+}
+function getClosestHeightToCorner(e, t, n, i, r, o, s, c) {
+ const l = getNearestHeightOnEdge(
+ e,
+ t,
+ !1,
+ n
+ ), d = getNearestHeightOnEdge(
+ i,
+ r,
+ !0,
+ o
+ );
+ return defined(l) && defined(d) ? (l + d) * 0.5 : defined(l) ? l : d;
+}
+function addEdge(e, t, n, i, r, o, s, c, l) {
+ for (let d = 0; d < o.length; ++d)
+ r = addEdgeMesh(
+ e,
+ t,
+ n,
+ i,
+ r,
+ o[d],
+ s[d],
+ c,
+ l
+ );
+ return r;
+}
+function addEdgeMesh(e, t, n, i, r, o, s, c, l) {
+ let d = o.rectangle;
+ c === TileEdge.EAST && e.tile.x === 0 ? (d = Rectangle.clone(
+ o.rectangle,
+ sourceRectangleScratch
+ ), d.west -= CesiumMath.TWO_PI, d.east -= CesiumMath.TWO_PI) : c === TileEdge.WEST && o.x === 0 && (d = Rectangle.clone(
+ o.rectangle,
+ sourceRectangleScratch
+ ), d.west += CesiumMath.TWO_PI, d.east += CesiumMath.TWO_PI);
+ const f = e.tile.rectangle;
+ let h, p;
+ r > 0 && (n.decodeTextureCoordinates(i, r - 1, uvScratch), h = uvScratch.x, p = uvScratch.y);
+ let m, _;
+ switch (c) {
+ case TileEdge.WEST:
+ m = s.westIndicesSouthToNorth, _ = !1;
+ break;
+ case TileEdge.NORTH:
+ m = s.northIndicesWestToEast, _ = !0;
+ break;
+ case TileEdge.EAST:
+ m = s.eastIndicesNorthToSouth, _ = !1;
+ break;
+ case TileEdge.SOUTH:
+ m = s.southIndicesEastToWest, _ = !0;
+ break;
+ }
+ const y = o, C = e.tile, T = s.encoding, x = s.vertices, b = n.stride;
+ let S, E;
+ T.hasWebMercatorT && (S = WebMercatorProjection.geodeticLatitudeToMercatorAngle(
+ f.south
+ ), E = 1 / (WebMercatorProjection.geodeticLatitudeToMercatorAngle(
+ f.north
+ ) - S));
+ for (let A = 0; A < m.length; ++A) {
+ const D = m[A], P = T.decodeTextureCoordinates(
+ x,
+ D,
+ uvScratch
+ );
+ transformTextureCoordinates(y, C, P, P);
+ const I = P.x, M = P.y, R = _ ? I : M;
+ if (R < 0 || R > 1 || Math.abs(I - h) < CesiumMath.EPSILON5 && Math.abs(M - p) < CesiumMath.EPSILON5)
+ continue;
+ const L = Math.abs(I) < CesiumMath.EPSILON5 || Math.abs(I - 1) < CesiumMath.EPSILON5, g = Math.abs(M) < CesiumMath.EPSILON5 || Math.abs(M - 1) < CesiumMath.EPSILON5;
+ if (L && g)
+ continue;
+ const w = T.decodePosition(
+ x,
+ D,
+ cartesianScratch
+ ), O = T.decodeHeight(x, D);
+ let N;
+ T.hasVertexNormals ? N = T.getOctEncodedNormal(
+ x,
+ D,
+ octEncodedNormalScratch
+ ) : (N = octEncodedNormalScratch, N.x = 0, N.y = 0);
+ let F = M;
+ if (T.hasWebMercatorT) {
+ const V = CesiumMath.lerp(
+ f.south,
+ f.north,
+ M
+ );
+ F = (WebMercatorProjection.geodeticLatitudeToMercatorAngle(V) - S) * E;
+ }
+ let B;
+ n.hasGeodeticSurfaceNormals && (B = t.geodeticSurfaceNormal(
+ w,
+ normalScratch$1
+ )), n.encode(
+ i,
+ r * b,
+ w,
+ P,
+ O,
+ N,
+ F,
+ B
+ ), l.minimumHeight = Math.min(l.minimumHeight, O), l.maximumHeight = Math.max(l.maximumHeight, O), ++r;
+ }
+ return r;
+}
+function getNearestHeightOnEdge(e, t, n, i, r, o) {
+ let s, c, l;
+ n ? (s = 0, c = e.length, l = 1) : (s = e.length - 1, c = -1, l = -1);
+ for (let d = s; d !== c; d += l) {
+ const f = e[d], h = t[d];
+ if (!meshIsUsable(h, f))
+ continue;
+ let p;
+ switch (i) {
+ case TileEdge.WEST:
+ p = f.westIndicesSouthToNorth;
+ break;
+ case TileEdge.SOUTH:
+ p = f.southIndicesEastToWest;
+ break;
+ case TileEdge.EAST:
+ p = f.eastIndicesNorthToSouth;
+ break;
+ case TileEdge.NORTH:
+ p = f.northIndicesWestToEast;
+ break;
+ }
+ const m = p[n ? 0 : p.length - 1];
+ if (defined(m))
+ return f.encoding.decodeHeight(f.vertices, m);
+ }
+}
+function meshIsUsable(e, t) {
+ return defined(t) && (!defined(e.data.fill) || !e.data.fill.changedThisFrame);
+}
+function getCornerFromEdge(e, t, n, i, r, o, s, c) {
+ let l, d, f, h, p;
+ const m = i[r ? 0 : n.length - 1], _ = n[r ? 0 : n.length - 1];
+ if (meshIsUsable(m, _) && (o === 0 ? s === 0 ? (l = r ? _.northIndicesWestToEast : _.eastIndicesNorthToSouth, d = r, f = r) : (l = r ? _.eastIndicesNorthToSouth : _.southIndicesEastToWest, d = !r, f = !1) : s === 0 ? (l = r ? _.westIndicesSouthToNorth : _.northIndicesWestToEast, d = !r, f = !0) : (l = r ? _.southIndicesEastToWest : _.westIndicesSouthToNorth, d = r, f = !r), l.length > 0)) {
+ h = r ? 0 : l.length - 1, p = l[h], _.encoding.decodeTextureCoordinates(
+ _.vertices,
+ p,
+ uvScratch
+ );
+ const y = transformTextureCoordinates(
+ m,
+ e.tile,
+ uvScratch,
+ uvScratch
+ );
+ if (y.x === o && y.y === s)
+ return getVertexFromTileAtCorner(_, p, o, s, c), !0;
+ if (h = binarySearch(l, d ? o : s, function(C, T) {
+ _.encoding.decodeTextureCoordinates(
+ _.vertices,
+ C,
+ uvScratch
+ );
+ const x = transformTextureCoordinates(
+ m,
+ e.tile,
+ uvScratch,
+ uvScratch
+ );
+ return f ? d ? x.x - o : x.y - s : d ? o - x.x : s - x.y;
+ }), h < 0) {
+ if (h = ~h, h > 0 && h < l.length)
+ return getInterpolatedVertexAtCorner(
+ t,
+ m,
+ e.tile,
+ _,
+ l[h - 1],
+ l[h],
+ o,
+ s,
+ d,
+ c
+ ), !0;
+ } else
+ return getVertexFromTileAtCorner(
+ _,
+ l[h],
+ o,
+ s,
+ c
+ ), !0;
+ }
+ return !1;
+}
+const cornerPositionsScratch$1 = [
+ new Cartesian3(),
+ new Cartesian3(),
+ new Cartesian3(),
+ new Cartesian3()
+];
+function computeOccludeePoint$1(e, t, n, i, r, o) {
+ const s = e.quadtree._occluders.ellipsoid, c = s.ellipsoid, l = cornerPositionsScratch$1;
+ return Cartesian3.fromRadians(
+ n.west,
+ n.south,
+ r,
+ c,
+ l[0]
+ ), Cartesian3.fromRadians(
+ n.east,
+ n.south,
+ r,
+ c,
+ l[1]
+ ), Cartesian3.fromRadians(
+ n.west,
+ n.north,
+ r,
+ c,
+ l[2]
+ ), Cartesian3.fromRadians(
+ n.east,
+ n.north,
+ r,
+ c,
+ l[3]
+ ), s.computeHorizonCullingPointPossiblyUnderEllipsoid(
+ t,
+ l,
+ i,
+ o
+ );
+}
+function GlobeSurfaceTileProvider(e) {
+ this.lightingFadeOutDistance = 65e5, this.lightingFadeInDistance = 9e6, this.hasWaterMask = !1, this.showWaterEffect = !1, this.oceanNormalMap = void 0, this.zoomedOutOceanSpecularIntensity = 0.5, this.enableLighting = !1, this.dynamicAtmosphereLighting = !1, this.dynamicAtmosphereLightingFromSun = !1, this.showGroundAtmosphere = !1, this.shadows = ShadowMode$1.RECEIVE_ONLY, this.vertexShadowDarkness = 0.3, this.fillHighlightColor = void 0, this.hueShift = 0, this.saturationShift = 0, this.brightnessShift = 0, this.showSkirts = !0, this.backFaceCulling = !0, this.undergroundColor = void 0, this.undergroundColorAlphaByDistance = void 0, this.lambertDiffuseMultiplier = 0, this.materialUniformMap = void 0, this._materialUniformMap = void 0, this._quadtree = void 0, this._terrainProvider = e.terrainProvider, this._imageryLayers = e.imageryLayers, this._surfaceShaderSet = e.surfaceShaderSet, this._renderState = void 0, this._blendRenderState = void 0, this._disableCullingRenderState = void 0, this._disableCullingBlendRenderState = void 0, this._errorEvent = new Event(), this._removeLayerAddedListener = this._imageryLayers.layerAdded.addEventListener(
+ GlobeSurfaceTileProvider.prototype._onLayerAdded,
+ this
+ ), this._removeLayerRemovedListener = this._imageryLayers.layerRemoved.addEventListener(
+ GlobeSurfaceTileProvider.prototype._onLayerRemoved,
+ this
+ ), this._removeLayerMovedListener = this._imageryLayers.layerMoved.addEventListener(
+ GlobeSurfaceTileProvider.prototype._onLayerMoved,
+ this
+ ), this._removeLayerShownListener = this._imageryLayers.layerShownOrHidden.addEventListener(
+ GlobeSurfaceTileProvider.prototype._onLayerShownOrHidden,
+ this
+ ), this._imageryLayersUpdatedEvent = new Event(), this._layerOrderChanged = !1, this._tilesToRenderByTextureCount = [], this._drawCommands = [], this._uniformMaps = [], this._usedDrawCommands = 0, this._vertexArraysToDestroy = [], this._debug = {
+ wireframe: !1,
+ boundingSphereTile: void 0
+ }, this._baseColor = void 0, this._firstPassInitialColor = void 0, this.baseColor = new Color(0, 0, 0.5, 1), this._clippingPlanes = void 0, this._clippingPolygons = void 0, this.cartographicLimitRectangle = Rectangle.clone(Rectangle.MAX_VALUE), this._hasLoadedTilesThisFrame = !1, this._hasFillTilesThisFrame = !1, this._oldVerticalExaggeration = void 0, this._oldVerticalExaggerationRelativeHeight = void 0;
+}
+Object.defineProperties(GlobeSurfaceTileProvider.prototype, {
+ /**
+ * Gets or sets the color of the globe when no imagery is available.
+ * @memberof GlobeSurfaceTileProvider.prototype
+ * @type {Color}
+ */
+ baseColor: {
+ get: function() {
+ return this._baseColor;
+ },
+ set: function(e) {
+ this._baseColor = e, this._firstPassInitialColor = Cartesian4.fromColor(
+ e,
+ this._firstPassInitialColor
+ );
+ }
+ },
+ /**
+ * Gets or sets the {@link QuadtreePrimitive} for which this provider is
+ * providing tiles. This property may be undefined if the provider is not yet associated
+ * with a {@link QuadtreePrimitive}.
+ * @memberof GlobeSurfaceTileProvider.prototype
+ * @type {QuadtreePrimitive}
+ */
+ quadtree: {
+ get: function() {
+ return this._quadtree;
+ },
+ set: function(e) {
+ this._quadtree = e;
+ }
+ },
+ /**
+ * Gets the tiling scheme used by the provider.
+ * @memberof GlobeSurfaceTileProvider.prototype
+ * @type {TilingScheme}
+ */
+ tilingScheme: {
+ get: function() {
+ if (defined(this._terrainProvider))
+ return this._terrainProvider.tilingScheme;
+ }
+ },
+ /**
+ * Gets an event that is raised when the geometry provider encounters an asynchronous error. By subscribing
+ * to the event, you will be notified of the error and can potentially recover from it. Event listeners
+ * are passed an instance of {@link TileProviderError}.
+ * @memberof GlobeSurfaceTileProvider.prototype
+ * @type {Event}
+ */
+ errorEvent: {
+ get: function() {
+ return this._errorEvent;
+ }
+ },
+ /**
+ * Gets an event that is raised when an imagery layer is added, shown, hidden, moved, or removed.
+ * @memberof GlobeSurfaceTileProvider.prototype
+ * @type {Event}
+ */
+ imageryLayersUpdatedEvent: {
+ get: function() {
+ return this._imageryLayersUpdatedEvent;
+ }
+ },
+ /**
+ * Gets or sets the terrain provider that describes the surface geometry.
+ * @memberof GlobeSurfaceTileProvider.prototype
+ * @type {TerrainProvider}
+ */
+ terrainProvider: {
+ get: function() {
+ return this._terrainProvider;
+ },
+ set: function(e) {
+ this._terrainProvider !== e && (this._terrainProvider = e, defined(this._quadtree) && this._quadtree.invalidateAllTiles());
+ }
+ },
+ /**
+ * The {@link ClippingPlaneCollection} used to selectively disable rendering.
+ *
+ * @type {ClippingPlaneCollection}
+ *
+ * @private
+ */
+ clippingPlanes: {
+ get: function() {
+ return this._clippingPlanes;
+ },
+ set: function(e) {
+ ClippingPlaneCollection.setOwner(e, this, "_clippingPlanes");
+ }
+ },
+ /**
+ * The {@link ClippingPolygonCollection} used to selectively disable rendering inside or outside a list of polygons.
+ *
+ * @type {ClippingPolygonCollection}
+ *
+ * @private
+ */
+ clippingPolygons: {
+ get: function() {
+ return this._clippingPolygons;
+ },
+ set: function(e) {
+ ClippingPolygonCollection.setOwner(e, this, "_clippingPolygons");
+ }
+ }
+});
+function sortTileImageryByLayerIndex(e, t) {
+ let n = e.loadingImagery;
+ defined(n) || (n = e.readyImagery);
+ let i = t.loadingImagery;
+ return defined(i) || (i = t.readyImagery), n.imageryLayer._layerIndex - i.imageryLayer._layerIndex;
+}
+GlobeSurfaceTileProvider.prototype.update = function(e) {
+ this._imageryLayers._update();
+};
+function updateCredits(e, t) {
+ const n = t.creditDisplay, i = e._terrainProvider;
+ defined(i) && defined(i.credit) && n.addCreditToNextFrame(i.credit);
+ const r = e._imageryLayers;
+ for (let o = 0, s = r.length; o < s; ++o) {
+ const c = r.get(o);
+ c.ready && c.show && defined(c.imageryProvider.credit) && n.addCreditToNextFrame(c.imageryProvider.credit);
+ }
+}
+GlobeSurfaceTileProvider.prototype.initialize = function(e) {
+ this._imageryLayers.queueReprojectionCommands(e), this._layerOrderChanged && (this._layerOrderChanged = !1, this._quadtree.forEachLoadedTile(function(i) {
+ i.data.imagery.sort(sortTileImageryByLayerIndex);
+ })), updateCredits(this, e);
+ const t = this._vertexArraysToDestroy, n = t.length;
+ for (let i = 0; i < n; ++i)
+ GlobeSurfaceTile._freeVertexArray(t[i]);
+ t.length = 0;
+};
+GlobeSurfaceTileProvider.prototype.beginUpdate = function(e) {
+ const t = this._tilesToRenderByTextureCount;
+ for (let r = 0, o = t.length; r < o; ++r) {
+ const s = t[r];
+ defined(s) && (s.length = 0);
+ }
+ const n = this._clippingPlanes;
+ defined(n) && n.enabled && n.update(e);
+ const i = this._clippingPolygons;
+ defined(i) && i.enabled && (i.update(e), i.queueCommands(e)), this._usedDrawCommands = 0, this._hasLoadedTilesThisFrame = !1, this._hasFillTilesThisFrame = !1;
+};
+GlobeSurfaceTileProvider.prototype.endUpdate = function(e) {
+ if (!defined(this._renderState)) {
+ this._renderState = RenderState.fromCache({
+ // Write color and depth
+ cull: {
+ enabled: !0
+ },
+ depthTest: {
+ enabled: !0,
+ func: DepthFunction$1.LESS
+ }
+ }), this._blendRenderState = RenderState.fromCache({
+ // Write color and depth
+ cull: {
+ enabled: !0
+ },
+ depthTest: {
+ enabled: !0,
+ func: DepthFunction$1.LESS_OR_EQUAL
+ },
+ blending: BlendingState$1.ALPHA_BLEND
+ });
+ let s = clone$1(this._renderState, !0);
+ s.cull.enabled = !1, this._disableCullingRenderState = RenderState.fromCache(s), s = clone$1(this._blendRenderState, !0), s.cull.enabled = !1, this._disableCullingBlendRenderState = RenderState.fromCache(s);
+ }
+ this._hasFillTilesThisFrame && this._hasLoadedTilesThisFrame && TerrainFillMesh.updateFillTiles(
+ this,
+ this._quadtree._tilesToRender,
+ e,
+ this._vertexArraysToDestroy
+ );
+ const t = this.quadtree, n = e.verticalExaggeration, i = e.verticalExaggerationRelativeHeight, r = this._oldVerticalExaggeration !== n || this._oldVerticalExaggerationRelativeHeight !== i;
+ this._oldVerticalExaggeration = n, this._oldVerticalExaggerationRelativeHeight = i, r && t.forEachLoadedTile(function(s) {
+ s.data.updateExaggeration(s, e, t);
+ });
+ const o = this._tilesToRenderByTextureCount;
+ for (let s = 0, c = o.length; s < c; ++s) {
+ const l = o[s];
+ if (defined(l))
+ for (let d = 0, f = l.length; d < f; ++d) {
+ const h = l[d], p = h.data.tileBoundingRegion;
+ addDrawCommandsForTile(this, h, e), e.minimumTerrainHeight = Math.min(
+ e.minimumTerrainHeight,
+ p.minimumHeight
+ );
+ }
+ }
+};
+function pushCommand(e, t) {
+ const n = t.globeTranslucencyState;
+ if (n.translucent) {
+ const i = e.renderState.blending.enabled;
+ n.pushDerivedCommands(
+ e,
+ i,
+ t
+ );
+ } else
+ t.commandList.push(e);
+}
+GlobeSurfaceTileProvider.prototype.updateForPick = function(e) {
+ const t = this._drawCommands;
+ for (let n = 0, i = this._usedDrawCommands; n < i; ++n)
+ pushCommand(t[n], e);
+};
+GlobeSurfaceTileProvider.prototype.cancelReprojections = function() {
+ this._imageryLayers.cancelReprojections();
+};
+GlobeSurfaceTileProvider.prototype.getLevelMaximumGeometricError = function(e) {
+ return defined(this._terrainProvider) ? this._terrainProvider.getLevelMaximumGeometricError(e) : 0;
+};
+GlobeSurfaceTileProvider.prototype.loadTile = function(e, t) {
+ let n = t.data, i = !0, r;
+ defined(n) && (i = n.boundingVolumeSourceTile !== t || t._lastSelectionResult === TileSelectionResult.CULLED_BUT_NEEDED, r = n.terrainState), GlobeSurfaceTile.processStateMachine(
+ t,
+ e,
+ this.terrainProvider,
+ this._imageryLayers,
+ this.quadtree,
+ this._vertexArraysToDestroy,
+ i
+ ), n = t.data, i && r !== t.data.terrainState && this.computeTileVisibility(t, e, this.quadtree.occluders) !== Visibility$1.NONE && n.boundingVolumeSourceTile === t && (i = !1, GlobeSurfaceTile.processStateMachine(
+ t,
+ e,
+ this.terrainProvider,
+ this._imageryLayers,
+ this.quadtree,
+ this._vertexArraysToDestroy,
+ i
+ ));
+};
+const boundingSphereScratch = new BoundingSphere(), rectangleIntersectionScratch = new Rectangle(), splitCartographicLimitRectangleScratch = new Rectangle(), rectangleCenterScratch = new Cartographic();
+function clipRectangleAntimeridian(e, t) {
+ if (t.west < t.east)
+ return t;
+ const n = Rectangle.clone(
+ t,
+ splitCartographicLimitRectangleScratch
+ );
+ return Rectangle.center(e, rectangleCenterScratch).longitude > 0 ? n.east = CesiumMath.PI : n.west = -CesiumMath.PI, n;
+}
+function isUndergroundVisible(e, t) {
+ if (t.cameraUnderground || t.globeTranslucencyState.translucent)
+ return !0;
+ if (e.backFaceCulling)
+ return !1;
+ const n = e._clippingPlanes;
+ if (defined(n) && n.enabled)
+ return !0;
+ const i = e._clippingPolygons;
+ return !!(defined(i) && i.enabled || !Rectangle.equals(
+ e.cartographicLimitRectangle,
+ Rectangle.MAX_VALUE
+ ));
+}
+GlobeSurfaceTileProvider.prototype.computeTileVisibility = function(e, t, n) {
+ const i = this.computeDistanceToTile(e, t);
+ e._distance = i;
+ const r = isUndergroundVisible(this, t);
+ if (t.fog.enabled && !r && CesiumMath.fog(i, t.fog.density) >= 1)
+ return Visibility$1.NONE;
+ const o = e.data, s = o.tileBoundingRegion;
+ if (o.boundingVolumeSourceTile === void 0)
+ return Visibility$1.PARTIAL;
+ const c = t.cullingVolume;
+ let l = s.boundingVolume;
+ defined(l) || (l = s.boundingSphere), o.clippedByBoundaries = !1;
+ const d = clipRectangleAntimeridian(
+ e.rectangle,
+ this.cartographicLimitRectangle
+ ), f = Rectangle.simpleIntersection(
+ d,
+ e.rectangle,
+ rectangleIntersectionScratch
+ );
+ if (!defined(f))
+ return Visibility$1.NONE;
+ if (Rectangle.equals(f, e.rectangle) || (o.clippedByBoundaries = !0), t.mode !== SceneMode$1.SCENE3D && (l = boundingSphereScratch, BoundingSphere.fromRectangleWithHeights2D(
+ e.rectangle,
+ t.mapProjection,
+ s.minimumHeight,
+ s.maximumHeight,
+ l
+ ), Cartesian3.fromElements(
+ l.center.z,
+ l.center.x,
+ l.center.y,
+ l.center
+ ), t.mode === SceneMode$1.MORPHING && defined(o.renderedMesh) && (l = BoundingSphere.union(
+ s.boundingSphere,
+ l,
+ l
+ ))), !defined(l))
+ return Visibility$1.PARTIAL;
+ const h = this._clippingPlanes;
+ if (defined(h) && h.enabled) {
+ const C = h.computeIntersectionWithBoundingVolume(
+ l
+ );
+ if (e.isClipped = C !== Intersect$1.INSIDE, C === Intersect$1.OUTSIDE)
+ return Visibility$1.NONE;
+ }
+ const p = this._clippingPolygons;
+ if (defined(p) && p.enabled) {
+ const C = p.computeIntersectionWithBoundingVolume(
+ s
+ );
+ e.isClipped = C !== Intersect$1.OUTSIDE;
+ }
+ let m;
+ const _ = c.computeVisibility(l);
+ if (_ === Intersect$1.OUTSIDE ? m = Visibility$1.NONE : _ === Intersect$1.INTERSECTING ? m = Visibility$1.PARTIAL : _ === Intersect$1.INSIDE && (m = Visibility$1.FULL), m === Visibility$1.NONE)
+ return m;
+ const y = t.mode === SceneMode$1.SCENE3D && t.camera.frustum instanceof OrthographicFrustum;
+ if (t.mode === SceneMode$1.SCENE3D && !y && defined(n) && !r) {
+ const C = o.occludeePointInScaledSpace;
+ return !defined(C) || n.ellipsoid.isScaledSpacePointVisiblePossiblyUnderEllipsoid(
+ C,
+ s.minimumHeight
+ ) ? m : Visibility$1.NONE;
+ }
+ return m;
+};
+GlobeSurfaceTileProvider.prototype.canRefine = function(e) {
+ return defined(e.data.terrainData) ? !0 : this.terrainProvider.getTileDataAvailable(
+ e.x * 2,
+ e.y * 2,
+ e.level + 1
+ ) !== void 0;
+};
+const readyImageryScratch = [], canRenderTraversalStack = [];
+GlobeSurfaceTileProvider.prototype.canRenderWithoutLosingDetail = function(e, t) {
+ const n = e.data, i = readyImageryScratch;
+ i.length = this._imageryLayers.length;
+ let r = !1, o = !1, s;
+ defined(n) && (r = n.terrainState === TerrainState$2.READY, o = !0, s = n.imagery);
+ let c, l;
+ for (c = 0, l = i.length; c < l; ++c)
+ i[c] = o;
+ if (defined(s))
+ for (c = 0, l = s.length; c < l; ++c) {
+ const h = s[c], p = h.loadingImagery, m = !defined(p) || p.state === ImageryState$1.FAILED || p.state === ImageryState$1.INVALID, _ = (h.loadingImagery || h.readyImagery).imageryLayer._layerIndex;
+ i[_] = m && i[_];
+ }
+ const d = this.quadtree._lastSelectionFrameNumber, f = canRenderTraversalStack;
+ for (f.length = 0, f.push(
+ e.southwestChild,
+ e.southeastChild,
+ e.northwestChild,
+ e.northeastChild
+ ); f.length > 0; ) {
+ const h = f.pop(), p = h._lastSelectionResultFrame === d ? h._lastSelectionResult : TileSelectionResult.NONE;
+ if (p === TileSelectionResult.RENDERED) {
+ const m = h.data;
+ if (!defined(m))
+ continue;
+ if (!r && h.data.terrainState === TerrainState$2.READY)
+ return !1;
+ const _ = h.data.imagery;
+ for (c = 0, l = _.length; c < l; ++c) {
+ const y = _[c], C = y.loadingImagery, T = !defined(C) || C.state === ImageryState$1.FAILED || C.state === ImageryState$1.INVALID, x = (y.loadingImagery || y.readyImagery).imageryLayer._layerIndex;
+ if (T && !i[x])
+ return !1;
+ }
+ } else p === TileSelectionResult.REFINED && f.push(
+ h.southwestChild,
+ h.southeastChild,
+ h.northwestChild,
+ h.northeastChild
+ );
+ }
+ return !0;
+};
+const tileDirectionScratch = new Cartesian3();
+GlobeSurfaceTileProvider.prototype.computeTileLoadPriority = function(e, t) {
+ const n = e.data;
+ if (n === void 0)
+ return 0;
+ const i = n.tileBoundingRegion.boundingVolume;
+ if (i === void 0)
+ return 0;
+ const r = t.camera.positionWC, o = t.camera.directionWC, s = Cartesian3.subtract(
+ i.center,
+ r,
+ tileDirectionScratch
+ ), c = Cartesian3.magnitude(s);
+ return c < CesiumMath.EPSILON5 ? 0 : (Cartesian3.divideByScalar(s, c, s), (1 - Cartesian3.dot(s, o)) * e._distance);
+};
+const modifiedModelViewScratch = new Matrix4(), modifiedModelViewProjectionScratch = new Matrix4(), tileRectangleScratch = new Cartesian4(), localizedCartographicLimitRectangleScratch = new Cartesian4(), localizedTranslucencyRectangleScratch = new Cartesian4(), rtcScratch = new Cartesian3(), centerEyeScratch = new Cartesian3(), southwestScratch = new Cartesian3(), northeastScratch = new Cartesian3();
+GlobeSurfaceTileProvider.prototype.showTileThisFrame = function(e, t) {
+ let n = 0;
+ const i = e.data.imagery;
+ for (let c = 0, l = i.length; c < l; ++c) {
+ const d = i[c];
+ defined(d.readyImagery) && d.readyImagery.imageryLayer.alpha !== 0 && ++n;
+ }
+ let r = this._tilesToRenderByTextureCount[n];
+ defined(r) || (r = [], this._tilesToRenderByTextureCount[n] = r), r.push(e);
+ const o = e.data;
+ defined(o.vertexArray) ? this._hasLoadedTilesThisFrame = !0 : this._hasFillTilesThisFrame = !0;
+ const s = this._debug;
+ ++s.tilesRendered, s.texturesRendered += n;
+};
+const cornerPositionsScratch = [
+ new Cartesian3(),
+ new Cartesian3(),
+ new Cartesian3(),
+ new Cartesian3()
+];
+function computeOccludeePoint(e, t, n, i, r, o) {
+ const s = e.quadtree._occluders.ellipsoid, c = s.ellipsoid, l = cornerPositionsScratch;
+ return Cartesian3.fromRadians(
+ n.west,
+ n.south,
+ r,
+ c,
+ l[0]
+ ), Cartesian3.fromRadians(
+ n.east,
+ n.south,
+ r,
+ c,
+ l[1]
+ ), Cartesian3.fromRadians(
+ n.west,
+ n.north,
+ r,
+ c,
+ l[2]
+ ), Cartesian3.fromRadians(
+ n.east,
+ n.north,
+ r,
+ c,
+ l[3]
+ ), s.computeHorizonCullingPointPossiblyUnderEllipsoid(
+ t,
+ l,
+ i,
+ o
+ );
+}
+GlobeSurfaceTileProvider.prototype.computeDistanceToTile = function(e, t) {
+ updateTileBoundingRegion(e, this, t);
+ const n = e.data;
+ if (n.boundingVolumeSourceTile === void 0)
+ return 9999999999;
+ const r = n.tileBoundingRegion, o = r.minimumHeight, s = r.maximumHeight;
+ if (n.boundingVolumeSourceTile !== e) {
+ const l = t.camera.positionCartographic.height, d = Math.abs(l - o), f = Math.abs(l - s);
+ d > f ? (r.minimumHeight = o, r.maximumHeight = o) : (r.minimumHeight = s, r.maximumHeight = s);
+ }
+ const c = r.distanceToCamera(t);
+ return r.minimumHeight = o, r.maximumHeight = s, c;
+};
+function updateTileBoundingRegion(e, t, n) {
+ let i = e.data;
+ i === void 0 && (i = e.data = new GlobeSurfaceTile());
+ const r = e.tilingScheme.ellipsoid;
+ i.tileBoundingRegion === void 0 && (i.tileBoundingRegion = new TileBoundingRegion({
+ computeBoundingVolumes: !1,
+ rectangle: e.rectangle,
+ ellipsoid: r,
+ minimumHeight: 0,
+ maximumHeight: 0
+ }));
+ const o = i.tileBoundingRegion, s = o.minimumHeight, c = o.maximumHeight;
+ let l = !1, d = e;
+ const f = i.mesh, h = i.terrainData;
+ if (f !== void 0 && f.minimumHeight !== void 0 && f.maximumHeight !== void 0)
+ o.minimumHeight = f.minimumHeight, o.maximumHeight = f.maximumHeight, l = !0;
+ else if (h !== void 0 && h._minimumHeight !== void 0 && h._maximumHeight !== void 0)
+ o.minimumHeight = h._minimumHeight, o.maximumHeight = h._maximumHeight;
+ else {
+ o.minimumHeight = Number.NaN, o.maximumHeight = Number.NaN;
+ let p = e.parent;
+ for (; p !== void 0; ) {
+ const m = p.data;
+ if (m !== void 0) {
+ const _ = m.mesh, y = m.terrainData;
+ if (_ !== void 0 && _.minimumHeight !== void 0 && _.maximumHeight !== void 0) {
+ o.minimumHeight = _.minimumHeight, o.maximumHeight = _.maximumHeight;
+ break;
+ } else if (y !== void 0 && y._minimumHeight !== void 0 && y._maximumHeight !== void 0) {
+ o.minimumHeight = y._minimumHeight, o.maximumHeight = y._maximumHeight;
+ break;
+ }
+ }
+ p = p.parent;
+ }
+ d = p;
+ }
+ if (d !== void 0) {
+ const p = n.verticalExaggeration, m = n.verticalExaggerationRelativeHeight;
+ if (p !== 1 && (l = !1, o.minimumHeight = VerticalExaggeration.getHeight(
+ o.minimumHeight,
+ p,
+ m
+ ), o.maximumHeight = VerticalExaggeration.getHeight(
+ o.maximumHeight,
+ p,
+ m
+ )), l)
+ i.boundingVolumeIsFromMesh || (o._orientedBoundingBox = OrientedBoundingBox.clone(
+ f.orientedBoundingBox,
+ o._orientedBoundingBox
+ ), o._boundingSphere = BoundingSphere.clone(
+ f.boundingSphere3D,
+ o._boundingSphere
+ ), i.occludeePointInScaledSpace = Cartesian3.clone(
+ f.occludeePointInScaledSpace,
+ i.occludeePointInScaledSpace
+ ), defined(i.occludeePointInScaledSpace) || (i.occludeePointInScaledSpace = computeOccludeePoint(
+ t,
+ o._orientedBoundingBox.center,
+ e.rectangle,
+ o.minimumHeight,
+ o.maximumHeight,
+ i.occludeePointInScaledSpace
+ )));
+ else {
+ const y = o._orientedBoundingBox === void 0 || o._boundingSphere === void 0;
+ (o.minimumHeight !== s || o.maximumHeight !== c || y) && (o.computeBoundingVolumes(r), i.occludeePointInScaledSpace = computeOccludeePoint(
+ t,
+ o._orientedBoundingBox.center,
+ e.rectangle,
+ o.minimumHeight,
+ o.maximumHeight,
+ i.occludeePointInScaledSpace
+ ));
+ }
+ i.boundingVolumeSourceTile = d, i.boundingVolumeIsFromMesh = l;
+ } else
+ i.boundingVolumeSourceTile = void 0, i.boundingVolumeIsFromMesh = !1;
+}
+GlobeSurfaceTileProvider.prototype.isDestroyed = function() {
+ return !1;
+};
+GlobeSurfaceTileProvider.prototype.destroy = function() {
+ return this._tileProvider = this._tileProvider && this._tileProvider.destroy(), this._clippingPlanes = this._clippingPlanes && this._clippingPlanes.destroy(), this._clippingPolygons = this._clippingPolygons && this._clippingPolygons.destroy(), this._removeLayerAddedListener = this._removeLayerAddedListener && this._removeLayerAddedListener(), this._removeLayerRemovedListener = this._removeLayerRemovedListener && this._removeLayerRemovedListener(), this._removeLayerMovedListener = this._removeLayerMovedListener && this._removeLayerMovedListener(), this._removeLayerShownListener = this._removeLayerShownListener && this._removeLayerShownListener(), destroyObject(this);
+};
+function getTileReadyCallback(e, t, n) {
+ return function(i) {
+ let r, o, s = -1;
+ const c = i.data.imagery, l = c.length;
+ let d;
+ for (d = 0; d < l; ++d)
+ if (r = c[d], o = defaultValue(
+ r.readyImagery,
+ r.loadingImagery
+ ), o.imageryLayer === t) {
+ s = d;
+ break;
+ }
+ if (s !== -1) {
+ const f = s + e;
+ if (r = c[f], o = defined(r) ? defaultValue(r.readyImagery, r.loadingImagery) : void 0, !defined(o) || o.imageryLayer !== t)
+ return !t._createTileImagerySkeletons(
+ i,
+ n,
+ f
+ );
+ for (d = s; d < f; ++d)
+ c[d].freeResources();
+ c.splice(s, e);
+ }
+ return !0;
+ };
+}
+GlobeSurfaceTileProvider.prototype._onLayerAdded = function(e, t) {
+ if (!this.isDestroyed() && e.show) {
+ const n = this._terrainProvider, i = this, r = this._imageryLayersUpdatedEvent, o = function() {
+ e._imageryCache = {}, i._quadtree.forEachLoadedTile(function(s) {
+ if (defined(s._loadedCallbacks[e._layerIndex]))
+ return;
+ let c;
+ const l = s.data.imagery, d = l.length;
+ let f = -1, h = 0;
+ for (c = 0; c < d; ++c) {
+ const m = l[c];
+ if (defaultValue(
+ m.readyImagery,
+ m.loadingImagery
+ ).imageryLayer === e)
+ f === -1 && (f = c), ++h;
+ else if (f !== -1)
+ break;
+ }
+ if (f === -1)
+ return;
+ const p = f + h;
+ e._createTileImagerySkeletons(
+ s,
+ n,
+ p
+ ) && (s._loadedCallbacks[e._layerIndex] = getTileReadyCallback(
+ h,
+ e,
+ n
+ ), s.state = QuadtreeTileLoadState$1.LOADING);
+ });
+ };
+ if (e.ready) {
+ const s = e.imageryProvider;
+ s._reload = o;
+ }
+ this._quadtree.forEachLoadedTile(function(s) {
+ e._createTileImagerySkeletons(s, n) && (s.state = QuadtreeTileLoadState$1.LOADING, s.level !== 0 && (s._lastSelectionResultFrame !== i.quadtree._lastSelectionFrameNumber || s._lastSelectionResult !== TileSelectionResult.RENDERED) && (s.renderable = !1));
+ }), this._layerOrderChanged = !0, r.raiseEvent();
+ }
+};
+GlobeSurfaceTileProvider.prototype._onLayerRemoved = function(e, t) {
+ this._quadtree.forEachLoadedTile(function(n) {
+ const i = n.data.imagery;
+ let r = -1, o = 0;
+ for (let s = 0, c = i.length; s < c; ++s) {
+ const l = i[s];
+ let d = l.loadingImagery;
+ if (defined(d) || (d = l.readyImagery), d.imageryLayer === e)
+ r === -1 && (r = s), l.freeResources(), ++o;
+ else if (r !== -1)
+ break;
+ }
+ r !== -1 && i.splice(r, o);
+ }), defined(e.imageryProvider) && (e.imageryProvider._reload = void 0), this._imageryLayersUpdatedEvent.raiseEvent();
+};
+GlobeSurfaceTileProvider.prototype._onLayerMoved = function(e, t, n) {
+ this._layerOrderChanged = !0, this._imageryLayersUpdatedEvent.raiseEvent();
+};
+GlobeSurfaceTileProvider.prototype._onLayerShownOrHidden = function(e, t, n) {
+ n ? this._onLayerAdded(e, t) : this._onLayerRemoved(e, t);
+};
+const scratchClippingPlanesMatrix$1 = new Matrix4(), scratchInverseTransposeClippingPlanesMatrix$1 = new Matrix4();
+function createTileUniformMap(e, t) {
+ const n = {
+ u_initialColor: function() {
+ return this.properties.initialColor;
+ },
+ u_fillHighlightColor: function() {
+ return this.properties.fillHighlightColor;
+ },
+ u_zoomedOutOceanSpecularIntensity: function() {
+ return this.properties.zoomedOutOceanSpecularIntensity;
+ },
+ u_oceanNormalMap: function() {
+ return this.properties.oceanNormalMap;
+ },
+ u_atmosphereLightIntensity: function() {
+ return this.properties.atmosphereLightIntensity;
+ },
+ u_atmosphereRayleighCoefficient: function() {
+ return this.properties.atmosphereRayleighCoefficient;
+ },
+ u_atmosphereMieCoefficient: function() {
+ return this.properties.atmosphereMieCoefficient;
+ },
+ u_atmosphereRayleighScaleHeight: function() {
+ return this.properties.atmosphereRayleighScaleHeight;
+ },
+ u_atmosphereMieScaleHeight: function() {
+ return this.properties.atmosphereMieScaleHeight;
+ },
+ u_atmosphereMieAnisotropy: function() {
+ return this.properties.atmosphereMieAnisotropy;
+ },
+ u_lightingFadeDistance: function() {
+ return this.properties.lightingFadeDistance;
+ },
+ u_nightFadeDistance: function() {
+ return this.properties.nightFadeDistance;
+ },
+ u_center3D: function() {
+ return this.properties.center3D;
+ },
+ u_verticalExaggerationAndRelativeHeight: function() {
+ return this.properties.verticalExaggerationAndRelativeHeight;
+ },
+ u_tileRectangle: function() {
+ return this.properties.tileRectangle;
+ },
+ u_modifiedModelView: function() {
+ const i = e.context.uniformState.view, r = Matrix4.multiplyByPoint(
+ i,
+ this.properties.rtc,
+ centerEyeScratch
+ );
+ return Matrix4.setTranslation(i, r, modifiedModelViewScratch), modifiedModelViewScratch;
+ },
+ u_modifiedModelViewProjection: function() {
+ const i = e.context.uniformState.view, r = e.context.uniformState.projection, o = Matrix4.multiplyByPoint(
+ i,
+ this.properties.rtc,
+ centerEyeScratch
+ );
+ return Matrix4.setTranslation(
+ i,
+ o,
+ modifiedModelViewProjectionScratch
+ ), Matrix4.multiply(
+ r,
+ modifiedModelViewProjectionScratch,
+ modifiedModelViewProjectionScratch
+ ), modifiedModelViewProjectionScratch;
+ },
+ u_dayTextures: function() {
+ return this.properties.dayTextures;
+ },
+ u_dayTextureTranslationAndScale: function() {
+ return this.properties.dayTextureTranslationAndScale;
+ },
+ u_dayTextureTexCoordsRectangle: function() {
+ return this.properties.dayTextureTexCoordsRectangle;
+ },
+ u_dayTextureUseWebMercatorT: function() {
+ return this.properties.dayTextureUseWebMercatorT;
+ },
+ u_dayTextureAlpha: function() {
+ return this.properties.dayTextureAlpha;
+ },
+ u_dayTextureNightAlpha: function() {
+ return this.properties.dayTextureNightAlpha;
+ },
+ u_dayTextureDayAlpha: function() {
+ return this.properties.dayTextureDayAlpha;
+ },
+ u_dayTextureBrightness: function() {
+ return this.properties.dayTextureBrightness;
+ },
+ u_dayTextureContrast: function() {
+ return this.properties.dayTextureContrast;
+ },
+ u_dayTextureHue: function() {
+ return this.properties.dayTextureHue;
+ },
+ u_dayTextureSaturation: function() {
+ return this.properties.dayTextureSaturation;
+ },
+ u_dayTextureOneOverGamma: function() {
+ return this.properties.dayTextureOneOverGamma;
+ },
+ u_dayIntensity: function() {
+ return this.properties.dayIntensity;
+ },
+ u_southAndNorthLatitude: function() {
+ return this.properties.southAndNorthLatitude;
+ },
+ u_southMercatorYAndOneOverHeight: function() {
+ return this.properties.southMercatorYAndOneOverHeight;
+ },
+ u_waterMask: function() {
+ return this.properties.waterMask;
+ },
+ u_waterMaskTranslationAndScale: function() {
+ return this.properties.waterMaskTranslationAndScale;
+ },
+ u_minMaxHeight: function() {
+ return this.properties.minMaxHeight;
+ },
+ u_scaleAndBias: function() {
+ return this.properties.scaleAndBias;
+ },
+ u_dayTextureSplit: function() {
+ return this.properties.dayTextureSplit;
+ },
+ u_dayTextureCutoutRectangles: function() {
+ return this.properties.dayTextureCutoutRectangles;
+ },
+ u_clippingPlanes: function() {
+ const i = t._clippingPlanes;
+ return defined(i) && defined(i.texture) ? i.texture : e.context.defaultTexture;
+ },
+ u_cartographicLimitRectangle: function() {
+ return this.properties.localizedCartographicLimitRectangle;
+ },
+ u_clippingPlanesMatrix: function() {
+ const i = t._clippingPlanes, r = defined(i) ? Matrix4.multiply(
+ e.context.uniformState.view,
+ i.modelMatrix,
+ scratchClippingPlanesMatrix$1
+ ) : Matrix4.IDENTITY;
+ return Matrix4.inverseTranspose(
+ r,
+ scratchInverseTransposeClippingPlanesMatrix$1
+ );
+ },
+ u_clippingPlanesEdgeStyle: function() {
+ const i = this.properties.clippingPlanesEdgeColor;
+ return i.alpha = this.properties.clippingPlanesEdgeWidth, i;
+ },
+ u_clippingDistance: function() {
+ const i = t._clippingPolygons.clippingTexture;
+ return defined(i) ? i : e.context.defaultTexture;
+ },
+ u_clippingExtents: function() {
+ const i = t._clippingPolygons.extentsTexture;
+ return defined(i) ? i : e.context.defaultTexture;
+ },
+ u_minimumBrightness: function() {
+ return e.fog.minimumBrightness;
+ },
+ u_hsbShift: function() {
+ return this.properties.hsbShift;
+ },
+ u_colorsToAlpha: function() {
+ return this.properties.colorsToAlpha;
+ },
+ u_frontFaceAlphaByDistance: function() {
+ return this.properties.frontFaceAlphaByDistance;
+ },
+ u_backFaceAlphaByDistance: function() {
+ return this.properties.backFaceAlphaByDistance;
+ },
+ u_translucencyRectangle: function() {
+ return this.properties.localizedTranslucencyRectangle;
+ },
+ u_undergroundColor: function() {
+ return this.properties.undergroundColor;
+ },
+ u_undergroundColorAlphaByDistance: function() {
+ return this.properties.undergroundColorAlphaByDistance;
+ },
+ u_lambertDiffuseMultiplier: function() {
+ return this.properties.lambertDiffuseMultiplier;
+ },
+ u_vertexShadowDarkness: function() {
+ return this.properties.vertexShadowDarkness;
+ },
+ // make a separate object so that changes to the properties are seen on
+ // derived commands that combine another uniform map with this one.
+ properties: {
+ initialColor: new Cartesian4(0, 0, 0.5, 1),
+ fillHighlightColor: new Color(0, 0, 0, 0),
+ zoomedOutOceanSpecularIntensity: 0.5,
+ oceanNormalMap: void 0,
+ lightingFadeDistance: new Cartesian2(65e5, 9e6),
+ nightFadeDistance: new Cartesian2(1e7, 4e7),
+ atmosphereLightIntensity: 10,
+ atmosphereRayleighCoefficient: new Cartesian3(55e-7, 13e-6, 284e-7),
+ atmosphereMieCoefficient: new Cartesian3(21e-6, 21e-6, 21e-6),
+ atmosphereRayleighScaleHeight: 1e4,
+ atmosphereMieScaleHeight: 3200,
+ atmosphereMieAnisotropy: 0.9,
+ hsbShift: new Cartesian3(),
+ center3D: void 0,
+ rtc: new Cartesian3(),
+ modifiedModelView: new Matrix4(),
+ tileRectangle: new Cartesian4(),
+ verticalExaggerationAndRelativeHeight: new Cartesian2(1, 0),
+ dayTextures: [],
+ dayTextureTranslationAndScale: [],
+ dayTextureTexCoordsRectangle: [],
+ dayTextureUseWebMercatorT: [],
+ dayTextureAlpha: [],
+ dayTextureNightAlpha: [],
+ dayTextureDayAlpha: [],
+ dayTextureBrightness: [],
+ dayTextureContrast: [],
+ dayTextureHue: [],
+ dayTextureSaturation: [],
+ dayTextureOneOverGamma: [],
+ dayTextureSplit: [],
+ dayTextureCutoutRectangles: [],
+ dayIntensity: 0,
+ colorsToAlpha: [],
+ southAndNorthLatitude: new Cartesian2(),
+ southMercatorYAndOneOverHeight: new Cartesian2(),
+ waterMask: void 0,
+ waterMaskTranslationAndScale: new Cartesian4(),
+ minMaxHeight: new Cartesian2(),
+ scaleAndBias: new Matrix4(),
+ clippingPlanesEdgeColor: Color.clone(Color.WHITE),
+ clippingPlanesEdgeWidth: 0,
+ localizedCartographicLimitRectangle: new Cartesian4(),
+ frontFaceAlphaByDistance: new Cartesian4(),
+ backFaceAlphaByDistance: new Cartesian4(),
+ localizedTranslucencyRectangle: new Cartesian4(),
+ undergroundColor: Color.clone(Color.TRANSPARENT),
+ undergroundColorAlphaByDistance: new Cartesian4(),
+ lambertDiffuseMultiplier: 0,
+ vertexShadowDarkness: 0
+ }
+ };
+ return defined(t.materialUniformMap) ? combine$2(n, t.materialUniformMap) : n;
+}
+function createWireframeVertexArrayIfNecessary(e, t, n) {
+ const i = n.data;
+ let r, o;
+ if (defined(i.vertexArray) ? (r = i.mesh, o = i.vertexArray) : defined(i.fill) && defined(i.fill.vertexArray) && (r = i.fill.mesh, o = i.fill.vertexArray), !(!defined(r) || !defined(o))) {
+ if (defined(i.wireframeVertexArray)) {
+ if (i.wireframeVertexArray.mesh === r)
+ return;
+ i.wireframeVertexArray.destroy(), i.wireframeVertexArray = void 0;
+ }
+ i.wireframeVertexArray = createWireframeVertexArray(
+ e,
+ o,
+ r
+ ), i.wireframeVertexArray.mesh = r;
+ }
+}
+function createWireframeVertexArray(e, t, n) {
+ const r = {
+ indices: n.indices,
+ primitiveType: PrimitiveType$1.TRIANGLES
+ };
+ GeometryPipeline.toWireframe(r);
+ const o = r.indices, s = Buffer.createIndexBuffer({
+ context: e,
+ typedArray: o,
+ usage: BufferUsage$1.STATIC_DRAW,
+ indexDatatype: IndexDatatype$1.fromSizeInBytes(
+ o.BYTES_PER_ELEMENT
+ )
+ });
+ return new VertexArray({
+ context: e,
+ attributes: t._attributes,
+ indexBuffer: s
+ });
+}
+let getDebugOrientedBoundingBox, getDebugBoundingSphere, debugDestroyPrimitive;
+(function() {
+ const e = new GeometryInstance({
+ geometry: BoxOutlineGeometry.fromDimensions({
+ dimensions: new Cartesian3(2, 2, 2)
+ })
+ }), t = new GeometryInstance({
+ geometry: new SphereOutlineGeometry({ radius: 1 })
+ });
+ let n = new Matrix4(), i, r;
+ function o(s) {
+ return new Primitive$3({
+ geometryInstances: s,
+ appearance: new PerInstanceColorAppearance({
+ translucent: !1,
+ flat: !0
+ }),
+ asynchronous: !1
+ });
+ }
+ getDebugOrientedBoundingBox = function(s, c) {
+ return s === i || (debugDestroyPrimitive(), i = s, n = Matrix4.fromRotationTranslation(
+ s.halfAxes,
+ s.center,
+ n
+ ), e.modelMatrix = n, e.attributes.color = ColorGeometryInstanceAttribute.fromColor(
+ c
+ ), r = o(e)), r;
+ }, getDebugBoundingSphere = function(s, c) {
+ return s === i || (debugDestroyPrimitive(), i = s, n = Matrix4.fromTranslation(s.center, n), n = Matrix4.multiplyByUniformScale(
+ n,
+ s.radius,
+ n
+ ), t.modelMatrix = n, t.attributes.color = ColorGeometryInstanceAttribute.fromColor(
+ c
+ ), r = o(t)), r;
+ }, debugDestroyPrimitive = function() {
+ defined(r) && (r.destroy(), r = void 0, i = void 0);
+ };
+})();
+const otherPassesInitialColor = new Cartesian4(0, 0, 0, 0), surfaceShaderSetOptionsScratch = {
+ frameState: void 0,
+ surfaceTile: void 0,
+ numberOfDayTextures: void 0,
+ applyBrightness: void 0,
+ applyContrast: void 0,
+ applyHue: void 0,
+ applySaturation: void 0,
+ applyGamma: void 0,
+ applyAlpha: void 0,
+ applyDayNightAlpha: void 0,
+ applySplit: void 0,
+ showReflectiveOcean: void 0,
+ showOceanWaves: void 0,
+ enableLighting: void 0,
+ dynamicAtmosphereLighting: void 0,
+ dynamicAtmosphereLightingFromSun: void 0,
+ showGroundAtmosphere: void 0,
+ perFragmentGroundAtmosphere: void 0,
+ hasVertexNormals: void 0,
+ useWebMercatorProjection: void 0,
+ enableFog: void 0,
+ enableClippingPlanes: void 0,
+ clippingPlanes: void 0,
+ enableClippingPolygons: void 0,
+ clippingPolygons: void 0,
+ clippedByBoundaries: void 0,
+ hasImageryLayerCutout: void 0,
+ colorCorrect: void 0,
+ colorToAlpha: void 0,
+ hasGeodeticSurfaceNormals: void 0,
+ hasExaggeration: void 0
+}, defaultUndergroundColor = Color.TRANSPARENT, defaultUndergroundColorAlphaByDistance = new NearFarScalar();
+function addDrawCommandsForTile(e, t, n) {
+ const i = t.data;
+ defined(i.vertexArray) || (i.fill === void 0 && (i.fill = new TerrainFillMesh(t)), i.fill.update(e, n));
+ const r = n.creditDisplay, o = i.terrainData;
+ if (defined(o) && defined(o.credits)) {
+ const j = o.credits;
+ for (let se = 0, Pe = j.length; se < Pe; ++se)
+ r.addCreditToNextFrame(j[se]);
+ }
+ let s = ContextLimits.maximumTextureImageUnits, c = i.waterMaskTexture, l = i.waterMaskTranslationAndScale;
+ !defined(c) && defined(i.fill) && (c = i.fill.waterMaskTexture, l = i.fill.waterMaskTranslationAndScale);
+ const d = n.cameraUnderground, f = n.globeTranslucencyState, h = f.translucent, p = f.frontFaceAlphaByDistance, m = f.backFaceAlphaByDistance, _ = f.rectangle, y = defaultValue(
+ e.undergroundColor,
+ defaultUndergroundColor
+ ), C = defaultValue(
+ e.undergroundColorAlphaByDistance,
+ defaultUndergroundColorAlphaByDistance
+ ), T = isUndergroundVisible(e, n) && n.mode === SceneMode$1.SCENE3D && y.alpha > 0 && (C.nearValue > 0 || C.farValue > 0), x = e.lambertDiffuseMultiplier, b = e.vertexShadowDarkness, S = e.hasWaterMask && defined(c), E = S && e.showWaterEffect, A = e.oceanNormalMap, D = E && defined(A), P = e.terrainProvider, I = defined(P) && e.terrainProvider.hasVertexNormals, M = n.fog.enabled && n.fog.renderable && !d, R = e.showGroundAtmosphere && n.mode === SceneMode$1.SCENE3D, L = ShadowMode$1.castShadows(e.shadows) && !h, g = ShadowMode$1.receiveShadows(e.shadows) && !h, w = e.hueShift, O = e.saturationShift, N = e.brightnessShift;
+ let F = !(CesiumMath.equalsEpsilon(w, 0, CesiumMath.EPSILON7) && CesiumMath.equalsEpsilon(O, 0, CesiumMath.EPSILON7) && CesiumMath.equalsEpsilon(N, 0, CesiumMath.EPSILON7)), B = !1;
+ if (R) {
+ const j = Cartesian3.magnitude(n.camera.positionWC), se = e.nightFadeOutDistance;
+ B = j > se;
+ }
+ S && --s, D && --s, defined(n.shadowState) && n.shadowState.shadowsEnabled && --s, defined(e.clippingPlanes) && e.clippingPlanes.enabled && --s, defined(e.clippingPolygons) && e.clippingPolygons.enabled && (--s, --s), s -= f.numberOfTextureUniforms;
+ const V = i.renderedMesh;
+ let U = V.center;
+ const k = V.encoding, $ = i.tileBoundingRegion, G = n.verticalExaggeration, q = n.verticalExaggerationRelativeHeight, z = G !== 1, H = k.hasGeodeticSurfaceNormals, Q = tileRectangleScratch;
+ let ne = 0, K = 0, Z = 0, ee = 0, oe = !1;
+ if (n.mode !== SceneMode$1.SCENE3D) {
+ const j = n.mapProjection, se = j.project(
+ Rectangle.southwest(t.rectangle),
+ southwestScratch
+ ), Pe = j.project(
+ Rectangle.northeast(t.rectangle),
+ northeastScratch
+ );
+ if (Q.x = se.x, Q.y = se.y, Q.z = Pe.x, Q.w = Pe.y, n.mode !== SceneMode$1.MORPHING && (U = rtcScratch, U.x = 0, U.y = (Q.z + Q.x) * 0.5, U.z = (Q.w + Q.y) * 0.5, Q.x -= U.y, Q.y -= U.z, Q.z -= U.y, Q.w -= U.z), n.mode === SceneMode$1.SCENE2D && k.quantization === TerrainQuantization$1.BITS12) {
+ const le = 1 / (Math.pow(2, 12) - 1) * 0.5, De = (Q.z - Q.x) * le, Me = (Q.w - Q.y) * le;
+ Q.x -= De, Q.y -= Me, Q.z += De, Q.w += Me;
+ }
+ j instanceof WebMercatorProjection && (ne = t.rectangle.south, K = t.rectangle.north, Z = WebMercatorProjection.geodeticLatitudeToMercatorAngle(
+ ne
+ ), ee = 1 / (WebMercatorProjection.geodeticLatitudeToMercatorAngle(K) - Z), oe = !0);
+ }
+ const X = surfaceShaderSetOptionsScratch;
+ X.frameState = n, X.surfaceTile = i, X.hasWaterMask = S, X.showReflectiveOcean = E, X.showOceanWaves = D, X.enableLighting = e.enableLighting, X.dynamicAtmosphereLighting = e.dynamicAtmosphereLighting, X.dynamicAtmosphereLightingFromSun = e.dynamicAtmosphereLightingFromSun, X.showGroundAtmosphere = R, X.atmosphereLightIntensity = e.atmosphereLightIntensity, X.atmosphereRayleighCoefficient = e.atmosphereRayleighCoefficient, X.atmosphereMieCoefficient = e.atmosphereMieCoefficient, X.atmosphereRayleighScaleHeight = e.atmosphereRayleighScaleHeight, X.atmosphereMieScaleHeight = e.atmosphereMieScaleHeight, X.atmosphereMieAnisotropy = e.atmosphereMieAnisotropy, X.perFragmentGroundAtmosphere = B, X.hasVertexNormals = I, X.useWebMercatorProjection = oe, X.clippedByBoundaries = i.clippedByBoundaries, X.hasGeodeticSurfaceNormals = H, X.hasExaggeration = z;
+ const fe = i.imagery;
+ let de = 0;
+ const ce = fe.length, ye = e.showSkirts && !d && !h, ge = e.backFaceCulling && !d && !h, re = ge ? e._renderState : e._disableCullingRenderState, be = ge ? e._blendRenderState : e._disableCullingBlendRenderState;
+ let pe = re, Te = e._firstPassInitialColor;
+ const xe = n.context;
+ if (defined(e._debug.boundingSphereTile) || debugDestroyPrimitive(), e._materialUniformMap !== e.materialUniformMap) {
+ e._materialUniformMap = e.materialUniformMap;
+ const j = e._drawCommands.length;
+ for (let se = 0; se < j; ++se)
+ e._uniformMaps[se] = createTileUniformMap(
+ n,
+ e
+ );
+ }
+ do {
+ let j = 0, se, Pe;
+ if (e._drawCommands.length <= e._usedDrawCommands ? (se = new DrawCommand(), se.owner = t, se.cull = !1, se.boundingVolume = new BoundingSphere(), se.orientedBoundingBox = void 0, Pe = createTileUniformMap(n, e), e._drawCommands.push(se), e._uniformMaps.push(Pe)) : (se = e._drawCommands[e._usedDrawCommands], Pe = e._uniformMaps[e._usedDrawCommands]), se.owner = t, ++e._usedDrawCommands, t === e._debug.boundingSphereTile) {
+ const ze = $.boundingVolume, Ke = $.boundingSphere;
+ defined(ze) ? getDebugOrientedBoundingBox(ze, Color.RED).update(n) : defined(Ke) && getDebugBoundingSphere(Ke, Color.RED).update(n);
+ }
+ const le = Pe.properties;
+ Cartesian4.clone(Te, le.initialColor), le.oceanNormalMap = A, le.lightingFadeDistance.x = e.lightingFadeOutDistance, le.lightingFadeDistance.y = e.lightingFadeInDistance, le.nightFadeDistance.x = e.nightFadeOutDistance, le.nightFadeDistance.y = e.nightFadeInDistance, le.atmosphereLightIntensity = e.atmosphereLightIntensity, le.atmosphereRayleighCoefficient = e.atmosphereRayleighCoefficient, le.atmosphereMieCoefficient = e.atmosphereMieCoefficient, le.atmosphereRayleighScaleHeight = e.atmosphereRayleighScaleHeight, le.atmosphereMieScaleHeight = e.atmosphereMieScaleHeight, le.atmosphereMieAnisotropy = e.atmosphereMieAnisotropy, le.zoomedOutOceanSpecularIntensity = e.zoomedOutOceanSpecularIntensity;
+ const De = d ? m : p, Me = d ? p : m;
+ defined(De) && (Cartesian4.fromElements(
+ De.near,
+ De.nearValue,
+ De.far,
+ De.farValue,
+ le.frontFaceAlphaByDistance
+ ), Cartesian4.fromElements(
+ Me.near,
+ Me.nearValue,
+ Me.far,
+ Me.farValue,
+ le.backFaceAlphaByDistance
+ )), Cartesian4.fromElements(
+ C.near,
+ C.nearValue,
+ C.far,
+ C.farValue,
+ le.undergroundColorAlphaByDistance
+ ), Color.clone(y, le.undergroundColor), le.lambertDiffuseMultiplier = x, le.vertexShadowDarkness = b;
+ const He = !defined(i.vertexArray) && defined(e.fillHighlightColor) && e.fillHighlightColor.alpha > 0;
+ He && Color.clone(
+ e.fillHighlightColor,
+ le.fillHighlightColor
+ ), le.verticalExaggerationAndRelativeHeight.x = G, le.verticalExaggerationAndRelativeHeight.y = q, le.center3D = V.center, Cartesian3.clone(U, le.rtc), Cartesian4.clone(Q, le.tileRectangle), le.southAndNorthLatitude.x = ne, le.southAndNorthLatitude.y = K, le.southMercatorYAndOneOverHeight.x = Z, le.southMercatorYAndOneOverHeight.y = ee;
+ const Oe = localizedCartographicLimitRectangleScratch, $e = clipRectangleAntimeridian(
+ t.rectangle,
+ e.cartographicLimitRectangle
+ ), J = localizedTranslucencyRectangleScratch, ae = clipRectangleAntimeridian(
+ t.rectangle,
+ _
+ );
+ Cartesian3.fromElements(
+ w,
+ O,
+ N,
+ le.hsbShift
+ );
+ const te = t.rectangle, ie = 1 / te.width, ue = 1 / te.height;
+ Oe.x = ($e.west - te.west) * ie, Oe.y = ($e.south - te.south) * ue, Oe.z = ($e.east - te.west) * ie, Oe.w = ($e.north - te.south) * ue, Cartesian4.clone(
+ Oe,
+ le.localizedCartographicLimitRectangle
+ ), J.x = (ae.west - te.west) * ie, J.y = (ae.south - te.south) * ue, J.z = (ae.east - te.west) * ie, J.w = (ae.north - te.south) * ue, Cartesian4.clone(
+ J,
+ le.localizedTranslucencyRectangle
+ );
+ const me = M && CesiumMath.fog(t._distance, n.fog.density) > CesiumMath.EPSILON3;
+ F = F && (me || R);
+ let Se = !1, we = !1, Ee = !1, Ve = !1, We = !1, Ne = !1, Ae = !1, ke = !1, Fe = !1, Je = !1;
+ for (; j < s && de < ce; ) {
+ const ze = fe[de], Ke = ze.readyImagery;
+ if (++de, !defined(Ke) || Ke.imageryLayer.alpha === 0)
+ continue;
+ const Ye = ze.useWebMercatorT ? Ke.textureWebMercator : Ke.texture, Ue = Ke.imageryLayer;
+ defined(ze.textureTranslationAndScale) || (ze.textureTranslationAndScale = Ue._calculateTextureTranslationAndScale(
+ t,
+ ze
+ )), le.dayTextures[j] = Ye, le.dayTextureTranslationAndScale[j] = ze.textureTranslationAndScale, le.dayTextureTexCoordsRectangle[j] = ze.textureCoordinateRectangle, le.dayTextureUseWebMercatorT[j] = ze.useWebMercatorT, le.dayTextureAlpha[j] = Ue.alpha, Ne = Ne || le.dayTextureAlpha[j] !== 1, le.dayTextureNightAlpha[j] = Ue.nightAlpha, Ae = Ae || le.dayTextureNightAlpha[j] !== 1, le.dayTextureDayAlpha[j] = Ue.dayAlpha, Ae = Ae || le.dayTextureDayAlpha[j] !== 1, le.dayTextureBrightness[j] = Ue.brightness, Se = Se || le.dayTextureBrightness[j] !== ImageryLayer.DEFAULT_BRIGHTNESS, le.dayTextureContrast[j] = Ue.contrast, we = we || le.dayTextureContrast[j] !== ImageryLayer.DEFAULT_CONTRAST, le.dayTextureHue[j] = Ue.hue, Ee = Ee || le.dayTextureHue[j] !== ImageryLayer.DEFAULT_HUE, le.dayTextureSaturation[j] = Ue.saturation, Ve = Ve || le.dayTextureSaturation[j] !== ImageryLayer.DEFAULT_SATURATION, le.dayTextureOneOverGamma[j] = 1 / Ue.gamma, We = We || le.dayTextureOneOverGamma[j] !== 1 / ImageryLayer.DEFAULT_GAMMA, le.dayTextureSplit[j] = Ue.splitDirection, ke = ke || le.dayTextureSplit[j] !== 0;
+ let et = le.dayTextureCutoutRectangles[j];
+ if (defined(et) || (et = le.dayTextureCutoutRectangles[j] = new Cartesian4()), Cartesian4.clone(Cartesian4.ZERO, et), defined(Ue.cutoutRectangle)) {
+ const Ie = clipRectangleAntimeridian(
+ te,
+ Ue.cutoutRectangle
+ ), _e = Rectangle.simpleIntersection(
+ Ie,
+ te,
+ rectangleIntersectionScratch
+ );
+ Fe = defined(_e) || Fe, et.x = (Ie.west - te.west) * ie, et.y = (Ie.south - te.south) * ue, et.z = (Ie.east - te.west) * ie, et.w = (Ie.north - te.south) * ue;
+ }
+ let tt = le.colorsToAlpha[j];
+ defined(tt) || (tt = le.colorsToAlpha[j] = new Cartesian4());
+ const nt = defined(Ue.colorToAlpha) && Ue.colorToAlphaThreshold > 0;
+ if (Je = Je || nt, nt) {
+ const Ie = Ue.colorToAlpha;
+ tt.x = Ie.red, tt.y = Ie.green, tt.z = Ie.blue, tt.w = Ue.colorToAlphaThreshold;
+ } else
+ tt.w = -1;
+ if (defined(Ke.credits)) {
+ const Ie = Ke.credits;
+ for (let _e = 0, Y = Ie.length; _e < Y; ++_e)
+ r.addCreditToNextFrame(Ie[_e]);
+ }
+ ++j;
+ }
+ le.dayTextures.length = j, le.waterMask = c, Cartesian4.clone(
+ l,
+ le.waterMaskTranslationAndScale
+ ), le.minMaxHeight.x = k.minimumHeight, le.minMaxHeight.y = k.maximumHeight, Matrix4.clone(k.matrix, le.scaleAndBias);
+ const ve = e._clippingPlanes, Le = defined(ve) && ve.enabled && t.isClipped;
+ Le && (le.clippingPlanesEdgeColor = Color.clone(
+ ve.edgeColor,
+ le.clippingPlanesEdgeColor
+ ), le.clippingPlanesEdgeWidth = ve.edgeWidth);
+ const rt = e._clippingPolygons, Be = defined(rt) && rt.enabled && t.isClipped;
+ X.numberOfDayTextures = j, X.applyBrightness = Se, X.applyContrast = we, X.applyHue = Ee, X.applySaturation = Ve, X.applyGamma = We, X.applyAlpha = Ne, X.applyDayNightAlpha = Ae, X.applySplit = ke, X.enableFog = me, X.enableClippingPlanes = Le, X.clippingPlanes = ve, X.enableClippingPolygons = Be, X.clippingPolygons = rt, X.hasImageryLayerCutout = Fe, X.colorCorrect = F, X.highlightFillTile = He, X.colorToAlpha = Je, X.showUndergroundColor = T, X.translucent = h;
+ let Ze = i.renderedMesh.indices.length;
+ ye || (Ze = i.renderedMesh.indexCountWithoutSkirts), se.shaderProgram = e._surfaceShaderSet.getShaderProgram(
+ X
+ ), se.castShadows = L, se.receiveShadows = g, se.renderState = pe, se.primitiveType = PrimitiveType$1.TRIANGLES, se.vertexArray = i.vertexArray || i.fill.vertexArray, se.count = Ze, se.uniformMap = Pe, se.pass = Pass$1.GLOBE, e._debug.wireframe && (createWireframeVertexArrayIfNecessary(xe, e, t), defined(i.wireframeVertexArray) && (se.vertexArray = i.wireframeVertexArray, se.primitiveType = PrimitiveType$1.LINES, se.count = Ze * 2));
+ let je = se.boundingVolume;
+ const at = se.orientedBoundingBox;
+ n.mode !== SceneMode$1.SCENE3D ? (BoundingSphere.fromRectangleWithHeights2D(
+ t.rectangle,
+ n.mapProjection,
+ $.minimumHeight,
+ $.maximumHeight,
+ je
+ ), Cartesian3.fromElements(
+ je.center.z,
+ je.center.x,
+ je.center.y,
+ je.center
+ ), n.mode === SceneMode$1.MORPHING && (je = BoundingSphere.union(
+ $.boundingSphere,
+ je,
+ je
+ ))) : (se.boundingVolume = BoundingSphere.clone(
+ $.boundingSphere,
+ je
+ ), se.orientedBoundingBox = OrientedBoundingBox.clone(
+ $.boundingVolume,
+ at
+ )), se.dirty = !0, h && f.updateDerivedCommands(se, n), pushCommand(se, n), pe = be, Te = otherPassesInitialColor;
+ } while (de < ce);
+}
+function GlobeTranslucency() {
+ this._enabled = !1, this._frontFaceAlpha = 1, this._frontFaceAlphaByDistance = void 0, this._backFaceAlpha = 1, this._backFaceAlphaByDistance = void 0, this._rectangle = Rectangle.clone(Rectangle.MAX_VALUE);
+}
+Object.defineProperties(GlobeTranslucency.prototype, {
+ /**
+ * When true, the globe is rendered as a translucent surface.
+ * START or LOADING.
+ * @memberof QuadtreeTile.prototype
+ * @type {boolean}
+ */
+ needsLoading: {
+ get: function() {
+ return this.state < QuadtreeTileLoadState$1.DONE;
+ }
+ },
+ /**
+ * Gets a value indicating whether or not this tile is eligible to be unloaded.
+ * Typically, a tile is ineligible to be unloaded while an asynchronous operation,
+ * such as a request for data, is in progress on it. A tile will never be
+ * unloaded while it is needed for rendering, regardless of the value of this
+ * property. If {@link QuadtreeTile#data} is defined and has an
+ * eligibleForUnloading property, the value of that property is returned.
+ * Otherwise, this property returns true.
+ * @memberof QuadtreeTile.prototype
+ * @type {boolean}
+ */
+ eligibleForUnloading: {
+ get: function() {
+ let e = !0;
+ return defined(this.data) && (e = this.data.eligibleForUnloading, defined(e) || (e = !0)), e;
+ }
+ }
+});
+QuadtreeTile.prototype.findLevelZeroTile = function(e, t, n) {
+ const i = this.tilingScheme.getNumberOfXTilesAtLevel(0);
+ if (t < 0 ? t += i : t >= i && (t -= i), !(n < 0 || n >= this.tilingScheme.getNumberOfYTilesAtLevel(0)))
+ return e.filter(function(r) {
+ return r.x === t && r.y === n;
+ })[0];
+};
+QuadtreeTile.prototype.findTileToWest = function(e) {
+ const t = this.parent;
+ if (t === void 0)
+ return this.findLevelZeroTile(e, this.x - 1, this.y);
+ if (t.southeastChild === this)
+ return t.southwestChild;
+ if (t.northeastChild === this)
+ return t.northwestChild;
+ const n = t.findTileToWest(e);
+ if (n !== void 0)
+ return t.southwestChild === this ? n.southeastChild : n.northeastChild;
+};
+QuadtreeTile.prototype.findTileToEast = function(e) {
+ const t = this.parent;
+ if (t === void 0)
+ return this.findLevelZeroTile(e, this.x + 1, this.y);
+ if (t.southwestChild === this)
+ return t.southeastChild;
+ if (t.northwestChild === this)
+ return t.northeastChild;
+ const n = t.findTileToEast(e);
+ if (n !== void 0)
+ return t.southeastChild === this ? n.southwestChild : n.northwestChild;
+};
+QuadtreeTile.prototype.findTileToSouth = function(e) {
+ const t = this.parent;
+ if (t === void 0)
+ return this.findLevelZeroTile(e, this.x, this.y + 1);
+ if (t.northwestChild === this)
+ return t.southwestChild;
+ if (t.northeastChild === this)
+ return t.southeastChild;
+ const n = t.findTileToSouth(e);
+ if (n !== void 0)
+ return t.southwestChild === this ? n.northwestChild : n.northeastChild;
+};
+QuadtreeTile.prototype.findTileToNorth = function(e) {
+ const t = this.parent;
+ if (t === void 0)
+ return this.findLevelZeroTile(e, this.x, this.y - 1);
+ if (t.southwestChild === this)
+ return t.northwestChild;
+ if (t.southeastChild === this)
+ return t.northeastChild;
+ const n = t.findTileToNorth(e);
+ if (n !== void 0)
+ return t.northwestChild === this ? n.southwestChild : n.southeastChild;
+};
+QuadtreeTile.prototype.freeResources = function() {
+ this.state = QuadtreeTileLoadState$1.START, this.renderable = !1, this.upsampledFromParent = !1, defined(this.data) && defined(this.data.freeResources) && this.data.freeResources(), freeTile(this._southwestChild), this._southwestChild = void 0, freeTile(this._southeastChild), this._southeastChild = void 0, freeTile(this._northwestChild), this._northwestChild = void 0, freeTile(this._northeastChild), this._northeastChild = void 0;
+};
+function freeTile(e) {
+ defined(e) && e.freeResources();
+}
+function TileReplacementQueue() {
+ this.head = void 0, this.tail = void 0, this.count = 0, this._lastBeforeStartOfFrame = void 0;
+}
+TileReplacementQueue.prototype.markStartOfRenderFrame = function() {
+ this._lastBeforeStartOfFrame = this.head;
+};
+TileReplacementQueue.prototype.trimTiles = function(e) {
+ let t = this.tail, n = !0;
+ for (; n && defined(this._lastBeforeStartOfFrame) && this.count > e && defined(t); ) {
+ n = t !== this._lastBeforeStartOfFrame;
+ const i = t.replacementPrevious;
+ t.eligibleForUnloading && (t.freeResources(), remove(this, t)), t = i;
+ }
+};
+function remove(e, t) {
+ const n = t.replacementPrevious, i = t.replacementNext;
+ t === e._lastBeforeStartOfFrame && (e._lastBeforeStartOfFrame = i), t === e.head ? e.head = i : n.replacementNext = i, t === e.tail ? e.tail = n : i.replacementPrevious = n, t.replacementPrevious = void 0, t.replacementNext = void 0, --e.count;
+}
+TileReplacementQueue.prototype.markTileRendered = function(e) {
+ const t = this.head;
+ if (t === e) {
+ e === this._lastBeforeStartOfFrame && (this._lastBeforeStartOfFrame = e.replacementNext);
+ return;
+ }
+ if (++this.count, !defined(t)) {
+ e.replacementPrevious = void 0, e.replacementNext = void 0, this.head = e, this.tail = e;
+ return;
+ }
+ (defined(e.replacementPrevious) || defined(e.replacementNext)) && remove(this, e), e.replacementPrevious = void 0, e.replacementNext = t, t.replacementPrevious = e, this.head = e;
+};
+function QuadtreePrimitive(e) {
+ this._tileProvider = e.tileProvider, this._tileProvider.quadtree = this, this._debug = {
+ enableDebugOutput: !1,
+ maxDepth: 0,
+ maxDepthVisited: 0,
+ tilesVisited: 0,
+ tilesCulled: 0,
+ tilesRendered: 0,
+ tilesWaitingForChildren: 0,
+ lastMaxDepth: -1,
+ lastMaxDepthVisited: -1,
+ lastTilesVisited: -1,
+ lastTilesCulled: -1,
+ lastTilesRendered: -1,
+ lastTilesWaitingForChildren: -1,
+ suspendLodUpdate: !1
+ };
+ const n = this._tileProvider.tilingScheme.ellipsoid;
+ this._tilesToRender = [], this._tileLoadQueueHigh = [], this._tileLoadQueueMedium = [], this._tileLoadQueueLow = [], this._tileReplacementQueue = new TileReplacementQueue(), this._levelZeroTiles = void 0, this._loadQueueTimeSlice = 5, this._tilesInvalidated = !1, this._addHeightCallbacks = [], this._removeHeightCallbacks = [], this._tileToUpdateHeights = [], this._lastTileIndex = 0, this._updateHeightsTimeSlice = 2, this._cameraPositionCartographic = void 0, this._cameraReferenceFrameOriginCartographic = void 0, this.maximumScreenSpaceError = defaultValue(
+ e.maximumScreenSpaceError,
+ 2
+ ), this.tileCacheSize = defaultValue(e.tileCacheSize, 100), this.loadingDescendantLimit = 20, this.preloadAncestors = !0, this.preloadSiblings = !1, this._occluders = new QuadtreeOccluders({
+ ellipsoid: n
+ }), this._tileLoadProgressEvent = new Event(), this._lastTileLoadQueueLength = 0, this._lastSelectionFrameNumber = void 0;
+}
+Object.defineProperties(QuadtreePrimitive.prototype, {
+ /**
+ * Gets the provider of {@link QuadtreeTile} instances for this quadtree.
+ * @type {QuadtreeTile}
+ * @memberof QuadtreePrimitive.prototype
+ */
+ tileProvider: {
+ get: function() {
+ return this._tileProvider;
+ }
+ },
+ /**
+ * Gets an event that's raised when the length of the tile load queue has changed since the last render frame. When the load queue is empty,
+ * all terrain and imagery for the current view have been loaded. The event passes the new length of the tile load queue.
+ *
+ * @memberof QuadtreePrimitive.prototype
+ * @type {Event}
+ */
+ tileLoadProgressEvent: {
+ get: function() {
+ return this._tileLoadProgressEvent;
+ }
+ },
+ occluders: {
+ get: function() {
+ return this._occluders;
+ }
+ }
+});
+QuadtreePrimitive.prototype.invalidateAllTiles = function() {
+ this._tilesInvalidated = !0;
+};
+function invalidateAllTiles(e) {
+ const t = e._tileReplacementQueue;
+ t.head = void 0, t.tail = void 0, t.count = 0, clearTileLoadQueue(e);
+ const n = e._levelZeroTiles;
+ if (defined(n))
+ for (let i = 0; i < n.length; ++i) {
+ const o = n[i].customData, s = o.length;
+ for (let c = 0; c < s; ++c) {
+ const l = o[c];
+ l.level = 0, e._addHeightCallbacks.push(l);
+ }
+ n[i].freeResources();
+ }
+ e._levelZeroTiles = void 0, e._tileProvider.cancelReprojections();
+}
+QuadtreePrimitive.prototype.forEachLoadedTile = function(e) {
+ let t = this._tileReplacementQueue.head;
+ for (; defined(t); )
+ t.state !== QuadtreeTileLoadState$1.START && e(t), t = t.replacementNext;
+};
+QuadtreePrimitive.prototype.forEachRenderedTile = function(e) {
+ const t = this._tilesToRender;
+ for (let n = 0, i = t.length; n < i; ++n)
+ e(t[n]);
+};
+QuadtreePrimitive.prototype.updateHeight = function(e, t) {
+ const n = this, i = {
+ positionOnEllipsoidSurface: void 0,
+ positionCartographic: e,
+ level: -1,
+ callback: t
+ };
+ return i.removeFunc = function() {
+ const r = n._addHeightCallbacks, o = r.length;
+ for (let s = 0; s < o; ++s)
+ if (r[s] === i) {
+ r.splice(s, 1);
+ break;
+ }
+ n._removeHeightCallbacks.push(i), i.callback && (i.callback = void 0);
+ }, n._addHeightCallbacks.push(i), i.removeFunc;
+};
+QuadtreePrimitive.prototype.update = function(e) {
+ defined(this._tileProvider.update) && this._tileProvider.update(e);
+};
+function clearTileLoadQueue(e) {
+ const t = e._debug;
+ t.maxDepth = 0, t.maxDepthVisited = 0, t.tilesVisited = 0, t.tilesCulled = 0, t.tilesRendered = 0, t.tilesWaitingForChildren = 0, e._tileLoadQueueHigh.length = 0, e._tileLoadQueueMedium.length = 0, e._tileLoadQueueLow.length = 0;
+}
+QuadtreePrimitive.prototype.beginFrame = function(e) {
+ e.passes.render && (this._tilesInvalidated && (invalidateAllTiles(this), this._tilesInvalidated = !1), this._tileProvider.initialize(e), clearTileLoadQueue(this), !this._debug.suspendLodUpdate && this._tileReplacementQueue.markStartOfRenderFrame());
+};
+QuadtreePrimitive.prototype.render = function(e) {
+ const t = e.passes, n = this._tileProvider;
+ t.render && (n.beginUpdate(e), selectTilesForRendering(this, e), createRenderCommandsForSelectedTiles(this, e), n.endUpdate(e)), t.pick && this._tilesToRender.length > 0 && n.updateForPick(e);
+};
+function updateTileLoadProgress(e, t) {
+ const n = e._tileLoadQueueHigh.length + e._tileLoadQueueMedium.length + e._tileLoadQueueLow.length;
+ if (n !== e._lastTileLoadQueueLength || e._tilesInvalidated) {
+ const r = Event.prototype.raiseEvent.bind(
+ e._tileLoadProgressEvent,
+ n
+ );
+ t.afterRender.push(() => (r(), !0)), e._lastTileLoadQueueLength = n;
+ }
+ const i = e._debug;
+ i.enableDebugOutput && !i.suspendLodUpdate && (i.maxDepth = e._tilesToRender.reduce(function(r, o) {
+ return Math.max(r, o.level);
+ }, -1), i.tilesRendered = e._tilesToRender.length, (i.tilesVisited !== i.lastTilesVisited || i.tilesRendered !== i.lastTilesRendered || i.tilesCulled !== i.lastTilesCulled || i.maxDepth !== i.lastMaxDepth || i.tilesWaitingForChildren !== i.lastTilesWaitingForChildren || i.maxDepthVisited !== i.lastMaxDepthVisited) && (console.log(
+ `Visited ${i.tilesVisited}, Rendered: ${i.tilesRendered}, Culled: ${i.tilesCulled}, Max Depth Rendered: ${i.maxDepth}, Max Depth Visited: ${i.maxDepthVisited}, Waiting for children: ${i.tilesWaitingForChildren}`
+ ), i.lastTilesVisited = i.tilesVisited, i.lastTilesRendered = i.tilesRendered, i.lastTilesCulled = i.tilesCulled, i.lastMaxDepth = i.maxDepth, i.lastTilesWaitingForChildren = i.tilesWaitingForChildren, i.lastMaxDepthVisited = i.maxDepthVisited));
+}
+QuadtreePrimitive.prototype.endFrame = function(e) {
+ !e.passes.render || e.mode === SceneMode$1.MORPHING || (processTileLoadQueue(this, e), updateHeights(this, e), updateTileLoadProgress(this, e));
+};
+QuadtreePrimitive.prototype.isDestroyed = function() {
+ return !1;
+};
+QuadtreePrimitive.prototype.destroy = function() {
+ this._tileProvider = this._tileProvider && this._tileProvider.destroy();
+};
+let comparisonPoint;
+const centerScratch$1 = new Cartographic();
+function compareDistanceToPoint(e, t) {
+ let n = Rectangle.center(e.rectangle, centerScratch$1);
+ const i = n.longitude - comparisonPoint.longitude, r = n.latitude - comparisonPoint.latitude;
+ n = Rectangle.center(t.rectangle, centerScratch$1);
+ const o = n.longitude - comparisonPoint.longitude, s = n.latitude - comparisonPoint.latitude;
+ return i * i + r * r - (o * o + s * s);
+}
+const cameraOriginScratch = new Cartesian3();
+let rootTraversalDetails = [];
+function selectTilesForRendering(e, t) {
+ const n = e._debug;
+ if (n.suspendLodUpdate)
+ return;
+ const i = e._tilesToRender;
+ i.length = 0;
+ let r;
+ const o = e._tileProvider;
+ if (!defined(e._levelZeroTiles)) {
+ const y = o.tilingScheme;
+ if (defined(y)) {
+ const C = o.tilingScheme;
+ e._levelZeroTiles = QuadtreeTile.createLevelZeroTiles(
+ C
+ );
+ const T = e._levelZeroTiles.length;
+ if (rootTraversalDetails.length < T)
+ for (rootTraversalDetails = new Array(T), r = 0; r < T; ++r)
+ rootTraversalDetails[r] === void 0 && (rootTraversalDetails[r] = new TraversalDetails());
+ } else
+ return;
+ }
+ e._occluders.ellipsoid.cameraPosition = t.camera.positionWC;
+ let s;
+ const c = e._levelZeroTiles, l = c.length > 1 ? e._occluders : void 0;
+ comparisonPoint = t.camera.positionCartographic, c.sort(compareDistanceToPoint);
+ const d = e._addHeightCallbacks, f = e._removeHeightCallbacks, h = t.frameNumber;
+ let p;
+ if (d.length > 0 || f.length > 0) {
+ for (r = 0, p = c.length; r < p; ++r)
+ s = c[r], s._updateCustomData(h, d, f);
+ d.length = 0, f.length = 0;
+ }
+ const m = t.camera;
+ e._cameraPositionCartographic = m.positionCartographic;
+ const _ = Matrix4.getTranslation(
+ m.transform,
+ cameraOriginScratch
+ );
+ for (e._cameraReferenceFrameOriginCartographic = e.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(
+ _,
+ e._cameraReferenceFrameOriginCartographic
+ ), r = 0, p = c.length; r < p; ++r)
+ s = c[r], e._tileReplacementQueue.markTileRendered(s), s.renderable ? visitIfVisible(
+ e,
+ s,
+ o,
+ t,
+ l,
+ !1,
+ rootTraversalDetails[r]
+ ) : (queueTileLoad(e, e._tileLoadQueueHigh, s, t), ++n.tilesWaitingForChildren);
+ e._lastSelectionFrameNumber = h;
+}
+function queueTileLoad(e, t, n, i) {
+ n.needsLoading && (e.tileProvider.computeTileLoadPriority !== void 0 && (n._loadPriority = e.tileProvider.computeTileLoadPriority(
+ n,
+ i
+ )), t.push(n));
+}
+function TraversalDetails() {
+ this.allAreRenderable = !0, this.anyWereRenderedLastFrame = !1, this.notYetRenderableCount = 0;
+}
+function TraversalQuadDetails() {
+ this.southwest = new TraversalDetails(), this.southeast = new TraversalDetails(), this.northwest = new TraversalDetails(), this.northeast = new TraversalDetails();
+}
+TraversalQuadDetails.prototype.combine = function(e) {
+ const t = this.southwest, n = this.southeast, i = this.northwest, r = this.northeast;
+ e.allAreRenderable = t.allAreRenderable && n.allAreRenderable && i.allAreRenderable && r.allAreRenderable, e.anyWereRenderedLastFrame = t.anyWereRenderedLastFrame || n.anyWereRenderedLastFrame || i.anyWereRenderedLastFrame || r.anyWereRenderedLastFrame, e.notYetRenderableCount = t.notYetRenderableCount + n.notYetRenderableCount + i.notYetRenderableCount + r.notYetRenderableCount;
+};
+const traversalQuadsByLevel = new Array(31);
+for (let e = 0; e < traversalQuadsByLevel.length; ++e)
+ traversalQuadsByLevel[e] = new TraversalQuadDetails();
+function visitTile(e, t, n, i, r) {
+ const o = e._debug;
+ ++o.tilesVisited, e._tileReplacementQueue.markTileRendered(n), n._updateCustomData(t.frameNumber), n.level > o.maxDepthVisited && (o.maxDepthVisited = n.level);
+ const s = screenSpaceError(e, t, n) < e.maximumScreenSpaceError, c = n.southwestChild, l = n.southeastChild, d = n.northwestChild, f = n.northeastChild, h = e._lastSelectionFrameNumber, p = n._lastSelectionResultFrame === h ? n._lastSelectionResult : TileSelectionResult.NONE, m = e.tileProvider;
+ if (s || i) {
+ const _ = TileSelectionResult.originalResult(p) === TileSelectionResult.RENDERED, y = TileSelectionResult.originalResult(p) === TileSelectionResult.CULLED || p === TileSelectionResult.NONE, C = n.state === QuadtreeTileLoadState$1.DONE;
+ let T = _ || y || C;
+ if (T || defined(m.canRenderWithoutLosingDetail) && (T = m.canRenderWithoutLosingDetail(n)), T) {
+ s && queueTileLoad(
+ e,
+ e._tileLoadQueueMedium,
+ n,
+ t
+ ), addTileToRenderList(e, n), r.allAreRenderable = n.renderable, r.anyWereRenderedLastFrame = p === TileSelectionResult.RENDERED, r.notYetRenderableCount = n.renderable ? 0 : 1, n._lastSelectionResultFrame = t.frameNumber, n._lastSelectionResult = TileSelectionResult.RENDERED, r.anyWereRenderedLastFrame || e._tileToUpdateHeights.push(n);
+ return;
+ }
+ i = !0, s && queueTileLoad(e, e._tileLoadQueueHigh, n, t);
+ }
+ if (m.canRefine(n)) {
+ if (c.upsampledFromParent && l.upsampledFromParent && d.upsampledFromParent && f.upsampledFromParent) {
+ addTileToRenderList(e, n), queueTileLoad(
+ e,
+ e._tileLoadQueueMedium,
+ n,
+ t
+ ), e._tileReplacementQueue.markTileRendered(c), e._tileReplacementQueue.markTileRendered(l), e._tileReplacementQueue.markTileRendered(d), e._tileReplacementQueue.markTileRendered(f), r.allAreRenderable = n.renderable, r.anyWereRenderedLastFrame = p === TileSelectionResult.RENDERED, r.notYetRenderableCount = n.renderable ? 0 : 1, n._lastSelectionResultFrame = t.frameNumber, n._lastSelectionResult = TileSelectionResult.RENDERED, r.anyWereRenderedLastFrame || e._tileToUpdateHeights.push(n);
+ return;
+ }
+ n._lastSelectionResultFrame = t.frameNumber, n._lastSelectionResult = TileSelectionResult.REFINED;
+ const y = e._tilesToRender.length, C = e._tileLoadQueueLow.length, T = e._tileLoadQueueMedium.length, x = e._tileLoadQueueHigh.length, b = e._tileToUpdateHeights.length;
+ if (visitVisibleChildrenNearToFar(
+ e,
+ c,
+ l,
+ d,
+ f,
+ t,
+ i,
+ r
+ ), y !== e._tilesToRender.length) {
+ const S = r.allAreRenderable, E = r.anyWereRenderedLastFrame, A = r.notYetRenderableCount;
+ let D = !1;
+ if (!S && !E) {
+ const P = e._tilesToRender;
+ for (let M = y; M < P.length; ++M) {
+ let R = P[M];
+ for (; R !== void 0 && R._lastSelectionResult !== TileSelectionResult.KICKED && R !== n; )
+ R._lastSelectionResult = TileSelectionResult.kick(
+ R._lastSelectionResult
+ ), R = R.parent;
+ }
+ e._tilesToRender.length = y, e._tileToUpdateHeights.length = b, addTileToRenderList(e, n), n._lastSelectionResult = TileSelectionResult.RENDERED;
+ const I = p === TileSelectionResult.RENDERED;
+ !I && A > e.loadingDescendantLimit && (e._tileLoadQueueLow.length = C, e._tileLoadQueueMedium.length = T, e._tileLoadQueueHigh.length = x, queueTileLoad(
+ e,
+ e._tileLoadQueueMedium,
+ n,
+ t
+ ), r.notYetRenderableCount = n.renderable ? 0 : 1, D = !0), r.allAreRenderable = n.renderable, r.anyWereRenderedLastFrame = I, I || e._tileToUpdateHeights.push(n), ++o.tilesWaitingForChildren;
+ }
+ e.preloadAncestors && !D && queueTileLoad(e, e._tileLoadQueueLow, n, t);
+ }
+ return;
+ }
+ n._lastSelectionResultFrame = t.frameNumber, n._lastSelectionResult = TileSelectionResult.RENDERED, addTileToRenderList(e, n), queueTileLoad(e, e._tileLoadQueueHigh, n, t), r.allAreRenderable = n.renderable, r.anyWereRenderedLastFrame = p === TileSelectionResult.RENDERED, r.notYetRenderableCount = n.renderable ? 0 : 1;
+}
+function visitVisibleChildrenNearToFar(e, t, n, i, r, o, s, c) {
+ if (t.level >= traversalQuadsByLevel.length)
+ return;
+ const l = o.camera.positionCartographic, d = e._tileProvider, f = e._occluders, h = traversalQuadsByLevel[t.level], p = h.southwest, m = h.southeast, _ = h.northwest, y = h.northeast;
+ l.longitude < t.rectangle.east ? l.latitude < t.rectangle.north ? (visitIfVisible(
+ e,
+ t,
+ d,
+ o,
+ f,
+ s,
+ p
+ ), visitIfVisible(
+ e,
+ n,
+ d,
+ o,
+ f,
+ s,
+ m
+ ), visitIfVisible(
+ e,
+ i,
+ d,
+ o,
+ f,
+ s,
+ _
+ ), visitIfVisible(
+ e,
+ r,
+ d,
+ o,
+ f,
+ s,
+ y
+ )) : (visitIfVisible(
+ e,
+ i,
+ d,
+ o,
+ f,
+ s,
+ _
+ ), visitIfVisible(
+ e,
+ t,
+ d,
+ o,
+ f,
+ s,
+ p
+ ), visitIfVisible(
+ e,
+ r,
+ d,
+ o,
+ f,
+ s,
+ y
+ ), visitIfVisible(
+ e,
+ n,
+ d,
+ o,
+ f,
+ s,
+ m
+ )) : l.latitude < t.rectangle.north ? (visitIfVisible(
+ e,
+ n,
+ d,
+ o,
+ f,
+ s,
+ m
+ ), visitIfVisible(
+ e,
+ t,
+ d,
+ o,
+ f,
+ s,
+ p
+ ), visitIfVisible(
+ e,
+ r,
+ d,
+ o,
+ f,
+ s,
+ y
+ ), visitIfVisible(
+ e,
+ i,
+ d,
+ o,
+ f,
+ s,
+ _
+ )) : (visitIfVisible(
+ e,
+ r,
+ d,
+ o,
+ f,
+ s,
+ y
+ ), visitIfVisible(
+ e,
+ i,
+ d,
+ o,
+ f,
+ s,
+ _
+ ), visitIfVisible(
+ e,
+ n,
+ d,
+ o,
+ f,
+ s,
+ m
+ ), visitIfVisible(
+ e,
+ t,
+ d,
+ o,
+ f,
+ s,
+ p
+ )), h.combine(c);
+}
+function containsNeededPosition(e, t) {
+ const n = t.rectangle;
+ return defined(e._cameraPositionCartographic) && Rectangle.contains(n, e._cameraPositionCartographic) || defined(e._cameraReferenceFrameOriginCartographic) && Rectangle.contains(
+ n,
+ e._cameraReferenceFrameOriginCartographic
+ );
+}
+function visitIfVisible(e, t, n, i, r, o, s) {
+ if (n.computeTileVisibility(t, i, r) !== Visibility$1.NONE)
+ return visitTile(
+ e,
+ i,
+ t,
+ o,
+ s
+ );
+ if (++e._debug.tilesCulled, e._tileReplacementQueue.markTileRendered(t), s.allAreRenderable = !0, s.anyWereRenderedLastFrame = !1, s.notYetRenderableCount = 0, containsNeededPosition(e, t)) {
+ (!defined(t.data) || !defined(t.data.vertexArray)) && queueTileLoad(
+ e,
+ e._tileLoadQueueMedium,
+ t,
+ i
+ );
+ const c = e._lastSelectionFrameNumber, l = t._lastSelectionResultFrame === c ? t._lastSelectionResult : TileSelectionResult.NONE;
+ l !== TileSelectionResult.CULLED_BUT_NEEDED && l !== TileSelectionResult.RENDERED && e._tileToUpdateHeights.push(t), t._lastSelectionResult = TileSelectionResult.CULLED_BUT_NEEDED;
+ } else (e.preloadSiblings || t.level === 0) && queueTileLoad(e, e._tileLoadQueueLow, t, i), t._lastSelectionResult = TileSelectionResult.CULLED;
+ t._lastSelectionResultFrame = i.frameNumber;
+}
+function screenSpaceError(e, t, n) {
+ if (t.mode === SceneMode$1.SCENE2D || t.camera.frustum instanceof OrthographicFrustum || t.camera.frustum instanceof OrthographicOffCenterFrustum)
+ return screenSpaceError2D(e, t, n);
+ const i = e._tileProvider.getLevelMaximumGeometricError(
+ n.level
+ ), r = n._distance, o = t.context.drawingBufferHeight, s = t.camera.frustum.sseDenominator;
+ let c = i * o / (r * s);
+ return t.fog.enabled && (c -= CesiumMath.fog(r, t.fog.density) * t.fog.sse), c /= t.pixelRatio, c;
+}
+function screenSpaceError2D(e, t, n) {
+ let r = t.camera.frustum;
+ const o = r.offCenterFrustum;
+ defined(o) && (r = o);
+ const s = t.context, c = s.drawingBufferWidth, l = s.drawingBufferHeight, d = e._tileProvider.getLevelMaximumGeometricError(
+ n.level
+ ), f = Math.max(r.top - r.bottom, r.right - r.left) / Math.max(c, l);
+ let h = d / f;
+ return t.fog.enabled && t.mode !== SceneMode$1.SCENE2D && (h -= CesiumMath.fog(n._distance, t.fog.density) * t.fog.sse), h /= t.pixelRatio, h;
+}
+function addTileToRenderList(e, t) {
+ e._tilesToRender.push(t);
+}
+function processTileLoadQueue(e, t) {
+ const n = e._tileLoadQueueHigh, i = e._tileLoadQueueMedium, r = e._tileLoadQueueLow;
+ if (n.length === 0 && i.length === 0 && r.length === 0)
+ return;
+ e._tileReplacementQueue.trimTiles(e.tileCacheSize);
+ const o = getTimestamp$1() + e._loadQueueTimeSlice, s = e._tileProvider;
+ let c = processSinglePriorityLoadQueue(
+ e,
+ t,
+ s,
+ o,
+ n,
+ !1
+ );
+ c = processSinglePriorityLoadQueue(
+ e,
+ t,
+ s,
+ o,
+ i,
+ c
+ ), processSinglePriorityLoadQueue(
+ e,
+ t,
+ s,
+ o,
+ r,
+ c
+ );
+}
+function sortByLoadPriority(e, t) {
+ return e._loadPriority - t._loadPriority;
+}
+function processSinglePriorityLoadQueue(e, t, n, i, r, o) {
+ n.computeTileLoadPriority !== void 0 && r.sort(sortByLoadPriority);
+ for (let s = 0, c = r.length; s < c && (getTimestamp$1() < i || !o); ++s) {
+ const l = r[s];
+ e._tileReplacementQueue.markTileRendered(l), n.loadTile(t, l), o = !0;
+ }
+ return o;
+}
+const scratchRay = new Ray(), scratchCartographic$4 = new Cartographic(), scratchPosition$2 = new Cartesian3(), scratchArray$1 = [];
+function updateHeights(e, t) {
+ if (!defined(e.tileProvider.tilingScheme))
+ return;
+ const n = scratchArray$1;
+ n.length = 0;
+ const i = e._tileToUpdateHeights, r = getTimestamp$1(), o = e._updateHeightsTimeSlice, s = r + o, c = t.mode, l = t.mapProjection, d = e.tileProvider.tilingScheme.ellipsoid;
+ let f;
+ for (; i.length > 0; ) {
+ const h = i[0];
+ if (!defined(h.data) || !defined(h.data.mesh)) {
+ const y = h._lastSelectionResultFrame === e._lastSelectionFrameNumber ? h._lastSelectionResult : TileSelectionResult.NONE;
+ (y === TileSelectionResult.RENDERED || y === TileSelectionResult.CULLED_BUT_NEEDED) && n.push(h), i.shift(), e._lastTileIndex = 0;
+ continue;
+ }
+ const p = h.customData, m = p.length;
+ let _ = !1;
+ for (f = e._lastTileIndex; f < m; ++f) {
+ const y = p[f], C = h.data.terrainData, T = defined(C) && C.wasCreatedByUpsampling();
+ if (h.level > y.level && !T) {
+ if (defined(y.positionOnEllipsoidSurface) || (y.positionOnEllipsoidSurface = Cartesian3.fromRadians(
+ y.positionCartographic.longitude,
+ y.positionCartographic.latitude,
+ 0,
+ d
+ )), c === SceneMode$1.SCENE3D) {
+ const b = d.geodeticSurfaceNormal(
+ y.positionOnEllipsoidSurface,
+ scratchRay.direction
+ ), S = d.getSurfaceNormalIntersectionWithZAxis(
+ y.positionOnEllipsoidSurface,
+ 11500,
+ scratchRay.origin
+ );
+ if (!defined(S)) {
+ let E = 0;
+ defined(h.data.tileBoundingRegion) && (E = h.data.tileBoundingRegion.minimumHeight);
+ const A = Math.min(E, -11500), D = Cartesian3.multiplyByScalar(
+ b,
+ Math.abs(A) + 1,
+ scratchPosition$2
+ );
+ Cartesian3.subtract(
+ y.positionOnEllipsoidSurface,
+ D,
+ scratchRay.origin
+ );
+ }
+ } else
+ Cartographic.clone(y.positionCartographic, scratchCartographic$4), scratchCartographic$4.height = -11500, l.project(scratchCartographic$4, scratchPosition$2), Cartesian3.fromElements(
+ scratchPosition$2.z,
+ scratchPosition$2.x,
+ scratchPosition$2.y,
+ scratchPosition$2
+ ), Cartesian3.clone(scratchPosition$2, scratchRay.origin), Cartesian3.clone(Cartesian3.UNIT_X, scratchRay.direction);
+ const x = h.data.pick(
+ scratchRay,
+ c,
+ l,
+ !1,
+ scratchPosition$2
+ );
+ defined(x) && (defined(y.callback) && y.callback(x), y.level = h.level);
+ }
+ if (getTimestamp$1() >= s) {
+ _ = !0;
+ break;
+ }
+ }
+ if (_) {
+ e._lastTileIndex = f;
+ break;
+ } else
+ e._lastTileIndex = 0, i.shift();
+ }
+ for (f = 0; f < n.length; f++)
+ i.push(n[f]);
+}
+function createRenderCommandsForSelectedTiles(e, t) {
+ const n = e._tileProvider, i = e._tilesToRender;
+ for (let r = 0, o = i.length; r < o; ++r) {
+ const s = i[r];
+ n.showTileThisFrame(s, t);
+ }
+}
+function Globe(e) {
+ e = defaultValue(e, Ellipsoid.default);
+ const t = new EllipsoidTerrainProvider({
+ ellipsoid: e
+ }), n = new ImageryLayerCollection();
+ this._ellipsoid = e, this._imageryLayerCollection = n, this._surfaceShaderSet = new GlobeSurfaceShaderSet(), this._material = void 0, this._surface = new QuadtreePrimitive({
+ tileProvider: new GlobeSurfaceTileProvider({
+ terrainProvider: t,
+ imageryLayers: n,
+ surfaceShaderSet: this._surfaceShaderSet
+ })
+ }), this._terrainProvider = t, this._terrainProviderChanged = new Event(), this._undergroundColor = Color.clone(Color.BLACK), this._undergroundColorAlphaByDistance = new NearFarScalar(
+ e.maximumRadius / 1e3,
+ 0,
+ e.maximumRadius / 5,
+ 1
+ ), this._translucency = new GlobeTranslucency(), makeShadersDirty(this), this.show = !0, this._oceanNormalMapResourceDirty = !0, this._oceanNormalMapResource = new Resource({
+ url: buildModuleUrl("Assets/Textures/waterNormalsSmall.jpg")
+ }), this.maximumScreenSpaceError = 2, this.tileCacheSize = 100, this.loadingDescendantLimit = 20, this.preloadAncestors = !0, this.preloadSiblings = !1, this.fillHighlightColor = void 0, this.enableLighting = !1, this.lambertDiffuseMultiplier = 0.9, this.dynamicAtmosphereLighting = !0, this.dynamicAtmosphereLightingFromSun = !1, this.showGroundAtmosphere = Ellipsoid.WGS84.equals(e), this.atmosphereLightIntensity = 10, this.atmosphereRayleighCoefficient = new Cartesian3(55e-7, 13e-6, 284e-7), this.atmosphereMieCoefficient = new Cartesian3(21e-6, 21e-6, 21e-6), this.atmosphereRayleighScaleHeight = 1e4, this.atmosphereMieScaleHeight = 3200, this.atmosphereMieAnisotropy = 0.9, this.lightingFadeOutDistance = CesiumMath.PI_OVER_TWO * e.minimumRadius, this.lightingFadeInDistance = CesiumMath.PI * e.minimumRadius, this.nightFadeOutDistance = CesiumMath.PI_OVER_TWO * e.minimumRadius, this.nightFadeInDistance = 5 * CesiumMath.PI_OVER_TWO * e.minimumRadius, this.showWaterEffect = !0, this.depthTestAgainstTerrain = !1, this.shadows = ShadowMode$1.RECEIVE_ONLY, this.atmosphereHueShift = 0, this.atmosphereSaturationShift = 0, this.atmosphereBrightnessShift = 0, this.showSkirts = !0, this.backFaceCulling = !0, this._oceanNormalMap = void 0, this._zoomedOutOceanSpecularIntensity = void 0, this.vertexShadowDarkness = 0.3;
+}
+Object.defineProperties(Globe.prototype, {
+ /**
+ * Gets an ellipsoid describing the shape of this globe.
+ * @memberof Globe.prototype
+ * @type {Ellipsoid}
+ */
+ ellipsoid: {
+ get: function() {
+ return this._ellipsoid;
+ }
+ },
+ /**
+ * Gets the collection of image layers that will be rendered on this globe.
+ * @memberof Globe.prototype
+ * @type {ImageryLayerCollection}
+ */
+ imageryLayers: {
+ get: function() {
+ return this._imageryLayerCollection;
+ }
+ },
+ /**
+ * Gets an event that's raised when an imagery layer is added, shown, hidden, moved, or removed.
+ *
+ * @memberof Globe.prototype
+ * @type {Event}
+ * @readonly
+ */
+ imageryLayersUpdatedEvent: {
+ get: function() {
+ return this._surface.tileProvider.imageryLayersUpdatedEvent;
+ }
+ },
+ /**
+ * Returns true when the tile load queue is empty, false otherwise. When the load queue is empty,
+ * all terrain and imagery for the current view have been loaded.
+ * @memberof Globe.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ tilesLoaded: {
+ get: function() {
+ return defined(this._surface) ? this._surface._tileLoadQueueHigh.length === 0 && this._surface._tileLoadQueueMedium.length === 0 && this._surface._tileLoadQueueLow.length === 0 : !0;
+ }
+ },
+ /**
+ * Gets or sets the color of the globe when no imagery is available.
+ * @memberof Globe.prototype
+ * @type {Color}
+ */
+ baseColor: {
+ get: function() {
+ return this._surface.tileProvider.baseColor;
+ },
+ set: function(e) {
+ this._surface.tileProvider.baseColor = e;
+ }
+ },
+ /**
+ * A property specifying a {@link ClippingPlaneCollection} used to selectively disable rendering on the outside of each plane.
+ *
+ * @memberof Globe.prototype
+ * @type {ClippingPlaneCollection}
+ */
+ clippingPlanes: {
+ get: function() {
+ return this._surface.tileProvider.clippingPlanes;
+ },
+ set: function(e) {
+ this._surface.tileProvider.clippingPlanes = e;
+ }
+ },
+ /**
+ * A property specifying a {@link ClippingPolygonCollection} used to selectively disable rendering inside or outside a list of polygons.
+ *
+ * @memberof Globe.prototype
+ * @type {ClippingPolygonCollection}
+ */
+ clippingPolygons: {
+ get: function() {
+ return this._surface.tileProvider.clippingPolygons;
+ },
+ set: function(e) {
+ this._surface.tileProvider.clippingPolygons = e;
+ }
+ },
+ /**
+ * A property specifying a {@link Rectangle} used to limit globe rendering to a cartographic area.
+ * Defaults to the maximum extent of cartographic coordinates.
+ *
+ * @memberof Globe.prototype
+ * @type {Rectangle}
+ * @default {@link Rectangle.MAX_VALUE}
+ */
+ cartographicLimitRectangle: {
+ get: function() {
+ return this._surface.tileProvider.cartographicLimitRectangle;
+ },
+ set: function(e) {
+ defined(e) || (e = Rectangle.clone(Rectangle.MAX_VALUE)), this._surface.tileProvider.cartographicLimitRectangle = e;
+ }
+ },
+ /**
+ * The normal map to use for rendering waves in the ocean. Setting this property will
+ * only have an effect if the configured terrain provider includes a water mask.
+ * @memberof Globe.prototype
+ * @type {string}
+ * @default buildModuleUrl('Assets/Textures/waterNormalsSmall.jpg')
+ */
+ oceanNormalMapUrl: {
+ get: function() {
+ return this._oceanNormalMapResource.url;
+ },
+ set: function(e) {
+ this._oceanNormalMapResource.url = e, this._oceanNormalMapResourceDirty = !0;
+ }
+ },
+ /**
+ * The terrain provider providing surface geometry for this globe.
+ * @type {TerrainProvider}
+ *
+ * @memberof Globe.prototype
+ * @type {TerrainProvider}
+ *
+ */
+ terrainProvider: {
+ get: function() {
+ return this._terrainProvider;
+ },
+ set: function(e) {
+ e !== this._terrainProvider && (this._terrainProvider = e, this._terrainProviderChanged.raiseEvent(e), defined(this._material) && makeShadersDirty(this));
+ }
+ },
+ /**
+ * Gets an event that's raised when the terrain provider is changed
+ *
+ * @memberof Globe.prototype
+ * @type {Event}
+ * @readonly
+ */
+ terrainProviderChanged: {
+ get: function() {
+ return this._terrainProviderChanged;
+ }
+ },
+ /**
+ * Gets an event that's raised when the length of the tile load queue has changed since the last render frame. When the load queue is empty,
+ * all terrain and imagery for the current view have been loaded. The event passes the new length of the tile load queue.
+ *
+ * @memberof Globe.prototype
+ * @type {Event}
+ */
+ tileLoadProgressEvent: {
+ get: function() {
+ return this._surface.tileLoadProgressEvent;
+ }
+ },
+ /**
+ * Gets or sets the material appearance of the Globe. This can be one of several built-in {@link Material} objects or a custom material, scripted with
+ * {@link https://github.com/CesiumGS/cesium/wiki/Fabric|Fabric}.
+ * @memberof Globe.prototype
+ * @type {Material | undefined}
+ */
+ material: {
+ get: function() {
+ return this._material;
+ },
+ set: function(e) {
+ this._material !== e && (this._material = e, makeShadersDirty(this));
+ }
+ },
+ /**
+ * The color to render the back side of the globe when the camera is underground or the globe is translucent,
+ * blended with the globe color based on the camera's distance.
+ * undergroundColor to undefined.
+ *
+ * @memberof Globe.prototype
+ * @type {Color}
+ * @default {@link Color.BLACK}
+ *
+ * @see Globe#undergroundColorAlphaByDistance
+ */
+ undergroundColor: {
+ get: function() {
+ return this._undergroundColor;
+ },
+ set: function(e) {
+ this._undergroundColor = Color.clone(e, this._undergroundColor);
+ }
+ },
+ /**
+ * Gets or sets the near and far distance for blending {@link Globe#undergroundColor} with the globe color.
+ * The alpha will interpolate between the {@link NearFarScalar#nearValue} and
+ * {@link NearFarScalar#farValue} while the camera distance falls within the lower and upper bounds
+ * of the specified {@link NearFarScalar#near} and {@link NearFarScalar#far}.
+ * Outside of these ranges the alpha remains clamped to the nearest bound. If undefined,
+ * the underground color will not be blended with the globe color.
+ * percentageChanged.
+ * @memberof Camera.prototype
+ * @type {Event}
+ * @readonly
+ */
+ changed: {
+ get: function() {
+ return this._changed;
+ }
+ }
+});
+Camera.prototype.update = function(e) {
+ let t = !1;
+ if (e !== this._mode && (this._mode = e, this._modeChanged = e !== SceneMode$1.MORPHING, t = this._mode === SceneMode$1.SCENE2D), t) {
+ const n = this._max2Dfrustum = this.frustum.clone(), i = 2, r = n.top / n.right;
+ n.right = this._maxCoord.x * i, n.left = -n.right, n.top = r * n.right, n.bottom = -n.top;
+ }
+ this._mode === SceneMode$1.SCENE2D && clampMove2D(this, this.position);
+};
+const setTransformPosition = new Cartesian3(), setTransformUp = new Cartesian3(), setTransformDirection = new Cartesian3();
+Camera.prototype._setTransform = function(e) {
+ const t = Cartesian3.clone(this.positionWC, setTransformPosition), n = Cartesian3.clone(this.upWC, setTransformUp), i = Cartesian3.clone(this.directionWC, setTransformDirection);
+ Matrix4.clone(e, this._transform), this._transformChanged = !0, updateMembers(this);
+ const r = this._actualInvTransform;
+ Matrix4.multiplyByPoint(r, t, this.position), Matrix4.multiplyByPointAsVector(r, i, this.direction), Matrix4.multiplyByPointAsVector(r, n, this.up), Cartesian3.cross(this.direction, this.up, this.right), updateMembers(this);
+};
+const scratchAdjustOrthographicFrustumMousePosition = new Cartesian2(), scratchPickRay = new Ray(), scratchRayIntersection$1 = new Cartesian3(), scratchDepthIntersection$1 = new Cartesian3();
+function calculateOrthographicFrustumWidth(e) {
+ if (!Matrix4.equals(Matrix4.IDENTITY, e.transform))
+ return Cartesian3.magnitude(e.position);
+ const t = e._scene, n = t.globe, i = scratchAdjustOrthographicFrustumMousePosition;
+ i.x = t.drawingBufferWidth / 2, i.y = t.drawingBufferHeight / 2;
+ let r;
+ if (defined(n)) {
+ const c = e.getPickRay(i, scratchPickRay);
+ r = n.pickWorldCoordinates(
+ c,
+ t,
+ !0,
+ scratchRayIntersection$1
+ );
+ }
+ let o;
+ t.pickPositionSupported && (o = t.pickPositionWorldCoordinates(
+ i,
+ scratchDepthIntersection$1
+ ));
+ let s;
+ if (defined(r) || defined(o)) {
+ const c = defined(o) ? Cartesian3.distance(o, e.positionWC) : Number.POSITIVE_INFINITY, l = defined(r) ? Cartesian3.distance(r, e.positionWC) : Number.POSITIVE_INFINITY;
+ s = Math.min(c, l);
+ } else
+ s = Math.max(e.positionCartographic.height, 0);
+ return s;
+}
+Camera.prototype._adjustOrthographicFrustum = function(e) {
+ this.frustum instanceof OrthographicFrustum && (!e && this._positionCartographic.height < 15e4 || (this.frustum.width = calculateOrthographicFrustumWidth(this)));
+};
+const scratchSetViewCartesian = new Cartesian3(), scratchSetViewTransform1 = new Matrix4(), scratchSetViewTransform2 = new Matrix4(), scratchSetViewQuaternion = new Quaternion(), scratchSetViewMatrix3 = new Matrix3(), scratchSetViewCartographic = new Cartographic();
+function setView3D(e, t, n) {
+ const i = Matrix4.clone(
+ e.transform,
+ scratchSetViewTransform1
+ ), r = Transforms.eastNorthUpToFixedFrame(
+ t,
+ e._projection.ellipsoid,
+ scratchSetViewTransform2
+ );
+ e._setTransform(r), Cartesian3.clone(Cartesian3.ZERO, e.position), n.heading = n.heading - CesiumMath.PI_OVER_TWO;
+ const o = Quaternion.fromHeadingPitchRoll(
+ n,
+ scratchSetViewQuaternion
+ ), s = Matrix3.fromQuaternion(o, scratchSetViewMatrix3);
+ Matrix3.getColumn(s, 0, e.direction), Matrix3.getColumn(s, 2, e.up), Cartesian3.cross(e.direction, e.up, e.right), e._setTransform(i), e._adjustOrthographicFrustum(!0);
+}
+function setViewCV(e, t, n, i) {
+ const r = Matrix4.clone(
+ e.transform,
+ scratchSetViewTransform1
+ );
+ if (e._setTransform(Matrix4.IDENTITY), !Cartesian3.equals(t, e.positionWC)) {
+ if (i) {
+ const c = e._projection, l = c.ellipsoid.cartesianToCartographic(
+ t,
+ scratchSetViewCartographic
+ );
+ t = c.project(l, scratchSetViewCartesian);
+ }
+ Cartesian3.clone(t, e.position);
+ }
+ n.heading = n.heading - CesiumMath.PI_OVER_TWO;
+ const o = Quaternion.fromHeadingPitchRoll(
+ n,
+ scratchSetViewQuaternion
+ ), s = Matrix3.fromQuaternion(o, scratchSetViewMatrix3);
+ Matrix3.getColumn(s, 0, e.direction), Matrix3.getColumn(s, 2, e.up), Cartesian3.cross(e.direction, e.up, e.right), e._setTransform(r), e._adjustOrthographicFrustum(!0);
+}
+function setView2D(e, t, n, i) {
+ const r = Matrix4.clone(
+ e.transform,
+ scratchSetViewTransform1
+ );
+ if (e._setTransform(Matrix4.IDENTITY), !Cartesian3.equals(t, e.positionWC)) {
+ if (i) {
+ const l = e._projection, d = l.ellipsoid.cartesianToCartographic(
+ t,
+ scratchSetViewCartographic
+ );
+ t = l.project(d, scratchSetViewCartesian);
+ }
+ Cartesian2.clone(t, e.position);
+ const o = -t.z * 0.5, s = -o, c = e.frustum;
+ if (s > o) {
+ const l = c.top / c.right;
+ c.right = s, c.left = o, c.top = c.right * l, c.bottom = -c.top;
+ }
+ }
+ if (e._scene.mapMode2D === MapMode2D$1.ROTATE) {
+ n.heading = n.heading - CesiumMath.PI_OVER_TWO, n.pitch = -CesiumMath.PI_OVER_TWO, n.roll = 0;
+ const o = Quaternion.fromHeadingPitchRoll(
+ n,
+ scratchSetViewQuaternion
+ ), s = Matrix3.fromQuaternion(o, scratchSetViewMatrix3);
+ Matrix3.getColumn(s, 2, e.up), Cartesian3.cross(e.direction, e.up, e.right);
+ }
+ e._setTransform(r);
+}
+const scratchToHPRDirection = new Cartesian3(), scratchToHPRUp = new Cartesian3(), scratchToHPRRight = new Cartesian3();
+function directionUpToHeadingPitchRoll(e, t, n, i) {
+ const r = Cartesian3.clone(
+ n.direction,
+ scratchToHPRDirection
+ ), o = Cartesian3.clone(n.up, scratchToHPRUp);
+ if (e._scene.mode === SceneMode$1.SCENE3D) {
+ const c = e._projection.ellipsoid, l = Transforms.eastNorthUpToFixedFrame(
+ t,
+ c,
+ scratchHPRMatrix1
+ ), d = Matrix4.inverseTransformation(
+ l,
+ scratchHPRMatrix2
+ );
+ Matrix4.multiplyByPointAsVector(d, r, r), Matrix4.multiplyByPointAsVector(d, o, o);
+ }
+ const s = Cartesian3.cross(r, o, scratchToHPRRight);
+ return i.heading = getHeading(r, o), i.pitch = getPitch(r), i.roll = getRoll(r, o, s), i;
+}
+const scratchSetViewOptions = {
+ destination: void 0,
+ orientation: {
+ direction: void 0,
+ up: void 0,
+ heading: void 0,
+ pitch: void 0,
+ roll: void 0
+ },
+ convert: void 0,
+ endTransform: void 0
+}, scratchHpr = new HeadingPitchRoll();
+Camera.prototype.setView = function(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ let t = defaultValue(
+ e.orientation,
+ defaultValue.EMPTY_OBJECT
+ );
+ const n = this._mode;
+ if (n === SceneMode$1.MORPHING)
+ return;
+ defined(e.endTransform) && this._setTransform(e.endTransform);
+ let i = defaultValue(e.convert, !0), r = defaultValue(
+ e.destination,
+ Cartesian3.clone(this.positionWC, scratchSetViewCartesian)
+ );
+ defined(r) && defined(r.west) && (r = this.getRectangleCameraCoordinates(
+ r,
+ scratchSetViewCartesian
+ ), i = !1), defined(t.direction) && (t = directionUpToHeadingPitchRoll(
+ this,
+ r,
+ t,
+ scratchSetViewOptions.orientation
+ )), scratchHpr.heading = defaultValue(t.heading, 0), scratchHpr.pitch = defaultValue(t.pitch, -CesiumMath.PI_OVER_TWO), scratchHpr.roll = defaultValue(t.roll, 0), n === SceneMode$1.SCENE3D ? setView3D(this, r, scratchHpr) : n === SceneMode$1.SCENE2D ? setView2D(this, r, scratchHpr, i) : setViewCV(this, r, scratchHpr, i);
+};
+const pitchScratch = new Cartesian3();
+Camera.prototype.flyHome = function(e) {
+ const t = this._mode;
+ if (t === SceneMode$1.MORPHING && this._scene.completeMorph(), t === SceneMode$1.SCENE2D)
+ this.flyTo({
+ destination: Camera.DEFAULT_VIEW_RECTANGLE,
+ duration: e,
+ endTransform: Matrix4.IDENTITY
+ });
+ else if (t === SceneMode$1.SCENE3D) {
+ const n = this.getRectangleCameraCoordinates(
+ Camera.DEFAULT_VIEW_RECTANGLE
+ );
+ let i = Cartesian3.magnitude(n);
+ i += i * Camera.DEFAULT_VIEW_FACTOR, Cartesian3.normalize(n, n), Cartesian3.multiplyByScalar(n, i, n), this.flyTo({
+ destination: n,
+ duration: e,
+ endTransform: Matrix4.IDENTITY
+ });
+ } else if (t === SceneMode$1.COLUMBUS_VIEW) {
+ const n = this._projection.ellipsoid.maximumRadius;
+ let i = new Cartesian3(0, -1, 1);
+ i = Cartesian3.multiplyByScalar(
+ Cartesian3.normalize(i, i),
+ 5 * n,
+ i
+ ), this.flyTo({
+ destination: i,
+ duration: e,
+ orientation: {
+ heading: 0,
+ pitch: -Math.acos(Cartesian3.normalize(i, pitchScratch).z),
+ roll: 0
+ },
+ endTransform: Matrix4.IDENTITY,
+ convert: !1
+ });
+ }
+};
+Camera.prototype.worldToCameraCoordinates = function(e, t) {
+ return defined(t) || (t = new Cartesian4()), updateMembers(this), Matrix4.multiplyByVector(this._actualInvTransform, e, t);
+};
+Camera.prototype.worldToCameraCoordinatesPoint = function(e, t) {
+ return defined(t) || (t = new Cartesian3()), updateMembers(this), Matrix4.multiplyByPoint(this._actualInvTransform, e, t);
+};
+Camera.prototype.worldToCameraCoordinatesVector = function(e, t) {
+ return defined(t) || (t = new Cartesian3()), updateMembers(this), Matrix4.multiplyByPointAsVector(
+ this._actualInvTransform,
+ e,
+ t
+ );
+};
+Camera.prototype.cameraToWorldCoordinates = function(e, t) {
+ return defined(t) || (t = new Cartesian4()), updateMembers(this), Matrix4.multiplyByVector(this._actualTransform, e, t);
+};
+Camera.prototype.cameraToWorldCoordinatesPoint = function(e, t) {
+ return defined(t) || (t = new Cartesian3()), updateMembers(this), Matrix4.multiplyByPoint(this._actualTransform, e, t);
+};
+Camera.prototype.cameraToWorldCoordinatesVector = function(e, t) {
+ return defined(t) || (t = new Cartesian3()), updateMembers(this), Matrix4.multiplyByPointAsVector(
+ this._actualTransform,
+ e,
+ t
+ );
+};
+function clampMove2D(e, t) {
+ const n = e._scene.mapMode2D === MapMode2D$1.ROTATE, i = e._maxCoord.x, r = e._maxCoord.y;
+ let o, s;
+ n ? (s = i, o = -s) : (s = t.x - i * 2, o = t.x + i * 2), t.x > i && (t.x = s), t.x < -i && (t.x = o), t.y > r && (t.y = r), t.y < -r && (t.y = -r);
+}
+const moveScratch = new Cartesian3();
+Camera.prototype.move = function(e, t) {
+ const n = this.position;
+ Cartesian3.multiplyByScalar(e, t, moveScratch), Cartesian3.add(n, moveScratch, n), this._mode === SceneMode$1.SCENE2D && clampMove2D(this, n), this._adjustOrthographicFrustum(!0);
+};
+Camera.prototype.moveForward = function(e) {
+ e = defaultValue(e, this.defaultMoveAmount), this._mode === SceneMode$1.SCENE2D ? zoom2D$1(this, e) : this.move(this.direction, e);
+};
+Camera.prototype.moveBackward = function(e) {
+ e = defaultValue(e, this.defaultMoveAmount), this._mode === SceneMode$1.SCENE2D ? zoom2D$1(this, -e) : this.move(this.direction, -e);
+};
+Camera.prototype.moveUp = function(e) {
+ e = defaultValue(e, this.defaultMoveAmount), this.move(this.up, e);
+};
+Camera.prototype.moveDown = function(e) {
+ e = defaultValue(e, this.defaultMoveAmount), this.move(this.up, -e);
+};
+Camera.prototype.moveRight = function(e) {
+ e = defaultValue(e, this.defaultMoveAmount), this.move(this.right, e);
+};
+Camera.prototype.moveLeft = function(e) {
+ e = defaultValue(e, this.defaultMoveAmount), this.move(this.right, -e);
+};
+Camera.prototype.lookLeft = function(e) {
+ e = defaultValue(e, this.defaultLookAmount), this._mode !== SceneMode$1.SCENE2D && this.look(this.up, -e);
+};
+Camera.prototype.lookRight = function(e) {
+ e = defaultValue(e, this.defaultLookAmount), this._mode !== SceneMode$1.SCENE2D && this.look(this.up, e);
+};
+Camera.prototype.lookUp = function(e) {
+ e = defaultValue(e, this.defaultLookAmount), this._mode !== SceneMode$1.SCENE2D && this.look(this.right, -e);
+};
+Camera.prototype.lookDown = function(e) {
+ e = defaultValue(e, this.defaultLookAmount), this._mode !== SceneMode$1.SCENE2D && this.look(this.right, e);
+};
+const lookScratchQuaternion = new Quaternion(), lookScratchMatrix = new Matrix3();
+Camera.prototype.look = function(e, t) {
+ const n = defaultValue(t, this.defaultLookAmount), i = Quaternion.fromAxisAngle(
+ e,
+ -n,
+ lookScratchQuaternion
+ ), r = Matrix3.fromQuaternion(i, lookScratchMatrix), o = this.direction, s = this.up, c = this.right;
+ Matrix3.multiplyByVector(r, o, o), Matrix3.multiplyByVector(r, s, s), Matrix3.multiplyByVector(r, c, c);
+};
+Camera.prototype.twistLeft = function(e) {
+ e = defaultValue(e, this.defaultLookAmount), this.look(this.direction, e);
+};
+Camera.prototype.twistRight = function(e) {
+ e = defaultValue(e, this.defaultLookAmount), this.look(this.direction, -e);
+};
+const rotateScratchQuaternion = new Quaternion(), rotateScratchMatrix = new Matrix3();
+Camera.prototype.rotate = function(e, t) {
+ const n = defaultValue(t, this.defaultRotateAmount), i = Quaternion.fromAxisAngle(
+ e,
+ -n,
+ rotateScratchQuaternion
+ ), r = Matrix3.fromQuaternion(i, rotateScratchMatrix);
+ Matrix3.multiplyByVector(r, this.position, this.position), Matrix3.multiplyByVector(r, this.direction, this.direction), Matrix3.multiplyByVector(r, this.up, this.up), Cartesian3.cross(this.direction, this.up, this.right), Cartesian3.cross(this.right, this.direction, this.up), this._adjustOrthographicFrustum(!1);
+};
+Camera.prototype.rotateDown = function(e) {
+ e = defaultValue(e, this.defaultRotateAmount), rotateVertical(this, e);
+};
+Camera.prototype.rotateUp = function(e) {
+ e = defaultValue(e, this.defaultRotateAmount), rotateVertical(this, -e);
+};
+const rotateVertScratchP = new Cartesian3(), rotateVertScratchA = new Cartesian3(), rotateVertScratchTan = new Cartesian3(), rotateVertScratchNegate = new Cartesian3();
+function rotateVertical(e, t) {
+ const n = e.position;
+ if (defined(e.constrainedAxis) && !Cartesian3.equalsEpsilon(
+ e.position,
+ Cartesian3.ZERO,
+ CesiumMath.EPSILON2
+ )) {
+ const i = Cartesian3.normalize(n, rotateVertScratchP), r = Cartesian3.equalsEpsilon(
+ i,
+ e.constrainedAxis,
+ CesiumMath.EPSILON2
+ ), o = Cartesian3.equalsEpsilon(
+ i,
+ Cartesian3.negate(e.constrainedAxis, rotateVertScratchNegate),
+ CesiumMath.EPSILON2
+ );
+ if (!r && !o) {
+ const s = Cartesian3.normalize(
+ e.constrainedAxis,
+ rotateVertScratchA
+ );
+ let c = Cartesian3.dot(i, s), l = CesiumMath.acosClamped(c);
+ t > 0 && t > l && (t = l - CesiumMath.EPSILON4), c = Cartesian3.dot(
+ i,
+ Cartesian3.negate(s, rotateVertScratchNegate)
+ ), l = CesiumMath.acosClamped(c), t < 0 && -t > l && (t = -l + CesiumMath.EPSILON4);
+ const d = Cartesian3.cross(
+ s,
+ i,
+ rotateVertScratchTan
+ );
+ e.rotate(d, t);
+ } else (r && t < 0 || o && t > 0) && e.rotate(e.right, t);
+ } else
+ e.rotate(e.right, t);
+}
+Camera.prototype.rotateRight = function(e) {
+ e = defaultValue(e, this.defaultRotateAmount), rotateHorizontal(this, -e);
+};
+Camera.prototype.rotateLeft = function(e) {
+ e = defaultValue(e, this.defaultRotateAmount), rotateHorizontal(this, e);
+};
+function rotateHorizontal(e, t) {
+ defined(e.constrainedAxis) ? e.rotate(e.constrainedAxis, t) : e.rotate(e.up, t);
+}
+function zoom2D$1(e, t) {
+ const n = e.frustum;
+ let i;
+ if (t = t * 0.5, Math.abs(n.top) + Math.abs(n.bottom) > Math.abs(n.left) + Math.abs(n.right)) {
+ let r = n.top - t, o = n.bottom + t, s = e._maxCoord.y;
+ e._scene.mapMode2D === MapMode2D$1.ROTATE && (s *= e.maximumZoomFactor), o > s && (o = s, r = -s), r <= o && (r = 1, o = -1), i = n.right / n.top, n.top = r, n.bottom = o, n.right = n.top * i, n.left = -n.right;
+ } else {
+ let r = n.right - t, o = n.left + t, s = e._maxCoord.x;
+ e._scene.mapMode2D === MapMode2D$1.ROTATE && (s *= e.maximumZoomFactor), r > s && (r = s, o = -s), r <= o && (r = 1, o = -1), i = n.top / n.right, n.right = r, n.left = o, n.top = n.right * i, n.bottom = -n.top;
+ }
+}
+function zoom3D$1(e, t) {
+ e.move(e.direction, t);
+}
+Camera.prototype.zoomIn = function(e) {
+ e = defaultValue(e, this.defaultZoomAmount), this._mode === SceneMode$1.SCENE2D ? zoom2D$1(this, e) : zoom3D$1(this, e);
+};
+Camera.prototype.zoomOut = function(e) {
+ e = defaultValue(e, this.defaultZoomAmount), this._mode === SceneMode$1.SCENE2D ? zoom2D$1(this, -e) : zoom3D$1(this, -e);
+};
+Camera.prototype.getMagnitude = function() {
+ if (this._mode === SceneMode$1.SCENE3D)
+ return Cartesian3.magnitude(this.position);
+ if (this._mode === SceneMode$1.COLUMBUS_VIEW)
+ return Math.abs(this.position.z);
+ if (this._mode === SceneMode$1.SCENE2D)
+ return Math.max(
+ this.frustum.right - this.frustum.left,
+ this.frustum.top - this.frustum.bottom
+ );
+};
+const scratchLookAtMatrix4 = new Matrix4();
+Camera.prototype.lookAt = function(e, t) {
+ const n = this._scene, i = defaultValue(n.ellipsoid, Ellipsoid.default), r = Transforms.eastNorthUpToFixedFrame(
+ e,
+ i,
+ scratchLookAtMatrix4
+ );
+ this.lookAtTransform(r, t);
+};
+const scratchLookAtHeadingPitchRangeOffset = new Cartesian3(), scratchLookAtHeadingPitchRangeQuaternion1 = new Quaternion(), scratchLookAtHeadingPitchRangeQuaternion2 = new Quaternion(), scratchHeadingPitchRangeMatrix3 = new Matrix3();
+function offsetFromHeadingPitchRange(e, t, n) {
+ t = CesiumMath.clamp(
+ t,
+ -CesiumMath.PI_OVER_TWO,
+ CesiumMath.PI_OVER_TWO
+ ), e = CesiumMath.zeroToTwoPi(e) - CesiumMath.PI_OVER_TWO;
+ const i = Quaternion.fromAxisAngle(
+ Cartesian3.UNIT_Y,
+ -t,
+ scratchLookAtHeadingPitchRangeQuaternion1
+ ), r = Quaternion.fromAxisAngle(
+ Cartesian3.UNIT_Z,
+ -e,
+ scratchLookAtHeadingPitchRangeQuaternion2
+ ), o = Quaternion.multiply(r, i, r), s = Matrix3.fromQuaternion(
+ o,
+ scratchHeadingPitchRangeMatrix3
+ ), c = Cartesian3.clone(
+ Cartesian3.UNIT_X,
+ scratchLookAtHeadingPitchRangeOffset
+ );
+ return Matrix3.multiplyByVector(s, c, c), Cartesian3.negate(c, c), Cartesian3.multiplyByScalar(c, n, c), c;
+}
+Camera.prototype.lookAtTransform = function(e, t) {
+ if (this._setTransform(e), !defined(t))
+ return;
+ let n;
+ if (defined(t.heading) ? n = offsetFromHeadingPitchRange(
+ t.heading,
+ t.pitch,
+ t.range
+ ) : n = t, this._mode === SceneMode$1.SCENE2D) {
+ Cartesian2.clone(Cartesian2.ZERO, this.position), Cartesian3.negate(n, this.up), this.up.z = 0, Cartesian3.magnitudeSquared(this.up) < CesiumMath.EPSILON10 && Cartesian3.clone(Cartesian3.UNIT_Y, this.up), Cartesian3.normalize(this.up, this.up), this._setTransform(Matrix4.IDENTITY), Cartesian3.negate(Cartesian3.UNIT_Z, this.direction), Cartesian3.cross(this.direction, this.up, this.right), Cartesian3.normalize(this.right, this.right);
+ const i = this.frustum, r = i.top / i.right;
+ i.right = Cartesian3.magnitude(n) * 0.5, i.left = -i.right, i.top = r * i.right, i.bottom = -i.top, this._setTransform(e);
+ return;
+ }
+ Cartesian3.clone(n, this.position), Cartesian3.negate(this.position, this.direction), Cartesian3.normalize(this.direction, this.direction), Cartesian3.cross(this.direction, Cartesian3.UNIT_Z, this.right), Cartesian3.magnitudeSquared(this.right) < CesiumMath.EPSILON10 && Cartesian3.clone(Cartesian3.UNIT_X, this.right), Cartesian3.normalize(this.right, this.right), Cartesian3.cross(this.right, this.direction, this.up), Cartesian3.normalize(this.up, this.up), this._adjustOrthographicFrustum(!0);
+};
+const viewRectangle3DCartographic1 = new Cartographic(), viewRectangle3DCartographic2 = new Cartographic(), viewRectangle3DNorthEast = new Cartesian3(), viewRectangle3DSouthWest = new Cartesian3(), viewRectangle3DNorthWest = new Cartesian3(), viewRectangle3DSouthEast = new Cartesian3(), viewRectangle3DNorthCenter = new Cartesian3(), viewRectangle3DSouthCenter = new Cartesian3(), viewRectangle3DCenter = new Cartesian3(), viewRectangle3DEquator = new Cartesian3(), defaultRF = {
+ direction: new Cartesian3(),
+ right: new Cartesian3(),
+ up: new Cartesian3()
+};
+let viewRectangle3DEllipsoidGeodesic;
+function computeD(e, t, n, i) {
+ return Math.abs(Cartesian3.dot(t, n)) / i - Cartesian3.dot(e, n);
+}
+function rectangleCameraPosition3D(e, t, n, i) {
+ const r = e._projection.ellipsoid, o = i ? e : defaultRF, s = t.north, c = t.south;
+ let l = t.east;
+ const d = t.west;
+ d > l && (l += CesiumMath.TWO_PI);
+ const f = (d + l) * 0.5;
+ let h;
+ if (c < -CesiumMath.PI_OVER_TWO + CesiumMath.RADIANS_PER_DEGREE && s > CesiumMath.PI_OVER_TWO - CesiumMath.RADIANS_PER_DEGREE)
+ h = 0;
+ else {
+ const I = viewRectangle3DCartographic1;
+ I.longitude = f, I.latitude = s, I.height = 0;
+ const M = viewRectangle3DCartographic2;
+ M.longitude = f, M.latitude = c, M.height = 0;
+ let R = viewRectangle3DEllipsoidGeodesic;
+ (!defined(R) || R.ellipsoid !== r) && (viewRectangle3DEllipsoidGeodesic = R = new EllipsoidGeodesic(
+ void 0,
+ void 0,
+ r
+ )), R.setEndPoints(I, M), h = R.interpolateUsingFraction(
+ 0.5,
+ viewRectangle3DCartographic1
+ ).latitude;
+ }
+ const p = viewRectangle3DCartographic1;
+ p.longitude = f, p.latitude = h, p.height = 0;
+ const m = r.cartographicToCartesian(
+ p,
+ viewRectangle3DCenter
+ ), _ = viewRectangle3DCartographic1;
+ _.longitude = l, _.latitude = s;
+ const y = r.cartographicToCartesian(
+ _,
+ viewRectangle3DNorthEast
+ );
+ _.longitude = d;
+ const C = r.cartographicToCartesian(
+ _,
+ viewRectangle3DNorthWest
+ );
+ _.longitude = f;
+ const T = r.cartographicToCartesian(
+ _,
+ viewRectangle3DNorthCenter
+ );
+ _.latitude = c;
+ const x = r.cartographicToCartesian(
+ _,
+ viewRectangle3DSouthCenter
+ );
+ _.longitude = l;
+ const b = r.cartographicToCartesian(
+ _,
+ viewRectangle3DSouthEast
+ );
+ _.longitude = d;
+ const S = r.cartographicToCartesian(
+ _,
+ viewRectangle3DSouthWest
+ );
+ Cartesian3.subtract(C, m, C), Cartesian3.subtract(b, m, b), Cartesian3.subtract(y, m, y), Cartesian3.subtract(S, m, S), Cartesian3.subtract(T, m, T), Cartesian3.subtract(x, m, x);
+ const E = r.geodeticSurfaceNormal(m, o.direction);
+ Cartesian3.negate(E, E);
+ const A = Cartesian3.cross(E, Cartesian3.UNIT_Z, o.right);
+ Cartesian3.normalize(A, A);
+ const D = Cartesian3.cross(A, E, o.up);
+ let P;
+ if (e.frustum instanceof OrthographicFrustum) {
+ const I = Math.max(
+ Cartesian3.distance(y, C),
+ Cartesian3.distance(b, S)
+ ), M = Math.max(
+ Cartesian3.distance(y, b),
+ Cartesian3.distance(C, S)
+ );
+ let R, L;
+ const g = e.frustum._offCenterFrustum, w = g.right / g.top, O = M * w;
+ I > O ? (R = I, L = R / w) : (L = M, R = O), P = Math.max(R, L);
+ } else {
+ const I = Math.tan(e.frustum.fovy * 0.5), M = e.frustum.aspectRatio * I;
+ if (P = Math.max(
+ computeD(E, D, C, I),
+ computeD(E, D, b, I),
+ computeD(E, D, y, I),
+ computeD(E, D, S, I),
+ computeD(E, D, T, I),
+ computeD(E, D, x, I),
+ computeD(E, A, C, M),
+ computeD(E, A, b, M),
+ computeD(E, A, y, M),
+ computeD(E, A, S, M),
+ computeD(E, A, T, M),
+ computeD(E, A, x, M)
+ ), c < 0 && s > 0) {
+ const R = viewRectangle3DCartographic1;
+ R.longitude = d, R.latitude = 0, R.height = 0;
+ let L = r.cartographicToCartesian(
+ R,
+ viewRectangle3DEquator
+ );
+ Cartesian3.subtract(L, m, L), P = Math.max(
+ P,
+ computeD(E, D, L, I),
+ computeD(E, A, L, M)
+ ), R.longitude = l, L = r.cartographicToCartesian(
+ R,
+ viewRectangle3DEquator
+ ), Cartesian3.subtract(L, m, L), P = Math.max(
+ P,
+ computeD(E, D, L, I),
+ computeD(E, A, L, M)
+ );
+ }
+ }
+ return Cartesian3.add(
+ m,
+ Cartesian3.multiplyByScalar(E, -P, viewRectangle3DEquator),
+ n
+ );
+}
+const viewRectangleCVCartographic = new Cartographic(), viewRectangleCVNorthEast = new Cartesian3(), viewRectangleCVSouthWest = new Cartesian3();
+function rectangleCameraPositionColumbusView(e, t, n) {
+ const i = e._projection;
+ t.west > t.east && (t = Rectangle.MAX_VALUE);
+ const r = e._actualTransform, o = e._actualInvTransform, s = viewRectangleCVCartographic;
+ s.longitude = t.east, s.latitude = t.north;
+ const c = i.project(s, viewRectangleCVNorthEast);
+ Matrix4.multiplyByPoint(r, c, c), Matrix4.multiplyByPoint(o, c, c), s.longitude = t.west, s.latitude = t.south;
+ const l = i.project(s, viewRectangleCVSouthWest);
+ if (Matrix4.multiplyByPoint(r, l, l), Matrix4.multiplyByPoint(o, l, l), n.x = (c.x - l.x) * 0.5 + l.x, n.y = (c.y - l.y) * 0.5 + l.y, defined(e.frustum.fovy)) {
+ const d = Math.tan(e.frustum.fovy * 0.5), f = e.frustum.aspectRatio * d;
+ n.z = Math.max(
+ (c.x - l.x) / f,
+ (c.y - l.y) / d
+ ) * 0.5;
+ } else {
+ const d = c.x - l.x, f = c.y - l.y;
+ n.z = Math.max(d, f);
+ }
+ return n;
+}
+const viewRectangle2DCartographic = new Cartographic(), viewRectangle2DNorthEast = new Cartesian3(), viewRectangle2DSouthWest = new Cartesian3();
+function rectangleCameraPosition2D(e, t, n) {
+ const i = e._projection;
+ let r = t.east;
+ t.west > t.east && (e._scene.mapMode2D === MapMode2D$1.INFINITE_SCROLL ? r += CesiumMath.TWO_PI : (t = Rectangle.MAX_VALUE, r = t.east));
+ let o = viewRectangle2DCartographic;
+ o.longitude = r, o.latitude = t.north;
+ const s = i.project(o, viewRectangle2DNorthEast);
+ o.longitude = t.west, o.latitude = t.south;
+ const c = i.project(o, viewRectangle2DSouthWest), l = Math.abs(s.x - c.x) * 0.5;
+ let d = Math.abs(s.y - c.y) * 0.5, f, h;
+ const p = e.frustum.right / e.frustum.top, m = d * p;
+ return l > m ? (f = l, h = f / p) : (h = d, f = m), d = Math.max(2 * f, 2 * h), n.x = (s.x - c.x) * 0.5 + c.x, n.y = (s.y - c.y) * 0.5 + c.y, o = i.unproject(n, o), o.height = d, n = i.project(o, n), n;
+}
+Camera.prototype.getRectangleCameraCoordinates = function(e, t) {
+ const n = this._mode;
+ if (defined(t) || (t = new Cartesian3()), n === SceneMode$1.SCENE3D)
+ return rectangleCameraPosition3D(this, e, t);
+ if (n === SceneMode$1.COLUMBUS_VIEW)
+ return rectangleCameraPositionColumbusView(this, e, t);
+ if (n === SceneMode$1.SCENE2D)
+ return rectangleCameraPosition2D(this, e, t);
+};
+const pickEllipsoid3DRay = new Ray();
+function pickEllipsoid3D(e, t, n, i) {
+ n = defaultValue(n, Ellipsoid.default);
+ const r = e.getPickRay(t, pickEllipsoid3DRay), o = IntersectionTests.rayEllipsoid(r, n);
+ if (!o)
+ return;
+ const s = o.start > 0 ? o.start : o.stop;
+ return Ray.getPoint(r, s, i);
+}
+const pickEllipsoid2DRay = new Ray();
+function pickMap2D(e, t, n, i) {
+ let o = e.getPickRay(t, pickEllipsoid2DRay).origin;
+ o = Cartesian3.fromElements(o.y, o.z, 0, o);
+ const s = n.unproject(o);
+ if (!(s.latitude < -CesiumMath.PI_OVER_TWO || s.latitude > CesiumMath.PI_OVER_TWO))
+ return n.ellipsoid.cartographicToCartesian(s, i);
+}
+const pickEllipsoidCVRay = new Ray();
+function pickMapColumbusView(e, t, n, i) {
+ const r = e.getPickRay(t, pickEllipsoidCVRay), o = -r.origin.x / r.direction.x;
+ Ray.getPoint(r, o, i);
+ const s = n.unproject(new Cartesian3(i.y, i.z, 0));
+ if (!(s.latitude < -CesiumMath.PI_OVER_TWO || s.latitude > CesiumMath.PI_OVER_TWO || s.longitude < -Math.PI || s.longitude > Math.PI))
+ return n.ellipsoid.cartographicToCartesian(s, i);
+}
+Camera.prototype.pickEllipsoid = function(e, t, n) {
+ const i = this._scene.canvas;
+ if (!(i.clientWidth === 0 || i.clientHeight === 0)) {
+ if (defined(n) || (n = new Cartesian3()), t = defaultValue(t, Ellipsoid.default), this._mode === SceneMode$1.SCENE3D)
+ n = pickEllipsoid3D(this, e, t, n);
+ else if (this._mode === SceneMode$1.SCENE2D)
+ n = pickMap2D(this, e, this._projection, n);
+ else if (this._mode === SceneMode$1.COLUMBUS_VIEW)
+ n = pickMapColumbusView(
+ this,
+ e,
+ this._projection,
+ n
+ );
+ else
+ return;
+ return n;
+ }
+};
+const pickPerspCenter = new Cartesian3(), pickPerspXDir = new Cartesian3(), pickPerspYDir = new Cartesian3();
+function getPickRayPerspective(e, t, n) {
+ const i = e._scene.canvas, r = i.clientWidth, o = i.clientHeight, s = Math.tan(e.frustum.fovy * 0.5), c = e.frustum.aspectRatio * s, l = e.frustum.near, d = 2 / r * t.x - 1, f = 2 / o * (o - t.y) - 1, h = e.positionWC;
+ Cartesian3.clone(h, n.origin);
+ const p = Cartesian3.multiplyByScalar(
+ e.directionWC,
+ l,
+ pickPerspCenter
+ );
+ Cartesian3.add(h, p, p);
+ const m = Cartesian3.multiplyByScalar(
+ e.rightWC,
+ d * l * c,
+ pickPerspXDir
+ ), _ = Cartesian3.multiplyByScalar(
+ e.upWC,
+ f * l * s,
+ pickPerspYDir
+ ), y = Cartesian3.add(p, m, n.direction);
+ return Cartesian3.add(y, _, y), Cartesian3.subtract(y, h, y), Cartesian3.normalize(y, y), n;
+}
+const scratchDirection = new Cartesian3();
+function getPickRayOrthographic(e, t, n) {
+ const i = e._scene.canvas, r = i.clientWidth, o = i.clientHeight;
+ let s = e.frustum;
+ const c = s.offCenterFrustum;
+ defined(c) && (s = c);
+ let l = 2 / r * t.x - 1;
+ l *= (s.right - s.left) * 0.5;
+ let d = 2 / o * (o - t.y) - 1;
+ d *= (s.top - s.bottom) * 0.5;
+ const f = n.origin;
+ return Cartesian3.clone(e.position, f), Cartesian3.multiplyByScalar(e.right, l, scratchDirection), Cartesian3.add(scratchDirection, f, f), Cartesian3.multiplyByScalar(e.up, d, scratchDirection), Cartesian3.add(scratchDirection, f, f), Cartesian3.clone(e.directionWC, n.direction), (e._mode === SceneMode$1.COLUMBUS_VIEW || e._mode === SceneMode$1.SCENE2D) && Cartesian3.fromElements(
+ n.origin.z,
+ n.origin.x,
+ n.origin.y,
+ n.origin
+ ), n;
+}
+Camera.prototype.getPickRay = function(e, t) {
+ defined(t) || (t = new Ray());
+ const n = this._scene.canvas;
+ if (n.clientWidth <= 0 || n.clientHeight <= 0)
+ return;
+ const i = this.frustum;
+ return defined(i.aspectRatio) && defined(i.fov) && defined(i.near) ? getPickRayPerspective(this, e, t) : getPickRayOrthographic(this, e, t);
+};
+const scratchToCenter = new Cartesian3(), scratchProj = new Cartesian3();
+Camera.prototype.distanceToBoundingSphere = function(e) {
+ const t = Cartesian3.subtract(
+ this.positionWC,
+ e.center,
+ scratchToCenter
+ ), n = Cartesian3.multiplyByScalar(
+ this.directionWC,
+ Cartesian3.dot(t, this.directionWC),
+ scratchProj
+ );
+ return Math.max(0, Cartesian3.magnitude(n) - e.radius);
+};
+const scratchPixelSize = new Cartesian2();
+Camera.prototype.getPixelSize = function(e, t, n) {
+ const i = this.distanceToBoundingSphere(e), r = this.frustum.getPixelDimensions(
+ t,
+ n,
+ i,
+ this._scene.pixelRatio,
+ scratchPixelSize
+ );
+ return Math.max(r.x, r.y);
+};
+function createAnimationTemplateCV(e, t, n, i, r, o) {
+ const s = Cartesian3.clone(t);
+ n.y > i ? s.y -= n.y - i : n.y < -i && (s.y += -i - n.y), n.z > r ? s.z -= n.z - r : n.z < -r && (s.z += -r - n.z);
+ function c(l) {
+ const d = Cartesian3.lerp(
+ t,
+ s,
+ l.time,
+ new Cartesian3()
+ );
+ e.worldToCameraCoordinatesPoint(d, e.position);
+ }
+ return {
+ easingFunction: EasingFunction$1.EXPONENTIAL_OUT,
+ startObject: {
+ time: 0
+ },
+ stopObject: {
+ time: 1
+ },
+ duration: o,
+ update: c
+ };
+}
+const normalScratch = new Cartesian3(), centerScratch = new Cartesian3(), posScratch = new Cartesian3(), scratchCartesian3Subtract = new Cartesian3();
+function createAnimationCV(e, t) {
+ let n = e.position;
+ const i = e.direction, r = e.worldToCameraCoordinatesVector(
+ Cartesian3.UNIT_X,
+ normalScratch
+ ), o = -Cartesian3.dot(r, n) / Cartesian3.dot(r, i), s = Cartesian3.add(
+ n,
+ Cartesian3.multiplyByScalar(i, o, centerScratch),
+ centerScratch
+ );
+ e.cameraToWorldCoordinatesPoint(s, s), n = e.cameraToWorldCoordinatesPoint(e.position, posScratch);
+ const c = Math.tan(e.frustum.fovy * 0.5), l = e.frustum.aspectRatio * c, d = Cartesian3.magnitude(
+ Cartesian3.subtract(n, s, scratchCartesian3Subtract)
+ ), f = l * d, h = c * d, p = e._maxCoord.x, m = e._maxCoord.y, _ = Math.max(f - p, p), y = Math.max(h - m, m);
+ if (n.z < -_ || n.z > _ || n.y < -y || n.y > y) {
+ const C = s.y < -_ || s.y > _, T = s.z < -y || s.z > y;
+ if (C || T)
+ return createAnimationTemplateCV(
+ e,
+ n,
+ s,
+ _,
+ y,
+ t
+ );
+ }
+}
+Camera.prototype.createCorrectPositionTween = function(e) {
+ if (this._mode === SceneMode$1.COLUMBUS_VIEW)
+ return createAnimationCV(this, e);
+};
+const scratchFlyToDestination = new Cartesian3(), newOptions = {
+ destination: void 0,
+ heading: void 0,
+ pitch: void 0,
+ roll: void 0,
+ duration: void 0,
+ complete: void 0,
+ cancel: void 0,
+ endTransform: void 0,
+ maximumHeight: void 0,
+ easingFunction: void 0
+};
+Camera.prototype.cancelFlight = function() {
+ defined(this._currentFlight) && (this._currentFlight.cancelTween(), this._currentFlight = void 0);
+};
+Camera.prototype.completeFlight = function() {
+ if (defined(this._currentFlight)) {
+ this._currentFlight.cancelTween();
+ const e = {
+ destination: void 0,
+ orientation: {
+ heading: void 0,
+ pitch: void 0,
+ roll: void 0
+ }
+ };
+ e.destination = newOptions.destination, e.orientation.heading = newOptions.heading, e.orientation.pitch = newOptions.pitch, e.orientation.roll = newOptions.roll, this.setView(e), defined(this._currentFlight.complete) && this._currentFlight.complete(), this._currentFlight = void 0;
+ }
+};
+Camera.prototype.flyTo = function(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ let t = e.destination;
+ if (this._mode === SceneMode$1.MORPHING)
+ return;
+ this.cancelFlight();
+ const i = t instanceof Rectangle;
+ i && (t = this.getRectangleCameraCoordinates(
+ t,
+ scratchFlyToDestination
+ ));
+ let r = defaultValue(
+ e.orientation,
+ defaultValue.EMPTY_OBJECT
+ );
+ if (defined(r.direction) && (r = directionUpToHeadingPitchRoll(
+ this,
+ t,
+ r,
+ scratchSetViewOptions.orientation
+ )), defined(e.duration) && e.duration <= 0) {
+ const f = scratchSetViewOptions;
+ f.destination = e.destination, f.orientation.heading = r.heading, f.orientation.pitch = r.pitch, f.orientation.roll = r.roll, f.convert = e.convert, f.endTransform = e.endTransform, this.setView(f), typeof e.complete == "function" && e.complete();
+ return;
+ }
+ const o = this;
+ let s;
+ newOptions.destination = t, newOptions.heading = r.heading, newOptions.pitch = r.pitch, newOptions.roll = r.roll, newOptions.duration = e.duration, newOptions.complete = function() {
+ s === o._currentFlight && (o._currentFlight = void 0), defined(e.complete) && e.complete();
+ }, newOptions.cancel = e.cancel, newOptions.endTransform = e.endTransform, newOptions.convert = i ? !1 : e.convert, newOptions.maximumHeight = e.maximumHeight, newOptions.pitchAdjustHeight = e.pitchAdjustHeight, newOptions.flyOverLongitude = e.flyOverLongitude, newOptions.flyOverLongitudeWeight = e.flyOverLongitudeWeight, newOptions.easingFunction = e.easingFunction;
+ const c = this._scene, l = CameraFlightPath.createTween(c, newOptions);
+ if (l.duration === 0) {
+ typeof l.complete == "function" && l.complete();
+ return;
+ }
+ s = c.tweens.add(l), this._currentFlight = s;
+ let d = this._scene.preloadFlightCamera;
+ this._mode !== SceneMode$1.SCENE2D && (defined(d) || (d = Camera.clone(this)), d.setView({
+ destination: t,
+ orientation: r
+ }), this._scene.preloadFlightCullingVolume = d.frustum.computeCullingVolume(
+ d.positionWC,
+ d.directionWC,
+ d.upWC
+ ));
+};
+function distanceToBoundingSphere3D(e, t) {
+ const n = e.frustum, i = Math.tan(n.fovy * 0.5), r = n.aspectRatio * i;
+ return Math.max(t / r, t / i);
+}
+function distanceToBoundingSphere2D(e, t) {
+ let n = e.frustum;
+ const i = n.offCenterFrustum;
+ defined(i) && (n = i);
+ let r, o;
+ const s = n.right / n.top, c = t * s;
+ return t > c ? (r = t, o = r / s) : (o = t, r = c), Math.max(r, o) * 1.5;
+}
+const MINIMUM_ZOOM = 100;
+function adjustBoundingSphereOffset(e, t, n) {
+ n = HeadingPitchRange.clone(
+ defined(n) ? n : Camera.DEFAULT_OFFSET
+ );
+ const i = e._scene.screenSpaceCameraController.minimumZoomDistance, r = e._scene.screenSpaceCameraController.maximumZoomDistance, o = n.range;
+ if (!defined(o) || o === 0) {
+ const s = t.radius;
+ s === 0 ? n.range = MINIMUM_ZOOM : e.frustum instanceof OrthographicFrustum || e._mode === SceneMode$1.SCENE2D ? n.range = distanceToBoundingSphere2D(e, s) : n.range = distanceToBoundingSphere3D(e, s), n.range = CesiumMath.clamp(n.range, i, r);
+ }
+ return n;
+}
+Camera.prototype.viewBoundingSphere = function(e, t) {
+ t = adjustBoundingSphereOffset(this, e, t), this.lookAt(e.center, t);
+};
+const scratchflyToBoundingSphereTransform = new Matrix4(), scratchflyToBoundingSphereDestination = new Cartesian3(), scratchflyToBoundingSphereDirection = new Cartesian3(), scratchflyToBoundingSphereUp = new Cartesian3(), scratchflyToBoundingSphereRight = new Cartesian3(), scratchFlyToBoundingSphereCart4 = new Cartesian4(), scratchFlyToBoundingSphereQuaternion = new Quaternion(), scratchFlyToBoundingSphereMatrix3 = new Matrix3();
+Camera.prototype.flyToBoundingSphere = function(e, t) {
+ t = defaultValue(t, defaultValue.EMPTY_OBJECT);
+ const n = this._mode === SceneMode$1.SCENE2D || this._mode === SceneMode$1.COLUMBUS_VIEW;
+ this._setTransform(Matrix4.IDENTITY);
+ const i = adjustBoundingSphereOffset(
+ this,
+ e,
+ t.offset
+ );
+ let r;
+ n ? r = Cartesian3.multiplyByScalar(
+ Cartesian3.UNIT_Z,
+ i.range,
+ scratchflyToBoundingSphereDestination
+ ) : r = offsetFromHeadingPitchRange(
+ i.heading,
+ i.pitch,
+ i.range
+ );
+ const o = this._scene, s = defaultValue(o.ellipsoid, Ellipsoid.default), c = Transforms.eastNorthUpToFixedFrame(
+ e.center,
+ s,
+ scratchflyToBoundingSphereTransform
+ );
+ Matrix4.multiplyByPoint(c, r, r);
+ let l, d;
+ if (!n) {
+ if (l = Cartesian3.subtract(
+ e.center,
+ r,
+ scratchflyToBoundingSphereDirection
+ ), Cartesian3.normalize(l, l), d = Matrix4.multiplyByPointAsVector(
+ c,
+ Cartesian3.UNIT_Z,
+ scratchflyToBoundingSphereUp
+ ), 1 - Math.abs(Cartesian3.dot(l, d)) < CesiumMath.EPSILON6) {
+ const h = Quaternion.fromAxisAngle(
+ l,
+ i.heading,
+ scratchFlyToBoundingSphereQuaternion
+ ), p = Matrix3.fromQuaternion(
+ h,
+ scratchFlyToBoundingSphereMatrix3
+ );
+ Cartesian3.fromCartesian4(
+ Matrix4.getColumn(c, 1, scratchFlyToBoundingSphereCart4),
+ d
+ ), Matrix3.multiplyByVector(p, d, d);
+ }
+ const f = Cartesian3.cross(
+ l,
+ d,
+ scratchflyToBoundingSphereRight
+ );
+ Cartesian3.cross(f, l, d), Cartesian3.normalize(d, d);
+ }
+ this.flyTo({
+ destination: r,
+ orientation: {
+ direction: l,
+ up: d
+ },
+ duration: t.duration,
+ complete: t.complete,
+ cancel: t.cancel,
+ endTransform: t.endTransform,
+ maximumHeight: t.maximumHeight,
+ easingFunction: t.easingFunction,
+ flyOverLongitude: t.flyOverLongitude,
+ flyOverLongitudeWeight: t.flyOverLongitudeWeight,
+ pitchAdjustHeight: t.pitchAdjustHeight
+ });
+};
+const scratchCartesian3_1 = new Cartesian3(), scratchCartesian3_2 = new Cartesian3(), scratchCartesian3_3 = new Cartesian3(), scratchCartesian3_4 = new Cartesian3(), horizonPoints = [
+ new Cartesian3(),
+ new Cartesian3(),
+ new Cartesian3(),
+ new Cartesian3()
+];
+function computeHorizonQuad(e, t) {
+ const n = t.radii, i = e.positionWC, r = Cartesian3.multiplyComponents(
+ t.oneOverRadii,
+ i,
+ scratchCartesian3_1
+ ), o = Cartesian3.magnitude(r), s = Cartesian3.normalize(r, scratchCartesian3_2);
+ let c, l;
+ Cartesian3.equalsEpsilon(s, Cartesian3.UNIT_Z, CesiumMath.EPSILON10) ? (c = new Cartesian3(0, 1, 0), l = new Cartesian3(0, 0, 1)) : (c = Cartesian3.normalize(
+ Cartesian3.cross(Cartesian3.UNIT_Z, s, scratchCartesian3_3),
+ scratchCartesian3_3
+ ), l = Cartesian3.normalize(
+ Cartesian3.cross(s, c, scratchCartesian3_4),
+ scratchCartesian3_4
+ ));
+ const d = Math.sqrt(Cartesian3.magnitudeSquared(r) - 1), f = Cartesian3.multiplyByScalar(
+ s,
+ 1 / o,
+ scratchCartesian3_1
+ ), h = d / o, p = Cartesian3.multiplyByScalar(
+ c,
+ h,
+ scratchCartesian3_2
+ ), m = Cartesian3.multiplyByScalar(
+ l,
+ h,
+ scratchCartesian3_3
+ ), _ = Cartesian3.add(f, m, horizonPoints[0]);
+ Cartesian3.subtract(_, p, _), Cartesian3.multiplyComponents(n, _, _);
+ const y = Cartesian3.subtract(f, m, horizonPoints[1]);
+ Cartesian3.subtract(y, p, y), Cartesian3.multiplyComponents(n, y, y);
+ const C = Cartesian3.subtract(f, m, horizonPoints[2]);
+ Cartesian3.add(C, p, C), Cartesian3.multiplyComponents(n, C, C);
+ const T = Cartesian3.add(f, m, horizonPoints[3]);
+ return Cartesian3.add(T, p, T), Cartesian3.multiplyComponents(n, T, T), horizonPoints;
+}
+const scratchPickCartesian2 = new Cartesian2(), scratchRectCartesian = new Cartesian3(), cartoArray = [
+ new Cartographic(),
+ new Cartographic(),
+ new Cartographic(),
+ new Cartographic()
+];
+function addToResult(e, t, n, i, r, o) {
+ scratchPickCartesian2.x = e, scratchPickCartesian2.y = t;
+ const s = i.pickEllipsoid(
+ scratchPickCartesian2,
+ r,
+ scratchRectCartesian
+ );
+ return defined(s) ? (cartoArray[n] = r.cartesianToCartographic(s, cartoArray[n]), 1) : (cartoArray[n] = r.cartesianToCartographic(
+ o[n],
+ cartoArray[n]
+ ), 0);
+}
+Camera.prototype.computeViewRectangle = function(e, t) {
+ e = defaultValue(e, Ellipsoid.default);
+ const n = this.frustum.computeCullingVolume(
+ this.positionWC,
+ this.directionWC,
+ this.upWC
+ ), i = new BoundingSphere(
+ Cartesian3.ZERO,
+ e.maximumRadius
+ );
+ if (n.computeVisibility(i) === Intersect$1.OUTSIDE)
+ return;
+ const o = this._scene.canvas, s = o.clientWidth, c = o.clientHeight;
+ let l = 0;
+ const d = computeHorizonQuad(this, e);
+ if (l += addToResult(
+ 0,
+ 0,
+ 0,
+ this,
+ e,
+ d
+ ), l += addToResult(
+ 0,
+ c,
+ 1,
+ this,
+ e,
+ d
+ ), l += addToResult(
+ s,
+ c,
+ 2,
+ this,
+ e,
+ d
+ ), l += addToResult(
+ s,
+ 0,
+ 3,
+ this,
+ e,
+ d
+ ), l < 2)
+ return Rectangle.MAX_VALUE;
+ t = Rectangle.fromCartographicArray(cartoArray, t);
+ let f = 0, h = cartoArray[3].longitude;
+ for (let p = 0; p < 4; ++p) {
+ const m = cartoArray[p].longitude, _ = Math.abs(m - h);
+ _ > CesiumMath.PI ? f += CesiumMath.TWO_PI - _ : f += _, h = m;
+ }
+ return CesiumMath.equalsEpsilon(
+ Math.abs(f),
+ CesiumMath.TWO_PI,
+ CesiumMath.EPSILON9
+ ) && (t.west = -CesiumMath.PI, t.east = CesiumMath.PI, cartoArray[0].latitude >= 0 ? t.north = CesiumMath.PI_OVER_TWO : t.south = -CesiumMath.PI_OVER_TWO), t;
+};
+Camera.prototype.switchToPerspectiveFrustum = function() {
+ if (this._mode === SceneMode$1.SCENE2D || this.frustum instanceof PerspectiveFrustum)
+ return;
+ const e = this._scene;
+ this.frustum = new PerspectiveFrustum(), this.frustum.aspectRatio = e.drawingBufferWidth / e.drawingBufferHeight, this.frustum.fov = CesiumMath.toRadians(60);
+};
+Camera.prototype.switchToOrthographicFrustum = function() {
+ if (this._mode === SceneMode$1.SCENE2D || this.frustum instanceof OrthographicFrustum)
+ return;
+ const e = calculateOrthographicFrustumWidth(this), t = this._scene;
+ this.frustum = new OrthographicFrustum(), this.frustum.aspectRatio = t.drawingBufferWidth / t.drawingBufferHeight, this.frustum.width = e;
+};
+Camera.clone = function(e, t) {
+ return defined(t) || (t = new Camera(e._scene)), Cartesian3.clone(e.position, t.position), Cartesian3.clone(e.direction, t.direction), Cartesian3.clone(e.up, t.up), Cartesian3.clone(e.right, t.right), Matrix4.clone(e._transform, t.transform), t._transformChanged = !0, t.frustum = e.frustum.clone(), t;
+};
+function Cesium3DTilePassState(e) {
+ this.pass = e.pass, this.commandList = e.commandList, this.camera = e.camera, this.cullingVolume = e.cullingVolume, this.ready = !1;
+}
+const mobileWidth = 576, lightboxHeight = 100, textColor = "#ffffff", highlightColor = "#48b";
+function CreditDisplayElement(e, t) {
+ this.credit = e, this.count = defaultValue(t, 1);
+}
+function contains(e, t) {
+ const n = e.length;
+ for (let i = 0; i < n; i++) {
+ const r = e[i];
+ if (Credit.equals(r, t))
+ return !0;
+ }
+ return !1;
+}
+function swapCesiumCredit(e) {
+ const t = e._previousCesiumCredit, n = e._currentCesiumCredit;
+ Credit.equals(n, t) || (defined(t) && e._cesiumCreditContainer.removeChild(t.element), defined(n) && e._cesiumCreditContainer.appendChild(n.element), e._previousCesiumCredit = n);
+}
+const delimiterClassName = "cesium-credit-delimiter";
+function createDelimiterElement(e) {
+ const t = document.createElement("span");
+ return t.textContent = e, t.className = delimiterClassName, t;
+}
+function createCreditElement(e, t) {
+ if (defined(t)) {
+ const n = document.createElement(t);
+ n._creditId = e._creditId, n.appendChild(e), e = n;
+ }
+ return e;
+}
+function displayCredits(e, t, n, i) {
+ const r = e.childNodes;
+ let o = -1;
+ t.sort(function(s, c) {
+ return c.count - s.count;
+ });
+ for (let s = 0; s < t.length; ++s) {
+ const c = t[s].credit;
+ if (defined(c)) {
+ if (o = s, defined(n) && (o *= 2, s > 0)) {
+ const d = o - 1;
+ if (r.length <= d)
+ e.appendChild(createDelimiterElement(n));
+ else {
+ const f = r[d];
+ f.className !== delimiterClassName && e.replaceChild(
+ createDelimiterElement(n),
+ f
+ );
+ }
+ }
+ const l = c.element;
+ if (r.length <= o)
+ e.appendChild(
+ createCreditElement(l, i)
+ );
+ else {
+ const d = r[o];
+ d._creditId !== c._id && e.replaceChild(
+ createCreditElement(l, i),
+ d
+ );
+ }
+ }
+ }
+ for (++o; o < r.length; )
+ e.removeChild(r[o]);
+}
+function styleLightboxContainer(e) {
+ const t = e._lightboxCredits, n = e.viewport.clientWidth, i = e.viewport.clientHeight;
+ n !== e._lastViewportWidth && (n < mobileWidth ? (t.className = "cesium-credit-lightbox cesium-credit-lightbox-mobile", t.style.marginTop = "0") : (t.className = "cesium-credit-lightbox cesium-credit-lightbox-expanded", t.style.marginTop = `${Math.floor(
+ (i - t.clientHeight) * 0.5
+ )}px`), e._lastViewportWidth = n), n >= mobileWidth && i !== e._lastViewportHeight && (t.style.marginTop = `${Math.floor(
+ (i - t.clientHeight) * 0.5
+ )}px`, e._lastViewportHeight = i);
+}
+function appendCss(e) {
+ const t = (
+ /*css*/
+ `
+.cesium-credit-lightbox-overlay {
+ display: none;
+ z-index: 1;
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: rgba(80, 80, 80, 0.8);
+}
+
+.cesium-credit-lightbox {
+ background-color: #303336;
+ color: ${textColor};
+ position: relative;
+ min-height: ${lightboxHeight}px;
+ margin: auto;
+}
+.cesium-credit-lightbox > ul > li a,
+.cesium-credit-lightbox > ul > li a:visited,
+.cesium-credit-wrapper a,
+.cesium-credit-wrapper a:visited {
+ color: ${textColor};
+}
+.cesium-credit-lightbox > ul > li a:hover {
+ color: ${highlightColor};
+}
+.cesium-credit-lightbox.cesium-credit-lightbox-expanded {
+ border: 1px solid #444;
+ border-radius: 5px;
+ max-width: 370px;
+}
+.cesium-credit-lightbox.cesium-credit-lightbox-mobile {
+ height: 100%;
+ width: 100%;
+}
+.cesium-credit-lightbox-title {
+ padding: 20px 20px 0 20px;
+}
+.cesium-credit-lightbox-close {
+ font-size: 18pt;
+ cursor: pointer;
+ position: absolute;
+ top: 0;
+ right: 6px;
+ color: ${textColor};
+}
+.cesium-credit-lightbox-close:hover {
+ color: ${highlightColor};
+}
+.cesium-credit-lightbox > ul {
+ margin: 0;
+ padding: 12px 20px 12px 40px;
+ font-size: 13px;
+}
+.cesium-credit-lightbox > ul > li {
+ padding-bottom: 6px;
+}
+.cesium-credit-lightbox > ul > li * {
+ padding: 0;
+ margin: 0;
+}
+
+.cesium-credit-expand-link {
+ padding-left: 5px;
+ cursor: pointer;
+ text-decoration: underline;
+ color: ${textColor};
+}
+.cesium-credit-expand-link:hover {
+ color: ${highlightColor};
+}
+
+.cesium-credit-text {
+ color: ${textColor};
+}
+
+.cesium-credit-delimiter {
+ padding: 0 5px;
+}
+
+.cesium-credit-textContainer *,
+.cesium-credit-logoContainer * {
+ display: inline;
+}
+
+.cesium-credit-textContainer a:hover {
+ color: ${highlightColor}
+}
+
+.cesium-credit-textContainer .cesium-credit-wrapper:first-of-type {
+ padding-left: 5px;
+}
+`
+ );
+ function n(o) {
+ if (o.shadowRoot)
+ return o.shadowRoot;
+ if (o.getRootNode) {
+ const s = o.getRootNode();
+ if (s instanceof ShadowRoot)
+ return s;
+ }
+ }
+ const i = defaultValue(
+ n(e),
+ document.head
+ ), r = document.createElement("style");
+ r.innerHTML = t, i.appendChild(r);
+}
+function CreditDisplay(e, t, n) {
+ const i = this;
+ n = defaultValue(n, document.body);
+ const r = document.createElement("div");
+ r.className = "cesium-credit-lightbox-overlay", n.appendChild(r);
+ const o = document.createElement("div");
+ o.className = "cesium-credit-lightbox", r.appendChild(o);
+ function s(_) {
+ o.contains(_.target) || i.hideLightbox();
+ }
+ r.addEventListener("click", s, !1);
+ const c = document.createElement("div");
+ c.className = "cesium-credit-lightbox-title", c.textContent = "Data provided by:", o.appendChild(c);
+ const l = document.createElement("a");
+ l.onclick = this.hideLightbox.bind(this), l.innerHTML = "×", l.className = "cesium-credit-lightbox-close", o.appendChild(l);
+ const d = document.createElement("ul");
+ o.appendChild(d);
+ const f = document.createElement("div");
+ f.className = "cesium-credit-logoContainer", f.style.display = "inline", e.appendChild(f);
+ const h = document.createElement("div");
+ h.className = "cesium-credit-textContainer", h.style.display = "inline", e.appendChild(h);
+ const p = document.createElement("a");
+ p.className = "cesium-credit-expand-link", p.onclick = this.showLightbox.bind(this), p.textContent = "Data attribution", e.appendChild(p), appendCss(e);
+ const m = Credit.clone(CreditDisplay.cesiumCredit);
+ this._delimiter = defaultValue(t, "•"), this._screenContainer = h, this._cesiumCreditContainer = f, this._lastViewportHeight = void 0, this._lastViewportWidth = void 0, this._lightboxCredits = o, this._creditList = d, this._lightbox = r, this._hideLightbox = s, this._expandLink = p, this._expanded = !1, this._staticCredits = [], this._cesiumCredit = m, this._previousCesiumCredit = void 0, this._currentCesiumCredit = m, this._creditDisplayElementPool = [], this._creditDisplayElementIndex = 0, this._currentFrameCredits = {
+ screenCredits: new AssociativeArray(),
+ lightboxCredits: new AssociativeArray()
+ }, this._defaultCredit = void 0, this.viewport = n, this.container = e;
+}
+function setCredit(e, t, n, i) {
+ i = defaultValue(i, 1);
+ let r = t.get(n.id);
+ if (defined(r))
+ r.count < Number.MAX_VALUE && (r.count += i);
+ else {
+ const o = e._creditDisplayElementPool, s = e._creditDisplayElementPoolIndex;
+ s < o.length ? (r = o[s], r.credit = n, r.count = i) : (r = new CreditDisplayElement(n, i), o.push(r)), ++e._creditDisplayElementPoolIndex, t.set(n.id, r);
+ }
+}
+CreditDisplay.prototype.addCreditToNextFrame = function(e) {
+ if (e.isIon()) {
+ defined(this._defaultCredit) || (this._defaultCredit = Credit.clone(getDefaultCredit())), this._currentCesiumCredit = this._defaultCredit;
+ return;
+ }
+ let t;
+ e.showOnScreen ? t = this._currentFrameCredits.screenCredits : t = this._currentFrameCredits.lightboxCredits, setCredit(this, t, e);
+};
+CreditDisplay.prototype.addStaticCredit = function(e) {
+ const t = this._staticCredits;
+ contains(t, e) || t.push(e);
+};
+CreditDisplay.prototype.removeStaticCredit = function(e) {
+ const t = this._staticCredits, n = t.indexOf(e);
+ n !== -1 && t.splice(n, 1);
+};
+CreditDisplay.prototype.showLightbox = function() {
+ this._lightbox.style.display = "block", this._expanded = !0;
+};
+CreditDisplay.prototype.hideLightbox = function() {
+ this._lightbox.style.display = "none", this._expanded = !1;
+};
+CreditDisplay.prototype.update = function() {
+ this._expanded && styleLightboxContainer(this);
+};
+CreditDisplay.prototype.beginFrame = function() {
+ const e = this._currentFrameCredits;
+ this._creditDisplayElementPoolIndex = 0;
+ const t = e.screenCredits, n = e.lightboxCredits;
+ t.removeAll(), n.removeAll();
+ const i = this._staticCredits;
+ for (let r = 0; r < i.length; ++r) {
+ const o = i[r], s = o.showOnScreen ? t : n;
+ o.isIon() && Credit.equals(CreditDisplay.cesiumCredit, this._cesiumCredit) || setCredit(this, s, o, Number.MAX_VALUE);
+ }
+ Credit.equals(CreditDisplay.cesiumCredit, this._cesiumCredit) || (this._cesiumCredit = Credit.clone(CreditDisplay.cesiumCredit)), this._currentCesiumCredit = this._cesiumCredit;
+};
+CreditDisplay.prototype.endFrame = function() {
+ const e = this._currentFrameCredits.screenCredits.values;
+ displayCredits(
+ this._screenContainer,
+ e,
+ this._delimiter,
+ void 0
+ );
+ const t = this._currentFrameCredits.lightboxCredits.values;
+ this._expandLink.style.display = t.length > 0 ? "inline" : "none", displayCredits(this._creditList, t, void 0, "li"), swapCesiumCredit(this);
+};
+CreditDisplay.prototype.destroy = function() {
+ return this._lightbox.removeEventListener("click", this._hideLightbox, !1), this.container.removeChild(this._cesiumCreditContainer), this.container.removeChild(this._screenContainer), this.container.removeChild(this._expandLink), this.viewport.removeChild(this._lightbox), destroyObject(this);
+};
+CreditDisplay.prototype.isDestroyed = function() {
+ return !1;
+};
+CreditDisplay._cesiumCredit = void 0;
+CreditDisplay._cesiumCreditInitialized = !1;
+let defaultCredit$2;
+function getDefaultCredit() {
+ if (!defined(defaultCredit$2)) {
+ let e = buildModuleUrl("Assets/Images/ion-credit.png");
+ e.indexOf("http://") !== 0 && e.indexOf("https://") !== 0 && e.indexOf("data:") !== 0 && (e = new Uri(e).path()), defaultCredit$2 = new Credit(
+ `ready
+ * and {@link AutoExposure#enabled} are true. A stage will not be ready while it is waiting on textures
+ * to load.
+ *
+ * @memberof AutoExposure.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ ready: {
+ get: function() {
+ return this._ready;
+ }
+ },
+ /**
+ * The unique name of this post-process stage for reference by other stages.
+ *
+ * @memberof AutoExposure.prototype
+ * @type {string}
+ * @readonly
+ */
+ name: {
+ get: function() {
+ return this._name;
+ }
+ },
+ /**
+ * A reference to the texture written to when executing this post process stage.
+ *
+ * @memberof AutoExposure.prototype
+ * @type {Texture}
+ * @readonly
+ * @private
+ */
+ outputTexture: {
+ get: function() {
+ const e = this._framebuffers;
+ if (defined(e))
+ return e[e.length - 1].getColorTexture(0);
+ }
+ }
+});
+function destroyFramebuffers(e) {
+ const t = e._framebuffers;
+ if (!defined(t))
+ return;
+ const n = t.length;
+ for (let i = 0; i < n; ++i)
+ t[i].destroy();
+ e._framebuffers = void 0, e._previousLuminance.destroy(), e._previousLuminance = void 0;
+}
+function createFramebuffers$1(e, t) {
+ destroyFramebuffers(e);
+ let n = e._width, i = e._height;
+ const r = t.halfFloatingPointTexture ? PixelDatatype$1.HALF_FLOAT : PixelDatatype$1.FLOAT, o = Math.ceil(Math.log(Math.max(n, i)) / Math.log(3)), s = new Array(o);
+ for (let l = 0; l < o; ++l)
+ n = Math.max(Math.ceil(n / 3), 1), i = Math.max(Math.ceil(i / 3), 1), s[l] = new FramebufferManager(), s[l].update(t, n, i, 1, r);
+ const c = s[o - 1].getColorTexture(0);
+ e._previousLuminance.update(
+ t,
+ c.width,
+ c.height,
+ 1,
+ r
+ ), e._framebuffers = s;
+}
+function destroyCommands(e) {
+ const t = e._commands;
+ if (!defined(t))
+ return;
+ const n = t.length;
+ for (let i = 0; i < n; ++i)
+ t[i].shaderProgram.destroy();
+ e._commands = void 0;
+}
+function createUniformMap$2(e, t) {
+ let n;
+ if (t === 0)
+ n = {
+ colorTexture: function() {
+ return e._colorTexture;
+ },
+ colorTextureDimensions: function() {
+ return e._colorTexture.dimensions;
+ }
+ };
+ else {
+ const i = e._framebuffers[t - 1].getColorTexture(0);
+ n = {
+ colorTexture: function() {
+ return i;
+ },
+ colorTextureDimensions: function() {
+ return i.dimensions;
+ }
+ };
+ }
+ return n.minMaxLuminance = function() {
+ return e._minMaxLuminance;
+ }, n.previousLuminance = function() {
+ return e._previousLuminance.getColorTexture(0);
+ }, n;
+}
+function getShaderSource(e, t) {
+ let n = `uniform sampler2D colorTexture;
+in vec2 v_textureCoordinates;
+float sampleTexture(vec2 offset) {
+`;
+ return e === 0 ? n += ` vec4 color = texture(colorTexture, v_textureCoordinates + offset);
+ return czm_luminance(color.rgb);
+` : n += ` return texture(colorTexture, v_textureCoordinates + offset).r;
+`, n += `}
+
+`, n += `uniform vec2 colorTextureDimensions;
+uniform vec2 minMaxLuminance;
+uniform sampler2D previousLuminance;
+void main() {
+ float color = 0.0;
+ float xStep = 1.0 / colorTextureDimensions.x;
+ float yStep = 1.0 / colorTextureDimensions.y;
+ int count = 0;
+ for (int i = 0; i < 3; ++i) {
+ for (int j = 0; j < 3; ++j) {
+ vec2 offset;
+ offset.x = -xStep + float(i) * xStep;
+ offset.y = -yStep + float(j) * yStep;
+ if (offset.x < 0.0 || offset.x > 1.0 || offset.y < 0.0 || offset.y > 1.0) {
+ continue;
+ }
+ color += sampleTexture(offset);
+ ++count;
+ }
+ }
+ if (count > 0) {
+ color /= float(count);
+ }
+`, e === t - 1 && (n += ` float previous = texture(previousLuminance, vec2(0.5)).r;
+ color = clamp(color, minMaxLuminance.x, minMaxLuminance.y);
+ color = previous + (color - previous) / (60.0 * 1.5);
+ color = clamp(color, minMaxLuminance.x, minMaxLuminance.y);
+`), n += ` out_FragColor = vec4(color);
+}
+`, n;
+}
+function createCommands(e, t) {
+ destroyCommands(e);
+ const n = e._framebuffers, i = n.length, r = new Array(i);
+ for (let o = 0; o < i; ++o)
+ r[o] = t.createViewportQuadCommand(
+ getShaderSource(o, i),
+ {
+ framebuffer: n[o].framebuffer,
+ uniformMap: createUniformMap$2(e, o)
+ }
+ );
+ e._commands = r;
+}
+AutoExposure.prototype.clear = function(e) {
+ const t = this._framebuffers;
+ if (!defined(t))
+ return;
+ let n = this._clearCommand;
+ defined(n) || (n = this._clearCommand = new ClearCommand({
+ color: new Color(0, 0, 0, 0),
+ framebuffer: void 0
+ }));
+ const i = t.length;
+ for (let r = 0; r < i; ++r)
+ t[r].clear(e, n);
+};
+AutoExposure.prototype.update = function(e) {
+ const t = e.drawingBufferWidth, n = e.drawingBufferHeight;
+ (t !== this._width || n !== this._height) && (this._width = t, this._height = n, createFramebuffers$1(this, e), createCommands(this, e), this._ready || (this._ready = !0)), this._minMaxLuminance.x = this.minimumLuminance, this._minMaxLuminance.y = this.maximumLuminance;
+ const i = this._framebuffers, r = i[i.length - 1];
+ i[i.length - 1] = this._previousLuminance, this._commands[this._commands.length - 1].framebuffer = this._previousLuminance.framebuffer, this._previousLuminance = r;
+};
+AutoExposure.prototype.execute = function(e, t) {
+ this._colorTexture = t;
+ const n = this._commands;
+ if (!defined(n))
+ return;
+ const i = n.length;
+ for (let r = 0; r < i; ++r)
+ n[r].execute(e);
+};
+AutoExposure.prototype.isDestroyed = function() {
+ return !1;
+};
+AutoExposure.prototype.destroy = function() {
+ return destroyFramebuffers(this), destroyCommands(this), destroyObject(this);
+};
+const PostProcessStageSampleMode = {
+ /**
+ * Samples the texture by returning the closest texel.
+ *
+ * @type {number}
+ * @constant
+ */
+ NEAREST: 0,
+ /**
+ * Samples the texture through bi-linear interpolation of the four nearest texels.
+ *
+ * @type {number}
+ * @constant
+ */
+ LINEAR: 1
+};
+function PostProcessStage(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.fragmentShader, n = defaultValue(e.textureScale, 1), i = defaultValue(e.pixelFormat, PixelFormat$1.RGBA);
+ this._fragmentShader = t, this._uniforms = e.uniforms, this._textureScale = n, this._forcePowerOfTwo = defaultValue(e.forcePowerOfTwo, !1), this._sampleMode = defaultValue(
+ e.sampleMode,
+ PostProcessStageSampleMode.NEAREST
+ ), this._pixelFormat = i, this._pixelDatatype = defaultValue(
+ e.pixelDatatype,
+ PixelDatatype$1.UNSIGNED_BYTE
+ ), this._clearColor = defaultValue(e.clearColor, Color.BLACK), this._uniformMap = void 0, this._command = void 0, this._colorTexture = void 0, this._depthTexture = void 0, this._idTexture = void 0, this._actualUniforms = {}, this._dirtyUniforms = [], this._texturesToRelease = [], this._texturesToCreate = [], this._texturePromise = void 0;
+ const r = new PassState();
+ r.scissorTest = {
+ enabled: !0,
+ rectangle: defined(e.scissorRectangle) ? BoundingRectangle.clone(e.scissorRectangle) : new BoundingRectangle()
+ }, this._passState = r, this._ready = !1;
+ let o = e.name;
+ defined(o) || (o = createGuid()), this._name = o, this._logDepthChanged = void 0, this._useLogDepth = void 0, this._selectedIdTexture = void 0, this._selected = void 0, this._selectedShadow = void 0, this._parentSelected = void 0, this._parentSelectedShadow = void 0, this._combinedSelected = void 0, this._combinedSelectedShadow = void 0, this._selectedLength = 0, this._parentSelectedLength = 0, this._selectedDirty = !0, this._textureCache = void 0, this._index = void 0, this.enabled = !0, this._enabled = !0;
+}
+Object.defineProperties(PostProcessStage.prototype, {
+ /**
+ * Determines if this post-process stage is ready to be executed. A stage is only executed when both ready
+ * and {@link PostProcessStage#enabled} are true. A stage will not be ready while it is waiting on textures
+ * to load.
+ *
+ * @memberof PostProcessStage.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ ready: {
+ get: function() {
+ return this._ready;
+ }
+ },
+ /**
+ * The unique name of this post-process stage for reference by other stages in a {@link PostProcessStageComposite}.
+ *
+ * @memberof PostProcessStage.prototype
+ * @type {string}
+ * @readonly
+ */
+ name: {
+ get: function() {
+ return this._name;
+ }
+ },
+ /**
+ * The fragment shader to use when execute this post-process stage.
+ *
+ * The shader must contain a sampler uniform declaration for colorTexture, depthTexture,
+ * or both.
+ *
+ * The shader must contain a vec2 varying declaration for v_textureCoordinates for sampling
+ * the texture uniforms.
+ *
+ * The object property values can be either a constant or a function. The function will be called + * each frame before the post-process stage is executed. + *
+ *+ * A constant value can also be a URI to an image, a data URI, or an HTML element that can be used as a texture, such as HTMLImageElement or HTMLCanvasElement. + *
+ *+ * If this post-process stage is part of a {@link PostProcessStageComposite} that does not execute in series, the constant value can also be + * the name of another stage in a composite. This will set the uniform to the output texture the stage with that name. + *
+ * + * @memberof PostProcessStage.prototype + * @type {object} + * @readonly + */ + uniforms: { + get: function() { + return this._uniforms; + } + }, + /** + * A number in the range (0.0, 1.0] used to scale the output texture dimensions. A scale of 1.0 will render this post-process stage to a texture the size of the viewport. + * + * @memberof PostProcessStage.prototype + * @type {number} + * @readonly + */ + textureScale: { + get: function() { + return this._textureScale; + } + }, + /** + * Whether or not to force the output texture dimensions to be both equal powers of two. The power of two will be the next power of two of the minimum of the dimensions. + * + * @memberof PostProcessStage.prototype + * @type {number} + * @readonly + */ + forcePowerOfTwo: { + get: function() { + return this._forcePowerOfTwo; + } + }, + /** + * How to sample the input color texture. + * + * @memberof PostProcessStage.prototype + * @type {PostProcessStageSampleMode} + * @readonly + */ + sampleMode: { + get: function() { + return this._sampleMode; + } + }, + /** + * The color pixel format of the output texture. + * + * @memberof PostProcessStage.prototype + * @type {PixelFormat} + * @readonly + */ + pixelFormat: { + get: function() { + return this._pixelFormat; + } + }, + /** + * The pixel data type of the output texture. + * + * @memberof PostProcessStage.prototype + * @type {PixelDatatype} + * @readonly + */ + pixelDatatype: { + get: function() { + return this._pixelDatatype; + } + }, + /** + * The color to clear the output texture to. + * + * @memberof PostProcessStage.prototype + * @type {Color} + * @readonly + */ + clearColor: { + get: function() { + return this._clearColor; + } + }, + /** + * The {@link BoundingRectangle} to use for the scissor test. A default bounding rectangle will disable the scissor test. + * + * @memberof PostProcessStage.prototype + * @type {BoundingRectangle} + * @readonly + */ + scissorRectangle: { + get: function() { + return this._passState.scissorTest.rectangle; + } + }, + /** + * A reference to the texture written to when executing this post process stage. + * + * @memberof PostProcessStage.prototype + * @type {Texture} + * @readonly + * @private + */ + outputTexture: { + get: function() { + if (defined(this._textureCache)) { + const e = this._textureCache.getFramebuffer(this._name); + if (defined(e)) + return e.getColorTexture(0); + } + } + }, + /** + * The features selected for applying the post-process. + *
+ * In the fragment shader, use czm_selected to determine whether or not to apply the post-process
+ * stage to that fragment. For example:
+ *
+ * if (czm_selected(v_textureCoordinates)) {
+ * // apply post-process stage
+ * } else {
+ * out_FragColor = texture(colorTexture, v_textureCoordinates);
+ * }
+ *
+ *
undefined; in which case, get each stage to set uniform values.
+ * @memberof PostProcessStageComposite.prototype
+ * @type {object}
+ */
+ uniforms: {
+ get: function() {
+ return this._uniforms;
+ }
+ },
+ /**
+ * All post-process stages are executed in the order of the array. The input texture changes based on the value of inputPreviousStageTexture.
+ * If inputPreviousStageTexture is true, the input to each stage is the output texture rendered to by the scene or of the stage that executed before it.
+ * If inputPreviousStageTexture is false, the input texture is the same for each stage in the composite. The input texture is the texture rendered to by the scene
+ * or the output texture of the previous stage.
+ *
+ * @memberof PostProcessStageComposite.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ inputPreviousStageTexture: {
+ get: function() {
+ return this._inputPreviousStageTexture;
+ }
+ },
+ /**
+ * The number of post-process stages in this composite.
+ *
+ * @memberof PostProcessStageComposite.prototype
+ * @type {number}
+ * @readonly
+ */
+ length: {
+ get: function() {
+ return this._stages.length;
+ }
+ },
+ /**
+ * The features selected for applying the post-process.
+ *
+ * @memberof PostProcessStageComposite.prototype
+ * @type {Array}
+ */
+ selected: {
+ get: function() {
+ return this._selected;
+ },
+ set: function(e) {
+ this._selected = e;
+ }
+ },
+ /**
+ * @private
+ */
+ parentSelected: {
+ get: function() {
+ return this._parentSelected;
+ },
+ set: function(e) {
+ this._parentSelected = e;
+ }
+ }
+});
+PostProcessStageComposite.prototype._isSupported = function(e) {
+ const t = this._stages, n = t.length;
+ for (let i = 0; i < n; ++i)
+ if (!t[i]._isSupported(e))
+ return !1;
+ return !0;
+};
+PostProcessStageComposite.prototype.get = function(e) {
+ return this._stages[e];
+};
+function isSelectedTextureDirty(e) {
+ let t = defined(e._selected) ? e._selected.length : 0;
+ const n = defined(e._parentSelected) ? e._parentSelected : 0;
+ let i = e._selected !== e._selectedShadow || t !== e._selectedLength;
+ if (i = i || e._parentSelected !== e._parentSelectedShadow || n !== e._parentSelectedLength, defined(e._selected) && defined(e._parentSelected) ? e._combinedSelected = e._selected.concat(e._parentSelected) : defined(e._parentSelected) ? e._combinedSelected = e._parentSelected : e._combinedSelected = e._selected, !i && defined(e._combinedSelected)) {
+ if (!defined(e._combinedSelectedShadow))
+ return !0;
+ t = e._combinedSelected.length;
+ for (let r = 0; r < t; ++r)
+ if (e._combinedSelected[r] !== e._combinedSelectedShadow[r])
+ return !0;
+ }
+ return i;
+}
+PostProcessStageComposite.prototype.update = function(e, t) {
+ this._selectedDirty = isSelectedTextureDirty(this), this._selectedShadow = this._selected, this._parentSelectedShadow = this._parentSelected, this._combinedSelectedShadow = this._combinedSelected, this._selectedLength = defined(this._selected) ? this._selected.length : 0, this._parentSelectedLength = defined(this._parentSelected) ? this._parentSelected.length : 0;
+ const n = this._stages, i = n.length;
+ for (let r = 0; r < i; ++r) {
+ const o = n[r];
+ this._selectedDirty && (o.parentSelected = this._combinedSelected), o.update(e, t);
+ }
+};
+PostProcessStageComposite.prototype.isDestroyed = function() {
+ return !1;
+};
+PostProcessStageComposite.prototype.destroy = function() {
+ const e = this._stages, t = e.length;
+ for (let n = 0; n < t; ++n)
+ e[n].destroy();
+ return destroyObject(this);
+};
+const PostProcessStageLibrary = {};
+function createBlur(e) {
+ const r = `#define USE_STEP_SIZE
+${GaussianBlur1D}`, o = new PostProcessStage({
+ name: `${e}_x_direction`,
+ fragmentShader: r,
+ uniforms: {
+ delta: 1,
+ sigma: 2,
+ stepSize: 1,
+ direction: 0
+ },
+ sampleMode: PostProcessStageSampleMode.LINEAR
+ }), s = new PostProcessStage({
+ name: `${e}_y_direction`,
+ fragmentShader: r,
+ uniforms: {
+ delta: 1,
+ sigma: 2,
+ stepSize: 1,
+ direction: 1
+ },
+ sampleMode: PostProcessStageSampleMode.LINEAR
+ }), c = {};
+ return Object.defineProperties(c, {
+ delta: {
+ get: function() {
+ return o.uniforms.delta;
+ },
+ set: function(l) {
+ const d = o.uniforms, f = s.uniforms;
+ d.delta = f.delta = l;
+ }
+ },
+ sigma: {
+ get: function() {
+ return o.uniforms.sigma;
+ },
+ set: function(l) {
+ const d = o.uniforms, f = s.uniforms;
+ d.sigma = f.sigma = l;
+ }
+ },
+ stepSize: {
+ get: function() {
+ return o.uniforms.stepSize;
+ },
+ set: function(l) {
+ const d = o.uniforms, f = s.uniforms;
+ d.stepSize = f.stepSize = l;
+ }
+ }
+ }), new PostProcessStageComposite({
+ name: e,
+ stages: [o, s],
+ uniforms: c
+ });
+}
+PostProcessStageLibrary.createBlurStage = function() {
+ return createBlur("czm_blur");
+};
+PostProcessStageLibrary.createDepthOfFieldStage = function() {
+ const e = createBlur("czm_depth_of_field_blur"), t = new PostProcessStage({
+ name: "czm_depth_of_field_composite",
+ fragmentShader: DepthOfField,
+ uniforms: {
+ focalDistance: 5,
+ blurTexture: e.name
+ }
+ }), n = {};
+ return Object.defineProperties(n, {
+ focalDistance: {
+ get: function() {
+ return t.uniforms.focalDistance;
+ },
+ set: function(i) {
+ t.uniforms.focalDistance = i;
+ }
+ },
+ delta: {
+ get: function() {
+ return e.uniforms.delta;
+ },
+ set: function(i) {
+ e.uniforms.delta = i;
+ }
+ },
+ sigma: {
+ get: function() {
+ return e.uniforms.sigma;
+ },
+ set: function(i) {
+ e.uniforms.sigma = i;
+ }
+ },
+ stepSize: {
+ get: function() {
+ return e.uniforms.stepSize;
+ },
+ set: function(i) {
+ e.uniforms.stepSize = i;
+ }
+ }
+ }), new PostProcessStageComposite({
+ name: "czm_depth_of_field",
+ stages: [e, t],
+ inputPreviousStageTexture: !1,
+ uniforms: n
+ });
+};
+PostProcessStageLibrary.isDepthOfFieldSupported = function(e) {
+ return e.context.depthTexture;
+};
+PostProcessStageLibrary.createEdgeDetectionStage = function() {
+ const e = createGuid();
+ return new PostProcessStage({
+ name: `czm_edge_detection_${e}`,
+ fragmentShader: EdgeDetection,
+ uniforms: {
+ length: 0.25,
+ color: Color.clone(Color.BLACK)
+ }
+ });
+};
+PostProcessStageLibrary.isEdgeDetectionSupported = function(e) {
+ return e.context.depthTexture;
+};
+function getSilhouetteEdgeDetection(e) {
+ if (!defined(e))
+ return PostProcessStageLibrary.createEdgeDetectionStage();
+ const t = new PostProcessStageComposite({
+ name: "czm_edge_detection_multiple",
+ stages: e,
+ inputPreviousStageTexture: !1
+ }), n = {};
+ let i = "", r = "";
+ for (let c = 0; c < e.length; ++c)
+ i += `uniform sampler2D edgeTexture${c};
+`, r += ` vec4 edge${c} = texture(edgeTexture${c}, v_textureCoordinates);
+ if (edge${c}.a > 0.0)
+ {
+ color = edge${c};
+ break;
+ }
+`, n[`edgeTexture${c}`] = e[c].name;
+ const o = `${i}in vec2 v_textureCoordinates;
+void main() {
+ vec4 color = vec4(0.0);
+ for (int i = 0; i < ${e.length}; i++)
+ {
+${r} }
+ out_FragColor = color;
+}
+`, s = new PostProcessStage({
+ name: "czm_edge_detection_combine",
+ fragmentShader: o,
+ uniforms: n
+ });
+ return new PostProcessStageComposite({
+ name: "czm_edge_detection_composite",
+ stages: [t, s]
+ });
+}
+PostProcessStageLibrary.createSilhouetteStage = function(e) {
+ const t = getSilhouetteEdgeDetection(e), n = new PostProcessStage({
+ name: "czm_silhouette_color_edges",
+ fragmentShader: Silhouette,
+ uniforms: {
+ silhouetteTexture: t.name
+ }
+ });
+ return new PostProcessStageComposite({
+ name: "czm_silhouette",
+ stages: [t, n],
+ inputPreviousStageTexture: !1,
+ uniforms: t.uniforms
+ });
+};
+PostProcessStageLibrary.isSilhouetteSupported = function(e) {
+ return e.context.depthTexture;
+};
+PostProcessStageLibrary.createBloomStage = function() {
+ const e = new PostProcessStage({
+ name: "czm_bloom_contrast_bias",
+ fragmentShader: ContrastBias,
+ uniforms: {
+ contrast: 128,
+ brightness: -0.3
+ }
+ }), t = createBlur("czm_bloom_blur"), n = new PostProcessStageComposite({
+ name: "czm_bloom_contrast_bias_blur",
+ stages: [e, t]
+ }), i = new PostProcessStage({
+ name: "czm_bloom_generate_composite",
+ fragmentShader: BloomComposite,
+ uniforms: {
+ glowOnly: !1,
+ bloomTexture: n.name
+ }
+ }), r = {};
+ return Object.defineProperties(r, {
+ glowOnly: {
+ get: function() {
+ return i.uniforms.glowOnly;
+ },
+ set: function(o) {
+ i.uniforms.glowOnly = o;
+ }
+ },
+ contrast: {
+ get: function() {
+ return e.uniforms.contrast;
+ },
+ set: function(o) {
+ e.uniforms.contrast = o;
+ }
+ },
+ brightness: {
+ get: function() {
+ return e.uniforms.brightness;
+ },
+ set: function(o) {
+ e.uniforms.brightness = o;
+ }
+ },
+ delta: {
+ get: function() {
+ return t.uniforms.delta;
+ },
+ set: function(o) {
+ t.uniforms.delta = o;
+ }
+ },
+ sigma: {
+ get: function() {
+ return t.uniforms.sigma;
+ },
+ set: function(o) {
+ t.uniforms.sigma = o;
+ }
+ },
+ stepSize: {
+ get: function() {
+ return t.uniforms.stepSize;
+ },
+ set: function(o) {
+ t.uniforms.stepSize = o;
+ }
+ }
+ }), new PostProcessStageComposite({
+ name: "czm_bloom",
+ stages: [n, i],
+ inputPreviousStageTexture: !1,
+ uniforms: r
+ });
+};
+PostProcessStageLibrary.createAmbientOcclusionStage = function() {
+ const e = new PostProcessStage({
+ name: "czm_ambient_occlusion_generate",
+ fragmentShader: AmbientOcclusionGenerate,
+ uniforms: {
+ intensity: 3,
+ bias: 0.1,
+ lengthCap: 0.26,
+ stepSize: 1.95,
+ frustumLength: 1e3,
+ randomTexture: void 0
+ }
+ }), t = createBlur("czm_ambient_occlusion_blur");
+ t.uniforms.stepSize = 0.86;
+ const n = new PostProcessStageComposite({
+ name: "czm_ambient_occlusion_generate_blur",
+ stages: [e, t]
+ }), i = new PostProcessStage({
+ name: "czm_ambient_occlusion_composite",
+ fragmentShader: AmbientOcclusionModulate,
+ uniforms: {
+ ambientOcclusionOnly: !1,
+ ambientOcclusionTexture: n.name
+ }
+ }), r = {};
+ return Object.defineProperties(r, {
+ intensity: {
+ get: function() {
+ return e.uniforms.intensity;
+ },
+ set: function(o) {
+ e.uniforms.intensity = o;
+ }
+ },
+ bias: {
+ get: function() {
+ return e.uniforms.bias;
+ },
+ set: function(o) {
+ e.uniforms.bias = o;
+ }
+ },
+ lengthCap: {
+ get: function() {
+ return e.uniforms.lengthCap;
+ },
+ set: function(o) {
+ e.uniforms.lengthCap = o;
+ }
+ },
+ stepSize: {
+ get: function() {
+ return e.uniforms.stepSize;
+ },
+ set: function(o) {
+ e.uniforms.stepSize = o;
+ }
+ },
+ frustumLength: {
+ get: function() {
+ return e.uniforms.frustumLength;
+ },
+ set: function(o) {
+ e.uniforms.frustumLength = o;
+ }
+ },
+ randomTexture: {
+ get: function() {
+ return e.uniforms.randomTexture;
+ },
+ set: function(o) {
+ e.uniforms.randomTexture = o;
+ }
+ },
+ delta: {
+ get: function() {
+ return t.uniforms.delta;
+ },
+ set: function(o) {
+ t.uniforms.delta = o;
+ }
+ },
+ sigma: {
+ get: function() {
+ return t.uniforms.sigma;
+ },
+ set: function(o) {
+ t.uniforms.sigma = o;
+ }
+ },
+ blurStepSize: {
+ get: function() {
+ return t.uniforms.stepSize;
+ },
+ set: function(o) {
+ t.uniforms.stepSize = o;
+ }
+ },
+ ambientOcclusionOnly: {
+ get: function() {
+ return i.uniforms.ambientOcclusionOnly;
+ },
+ set: function(o) {
+ i.uniforms.ambientOcclusionOnly = o;
+ }
+ }
+ }), new PostProcessStageComposite({
+ name: "czm_ambient_occlusion",
+ stages: [n, i],
+ inputPreviousStageTexture: !1,
+ uniforms: r
+ });
+};
+PostProcessStageLibrary.isAmbientOcclusionSupported = function(e) {
+ return e.context.depthTexture;
+};
+const fxaaFS = `#define FXAA_QUALITY_PRESET 39
+${FXAA3_11}
+${FXAA}`;
+PostProcessStageLibrary.createFXAAStage = function() {
+ return new PostProcessStage({
+ name: "czm_FXAA",
+ fragmentShader: fxaaFS,
+ sampleMode: PostProcessStageSampleMode.LINEAR
+ });
+};
+PostProcessStageLibrary.createAcesTonemappingStage = function(e) {
+ let t = e ? `#define AUTO_EXPOSURE
+` : "";
+ return t += AcesTonemapping, new PostProcessStage({
+ name: "czm_aces",
+ fragmentShader: t,
+ uniforms: {
+ autoExposure: void 0,
+ exposure: 1
+ }
+ });
+};
+PostProcessStageLibrary.createFilmicTonemappingStage = function(e) {
+ let t = e ? `#define AUTO_EXPOSURE
+` : "";
+ return t += FilmicTonemapping, new PostProcessStage({
+ name: "czm_filmic",
+ fragmentShader: t,
+ uniforms: {
+ autoExposure: void 0,
+ exposure: 1
+ }
+ });
+};
+PostProcessStageLibrary.createPbrNeutralTonemappingStage = function(e) {
+ let t = e ? `#define AUTO_EXPOSURE
+` : "";
+ return t += PbrNeutralTonemapping, new PostProcessStage({
+ name: "czm_pbr_neutral",
+ fragmentShader: t,
+ uniforms: {
+ autoExposure: void 0,
+ exposure: 1
+ }
+ });
+};
+PostProcessStageLibrary.createReinhardTonemappingStage = function(e) {
+ let t = e ? `#define AUTO_EXPOSURE
+` : "";
+ return t += ReinhardTonemapping, new PostProcessStage({
+ name: "czm_reinhard",
+ fragmentShader: t,
+ uniforms: {
+ autoExposure: void 0,
+ exposure: 1
+ }
+ });
+};
+PostProcessStageLibrary.createModifiedReinhardTonemappingStage = function(e) {
+ let t = e ? `#define AUTO_EXPOSURE
+` : "";
+ return t += ModifiedReinhardTonemapping, new PostProcessStage({
+ name: "czm_modified_reinhard",
+ fragmentShader: t,
+ uniforms: {
+ white: Color.WHITE,
+ autoExposure: void 0,
+ exposure: 1
+ }
+ });
+};
+PostProcessStageLibrary.createAutoExposureStage = function() {
+ return new AutoExposure();
+};
+PostProcessStageLibrary.createBlackAndWhiteStage = function() {
+ return new PostProcessStage({
+ name: "czm_black_and_white",
+ fragmentShader: BlackAndWhite,
+ uniforms: {
+ gradations: 5
+ }
+ });
+};
+PostProcessStageLibrary.createBrightnessStage = function() {
+ return new PostProcessStage({
+ name: "czm_brightness",
+ fragmentShader: Brightness,
+ uniforms: {
+ brightness: 0.5
+ }
+ });
+};
+PostProcessStageLibrary.createNightVisionStage = function() {
+ return new PostProcessStage({
+ name: "czm_night_vision",
+ fragmentShader: NightVision
+ });
+};
+PostProcessStageLibrary.createDepthViewStage = function() {
+ return new PostProcessStage({
+ name: "czm_depth_view",
+ fragmentShader: DepthView
+ });
+};
+PostProcessStageLibrary.createLensFlareStage = function() {
+ return new PostProcessStage({
+ name: "czm_lens_flare",
+ fragmentShader: LensFlare,
+ uniforms: {
+ dirtTexture: buildModuleUrl("Assets/Textures/LensFlare/DirtMask.jpg"),
+ starTexture: buildModuleUrl("Assets/Textures/LensFlare/StarBurst.jpg"),
+ intensity: 2,
+ distortion: 10,
+ ghostDispersal: 0.4,
+ haloWidth: 0.4,
+ dirtAmount: 0.4,
+ earthRadius: Ellipsoid.WGS84.maximumRadius
+ }
+ });
+};
+function PostProcessStageTextureCache(e) {
+ this._collection = e, this._framebuffers = [], this._stageNameToFramebuffer = {}, this._width = void 0, this._height = void 0, this._updateDependencies = !1;
+}
+function getLastStageName(e) {
+ for (; defined(e.length); )
+ e = e.get(e.length - 1);
+ return e.name;
+}
+function getStageDependencies(e, t, n, i, r) {
+ if (!i.enabled || !i._isSupported(t))
+ return r;
+ const o = n[i.name] = {};
+ if (defined(r)) {
+ const c = e.getStageByName(r);
+ o[getLastStageName(c)] = !0;
+ }
+ const s = i.uniforms;
+ if (defined(s)) {
+ const c = Object.getOwnPropertyNames(s), l = c.length;
+ for (let d = 0; d < l; ++d) {
+ const f = s[c[d]];
+ if (typeof f == "string") {
+ const h = e.getStageByName(f);
+ defined(h) && (o[getLastStageName(h)] = !0);
+ }
+ }
+ }
+ return i.name;
+}
+function getCompositeDependencies(e, t, n, i, r) {
+ if (defined(i.enabled) && !i.enabled || defined(i._isSupported) && !i._isSupported(t))
+ return r;
+ const o = r, s = !defined(i.inputPreviousStageTexture) || i.inputPreviousStageTexture;
+ let c = r;
+ const l = i.length;
+ for (let h = 0; h < l; ++h) {
+ const p = i.get(h);
+ defined(p.length) ? c = getCompositeDependencies(
+ e,
+ t,
+ n,
+ p,
+ r
+ ) : c = getStageDependencies(
+ e,
+ t,
+ n,
+ p,
+ r
+ ), s && (r = c);
+ }
+ let d, f;
+ if (s)
+ for (d = 1; d < l; ++d)
+ f = getLastStageName(i.get(d)), defined(n[f]) || (n[f] = {}), n[f][o] = !0;
+ else
+ for (d = 1; d < l; ++d) {
+ f = getLastStageName(i.get(d));
+ const h = n[f];
+ for (let p = 0; p < d; ++p)
+ h[getLastStageName(i.get(p))] = !0;
+ }
+ return c;
+}
+function getDependencies(e, t) {
+ const n = {};
+ if (defined(e.ambientOcclusion)) {
+ const i = e.ambientOcclusion, r = e.bloom, o = e._tonemapping, s = e.fxaa;
+ let c = getCompositeDependencies(
+ e,
+ t,
+ n,
+ i,
+ void 0
+ );
+ c = getCompositeDependencies(
+ e,
+ t,
+ n,
+ r,
+ c
+ ), c = getStageDependencies(
+ e,
+ t,
+ n,
+ o,
+ c
+ ), c = getCompositeDependencies(
+ e,
+ t,
+ n,
+ e,
+ c
+ ), getStageDependencies(e, t, n, s, c);
+ } else
+ getCompositeDependencies(
+ e,
+ t,
+ n,
+ e,
+ void 0
+ );
+ return n;
+}
+function getFramebuffer(e, t, n) {
+ const r = e._collection.getStageByName(t), o = r._textureScale, s = r._forcePowerOfTwo, c = r._pixelFormat, l = r._pixelDatatype, d = r._clearColor;
+ let f, h;
+ const p = e._framebuffers, m = p.length;
+ for (f = 0; f < m; ++f) {
+ if (h = p[f], o !== h.textureScale || s !== h.forcePowerOfTwo || c !== h.pixelFormat || l !== h.pixelDatatype || !Color.equals(d, h.clearColor))
+ continue;
+ const _ = h.stages, y = _.length;
+ let C = !1;
+ for (let T = 0; T < y; ++T)
+ if (n[_[T]]) {
+ C = !0;
+ break;
+ }
+ if (!C)
+ break;
+ }
+ return defined(h) && f < m ? (h.stages.push(t), h) : (h = {
+ textureScale: o,
+ forcePowerOfTwo: s,
+ pixelFormat: c,
+ pixelDatatype: l,
+ clearColor: d,
+ stages: [t],
+ buffer: new FramebufferManager({
+ pixelFormat: c,
+ pixelDatatype: l
+ }),
+ clear: void 0
+ }, p.push(h), h);
+}
+function createFramebuffers(e, t) {
+ const n = getDependencies(e._collection, t);
+ for (const i in n)
+ n.hasOwnProperty(i) && (e._stageNameToFramebuffer[i] = getFramebuffer(
+ e,
+ i,
+ n[i]
+ ));
+}
+function releaseResources(e) {
+ const t = e._framebuffers, n = t.length;
+ for (let i = 0; i < n; ++i)
+ t[i].buffer.destroy();
+}
+function updateFramebuffers(e, t) {
+ const n = e._width, i = e._height, r = e._framebuffers, o = r.length;
+ for (let s = 0; s < o; ++s) {
+ const c = r[s], l = c.textureScale;
+ let d = Math.ceil(n * l), f = Math.ceil(i * l), h = Math.min(d, f);
+ c.forcePowerOfTwo && (CesiumMath.isPowerOfTwo(h) || (h = CesiumMath.nextPowerOfTwo(h)), d = h, f = h), c.buffer.update(t, d, f), c.clear = new ClearCommand({
+ color: c.clearColor,
+ framebuffer: c.buffer.framebuffer
+ });
+ }
+}
+PostProcessStageTextureCache.prototype.updateDependencies = function() {
+ this._updateDependencies = !0;
+};
+PostProcessStageTextureCache.prototype.update = function(e) {
+ const t = this._collection, n = this._updateDependencies, i = defined(t.ambientOcclusion) && t.ambientOcclusion.enabled && t.ambientOcclusion._isSupported(e), r = defined(t.bloom) && t.bloom.enabled && t.bloom._isSupported(e), o = defined(t._tonemapping) && t._tonemapping.enabled && t._tonemapping._isSupported(e), s = defined(t.fxaa) && t.fxaa.enabled && t.fxaa._isSupported(e), c = !defined(t._activeStages) || t._activeStages.length > 0 || i || r || o || s;
+ if ((n || !c && this._framebuffers.length > 0) && (releaseResources(this), this._framebuffers.length = 0, this._stageNameToFramebuffer = {}, this._width = void 0, this._height = void 0), !n && !c)
+ return;
+ this._framebuffers.length === 0 && createFramebuffers(this, e);
+ const l = e.drawingBufferWidth, d = e.drawingBufferHeight, f = this._width !== l || this._height !== d;
+ !n && !f || (this._width = l, this._height = d, this._updateDependencies = !1, releaseResources(this), updateFramebuffers(this, e));
+};
+PostProcessStageTextureCache.prototype.clear = function(e) {
+ const t = this._framebuffers;
+ for (let n = 0; n < t.length; ++n)
+ t[n].clear.execute(e);
+};
+PostProcessStageTextureCache.prototype.getStageByName = function(e) {
+ return this._collection.getStageByName(e);
+};
+PostProcessStageTextureCache.prototype.getOutputTexture = function(e) {
+ return this._collection.getOutputTexture(e);
+};
+PostProcessStageTextureCache.prototype.getFramebuffer = function(e) {
+ const t = this._stageNameToFramebuffer[e];
+ if (defined(t))
+ return t.buffer.framebuffer;
+};
+PostProcessStageTextureCache.prototype.isDestroyed = function() {
+ return !1;
+};
+PostProcessStageTextureCache.prototype.destroy = function() {
+ return releaseResources(this), destroyObject(this);
+};
+const Tonemapper = {
+ /**
+ * Use the Reinhard tonemapping.
+ *
+ * @type {string}
+ * @constant
+ */
+ REINHARD: "REINHARD",
+ /**
+ * Use the modified Reinhard tonemapping.
+ *
+ * @type {string}
+ * @constant
+ */
+ MODIFIED_REINHARD: "MODIFIED_REINHARD",
+ /**
+ * Use the Filmic tonemapping.
+ *
+ * @type {string}
+ * @constant
+ */
+ FILMIC: "FILMIC",
+ /**
+ * Use the ACES tonemapping.
+ *
+ * @type {string}
+ * @constant
+ */
+ ACES: "ACES",
+ /**
+ * Use the PBR Neutral tonemapping {@link https://github.com/KhronosGroup/ToneMapping/tree/main/PBR_Neutral|from Khronos}.
+ *
+ * @type {string}
+ * @constant
+ */
+ PBR_NEUTRAL: "PBR_NEUTRAL"
+}, Tonemapper$1 = Object.freeze(Tonemapper), stackScratch = [];
+function PostProcessStageCollection() {
+ const e = PostProcessStageLibrary.createFXAAStage(), t = PostProcessStageLibrary.createAmbientOcclusionStage(), n = PostProcessStageLibrary.createBloomStage();
+ this._autoExposureEnabled = !1, this._autoExposure = PostProcessStageLibrary.createAutoExposureStage(), this._exposure = 1, this._tonemapping = void 0, this._tonemapper = void 0, this.tonemapper = Tonemapper$1.PBR_NEUTRAL;
+ const i = this._tonemapping;
+ e.enabled = !1, t.enabled = !1, n.enabled = !1, i.enabled = !1;
+ const r = new PostProcessStageTextureCache(this), o = {}, s = stackScratch;
+ for (s.push(e, t, n, i); s.length > 0; ) {
+ const l = s.pop();
+ o[l.name] = l, l._textureCache = r;
+ const d = l.length;
+ if (defined(d))
+ for (let f = 0; f < d; ++f)
+ s.push(l.get(f));
+ }
+ this._stages = [], this._activeStages = [], this._previousActiveStages = [], this._randomTexture = void 0;
+ const c = this;
+ t.uniforms.randomTexture = function() {
+ return c._randomTexture;
+ }, this._ao = t, this._bloom = n, this._fxaa = e, this._aoEnabled = void 0, this._bloomEnabled = void 0, this._tonemappingEnabled = void 0, this._fxaaEnabled = void 0, this._activeStagesChanged = !1, this._stagesRemoved = !1, this._textureCacheDirty = !1, this._stageNames = o, this._textureCache = r;
+}
+Object.defineProperties(PostProcessStageCollection.prototype, {
+ /**
+ * Determines if all of the post-process stages in the collection are ready to be executed.
+ *
+ * @memberof PostProcessStageCollection.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ ready: {
+ get: function() {
+ let e = !1;
+ const t = this._stages, n = t.length;
+ for (let c = n - 1; c >= 0; --c) {
+ const l = t[c];
+ e = e || l.ready && l.enabled;
+ }
+ const i = this._fxaa, r = this._ao, o = this._bloom, s = this._tonemapping;
+ return e = e || i.ready && i.enabled, e = e || r.ready && r.enabled, e = e || o.ready && o.enabled, e = e || s.ready && s.enabled, e;
+ }
+ },
+ /**
+ * A post-process stage for Fast Approximate Anti-aliasing.
+ * + * When enabled, this stage will execute after all others. + *
+ * + * @memberof PostProcessStageCollection.prototype + * @type {PostProcessStage} + * @readonly + */ + fxaa: { + get: function() { + return this._fxaa; + } + }, + /** + * A post-process stage that applies Horizon-based Ambient Occlusion (HBAO) to the input texture. + *+ * Ambient occlusion simulates shadows from ambient light. These shadows would always be present when the + * surface receives light and regardless of the light's position. + *
+ *
+ * The uniforms have the following properties: intensity, bias, lengthCap,
+ * stepSize, frustumLength, ambientOcclusionOnly,
+ * delta, sigma, and blurStepSize.
+ *
intensity is a scalar value used to lighten or darken the shadows exponentially. Higher values make the shadows darker. The default value is 3.0.bias is a scalar value representing an angle in radians. If the dot product between the normal of the sample and the vector to the camera is less than this value,
+ * sampling stops in the current direction. This is used to remove shadows from near planar edges. The default value is 0.1.lengthCap is a scalar value representing a length in meters. If the distance from the current sample to first sample is greater than this value,
+ * sampling stops in the current direction. The default value is 0.26.stepSize is a scalar value indicating the distance to the next texel sample in the current direction. The default value is 1.95.frustumLength is a scalar value in meters. If the current fragment has a distance from the camera greater than this value, ambient occlusion is not computed for the fragment.
+ * The default value is 1000.0.ambientOcclusionOnly is a boolean value. When true, only the shadows generated are written to the output. When false, the input texture is modulated
+ * with the ambient occlusion. This is a useful debug option for seeing the effects of changing the uniform values. The default value is false.
+ * delta, sigma, and blurStepSize are the same properties as {@link PostProcessStageLibrary#createBlurStage}.
+ * The blur is applied to the shadows generated from the image to make them smoother.
+ *
+ * When enabled, this stage will execute before all others. + *
+ * + * @memberof PostProcessStageCollection.prototype + * @type {PostProcessStageComposite} + * @readonly + */ + ambientOcclusion: { + get: function() { + return this._ao; + } + }, + /** + * A post-process stage for a bloom effect. + *+ * A bloom effect adds glow effect, makes bright areas brighter, and dark areas darker. + *
+ *
+ * This stage has the following uniforms: contrast, brightness, glowOnly,
+ * delta, sigma, and stepSize.
+ *
contrast is a scalar value in the range [-255.0, 255.0] and affects the contract of the effect. The default value is 128.0.brightness is a scalar value. The input texture RGB value is converted to hue, saturation, and brightness (HSB) then this value is
+ * added to the brightness. The default value is -0.3.glowOnly is a boolean value. When true, only the glow effect will be shown. When false, the glow will be added to the input texture.
+ * The default value is false. This is a debug option for viewing the effects when changing the other uniform values.
+ * delta, sigma, and stepSize are the same properties as {@link PostProcessStageLibrary#createBlurStage}.
+ * The blur is applied to the shadows generated from the image to make them smoother.
+ *
+ * When enabled, this stage will execute before all others. + *
+ * + * @memberOf PostProcessStageCollection.prototype + * @type {PostProcessStageComposite} + * @readonly + */ + bloom: { + get: function() { + return this._bloom; + } + }, + /** + * The number of post-process stages in this collection. + * + * @memberof PostProcessStageCollection.prototype + * @type {number} + * @readonly + */ + length: { + get: function() { + return removeStages(this), this._stages.length; + } + }, + /** + * A reference to the last texture written to when executing the post-process stages in this collection. + * + * @memberof PostProcessStageCollection.prototype + * @type {Texture} + * @readonly + * @private + */ + outputTexture: { + get: function() { + const e = this._fxaa; + if (e.enabled && e.ready) + return this.getOutputTexture(e.name); + const t = this._stages, n = t.length; + for (let s = n - 1; s >= 0; --s) { + const c = t[s]; + if (defined(c) && c.ready && c.enabled) + return this.getOutputTexture(c.name); + } + const i = this._tonemapping; + if (i.enabled && i.ready) + return this.getOutputTexture(i.name); + const r = this._bloom; + if (r.enabled && r.ready) + return this.getOutputTexture(r.name); + const o = this._ao; + if (o.enabled && o.ready) + return this.getOutputTexture(o.name); + } + }, + /** + * Whether the collection has a stage that has selected features. + * + * @memberof PostProcessStageCollection.prototype + * @type {boolean} + * @readonly + * @private + */ + hasSelected: { + get: function() { + const e = this._stages.slice(); + for (; e.length > 0; ) { + const t = e.pop(); + if (!defined(t)) + continue; + if (defined(t.selected)) + return !0; + const n = t.length; + if (defined(n)) + for (let i = 0; i < n; ++i) + e.push(t.get(i)); + } + return !1; + } + }, + /** + * Specifies the tonemapping algorithm used when rendering with high dynamic range. + * {@link https://sandcastle.cesium.com/?src=High%20Dynamic%20Range.html|Sandcastle Demo} + * + * @example viewer.scene.postProcessStages.tonemapper = Cesium.Tonemapper.ACES; + * + * @default Tonemapper.PBR_NEUTRAL + * @memberof PostProcessStageCollection.prototype + * @type {Tonemapper} + */ + tonemapper: { + get: function() { + return this._tonemapper; + }, + set: function(e) { + if (this._tonemapper === e) + return; + defined(this._tonemapping) && (delete this._stageNames[this._tonemapping.name], this._tonemapping.destroy()); + const t = this._autoExposureEnabled; + let n; + switch (e) { + case Tonemapper$1.REINHARD: + n = PostProcessStageLibrary.createReinhardTonemappingStage( + t + ); + break; + case Tonemapper$1.MODIFIED_REINHARD: + n = PostProcessStageLibrary.createModifiedReinhardTonemappingStage( + t + ); + break; + case Tonemapper$1.FILMIC: + n = PostProcessStageLibrary.createFilmicTonemappingStage( + t + ); + break; + case Tonemapper$1.PBR_NEUTRAL: + n = PostProcessStageLibrary.createPbrNeutralTonemappingStage( + t + ); + break; + default: + n = PostProcessStageLibrary.createAcesTonemappingStage( + t + ); + break; + } + if (t) { + const i = this._autoExposure; + n.uniforms.autoExposure = function() { + return i.outputTexture; + }; + } else + n.uniforms.exposure = this._exposure; + this._tonemapper = e, this._tonemapping = n, defined(this._stageNames) && (this._stageNames[n.name] = n, n._textureCache = this._textureCache), this._textureCacheDirty = !0; + } + }, + /** + * Control the exposure when HDR is on. Less than 1.0 makes the tonemapping darker while greater than 1.0 makes it brighter. + * + * @example viewer.scene.postProcessStages.exposure = 1.0; + * + * @default 1.0 + * @memberof PostProcessStageCollection.prototype + * @type {number} + */ + exposure: { + get: function() { + return this._exposure; + }, + set: function(e) { + this._tonemapping.uniforms.exposure = e, this._exposure = e; + } + } +}); +function removeStages(e) { + if (!e._stagesRemoved) + return; + e._stagesRemoved = !1; + const t = [], n = e._stages, i = n.length; + for (let r = 0, o = 0; r < i; ++r) { + const s = n[r]; + s && (s._index = o++, t.push(s)); + } + e._stages = t; +} +PostProcessStageCollection.prototype.add = function(e) { + const t = this._stageNames, n = stackScratch; + for (n.push(e); n.length > 0; ) { + const r = n.pop(); + t[r.name] = r, r._textureCache = this._textureCache; + const o = r.length; + if (defined(o)) + for (let s = 0; s < o; ++s) + n.push(r.get(s)); + } + const i = this._stages; + return e._index = i.length, i.push(e), this._textureCacheDirty = !0, e; +}; +PostProcessStageCollection.prototype.remove = function(e) { + if (!this.contains(e)) + return !1; + const t = this._stageNames, n = stackScratch; + for (n.push(e); n.length > 0; ) { + const i = n.pop(); + delete t[i.name]; + const r = i.length; + if (defined(r)) + for (let o = 0; o < r; ++o) + n.push(i.get(o)); + } + return this._stages[e._index] = void 0, this._stagesRemoved = !0, this._textureCacheDirty = !0, e._index = void 0, e._textureCache = void 0, e.destroy(), !0; +}; +PostProcessStageCollection.prototype.contains = function(e) { + return defined(e) && defined(e._index) && e._textureCache === this._textureCache; +}; +PostProcessStageCollection.prototype.get = function(e) { + return removeStages(this), this._stages[e]; +}; +PostProcessStageCollection.prototype.removeAll = function() { + const e = this._stages, t = e.length; + for (let n = 0; n < t; ++n) + this.remove(e[n]); + e.length = 0; +}; +PostProcessStageCollection.prototype.getStageByName = function(e) { + return this._stageNames[e]; +}; +PostProcessStageCollection.prototype.update = function(e, t, n) { + removeStages(this); + const i = this._activeStages, r = this._activeStages = this._previousActiveStages; + this._previousActiveStages = i; + const o = this._stages; + let s = r.length = o.length, c, l, d = 0; + for (c = 0; c < s; ++c) + l = o[c], l.ready && l.enabled && l._isSupported(e) && (r[d++] = l); + r.length = d; + let f = d !== i.length; + if (!f) { + for (c = 0; c < d; ++c) + if (r[c] !== i[c]) { + f = !0; + break; + } + } + const h = this._ao, p = this._bloom, m = this._autoExposure, _ = this._tonemapping, y = this._fxaa; + _.enabled = n; + const C = h.enabled && h._isSupported(e), T = p.enabled && p._isSupported(e), x = _.enabled && _._isSupported(e), b = y.enabled && y._isSupported(e); + if ((f || this._textureCacheDirty || C !== this._aoEnabled || T !== this._bloomEnabled || x !== this._tonemappingEnabled || b !== this._fxaaEnabled) && (this._textureCache.updateDependencies(), this._aoEnabled = C, this._bloomEnabled = T, this._tonemappingEnabled = x, this._fxaaEnabled = b, this._textureCacheDirty = !1), defined(this._randomTexture) && !C && (this._randomTexture.destroy(), this._randomTexture = void 0), !defined(this._randomTexture) && C) { + s = 256 * 256 * 3; + const S = new Uint8Array(s); + for (c = 0; c < s; c += 3) + S[c] = Math.floor(Math.random() * 255); + this._randomTexture = new Texture({ + context: e, + pixelFormat: PixelFormat$1.RGB, + pixelDatatype: PixelDatatype$1.UNSIGNED_BYTE, + source: { + arrayBufferView: S, + width: 256, + height: 256 + }, + sampler: new Sampler({ + wrapS: TextureWrap$1.REPEAT, + wrapT: TextureWrap$1.REPEAT, + minificationFilter: TextureMinificationFilter$1.NEAREST, + magnificationFilter: TextureMagnificationFilter$1.NEAREST + }) + }); + } + for (this._textureCache.update(e), y.update(e, t), h.update(e, t), p.update(e, t), _.update(e, t), this._autoExposureEnabled && m.update(e, t), s = o.length, c = 0; c < s; ++c) + o[c].update(e, t); + for (d = 0, c = 0; c < s; ++c) + l = o[c], l.ready && l.enabled && l._isSupported(e) && d++; + f = d !== r.length, f && this.update(e, t, n); +}; +PostProcessStageCollection.prototype.clear = function(e) { + this._textureCache.clear(e), this._autoExposureEnabled && this._autoExposure.clear(e); +}; +function getOutputTexture(e) { + for (; defined(e.length); ) + e = e.get(e.length - 1); + return e.outputTexture; +} +PostProcessStageCollection.prototype.getOutputTexture = function(e) { + const t = this.getStageByName(e); + if (defined(t)) + return getOutputTexture(t); +}; +function execute(e, t, n, i, r) { + if (defined(e.execute)) { + e.execute(t, n, i, r); + return; + } + const o = e.length; + let s; + if (e.inputPreviousStageTexture) + for (execute(e.get(0), t, n, i, r), s = 1; s < o; ++s) + execute( + e.get(s), + t, + getOutputTexture(e.get(s - 1)), + i, + r + ); + else + for (s = 0; s < o; ++s) + execute(e.get(s), t, n, i, r); +} +PostProcessStageCollection.prototype.execute = function(e, t, n, i) { + const r = this._activeStages, o = r.length, s = this._fxaa, c = this._ao, l = this._bloom, d = this._autoExposure, f = this._tonemapping, h = c.enabled && c._isSupported(e), p = l.enabled && l._isSupported(e), m = this._autoExposureEnabled, _ = f.enabled && f._isSupported(e), y = s.enabled && s._isSupported(e); + if (!y && !h && !p && !_ && o === 0) + return; + let C = t; + h && c.ready && (execute(c, e, C, n, i), C = getOutputTexture(c)), p && l.ready && (execute(l, e, C, n, i), C = getOutputTexture(l)), m && d.ready && execute(d, e, C, n, i), _ && f.ready && (execute(f, e, C, n, i), C = getOutputTexture(f)); + let T = C; + if (o > 0) { + execute(r[0], e, C, n, i); + for (let x = 1; x < o; ++x) + execute( + r[x], + e, + getOutputTexture(r[x - 1]), + n, + i + ); + T = getOutputTexture(r[o - 1]); + } + y && s.ready && execute(s, e, T, n, i); +}; +PostProcessStageCollection.prototype.copy = function(e, t) { + if (!defined(this._copyColorCommand)) { + const n = this; + this._copyColorCommand = e.createViewportQuadCommand(PassThrough, { + uniformMap: { + colorTexture: function() { + return n.outputTexture; + } + }, + owner: this + }); + } + this._copyColorCommand.framebuffer = t, this._copyColorCommand.execute(e); +}; +PostProcessStageCollection.prototype.isDestroyed = function() { + return !1; +}; +PostProcessStageCollection.prototype.destroy = function() { + return this._fxaa.destroy(), this._ao.destroy(), this._bloom.destroy(), this._autoExposure.destroy(), this._tonemapping.destroy(), this.removeAll(), this._textureCache = this._textureCache && this._textureCache.destroy(), destroyObject(this); +}; +const KeyboardEventModifier = { + /** + * Represents the shift key being held down. + * + * @type {number} + * @constant + */ + SHIFT: 0, + /** + * Represents the control key being held down. + * + * @type {number} + * @constant + */ + CTRL: 1, + /** + * Represents the alt key being held down. + * + * @type {number} + * @constant + */ + ALT: 2 +}, KeyboardEventModifier$1 = Object.freeze(KeyboardEventModifier), ScreenSpaceEventType = { + /** + * Represents a mouse left button down event. + * + * @type {number} + * @constant + */ + LEFT_DOWN: 0, + /** + * Represents a mouse left button up event. + * + * @type {number} + * @constant + */ + LEFT_UP: 1, + /** + * Represents a mouse left click event. + * + * @type {number} + * @constant + */ + LEFT_CLICK: 2, + /** + * Represents a mouse left double click event. + * + * @type {number} + * @constant + */ + LEFT_DOUBLE_CLICK: 3, + /** + * Represents a mouse left button down event. + * + * @type {number} + * @constant + */ + RIGHT_DOWN: 5, + /** + * Represents a mouse right button up event. + * + * @type {number} + * @constant + */ + RIGHT_UP: 6, + /** + * Represents a mouse right click event. + * + * @type {number} + * @constant + */ + RIGHT_CLICK: 7, + /** + * Represents a mouse middle button down event. + * + * @type {number} + * @constant + */ + MIDDLE_DOWN: 10, + /** + * Represents a mouse middle button up event. + * + * @type {number} + * @constant + */ + MIDDLE_UP: 11, + /** + * Represents a mouse middle click event. + * + * @type {number} + * @constant + */ + MIDDLE_CLICK: 12, + /** + * Represents a mouse move event. + * + * @type {number} + * @constant + */ + MOUSE_MOVE: 15, + /** + * Represents a mouse wheel event. + * + * @type {number} + * @constant + */ + WHEEL: 16, + /** + * Represents the start of a two-finger event on a touch surface. + * + * @type {number} + * @constant + */ + PINCH_START: 17, + /** + * Represents the end of a two-finger event on a touch surface. + * + * @type {number} + * @constant + */ + PINCH_END: 18, + /** + * Represents a change of a two-finger event on a touch surface. + * + * @type {number} + * @constant + */ + PINCH_MOVE: 19 +}, ScreenSpaceEventType$1 = Object.freeze(ScreenSpaceEventType); +function getPosition(e, t, n) { + const i = e._element; + if (i === document) + return n.x = t.clientX, n.y = t.clientY, n; + const r = i.getBoundingClientRect(); + return n.x = t.clientX - r.left, n.y = t.clientY - r.top, n; +} +function getInputEventKey(e, t) { + let n = e; + return defined(t) && (n += `+${t}`), n; +} +function getModifier(e) { + if (e.shiftKey) + return KeyboardEventModifier$1.SHIFT; + if (e.ctrlKey) + return KeyboardEventModifier$1.CTRL; + if (e.altKey) + return KeyboardEventModifier$1.ALT; +} +const MouseButton = { + LEFT: 0, + MIDDLE: 1, + RIGHT: 2 +}; +function registerListener(e, t, n, i) { + function r(o) { + i(e, o); + } + FeatureDetection.isInternetExplorer() ? n.addEventListener(t, r, !1) : n.addEventListener(t, r, { + capture: !1, + passive: !1 + }), e._removalFunctions.push(function() { + n.removeEventListener(t, r, !1); + }); +} +function registerListeners(e) { + const t = e._element, n = defined(t.disableRootEvents) ? t : document; + FeatureDetection.supportsPointerEvents() ? (registerListener( + e, + "pointerdown", + t, + handlePointerDown + ), registerListener( + e, + "pointerup", + t, + handlePointerUp + ), registerListener( + e, + "pointermove", + t, + handlePointerMove + ), registerListener( + e, + "pointercancel", + t, + handlePointerUp + )) : (registerListener( + e, + "mousedown", + t, + handleMouseDown + ), registerListener( + e, + "mouseup", + n, + handleMouseUp + ), registerListener( + e, + "mousemove", + n, + handleMouseMove + ), registerListener( + e, + "touchstart", + t, + handleTouchStart + ), registerListener( + e, + "touchend", + n, + handleTouchEnd + ), registerListener( + e, + "touchmove", + n, + handleTouchMove + ), registerListener( + e, + "touchcancel", + n, + handleTouchEnd + )), registerListener( + e, + "dblclick", + t, + handleDblClick + ); + let i; + "onwheel" in t ? i = "wheel" : document.onmousewheel !== void 0 ? i = "mousewheel" : i = "DOMMouseScroll", registerListener(e, i, t, handleWheel); +} +function unregisterListeners(e) { + const t = e._removalFunctions; + for (let n = 0; n < t.length; ++n) + t[n](); +} +const mouseDownEvent = { + position: new Cartesian2() +}; +function gotTouchEvent(e) { + e._lastSeenTouchEvent = getTimestamp$1(); +} +function canProcessMouseEvent(e) { + return getTimestamp$1() - e._lastSeenTouchEvent > ScreenSpaceEventHandler.mouseEmulationIgnoreMilliseconds; +} +function checkPixelTolerance(e, t, n) { + const i = e.x - t.x, r = e.y - t.y; + return Math.sqrt(i * i + r * r) < n; +} +function handleMouseDown(e, t) { + if (!canProcessMouseEvent(e)) + return; + const n = t.button; + e._buttonDown[n] = !0; + let i; + if (n === MouseButton.LEFT) + i = ScreenSpaceEventType$1.LEFT_DOWN; + else if (n === MouseButton.MIDDLE) + i = ScreenSpaceEventType$1.MIDDLE_DOWN; + else if (n === MouseButton.RIGHT) + i = ScreenSpaceEventType$1.RIGHT_DOWN; + else + return; + const r = getPosition( + e, + t, + e._primaryPosition + ); + Cartesian2.clone(r, e._primaryStartPosition), Cartesian2.clone(r, e._primaryPreviousPosition); + const o = getModifier(t), s = e.getInputAction( + i, + o + ); + defined(s) && (Cartesian2.clone(r, mouseDownEvent.position), s(mouseDownEvent), t.preventDefault()); +} +const mouseUpEvent = { + position: new Cartesian2() +}, mouseClickEvent = { + position: new Cartesian2() +}; +function cancelMouseEvent(e, t, n, i) { + const r = getModifier(i), o = e.getInputAction( + t, + r + ), s = e.getInputAction( + n, + r + ); + if (defined(o) || defined(s)) { + const c = getPosition( + e, + i, + e._primaryPosition + ); + if (defined(o) && (Cartesian2.clone(c, mouseUpEvent.position), o(mouseUpEvent)), defined(s)) { + const l = e._primaryStartPosition; + checkPixelTolerance( + l, + c, + e._clickPixelTolerance + ) && (Cartesian2.clone(c, mouseClickEvent.position), s(mouseClickEvent)); + } + } +} +function handleMouseUp(e, t) { + if (!canProcessMouseEvent(e)) + return; + const n = t.button; + n !== MouseButton.LEFT && n !== MouseButton.MIDDLE && n !== MouseButton.RIGHT || (e._buttonDown[MouseButton.LEFT] && (cancelMouseEvent( + e, + ScreenSpaceEventType$1.LEFT_UP, + ScreenSpaceEventType$1.LEFT_CLICK, + t + ), e._buttonDown[MouseButton.LEFT] = !1), e._buttonDown[MouseButton.MIDDLE] && (cancelMouseEvent( + e, + ScreenSpaceEventType$1.MIDDLE_UP, + ScreenSpaceEventType$1.MIDDLE_CLICK, + t + ), e._buttonDown[MouseButton.MIDDLE] = !1), e._buttonDown[MouseButton.RIGHT] && (cancelMouseEvent( + e, + ScreenSpaceEventType$1.RIGHT_UP, + ScreenSpaceEventType$1.RIGHT_CLICK, + t + ), e._buttonDown[MouseButton.RIGHT] = !1)); +} +const mouseMoveEvent = { + startPosition: new Cartesian2(), + endPosition: new Cartesian2() +}; +function handleMouseMove(e, t) { + if (!canProcessMouseEvent(e)) + return; + const n = getModifier(t), i = getPosition( + e, + t, + e._primaryPosition + ), r = e._primaryPreviousPosition, o = e.getInputAction( + ScreenSpaceEventType$1.MOUSE_MOVE, + n + ); + defined(o) && (Cartesian2.clone(r, mouseMoveEvent.startPosition), Cartesian2.clone(i, mouseMoveEvent.endPosition), o(mouseMoveEvent)), Cartesian2.clone(i, r), (e._buttonDown[MouseButton.LEFT] || e._buttonDown[MouseButton.MIDDLE] || e._buttonDown[MouseButton.RIGHT]) && t.preventDefault(); +} +const mouseDblClickEvent = { + position: new Cartesian2() +}; +function handleDblClick(e, t) { + const n = t.button; + let i; + if (n === MouseButton.LEFT) + i = ScreenSpaceEventType$1.LEFT_DOUBLE_CLICK; + else + return; + const r = getModifier(t), o = e.getInputAction( + i, + r + ); + defined(o) && (getPosition(e, t, mouseDblClickEvent.position), o(mouseDblClickEvent)); +} +function handleWheel(e, t) { + let n; + if (defined(t.deltaY)) { + const o = t.deltaMode; + o === t.DOM_DELTA_PIXEL ? n = -t.deltaY : o === t.DOM_DELTA_LINE ? n = -t.deltaY * 40 : n = -t.deltaY * 120; + } else t.detail > 0 ? n = t.detail * -120 : n = t.wheelDelta; + if (!defined(n)) + return; + const i = getModifier(t), r = e.getInputAction( + ScreenSpaceEventType$1.WHEEL, + i + ); + defined(r) && (r(n), t.preventDefault()); +} +function handleTouchStart(e, t) { + gotTouchEvent(e); + const n = t.changedTouches; + let i; + const r = n.length; + let o, s; + const c = e._positions; + for (i = 0; i < r; ++i) + o = n[i], s = o.identifier, c.set( + s, + getPosition(e, o, new Cartesian2()) + ); + fireTouchEvents(e, t); + const l = e._previousPositions; + for (i = 0; i < r; ++i) + o = n[i], s = o.identifier, l.set( + s, + Cartesian2.clone(c.get(s)) + ); +} +function handleTouchEnd(e, t) { + gotTouchEvent(e); + const n = t.changedTouches; + let i; + const r = n.length; + let o, s; + const c = e._positions; + for (i = 0; i < r; ++i) + o = n[i], s = o.identifier, c.remove(s); + fireTouchEvents(e, t); + const l = e._previousPositions; + for (i = 0; i < r; ++i) + o = n[i], s = o.identifier, l.remove(s); +} +const touchStartEvent = { + position: new Cartesian2() +}, touch2StartEvent = { + position1: new Cartesian2(), + position2: new Cartesian2() +}, touchEndEvent = { + position: new Cartesian2() +}, touchClickEvent = { + position: new Cartesian2() +}, touchHoldEvent = { + position: new Cartesian2() +}; +function fireTouchEvents(e, t) { + const n = getModifier(t), i = e._positions, r = i.length; + let o, s; + const c = e._isPinching; + if (r !== 1 && e._buttonDown[MouseButton.LEFT]) { + if (e._buttonDown[MouseButton.LEFT] = !1, defined(e._touchHoldTimer) && (clearTimeout(e._touchHoldTimer), e._touchHoldTimer = void 0), o = e.getInputAction( + ScreenSpaceEventType$1.LEFT_UP, + n + ), defined(o) && (Cartesian2.clone( + e._primaryPosition, + touchEndEvent.position + ), o(touchEndEvent)), r === 0 && !e._isTouchHolding && (s = e.getInputAction( + ScreenSpaceEventType$1.LEFT_CLICK, + n + ), defined(s))) { + const l = e._primaryStartPosition, d = e._previousPositions.values[0]; + checkPixelTolerance( + l, + d, + e._clickPixelTolerance + ) && (Cartesian2.clone( + e._primaryPosition, + touchClickEvent.position + ), s(touchClickEvent)); + } + e._isTouchHolding = !1; + } + if (r === 0 && c && (e._isPinching = !1, o = e.getInputAction( + ScreenSpaceEventType$1.PINCH_END, + n + ), defined(o) && o()), r === 1 && !c) { + const l = i.values[0]; + Cartesian2.clone(l, e._primaryPosition), Cartesian2.clone(l, e._primaryStartPosition), Cartesian2.clone( + l, + e._primaryPreviousPosition + ), e._buttonDown[MouseButton.LEFT] = !0, o = e.getInputAction( + ScreenSpaceEventType$1.LEFT_DOWN, + n + ), defined(o) && (Cartesian2.clone(l, touchStartEvent.position), o(touchStartEvent)), e._touchHoldTimer = setTimeout(function() { + if (!e.isDestroyed() && (e._touchHoldTimer = void 0, e._isTouchHolding = !0, s = e.getInputAction( + ScreenSpaceEventType$1.RIGHT_CLICK, + n + ), defined(s))) { + const d = e._primaryStartPosition, f = e._previousPositions.values[0]; + checkPixelTolerance( + d, + f, + e._holdPixelTolerance + ) && (Cartesian2.clone( + e._primaryPosition, + touchHoldEvent.position + ), s(touchHoldEvent)); + } + }, ScreenSpaceEventHandler.touchHoldDelayMilliseconds), t.preventDefault(); + } + r === 2 && !c && (e._isPinching = !0, o = e.getInputAction( + ScreenSpaceEventType$1.PINCH_START, + n + ), defined(o) && (Cartesian2.clone(i.values[0], touch2StartEvent.position1), Cartesian2.clone(i.values[1], touch2StartEvent.position2), o(touch2StartEvent), t.preventDefault())); +} +function handleTouchMove(e, t) { + gotTouchEvent(e); + const n = t.changedTouches; + let i; + const r = n.length; + let o, s; + const c = e._positions; + for (i = 0; i < r; ++i) { + o = n[i], s = o.identifier; + const d = c.get(s); + defined(d) && getPosition(e, o, d); + } + fireTouchMoveEvents(e, t); + const l = e._previousPositions; + for (i = 0; i < r; ++i) + o = n[i], s = o.identifier, Cartesian2.clone( + c.get(s), + l.get(s) + ); +} +const touchMoveEvent = { + startPosition: new Cartesian2(), + endPosition: new Cartesian2() +}, touchPinchMovementEvent = { + distance: { + startPosition: new Cartesian2(), + endPosition: new Cartesian2() + }, + angleAndHeight: { + startPosition: new Cartesian2(), + endPosition: new Cartesian2() + } +}; +function fireTouchMoveEvents(e, t) { + const n = getModifier(t), i = e._positions, r = e._previousPositions, o = i.length; + let s; + if (o === 1 && e._buttonDown[MouseButton.LEFT]) { + const c = i.values[0]; + Cartesian2.clone(c, e._primaryPosition); + const l = e._primaryPreviousPosition; + s = e.getInputAction( + ScreenSpaceEventType$1.MOUSE_MOVE, + n + ), defined(s) && (Cartesian2.clone(l, touchMoveEvent.startPosition), Cartesian2.clone(c, touchMoveEvent.endPosition), s(touchMoveEvent)), Cartesian2.clone(c, l), t.preventDefault(); + } else if (o === 2 && e._isPinching && (s = e.getInputAction( + ScreenSpaceEventType$1.PINCH_MOVE, + n + ), defined(s))) { + const c = i.values[0], l = i.values[1], d = r.values[0], f = r.values[1], h = l.x - c.x, p = l.y - c.y, m = Math.sqrt(h * h + p * p) * 0.25, _ = f.x - d.x, y = f.y - d.y, C = Math.sqrt(_ * _ + y * y) * 0.25, T = (l.y + c.y) * 0.125, x = (f.y + d.y) * 0.125, b = Math.atan2(p, h), S = Math.atan2(y, _); + Cartesian2.fromElements( + 0, + C, + touchPinchMovementEvent.distance.startPosition + ), Cartesian2.fromElements( + 0, + m, + touchPinchMovementEvent.distance.endPosition + ), Cartesian2.fromElements( + S, + x, + touchPinchMovementEvent.angleAndHeight.startPosition + ), Cartesian2.fromElements( + b, + T, + touchPinchMovementEvent.angleAndHeight.endPosition + ), s(touchPinchMovementEvent); + } +} +function handlePointerDown(e, t) { + if (t.target.setPointerCapture(t.pointerId), t.pointerType === "touch") { + const n = e._positions, i = t.pointerId; + n.set( + i, + getPosition(e, t, new Cartesian2()) + ), fireTouchEvents(e, t), e._previousPositions.set( + i, + Cartesian2.clone(n.get(i)) + ); + } else + handleMouseDown(e, t); +} +function handlePointerUp(e, t) { + if (t.pointerType === "touch") { + const n = e._positions, i = t.pointerId; + n.remove(i), fireTouchEvents(e, t), e._previousPositions.remove(i); + } else + handleMouseUp(e, t); +} +function handlePointerMove(e, t) { + if (t.pointerType === "touch") { + const n = e._positions, i = t.pointerId, r = n.get(i); + if (!defined(r)) + return; + getPosition(e, t, r), fireTouchMoveEvents(e, t); + const o = e._previousPositions; + Cartesian2.clone( + n.get(i), + o.get(i) + ); + } else + handleMouseMove(e, t); +} +function ScreenSpaceEventHandler(e) { + this._inputEvents = {}, this._buttonDown = { + LEFT: !1, + MIDDLE: !1, + RIGHT: !1 + }, this._isPinching = !1, this._isTouchHolding = !1, this._lastSeenTouchEvent = -ScreenSpaceEventHandler.mouseEmulationIgnoreMilliseconds, this._primaryStartPosition = new Cartesian2(), this._primaryPosition = new Cartesian2(), this._primaryPreviousPosition = new Cartesian2(), this._positions = new AssociativeArray(), this._previousPositions = new AssociativeArray(), this._removalFunctions = [], this._touchHoldTimer = void 0, this._clickPixelTolerance = 5, this._holdPixelTolerance = 25, this._element = defaultValue(e, document), registerListeners(this); +} +ScreenSpaceEventHandler.prototype.setInputAction = function(e, t, n) { + const i = getInputEventKey(t, n); + this._inputEvents[i] = e; +}; +ScreenSpaceEventHandler.prototype.getInputAction = function(e, t) { + const n = getInputEventKey(e, t); + return this._inputEvents[n]; +}; +ScreenSpaceEventHandler.prototype.removeInputAction = function(e, t) { + const n = getInputEventKey(e, t); + delete this._inputEvents[n]; +}; +ScreenSpaceEventHandler.prototype.isDestroyed = function() { + return !1; +}; +ScreenSpaceEventHandler.prototype.destroy = function() { + return unregisterListeners(this), destroyObject(this); +}; +ScreenSpaceEventHandler.mouseEmulationIgnoreMilliseconds = 800; +ScreenSpaceEventHandler.touchHoldDelayMilliseconds = 1500; +function SceneTransitioner(e) { + this._scene = e, this._currentTweens = [], this._morphHandler = void 0, this._morphCancelled = !1, this._completeMorph = void 0, this._morphToOrthographic = !1; +} +SceneTransitioner.prototype.completeMorph = function() { + defined(this._completeMorph) && this._completeMorph(); +}; +SceneTransitioner.prototype.morphTo2D = function(e, t) { + defined(this._completeMorph) && this._completeMorph(); + const n = this._scene; + this._previousMode = n.mode, this._morphToOrthographic = n.camera.frustum instanceof OrthographicFrustum, !(this._previousMode === SceneMode$1.SCENE2D || this._previousMode === SceneMode$1.MORPHING) && (this._scene.morphStart.raiseEvent( + this, + this._previousMode, + SceneMode$1.SCENE2D, + !0 + ), n._mode = SceneMode$1.MORPHING, n.camera._setTransform(Matrix4.IDENTITY), this._previousMode === SceneMode$1.COLUMBUS_VIEW ? morphFromColumbusViewTo2D(this, e) : morphFrom3DTo2D(this, e, t), e === 0 && defined(this._completeMorph) && this._completeMorph()); +}; +const scratchToCVPosition = new Cartesian3(), scratchToCVDirection = new Cartesian3(), scratchToCVUp = new Cartesian3(), scratchToCVPosition2D = new Cartesian3(), scratchToCVDirection2D = new Cartesian3(), scratchToCVUp2D = new Cartesian3(), scratchToCVSurfacePosition = new Cartesian3(), scratchToCVCartographic = new Cartographic(), scratchToCVToENU = new Matrix4(), scratchToCVFrustumPerspective = new PerspectiveFrustum(), scratchToCVFrustumOrthographic = new OrthographicFrustum(), scratchToCVCamera = { + position: void 0, + direction: void 0, + up: void 0, + position2D: void 0, + direction2D: void 0, + up2D: void 0, + frustum: void 0 +}; +SceneTransitioner.prototype.morphToColumbusView = function(e, t) { + defined(this._completeMorph) && this._completeMorph(); + const n = this._scene; + if (this._previousMode = n.mode, this._previousMode === SceneMode$1.COLUMBUS_VIEW || this._previousMode === SceneMode$1.MORPHING) + return; + this._scene.morphStart.raiseEvent( + this, + this._previousMode, + SceneMode$1.COLUMBUS_VIEW, + !0 + ), n.camera._setTransform(Matrix4.IDENTITY); + let i = scratchToCVPosition; + const r = scratchToCVDirection, o = scratchToCVUp; + if (e > 0) + i.x = 0, i.y = -1, i.z = 1, i = Cartesian3.multiplyByScalar( + Cartesian3.normalize(i, i), + 5 * t.maximumRadius, + i + ), Cartesian3.negate(Cartesian3.normalize(i, r), r), Cartesian3.cross(Cartesian3.UNIT_X, r, o); + else { + const d = n.camera; + if (this._previousMode === SceneMode$1.SCENE2D) + Cartesian3.clone(d.position, i), i.z = d.frustum.right - d.frustum.left, Cartesian3.negate(Cartesian3.UNIT_Z, r), Cartesian3.clone(Cartesian3.UNIT_Y, o); + else { + Cartesian3.clone(d.positionWC, i), Cartesian3.clone(d.directionWC, r), Cartesian3.clone(d.upWC, o); + const f = t.scaleToGeodeticSurface( + i, + scratchToCVSurfacePosition + ), h = Transforms.eastNorthUpToFixedFrame( + f, + t, + scratchToCVToENU + ); + Matrix4.inverseTransformation(h, h), n.mapProjection.project( + t.cartesianToCartographic(i, scratchToCVCartographic), + i + ), Matrix4.multiplyByPointAsVector(h, r, r), Matrix4.multiplyByPointAsVector(h, o, o); + } + } + let s; + this._morphToOrthographic ? (s = scratchToCVFrustumOrthographic, s.width = n.camera.frustum.right - n.camera.frustum.left, s.aspectRatio = n.drawingBufferWidth / n.drawingBufferHeight) : (s = scratchToCVFrustumPerspective, s.aspectRatio = n.drawingBufferWidth / n.drawingBufferHeight, s.fov = CesiumMath.toRadians(60)); + const c = scratchToCVCamera; + c.position = i, c.direction = r, c.up = o, c.frustum = s; + const l = completeColumbusViewCallback(c); + createMorphHandler(this, l), this._previousMode === SceneMode$1.SCENE2D ? morphFrom2DToColumbusView(this, e, c, l) : (c.position2D = Matrix4.multiplyByPoint( + Camera.TRANSFORM_2D, + i, + scratchToCVPosition2D + ), c.direction2D = Matrix4.multiplyByPointAsVector( + Camera.TRANSFORM_2D, + r, + scratchToCVDirection2D + ), c.up2D = Matrix4.multiplyByPointAsVector( + Camera.TRANSFORM_2D, + o, + scratchToCVUp2D + ), n._mode = SceneMode$1.MORPHING, morphFrom3DToColumbusView(this, e, c, l)), e === 0 && defined(this._completeMorph) && this._completeMorph(); +}; +const scratchCVTo3DCamera = { + position: new Cartesian3(), + direction: new Cartesian3(), + up: new Cartesian3(), + frustum: void 0 +}, scratch2DTo3DFrustumPersp = new PerspectiveFrustum(); +SceneTransitioner.prototype.morphTo3D = function(e, t) { + defined(this._completeMorph) && this._completeMorph(); + const n = this._scene; + if (this._previousMode = n.mode, !(this._previousMode === SceneMode$1.SCENE3D || this._previousMode === SceneMode$1.MORPHING)) { + if (this._scene.morphStart.raiseEvent( + this, + this._previousMode, + SceneMode$1.SCENE3D, + !0 + ), n._mode = SceneMode$1.MORPHING, n.camera._setTransform(Matrix4.IDENTITY), this._previousMode === SceneMode$1.SCENE2D) + morphFrom2DTo3D(this, e, t); + else { + let i; + e > 0 ? (i = scratchCVTo3DCamera, Cartesian3.fromDegrees( + 0, + 0, + 5 * t.maximumRadius, + t, + i.position + ), Cartesian3.negate(i.position, i.direction), Cartesian3.normalize(i.direction, i.direction), Cartesian3.clone(Cartesian3.UNIT_Z, i.up)) : i = getColumbusViewTo3DCamera(this, t); + let r; + const o = n.camera; + o.frustum instanceof OrthographicFrustum ? r = o.frustum.clone() : (r = scratch2DTo3DFrustumPersp, r.aspectRatio = n.drawingBufferWidth / n.drawingBufferHeight, r.fov = CesiumMath.toRadians(60)), i.frustum = r; + const s = complete3DCallback(i); + createMorphHandler(this, s), morphFromColumbusViewTo3D(this, e, i, s); + } + e === 0 && defined(this._completeMorph) && this._completeMorph(); + } +}; +SceneTransitioner.prototype.isDestroyed = function() { + return !1; +}; +SceneTransitioner.prototype.destroy = function() { + return destroyMorphHandler(this), destroyObject(this); +}; +function createMorphHandler(e, t) { + if (e._scene.completeMorphOnUserInput) { + e._morphHandler = new ScreenSpaceEventHandler( + e._scene.canvas + ); + const n = function() { + e._morphCancelled = !0, e._scene.camera.cancelFlight(), t(e); + }; + e._completeMorph = n, e._morphHandler.setInputAction( + n, + ScreenSpaceEventType$1.LEFT_DOWN + ), e._morphHandler.setInputAction( + n, + ScreenSpaceEventType$1.MIDDLE_DOWN + ), e._morphHandler.setInputAction( + n, + ScreenSpaceEventType$1.RIGHT_DOWN + ), e._morphHandler.setInputAction( + n, + ScreenSpaceEventType$1.WHEEL + ); + } +} +function destroyMorphHandler(e) { + const t = e._currentTweens; + for (let n = 0; n < t.length; ++n) + t[n].cancelTween(); + e._currentTweens.length = 0, e._morphHandler = e._morphHandler && e._morphHandler.destroy(); +} +const scratchCVTo3DCartographic = new Cartographic(), scratchCVTo3DSurfacePoint = new Cartesian3(), scratchCVTo3DFromENU = new Matrix4(); +function getColumbusViewTo3DCamera(e, t) { + const n = e._scene, i = n.camera, r = scratchCVTo3DCamera, o = r.position, s = r.direction, c = r.up, l = n.mapProjection.unproject( + i.position, + scratchCVTo3DCartographic + ); + t.cartographicToCartesian(l, o); + const d = t.scaleToGeodeticSurface( + o, + scratchCVTo3DSurfacePoint + ), f = Transforms.eastNorthUpToFixedFrame( + d, + t, + scratchCVTo3DFromENU + ); + return Matrix4.multiplyByPointAsVector(f, i.direction, s), Matrix4.multiplyByPointAsVector(f, i.up, c), r; +} +const scratchCVTo3DStartPos = new Cartesian3(), scratchCVTo3DStartDir = new Cartesian3(), scratchCVTo3DStartUp = new Cartesian3(), scratchCVTo3DEndPos = new Cartesian3(), scratchCVTo3DEndDir = new Cartesian3(), scratchCVTo3DEndUp = new Cartesian3(); +function morphFromColumbusViewTo3D(e, t, n, i) { + t *= 0.5; + const r = e._scene, o = r.camera, s = Cartesian3.clone(o.position, scratchCVTo3DStartPos), c = Cartesian3.clone(o.direction, scratchCVTo3DStartDir), l = Cartesian3.clone(o.up, scratchCVTo3DStartUp), d = Matrix4.multiplyByPoint( + Camera.TRANSFORM_2D_INVERSE, + n.position, + scratchCVTo3DEndPos + ), f = Matrix4.multiplyByPointAsVector( + Camera.TRANSFORM_2D_INVERSE, + n.direction, + scratchCVTo3DEndDir + ), h = Matrix4.multiplyByPointAsVector( + Camera.TRANSFORM_2D_INVERSE, + n.up, + scratchCVTo3DEndUp + ); + function p(_) { + columbusViewMorph(s, d, _.time, o.position), columbusViewMorph(c, f, _.time, o.direction), columbusViewMorph(l, h, _.time, o.up), Cartesian3.cross(o.direction, o.up, o.right), Cartesian3.normalize(o.right, o.right); + } + const m = r.tweens.add({ + duration: t, + easingFunction: EasingFunction$1.QUARTIC_OUT, + startObject: { + time: 0 + }, + stopObject: { + time: 1 + }, + update: p, + complete: function() { + addMorphTimeAnimations(e, r, 0, 1, t, i); + } + }); + e._currentTweens.push(m); +} +const scratch2DTo3DFrustumOrtho = new OrthographicFrustum(), scratch3DToCVStartPos = new Cartesian3(), scratch3DToCVStartDir = new Cartesian3(), scratch3DToCVStartUp = new Cartesian3(), scratch3DToCVEndPos = new Cartesian3(), scratch3DToCVEndDir = new Cartesian3(), scratch3DToCVEndUp = new Cartesian3(); +function morphFrom2DTo3D(e, t, n) { + t /= 3; + const i = e._scene, r = i.camera; + let o; + t > 0 ? (o = scratchCVTo3DCamera, Cartesian3.fromDegrees( + 0, + 0, + 5 * n.maximumRadius, + n, + o.position + ), Cartesian3.negate(o.position, o.direction), Cartesian3.normalize(o.direction, o.direction), Cartesian3.clone(Cartesian3.UNIT_Z, o.up)) : (r.position.z = r.frustum.right - r.frustum.left, o = getColumbusViewTo3DCamera(e, n)); + let s; + e._morphToOrthographic ? (s = scratch2DTo3DFrustumOrtho, s.aspectRatio = i.drawingBufferWidth / i.drawingBufferHeight, s.width = r.frustum.right - r.frustum.left) : (s = scratch2DTo3DFrustumPersp, s.aspectRatio = i.drawingBufferWidth / i.drawingBufferHeight, s.fov = CesiumMath.toRadians(60)), o.frustum = s; + const c = complete3DCallback(o); + createMorphHandler(e, c); + let l; + e._morphToOrthographic ? l = function() { + morphFromColumbusViewTo3D(e, t, o, c); + } : l = function() { + morphOrthographicToPerspective( + e, + t, + o, + function() { + morphFromColumbusViewTo3D(e, t, o, c); + } + ); + }, t > 0 ? (i._mode = SceneMode$1.SCENE2D, r.flyTo({ + duration: t, + destination: Cartesian3.fromDegrees( + 0, + 0, + 5 * n.maximumRadius, + n, + scratch3DToCVEndPos + ), + complete: function() { + i._mode = SceneMode$1.MORPHING, l(); + } + })) : l(); +} +function columbusViewMorph(e, t, n, i) { + return Cartesian3.lerp(e, t, n, i); +} +function morphPerspectiveToOrthographic(e, t, n, i, r) { + const o = e._scene, s = o.camera; + if (s.frustum instanceof OrthographicFrustum) + return; + const c = s.frustum.fov, l = CesiumMath.RADIANS_PER_DEGREE * 0.5, d = n.position.z * Math.tan(c * 0.5); + s.frustum.far = d / Math.tan(l * 0.5) + 1e7; + function f(p) { + s.frustum.fov = CesiumMath.lerp(c, l, p.time); + const m = d / Math.tan(s.frustum.fov * 0.5); + i(s, m); + } + const h = o.tweens.add({ + duration: t, + easingFunction: EasingFunction$1.QUARTIC_OUT, + startObject: { + time: 0 + }, + stopObject: { + time: 1 + }, + update: f, + complete: function() { + s.frustum = n.frustum.clone(), r(e); + } + }); + e._currentTweens.push(h); +} +const scratchCVTo2DStartPos = new Cartesian3(), scratchCVTo2DStartDir = new Cartesian3(), scratchCVTo2DStartUp = new Cartesian3(), scratchCVTo2DEndPos = new Cartesian3(), scratchCVTo2DEndDir = new Cartesian3(), scratchCVTo2DEndUp = new Cartesian3(), scratchCVTo2DFrustum = new OrthographicOffCenterFrustum(), scratchCVTo2DRay = new Ray(), scratchCVTo2DPickPos = new Cartesian3(), scratchCVTo2DCamera = { + position: void 0, + direction: void 0, + up: void 0, + frustum: void 0 +}; +function morphFromColumbusViewTo2D(e, t) { + t *= 0.5; + const n = e._scene, i = n.camera, r = Cartesian3.clone(i.position, scratchCVTo2DStartPos), o = Cartesian3.clone(i.direction, scratchCVTo2DStartDir), s = Cartesian3.clone(i.up, scratchCVTo2DStartUp), c = Cartesian3.negate(Cartesian3.UNIT_Z, scratchCVTo2DEndDir), l = Cartesian3.clone(Cartesian3.UNIT_Y, scratchCVTo2DEndUp), d = scratchCVTo2DEndPos; + if (t > 0) + Cartesian3.clone(Cartesian3.ZERO, scratchCVTo2DEndPos), d.z = 5 * n.ellipsoid.maximumRadius; + else { + Cartesian3.clone(r, scratchCVTo2DEndPos); + const C = scratchCVTo2DRay; + Matrix4.multiplyByPoint(Camera.TRANSFORM_2D, r, C.origin), Matrix4.multiplyByPointAsVector( + Camera.TRANSFORM_2D, + o, + C.direction + ); + const T = n.globe; + if (defined(T)) { + const x = T.pickWorldCoordinates( + C, + n, + !0, + scratchCVTo2DPickPos + ); + defined(x) && (Matrix4.multiplyByPoint(Camera.TRANSFORM_2D_INVERSE, x, d), d.z += Cartesian3.distance(r, d)); + } + } + const f = scratchCVTo2DFrustum; + f.right = d.z * 0.5, f.left = -f.right, f.top = f.right * (n.drawingBufferHeight / n.drawingBufferWidth), f.bottom = -f.top; + const h = scratchCVTo2DCamera; + h.position = d, h.direction = c, h.up = l, h.frustum = f; + const p = complete2DCallback(h); + createMorphHandler(e, p); + function m(C) { + columbusViewMorph(r, d, C.time, i.position), columbusViewMorph(o, c, C.time, i.direction), columbusViewMorph(s, l, C.time, i.up), Cartesian3.cross(i.direction, i.up, i.right), Cartesian3.normalize(i.right, i.right), i._adjustOrthographicFrustum(!0); + } + function _(C, T) { + C.position.z = T; + } + const y = n.tweens.add({ + duration: t, + easingFunction: EasingFunction$1.QUARTIC_OUT, + startObject: { + time: 0 + }, + stopObject: { + time: 1 + }, + update: m, + complete: function() { + morphPerspectiveToOrthographic( + e, + t, + h, + _, + p + ); + } + }); + e._currentTweens.push(y); +} +const scratch3DTo2DCartographic = new Cartographic(), scratch3DTo2DCamera = { + position: new Cartesian3(), + direction: new Cartesian3(), + up: new Cartesian3(), + position2D: new Cartesian3(), + direction2D: new Cartesian3(), + up2D: new Cartesian3(), + frustum: new OrthographicOffCenterFrustum() +}, scratch3DTo2DEndCamera = { + position: new Cartesian3(), + direction: new Cartesian3(), + up: new Cartesian3(), + frustum: void 0 +}, scratch3DTo2DPickPosition = new Cartesian3(), scratch3DTo2DRay = new Ray(), scratch3DTo2DToENU = new Matrix4(), scratch3DTo2DSurfacePoint = new Cartesian3(); +function morphFrom3DTo2D(e, t, n) { + t *= 0.5; + const i = e._scene, r = i.camera, o = scratch3DTo2DCamera; + if (t > 0) + Cartesian3.clone(Cartesian3.ZERO, o.position), o.position.z = 5 * n.maximumRadius, Cartesian3.negate(Cartesian3.UNIT_Z, o.direction), Cartesian3.clone(Cartesian3.UNIT_Y, o.up); + else { + n.cartesianToCartographic( + r.positionWC, + scratch3DTo2DCartographic + ), i.mapProjection.project(scratch3DTo2DCartographic, o.position), Cartesian3.negate(Cartesian3.UNIT_Z, o.direction), Cartesian3.clone(Cartesian3.UNIT_Y, o.up); + const h = scratch3DTo2DRay; + Cartesian3.clone(o.position2D, h.origin); + const p = Cartesian3.clone(r.directionWC, h.direction), m = n.scaleToGeodeticSurface( + r.positionWC, + scratch3DTo2DSurfacePoint + ), _ = Transforms.eastNorthUpToFixedFrame( + m, + n, + scratch3DTo2DToENU + ); + Matrix4.inverseTransformation(_, _), Matrix4.multiplyByPointAsVector(_, p, p), Matrix4.multiplyByPointAsVector( + Camera.TRANSFORM_2D, + p, + p + ); + const y = i.globe; + if (defined(y)) { + const C = y.pickWorldCoordinates( + h, + i, + !0, + scratch3DTo2DPickPosition + ); + if (defined(C)) { + const T = Cartesian3.distance(o.position2D, C); + C.x += T, Cartesian3.clone(C, o.position2D); + } + } + } + function s(h, p) { + h.position.x = p; + } + Matrix4.multiplyByPoint( + Camera.TRANSFORM_2D, + o.position, + o.position2D + ), Matrix4.multiplyByPointAsVector( + Camera.TRANSFORM_2D, + o.direction, + o.direction2D + ), Matrix4.multiplyByPointAsVector( + Camera.TRANSFORM_2D, + o.up, + o.up2D + ); + const c = o.frustum; + c.right = o.position.z * 0.5, c.left = -c.right, c.top = c.right * (i.drawingBufferHeight / i.drawingBufferWidth), c.bottom = -c.top; + const l = scratch3DTo2DEndCamera; + Matrix4.multiplyByPoint( + Camera.TRANSFORM_2D_INVERSE, + o.position2D, + l.position + ), Cartesian3.clone(o.direction, l.direction), Cartesian3.clone(o.up, l.up), l.frustum = c; + const d = complete2DCallback(l); + createMorphHandler(e, d); + function f() { + morphPerspectiveToOrthographic( + e, + t, + o, + s, + d + ); + } + morphFrom3DToColumbusView(e, t, o, f); +} +function morphOrthographicToPerspective(e, t, n, i) { + const r = e._scene, o = r.camera, s = o.frustum.right - o.frustum.left; + o.frustum = n.frustum.clone(); + const c = o.frustum.fov, l = CesiumMath.RADIANS_PER_DEGREE * 0.5, d = s * Math.tan(c * 0.5); + o.frustum.far = d / Math.tan(l * 0.5) + 1e7, o.frustum.fov = l; + function f(p) { + o.frustum.fov = CesiumMath.lerp(l, c, p.time), o.position.z = d / Math.tan(o.frustum.fov * 0.5); + } + const h = r.tweens.add({ + duration: t, + easingFunction: EasingFunction$1.QUARTIC_OUT, + startObject: { + time: 0 + }, + stopObject: { + time: 1 + }, + update: f, + complete: function() { + i(e); + } + }); + e._currentTweens.push(h); +} +function morphFrom2DToColumbusView(e, t, n, i) { + t *= 0.5; + const r = e._scene, o = r.camera, s = Cartesian3.clone(n.position, scratch3DToCVEndPos), c = Cartesian3.clone(n.direction, scratch3DToCVEndDir), l = Cartesian3.clone(n.up, scratch3DToCVEndUp); + r._mode = SceneMode$1.MORPHING; + function d() { + o.frustum = n.frustum.clone(); + const f = Cartesian3.clone(o.position, scratch3DToCVStartPos), h = Cartesian3.clone(o.direction, scratch3DToCVStartDir), p = Cartesian3.clone(o.up, scratch3DToCVStartUp); + f.z = s.z; + function m(y) { + columbusViewMorph(f, s, y.time, o.position), columbusViewMorph(h, c, y.time, o.direction), columbusViewMorph(p, l, y.time, o.up), Cartesian3.cross(o.direction, o.up, o.right), Cartesian3.normalize(o.right, o.right); + } + const _ = r.tweens.add({ + duration: t, + easingFunction: EasingFunction$1.QUARTIC_OUT, + startObject: { + time: 0 + }, + stopObject: { + time: 1 + }, + update: m, + complete: function() { + i(e); + } + }); + e._currentTweens.push(_); + } + e._morphToOrthographic ? d() : morphOrthographicToPerspective(e, 0, n, d); +} +function morphFrom3DToColumbusView(e, t, n, i) { + const r = e._scene, o = r.camera, s = Cartesian3.clone(o.position, scratch3DToCVStartPos), c = Cartesian3.clone(o.direction, scratch3DToCVStartDir), l = Cartesian3.clone(o.up, scratch3DToCVStartUp), d = Cartesian3.clone(n.position2D, scratch3DToCVEndPos), f = Cartesian3.clone(n.direction2D, scratch3DToCVEndDir), h = Cartesian3.clone(n.up2D, scratch3DToCVEndUp); + function p(_) { + columbusViewMorph(s, d, _.time, o.position), columbusViewMorph(c, f, _.time, o.direction), columbusViewMorph(l, h, _.time, o.up), Cartesian3.cross(o.direction, o.up, o.right), Cartesian3.normalize(o.right, o.right), o._adjustOrthographicFrustum(!0); + } + const m = r.tweens.add({ + duration: t, + easingFunction: EasingFunction$1.QUARTIC_OUT, + startObject: { + time: 0 + }, + stopObject: { + time: 1 + }, + update: p, + complete: function() { + addMorphTimeAnimations(e, r, 1, 0, t, i); + } + }); + e._currentTweens.push(m); +} +function addMorphTimeAnimations(e, t, n, i, r, o) { + const s = { + object: t, + property: "morphTime", + startValue: n, + stopValue: i, + duration: r, + easingFunction: EasingFunction$1.QUARTIC_OUT + }; + defined(o) && (s.complete = function() { + o(e); + }); + const c = t.tweens.addProperty(s); + e._currentTweens.push(c); +} +function complete3DCallback(e) { + return function(t) { + const n = t._scene; + n._mode = SceneMode$1.SCENE3D, n.morphTime = SceneMode$1.getMorphTime(SceneMode$1.SCENE3D), destroyMorphHandler(t); + const i = n.camera; + (t._previousMode !== SceneMode$1.MORPHING || t._morphCancelled) && (t._morphCancelled = !1, Cartesian3.clone(e.position, i.position), Cartesian3.clone(e.direction, i.direction), Cartesian3.clone(e.up, i.up), Cartesian3.cross(i.direction, i.up, i.right), Cartesian3.normalize(i.right, i.right), i.frustum = e.frustum.clone()); + const r = i.frustum; + n.frameState.useLogDepth && (r.near = 0.1, r.far = 1e10); + const o = defined(t._completeMorph); + t._completeMorph = void 0, n.camera.update(n.mode), t._scene.morphComplete.raiseEvent( + t, + t._previousMode, + SceneMode$1.SCENE3D, + o + ); + }; +} +function complete2DCallback(e) { + return function(t) { + const n = t._scene; + n._mode = SceneMode$1.SCENE2D, n.morphTime = SceneMode$1.getMorphTime(SceneMode$1.SCENE2D), destroyMorphHandler(t); + const i = n.camera; + Cartesian3.clone(e.position, i.position), i.position.z = n.ellipsoid.maximumRadius * 2, Cartesian3.clone(e.direction, i.direction), Cartesian3.clone(e.up, i.up), Cartesian3.cross(i.direction, i.up, i.right), Cartesian3.normalize(i.right, i.right), i.frustum = e.frustum.clone(); + const r = defined(t._completeMorph); + t._completeMorph = void 0, n.camera.update(n.mode), t._scene.morphComplete.raiseEvent( + t, + t._previousMode, + SceneMode$1.SCENE2D, + r + ); + }; +} +function completeColumbusViewCallback(e) { + return function(t) { + const n = t._scene; + n._mode = SceneMode$1.COLUMBUS_VIEW, n.morphTime = SceneMode$1.getMorphTime(SceneMode$1.COLUMBUS_VIEW), destroyMorphHandler(t); + const i = n.camera; + (t._previousModeMode !== SceneMode$1.MORPHING || t._morphCancelled) && (t._morphCancelled = !1, Cartesian3.clone(e.position, i.position), Cartesian3.clone(e.direction, i.direction), Cartesian3.clone(e.up, i.up), Cartesian3.cross(i.direction, i.up, i.right), Cartesian3.normalize(i.right, i.right)); + const r = i.frustum; + n.frameState.useLogDepth && (r.near = 0.1, r.far = 1e10); + const o = defined(t._completeMorph); + t._completeMorph = void 0, n.camera.update(n.mode), t._scene.morphComplete.raiseEvent( + t, + t._previousMode, + SceneMode$1.COLUMBUS_VIEW, + o + ); + }; +} +const CameraEventType = { + /** + * A left mouse button press followed by moving the mouse and releasing the button. + * + * @type {number} + * @constant + */ + LEFT_DRAG: 0, + /** + * A right mouse button press followed by moving the mouse and releasing the button. + * + * @type {number} + * @constant + */ + RIGHT_DRAG: 1, + /** + * A middle mouse button press followed by moving the mouse and releasing the button. + * + * @type {number} + * @constant + */ + MIDDLE_DRAG: 2, + /** + * Scrolling the middle mouse button. + * + * @type {number} + * @constant + */ + WHEEL: 3, + /** + * A two-finger touch on a touch surface. + * + * @type {number} + * @constant + */ + PINCH: 4 +}, CameraEventType$1 = Object.freeze(CameraEventType); +function getKey(e, t) { + let n = `${e}`; + return defined(t) && (n += `+${t}`), n; +} +function clonePinchMovement(e, t) { + Cartesian2.clone( + e.distance.startPosition, + t.distance.startPosition + ), Cartesian2.clone( + e.distance.endPosition, + t.distance.endPosition + ), Cartesian2.clone( + e.angleAndHeight.startPosition, + t.angleAndHeight.startPosition + ), Cartesian2.clone( + e.angleAndHeight.endPosition, + t.angleAndHeight.endPosition + ); +} +function listenToPinch(e, t, n) { + const i = getKey(CameraEventType$1.PINCH, t), r = e._update, o = e._isDown, s = e._eventStartPosition, c = e._pressTime, l = e._releaseTime; + r[i] = !0, o[i] = !1, s[i] = new Cartesian2(); + let d = e._movement[i]; + defined(d) || (d = e._movement[i] = {}), d.distance = { + startPosition: new Cartesian2(), + endPosition: new Cartesian2() + }, d.angleAndHeight = { + startPosition: new Cartesian2(), + endPosition: new Cartesian2() + }, d.prevAngle = 0, e._eventHandler.setInputAction( + function(f) { + e._buttonsDown++, o[i] = !0, c[i] = /* @__PURE__ */ new Date(), Cartesian2.lerp( + f.position1, + f.position2, + 0.5, + s[i] + ); + }, + ScreenSpaceEventType$1.PINCH_START, + t + ), e._eventHandler.setInputAction( + function() { + e._buttonsDown = Math.max(e._buttonsDown - 1, 0), o[i] = !1, l[i] = /* @__PURE__ */ new Date(); + }, + ScreenSpaceEventType$1.PINCH_END, + t + ), e._eventHandler.setInputAction( + function(f) { + if (o[i]) { + r[i] ? (clonePinchMovement(f, d), r[i] = !1, d.prevAngle = d.angleAndHeight.startPosition.x) : (Cartesian2.clone( + f.distance.endPosition, + d.distance.endPosition + ), Cartesian2.clone( + f.angleAndHeight.endPosition, + d.angleAndHeight.endPosition + )); + let h = d.angleAndHeight.endPosition.x; + const p = d.prevAngle, m = Math.PI * 2; + for (; h >= p + Math.PI; ) + h -= m; + for (; h < p - Math.PI; ) + h += m; + d.angleAndHeight.endPosition.x = -h * n.clientWidth / 12, d.angleAndHeight.startPosition.x = -p * n.clientWidth / 12; + } + }, + ScreenSpaceEventType$1.PINCH_MOVE, + t + ); +} +function listenToWheel(e, t) { + const n = getKey(CameraEventType$1.WHEEL, t), i = e._pressTime, r = e._releaseTime, o = e._update; + o[n] = !0; + let s = e._movement[n]; + defined(s) || (s = e._movement[n] = {}); + let c = e._lastMovement[n]; + defined(c) || (c = e._lastMovement[n] = { + startPosition: new Cartesian2(), + endPosition: new Cartesian2(), + valid: !1 + }), s.startPosition = new Cartesian2(), Cartesian2.clone(Cartesian2.ZERO, s.startPosition), s.endPosition = new Cartesian2(), e._eventHandler.setInputAction( + function(l) { + const d = 7.5 * CesiumMath.toRadians(l); + i[n] = r[n] = /* @__PURE__ */ new Date(), s.endPosition.x = 0, s.endPosition.y = d, Cartesian2.clone(s.endPosition, c.endPosition), c.valid = !0, o[n] = !1; + }, + ScreenSpaceEventType$1.WHEEL, + t + ); +} +function listenMouseButtonDownUp(e, t, n) { + const i = getKey(n, t), r = e._isDown, o = e._eventStartPosition, s = e._pressTime; + r[i] = !1, o[i] = new Cartesian2(); + let c = e._lastMovement[i]; + defined(c) || (c = e._lastMovement[i] = { + startPosition: new Cartesian2(), + endPosition: new Cartesian2(), + valid: !1 + }); + let l, d; + n === CameraEventType$1.LEFT_DRAG ? (l = ScreenSpaceEventType$1.LEFT_DOWN, d = ScreenSpaceEventType$1.LEFT_UP) : n === CameraEventType$1.RIGHT_DRAG ? (l = ScreenSpaceEventType$1.RIGHT_DOWN, d = ScreenSpaceEventType$1.RIGHT_UP) : n === CameraEventType$1.MIDDLE_DRAG && (l = ScreenSpaceEventType$1.MIDDLE_DOWN, d = ScreenSpaceEventType$1.MIDDLE_UP), e._eventHandler.setInputAction( + function(f) { + e._buttonsDown++, c.valid = !1, r[i] = !0, s[i] = /* @__PURE__ */ new Date(), Cartesian2.clone(f.position, o[i]); + }, + l, + t + ), e._eventHandler.setInputAction( + function() { + cancelMouseDownAction(getKey(n, void 0), e); + for (const f of Object.values(KeyboardEventModifier$1)) { + const h = getKey(n, f); + cancelMouseDownAction(h, e); + } + }, + d, + t + ); +} +function cancelMouseDownAction(e, t) { + const n = t._releaseTime, i = t._isDown; + i[e] && (t._buttonsDown = Math.max(t._buttonsDown - 1, 0)), i[e] = !1, n[e] = /* @__PURE__ */ new Date(); +} +function cloneMouseMovement(e, t) { + Cartesian2.clone(e.startPosition, t.startPosition), Cartesian2.clone(e.endPosition, t.endPosition); +} +function refreshMouseDownStatus(e, t, n) { + const i = n._isDown; + let r = !1; + const o = getKey(e, t); + for (const [l, d] of Object.entries(i)) + l.startsWith(e) && d && l !== o && (r = !0, cancelMouseDownAction(l, n)); + if (!r) + return; + const s = n._pressTime; + let c = n._lastMovement[o]; + defined(c) || (c = n._lastMovement[o] = { + startPosition: new Cartesian2(), + endPosition: new Cartesian2(), + valid: !1 + }), n._buttonsDown++, c.valid = !1, i[o] = !0, s[o] = /* @__PURE__ */ new Date(); +} +function listenMouseMove(e, t) { + const n = e._update, i = e._movement, r = e._lastMovement, o = e._isDown; + for (const s in CameraEventType$1) + if (CameraEventType$1.hasOwnProperty(s)) { + const c = CameraEventType$1[s]; + if (defined(c)) { + const l = getKey(c, t); + n[l] = !0, defined(e._lastMovement[l]) || (e._lastMovement[l] = { + startPosition: new Cartesian2(), + endPosition: new Cartesian2(), + valid: !1 + }), defined(e._movement[l]) || (e._movement[l] = { + startPosition: new Cartesian2(), + endPosition: new Cartesian2() + }); + } + } + e._eventHandler.setInputAction( + function(s) { + for (const c in CameraEventType$1) + if (CameraEventType$1.hasOwnProperty(c)) { + const l = CameraEventType$1[c]; + if (defined(l)) { + const d = getKey(l, t); + refreshMouseDownStatus(l, t, e), o[d] && (n[d] ? (cloneMouseMovement(i[d], r[d]), r[d].valid = !0, cloneMouseMovement(s, i[d]), n[d] = !1) : Cartesian2.clone( + s.endPosition, + i[d].endPosition + )); + } + } + Cartesian2.clone( + s.endPosition, + e._currentMousePosition + ); + }, + ScreenSpaceEventType$1.MOUSE_MOVE, + t + ); +} +function CameraEventAggregator(e) { + this._eventHandler = new ScreenSpaceEventHandler(e), this._update = {}, this._movement = {}, this._lastMovement = {}, this._isDown = {}, this._eventStartPosition = {}, this._pressTime = {}, this._releaseTime = {}, this._buttonsDown = 0, this._currentMousePosition = new Cartesian2(), listenToWheel(this, void 0), listenToPinch(this, void 0, e), listenMouseButtonDownUp(this, void 0, CameraEventType$1.LEFT_DRAG), listenMouseButtonDownUp(this, void 0, CameraEventType$1.RIGHT_DRAG), listenMouseButtonDownUp(this, void 0, CameraEventType$1.MIDDLE_DRAG), listenMouseMove(this, void 0); + for (const t in KeyboardEventModifier$1) + if (KeyboardEventModifier$1.hasOwnProperty(t)) { + const n = KeyboardEventModifier$1[t]; + defined(n) && (listenToWheel(this, n), listenToPinch(this, n, e), listenMouseButtonDownUp(this, n, CameraEventType$1.LEFT_DRAG), listenMouseButtonDownUp(this, n, CameraEventType$1.RIGHT_DRAG), listenMouseButtonDownUp(this, n, CameraEventType$1.MIDDLE_DRAG), listenMouseMove(this, n)); + } +} +Object.defineProperties(CameraEventAggregator.prototype, { + /** + * Gets the current mouse position. + * @memberof CameraEventAggregator.prototype + * @type {Cartesian2} + */ + currentMousePosition: { + get: function() { + return this._currentMousePosition; + } + }, + /** + * Gets whether any mouse button is down, a touch has started, or the wheel has been moved. + * @memberof CameraEventAggregator.prototype + * @type {boolean} + */ + anyButtonDown: { + get: function() { + const e = !this._update[getKey(CameraEventType$1.WHEEL)] || !this._update[getKey(CameraEventType$1.WHEEL, KeyboardEventModifier$1.SHIFT)] || !this._update[getKey(CameraEventType$1.WHEEL, KeyboardEventModifier$1.CTRL)] || !this._update[getKey(CameraEventType$1.WHEEL, KeyboardEventModifier$1.ALT)]; + return this._buttonsDown > 0 || e; + } + } +}); +CameraEventAggregator.prototype.isMoving = function(e, t) { + const n = getKey(e, t); + return !this._update[n]; +}; +CameraEventAggregator.prototype.getMovement = function(e, t) { + const n = getKey(e, t); + return this._movement[n]; +}; +CameraEventAggregator.prototype.getLastMovement = function(e, t) { + const n = getKey(e, t), i = this._lastMovement[n]; + if (i.valid) + return i; +}; +CameraEventAggregator.prototype.isButtonDown = function(e, t) { + const n = getKey(e, t); + return this._isDown[n]; +}; +CameraEventAggregator.prototype.getStartMousePosition = function(e, t) { + if (e === CameraEventType$1.WHEEL) + return this._currentMousePosition; + const n = getKey(e, t); + return this._eventStartPosition[n]; +}; +CameraEventAggregator.prototype.getButtonPressTime = function(e, t) { + const n = getKey(e, t); + return this._pressTime[n]; +}; +CameraEventAggregator.prototype.getButtonReleaseTime = function(e, t) { + const n = getKey(e, t); + return this._releaseTime[n]; +}; +CameraEventAggregator.prototype.reset = function() { + for (const e in this._update) + this._update.hasOwnProperty(e) && (this._update[e] = !0); +}; +CameraEventAggregator.prototype.isDestroyed = function() { + return !1; +}; +CameraEventAggregator.prototype.destroy = function() { + return this._eventHandler = this._eventHandler && this._eventHandler.destroy(), destroyObject(this); +}; +function Tween(e, t, n, i, r, o, s, c, l, d) { + this._tweens = e, this._tweenjs = t, this._startObject = clone$1(n), this._stopObject = clone$1(i), this._duration = r, this._delay = o, this._easingFunction = s, this._update = c, this._complete = l, this.cancel = d, this.needsStart = !0; +} +Object.defineProperties(Tween.prototype, { + /** + * An object with properties for initial values of the tween. The properties of this object are changed during the tween's animation. + * @memberof Tween.prototype + * + * @type {object} + * @readonly + */ + startObject: { + get: function() { + return this._startObject; + } + }, + /** + * An object with properties for the final values of the tween. + * @memberof Tween.prototype + * + * @type {object} + * @readonly + */ + stopObject: { + get: function() { + return this._stopObject; + } + }, + /** + * The duration, in seconds, for the tween. The tween is automatically removed from the collection when it stops. + * @memberof Tween.prototype + * + * @type {number} + * @readonly + */ + duration: { + get: function() { + return this._duration; + } + }, + /** + * The delay, in seconds, before the tween starts animating. + * @memberof Tween.prototype + * + * @type {number} + * @readonly + */ + delay: { + get: function() { + return this._delay; + } + }, + /** + * Determines the curve for animtion. + * @memberof Tween.prototype + * + * @type {EasingFunction} + * @readonly + */ + easingFunction: { + get: function() { + return this._easingFunction; + } + }, + /** + * The callback to call at each animation update (usually tied to the a rendered frame). + * @memberof Tween.prototype + * + * @type {TweenCollection.TweenUpdateCallback} + * @readonly + */ + update: { + get: function() { + return this._update; + } + }, + /** + * The callback to call when the tween finishes animating. + * @memberof Tween.prototype + * + * @type {TweenCollection.TweenCompleteCallback} + * @readonly + */ + complete: { + get: function() { + return this._complete; + } + }, + /** + * @memberof Tween.prototype + * + * @private + */ + tweenjs: { + get: function() { + return this._tweenjs; + } + } +}); +Tween.prototype.cancelTween = function() { + this._tweens.remove(this); +}; +function TweenCollection() { + this._tweens = []; +} +Object.defineProperties(TweenCollection.prototype, { + /** + * The number of tweens in the collection. + * @memberof TweenCollection.prototype + * + * @type {number} + * @readonly + */ + length: { + get: function() { + return this._tweens.length; + } + } +}); +TweenCollection.prototype.add = function(e) { + if (e = defaultValue(e, defaultValue.EMPTY_OBJECT), e.duration === 0) + return defined(e.complete) && e.complete(), new Tween(this); + const t = e.duration / TimeConstants$1.SECONDS_PER_MILLISECOND, n = defaultValue(e.delay, 0), i = n / TimeConstants$1.SECONDS_PER_MILLISECOND, r = defaultValue( + e.easingFunction, + EasingFunction$1.LINEAR_NONE + ), o = e.startObject, s = new Tween$1(o); + s.to(clone$1(e.stopObject), t), s.delay(i), s.easing(r), defined(e.update) && s.onUpdate(function() { + e.update(o); + }), s.onComplete(defaultValue(e.complete, null)), s.repeat(defaultValue(e._repeat, 0)); + const c = new Tween( + this, + s, + e.startObject, + e.stopObject, + e.duration, + n, + r, + e.update, + e.complete, + e.cancel + ); + return this._tweens.push(c), c; +}; +TweenCollection.prototype.addProperty = function(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.object, n = e.property, i = e.startValue, r = e.stopValue; + function o(s) { + t[n] = s.value; + } + return this.add({ + startObject: { + value: i + }, + stopObject: { + value: r + }, + duration: defaultValue(e.duration, 3), + delay: e.delay, + easingFunction: e.easingFunction, + update: o, + complete: e.complete, + cancel: e.cancel, + _repeat: e._repeat + }); +}; +TweenCollection.prototype.addAlpha = function(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.material, n = []; + for (const r in t.uniforms) + t.uniforms.hasOwnProperty(r) && defined(t.uniforms[r]) && defined(t.uniforms[r].alpha) && n.push(r); + function i(r) { + const o = n.length; + for (let s = 0; s < o; ++s) + t.uniforms[n[s]].alpha = r.alpha; + } + return this.add({ + startObject: { + alpha: defaultValue(e.startValue, 0) + // Default to fade in + }, + stopObject: { + alpha: defaultValue(e.stopValue, 1) + }, + duration: defaultValue(e.duration, 3), + delay: e.delay, + easingFunction: e.easingFunction, + update: i, + complete: e.complete, + cancel: e.cancel + }); +}; +TweenCollection.prototype.addOffsetIncrement = function(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const n = e.material.uniforms; + return this.addProperty({ + object: n, + property: "offset", + startValue: n.offset, + stopValue: n.offset + 1, + duration: e.duration, + delay: e.delay, + easingFunction: e.easingFunction, + update: e.update, + cancel: e.cancel, + _repeat: 1 / 0 + }); +}; +TweenCollection.prototype.remove = function(e) { + if (!defined(e)) + return !1; + const t = this._tweens.indexOf(e); + return t !== -1 ? (e.tweenjs.stop(), defined(e.cancel) && e.cancel(), this._tweens.splice(t, 1), !0) : !1; +}; +TweenCollection.prototype.removeAll = function() { + const e = this._tweens; + for (let t = 0; t < e.length; ++t) { + const n = e[t]; + n.tweenjs.stop(), defined(n.cancel) && n.cancel(); + } + e.length = 0; +}; +TweenCollection.prototype.contains = function(e) { + return defined(e) && this._tweens.indexOf(e) !== -1; +}; +TweenCollection.prototype.get = function(e) { + return this._tweens[e]; +}; +TweenCollection.prototype.update = function(e) { + const t = this._tweens; + let n = 0; + for (e = defined(e) ? e / TimeConstants$1.SECONDS_PER_MILLISECOND : getTimestamp$1(); n < t.length; ) { + const i = t[n], r = i.tweenjs; + i.needsStart ? (i.needsStart = !1, r.start(e)) : r.update(e) ? n++ : (r.stop(), t.splice(n, 1)); + } +}; +function ScreenSpaceCameraController(e) { + this.enableInputs = !0, this.enableTranslate = !0, this.enableZoom = !0, this.enableRotate = !0, this.enableTilt = !0, this.enableLook = !0, this.inertiaSpin = 0.9, this.inertiaTranslate = 0.9, this.inertiaZoom = 0.8, this.maximumMovementRatio = 0.1, this.bounceAnimationTime = 3, this.minimumZoomDistance = 1, this.maximumZoomDistance = Number.POSITIVE_INFINITY, this.zoomFactor = 5, this.translateEventTypes = CameraEventType$1.LEFT_DRAG, this.zoomEventTypes = [ + CameraEventType$1.RIGHT_DRAG, + CameraEventType$1.WHEEL, + CameraEventType$1.PINCH + ], this.rotateEventTypes = CameraEventType$1.LEFT_DRAG, this.tiltEventTypes = [ + CameraEventType$1.MIDDLE_DRAG, + CameraEventType$1.PINCH, + { + eventType: CameraEventType$1.LEFT_DRAG, + modifier: KeyboardEventModifier$1.CTRL + }, + { + eventType: CameraEventType$1.RIGHT_DRAG, + modifier: KeyboardEventModifier$1.CTRL + } + ], this.lookEventTypes = { + eventType: CameraEventType$1.LEFT_DRAG, + modifier: KeyboardEventModifier$1.SHIFT + }; + const t = defaultValue(e.ellipsoid, Ellipsoid.default); + this.minimumPickingTerrainHeight = Ellipsoid.WGS84.equals(t) ? 15e4 : t.minimumRadius * 0.025, this._minimumPickingTerrainHeight = this.minimumPickingTerrainHeight, this.minimumPickingTerrainDistanceWithInertia = Ellipsoid.WGS84.equals( + t + ) ? 4e3 : t.minimumRadius * 63e-5, this.minimumCollisionTerrainHeight = Ellipsoid.WGS84.equals(t) ? 15e3 : t.minimumRadius * 25e-4, this._minimumCollisionTerrainHeight = this.minimumCollisionTerrainHeight, this.minimumTrackBallHeight = Ellipsoid.WGS84.equals(t) ? 75e5 : t.minimumRadius * 1.175, this._minimumTrackBallHeight = this.minimumTrackBallHeight, this.enableCollisionDetection = !0, this._scene = e, this._globe = void 0, this._ellipsoid = t, this._lastGlobeHeight = 0, this._aggregator = new CameraEventAggregator(e.canvas), this._lastInertiaSpinMovement = void 0, this._lastInertiaZoomMovement = void 0, this._lastInertiaTranslateMovement = void 0, this._lastInertiaTiltMovement = void 0, this._inertiaDisablers = { + _lastInertiaZoomMovement: [ + "_lastInertiaSpinMovement", + "_lastInertiaTranslateMovement", + "_lastInertiaTiltMovement" + ], + _lastInertiaTiltMovement: [ + "_lastInertiaSpinMovement", + "_lastInertiaTranslateMovement" + ] + }, this._tweens = new TweenCollection(), this._tween = void 0, this._horizontalRotationAxis = void 0, this._tiltCenterMousePosition = new Cartesian2(-1, -1), this._tiltCenter = new Cartesian3(), this._rotateMousePosition = new Cartesian2(-1, -1), this._rotateStartPosition = new Cartesian3(), this._strafeStartPosition = new Cartesian3(), this._strafeMousePosition = new Cartesian2(), this._strafeEndMousePosition = new Cartesian2(), this._zoomMouseStart = new Cartesian2(-1, -1), this._zoomWorldPosition = new Cartesian3(), this._useZoomWorldPosition = !1, this._panLastMousePosition = new Cartesian2(), this._panLastWorldPosition = new Cartesian3(), this._tiltCVOffMap = !1, this._looking = !1, this._rotating = !1, this._strafing = !1, this._zoomingOnVector = !1, this._zoomingUnderground = !1, this._rotatingZoom = !1, this._adjustedHeightForTerrain = !1, this._cameraUnderground = !1; + const n = e.mapProjection; + this._maxCoord = n.project( + new Cartographic(Math.PI, CesiumMath.PI_OVER_TWO) + ), this._rotateFactor = void 0, this._rotateRateRangeAdjustment = void 0, this._maximumRotateRate = 1.77, this._minimumRotateRate = 1 / 5e3, this._minimumZoomRate = 20, this._maximumZoomRate = 5906376272e3, this._minimumUndergroundPickDistance = 2e3, this._maximumUndergroundPickDistance = 1e4; +} +function decay(e, t) { + if (e < 0) + return 0; + const n = (1 - t) * 25; + return Math.exp(-n * e); +} +function sameMousePosition(e) { + return Cartesian2.equalsEpsilon( + e.startPosition, + e.endPosition, + CesiumMath.EPSILON14 + ); +} +const inertiaMaxClickTimeThreshold = 0.4; +function maintainInertia(e, t, n, i, r, o, s) { + let c = o[s]; + defined(c) || (c = o[s] = { + startPosition: new Cartesian2(), + endPosition: new Cartesian2(), + motion: new Cartesian2(), + inertiaEnabled: !0 + }); + const l = e.getButtonPressTime(t, n), d = e.getButtonReleaseTime(t, n), f = l && d && (d.getTime() - l.getTime()) / 1e3, p = d && ((/* @__PURE__ */ new Date()).getTime() - d.getTime()) / 1e3; + if (l && d && f < inertiaMaxClickTimeThreshold) { + const m = decay(p, i), _ = e.getLastMovement(t, n); + if (!defined(_) || sameMousePosition(_) || !c.inertiaEnabled || (c.motion.x = (_.endPosition.x - _.startPosition.x) * 0.5, c.motion.y = (_.endPosition.y - _.startPosition.y) * 0.5, c.startPosition = Cartesian2.clone( + _.startPosition, + c.startPosition + ), c.endPosition = Cartesian2.multiplyByScalar( + c.motion, + m, + c.endPosition + ), c.endPosition = Cartesian2.add( + c.startPosition, + c.endPosition, + c.endPosition + ), isNaN(c.endPosition.x) || isNaN(c.endPosition.y) || Cartesian2.distance( + c.startPosition, + c.endPosition + ) < 0.5)) + return; + if (!e.isButtonDown(t, n)) { + const y = e.getStartMousePosition(t, n); + r(o, y, c); + } + } +} +function activateInertia(e, t) { + if (defined(t)) { + let n = e[t]; + defined(n) && (n.inertiaEnabled = !0); + const i = e._inertiaDisablers[t]; + if (defined(i)) { + const r = i.length; + for (let o = 0; o < r; ++o) + n = e[i[o]], defined(n) && (n.inertiaEnabled = !1); + } + } +} +const scratchEventTypeArray = []; +function reactToInput(e, t, n, i, r, o) { + if (!defined(n)) + return; + const s = e._aggregator; + Array.isArray(n) || (scratchEventTypeArray[0] = n, n = scratchEventTypeArray); + const c = n.length; + for (let l = 0; l < c; ++l) { + const d = n[l], f = defined(d.eventType) ? d.eventType : d, h = d.modifier, p = s.isMoving(f, h) && s.getMovement(f, h), m = s.getStartMousePosition(f, h); + e.enableInputs && t && (p ? (i(e, m, p), activateInertia(e, o)) : r < 1 && maintainInertia( + s, + f, + h, + r, + i, + e, + o + )); + } +} +const scratchZoomPickRay = new Ray(), scratchPickCartesian = new Cartesian3(), scratchZoomOffset = new Cartesian2(), scratchZoomDirection = new Cartesian3(), scratchCenterPixel = new Cartesian2(), scratchCenterPosition = new Cartesian3(), scratchPositionNormal = new Cartesian3(), scratchPickNormal = new Cartesian3(), scratchZoomAxis = new Cartesian3(), scratchCameraPositionNormal = new Cartesian3(), scratchTargetNormal = new Cartesian3(), scratchCameraPosition = new Cartesian3(), scratchCameraUpNormal = new Cartesian3(), scratchCameraRightNormal = new Cartesian3(), scratchForwardNormal = new Cartesian3(), scratchPositionToTarget = new Cartesian3(), scratchPositionToTargetNormal = new Cartesian3(), scratchPan = new Cartesian3(), scratchCenterMovement = new Cartesian3(), scratchCenter$1 = new Cartesian3(), scratchCartesian = new Cartesian3(), scratchCartesianTwo = new Cartesian3(), scratchCartesianThree = new Cartesian3(), scratchZoomViewOptions = { + orientation: new HeadingPitchRoll() +}; +function handleZoom(e, t, n, i, r, o) { + let s = 1; + defined(o) && (s = CesiumMath.clamp( + Math.abs(o), + 0.25, + 1 + )); + const c = n.endPosition.y - n.startPosition.y, d = c > 0 ? e.minimumZoomDistance * s : 0, f = e.maximumZoomDistance, h = r - d; + let p = i * h; + p = CesiumMath.clamp( + p, + e._minimumZoomRate, + e._maximumZoomRate + ); + let m = c / e._scene.canvas.clientHeight; + m = Math.min(m, e.maximumMovementRatio); + let _ = p * m; + if (e.enableCollisionDetection || e.minimumZoomDistance === 0 || !defined(e._globe)) { + if (_ > 0 && Math.abs(r - d) < 1 || _ < 0 && Math.abs(r - f) < 1) + return; + r - _ < d ? _ = r - d - 1 : r - _ > f && (_ = r - f); + } + const y = e._scene, C = y.camera, T = y.mode, x = scratchZoomViewOptions.orientation; + if (x.heading = C.heading, x.pitch = C.pitch, x.roll = C.roll, C.frustum instanceof OrthographicFrustum) { + Math.abs(_) > 0 && (C.zoomIn(_), C._adjustOrthographicFrustum(!0)); + return; + } + const b = defaultValue( + n.inertiaEnabled, + Cartesian2.equals(t, e._zoomMouseStart) + ); + let S = e._zoomingOnVector, E = e._rotatingZoom, A; + if (b || (e._zoomMouseStart = Cartesian2.clone( + t, + e._zoomMouseStart + ), defined(e._globe) && T === SceneMode$1.SCENE2D ? (A = C.getPickRay(t, scratchZoomPickRay).origin, A = Cartesian3.fromElements( + A.y, + A.z, + A.x + )) : defined(e._globe) && (A = pickPosition( + e, + t, + scratchPickCartesian + )), defined(A) ? (e._useZoomWorldPosition = !0, e._zoomWorldPosition = Cartesian3.clone( + A, + e._zoomWorldPosition + )) : e._useZoomWorldPosition = !1, S = e._zoomingOnVector = !1, E = e._rotatingZoom = !1, e._zoomingUnderground = e._cameraUnderground), !e._useZoomWorldPosition) { + C.zoomIn(_); + return; + } + let D = T === SceneMode$1.COLUMBUS_VIEW; + if (C.positionCartographic.height < 2e6 && (E = !0), !b || E) { + if (T === SceneMode$1.SCENE2D) { + const P = e._zoomWorldPosition, I = C.position; + if (!Cartesian3.equals(P, I) && C.positionCartographic.height < e._maxCoord.x * 2) { + const M = C.position.x, R = Cartesian3.subtract( + P, + I, + scratchZoomDirection + ); + Cartesian3.normalize(R, R); + const L = Cartesian3.distance(P, I) * _ / (C.getMagnitude() * 0.5); + C.move(R, L * 0.5), (C.position.x < 0 && M > 0 || C.position.x > 0 && M < 0) && (A = C.getPickRay(t, scratchZoomPickRay).origin, A = Cartesian3.fromElements( + A.y, + A.z, + A.x + ), e._zoomWorldPosition = Cartesian3.clone( + A, + e._zoomWorldPosition + )); + } + } else if (T === SceneMode$1.SCENE3D) { + const P = Cartesian3.normalize( + C.position, + scratchCameraPositionNormal + ); + if (e._cameraUnderground || e._zoomingUnderground || C.positionCartographic.height < 3e3 && Math.abs(Cartesian3.dot(C.direction, P)) < 0.6) + D = !0; + else { + const I = y.canvas, M = scratchCenterPixel; + M.x = I.clientWidth / 2, M.y = I.clientHeight / 2; + const R = pickPosition( + e, + M, + scratchCenterPosition + ); + if (!defined(R)) + D = !0; + else if (C.positionCartographic.height < 1e6) + if (Cartesian3.dot(C.direction, P) >= -0.5) + D = !0; + else { + const L = scratchCameraPosition; + Cartesian3.clone(C.position, L); + const g = e._zoomWorldPosition; + let w = scratchTargetNormal; + if (w = Cartesian3.normalize(g, w), Cartesian3.dot(w, P) < 0) + return; + const O = scratchCenter$1, N = scratchForwardNormal; + Cartesian3.clone(C.direction, N), Cartesian3.add( + L, + Cartesian3.multiplyByScalar(N, 1e3, scratchCartesian), + O + ); + const F = scratchPositionToTarget, B = scratchPositionToTargetNormal; + Cartesian3.subtract(g, L, F), Cartesian3.normalize(F, B); + const V = Cartesian3.dot( + P, + B + ); + if (V >= 0) { + e._zoomMouseStart.x = -1; + return; + } + const U = Math.acos(-V), k = Cartesian3.magnitude(L), $ = Cartesian3.magnitude(g), G = k - _, q = Cartesian3.magnitude( + F + ), z = Math.asin( + CesiumMath.clamp( + q / $ * Math.sin(U), + -1, + 1 + ) + ), H = Math.asin( + CesiumMath.clamp( + G / $ * Math.sin(U), + -1, + 1 + ) + ), Q = z - H + U, ne = scratchCameraUpNormal; + Cartesian3.normalize(L, ne); + let K = scratchCameraRightNormal; + K = Cartesian3.cross(B, ne, K), K = Cartesian3.normalize(K, K), Cartesian3.normalize( + Cartesian3.cross(ne, K, scratchCartesian), + N + ), Cartesian3.multiplyByScalar( + Cartesian3.normalize(O, scratchCartesian), + Cartesian3.magnitude(O) - _, + O + ), Cartesian3.normalize(L, L), Cartesian3.multiplyByScalar( + L, + G, + L + ); + const Z = scratchPan; + Cartesian3.multiplyByScalar( + Cartesian3.add( + Cartesian3.multiplyByScalar( + ne, + Math.cos(Q) - 1, + scratchCartesianTwo + ), + Cartesian3.multiplyByScalar( + N, + Math.sin(Q), + scratchCartesianThree + ), + scratchCartesian + ), + G, + Z + ), Cartesian3.add(L, Z, L), Cartesian3.normalize(O, ne), Cartesian3.normalize( + Cartesian3.cross(ne, K, scratchCartesian), + N + ); + const ee = scratchCenterMovement; + Cartesian3.multiplyByScalar( + Cartesian3.add( + Cartesian3.multiplyByScalar( + ne, + Math.cos(Q) - 1, + scratchCartesianTwo + ), + Cartesian3.multiplyByScalar( + N, + Math.sin(Q), + scratchCartesianThree + ), + scratchCartesian + ), + Cartesian3.magnitude(O), + ee + ), Cartesian3.add(O, ee, O), Cartesian3.clone(L, C.position), Cartesian3.normalize( + Cartesian3.subtract(O, L, scratchCartesian), + C.direction + ), Cartesian3.clone(C.direction, C.direction), Cartesian3.cross(C.direction, C.up, C.right), Cartesian3.cross(C.right, C.direction, C.up), C.setView(scratchZoomViewOptions); + return; + } + else { + const L = Cartesian3.normalize( + R, + scratchPositionNormal + ), g = Cartesian3.normalize( + e._zoomWorldPosition, + scratchPickNormal + ), w = Cartesian3.dot(g, L); + if (w > 0 && w < 1) { + const O = CesiumMath.acosClamped(w), N = Cartesian3.cross( + g, + L, + scratchZoomAxis + ), F = Math.abs(O) > CesiumMath.toRadians(20) ? C.positionCartographic.height * 0.75 : C.positionCartographic.height - _, B = _ / F; + C.rotate(N, O * B); + } + } + } + } + e._rotatingZoom = !D; + } + if (!b && D || S) { + let P; + const I = SceneTransforms.worldToWindowCoordinates( + y, + e._zoomWorldPosition, + scratchZoomOffset + ); + T !== SceneMode$1.COLUMBUS_VIEW && Cartesian2.equals(t, e._zoomMouseStart) && defined(I) ? P = C.getPickRay(I, scratchZoomPickRay) : P = C.getPickRay(t, scratchZoomPickRay); + const M = P.direction; + (T === SceneMode$1.COLUMBUS_VIEW || T === SceneMode$1.SCENE2D) && Cartesian3.fromElements( + M.y, + M.z, + M.x, + M + ), C.move(M, _), e._zoomingOnVector = !0; + } else + C.zoomIn(_); + e._cameraUnderground || C.setView(scratchZoomViewOptions); +} +const translate2DStart = new Ray(), translate2DEnd = new Ray(), scratchTranslateP0 = new Cartesian3(); +function translate2D(e, t, n) { + const r = e._scene.camera; + let o = r.getPickRay(n.startPosition, translate2DStart).origin, s = r.getPickRay(n.endPosition, translate2DEnd).origin; + o = Cartesian3.fromElements(o.y, o.z, o.x, o), s = Cartesian3.fromElements(s.y, s.z, s.x, s); + const c = Cartesian3.subtract(o, s, scratchTranslateP0), l = Cartesian3.magnitude(c); + l > 0 && (Cartesian3.normalize(c, c), r.move(c, l)); +} +function zoom2D(e, t, n) { + defined(n.distance) && (n = n.distance); + const r = e._scene.camera; + handleZoom( + e, + t, + n, + e.zoomFactor, + r.getMagnitude() + ); +} +const twist2DStart = new Cartesian2(), twist2DEnd = new Cartesian2(); +function twist2D(e, t, n) { + if (defined(n.angleAndHeight)) { + singleAxisTwist2D(e, t, n.angleAndHeight); + return; + } + const i = e._scene, r = i.camera, o = i.canvas, s = o.clientWidth, c = o.clientHeight; + let l = twist2DStart; + l.x = 2 / s * n.startPosition.x - 1, l.y = 2 / c * (c - n.startPosition.y) - 1, l = Cartesian2.normalize(l, l); + let d = twist2DEnd; + d.x = 2 / s * n.endPosition.x - 1, d.y = 2 / c * (c - n.endPosition.y) - 1, d = Cartesian2.normalize(d, d); + let f = CesiumMath.acosClamped(l.x); + l.y < 0 && (f = CesiumMath.TWO_PI - f); + let h = CesiumMath.acosClamped(d.x); + d.y < 0 && (h = CesiumMath.TWO_PI - h); + const p = h - f; + r.twistRight(p); +} +function singleAxisTwist2D(e, t, n) { + let i = e._rotateFactor * e._rotateRateRangeAdjustment; + i > e._maximumRotateRate && (i = e._maximumRotateRate), i < e._minimumRotateRate && (i = e._minimumRotateRate); + const r = e._scene, o = r.camera, s = r.canvas; + let c = (n.endPosition.x - n.startPosition.x) / s.clientWidth; + c = Math.min(c, e.maximumMovementRatio); + const l = i * c * Math.PI * 4; + o.twistRight(l); +} +function update2D(e) { + const t = e._scene.mapMode2D === MapMode2D$1.ROTATE; + Matrix4.equals(Matrix4.IDENTITY, e._scene.camera.transform) ? (reactToInput( + e, + e.enableTranslate, + e.translateEventTypes, + translate2D, + e.inertiaTranslate, + "_lastInertiaTranslateMovement" + ), reactToInput( + e, + e.enableZoom, + e.zoomEventTypes, + zoom2D, + e.inertiaZoom, + "_lastInertiaZoomMovement" + ), t && reactToInput( + e, + e.enableRotate, + e.tiltEventTypes, + twist2D, + e.inertiaSpin, + "_lastInertiaTiltMovement" + )) : (reactToInput( + e, + e.enableZoom, + e.zoomEventTypes, + zoom2D, + e.inertiaZoom, + "_lastInertiaZoomMovement" + ), t && reactToInput( + e, + e.enableRotate, + e.translateEventTypes, + twist2D, + e.inertiaSpin, + "_lastInertiaSpinMovement" + )); +} +const pickGlobeScratchRay = new Ray(), scratchDepthIntersection = new Cartesian3(), scratchRayIntersection = new Cartesian3(); +function pickPosition(e, t, n) { + const i = e._scene, r = e._globe, o = i.camera; + let s; + if (i.pickPositionSupported && (s = i.pickPositionWorldCoordinates( + t, + scratchDepthIntersection + )), !defined(r)) + return Cartesian3.clone(s, n); + const c = !e._cameraUnderground, l = o.getPickRay(t, pickGlobeScratchRay), d = r.pickWorldCoordinates( + l, + i, + c, + scratchRayIntersection + ), f = defined(s) ? Cartesian3.distance(s, o.positionWC) : Number.POSITIVE_INFINITY, h = defined(d) ? Cartesian3.distance(d, o.positionWC) : Number.POSITIVE_INFINITY; + return f < h ? Cartesian3.clone(s, n) : Cartesian3.clone(d, n); +} +const scratchDistanceCartographic = new Cartographic(); +function getDistanceFromSurface(e) { + const t = e._ellipsoid, n = e._scene, i = n.camera, r = n.mode; + let o = 0; + if (r === SceneMode$1.SCENE3D) { + const l = t.cartesianToCartographic( + i.position, + scratchDistanceCartographic + ); + defined(l) && (o = l.height); + } else + o = i.position.z; + const s = defaultValue(e._scene.globeHeight, 0); + return Math.abs(s - o); +} +const scratchSurfaceNormal = new Cartesian3(); +function getZoomDistanceUnderground(e, t) { + const n = t.origin, i = t.direction, r = getDistanceFromSurface(e), o = Cartesian3.normalize(n, scratchSurfaceNormal); + let s = Math.abs(Cartesian3.dot(o, i)); + return s = Math.max(s, 0.5) * 2, r * s; +} +function getTiltCenterUnderground(e, t, n, i) { + let r = Cartesian3.distance(t.origin, n); + const o = getDistanceFromSurface(e), s = CesiumMath.clamp( + o * 5, + e._minimumUndergroundPickDistance, + e._maximumUndergroundPickDistance + ); + return r > s && (r = Math.min(r, o / 5), r = Math.max(r, 100)), Ray.getPoint(t, r, i); +} +function getStrafeStartPositionUnderground(e, t, n, i) { + let r; + return defined(n) ? (r = Cartesian3.distance(t.origin, n), r > e._maximumUndergroundPickDistance && (r = getDistanceFromSurface(e))) : r = getDistanceFromSurface(e), Ray.getPoint(t, r, i); +} +const scratchInertialDelta = new Cartesian2(); +function continueStrafing(e, t) { + const n = t.endPosition, i = Cartesian2.subtract( + t.endPosition, + t.startPosition, + scratchInertialDelta + ), r = e._strafeEndMousePosition; + Cartesian2.add(r, i, r), t.endPosition = r, strafe(e, t, e._strafeStartPosition), t.endPosition = n; +} +const translateCVStartRay = new Ray(), translateCVEndRay = new Ray(), translateCVStartPos = new Cartesian3(), translateCVEndPos = new Cartesian3(), translateCVDifference = new Cartesian3(), translateCVOrigin = new Cartesian3(), translateCVPlane = new Plane(Cartesian3.UNIT_X, 0), translateCVStartMouse = new Cartesian2(), translateCVEndMouse = new Cartesian2(); +function translateCV(e, t, n) { + if (Cartesian3.equals(t, e._translateMousePosition) || (e._looking = !1), Cartesian3.equals(t, e._strafeMousePosition) || (e._strafing = !1), e._looking) { + look3D(e, t, n); + return; + } + if (e._strafing) { + continueStrafing(e, n); + return; + } + const r = e._scene.camera, o = e._cameraUnderground, s = Cartesian2.clone( + n.startPosition, + translateCVStartMouse + ), c = Cartesian2.clone(n.endPosition, translateCVEndMouse); + let l = r.getPickRay(s, translateCVStartRay); + const d = Cartesian3.clone(Cartesian3.ZERO, translateCVOrigin), f = Cartesian3.UNIT_X; + let h; + if (r.position.z < e._minimumPickingTerrainHeight && (h = pickPosition(e, s, translateCVStartPos), defined(h) && (d.x = h.x)), o || d.x > r.position.z && defined(h)) { + let b = h; + o && (b = getStrafeStartPositionUnderground( + e, + l, + h, + translateCVStartPos + )), Cartesian2.clone(t, e._strafeMousePosition), Cartesian2.clone(t, e._strafeEndMousePosition), Cartesian3.clone(b, e._strafeStartPosition), e._strafing = !0, strafe(e, n, e._strafeStartPosition); + return; + } + const p = Plane.fromPointNormal(d, f, translateCVPlane); + l = r.getPickRay(s, translateCVStartRay); + const m = IntersectionTests.rayPlane( + l, + p, + translateCVStartPos + ), _ = r.getPickRay(c, translateCVEndRay), y = IntersectionTests.rayPlane( + _, + p, + translateCVEndPos + ); + if (!defined(m) || !defined(y)) { + e._looking = !0, look3D(e, t, n), Cartesian2.clone(t, e._translateMousePosition); + return; + } + const C = Cartesian3.subtract( + m, + y, + translateCVDifference + ), T = C.x; + C.x = C.y, C.y = C.z, C.z = T; + const x = Cartesian3.magnitude(C); + x > CesiumMath.EPSILON6 && (Cartesian3.normalize(C, C), r.move(C, x)); +} +const rotateCVWindowPos = new Cartesian2(), rotateCVWindowRay = new Ray(), rotateCVCenter = new Cartesian3(), rotateCVVerticalCenter = new Cartesian3(), rotateCVTransform = new Matrix4(), rotateCVVerticalTransform = new Matrix4(), rotateCVOrigin = new Cartesian3(), rotateCVPlane = new Plane(Cartesian3.UNIT_X, 0), rotateCVCartesian3 = new Cartesian3(), rotateCVCart = new Cartographic(), rotateCVOldTransform = new Matrix4(), rotateCVQuaternion = new Quaternion(), rotateCVMatrix = new Matrix3(), tilt3DCartesian3 = new Cartesian3(); +function rotateCV(e, t, n) { + if (defined(n.angleAndHeight) && (n = n.angleAndHeight), Cartesian2.equals(t, e._tiltCenterMousePosition) || (e._tiltCVOffMap = !1, e._looking = !1), e._looking) { + look3D(e, t, n); + return; + } + const r = e._scene.camera; + e._tiltCVOffMap || !e.onMap() || Math.abs(r.position.z) > e._minimumPickingTerrainHeight ? (e._tiltCVOffMap = !0, rotateCVOnPlane(e, t, n)) : rotateCVOnTerrain(e, t, n); +} +function rotateCVOnPlane(e, t, n) { + const i = e._scene, r = i.camera, o = i.canvas, s = rotateCVWindowPos; + s.x = o.clientWidth / 2, s.y = o.clientHeight / 2; + const c = r.getPickRay(s, rotateCVWindowRay), l = Cartesian3.UNIT_X, d = c.origin, f = c.direction; + let h; + const p = Cartesian3.dot(l, f); + if (Math.abs(p) > CesiumMath.EPSILON6 && (h = -Cartesian3.dot(l, d) / p), !defined(h) || h <= 0) { + e._looking = !0, look3D(e, t, n), Cartesian2.clone(t, e._tiltCenterMousePosition); + return; + } + const m = Cartesian3.multiplyByScalar(f, h, rotateCVCenter); + Cartesian3.add(d, m, m); + const _ = i.mapProjection, y = _.ellipsoid; + Cartesian3.fromElements(m.y, m.z, m.x, m); + const C = _.unproject(m, rotateCVCart); + y.cartographicToCartesian(C, m); + const T = Transforms.eastNorthUpToFixedFrame( + m, + y, + rotateCVTransform + ), x = e._globe, b = e._ellipsoid; + e._globe = void 0, e._ellipsoid = Ellipsoid.UNIT_SPHERE, e._rotateFactor = 1, e._rotateRateRangeAdjustment = 1; + const S = Matrix4.clone(r.transform, rotateCVOldTransform); + r._setTransform(T), rotate3D(e, t, n, Cartesian3.UNIT_Z), r._setTransform(S), e._globe = x, e._ellipsoid = b; + const E = b.maximumRadius; + e._rotateFactor = 1 / E, e._rotateRateRangeAdjustment = E; +} +function rotateCVOnTerrain(e, t, n) { + const i = e._scene, r = i.camera, o = e._cameraUnderground; + let s, c; + const l = Cartesian3.UNIT_X; + if (Cartesian2.equals(t, e._tiltCenterMousePosition)) + s = Cartesian3.clone(e._tiltCenter, rotateCVCenter); + else { + if (r.position.z < e._minimumPickingTerrainHeight && (s = pickPosition(e, t, rotateCVCenter)), !defined(s)) { + c = r.getPickRay(t, rotateCVWindowRay); + const R = c.origin, L = c.direction; + let g; + const w = Cartesian3.dot(l, L); + if (Math.abs(w) > CesiumMath.EPSILON6 && (g = -Cartesian3.dot(l, R) / w), !defined(g) || g <= 0) { + e._looking = !0, look3D(e, t, n), Cartesian2.clone(t, e._tiltCenterMousePosition); + return; + } + s = Cartesian3.multiplyByScalar(L, g, rotateCVCenter), Cartesian3.add(R, s, s); + } + o && (defined(c) || (c = r.getPickRay(t, rotateCVWindowRay)), getTiltCenterUnderground(e, c, s, s)), Cartesian2.clone(t, e._tiltCenterMousePosition), Cartesian3.clone(s, e._tiltCenter); + } + const d = i.canvas, f = rotateCVWindowPos; + f.x = d.clientWidth / 2, f.y = e._tiltCenterMousePosition.y, c = r.getPickRay(f, rotateCVWindowRay); + const h = Cartesian3.clone(Cartesian3.ZERO, rotateCVOrigin); + h.x = s.x; + const p = Plane.fromPointNormal(h, l, rotateCVPlane), m = IntersectionTests.rayPlane( + c, + p, + rotateCVVerticalCenter + ), _ = r._projection, y = _.ellipsoid; + Cartesian3.fromElements(s.y, s.z, s.x, s); + let C = _.unproject(s, rotateCVCart); + y.cartographicToCartesian(C, s); + const T = Transforms.eastNorthUpToFixedFrame( + s, + y, + rotateCVTransform + ); + let x; + defined(m) ? (Cartesian3.fromElements( + m.y, + m.z, + m.x, + m + ), C = _.unproject(m, rotateCVCart), y.cartographicToCartesian(C, m), x = Transforms.eastNorthUpToFixedFrame( + m, + y, + rotateCVVerticalTransform + )) : x = T; + const b = e._globe, S = e._ellipsoid; + e._globe = void 0, e._ellipsoid = Ellipsoid.UNIT_SPHERE, e._rotateFactor = 1, e._rotateRateRangeAdjustment = 1; + let E = Cartesian3.UNIT_Z; + const A = Matrix4.clone(r.transform, rotateCVOldTransform); + r._setTransform(T); + const D = Cartesian3.cross( + Cartesian3.UNIT_Z, + Cartesian3.normalize(r.position, rotateCVCartesian3), + rotateCVCartesian3 + ), P = Cartesian3.dot(r.right, D); + if (rotate3D(e, t, n, E, !1, !0), r._setTransform(x), P < 0) { + const R = n.startPosition.y - n.endPosition.y; + (o && R < 0 || !o && R > 0) && (E = void 0); + const L = r.constrainedAxis; + r.constrainedAxis = void 0, rotate3D(e, t, n, E, !0, !1), r.constrainedAxis = L; + } else + rotate3D(e, t, n, E, !0, !1); + if (defined(r.constrainedAxis)) { + const R = Cartesian3.cross( + r.direction, + r.constrainedAxis, + tilt3DCartesian3 + ); + Cartesian3.equalsEpsilon(R, Cartesian3.ZERO, CesiumMath.EPSILON6) || (Cartesian3.dot(R, r.right) < 0 && Cartesian3.negate(R, R), Cartesian3.cross(R, r.direction, r.up), Cartesian3.cross(r.direction, r.up, r.right), Cartesian3.normalize(r.up, r.up), Cartesian3.normalize(r.right, r.right)); + } + r._setTransform(A), e._globe = b, e._ellipsoid = S; + const I = S.maximumRadius; + e._rotateFactor = 1 / I, e._rotateRateRangeAdjustment = I; + const M = Cartesian3.clone( + r.positionWC, + rotateCVCartesian3 + ); + if (e.enableCollisionDetection && adjustHeightForTerrain(e, !0), !Cartesian3.equals(r.positionWC, M)) { + r._setTransform(x), r.worldToCameraCoordinatesPoint(M, M); + const R = Cartesian3.magnitudeSquared(M); + Cartesian3.magnitudeSquared(r.position) > R && (Cartesian3.normalize(r.position, r.position), Cartesian3.multiplyByScalar( + r.position, + Math.sqrt(R), + r.position + )); + const L = Cartesian3.angleBetween(M, r.position), g = Cartesian3.cross( + M, + r.position, + M + ); + Cartesian3.normalize(g, g); + const w = Quaternion.fromAxisAngle( + g, + L, + rotateCVQuaternion + ), O = Matrix3.fromQuaternion(w, rotateCVMatrix); + Matrix3.multiplyByVector(O, r.direction, r.direction), Matrix3.multiplyByVector(O, r.up, r.up), Cartesian3.cross(r.direction, r.up, r.right), Cartesian3.cross(r.right, r.direction, r.up), r._setTransform(A); + } +} +const zoomCVWindowPos = new Cartesian2(), zoomCVWindowRay = new Ray(), zoomCVIntersection = new Cartesian3(); +function zoomCV(e, t, n) { + defined(n.distance) && (n = n.distance); + const i = e._scene, r = i.camera, o = i.canvas, s = e._cameraUnderground; + let c; + s ? c = t : (c = zoomCVWindowPos, c.x = o.clientWidth / 2, c.y = o.clientHeight / 2); + const l = r.getPickRay(c, zoomCVWindowRay), d = l.origin, f = l.direction, h = r.position.z; + let p; + h < e._minimumPickingTerrainHeight && (p = pickPosition(e, c, zoomCVIntersection)); + let m; + if (defined(p) && (m = Cartesian3.distance(d, p)), s) { + const _ = getZoomDistanceUnderground( + e, + l + ); + defined(m) ? m = Math.min(m, _) : m = _; + } + if (!defined(m)) { + const _ = Cartesian3.UNIT_X; + m = -Cartesian3.dot(_, d) / Cartesian3.dot(_, f); + } + handleZoom( + e, + t, + n, + e.zoomFactor, + m + ); +} +function updateCV(e) { + const n = e._scene.camera; + if (!Matrix4.equals(Matrix4.IDENTITY, n.transform)) + reactToInput( + e, + e.enableRotate, + e.rotateEventTypes, + rotate3D, + e.inertiaSpin, + "_lastInertiaSpinMovement" + ), reactToInput( + e, + e.enableZoom, + e.zoomEventTypes, + zoom3D, + e.inertiaZoom, + "_lastInertiaZoomMovement" + ); + else { + const i = e._tweens; + if (e._aggregator.anyButtonDown && i.removeAll(), reactToInput( + e, + e.enableTilt, + e.tiltEventTypes, + rotateCV, + e.inertiaSpin, + "_lastInertiaTiltMovement" + ), reactToInput( + e, + e.enableTranslate, + e.translateEventTypes, + translateCV, + e.inertiaTranslate, + "_lastInertiaTranslateMovement" + ), reactToInput( + e, + e.enableZoom, + e.zoomEventTypes, + zoomCV, + e.inertiaZoom, + "_lastInertiaZoomMovement" + ), reactToInput( + e, + e.enableLook, + e.lookEventTypes, + look3D + ), !e._aggregator.anyButtonDown && !i.contains(e._tween)) { + const r = n.createCorrectPositionTween( + e.bounceAnimationTime + ); + defined(r) && (e._tween = i.add(r)); + } + i.update(); + } +} +const scratchStrafeRay = new Ray(), scratchStrafePlane = new Plane(Cartesian3.UNIT_X, 0), scratchStrafeIntersection = new Cartesian3(), scratchStrafeDirection = new Cartesian3(); +function strafe(e, t, n) { + const i = e._scene, r = i.camera, o = r.getPickRay(t.endPosition, scratchStrafeRay); + let s = Cartesian3.clone(r.direction, scratchStrafeDirection); + i.mode === SceneMode$1.COLUMBUS_VIEW && Cartesian3.fromElements(s.z, s.x, s.y, s); + const c = Plane.fromPointNormal( + n, + s, + scratchStrafePlane + ), l = IntersectionTests.rayPlane( + o, + c, + scratchStrafeIntersection + ); + defined(l) && (s = Cartesian3.subtract(n, l, s), i.mode === SceneMode$1.COLUMBUS_VIEW && Cartesian3.fromElements(s.y, s.z, s.x, s), Cartesian3.add(r.position, s, r.position)); +} +const spin3DPick = new Cartesian3(), scratchCartographic = new Cartographic(), scratchRadii = new Cartesian3(), scratchEllipsoid = new Ellipsoid(), scratchLookUp = new Cartesian3(), scratchNormal$1 = new Cartesian3(), scratchMousePosition = new Cartesian3(); +function spin3D(e, t, n) { + const r = e._scene.camera, o = e._cameraUnderground; + let s = e._ellipsoid; + if (!Matrix4.equals(r.transform, Matrix4.IDENTITY)) { + rotate3D(e, t, n); + return; + } + let c, l; + const d = s.geodeticSurfaceNormal(r.position, scratchLookUp); + if (Cartesian2.equals(t, e._rotateMousePosition)) { + if (e._looking) + look3D(e, t, n, d); + else if (e._rotating) + rotate3D(e, t, n); + else if (e._strafing) + continueStrafing(e, n); + else { + if (Cartesian3.magnitude(r.position) < Cartesian3.magnitude(e._rotateStartPosition)) + return; + c = Cartesian3.magnitude(e._rotateStartPosition), l = scratchRadii, l.x = l.y = l.z = c, s = Ellipsoid.fromCartesian3(l, scratchEllipsoid), pan3D(e, t, n, s); + } + return; + } + e._looking = !1, e._rotating = !1, e._strafing = !1; + const f = s.cartesianToCartographic( + r.positionWC, + scratchCartographic + ).height, h = e._globe; + if (defined(h) && f < e._minimumPickingTerrainHeight) { + const p = pickPosition( + e, + n.startPosition, + scratchMousePosition + ); + if (defined(p)) { + let m = !1; + const _ = r.getPickRay( + n.startPosition, + pickGlobeScratchRay + ); + if (o) + m = !0, getStrafeStartPositionUnderground(e, _, p, p); + else { + const y = s.geodeticSurfaceNormal(p, scratchNormal$1); + Math.abs(Cartesian3.dot(_.direction, y)) < 0.05 ? m = !0 : m = Cartesian3.magnitude(r.position) < Cartesian3.magnitude(p); + } + m ? (Cartesian2.clone(t, e._strafeEndMousePosition), Cartesian3.clone(p, e._strafeStartPosition), e._strafing = !0, strafe(e, n, e._strafeStartPosition)) : (c = Cartesian3.magnitude(p), l = scratchRadii, l.x = l.y = l.z = c, s = Ellipsoid.fromCartesian3(l, scratchEllipsoid), pan3D(e, t, n, s), Cartesian3.clone(p, e._rotateStartPosition)); + } else + e._looking = !0, look3D(e, t, n, d); + } else defined( + r.pickEllipsoid( + n.startPosition, + e._ellipsoid, + spin3DPick + ) + ) ? (pan3D(e, t, n, e._ellipsoid), Cartesian3.clone(spin3DPick, e._rotateStartPosition)) : f > e._minimumTrackBallHeight ? (e._rotating = !0, rotate3D(e, t, n)) : (e._looking = !0, look3D(e, t, n, d)); + Cartesian2.clone(t, e._rotateMousePosition); +} +function rotate3D(e, t, n, i, r, o) { + r = defaultValue(r, !1), o = defaultValue(o, !1); + const s = e._scene, c = s.camera, l = s.canvas, d = c.constrainedAxis; + defined(i) && (c.constrainedAxis = i); + const f = Cartesian3.magnitude(c.position); + let h = e._rotateFactor * (f - e._rotateRateRangeAdjustment); + h > e._maximumRotateRate && (h = e._maximumRotateRate), h < e._minimumRotateRate && (h = e._minimumRotateRate); + let p = (n.startPosition.x - n.endPosition.x) / l.clientWidth, m = (n.startPosition.y - n.endPosition.y) / l.clientHeight; + p = Math.min(p, e.maximumMovementRatio), m = Math.min( + m, + e.maximumMovementRatio + ); + const _ = h * p * Math.PI * 2, y = h * m * Math.PI; + r || c.rotateRight(_), o || c.rotateUp(y), c.constrainedAxis = d; +} +const pan3DP0 = Cartesian4.clone(Cartesian4.UNIT_W), pan3DP1 = Cartesian4.clone(Cartesian4.UNIT_W), pan3DTemp0 = new Cartesian3(), pan3DTemp1 = new Cartesian3(), pan3DTemp2 = new Cartesian3(), pan3DTemp3 = new Cartesian3(), pan3DStartMousePosition = new Cartesian2(), pan3DEndMousePosition = new Cartesian2(), pan3DDiffMousePosition = new Cartesian2(), pan3DPixelDimensions = new Cartesian2(), panRay = new Ray(); +function pan3D(e, t, n, i) { + const r = e._scene, o = r.camera, s = Cartesian2.clone( + n.startPosition, + pan3DStartMousePosition + ), c = Cartesian2.clone( + n.endPosition, + pan3DEndMousePosition + ), l = i.cartesianToCartographic( + o.positionWC, + scratchCartographic + ).height; + let d, f; + if (!n.inertiaEnabled && l < e._minimumPickingTerrainHeight && (d = Cartesian3.clone(e._panLastWorldPosition, pan3DP0), !defined(e._globe) && !Cartesian2.equalsEpsilon( + s, + e._panLastMousePosition + ) && (d = pickPosition(e, s, pan3DP0)), !defined(e._globe) && defined(d))) { + const h = Cartesian3.subtract(d, o.positionWC, pan3DTemp1), p = Cartesian3.multiplyByScalar( + o.directionWC, + Cartesian3.dot(o.directionWC, h), + pan3DTemp1 + ), m = Cartesian3.magnitude(p), _ = o.frustum.getPixelDimensions( + r.drawingBufferWidth, + r.drawingBufferHeight, + m, + r.pixelRatio, + pan3DPixelDimensions + ), y = Cartesian2.subtract( + c, + s, + pan3DDiffMousePosition + ), C = Cartesian3.multiplyByScalar( + o.rightWC, + y.x * _.x, + pan3DTemp1 + ), T = Cartesian3.normalize( + o.positionWC, + scratchCameraPositionNormal + ), x = o.getPickRay(c, panRay).direction, b = Cartesian3.subtract( + x, + Cartesian3.projectVector(x, o.rightWC, pan3DTemp2), + pan3DTemp2 + ), S = Cartesian3.angleBetween(b, o.directionWC); + let E = 1; + defined(o.frustum.fov) && (E = Math.max(Math.tan(S), 0.1)); + let A = Math.abs( + Cartesian3.dot(o.directionWC, T) + ); + const D = -y.y * _.y * 2 / Math.sqrt(E) * (1 - A), P = Cartesian3.multiplyByScalar( + x, + D, + pan3DTemp2 + ); + A = Math.abs(Cartesian3.dot(o.upWC, T)); + const I = Cartesian3.multiplyByScalar( + o.upWC, + -y.y * (1 - A) * _.y, + pan3DTemp3 + ); + f = Cartesian3.add(d, C, pan3DP1), f = Cartesian3.add(f, P, f), f = Cartesian3.add(f, I, f), Cartesian3.clone(f, e._panLastWorldPosition), Cartesian2.clone(c, e._panLastMousePosition); + } + if ((!defined(d) || !defined(f)) && (d = o.pickEllipsoid(s, i, pan3DP0), f = o.pickEllipsoid(c, i, pan3DP1)), !defined(d) || !defined(f)) { + e._rotating = !0, rotate3D(e, t, n); + return; + } + if (d = o.worldToCameraCoordinates(d, d), f = o.worldToCameraCoordinates(f, f), defined(o.constrainedAxis)) { + const h = o.constrainedAxis, p = Cartesian3.mostOrthogonalAxis(h, pan3DTemp0); + Cartesian3.cross(p, h, p), Cartesian3.normalize(p, p); + const m = Cartesian3.cross(h, p, pan3DTemp1), _ = Cartesian3.magnitude(d), y = Cartesian3.dot(h, d), C = Math.acos(y / _), T = Cartesian3.multiplyByScalar(h, y, pan3DTemp2); + Cartesian3.subtract(d, T, T), Cartesian3.normalize(T, T); + const x = Cartesian3.magnitude(f), b = Cartesian3.dot(h, f), S = Math.acos(b / x), E = Cartesian3.multiplyByScalar(h, b, pan3DTemp3); + Cartesian3.subtract(f, E, E), Cartesian3.normalize(E, E); + let A = Math.acos(Cartesian3.dot(T, p)); + Cartesian3.dot(T, m) < 0 && (A = CesiumMath.TWO_PI - A); + let D = Math.acos(Cartesian3.dot(E, p)); + Cartesian3.dot(E, m) < 0 && (D = CesiumMath.TWO_PI - D); + const P = A - D; + let I; + Cartesian3.equalsEpsilon(h, o.position, CesiumMath.EPSILON2) ? I = o.right : I = Cartesian3.cross(h, o.position, pan3DTemp0); + const M = Cartesian3.cross(h, I, pan3DTemp0), R = Cartesian3.dot( + M, + Cartesian3.subtract(d, h, pan3DTemp1) + ), L = Cartesian3.dot( + M, + Cartesian3.subtract(f, h, pan3DTemp1) + ); + let g; + R > 0 && L > 0 ? g = S - C : R > 0 && L <= 0 ? Cartesian3.dot(o.position, h) > 0 ? g = -C - S : g = C + S : g = C - S, o.rotateRight(P), o.rotateUp(g); + } else { + Cartesian3.normalize(d, d), Cartesian3.normalize(f, f); + const h = Cartesian3.dot(d, f), p = Cartesian3.cross(d, f, pan3DTemp0); + if (h < 1 && !Cartesian3.equalsEpsilon(p, Cartesian3.ZERO, CesiumMath.EPSILON14)) { + const m = Math.acos(h); + o.rotate(p, m); + } + } +} +const zoom3DUnitPosition = new Cartesian3(), zoom3DCartographic = new Cartographic(); +let preIntersectionDistance = 0; +function zoom3D(e, t, n) { + defined(n.distance) && (n = n.distance); + const i = n.inertiaEnabled, r = e._ellipsoid, o = e._scene, s = o.camera, c = o.canvas, l = e._cameraUnderground; + let d; + l ? d = t : (d = zoomCVWindowPos, d.x = c.clientWidth / 2, d.y = c.clientHeight / 2); + const f = s.getPickRay(d, zoomCVWindowRay); + let h; + const p = r.cartesianToCartographic( + s.position, + zoom3DCartographic + ).height, m = Math.abs(preIntersectionDistance) < e.minimumPickingTerrainDistanceWithInertia; + (i ? m : p < e._minimumPickingTerrainHeight) && (h = pickPosition(e, d, zoomCVIntersection)); + let y; + if (defined(h) && (y = Cartesian3.distance(f.origin, h), preIntersectionDistance = y), l) { + const T = getZoomDistanceUnderground( + e, + f + ); + defined(y) ? y = Math.min(y, T) : y = T; + } + defined(y) || (y = p); + const C = Cartesian3.normalize( + s.position, + zoom3DUnitPosition + ); + handleZoom( + e, + t, + n, + e.zoomFactor, + y, + Cartesian3.dot(C, s.direction) + ); +} +const tilt3DWindowPos = new Cartesian2(), tilt3DRay = new Ray(), tilt3DCenter = new Cartesian3(), tilt3DVerticalCenter = new Cartesian3(), tilt3DTransform = new Matrix4(), tilt3DVerticalTransform = new Matrix4(), tilt3DOldTransform = new Matrix4(), tilt3DQuaternion = new Quaternion(), tilt3DMatrix = new Matrix3(), tilt3DCart = new Cartographic(), tilt3DLookUp = new Cartesian3(); +function tilt3D(e, t, n) { + const r = e._scene.camera; + if (!Matrix4.equals(r.transform, Matrix4.IDENTITY)) + return; + if (defined(n.angleAndHeight) && (n = n.angleAndHeight), Cartesian2.equals(t, e._tiltCenterMousePosition) || (e._tiltOnEllipsoid = !1, e._looking = !1), e._looking) { + const c = e._ellipsoid.geodeticSurfaceNormal( + r.position, + tilt3DLookUp + ); + look3D(e, t, n, c); + return; + } + const s = e._ellipsoid.cartesianToCartographic( + r.position, + tilt3DCart + ); + e._tiltOnEllipsoid || s.height > e._minimumCollisionTerrainHeight ? (e._tiltOnEllipsoid = !0, tilt3DOnEllipsoid(e, t, n)) : tilt3DOnTerrain(e, t, n); +} +const tilt3DOnEllipsoidCartographic = new Cartographic(); +function tilt3DOnEllipsoid(e, t, n) { + const i = e._ellipsoid, r = e._scene, o = r.camera, s = e.minimumZoomDistance * 0.25, c = i.cartesianToCartographic( + o.positionWC, + tilt3DOnEllipsoidCartographic + ).height; + if (c - s - 1 < CesiumMath.EPSILON3 && n.endPosition.y - n.startPosition.y < 0) + return; + const l = r.canvas, d = tilt3DWindowPos; + d.x = l.clientWidth / 2, d.y = l.clientHeight / 2; + const f = o.getPickRay(d, tilt3DRay); + let h; + const p = IntersectionTests.rayEllipsoid(f, i); + if (defined(p)) + h = Ray.getPoint(f, p.start, tilt3DCenter); + else if (c > e._minimumTrackBallHeight) { + const x = IntersectionTests.grazingAltitudeLocation( + f, + i + ); + if (!defined(x)) + return; + const b = i.cartesianToCartographic( + x, + tilt3DCart + ); + b.height = 0, h = i.cartographicToCartesian( + b, + tilt3DCenter + ); + } else { + e._looking = !0; + const x = e._ellipsoid.geodeticSurfaceNormal( + o.position, + tilt3DLookUp + ); + look3D(e, t, n, x), Cartesian2.clone(t, e._tiltCenterMousePosition); + return; + } + const m = Transforms.eastNorthUpToFixedFrame( + h, + i, + tilt3DTransform + ), _ = e._globe, y = e._ellipsoid; + e._globe = void 0, e._ellipsoid = Ellipsoid.UNIT_SPHERE, e._rotateFactor = 1, e._rotateRateRangeAdjustment = 1; + const C = Matrix4.clone(o.transform, tilt3DOldTransform); + o._setTransform(m), rotate3D(e, t, n, Cartesian3.UNIT_Z), o._setTransform(C), e._globe = _, e._ellipsoid = y; + const T = y.maximumRadius; + e._rotateFactor = 1 / T, e._rotateRateRangeAdjustment = T; +} +function tilt3DOnTerrain(e, t, n) { + const i = e._ellipsoid, r = e._scene, o = r.camera, s = e._cameraUnderground; + let c, l, d; + if (Cartesian2.equals(t, e._tiltCenterMousePosition)) + c = Cartesian3.clone(e._tiltCenter, tilt3DCenter); + else { + if (c = pickPosition(e, t, tilt3DCenter), !defined(c)) { + if (l = o.getPickRay(t, tilt3DRay), d = IntersectionTests.rayEllipsoid(l, i), !defined(d)) { + if (i.cartesianToCartographic( + o.position, + tilt3DCart + ).height <= e._minimumTrackBallHeight) { + e._looking = !0; + const L = e._ellipsoid.geodeticSurfaceNormal( + o.position, + tilt3DLookUp + ); + look3D(e, t, n, L), Cartesian2.clone(t, e._tiltCenterMousePosition); + } + return; + } + c = Ray.getPoint(l, d.start, tilt3DCenter); + } + s && (defined(l) || (l = o.getPickRay(t, tilt3DRay)), getTiltCenterUnderground(e, l, c, c)), Cartesian2.clone(t, e._tiltCenterMousePosition), Cartesian3.clone(c, e._tiltCenter); + } + const f = r.canvas, h = tilt3DWindowPos; + h.x = f.clientWidth / 2, h.y = e._tiltCenterMousePosition.y, l = o.getPickRay(h, tilt3DRay); + const p = Cartesian3.magnitude(c), m = Cartesian3.fromElements(p, p, p, scratchRadii), _ = Ellipsoid.fromCartesian3(m, scratchEllipsoid); + if (d = IntersectionTests.rayEllipsoid(l, _), !defined(d)) + return; + const y = Cartesian3.magnitude(l.origin) > p ? d.start : d.stop, C = Ray.getPoint(l, y, tilt3DVerticalCenter), T = Transforms.eastNorthUpToFixedFrame( + c, + i, + tilt3DTransform + ), x = Transforms.eastNorthUpToFixedFrame( + C, + _, + tilt3DVerticalTransform + ), b = e._globe, S = e._ellipsoid; + e._globe = void 0, e._ellipsoid = Ellipsoid.UNIT_SPHERE, e._rotateFactor = 1, e._rotateRateRangeAdjustment = 1; + let E = Cartesian3.UNIT_Z; + const A = Matrix4.clone(o.transform, tilt3DOldTransform); + o._setTransform(x); + const D = Cartesian3.cross( + C, + o.positionWC, + tilt3DCartesian3 + ); + if (Cartesian3.dot(o.rightWC, D) < 0) { + const R = n.startPosition.y - n.endPosition.y; + (s && R < 0 || !s && R > 0) && (E = void 0); + const L = o.constrainedAxis; + o.constrainedAxis = void 0, rotate3D(e, t, n, E, !0, !1), o.constrainedAxis = L; + } else + rotate3D(e, t, n, E, !0, !1); + if (o._setTransform(T), rotate3D(e, t, n, E, !1, !0), defined(o.constrainedAxis)) { + const R = Cartesian3.cross( + o.direction, + o.constrainedAxis, + tilt3DCartesian3 + ); + Cartesian3.equalsEpsilon(R, Cartesian3.ZERO, CesiumMath.EPSILON6) || (Cartesian3.dot(R, o.right) < 0 && Cartesian3.negate(R, R), Cartesian3.cross(R, o.direction, o.up), Cartesian3.cross(o.direction, o.up, o.right), Cartesian3.normalize(o.up, o.up), Cartesian3.normalize(o.right, o.right)); + } + o._setTransform(A), e._globe = b, e._ellipsoid = S; + const I = S.maximumRadius; + e._rotateFactor = 1 / I, e._rotateRateRangeAdjustment = I; + const M = Cartesian3.clone( + o.positionWC, + tilt3DCartesian3 + ); + if (e.enableCollisionDetection && adjustHeightForTerrain(e, !0), !Cartesian3.equals(o.positionWC, M)) { + o._setTransform(x), o.worldToCameraCoordinatesPoint(M, M); + const R = Cartesian3.magnitudeSquared(M); + Cartesian3.magnitudeSquared(o.position) > R && (Cartesian3.normalize(o.position, o.position), Cartesian3.multiplyByScalar( + o.position, + Math.sqrt(R), + o.position + )); + const L = Cartesian3.angleBetween(M, o.position), g = Cartesian3.cross( + M, + o.position, + M + ); + Cartesian3.normalize(g, g); + const w = Quaternion.fromAxisAngle(g, L, tilt3DQuaternion), O = Matrix3.fromQuaternion(w, tilt3DMatrix); + Matrix3.multiplyByVector(O, o.direction, o.direction), Matrix3.multiplyByVector(O, o.up, o.up), Cartesian3.cross(o.direction, o.up, o.right), Cartesian3.cross(o.right, o.direction, o.up), o._setTransform(A); + } +} +const look3DStartPos = new Cartesian2(), look3DEndPos = new Cartesian2(), look3DStartRay = new Ray(), look3DEndRay = new Ray(), look3DNegativeRot = new Cartesian3(), look3DTan = new Cartesian3(); +function look3D(e, t, n, i) { + const o = e._scene.camera, s = look3DStartPos; + s.x = n.startPosition.x, s.y = 0; + const c = look3DEndPos; + c.x = n.endPosition.x, c.y = 0; + let l = o.getPickRay(s, look3DStartRay), d = o.getPickRay(c, look3DEndRay), f = 0, h, p; + o.frustum instanceof OrthographicFrustum ? (h = l.origin, p = d.origin, Cartesian3.add(o.direction, h, h), Cartesian3.add(o.direction, p, p), Cartesian3.subtract(h, o.position, h), Cartesian3.subtract(p, o.position, p), Cartesian3.normalize(h, h), Cartesian3.normalize(p, p)) : (h = l.direction, p = d.direction); + let m = Cartesian3.dot(h, p); + m < 1 && (f = Math.acos(m)), f = n.startPosition.x > n.endPosition.x ? -f : f; + const _ = e._horizontalRotationAxis; + if (defined(i) ? o.look(i, -f) : defined(_) ? o.look(_, -f) : o.lookLeft(f), s.x = 0, s.y = n.startPosition.y, c.x = 0, c.y = n.endPosition.y, l = o.getPickRay(s, look3DStartRay), d = o.getPickRay(c, look3DEndRay), f = 0, o.frustum instanceof OrthographicFrustum ? (h = l.origin, p = d.origin, Cartesian3.add(o.direction, h, h), Cartesian3.add(o.direction, p, p), Cartesian3.subtract(h, o.position, h), Cartesian3.subtract(p, o.position, p), Cartesian3.normalize(h, h), Cartesian3.normalize(p, p)) : (h = l.direction, p = d.direction), m = Cartesian3.dot(h, p), m < 1 && (f = Math.acos(m)), f = n.startPosition.y > n.endPosition.y ? -f : f, i = defaultValue(i, _), defined(i)) { + const y = o.direction, C = Cartesian3.negate( + i, + look3DNegativeRot + ), T = Cartesian3.equalsEpsilon( + y, + i, + CesiumMath.EPSILON2 + ), x = Cartesian3.equalsEpsilon( + y, + C, + CesiumMath.EPSILON2 + ); + if (!T && !x) { + m = Cartesian3.dot(y, i); + let b = CesiumMath.acosClamped(m); + f > 0 && f > b && (f = b - CesiumMath.EPSILON4), m = Cartesian3.dot(y, C), b = CesiumMath.acosClamped(m), f < 0 && -f > b && (f = -b + CesiumMath.EPSILON4); + const S = Cartesian3.cross(i, y, look3DTan); + o.look(S, f); + } else (T && f < 0 || x && f > 0) && o.look(o.right, -f); + } else + o.lookUp(f); +} +function update3D(e) { + reactToInput( + e, + e.enableRotate, + e.rotateEventTypes, + spin3D, + e.inertiaSpin, + "_lastInertiaSpinMovement" + ), reactToInput( + e, + e.enableZoom, + e.zoomEventTypes, + zoom3D, + e.inertiaZoom, + "_lastInertiaZoomMovement" + ), reactToInput( + e, + e.enableTilt, + e.tiltEventTypes, + tilt3D, + e.inertiaSpin, + "_lastInertiaTiltMovement" + ), reactToInput( + e, + e.enableLook, + e.lookEventTypes, + look3D + ); +} +const scratchAdjustHeightTransform = new Matrix4(), scratchAdjustHeightCartographic = new Cartographic(); +function adjustHeightForTerrain(e, t) { + e._adjustedHeightForTerrain = !0; + const n = e._scene, i = n.mode; + if (i === SceneMode$1.SCENE2D || i === SceneMode$1.MORPHING) + return; + const r = n.camera, o = defaultValue(n.ellipsoid, Ellipsoid.WGS84), s = n.mapProjection; + let c, l; + Matrix4.equals(r.transform, Matrix4.IDENTITY) || (c = Matrix4.clone(r.transform, scratchAdjustHeightTransform), l = Cartesian3.magnitude(r.position), r._setTransform(Matrix4.IDENTITY)); + const d = scratchAdjustHeightCartographic; + i === SceneMode$1.SCENE3D ? o.cartesianToCartographic(r.position, d) : s.unproject(r.position, d); + let f = !1; + if (d.height < e._minimumCollisionTerrainHeight) { + const h = e._scene.globeHeight; + if (defined(h)) { + const p = h + e.minimumZoomDistance, m = h - e._lastGlobeHeight, _ = m / e._lastGlobeHeight; + d.height < p && (t || Math.abs(_) <= 0.1) && (d.height = p, i === SceneMode$1.SCENE3D ? o.cartographicToCartesian(d, r.position) : s.project(d, r.position), f = !0), t || Math.abs(_) <= 0.1 ? e._lastGlobeHeight = h : e._lastGlobeHeight += m * 0.1; + } + } + defined(c) && (r._setTransform(c), f && (Cartesian3.normalize(r.position, r.position), Cartesian3.negate(r.position, r.direction), Cartesian3.multiplyByScalar( + r.position, + Math.max(l, e.minimumZoomDistance), + r.position + ), Cartesian3.normalize(r.direction, r.direction), Cartesian3.cross(r.direction, r.up, r.right), Cartesian3.cross(r.right, r.direction, r.up))); +} +ScreenSpaceCameraController.prototype.onMap = function() { + const e = this._scene, t = e.mode, n = e.camera; + return t === SceneMode$1.COLUMBUS_VIEW ? Math.abs(n.position.x) - this._maxCoord.x < 0 && Math.abs(n.position.y) - this._maxCoord.y < 0 : !0; +}; +const scratchPreviousPosition = new Cartesian3(), scratchPreviousDirection = new Cartesian3(); +ScreenSpaceCameraController.prototype.update = function() { + const e = this._scene, { camera: t, globe: n, mode: i } = e; + Matrix4.equals(t.transform, Matrix4.IDENTITY) ? (this._globe = n, this._ellipsoid = defaultValue(e.ellipsoid, Ellipsoid.default)) : (this._globe = void 0, this._ellipsoid = Ellipsoid.UNIT_SPHERE); + const { verticalExaggeration: r, verticalExaggerationRelativeHeight: o } = e; + this._minimumCollisionTerrainHeight = VerticalExaggeration.getHeight( + this.minimumCollisionTerrainHeight, + r, + o + ), this._minimumPickingTerrainHeight = VerticalExaggeration.getHeight( + this.minimumPickingTerrainHeight, + r, + o + ), this._minimumTrackBallHeight = VerticalExaggeration.getHeight( + this.minimumTrackBallHeight, + r, + o + ), this._cameraUnderground = e.cameraUnderground && defined(this._globe); + const s = this._ellipsoid.maximumRadius; + this._rotateFactor = 1 / s, this._rotateRateRangeAdjustment = s, this._adjustedHeightForTerrain = !1; + const c = Cartesian3.clone( + t.positionWC, + scratchPreviousPosition + ), l = Cartesian3.clone( + t.directionWC, + scratchPreviousDirection + ); + if (i === SceneMode$1.SCENE2D ? update2D(this) : i === SceneMode$1.COLUMBUS_VIEW ? (this._horizontalRotationAxis = Cartesian3.UNIT_Z, updateCV(this)) : i === SceneMode$1.SCENE3D && (this._horizontalRotationAxis = void 0, update3D(this)), this.enableCollisionDetection && !this._adjustedHeightForTerrain) { + const d = !Cartesian3.equals(c, t.positionWC) || !Cartesian3.equals(l, t.directionWC); + adjustHeightForTerrain(this, d); + } + this._aggregator.reset(); +}; +ScreenSpaceCameraController.prototype.isDestroyed = function() { + return !1; +}; +ScreenSpaceCameraController.prototype.destroy = function() { + return this._tweens.removeAll(), this._aggregator = this._aggregator && this._aggregator.destroy(), destroyObject(this); +}; +const AdditiveBlend = `uniform sampler2D colorTexture; +uniform sampler2D colorTexture2; + +uniform vec2 center; +uniform float radius; + +in vec2 v_textureCoordinates; + +void main() +{ + vec4 color0 = texture(colorTexture, v_textureCoordinates); + vec4 color1 = texture(colorTexture2, v_textureCoordinates); + + float x = length(gl_FragCoord.xy - center) / radius; + float t = smoothstep(0.5, 0.8, x); + out_FragColor = mix(color0 + color1, color1, t); +} +`, BrightPass = `uniform sampler2D colorTexture; + +uniform float avgLuminance; +uniform float threshold; +uniform float offset; + +in vec2 v_textureCoordinates; + +float key(float avg) +{ + float guess = 1.5 - (1.5 / (avg * 0.1 + 1.0)); + return max(0.0, guess) + 0.1; +} + +// See section 9. "The bright-pass filter" of Realtime HDR Rendering +// http://www.cg.tuwien.ac.at/research/publications/2007/Luksch_2007_RHR/Luksch_2007_RHR-RealtimeHDR%20.pdf + +void main() +{ + vec4 color = texture(colorTexture, v_textureCoordinates); + vec3 xyz = czm_RGBToXYZ(color.rgb); + float luminance = xyz.r; + + float scaledLum = key(avgLuminance) * luminance / avgLuminance; + float brightLum = max(scaledLum - threshold, 0.0); + float brightness = brightLum / (offset + brightLum); + + xyz.r = brightness; + out_FragColor = vec4(czm_XYZToRGB(xyz), 1.0); +} +`; +function SunPostProcess() { + this._sceneFramebuffer = new SceneFramebuffer(); + const e = 0.125, t = new Array(6); + t[0] = new PostProcessStage({ + fragmentShader: PassThrough, + textureScale: e, + forcePowerOfTwo: !0, + sampleMode: PostProcessStageSampleMode.LINEAR + }); + const n = t[1] = new PostProcessStage({ + fragmentShader: BrightPass, + uniforms: { + avgLuminance: 0.5, + // A guess at the average luminance across the entire scene + threshold: 0.25, + offset: 0.1 + }, + textureScale: e, + forcePowerOfTwo: !0 + }), i = this; + this._delta = 1, this._sigma = 2, this._blurStep = new Cartesian2(), t[2] = new PostProcessStage({ + fragmentShader: GaussianBlur1D, + uniforms: { + step: function() { + return i._blurStep.x = i._blurStep.y = 1 / n.outputTexture.width, i._blurStep; + }, + delta: function() { + return i._delta; + }, + sigma: function() { + return i._sigma; + }, + direction: 0 + }, + textureScale: e, + forcePowerOfTwo: !0 + }), t[3] = new PostProcessStage({ + fragmentShader: GaussianBlur1D, + uniforms: { + step: function() { + return i._blurStep.x = i._blurStep.y = 1 / n.outputTexture.width, i._blurStep; + }, + delta: function() { + return i._delta; + }, + sigma: function() { + return i._sigma; + }, + direction: 1 + }, + textureScale: e, + forcePowerOfTwo: !0 + }), t[4] = new PostProcessStage({ + fragmentShader: PassThrough, + sampleMode: PostProcessStageSampleMode.LINEAR + }), this._uCenter = new Cartesian2(), this._uRadius = void 0, t[5] = new PostProcessStage({ + fragmentShader: AdditiveBlend, + uniforms: { + center: function() { + return i._uCenter; + }, + radius: function() { + return i._uRadius; + }, + colorTexture2: function() { + return i._sceneFramebuffer.framebuffer.getColorTexture(0); + } + } + }), this._stages = new PostProcessStageComposite({ + stages: t + }); + const r = new PostProcessStageTextureCache(this), o = t.length; + for (let s = 0; s < o; ++s) + t[s]._textureCache = r; + this._textureCache = r, this.length = t.length; +} +SunPostProcess.prototype.get = function(e) { + return this._stages.get(e); +}; +SunPostProcess.prototype.getStageByName = function(e) { + const t = this._stages.length; + for (let n = 0; n < t; ++n) { + const i = this._stages.get(n); + if (i.name === e) + return i; + } +}; +const sunPositionECScratch = new Cartesian4(), sunPositionWCScratch = new Cartesian2(), sizeScratch = new Cartesian2(), postProcessMatrix4Scratch = new Matrix4(); +function updateSunPosition(e, t, n) { + const i = t.uniformState, r = i.sunPositionWC, o = i.view, s = i.viewProjection, c = i.projection; + let l = Matrix4.computeViewportTransformation( + n, + 0, + 1, + postProcessMatrix4Scratch + ); + const d = Matrix4.multiplyByPoint( + o, + r, + sunPositionECScratch + ); + let f = Transforms.pointToGLWindowCoordinates( + s, + l, + r, + sunPositionWCScratch + ); + d.x += CesiumMath.SOLAR_RADIUS; + const h = Transforms.pointToGLWindowCoordinates( + c, + l, + d, + d + ), p = Cartesian2.magnitude(Cartesian2.subtract(h, f, h)) * 30 * 2, m = sizeScratch; + m.x = p, m.y = p, e._uCenter = Cartesian2.clone(f, e._uCenter), e._uRadius = Math.max(m.x, m.y) * 0.15; + const _ = t.drawingBufferWidth, y = t.drawingBufferHeight, C = e._stages, T = C.get(0), x = T.outputTexture.width, b = T.outputTexture.height, S = new BoundingRectangle(); + S.width = x, S.height = b, l = Matrix4.computeViewportTransformation( + S, + 0, + 1, + postProcessMatrix4Scratch + ), f = Transforms.pointToGLWindowCoordinates( + s, + l, + r, + sunPositionWCScratch + ), m.x *= x / _, m.y *= b / y; + const E = T.scissorRectangle; + E.x = Math.max(f.x - m.x * 0.5, 0), E.y = Math.max(f.y - m.y * 0.5, 0), E.width = Math.min(m.x, _), E.height = Math.min(m.y, y); + for (let A = 1; A < 4; ++A) + BoundingRectangle.clone(E, C.get(A).scissorRectangle); +} +SunPostProcess.prototype.clear = function(e, t, n) { + this._sceneFramebuffer.clear(e, t, n), this._textureCache.clear(e); +}; +SunPostProcess.prototype.update = function(e) { + const t = e.context, n = e.viewport, i = this._sceneFramebuffer; + i.update(t, n); + const r = i.framebuffer; + return this._textureCache.update(t), this._stages.update(t, !1), updateSunPosition(this, t, n), r; +}; +SunPostProcess.prototype.execute = function(e) { + const t = this._sceneFramebuffer.framebuffer.getColorTexture(0), n = this._stages, i = n.length; + n.get(0).execute(e, t); + for (let r = 1; r < i; ++r) + n.get(r).execute(e, n.get(r - 1).outputTexture); +}; +SunPostProcess.prototype.copy = function(e, t) { + if (!defined(this._copyColorCommand)) { + const n = this; + this._copyColorCommand = e.createViewportQuadCommand(PassThrough, { + uniformMap: { + colorTexture: function() { + return n._stages.get(n._stages.length - 1).outputTexture; + } + }, + owner: this + }); + } + this._copyColorCommand.framebuffer = t, this._copyColorCommand.execute(e); +}; +SunPostProcess.prototype.isDestroyed = function() { + return !1; +}; +SunPostProcess.prototype.destroy = function() { + return this._textureCache.destroy(), this._stages.destroy(), destroyObject(this); +}; +function DebugInspector() { + this._cachedShowFrustumsShaders = {}; +} +function getAttributeLocations(e) { + const t = {}, n = e.vertexAttributes; + for (const i in n) + n.hasOwnProperty(i) && (t[i] = n[i].index); + return t; +} +function createDebugShowFrustumsShaderProgram(e, t) { + const n = e.context, i = t, r = i.fragmentShaderSource.clone(), o = []; + r.sources = r.sources.map(function(f) { + f = ShaderSource.replaceMain(f, "czm_Debug_main"); + const h = /out_FragData_(\d+)/g; + let p; + for (; (p = h.exec(f)) !== null; ) + o.indexOf(p[1]) === -1 && o.push(p[1]); + return f; + }); + const s = o.length; + let c = ""; + c += `uniform vec3 debugShowCommandsColor; +`, c += `uniform vec3 debugShowFrustumsColor; +`, c += `void main() +{ + czm_Debug_main(); +`; + let l; + if (s > 0) + for (l = 0; l < s; ++l) + c += ` out_FragData_${o[l]}.rgb *= debugShowCommandsColor; +`, c += ` out_FragData_${o[l]}.rgb *= debugShowFrustumsColor; +`; + else + c += ` out_FragColor.rgb *= debugShowCommandsColor; +`, c += ` out_FragColor.rgb *= debugShowFrustumsColor; +`; + c += "}", r.sources.push(c); + const d = getAttributeLocations(i); + return ShaderProgram.fromCache({ + context: n, + vertexShaderSource: i.vertexShaderSource, + fragmentShaderSource: r, + attributeLocations: d + }); +} +const scratchFrustumColor = new Color(); +function createDebugShowFrustumsUniformMap(e, t) { + let n; + return defined(t.uniformMap) ? n = t.uniformMap : n = {}, defined(n.debugShowCommandsColor) || defined(n.debugShowFrustumsColor) || (n.debugShowCommandsColor = function() { + return e.debugShowCommands ? (defined(t._debugColor) || (t._debugColor = Color.fromRandom()), t._debugColor) : Color.WHITE; + }, n.debugShowFrustumsColor = function() { + return e.debugShowFrustums ? (scratchFrustumColor.red = t.debugOverlappingFrustums & 1 ? 1 : 0, scratchFrustumColor.green = t.debugOverlappingFrustums & 2 ? 1 : 0, scratchFrustumColor.blue = t.debugOverlappingFrustums & 4 ? 1 : 0, scratchFrustumColor.alpha = 1, scratchFrustumColor) : Color.WHITE; + }), n; +} +const scratchShowFrustumCommand = new DrawCommand(); +DebugInspector.prototype.executeDebugShowFrustumsCommand = function(e, t, n) { + const i = t.shaderProgram.id; + let r = this._cachedShowFrustumsShaders[i]; + defined(r) || (r = createDebugShowFrustumsShaderProgram( + e, + t.shaderProgram + ), this._cachedShowFrustumsShaders[i] = r); + const o = DrawCommand.shallowClone( + t, + scratchShowFrustumCommand + ); + o.shaderProgram = r, o.uniformMap = createDebugShowFrustumsUniformMap(e, t), o.execute(e.context, n); +}; +function VoxelCell(e, t, n) { + this._primitive = e, this._tileIndex = t, this._sampleIndex = n, this._metadata = {}, this._orientedBoundingBox = new OrientedBoundingBox(); +} +VoxelCell.fromKeyframeNode = function(e, t, n, i) { + const r = new VoxelCell(e, t, n), { spatialNode: o, metadata: s } = i; + return r._metadata = getMetadataForSample(e, s, n), r._orientedBoundingBox = getOrientedBoundingBox( + e, + o, + n, + r._orientedBoundingBox + ), r; +}; +function getMetadataForSample(e, t, n) { + if (!defined(t)) + return; + const { names: i, types: r } = e.provider, o = {}; + for (let s = 0; s < i.length; s++) { + const c = i[s], l = MetadataType$1.getComponentCount(r[s]), d = t[s].slice( + n * l, + (n + 1) * l + ); + o[c] = d; + } + return o; +} +const tileCoordinateScratch = new Cartesian3(), tileUvScratch = new Cartesian3(); +function getOrientedBoundingBox(e, t, n, i) { + const r = t.dimensions, o = r.x * r.y, s = Math.floor(n / o), c = n - s * o, l = Math.floor(c / r.x), d = c - l * r.x, f = Cartesian3.fromElements( + d, + l, + s, + tileCoordinateScratch + ), h = Cartesian3.divideComponents( + Cartesian3.subtract( + f, + e._paddingBefore, + tileCoordinateScratch + ), + e.dimensions, + tileUvScratch + ); + return e._shape.computeOrientedBoundingBoxForSample( + t, + e.dimensions, + h, + i + ); +} +Object.defineProperties(VoxelCell.prototype, { + /** + * Gets an object of the metadata values for this cell. The object's keys are the metadata names. + * + * @memberof VoxelCell.prototype + * + * @type {object} + * + * @readonly + * @private + */ + metadata: { + get: function() { + return this._metadata; + } + }, + /** + * All objects returned by {@link Scene#pick} have aprimitive property. This returns
+ * the VoxelPrimitive containing the cell.
+ *
+ * @memberof VoxelCell.prototype
+ *
+ * @type {VoxelPrimitive}
+ *
+ * @readonly
+ */
+ primitive: {
+ get: function() {
+ return this._primitive;
+ }
+ },
+ /**
+ * Get the sample index of the cell.
+ *
+ * @memberof VoxelCell.prototype
+ *
+ * @type {number}
+ *
+ * @readonly
+ */
+ sampleIndex: {
+ get: function() {
+ return this._sampleIndex;
+ }
+ },
+ /**
+ * Get the index of the tile containing the cell.
+ *
+ * @memberof VoxelCell.prototype
+ *
+ * @type {number}
+ *
+ * @readonly
+ */
+ tileIndex: {
+ get: function() {
+ return this._tileIndex;
+ }
+ },
+ /**
+ * Get a copy of the oriented bounding box containing the cell.
+ *
+ * @memberof VoxelCell.prototype
+ *
+ * @type {OrientedBoundingBox}
+ *
+ * @readonly
+ */
+ orientedBoundingBox: {
+ get: function() {
+ return this._orientedBoundingBox.clone();
+ }
+ }
+});
+VoxelCell.prototype.hasProperty = function(e) {
+ return defined(this._metadata[e]);
+};
+VoxelCell.prototype.getNames = function() {
+ return Object.keys(this._metadata);
+};
+VoxelCell.prototype.getProperty = function(e) {
+ return this._metadata[e];
+};
+const VoxelUtils = `struct Ray {
+ vec3 pos;
+ vec3 dir;
+ vec3 rawDir;
+};
+
+#if defined(JITTER)
+/**
+ * Generate a pseudo-random value for a given 2D screen coordinate.
+ * Similar to https://www.shadertoy.com/view/4djSRW with a modified hashscale.
+ */
+float hash(vec2 p)
+{
+ vec3 p3 = fract(vec3(p.xyx) * 50.0);
+ p3 += dot(p3, p3.yzx + 19.19);
+ return fract((p3.x + p3.y) * p3.z);
+}
+#endif
+
+float minComponent(in vec3 v) {
+ return min(min(v.x, v.y), v.z);
+}
+
+float maxComponent(in vec3 v) {
+ return max(max(v.x, v.y), v.z);
+}
+
+struct PointJacobianT {
+ vec3 point;
+ mat3 jacobianT;
+};
+`, VoxelFS = `// See Intersection.glsl for the definition of intersectScene
+// See IntersectionUtils.glsl for the definition of nextIntersection
+// See convertUvToBox.glsl, convertUvToCylinder.glsl, or convertUvToEllipsoid.glsl
+// for the definition of convertUvToShapeUvSpace. The appropriate function is
+// selected based on the VoxelPrimitive shape type, and added to the shader in
+// Scene/VoxelRenderResources.js.
+// See Octree.glsl for the definitions of TraversalData, SampleData,
+// traverseOctreeFromBeginning, and traverseOctreeFromExisting
+// See Megatexture.glsl for the definition of accumulatePropertiesFromMegatexture
+
+#define STEP_COUNT_MAX 1000 // Harcoded value because GLSL doesn't like variable length loops
+#if defined(PICKING_VOXEL)
+ #define ALPHA_ACCUM_MAX 0.1
+#else
+ #define ALPHA_ACCUM_MAX 0.98 // Must be > 0.0 and <= 1.0
+#endif
+
+uniform mat3 u_transformDirectionViewToLocal;
+uniform vec3 u_cameraPositionUv;
+uniform float u_stepSize;
+
+#if defined(PICKING)
+ uniform vec4 u_pickColor;
+#endif
+
+vec3 getSampleSize(in int level) {
+ vec3 sampleCount = exp2(float(level)) * vec3(u_dimensions);
+ vec3 sampleSizeUv = 1.0 / sampleCount;
+ return scaleShapeUvToShapeSpace(sampleSizeUv);
+}
+
+#define MINIMUM_STEP_SCALAR (0.02)
+#define SHIFT_FRACTION (0.001)
+
+/**
+ * Given a coordinate within a tile, and sample spacings along a ray through
+ * the coordinate, find the distance to the points where the ray entered and
+ * exited the voxel cell, along with the surface normals at those points.
+ * The surface normals are returned in shape space coordinates.
+ */
+RayShapeIntersection getVoxelIntersection(in vec3 tileUv, in vec3 sampleSizeAlongRay) {
+ vec3 voxelCoord = tileUv * vec3(u_dimensions);
+ vec3 directions = sign(sampleSizeAlongRay);
+ vec3 positiveDirections = max(directions, 0.0);
+ vec3 entryCoord = mix(ceil(voxelCoord), floor(voxelCoord), positiveDirections);
+ vec3 exitCoord = entryCoord + directions;
+
+ vec3 distanceFromEntry = -abs((entryCoord - voxelCoord) * sampleSizeAlongRay);
+ float lastEntry = maxComponent(distanceFromEntry);
+ bvec3 isLastEntry = equal(distanceFromEntry, vec3(lastEntry));
+ vec3 entryNormal = -1.0 * vec3(isLastEntry) * directions;
+ vec4 entry = vec4(entryNormal, lastEntry);
+
+ vec3 distanceToExit = abs((exitCoord - voxelCoord) * sampleSizeAlongRay);
+ float firstExit = minComponent(distanceToExit);
+ bvec3 isFirstExit = equal(distanceToExit, vec3(firstExit));
+ vec3 exitNormal = vec3(isFirstExit) * directions;
+ vec4 exit = vec4(exitNormal, firstExit);
+
+ return RayShapeIntersection(entry, exit);
+}
+
+vec4 getStepSize(in SampleData sampleData, in Ray viewRay, in RayShapeIntersection shapeIntersection, in mat3 jacobianT, in float currentT) {
+ // The Jacobian is computed in a space where the shape spans [-1, 1].
+ // But the ray is marched in a space where the shape fills [0, 1].
+ // So we need to scale the Jacobian by 2.
+ vec3 gradient = 2.0 * viewRay.rawDir * jacobianT;
+ vec3 sampleSizeAlongRay = getSampleSize(sampleData.tileCoords.w) / gradient;
+
+ RayShapeIntersection voxelIntersection = getVoxelIntersection(sampleData.tileUv, sampleSizeAlongRay);
+
+ // Transform normal from shape space to Cartesian space
+ vec3 voxelNormal = normalize(jacobianT * voxelIntersection.entry.xyz);
+ // Compare with the shape intersection, to choose the appropriate normal
+ vec4 voxelEntry = vec4(voxelNormal, currentT + voxelIntersection.entry.w);
+ vec4 entry = intersectionMax(shapeIntersection.entry, voxelEntry);
+
+ float fixedStep = minComponent(abs(sampleSizeAlongRay)) * u_stepSize;
+ float shift = fixedStep * SHIFT_FRACTION;
+ float dt = voxelIntersection.exit.w + shift;
+ if ((currentT + dt) > shapeIntersection.exit.w) {
+ // Stop at end of shape
+ dt = shapeIntersection.exit.w - currentT + shift;
+ }
+ float stepSize = clamp(dt, fixedStep * MINIMUM_STEP_SCALAR, fixedStep + shift);
+
+ return vec4(entry.xyz, stepSize);
+}
+
+vec2 packIntToVec2(int value) {
+ float shifted = float(value) / 255.0;
+ float lowBits = fract(shifted);
+ float highBits = floor(shifted) / 255.0;
+ return vec2(highBits, lowBits);
+}
+
+vec2 packFloatToVec2(float value) {
+ float lowBits = fract(value);
+ float highBits = floor(value) / 255.0;
+ return vec2(highBits, lowBits);
+}
+
+int getSampleIndex(in vec3 tileUv) {
+ ivec3 voxelDimensions = u_dimensions;
+ vec3 sampleCoordinate = tileUv * vec3(voxelDimensions);
+ // tileUv = 1.0 is a valid coordinate but sampleIndex = voxelDimensions is not.
+ // (tileUv = 1.0 corresponds to the last sample, at index = voxelDimensions - 1).
+ // Clamp to [0, voxelDimensions - 0.5) to avoid numerical error before flooring
+ vec3 maxCoordinate = vec3(voxelDimensions) - vec3(0.5);
+ sampleCoordinate = clamp(sampleCoordinate, vec3(0.0), maxCoordinate);
+ ivec3 sampleIndex = ivec3(floor(sampleCoordinate));
+ #if defined(PADDING)
+ voxelDimensions += u_paddingBefore + u_paddingAfter;
+ sampleIndex += u_paddingBefore;
+ #endif
+ // Convert to a 1D index for lookup in a 1D data array
+ return sampleIndex.x + voxelDimensions.x * (sampleIndex.y + voxelDimensions.y * sampleIndex.z);
+}
+
+void main()
+{
+ vec4 fragCoord = gl_FragCoord;
+ vec2 screenCoord = (fragCoord.xy - czm_viewport.xy) / czm_viewport.zw; // [0,1]
+ vec3 eyeDirection = normalize(czm_windowToEyeCoordinates(fragCoord).xyz);
+ vec3 viewDirWorld = normalize(czm_inverseViewRotation * eyeDirection); // normalize again just in case
+ vec3 viewDirUv = normalize(u_transformDirectionViewToLocal * eyeDirection); // normalize again just in case
+ vec3 viewPosUv = u_cameraPositionUv;
+ #if defined(SHAPE_ELLIPSOID)
+ // viewDirUv has been scaled to a space where the ellipsoid is a sphere.
+ // Undo this scaling to get the raw direction.
+ vec3 rawDir = viewDirUv * u_ellipsoidRadiiUv;
+ Ray viewRayUv = Ray(viewPosUv, viewDirUv, rawDir);
+ #else
+ Ray viewRayUv = Ray(viewPosUv, viewDirUv, viewDirUv);
+ #endif
+
+ Intersections ix;
+ RayShapeIntersection shapeIntersection = intersectScene(screenCoord, viewRayUv, ix);
+
+ // Exit early if the scene was completely missed.
+ if (shapeIntersection.entry.w == NO_HIT) {
+ discard;
+ }
+
+ float currentT = shapeIntersection.entry.w;
+ float endT = shapeIntersection.exit.w;
+ vec3 positionUv = viewPosUv + currentT * viewDirUv;
+ PointJacobianT pointJacobian = convertUvToShapeUvSpaceDerivative(positionUv);
+
+ // Traverse the tree from the start position
+ TraversalData traversalData;
+ SampleData sampleDatas[SAMPLE_COUNT];
+ traverseOctreeFromBeginning(pointJacobian.point, traversalData, sampleDatas);
+ vec4 step = getStepSize(sampleDatas[0], viewRayUv, shapeIntersection, pointJacobian.jacobianT, currentT);
+
+ #if defined(JITTER)
+ float noise = hash(screenCoord); // [0,1]
+ currentT += noise * step.w;
+ positionUv += noise * step.w * viewDirUv;
+ #endif
+
+ FragmentInput fragmentInput;
+ #if defined(STATISTICS)
+ setStatistics(fragmentInput.metadata.statistics);
+ #endif
+
+ vec4 colorAccum = vec4(0.0);
+
+ for (int stepCount = 0; stepCount < STEP_COUNT_MAX; ++stepCount) {
+ // Read properties from the megatexture based on the traversal state
+ Properties properties = accumulatePropertiesFromMegatexture(sampleDatas);
+
+ // Prepare the custom shader inputs
+ copyPropertiesToMetadata(properties, fragmentInput.metadata);
+ fragmentInput.voxel.positionUv = positionUv;
+ fragmentInput.voxel.positionShapeUv = pointJacobian.point;
+ fragmentInput.voxel.positionUvLocal = sampleDatas[0].tileUv;
+ fragmentInput.voxel.viewDirUv = viewDirUv;
+ fragmentInput.voxel.viewDirWorld = viewDirWorld;
+ fragmentInput.voxel.surfaceNormal = step.xyz;
+ fragmentInput.voxel.travelDistance = step.w;
+ fragmentInput.voxel.stepCount = stepCount;
+ fragmentInput.voxel.tileIndex = sampleDatas[0].megatextureIndex;
+ fragmentInput.voxel.sampleIndex = getSampleIndex(sampleDatas[0].tileUv);
+
+ // Run the custom shader
+ czm_modelMaterial materialOutput;
+ fragmentMain(fragmentInput, materialOutput);
+
+ // Sanitize the custom shader output
+ vec4 color = vec4(materialOutput.diffuse, materialOutput.alpha);
+ color.rgb = max(color.rgb, vec3(0.0));
+ color.a = clamp(color.a, 0.0, 1.0);
+
+ // Pre-multiplied alpha blend
+ colorAccum += (1.0 - colorAccum.a) * vec4(color.rgb * color.a, color.a);
+
+ // Stop traversing if the alpha has been fully saturated
+ if (colorAccum.a > ALPHA_ACCUM_MAX) {
+ colorAccum.a = ALPHA_ACCUM_MAX;
+ break;
+ }
+
+ if (step.w == 0.0) {
+ // Shape is infinitely thin. The ray may have hit the edge of a
+ // foreground voxel. Step ahead slightly to check for more voxels
+ step.w == 0.00001;
+ }
+
+ // Keep raymarching
+ currentT += step.w;
+ positionUv = viewPosUv + currentT * viewDirUv;
+
+ // Check if there's more intersections.
+ if (currentT > endT) {
+ #if (INTERSECTION_COUNT == 1)
+ break;
+ #else
+ shapeIntersection = nextIntersection(ix);
+ if (shapeIntersection.entry.w == NO_HIT) {
+ break;
+ } else {
+ // Found another intersection. Resume raymarching there
+ currentT = shapeIntersection.entry.w;
+ endT = shapeIntersection.exit.w;
+ positionUv = viewPosUv + currentT * viewDirUv;
+ }
+ #endif
+ }
+
+ // Traverse the tree from the current ray position.
+ // This is similar to traverseOctreeFromBeginning but is faster when the ray is in the same tile as the previous step.
+ pointJacobian = convertUvToShapeUvSpaceDerivative(positionUv);
+ traverseOctreeFromExisting(pointJacobian.point, traversalData, sampleDatas);
+ step = getStepSize(sampleDatas[0], viewRayUv, shapeIntersection, pointJacobian.jacobianT, currentT);
+ }
+
+ // Convert the alpha from [0,ALPHA_ACCUM_MAX] to [0,1]
+ colorAccum.a /= ALPHA_ACCUM_MAX;
+
+ #if defined(PICKING)
+ // If alpha is 0.0 there is nothing to pick
+ if (colorAccum.a == 0.0) {
+ discard;
+ }
+ out_FragColor = u_pickColor;
+ #elif defined(PICKING_VOXEL)
+ // If alpha is 0.0 there is nothing to pick
+ if (colorAccum.a == 0.0) {
+ discard;
+ }
+ vec2 megatextureId = packIntToVec2(sampleDatas[0].megatextureIndex);
+ vec2 sampleIndex = packIntToVec2(getSampleIndex(sampleDatas[0].tileUv));
+ out_FragColor = vec4(megatextureId, sampleIndex);
+ #else
+ out_FragColor = colorAccum;
+ #endif
+}
+`, VoxelVS = `in vec2 position;
+
+uniform vec4 u_ndcSpaceAxisAlignedBoundingBox;
+
+void main() {
+ vec2 aabbMin = u_ndcSpaceAxisAlignedBoundingBox.xy;
+ vec2 aabbMax = u_ndcSpaceAxisAlignedBoundingBox.zw;
+ vec2 translation = 0.5 * (aabbMax + aabbMin);
+ vec2 scale = 0.5 * (aabbMax - aabbMin);
+ gl_Position = vec4(position * scale + translation, 0.0, 1.0);
+}
+`, IntersectionUtils = `/* Intersection defines
+#define INTERSECTION_COUNT ###
+*/
+
+#define NO_HIT (-czm_infinity)
+#define INF_HIT (czm_infinity * 0.5)
+
+struct RayShapeIntersection {
+ vec4 entry;
+ vec4 exit;
+};
+
+vec4 intersectionMin(in vec4 intersect0, in vec4 intersect1)
+{
+ if (intersect0.w == NO_HIT) {
+ return intersect1;
+ } else if (intersect1.w == NO_HIT) {
+ return intersect0;
+ }
+ return (intersect0.w <= intersect1.w) ? intersect0 : intersect1;
+}
+
+vec4 intersectionMax(in vec4 intersect0, in vec4 intersect1)
+{
+ return (intersect0.w >= intersect1.w) ? intersect0 : intersect1;
+}
+
+RayShapeIntersection intersectIntersections(in Ray ray, in RayShapeIntersection intersect0, in RayShapeIntersection intersect1)
+{
+ bool missed = (intersect0.entry.w == NO_HIT) ||
+ (intersect1.entry.w == NO_HIT) ||
+ (intersect0.exit.w < intersect1.entry.w) ||
+ (intersect0.entry.w > intersect1.exit.w);
+ if (missed) {
+ vec4 miss = vec4(normalize(ray.dir), NO_HIT);
+ return RayShapeIntersection(miss, miss);
+ }
+
+ vec4 entry = intersectionMax(intersect0.entry, intersect1.entry);
+ vec4 exit = intersectionMin(intersect0.exit, intersect1.exit);
+
+ return RayShapeIntersection(entry, exit);
+}
+
+struct Intersections {
+ // Don't access these member variables directly - call the functions instead.
+
+ // Store an array of ray-surface intersections. Each intersection is composed of:
+ // .xyz for the surface normal at the intersection point
+ // .w for the T value
+ // The scale of the normal encodes the shape intersection type:
+ // length(intersection.xyz) = 1: positive shape entry
+ // length(intersection.xyz) = 2: positive shape exit
+ // length(intersection.xyz) = 3: negative shape entry
+ // length(intersection.xyz) = 4: negative shape exit
+ // INTERSECTION_COUNT is the number of ray-*shape* (volume) intersections,
+ // so we need twice as many to track ray-*surface* intersections
+ vec4 intersections[INTERSECTION_COUNT * 2];
+
+ #if (INTERSECTION_COUNT > 1)
+ // Maintain state for future nextIntersection calls
+ int index;
+ int surroundCount;
+ bool surroundIsPositive;
+ #endif
+};
+
+RayShapeIntersection getFirstIntersection(in Intersections ix)
+{
+ return RayShapeIntersection(ix.intersections[0], ix.intersections[1]);
+}
+
+vec4 encodeIntersectionType(vec4 intersection, int index, bool entry)
+{
+ float scale = float(index > 0) * 2.0 + float(!entry) + 1.0;
+ return vec4(intersection.xyz * scale, intersection.w);
+}
+
+// Use defines instead of real functions because WebGL1 cannot access array with non-constant index.
+#define setIntersection(/*inout Intersections*/ ix, /*int*/ index, /*float*/ t, /*bool*/ positive, /*bool*/ enter) (ix).intersections[(index)] = vec4(0.0, float(!positive) * 2.0 + float(!enter) + 1.0, 0.0, (t))
+#define setIntersectionPair(/*inout Intersections*/ ix, /*int*/ index, /*vec2*/ entryExit) (ix).intersections[(index) * 2 + 0] = vec4(0.0, float((index) > 0) * 2.0 + 1.0, 0.0, (entryExit).x); (ix).intersections[(index) * 2 + 1] = vec4(0.0, float((index) > 0) * 2.0 + 2.0, 0.0, (entryExit).y)
+#define setSurfaceIntersection(/*inout Intersections*/ ix, /*int*/ index, /*vec4*/ intersection, /*bool*/ positive, /*bool*/ enter) (ix).intersections[(index)] = encodeIntersectionType((intersection), int(!positive), (enter))
+#define setShapeIntersection(/*inout Intersections*/ ix, /*int*/ index, /*RayShapeIntersection*/ intersection) (ix).intersections[(index) * 2 + 0] = encodeIntersectionType((intersection).entry, (index), true); (ix).intersections[(index) * 2 + 1] = encodeIntersectionType((intersection).exit, (index), false)
+
+#if (INTERSECTION_COUNT > 1)
+void initializeIntersections(inout Intersections ix) {
+ // Sort the intersections from min T to max T with bubble sort.
+ // Note: If this sorting function changes, some of the intersection test may
+ // need to be updated. Search for "bubble sort" to find those areas.
+ const int sortPasses = INTERSECTION_COUNT * 2 - 1;
+ for (int n = sortPasses; n > 0; --n) {
+ for (int i = 0; i < sortPasses; ++i) {
+ // The loop should be: for (i = 0; i < n; ++i) {...} but WebGL1 cannot
+ // loop with non-constant condition, so it has to break early instead
+ if (i >= n) { break; }
+
+ vec4 intersect0 = ix.intersections[i + 0];
+ vec4 intersect1 = ix.intersections[i + 1];
+
+ bool inOrder = intersect0.w <= intersect1.w;
+
+ ix.intersections[i + 0] = inOrder ? intersect0 : intersect1;
+ ix.intersections[i + 1] = inOrder ? intersect1 : intersect0;
+ }
+ }
+
+ // Prepare initial state for nextIntersection
+ ix.index = 0;
+ ix.surroundCount = 0;
+ ix.surroundIsPositive = false;
+}
+#endif
+
+#if (INTERSECTION_COUNT > 1)
+RayShapeIntersection nextIntersection(inout Intersections ix) {
+ vec4 surfaceIntersection = vec4(0.0, 0.0, 0.0, NO_HIT);
+ RayShapeIntersection shapeIntersection = RayShapeIntersection(surfaceIntersection, surfaceIntersection);
+
+ const int passCount = INTERSECTION_COUNT * 2;
+
+ if (ix.index == passCount) {
+ return shapeIntersection;
+ }
+
+ for (int i = 0; i < passCount; ++i) {
+ // The loop should be: for (i = ix.index; i < passCount; ++i) {...} but WebGL1 cannot
+ // loop with non-constant condition, so it has to continue instead.
+ if (i < ix.index) {
+ continue;
+ }
+
+ ix.index = i + 1;
+
+ surfaceIntersection = ix.intersections[i];
+ int intersectionType = int(length(surfaceIntersection.xyz) - 0.5);
+ bool currShapeIsPositive = intersectionType < 2;
+ bool enter = intMod(intersectionType, 2) == 0;
+
+ ix.surroundCount += enter ? +1 : -1;
+ ix.surroundIsPositive = currShapeIsPositive ? enter : ix.surroundIsPositive;
+
+ // entering positive or exiting negative
+ if (ix.surroundCount == 1 && ix.surroundIsPositive && enter == currShapeIsPositive) {
+ shapeIntersection.entry = surfaceIntersection;
+ }
+
+ // exiting positive or entering negative after being inside positive
+ bool exitPositive = !enter && currShapeIsPositive && ix.surroundCount == 0;
+ bool enterNegativeFromPositive = enter && !currShapeIsPositive && ix.surroundCount == 2 && ix.surroundIsPositive;
+ if (exitPositive || enterNegativeFromPositive) {
+ shapeIntersection.exit = surfaceIntersection;
+
+ // entry and exit have been found, so the loop can stop
+ if (exitPositive) {
+ // After exiting positive shape there is nothing left to intersect, so jump to the end index.
+ ix.index = passCount;
+ }
+ break;
+ }
+ }
+
+ return shapeIntersection;
+}
+#endif
+
+// NOTE: initializeIntersections, nextIntersection aren't even declared unless INTERSECTION_COUNT > 1
+`, IntersectDepth = `// See IntersectionUtils.glsl for the definitions of Ray, Intersections,
+// setIntersectionPair, INF_HIT, NO_HIT
+
+/* intersectDepth defines (set in Scene/VoxelRenderResources.js)
+#define DEPTH_INTERSECTION_INDEX ###
+*/
+
+uniform mat4 u_transformPositionViewToUv;
+
+void intersectDepth(in vec2 screenCoord, in Ray ray, inout Intersections ix) {
+ float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, screenCoord));
+ if (logDepthOrDepth != 0.0) {
+ // Calculate how far the ray must travel before it hits the depth buffer.
+ vec4 eyeCoordinateDepth = czm_screenToEyeCoordinates(screenCoord, logDepthOrDepth);
+ eyeCoordinateDepth /= eyeCoordinateDepth.w;
+ vec3 depthPositionUv = vec3(u_transformPositionViewToUv * eyeCoordinateDepth);
+ float t = dot(depthPositionUv - ray.pos, ray.dir);
+ setIntersectionPair(ix, DEPTH_INTERSECTION_INDEX, vec2(t, +INF_HIT));
+ } else {
+ // There's no depth at this location.
+ setIntersectionPair(ix, DEPTH_INTERSECTION_INDEX, vec2(NO_HIT));
+ }
+}
+`, IntersectClippingPlanes = `// See IntersectionUtils.glsl for the definitions of Ray, Intersections, INF_HIT,
+// NO_HIT, setShapeIntersection
+
+/* Clipping plane defines (set in Scene/VoxelRenderResources.js)
+#define CLIPPING_PLANES_UNION
+#define CLIPPING_PLANES_COUNT
+#define CLIPPING_PLANES_INTERSECTION_INDEX
+*/
+
+uniform sampler2D u_clippingPlanesTexture;
+uniform mat4 u_clippingPlanesMatrix;
+
+// Plane is in Hessian Normal Form
+vec4 intersectPlane(in Ray ray, in vec4 plane) {
+ vec3 n = plane.xyz; // normal
+ float w = plane.w; // -dot(pointOnPlane, normal)
+
+ float a = dot(ray.pos, n);
+ float b = dot(ray.dir, n);
+ float t = -(w + a) / b;
+
+ return vec4(n, t);
+}
+
+void intersectClippingPlanes(in Ray ray, inout Intersections ix) {
+ vec4 backSide = vec4(-ray.dir, -INF_HIT);
+ vec4 farSide = vec4(ray.dir, +INF_HIT);
+ RayShapeIntersection clippingVolume;
+
+ #if (CLIPPING_PLANES_COUNT == 1)
+ // Union and intersection are the same when there's one clipping plane, and the code
+ // is more simplified.
+ vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, 0, u_clippingPlanesMatrix);
+ vec4 intersection = intersectPlane(ray, planeUv);
+ bool reflects = dot(ray.dir, intersection.xyz) < 0.0;
+ clippingVolume.entry = reflects ? backSide : intersection;
+ clippingVolume.exit = reflects ? intersection : farSide;
+ setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX, clippingVolume);
+ #elif defined(CLIPPING_PLANES_UNION)
+ vec4 firstTransmission = vec4(ray.dir, +INF_HIT);
+ vec4 lastReflection = vec4(-ray.dir, -INF_HIT);
+ for (int i = 0; i < CLIPPING_PLANES_COUNT; i++) {
+ vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, i, u_clippingPlanesMatrix);
+ vec4 intersection = intersectPlane(ray, planeUv);
+ if (dot(ray.dir, planeUv.xyz) > 0.0) {
+ firstTransmission = intersection.w <= firstTransmission.w ? intersection : firstTransmission;
+ } else {
+ lastReflection = intersection.w >= lastReflection.w ? intersection : lastReflection;
+ }
+ }
+ clippingVolume.entry = backSide;
+ clippingVolume.exit = lastReflection;
+ setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX + 0, clippingVolume);
+ clippingVolume.entry = firstTransmission;
+ clippingVolume.exit = farSide;
+ setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX + 1, clippingVolume);
+ #else // intersection
+ vec4 lastTransmission = vec4(ray.dir, -INF_HIT);
+ vec4 firstReflection = vec4(-ray.dir, +INF_HIT);
+ for (int i = 0; i < CLIPPING_PLANES_COUNT; i++) {
+ vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, i, u_clippingPlanesMatrix);
+ vec4 intersection = intersectPlane(ray, planeUv);
+ if (dot(ray.dir, planeUv.xyz) > 0.0) {
+ lastTransmission = intersection.w > lastTransmission.w ? intersection : lastTransmission;
+ } else {
+ firstReflection = intersection.w < firstReflection.w ? intersection: firstReflection;
+ }
+ }
+ if (lastTransmission.w < firstReflection.w) {
+ clippingVolume.entry = lastTransmission;
+ clippingVolume.exit = firstReflection;
+ } else {
+ clippingVolume.entry = vec4(-ray.dir, NO_HIT);
+ clippingVolume.exit = vec4(ray.dir, NO_HIT);
+ }
+ setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX, clippingVolume);
+ #endif
+}
+`, IntersectLongitude = `// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, INF_HIT,
+// RayShapeIntersection
+
+vec4 intersectLongitude(in Ray ray, in float angle, in bool positiveNormal) {
+ float normalSign = positiveNormal ? 1.0 : -1.0;
+ vec2 planeNormal = vec2(-sin(angle), cos(angle)) * normalSign;
+
+ vec2 position = ray.pos.xy;
+ vec2 direction = ray.dir.xy;
+ float approachRate = dot(direction, planeNormal);
+ float distance = -dot(position, planeNormal);
+
+ float t = (approachRate == 0.0)
+ ? NO_HIT
+ : distance / approachRate;
+
+ return vec4(planeNormal, 0.0, t);
+}
+
+RayShapeIntersection intersectHalfSpace(in Ray ray, in float angle, in bool positiveNormal)
+{
+ vec4 intersection = intersectLongitude(ray, angle, positiveNormal);
+ vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
+
+ bool hitFront = (intersection.w > 0.0) == (dot(ray.pos.xy, intersection.xy) > 0.0);
+ if (!hitFront) {
+ return RayShapeIntersection(intersection, farSide);
+ } else {
+ return RayShapeIntersection(-1.0 * farSide, intersection);
+ }
+}
+
+void intersectFlippedWedge(in Ray ray, in vec2 minMaxAngle, out RayShapeIntersection intersections[2])
+{
+ intersections[0] = intersectHalfSpace(ray, minMaxAngle.x, false);
+ intersections[1] = intersectHalfSpace(ray, minMaxAngle.y, true);
+}
+
+bool hitPositiveHalfPlane(in Ray ray, in vec4 intersection, in bool positiveNormal) {
+ float normalSign = positiveNormal ? 1.0 : -1.0;
+ vec2 planeDirection = vec2(intersection.y, -intersection.x) * normalSign;
+ vec2 hit = ray.pos.xy + intersection.w * ray.dir.xy;
+ return dot(hit, planeDirection) > 0.0;
+}
+
+void intersectHalfPlane(in Ray ray, in float angle, out RayShapeIntersection intersections[2]) {
+ vec4 intersection = intersectLongitude(ray, angle, true);
+ vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
+
+ if (hitPositiveHalfPlane(ray, intersection, true)) {
+ intersections[0].entry = -1.0 * farSide;
+ intersections[0].exit = vec4(-1.0 * intersection.xy, 0.0, intersection.w);
+ intersections[1].entry = intersection;
+ intersections[1].exit = farSide;
+ } else {
+ vec4 miss = vec4(normalize(ray.dir), NO_HIT);
+ intersections[0].entry = -1.0 * farSide;
+ intersections[0].exit = farSide;
+ intersections[1].entry = miss;
+ intersections[1].exit = miss;
+ }
+}
+
+RayShapeIntersection intersectRegularWedge(in Ray ray, in vec2 minMaxAngle)
+{
+ // Note: works for maxAngle > minAngle + pi, where the "regular wedge"
+ // is actually a negative volume.
+ // Compute intersections with the two planes.
+ // Normals will point toward the "outside" (negative space)
+ vec4 intersect1 = intersectLongitude(ray, minMaxAngle.x, false);
+ vec4 intersect2 = intersectLongitude(ray, minMaxAngle.y, true);
+
+ // Choose intersection with smallest T as the "first", the other as "last"
+ // Note: first or last could be in the "shadow" wedge, beyond the tip
+ bool inOrder = intersect1.w <= intersect2.w;
+ vec4 first = inOrder ? intersect1 : intersect2;
+ vec4 last = inOrder ? intersect2 : intersect1;
+
+ bool firstIsAhead = first.w >= 0.0;
+ bool startedInsideFirst = dot(ray.pos.xy, first.xy) < 0.0;
+ bool exitFromInside = firstIsAhead == startedInsideFirst;
+ bool lastIsAhead = last.w > 0.0;
+ bool startedOutsideLast = dot(ray.pos.xy, last.xy) >= 0.0;
+ bool enterFromOutside = lastIsAhead == startedOutsideLast;
+
+ vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
+ vec4 miss = vec4(normalize(ray.dir), NO_HIT);
+
+ if (exitFromInside && enterFromOutside) {
+ // Ray crosses both faces of negative wedge, exiting then entering the positive shape
+ return RayShapeIntersection(first, last);
+ } else if (!exitFromInside && enterFromOutside) {
+ // Ray starts inside wedge. last is in shadow wedge, and first is actually the entry
+ return RayShapeIntersection(-1.0 * farSide, first);
+ } else if (exitFromInside && !enterFromOutside) {
+ // First intersection was in the shadow wedge, so last is actually the exit
+ return RayShapeIntersection(last, farSide);
+ } else { // !exitFromInside && !enterFromOutside
+ // Both intersections were in the shadow wedge
+ return RayShapeIntersection(miss, miss);
+ }
+}
+`, IntersectBox = `// See IntersectionUtils.glsl for the definitions of Ray, RayShapeIntersection,
+// NO_HIT, Intersections
+
+/* Box defines (set in Scene/VoxelBoxShape.js)
+#define BOX_INTERSECTION_INDEX ### // always 0
+*/
+
+uniform vec3 u_renderMinBounds;
+uniform vec3 u_renderMaxBounds;
+
+RayShapeIntersection intersectBox(in Ray ray, in vec3 minBound, in vec3 maxBound)
+{
+ // Consider the box as the intersection of the space between 3 pairs of parallel planes
+ // Compute the distance along the ray to each plane
+ vec3 t0 = (minBound - ray.pos) / ray.dir;
+ vec3 t1 = (maxBound - ray.pos) / ray.dir;
+
+ // Identify candidate entries/exits based on distance from ray.pos
+ vec3 entries = min(t0, t1);
+ vec3 exits = max(t0, t1);
+
+ vec3 directions = sign(ray.dir);
+
+ // The actual intersection points are the furthest entry and the closest exit
+ float lastEntry = maxComponent(entries);
+ bvec3 isLastEntry = equal(entries, vec3(lastEntry));
+ vec3 entryNormal = -1.0 * vec3(isLastEntry) * directions;
+ vec4 entry = vec4(entryNormal, lastEntry);
+
+ float firstExit = minComponent(exits);
+ bvec3 isFirstExit = equal(exits, vec3(firstExit));
+ vec3 exitNormal = vec3(isLastEntry) * directions;
+ vec4 exit = vec4(exitNormal, firstExit);
+
+ if (entry.w > exit.w) {
+ entry.w = NO_HIT;
+ exit.w = NO_HIT;
+ }
+
+ return RayShapeIntersection(entry, exit);
+}
+
+void intersectShape(in Ray ray, inout Intersections ix)
+{
+ RayShapeIntersection intersection = intersectBox(ray, u_renderMinBounds, u_renderMaxBounds);
+ setShapeIntersection(ix, BOX_INTERSECTION_INDEX, intersection);
+}
+`, IntersectCylinder = `// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, Intersections,
+// RayShapeIntersection, setSurfaceIntersection, setShapeIntersection,
+// intersectIntersections
+// See IntersectLongitude.glsl for the definitions of intersectHalfPlane,
+// intersectFlippedWedge, intersectRegularWedge
+
+/* Cylinder defines (set in Scene/VoxelCylinderShape.js)
+#define CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN
+#define CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT
+#define CYLINDER_HAS_RENDER_BOUNDS_ANGLE
+#define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF
+#define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF
+#define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO
+
+#define CYLINDER_INTERSECTION_INDEX_RADIUS_MAX
+#define CYLINDER_INTERSECTION_INDEX_RADIUS_MIN
+#define CYLINDER_INTERSECTION_INDEX_ANGLE
+*/
+
+// Cylinder uniforms
+uniform vec2 u_cylinderRenderRadiusMinMax;
+uniform vec2 u_cylinderRenderHeightMinMax;
+#if defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE)
+ uniform vec2 u_cylinderRenderAngleMinMax;
+#endif
+
+/**
+ * Find the intersection of a ray with the volume defined by two planes of constant z
+ */
+RayShapeIntersection intersectHeightBounds(in Ray ray, in vec2 minMaxHeight, in bool convex)
+{
+ float zPosition = ray.pos.z;
+ float zDirection = ray.dir.z;
+
+ float tmin = (minMaxHeight.x - zPosition) / zDirection;
+ float tmax = (minMaxHeight.y - zPosition) / zDirection;
+
+ // Normals point outside the volume
+ float signFlip = convex ? 1.0 : -1.0;
+ vec4 intersectMin = vec4(0.0, 0.0, -1.0 * signFlip, tmin);
+ vec4 intersectMax = vec4(0.0, 0.0, 1.0 * signFlip, tmax);
+
+ bool topEntry = zDirection < 0.0;
+ vec4 entry = topEntry ? intersectMax : intersectMin;
+ vec4 exit = topEntry ? intersectMin : intersectMax;
+
+ return RayShapeIntersection(entry, exit);
+}
+
+/**
+ * Find the intersection of a ray with a right cylindrical surface of a given radius
+ * about the z-axis.
+ */
+RayShapeIntersection intersectCylinder(in Ray ray, in float radius, in bool convex)
+{
+ vec2 position = ray.pos.xy;
+ vec2 direction = ray.dir.xy;
+
+ float a = dot(direction, direction);
+ float b = dot(position, direction);
+ float c = dot(position, position) - radius * radius;
+ float determinant = b * b - a * c;
+
+ if (determinant < 0.0) {
+ vec4 miss = vec4(normalize(ray.dir), NO_HIT);
+ return RayShapeIntersection(miss, miss);
+ }
+
+ determinant = sqrt(determinant);
+ float t1 = (-b - determinant) / a;
+ float t2 = (-b + determinant) / a;
+ float signFlip = convex ? 1.0 : -1.0;
+ vec4 intersect1 = vec4(normalize(position + t1 * direction) * signFlip, 0.0, t1);
+ vec4 intersect2 = vec4(normalize(position + t2 * direction) * signFlip, 0.0, t2);
+
+ return RayShapeIntersection(intersect1, intersect2);
+}
+
+/**
+ * Find the intersection of a ray with a right cylindrical solid of given
+ * radius and height bounds. NOTE: The shape is assumed to be convex.
+ */
+RayShapeIntersection intersectBoundedCylinder(in Ray ray, in float radius, in vec2 minMaxHeight)
+{
+ RayShapeIntersection cylinderIntersection = intersectCylinder(ray, radius, true);
+ RayShapeIntersection heightBoundsIntersection = intersectHeightBounds(ray, minMaxHeight, true);
+ return intersectIntersections(ray, cylinderIntersection, heightBoundsIntersection);
+}
+
+void intersectShape(Ray ray, inout Intersections ix)
+{
+ // Position is converted from [0,1] to [-1,+1] because shape intersections assume unit space is [-1,+1].
+ // Direction is scaled as well to be in sync with position.
+ ray.pos = ray.pos * 2.0 - 1.0;
+ ray.dir *= 2.0;
+
+ RayShapeIntersection outerIntersect = intersectBoundedCylinder(ray, u_cylinderRenderRadiusMinMax.y, u_cylinderRenderHeightMinMax);
+
+ setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_RADIUS_MAX, outerIntersect);
+
+ if (outerIntersect.entry.w == NO_HIT) {
+ return;
+ }
+
+ #if defined(CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT)
+ // When the cylinder is perfectly thin it's necessary to sandwich the
+ // inner cylinder intersection inside the outer cylinder intersection.
+
+ // Without this special case,
+ // [outerMin, outerMax, innerMin, innerMax] will bubble sort to
+ // [outerMin, innerMin, outerMax, innerMax] which will cause the back
+ // side of the cylinder to be invisible because it will think the ray
+ // is still inside the inner (negative) cylinder after exiting the
+ // outer (positive) cylinder.
+
+ // With this special case,
+ // [outerMin, innerMin, innerMax, outerMax] will bubble sort to
+ // [outerMin, innerMin, innerMax, outerMax] which will work correctly.
+
+ // Note: If initializeIntersections() changes its sorting function
+ // from bubble sort to something else, this code may need to change.
+ RayShapeIntersection innerIntersect = intersectCylinder(ray, 1.0, false);
+ setSurfaceIntersection(ix, 0, outerIntersect.entry, true, true); // positive, enter
+ setSurfaceIntersection(ix, 1, innerIntersect.entry, false, true); // negative, enter
+ setSurfaceIntersection(ix, 2, innerIntersect.exit, false, false); // negative, exit
+ setSurfaceIntersection(ix, 3, outerIntersect.exit, true, false); // positive, exit
+ #elif defined(CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN)
+ RayShapeIntersection innerIntersect = intersectCylinder(ray, u_cylinderRenderRadiusMinMax.x, false);
+ setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_RADIUS_MIN, innerIntersect);
+ #endif
+
+ #if defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF)
+ RayShapeIntersection wedgeIntersect = intersectRegularWedge(ray, u_cylinderRenderAngleMinMax);
+ setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE, wedgeIntersect);
+ #elif defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF)
+ RayShapeIntersection wedgeIntersects[2];
+ intersectFlippedWedge(ray, u_cylinderRenderAngleMinMax, wedgeIntersects);
+ setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 0, wedgeIntersects[0]);
+ setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 1, wedgeIntersects[1]);
+ #elif defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO)
+ RayShapeIntersection wedgeIntersects[2];
+ intersectHalfPlane(ray, u_cylinderRenderAngleMinMax.x, wedgeIntersects);
+ setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 0, wedgeIntersects[0]);
+ setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 1, wedgeIntersects[1]);
+ #endif
+}
+`, IntersectEllipsoid = `// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, INF_HIT, Intersections,
+// RayShapeIntersection, setSurfaceIntersection, setShapeIntersection
+// See IntersectLongitude.glsl for the definitions of intersectHalfPlane,
+// intersectFlippedWedge, intersectRegularWedge
+
+/* Ellipsoid defines (set in Scene/VoxelEllipsoidShape.js)
+#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE
+#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO
+#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF
+#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF
+#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF
+#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF
+#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF
+#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF
+#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF
+#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF
+#define ELLIPSOID_INTERSECTION_INDEX_LONGITUDE
+#define ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX
+#define ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN
+#define ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX
+#define ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN
+*/
+
+#if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE)
+ uniform vec2 u_ellipsoidRenderLongitudeMinMax;
+#endif
+uniform float u_eccentricitySquared;
+uniform vec2 u_ellipsoidRenderLatitudeSinMinMax;
+uniform vec2 u_clipMinMaxHeight;
+
+RayShapeIntersection intersectZPlane(in Ray ray, in float z) {
+ float t = -ray.pos.z / ray.dir.z;
+
+ bool startsOutside = sign(ray.pos.z) == sign(z);
+ bool entry = (t >= 0.0) != startsOutside;
+
+ vec4 intersect = vec4(0.0, 0.0, z, t);
+ vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
+
+ if (entry) {
+ return RayShapeIntersection(intersect, farSide);
+ } else {
+ return RayShapeIntersection(-1.0 * farSide, intersect);
+ }
+}
+
+RayShapeIntersection intersectHeight(in Ray ray, in float relativeHeight, in bool convex)
+{
+ // Scale the ray by the ellipsoid axes to make it a unit sphere
+ // Note: approximating ellipsoid + height as an ellipsoid
+ vec3 radiiCorrection = u_ellipsoidRadiiUv / (u_ellipsoidRadiiUv + relativeHeight);
+ vec3 position = ray.pos * radiiCorrection;
+ vec3 direction = ray.dir * radiiCorrection;
+
+ float a = dot(direction, direction); // ~ 1.0 (or maybe 4.0 if ray is scaled)
+ float b = dot(direction, position); // roughly inside [-1.0, 1.0] when zoomed in
+ float c = dot(position, position) - 1.0; // ~ 0.0 when zoomed in.
+ float determinant = b * b - a * c; // ~ b * b when zoomed in
+
+ if (determinant < 0.0) {
+ vec4 miss = vec4(normalize(direction), NO_HIT);
+ return RayShapeIntersection(miss, miss);
+ }
+
+ determinant = sqrt(determinant);
+
+ // Compute larger root using standard formula
+ float signB = b < 0.0 ? -1.0 : 1.0;
+ // The other root may suffer from subtractive cancellation in the standard formula.
+ // Compute it from the first root instead.
+ float t1 = (-b - signB * determinant) / a;
+ float t2 = c / (a * t1);
+ float tmin = min(t1, t2);
+ float tmax = max(t1, t2);
+
+ float directionScale = convex ? 1.0 : -1.0;
+ vec3 d1 = directionScale * normalize(position + tmin * direction);
+ vec3 d2 = directionScale * normalize(position + tmax * direction);
+
+ return RayShapeIntersection(vec4(d1, tmin), vec4(d2, tmax));
+}
+
+/**
+ * Given a circular cone around the z-axis, with apex at the origin,
+ * find the parametric distance(s) along a ray where that ray intersects
+ * the cone.
+ * The cone opening angle is described by the squared cosine of
+ * its half-angle (the angle between the Z-axis and the surface)
+ */
+vec2 intersectDoubleEndedCone(in Ray ray, in float cosSqrHalfAngle)
+{
+ vec3 o = ray.pos;
+ vec3 d = ray.dir;
+ float sinSqrHalfAngle = 1.0 - cosSqrHalfAngle;
+
+ float aSin = d.z * d.z * sinSqrHalfAngle;
+ float aCos = -dot(d.xy, d.xy) * cosSqrHalfAngle;
+ float a = aSin + aCos;
+
+ float bSin = d.z * o.z * sinSqrHalfAngle;
+ float bCos = -dot(o.xy, d.xy) * cosSqrHalfAngle;
+ float b = bSin + bCos;
+
+ float cSin = o.z * o.z * sinSqrHalfAngle;
+ float cCos = -dot(o.xy, o.xy) * cosSqrHalfAngle;
+ float c = cSin + cCos;
+ // determinant = b * b - a * c. But bSin * bSin = aSin * cSin.
+ // Avoid subtractive cancellation by expanding to eliminate these terms
+ float determinant = 2.0 * bSin * bCos + bCos * bCos - aSin * cCos - aCos * cSin - aCos * cCos;
+
+ if (determinant < 0.0) {
+ return vec2(NO_HIT);
+ } else if (a == 0.0) {
+ // Ray is parallel to cone surface
+ return (b == 0.0)
+ ? vec2(NO_HIT) // Ray is on cone surface
+ : vec2(-0.5 * c / b, NO_HIT);
+ }
+
+ determinant = sqrt(determinant);
+
+ // Compute larger root using standard formula
+ float signB = b < 0.0 ? -1.0 : 1.0;
+ float t1 = (-b - signB * determinant) / a;
+ // The other root may suffer from subtractive cancellation in the standard formula.
+ // Compute it from the first root instead.
+ float t2 = c / (a * t1);
+ float tmin = min(t1, t2);
+ float tmax = max(t1, t2);
+ return vec2(tmin, tmax);
+}
+
+/**
+ * Given a point on a conical surface, find the surface normal at that point.
+ */
+vec3 getConeNormal(in vec3 p, in bool convex) {
+ // Start with radial component pointing toward z-axis
+ vec2 radial = -abs(p.z) * normalize(p.xy);
+ // Z component points toward opening of cone
+ float zSign = (p.z < 0.0) ? -1.0 : 1.0;
+ float z = length(p.xy) * zSign;
+ // Flip normal if shape is convex
+ float flip = (convex) ? -1.0 : 1.0;
+ return normalize(vec3(radial, z) * flip);
+}
+
+/**
+ * Compute the shift between the ellipsoid origin and the apex of a cone of latitude
+ */
+float getLatitudeConeShift(in float sinLatitude) {
+ // Find prime vertical radius of curvature:
+ // the distance along the ellipsoid normal to the intersection with the z-axis
+ float x2 = u_eccentricitySquared * sinLatitude * sinLatitude;
+ float primeVerticalRadius = inversesqrt(1.0 - x2);
+
+ // Compute a shift from the origin to the intersection of the cone with the z-axis
+ return primeVerticalRadius * u_eccentricitySquared * sinLatitude;
+}
+
+void intersectFlippedCone(in Ray ray, in float cosHalfAngle, out RayShapeIntersection intersections[2]) {
+ // Undo the scaling from ellipsoid to sphere
+ ray.pos = ray.pos * u_ellipsoidRadiiUv;
+ ray.dir = ray.dir * u_ellipsoidRadiiUv;
+ // Shift the ray to account for the latitude cone not being centered at the Earth center
+ ray.pos.z += getLatitudeConeShift(cosHalfAngle);
+
+ float cosSqrHalfAngle = cosHalfAngle * cosHalfAngle;
+ vec2 intersect = intersectDoubleEndedCone(ray, cosSqrHalfAngle);
+
+ vec4 miss = vec4(normalize(ray.dir), NO_HIT);
+ vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
+
+ // Initialize output with no intersections
+ intersections[0].entry = -1.0 * farSide;
+ intersections[0].exit = farSide;
+ intersections[1].entry = miss;
+ intersections[1].exit = miss;
+
+ if (intersect.x == NO_HIT) {
+ return;
+ }
+
+ // Find the points of intersection
+ float tmin = intersect.x;
+ float tmax = intersect.y;
+ vec3 p0 = ray.pos + tmin * ray.dir;
+ vec3 p1 = ray.pos + tmax * ray.dir;
+
+ vec4 intersect0 = vec4(getConeNormal(p0, true), tmin);
+ vec4 intersect1 = vec4(getConeNormal(p1, true), tmax);
+
+ bool p0InShadowCone = sign(p0.z) != sign(cosHalfAngle);
+ bool p1InShadowCone = sign(p1.z) != sign(cosHalfAngle);
+
+ if (p0InShadowCone && p1InShadowCone) {
+ // no valid intersections
+ } else if (p0InShadowCone) {
+ intersections[0].exit = intersect1;
+ } else if (p1InShadowCone) {
+ intersections[0].entry = intersect0;
+ } else {
+ intersections[0].exit = intersect0;
+ intersections[1].entry = intersect1;
+ intersections[1].exit = farSide;
+ }
+}
+
+RayShapeIntersection intersectRegularCone(in Ray ray, in float cosHalfAngle, in bool convex) {
+ // Undo the scaling from ellipsoid to sphere
+ ray.pos = ray.pos * u_ellipsoidRadiiUv;
+ ray.dir = ray.dir * u_ellipsoidRadiiUv;
+ // Shift the ray to account for the latitude cone not being centered at the Earth center
+ ray.pos.z += getLatitudeConeShift(cosHalfAngle);
+
+ float cosSqrHalfAngle = cosHalfAngle * cosHalfAngle;
+ vec2 intersect = intersectDoubleEndedCone(ray, cosSqrHalfAngle);
+
+ vec4 miss = vec4(normalize(ray.dir), NO_HIT);
+ vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
+
+ if (intersect.x == NO_HIT) {
+ return RayShapeIntersection(miss, miss);
+ }
+
+ // Find the points of intersection
+ float tmin = intersect.x;
+ float tmax = intersect.y;
+ vec3 p0 = ray.pos + tmin * ray.dir;
+ vec3 p1 = ray.pos + tmax * ray.dir;
+
+ vec4 intersect0 = vec4(getConeNormal(p0, convex), tmin);
+ vec4 intersect1 = vec4(getConeNormal(p1, convex), tmax);
+
+ bool p0InShadowCone = sign(p0.z) != sign(cosHalfAngle);
+ bool p1InShadowCone = sign(p1.z) != sign(cosHalfAngle);
+
+ if (p0InShadowCone && p1InShadowCone) {
+ return RayShapeIntersection(miss, miss);
+ } else if (p0InShadowCone) {
+ return RayShapeIntersection(intersect1, farSide);
+ } else if (p1InShadowCone) {
+ return RayShapeIntersection(-1.0 * farSide, intersect0);
+ } else {
+ return RayShapeIntersection(intersect0, intersect1);
+ }
+}
+
+void intersectShape(in Ray ray, inout Intersections ix) {
+ // Position is converted from [0,1] to [-1,+1] because shape intersections assume unit space is [-1,+1].
+ // Direction is scaled as well to be in sync with position.
+ ray.pos = ray.pos * 2.0 - 1.0;
+ ray.dir *= 2.0;
+
+ // Outer ellipsoid
+ RayShapeIntersection outerIntersect = intersectHeight(ray, u_clipMinMaxHeight.y, true);
+ setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX, outerIntersect);
+
+ // Exit early if the outer ellipsoid was missed.
+ if (outerIntersect.entry.w == NO_HIT) {
+ return;
+ }
+
+ // Inner ellipsoid
+ RayShapeIntersection innerIntersect = intersectHeight(ray, u_clipMinMaxHeight.x, false);
+
+ if (innerIntersect.entry.w == NO_HIT) {
+ setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN, innerIntersect);
+ } else {
+ // When the ellipsoid is large and thin it's possible for floating point math
+ // to cause the ray to intersect the inner ellipsoid before the outer ellipsoid.
+ // To prevent this from happening, clamp innerIntersect to outerIntersect and
+ // sandwich the inner ellipsoid intersection inside the outer ellipsoid intersection.
+
+ // Without this special case,
+ // [outerMin, outerMax, innerMin, innerMax] will bubble sort to
+ // [outerMin, innerMin, outerMax, innerMax] which will cause the back
+ // side of the ellipsoid to be invisible because it will think the ray
+ // is still inside the inner (negative) ellipsoid after exiting the
+ // outer (positive) ellipsoid.
+
+ // With this special case,
+ // [outerMin, innerMin, innerMax, outerMax] will bubble sort to
+ // [outerMin, innerMin, innerMax, outerMax] which will work correctly.
+
+ // Note: If initializeIntersections() changes its sorting function
+ // from bubble sort to something else, this code may need to change.
+ innerIntersect.entry.w = max(innerIntersect.entry.w, outerIntersect.entry.w);
+ innerIntersect.exit.w = min(innerIntersect.exit.w, outerIntersect.exit.w);
+ setSurfaceIntersection(ix, 0, outerIntersect.entry, true, true); // positive, enter
+ setSurfaceIntersection(ix, 1, innerIntersect.entry, false, true); // negative, enter
+ setSurfaceIntersection(ix, 2, innerIntersect.exit, false, false); // negative, exit
+ setSurfaceIntersection(ix, 3, outerIntersect.exit, true, false); // positive, exit
+ }
+
+ // Bottom cone
+ #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF)
+ RayShapeIntersection bottomConeIntersection = intersectRegularCone(ray, u_ellipsoidRenderLatitudeSinMinMax.x, false);
+ setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN, bottomConeIntersection);
+ #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF)
+ RayShapeIntersection bottomConeIntersection = intersectZPlane(ray, -1.0);
+ setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN, bottomConeIntersection);
+ #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF)
+ RayShapeIntersection bottomConeIntersections[2];
+ intersectFlippedCone(ray, u_ellipsoidRenderLatitudeSinMinMax.x, bottomConeIntersections);
+ setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN + 0, bottomConeIntersections[0]);
+ setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN + 1, bottomConeIntersections[1]);
+ #endif
+
+ // Top cone
+ #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF)
+ RayShapeIntersection topConeIntersections[2];
+ intersectFlippedCone(ray, u_ellipsoidRenderLatitudeSinMinMax.y, topConeIntersections);
+ setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX + 0, topConeIntersections[0]);
+ setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX + 1, topConeIntersections[1]);
+ #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF)
+ RayShapeIntersection topConeIntersection = intersectZPlane(ray, 1.0);
+ setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX, topConeIntersection);
+ #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF)
+ RayShapeIntersection topConeIntersection = intersectRegularCone(ray, u_ellipsoidRenderLatitudeSinMinMax.y, false);
+ setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX, topConeIntersection);
+ #endif
+
+ // Wedge
+ #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO)
+ RayShapeIntersection wedgeIntersects[2];
+ intersectHalfPlane(ray, u_ellipsoidRenderLongitudeMinMax.x, wedgeIntersects);
+ setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 0, wedgeIntersects[0]);
+ setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 1, wedgeIntersects[1]);
+ #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF)
+ RayShapeIntersection wedgeIntersect = intersectRegularWedge(ray, u_ellipsoidRenderLongitudeMinMax);
+ setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE, wedgeIntersect);
+ #elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF)
+ RayShapeIntersection wedgeIntersects[2];
+ intersectFlippedWedge(ray, u_ellipsoidRenderLongitudeMinMax, wedgeIntersects);
+ setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 0, wedgeIntersects[0]);
+ setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 1, wedgeIntersects[1]);
+ #endif
+}
+`, Intersection = `// Main intersection function for Voxel scenes.
+// See IntersectBox.glsl, IntersectCylinder.glsl, or IntersectEllipsoid.glsl
+// for the definition of intersectShape. The appropriate function is selected
+// based on the VoxelPrimitive shape type, and added to the shader in
+// Scene/VoxelRenderResources.js.
+// See also IntersectClippingPlane.glsl and IntersectDepth.glsl.
+// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT,
+// getFirstIntersection, initializeIntersections, nextIntersection.
+
+/* Intersection defines (set in Scene/VoxelRenderResources.js)
+#define INTERSECTION_COUNT ###
+*/
+
+RayShapeIntersection intersectScene(in vec2 screenCoord, in Ray ray, out Intersections ix) {
+ // Do a ray-shape intersection to find the exact starting and ending points.
+ intersectShape(ray, ix);
+
+ // Exit early if the positive shape was completely missed or behind the ray.
+ RayShapeIntersection intersection = getFirstIntersection(ix);
+ if (intersection.entry.w == NO_HIT) {
+ // Positive shape was completely missed - so exit early.
+ return intersection;
+ }
+
+ // Clipping planes
+ #if defined(CLIPPING_PLANES)
+ intersectClippingPlanes(ray, ix);
+ #endif
+
+ // Depth
+ #if defined(DEPTH_TEST)
+ intersectDepth(screenCoord, ray, ix);
+ #endif
+
+ // Find the first intersection that's in front of the ray
+ #if (INTERSECTION_COUNT > 1)
+ initializeIntersections(ix);
+ for (int i = 0; i < INTERSECTION_COUNT; ++i) {
+ intersection = nextIntersection(ix);
+ if (intersection.exit.w > 0.0) {
+ // Set start to 0.0 when ray is inside the shape.
+ intersection.entry.w = max(intersection.entry.w, 0.0);
+ break;
+ }
+ }
+ #else
+ // Set start to 0.0 when ray is inside the shape.
+ intersection.entry.w = max(intersection.entry.w, 0.0);
+ #endif
+
+ return intersection;
+}
+`, convertUvToBox = `/* Box defines (set in Scene/VoxelBoxShape.js)
+#define BOX_HAS_SHAPE_BOUNDS
+*/
+
+#if defined(BOX_HAS_SHAPE_BOUNDS)
+ uniform vec3 u_boxUvToShapeUvScale;
+ uniform vec3 u_boxUvToShapeUvTranslate;
+#endif
+
+PointJacobianT convertUvToShapeSpaceDerivative(in vec3 positionUv) {
+ // For BOX, UV space = shape space, so we can use positionUv as-is,
+ // and the Jacobian is the identity matrix, except that a step of 1
+ // only spans half the shape space [-1, 1], so the identity is scaled.
+ return PointJacobianT(positionUv, mat3(0.5));
+}
+
+vec3 convertShapeToShapeUvSpace(in vec3 positionShape) {
+#if defined(BOX_HAS_SHAPE_BOUNDS)
+ return positionShape * u_boxUvToShapeUvScale + u_boxUvToShapeUvTranslate;
+#else
+ return positionShape;
+#endif
+}
+
+PointJacobianT convertUvToShapeUvSpaceDerivative(in vec3 positionUv) {
+ PointJacobianT pointJacobian = convertUvToShapeSpaceDerivative(positionUv);
+ pointJacobian.point = convertShapeToShapeUvSpace(pointJacobian.point);
+ return pointJacobian;
+}
+
+vec3 convertShapeUvToUvSpace(in vec3 shapeUv) {
+#if defined(BOX_HAS_SHAPE_BOUNDS)
+ return (shapeUv - u_boxUvToShapeUvTranslate) / u_boxUvToShapeUvScale;
+#else
+ return shapeUv;
+#endif
+}
+
+vec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) {
+#if defined(BOX_HAS_SHAPE_BOUNDS)
+ return shapeUv / u_boxUvToShapeUvScale;
+#else
+ return shapeUv;
+#endif
+}`, convertUvToCylinder = `/* Cylinder defines (set in Scene/VoxelCylinderShape.js)
+#define CYLINDER_HAS_SHAPE_BOUNDS_RADIUS
+#define CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT
+#define CYLINDER_HAS_SHAPE_BOUNDS_ANGLE
+#define CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY
+#define CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY
+#define CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED
+*/
+
+#if defined(CYLINDER_HAS_SHAPE_BOUNDS_RADIUS)
+ uniform vec2 u_cylinderUvToShapeUvRadius; // x = scale, y = offset
+#endif
+#if defined(CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT)
+ uniform vec2 u_cylinderUvToShapeUvHeight; // x = scale, y = offset
+#endif
+#if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE)
+ uniform vec2 u_cylinderUvToShapeUvAngle; // x = scale, y = offset
+#endif
+#if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY) || defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY)
+ uniform vec2 u_cylinderShapeUvAngleMinMax;
+#endif
+#if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY) || defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY) || defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED)
+ uniform float u_cylinderShapeUvAngleRangeZeroMid;
+#endif
+
+PointJacobianT convertUvToShapeSpaceDerivative(in vec3 positionUv) {
+ // Convert from Cartesian UV space [0, 1] to Cartesian local space [-1, 1]
+ vec3 position = positionUv * 2.0 - 1.0;
+
+ float radius = length(position.xy); // [0, 1]
+ vec3 radial = normalize(vec3(position.xy, 0.0));
+
+ // Shape space height is defined within [0, 1]
+ float height = positionUv.z; // [0, 1]
+ vec3 z = vec3(0.0, 0.0, 1.0);
+
+ float angle = atan(position.y, position.x);
+ vec3 east = normalize(vec3(-position.y, position.x, 0.0));
+
+ vec3 point = vec3(radius, height, angle);
+ mat3 jacobianT = mat3(radial, z, east / length(position.xy));
+ return PointJacobianT(point, jacobianT);
+}
+
+vec3 convertShapeToShapeUvSpace(in vec3 positionShape) {
+ float radius = positionShape.x;
+ #if defined(CYLINDER_HAS_SHAPE_BOUNDS_RADIUS)
+ radius = radius * u_cylinderUvToShapeUvRadius.x + u_cylinderUvToShapeUvRadius.y;
+ #endif
+
+ float height = positionShape.y;
+ #if defined(CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT)
+ height = height * u_cylinderUvToShapeUvHeight.x + u_cylinderUvToShapeUvHeight.y;
+ #endif
+
+ float angle = (positionShape.z + czm_pi) / czm_twoPi;
+ #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE)
+ #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED)
+ // Comparing against u_cylinderShapeUvAngleMinMax has precision problems. u_cylinderShapeUvAngleRangeZeroMid is more conservative.
+ angle += float(angle < u_cylinderShapeUvAngleRangeZeroMid);
+ #endif
+
+ // Avoid flickering from reading voxels from both sides of the -pi/+pi discontinuity.
+ #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY)
+ angle = angle > u_cylinderShapeUvAngleRangeZeroMid ? u_cylinderShapeUvAngleMinMax.x : angle;
+ #elif defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY)
+ angle = angle < u_cylinderShapeUvAngleRangeZeroMid ? u_cylinderShapeUvAngleMinMax.y : angle;
+ #endif
+
+ angle = angle * u_cylinderUvToShapeUvAngle.x + u_cylinderUvToShapeUvAngle.y;
+ #endif
+
+ return vec3(radius, height, angle);
+}
+
+PointJacobianT convertUvToShapeUvSpaceDerivative(in vec3 positionUv) {
+ PointJacobianT pointJacobian = convertUvToShapeSpaceDerivative(positionUv);
+ pointJacobian.point = convertShapeToShapeUvSpace(pointJacobian.point);
+ return pointJacobian;
+}
+
+vec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) {
+ float radius = shapeUv.x;
+ #if defined(CYLINDER_HAS_SHAPE_BOUNDS_RADIUS)
+ radius /= u_cylinderUvToShapeUvRadius.x;
+ #endif
+
+ float height = shapeUv.y;
+ #if defined(CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT)
+ height /= u_cylinderUvToShapeUvHeight.x;
+ #endif
+
+ float angle = shapeUv.z * czm_twoPi;
+ #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE)
+ angle /= u_cylinderUvToShapeUvAngle.x;
+ #endif
+
+ return vec3(radius, height, angle);
+}
+`, convertUvToEllipsoid = `/* Ellipsoid defines (set in Scene/VoxelEllipsoidShape.js)
+#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY
+#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY
+#define ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE
+#define ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED
+#define ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE
+*/
+
+uniform vec3 u_ellipsoidRadiiUv; // [0,1]
+uniform vec2 u_evoluteScale; // (radiiUv.x ^ 2 - radiiUv.z ^ 2) * vec2(1.0, -1.0) / radiiUv;
+uniform vec3 u_ellipsoidInverseRadiiSquaredUv;
+#if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY) || defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY) || defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED)
+ uniform vec3 u_ellipsoidShapeUvLongitudeMinMaxMid;
+#endif
+#if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE)
+ uniform vec2 u_ellipsoidUvToShapeUvLongitude; // x = scale, y = offset
+#endif
+#if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE)
+ uniform vec2 u_ellipsoidUvToShapeUvLatitude; // x = scale, y = offset
+#endif
+uniform float u_ellipsoidInverseHeightDifferenceUv;
+
+// robust iterative solution without trig functions
+// https://github.com/0xfaded/ellipse_demo/issues/1
+// https://stackoverflow.com/questions/22959698/distance-from-given-point-to-given-ellipse
+// Extended to return radius of curvature along with the point
+vec3 nearestPointAndRadiusOnEllipse(vec2 pos, vec2 radii) {
+ vec2 p = abs(pos);
+ vec2 inverseRadii = 1.0 / radii;
+
+ // We describe the ellipse parametrically: v = radii * vec2(cos(t), sin(t))
+ // but store the cos and sin of t in a vec2 for efficiency.
+ // Initial guess: t = pi/4
+ vec2 tTrigs = vec2(0.7071067811865476);
+ // Initial guess of point on ellipsoid
+ vec2 v = radii * tTrigs;
+ // Center of curvature of the ellipse at v
+ vec2 evolute = u_evoluteScale * tTrigs * tTrigs * tTrigs;
+
+ const int iterations = 3;
+ for (int i = 0; i < iterations; ++i) {
+ // Find the (approximate) intersection of p - evolute with the ellipsoid.
+ vec2 q = normalize(p - evolute) * length(v - evolute);
+ // Update the estimate of t.
+ tTrigs = (q + evolute) * inverseRadii;
+ tTrigs = normalize(clamp(tTrigs, 0.0, 1.0));
+ v = radii * tTrigs;
+ evolute = u_evoluteScale * tTrigs * tTrigs * tTrigs;
+ }
+
+ return vec3(v * sign(pos), length(v - evolute));
+}
+
+PointJacobianT convertUvToShapeSpaceDerivative(in vec3 positionUv) {
+ // Convert from UV space [0, 1] to local space [-1, 1]
+ vec3 position = positionUv * 2.0 - 1.0;
+ // Undo the scaling from ellipsoid to sphere
+ position = position * u_ellipsoidRadiiUv;
+
+ float longitude = atan(position.y, position.x);
+ vec3 east = normalize(vec3(-position.y, position.x, 0.0));
+
+ // Convert the 3D position to a 2D position relative to the ellipse (radii.x, radii.z)
+ // (assume radii.y == radii.x) and find the nearest point on the ellipse and its normal
+ float distanceFromZAxis = length(position.xy);
+ vec2 posEllipse = vec2(distanceFromZAxis, position.z);
+ vec3 surfacePointAndRadius = nearestPointAndRadiusOnEllipse(posEllipse, u_ellipsoidRadiiUv.xz);
+ vec2 surfacePoint = surfacePointAndRadius.xy;
+
+ vec2 normal2d = normalize(surfacePoint * u_ellipsoidInverseRadiiSquaredUv.xz);
+ float latitude = atan(normal2d.y, normal2d.x);
+ vec3 north = vec3(-normal2d.y * normalize(position.xy), abs(normal2d.x));
+
+ float heightSign = length(posEllipse) < length(surfacePoint) ? -1.0 : 1.0;
+ float height = heightSign * length(posEllipse - surfacePoint);
+ vec3 up = normalize(cross(east, north));
+
+ vec3 point = vec3(longitude, latitude, height);
+ mat3 jacobianT = mat3(east / distanceFromZAxis, north / (surfacePointAndRadius.z + height), up);
+ return PointJacobianT(point, jacobianT);
+}
+
+vec3 convertShapeToShapeUvSpace(in vec3 positionShape) {
+ // Longitude: shift & scale to [0, 1]
+ float longitude = (positionShape.x + czm_pi) / czm_twoPi;
+
+ // Correct the angle when max < min
+ // Technically this should compare against min longitude - but it has precision problems so compare against the middle of empty space.
+ #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED)
+ longitude += float(longitude < u_ellipsoidShapeUvLongitudeMinMaxMid.z);
+ #endif
+
+ // Avoid flickering from reading voxels from both sides of the -pi/+pi discontinuity.
+ #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY)
+ longitude = longitude > u_ellipsoidShapeUvLongitudeMinMaxMid.z ? u_ellipsoidShapeUvLongitudeMinMaxMid.x : longitude;
+ #endif
+ #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY)
+ longitude = longitude < u_ellipsoidShapeUvLongitudeMinMaxMid.z ? u_ellipsoidShapeUvLongitudeMinMaxMid.y : longitude;
+ #endif
+
+ #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE)
+ longitude = longitude * u_ellipsoidUvToShapeUvLongitude.x + u_ellipsoidUvToShapeUvLongitude.y;
+ #endif
+
+ // Latitude: shift and scale to [0, 1]
+ float latitude = (positionShape.y + czm_piOverTwo) / czm_pi;
+ #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE)
+ latitude = latitude * u_ellipsoidUvToShapeUvLatitude.x + u_ellipsoidUvToShapeUvLatitude.y;
+ #endif
+
+ // Height: scale to the range [0, 1]
+ float height = 1.0 + positionShape.z * u_ellipsoidInverseHeightDifferenceUv;
+
+ return vec3(longitude, latitude, height);
+}
+
+PointJacobianT convertUvToShapeUvSpaceDerivative(in vec3 positionUv) {
+ PointJacobianT pointJacobian = convertUvToShapeSpaceDerivative(positionUv);
+ pointJacobian.point = convertShapeToShapeUvSpace(pointJacobian.point);
+ return pointJacobian;
+}
+
+vec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) {
+ // Convert from [0, 1] to radians [-pi, pi]
+ float longitude = shapeUv.x * czm_twoPi;
+ #if defined (ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE)
+ longitude /= u_ellipsoidUvToShapeUvLongitude.x;
+ #endif
+
+ // Convert from [0, 1] to radians [-pi/2, pi/2]
+ float latitude = shapeUv.y * czm_pi;
+ #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE)
+ latitude /= u_ellipsoidUvToShapeUvLatitude.x;
+ #endif
+
+ float height = shapeUv.z / u_ellipsoidInverseHeightDifferenceUv;
+
+ return vec3(longitude, latitude, height);
+}
+`, Octree = `// These octree flags must be in sync with GpuOctreeFlag in VoxelTraversal.js
+#define OCTREE_FLAG_INTERNAL 0
+#define OCTREE_FLAG_LEAF 1
+#define OCTREE_FLAG_PACKED_LEAF_FROM_PARENT 2
+
+#define OCTREE_MAX_LEVELS 32 // Harcoded value because GLSL doesn't like variable length loops
+
+uniform sampler2D u_octreeInternalNodeTexture;
+uniform vec2 u_octreeInternalNodeTexelSizeUv;
+uniform int u_octreeInternalNodeTilesPerRow;
+#if (SAMPLE_COUNT > 1)
+uniform sampler2D u_octreeLeafNodeTexture;
+uniform vec2 u_octreeLeafNodeTexelSizeUv;
+uniform int u_octreeLeafNodeTilesPerRow;
+#endif
+
+struct OctreeNodeData {
+ int data;
+ int flag;
+};
+
+struct TraversalData {
+ ivec4 octreeCoords;
+ int parentOctreeIndex;
+};
+
+struct SampleData {
+ int megatextureIndex;
+ ivec4 tileCoords;
+ vec3 tileUv;
+ #if (SAMPLE_COUNT > 1)
+ float weight;
+ #endif
+};
+
+// Integer mod: For WebGL1 only
+int intMod(in int a, in int b) {
+ return a - (b * (a / b));
+}
+int normU8_toInt(in float value) {
+ return int(value * 255.0);
+}
+int normU8x2_toInt(in vec2 value) {
+ return int(value.x * 255.0) + 256 * int(value.y * 255.0);
+}
+float normU8x2_toFloat(in vec2 value) {
+ return float(normU8x2_toInt(value)) / 65535.0;
+}
+
+OctreeNodeData getOctreeNodeData(in vec2 octreeUv) {
+ vec4 texData = texture(u_octreeInternalNodeTexture, octreeUv);
+
+ OctreeNodeData data;
+ data.data = normU8x2_toInt(texData.xy);
+ data.flag = normU8x2_toInt(texData.zw);
+ return data;
+}
+
+OctreeNodeData getOctreeChildData(in int parentOctreeIndex, in ivec3 childCoord) {
+ int childIndex = childCoord.z * 4 + childCoord.y * 2 + childCoord.x;
+ int octreeCoordX = intMod(parentOctreeIndex, u_octreeInternalNodeTilesPerRow) * 9 + 1 + childIndex;
+ int octreeCoordY = parentOctreeIndex / u_octreeInternalNodeTilesPerRow;
+ vec2 octreeUv = u_octreeInternalNodeTexelSizeUv * vec2(float(octreeCoordX) + 0.5, float(octreeCoordY) + 0.5);
+ return getOctreeNodeData(octreeUv);
+}
+
+int getOctreeParentIndex(in int octreeIndex) {
+ int octreeCoordX = intMod(octreeIndex, u_octreeInternalNodeTilesPerRow) * 9;
+ int octreeCoordY = octreeIndex / u_octreeInternalNodeTilesPerRow;
+ vec2 octreeUv = u_octreeInternalNodeTexelSizeUv * vec2(float(octreeCoordX) + 0.5, float(octreeCoordY) + 0.5);
+ vec4 parentData = texture(u_octreeInternalNodeTexture, octreeUv);
+ int parentOctreeIndex = normU8x2_toInt(parentData.xy);
+ return parentOctreeIndex;
+}
+
+/**
+* Convert a position in the uv-space of the tileset bounding shape
+* into the uv-space of a tile within the tileset
+*/
+vec3 getTileUv(in vec3 shapePosition, in ivec4 octreeCoords) {
+ // PERFORMANCE_IDEA: use bit-shifting (only in WebGL2)
+ float dimAtLevel = exp2(float(octreeCoords.w));
+ return shapePosition * dimAtLevel - vec3(octreeCoords.xyz);
+}
+
+vec3 getClampedTileUv(in vec3 shapePosition, in ivec4 octreeCoords) {
+ vec3 tileUv = getTileUv(shapePosition, octreeCoords);
+ return clamp(tileUv, vec3(0.0), vec3(1.0));
+}
+
+void getOctreeLeafSampleData(in OctreeNodeData data, in ivec4 octreeCoords, out SampleData sampleData) {
+ sampleData.megatextureIndex = data.data;
+ sampleData.tileCoords = (data.flag == OCTREE_FLAG_PACKED_LEAF_FROM_PARENT)
+ ? ivec4(octreeCoords.xyz / 2, octreeCoords.w - 1)
+ : octreeCoords;
+}
+
+#if (SAMPLE_COUNT > 1)
+void getOctreeLeafSampleDatas(in OctreeNodeData data, in ivec4 octreeCoords, out SampleData sampleDatas[SAMPLE_COUNT]) {
+ int leafIndex = data.data;
+ int leafNodeTexelCount = 2;
+ // Adding 0.5 moves to the center of the texel
+ float leafCoordXStart = float(intMod(leafIndex, u_octreeLeafNodeTilesPerRow) * leafNodeTexelCount) + 0.5;
+ float leafCoordY = float(leafIndex / u_octreeLeafNodeTilesPerRow) + 0.5;
+
+ // Get an interpolation weight and a flag to determine whether to read the parent texture
+ vec2 leafUv0 = u_octreeLeafNodeTexelSizeUv * vec2(leafCoordXStart + 0.0, leafCoordY);
+ vec4 leafData0 = texture(u_octreeLeafNodeTexture, leafUv0);
+ float lerp = normU8x2_toFloat(leafData0.xy);
+ sampleDatas[0].weight = 1.0 - lerp;
+ sampleDatas[1].weight = lerp;
+ // TODO: this looks wrong? Should be comparing to OCTREE_FLAG_PACKED_LEAF_FROM_PARENT
+ sampleDatas[0].tileCoords = (normU8_toInt(leafData0.z) == 1)
+ ? ivec4(octreeCoords.xyz / 2, octreeCoords.w - 1)
+ : octreeCoords;
+ sampleDatas[1].tileCoords = (normU8_toInt(leafData0.w) == 1)
+ ? ivec4(octreeCoords.xyz / 2, octreeCoords.w - 1)
+ : octreeCoords;
+
+ // Get megatexture indices for both samples
+ vec2 leafUv1 = u_octreeLeafNodeTexelSizeUv * vec2(leafCoordXStart + 1.0, leafCoordY);
+ vec4 leafData1 = texture(u_octreeLeafNodeTexture, leafUv1);
+ sampleDatas[0].megatextureIndex = normU8x2_toInt(leafData1.xy);
+ sampleDatas[1].megatextureIndex = normU8x2_toInt(leafData1.zw);
+}
+#endif
+
+OctreeNodeData traverseOctreeDownwards(in vec3 shapePosition, inout TraversalData traversalData) {
+ float sizeAtLevel = exp2(-1.0 * float(traversalData.octreeCoords.w));
+ vec3 start = vec3(traversalData.octreeCoords.xyz) * sizeAtLevel;
+ vec3 end = start + vec3(sizeAtLevel);
+ OctreeNodeData childData;
+
+ for (int i = 0; i < OCTREE_MAX_LEVELS; ++i) {
+ // Find out which octree child contains the position
+ // 0 if before center, 1 if after
+ vec3 center = 0.5 * (start + end);
+ vec3 childCoord = step(center, shapePosition);
+
+ // Get octree coords for the next level down
+ ivec4 octreeCoords = traversalData.octreeCoords;
+ traversalData.octreeCoords = ivec4(octreeCoords.xyz * 2 + ivec3(childCoord), octreeCoords.w + 1);
+
+ childData = getOctreeChildData(traversalData.parentOctreeIndex, ivec3(childCoord));
+
+ if (childData.flag != OCTREE_FLAG_INTERNAL) {
+ // leaf tile - stop traversing
+ break;
+ }
+
+ // interior tile - keep going deeper
+ start = mix(start, center, childCoord);
+ end = mix(center, end, childCoord);
+ traversalData.parentOctreeIndex = childData.data;
+ }
+
+ return childData;
+}
+
+/**
+* Transform a given position to an octree tile coordinate and a position within that tile,
+* and find the corresponding megatexture index and texture coordinates
+*/
+void traverseOctreeFromBeginning(in vec3 shapePosition, out TraversalData traversalData, out SampleData sampleDatas[SAMPLE_COUNT]) {
+ traversalData.octreeCoords = ivec4(0);
+ traversalData.parentOctreeIndex = 0;
+
+ OctreeNodeData nodeData = getOctreeNodeData(vec2(0.0));
+ if (nodeData.flag != OCTREE_FLAG_LEAF) {
+ nodeData = traverseOctreeDownwards(shapePosition, traversalData);
+ }
+
+ #if (SAMPLE_COUNT == 1)
+ getOctreeLeafSampleData(nodeData, traversalData.octreeCoords, sampleDatas[0]);
+ sampleDatas[0].tileUv = getClampedTileUv(shapePosition, sampleDatas[0].tileCoords);
+ #else
+ getOctreeLeafSampleDatas(nodeData, traversalData.octreeCoords, sampleDatas);
+ sampleDatas[0].tileUv = getClampedTileUv(shapePosition, sampleDatas[0].tileCoords);
+ sampleDatas[1].tileUv = getClampedTileUv(shapePosition, sampleDatas[1].tileCoords);
+ #endif
+}
+
+bool inRange(in vec3 v, in vec3 minVal, in vec3 maxVal) {
+ return clamp(v, minVal, maxVal) == v;
+}
+
+bool insideTile(in vec3 shapePosition, in ivec4 octreeCoords) {
+ vec3 tileUv = getTileUv(shapePosition, octreeCoords);
+ bool inside = inRange(tileUv, vec3(0.0), vec3(1.0));
+ // Assume (!) the position is always inside the root tile.
+ return inside || octreeCoords.w == 0;
+}
+
+void traverseOctreeFromExisting(in vec3 shapePosition, inout TraversalData traversalData, inout SampleData sampleDatas[SAMPLE_COUNT]) {
+ if (insideTile(shapePosition, traversalData.octreeCoords)) {
+ for (int i = 0; i < SAMPLE_COUNT; i++) {
+ sampleDatas[0].tileUv = getClampedTileUv(shapePosition, sampleDatas[0].tileCoords);
+ }
+ return;
+ }
+
+ // Go up tree until we find a parent tile containing shapePosition
+ for (int i = 0; i < OCTREE_MAX_LEVELS; ++i) {
+ traversalData.octreeCoords.xyz /= 2;
+ traversalData.octreeCoords.w -= 1;
+
+ if (insideTile(shapePosition, traversalData.octreeCoords)) {
+ break;
+ }
+
+ traversalData.parentOctreeIndex = getOctreeParentIndex(traversalData.parentOctreeIndex);
+ }
+
+ // Go down tree
+ OctreeNodeData nodeData = traverseOctreeDownwards(shapePosition, traversalData);
+
+ #if (SAMPLE_COUNT == 1)
+ getOctreeLeafSampleData(nodeData, traversalData.octreeCoords, sampleDatas[0]);
+ sampleDatas[0].tileUv = getClampedTileUv(shapePosition, sampleDatas[0].tileCoords);
+ #else
+ getOctreeLeafSampleDatas(nodeData, traversalData.octreeCoords, sampleDatas);
+ sampleDatas[0].tileUv = getClampedTileUv(shapePosition, sampleDatas[0].tileCoords);
+ sampleDatas[1].tileUv = getClampedTileUv(shapePosition, sampleDatas[1].tileCoords);
+ #endif
+}
+`, Megatexture$1 = `// See Octree.glsl for the definitions of SampleData and intMod
+
+/* Megatexture defines (set in Scene/VoxelRenderResources.js)
+#define SAMPLE_COUNT ###
+#define NEAREST_SAMPLING
+#define PADDING
+*/
+
+uniform ivec2 u_megatextureSliceDimensions; // number of slices per tile, in two dimensions
+uniform ivec2 u_megatextureTileDimensions; // number of tiles per megatexture, in two dimensions
+uniform vec2 u_megatextureVoxelSizeUv;
+uniform vec2 u_megatextureSliceSizeUv;
+uniform vec2 u_megatextureTileSizeUv;
+
+uniform ivec3 u_dimensions; // does not include padding
+#if defined(PADDING)
+ uniform ivec3 u_paddingBefore;
+ uniform ivec3 u_paddingAfter;
+#endif
+
+// Integer min, max, clamp: For WebGL1 only
+int intMin(int a, int b) {
+ return a <= b ? a : b;
+}
+int intMax(int a, int b) {
+ return a >= b ? a : b;
+}
+int intClamp(int v, int minVal, int maxVal) {
+ return intMin(intMax(v, minVal), maxVal);
+}
+
+vec2 index1DTo2DTexcoord(int index, ivec2 dimensions, vec2 uvScale)
+{
+ int indexX = intMod(index, dimensions.x);
+ int indexY = index / dimensions.x;
+ return vec2(indexX, indexY) * uvScale;
+}
+
+/*
+ How is 3D data stored in a 2D megatexture?
+
+ In this example there is only one loaded tile and it has 2x2x2 voxels (8 voxels total).
+ The data is sliced by Z. The data at Z = 0 is placed in texels (0,0), (0,1), (1,0), (1,1) and
+ the data at Z = 1 is placed in texels (2,0), (2,1), (3,0), (3,1).
+ Note that there could be empty space in the megatexture because it's a power of two.
+
+ 0 1 2 3
+ +---+---+---+---+
+ | | | | | 3
+ +---+---+---+---+
+ | | | | | 2
+ +-------+-------+
+ |010|110|011|111| 1
+ |--- ---|--- ---|
+ |000|100|001|101| 0
+ +-------+-------+
+
+ When doing linear interpolation the megatexture needs to be sampled twice: once for
+ the Z slice above the voxel coordinate and once for the slice below. The two slices
+ are interpolated with fract(coord.z - 0.5). For example, a Z coordinate of 1.0 is
+ halfway between two Z slices so the interpolation factor is 0.5. Below is a side view
+ of the 3D voxel grid with voxel coordinates on the left side.
+
+ 2 +---+
+ |001|
+ 1 +-z-+
+ |000|
+ 0 +---+
+
+ When doing nearest neighbor the megatexture only needs to be sampled once at the closest Z slice.
+*/
+
+Properties getPropertiesFromMegatexture(in SampleData sampleData) {
+ int tileIndex = sampleData.megatextureIndex;
+ vec3 voxelCoord = sampleData.tileUv * vec3(u_dimensions);
+ ivec3 voxelDimensions = u_dimensions;
+
+ #if defined(PADDING)
+ voxelDimensions += u_paddingBefore + u_paddingAfter;
+ voxelCoord += vec3(u_paddingBefore);
+ #endif
+
+ #if defined(NEAREST_SAMPLING)
+ // Round to the center of the nearest voxel
+ voxelCoord = floor(voxelCoord) + vec3(0.5);
+ #endif
+
+ // Tile location
+ vec2 tileUvOffset = index1DTo2DTexcoord(tileIndex, u_megatextureTileDimensions, u_megatextureTileSizeUv);
+
+ // Slice location
+ float slice = voxelCoord.z - 0.5;
+ int sliceIndex = int(floor(slice));
+ int sliceIndex0 = intClamp(sliceIndex, 0, voxelDimensions.z - 1);
+ vec2 sliceUvOffset0 = index1DTo2DTexcoord(sliceIndex0, u_megatextureSliceDimensions, u_megatextureSliceSizeUv);
+
+ // Voxel location
+ vec2 voxelUvOffset = clamp(voxelCoord.xy, vec2(0.5), vec2(voxelDimensions.xy) - vec2(0.5)) * u_megatextureVoxelSizeUv;
+
+ // Final location in the megatexture
+ vec2 uv0 = tileUvOffset + sliceUvOffset0 + voxelUvOffset;
+
+ #if defined(NEAREST_SAMPLING)
+ return getPropertiesFromMegatextureAtUv(uv0);
+ #else
+ float sliceLerp = fract(slice);
+ int sliceIndex1 = intMin(sliceIndex + 1, voxelDimensions.z - 1);
+ vec2 sliceUvOffset1 = index1DTo2DTexcoord(sliceIndex1, u_megatextureSliceDimensions, u_megatextureSliceSizeUv);
+ vec2 uv1 = tileUvOffset + sliceUvOffset1 + voxelUvOffset;
+ Properties properties0 = getPropertiesFromMegatextureAtUv(uv0);
+ Properties properties1 = getPropertiesFromMegatextureAtUv(uv1);
+ return mixProperties(properties0, properties1, sliceLerp);
+ #endif
+}
+
+// Convert an array of sample datas to a final weighted properties.
+Properties accumulatePropertiesFromMegatexture(in SampleData sampleDatas[SAMPLE_COUNT]) {
+ #if (SAMPLE_COUNT == 1)
+ return getPropertiesFromMegatexture(sampleDatas[0]);
+ #else
+ // When more than one sample is taken the accumulator needs to start at 0
+ Properties properties = clearProperties();
+ for (int i = 0; i < SAMPLE_COUNT; ++i) {
+ float weight = sampleDatas[i].weight;
+
+ // Avoid reading the megatexture when the weight is 0 as it can be costly.
+ if (weight > 0.0) {
+ Properties tempProperties = getPropertiesFromMegatexture(sampleDatas[i]);
+ tempProperties = scaleProperties(tempProperties, weight);
+ properties = sumProperties(properties, tempProperties);
+ }
+ }
+ return properties;
+ #endif
+}
+`;
+function VoxelRenderResources(e) {
+ const t = new ShaderBuilder();
+ this.shaderBuilder = t;
+ const n = e._customShader, i = combine$2(e._uniformMap, n.uniformMap);
+ e._uniformMap = i;
+ const r = n.uniforms;
+ for (const p in r)
+ if (r.hasOwnProperty(p)) {
+ const m = r[p];
+ t.addUniform(
+ m.type,
+ p,
+ ShaderDestination$1.FRAGMENT
+ );
+ }
+ t.addUniform(
+ "sampler2D",
+ "u_megatextureTextures[METADATA_COUNT]",
+ ShaderDestination$1.FRAGMENT
+ ), this.uniformMap = i;
+ const o = e._clippingPlanes, s = defined(o) && o.enabled ? o.length : 0;
+ this.clippingPlanes = o, this.clippingPlanesLength = s, t.addVertexLines([VoxelVS]), t.addFragmentLines([
+ n.fragmentShaderText,
+ "#line 0",
+ Octree,
+ VoxelUtils,
+ IntersectionUtils,
+ Megatexture$1
+ ]), s > 0 && (t.addDefine(
+ "CLIPPING_PLANES",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ), t.addDefine(
+ "CLIPPING_PLANES_COUNT",
+ s,
+ ShaderDestination$1.FRAGMENT
+ ), o.unionClippingRegions && t.addDefine(
+ "CLIPPING_PLANES_UNION",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ), t.addFragmentLines([IntersectClippingPlanes])), e._depthTest && (t.addDefine(
+ "DEPTH_TEST",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ), t.addFragmentLines([IntersectDepth]));
+ const c = e._provider.shape;
+ c === "BOX" ? t.addFragmentLines([
+ convertUvToBox,
+ IntersectBox,
+ Intersection
+ ]) : c === "CYLINDER" ? t.addFragmentLines([
+ convertUvToCylinder,
+ IntersectLongitude,
+ IntersectCylinder,
+ Intersection
+ ]) : c === "ELLIPSOID" && (t.addDefine(
+ "SHAPE_ELLIPSOID",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ), t.addFragmentLines([
+ convertUvToEllipsoid,
+ IntersectLongitude,
+ IntersectEllipsoid,
+ Intersection
+ ])), t.addFragmentLines([VoxelFS]);
+ const l = e._shape, d = l.shaderDefines;
+ for (const p in d)
+ if (d.hasOwnProperty(p)) {
+ let m = d[p];
+ defined(m) && (m = m === !0 ? void 0 : m, t.addDefine(p, m, ShaderDestination$1.FRAGMENT));
+ }
+ let f = l.shaderMaximumIntersectionsLength;
+ s > 0 && (t.addDefine(
+ "CLIPPING_PLANES_INTERSECTION_INDEX",
+ f,
+ ShaderDestination$1.FRAGMENT
+ ), s === 1 ? f += 1 : o.unionClippingRegions ? f += 2 : f += 1), e._depthTest && (t.addDefine(
+ "DEPTH_INTERSECTION_INDEX",
+ f,
+ ShaderDestination$1.FRAGMENT
+ ), f += 1), t.addDefine(
+ "INTERSECTION_COUNT",
+ f,
+ ShaderDestination$1.FRAGMENT
+ ), (!Cartesian3.equals(e.paddingBefore, Cartesian3.ZERO) || !Cartesian3.equals(e.paddingAfter, Cartesian3.ZERO)) && t.addDefine("PADDING", void 0, ShaderDestination$1.FRAGMENT), e._useLogDepth && t.addDefine(
+ "LOG_DEPTH_READ_ONLY",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ ), e._nearestSampling && t.addDefine(
+ "NEAREST_SAMPLING",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ );
+ const h = e._traversal;
+ t.addDefine(
+ "SAMPLE_COUNT",
+ `${h._sampleCount}`,
+ ShaderDestination$1.FRAGMENT
+ );
+}
+function processVoxelProperties(e, t) {
+ const { shaderBuilder: n } = e, {
+ names: i,
+ types: r,
+ componentTypes: o,
+ minimumValues: s,
+ maximumValues: c
+ } = t._provider, l = r.length, d = defined(s) && defined(c);
+ n.addDefine(
+ "METADATA_COUNT",
+ l,
+ ShaderDestination$1.FRAGMENT
+ ), d && n.addDefine(
+ "STATISTICS",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ );
+ for (let P = 0; P < l; P++) {
+ const I = i[P], M = r[P], R = `PropertyStatistics_${I}`, L = `PropertyStatistics_${I}`;
+ n.addStruct(
+ R,
+ L,
+ ShaderDestination$1.FRAGMENT
+ );
+ const g = getGlslType(M);
+ n.addStructField(R, g, "min"), n.addStructField(R, g, "max");
+ }
+ const f = "Statistics", h = "Statistics", p = "statistics";
+ n.addStruct(
+ f,
+ h,
+ ShaderDestination$1.FRAGMENT
+ );
+ for (let P = 0; P < l; P++) {
+ const I = i[P], M = `PropertyStatistics_${I}`, R = I;
+ n.addStructField(
+ f,
+ M,
+ R
+ );
+ }
+ const m = "Metadata", _ = "Metadata", y = "metadata";
+ n.addStruct(
+ m,
+ _,
+ ShaderDestination$1.FRAGMENT
+ ), n.addStructField(
+ m,
+ h,
+ p
+ );
+ for (let P = 0; P < l; P++) {
+ const I = i[P], M = r[P], R = getGlslType(M);
+ n.addStructField(m, R, I);
+ }
+ for (let P = 0; P < l; P++) {
+ const I = i[P], M = r[P], R = getGlslPartialDerivativeType(M), L = `VoxelProperty_${I}`, g = `VoxelProperty_${I}`;
+ n.addStruct(
+ L,
+ g,
+ ShaderDestination$1.FRAGMENT
+ ), n.addStructField(
+ L,
+ R,
+ "partialDerivativeLocal"
+ ), n.addStructField(
+ L,
+ R,
+ "partialDerivativeWorld"
+ ), n.addStructField(
+ L,
+ R,
+ "partialDerivativeView"
+ ), n.addStructField(
+ L,
+ R,
+ "partialDerivativeValid"
+ );
+ }
+ const C = "Voxel", T = "Voxel", x = "voxel";
+ n.addStruct(
+ C,
+ T,
+ ShaderDestination$1.FRAGMENT
+ );
+ for (let P = 0; P < l; P++) {
+ const I = i[P], M = `VoxelProperty_${I}`;
+ n.addStructField(C, M, I);
+ }
+ n.addStructField(C, "vec3", "positionEC"), n.addStructField(C, "vec3", "positionUv"), n.addStructField(C, "vec3", "positionShapeUv"), n.addStructField(C, "vec3", "positionUvLocal"), n.addStructField(C, "vec3", "viewDirUv"), n.addStructField(C, "vec3", "viewDirWorld"), n.addStructField(C, "vec3", "surfaceNormal"), n.addStructField(C, "float", "travelDistance"), n.addStructField(C, "int", "stepCount"), n.addStructField(C, "int", "tileIndex"), n.addStructField(C, "int", "sampleIndex");
+ const b = "FragmentInput";
+ n.addStruct(
+ b,
+ "FragmentInput",
+ ShaderDestination$1.FRAGMENT
+ ), n.addStructField(
+ b,
+ _,
+ y
+ ), n.addStructField(
+ b,
+ T,
+ x
+ );
+ const E = "Properties", A = "Properties", D = "properties";
+ n.addStruct(
+ E,
+ A,
+ ShaderDestination$1.FRAGMENT
+ );
+ for (let P = 0; P < l; P++) {
+ const I = i[P], M = r[P], R = getGlslType(M);
+ n.addStructField(E, R, I);
+ }
+ {
+ const P = "clearProperties";
+ n.addFunction(
+ P,
+ `${A} clearProperties()`,
+ ShaderDestination$1.FRAGMENT
+ ), n.addFunctionLines(P, [
+ `${A} ${D};`
+ ]);
+ for (let I = 0; I < l; I++) {
+ const M = i[I], R = r[I];
+ o[I];
+ const L = getGlslType(R);
+ n.addFunctionLines(P, [
+ `${D}.${M} = ${L}(0.0);`
+ ]);
+ }
+ n.addFunctionLines(P, [
+ `return ${D};`
+ ]);
+ }
+ {
+ const P = "sumProperties";
+ n.addFunction(
+ P,
+ `${A} sumProperties(${A} propertiesA, ${A} propertiesB)`,
+ ShaderDestination$1.FRAGMENT
+ ), n.addFunctionLines(P, [
+ `${A} ${D};`
+ ]);
+ for (let I = 0; I < l; I++) {
+ const M = i[I];
+ n.addFunctionLines(P, [
+ `${D}.${M} = propertiesA.${M} + propertiesB.${M};`
+ ]);
+ }
+ n.addFunctionLines(P, [
+ `return ${D};`
+ ]);
+ }
+ {
+ const P = "scaleProperties";
+ n.addFunction(
+ P,
+ `${A} scaleProperties(${A} ${D}, float scale)`,
+ ShaderDestination$1.FRAGMENT
+ ), n.addFunctionLines(P, [
+ `${A} scaledProperties = ${D};`
+ ]);
+ for (let I = 0; I < l; I++) {
+ const M = i[I];
+ n.addFunctionLines(P, [
+ `scaledProperties.${M} *= scale;`
+ ]);
+ }
+ n.addFunctionLines(P, ["return scaledProperties;"]);
+ }
+ {
+ const P = "mixProperties";
+ n.addFunction(
+ P,
+ `${A} mixProperties(${A} propertiesA, ${A} propertiesB, float mixFactor)`,
+ ShaderDestination$1.FRAGMENT
+ ), n.addFunctionLines(P, [
+ `${A} ${D};`
+ ]);
+ for (let I = 0; I < l; I++) {
+ const M = i[I];
+ n.addFunctionLines(P, [
+ `${D}.${M} = mix(propertiesA.${M}, propertiesB.${M}, mixFactor);`
+ ]);
+ }
+ n.addFunctionLines(P, [
+ `return ${D};`
+ ]);
+ }
+ {
+ const P = "copyPropertiesToMetadata";
+ n.addFunction(
+ P,
+ `void copyPropertiesToMetadata(in ${A} ${D}, inout ${_} ${y})`,
+ ShaderDestination$1.FRAGMENT
+ );
+ for (let I = 0; I < l; I++) {
+ const M = i[I];
+ n.addFunctionLines(P, [
+ `${y}.${M} = ${D}.${M};`
+ ]);
+ }
+ }
+ if (d) {
+ const P = "setStatistics";
+ n.addFunction(
+ P,
+ `void setStatistics(inout ${h} ${p})`,
+ ShaderDestination$1.FRAGMENT
+ );
+ for (let I = 0; I < l; I++) {
+ const M = i[I], R = r[I], L = MetadataType$1.getComponentCount(R);
+ for (let g = 0; g < L; g++) {
+ const w = getGlslField(R, g), O = s[I][g], N = c[I][g];
+ n.addFunctionLines(P, [
+ `${p}.${M}.min${w} = ${getGlslNumberAsFloat(
+ O
+ )};`,
+ `${p}.${M}.max${w} = ${getGlslNumberAsFloat(
+ N
+ )};`
+ ]);
+ }
+ }
+ }
+ {
+ const P = "getPropertiesFromMegatextureAtUv";
+ n.addFunction(
+ P,
+ `${A} getPropertiesFromMegatextureAtUv(vec2 texcoord)`,
+ ShaderDestination$1.FRAGMENT
+ ), n.addFunctionLines(P, [
+ `${A} ${D};`
+ ]);
+ for (let I = 0; I < l; I++) {
+ const M = i[I], R = r[I];
+ o[I];
+ const L = getGlslTextureSwizzle(R);
+ n.addFunctionLines(P, [
+ `properties.${M} = texture(u_megatextureTextures[${I}], texcoord)${L};`
+ ]);
+ }
+ n.addFunctionLines(P, [
+ `return ${D};`
+ ]);
+ }
+}
+function getGlslType(e) {
+ if (e === MetadataType$1.SCALAR)
+ return "float";
+ if (e === MetadataType$1.VEC2)
+ return "vec2";
+ if (e === MetadataType$1.VEC3)
+ return "vec3";
+ if (e === MetadataType$1.VEC4)
+ return "vec4";
+}
+function getGlslTextureSwizzle(e) {
+ if (e === MetadataType$1.SCALAR)
+ return ".r";
+ if (e === MetadataType$1.VEC2)
+ return ".ra";
+ if (e === MetadataType$1.VEC3)
+ return ".rgb";
+ if (e === MetadataType$1.VEC4)
+ return "";
+}
+function getGlslPartialDerivativeType(e) {
+ if (e === MetadataType$1.SCALAR)
+ return "vec3";
+ if (e === MetadataType$1.VEC2)
+ return "mat2";
+ if (e === MetadataType$1.VEC3)
+ return "mat3";
+ if (e === MetadataType$1.VEC4)
+ return "mat4";
+}
+function getGlslNumberAsFloat(e) {
+ let t = e.toString();
+ return t.indexOf(".") === -1 && (t = `${e}.0`), t;
+}
+function getGlslField(e, t) {
+ return e === MetadataType$1.SCALAR ? "" : `[${t}]`;
+}
+function buildVoxelDrawCommands(e, t) {
+ const n = new VoxelRenderResources(e);
+ processVoxelProperties(n, e);
+ const {
+ shaderBuilder: i,
+ clippingPlanes: r,
+ clippingPlanesLength: o
+ } = n;
+ if (o > 0) {
+ const T = "getClippingPlane", x = getClippingFunction(r, t), b = 0, S = x.indexOf(")") + 1, E = x.indexOf("{", S) + 1, A = x.indexOf("}", E), D = x.slice(
+ b,
+ S
+ ), P = x.slice(
+ E,
+ A
+ );
+ i.addFunction(
+ T,
+ D,
+ ShaderDestination$1.FRAGMENT
+ ), i.addFunctionLines(T, [P]);
+ }
+ const s = i.clone();
+ s.addDefine("PICKING", void 0, ShaderDestination$1.FRAGMENT);
+ const c = i.clone();
+ c.addDefine(
+ "PICKING_VOXEL",
+ void 0,
+ ShaderDestination$1.FRAGMENT
+ );
+ const l = i.buildShaderProgram(t), d = s.buildShaderProgram(t), f = c.buildShaderProgram(
+ t
+ ), h = RenderState.fromCache({
+ cull: {
+ enabled: !0,
+ face: CullFace$1.BACK
+ },
+ depthTest: {
+ enabled: !1
+ },
+ depthMask: !1,
+ // internally the shader does premultiplied alpha, so it makes sense to blend that way too
+ blending: BlendingState$1.PRE_MULTIPLIED_ALPHA_BLEND
+ }), p = t.getViewportQuadVertexArray(), m = e._depthTest, _ = new DrawCommand({
+ vertexArray: p,
+ primitiveType: PrimitiveType$1.TRIANGLES,
+ renderState: h,
+ shaderProgram: l,
+ uniformMap: n.uniformMap,
+ modelMatrix: e._compoundModelMatrix,
+ pass: Pass$1.VOXELS,
+ executeInClosestFrustum: !0,
+ owner: this,
+ cull: m,
+ // don't cull or occlude if depth testing is off
+ occlude: m
+ // don't cull or occlude if depth testing is off
+ }), y = DrawCommand.shallowClone(
+ _,
+ new DrawCommand()
+ );
+ y.shaderProgram = d, y.pickOnly = !0;
+ const C = DrawCommand.shallowClone(
+ _,
+ new DrawCommand()
+ );
+ if (C.shaderProgram = f, C.pickOnly = !0, defined(e._drawCommand)) {
+ const T = e._drawCommand;
+ T.shaderProgram = T.shaderProgram && T.shaderProgram.destroy();
+ }
+ if (defined(e._drawCommandPick)) {
+ const T = e._drawCommandPick;
+ T.shaderProgram = T.shaderProgram && T.shaderProgram.destroy();
+ }
+ if (defined(e._drawCommandPickVoxel)) {
+ const T = e._drawCommandPickVoxel;
+ T.shaderProgram = T.shaderProgram && T.shaderProgram.destroy();
+ }
+ e._drawCommand = _, e._drawCommandPick = y, e._drawCommandPickVoxel = C;
+}
+function VoxelBoxShape() {
+ this.orientedBoundingBox = new OrientedBoundingBox(), this.boundingSphere = new BoundingSphere(), this.boundTransform = new Matrix4(), this.shapeTransform = new Matrix4(), this._minBounds = Cartesian3.clone(
+ VoxelBoxShape.DefaultMinBounds,
+ new Cartesian3()
+ ), this._maxBounds = Cartesian3.clone(
+ VoxelBoxShape.DefaultMaxBounds,
+ new Cartesian3()
+ ), this.shaderUniforms = {
+ renderMinBounds: new Cartesian3(),
+ renderMaxBounds: new Cartesian3(),
+ boxUvToShapeUvScale: new Cartesian3(),
+ boxUvToShapeUvTranslate: new Cartesian3()
+ }, this.shaderDefines = {
+ BOX_INTERSECTION_INDEX: void 0,
+ BOX_HAS_SHAPE_BOUNDS: void 0
+ }, this.shaderMaximumIntersectionsLength = 0;
+}
+const scratchCenter = new Cartesian3(), scratchScale$4 = new Cartesian3(), scratchRotation$2 = new Matrix3(), scratchClipMinBounds$1 = new Cartesian3(), scratchClipMaxBounds$1 = new Cartesian3(), scratchRenderMinBounds$1 = new Cartesian3(), scratchRenderMaxBounds$1 = new Cartesian3(), transformLocalToUv = Matrix4.fromRotationTranslation(
+ Matrix3.fromUniformScale(0.5, new Matrix3()),
+ new Cartesian3(0.5, 0.5, 0.5),
+ new Matrix4()
+);
+VoxelBoxShape.prototype.update = function(e, t, n, i, r) {
+ i = defaultValue(i, VoxelBoxShape.DefaultMinBounds), r = defaultValue(r, VoxelBoxShape.DefaultMaxBounds);
+ const o = VoxelBoxShape.DefaultMinBounds, s = VoxelBoxShape.DefaultMaxBounds;
+ t = this._minBounds = Cartesian3.clamp(
+ t,
+ o,
+ s,
+ this._minBounds
+ ), n = this._maxBounds = Cartesian3.clamp(
+ n,
+ o,
+ s,
+ this._maxBounds
+ ), i = Cartesian3.clamp(
+ i,
+ o,
+ s,
+ scratchClipMinBounds$1
+ ), r = Cartesian3.clamp(
+ r,
+ o,
+ s,
+ scratchClipMaxBounds$1
+ );
+ const c = Cartesian3.clamp(
+ t,
+ i,
+ r,
+ scratchRenderMinBounds$1
+ ), l = Cartesian3.clamp(
+ n,
+ i,
+ r,
+ scratchRenderMaxBounds$1
+ ), d = Matrix4.getScale(e, scratchScale$4);
+ if (c.x > l.x || c.y > l.y || c.z > l.z || (c.x === l.x) + (c.y === l.y) + (c.z === l.z) >= 2 || i.x > r.x || i.y > r.y || i.z > r.z || d.x === 0 || d.y === 0 || d.z === 0)
+ return !1;
+ this.shapeTransform = Matrix4.clone(e, this.shapeTransform), this.orientedBoundingBox = getBoxChunkObb(
+ c,
+ l,
+ this.shapeTransform,
+ this.orientedBoundingBox
+ ), this.boundTransform = Matrix4.fromRotationTranslation(
+ this.orientedBoundingBox.halfAxes,
+ this.orientedBoundingBox.center,
+ this.boundTransform
+ ), this.boundingSphere = BoundingSphere.fromOrientedBoundingBox(
+ this.orientedBoundingBox,
+ this.boundingSphere
+ );
+ const { shaderUniforms: f, shaderDefines: h } = this;
+ for (const _ in h)
+ h.hasOwnProperty(_) && (h[_] = void 0);
+ const p = !Cartesian3.equals(t, o) || !Cartesian3.equals(n, s);
+ let m = 0;
+ if (h.BOX_INTERSECTION_INDEX = m, m += 1, f.renderMinBounds = Matrix4.multiplyByPoint(
+ transformLocalToUv,
+ c,
+ f.renderMinBounds
+ ), f.renderMaxBounds = Matrix4.multiplyByPoint(
+ transformLocalToUv,
+ l,
+ f.renderMaxBounds
+ ), p) {
+ h.BOX_HAS_SHAPE_BOUNDS = !0;
+ const _ = t, y = n;
+ f.boxUvToShapeUvScale = Cartesian3.fromElements(
+ 2 / (_.x === y.x ? 1 : y.x - _.x),
+ 2 / (_.y === y.y ? 1 : y.y - _.y),
+ 2 / (_.z === y.z ? 1 : y.z - _.z),
+ f.boxUvToShapeUvScale
+ ), f.boxUvToShapeUvTranslate = Cartesian3.fromElements(
+ -f.boxUvToShapeUvScale.x * (_.x * 0.5 + 0.5),
+ -f.boxUvToShapeUvScale.y * (_.y * 0.5 + 0.5),
+ -f.boxUvToShapeUvScale.z * (_.z * 0.5 + 0.5),
+ f.boxUvToShapeUvTranslate
+ );
+ }
+ return this.shaderMaximumIntersectionsLength = m, !0;
+};
+const scratchTileMinBounds$2 = new Cartesian3(), scratchTileMaxBounds$2 = new Cartesian3();
+VoxelBoxShape.prototype.computeOrientedBoundingBoxForTile = function(e, t, n, i, r) {
+ const o = this._minBounds, s = this._maxBounds, c = 1 / Math.pow(2, e), l = Cartesian3.fromElements(
+ CesiumMath.lerp(o.x, s.x, c * t),
+ CesiumMath.lerp(o.y, s.y, c * n),
+ CesiumMath.lerp(o.z, s.z, c * i),
+ scratchTileMinBounds$2
+ ), d = Cartesian3.fromElements(
+ CesiumMath.lerp(o.x, s.x, c * (t + 1)),
+ CesiumMath.lerp(o.y, s.y, c * (n + 1)),
+ CesiumMath.lerp(o.z, s.z, c * (i + 1)),
+ scratchTileMaxBounds$2
+ );
+ return getBoxChunkObb(
+ l,
+ d,
+ this.shapeTransform,
+ r
+ );
+};
+const sampleSizeScratch$2 = new Cartesian3();
+VoxelBoxShape.prototype.computeOrientedBoundingBoxForSample = function(e, t, n, i) {
+ const r = 1 / Math.pow(2, e.level), o = Cartesian3.divideComponents(
+ Cartesian3.ONE,
+ t,
+ sampleSizeScratch$2
+ ), s = Cartesian3.multiplyByScalar(
+ o,
+ r,
+ sampleSizeScratch$2
+ ), c = Cartesian3.multiplyByScalar(
+ Cartesian3.fromElements(
+ e.x + n.x,
+ e.y + n.y,
+ e.z + n.z,
+ scratchTileMinBounds$2
+ ),
+ r,
+ scratchTileMinBounds$2
+ ), l = Cartesian3.add(
+ c,
+ s,
+ scratchTileMaxBounds$2
+ ), d = this._minBounds, f = this._maxBounds, h = Cartesian3.fromElements(
+ CesiumMath.lerp(d.x, f.x, c.x),
+ CesiumMath.lerp(d.y, f.y, c.y),
+ CesiumMath.lerp(d.z, f.z, c.z),
+ scratchTileMinBounds$2
+ ), p = Cartesian3.fromElements(
+ CesiumMath.lerp(d.x, f.x, l.x),
+ CesiumMath.lerp(d.y, f.y, l.y),
+ CesiumMath.lerp(d.z, f.z, l.z),
+ scratchTileMaxBounds$2
+ );
+ return getBoxChunkObb(
+ h,
+ p,
+ this.shapeTransform,
+ i
+ );
+};
+VoxelBoxShape.DefaultMinBounds = Object.freeze(
+ new Cartesian3(-1, -1, -1)
+);
+VoxelBoxShape.DefaultMaxBounds = Object.freeze(
+ new Cartesian3(1, 1, 1)
+);
+function getBoxChunkObb(e, t, n, i) {
+ const r = VoxelBoxShape.DefaultMinBounds, o = VoxelBoxShape.DefaultMaxBounds;
+ if (Cartesian3.equals(e, r) && Cartesian3.equals(t, o))
+ i.center = Matrix4.getTranslation(n, i.center), i.halfAxes = Matrix4.getMatrix3(n, i.halfAxes);
+ else {
+ let c = Matrix4.getScale(n, scratchScale$4);
+ const l = Cartesian3.midpoint(
+ e,
+ t,
+ scratchCenter
+ );
+ i.center = Matrix4.multiplyByPoint(n, l, i.center), c = Cartesian3.fromElements(
+ c.x * 0.5 * (t.x - e.x),
+ c.y * 0.5 * (t.y - e.y),
+ c.z * 0.5 * (t.z - e.z),
+ scratchScale$4
+ );
+ const d = Matrix4.getRotation(n, scratchRotation$2);
+ i.halfAxes = Matrix3.setScale(d, c, i.halfAxes);
+ }
+ return i;
+}
+function VoxelCylinderShape() {
+ this.orientedBoundingBox = new OrientedBoundingBox(), this.boundingSphere = new BoundingSphere(), this.boundTransform = new Matrix4(), this.shapeTransform = new Matrix4(), this._minimumRadius = VoxelCylinderShape.DefaultMinBounds.x, this._maximumRadius = VoxelCylinderShape.DefaultMaxBounds.x, this._minimumHeight = VoxelCylinderShape.DefaultMinBounds.y, this._maximumHeight = VoxelCylinderShape.DefaultMaxBounds.y, this._minimumAngle = VoxelCylinderShape.DefaultMinBounds.z, this._maximumAngle = VoxelCylinderShape.DefaultMaxBounds.z, this.shaderUniforms = {
+ cylinderRenderHeightMinMax: new Cartesian2(),
+ cylinderRenderRadiusMinMax: new Cartesian2(),
+ cylinderRenderAngleMinMax: new Cartesian2(),
+ cylinderUvToShapeUvRadius: new Cartesian2(),
+ cylinderUvToShapeUvHeight: new Cartesian2(),
+ cylinderUvToShapeUvAngle: new Cartesian2(),
+ cylinderShapeUvAngleMinMax: new Cartesian2(),
+ cylinderShapeUvAngleRangeZeroMid: 0
+ }, this.shaderDefines = {
+ CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN: void 0,
+ CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT: void 0,
+ CYLINDER_HAS_RENDER_BOUNDS_ANGLE: void 0,
+ CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO: void 0,
+ CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF: void 0,
+ CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF: void 0,
+ CYLINDER_HAS_SHAPE_BOUNDS_RADIUS: void 0,
+ CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT: void 0,
+ CYLINDER_HAS_SHAPE_BOUNDS_ANGLE: void 0,
+ CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY: void 0,
+ CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY: void 0,
+ CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED: void 0,
+ CYLINDER_INTERSECTION_INDEX_RADIUS_MAX: void 0,
+ CYLINDER_INTERSECTION_INDEX_RADIUS_MIN: void 0,
+ CYLINDER_INTERSECTION_INDEX_ANGLE: void 0
+ }, this.shaderMaximumIntersectionsLength = 0;
+}
+const scratchScale$3 = new Cartesian3();
+VoxelCylinderShape.prototype.update = function(e, t, n, i, r) {
+ i = defaultValue(
+ i,
+ VoxelCylinderShape.DefaultMinBounds
+ ), r = defaultValue(
+ r,
+ VoxelCylinderShape.DefaultMaxBounds
+ );
+ const o = VoxelCylinderShape.DefaultMinBounds.x, s = VoxelCylinderShape.DefaultMaxBounds.x, c = VoxelCylinderShape.DefaultMinBounds.y, l = VoxelCylinderShape.DefaultMaxBounds.y, d = VoxelCylinderShape.DefaultMinBounds.z, f = VoxelCylinderShape.DefaultMaxBounds.z, h = f - d, p = 0.5 * h, m = CesiumMath.EPSILON10, _ = CesiumMath.EPSILON3, y = CesiumMath.EPSILON10, C = CesiumMath.clamp(
+ t.x,
+ o,
+ s
+ ), T = CesiumMath.clamp(
+ n.x,
+ o,
+ s
+ ), x = CesiumMath.clamp(
+ i.x,
+ o,
+ s
+ ), b = CesiumMath.clamp(
+ r.x,
+ o,
+ s
+ ), S = Math.max(C, x), E = Math.min(T, b), A = CesiumMath.clamp(
+ t.y,
+ c,
+ l
+ ), D = CesiumMath.clamp(
+ n.y,
+ c,
+ l
+ ), P = CesiumMath.clamp(
+ i.y,
+ c,
+ l
+ ), I = CesiumMath.clamp(
+ r.y,
+ c,
+ l
+ ), M = Math.max(A, P), R = Math.min(D, I), L = CesiumMath.negativePiToPi(t.z), g = CesiumMath.negativePiToPi(n.z), w = CesiumMath.negativePiToPi(i.z), O = CesiumMath.negativePiToPi(r.z), N = Math.max(L, w), F = Math.min(g, O), B = Matrix4.getScale(e, scratchScale$3);
+ if (E === 0 || S > E || M > R || CesiumMath.equalsEpsilon(B.x, 0, void 0, m) || CesiumMath.equalsEpsilon(B.y, 0, void 0, m) || CesiumMath.equalsEpsilon(B.z, 0, void 0, m))
+ return !1;
+ this._minimumRadius = C, this._maximumRadius = T, this._minimumHeight = A, this._maximumHeight = D, this._minimumAngle = L, this._maximumAngle = g, this.shapeTransform = Matrix4.clone(e, this.shapeTransform), this.orientedBoundingBox = getCylinderChunkObb(
+ S,
+ E,
+ M,
+ R,
+ N,
+ F,
+ this.shapeTransform,
+ this.orientedBoundingBox
+ ), this.boundTransform = Matrix4.fromRotationTranslation(
+ this.orientedBoundingBox.halfAxes,
+ this.orientedBoundingBox.center,
+ this.boundTransform
+ ), this.boundingSphere = BoundingSphere.fromOrientedBoundingBox(
+ this.orientedBoundingBox,
+ this.boundingSphere
+ );
+ const k = C === o && T === s, $ = A === c && D === l, G = g < L, q = g - L + G * h, z = q > p + y && q < h - y, H = q < p - y, Q = q >= p - y && q <= p + y, ne = z || H || Q, K = CesiumMath.equalsEpsilon(
+ L,
+ d,
+ void 0,
+ _
+ ), Z = CesiumMath.equalsEpsilon(
+ g,
+ f,
+ void 0,
+ _
+ ), ee = S === o, oe = F < N, X = F - N + oe * h, fe = X >= p - y && X < h - y, de = X > y && X < p - y, ce = X <= y, ye = fe || de || ce, { shaderUniforms: ge, shaderDefines: re } = this;
+ for (const pe in re)
+ re.hasOwnProperty(pe) && (re[pe] = void 0);
+ let be = 0;
+ if (re.CYLINDER_INTERSECTION_INDEX_RADIUS_MAX = be, be += 1, ee || (re.CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN = !0, re.CYLINDER_INTERSECTION_INDEX_RADIUS_MIN = be, be += 1), ge.cylinderRenderRadiusMinMax = Cartesian2.fromElements(
+ S,
+ E,
+ ge.cylinderRenderRadiusMinMax
+ ), S === E && (re.CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT = !0), !k) {
+ re.CYLINDER_HAS_SHAPE_BOUNDS_RADIUS = !0;
+ const pe = T - C;
+ let Te = 0, xe = 1;
+ pe !== 0 && (Te = 1 / pe, xe = -C / pe), ge.cylinderUvToShapeUvRadius = Cartesian2.fromElements(
+ Te,
+ xe,
+ ge.cylinderUvToShapeUvRadius
+ );
+ }
+ if (!$) {
+ re.CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT = !0;
+ const pe = D - A;
+ let Te = 0, xe = 1;
+ pe !== 0 && (Te = 2 / pe, xe = -(A + 1) / pe), ge.cylinderUvToShapeUvHeight = Cartesian2.fromElements(
+ Te,
+ xe,
+ ge.cylinderUvToShapeUvHeight
+ );
+ }
+ if (ge.cylinderRenderHeightMinMax = Cartesian2.fromElements(
+ M,
+ R,
+ ge.cylinderRenderHeightMinMax
+ ), G && (re.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED = !0), ye && (re.CYLINDER_HAS_RENDER_BOUNDS_ANGLE = !0, re.CYLINDER_INTERSECTION_INDEX_ANGLE = be, fe ? (re.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF = !0, be += 1) : de ? (re.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF = !0, be += 2) : ce && (re.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO = !0, be += 2), ge.cylinderRenderAngleMinMax = Cartesian2.fromElements(
+ N,
+ F,
+ ge.cylinderRenderAngleMinMax
+ )), ne) {
+ re.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE = !0, K && (re.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY = !0), Z && (re.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY = !0);
+ const pe = (L - d) / h, Te = (g - d) / h, xe = 1 - q / h;
+ if (ge.cylinderShapeUvAngleMinMax = Cartesian2.fromElements(
+ pe,
+ Te,
+ ge.cylinderShapeUvAngleMinMax
+ ), ge.cylinderShapeUvAngleRangeZeroMid = (Te + 0.5 * xe) % 1, q <= y)
+ ge.cylinderUvToShapeUvAngle = Cartesian2.fromElements(
+ 0,
+ 1,
+ ge.cylinderUvToShapeUvAngle
+ );
+ else {
+ const W = h / q, j = -(L - d) / q;
+ ge.cylinderUvToShapeUvAngle = Cartesian2.fromElements(
+ W,
+ j,
+ ge.cylinderUvToShapeUvAngle
+ );
+ }
+ }
+ return this.shaderMaximumIntersectionsLength = be, !0;
+};
+VoxelCylinderShape.prototype.computeOrientedBoundingBoxForTile = function(e, t, n, i, r) {
+ const o = this._minimumRadius, s = this._maximumRadius, c = this._minimumHeight, l = this._maximumHeight, d = this._minimumAngle, f = this._maximumAngle, h = 1 / Math.pow(2, e), p = CesiumMath.lerp(
+ o,
+ s,
+ t * h
+ ), m = CesiumMath.lerp(
+ o,
+ s,
+ (t + 1) * h
+ ), _ = CesiumMath.lerp(
+ c,
+ l,
+ n * h
+ ), y = CesiumMath.lerp(
+ c,
+ l,
+ (n + 1) * h
+ ), C = CesiumMath.lerp(
+ d,
+ f,
+ i * h
+ ), T = CesiumMath.lerp(
+ d,
+ f,
+ (i + 1) * h
+ );
+ return getCylinderChunkObb(
+ p,
+ m,
+ _,
+ y,
+ C,
+ T,
+ this.shapeTransform,
+ r
+ );
+};
+const sampleSizeScratch$1 = new Cartesian3(), scratchTileMinBounds$1 = new Cartesian3(), scratchTileMaxBounds$1 = new Cartesian3();
+VoxelCylinderShape.prototype.computeOrientedBoundingBoxForSample = function(e, t, n, i) {
+ const r = 1 / Math.pow(2, e.level), o = Cartesian3.divideComponents(
+ Cartesian3.ONE,
+ t,
+ sampleSizeScratch$1
+ ), s = Cartesian3.multiplyByScalar(
+ o,
+ r,
+ sampleSizeScratch$1
+ ), c = Cartesian3.multiplyByScalar(
+ Cartesian3.fromElements(
+ e.x + n.x,
+ e.y + n.y,
+ e.z + n.z,
+ scratchTileMinBounds$1
+ ),
+ r,
+ scratchTileMinBounds$1
+ ), l = Cartesian3.add(
+ c,
+ s,
+ scratchTileMaxBounds$1
+ ), d = this._minimumRadius, f = this._maximumRadius, h = this._minimumHeight, p = this._maximumHeight, m = this._minimumAngle, _ = this._maximumAngle, y = CesiumMath.lerp(d, f, c.x), C = CesiumMath.lerp(d, f, l.x), T = CesiumMath.lerp(h, p, c.y), x = CesiumMath.lerp(h, p, l.y), b = CesiumMath.lerp(m, _, c.z), S = CesiumMath.lerp(m, _, l.z);
+ return getCylinderChunkObb(
+ y,
+ C,
+ T,
+ x,
+ b,
+ S,
+ this.shapeTransform,
+ i
+ );
+};
+VoxelCylinderShape.DefaultMinBounds = Object.freeze(
+ new Cartesian3(0, -1, -CesiumMath.PI)
+);
+VoxelCylinderShape.DefaultMaxBounds = Object.freeze(
+ new Cartesian3(1, 1, +CesiumMath.PI)
+);
+const maxTestAngles = 5, scratchTestAngles = new Array(maxTestAngles), scratchTranslation = new Cartesian3(), scratchRotation$1 = new Matrix3(), scratchTranslationMatrix = new Matrix4(), scratchRotationMatrix = new Matrix4(), scratchScaleMatrix = new Matrix4(), scratchMatrix = new Matrix4(), scratchColumn0 = new Cartesian3(), scratchColumn1 = new Cartesian3(), scratchColumn2 = new Cartesian3(), scratchCorners = new Array(8);
+for (let e = 0; e < 8; e++)
+ scratchCorners[e] = new Cartesian3();
+function orthogonal(e, t, n) {
+ return Math.abs(Cartesian4.dot(e, t)) < n;
+}
+function isValidOrientedBoundingBoxTransformation(e) {
+ const t = Matrix4.getColumn(e, 0, scratchColumn0), n = Matrix4.getColumn(e, 1, scratchColumn1), i = Matrix4.getColumn(e, 2, scratchColumn2), r = CesiumMath.EPSILON4;
+ return orthogonal(t, n, r) && orthogonal(n, i, r);
+}
+function computeLooseOrientedBoundingBox(e, t) {
+ const n = scratchCorners;
+ Cartesian3.fromElements(-0.5, -0.5, -0.5, n[0]), Cartesian3.fromElements(-0.5, -0.5, 0.5, n[1]), Cartesian3.fromElements(-0.5, 0.5, -0.5, n[2]), Cartesian3.fromElements(-0.5, 0.5, 0.5, n[3]), Cartesian3.fromElements(0.5, -0.5, -0.5, n[4]), Cartesian3.fromElements(0.5, -0.5, 0.5, n[5]), Cartesian3.fromElements(0.5, 0.5, -0.5, n[6]), Cartesian3.fromElements(0.5, 0.5, 0.5, n[7]);
+ for (let i = 0; i < 8; ++i)
+ Matrix4.multiplyByPoint(e, n[i], n[i]);
+ return OrientedBoundingBox.fromPoints(n, t);
+}
+function getCylinderChunkObb(e, t, n, i, r, o, s, c) {
+ const l = VoxelCylinderShape.DefaultMinBounds, d = VoxelCylinderShape.DefaultMaxBounds, f = l.x, h = d.x, p = l.y, m = d.y, _ = l.z, y = d.z;
+ if (e === f && t === h && n === p && i === m && r === _ && o === y)
+ return c.center = Matrix4.getTranslation(s, c.center), c.halfAxes = Matrix4.getMatrix3(s, c.halfAxes), c;
+ o < r && (o += CesiumMath.TWO_PI);
+ const T = o - r, x = r + T * 0.5, b = scratchTestAngles;
+ let S = 0;
+ b[S++] = r, b[S++] = o, b[S++] = x, T > CesiumMath.PI && (b[S++] = x - CesiumMath.PI_OVER_TWO, b[S++] = x + CesiumMath.PI_OVER_TWO);
+ let E = 1, A = 1, D = -1, P = -1;
+ for (let G = 0; G < S; ++G) {
+ const q = b[G] - x, z = Math.cos(q), H = Math.sin(q), Q = z * e, ne = H * e, K = z * t, Z = H * t;
+ E = Math.min(E, Q), A = Math.min(A, ne), E = Math.min(E, K), A = Math.min(A, Z), D = Math.max(D, Q), P = Math.max(P, ne), D = Math.max(D, K), P = Math.max(P, Z);
+ }
+ const I = D - E, M = P - A, R = i - n, L = (E + D) * 0.5, g = (A + P) * 0.5, w = (n + i) * 0.5, O = Cartesian3.fromElements(
+ L,
+ g,
+ w,
+ scratchTranslation
+ ), N = Matrix3.fromRotationZ(x, scratchRotation$1), F = Cartesian3.fromElements(
+ I,
+ M,
+ R,
+ scratchScale$3
+ ), B = Matrix4.fromScale(F, scratchScaleMatrix), V = Matrix4.fromRotation(N, scratchRotationMatrix), U = Matrix4.fromTranslation(
+ O,
+ scratchTranslationMatrix
+ ), k = Matrix4.multiplyTransformation(
+ V,
+ Matrix4.multiplyTransformation(
+ U,
+ B,
+ scratchMatrix
+ ),
+ scratchMatrix
+ ), $ = Matrix4.multiplyTransformation(
+ s,
+ k,
+ scratchMatrix
+ );
+ return isValidOrientedBoundingBoxTransformation($) ? OrientedBoundingBox.fromTransformation($, c) : computeLooseOrientedBoundingBox($, c);
+}
+function VoxelEllipsoidShape() {
+ this.orientedBoundingBox = new OrientedBoundingBox(), this.boundingSphere = new BoundingSphere(), this.boundTransform = new Matrix4(), this.shapeTransform = new Matrix4(), this._rectangle = new Rectangle(), this._minimumHeight = VoxelEllipsoidShape.DefaultMinBounds.z, this._maximumHeight = VoxelEllipsoidShape.DefaultMaxBounds.z, this._ellipsoid = new Ellipsoid(), this._translation = new Cartesian3(), this._rotation = new Matrix3(), this.shaderUniforms = {
+ ellipsoidRadiiUv: new Cartesian3(),
+ eccentricitySquared: 0,
+ evoluteScale: new Cartesian2(),
+ ellipsoidInverseRadiiSquaredUv: new Cartesian3(),
+ ellipsoidRenderLongitudeMinMax: new Cartesian2(),
+ ellipsoidShapeUvLongitudeMinMaxMid: new Cartesian3(),
+ ellipsoidUvToShapeUvLongitude: new Cartesian2(),
+ ellipsoidUvToShapeUvLatitude: new Cartesian2(),
+ ellipsoidRenderLatitudeSinMinMax: new Cartesian2(),
+ ellipsoidInverseHeightDifferenceUv: 0,
+ clipMinMaxHeight: new Cartesian2()
+ }, this.shaderDefines = {
+ ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE: void 0,
+ ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO: void 0,
+ ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF: void 0,
+ ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF: void 0,
+ ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY: void 0,
+ ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY: void 0,
+ ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE: void 0,
+ ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED: void 0,
+ ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF: void 0,
+ ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF: void 0,
+ ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF: void 0,
+ ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF: void 0,
+ ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF: void 0,
+ ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF: void 0,
+ ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE: void 0,
+ ELLIPSOID_INTERSECTION_INDEX_LONGITUDE: void 0,
+ ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX: void 0,
+ ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN: void 0,
+ ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX: void 0,
+ ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN: void 0
+ }, this.shaderMaximumIntersectionsLength = 0;
+}
+const scratchActualMinBounds = new Cartesian3(), scratchShapeMinBounds = new Cartesian3(), scratchShapeMaxBounds = new Cartesian3(), scratchClipMinBounds = new Cartesian3(), scratchClipMaxBounds = new Cartesian3(), scratchRenderMinBounds = new Cartesian3(), scratchRenderMaxBounds = new Cartesian3(), scratchScale$2 = new Cartesian3(), scratchRotationScale = new Matrix3(), scratchShapeOuterExtent = new Cartesian3(), scratchRenderOuterExtent = new Cartesian3(), scratchRenderRectangle = new Rectangle();
+VoxelEllipsoidShape.prototype.update = function(e, t, n, i, r) {
+ const { DefaultMinBounds: o, DefaultMaxBounds: s } = VoxelEllipsoidShape;
+ i = defaultValue(i, o), r = defaultValue(r, s);
+ const c = CesiumMath.EPSILON10, l = CesiumMath.EPSILON3, d = CesiumMath.EPSILON10, f = CesiumMath.EPSILON10, h = CesiumMath.EPSILON3, p = Matrix4.getScale(e, scratchScale$2), m = Cartesian3.clone(
+ o,
+ scratchActualMinBounds
+ );
+ m.z = -Cartesian3.minimumComponent(p);
+ const _ = Cartesian3.clamp(
+ t,
+ m,
+ s,
+ scratchShapeMinBounds
+ ), y = Cartesian3.clamp(
+ n,
+ m,
+ s,
+ scratchShapeMaxBounds
+ ), C = Cartesian3.clamp(
+ i,
+ m,
+ s,
+ scratchClipMinBounds
+ ), T = Cartesian3.clamp(
+ r,
+ m,
+ s,
+ scratchClipMaxBounds
+ ), x = Cartesian3.maximumByComponent(
+ _,
+ C,
+ scratchRenderMinBounds
+ ), b = Cartesian3.minimumByComponent(
+ y,
+ T,
+ scratchRenderMaxBounds
+ ), S = Cartesian3.add(
+ p,
+ Cartesian3.fromElements(
+ y.z,
+ y.z,
+ y.z,
+ scratchShapeOuterExtent
+ ),
+ scratchShapeOuterExtent
+ ), E = Cartesian3.maximumComponent(S), A = Cartesian3.add(
+ p,
+ Cartesian3.fromElements(
+ b.z,
+ b.z,
+ b.z,
+ scratchRenderOuterExtent
+ ),
+ scratchRenderOuterExtent
+ );
+ if (x.y > b.y || x.y === s.y || b.y === o.y || x.z > b.z || CesiumMath.equalsEpsilon(
+ A,
+ Cartesian3.ZERO,
+ void 0,
+ c
+ ))
+ return !1;
+ this._rectangle = Rectangle.fromRadians(
+ _.x,
+ _.y,
+ y.x,
+ y.y
+ ), this._translation = Matrix4.getTranslation(e, this._translation), this._rotation = Matrix4.getRotation(e, this._rotation), this._ellipsoid = Ellipsoid.fromCartesian3(p, this._ellipsoid), this._minimumHeight = _.z, this._maximumHeight = y.z;
+ const D = Rectangle.fromRadians(
+ x.x,
+ x.y,
+ b.x,
+ b.y,
+ scratchRenderRectangle
+ );
+ this.orientedBoundingBox = getEllipsoidChunkObb(
+ D,
+ x.z,
+ b.z,
+ this._ellipsoid,
+ this._translation,
+ this._rotation,
+ this.orientedBoundingBox
+ ), this.shapeTransform = Matrix4.fromRotationTranslation(
+ Matrix3.setScale(this._rotation, S, scratchRotationScale),
+ this._translation,
+ this.shapeTransform
+ ), this.boundTransform = Matrix4.fromRotationTranslation(
+ this.orientedBoundingBox.halfAxes,
+ this.orientedBoundingBox.center,
+ this.boundTransform
+ ), this.boundingSphere = BoundingSphere.fromOrientedBoundingBox(
+ this.orientedBoundingBox,
+ this.boundingSphere
+ );
+ const P = s.x - o.x, I = 0.5 * P, M = b.x < x.x, R = b.x - x.x + M * P, L = R <= d, g = R >= I - d && R < P - d, w = R > d && R < I - d, O = L || g || w, N = y.x < _.x, F = y.x - _.x + N * P, B = F > I + d && F < P - d, V = F >= I - d && F <= I + d, U = F < I - d, k = B || V || U, $ = b.y < -h, G = b.y >= -h && b.y <= +h, q = b.y > +h && b.y < s.y - f, z = $ || G || q, H = x.y > o.y + f && x.y < -h, Q = x.y >= -h && x.y <= +h, ne = x.y > +h, K = H || Q || ne, Z = z || K, ee = y.y - _.y, oe = y.y < -h, X = y.y >= -h && y.y <= +h, fe = y.y > +h && y.y < s.y - f, de = oe || X || fe, ce = _.y > o.y + f && _.y < -h, ye = _.y >= -h && _.y <= +h, ge = _.y > +h, be = de || (ce || ye || ge), { shaderUniforms: pe, shaderDefines: Te } = this;
+ for (const le in Te)
+ Te.hasOwnProperty(le) && (Te[le] = void 0);
+ pe.ellipsoidRadiiUv = Cartesian3.divideByScalar(
+ S,
+ E,
+ pe.ellipsoidRadiiUv
+ );
+ const { x: xe, z: W } = pe.ellipsoidRadiiUv, j = W / xe;
+ pe.eccentricitySquared = 1 - j * j, pe.evoluteScale = Cartesian2.fromElements(
+ (xe * xe - W * W) / xe,
+ (W * W - xe * xe) / W,
+ pe.evoluteScale
+ ), pe.ellipsoidInverseRadiiSquaredUv = Cartesian3.divideComponents(
+ Cartesian3.ONE,
+ Cartesian3.multiplyComponents(
+ pe.ellipsoidRadiiUv,
+ pe.ellipsoidRadiiUv,
+ pe.ellipsoidInverseRadiiSquaredUv
+ ),
+ pe.ellipsoidInverseRadiiSquaredUv
+ );
+ let se = 0;
+ Te.ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX = se, se += 1, Te.ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN = se, se += 1, pe.clipMinMaxHeight = Cartesian2.fromElements(
+ (x.z - y.z) / E,
+ (b.z - y.z) / E,
+ pe.clipMinMaxHeight
+ );
+ const Pe = (y.z - _.z) / E;
+ if (pe.ellipsoidInverseHeightDifferenceUv = 1 / Pe, _.z === y.z && (pe.ellipsoidInverseHeightDifferenceUv = 0), O && (Te.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE = !0, Te.ELLIPSOID_INTERSECTION_INDEX_LONGITUDE = se, g ? (Te.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF = !0, se += 1) : w ? (Te.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF = !0, se += 2) : L && (Te.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO = !0, se += 2), pe.ellipsoidRenderLongitudeMinMax = Cartesian2.fromElements(
+ x.x,
+ b.x,
+ pe.ellipsoidRenderLongitudeMinMax
+ )), k)
+ if (Te.ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE = !0, y.x < _.x && (Te.ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED = !0), F <= d)
+ pe.ellipsoidUvToShapeUvLongitude = Cartesian2.fromElements(
+ 0,
+ 1,
+ pe.ellipsoidUvToShapeUvLongitude
+ );
+ else {
+ const De = P / F, Me = -(_.x - o.x) / F;
+ pe.ellipsoidUvToShapeUvLongitude = Cartesian2.fromElements(
+ De,
+ Me,
+ pe.ellipsoidUvToShapeUvLongitude
+ );
+ }
+ if (O) {
+ const le = CesiumMath.equalsEpsilon(
+ x.x,
+ o.x,
+ void 0,
+ l
+ ), De = CesiumMath.equalsEpsilon(
+ b.x,
+ s.x,
+ void 0,
+ l
+ );
+ le && (Te.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY = !0), De && (Te.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY = !0);
+ const Me = (_.x - o.x) / P, He = (y.x - o.x) / P, Oe = (b.x - o.x) / P, $e = 1 - R / P, J = (Oe + 0.5 * $e) % 1;
+ pe.ellipsoidShapeUvLongitudeMinMaxMid = Cartesian3.fromElements(
+ Me,
+ He,
+ J,
+ pe.ellipsoidShapeUvLongitudeMinMaxMid
+ );
+ }
+ if (Z && (K && (Te.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN = !0, Te.ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN = se, H ? (Te.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF = !0, se += 1) : Q ? (Te.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF = !0, se += 1) : ne && (Te.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF = !0, se += 2)), z && (Te.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX = !0, Te.ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX = se, $ ? (Te.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF = !0, se += 2) : G ? (Te.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF = !0, se += 1) : q && (Te.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF = !0, se += 1)), pe.ellipsoidRenderLatitudeSinMinMax = Cartesian2.fromElements(
+ Math.sin(x.y),
+ Math.sin(b.y),
+ pe.ellipsoidRenderLatitudeSinMinMax
+ )), be)
+ if (Te.ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE = !0, ee < f)
+ pe.ellipsoidUvToShapeUvLatitude = Cartesian2.fromElements(
+ 0,
+ 1,
+ pe.ellipsoidUvToShapeUvLatitude
+ );
+ else {
+ const De = (s.y - o.y) / ee, Me = (o.y - _.y) / ee;
+ pe.ellipsoidUvToShapeUvLatitude = Cartesian2.fromElements(
+ De,
+ Me,
+ pe.ellipsoidUvToShapeUvLatitude
+ );
+ }
+ return this.shaderMaximumIntersectionsLength = se, !0;
+};
+const scratchRectangle = new Rectangle();
+VoxelEllipsoidShape.prototype.computeOrientedBoundingBoxForTile = function(e, t, n, i, r) {
+ const o = 1 / Math.pow(2, e), s = t * o, c = (t + 1) * o, l = n * o, d = (n + 1) * o, f = i * o, h = (i + 1) * o, p = Rectangle.subsection(
+ this._rectangle,
+ s,
+ l,
+ c,
+ d,
+ scratchRectangle
+ ), m = CesiumMath.lerp(
+ this._minimumHeight,
+ this._maximumHeight,
+ f
+ ), _ = CesiumMath.lerp(
+ this._minimumHeight,
+ this._maximumHeight,
+ h
+ );
+ return getEllipsoidChunkObb(
+ p,
+ m,
+ _,
+ this._ellipsoid,
+ this._translation,
+ this._rotation,
+ r
+ );
+};
+const sampleSizeScratch = new Cartesian3(), scratchTileMinBounds = new Cartesian3(), scratchTileMaxBounds = new Cartesian3();
+VoxelEllipsoidShape.prototype.computeOrientedBoundingBoxForSample = function(e, t, n, i) {
+ const r = 1 / Math.pow(2, e.level), o = Cartesian3.divideComponents(
+ Cartesian3.ONE,
+ t,
+ sampleSizeScratch
+ ), s = Cartesian3.multiplyByScalar(
+ o,
+ r,
+ sampleSizeScratch
+ ), c = Cartesian3.multiplyByScalar(
+ Cartesian3.fromElements(
+ e.x + n.x,
+ e.y + n.y,
+ e.z + n.z,
+ scratchTileMinBounds
+ ),
+ r,
+ scratchTileMinBounds
+ ), l = Cartesian3.add(
+ c,
+ s,
+ scratchTileMaxBounds
+ ), d = Rectangle.subsection(
+ this._rectangle,
+ c.x,
+ c.y,
+ l.x,
+ l.y,
+ scratchRectangle
+ ), f = CesiumMath.lerp(
+ this._minimumHeight,
+ this._maximumHeight,
+ c.z
+ ), h = CesiumMath.lerp(
+ this._minimumHeight,
+ this._maximumHeight,
+ l.z
+ );
+ return getEllipsoidChunkObb(
+ d,
+ f,
+ h,
+ this._ellipsoid,
+ this._translation,
+ this._rotation,
+ i
+ );
+};
+function getEllipsoidChunkObb(e, t, n, i, r, o, s) {
+ return s = OrientedBoundingBox.fromRectangle(
+ e,
+ t,
+ n,
+ i,
+ s
+ ), s.center = Cartesian3.add(s.center, r, s.center), s.halfAxes = Matrix3.multiply(
+ s.halfAxes,
+ o,
+ s.halfAxes
+ ), s;
+}
+VoxelEllipsoidShape.DefaultMinBounds = Object.freeze(
+ new Cartesian3(
+ -CesiumMath.PI,
+ -CesiumMath.PI_OVER_TWO,
+ -Ellipsoid.WGS84.minimumRadius
+ )
+);
+VoxelEllipsoidShape.DefaultMaxBounds = Object.freeze(
+ new Cartesian3(
+ CesiumMath.PI,
+ CesiumMath.PI_OVER_TWO,
+ 10 * Ellipsoid.WGS84.maximumRadius
+ )
+);
+const VoxelShapeType = {
+ /**
+ * A box shape.
+ *
+ * @type {string}
+ * @constant
+ * @private
+ */
+ BOX: "BOX",
+ /**
+ * An ellipsoid shape.
+ *
+ * @type {string}
+ * @constant
+ * @private
+ */
+ ELLIPSOID: "ELLIPSOID",
+ /**
+ * A cylinder shape.
+ *
+ * @type {string}
+ * @constant
+ * @private
+ */
+ CYLINDER: "CYLINDER"
+};
+VoxelShapeType.getMinBounds = function(e) {
+ switch (e) {
+ case VoxelShapeType.BOX:
+ return VoxelBoxShape.DefaultMinBounds;
+ case VoxelShapeType.ELLIPSOID:
+ return VoxelEllipsoidShape.DefaultMinBounds;
+ case VoxelShapeType.CYLINDER:
+ return VoxelCylinderShape.DefaultMinBounds;
+ }
+};
+VoxelShapeType.getMaxBounds = function(e) {
+ switch (e) {
+ case VoxelShapeType.BOX:
+ return VoxelBoxShape.DefaultMaxBounds;
+ case VoxelShapeType.ELLIPSOID:
+ return VoxelEllipsoidShape.DefaultMaxBounds;
+ case VoxelShapeType.CYLINDER:
+ return VoxelCylinderShape.DefaultMaxBounds;
+ }
+};
+VoxelShapeType.getShapeConstructor = function(e) {
+ switch (e) {
+ case VoxelShapeType.BOX:
+ return VoxelBoxShape;
+ case VoxelShapeType.ELLIPSOID:
+ return VoxelEllipsoidShape;
+ case VoxelShapeType.CYLINDER:
+ return VoxelCylinderShape;
+ }
+};
+const VoxelShapeType$1 = Object.freeze(VoxelShapeType);
+function DoubleEndedPriorityQueue(e) {
+ this._comparator = e.comparator, this._maximumLength = e.maximumLength, this._array = defined(e.maximumLength) ? new Array(e.maximumLength) : [], this._length = 0;
+}
+Object.defineProperties(DoubleEndedPriorityQueue.prototype, {
+ /**
+ * Gets the number of elements in the queue.
+ *
+ * @memberof DoubleEndedPriorityQueue.prototype
+ *
+ * @type {number}
+ * @readonly
+ */
+ length: {
+ get: function() {
+ return this._length;
+ }
+ },
+ /**
+ * Gets or sets the maximum number of elements in the queue.
+ * If set to a smaller value than the current length of the queue, the lowest priority elements are removed.
+ * If an element is inserted when the queue is at full capacity, the minimum element is removed.
+ * If set to undefined, the size of the queue is unlimited.
+ *
+ * @memberof DoubleEndedPriorityQueue.prototype
+ *
+ * @type {number}
+ * @readonly
+ */
+ maximumLength: {
+ get: function() {
+ return this._maximumLength;
+ },
+ set: function(e) {
+ if (defined(e)) {
+ for (; this._length > e; )
+ this.removeMinimum();
+ this._array.length = e;
+ }
+ this._maximumLength = e;
+ }
+ },
+ /**
+ * Gets the internal array.
+ *
+ * @memberof DoubleEndedPriorityQueue.prototype
+ *
+ * @type {Array}
+ * @readonly
+ */
+ internalArray: {
+ get: function() {
+ return this._array;
+ }
+ },
+ /**
+ * The comparator used by the queue.
+ * If comparator(a, b) is less than 0, a is lower priority than b.
+ *
+ * @memberof DoubleEndedPriorityQueue.prototype
+ *
+ * @type {DoubleEndedPriorityQueue.ComparatorCallback}
+ * @readonly
+ */
+ comparator: {
+ get: function() {
+ return this._comparator;
+ }
+ }
+});
+DoubleEndedPriorityQueue.prototype.clone = function() {
+ const e = this._maximumLength, t = this._comparator, n = this._array, i = this._length, r = new DoubleEndedPriorityQueue({
+ comparator: t,
+ maximumLength: e
+ });
+ r._length = i;
+ for (let o = 0; o < i; o++)
+ r._array[o] = n[o];
+ return r;
+};
+DoubleEndedPriorityQueue.prototype.reset = function() {
+ this._length = 0;
+ const e = this._maximumLength;
+ if (defined(e))
+ for (let t = 0; t < e; t++)
+ this._array[t] = void 0;
+ else
+ this._array.length = 0;
+};
+DoubleEndedPriorityQueue.prototype.resort = function() {
+ const e = this._length;
+ for (let t = 0; t < e; t++)
+ pushUp(this, t);
+};
+DoubleEndedPriorityQueue.prototype.insert = function(e) {
+ let t;
+ const n = this._maximumLength;
+ if (defined(n)) {
+ if (n === 0)
+ return;
+ if (this._length === n) {
+ const r = this._array[0];
+ if (this._comparator(e, r) <= 0)
+ return e;
+ t = this.removeMinimum();
+ }
+ }
+ const i = this._length;
+ return this._array[i] = e, this._length++, pushUp(this, i), t;
+};
+DoubleEndedPriorityQueue.prototype.removeMinimum = function() {
+ const e = this._length;
+ if (e === 0)
+ return;
+ this._length--;
+ const t = this._array[0];
+ return e >= 2 && (this._array[0] = this._array[e - 1], pushDown(this, 0)), this._array[e - 1] = void 0, t;
+};
+DoubleEndedPriorityQueue.prototype.removeMaximum = function() {
+ const e = this._length;
+ if (e === 0)
+ return;
+ this._length--;
+ let t;
+ if (e <= 2)
+ t = this._array[e - 1];
+ else {
+ const n = greaterThan(this, 1, 2) ? 1 : 2;
+ t = this._array[n], this._array[n] = this._array[e - 1], e >= 4 && pushDown(this, n);
+ }
+ return this._array[e - 1] = void 0, t;
+};
+DoubleEndedPriorityQueue.prototype.getMinimum = function() {
+ if (this._length !== 0)
+ return this._array[0];
+};
+DoubleEndedPriorityQueue.prototype.getMaximum = function() {
+ const e = this._length;
+ if (e !== 0)
+ return e <= 2 ? this._array[e - 1] : this._array[greaterThan(this, 1, 2) ? 1 : 2];
+};
+function swap(e, t, n) {
+ const i = e._array, r = i[t];
+ i[t] = i[n], i[n] = r;
+}
+function lessThan(e, t, n) {
+ return e._comparator(e._array[t], e._array[n]) < 0;
+}
+function greaterThan(e, t, n) {
+ return e._comparator(e._array[t], e._array[n]) > 0;
+}
+function pushUp(e, t) {
+ if (t === 0)
+ return;
+ const n = Math.floor(CesiumMath.log2(t + 1)) % 2 === 0, i = Math.floor((t - 1) / 2), r = lessThan(e, t, i);
+ for (r !== n && (swap(e, t, i), t = i); t >= 3; ) {
+ const o = Math.floor((t - 3) / 4);
+ if (lessThan(e, t, o) !== r)
+ break;
+ swap(e, t, o), t = o;
+ }
+}
+function pushDown(e, t) {
+ const n = e._length, i = Math.floor(CesiumMath.log2(t + 1)) % 2 === 0;
+ let r;
+ for (; (r = 2 * t + 1) < n; ) {
+ let o = r;
+ const s = r + 1;
+ if (s < n) {
+ lessThan(e, s, o) === i && (o = s);
+ const c = 2 * r + 1, l = Math.max(
+ Math.min(n - c, 4),
+ 0
+ );
+ for (let d = 0; d < l; d++) {
+ const f = c + d;
+ lessThan(e, f, o) === i && (o = f);
+ }
+ }
+ if (lessThan(e, o, t) === i && (swap(e, o, t), o !== r && o !== s)) {
+ const c = Math.floor((o - 1) / 2);
+ greaterThan(e, o, c) === i && swap(e, o, c);
+ }
+ t = o;
+ }
+}
+const LoadState = Object.freeze({
+ UNLOADED: 0,
+ // Has no data and is in dormant state
+ RECEIVING: 1,
+ // Is waiting on data from the provider
+ RECEIVED: 2,
+ // Received data from the provider
+ LOADED: 3,
+ // Processed data from provider
+ FAILED: 4,
+ // Failed to receive data from the provider
+ UNAVAILABLE: 5
+ // No data available for this tile
+});
+function KeyframeNode(e, t) {
+ this.spatialNode = e, this.keyframe = t, this.state = LoadState.UNLOADED, this.metadata = [], this.megatextureIndex = -1, this.priority = -Number.MAX_VALUE, this.highPriorityFrameNumber = -1;
+}
+KeyframeNode.priorityComparator = function(e, t) {
+ return e.priority - t.priority;
+};
+KeyframeNode.searchComparator = function(e, t) {
+ return e.keyframe - t.keyframe;
+};
+KeyframeNode.LoadState = LoadState;
+function Megatexture(e, t, n, i, r) {
+ i === MetadataComponentType$1.UNSIGNED_SHORT && (i = MetadataComponentType$1.FLOAT32);
+ const o = e.floatingPointTexture;
+ if (i === MetadataComponentType$1.FLOAT32 && !o)
+ throw new RuntimeError("Floating point texture not supported");
+ let s;
+ i === MetadataComponentType$1.FLOAT32 || i === MetadataComponentType$1.FLOAT64 ? s = PixelDatatype$1.FLOAT : i === MetadataComponentType$1.UINT8 && (s = PixelDatatype$1.UNSIGNED_BYTE);
+ let c;
+ n === 1 ? c = e.webgl2 ? PixelFormat$1.RED : PixelFormat$1.LUMINANCE : n === 2 ? c = e.webgl2 ? PixelFormat$1.RG : PixelFormat$1.LUMINANCE_ALPHA : n === 3 ? c = PixelFormat$1.RGB : n === 4 && (c = PixelFormat$1.RGBA);
+ const l = 512 * 1024 * 1024, d = 128 * 1024 * 1024;
+ r = Math.min(
+ defaultValue(r, d),
+ l
+ );
+ const f = ContextLimits.maximumTextureSize, h = MetadataComponentType$1.getSizeInBytes(
+ i
+ ), p = Math.floor(
+ r / (n * h)
+ ), m = Math.min(
+ f,
+ CesiumMath.previousPowerOfTwo(Math.floor(Math.sqrt(p)))
+ ), _ = Math.ceil(Math.sqrt(t.x)), y = Math.ceil(t.z / _), C = _ * t.x, T = y * t.y, x = Math.floor(
+ m / C
+ ), b = Math.floor(
+ m / T
+ );
+ if (x === 0 || b === 0)
+ throw new RuntimeError("Tileset is too large to fit into megatexture");
+ this.channelCount = n, this.componentType = i, this.voxelCountPerTile = Cartesian3.clone(t, new Cartesian3()), this.maximumTileCount = x * b, this.regionCountPerMegatexture = new Cartesian2(
+ x,
+ b
+ ), this.voxelCountPerRegion = new Cartesian2(
+ C,
+ T
+ ), this.sliceCountPerRegion = new Cartesian2(
+ _,
+ y
+ ), this.voxelSizeUv = new Cartesian2(
+ 1 / m,
+ 1 / m
+ ), this.sliceSizeUv = new Cartesian2(
+ t.x / m,
+ t.y / m
+ ), this.regionSizeUv = new Cartesian2(
+ C / m,
+ T / m
+ ), this.texture = new Texture({
+ context: e,
+ pixelFormat: c,
+ pixelDatatype: s,
+ flipY: !1,
+ width: m,
+ height: m,
+ sampler: new Sampler({
+ wrapS: TextureWrap$1.CLAMP_TO_EDGE,
+ wrapT: TextureWrap$1.CLAMP_TO_EDGE,
+ minificationFilter: TextureMinificationFilter$1.LINEAR,
+ magnificationFilter: TextureMagnificationFilter$1.LINEAR
+ })
+ });
+ const S = MetadataComponentType$1.toComponentDatatype(
+ i
+ );
+ this.tileVoxelDataTemp = ComponentDatatype$1.createTypedArray(
+ S,
+ C * T * n
+ ), this.nodes = new Array(this.maximumTileCount);
+ for (let E = 0; E < this.maximumTileCount; E++)
+ this.nodes[E] = new MegatextureNode(E);
+ for (let E = 0; E < this.maximumTileCount; E++) {
+ const A = this.nodes[E];
+ A.previousNode = E > 0 ? this.nodes[E - 1] : void 0, A.nextNode = E < this.maximumTileCount - 1 ? this.nodes[E + 1] : void 0;
+ }
+ this.occupiedList = void 0, this.emptyList = this.nodes[0], this.occupiedCount = 0;
+}
+function MegatextureNode(e) {
+ this.index = e, this.nextNode = void 0, this.previousNode = void 0;
+}
+Megatexture.prototype.add = function(e) {
+ if (this.isFull())
+ throw new DeveloperError("Trying to add when there are no empty spots");
+ const t = this.emptyList;
+ this.emptyList = this.emptyList.nextNode, defined(this.emptyList) && (this.emptyList.previousNode = void 0), t.nextNode = this.occupiedList, defined(t.nextNode) && (t.nextNode.previousNode = t), this.occupiedList = t;
+ const n = t.index;
+ return this.writeDataToTexture(n, e), this.occupiedCount++, n;
+};
+Megatexture.prototype.remove = function(e) {
+ if (e < 0 || e >= this.maximumTileCount)
+ throw new DeveloperError("Megatexture index out of bounds");
+ const t = this.nodes[e];
+ defined(t.previousNode) && (t.previousNode.nextNode = t.nextNode), defined(t.nextNode) && (t.nextNode.previousNode = t.previousNode), t.nextNode = this.emptyList, defined(t.nextNode) && (t.nextNode.previousNode = t), t.previousNode = void 0, this.emptyList = t, this.occupiedCount--;
+};
+Megatexture.prototype.isFull = function() {
+ return this.emptyList === void 0;
+};
+Megatexture.getApproximateTextureMemoryByteLength = function(e, t, n, i) {
+ i === MetadataComponentType$1.UNSIGNED_SHORT && (i = MetadataComponentType$1.FLOAT32);
+ const r = MetadataComponentType$1.getSizeInBytes(
+ i
+ ), o = e * t.x * t.y * t.z, s = Math.ceil(Math.sqrt(t.x)), c = Math.ceil(t.z / s), l = s * t.x, d = c * t.y;
+ let f = CesiumMath.previousPowerOfTwo(
+ Math.floor(Math.sqrt(o))
+ );
+ for (; ; ) {
+ const p = Math.floor(f / l), m = Math.floor(f / d);
+ if (p * m >= e)
+ break;
+ f *= 2;
+ }
+ return f * f * n * r;
+};
+Megatexture.prototype.writeDataToTexture = function(e, t) {
+ const n = t.constructor === Uint16Array ? new Float32Array(t) : t, i = this.voxelCountPerTile, r = this.sliceCountPerRegion, o = this.voxelCountPerRegion, s = this.channelCount, c = this.tileVoxelDataTemp;
+ for (let y = 0; y < i.z; y++) {
+ const C = y % r.x * i.x, T = Math.floor(y / r.x) * i.y;
+ for (let x = 0; x < i.y; x++)
+ for (let b = 0; b < i.x; b++) {
+ const S = y * i.y * i.x + x * i.x + b, E = (T + x) * o.x + (C + b);
+ for (let A = 0; A < s; A++)
+ c[E * s + A] = n[S * s + A];
+ }
+ }
+ const l = this.regionCountPerMegatexture, d = o.x, f = o.y, h = e % l.x * o.x, p = Math.floor(e / l.x) * o.y, _ = {
+ source: {
+ arrayBufferView: c,
+ width: d,
+ height: f
+ },
+ xOffset: h,
+ yOffset: p
+ };
+ this.texture.copyFrom(_);
+};
+Megatexture.prototype.isDestroyed = function() {
+ return !1;
+};
+Megatexture.prototype.destroy = function() {
+ return this.texture = this.texture && this.texture.destroy(), destroyObject(this);
+};
+function SpatialNode(e, t, n, i, r, o, s) {
+ this.children = void 0, this.parent = r, this.level = e, this.x = t, this.y = n, this.z = i, this.dimensions = Cartesian3.clone(s), this.keyframeNodes = [], this.renderableKeyframeNodes = [], this.renderableKeyframeNodeLerp = 0, this.renderableKeyframeNodePrevious = void 0, this.renderableKeyframeNodeNext = void 0, this.orientedBoundingBox = new OrientedBoundingBox(), this.approximateVoxelSize = 0, this.screenSpaceError = 0, this.visitedFrameNumber = -1, this.computeBoundingVolumes(o);
+}
+const scratchObbHalfScale = new Cartesian3();
+SpatialNode.prototype.computeBoundingVolumes = function(e) {
+ this.orientedBoundingBox = e.computeOrientedBoundingBoxForTile(
+ this.level,
+ this.x,
+ this.y,
+ this.z,
+ this.orientedBoundingBox
+ );
+ const t = Matrix3.getScale(
+ this.orientedBoundingBox.halfAxes,
+ scratchObbHalfScale
+ ), n = 2 * Cartesian3.maximumComponent(t);
+ this.approximateVoxelSize = n / Cartesian3.minimumComponent(this.dimensions);
+};
+SpatialNode.prototype.constructChildNodes = function(e) {
+ const { level: t, x: n, y: i, z: r } = this, o = n * 2, s = i * 2, c = r * 2, l = s + 1, d = o + 1, f = c + 1, h = t + 1, p = [
+ [h, o, s, c],
+ [h, d, s, c],
+ [h, o, l, c],
+ [h, d, l, c],
+ [h, o, s, f],
+ [h, d, s, f],
+ [h, o, l, f],
+ [h, d, l, f]
+ ];
+ this.children = p.map(([m, _, y, C]) => new SpatialNode(m, _, y, C, this, e, this.dimensions));
+};
+SpatialNode.prototype.visibility = function(e, t) {
+ const n = this.orientedBoundingBox;
+ return e.cullingVolume.computeVisibilityWithPlaneMask(n, t);
+};
+SpatialNode.prototype.computeScreenSpaceError = function(e, t) {
+ const n = this.orientedBoundingBox;
+ let i = Math.sqrt(n.distanceSquaredTo(e));
+ i = Math.max(i, CesiumMath.EPSILON7);
+ const r = this.approximateVoxelSize, o = t * (r / i);
+ this.screenSpaceError = o;
+};
+const scratchBinarySearchKeyframeNode = {
+ keyframe: 0
+};
+function findKeyframeIndex(e, t) {
+ return scratchBinarySearchKeyframeNode.keyframe = e, binarySearch(
+ t,
+ scratchBinarySearchKeyframeNode,
+ KeyframeNode.searchComparator
+ );
+}
+SpatialNode.prototype.computeSurroundingRenderableKeyframeNodes = function(e) {
+ let t = this;
+ const n = t.level, i = Math.floor(e), r = Math.ceil(e);
+ let o, s, c = +Number.MAX_VALUE, l = +Number.MAX_VALUE;
+ for (; defined(t); ) {
+ const { renderableKeyframeNodes: h } = t;
+ if (h.length >= 1) {
+ const p = getKeyframeIndexPrev(
+ i,
+ h
+ ), m = h[p], _ = r === i || i < m.keyframe ? p : Math.min(p + 1, h.length - 1), y = h[_], C = i - m.keyframe, T = getWeightedKeyframeDistance(
+ n - t.level,
+ C
+ );
+ T < c && (c = T, o = m);
+ const x = y.keyframe - r, b = getWeightedKeyframeDistance(
+ n - t.level,
+ x
+ );
+ if (b < l && (l = b, s = y), C === 0 && x === 0)
+ break;
+ }
+ t = t.parent;
+ }
+ if (this.renderableKeyframeNodePrevious = o, this.renderableKeyframeNodeNext = s, !defined(o) || !defined(s))
+ return;
+ const d = o.keyframe, f = s.keyframe;
+ this.renderableKeyframeNodeLerp = d === f ? 0 : CesiumMath.clamp(
+ (e - d) / (f - d),
+ 0,
+ 1
+ );
+};
+function getKeyframeIndexPrev(e, t) {
+ const n = findKeyframeIndex(e, t);
+ return n < 0 ? CesiumMath.clamp(~n - 1, 0, t.length - 1) : n;
+}
+function getWeightedKeyframeDistance(e, t) {
+ const n = Math.exp(e * 4), i = t >= 0 ? 1 : -200;
+ return e * n + t * i;
+}
+SpatialNode.prototype.isVisited = function(e) {
+ return this.visitedFrameNumber === e;
+};
+SpatialNode.prototype.createKeyframeNode = function(e) {
+ let t = findKeyframeIndex(e, this.keyframeNodes);
+ if (t < 0) {
+ t = ~t;
+ const n = new KeyframeNode(this, e);
+ this.keyframeNodes.splice(t, 0, n);
+ }
+};
+SpatialNode.prototype.destroyKeyframeNode = function(e, t) {
+ const n = e.keyframe, i = findKeyframeIndex(n, this.keyframeNodes);
+ if (i < 0)
+ throw new DeveloperError("Keyframe node does not exist.");
+ if (this.keyframeNodes.splice(i, 1), e.megatextureIndex !== -1) {
+ for (let o = 0; o < t.length; o++)
+ t[o].remove(e.megatextureIndex);
+ const r = findKeyframeIndex(
+ n,
+ this.renderableKeyframeNodes
+ );
+ if (r < 0)
+ throw new DeveloperError("Renderable keyframe node does not exist.");
+ this.renderableKeyframeNodes.splice(r, 1);
+ }
+ e.spatialNode = void 0, e.state = KeyframeNode.LoadState.UNLOADED, e.metadata = {}, e.megatextureIndex = -1, e.priority = -Number.MAX_VALUE, e.highPriorityFrameNumber = -1;
+};
+SpatialNode.prototype.addKeyframeNodeToMegatextures = function(e, t) {
+ if (e.state !== KeyframeNode.LoadState.RECEIVED || e.megatextureIndex !== -1 || e.metadata.length !== t.length)
+ throw new DeveloperError("Keyframe node cannot be added to megatexture");
+ for (let r = 0; r < t.length; r++) {
+ const o = t[r];
+ e.megatextureIndex = o.add(e.metadata[r]);
+ }
+ e.state = KeyframeNode.LoadState.LOADED;
+ const n = this.renderableKeyframeNodes;
+ let i = findKeyframeIndex(
+ e.keyframe,
+ n
+ );
+ if (i >= 0)
+ throw new DeveloperError("Keyframe already renderable");
+ i = ~i, n.splice(i, 0, e);
+};
+SpatialNode.prototype.isRenderable = function(e) {
+ const t = this.renderableKeyframeNodePrevious, n = this.renderableKeyframeNodeNext, i = this.level;
+ return defined(t) && defined(n) && (t.spatialNode.level === i || n.spatialNode.level === i) && this.visitedFrameNumber === e;
+};
+function VoxelTraversal(e, t, n, i, r, o, s) {
+ this._primitive = e, this.megatextures = new Array(i.length);
+ for (let _ = 0; _ < i.length; _++) {
+ const y = i[_], C = MetadataType$1.getComponentCount(y), T = r[_];
+ this.megatextures[_] = new Megatexture(
+ t,
+ n,
+ C,
+ T,
+ s
+ );
+ }
+ const c = this.megatextures[0].maximumTileCount;
+ this._simultaneousRequestCount = 0, this._debugPrint = !1, this._frameNumber = 0;
+ const l = e._shape;
+ this.rootNode = new SpatialNode(0, 0, 0, 0, void 0, l, n), this._priorityQueue = new DoubleEndedPriorityQueue({
+ maximumLength: c,
+ comparator: KeyframeNode.priorityComparator
+ }), this._highPriorityKeyframeNodes = new Array(c), this._keyframeNodesInMegatexture = new Array(c), this._keyframeCount = o, this._sampleCount = void 0, this._keyframeLocation = 0, this._binaryTreeKeyframeWeighting = new Array(o);
+ const d = this._binaryTreeKeyframeWeighting;
+ d[0] = 0, d[o - 1] = 0, binaryTreeWeightingRecursive(
+ d,
+ 1,
+ o - 2,
+ 0
+ );
+ const f = 9, h = 2048, p = Math.floor(
+ h / f
+ ), m = Math.ceil(
+ c / p
+ );
+ this.internalNodeTexture = new Texture({
+ context: t,
+ pixelFormat: PixelFormat$1.RGBA,
+ pixelDatatype: PixelDatatype$1.UNSIGNED_BYTE,
+ flipY: !1,
+ width: h,
+ height: m,
+ sampler: new Sampler({
+ minificationFilter: TextureMinificationFilter$1.NEAREST,
+ magnificationFilter: TextureMagnificationFilter$1.NEAREST
+ })
+ }), this.internalNodeTilesPerRow = p, this.internalNodeTexelSizeUv = new Cartesian2(
+ 1 / h,
+ 1 / m
+ ), this.leafNodeTexture = void 0, this.leafNodeTilesPerRow = void 0, this.leafNodeTexelSizeUv = new Cartesian2();
+}
+VoxelTraversal.prototype.findKeyframeNode = function(e) {
+ return this._keyframeNodesInMegatexture.find(function(t) {
+ return t.megatextureIndex === e;
+ });
+};
+function binaryTreeWeightingRecursive(e, t, n, i) {
+ if (t > n)
+ return;
+ const r = Math.floor((t + n) / 2);
+ e[r] = i, binaryTreeWeightingRecursive(e, t, r - 1, i + 1), binaryTreeWeightingRecursive(e, r + 1, n, i + 1);
+}
+VoxelTraversal.simultaneousRequestCountMaximum = 50;
+VoxelTraversal.prototype.update = function(e, t, n, i) {
+ const r = this._primitive, o = e.context, s = this.megatextures[0].maximumTileCount, c = this._keyframeCount, l = r._levelBlendFactor, d = l > 0, f = c > 1, h = (d ? 2 : 1) * (f ? 2 : 1);
+ this._sampleCount = h;
+ const p = h >= 2;
+ if (p && !defined(this.leafNodeTexture)) {
+ const x = Math.floor(
+ 512
+ ), b = Math.ceil(
+ s / x
+ );
+ this.leafNodeTexture = new Texture({
+ context: o,
+ pixelFormat: PixelFormat$1.RGBA,
+ pixelDatatype: PixelDatatype$1.UNSIGNED_BYTE,
+ flipY: !1,
+ width: 1024,
+ height: b,
+ sampler: new Sampler({
+ minificationFilter: TextureMinificationFilter$1.NEAREST,
+ magnificationFilter: TextureMagnificationFilter$1.NEAREST
+ })
+ }), this.leafNodeTexelSizeUv = Cartesian2.fromElements(
+ 1 / 1024,
+ 1 / b,
+ this.leafNodeTexelSizeUv
+ ), this.leafNodeTilesPerRow = x;
+ } else !p && defined(this.leafNodeTexture) && (this.leafNodeTexture = this.leafNodeTexture.destroy());
+ if (this._keyframeLocation = CesiumMath.clamp(
+ t,
+ 0,
+ c - 1
+ ), n && recomputeBoundingVolumesRecursive(this, this.rootNode), i)
+ return;
+ this._frameNumber = e.frameNumber;
+ const m = getTimestamp$1();
+ loadAndUnload(this, e);
+ const _ = getTimestamp$1();
+ generateOctree(this, h, l);
+ const y = getTimestamp$1();
+ if (this._debugPrint) {
+ const C = _ - m, T = y - _, x = y - m;
+ printDebugInformation(
+ this,
+ C,
+ T,
+ x
+ );
+ }
+};
+VoxelTraversal.prototype.isRenderable = function(e) {
+ return e.isRenderable(this._frameNumber);
+};
+VoxelTraversal.prototype.isDestroyed = function() {
+ return !1;
+};
+VoxelTraversal.prototype.destroy = function() {
+ const e = this.megatextures, t = e.length;
+ for (let n = 0; n < t; n++)
+ e[n] = e[n] && e[n].destroy();
+ return this.internalNodeTexture = this.internalNodeTexture && this.internalNodeTexture.destroy(), this.leafNodeTexture = this.leafNodeTexture && this.leafNodeTexture.destroy(), destroyObject(this);
+};
+function recomputeBoundingVolumesRecursive(e, t) {
+ if (t.computeBoundingVolumes(e._primitive._shape), defined(t.children))
+ for (let n = 0; n < 8; n++) {
+ const i = t.children[n];
+ recomputeBoundingVolumesRecursive(e, i);
+ }
+}
+function requestData(e, t) {
+ if (e._simultaneousRequestCount >= VoxelTraversal.simultaneousRequestCountMaximum)
+ return;
+ const n = e._primitive._provider;
+ function i(l) {
+ e._simultaneousRequestCount--;
+ const d = n.types.length;
+ if (!defined(l))
+ t.state = KeyframeNode.LoadState.UNAVAILABLE;
+ else if (l === KeyframeNode.LoadState.FAILED)
+ t.state = KeyframeNode.LoadState.FAILED;
+ else if (!Array.isArray(l) || l.length !== d)
+ t.state = KeyframeNode.LoadState.FAILED;
+ else {
+ const f = e.megatextures;
+ for (let h = 0; h < d; h++) {
+ const { voxelCountPerTile: p, channelCount: m } = f[h], { x: _, y, z: C } = p, T = _ * y * C, x = l[h], b = T * m;
+ if (x.length === b)
+ t.metadata[h] = x, t.state = KeyframeNode.LoadState.RECEIVED;
+ else {
+ t.state = KeyframeNode.LoadState.FAILED;
+ break;
+ }
+ }
+ }
+ }
+ function r() {
+ e._simultaneousRequestCount--, t.state = KeyframeNode.LoadState.FAILED;
+ }
+ const { keyframe: o, spatialNode: s } = t, c = n.requestData({
+ tileLevel: s.level,
+ tileX: s.x,
+ tileY: s.y,
+ tileZ: s.z,
+ keyframe: o
+ });
+ defined(c) ? (e._simultaneousRequestCount++, t.state = KeyframeNode.LoadState.RECEIVING, c.then(i).catch(r)) : t.state = KeyframeNode.LoadState.FAILED;
+}
+function mapInfiniteRangeToZeroOne(e) {
+ return e / (1 + e);
+}
+function loadAndUnload(e, t) {
+ const n = e._frameNumber, i = e._primitive, r = i._shape, o = i.screenSpaceError, s = e._priorityQueue, c = e._keyframeCount, l = CesiumMath.clamp(
+ Math.floor(e._keyframeLocation),
+ 0,
+ c - 2
+ ), d = l + 1, { camera: f, context: h, pixelRatio: p } = t, { positionWC: m, frustum: _ } = f, C = h.drawingBufferHeight / p / _.sseDenominator;
+ function T(M, R) {
+ if (M.computeScreenSpaceError(m, C), R = M.visibility(
+ t,
+ R
+ ), R === CullingVolume.MASK_OUTSIDE)
+ return;
+ if (M.visitedFrameNumber = n, c === 1)
+ M.createKeyframeNode(0);
+ else if (M.keyframeNodes.length !== c)
+ for (let N = 0; N < c; N++)
+ M.createKeyframeNode(N);
+ const { screenSpaceError: L, keyframeNodes: g } = M, w = mapInfiniteRangeToZeroOne(L);
+ let O = !1;
+ for (let N = 0; N < g.length; N++) {
+ const F = g[N];
+ F.priority = 10 * w + keyframePriority(
+ l,
+ F.keyframe,
+ d,
+ e
+ ), F.state !== KeyframeNode.LoadState.UNAVAILABLE && F.state !== KeyframeNode.LoadState.FAILED && F.priority !== -Number.MAX_VALUE && s.insert(F), F.state === KeyframeNode.LoadState.LOADED && (O = !0);
+ }
+ if (L < o || !O) {
+ M.children = void 0;
+ return;
+ }
+ defined(M.children) || M.constructChildNodes(r);
+ for (let N = 0; N < 8; N++) {
+ const F = M.children[N];
+ T(F, R);
+ }
+ }
+ s.reset(), T(e.rootNode, CullingVolume.MASK_INDETERMINATE);
+ const x = e._highPriorityKeyframeNodes;
+ let b = 0, S;
+ for (; s.length > 0; )
+ S = s.removeMaximum(), S.highPriorityFrameNumber = n, x[b] = S, b++;
+ const E = e._keyframeNodesInMegatexture, A = e.megatextures[0], D = A.occupiedCount;
+ E.length = D, E.sort(function(M, R) {
+ return M.highPriorityFrameNumber === R.highPriorityFrameNumber ? R.priority - M.priority : R.highPriorityFrameNumber - M.highPriorityFrameNumber;
+ });
+ let P = 0, I = 0;
+ for (let M = 0; M < b; M++)
+ if (S = x[M], !(S.state === KeyframeNode.LoadState.LOADED || S.spatialNode === void 0) && (S.state === KeyframeNode.LoadState.UNLOADED && requestData(e, S), S.state === KeyframeNode.LoadState.RECEIVED)) {
+ let R = 0;
+ if (A.isFull()) {
+ R = D - 1 - P, P++;
+ const L = E[R];
+ L.spatialNode.destroyKeyframeNode(
+ L,
+ e.megatextures
+ );
+ } else
+ R = D + I, I++;
+ S.spatialNode.addKeyframeNodeToMegatextures(
+ S,
+ e.megatextures
+ ), E[R] = S;
+ }
+}
+function keyframePriority(e, t, n, i) {
+ const r = Math.min(
+ Math.abs(t - e),
+ Math.abs(t - n)
+ ), o = Math.max(
+ e,
+ i._keyframeCount - n - 1,
+ 1
+ ), s = Math.pow(
+ 1 - r / o,
+ 4
+ ), c = Math.exp(
+ -i._binaryTreeKeyframeWeighting[t]
+ );
+ return CesiumMath.lerp(
+ c,
+ s,
+ 0.15 + 0.85 * s
+ );
+}
+function printDebugInformation(e, t, n, i) {
+ const r = e._keyframeCount, o = e.rootNode, s = Object.keys(KeyframeNode.LoadState).length, c = new Array(s), l = new Array(s);
+ let d = 0;
+ for (let T = 0; T < s; T++) {
+ const x = new Array(r);
+ c[T] = x;
+ for (let b = 0; b < r; b++)
+ x[b] = 0;
+ l[T] = 0;
+ }
+ function f(T) {
+ const x = T.keyframeNodes;
+ for (let b = 0; b < x.length; b++) {
+ const S = x[b], E = S.keyframe, A = S.state;
+ c[A][E] += 1, l[A] += 1, d++;
+ }
+ if (defined(T.children))
+ for (let b = 0; b < 8; b++) {
+ const S = T.children[b];
+ f(S);
+ }
+ }
+ f(o);
+ const h = `KEYFRAMES: ${c[KeyframeNode.LoadState.LOADED]}`, p = `UNLOADED: ${l[KeyframeNode.LoadState.UNLOADED]} | RECEIVING: ${l[KeyframeNode.LoadState.RECEIVING]} | RECEIVED: ${l[KeyframeNode.LoadState.RECEIVED]} | LOADED: ${l[KeyframeNode.LoadState.LOADED]} | FAILED: ${l[KeyframeNode.LoadState.FAILED]} | UNAVAILABLE: ${l[KeyframeNode.LoadState.UNAVAILABLE]} | TOTAL: ${d}`, m = Math.round(t * 100) / 100, _ = Math.round(n * 100) / 100, y = Math.round(i * 100) / 100, C = `LOAD: ${m} | OCT: ${_} | ALL: ${y}`;
+ console.log(
+ `${h} || ${p} || ${C}`
+ );
+}
+const GpuOctreeFlag = {
+ // Data is an octree index.
+ INTERNAL: 0,
+ // Data is a leaf node.
+ LEAF: 1,
+ // When leaf data is packed in the octree and there's a node that is forced to
+ // render but has no data of its own (such as when its siblings are renderable but it
+ // is not), signal that it's using its parent's data.
+ PACKED_LEAF_FROM_PARENT: 2
+};
+function generateOctree(e, t, n) {
+ const i = e._primitive._screenSpaceError, r = e._keyframeLocation, o = e._frameNumber, s = t >= 2;
+ let c = 0, l = 0;
+ const d = [], f = [];
+ function h(m, _, y, C, T) {
+ let x = !1;
+ if (defined(m.children))
+ for (let b = 0; b < 8; b++) {
+ const S = m.children[b];
+ S.computeSurroundingRenderableKeyframeNodes(r), S.isRenderable(o) && (x = !0);
+ }
+ if (x) {
+ d[T] = GpuOctreeFlag.INTERNAL << 16 | _, d[y] = C, c++, C = _, T = C * 9 + 1;
+ for (let b = 0; b < 8; b++) {
+ const S = m.children[b];
+ _ = c, y = _ * 9 + 0, h(
+ S,
+ _,
+ y,
+ C,
+ T + b
+ );
+ }
+ } else {
+ if (s) {
+ const b = l * 5, S = m.renderableKeyframeNodePrevious, E = m.level - S.spatialNode.level, A = S.spatialNode.parent, D = defined(A) ? A.renderableKeyframeNodePrevious : S, P = getLodLerp(m, i, n), I = E, M = 1, R = S.megatextureIndex, L = D.megatextureIndex;
+ f[b + 0] = P, f[b + 1] = I, f[b + 2] = M, f[b + 3] = R, f[b + 4] = L, d[T] = GpuOctreeFlag.LEAF << 16 | l;
+ } else {
+ const b = m.renderableKeyframeNodePrevious, E = m.level - b.spatialNode.level === 0 ? GpuOctreeFlag.LEAF : GpuOctreeFlag.PACKED_LEAF_FROM_PARENT;
+ d[T] = E << 16 | b.megatextureIndex;
+ }
+ l++;
+ }
+ }
+ const p = e.rootNode;
+ p.computeSurroundingRenderableKeyframeNodes(r), p.isRenderable(o) && h(p, 0, 0, 0, 0), copyToInternalNodeTexture(
+ d,
+ 9,
+ e.internalNodeTilesPerRow,
+ e.internalNodeTexture
+ ), s && copyToLeafNodeTexture(
+ f,
+ 2,
+ e.leafNodeTilesPerRow,
+ e.leafNodeTexture
+ );
+}
+function getLodLerp(e, t, n) {
+ if (e.parent === void 0)
+ return 0;
+ const i = e.screenSpaceError, r = e.parent.screenSpaceError, s = ((t - i) / (r - i) + n - 1) / n;
+ return CesiumMath.clamp(s, 0, 1);
+}
+function copyToInternalNodeTexture(e, t, n, i) {
+ const r = PixelFormat$1.componentsLength(i.pixelFormat), o = Math.ceil(e.length / t), s = Math.max(
+ 1,
+ t * Math.min(o, n)
+ ), c = Math.max(1, Math.ceil(o / n)), l = new Uint8Array(s * c * r);
+ for (let h = 0; h < e.length; h++) {
+ const p = e[h], m = h * r;
+ for (let _ = 0; _ < r; _++)
+ l[m + _] = p >>> _ * 8 & 255;
+ }
+ const f = {
+ source: {
+ arrayBufferView: l,
+ width: s,
+ height: c
+ },
+ xOffset: 0,
+ yOffset: 0
+ };
+ i.copyFrom(f);
+}
+function copyToLeafNodeTexture(e, t, n, i) {
+ const r = PixelFormat$1.componentsLength(i.pixelFormat), o = 5, s = Math.ceil(e.length / o), c = Math.max(
+ 1,
+ t * Math.min(s, n)
+ ), l = Math.max(1, Math.ceil(s / n)), d = new Uint8Array(c * l * r);
+ for (let p = 0; p < s; p++) {
+ const m = e[p * o + 0], _ = e[p * o + 1], y = e[p * o + 2], C = e[p * o + 3], T = e[p * o + 4], x = CesiumMath.clamp(
+ Math.floor(65536 * m),
+ 0,
+ 65535
+ );
+ d[p * 8 + 0] = x >>> 0 & 255, d[p * 8 + 1] = x >>> 8 & 255, d[p * 8 + 2] = _ & 255, d[p * 8 + 3] = y & 255, d[p * 8 + 4] = C >>> 0 & 255, d[p * 8 + 5] = C >>> 8 & 255, d[p * 8 + 6] = T >>> 0 & 255, d[p * 8 + 7] = T >>> 8 & 255;
+ }
+ const h = {
+ source: {
+ arrayBufferView: d,
+ width: c,
+ height: l
+ },
+ xOffset: 0,
+ yOffset: 0
+ };
+ i.copyFrom(h);
+}
+VoxelTraversal.getApproximateTextureMemoryByteLength = function(e, t, n, i) {
+ let r = 0;
+ const o = n.length;
+ for (let s = 0; s < o; s++) {
+ const c = n[s], l = i[s], d = MetadataType$1.getComponentCount(c);
+ r += Megatexture.getApproximateTextureMemoryByteLength(
+ e,
+ t,
+ d,
+ l
+ );
+ }
+ return r;
+};
+const UniformType = {
+ /**
+ * A single floating point value.
+ *
+ * @type {string}
+ * @constant
+ */
+ FLOAT: "float",
+ /**
+ * A vector of 2 floating point values.
+ *
+ * @type {string}
+ * @constant
+ */
+ VEC2: "vec2",
+ /**
+ * A vector of 3 floating point values.
+ *
+ * @type {string}
+ * @constant
+ */
+ VEC3: "vec3",
+ /**
+ * A vector of 4 floating point values.
+ *
+ * @type {string}
+ * @constant
+ */
+ VEC4: "vec4",
+ /**
+ * A single integer value
+ *
+ * @type {string}
+ * @constant
+ */
+ INT: "int",
+ /**
+ * A vector of 2 integer values.
+ *
+ * @type {string}
+ * @constant
+ */
+ INT_VEC2: "ivec2",
+ /**
+ * A vector of 3 integer values.
+ *
+ * @type {string}
+ * @constant
+ */
+ INT_VEC3: "ivec3",
+ /**
+ * A vector of 4 integer values.
+ *
+ * @type {string}
+ * @constant
+ */
+ INT_VEC4: "ivec4",
+ /**
+ * A single boolean value.
+ *
+ * @type {string}
+ * @constant
+ */
+ BOOL: "bool",
+ /**
+ * A vector of 2 boolean values.
+ *
+ * @type {string}
+ * @constant
+ */
+ BOOL_VEC2: "bvec2",
+ /**
+ * A vector of 3 boolean values.
+ *
+ * @type {string}
+ * @constant
+ */
+ BOOL_VEC3: "bvec3",
+ /**
+ * A vector of 4 boolean values.
+ *
+ * @type {string}
+ * @constant
+ */
+ BOOL_VEC4: "bvec4",
+ /**
+ * A 2x2 matrix of floating point values.
+ *
+ * @type {string}
+ * @constant
+ */
+ MAT2: "mat2",
+ /**
+ * A 3x3 matrix of floating point values.
+ *
+ * @type {string}
+ * @constant
+ */
+ MAT3: "mat3",
+ /**
+ * A 3x3 matrix of floating point values.
+ *
+ * @type {string}
+ * @constant
+ */
+ MAT4: "mat4",
+ /**
+ * A 2D sampled texture.
+ * @type {string}
+ * @constant
+ */
+ SAMPLER_2D: "sampler2D",
+ SAMPLER_CUBE: "samplerCube"
+}, UniformType$1 = Object.freeze(UniformType);
+function getImageFromTypedArray(e, t, n) {
+ const i = new Uint8ClampedArray(e.buffer), r = new ImageData(i, t, n), o = document.createElement("canvas");
+ return o.width = t, o.height = n, o.getContext("2d").putImageData(r, 0, 0), o;
+}
+function TextureManager() {
+ this._defaultTexture = void 0, this._textures = {}, this._loadedImages = [], this._lastUpdatedFrame = -1;
+}
+TextureManager.prototype.getTexture = function(e) {
+ return this._textures[e];
+};
+function fetchTexture2D(e, t, n) {
+ n.resource.fetchImage().then(function(i) {
+ e._loadedImages.push({
+ id: t,
+ image: i,
+ textureUniform: n
+ });
+ }).catch(function() {
+ const i = e._textures[t];
+ defined(i) && i !== e._defaultTexture && i.destroy(), e._textures[t] = e._defaultTexture;
+ });
+}
+TextureManager.prototype.loadTexture2D = function(e, t) {
+ defined(t.typedArray) ? this._loadedImages.push({
+ id: e,
+ textureUniform: t
+ }) : fetchTexture2D(this, e, t);
+};
+function createTexture(e, t, n) {
+ const { id: i, textureUniform: r, image: o } = t, s = n.webgl2 ? getTextureAndMips(r, o, n) : getWebGL1Texture(r, o, n), c = e._textures[i];
+ defined(c) && c !== n.defaultTexture && c.destroy(), e._textures[i] = s;
+}
+function getTextureAndMips(e, t, n) {
+ const { typedArray: i, sampler: r } = e, o = defined(i) ? getTextureFromTypedArray(e, n) : new Texture({ context: n, source: t, sampler: r });
+ return samplerRequiresMipmap(r) && o.generateMipmap(), o;
+}
+function getWebGL1Texture(e, t, n) {
+ const { typedArray: i, sampler: r } = e, o = samplerRequiresMipmap(r), s = r.wrapS === TextureWrap$1.REPEAT || r.wrapS === TextureWrap$1.MIRRORED_REPEAT || r.wrapT === TextureWrap$1.REPEAT || r.wrapT === TextureWrap$1.MIRRORED_REPEAT, { width: c, height: l } = defined(i) ? e : t, d = [c, l].every(CesiumMath.isPowerOfTwo);
+ if ((o || s) && !d)
+ if (defined(i)) {
+ if (e.pixelDatatype === PixelDatatype$1.UNSIGNED_BYTE) {
+ const h = getImageFromTypedArray(i, c, l), p = resizeImageToNextPowerOfTwo(h);
+ return getTextureAndMips({ sampler: r }, p, n);
+ }
+ } else {
+ const h = resizeImageToNextPowerOfTwo(t);
+ return getTextureAndMips(e, h, n);
+ }
+ else return getTextureAndMips(e, t, n);
+ return o ? console.warn(
+ "Texture requires resizing for mipmaps but pixelDataType cannot be resized. The texture may be rendered incorrectly."
+ ) : s && console.warn(
+ "Texture requires resizing for wrapping but pixelDataType cannot be resized. The texture may be rendered incorrectly."
+ ), getTextureFromTypedArray(e, n);
+}
+function samplerRequiresMipmap(e) {
+ return [
+ TextureMinificationFilter$1.NEAREST_MIPMAP_NEAREST,
+ TextureMinificationFilter$1.NEAREST_MIPMAP_LINEAR,
+ TextureMinificationFilter$1.LINEAR_MIPMAP_NEAREST,
+ TextureMinificationFilter$1.LINEAR_MIPMAP_LINEAR
+ ].includes(e.minificationFilter);
+}
+function getTextureFromTypedArray(e, t) {
+ const {
+ pixelFormat: n,
+ pixelDatatype: i,
+ width: r,
+ height: o,
+ typedArray: s,
+ sampler: c
+ } = e;
+ return new Texture({
+ context: t,
+ pixelFormat: n,
+ pixelDatatype: i,
+ source: { arrayBufferView: s, width: r, height: o },
+ sampler: c,
+ flipY: !1
+ });
+}
+TextureManager.prototype.update = function(e) {
+ if (e.frameNumber === this._lastUpdatedFrame)
+ return;
+ this._lastUpdatedFrame = e.frameNumber;
+ const t = e.context;
+ this._defaultTexture = t.defaultTexture;
+ const n = this._loadedImages;
+ for (let i = 0; i < n.length; i++) {
+ const r = n[i];
+ createTexture(this, r, t);
+ }
+ n.length = 0;
+};
+TextureManager.prototype.isDestroyed = function() {
+ return !1;
+};
+TextureManager.prototype.destroy = function() {
+ const e = this._textures;
+ for (const t in e)
+ if (e.hasOwnProperty(t)) {
+ const n = e[t];
+ n !== this._defaultTexture && n.destroy();
+ }
+ return destroyObject(this);
+};
+function CustomShader(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this.mode = defaultValue(e.mode, CustomShaderMode$1.MODIFY_MATERIAL), this.lightingModel = e.lightingModel, this.uniforms = defaultValue(e.uniforms, defaultValue.EMPTY_OBJECT), this.varyings = defaultValue(e.varyings, defaultValue.EMPTY_OBJECT), this.vertexShaderText = e.vertexShaderText, this.fragmentShaderText = e.fragmentShaderText, this.translucencyMode = defaultValue(
+ e.translucencyMode,
+ CustomShaderTranslucencyMode$1.INHERIT
+ ), this._textureManager = new TextureManager(), this._defaultTexture = void 0, this.uniformMap = buildUniformMap(this), this.usedVariablesVertex = {
+ attributeSet: {},
+ featureIdSet: {},
+ metadataSet: {}
+ }, this.usedVariablesFragment = {
+ attributeSet: {},
+ featureIdSet: {},
+ metadataSet: {},
+ materialSet: {}
+ }, findUsedVariables(this), validateBuiltinVariables(this);
+}
+function buildUniformMap(e) {
+ const t = e.uniforms, n = {};
+ for (const i in t)
+ if (t.hasOwnProperty(i)) {
+ const r = t[i];
+ r.type === UniformType$1.SAMPLER_2D ? (e._textureManager.loadTexture2D(i, r.value), n[i] = createUniformTexture2DFunction(
+ e,
+ i
+ )) : n[i] = createUniformFunction(
+ e,
+ i
+ );
+ }
+ return n;
+}
+function createUniformTexture2DFunction(e, t) {
+ return function() {
+ return defaultValue(
+ e._textureManager.getTexture(t),
+ e._defaultTexture
+ );
+ };
+}
+function createUniformFunction(e, t) {
+ return function() {
+ return e.uniforms[t].value;
+ };
+}
+function getVariables(e, t, n) {
+ let i;
+ for (; (i = t.exec(e)) !== null; ) {
+ const r = i[1];
+ n[r] = !0;
+ }
+}
+function findUsedVariables(e) {
+ const t = /[vf]sInput\.attributes\.(\w+)/g, n = /[vf]sInput\.featureIds\.(\w+)/g, i = /[vf]sInput\.metadata.(\w+)/g;
+ let r;
+ const o = e.vertexShaderText;
+ defined(o) && (r = e.usedVariablesVertex.attributeSet, getVariables(o, t, r), r = e.usedVariablesVertex.featureIdSet, getVariables(o, n, r), r = e.usedVariablesVertex.metadataSet, getVariables(o, i, r));
+ const s = e.fragmentShaderText;
+ if (defined(s)) {
+ r = e.usedVariablesFragment.attributeSet, getVariables(s, t, r), r = e.usedVariablesFragment.featureIdSet, getVariables(s, n, r), r = e.usedVariablesFragment.metadataSet, getVariables(s, i, r);
+ const c = /material\.(\w+)/g, l = e.usedVariablesFragment.materialSet;
+ getVariables(s, c, l);
+ }
+}
+function expandCoordinateAbbreviations(e) {
+ const t = /^.*MC$/, n = /^.*WC$/, i = /^.*EC$/;
+ return t.test(e) ? `${e} (model coordinates)` : n.test(e) ? `${e} (Cartesian world coordinates)` : i.test(e) ? `${e} (eye coordinates)` : e;
+}
+function validateVariableUsage(e, t, n, i) {
+ if (e.hasOwnProperty(t)) {
+ const r = `${expandCoordinateAbbreviations(
+ t
+ )} is not available in the ${i} shader. Did you mean ${expandCoordinateAbbreviations(
+ n
+ )} instead?`;
+ throw new DeveloperError(r);
+ }
+}
+function validateBuiltinVariables(e) {
+ const t = e.usedVariablesVertex.attributeSet;
+ validateVariableUsage(t, "position", "positionMC", "vertex"), validateVariableUsage(t, "normal", "normalMC", "vertex"), validateVariableUsage(t, "tangent", "tangentMC", "vertex"), validateVariableUsage(t, "bitangent", "bitangentMC", "vertex"), validateVariableUsage(t, "positionWC", "positionMC", "vertex"), validateVariableUsage(t, "positionEC", "positionMC", "vertex"), validateVariableUsage(t, "normalEC", "normalMC", "vertex"), validateVariableUsage(t, "tangentEC", "tangentMC", "vertex"), validateVariableUsage(t, "bitangentEC", "bitangentMC", "vertex");
+ const n = e.usedVariablesFragment.attributeSet;
+ validateVariableUsage(n, "position", "positionEC", "fragment"), validateVariableUsage(n, "normal", "normalEC", "fragment"), validateVariableUsage(n, "tangent", "tangentEC", "fragment"), validateVariableUsage(n, "bitangent", "bitangentEC", "fragment"), validateVariableUsage(n, "normalMC", "normalEC", "fragment"), validateVariableUsage(n, "tangentMC", "tangentEC", "fragment"), validateVariableUsage(n, "bitangentMC", "bitangentEC", "fragment");
+}
+CustomShader.prototype.setUniform = function(e, t) {
+ const n = this.uniforms[e];
+ n.type === UniformType$1.SAMPLER_2D ? this._textureManager.loadTexture2D(e, t) : defined(t.clone) ? n.value = t.clone(n.value) : n.value = t;
+};
+CustomShader.prototype.update = function(e) {
+ this._defaultTexture = e.context.defaultTexture, this._textureManager.update(e);
+};
+CustomShader.prototype.isDestroyed = function() {
+ return !1;
+};
+CustomShader.prototype.destroy = function() {
+ this._textureManager = this._textureManager && this._textureManager.destroy(), destroyObject(this);
+};
+function VoxelPrimitive(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._ready = !1, this._provider = defaultValue(
+ e.provider,
+ VoxelPrimitive.DefaultProvider
+ ), this._traversal = void 0, this._shape = void 0, this._shapeVisible = !1, this._paddingBefore = new Cartesian3(), this._paddingAfter = new Cartesian3(), this._minBounds = new Cartesian3(), this._minBoundsOld = new Cartesian3(), this._maxBounds = new Cartesian3(), this._maxBoundsOld = new Cartesian3(), this._exaggeratedMinBounds = new Cartesian3(), this._exaggeratedMinBoundsOld = new Cartesian3(), this._exaggeratedMaxBounds = new Cartesian3(), this._exaggeratedMaxBoundsOld = new Cartesian3(), this._minClippingBounds = new Cartesian3(), this._minClippingBoundsOld = new Cartesian3(), this._maxClippingBounds = new Cartesian3(), this._maxClippingBoundsOld = new Cartesian3(), this._clippingPlanes = void 0, this._clippingPlanesState = 0, this._clippingPlanesEnabled = !1, this._modelMatrix = Matrix4.clone(
+ defaultValue(e.modelMatrix, Matrix4.IDENTITY)
+ ), this._exaggeratedModelMatrix = Matrix4.clone(this._modelMatrix), this._compoundModelMatrix = new Matrix4(), this._compoundModelMatrixOld = new Matrix4(), this._customShader = defaultValue(
+ e.customShader,
+ VoxelPrimitive.DefaultCustomShader
+ ), this._customShaderCompilationEvent = new Event(), this._shaderDirty = !0, this._drawCommand = void 0, this._drawCommandPick = void 0, this._pickId = void 0, this._clock = e.clock, this._transformPositionWorldToUv = new Matrix4(), this._transformPositionUvToWorld = new Matrix4(), this._transformDirectionWorldToLocal = new Matrix3(), this._transformNormalLocalToWorld = new Matrix3(), this._nearestSampling = !1, this._levelBlendFactor = 0, this._stepSizeMultiplier = 1, this._depthTest = !0, this._useLogDepth = void 0, this._screenSpaceError = 4, this._debugPolylines = new PolylineCollection(), this._debugDraw = !1, this._disableRender = !1, this._disableUpdate = !1, this._uniforms = {
+ octreeInternalNodeTexture: void 0,
+ octreeInternalNodeTilesPerRow: 0,
+ octreeInternalNodeTexelSizeUv: new Cartesian2(),
+ octreeLeafNodeTexture: void 0,
+ octreeLeafNodeTilesPerRow: 0,
+ octreeLeafNodeTexelSizeUv: new Cartesian2(),
+ megatextureTextures: [],
+ megatextureSliceDimensions: new Cartesian2(),
+ megatextureTileDimensions: new Cartesian2(),
+ megatextureVoxelSizeUv: new Cartesian2(),
+ megatextureSliceSizeUv: new Cartesian2(),
+ megatextureTileSizeUv: new Cartesian2(),
+ dimensions: new Cartesian3(),
+ paddingBefore: new Cartesian3(),
+ paddingAfter: new Cartesian3(),
+ transformPositionViewToUv: new Matrix4(),
+ transformPositionUvToView: new Matrix4(),
+ transformDirectionViewToLocal: new Matrix3(),
+ transformNormalLocalToWorld: new Matrix3(),
+ cameraPositionUv: new Cartesian3(),
+ ndcSpaceAxisAlignedBoundingBox: new Cartesian4(),
+ clippingPlanesTexture: void 0,
+ clippingPlanesMatrix: new Matrix4(),
+ stepSize: 0,
+ pickColor: new Color()
+ }, this._shapeDefinesOld = {}, this._uniformMap = {};
+ const t = this._uniforms, n = this._uniformMap;
+ for (const r in t)
+ if (t.hasOwnProperty(r)) {
+ const o = `u_${r}`;
+ n[o] = function() {
+ return t[r];
+ };
+ }
+ const i = this._provider;
+ initialize$1(this, i);
+}
+function initialize$1(e, t) {
+ const {
+ shape: n,
+ minBounds: i = VoxelShapeType$1.getMinBounds(n),
+ maxBounds: r = VoxelShapeType$1.getMaxBounds(n)
+ } = t;
+ e.minBounds = i, e.maxBounds = r, e.minClippingBounds = VoxelShapeType$1.getMinBounds(n), e.maxClippingBounds = VoxelShapeType$1.getMaxBounds(n), e._exaggeratedMinBounds = Cartesian3.clone(
+ e._minBounds,
+ e._exaggeratedMinBounds
+ ), e._exaggeratedMaxBounds = Cartesian3.clone(
+ e._maxBounds,
+ e._exaggeratedMaxBounds
+ ), e._exaggeratedModelMatrix = Matrix4.clone(
+ e._modelMatrix,
+ e._exaggeratedModelMatrix
+ ), checkTransformAndBounds(e, t);
+ const o = VoxelShapeType$1.getShapeConstructor(n);
+ e._shape = new o(), e._shapeVisible = updateShapeAndTransforms(
+ e,
+ e._shape
+ );
+}
+Object.defineProperties(VoxelPrimitive.prototype, {
+ /**
+ * Gets a value indicating whether or not the primitive is ready for use.
+ *
+ * @memberof VoxelPrimitive.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ ready: {
+ get: function() {
+ return this._ready;
+ }
+ },
+ /**
+ * Gets the {@link VoxelProvider} associated with this primitive.
+ *
+ * @memberof VoxelPrimitive.prototype
+ * @type {VoxelProvider}
+ * @readonly
+ */
+ provider: {
+ get: function() {
+ return this._provider;
+ }
+ },
+ /**
+ * Gets the bounding sphere.
+ *
+ * @memberof VoxelPrimitive.prototype
+ * @type {BoundingSphere}
+ * @readonly
+ */
+ boundingSphere: {
+ get: function() {
+ return this._shape.boundingSphere;
+ }
+ },
+ /**
+ * Gets the oriented bounding box.
+ *
+ * @memberof VoxelPrimitive.prototype
+ * @type {OrientedBoundingBox}
+ * @readonly
+ */
+ orientedBoundingBox: {
+ get: function() {
+ return this._shape.orientedBoundingBox;
+ }
+ },
+ /**
+ * Gets the model matrix.
+ *
+ * @memberof VoxelPrimitive.prototype
+ * @type {Matrix4}
+ * @readonly
+ */
+ modelMatrix: {
+ get: function() {
+ return this._modelMatrix;
+ },
+ set: function(e) {
+ this._modelMatrix = Matrix4.clone(e, this._modelMatrix);
+ }
+ },
+ /**
+ * Gets the shape type.
+ *
+ * @memberof VoxelPrimitive.prototype
+ * @type {VoxelShapeType}
+ * @readonly
+ */
+ shape: {
+ get: function() {
+ return this._provider.shape;
+ }
+ },
+ /**
+ * Gets the voxel dimensions.
+ *
+ * @memberof VoxelPrimitive.prototype
+ * @type {Cartesian3}
+ * @readonly
+ */
+ dimensions: {
+ get: function() {
+ return this._provider.dimensions;
+ }
+ },
+ /**
+ * Gets the minimum value per channel of the voxel data.
+ *
+ * @memberof VoxelPrimitive.prototype
+ * @type {number[][]}
+ * @readonly
+ */
+ minimumValues: {
+ get: function() {
+ return this._provider.minimumValues;
+ }
+ },
+ /**
+ * Gets the maximum value per channel of the voxel data.
+ *
+ * @memberof VoxelPrimitive.prototype
+ * @type {number[][]}
+ * @readonly
+ */
+ maximumValues: {
+ get: function() {
+ return this._provider.maximumValues;
+ }
+ },
+ /**
+ * Gets or sets whether or not this primitive should be displayed.
+ *
+ * @memberof VoxelPrimitive.prototype
+ * @type {boolean}
+ */
+ show: {
+ get: function() {
+ return !this._disableRender;
+ },
+ set: function(e) {
+ this._disableRender = !e;
+ }
+ },
+ /**
+ * Gets or sets whether or not the primitive should update when the view changes.
+ *
+ * @memberof VoxelPrimitive.prototype
+ * @type {boolean}
+ */
+ disableUpdate: {
+ get: function() {
+ return this._disableUpdate;
+ },
+ set: function(e) {
+ this._disableUpdate = e;
+ }
+ },
+ /**
+ * Gets or sets whether or not to render debug visualizations.
+ *
+ * @memberof VoxelPrimitive.prototype
+ * @type {boolean}
+ */
+ debugDraw: {
+ get: function() {
+ return this._debugDraw;
+ },
+ set: function(e) {
+ this._debugDraw = e;
+ }
+ },
+ /**
+ * Gets or sets whether or not to test against depth when rendering.
+ *
+ * @memberof VoxelPrimitive.prototype
+ * @type {boolean}
+ */
+ depthTest: {
+ get: function() {
+ return this._depthTest;
+ },
+ set: function(e) {
+ this._depthTest !== e && (this._depthTest = e, this._shaderDirty = !0);
+ }
+ },
+ /**
+ * Gets or sets the nearest sampling.
+ *
+ * @memberof VoxelPrimitive.prototype
+ * @type {boolean}
+ */
+ nearestSampling: {
+ get: function() {
+ return this._nearestSampling;
+ },
+ set: function(e) {
+ this._nearestSampling !== e && (this._nearestSampling = e, this._shaderDirty = !0);
+ }
+ },
+ /**
+ * Controls how quickly to blend between different levels of the tree.
+ * 0.0 means an instantaneous pop.
+ * 1.0 means a full linear blend.
+ *
+ * @memberof VoxelPrimitive.prototype
+ * @type {number}
+ * @private
+ */
+ levelBlendFactor: {
+ get: function() {
+ return this._levelBlendFactor;
+ },
+ set: function(e) {
+ this._levelBlendFactor = CesiumMath.clamp(e, 0, 1);
+ }
+ },
+ /**
+ * Gets or sets the screen space error in pixels. If the screen space size
+ * of a voxel is greater than the screen space error, the tile is subdivided.
+ * Lower screen space error corresponds with higher detail rendering, but could
+ * result in worse performance and higher memory consumption.
+ *
+ * @memberof VoxelPrimitive.prototype
+ * @type {number}
+ */
+ screenSpaceError: {
+ get: function() {
+ return this._screenSpaceError;
+ },
+ set: function(e) {
+ this._screenSpaceError = e;
+ }
+ },
+ /**
+ * Gets or sets the step size multiplier used during raymarching.
+ * The lower the value, the higher the rendering quality, but
+ * also the worse the performance.
+ *
+ * @memberof VoxelPrimitive.prototype
+ * @type {number}
+ */
+ stepSize: {
+ get: function() {
+ return this._stepSizeMultiplier;
+ },
+ set: function(e) {
+ this._stepSizeMultiplier = e;
+ }
+ },
+ /**
+ * Gets or sets the minimum bounds in the shape's local coordinate system.
+ * Voxel data is stretched or squashed to fit the bounds.
+ *
+ * @memberof VoxelPrimitive.prototype
+ * @type {Cartesian3}
+ */
+ minBounds: {
+ get: function() {
+ return this._minBounds;
+ },
+ set: function(e) {
+ this._minBounds = Cartesian3.clone(e, this._minBounds);
+ }
+ },
+ /**
+ * Gets or sets the maximum bounds in the shape's local coordinate system.
+ * Voxel data is stretched or squashed to fit the bounds.
+ *
+ * @memberof VoxelPrimitive.prototype
+ * @type {Cartesian3}
+ */
+ maxBounds: {
+ get: function() {
+ return this._maxBounds;
+ },
+ set: function(e) {
+ this._maxBounds = Cartesian3.clone(e, this._maxBounds);
+ }
+ },
+ /**
+ * Gets or sets the minimum clipping location in the shape's local coordinate system.
+ * Any voxel content outside the range is clipped.
+ *
+ * @memberof VoxelPrimitive.prototype
+ * @type {Cartesian3}
+ */
+ minClippingBounds: {
+ get: function() {
+ return this._minClippingBounds;
+ },
+ set: function(e) {
+ this._minClippingBounds = Cartesian3.clone(
+ e,
+ this._minClippingBounds
+ );
+ }
+ },
+ /**
+ * Gets or sets the maximum clipping location in the shape's local coordinate system.
+ * Any voxel content outside the range is clipped.
+ *
+ * @memberof VoxelPrimitive.prototype
+ * @type {Cartesian3}
+ */
+ maxClippingBounds: {
+ get: function() {
+ return this._maxClippingBounds;
+ },
+ set: function(e) {
+ this._maxClippingBounds = Cartesian3.clone(
+ e,
+ this._maxClippingBounds
+ );
+ }
+ },
+ /**
+ * The {@link ClippingPlaneCollection} used to selectively disable rendering the primitive.
+ *
+ * @memberof VoxelPrimitive.prototype
+ * @type {ClippingPlaneCollection}
+ */
+ clippingPlanes: {
+ get: function() {
+ return this._clippingPlanes;
+ },
+ set: function(e) {
+ ClippingPlaneCollection.setOwner(e, this, "_clippingPlanes");
+ }
+ },
+ /**
+ * Gets or sets the custom shader. If undefined, {@link VoxelPrimitive.DefaultCustomShader} is set.
+ *
+ * @memberof VoxelPrimitive.prototype
+ * @type {CustomShader}
+ */
+ customShader: {
+ get: function() {
+ return this._customShader;
+ },
+ set: function(e) {
+ if (this._customShader !== e) {
+ const t = this._uniformMap, i = this._customShader.uniformMap;
+ for (const r in i)
+ i.hasOwnProperty(r) && delete t[r];
+ defined(e) ? this._customShader = e : this._customShader = VoxelPrimitive.DefaultCustomShader, this._shaderDirty = !0;
+ }
+ }
+ },
+ /**
+ * Gets an event that is raised whenever a custom shader is compiled.
+ *
+ * @memberof VoxelPrimitive.prototype
+ * @type {Event}
+ * @readonly
+ */
+ customShaderCompilationEvent: {
+ get: function() {
+ return this._customShaderCompilationEvent;
+ }
+ }
+});
+const scratchDimensions = new Cartesian3(), scratchIntersect = new Cartesian4(), scratchNdcAabb = new Cartesian4(), scratchScale$1 = new Cartesian3(), scratchLocalScale = new Cartesian3(), scratchRotation = new Matrix3(), scratchRotationAndLocalScale = new Matrix3(), scratchTransformPositionWorldToLocal = new Matrix4(), scratchTransformPositionLocalToWorld = new Matrix4(), scratchTransformPositionLocalToProjection = new Matrix4(), transformPositionLocalToUv = Matrix4.fromRotationTranslation(
+ Matrix3.fromUniformScale(0.5, new Matrix3()),
+ new Cartesian3(0.5, 0.5, 0.5),
+ new Matrix4()
+), transformPositionUvToLocal = Matrix4.fromRotationTranslation(
+ Matrix3.fromUniformScale(2, new Matrix3()),
+ new Cartesian3(-1, -1, -1),
+ new Matrix4()
+);
+VoxelPrimitive.prototype.update = function(e) {
+ const t = this._provider;
+ this._customShader.update(e);
+ const n = e.context;
+ if (!this._ready) {
+ initFromProvider(this, t, n), e.afterRender.push(() => (this._ready = !0, !0));
+ return;
+ }
+ updateVerticalExaggeration(this, e);
+ const i = checkTransformAndBounds(this, t), r = this._shape;
+ if (i && (this._shapeVisible = updateShapeAndTransforms(this, r), checkShapeDefines(this, r) && (this._shaderDirty = !0)), !this._shapeVisible)
+ return;
+ const o = getKeyframeLocation(
+ t.timeIntervalCollection,
+ this._clock
+ ), s = this._traversal, c = s._sampleCount;
+ if (s.update(
+ e,
+ o,
+ i,
+ // recomputeBoundingVolumes
+ this._disableUpdate
+ // pauseUpdate
+ ), c !== s._sampleCount && (this._shaderDirty = !0), !s.isRenderable(s.rootNode) || (this._debugDraw && debugDraw(this, e), this._disableRender))
+ return;
+ this._useLogDepth !== e.useLogDepth && (this._useLogDepth = e.useLogDepth, this._shaderDirty = !0), updateClippingPlanes(this, e) && (this._shaderDirty = !0);
+ const d = s.leafNodeTexture, f = this._uniforms;
+ defined(d) && (f.octreeLeafNodeTexture = s.leafNodeTexture, f.octreeLeafNodeTexelSizeUv = Cartesian2.clone(
+ s.leafNodeTexelSizeUv,
+ f.octreeLeafNodeTexelSizeUv
+ ), f.octreeLeafNodeTilesPerRow = s.leafNodeTilesPerRow), this._shaderDirty && (buildVoxelDrawCommands(this, n), this._shaderDirty = !1);
+ const h = n.uniformState.viewProjection, p = r.orientedBoundingBox, m = orientedBoundingBoxToNdcAabb(
+ p,
+ h,
+ scratchNdcAabb
+ );
+ if (m.x === 1 || m.y === 1 || m.z === -1 || m.w === -1)
+ return;
+ f.ndcSpaceAxisAlignedBoundingBox = Cartesian4.clone(
+ m,
+ f.ndcSpaceAxisAlignedBoundingBox
+ );
+ const y = n.uniformState.inverseView;
+ f.transformPositionViewToUv = Matrix4.multiplyTransformation(
+ this._transformPositionWorldToUv,
+ y,
+ f.transformPositionViewToUv
+ );
+ const C = n.uniformState.view;
+ f.transformPositionUvToView = Matrix4.multiplyTransformation(
+ C,
+ this._transformPositionUvToWorld,
+ f.transformPositionUvToView
+ );
+ const T = n.uniformState.inverseViewRotation;
+ f.transformDirectionViewToLocal = Matrix3.multiply(
+ this._transformDirectionWorldToLocal,
+ T,
+ f.transformDirectionViewToLocal
+ ), f.transformNormalLocalToWorld = Matrix3.clone(
+ this._transformNormalLocalToWorld,
+ f.transformNormalLocalToWorld
+ );
+ const x = e.camera.positionWC;
+ f.cameraPositionUv = Matrix4.multiplyByPoint(
+ this._transformPositionWorldToUv,
+ x,
+ f.cameraPositionUv
+ ), f.stepSize = this._stepSizeMultiplier;
+ const b = e.passes.pick ? this._drawCommandPick : e.passes.pickVoxel ? this._drawCommandPickVoxel : this._drawCommand;
+ b.boundingVolume = r.boundingSphere, e.commandList.push(b);
+};
+const scratchExaggerationScale = new Cartesian3(), scratchExaggerationCenter = new Cartesian3(), scratchCartographicCenter = new Cartographic(), scratchExaggerationTranslation = new Cartesian3();
+function updateVerticalExaggeration(e, t) {
+ if (e._exaggeratedMinBounds = Cartesian3.clone(
+ e._minBounds,
+ e._exaggeratedMinBounds
+ ), e._exaggeratedMaxBounds = Cartesian3.clone(
+ e._maxBounds,
+ e._exaggeratedMaxBounds
+ ), e.shape === VoxelShapeType$1.ELLIPSOID) {
+ const n = t.verticalExaggerationRelativeHeight, i = t.verticalExaggeration;
+ e._exaggeratedMinBounds.z = (e._minBounds.z - n) * i + n, e._exaggeratedMaxBounds.z = (e._maxBounds.z - n) * i + n;
+ } else if (e.shape === VoxelShapeType$1.BOX) {
+ const n = Cartesian3.fromElements(
+ 1,
+ 1,
+ t.verticalExaggeration,
+ scratchExaggerationScale
+ );
+ e._exaggeratedModelMatrix = Matrix4.multiplyByScale(
+ e._modelMatrix,
+ n,
+ e._exaggeratedModelMatrix
+ ), e._exaggeratedModelMatrix = Matrix4.multiplyByTranslation(
+ e._exaggeratedModelMatrix,
+ computeBoxExaggerationTranslation(e, t),
+ e._exaggeratedModelMatrix
+ );
+ }
+}
+function computeBoxExaggerationTranslation(e, t) {
+ const {
+ shapeTransform: n = Matrix4.IDENTITY,
+ globalTransform: i = Matrix4.IDENTITY
+ } = e._provider, r = Matrix4.getTranslation(
+ n,
+ scratchExaggerationCenter
+ ), o = Matrix4.multiplyByPoint(
+ e._modelMatrix,
+ r,
+ scratchExaggerationCenter
+ ), s = Matrix4.multiplyByPoint(
+ i,
+ o,
+ scratchExaggerationCenter
+ ), l = Ellipsoid.WGS84.cartesianToCartographic(
+ s,
+ scratchCartographicCenter
+ );
+ let d = 0;
+ defined(l) && (d = l.height);
+ const f = VerticalExaggeration.getHeight(
+ d,
+ t.verticalExaggeration,
+ t.verticalExaggerationRelativeHeight
+ );
+ return Cartesian3.fromElements(
+ 0,
+ 0,
+ (f - d) / t.verticalExaggeration,
+ scratchExaggerationTranslation
+ );
+}
+function initFromProvider(e, t, n) {
+ const i = e._uniforms;
+ e._pickId = n.createPickId({ primitive: e }), i.pickColor = Color.clone(e._pickId.color, i.pickColor);
+ const { shaderDefines: r, shaderUniforms: o } = e._shape;
+ e._shapeDefinesOld = clone$1(r, !0);
+ const s = e._uniformMap;
+ for (const c in o)
+ if (o.hasOwnProperty(c)) {
+ const l = `u_${c}`;
+ s[l] = function() {
+ return o[c];
+ };
+ }
+ i.dimensions = Cartesian3.clone(
+ t.dimensions,
+ i.dimensions
+ ), e._paddingBefore = Cartesian3.clone(
+ defaultValue(t.paddingBefore, Cartesian3.ZERO),
+ e._paddingBefore
+ ), i.paddingBefore = Cartesian3.clone(
+ e._paddingBefore,
+ i.paddingBefore
+ ), e._paddingAfter = Cartesian3.clone(
+ defaultValue(t.paddingAfter, Cartesian3.ZERO),
+ e._paddingBefore
+ ), i.paddingAfter = Cartesian3.clone(
+ e._paddingAfter,
+ i.paddingAfter
+ ), e._traversal = setupTraversal(e, t, n), setTraversalUniforms(e._traversal, i);
+}
+function checkTransformAndBounds(e, t) {
+ const n = defaultValue(
+ t.shapeTransform,
+ Matrix4.IDENTITY
+ ), i = defaultValue(
+ t.globalTransform,
+ Matrix4.IDENTITY
+ );
+ return Matrix4.multiplyTransformation(
+ i,
+ e._exaggeratedModelMatrix,
+ e._compoundModelMatrix
+ ), Matrix4.multiplyTransformation(
+ e._compoundModelMatrix,
+ n,
+ e._compoundModelMatrix
+ ), updateBound(e, "_compoundModelMatrix", "_compoundModelMatrixOld") + updateBound(e, "_minBounds", "_minBoundsOld") + updateBound(e, "_maxBounds", "_maxBoundsOld") + updateBound(
+ e,
+ "_exaggeratedMinBounds",
+ "_exaggeratedMinBoundsOld"
+ ) + updateBound(
+ e,
+ "_exaggeratedMaxBounds",
+ "_exaggeratedMaxBoundsOld"
+ ) + updateBound(e, "_minClippingBounds", "_minClippingBoundsOld") + updateBound(e, "_maxClippingBounds", "_maxClippingBoundsOld") > 0;
+}
+function updateBound(e, t, n) {
+ const i = e[t], r = e[n], o = !i.equals(r);
+ return o && i.clone(r), o ? 1 : 0;
+}
+function updateShapeAndTransforms(e, t, n) {
+ if (!t.update(
+ e._compoundModelMatrix,
+ e._exaggeratedMinBounds,
+ e._exaggeratedMaxBounds,
+ e.minClippingBounds,
+ e.maxClippingBounds
+ ))
+ return !1;
+ const r = t.shapeTransform, o = Matrix4.inverse(
+ r,
+ scratchTransformPositionWorldToLocal
+ ), s = Matrix4.getRotation(
+ r,
+ scratchRotation
+ ), c = Matrix4.getScale(r, scratchScale$1), l = Cartesian3.maximumComponent(c), d = Cartesian3.divideByScalar(
+ c,
+ l,
+ scratchLocalScale
+ ), f = Matrix3.multiplyByScale(
+ s,
+ d,
+ scratchRotationAndLocalScale
+ );
+ return e._transformPositionWorldToUv = Matrix4.multiplyTransformation(
+ transformPositionLocalToUv,
+ o,
+ e._transformPositionWorldToUv
+ ), e._transformPositionUvToWorld = Matrix4.multiplyTransformation(
+ r,
+ transformPositionUvToLocal,
+ e._transformPositionUvToWorld
+ ), e._transformDirectionWorldToLocal = Matrix4.getMatrix3(
+ o,
+ e._transformDirectionWorldToLocal
+ ), e._transformNormalLocalToWorld = Matrix3.inverseTranspose(
+ f,
+ e._transformNormalLocalToWorld
+ ), !0;
+}
+function setupTraversal(e, t, n) {
+ const i = Cartesian3.clone(t.dimensions, scratchDimensions);
+ Cartesian3.add(i, e._paddingBefore, i), Cartesian3.add(i, e._paddingAfter, i);
+ const r = t.maximumTileCount, o = defined(r) ? VoxelTraversal.getApproximateTextureMemoryByteLength(
+ r,
+ i,
+ t.types,
+ t.componentTypes
+ ) : void 0, s = defaultValue(t.keyframeCount, 1);
+ return new VoxelTraversal(
+ e,
+ n,
+ i,
+ t.types,
+ t.componentTypes,
+ s,
+ o
+ );
+}
+function setTraversalUniforms(e, t) {
+ t.octreeInternalNodeTexture = e.internalNodeTexture, t.octreeInternalNodeTexelSizeUv = Cartesian2.clone(
+ e.internalNodeTexelSizeUv,
+ t.octreeInternalNodeTexelSizeUv
+ ), t.octreeInternalNodeTilesPerRow = e.internalNodeTilesPerRow;
+ const n = e.megatextures, i = n[0], r = n.length;
+ t.megatextureTextures = new Array(r);
+ for (let o = 0; o < r; o++)
+ t.megatextureTextures[o] = n[o].texture;
+ t.megatextureSliceDimensions = Cartesian2.clone(
+ i.sliceCountPerRegion,
+ t.megatextureSliceDimensions
+ ), t.megatextureTileDimensions = Cartesian2.clone(
+ i.regionCountPerMegatexture,
+ t.megatextureTileDimensions
+ ), t.megatextureVoxelSizeUv = Cartesian2.clone(
+ i.voxelSizeUv,
+ t.megatextureVoxelSizeUv
+ ), t.megatextureSliceSizeUv = Cartesian2.clone(
+ i.sliceSizeUv,
+ t.megatextureSliceSizeUv
+ ), t.megatextureTileSizeUv = Cartesian2.clone(
+ i.regionSizeUv,
+ t.megatextureTileSizeUv
+ );
+}
+function checkShapeDefines(e, t) {
+ const n = t.shaderDefines, i = Object.keys(n).some(
+ (r) => n[r] !== e._shapeDefinesOld[r]
+ );
+ return i && (e._shapeDefinesOld = clone$1(n, !0)), i;
+}
+function getKeyframeLocation(e, t) {
+ if (!defined(e) || !defined(t))
+ return 0;
+ let n = t.currentTime, i, r = e.indexOf(n);
+ r >= 0 ? i = e.get(r) : (r = ~r, r === e.length ? (r = e.length - 1, i = e.get(r), n = i.stop) : (i = e.get(r), n = i.start));
+ const o = JulianDate.secondsDifference(
+ i.stop,
+ i.start
+ ), c = JulianDate.secondsDifference(
+ n,
+ i.start
+ ) / o;
+ return r + c;
+}
+function updateClippingPlanes(e, t) {
+ const n = e.clippingPlanes;
+ if (!defined(n))
+ return !1;
+ n.update(t);
+ const { clippingPlanesState: i, enabled: r } = n;
+ if (r) {
+ const o = e._uniforms;
+ o.clippingPlanesTexture = n.texture, o.clippingPlanesMatrix = Matrix4.transpose(
+ Matrix4.multiplyTransformation(
+ Matrix4.inverse(
+ n.modelMatrix,
+ o.clippingPlanesMatrix
+ ),
+ e._transformPositionUvToWorld,
+ o.clippingPlanesMatrix
+ ),
+ o.clippingPlanesMatrix
+ );
+ }
+ return e._clippingPlanesState === i && e._clippingPlanesEnabled === r ? !1 : (e._clippingPlanesState = i, e._clippingPlanesEnabled = r, !0);
+}
+VoxelPrimitive.prototype.isDestroyed = function() {
+ return !1;
+};
+VoxelPrimitive.prototype.destroy = function() {
+ const e = this._drawCommand;
+ defined(e) && (e.shaderProgram = e.shaderProgram && e.shaderProgram.destroy());
+ const t = this._drawCommandPick;
+ return defined(t) && (t.shaderProgram = t.shaderProgram && t.shaderProgram.destroy()), this._pickId = this._pickId && this._pickId.destroy(), this._traversal = this._traversal && this._traversal.destroy(), this._clippingPlanes = this._clippingPlanes && this._clippingPlanes.destroy(), destroyObject(this);
+};
+const corners = new Array(
+ new Cartesian4(-1, -1, -1, 1),
+ new Cartesian4(1, -1, -1, 1),
+ new Cartesian4(-1, 1, -1, 1),
+ new Cartesian4(1, 1, -1, 1),
+ new Cartesian4(-1, -1, 1, 1),
+ new Cartesian4(1, -1, 1, 1),
+ new Cartesian4(-1, 1, 1, 1),
+ new Cartesian4(1, 1, 1, 1)
+), vertexNeighborIndices = new Array(
+ 1,
+ 2,
+ 4,
+ 0,
+ 3,
+ 5,
+ 0,
+ 3,
+ 6,
+ 1,
+ 2,
+ 7,
+ 0,
+ 5,
+ 6,
+ 1,
+ 4,
+ 7,
+ 2,
+ 4,
+ 7,
+ 3,
+ 5,
+ 6
+), scratchCornersClipSpace = new Array(
+ new Cartesian4(),
+ new Cartesian4(),
+ new Cartesian4(),
+ new Cartesian4(),
+ new Cartesian4(),
+ new Cartesian4(),
+ new Cartesian4(),
+ new Cartesian4()
+);
+function orientedBoundingBoxToNdcAabb(e, t, n) {
+ const i = Matrix4.fromRotationTranslation(
+ e.halfAxes,
+ e.center,
+ scratchTransformPositionLocalToWorld
+ ), r = Matrix4.multiply(
+ t,
+ i,
+ scratchTransformPositionLocalToProjection
+ );
+ let o = +Number.MAX_VALUE, s = -Number.MAX_VALUE, c = +Number.MAX_VALUE, l = -Number.MAX_VALUE, d;
+ const f = scratchCornersClipSpace, h = corners.length;
+ for (d = 0; d < h; d++)
+ Matrix4.multiplyByVector(
+ r,
+ corners[d],
+ f[d]
+ );
+ for (d = 0; d < h; d++) {
+ const p = f[d];
+ if (p.z >= -p.w) {
+ const m = p.x / p.w, _ = p.y / p.w;
+ o = Math.min(o, m), s = Math.max(s, m), c = Math.min(c, _), l = Math.max(l, _);
+ } else
+ for (let m = 0; m < 3; m++) {
+ const _ = vertexNeighborIndices[d * 3 + m], y = f[_];
+ if (y.z >= -y.w) {
+ const C = p.z + p.w, T = y.z + y.w, x = C / (C - T), b = Cartesian4.lerp(
+ p,
+ y,
+ x,
+ scratchIntersect
+ ), S = b.x / b.w, E = b.y / b.w;
+ o = Math.min(o, S), s = Math.max(s, S), c = Math.min(c, E), l = Math.max(l, E);
+ }
+ }
+ }
+ return o = CesiumMath.clamp(o, -1, 1), c = CesiumMath.clamp(c, -1, 1), s = CesiumMath.clamp(s, -1, 1), l = CesiumMath.clamp(l, -1, 1), n = Cartesian4.fromElements(o, c, s, l, n), n;
+}
+const polylineAxisDistance = 3e7, polylineXAxis = new Cartesian3(polylineAxisDistance, 0, 0), polylineYAxis = new Cartesian3(0, polylineAxisDistance, 0), polylineZAxis = new Cartesian3(0, 0, polylineAxisDistance);
+function debugDraw(e, t) {
+ const n = e._traversal, i = e._debugPolylines;
+ i.removeAll();
+ function r(l, d, f, h) {
+ i.add({
+ positions: [l, d],
+ width: h,
+ material: Material$4.fromType("Color", {
+ color: f
+ })
+ });
+ }
+ function o(l, d, f) {
+ const h = l.computeCorners();
+ r(h[0], h[1], d, f), r(h[2], h[3], d, f), r(h[4], h[5], d, f), r(h[6], h[7], d, f), r(h[0], h[2], d, f), r(h[4], h[6], d, f), r(h[1], h[3], d, f), r(h[5], h[7], d, f), r(h[0], h[4], d, f), r(h[2], h[6], d, f), r(h[1], h[5], d, f), r(h[3], h[7], d, f);
+ }
+ function s(l) {
+ if (!n.isRenderable(l))
+ return;
+ const d = l.level, h = Math.max(1, 5 / Math.pow(2, d)), m = [Color.RED, Color.LIME, Color.BLUE][d % 3];
+ if (o(l.orientedBoundingBox, m, h), defined(l.children))
+ for (let _ = 0; _ < 8; _++)
+ s(l.children[_]);
+ }
+ o(e._shape.orientedBoundingBox, Color.WHITE, 5), s(n.rootNode);
+ const c = 10;
+ r(
+ Cartesian3.ZERO,
+ polylineXAxis,
+ Color.RED,
+ c
+ ), r(
+ Cartesian3.ZERO,
+ polylineYAxis,
+ Color.LIME,
+ c
+ ), r(
+ Cartesian3.ZERO,
+ polylineZAxis,
+ Color.BLUE,
+ c
+ ), i.update(t);
+}
+VoxelPrimitive.DefaultCustomShader = new CustomShader({
+ fragmentShaderText: `void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material)
+{
+ material.diffuse = vec3(1.0);
+ material.alpha = 1.0;
+}`
+});
+function DefaultVoxelProvider() {
+ this.ready = !0, this.shape = VoxelShapeType$1.BOX, this.dimensions = new Cartesian3(1, 1, 1), this.names = ["data"], this.types = [MetadataType$1.SCALAR], this.componentTypes = [MetadataComponentType$1.FLOAT32], this.maximumTileCount = 1;
+}
+DefaultVoxelProvider.prototype.requestData = function(e) {
+ if (!((defined(e) ? defaultValue(e.tileLevel, 0) : 0) >= 1))
+ return Promise.resolve([new Float32Array(1)]);
+};
+VoxelPrimitive.DefaultProvider = new DefaultVoxelProvider();
+const requestRenderAfterFrame = function(e) {
+ return function() {
+ e.frameState.afterRender.push(function() {
+ e.requestRender();
+ });
+ };
+};
+function Scene(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.canvas;
+ let n = e.creditContainer, i = e.creditViewport;
+ const r = clone$1(e.contextOptions), o = defined(n), s = new Context(t, r);
+ o || (n = document.createElement("div"), n.style.position = "absolute", n.style.bottom = "0", n.style["text-shadow"] = "0 0 2px #000000", n.style.color = "#ffffff", n.style["font-size"] = "10px", n.style["padding-right"] = "5px", t.parentNode.appendChild(n)), defined(i) || (i = t.parentNode), this._id = createGuid(), this._jobScheduler = new JobScheduler(), this._frameState = new FrameState(
+ s,
+ new CreditDisplay(n, "•", i),
+ this._jobScheduler
+ ), this._frameState.scene3DOnly = defaultValue(e.scene3DOnly, !1), this._removeCreditContainer = !o, this._creditContainer = n, this._canvas = t, this._context = s, this._computeEngine = new ComputeEngine(s), this._ellipsoid = defaultValue(e.ellipsoid, Ellipsoid.default), this._globe = void 0, this._globeTranslucencyState = new GlobeTranslucencyState(), this._primitives = new PrimitiveCollection(), this._groundPrimitives = new PrimitiveCollection(), this._globeHeight = void 0, this._globeHeightDirty = !0, this._cameraUnderground = !1, this._removeUpdateHeightCallback = void 0, this._logDepthBuffer = Scene.defaultLogDepthBuffer && s.fragmentDepth, this._logDepthBufferDirty = !0, this._tweens = new TweenCollection(), this._shaderFrameCount = 0, this._sunPostProcess = void 0, this._computeCommandList = [], this._overlayCommandList = [], this._useOIT = defaultValue(e.orderIndependentTranslucency, !0), this._executeOITFunction = void 0, this._depthPlane = new DepthPlane(e.depthPlaneEllipsoidOffset), this._clearColorCommand = new ClearCommand({
+ color: new Color(),
+ stencil: 0,
+ owner: this
+ }), this._depthClearCommand = new ClearCommand({
+ depth: 1,
+ owner: this
+ }), this._stencilClearCommand = new ClearCommand({
+ stencil: 0
+ }), this._classificationStencilClearCommand = new ClearCommand({
+ stencil: 0,
+ renderState: RenderState.fromCache({
+ stencilMask: StencilConstants$1.CLASSIFICATION_MASK
+ })
+ }), this._depthOnlyRenderStateCache = {}, this._transitioner = new SceneTransitioner(this), this._preUpdate = new Event(), this._postUpdate = new Event(), this._renderError = new Event(), this._preRender = new Event(), this._postRender = new Event(), this._minimumDisableDepthTestDistance = 0, this._debugInspector = new DebugInspector(), this._msaaSamples = defaultValue(e.msaaSamples, 4), this.rethrowRenderErrors = !1, this.completeMorphOnUserInput = !0, this.morphStart = new Event(), this.morphComplete = new Event(), this.skyBox = void 0, this.skyAtmosphere = void 0, this.sun = void 0, this.sunBloom = !0, this._sunBloom = void 0, this.moon = void 0, this.backgroundColor = Color.clone(Color.BLACK), this._mode = SceneMode$1.SCENE3D, this._mapProjection = defined(e.mapProjection) ? e.mapProjection : new GeographicProjection(this._ellipsoid), this.morphTime = 1, this.farToNearRatio = 1e3, this.logarithmicDepthFarToNearRatio = 1e9, this.nearToFarDistance2D = 175e4, this.verticalExaggeration = 1, this.verticalExaggerationRelativeHeight = 0, this.debugCommandFilter = void 0, this.debugShowCommands = !1, this.debugShowFrustums = !1, this.debugShowFramesPerSecond = !1, this.debugShowDepthFrustum = 1, this.debugShowFrustumPlanes = !1, this._debugShowFrustumPlanes = !1, this._debugFrustumPlanes = void 0, this.useDepthPicking = !0, this.pickTranslucentDepth = !1, this.cameraEventWaitTime = 500, this.atmosphere = new Atmosphere(), this.fog = new Fog(), this.fog.enabled = Ellipsoid.WGS84.equals(this._ellipsoid), Ellipsoid.WGS84.equals(this._ellipsoid) || (Camera.DEFAULT_VIEW_RECTANGLE = Rectangle.fromDegrees(
+ -45,
+ -45,
+ 45,
+ 45
+ )), this._shadowMapCamera = new Camera(this), this.shadowMap = new ShadowMap({
+ context: s,
+ lightCamera: this._shadowMapCamera,
+ enabled: defaultValue(e.shadows, !1)
+ }), this.invertClassification = !1, this.invertClassificationColor = Color.clone(Color.WHITE), this._actualInvertClassificationColor = Color.clone(
+ this._invertClassificationColor
+ ), this._invertClassification = new InvertClassification(), this.focalLength = void 0, this.eyeSeparation = void 0, this.postProcessStages = new PostProcessStageCollection(), this._brdfLutGenerator = new BrdfLutGenerator(), this._performanceDisplay = void 0, this._debugVolume = void 0, this._screenSpaceCameraController = new ScreenSpaceCameraController(this), this._cameraUnderground = !1, this._mapMode2D = defaultValue(e.mapMode2D, MapMode2D$1.INFINITE_SCROLL), this._environmentState = {
+ skyBoxCommand: void 0,
+ skyAtmosphereCommand: void 0,
+ sunDrawCommand: void 0,
+ sunComputeCommand: void 0,
+ moonCommand: void 0,
+ isSunVisible: !1,
+ isMoonVisible: !1,
+ isReadyForAtmosphere: !1,
+ isSkyAtmosphereVisible: !1,
+ clearGlobeDepth: !1,
+ useDepthPlane: !1,
+ renderTranslucentDepthForPick: !1,
+ originalFramebuffer: void 0,
+ useGlobeDepthFramebuffer: !1,
+ useOIT: !1,
+ useInvertClassification: !1,
+ usePostProcess: !1,
+ usePostProcessSelected: !1,
+ useWebVR: !1
+ }, this._useWebVR = !1, this._cameraVR = void 0, this._aspectRatioVR = void 0, this.requestRenderMode = defaultValue(e.requestRenderMode, !1), this._renderRequested = !0, this.maximumRenderTimeChange = defaultValue(
+ e.maximumRenderTimeChange,
+ 0
+ ), this._lastRenderTime = void 0, this._frameRateMonitor = void 0, this._removeRequestListenerCallback = RequestScheduler.requestCompletedEvent.addEventListener(
+ requestRenderAfterFrame(this)
+ ), this._removeTaskProcessorListenerCallback = TaskProcessor.taskCompletedEvent.addEventListener(
+ requestRenderAfterFrame(this)
+ ), this._removeGlobeCallbacks = [], this._removeTerrainProviderReadyListener = void 0;
+ const c = new BoundingRectangle(
+ 0,
+ 0,
+ s.drawingBufferWidth,
+ s.drawingBufferHeight
+ ), l = new Camera(this);
+ this._logDepthBuffer && (l.frustum.near = 0.1, l.frustum.far = 1e10), this.preloadFlightCamera = new Camera(this), this.preloadFlightCullingVolume = void 0, this._picking = new Picking(this), this._defaultView = new View(this, l, c), this._view = this._defaultView, this._hdr = void 0, this._hdrDirty = void 0, this.highDynamicRange = !1, this.gamma = 2.2, this.sphericalHarmonicCoefficients = void 0, this.specularEnvironmentMaps = void 0, this._specularEnvironmentCubeMap = void 0, this.light = new SunLight(), updateFrameNumber(this, 0, JulianDate.now()), this.updateFrameState(), this.initializeFrame();
+}
+Scene.defaultLogDepthBuffer = !0;
+function updateGlobeListeners(e, t) {
+ for (let i = 0; i < e._removeGlobeCallbacks.length; ++i)
+ e._removeGlobeCallbacks[i]();
+ e._removeGlobeCallbacks.length = 0;
+ const n = [];
+ defined(t) && (n.push(
+ t.imageryLayersUpdatedEvent.addEventListener(
+ requestRenderAfterFrame(e)
+ )
+ ), n.push(
+ t.terrainProviderChanged.addEventListener(
+ requestRenderAfterFrame(e)
+ )
+ )), e._removeGlobeCallbacks = n;
+}
+Object.defineProperties(Scene.prototype, {
+ /**
+ * Gets the canvas element to which this scene is bound.
+ * @memberof Scene.prototype
+ *
+ * @type {HTMLCanvasElement}
+ * @readonly
+ */
+ canvas: {
+ get: function() {
+ return this._canvas;
+ }
+ },
+ /**
+ * The drawingBufferHeight of the underlying GL context.
+ * @memberof Scene.prototype
+ *
+ * @type {number}
+ * @readonly
+ *
+ * @see {@link https://www.khronos.org/registry/webgl/specs/1.0/#DOM-WebGLRenderingContext-drawingBufferHeight|drawingBufferHeight}
+ */
+ drawingBufferHeight: {
+ get: function() {
+ return this._context.drawingBufferHeight;
+ }
+ },
+ /**
+ * The drawingBufferWidth of the underlying GL context.
+ * @memberof Scene.prototype
+ *
+ * @type {number}
+ * @readonly
+ *
+ * @see {@link https://www.khronos.org/registry/webgl/specs/1.0/#DOM-WebGLRenderingContext-drawingBufferWidth|drawingBufferWidth}
+ */
+ drawingBufferWidth: {
+ get: function() {
+ return this._context.drawingBufferWidth;
+ }
+ },
+ /**
+ * The maximum aliased line width, in pixels, supported by this WebGL implementation. It will be at least one.
+ * @memberof Scene.prototype
+ *
+ * @type {number}
+ * @readonly
+ *
+ * @see {@link https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml|glGet} with ALIASED_LINE_WIDTH_RANGE.
+ */
+ maximumAliasedLineWidth: {
+ get: function() {
+ return ContextLimits.maximumAliasedLineWidth;
+ }
+ },
+ /**
+ * The maximum length in pixels of one edge of a cube map, supported by this WebGL implementation. It will be at least 16.
+ * @memberof Scene.prototype
+ *
+ * @type {number}
+ * @readonly
+ *
+ * @see {@link https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGet.xml|glGet} with GL_MAX_CUBE_MAP_TEXTURE_SIZE.
+ */
+ maximumCubeMapSize: {
+ get: function() {
+ return ContextLimits.maximumCubeMapSize;
+ }
+ },
+ /**
+ * Returns true if the {@link Scene#pickPosition} function is supported.
+ * @memberof Scene.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @see Scene#pickPosition
+ */
+ pickPositionSupported: {
+ get: function() {
+ return this._context.depthTexture;
+ }
+ },
+ /**
+ * Returns true if the {@link Scene#sampleHeight} and {@link Scene#sampleHeightMostDetailed} functions are supported.
+ * @memberof Scene.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @see Scene#sampleHeight
+ * @see Scene#sampleHeightMostDetailed
+ */
+ sampleHeightSupported: {
+ get: function() {
+ return this._context.depthTexture;
+ }
+ },
+ /**
+ * Returns true if the {@link Scene#clampToHeight} and {@link Scene#clampToHeightMostDetailed} functions are supported.
+ * @memberof Scene.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @see Scene#clampToHeight
+ * @see Scene#clampToHeightMostDetailed
+ */
+ clampToHeightSupported: {
+ get: function() {
+ return this._context.depthTexture;
+ }
+ },
+ /**
+ * Returns true if the {@link Scene#invertClassification} is supported.
+ * @memberof Scene.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @see Scene#invertClassification
+ */
+ invertClassificationSupported: {
+ get: function() {
+ return this._context.depthTexture;
+ }
+ },
+ /**
+ * Returns true if specular environment maps are supported.
+ * @memberof Scene.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @see Scene#specularEnvironmentMaps
+ */
+ specularEnvironmentMapsSupported: {
+ get: function() {
+ return SpecularEnvironmentCubeMap.isSupported(this._context);
+ }
+ },
+ /**
+ * The ellipsoid. If not specified, the default ellipsoid is used.
+ * @memberof Scene.prototype
+ *
+ * @type {Ellipsoid}
+ * @readonly
+ */
+ ellipsoid: {
+ get: function() {
+ return this._ellipsoid;
+ }
+ },
+ /**
+ * Gets or sets the depth-test ellipsoid.
+ * @memberof Scene.prototype
+ *
+ * @type {Globe}
+ */
+ globe: {
+ get: function() {
+ return this._globe;
+ },
+ set: function(e) {
+ this._globe = this._globe && this._globe.destroy(), this._globe = e, updateGlobeListeners(this, e);
+ }
+ },
+ /**
+ * Gets the collection of primitives.
+ * @memberof Scene.prototype
+ *
+ * @type {PrimitiveCollection}
+ * @readonly
+ */
+ primitives: {
+ get: function() {
+ return this._primitives;
+ }
+ },
+ /**
+ * Gets the collection of ground primitives.
+ * @memberof Scene.prototype
+ *
+ * @type {PrimitiveCollection}
+ * @readonly
+ */
+ groundPrimitives: {
+ get: function() {
+ return this._groundPrimitives;
+ }
+ },
+ /**
+ * Gets or sets the camera.
+ * @memberof Scene.prototype
+ *
+ * @type {Camera}
+ * @readonly
+ */
+ camera: {
+ get: function() {
+ return this._view.camera;
+ },
+ set: function(e) {
+ this._view.camera = e;
+ }
+ },
+ /**
+ * Gets or sets the view.
+ * @memberof Scene.prototype
+ *
+ * @type {View}
+ * @readonly
+ *
+ * @private
+ */
+ view: {
+ get: function() {
+ return this._view;
+ },
+ set: function(e) {
+ this._view = e;
+ }
+ },
+ /**
+ * Gets the default view.
+ * @memberof Scene.prototype
+ *
+ * @type {View}
+ * @readonly
+ *
+ * @private
+ */
+ defaultView: {
+ get: function() {
+ return this._defaultView;
+ }
+ },
+ /**
+ * Gets picking functions and state
+ * @memberof Scene.prototype
+ *
+ * @type {Picking}
+ * @readonly
+ *
+ * @private
+ */
+ picking: {
+ get: function() {
+ return this._picking;
+ }
+ },
+ /**
+ * Gets the controller for camera input handling.
+ * @memberof Scene.prototype
+ *
+ * @type {ScreenSpaceCameraController}
+ * @readonly
+ */
+ screenSpaceCameraController: {
+ get: function() {
+ return this._screenSpaceCameraController;
+ }
+ },
+ /**
+ * Get the map projection to use in 2D and Columbus View modes.
+ * @memberof Scene.prototype
+ *
+ * @type {MapProjection}
+ * @readonly
+ *
+ * @default new GeographicProjection()
+ */
+ mapProjection: {
+ get: function() {
+ return this._mapProjection;
+ }
+ },
+ /**
+ * Gets the job scheduler
+ * @memberof Scene.prototype
+ * @type {JobScheduler}
+ * @readonly
+ *
+ * @private
+ */
+ jobScheduler: {
+ get: function() {
+ return this._jobScheduler;
+ }
+ },
+ /**
+ * Gets state information about the current scene. If called outside of a primitive's update
+ * function, the previous frame's state is returned.
+ * @memberof Scene.prototype
+ *
+ * @type {FrameState}
+ * @readonly
+ *
+ * @private
+ */
+ frameState: {
+ get: function() {
+ return this._frameState;
+ }
+ },
+ /**
+ * Gets the environment state.
+ * @memberof Scene.prototype
+ *
+ * @type {EnvironmentState}
+ * @readonly
+ *
+ * @private
+ */
+ environmentState: {
+ get: function() {
+ return this._environmentState;
+ }
+ },
+ /**
+ * Gets the collection of tweens taking place in the scene.
+ * @memberof Scene.prototype
+ *
+ * @type {TweenCollection}
+ * @readonly
+ *
+ * @private
+ */
+ tweens: {
+ get: function() {
+ return this._tweens;
+ }
+ },
+ /**
+ * Gets the collection of image layers that will be rendered on the globe.
+ * @memberof Scene.prototype
+ *
+ * @type {ImageryLayerCollection}
+ * @readonly
+ */
+ imageryLayers: {
+ get: function() {
+ if (defined(this.globe))
+ return this.globe.imageryLayers;
+ }
+ },
+ /**
+ * The terrain provider providing surface geometry for the globe.
+ * @memberof Scene.prototype
+ *
+ * @type {TerrainProvider}
+ */
+ terrainProvider: {
+ get: function() {
+ if (defined(this.globe))
+ return this.globe.terrainProvider;
+ },
+ set: function(e) {
+ this._removeTerrainProviderReadyListener = this._removeTerrainProviderReadyListener && this._removeTerrainProviderReadyListener(), defined(this.globe) && (this.globe.terrainProvider = e);
+ }
+ },
+ /**
+ * Gets an event that's raised when the terrain provider is changed
+ * @memberof Scene.prototype
+ *
+ * @type {Event}
+ * @readonly
+ */
+ terrainProviderChanged: {
+ get: function() {
+ if (defined(this.globe))
+ return this.globe.terrainProviderChanged;
+ }
+ },
+ /**
+ * Gets the event that will be raised before the scene is updated or rendered. Subscribers to the event
+ * receive the Scene instance as the first parameter and the current time as the second parameter.
+ * @memberof Scene.prototype
+ *
+ * @see {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}
+ * @see Scene#postUpdate
+ * @see Scene#preRender
+ * @see Scene#postRender
+ *
+ * @type {Event}
+ * @readonly
+ */
+ preUpdate: {
+ get: function() {
+ return this._preUpdate;
+ }
+ },
+ /**
+ * Gets the event that will be raised immediately after the scene is updated and before the scene is rendered.
+ * Subscribers to the event receive the Scene instance as the first parameter and the current time as the second
+ * parameter.
+ * @memberof Scene.prototype
+ *
+ * @see {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}
+ * @see Scene#preUpdate
+ * @see Scene#preRender
+ * @see Scene#postRender
+ *
+ * @type {Event}
+ * @readonly
+ */
+ postUpdate: {
+ get: function() {
+ return this._postUpdate;
+ }
+ },
+ /**
+ * Gets the event that will be raised when an error is thrown inside the render function.
+ * The Scene instance and the thrown error are the only two parameters passed to the event handler.
+ * By default, errors are not rethrown after this event is raised, but that can be changed by setting
+ * the rethrowRenderErrors property.
+ * @memberof Scene.prototype
+ *
+ * @type {Event}
+ * @readonly
+ */
+ renderError: {
+ get: function() {
+ return this._renderError;
+ }
+ },
+ /**
+ * Gets the event that will be raised after the scene is updated and immediately before the scene is rendered.
+ * Subscribers to the event receive the Scene instance as the first parameter and the current time as the second
+ * parameter.
+ * @memberof Scene.prototype
+ *
+ * @see {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}
+ * @see Scene#preUpdate
+ * @see Scene#postUpdate
+ * @see Scene#postRender
+ *
+ * @type {Event}
+ * @readonly
+ */
+ preRender: {
+ get: function() {
+ return this._preRender;
+ }
+ },
+ /**
+ * Gets the event that will be raised immediately after the scene is rendered. Subscribers to the event
+ * receive the Scene instance as the first parameter and the current time as the second parameter.
+ * @memberof Scene.prototype
+ *
+ * @see {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}
+ * @see Scene#preUpdate
+ * @see Scene#postUpdate
+ * @see Scene#postRender
+ *
+ * @type {Event}
+ * @readonly
+ */
+ postRender: {
+ get: function() {
+ return this._postRender;
+ }
+ },
+ /**
+ * Gets the simulation time when the scene was last rendered. Returns undefined if the scene has not yet been
+ * rendered.
+ * @memberof Scene.prototype
+ *
+ * @type {JulianDate}
+ * @readonly
+ */
+ lastRenderTime: {
+ get: function() {
+ return this._lastRenderTime;
+ }
+ },
+ /**
+ * @memberof Scene.prototype
+ * @private
+ * @readonly
+ */
+ context: {
+ get: function() {
+ return this._context;
+ }
+ },
+ /**
+ * This property is for debugging only; it is not for production use.
+ *
+ * When {@link Scene.debugShowFrustums} is true, this contains
+ * properties with statistics about the number of command execute per frustum.
+ * totalCommands is the total number of commands executed, ignoring
+ * overlap. commandsInFrustums is an array with the number of times
+ * commands are executed redundantly, e.g., how many commands overlap two or
+ * three frustums.
+ *
true, splits the scene into two viewports with steroscopic views for the left and right eyes.
+ * Used for cardboard and WebVR.
+ * @memberof Scene.prototype
+ * @type {boolean}
+ * @default false
+ */
+ useWebVR: {
+ get: function() {
+ return this._useWebVR;
+ },
+ set: function(e) {
+ this._useWebVR = e, this._useWebVR ? (this._frameState.creditDisplay.container.style.visibility = "hidden", this._cameraVR = new Camera(this), defined(this._deviceOrientationCameraController) || (this._deviceOrientationCameraController = new DeviceOrientationCameraController(
+ this
+ )), this._aspectRatioVR = this.camera.frustum.aspectRatio) : (this._frameState.creditDisplay.container.style.visibility = "visible", this._cameraVR = void 0, this._deviceOrientationCameraController = this._deviceOrientationCameraController && !this._deviceOrientationCameraController.isDestroyed() && this._deviceOrientationCameraController.destroy(), this.camera.frustum.aspectRatio = this._aspectRatioVR, this.camera.frustum.xOffset = 0);
+ }
+ },
+ /**
+ * Determines if the 2D map is rotatable or can be scrolled infinitely in the horizontal direction.
+ * @memberof Scene.prototype
+ * @type {MapMode2D}
+ * @readonly
+ */
+ mapMode2D: {
+ get: function() {
+ return this._mapMode2D;
+ }
+ },
+ /**
+ * Gets or sets the position of the splitter within the viewport. Valid values are between 0.0 and 1.0.
+ * @memberof Scene.prototype
+ *
+ * @type {number}
+ */
+ splitPosition: {
+ get: function() {
+ return this._frameState.splitPosition;
+ },
+ set: function(e) {
+ this._frameState.splitPosition = e;
+ }
+ },
+ /**
+ * The distance from the camera at which to disable the depth test of billboards, labels and points
+ * to, for example, prevent clipping against terrain. When set to zero, the depth test should always
+ * be applied. When less than zero, the depth test should never be applied. Setting the disableDepthTestDistance
+ * property of a billboard, label or point will override this value.
+ * @memberof Scene.prototype
+ * @type {number}
+ * @default 0.0
+ */
+ minimumDisableDepthTestDistance: {
+ get: function() {
+ return this._minimumDisableDepthTestDistance;
+ },
+ set: function(e) {
+ this._minimumDisableDepthTestDistance = e;
+ }
+ },
+ /**
+ * Whether or not to use a logarithmic depth buffer. Enabling this option will allow for less frustums in the multi-frustum,
+ * increasing performance. This property relies on fragmentDepth being supported.
+ * @memberof Scene.prototype
+ * @type {boolean}
+ */
+ logarithmicDepthBuffer: {
+ get: function() {
+ return this._logDepthBuffer;
+ },
+ set: function(e) {
+ e = this._context.fragmentDepth && e, this._logDepthBuffer !== e && (this._logDepthBuffer = e, this._logDepthBufferDirty = !0);
+ }
+ },
+ /**
+ * The value used for gamma correction. This is only used when rendering with high dynamic range.
+ * @memberof Scene.prototype
+ * @type {number}
+ * @default 2.2
+ */
+ gamma: {
+ get: function() {
+ return this._context.uniformState.gamma;
+ },
+ set: function(e) {
+ this._context.uniformState.gamma = e;
+ }
+ },
+ /**
+ * Whether or not to use high dynamic range rendering.
+ * @memberof Scene.prototype
+ * @type {boolean}
+ * @default false
+ */
+ highDynamicRange: {
+ get: function() {
+ return this._hdr;
+ },
+ set: function(e) {
+ const t = this._context, n = e && t.depthTexture && (t.colorBufferFloat || t.colorBufferHalfFloat);
+ this._hdrDirty = n !== this._hdr, this._hdr = n;
+ }
+ },
+ /**
+ * Whether or not high dynamic range rendering is supported.
+ * @memberof Scene.prototype
+ * @type {boolean}
+ * @readonly
+ * @default true
+ */
+ highDynamicRangeSupported: {
+ get: function() {
+ const e = this._context;
+ return e.depthTexture && (e.colorBufferFloat || e.colorBufferHalfFloat);
+ }
+ },
+ /**
+ * Whether or not the camera is underneath the globe.
+ * @memberof Scene.prototype
+ * @type {boolean}
+ * @readonly
+ * @default false
+ */
+ cameraUnderground: {
+ get: function() {
+ return this._cameraUnderground;
+ }
+ },
+ /**
+ * The sample rate of multisample antialiasing (values greater than 1 enable MSAA).
+ * @memberof Scene.prototype
+ * @type {number}
+ * @default 4
+ */
+ msaaSamples: {
+ get: function() {
+ return this._msaaSamples;
+ },
+ set: function(e) {
+ e = Math.min(e, ContextLimits.maximumSamples), this._msaaSamples = e;
+ }
+ },
+ /**
+ * Returns true if the Scene's context supports MSAA.
+ * @memberof Scene.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ msaaSupported: {
+ get: function() {
+ return this._context.msaa;
+ }
+ },
+ /**
+ * Ratio between a pixel and a density-independent pixel. Provides a standard unit of
+ * measure for real pixel measurements appropriate to a particular device.
+ *
+ * @memberof Scene.prototype
+ * @type {number}
+ * @default 1.0
+ * @private
+ */
+ pixelRatio: {
+ get: function() {
+ return this._frameState.pixelRatio;
+ },
+ set: function(e) {
+ this._frameState.pixelRatio = e;
+ }
+ },
+ /**
+ * @private
+ */
+ opaqueFrustumNearOffset: {
+ get: function() {
+ return 0.9999;
+ }
+ },
+ /**
+ * @private
+ */
+ globeHeight: {
+ get: function() {
+ return this._globeHeight;
+ }
+ }
+});
+Scene.prototype.getCompressedTextureFormatSupported = function(e) {
+ const t = this.context;
+ return (e === "WEBGL_compressed_texture_s3tc" || e === "s3tc") && t.s3tc || (e === "WEBGL_compressed_texture_pvrtc" || e === "pvrtc") && t.pvrtc || (e === "WEBGL_compressed_texture_etc" || e === "etc") && t.etc || (e === "WEBGL_compressed_texture_etc1" || e === "etc1") && t.etc1 || (e === "WEBGL_compressed_texture_astc" || e === "astc") && t.astc || (e === "EXT_texture_compression_bptc" || e === "bc7") && t.bc7;
+};
+function updateDerivedCommands(e, t, n) {
+ const i = e._frameState, r = e._context, o = e._view.oit, s = i.shadowState.lightShadowMaps, c = i.shadowState.lightShadowsEnabled;
+ let l = t.derivedCommands;
+ defined(t.pickId) && (l.picking = DerivedCommand.createPickDerivedCommand(
+ e,
+ t,
+ r,
+ l.picking
+ )), t.pickOnly || (l.depth = DerivedCommand.createDepthOnlyDerivedCommand(
+ e,
+ t,
+ r,
+ l.depth
+ )), l.originalCommand = t, e._hdr && (l.hdr = DerivedCommand.createHdrCommand(
+ t,
+ r,
+ l.hdr
+ ), t = l.hdr.command, l = t.derivedCommands), c && t.receiveShadows && (l.shadows = ShadowMap.createReceiveDerivedCommand(
+ s,
+ t,
+ n,
+ r,
+ l.shadows
+ )), t.pass === Pass$1.TRANSLUCENT && defined(o) && o.isSupported() && (c && t.receiveShadows ? (l.oit = defined(l.oit) ? l.oit : {}, l.oit.shadows = o.createDerivedCommands(
+ l.shadows.receiveCommand,
+ r,
+ l.oit.shadows
+ )) : l.oit = o.createDerivedCommands(
+ t,
+ r,
+ l.oit
+ ));
+}
+Scene.prototype.updateDerivedCommands = function(e) {
+ if (!defined(e.derivedCommands))
+ return;
+ const t = this._frameState, n = this._context;
+ let i = !1;
+ const r = t.shadowState.lastDirtyTime;
+ e.lastDirtyTime !== r && (e.lastDirtyTime = r, e.dirty = !0, i = !0);
+ const o = t.useLogDepth, s = this._hdr, c = e.derivedCommands, l = defined(c.logDepth), d = defined(c.hdr), f = defined(c.originalCommand), h = o && !l, p = s && !d, m = (!o || !s) && !f;
+ if (e.dirty = e.dirty || h || p || m, e.dirty) {
+ e.dirty = !1;
+ const _ = t.shadowState.shadowMaps;
+ t.shadowState.shadowsEnabled && e.castShadows && (c.shadows = ShadowMap.createCastDerivedCommand(
+ _,
+ e,
+ i,
+ n,
+ c.shadows
+ )), (l || h) && (c.logDepth = DerivedCommand.createLogDepthCommand(
+ e,
+ n,
+ c.logDepth
+ ), updateDerivedCommands(
+ this,
+ c.logDepth.command,
+ i
+ )), (f || m) && updateDerivedCommands(this, e, i);
+ }
+};
+const renderTilesetPassState = new Cesium3DTilePassState({
+ pass: Cesium3DTilePass$1.RENDER
+}), preloadTilesetPassState = new Cesium3DTilePassState({
+ pass: Cesium3DTilePass$1.PRELOAD
+}), preloadFlightTilesetPassState = new Cesium3DTilePassState({
+ pass: Cesium3DTilePass$1.PRELOAD_FLIGHT
+}), requestRenderModeDeferCheckPassState = new Cesium3DTilePassState({
+ pass: Cesium3DTilePass$1.REQUEST_RENDER_MODE_DEFER_CHECK
+}), scratchOccluderBoundingSphere = new BoundingSphere();
+let scratchOccluder;
+function getOccluder(e) {
+ const t = e.globe;
+ if (e._mode === SceneMode$1.SCENE3D && defined(t) && t.show && !e._cameraUnderground && !e._globeTranslucencyState.translucent) {
+ const n = e.ellipsoid, i = e.frameState.minimumTerrainHeight;
+ return scratchOccluderBoundingSphere.radius = n.minimumRadius + i, scratchOccluder = Occluder.fromBoundingSphere(
+ scratchOccluderBoundingSphere,
+ e.camera.positionWC,
+ scratchOccluder
+ ), scratchOccluder;
+ }
+}
+Scene.prototype.clearPasses = function(e) {
+ e.render = !1, e.pick = !1, e.pickVoxel = !1, e.depth = !1, e.postProcess = !1, e.offscreen = !1;
+};
+function updateFrameNumber(e, t, n) {
+ const i = e._frameState;
+ i.frameNumber = t, i.time = JulianDate.clone(n, i.time);
+}
+Scene.prototype.updateFrameState = function() {
+ const e = this.camera, t = this._frameState;
+ t.commandList.length = 0, t.shadowMaps.length = 0, t.brdfLutGenerator = this._brdfLutGenerator, t.environmentMap = this.skyBox && this.skyBox._cubeMap, t.mode = this._mode, t.morphTime = this.morphTime, t.mapProjection = this.mapProjection, t.camera = e, t.cullingVolume = e.frustum.computeCullingVolume(
+ e.positionWC,
+ e.directionWC,
+ e.upWC
+ ), t.occluder = getOccluder(this), t.minimumTerrainHeight = 0, t.minimumDisableDepthTestDistance = this._minimumDisableDepthTestDistance, t.invertClassification = this.invertClassification, t.useLogDepth = this._logDepthBuffer && !(this.camera.frustum instanceof OrthographicFrustum || this.camera.frustum instanceof OrthographicOffCenterFrustum), t.light = this.light, t.cameraUnderground = this._cameraUnderground, t.globeTranslucencyState = this._globeTranslucencyState;
+ const { globe: n } = this;
+ defined(n) && n._terrainExaggerationChanged && (this.verticalExaggeration = n._terrainExaggeration, this.verticalExaggerationRelativeHeight = n._terrainExaggerationRelativeHeight, n._terrainExaggerationChanged = !1), t.verticalExaggeration = this.verticalExaggeration, t.verticalExaggerationRelativeHeight = this.verticalExaggerationRelativeHeight, defined(this._specularEnvironmentCubeMap) && this._specularEnvironmentCubeMap.ready ? (t.specularEnvironmentMaps = this._specularEnvironmentCubeMap.texture, t.specularEnvironmentMapsMaximumLOD = this._specularEnvironmentCubeMap.maximumMipmapLevel) : (t.specularEnvironmentMaps = void 0, t.specularEnvironmentMapsMaximumLOD = void 0), t.sphericalHarmonicCoefficients = this.sphericalHarmonicCoefficients, this._actualInvertClassificationColor = Color.clone(
+ this.invertClassificationColor,
+ this._actualInvertClassificationColor
+ ), InvertClassification.isTranslucencySupported(this._context) || (this._actualInvertClassificationColor.alpha = 1), t.invertClassificationColor = this._actualInvertClassificationColor, defined(this.globe) ? t.maximumScreenSpaceError = this.globe.maximumScreenSpaceError : t.maximumScreenSpaceError = 2, this.clearPasses(t.passes), t.tilesetPassState = void 0;
+};
+Scene.prototype.isVisible = function(e, t, n) {
+ return defined(e) && (!defined(e.boundingVolume) || !e.cull || t.computeVisibility(e.boundingVolume) !== Intersect$1.OUTSIDE && (!defined(n) || !e.occlude || !e.boundingVolume.isOccluded(n)));
+};
+let transformFrom2D = new Matrix4(
+ 0,
+ 0,
+ 1,
+ 0,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1
+);
+transformFrom2D = Matrix4.inverseTransformation(
+ transformFrom2D,
+ transformFrom2D
+);
+function debugShowBoundingVolume(e, t, n, i) {
+ const r = t._frameState, o = r.context, s = e.boundingVolume;
+ defined(t._debugVolume) && t._debugVolume.destroy();
+ let c, l = Cartesian3.clone(s.center);
+ if (r.mode !== SceneMode$1.SCENE3D) {
+ l = Matrix4.multiplyByPoint(transformFrom2D, l, l);
+ const p = r.mapProjection, m = p.unproject(l);
+ l = p.ellipsoid.cartographicToCartesian(m);
+ }
+ if (defined(s.radius)) {
+ const p = s.radius;
+ c = GeometryPipeline.toWireframe(
+ EllipsoidGeometry.createGeometry(
+ new EllipsoidGeometry({
+ radii: new Cartesian3(p, p, p),
+ vertexFormat: PerInstanceColorAppearance.FLAT_VERTEX_FORMAT
+ })
+ )
+ ), t._debugVolume = new Primitive$3({
+ geometryInstances: new GeometryInstance({
+ geometry: c,
+ modelMatrix: Matrix4.fromTranslation(l),
+ attributes: {
+ color: new ColorGeometryInstanceAttribute(1, 0, 0, 1)
+ }
+ }),
+ appearance: new PerInstanceColorAppearance({
+ flat: !0,
+ translucent: !1
+ }),
+ asynchronous: !1
+ });
+ } else {
+ const p = s.halfAxes;
+ c = GeometryPipeline.toWireframe(
+ BoxGeometry.createGeometry(
+ BoxGeometry.fromDimensions({
+ dimensions: new Cartesian3(2, 2, 2),
+ vertexFormat: PerInstanceColorAppearance.FLAT_VERTEX_FORMAT
+ })
+ )
+ ), t._debugVolume = new Primitive$3({
+ geometryInstances: new GeometryInstance({
+ geometry: c,
+ modelMatrix: Matrix4.fromRotationTranslation(
+ p,
+ l,
+ new Matrix4()
+ ),
+ attributes: {
+ color: new ColorGeometryInstanceAttribute(1, 0, 0, 1)
+ }
+ }),
+ appearance: new PerInstanceColorAppearance({
+ flat: !0,
+ translucent: !1
+ }),
+ asynchronous: !1
+ });
+ }
+ const d = r.commandList, f = r.commandList = [];
+ t._debugVolume.update(r), e = f[0], r.useLogDepth && (e = DerivedCommand.createLogDepthCommand(e, o).command);
+ let h;
+ defined(i) && (h = n.framebuffer, n.framebuffer = i), e.execute(o, n), defined(h) && (n.framebuffer = h), r.commandList = d;
+}
+function executeCommand(e, t, n, i, r) {
+ const o = t._frameState;
+ if (defined(t.debugCommandFilter) && !t.debugCommandFilter(e))
+ return;
+ if (e instanceof ClearCommand) {
+ e.execute(n, i);
+ return;
+ }
+ e.debugShowBoundingVolume && defined(e.boundingVolume) && debugShowBoundingVolume(e, t, i, r), o.useLogDepth && defined(e.derivedCommands.logDepth) && (e = e.derivedCommands.logDepth.command);
+ const s = o.passes;
+ if (!s.pick && !s.pickVoxel && !s.depth && t._hdr && defined(e.derivedCommands) && defined(e.derivedCommands.hdr) && (e = e.derivedCommands.hdr.command), s.pick || s.depth) {
+ if (s.pick && !s.depth && defined(e.derivedCommands.picking)) {
+ e = e.derivedCommands.picking.pickCommand, e.execute(n, i);
+ return;
+ } else if (defined(e.derivedCommands.depth)) {
+ e = e.derivedCommands.depth.depthOnlyCommand, e.execute(n, i);
+ return;
+ }
+ }
+ if (t.debugShowCommands || t.debugShowFrustums) {
+ t._debugInspector.executeDebugShowFrustumsCommand(
+ t,
+ e,
+ i
+ );
+ return;
+ }
+ o.shadowState.lightShadowsEnabled && e.receiveShadows && defined(e.derivedCommands.shadows) ? e.derivedCommands.shadows.receiveCommand.execute(n, i) : e.execute(n, i);
+}
+function executeIdCommand(e, t, n, i) {
+ const r = t._frameState;
+ let o = e.derivedCommands;
+ defined(o) && (r.useLogDepth && defined(o.logDepth) && (e = o.logDepth.command), o = e.derivedCommands, defined(o.picking) ? (e = o.picking.pickCommand, e.execute(n, i)) : defined(o.depth) && (e = o.depth.depthOnlyCommand, e.execute(n, i)));
+}
+function backToFront(e, t, n) {
+ return t.boundingVolume.distanceSquaredTo(n) - e.boundingVolume.distanceSquaredTo(n);
+}
+function frontToBack(e, t, n) {
+ return e.boundingVolume.distanceSquaredTo(n) - t.boundingVolume.distanceSquaredTo(n) + CesiumMath.EPSILON12;
+}
+function executeTranslucentCommandsBackToFront(e, t, n, i, r) {
+ const o = e.context;
+ mergeSort(i, backToFront, e.camera.positionWC), defined(r) && t(
+ r.unclassifiedCommand,
+ e,
+ o,
+ n
+ );
+ const s = i.length;
+ for (let c = 0; c < s; ++c)
+ t(i[c], e, o, n);
+}
+function executeTranslucentCommandsFrontToBack(e, t, n, i, r) {
+ const o = e.context;
+ mergeSort(i, frontToBack, e.camera.positionWC), defined(r) && t(
+ r.unclassifiedCommand,
+ e,
+ o,
+ n
+ );
+ const s = i.length;
+ for (let c = 0; c < s; ++c)
+ t(i[c], e, o, n);
+}
+function executeVoxelCommands(e, t, n, i) {
+ const r = e.context;
+ mergeSort(i, backToFront, e.camera.positionWC);
+ const o = i.length;
+ for (let s = 0; s < o; ++s)
+ t(i[s], e, r, n);
+}
+const scratchPerspectiveFrustum = new PerspectiveFrustum(), scratchPerspectiveOffCenterFrustum = new PerspectiveOffCenterFrustum(), scratchOrthographicFrustum = new OrthographicFrustum(), scratchOrthographicOffCenterFrustum = new OrthographicOffCenterFrustum();
+function executeCommands(e, t) {
+ const { camera: n, context: i, frameState: r } = e, { uniformState: o } = i;
+ o.updateCamera(n);
+ let s;
+ defined(n.frustum.fov) ? s = n.frustum.clone(scratchPerspectiveFrustum) : defined(n.frustum.infiniteProjectionMatrix) ? s = n.frustum.clone(scratchPerspectiveOffCenterFrustum) : defined(n.frustum.width) ? s = n.frustum.clone(scratchOrthographicFrustum) : s = n.frustum.clone(scratchOrthographicOffCenterFrustum), s.near = n.frustum.near, s.far = n.frustum.far, o.updateFrustum(s), o.updatePass(Pass$1.ENVIRONMENT);
+ const c = r.passes, l = c.pick || c.pickVoxel, d = e._environmentState, f = e._view, h = d.renderTranslucentDepthForPick, p = d.useWebVR;
+ if (!l) {
+ const L = d.skyBoxCommand;
+ if (defined(L) && executeCommand(L, e, i, t), d.isSkyAtmosphereVisible && executeCommand(
+ d.skyAtmosphereCommand,
+ e,
+ i,
+ t
+ ), d.isSunVisible && (d.sunDrawCommand.execute(i, t), e.sunBloom && !p)) {
+ let g;
+ d.useGlobeDepthFramebuffer ? g = f.globeDepth.framebuffer : d.usePostProcess ? g = f.sceneFramebuffer.framebuffer : g = d.originalFramebuffer, e._sunPostProcess.execute(i), e._sunPostProcess.copy(i, g), t.framebuffer = g;
+ }
+ d.isMoonVisible && d.moonCommand.execute(i, t);
+ }
+ let m;
+ d.useOIT ? (defined(e._executeOITFunction) || (e._executeOITFunction = function(L, g, w, O, N) {
+ f.globeDepth.prepareColorTextures(i), f.oit.executeCommands(
+ L,
+ g,
+ w,
+ O,
+ N
+ );
+ }), m = e._executeOITFunction) : c.render ? m = executeTranslucentCommandsBackToFront : m = executeTranslucentCommandsFrontToBack;
+ const _ = f.frustumCommandsList, y = _.length, C = d.clearGlobeDepth, T = d.useDepthPlane, x = e._globeTranslucencyState, b = x.translucent, S = e._view.globeTranslucencyFramebuffer, E = e._depthClearCommand, A = e._stencilClearCommand, D = e._classificationStencilClearCommand, P = e._depthPlane, I = d.usePostProcessSelected, M = n.position.z;
+ let R;
+ for (let L = 0; L < y; ++L) {
+ const g = y - L - 1, w = _[g];
+ e.mode === SceneMode$1.SCENE2D ? (n.position.z = M - w.near + 1, s.far = Math.max(1, w.far - w.near), s.near = 1, o.update(r), o.updateFrustum(s)) : (s.near = g !== 0 ? w.near * e.opaqueFrustumNearOffset : w.near, s.far = w.far, o.updateFrustum(s)), E.execute(i, t), i.stencilBuffer && A.execute(i, t), o.updatePass(Pass$1.GLOBE);
+ let O = w.commands[Pass$1.GLOBE], N = w.indices[Pass$1.GLOBE];
+ if (b)
+ x.executeGlobeCommands(
+ w,
+ executeCommand,
+ S,
+ e,
+ t
+ );
+ else
+ for (R = 0; R < N; ++R)
+ executeCommand(O[R], e, i, t);
+ const F = f.globeDepth;
+ if (defined(F) && d.useGlobeDepthFramebuffer && F.executeCopyDepth(i, t), !d.renderTranslucentDepthForPick)
+ if (o.updatePass(Pass$1.TERRAIN_CLASSIFICATION), O = w.commands[Pass$1.TERRAIN_CLASSIFICATION], N = w.indices[Pass$1.TERRAIN_CLASSIFICATION], b)
+ x.executeGlobeClassificationCommands(
+ w,
+ executeCommand,
+ S,
+ e,
+ t
+ );
+ else
+ for (R = 0; R < N; ++R)
+ executeCommand(O[R], e, i, t);
+ if (C && (E.execute(i, t), T && P.execute(i, t)), !d.useInvertClassification || l || d.renderTranslucentDepthForPick) {
+ for (o.updatePass(Pass$1.CESIUM_3D_TILE), O = w.commands[Pass$1.CESIUM_3D_TILE], N = w.indices[Pass$1.CESIUM_3D_TILE], R = 0; R < N; ++R)
+ executeCommand(O[R], e, i, t);
+ if (N > 0 && (defined(F) && d.useGlobeDepthFramebuffer && (F.prepareColorTextures(i, C), F.executeUpdateDepth(
+ i,
+ t,
+ C,
+ F.depthStencilTexture
+ )), !d.renderTranslucentDepthForPick))
+ for (o.updatePass(Pass$1.CESIUM_3D_TILE_CLASSIFICATION), O = w.commands[Pass$1.CESIUM_3D_TILE_CLASSIFICATION], N = w.indices[Pass$1.CESIUM_3D_TILE_CLASSIFICATION], R = 0; R < N; ++R)
+ executeCommand(O[R], e, i, t);
+ } else {
+ e._invertClassification.clear(i, t);
+ const k = t.framebuffer;
+ for (t.framebuffer = e._invertClassification._fbo.framebuffer, o.updatePass(Pass$1.CESIUM_3D_TILE), O = w.commands[Pass$1.CESIUM_3D_TILE], N = w.indices[Pass$1.CESIUM_3D_TILE], R = 0; R < N; ++R)
+ executeCommand(O[R], e, i, t);
+ for (defined(F) && d.useGlobeDepthFramebuffer && (e._invertClassification.prepareTextures(i), F.executeUpdateDepth(
+ i,
+ t,
+ C,
+ e._invertClassification._fbo.getDepthStencilTexture()
+ )), o.updatePass(Pass$1.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW), O = w.commands[Pass$1.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW], N = w.indices[Pass$1.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW], R = 0; R < N; ++R)
+ executeCommand(O[R], e, i, t);
+ for (t.framebuffer = k, e._invertClassification.executeClassified(i, t), r.invertClassificationColor.alpha === 1 && e._invertClassification.executeUnclassified(i, t), N > 0 && i.stencilBuffer && D.execute(i, t), o.updatePass(Pass$1.CESIUM_3D_TILE_CLASSIFICATION), O = w.commands[Pass$1.CESIUM_3D_TILE_CLASSIFICATION], N = w.indices[Pass$1.CESIUM_3D_TILE_CLASSIFICATION], R = 0; R < N; ++R)
+ executeCommand(O[R], e, i, t);
+ }
+ for (N > 0 && i.stencilBuffer && A.execute(i, t), o.updatePass(Pass$1.VOXELS), O = w.commands[Pass$1.VOXELS], N = w.indices[Pass$1.VOXELS], O.length = N, executeVoxelCommands(e, executeCommand, t, O), o.updatePass(Pass$1.OPAQUE), O = w.commands[Pass$1.OPAQUE], N = w.indices[Pass$1.OPAQUE], R = 0; R < N; ++R)
+ executeCommand(O[R], e, i, t);
+ g !== 0 && e.mode !== SceneMode$1.SCENE2D && (s.near = w.near, o.updateFrustum(s));
+ let B;
+ if (!l && d.useInvertClassification && r.invertClassificationColor.alpha < 1 && (B = e._invertClassification), o.updatePass(Pass$1.TRANSLUCENT), O = w.commands[Pass$1.TRANSLUCENT], O.length = w.indices[Pass$1.TRANSLUCENT], m(
+ e,
+ executeCommand,
+ t,
+ O,
+ B
+ ), w.indices[Pass$1.CESIUM_3D_TILE_CLASSIFICATION] > 0 && f.translucentTileClassification.isSupported() && (f.translucentTileClassification.executeTranslucentCommands(
+ e,
+ executeCommand,
+ t,
+ O,
+ F.depthStencilTexture
+ ), f.translucentTileClassification.executeClassificationCommands(
+ e,
+ executeCommand,
+ t,
+ w
+ )), i.depthTexture && e.useDepthPicking && (d.useGlobeDepthFramebuffer || h)) {
+ const k = F.depthStencilTexture, $ = e._picking.getPickDepth(e, g);
+ $.update(i, k), $.executeCopyDepth(i, t);
+ }
+ if (l || !I)
+ continue;
+ const U = t.framebuffer;
+ if (t.framebuffer = f.sceneFramebuffer.getIdFramebuffer(), s.near = g !== 0 ? w.near * e.opaqueFrustumNearOffset : w.near, s.far = w.far, o.updateFrustum(s), o.updatePass(Pass$1.GLOBE), O = w.commands[Pass$1.GLOBE], N = w.indices[Pass$1.GLOBE], b)
+ x.executeGlobeCommands(
+ w,
+ executeIdCommand,
+ S,
+ e,
+ t
+ );
+ else
+ for (R = 0; R < N; ++R)
+ executeIdCommand(O[R], e, i, t);
+ for (C && (E.framebuffer = t.framebuffer, E.execute(i, t), E.framebuffer = void 0), C && T && P.execute(i, t), o.updatePass(Pass$1.CESIUM_3D_TILE), O = w.commands[Pass$1.CESIUM_3D_TILE], N = w.indices[Pass$1.CESIUM_3D_TILE], R = 0; R < N; ++R)
+ executeIdCommand(O[R], e, i, t);
+ for (o.updatePass(Pass$1.OPAQUE), O = w.commands[Pass$1.OPAQUE], N = w.indices[Pass$1.OPAQUE], R = 0; R < N; ++R)
+ executeIdCommand(O[R], e, i, t);
+ for (o.updatePass(Pass$1.TRANSLUCENT), O = w.commands[Pass$1.TRANSLUCENT], N = w.indices[Pass$1.TRANSLUCENT], R = 0; R < N; ++R)
+ executeIdCommand(O[R], e, i, t);
+ t.framebuffer = U;
+ }
+}
+function executeComputeCommands(e) {
+ e.context.uniformState.updatePass(Pass$1.COMPUTE);
+ const n = e._environmentState.sunComputeCommand;
+ defined(n) && n.execute(e._computeEngine);
+ const i = e._computeCommandList, r = i.length;
+ for (let o = 0; o < r; ++o)
+ i[o].execute(e._computeEngine);
+}
+function executeOverlayCommands(e, t) {
+ e.context.uniformState.updatePass(Pass$1.OVERLAY);
+ const i = e.context, r = e._overlayCommandList, o = r.length;
+ for (let s = 0; s < o; ++s)
+ r[s].execute(i, t);
+}
+function insertShadowCastCommands(e, t, n) {
+ const i = n.shadowMapCullingVolume, r = n.isPointLight, o = n.passes, s = o.length, c = t.length;
+ for (let l = 0; l < c; ++l) {
+ const d = t[l];
+ if (e.updateDerivedCommands(d), d.castShadows && (d.pass === Pass$1.GLOBE || d.pass === Pass$1.CESIUM_3D_TILE || d.pass === Pass$1.OPAQUE || d.pass === Pass$1.TRANSLUCENT) && e.isVisible(d, i))
+ if (r)
+ for (let f = 0; f < s; ++f)
+ o[f].commandList.push(d);
+ else if (s === 1)
+ o[0].commandList.push(d);
+ else {
+ let f = !1;
+ for (let h = s - 1; h >= 0; --h) {
+ const p = o[h].cullingVolume;
+ if (e.isVisible(d, p))
+ o[h].commandList.push(d), f = !0;
+ else if (f)
+ break;
+ }
+ }
+ }
+}
+function executeShadowMapCastCommands(e) {
+ const t = e.frameState, n = t.shadowState.shadowMaps, i = n.length;
+ if (!t.shadowState.shadowsEnabled)
+ return;
+ const r = e.context, o = r.uniformState;
+ for (let s = 0; s < i; ++s) {
+ const c = n[s];
+ if (c.outOfView)
+ continue;
+ const l = c.passes, d = l.length;
+ for (let h = 0; h < d; ++h)
+ l[h].commandList.length = 0;
+ const f = e.frameState.commandList;
+ insertShadowCastCommands(e, f, c);
+ for (let h = 0; h < d; ++h) {
+ const p = c.passes[h];
+ o.updateCamera(p.camera), c.updatePass(r, h);
+ const m = p.commandList.length;
+ for (let _ = 0; _ < m; ++_) {
+ const y = p.commandList[_];
+ o.updatePass(y.pass), executeCommand(
+ y.derivedCommands.shadows.castCommands[s],
+ e,
+ r,
+ p.passState
+ );
+ }
+ }
+ }
+}
+const scratchEyeTranslation = new Cartesian3();
+Scene.prototype.updateAndExecuteCommands = function(e, t) {
+ const i = this._frameState.mode;
+ this._environmentState.useWebVR ? executeWebVRCommands(this, e, t) : i !== SceneMode$1.SCENE2D || this._mapMode2D === MapMode2D$1.ROTATE ? executeCommandsInViewport(!0, this, e, t) : (updateAndClearFramebuffers(this, e, t), execute2DViewportCommands(this, e));
+};
+function executeWebVRCommands(e, t, n) {
+ const i = e._view, r = i.camera, s = e._environmentState.renderTranslucentDepthForPick;
+ updateAndClearFramebuffers(e, t, n), updateAndRenderPrimitives(e), i.createPotentiallyVisibleSet(e), executeComputeCommands(e), s || executeShadowMapCastCommands(e);
+ const c = t.viewport;
+ c.x = 0, c.y = 0, c.width = c.width * 0.5;
+ const l = Camera.clone(r, e._cameraVR);
+ l.frustum = r.frustum;
+ const d = r.frustum.near, f = d * defaultValue(e.focalLength, 5), h = defaultValue(e.eyeSeparation, f / 30), p = Cartesian3.multiplyByScalar(
+ l.right,
+ h * 0.5,
+ scratchEyeTranslation
+ );
+ r.frustum.aspectRatio = c.width / c.height;
+ const m = 0.5 * h * d / f;
+ Cartesian3.add(l.position, p, r.position), r.frustum.xOffset = m, executeCommands(e, t), c.x = c.width, Cartesian3.subtract(l.position, p, r.position), r.frustum.xOffset = -m, executeCommands(e, t), Camera.clone(l, r);
+}
+const scratch2DViewportCartographic = new Cartographic(
+ Math.PI,
+ CesiumMath.PI_OVER_TWO
+), scratch2DViewportMaxCoord = new Cartesian3(), scratch2DViewportSavedPosition = new Cartesian3(), scratch2DViewportTransform = new Matrix4(), scratch2DViewportCameraTransform = new Matrix4(), scratch2DViewportEyePoint = new Cartesian3(), scratch2DViewportWindowCoords = new Cartesian3(), scratch2DViewport = new BoundingRectangle();
+function execute2DViewportCommands(e, t) {
+ const n = e.context, i = e.frameState, r = e.camera, o = t.viewport, s = BoundingRectangle.clone(o, scratch2DViewport);
+ t.viewport = s;
+ const c = scratch2DViewportCartographic, l = scratch2DViewportMaxCoord;
+ e.mapProjection.project(c, l);
+ const f = Cartesian3.clone(
+ r.position,
+ scratch2DViewportSavedPosition
+ ), h = Matrix4.clone(
+ r.transform,
+ scratch2DViewportCameraTransform
+ ), p = r.frustum.clone();
+ r._setTransform(Matrix4.IDENTITY);
+ const m = Matrix4.computeViewportTransformation(
+ s,
+ 0,
+ 1,
+ scratch2DViewportTransform
+ ), _ = r.frustum.projectionMatrix, y = r.positionWC.y, C = Cartesian3.fromElements(
+ CesiumMath.sign(y) * l.x - y,
+ 0,
+ -r.positionWC.x,
+ scratch2DViewportEyePoint
+ ), T = Transforms.pointToGLWindowCoordinates(
+ _,
+ m,
+ C,
+ scratch2DViewportWindowCoords
+ );
+ T.x = Math.floor(T.x);
+ const x = s.x, b = s.width;
+ if (y === 0 || T.x <= x || T.x >= x + b)
+ executeCommandsInViewport(!0, e, t);
+ else if (Math.abs(x + b * 0.5 - T.x) < 1)
+ s.width = T.x - s.x, r.position.x *= CesiumMath.sign(r.position.x), r.frustum.right = 0, i.cullingVolume = r.frustum.computeCullingVolume(
+ r.positionWC,
+ r.directionWC,
+ r.upWC
+ ), n.uniformState.update(i), executeCommandsInViewport(!0, e, t), s.x = T.x, r.position.x = -r.position.x, r.frustum.right = -r.frustum.left, r.frustum.left = 0, i.cullingVolume = r.frustum.computeCullingVolume(
+ r.positionWC,
+ r.directionWC,
+ r.upWC
+ ), n.uniformState.update(i), executeCommandsInViewport(!1, e, t);
+ else if (T.x > x + b * 0.5) {
+ s.width = T.x - x;
+ const S = r.frustum.right;
+ r.frustum.right = l.x - y, i.cullingVolume = r.frustum.computeCullingVolume(
+ r.positionWC,
+ r.directionWC,
+ r.upWC
+ ), n.uniformState.update(i), executeCommandsInViewport(!0, e, t), s.x = T.x, s.width = x + b - T.x, r.position.x = -r.position.x, r.frustum.left = -r.frustum.right, r.frustum.right = S - r.frustum.right * 2, i.cullingVolume = r.frustum.computeCullingVolume(
+ r.positionWC,
+ r.directionWC,
+ r.upWC
+ ), n.uniformState.update(i), executeCommandsInViewport(!1, e, t);
+ } else {
+ s.x = T.x, s.width = x + b - T.x;
+ const S = r.frustum.left;
+ r.frustum.left = -l.x - y, i.cullingVolume = r.frustum.computeCullingVolume(
+ r.positionWC,
+ r.directionWC,
+ r.upWC
+ ), n.uniformState.update(i), executeCommandsInViewport(!0, e, t), s.x = x, s.width = T.x - x, r.position.x = -r.position.x, r.frustum.right = -r.frustum.left, r.frustum.left = S - r.frustum.left * 2, i.cullingVolume = r.frustum.computeCullingVolume(
+ r.positionWC,
+ r.directionWC,
+ r.upWC
+ ), n.uniformState.update(i), executeCommandsInViewport(!1, e, t);
+ }
+ r._setTransform(h), Cartesian3.clone(f, r.position), r.frustum = p.clone(), t.viewport = o;
+}
+function executeCommandsInViewport(e, t, n, i) {
+ const r = t._environmentState, o = t._view, s = r.renderTranslucentDepthForPick;
+ e || (t.frameState.commandList.length = 0), updateAndRenderPrimitives(t), o.createPotentiallyVisibleSet(t), e && (defined(i) && updateAndClearFramebuffers(t, n, i), executeComputeCommands(t), s || executeShadowMapCastCommands(t)), executeCommands(t, n);
+}
+const scratchCullingVolume = new CullingVolume();
+Scene.prototype.updateEnvironment = function() {
+ const e = this._frameState, t = this._view, n = this._environmentState, i = e.passes.render, r = e.passes.offscreen, o = this.atmosphere, s = this.skyAtmosphere, c = this.globe, l = this._globeTranslucencyState;
+ if (!i || this._mode !== SceneMode$1.SCENE2D && t.camera.frustum instanceof OrthographicFrustum || !l.environmentVisible)
+ n.skyAtmosphereCommand = void 0, n.skyBoxCommand = void 0, n.sunDrawCommand = void 0, n.sunComputeCommand = void 0, n.moonCommand = void 0;
+ else {
+ if (defined(s)) {
+ if (defined(c))
+ s.setDynamicLighting(
+ DynamicAtmosphereLightingType$1.fromGlobeFlags(c)
+ ), n.isReadyForAtmosphere = n.isReadyForAtmosphere || !c.show || c._surface._tilesToRender.length > 0;
+ else {
+ const T = o.dynamicLighting;
+ s.setDynamicLighting(T), n.isReadyForAtmosphere = !0;
+ }
+ n.skyAtmosphereCommand = s.update(
+ e,
+ c
+ ), defined(n.skyAtmosphereCommand) && this.updateDerivedCommands(n.skyAtmosphereCommand);
+ } else
+ n.skyAtmosphereCommand = void 0;
+ n.skyBoxCommand = defined(this.skyBox) ? this.skyBox.update(e, this._hdr) : void 0;
+ const C = defined(this.sun) ? this.sun.update(e, t.passState, this._hdr) : void 0;
+ n.sunDrawCommand = defined(C) ? C.drawCommand : void 0, n.sunComputeCommand = defined(C) ? C.computeCommand : void 0, n.moonCommand = defined(this.moon) ? this.moon.update(e) : void 0;
+ }
+ const d = n.clearGlobeDepth = defined(c) && c.show && (!c.depthTestAgainstTerrain || this.mode === SceneMode$1.SCENE2D);
+ (n.useDepthPlane = d && this.mode === SceneMode$1.SCENE3D && l.useDepthPlane) && this._depthPlane.update(e), n.renderTranslucentDepthForPick = !1, n.useWebVR = this._useWebVR && this.mode !== SceneMode$1.SCENE2D && !r;
+ const h = e.mode === SceneMode$1.SCENE3D && !l.sunVisibleThroughGlobe ? e.occluder : void 0;
+ let p = e.cullingVolume;
+ const m = scratchCullingVolume.planes;
+ for (let C = 0; C < 5; ++C)
+ m[C] = p.planes[C];
+ p = scratchCullingVolume, n.isSkyAtmosphereVisible = defined(n.skyAtmosphereCommand) && n.isReadyForAtmosphere, n.isSunVisible = this.isVisible(
+ n.sunDrawCommand,
+ p,
+ h
+ ), n.isMoonVisible = this.isVisible(
+ n.moonCommand,
+ p,
+ h
+ );
+ const _ = this.specularEnvironmentMaps;
+ let y = this._specularEnvironmentCubeMap;
+ defined(_) && (y == null ? void 0 : y.url) !== _ ? (y = y && y.destroy(), this._specularEnvironmentCubeMap = new SpecularEnvironmentCubeMap(_)) : !defined(_) && defined(y) && (y.destroy(), this._specularEnvironmentCubeMap = void 0), defined(this._specularEnvironmentCubeMap) && this._specularEnvironmentCubeMap.update(e);
+};
+function updateDebugFrustumPlanes(e) {
+ const t = e._frameState;
+ e.debugShowFrustumPlanes !== e._debugShowFrustumPlanes && (e.debugShowFrustumPlanes ? e._debugFrustumPlanes = new DebugCameraPrimitive({
+ camera: e.camera,
+ updateOnChange: !1,
+ frustumSplits: t.frustumSplits
+ }) : e._debugFrustumPlanes = e._debugFrustumPlanes && e._debugFrustumPlanes.destroy(), e._debugShowFrustumPlanes = e.debugShowFrustumPlanes), defined(e._debugFrustumPlanes) && e._debugFrustumPlanes.update(t);
+}
+function updateShadowMaps(e) {
+ const t = e._frameState, n = t.shadowMaps, i = n.length, r = i > 0 && !t.passes.pick && !t.passes.pickVoxel && e.mode === SceneMode$1.SCENE3D;
+ if (r !== t.shadowState.shadowsEnabled && (++t.shadowState.lastDirtyTime, t.shadowState.shadowsEnabled = r), t.shadowState.lightShadowsEnabled = !1, !!r) {
+ for (let o = 0; o < i; ++o)
+ if (n[o] !== t.shadowState.shadowMaps[o]) {
+ ++t.shadowState.lastDirtyTime;
+ break;
+ }
+ t.shadowState.shadowMaps.length = 0, t.shadowState.lightShadowMaps.length = 0;
+ for (let o = 0; o < i; ++o) {
+ const s = n[o];
+ s.update(t), t.shadowState.shadowMaps.push(s), s.fromLightSource && (t.shadowState.lightShadowMaps.push(s), t.shadowState.lightShadowsEnabled = !0), s.dirty && (++t.shadowState.lastDirtyTime, s.dirty = !1);
+ }
+ }
+}
+function updateAndRenderPrimitives(e) {
+ const t = e._frameState;
+ e._groundPrimitives.update(t), e._primitives.update(t), updateDebugFrustumPlanes(e), updateShadowMaps(e), e._globe && e._globe.render(t);
+}
+function updateAndClearFramebuffers(e, t, n) {
+ const i = e._context, r = e._frameState, o = e._environmentState, s = e._view, c = e._frameState.passes, l = c.pick || c.pickVoxel;
+ defined(s.globeDepth) && (s.globeDepth.picking = l);
+ const d = o.useWebVR;
+ o.originalFramebuffer = t.framebuffer, defined(e.sun) && e.sunBloom !== e._sunBloom ? (e.sunBloom && !d ? e._sunPostProcess = new SunPostProcess() : defined(e._sunPostProcess) && (e._sunPostProcess = e._sunPostProcess.destroy()), e._sunBloom = e.sunBloom) : !defined(e.sun) && defined(e._sunPostProcess) && (e._sunPostProcess = e._sunPostProcess.destroy(), e._sunBloom = !1);
+ const f = e._clearColorCommand;
+ Color.clone(n, f.color), f.execute(i, t);
+ const h = o.useGlobeDepthFramebuffer = defined(
+ s.globeDepth
+ );
+ h && (s.globeDepth.update(
+ i,
+ t,
+ s.viewport,
+ e.msaaSamples,
+ e._hdr,
+ o.clearGlobeDepth
+ ), s.globeDepth.clear(i, t, n));
+ const p = s.oit, m = o.useOIT = !l && defined(p) && p.isSupported();
+ m && (p.update(
+ i,
+ t,
+ s.globeDepth.colorFramebufferManager,
+ e._hdr,
+ e.msaaSamples
+ ), p.clear(i, t, n), o.useOIT = p.isSupported());
+ const _ = e.postProcessStages;
+ let y = o.usePostProcess = !l && (e._hdr || _.length > 0 || _.ambientOcclusion.enabled || _.fxaa.enabled || _.bloom.enabled);
+ if (o.usePostProcessSelected = !1, y && (s.sceneFramebuffer.update(
+ i,
+ s.viewport,
+ e._hdr,
+ e.msaaSamples
+ ), s.sceneFramebuffer.clear(i, t, n), _.update(i, r.useLogDepth, e._hdr), _.clear(i), y = o.usePostProcess = _.ready, o.usePostProcessSelected = y && _.hasSelected), o.isSunVisible && e.sunBloom && !d ? (t.framebuffer = e._sunPostProcess.update(t), e._sunPostProcess.clear(i, t, n)) : h ? t.framebuffer = s.globeDepth.framebuffer : y && (t.framebuffer = s.sceneFramebuffer.framebuffer), defined(t.framebuffer) && f.execute(i, t), o.useInvertClassification = !l && defined(t.framebuffer) && e.invertClassification) {
+ let T;
+ if (e.frameState.invertClassificationColor.alpha === 1 && o.useGlobeDepthFramebuffer && (T = s.globeDepth.framebuffer), defined(T) || i.depthTexture) {
+ if (e._invertClassification.previousFramebuffer = T, e._invertClassification.update(
+ i,
+ e.msaaSamples,
+ s.globeDepth.colorFramebufferManager
+ ), e._invertClassification.clear(i, t), e.frameState.invertClassificationColor.alpha < 1 && m) {
+ const x = e._invertClassification.unclassifiedCommand, b = x.derivedCommands;
+ b.oit = p.createDerivedCommands(
+ x,
+ i,
+ b.oit
+ );
+ }
+ } else
+ o.useInvertClassification = !1;
+ }
+ e._globeTranslucencyState.translucent && s.globeTranslucencyFramebuffer.updateAndClear(
+ e._hdr,
+ s.viewport,
+ i,
+ t
+ );
+}
+Scene.prototype.resolveFramebuffers = function(e) {
+ const t = this._context, n = this._environmentState, i = this._view, r = i.globeDepth;
+ defined(r) && r.prepareColorTextures(t);
+ const o = n.useOIT, s = n.useGlobeDepthFramebuffer, c = n.usePostProcess, l = n.originalFramebuffer, d = s ? r.colorFramebufferManager : void 0, f = i.sceneFramebuffer._colorFramebuffer, h = i.sceneFramebuffer.idFramebuffer;
+ o && (e.framebuffer = c ? f.framebuffer : l, i.oit.execute(t, e));
+ const p = i.translucentTileClassification;
+ if (p.hasTranslucentDepth && p.isSupported() && p.execute(this, e), c) {
+ i.sceneFramebuffer.prepareColorTextures(t);
+ let m = f;
+ s && !o && (m = d);
+ const _ = this.postProcessStages, y = m.getColorTexture(0), C = h.getColorTexture(0), T = defaultValue(
+ d,
+ f
+ ).getDepthStencilTexture();
+ _.execute(t, y, T, C), _.copy(t, l);
+ }
+ !o && !c && s && (e.framebuffer = l, r.executeCopyColor(t, e));
+};
+function callAfterRenderFunctions(e) {
+ const t = e._frameState.afterRender;
+ for (let n = 0, i = t.length; n < i; ++n)
+ t[n]() && e.requestRender();
+ t.length = 0;
+}
+function getGlobeHeight(e) {
+ if (e.mode === SceneMode$1.MORPHING)
+ return;
+ const n = e.camera.positionCartographic;
+ return e.getHeight(n);
+}
+Scene.prototype.getHeight = function(e, t) {
+ if (!defined(e))
+ return;
+ const n = t === HeightReference$1.CLAMP_TO_TERRAIN || t === HeightReference$1.RELATIVE_TO_TERRAIN, i = t === HeightReference$1.CLAMP_TO_3D_TILE || t === HeightReference$1.RELATIVE_TO_3D_TILE;
+ if (!defined(e))
+ return;
+ let r = Number.NEGATIVE_INFINITY;
+ if (!n) {
+ const s = this.primitives.length;
+ for (let c = 0; c < s; ++c) {
+ const l = this.primitives.get(c);
+ if (!l.isCesium3DTileset || !l.show || !l.enableCollision)
+ continue;
+ const d = l.getHeight(e, this);
+ defined(d) && d > r && (r = d);
+ }
+ }
+ const o = this._globe;
+ if (!i && defined(o) && o.show) {
+ const s = o.getHeight(e);
+ s > r && (r = s);
+ }
+ if (r > Number.NEGATIVE_INFINITY)
+ return r;
+};
+const updateHeightScratchCartographic = new Cartographic();
+Scene.prototype.updateHeight = function(e, t, n) {
+ let i = -1, r = !1;
+ const o = () => {
+ if (r || this.frameState.frameNumber <= i)
+ return;
+ i = this.frameState.frameNumber, Cartographic.clone(e, updateHeightScratchCartographic);
+ const y = this.getHeight(e, n);
+ defined(y) && (updateHeightScratchCartographic.height = y, t(updateHeightScratchCartographic));
+ }, s = n === HeightReference$1.CLAMP_TO_TERRAIN || n === HeightReference$1.RELATIVE_TO_TERRAIN, c = n === HeightReference$1.CLAMP_TO_3D_TILE || n === HeightReference$1.RELATIVE_TO_3D_TILE;
+ let l;
+ !c && defined(this.globe) && (l = this.globe._surface.updateHeight(
+ e,
+ o
+ ));
+ let d = {};
+ const f = this._ellipsoid, h = (y) => {
+ if (s || y.isDestroyed() || !y.isCesium3DTileset)
+ return;
+ const C = y.updateHeight(
+ e,
+ o,
+ f
+ );
+ d[y.id] = C;
+ };
+ if (!s) {
+ const y = this.primitives.length;
+ for (let C = 0; C < y; ++C) {
+ const T = this.primitives.get(C);
+ h(T);
+ }
+ }
+ const p = this.primitives.primitiveAdded.addEventListener(
+ h
+ ), m = this.primitives.primitiveRemoved.addEventListener(
+ (y) => {
+ y.isDestroyed() || !y.isCesium3DTileset || (defined(d[y.id]) && d[y.id](), delete d[y.id]);
+ }
+ );
+ return () => {
+ l = l && l(), Object.values(d).forEach(
+ (y) => y()
+ ), d = {}, p(), m(), r = !0;
+ };
+};
+function isCameraUnderground(e) {
+ const t = e.camera, n = e._mode, i = e._screenSpaceCameraController, r = t.positionCartographic;
+ if (!defined(r))
+ return !1;
+ if (!i.onMap() && r.height < 0)
+ return !0;
+ if (n === SceneMode$1.SCENE2D || n === SceneMode$1.MORPHING)
+ return !1;
+ const o = e._globeHeight;
+ return defined(o) && r.height < o;
+}
+Scene.prototype.initializeFrame = function() {
+ if (this._shaderFrameCount++ === 120 && (this._shaderFrameCount = 0, this._context.shaderCache.destroyReleasedShaderPrograms(), this._context.textureCache.destroyReleasedTextures()), this._tweens.update(), this._globeHeightDirty) {
+ defined(this._removeUpdateHeightCallback) && (this._removeUpdateHeightCallback(), this._removeUpdateHeightCallback = void 0), this._globeHeight = getGlobeHeight(this), this._globeHeightDirty = !1;
+ const e = this.camera.positionCartographic;
+ this._removeUpdateHeightCallback = this.updateHeight(
+ e,
+ (t) => {
+ this.isDestroyed() || (this._globeHeight = t.height);
+ }
+ );
+ }
+ this._cameraUnderground = isCameraUnderground(this), this._globeTranslucencyState.update(this), this._screenSpaceCameraController.update(), defined(this._deviceOrientationCameraController) && this._deviceOrientationCameraController.update(), this.camera.update(this._mode), this.camera._updateCameraChanged();
+};
+function updateDebugShowFramesPerSecond(e, t) {
+ if (e.debugShowFramesPerSecond) {
+ if (!defined(e._performanceDisplay)) {
+ const n = document.createElement("div");
+ n.className = "cesium-performanceDisplay-defaultContainer", e._canvas.parentNode.appendChild(n);
+ const r = new PerformanceDisplay({
+ container: n
+ });
+ e._performanceDisplay = r, e._performanceContainer = n;
+ }
+ e._performanceDisplay.throttled = e.requestRenderMode, e._performanceDisplay.update(t);
+ } else defined(e._performanceDisplay) && (e._performanceDisplay = e._performanceDisplay && e._performanceDisplay.destroy(), e._performanceContainer.parentNode.removeChild(
+ e._performanceContainer
+ ));
+}
+function prePassesUpdate(e) {
+ e._jobScheduler.resetBudgets();
+ const t = e._frameState;
+ e.primitives.prePassesUpdate(t), defined(e.globe) && e.globe.update(t), e._picking.update(), t.creditDisplay.update();
+}
+function postPassesUpdate(e) {
+ const t = e._frameState;
+ e.primitives.postPassesUpdate(t), RequestScheduler.update();
+}
+const scratchBackgroundColor = new Color();
+function render(e) {
+ const t = e._frameState, n = e.context, i = n.uniformState, r = e._defaultView;
+ e._view = r, e.updateFrameState(), t.passes.render = !0, t.passes.postProcess = e.postProcessStages.hasSelected, t.tilesetPassState = renderTilesetPassState;
+ let o = defaultValue(e.backgroundColor, Color.BLACK);
+ e._hdr && (o = Color.clone(o, scratchBackgroundColor), o.red = Math.pow(o.red, e.gamma), o.green = Math.pow(o.green, e.gamma), o.blue = Math.pow(o.blue, e.gamma)), t.backgroundColor = o, t.atmosphere = e.atmosphere, e.fog.update(t), i.update(t);
+ const s = e.shadowMap;
+ defined(s) && s.enabled && (!defined(e.light) || e.light instanceof SunLight ? Cartesian3.negate(i.sunDirectionWC, e._shadowMapCamera.direction) : Cartesian3.clone(e.light.direction, e._shadowMapCamera.direction), t.shadowMaps.push(s)), e._computeCommandList.length = 0, e._overlayCommandList.length = 0;
+ const c = r.viewport;
+ c.x = 0, c.y = 0, c.width = n.drawingBufferWidth, c.height = n.drawingBufferHeight;
+ const l = r.passState;
+ l.framebuffer = void 0, l.blendingEnabled = void 0, l.scissorTest = void 0, l.viewport = BoundingRectangle.clone(c, l.viewport), defined(e.globe) && e.globe.beginFrame(t), e.updateEnvironment(), e.updateAndExecuteCommands(l, o), e.resolveFramebuffers(l), l.framebuffer = void 0, executeOverlayCommands(e, l), defined(e.globe) && (e.globe.endFrame(t), e.globe.tilesLoaded || (e._renderRequested = !0)), n.endFrame();
+}
+function tryAndCatchError(e, t) {
+ try {
+ t(e);
+ } catch (n) {
+ if (e._renderError.raiseEvent(e, n), e.rethrowRenderErrors)
+ throw n;
+ }
+}
+function updateMostDetailedRayPicks(e) {
+ return e._picking.updateMostDetailedRayPicks(e);
+}
+Scene.prototype.render = function(e) {
+ this._preUpdate.raiseEvent(this, e);
+ const t = this._frameState;
+ t.newFrame = !1, defined(e) || (e = JulianDate.now());
+ const n = this._view.checkForCameraUpdates(this);
+ n && (this._globeHeightDirty = !0);
+ let i = !this.requestRenderMode || this._renderRequested || n || this._logDepthBufferDirty || this._hdrDirty || this.mode === SceneMode$1.MORPHING;
+ if (!i && defined(this.maximumRenderTimeChange) && defined(this._lastRenderTime)) {
+ const r = Math.abs(
+ JulianDate.secondsDifference(this._lastRenderTime, e)
+ );
+ i = i || r > this.maximumRenderTimeChange;
+ }
+ if (i) {
+ this._lastRenderTime = JulianDate.clone(e, this._lastRenderTime), this._renderRequested = !1, this._logDepthBufferDirty = !1, this._hdrDirty = !1;
+ const r = CesiumMath.incrementWrap(
+ t.frameNumber,
+ 15e6,
+ 1
+ );
+ updateFrameNumber(this, r, e), t.newFrame = !0;
+ }
+ tryAndCatchError(this, prePassesUpdate), this.primitives.show && (tryAndCatchError(this, updateMostDetailedRayPicks), tryAndCatchError(this, updatePreloadPass), tryAndCatchError(this, updatePreloadFlightPass), i || tryAndCatchError(this, updateRequestRenderModeDeferCheckPass)), this._postUpdate.raiseEvent(this, e), i && (this._preRender.raiseEvent(this, e), t.creditDisplay.beginFrame(), tryAndCatchError(this, render)), updateDebugShowFramesPerSecond(this, i), tryAndCatchError(this, postPassesUpdate), callAfterRenderFunctions(this), i && (this._postRender.raiseEvent(this, e), t.creditDisplay.endFrame());
+};
+Scene.prototype.forceRender = function(e) {
+ this._renderRequested = !0, this.render(e);
+};
+Scene.prototype.requestRender = function() {
+ this._renderRequested = !0;
+};
+Scene.prototype.clampLineWidth = function(e) {
+ return Math.max(
+ ContextLimits.minimumAliasedLineWidth,
+ Math.min(e, ContextLimits.maximumAliasedLineWidth)
+ );
+};
+Scene.prototype.pick = function(e, t, n) {
+ return this._picking.pick(this, e, t, n);
+};
+Scene.prototype.pickVoxel = function(e, t, n) {
+ const i = this.pick(e, t, n);
+ if (!defined(i))
+ return;
+ const r = i.primitive;
+ if (!(r instanceof VoxelPrimitive))
+ return;
+ const o = this._picking.pickVoxelCoordinate(
+ this,
+ e,
+ t,
+ n
+ ), s = 255 * o[0] + o[1], c = r._traversal.findKeyframeNode(s);
+ if (!defined(c))
+ return;
+ const l = 255 * o[2] + o[3];
+ return VoxelCell.fromKeyframeNode(
+ r,
+ s,
+ l,
+ c
+ );
+};
+Scene.prototype.pickPositionWorldCoordinates = function(e, t) {
+ return this._picking.pickPositionWorldCoordinates(
+ this,
+ e,
+ t
+ );
+};
+Scene.prototype.pickPosition = function(e, t) {
+ return this._picking.pickPosition(this, e, t);
+};
+Scene.prototype.drillPick = function(e, t, n, i) {
+ return this._picking.drillPick(this, e, t, n, i);
+};
+function updatePreloadPass(e) {
+ const t = e._frameState;
+ preloadTilesetPassState.camera = t.camera, preloadTilesetPassState.cullingVolume = t.cullingVolume, e.primitives.updateForPass(t, preloadTilesetPassState);
+}
+function updatePreloadFlightPass(e) {
+ const t = e._frameState;
+ if (!t.camera.canPreloadFlight())
+ return;
+ preloadFlightTilesetPassState.camera = e.preloadFlightCamera, preloadFlightTilesetPassState.cullingVolume = e.preloadFlightCullingVolume, e.primitives.updateForPass(t, preloadFlightTilesetPassState);
+}
+function updateRequestRenderModeDeferCheckPass(e) {
+ e.primitives.updateForPass(
+ e._frameState,
+ requestRenderModeDeferCheckPassState
+ );
+}
+Scene.prototype.pickFromRay = function(e, t, n) {
+ return this._picking.pickFromRay(this, e, t, n);
+};
+Scene.prototype.drillPickFromRay = function(e, t, n, i) {
+ return this._picking.drillPickFromRay(
+ this,
+ e,
+ t,
+ n,
+ i
+ );
+};
+Scene.prototype.pickFromRayMostDetailed = function(e, t, n) {
+ return this._picking.pickFromRayMostDetailed(
+ this,
+ e,
+ t,
+ n
+ );
+};
+Scene.prototype.drillPickFromRayMostDetailed = function(e, t, n, i) {
+ return this._picking.drillPickFromRayMostDetailed(
+ this,
+ e,
+ t,
+ n,
+ i
+ );
+};
+Scene.prototype.sampleHeight = function(e, t, n) {
+ return this._picking.sampleHeight(this, e, t, n);
+};
+Scene.prototype.clampToHeight = function(e, t, n, i) {
+ return this._picking.clampToHeight(
+ this,
+ e,
+ t,
+ n,
+ i
+ );
+};
+Scene.prototype.sampleHeightMostDetailed = function(e, t, n) {
+ return this._picking.sampleHeightMostDetailed(
+ this,
+ e,
+ t,
+ n
+ );
+};
+Scene.prototype.clampToHeightMostDetailed = function(e, t, n) {
+ return this._picking.clampToHeightMostDetailed(
+ this,
+ e,
+ t,
+ n
+ );
+};
+Scene.prototype.cartesianToCanvasCoordinates = function(e, t) {
+ return SceneTransforms.worldToWindowCoordinates(this, e, t);
+};
+Scene.prototype.completeMorph = function() {
+ this._transitioner.completeMorph();
+};
+Scene.prototype.morphTo2D = function(e) {
+ e = defaultValue(e, 2), this._transitioner.morphTo2D(e, this._ellipsoid);
+};
+Scene.prototype.morphToColumbusView = function(e) {
+ e = defaultValue(e, 2), this._transitioner.morphToColumbusView(e, this._ellipsoid);
+};
+Scene.prototype.morphTo3D = function(e) {
+ e = defaultValue(e, 2), this._transitioner.morphTo3D(e, this._ellipsoid);
+};
+function setTerrain(e, t) {
+ if (e._removeTerrainProviderReadyListener = e._removeTerrainProviderReadyListener && e._removeTerrainProviderReadyListener(), t.ready) {
+ defined(e.globe) && (e.globe.terrainProvider = t.provider);
+ return;
+ }
+ e.globe.terrainProvider = void 0, e._removeTerrainProviderReadyListener = t.readyEvent.addEventListener(
+ (n) => {
+ defined(e) && defined(e.globe) && (e.globe.terrainProvider = n), e._removeTerrainProviderReadyListener();
+ }
+ );
+}
+Scene.prototype.setTerrain = function(e) {
+ return setTerrain(this, e), e;
+};
+Scene.prototype.isDestroyed = function() {
+ return !1;
+};
+Scene.prototype.destroy = function() {
+ this._tweens.removeAll(), this._computeEngine = this._computeEngine && this._computeEngine.destroy(), this._screenSpaceCameraController = this._screenSpaceCameraController && this._screenSpaceCameraController.destroy(), this._deviceOrientationCameraController = this._deviceOrientationCameraController && !this._deviceOrientationCameraController.isDestroyed() && this._deviceOrientationCameraController.destroy(), this._primitives = this._primitives && this._primitives.destroy(), this._groundPrimitives = this._groundPrimitives && this._groundPrimitives.destroy(), this._globe = this._globe && this._globe.destroy(), this._removeTerrainProviderReadyListener = this._removeTerrainProviderReadyListener && this._removeTerrainProviderReadyListener(), this.skyBox = this.skyBox && this.skyBox.destroy(), this.skyAtmosphere = this.skyAtmosphere && this.skyAtmosphere.destroy(), this._debugSphere = this._debugSphere && this._debugSphere.destroy(), this.sun = this.sun && this.sun.destroy(), this._sunPostProcess = this._sunPostProcess && this._sunPostProcess.destroy(), this._depthPlane = this._depthPlane && this._depthPlane.destroy(), this._transitioner = this._transitioner && this._transitioner.destroy(), this._debugFrustumPlanes = this._debugFrustumPlanes && this._debugFrustumPlanes.destroy(), this._brdfLutGenerator = this._brdfLutGenerator && this._brdfLutGenerator.destroy(), this._picking = this._picking && this._picking.destroy(), this._defaultView = this._defaultView && this._defaultView.destroy(), this._view = void 0, this._removeCreditContainer && this._canvas.parentNode.removeChild(this._creditContainer), this.postProcessStages = this.postProcessStages && this.postProcessStages.destroy(), this._context = this._context && this._context.destroy(), this._frameState.creditDisplay = this._frameState.creditDisplay && this._frameState.creditDisplay.destroy(), defined(this._performanceDisplay) && (this._performanceDisplay = this._performanceDisplay && this._performanceDisplay.destroy(), this._performanceContainer.parentNode.removeChild(
+ this._performanceContainer
+ )), this._removeRequestListenerCallback(), this._removeTaskProcessorListenerCallback();
+ for (let e = 0; e < this._removeGlobeCallbacks.length; ++e)
+ this._removeGlobeCallbacks[e]();
+ return this._removeGlobeCallbacks.length = 0, defined(this._removeUpdateHeightCallback) && (this._removeUpdateHeightCallback(), this._removeUpdateHeightCallback = void 0), destroyObject(this);
+};
+function SkyAtmosphere(e) {
+ e = defaultValue(e, Ellipsoid.WGS84), this.show = !0, this.perFragmentAtmosphere = !1, this._ellipsoid = e;
+ const t = 1.025, n = Cartesian3.multiplyByScalar(
+ e.radii,
+ t,
+ new Cartesian3()
+ );
+ this._scaleMatrix = Matrix4.fromScale(n), this._modelMatrix = new Matrix4(), this._command = new DrawCommand({
+ owner: this,
+ modelMatrix: this._modelMatrix
+ }), this._spSkyFromSpace = void 0, this._spSkyFromAtmosphere = void 0, this._flags = void 0, this.atmosphereLightIntensity = 50, this.atmosphereRayleighCoefficient = new Cartesian3(55e-7, 13e-6, 284e-7), this.atmosphereMieCoefficient = new Cartesian3(21e-6, 21e-6, 21e-6), this.atmosphereRayleighScaleHeight = 1e4, this.atmosphereMieScaleHeight = 3200, this.atmosphereMieAnisotropy = 0.9, this.hueShift = 0, this.saturationShift = 0, this.brightnessShift = 0, this._hueSaturationBrightness = new Cartesian3();
+ const i = new Cartesian3();
+ i.x = e.maximumRadius * t, i.y = e.maximumRadius, i.z = 0, this._radiiAndDynamicAtmosphereColor = i;
+ const r = this;
+ this._command.uniformMap = {
+ u_radiiAndDynamicAtmosphereColor: function() {
+ return r._radiiAndDynamicAtmosphereColor;
+ },
+ u_hsbShift: function() {
+ return r._hueSaturationBrightness.x = r.hueShift, r._hueSaturationBrightness.y = r.saturationShift, r._hueSaturationBrightness.z = r.brightnessShift, r._hueSaturationBrightness;
+ },
+ u_atmosphereLightIntensity: function() {
+ return r.atmosphereLightIntensity;
+ },
+ u_atmosphereRayleighCoefficient: function() {
+ return r.atmosphereRayleighCoefficient;
+ },
+ u_atmosphereMieCoefficient: function() {
+ return r.atmosphereMieCoefficient;
+ },
+ u_atmosphereRayleighScaleHeight: function() {
+ return r.atmosphereRayleighScaleHeight;
+ },
+ u_atmosphereMieScaleHeight: function() {
+ return r.atmosphereMieScaleHeight;
+ },
+ u_atmosphereMieAnisotropy: function() {
+ return r.atmosphereMieAnisotropy;
+ }
+ };
+}
+Object.defineProperties(SkyAtmosphere.prototype, {
+ /**
+ * Gets the ellipsoid the atmosphere is drawn around.
+ * @memberof SkyAtmosphere.prototype
+ *
+ * @type {Ellipsoid}
+ * @readonly
+ */
+ ellipsoid: {
+ get: function() {
+ return this._ellipsoid;
+ }
+ }
+});
+SkyAtmosphere.prototype.setDynamicLighting = function(e) {
+ this._radiiAndDynamicAtmosphereColor.z = e;
+};
+const scratchModelMatrix$1 = new Matrix4();
+SkyAtmosphere.prototype.update = function(e, t) {
+ if (!this.show)
+ return;
+ const n = e.mode;
+ if (n !== SceneMode$1.SCENE3D && n !== SceneMode$1.MORPHING || !e.passes.render)
+ return;
+ const i = Matrix4.fromRotationTranslation(
+ e.context.uniformState.inverseViewRotation,
+ Cartesian3.ZERO,
+ scratchModelMatrix$1
+ ), r = Matrix4.multiplyTransformation(
+ i,
+ Axis$1.Y_UP_TO_Z_UP,
+ scratchModelMatrix$1
+ ), o = Matrix4.multiply(
+ this._scaleMatrix,
+ r,
+ scratchModelMatrix$1
+ );
+ Matrix4.clone(o, this._modelMatrix);
+ const s = e.context, c = hasColorCorrection(this), l = e.globeTranslucencyState.translucent, d = this.perFragmentAtmosphere || l || !defined(t) || !t.show, f = this._command;
+ if (!defined(f.vertexArray)) {
+ const p = EllipsoidGeometry.createGeometry(
+ new EllipsoidGeometry({
+ radii: new Cartesian3(1, 1, 1),
+ slicePartitions: 256,
+ stackPartitions: 256,
+ vertexFormat: VertexFormat.POSITION_ONLY
+ })
+ );
+ f.vertexArray = VertexArray.fromGeometry({
+ context: s,
+ geometry: p,
+ attributeLocations: GeometryPipeline.createAttributeLocations(p),
+ bufferUsage: BufferUsage$1.STATIC_DRAW
+ }), f.renderState = RenderState.fromCache({
+ cull: {
+ enabled: !0,
+ face: CullFace$1.FRONT
+ },
+ blending: BlendingState$1.ALPHA_BLEND,
+ depthMask: !1
+ });
+ }
+ const h = c | d << 2 | l << 3;
+ if (h !== this._flags) {
+ this._flags = h;
+ const p = [];
+ c && p.push("COLOR_CORRECT"), d && p.push("PER_FRAGMENT_ATMOSPHERE"), l && p.push("GLOBE_TRANSLUCENT");
+ const m = new ShaderSource({
+ defines: p,
+ sources: [AtmosphereCommon, SkyAtmosphereCommon, SkyAtmosphereVS]
+ }), _ = new ShaderSource({
+ defines: p,
+ sources: [AtmosphereCommon, SkyAtmosphereCommon, SkyAtmosphereFS]
+ });
+ this._spSkyAtmosphere = ShaderProgram.fromCache({
+ context: s,
+ vertexShaderSource: m,
+ fragmentShaderSource: _
+ }), f.shaderProgram = this._spSkyAtmosphere;
+ }
+ return f;
+};
+function hasColorCorrection(e) {
+ return !(CesiumMath.equalsEpsilon(
+ e.hueShift,
+ 0,
+ CesiumMath.EPSILON7
+ ) && CesiumMath.equalsEpsilon(
+ e.saturationShift,
+ 0,
+ CesiumMath.EPSILON7
+ ) && CesiumMath.equalsEpsilon(
+ e.brightnessShift,
+ 0,
+ CesiumMath.EPSILON7
+ ));
+}
+SkyAtmosphere.prototype.isDestroyed = function() {
+ return !1;
+};
+SkyAtmosphere.prototype.destroy = function() {
+ const e = this._command;
+ return e.vertexArray = e.vertexArray && e.vertexArray.destroy(), this._spSkyAtmosphere = this._spSkyAtmosphere && this._spSkyAtmosphere.destroy(), destroyObject(this);
+};
+function SkyBox(e) {
+ this.sources = e.sources, this._sources = void 0, this.show = defaultValue(e.show, !0), this._command = new DrawCommand({
+ modelMatrix: Matrix4.clone(Matrix4.IDENTITY),
+ owner: this
+ }), this._cubeMap = void 0, this._attributeLocations = void 0, this._useHdr = void 0;
+}
+SkyBox.prototype.update = function(e, t) {
+ const n = this, { mode: i, passes: r, context: o } = e;
+ if (!this.show || i !== SceneMode$1.SCENE3D && i !== SceneMode$1.MORPHING || !r.render)
+ return;
+ if (this._sources !== this.sources) {
+ this._sources = this.sources;
+ const c = this.sources;
+ typeof c.positiveX == "string" ? loadCubeMap(o, this._sources).then(function(l) {
+ n._cubeMap = n._cubeMap && n._cubeMap.destroy(), n._cubeMap = l;
+ }) : (this._cubeMap = this._cubeMap && this._cubeMap.destroy(), this._cubeMap = new CubeMap({
+ context: o,
+ source: c
+ }));
+ }
+ const s = this._command;
+ if (!defined(s.vertexArray)) {
+ s.uniformMap = {
+ u_cubeMap: function() {
+ return n._cubeMap;
+ }
+ };
+ const c = BoxGeometry.createGeometry(
+ BoxGeometry.fromDimensions({
+ dimensions: new Cartesian3(2, 2, 2),
+ vertexFormat: VertexFormat.POSITION_ONLY
+ })
+ ), l = this._attributeLocations = GeometryPipeline.createAttributeLocations(
+ c
+ );
+ s.vertexArray = VertexArray.fromGeometry({
+ context: o,
+ geometry: c,
+ attributeLocations: l,
+ bufferUsage: BufferUsage$1.STATIC_DRAW
+ }), s.renderState = RenderState.fromCache({
+ blending: BlendingState$1.ALPHA_BLEND
+ });
+ }
+ if (!defined(s.shaderProgram) || this._useHdr !== t) {
+ const c = new ShaderSource({
+ defines: [t ? "HDR" : ""],
+ sources: [SkyBoxFS]
+ });
+ s.shaderProgram = ShaderProgram.fromCache({
+ context: o,
+ vertexShaderSource: SkyBoxVS,
+ fragmentShaderSource: c,
+ attributeLocations: this._attributeLocations
+ }), this._useHdr = t;
+ }
+ if (defined(this._cubeMap))
+ return s;
+};
+SkyBox.prototype.isDestroyed = function() {
+ return !1;
+};
+SkyBox.prototype.destroy = function() {
+ const e = this._command;
+ return e.vertexArray = e.vertexArray && e.vertexArray.destroy(), e.shaderProgram = e.shaderProgram && e.shaderProgram.destroy(), this._cubeMap = this._cubeMap && this._cubeMap.destroy(), destroyObject(this);
+};
+function getDefaultSkyBoxUrl(e) {
+ return buildModuleUrl(`Assets/Textures/SkyBox/tycho2t3_80_${e}.jpg`);
+}
+SkyBox.createEarthSkyBox = function() {
+ return new SkyBox({
+ sources: {
+ positiveX: getDefaultSkyBoxUrl("px"),
+ negativeX: getDefaultSkyBoxUrl("mx"),
+ positiveY: getDefaultSkyBoxUrl("py"),
+ negativeY: getDefaultSkyBoxUrl("my"),
+ positiveZ: getDefaultSkyBoxUrl("pz"),
+ negativeZ: getDefaultSkyBoxUrl("mz")
+ }
+ });
+};
+function Sun() {
+ this.show = !0, this._drawCommand = new DrawCommand({
+ primitiveType: PrimitiveType$1.TRIANGLES,
+ boundingVolume: new BoundingSphere(),
+ owner: this
+ }), this._commands = {
+ drawCommand: this._drawCommand,
+ computeCommand: void 0
+ }, this._boundingVolume = new BoundingSphere(), this._boundingVolume2D = new BoundingSphere(), this._texture = void 0, this._drawingBufferWidth = void 0, this._drawingBufferHeight = void 0, this._radiusTS = void 0, this._size = void 0, this.glowFactor = 1, this._glowFactorDirty = !1, this._useHdr = void 0;
+ const e = this;
+ this._uniformMap = {
+ u_texture: function() {
+ return e._texture;
+ },
+ u_size: function() {
+ return e._size;
+ }
+ };
+}
+Object.defineProperties(Sun.prototype, {
+ /**
+ * Gets or sets a number that controls how "bright" the Sun's lens flare appears
+ * to be. Zero shows just the Sun's disc without any flare.
+ * Use larger values for a more pronounced flare around the Sun.
+ *
+ * @memberof Sun.prototype
+ * @type {number}
+ * @default 1.0
+ */
+ glowFactor: {
+ get: function() {
+ return this._glowFactor;
+ },
+ set: function(e) {
+ e = Math.max(e, 0), this._glowFactor = e, this._glowFactorDirty = !0;
+ }
+ }
+});
+const scratchPositionWC = new Cartesian2(), scratchLimbWC = new Cartesian2(), scratchPositionEC = new Cartesian4(), scratchCartesian4 = new Cartesian4();
+Sun.prototype.update = function(e, t, n) {
+ if (!this.show)
+ return;
+ const i = e.mode;
+ if (i === SceneMode$1.SCENE2D || i === SceneMode$1.MORPHING || !e.passes.render)
+ return;
+ const r = e.context, o = t.viewport.width, s = t.viewport.height;
+ if (!defined(this._texture) || o !== this._drawingBufferWidth || s !== this._drawingBufferHeight || this._glowFactorDirty || n !== this._useHdr) {
+ this._texture = this._texture && this._texture.destroy(), this._drawingBufferWidth = o, this._drawingBufferHeight = s, this._glowFactorDirty = !1, this._useHdr = n;
+ let S = Math.max(o, s);
+ S = Math.pow(2, Math.ceil(Math.log(S) / Math.log(2)) - 2), S = Math.max(1, S);
+ const E = n ? r.halfFloatingPointTexture ? PixelDatatype$1.HALF_FLOAT : PixelDatatype$1.FLOAT : PixelDatatype$1.UNSIGNED_BYTE;
+ this._texture = new Texture({
+ context: r,
+ width: S,
+ height: S,
+ pixelFormat: PixelFormat$1.RGBA,
+ pixelDatatype: E
+ }), this._glowLengthTS = this._glowFactor * 5, this._radiusTS = 1 / (1 + 2 * this._glowLengthTS) * 0.5;
+ const A = this, D = {
+ u_radiusTS: function() {
+ return A._radiusTS;
+ }
+ };
+ this._commands.computeCommand = new ComputeCommand({
+ fragmentShaderSource: SunTextureFS,
+ outputTexture: this._texture,
+ uniformMap: D,
+ persists: !1,
+ owner: this,
+ postExecute: function() {
+ A._commands.computeCommand = void 0;
+ }
+ });
+ }
+ const c = this._drawCommand;
+ if (!defined(c.vertexArray)) {
+ const S = {
+ direction: 0
+ }, E = new Uint8Array(4 * 2);
+ E[0] = 0, E[1] = 0, E[2] = 255, E[3] = 0, E[4] = 255, E[5] = 255, E[6] = 0, E[7] = 255;
+ const A = Buffer.createVertexBuffer({
+ context: r,
+ typedArray: E,
+ usage: BufferUsage$1.STATIC_DRAW
+ }), D = [
+ {
+ index: S.direction,
+ vertexBuffer: A,
+ componentsPerAttribute: 2,
+ normalize: !0,
+ componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE
+ }
+ ], P = Buffer.createIndexBuffer({
+ context: r,
+ typedArray: new Uint16Array([0, 1, 2, 0, 2, 3]),
+ usage: BufferUsage$1.STATIC_DRAW,
+ indexDatatype: IndexDatatype$1.UNSIGNED_SHORT
+ });
+ c.vertexArray = new VertexArray({
+ context: r,
+ attributes: D,
+ indexBuffer: P
+ }), c.shaderProgram = ShaderProgram.fromCache({
+ context: r,
+ vertexShaderSource: SunVS,
+ fragmentShaderSource: SunFS,
+ attributeLocations: S
+ }), c.renderState = RenderState.fromCache({
+ blending: BlendingState$1.ALPHA_BLEND
+ }), c.uniformMap = this._uniformMap;
+ }
+ const l = r.uniformState.sunPositionWC, d = r.uniformState.sunPositionColumbusView, f = this._boundingVolume, h = this._boundingVolume2D;
+ Cartesian3.clone(l, f.center), h.center.x = d.z, h.center.y = d.x, h.center.z = d.y, f.radius = CesiumMath.SOLAR_RADIUS + CesiumMath.SOLAR_RADIUS * this._glowLengthTS, h.radius = f.radius, i === SceneMode$1.SCENE3D ? BoundingSphere.clone(f, c.boundingVolume) : i === SceneMode$1.COLUMBUS_VIEW && BoundingSphere.clone(h, c.boundingVolume);
+ const p = SceneTransforms.computeActualEllipsoidPosition(
+ e,
+ l,
+ scratchCartesian4
+ ), m = Cartesian3.magnitude(
+ Cartesian3.subtract(p, e.camera.position, scratchCartesian4)
+ ), _ = r.uniformState.projection, y = scratchPositionEC;
+ y.x = 0, y.y = 0, y.z = -m, y.w = 1;
+ const C = Matrix4.multiplyByVector(
+ _,
+ y,
+ scratchCartesian4
+ ), T = SceneTransforms.clipToGLWindowCoordinates(
+ t.viewport,
+ C,
+ scratchPositionWC
+ );
+ y.x = CesiumMath.SOLAR_RADIUS;
+ const x = Matrix4.multiplyByVector(
+ _,
+ y,
+ scratchCartesian4
+ ), b = SceneTransforms.clipToGLWindowCoordinates(
+ t.viewport,
+ x,
+ scratchLimbWC
+ );
+ return this._size = Cartesian2.magnitude(
+ Cartesian2.subtract(b, T, scratchCartesian4)
+ ), this._size = 2 * this._size * (1 + 2 * this._glowLengthTS), this._size = Math.ceil(this._size), this._commands;
+};
+Sun.prototype.isDestroyed = function() {
+ return !1;
+};
+Sun.prototype.destroy = function() {
+ const e = this._drawCommand;
+ return e.vertexArray = e.vertexArray && e.vertexArray.destroy(), e.shaderProgram = e.shaderProgram && e.shaderProgram.destroy(), this._texture = this._texture && this._texture.destroy(), destroyObject(this);
+};
+function startRenderLoop(e) {
+ e._renderLoopRunning = !0;
+ let t = 0;
+ function n(i) {
+ if (!e.isDestroyed())
+ if (e._useDefaultRenderLoop)
+ try {
+ const r = e._targetFrameRate;
+ if (!defined(r))
+ e.resize(), e.render(), requestAnimationFrame(n);
+ else {
+ const o = 1e3 / r, s = i - t;
+ s > o && (e.resize(), e.render(), t = i - s % o), requestAnimationFrame(n);
+ }
+ } catch (r) {
+ e._useDefaultRenderLoop = !1, e._renderLoopRunning = !1, e._showRenderLoopErrors && e.showErrorPanel("An error occurred while rendering. Rendering has stopped.", void 0, r);
+ }
+ else
+ e._renderLoopRunning = !1;
+ }
+ requestAnimationFrame(n);
+}
+function configurePixelRatio(e) {
+ let t = e._useBrowserRecommendedResolution ? 1 : window.devicePixelRatio;
+ return t *= e._resolutionScale, defined(e._scene) && (e._scene.pixelRatio = t), t;
+}
+function configureCanvasSize(e) {
+ const t = e._canvas;
+ let n = t.clientWidth, i = t.clientHeight;
+ const r = configurePixelRatio(e);
+ e._canvasClientWidth = n, e._canvasClientHeight = i, n *= r, i *= r, t.width = n, t.height = i, e._canRender = n !== 0 && i !== 0, e._lastDevicePixelRatio = window.devicePixelRatio;
+}
+function configureCameraFrustum(e) {
+ const t = e._canvas, n = t.width, i = t.height;
+ if (n !== 0 && i !== 0) {
+ const r = e._scene.camera.frustum;
+ defined(r.aspectRatio) ? r.aspectRatio = n / i : (r.top = r.right * (i / n), r.bottom = -r.top);
+ }
+}
+function CesiumWidget(e, t) {
+ e = getElement(e), t = defaultValue(t, defaultValue.EMPTY_OBJECT);
+ const n = document.createElement("div");
+ n.className = "cesium-widget", e.appendChild(n);
+ const i = document.createElement("canvas"), r = FeatureDetection.supportsImageRenderingPixelated();
+ this._supportsImageRenderingPixelated = r, r && (i.style.imageRendering = FeatureDetection.imageRenderingValue()), i.oncontextmenu = function() {
+ return !1;
+ }, i.onselectstart = function() {
+ return !1;
+ };
+ function o() {
+ i !== i.ownerDocument.activeElement && i.ownerDocument.activeElement.blur();
+ }
+ defaultValue(
+ t.blurActiveElementOnCanvasFocus,
+ !0
+ ) && (i.addEventListener("mousedown", o), i.addEventListener("pointerdown", o)), n.appendChild(i);
+ const c = document.createElement("div");
+ c.className = "cesium-widget-credits";
+ const l = defined(t.creditContainer) ? getElement(t.creditContainer) : n;
+ l.appendChild(c);
+ const d = defined(t.creditViewport) ? getElement(t.creditViewport) : n, f = defaultValue(t.showRenderLoopErrors, !0), h = defaultValue(
+ t.useBrowserRecommendedResolution,
+ !0
+ );
+ this._element = n, this._container = e, this._canvas = i, this._canvasClientWidth = 0, this._canvasClientHeight = 0, this._lastDevicePixelRatio = 0, this._creditViewport = d, this._creditContainer = l, this._innerCreditContainer = c, this._canRender = !1, this._renderLoopRunning = !1, this._showRenderLoopErrors = f, this._resolutionScale = 1, this._useBrowserRecommendedResolution = h, this._forceResize = !1, this._clock = defined(t.clock) ? t.clock : new Clock(), configureCanvasSize(this);
+ try {
+ const p = defaultValue(t.ellipsoid, Ellipsoid.default), m = new Scene({
+ canvas: i,
+ contextOptions: t.contextOptions,
+ creditContainer: c,
+ creditViewport: d,
+ ellipsoid: p,
+ mapProjection: t.mapProjection,
+ orderIndependentTranslucency: t.orderIndependentTranslucency,
+ scene3DOnly: defaultValue(t.scene3DOnly, !1),
+ shadows: t.shadows,
+ mapMode2D: t.mapMode2D,
+ requestRenderMode: t.requestRenderMode,
+ maximumRenderTimeChange: t.maximumRenderTimeChange,
+ depthPlaneEllipsoidOffset: t.depthPlaneEllipsoidOffset,
+ msaaSamples: t.msaaSamples
+ });
+ this._scene = m, m.camera.constrainedAxis = Cartesian3.UNIT_Z, configurePixelRatio(this), configureCameraFrustum(this);
+ let _ = t.globe;
+ defined(_) || (_ = new Globe(p)), _ !== !1 && (m.globe = _, m.globe.shadows = defaultValue(
+ t.terrainShadows,
+ ShadowMode$1.RECEIVE_ONLY
+ ));
+ let y = t.skyBox;
+ !defined(y) && Ellipsoid.WGS84.equals(p) && (y = SkyBox.createEarthSkyBox()), y !== !1 && (m.skyBox = y, m.sun = new Sun(), Ellipsoid.WGS84.equals(p) && (m.moon = new Moon()));
+ let C = t.skyAtmosphere;
+ !defined(C) && Ellipsoid.WGS84.equals(p) && (C = new SkyAtmosphere(p), C.show = t.globe !== !1 && _.show), C !== !1 && (m.skyAtmosphere = C);
+ let T = t.baseLayer;
+ t.globe !== !1 && T !== !1 && (defined(T) || (T = ImageryLayer.fromWorldImagery()), m.imageryLayers.add(T)), defined(t.terrainProvider) && t.globe !== !1 && (m.terrainProvider = t.terrainProvider), defined(t.terrain) && t.globe !== !1 && m.setTerrain(t.terrain), this._screenSpaceEventHandler = new ScreenSpaceEventHandler(i), defined(t.sceneMode) && (t.sceneMode === SceneMode$1.SCENE2D && this._scene.morphTo2D(0), t.sceneMode === SceneMode$1.COLUMBUS_VIEW && this._scene.morphToColumbusView(0)), this._useDefaultRenderLoop = void 0, this.useDefaultRenderLoop = defaultValue(
+ t.useDefaultRenderLoop,
+ !0
+ ), this._targetFrameRate = void 0, this.targetFrameRate = t.targetFrameRate;
+ const x = this;
+ this._onRenderError = function(b, S) {
+ x._useDefaultRenderLoop = !1, x._renderLoopRunning = !1, x._showRenderLoopErrors && x.showErrorPanel("An error occurred while rendering. Rendering has stopped.", void 0, S);
+ }, m.renderError.addEventListener(this._onRenderError);
+ } catch (p) {
+ throw f && this.showErrorPanel("Error constructing CesiumWidget.", 'Visit http://get.webgl.org to verify that your web browser and hardware support WebGL. Consider trying a different web browser or updating your video drivers. Detailed error information is below:', p), p;
+ }
+}
+Object.defineProperties(CesiumWidget.prototype, {
+ /**
+ * Gets the parent container.
+ * @memberof CesiumWidget.prototype
+ *
+ * @type {Element}
+ * @readonly
+ */
+ container: {
+ get: function() {
+ return this._container;
+ }
+ },
+ /**
+ * Gets the canvas.
+ * @memberof CesiumWidget.prototype
+ *
+ * @type {HTMLCanvasElement}
+ * @readonly
+ */
+ canvas: {
+ get: function() {
+ return this._canvas;
+ }
+ },
+ /**
+ * Gets the credit container.
+ * @memberof CesiumWidget.prototype
+ *
+ * @type {Element}
+ * @readonly
+ */
+ creditContainer: {
+ get: function() {
+ return this._creditContainer;
+ }
+ },
+ /**
+ * Gets the credit viewport
+ * @memberof CesiumWidget.prototype
+ *
+ * @type {Element}
+ * @readonly
+ */
+ creditViewport: {
+ get: function() {
+ return this._creditViewport;
+ }
+ },
+ /**
+ * Gets the scene.
+ * @memberof CesiumWidget.prototype
+ *
+ * @type {Scene}
+ * @readonly
+ */
+ scene: {
+ get: function() {
+ return this._scene;
+ }
+ },
+ /**
+ * Gets the collection of image layers that will be rendered on the globe.
+ * @memberof CesiumWidget.prototype
+ *
+ * @type {ImageryLayerCollection}
+ * @readonly
+ */
+ imageryLayers: {
+ get: function() {
+ return this._scene.imageryLayers;
+ }
+ },
+ /**
+ * The terrain provider providing surface geometry for the globe.
+ * @memberof CesiumWidget.prototype
+ *
+ * @type {TerrainProvider}
+ */
+ terrainProvider: {
+ get: function() {
+ return this._scene.terrainProvider;
+ },
+ set: function(e) {
+ this._scene.terrainProvider = e;
+ }
+ },
+ /**
+ * Manages the list of credits to display on screen and in the lightbox.
+ * @memberof CesiumWidget.prototype
+ *
+ * @type {CreditDisplay}
+ */
+ creditDisplay: {
+ get: function() {
+ return this._scene.frameState.creditDisplay;
+ }
+ },
+ /**
+ * Gets the camera.
+ * @memberof CesiumWidget.prototype
+ *
+ * @type {Camera}
+ * @readonly
+ */
+ camera: {
+ get: function() {
+ return this._scene.camera;
+ }
+ },
+ /**
+ * Gets the default ellipsoid for the scene.
+ * @memberof CesiumWidget.prototype
+ *
+ * @type {Ellipsoid}
+ * @readonly
+ */
+ ellipsoid: {
+ get: function() {
+ return this._scene.ellipsoid;
+ }
+ },
+ /**
+ * Gets the clock.
+ * @memberof CesiumWidget.prototype
+ *
+ * @type {Clock}
+ * @readonly
+ */
+ clock: {
+ get: function() {
+ return this._clock;
+ }
+ },
+ /**
+ * Gets the screen space event handler.
+ * @memberof CesiumWidget.prototype
+ *
+ * @type {ScreenSpaceEventHandler}
+ * @readonly
+ */
+ screenSpaceEventHandler: {
+ get: function() {
+ return this._screenSpaceEventHandler;
+ }
+ },
+ /**
+ * Gets or sets the target frame rate of the widget when useDefaultRenderLoop
+ * is true. If undefined, the browser's requestAnimationFrame implementation
+ * determines the frame rate. If defined, this value must be greater than 0. A value higher
+ * than the underlying requestAnimationFrame implementation will have no effect.
+ * @memberof CesiumWidget.prototype
+ *
+ * @type {number}
+ */
+ targetFrameRate: {
+ get: function() {
+ return this._targetFrameRate;
+ },
+ set: function(e) {
+ this._targetFrameRate = e;
+ }
+ },
+ /**
+ * Gets or sets whether or not this widget should control the render loop.
+ * If true the widget will use requestAnimationFrame to
+ * perform rendering and resizing of the widget, as well as drive the
+ * simulation clock. If set to false, you must manually call the
+ * resize, render methods as part of a custom
+ * render loop. If an error occurs during rendering, {@link Scene}'s
+ * renderError event will be raised and this property
+ * will be set to false. It must be set back to true to continue rendering
+ * after the error.
+ * @memberof CesiumWidget.prototype
+ *
+ * @type {boolean}
+ */
+ useDefaultRenderLoop: {
+ get: function() {
+ return this._useDefaultRenderLoop;
+ },
+ set: function(e) {
+ this._useDefaultRenderLoop !== e && (this._useDefaultRenderLoop = e, e && !this._renderLoopRunning && startRenderLoop(this));
+ }
+ },
+ /**
+ * Gets or sets a scaling factor for rendering resolution. Values less than 1.0 can improve
+ * performance on less powerful devices while values greater than 1.0 will render at a higher
+ * resolution and then scale down, resulting in improved visual fidelity.
+ * For example, if the widget is laid out at a size of 640x480, setting this value to 0.5
+ * will cause the scene to be rendered at 320x240 and then scaled up while setting
+ * it to 2.0 will cause the scene to be rendered at 1280x960 and then scaled down.
+ * @memberof CesiumWidget.prototype
+ *
+ * @type {number}
+ * @default 1.0
+ */
+ resolutionScale: {
+ get: function() {
+ return this._resolutionScale;
+ },
+ set: function(e) {
+ this._resolutionScale !== e && (this._resolutionScale = e, this._forceResize = !0);
+ }
+ },
+ /**
+ * Boolean flag indicating if the browser's recommended resolution is used.
+ * If true, the browser's device pixel ratio is ignored and 1.0 is used instead,
+ * effectively rendering based on CSS pixels instead of device pixels. This can improve
+ * performance on less powerful devices that have high pixel density. When false, rendering
+ * will be in device pixels. {@link CesiumWidget#resolutionScale} will still take effect whether
+ * this flag is true or false.
+ * @memberof CesiumWidget.prototype
+ *
+ * @type {boolean}
+ * @default true
+ */
+ useBrowserRecommendedResolution: {
+ get: function() {
+ return this._useBrowserRecommendedResolution;
+ },
+ set: function(e) {
+ this._useBrowserRecommendedResolution !== e && (this._useBrowserRecommendedResolution = e, this._forceResize = !0);
+ }
+ }
+});
+CesiumWidget.prototype.showErrorPanel = function(e, t, n) {
+ const i = this._element, r = document.createElement("div");
+ r.className = "cesium-widget-errorPanel";
+ const o = document.createElement("div");
+ o.className = "cesium-widget-errorPanel-content", r.appendChild(o);
+ const s = document.createElement("div");
+ s.className = "cesium-widget-errorPanel-header", s.appendChild(document.createTextNode(e)), o.appendChild(s);
+ const c = document.createElement("div");
+ c.className = "cesium-widget-errorPanel-scroll", o.appendChild(c);
+ function l() {
+ c.style.maxHeight = `${Math.max(
+ Math.round(i.clientHeight * 0.9 - 100),
+ 30
+ )}px`;
+ }
+ l(), defined(window.addEventListener) && window.addEventListener("resize", l, !1);
+ const d = defined(t), f = defined(n);
+ if (d || f) {
+ const m = document.createElement("div");
+ if (m.className = "cesium-widget-errorPanel-message", c.appendChild(m), f) {
+ let _ = formatError(n);
+ d || (typeof n == "string" && (n = new Error(n)), t = formatError({
+ name: n.name,
+ message: n.message
+ }), _ = n.stack), typeof console < "u" && console.error(`${e}
+${t}
+${_}`);
+ const y = document.createElement("div");
+ y.className = "cesium-widget-errorPanel-message-details collapsed";
+ const C = document.createElement("span");
+ C.className = "cesium-widget-errorPanel-more-details", C.appendChild(document.createTextNode("See more...")), y.appendChild(C), y.onclick = function(T) {
+ y.removeChild(C), y.appendChild(document.createTextNode(_)), y.className = "cesium-widget-errorPanel-message-details", o.className = "cesium-widget-errorPanel-content expanded", y.onclick = void 0;
+ }, c.appendChild(y);
+ }
+ m.innerHTML = `${t}
`; + } + const h = document.createElement("div"); + h.className = "cesium-widget-errorPanel-buttonPanel", o.appendChild(h); + const p = document.createElement("button"); + p.setAttribute("type", "button"), p.className = "cesium-button", p.appendChild(document.createTextNode("OK")), p.onclick = function() { + defined(l) && defined(window.removeEventListener) && window.removeEventListener("resize", l, !1), i.removeChild(r); + }, h.appendChild(p), i.appendChild(r); +}; +CesiumWidget.prototype.isDestroyed = function() { + return !1; +}; +CesiumWidget.prototype.destroy = function() { + defined(this._scene) && (this._scene.renderError.removeEventListener(this._onRenderError), this._scene = this._scene.destroy()), this._container.removeChild(this._element), this._creditContainer.removeChild(this._innerCreditContainer), destroyObject(this); +}; +CesiumWidget.prototype.resize = function() { + const e = this._canvas; + !this._forceResize && this._canvasClientWidth === e.clientWidth && this._canvasClientHeight === e.clientHeight && this._lastDevicePixelRatio === window.devicePixelRatio || (this._forceResize = !1, configureCanvasSize(this), configureCameraFrustum(this), this._scene.requestRender()); +}; +CesiumWidget.prototype.render = function() { + if (this._canRender) { + this._scene.initializeFrame(); + const e = this._clock.tick(); + this._scene.render(e); + } else + this._clock.tick(); +}; +function TileAvailability(e, t) { + this._tilingScheme = e, this._maximumLevel = t, this._rootNodes = []; +} +const rectangleScratch$2 = new Rectangle(); +function findNode(e, t, n, i) { + const r = i.length; + for (let o = 0; o < r; ++o) { + const s = i[o]; + if (s.x === t && s.y === n && s.level === e) + return !0; + } + return !1; +} +TileAvailability.prototype.addAvailableTileRange = function(e, t, n, i, r) { + const o = this._tilingScheme, s = this._rootNodes; + if (e === 0) + for (let p = n; p <= r; ++p) + for (let m = t; m <= i; ++m) + findNode(e, m, p, s) || s.push(new QuadtreeNode(o, void 0, 0, m, p)); + o.tileXYToRectangle(t, n, e, rectangleScratch$2); + const c = rectangleScratch$2.west, l = rectangleScratch$2.north; + o.tileXYToRectangle(i, r, e, rectangleScratch$2); + const d = rectangleScratch$2.east, f = rectangleScratch$2.south, h = new RectangleWithLevel( + e, + c, + f, + d, + l + ); + for (let p = 0; p < s.length; ++p) { + const m = s[p]; + rectanglesOverlap(m.extent, h) && putRectangleInQuadtree(this._maximumLevel, m, h); + } +}; +TileAvailability.prototype.computeMaximumLevelAtPosition = function(e) { + let t; + for (let n = 0; n < this._rootNodes.length; ++n) { + const i = this._rootNodes[n]; + if (rectangleContainsPosition(i.extent, e)) { + t = i; + break; + } + } + return defined(t) ? findMaxLevelFromNode(void 0, t, e) : -1; +}; +const rectanglesScratch = [], remainingToCoverByLevelScratch = [], westScratch = new Rectangle(), eastScratch = new Rectangle(); +TileAvailability.prototype.computeBestAvailableLevelOverRectangle = function(e) { + const t = rectanglesScratch; + t.length = 0, e.east < e.west ? (t.push( + Rectangle.fromRadians( + -Math.PI, + e.south, + e.east, + e.north, + westScratch + ) + ), t.push( + Rectangle.fromRadians( + e.west, + e.south, + Math.PI, + e.north, + eastScratch + ) + )) : t.push(e); + const n = remainingToCoverByLevelScratch; + n.length = 0; + let i; + for (i = 0; i < this._rootNodes.length; ++i) + updateCoverageWithNode( + n, + this._rootNodes[i], + t + ); + for (i = n.length - 1; i >= 0; --i) + if (defined(n[i]) && n[i].length === 0) + return i; + return 0; +}; +const cartographicScratch = new Cartographic(); +TileAvailability.prototype.isTileAvailable = function(e, t, n) { + const i = this._tilingScheme.tileXYToRectangle( + t, + n, + e, + rectangleScratch$2 + ); + return Rectangle.center(i, cartographicScratch), this.computeMaximumLevelAtPosition(cartographicScratch) >= e; +}; +TileAvailability.prototype.computeChildMaskForTile = function(e, t, n) { + const i = e + 1; + if (i >= this._maximumLevel) + return 0; + let r = 0; + return r |= this.isTileAvailable(i, 2 * t, 2 * n + 1) ? 1 : 0, r |= this.isTileAvailable(i, 2 * t + 1, 2 * n + 1) ? 2 : 0, r |= this.isTileAvailable(i, 2 * t, 2 * n) ? 4 : 0, r |= this.isTileAvailable(i, 2 * t + 1, 2 * n) ? 8 : 0, r; +}; +function QuadtreeNode(e, t, n, i, r) { + this.tilingScheme = e, this.parent = t, this.level = n, this.x = i, this.y = r, this.extent = e.tileXYToRectangle(i, r, n), this.rectangles = [], this._sw = void 0, this._se = void 0, this._nw = void 0, this._ne = void 0; +} +Object.defineProperties(QuadtreeNode.prototype, { + nw: { + get: function() { + return this._nw || (this._nw = new QuadtreeNode( + this.tilingScheme, + this, + this.level + 1, + this.x * 2, + this.y * 2 + )), this._nw; + } + }, + ne: { + get: function() { + return this._ne || (this._ne = new QuadtreeNode( + this.tilingScheme, + this, + this.level + 1, + this.x * 2 + 1, + this.y * 2 + )), this._ne; + } + }, + sw: { + get: function() { + return this._sw || (this._sw = new QuadtreeNode( + this.tilingScheme, + this, + this.level + 1, + this.x * 2, + this.y * 2 + 1 + )), this._sw; + } + }, + se: { + get: function() { + return this._se || (this._se = new QuadtreeNode( + this.tilingScheme, + this, + this.level + 1, + this.x * 2 + 1, + this.y * 2 + 1 + )), this._se; + } + } +}); +function RectangleWithLevel(e, t, n, i, r) { + this.level = e, this.west = t, this.south = n, this.east = i, this.north = r; +} +function rectanglesOverlap(e, t) { + const n = Math.max(e.west, t.west), i = Math.max(e.south, t.south), r = Math.min(e.east, t.east), o = Math.min(e.north, t.north); + return i < o && n < r; +} +function putRectangleInQuadtree(e, t, n) { + for (; t.level < e; ) + if (rectangleFullyContainsRectangle(t.nw.extent, n)) + t = t.nw; + else if (rectangleFullyContainsRectangle(t.ne.extent, n)) + t = t.ne; + else if (rectangleFullyContainsRectangle(t.sw.extent, n)) + t = t.sw; + else if (rectangleFullyContainsRectangle(t.se.extent, n)) + t = t.se; + else + break; + if (t.rectangles.length === 0 || t.rectangles[t.rectangles.length - 1].level <= n.level) + t.rectangles.push(n); + else { + let i = binarySearch( + t.rectangles, + n.level, + rectangleLevelComparator + ); + i < 0 && (i = ~i), t.rectangles.splice(i, 0, n); + } +} +function rectangleLevelComparator(e, t) { + return e.level - t; +} +function rectangleFullyContainsRectangle(e, t) { + return t.west >= e.west && t.east <= e.east && t.south >= e.south && t.north <= e.north; +} +function rectangleContainsPosition(e, t) { + return t.longitude >= e.west && t.longitude <= e.east && t.latitude >= e.south && t.latitude <= e.north; +} +function findMaxLevelFromNode(e, t, n) { + let i = 0, r = !1; + for (; !r; ) { + const o = t._nw && rectangleContainsPosition(t._nw.extent, n), s = t._ne && rectangleContainsPosition(t._ne.extent, n), c = t._sw && rectangleContainsPosition(t._sw.extent, n), l = t._se && rectangleContainsPosition(t._se.extent, n); + if (o + s + c + l > 1) { + o && (i = Math.max( + i, + findMaxLevelFromNode(t, t._nw, n) + )), s && (i = Math.max( + i, + findMaxLevelFromNode(t, t._ne, n) + )), c && (i = Math.max( + i, + findMaxLevelFromNode(t, t._sw, n) + )), l && (i = Math.max( + i, + findMaxLevelFromNode(t, t._se, n) + )); + break; + } else o ? t = t._nw : s ? t = t._ne : c ? t = t._sw : l ? t = t._se : r = !0; + } + for (; t !== e; ) { + const o = t.rectangles; + for (let s = o.length - 1; s >= 0 && o[s].level > i; --s) { + const c = o[s]; + rectangleContainsPosition(c, n) && (i = c.level); + } + t = t.parent; + } + return i; +} +function updateCoverageWithNode(e, t, n) { + if (!t) + return; + let i, r = !1; + for (i = 0; i < n.length; ++i) + r = r || rectanglesOverlap(t.extent, n[i]); + if (!r) + return; + const o = t.rectangles; + for (i = 0; i < o.length; ++i) { + const s = o[i]; + e[s.level] || (e[s.level] = n), e[s.level] = subtractRectangle( + e[s.level], + s + ); + } + updateCoverageWithNode(e, t._nw, n), updateCoverageWithNode(e, t._ne, n), updateCoverageWithNode(e, t._sw, n), updateCoverageWithNode(e, t._se, n); +} +function subtractRectangle(e, t) { + const n = []; + for (let i = 0; i < e.length; ++i) { + const r = e[i]; + rectanglesOverlap(r, t) ? (r.west < t.west && n.push( + new Rectangle( + r.west, + r.south, + t.west, + r.north + ) + ), r.east > t.east && n.push( + new Rectangle( + t.east, + r.south, + r.east, + r.north + ) + ), r.south < t.south && n.push( + new Rectangle( + Math.max(t.west, r.west), + r.south, + Math.min(t.east, r.east), + t.south + ) + ), r.north > t.north && n.push( + new Rectangle( + Math.max(t.west, r.west), + t.north, + Math.min(t.east, r.east), + r.north + ) + )) : n.push(r); + } + return n; +} +const ALL_CHILDREN = 15; +function TerrainProviderBuilder$2(e) { + this.ellipsoid = defaultValue(e.ellipsoid, Ellipsoid.default), this.credit = void 0, this.tilingScheme = void 0, this.height = void 0, this.width = void 0, this.encoding = void 0, this.lodCount = void 0, this.hasAvailability = !1, this.tilesAvailable = void 0, this.tilesAvailabilityLoaded = void 0, this.levelZeroMaximumGeometricError = void 0, this.terrainDataStructure = void 0; +} +TerrainProviderBuilder$2.prototype.build = function(e) { + e._credit = this.credit, e._tilingScheme = this.tilingScheme, e._height = this.height, e._width = this.width, e._encoding = this.encoding, e._lodCount = this.lodCount, e._hasAvailability = this.hasAvailability, e._tilesAvailable = this.tilesAvailable, e._tilesAvailabilityLoaded = this.tilesAvailabilityLoaded, e._levelZeroMaximumGeometricError = this.levelZeroMaximumGeometricError, e._terrainDataStructure = this.terrainDataStructure; +}; +function parseMetadataSuccess$1(e, t) { + const n = t.copyrightText; + defined(n) && (e.credit = new Credit(n)); + const i = t.spatialReference, r = defaultValue(i.latestWkid, i.wkid), o = t.extent, s = { + ellipsoid: e.ellipsoid + }; + if (r === 4326) + s.rectangle = Rectangle.fromDegrees( + o.xmin, + o.ymin, + o.xmax, + o.ymax + ), e.tilingScheme = new GeographicTilingScheme( + s + ); + else if (r === 3857) { + const d = Math.PI * e.ellipsoid.maximumRadius; + t.extent.xmax > d && (t.extent.xmax = d), t.extent.ymax > d && (t.extent.ymax = d), t.extent.xmin < -d && (t.extent.xmin = -d), t.extent.ymin < -d && (t.extent.ymin = -d), s.rectangleSouthwestInMeters = new Cartesian2( + o.xmin, + o.ymin + ), s.rectangleNortheastInMeters = new Cartesian2( + o.xmax, + o.ymax + ), e.tilingScheme = new WebMercatorTilingScheme( + s + ); + } else + throw new RuntimeError("Invalid spatial reference"); + const c = t.tileInfo; + if (!defined(c)) + throw new RuntimeError("tileInfo is required"); + e.width = c.rows + 1, e.height = c.cols + 1, e.encoding = c.format === "LERC" ? HeightmapEncoding$1.LERC : HeightmapEncoding$1.NONE, e.lodCount = c.lods.length - 1, (e.hasAvailability = t.capabilities.indexOf("Tilemap") !== -1) && (e.tilesAvailable = new TileAvailability( + e.tilingScheme, + e.lodCount + ), e.tilesAvailable.addAvailableTileRange( + 0, + 0, + 0, + e.tilingScheme.getNumberOfXTilesAtLevel(0), + e.tilingScheme.getNumberOfYTilesAtLevel(0) + ), e.tilesAvailabilityLoaded = new TileAvailability( + e.tilingScheme, + e.lodCount + )), e.levelZeroMaximumGeometricError = TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap( + e.tilingScheme.ellipsoid, + e.width, + e.tilingScheme.getNumberOfXTilesAtLevel(0) + ), t.bandCount > 1 && console.log( + "ArcGISTiledElevationTerrainProvider: Terrain data has more than 1 band. Using the first one." + ), defined(t.minValues) && defined(t.maxValues) ? e.terrainDataStructure = { + elementMultiplier: 1, + lowestEncodedHeight: t.minValues[0], + highestEncodedHeight: t.maxValues[0] + } : e.terrainDataStructure = { + elementMultiplier: 1 + }; +} +async function requestMetadata$1(e, t, n) { + try { + const i = await t.fetchJson(); + parseMetadataSuccess$1(e, i); + } catch (i) { + const r = `An error occurred while accessing ${t}.`; + throw TileProviderError.reportError( + void 0, + n, + defined(n) ? n._errorEvent : void 0, + r + ), i; + } +} +function ArcGISTiledElevationTerrainProvider(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._resource = void 0, this._credit = void 0, this._tilingScheme = void 0, this._levelZeroMaximumGeometricError = void 0, this._maxLevel = void 0, this._terrainDataStructure = void 0, this._width = void 0, this._height = void 0, this._encoding = void 0, this._lodCount = void 0, this._hasAvailability = !1, this._tilesAvailable = void 0, this._tilesAvailabilityLoaded = void 0, this._availableCache = {}, this._errorEvent = new Event(); +} +Object.defineProperties(ArcGISTiledElevationTerrainProvider.prototype, { + /** + * Gets an event that is raised when the terrain provider encounters an asynchronous error. By subscribing + * to the event, you will be notified of the error and can potentially recover from it. Event listeners + * are passed an instance of {@link TileProviderError}. + * @memberof ArcGISTiledElevationTerrainProvider.prototype + * @type {Event} + * @readonly + */ + errorEvent: { + get: function() { + return this._errorEvent; + } + }, + /** + * Gets the credit to display when this terrain provider is active. Typically this is used to credit + * the source of the terrain. + * @memberof ArcGISTiledElevationTerrainProvider.prototype + * @type {Credit} + * @readonly + */ + credit: { + get: function() { + return this._credit; + } + }, + /** + * Gets the tiling scheme used by this provider. + * @memberof ArcGISTiledElevationTerrainProvider.prototype + * @type {GeographicTilingScheme} + * @readonly + */ + tilingScheme: { + get: function() { + return this._tilingScheme; + } + }, + /** + * Gets a value indicating whether or not the provider includes a water mask. The water mask + * indicates which areas of the globe are water rather than land, so they can be rendered + * as a reflective surface with animated waves. + * @memberof ArcGISTiledElevationTerrainProvider.prototype + * @type {boolean} + * @readonly + */ + hasWaterMask: { + get: function() { + return !1; + } + }, + /** + * Gets a value indicating whether or not the requested tiles include vertex normals. + * @memberof ArcGISTiledElevationTerrainProvider.prototype + * @type {boolean} + * @readonly + */ + hasVertexNormals: { + get: function() { + return !1; + } + }, + /** + * Gets an object that can be used to determine availability of terrain from this provider, such as + * at points and in rectangles. This property may be undefined if availability + * information is not available. + * @memberof ArcGISTiledElevationTerrainProvider.prototype + * @type {TileAvailability} + * @readonly + */ + availability: { + get: function() { + return this._tilesAvailable; + } + } +}); +ArcGISTiledElevationTerrainProvider.fromUrl = async function(e, t) { + t = defaultValue(t, defaultValue.EMPTY_OBJECT), e = await Promise.resolve(e); + let n = Resource.createIfNeeded(e); + n.appendForwardSlash(), defined(t.token) && (n = n.getDerivedResource({ + queryParameters: { + token: t.token + } + })); + const i = n.getDerivedResource({ + queryParameters: { + f: "pjson" + } + }), r = new TerrainProviderBuilder$2(t); + await requestMetadata$1(r, i); + const o = new ArcGISTiledElevationTerrainProvider(t); + return r.build(o), o._resource = n, o; +}; +ArcGISTiledElevationTerrainProvider.prototype.requestTileGeometry = function(e, t, n, i) { + const r = this._resource.getDerivedResource({ + url: `tile/${n}/${t}/${e}`, + request: i + }), o = this._hasAvailability; + let s = Promise.resolve(!0), c; + if (o && !defined(isTileAvailable(this, n + 1, e * 2, t * 2))) { + const h = requestAvailability( + this, + n + 1, + e * 2, + t * 2 + ); + s = h.promise, c = h.request; + } + const l = r.fetchArrayBuffer(); + if (!defined(l) || !defined(s)) + return; + const d = this, f = this._tilesAvailable; + return Promise.all([l, s]).then(function(h) { + return new HeightmapTerrainData({ + buffer: h[0], + width: d._width, + height: d._height, + childTileMask: o ? f.computeChildMaskForTile(n, e, t) : ALL_CHILDREN, + structure: d._terrainDataStructure, + encoding: d._encoding + }); + }).catch(async function(h) { + var p; + if (defined(c) && c.state === RequestState$1.CANCELLED) { + i.cancel(); + try { + await ((p = i.deferred) == null ? void 0 : p.promise); + } catch { + } + return i.state = RequestState$1.CANCELLED, Promise.reject(h); + } + return Promise.reject(h); + }); +}; +function isTileAvailable(e, t, n, i) { + if (!e._hasAvailability) + return; + const r = e._tilesAvailabilityLoaded, o = e._tilesAvailable; + if (t > e._lodCount) + return !1; + if (o.isTileAvailable(t, n, i)) + return !0; + if (r.isTileAvailable(t, n, i)) + return !1; +} +ArcGISTiledElevationTerrainProvider.prototype.getLevelMaximumGeometricError = function(e) { + return this._levelZeroMaximumGeometricError / (1 << e); +}; +ArcGISTiledElevationTerrainProvider.prototype.getTileDataAvailable = function(e, t, n) { + if (!this._hasAvailability) + return; + const i = isTileAvailable(this, n, e, t); + if (defined(i)) + return i; + requestAvailability(this, n, e, t); +}; +ArcGISTiledElevationTerrainProvider.prototype.loadTileDataAvailability = function(e, t, n) { +}; +function findRange(e, t, n, i) { + const r = t - 1, o = n - 1, s = i[e.y * t + e.x], c = [], l = { + startX: e.x, + startY: e.y, + endX: 0, + endY: 0 + }, d = new Cartesian2(e.x + 1, e.y + 1); + let f = !1, h = !1; + for (; !(f && h); ) { + let p = d.x; + const m = h ? d.y + 1 : d.y; + if (!f) { + for (let _ = e.y; _ < m; ++_) + if (i[_ * t + d.x] !== s) { + f = !0; + break; + } + f ? (c.push(new Cartesian2(d.x, e.y)), --d.x, --p, l.endX = d.x) : d.x === r ? (l.endX = d.x, f = !0) : ++d.x; + } + if (!h) { + const _ = d.y * t; + for (let y = e.x; y <= p; ++y) + if (i[_ + y] !== s) { + h = !0; + break; + } + h ? (c.push(new Cartesian2(e.x, d.y)), --d.y, l.endY = d.y) : d.y === o ? (l.endY = d.y, h = !0) : ++d.y; + } + } + return { + endingIndices: c, + range: l, + value: s + }; +} +function computeAvailability(e, t, n, i, r) { + const o = []; + if (r.every(function(l) { + return l === r[0]; + })) + return r[0] === 1 && o.push({ + startX: e, + startY: t, + endX: e + n - 1, + endY: t + i - 1 + }), o; + let c = [new Cartesian2(0, 0)]; + for (; c.length > 0; ) { + const l = c.pop(), d = findRange(l, n, i, r); + if (d.value === 1) { + const h = d.range; + h.startX += e, h.endX += e, h.startY += t, h.endY += t, o.push(h); + } + const f = d.endingIndices; + f.length > 0 && (c = c.concat(f)); + } + return o; +} +function requestAvailability(e, t, n, i) { + if (!e._hasAvailability) + return {}; + const r = Math.floor(n / 128) * 128, o = Math.floor(i / 128) * 128, s = Math.min(1 << t, 128), c = `tilemap/${t}/${o}/${r}/${s}/${s}`, l = e._availableCache; + if (defined(l[c])) + return l[c]; + const d = new Request({ + throttle: !1, + throttleByServer: !0, + type: RequestType$1.TERRAIN + }); + let h = e._resource.getDerivedResource({ + url: c, + request: d + }).fetchJson(); + return defined(h) ? (h = h.then(function(p) { + const m = computeAvailability( + r, + o, + s, + s, + p.data + ); + e._tilesAvailabilityLoaded.addAvailableTileRange( + t, + r, + o, + r + s, + o + s + ); + const _ = e._tilesAvailable; + for (let y = 0; y < m.length; ++y) { + const C = m[y]; + _.addAvailableTileRange( + t, + C.startX, + C.startY, + C.endX, + C.endY + ); + } + return isTileAvailable(e, t, n, i); + }), l[c] = { + promise: h, + request: d + }, h = h.finally(function(p) { + return delete l[c], p; + }), { + promise: h, + request: d + }) : {}; +} +const url = "https://dev.virtualearth.net/REST/v1/Locations"; +function BingMapsGeocoderService(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = e.key; + this._key = t; + const n = { + key: t + }; + defined(e.culture) && (n.culture = e.culture), this._resource = new Resource({ + url, + queryParameters: n + }), this._credit = new Credit( + '
',
+ !1
+ );
+}
+Object.defineProperties(BingMapsGeocoderService.prototype, {
+ /**
+ * The URL endpoint for the Bing geocoder service
+ * @type {string}
+ * @memberof BingMapsGeocoderService.prototype
+ * @readonly
+ */
+ url: {
+ get: function() {
+ return url;
+ }
+ },
+ /**
+ * The key for the Bing geocoder service
+ * @type {string}
+ * @memberof BingMapsGeocoderService.prototype
+ * @readonly
+ */
+ key: {
+ get: function() {
+ return this._key;
+ }
+ },
+ /**
+ * Gets the credit to display after a geocode is performed. Typically this is used to credit
+ * the geocoder service.
+ * @memberof BingMapsGeocoderService.prototype
+ * @type {Credit|undefined}
+ * @readonly
+ */
+ credit: {
+ get: function() {
+ return this._credit;
+ }
+ }
+});
+BingMapsGeocoderService.prototype.geocode = async function(e) {
+ return this._resource.getDerivedResource({
+ queryParameters: {
+ query: e
+ }
+ }).fetchJsonp("jsonp").then(function(n) {
+ return n.resourceSets.length === 0 ? [] : n.resourceSets[0].resources.map(function(r) {
+ const o = r.bbox, s = o[0], c = o[1], l = o[2], d = o[3];
+ return {
+ displayName: r.name,
+ destination: Rectangle.fromDegrees(c, s, d, l)
+ };
+ });
+ });
+};
+function CartographicGeocoderService() {
+}
+Object.defineProperties(CartographicGeocoderService.prototype, {
+ /**
+ * Gets the credit to display after a geocode is performed. Typically this is used to credit
+ * the geocoder service.
+ * @memberof CartographicGeocoderService.prototype
+ * @type {Credit|undefined}
+ * @readonly
+ */
+ credit: {
+ get: function() {
+ }
+ }
+});
+CartographicGeocoderService.prototype.geocode = function(e) {
+ const t = e.match(/[^\s,\n]+/g);
+ if (t.length === 2 || t.length === 3) {
+ let n = +t[0], i = +t[1];
+ const r = t.length === 3 ? +t[2] : 300;
+ if (isNaN(n) && isNaN(i)) {
+ const o = /^(\d+.?\d*)([nsew])/i;
+ for (let s = 0; s < t.length; ++s) {
+ const c = t[s].match(o);
+ o.test(t[s]) && c.length === 3 && (/^[ns]/i.test(c[2]) ? i = /^[n]/i.test(c[2]) ? +c[1] : -c[1] : /^[ew]/i.test(c[2]) && (n = /^[e]/i.test(c[2]) ? +c[1] : -c[1]));
+ }
+ }
+ if (!isNaN(n) && !isNaN(i) && !isNaN(r)) {
+ const o = {
+ displayName: e,
+ destination: Cartesian3.fromDegrees(n, i, r)
+ };
+ return Promise.resolve([o]);
+ }
+ }
+ return Promise.resolve([]);
+};
+const scratchTimeVec = new Cartesian4(), scratchTemp0 = new Cartesian3(), scratchTemp1 = new Cartesian3();
+function createEvaluateFunction(e) {
+ const t = e.points, n = e.times;
+ if (t.length < 3) {
+ const i = n[0], r = 1 / (n[1] - i), o = t[0], s = t[1];
+ return function(c, l) {
+ defined(l) || (l = new Cartesian3());
+ const d = (c - i) * r;
+ return Cartesian3.lerp(o, s, d, l);
+ };
+ }
+ return function(i, r) {
+ defined(r) || (r = new Cartesian3());
+ const o = e._lastTimeIndex = e.findTimeInterval(
+ i,
+ e._lastTimeIndex
+ ), s = (i - n[o]) / (n[o + 1] - n[o]), c = scratchTimeVec;
+ c.z = s, c.y = s * s, c.x = c.y * s, c.w = 1;
+ let l, d, f, h, p;
+ return o === 0 ? (l = t[0], d = t[1], f = e.firstTangent, h = Cartesian3.subtract(t[2], l, scratchTemp0), Cartesian3.multiplyByScalar(h, 0.5, h), p = Matrix4.multiplyByVector(
+ HermiteSpline.hermiteCoefficientMatrix,
+ c,
+ c
+ )) : o === t.length - 2 ? (l = t[o], d = t[o + 1], h = e.lastTangent, f = Cartesian3.subtract(d, t[o - 1], scratchTemp0), Cartesian3.multiplyByScalar(f, 0.5, f), p = Matrix4.multiplyByVector(
+ HermiteSpline.hermiteCoefficientMatrix,
+ c,
+ c
+ )) : (l = t[o - 1], d = t[o], f = t[o + 1], h = t[o + 2], p = Matrix4.multiplyByVector(
+ CatmullRomSpline.catmullRomCoefficientMatrix,
+ c,
+ c
+ )), r = Cartesian3.multiplyByScalar(l, p.x, r), Cartesian3.multiplyByScalar(d, p.y, scratchTemp1), Cartesian3.add(r, scratchTemp1, r), Cartesian3.multiplyByScalar(f, p.z, scratchTemp1), Cartesian3.add(r, scratchTemp1, r), Cartesian3.multiplyByScalar(h, p.w, scratchTemp1), Cartesian3.add(r, scratchTemp1, r);
+ };
+}
+const firstTangentScratch = new Cartesian3(), lastTangentScratch = new Cartesian3();
+function CatmullRomSpline(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.points, n = e.times;
+ let i = e.firstTangent, r = e.lastTangent;
+ if (t.length > 2 && (defined(i) || (i = firstTangentScratch, Cartesian3.multiplyByScalar(t[1], 2, i), Cartesian3.subtract(i, t[2], i), Cartesian3.subtract(i, t[0], i), Cartesian3.multiplyByScalar(i, 0.5, i)), !defined(r))) {
+ const o = t.length - 1;
+ r = lastTangentScratch, Cartesian3.multiplyByScalar(t[o - 1], 2, r), Cartesian3.subtract(t[o], r, r), Cartesian3.add(r, t[o - 2], r), Cartesian3.multiplyByScalar(r, 0.5, r);
+ }
+ this._times = n, this._points = t, this._firstTangent = Cartesian3.clone(i), this._lastTangent = Cartesian3.clone(r), this._evaluateFunction = createEvaluateFunction(this), this._lastTimeIndex = 0;
+}
+Object.defineProperties(CatmullRomSpline.prototype, {
+ /**
+ * An array of times for the control points.
+ *
+ * @memberof CatmullRomSpline.prototype
+ *
+ * @type {number[]}
+ * @readonly
+ */
+ times: {
+ get: function() {
+ return this._times;
+ }
+ },
+ /**
+ * An array of {@link Cartesian3} control points.
+ *
+ * @memberof CatmullRomSpline.prototype
+ *
+ * @type {Cartesian3[]}
+ * @readonly
+ */
+ points: {
+ get: function() {
+ return this._points;
+ }
+ },
+ /**
+ * The tangent at the first control point.
+ *
+ * @memberof CatmullRomSpline.prototype
+ *
+ * @type {Cartesian3}
+ * @readonly
+ */
+ firstTangent: {
+ get: function() {
+ return this._firstTangent;
+ }
+ },
+ /**
+ * The tangent at the last control point.
+ *
+ * @memberof CatmullRomSpline.prototype
+ *
+ * @type {Cartesian3}
+ * @readonly
+ */
+ lastTangent: {
+ get: function() {
+ return this._lastTangent;
+ }
+ }
+});
+CatmullRomSpline.catmullRomCoefficientMatrix = new Matrix4(
+ -0.5,
+ 1,
+ -0.5,
+ 0,
+ 1.5,
+ -2.5,
+ 0,
+ 1,
+ -1.5,
+ 2,
+ 0.5,
+ 0,
+ 0.5,
+ -0.5,
+ 0,
+ 0
+);
+CatmullRomSpline.prototype.findTimeInterval = Spline.prototype.findTimeInterval;
+CatmullRomSpline.prototype.wrapTime = Spline.prototype.wrapTime;
+CatmullRomSpline.prototype.clampTime = Spline.prototype.clampTime;
+CatmullRomSpline.prototype.evaluate = function(e, t) {
+ return this._evaluateFunction(e, t);
+};
+const Intersections2D = {};
+Intersections2D.clipTriangleAtAxisAlignedThreshold = function(e, t, n, i, r, o) {
+ defined(o) ? o.length = 0 : o = [];
+ let s, c, l;
+ t ? (s = n < e, c = i < e, l = r < e) : (s = n > e, c = i > e, l = r > e);
+ const d = s + c + l;
+ let f, h, p, m, _, y;
+ return d === 1 ? s ? (f = (e - n) / (i - n), h = (e - n) / (r - n), o.push(1), o.push(2), h !== 1 && (o.push(-1), o.push(0), o.push(2), o.push(h)), f !== 1 && (o.push(-1), o.push(0), o.push(1), o.push(f))) : c ? (p = (e - i) / (r - i), m = (e - i) / (n - i), o.push(2), o.push(0), m !== 1 && (o.push(-1), o.push(1), o.push(0), o.push(m)), p !== 1 && (o.push(-1), o.push(1), o.push(2), o.push(p))) : l && (_ = (e - r) / (n - r), y = (e - r) / (i - r), o.push(0), o.push(1), y !== 1 && (o.push(-1), o.push(2), o.push(1), o.push(y)), _ !== 1 && (o.push(-1), o.push(2), o.push(0), o.push(_))) : d === 2 ? !s && n !== e ? (m = (e - i) / (n - i), _ = (e - r) / (n - r), o.push(0), o.push(-1), o.push(1), o.push(0), o.push(m), o.push(-1), o.push(2), o.push(0), o.push(_)) : !c && i !== e ? (y = (e - r) / (i - r), f = (e - n) / (i - n), o.push(1), o.push(-1), o.push(2), o.push(1), o.push(y), o.push(-1), o.push(0), o.push(1), o.push(f)) : !l && r !== e && (h = (e - n) / (r - n), p = (e - i) / (r - i), o.push(2), o.push(-1), o.push(0), o.push(2), o.push(h), o.push(-1), o.push(1), o.push(2), o.push(p)) : d !== 3 && (o.push(0), o.push(1), o.push(2)), o;
+};
+Intersections2D.computeBarycentricCoordinates = function(e, t, n, i, r, o, s, c, l) {
+ const d = n - s, f = s - r, h = o - c, p = i - c, m = 1 / (h * d + f * p), _ = t - c, y = e - s, C = (h * y + f * _) * m, T = (-p * y + d * _) * m, x = 1 - C - T;
+ return defined(l) ? (l.x = C, l.y = T, l.z = x, l) : new Cartesian3(C, T, x);
+};
+Intersections2D.computeLineSegmentLineSegmentIntersection = function(e, t, n, i, r, o, s, c, l) {
+ const d = (s - r) * (t - o) - (c - o) * (e - r), f = (n - e) * (t - o) - (i - t) * (e - r), h = (c - o) * (n - e) - (s - r) * (i - t);
+ if (h === 0)
+ return;
+ const p = d / h, m = f / h;
+ if (p >= 0 && p <= 1 && m >= 0 && m <= 1)
+ return defined(l) || (l = new Cartesian2()), l.x = e + p * (n - e), l.y = t + p * (i - t), l;
+};
+function QuantizedMeshTerrainData(e) {
+ this._quantizedVertices = e.quantizedVertices, this._encodedNormals = e.encodedNormals, this._indices = e.indices, this._minimumHeight = e.minimumHeight, this._maximumHeight = e.maximumHeight, this._boundingSphere = e.boundingSphere, this._orientedBoundingBox = e.orientedBoundingBox, this._horizonOcclusionPoint = e.horizonOcclusionPoint, this._credits = e.credits;
+ const t = this._quantizedVertices.length / 3, n = this._uValues = this._quantizedVertices.subarray(
+ 0,
+ t
+ ), i = this._vValues = this._quantizedVertices.subarray(
+ t,
+ 2 * t
+ );
+ this._heightValues = this._quantizedVertices.subarray(
+ 2 * t,
+ 3 * t
+ );
+ function r(s, c) {
+ return i[s] - i[c];
+ }
+ function o(s, c) {
+ return n[s] - n[c];
+ }
+ this._westIndices = sortIndicesIfNecessary(
+ e.westIndices,
+ r,
+ t
+ ), this._southIndices = sortIndicesIfNecessary(
+ e.southIndices,
+ o,
+ t
+ ), this._eastIndices = sortIndicesIfNecessary(
+ e.eastIndices,
+ r,
+ t
+ ), this._northIndices = sortIndicesIfNecessary(
+ e.northIndices,
+ o,
+ t
+ ), this._westSkirtHeight = e.westSkirtHeight, this._southSkirtHeight = e.southSkirtHeight, this._eastSkirtHeight = e.eastSkirtHeight, this._northSkirtHeight = e.northSkirtHeight, this._childTileMask = defaultValue(e.childTileMask, 15), this._createdByUpsampling = defaultValue(e.createdByUpsampling, !1), this._waterMask = e.waterMask, this._mesh = void 0;
+}
+Object.defineProperties(QuantizedMeshTerrainData.prototype, {
+ /**
+ * An array of credits for this tile.
+ * @memberof QuantizedMeshTerrainData.prototype
+ * @type {Credit[]}
+ */
+ credits: {
+ get: function() {
+ return this._credits;
+ }
+ },
+ /**
+ * The water mask included in this terrain data, if any. A water mask is a rectangular
+ * Uint8Array or image where a value of 255 indicates water and a value of 0 indicates land.
+ * Values in between 0 and 255 are allowed as well to smoothly blend between land and water.
+ * @memberof QuantizedMeshTerrainData.prototype
+ * @type {Uint8Array|HTMLImageElement|HTMLCanvasElement}
+ */
+ waterMask: {
+ get: function() {
+ return this._waterMask;
+ }
+ },
+ childTileMask: {
+ get: function() {
+ return this._childTileMask;
+ }
+ },
+ canUpsample: {
+ get: function() {
+ return defined(this._mesh);
+ }
+ }
+});
+const arrayScratch = [];
+function sortIndicesIfNecessary(e, t, n) {
+ arrayScratch.length = e.length;
+ let i = !1;
+ for (let r = 0, o = e.length; r < o; ++r)
+ arrayScratch[r] = e[r], i = i || r > 0 && t(e[r - 1], e[r]) > 0;
+ return i ? (arrayScratch.sort(t), IndexDatatype$1.createTypedArray(n, arrayScratch)) : e;
+}
+const createMeshTaskName$1 = "createVerticesFromQuantizedTerrainMesh", createMeshTaskProcessorNoThrottle$1 = new TaskProcessor(createMeshTaskName$1), createMeshTaskProcessorThrottle$1 = new TaskProcessor(
+ createMeshTaskName$1,
+ TerrainData.maximumAsynchronousTasks
+);
+QuantizedMeshTerrainData.prototype.createMesh = function(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.tilingScheme, n = e.x, i = e.y, r = e.level, o = defaultValue(e.exaggeration, 1), s = defaultValue(
+ e.exaggerationRelativeHeight,
+ 0
+ ), c = defaultValue(e.throttle, !0), l = t.ellipsoid, d = t.tileXYToRectangle(n, i, r), h = (c ? createMeshTaskProcessorThrottle$1 : createMeshTaskProcessorNoThrottle$1).scheduleTask({
+ minimumHeight: this._minimumHeight,
+ maximumHeight: this._maximumHeight,
+ quantizedVertices: this._quantizedVertices,
+ octEncodedNormals: this._encodedNormals,
+ includeWebMercatorT: !0,
+ indices: this._indices,
+ westIndices: this._westIndices,
+ southIndices: this._southIndices,
+ eastIndices: this._eastIndices,
+ northIndices: this._northIndices,
+ westSkirtHeight: this._westSkirtHeight,
+ southSkirtHeight: this._southSkirtHeight,
+ eastSkirtHeight: this._eastSkirtHeight,
+ northSkirtHeight: this._northSkirtHeight,
+ rectangle: d,
+ relativeToCenter: this._boundingSphere.center,
+ ellipsoid: l,
+ exaggeration: o,
+ exaggerationRelativeHeight: s
+ });
+ if (!defined(h))
+ return;
+ const p = this;
+ return Promise.resolve(h).then(function(m) {
+ const _ = p._quantizedVertices.length / 3, y = _ + p._westIndices.length + p._southIndices.length + p._eastIndices.length + p._northIndices.length, C = IndexDatatype$1.createTypedArray(
+ y,
+ m.indices
+ ), T = new Float32Array(m.vertices), x = m.center, b = m.minimumHeight, S = m.maximumHeight, E = p._boundingSphere, A = p._orientedBoundingBox, D = defaultValue(
+ Cartesian3.clone(m.occludeePointInScaledSpace),
+ p._horizonOcclusionPoint
+ ), P = m.vertexStride, I = TerrainEncoding.clone(m.encoding);
+ return p._mesh = new TerrainMesh(
+ x,
+ T,
+ C,
+ m.indexCountWithoutSkirts,
+ _,
+ b,
+ S,
+ E,
+ D,
+ P,
+ A,
+ I,
+ m.westIndicesSouthToNorth,
+ m.southIndicesEastToWest,
+ m.eastIndicesNorthToSouth,
+ m.northIndicesWestToEast
+ ), p._quantizedVertices = void 0, p._encodedNormals = void 0, p._indices = void 0, p._uValues = void 0, p._vValues = void 0, p._heightValues = void 0, p._westIndices = void 0, p._southIndices = void 0, p._eastIndices = void 0, p._northIndices = void 0, p._mesh;
+ });
+};
+const upsampleTaskProcessor$1 = new TaskProcessor(
+ "upsampleQuantizedTerrainMesh",
+ TerrainData.maximumAsynchronousTasks
+);
+QuantizedMeshTerrainData.prototype.upsample = function(e, t, n, i, r, o, s) {
+ const c = this._mesh;
+ if (!defined(this._mesh))
+ return;
+ const l = t * 2 !== r, d = n * 2 === o, f = e.ellipsoid, h = e.tileXYToRectangle(
+ r,
+ o,
+ s
+ ), p = upsampleTaskProcessor$1.scheduleTask({
+ vertices: c.vertices,
+ vertexCountWithoutSkirts: c.vertexCountWithoutSkirts,
+ indices: c.indices,
+ indexCountWithoutSkirts: c.indexCountWithoutSkirts,
+ encoding: c.encoding,
+ minimumHeight: this._minimumHeight,
+ maximumHeight: this._maximumHeight,
+ isEastChild: l,
+ isNorthChild: d,
+ childRectangle: h,
+ ellipsoid: f
+ });
+ if (!defined(p))
+ return;
+ let m = Math.min(this._westSkirtHeight, this._eastSkirtHeight);
+ m = Math.min(m, this._southSkirtHeight), m = Math.min(m, this._northSkirtHeight);
+ const _ = l ? m * 0.5 : this._westSkirtHeight, y = d ? m * 0.5 : this._southSkirtHeight, C = l ? this._eastSkirtHeight : m * 0.5, T = d ? this._northSkirtHeight : m * 0.5, x = this._credits;
+ return Promise.resolve(p).then(function(b) {
+ const S = new Uint16Array(b.vertices), E = IndexDatatype$1.createTypedArray(
+ S.length / 3,
+ b.indices
+ );
+ let A;
+ return defined(b.encodedNormals) && (A = new Uint8Array(b.encodedNormals)), new QuantizedMeshTerrainData({
+ quantizedVertices: S,
+ indices: E,
+ encodedNormals: A,
+ minimumHeight: b.minimumHeight,
+ maximumHeight: b.maximumHeight,
+ boundingSphere: BoundingSphere.clone(b.boundingSphere),
+ orientedBoundingBox: OrientedBoundingBox.clone(
+ b.orientedBoundingBox
+ ),
+ horizonOcclusionPoint: Cartesian3.clone(b.horizonOcclusionPoint),
+ westIndices: b.westIndices,
+ southIndices: b.southIndices,
+ eastIndices: b.eastIndices,
+ northIndices: b.northIndices,
+ westSkirtHeight: _,
+ southSkirtHeight: y,
+ eastSkirtHeight: C,
+ northSkirtHeight: T,
+ childTileMask: 0,
+ credits: x,
+ createdByUpsampling: !0
+ });
+ });
+};
+const maxShort = 32767, barycentricCoordinateScratch$1 = new Cartesian3();
+QuantizedMeshTerrainData.prototype.interpolateHeight = function(e, t, n) {
+ let i = CesiumMath.clamp(
+ (t - e.west) / e.width,
+ 0,
+ 1
+ );
+ i *= maxShort;
+ let r = CesiumMath.clamp(
+ (n - e.south) / e.height,
+ 0,
+ 1
+ );
+ return r *= maxShort, defined(this._mesh) ? interpolateMeshHeight$1(this, i, r) : interpolateHeight$1(this, i, r);
+};
+function pointInBoundingBox(e, t, n, i, r, o, s, c) {
+ const l = Math.min(n, r, s), d = Math.max(n, r, s), f = Math.min(i, o, c), h = Math.max(i, o, c);
+ return e >= l && e <= d && t >= f && t <= h;
+}
+const texCoordScratch0$1 = new Cartesian2(), texCoordScratch1$1 = new Cartesian2(), texCoordScratch2$1 = new Cartesian2();
+function interpolateMeshHeight$1(e, t, n) {
+ const i = e._mesh, r = i.vertices, o = i.encoding, s = i.indices;
+ for (let c = 0, l = s.length; c < l; c += 3) {
+ const d = s[c], f = s[c + 1], h = s[c + 2], p = o.decodeTextureCoordinates(
+ r,
+ d,
+ texCoordScratch0$1
+ ), m = o.decodeTextureCoordinates(
+ r,
+ f,
+ texCoordScratch1$1
+ ), _ = o.decodeTextureCoordinates(
+ r,
+ h,
+ texCoordScratch2$1
+ );
+ if (pointInBoundingBox(t, n, p.x, p.y, m.x, m.y, _.x, _.y)) {
+ const y = Intersections2D.computeBarycentricCoordinates(
+ t,
+ n,
+ p.x,
+ p.y,
+ m.x,
+ m.y,
+ _.x,
+ _.y,
+ barycentricCoordinateScratch$1
+ );
+ if (y.x >= -1e-15 && y.y >= -1e-15 && y.z >= -1e-15) {
+ const C = o.decodeHeight(r, d), T = o.decodeHeight(r, f), x = o.decodeHeight(r, h);
+ return y.x * C + y.y * T + y.z * x;
+ }
+ }
+ }
+}
+function interpolateHeight$1(e, t, n) {
+ const i = e._uValues, r = e._vValues, o = e._heightValues, s = e._indices;
+ for (let c = 0, l = s.length; c < l; c += 3) {
+ const d = s[c], f = s[c + 1], h = s[c + 2], p = i[d], m = i[f], _ = i[h], y = r[d], C = r[f], T = r[h];
+ if (pointInBoundingBox(t, n, p, y, m, C, _, T)) {
+ const x = Intersections2D.computeBarycentricCoordinates(
+ t,
+ n,
+ p,
+ y,
+ m,
+ C,
+ _,
+ T,
+ barycentricCoordinateScratch$1
+ );
+ if (x.x >= -1e-15 && x.y >= -1e-15 && x.z >= -1e-15) {
+ const b = x.x * o[d] + x.y * o[f] + x.z * o[h];
+ return CesiumMath.lerp(
+ e._minimumHeight,
+ e._maximumHeight,
+ b / maxShort
+ );
+ }
+ }
+ }
+}
+QuantizedMeshTerrainData.prototype.isChildAvailable = function(e, t, n, i) {
+ let r = 2;
+ return n !== e * 2 && ++r, i !== t * 2 && (r -= 2), (this._childTileMask & 1 << r) !== 0;
+};
+QuantizedMeshTerrainData.prototype.wasCreatedByUpsampling = function() {
+ return this._createdByUpsampling;
+};
+function LayerInformation(e) {
+ this.resource = e.resource, this.version = e.version, this.isHeightmap = e.isHeightmap, this.tileUrlTemplates = e.tileUrlTemplates, this.availability = e.availability, this.hasVertexNormals = e.hasVertexNormals, this.hasWaterMask = e.hasWaterMask, this.hasMetadata = e.hasMetadata, this.availabilityLevels = e.availabilityLevels, this.availabilityTilesLoaded = e.availabilityTilesLoaded, this.littleEndianExtensionSize = e.littleEndianExtensionSize, this.availabilityPromiseCache = {};
+}
+function TerrainProviderBuilder$1(e) {
+ this.requestVertexNormals = defaultValue(e.requestVertexNormals, !1), this.requestWaterMask = defaultValue(e.requestWaterMask, !1), this.requestMetadata = defaultValue(e.requestMetadata, !0), this.ellipsoid = defaultValue(e.ellipsoid, Ellipsoid.default), this.heightmapWidth = 65, this.heightmapStructure = void 0, this.hasWaterMask = !1, this.hasMetadata = !1, this.hasVertexNormals = !1, this.scheme = void 0, this.lastResource = void 0, this.layerJsonResource = void 0, this.previousError = void 0, this.availability = void 0, this.tilingScheme = void 0, this.levelZeroMaximumGeometricError = void 0, this.heightmapStructure = void 0, this.layers = [], this.attribution = "", this.overallAvailability = [], this.overallMaxZoom = 0, this.tileCredits = [];
+}
+TerrainProviderBuilder$1.prototype.build = function(e) {
+ e._heightmapWidth = this.heightmapWidth, e._scheme = this.scheme;
+ const t = defined(this.lastResource.credits) ? this.lastResource.credits : [];
+ e._tileCredits = t.concat(this.tileCredits), e._availability = this.availability, e._tilingScheme = this.tilingScheme, e._requestWaterMask = this.requestWaterMask, e._levelZeroMaximumGeometricError = this.levelZeroMaximumGeometricError, e._heightmapStructure = this.heightmapStructure, e._layers = this.layers, e._hasWaterMask = this.hasWaterMask, e._hasVertexNormals = this.hasVertexNormals, e._hasMetadata = this.hasMetadata;
+};
+async function parseMetadataSuccess(e, t, n) {
+ if (!t.format) {
+ const y = "The tile format is not specified in the layer.json file.";
+ throw e.previousError = TileProviderError.reportError(
+ e.previousError,
+ n,
+ defined(n) ? n._errorEvent : void 0,
+ y
+ ), new RuntimeError(y);
+ }
+ if (!t.tiles || t.tiles.length === 0) {
+ const y = "The layer.json file does not specify any tile URL templates.";
+ throw e.previousError = TileProviderError.reportError(
+ e.previousError,
+ n,
+ defined(n) ? n._errorEvent : void 0,
+ y
+ ), new RuntimeError(y);
+ }
+ let i = !1, r = !1, o = !1, s = !0, c = !1;
+ if (t.format === "heightmap-1.0")
+ c = !0, defined(e.heightmapStructure) || (e.heightmapStructure = {
+ heightScale: 1 / 5,
+ heightOffset: -1e3,
+ elementsPerHeight: 1,
+ stride: 1,
+ elementMultiplier: 256,
+ isBigEndian: !1,
+ lowestEncodedHeight: 0,
+ highestEncodedHeight: 256 * 256 - 1
+ }), r = !0, e.requestWaterMask = !0;
+ else if (t.format.indexOf("quantized-mesh-1.") !== 0) {
+ const y = `The tile format "${t.format}" is invalid or not supported.`;
+ throw e.previousError = TileProviderError.reportError(
+ e.previousError,
+ n,
+ defined(n) ? n._errorEvent : void 0,
+ y
+ ), new RuntimeError(y);
+ }
+ const l = t.tiles, d = t.maxzoom;
+ if (e.overallMaxZoom = Math.max(
+ e.overallMaxZoom,
+ d
+ ), !t.projection || t.projection === "EPSG:4326")
+ e.tilingScheme = new GeographicTilingScheme({
+ numberOfLevelZeroTilesX: 2,
+ numberOfLevelZeroTilesY: 1,
+ ellipsoid: e.ellipsoid
+ });
+ else if (t.projection === "EPSG:3857")
+ e.tilingScheme = new WebMercatorTilingScheme({
+ numberOfLevelZeroTilesX: 1,
+ numberOfLevelZeroTilesY: 1,
+ ellipsoid: e.ellipsoid
+ });
+ else {
+ const y = `The projection "${t.projection}" is invalid or not supported.`;
+ throw e.previousError = TileProviderError.reportError(
+ e.previousError,
+ n,
+ defined(n) ? n._errorEvent : void 0,
+ y
+ ), new RuntimeError(y);
+ }
+ if (e.levelZeroMaximumGeometricError = TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap(
+ e.tilingScheme.ellipsoid,
+ e.heightmapWidth,
+ e.tilingScheme.getNumberOfXTilesAtLevel(0)
+ ), !t.scheme || t.scheme === "tms" || t.scheme === "slippyMap")
+ e.scheme = t.scheme;
+ else {
+ const y = `The scheme "${t.scheme}" is invalid or not supported.`;
+ throw e.previousError = TileProviderError.reportError(
+ e.previousError,
+ n,
+ defined(n) ? n._errorEvent : void 0,
+ y
+ ), new RuntimeError(y);
+ }
+ let f;
+ defined(t.extensions) && t.extensions.indexOf("octvertexnormals") !== -1 ? i = !0 : defined(t.extensions) && t.extensions.indexOf("vertexnormals") !== -1 && (i = !0, s = !1), defined(t.extensions) && t.extensions.indexOf("watermask") !== -1 && (r = !0), defined(t.extensions) && t.extensions.indexOf("metadata") !== -1 && (o = !0);
+ const h = t.metadataAvailability, p = t.available;
+ let m;
+ if (defined(p) && !defined(h)) {
+ m = new TileAvailability(
+ e.tilingScheme,
+ p.length
+ );
+ for (let y = 0; y < p.length; ++y) {
+ const C = p[y], T = e.tilingScheme.getNumberOfYTilesAtLevel(
+ y
+ );
+ defined(e.overallAvailability[y]) || (e.overallAvailability[y] = []);
+ for (let x = 0; x < C.length; ++x) {
+ const b = C[x], S = T - b.endY - 1, E = T - b.startY - 1;
+ e.overallAvailability[y].push([
+ b.startX,
+ S,
+ b.endX,
+ E
+ ]), m.addAvailableTileRange(
+ y,
+ b.startX,
+ S,
+ b.endX,
+ E
+ );
+ }
+ }
+ } else defined(h) && (f = new TileAvailability(
+ e.tilingScheme,
+ d
+ ), m = new TileAvailability(
+ e.tilingScheme,
+ d
+ ), e.overallAvailability[0] = [[0, 0, 1, 0]], m.addAvailableTileRange(0, 0, 0, 1, 0));
+ e.hasWaterMask = e.hasWaterMask || r, e.hasVertexNormals = e.hasVertexNormals || i, e.hasMetadata = e.hasMetadata || o, defined(t.attribution) && (e.attribution.length > 0 && (e.attribution += " "), e.attribution += t.attribution), e.layers.push(
+ new LayerInformation({
+ resource: e.lastResource,
+ version: t.version,
+ isHeightmap: c,
+ tileUrlTemplates: l,
+ availability: m,
+ hasVertexNormals: i,
+ hasWaterMask: r,
+ hasMetadata: o,
+ availabilityLevels: h,
+ availabilityTilesLoaded: f,
+ littleEndianExtensionSize: s
+ })
+ );
+ const _ = t.parentUrl;
+ return defined(_) ? defined(m) ? (e.lastResource = e.lastResource.getDerivedResource(
+ {
+ url: _
+ }
+ ), e.lastResource.appendForwardSlash(), e.layerJsonResource = e.lastResource.getDerivedResource(
+ {
+ url: "layer.json"
+ }
+ ), await requestLayerJson(e), !0) : (console.log(
+ "A layer.json can't have a parentUrl if it does't have an available array."
+ ), !0) : !0;
+}
+function parseMetadataFailure(e, t, n) {
+ let i = `An error occurred while accessing ${e.layerJsonResource.url}.`;
+ if (defined(t) && (i += `
+${t.message}`), e.previousError = TileProviderError.reportError(
+ e.previousError,
+ n,
+ defined(n) ? n._errorEvent : void 0,
+ i
+ ), e.previousError.retry)
+ return requestLayerJson(e, n);
+ throw new RuntimeError(i);
+}
+async function metadataSuccess$1(e, t, n) {
+ await parseMetadataSuccess(e, t, n);
+ const i = e.overallAvailability.length;
+ if (i > 0) {
+ const r = e.availability = new TileAvailability(
+ e.tilingScheme,
+ e.overallMaxZoom
+ );
+ for (let o = 0; o < i; ++o) {
+ const s = e.overallAvailability[o];
+ for (let c = 0; c < s.length; ++c) {
+ const l = s[c];
+ r.addAvailableTileRange(
+ o,
+ l[0],
+ l[1],
+ l[2],
+ l[3]
+ );
+ }
+ }
+ }
+ if (e.attribution.length > 0) {
+ const r = new Credit(e.attribution);
+ e.tileCredits.push(r);
+ }
+ return !0;
+}
+async function requestLayerJson(e, t) {
+ try {
+ const n = await e.layerJsonResource.fetchJson();
+ return metadataSuccess$1(e, n, t);
+ } catch (n) {
+ return defined(n) && n.statusCode === 404 ? (await parseMetadataSuccess(
+ e,
+ {
+ tilejson: "2.1.0",
+ format: "heightmap-1.0",
+ version: "1.0.0",
+ scheme: "tms",
+ tiles: ["{z}/{x}/{y}.terrain?v={version}"]
+ },
+ t
+ ), !0) : parseMetadataFailure(e, n, t);
+ }
+}
+function CesiumTerrainProvider(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._heightmapWidth = void 0, this._heightmapStructure = void 0, this._hasWaterMask = !1, this._hasVertexNormals = !1, this._hasMetadata = !1, this._scheme = void 0, this._ellipsoid = e.ellipsoid, this._requestVertexNormals = defaultValue(
+ e.requestVertexNormals,
+ !1
+ ), this._requestWaterMask = defaultValue(e.requestWaterMask, !1), this._requestMetadata = defaultValue(e.requestMetadata, !0), this._errorEvent = new Event();
+ let t = e.credit;
+ typeof t == "string" && (t = new Credit(t)), this._credit = t, this._availability = void 0, this._tilingScheme = void 0, this._levelZeroMaximumGeometricError = void 0, this._layers = void 0, this._tileCredits = void 0;
+}
+const QuantizedMeshExtensionIds = {
+ /**
+ * Oct-Encoded Per-Vertex Normals are included as an extension to the tile mesh
+ *
+ * @type {number}
+ * @constant
+ * @default 1
+ */
+ OCT_VERTEX_NORMALS: 1,
+ /**
+ * A watermask is included as an extension to the tile mesh
+ *
+ * @type {number}
+ * @constant
+ * @default 2
+ */
+ WATER_MASK: 2,
+ /**
+ * A json object contain metadata about the tile
+ *
+ * @type {number}
+ * @constant
+ * @default 4
+ */
+ METADATA: 4
+};
+function getRequestHeader(e) {
+ return !defined(e) || e.length === 0 ? {
+ Accept: "application/vnd.quantized-mesh,application/octet-stream;q=0.9,*/*;q=0.01"
+ } : {
+ Accept: `application/vnd.quantized-mesh;extensions=${e.join("-")},application/octet-stream;q=0.9,*/*;q=0.01`
+ };
+}
+function createHeightmapTerrainData(e, t, n, i, r) {
+ const o = new Uint16Array(
+ t,
+ 0,
+ e._heightmapWidth * e._heightmapWidth
+ );
+ return new HeightmapTerrainData({
+ buffer: o,
+ childTileMask: new Uint8Array(t, o.byteLength, 1)[0],
+ waterMask: new Uint8Array(
+ t,
+ o.byteLength + 1,
+ t.byteLength - o.byteLength - 1
+ ),
+ width: e._heightmapWidth,
+ height: e._heightmapWidth,
+ structure: e._heightmapStructure,
+ credits: e._tileCredits
+ });
+}
+function createQuantizedMeshTerrainData(e, t, n, i, r, o) {
+ const s = o.littleEndianExtensionSize;
+ let c = 0;
+ const l = 3, d = l + 1, f = Float64Array.BYTES_PER_ELEMENT * l, h = Float64Array.BYTES_PER_ELEMENT * d, m = Uint16Array.BYTES_PER_ELEMENT * 3, _ = 3;
+ let y = Uint16Array.BYTES_PER_ELEMENT, C = y * _;
+ const T = new DataView(t), x = new Cartesian3(
+ T.getFloat64(c, !0),
+ T.getFloat64(c + 8, !0),
+ T.getFloat64(c + 16, !0)
+ );
+ c += f;
+ const b = T.getFloat32(c, !0);
+ c += Float32Array.BYTES_PER_ELEMENT;
+ const S = T.getFloat32(c, !0);
+ c += Float32Array.BYTES_PER_ELEMENT;
+ const E = new BoundingSphere(
+ new Cartesian3(
+ T.getFloat64(c, !0),
+ T.getFloat64(c + 8, !0),
+ T.getFloat64(c + 16, !0)
+ ),
+ T.getFloat64(c + f, !0)
+ );
+ c += h;
+ const A = new Cartesian3(
+ T.getFloat64(c, !0),
+ T.getFloat64(c + 8, !0),
+ T.getFloat64(c + 16, !0)
+ );
+ c += f;
+ const D = T.getUint32(c, !0);
+ c += Uint32Array.BYTES_PER_ELEMENT;
+ const P = new Uint16Array(t, c, D * 3);
+ c += D * m, D > 64 * 1024 && (y = Uint32Array.BYTES_PER_ELEMENT, C = y * _);
+ const I = P.subarray(0, D), M = P.subarray(D, 2 * D), R = P.subarray(
+ D * 2,
+ 3 * D
+ );
+ AttributeCompression.zigZagDeltaDecode(I, M, R), c % y !== 0 && (c += y - c % y);
+ const L = T.getUint32(c, !0);
+ c += Uint32Array.BYTES_PER_ELEMENT;
+ const g = IndexDatatype$1.createTypedArrayFromArrayBuffer(
+ D,
+ t,
+ c,
+ L * _
+ );
+ c += L * C;
+ let w = 0;
+ const O = g.length;
+ for (let K = 0; K < O; ++K) {
+ const Z = g[K];
+ g[K] = w - Z, Z === 0 && ++w;
+ }
+ const N = T.getUint32(c, !0);
+ c += Uint32Array.BYTES_PER_ELEMENT;
+ const F = IndexDatatype$1.createTypedArrayFromArrayBuffer(
+ D,
+ t,
+ c,
+ N
+ );
+ c += N * y;
+ const B = T.getUint32(c, !0);
+ c += Uint32Array.BYTES_PER_ELEMENT;
+ const V = IndexDatatype$1.createTypedArrayFromArrayBuffer(
+ D,
+ t,
+ c,
+ B
+ );
+ c += B * y;
+ const U = T.getUint32(c, !0);
+ c += Uint32Array.BYTES_PER_ELEMENT;
+ const k = IndexDatatype$1.createTypedArrayFromArrayBuffer(
+ D,
+ t,
+ c,
+ U
+ );
+ c += U * y;
+ const $ = T.getUint32(c, !0);
+ c += Uint32Array.BYTES_PER_ELEMENT;
+ const G = IndexDatatype$1.createTypedArrayFromArrayBuffer(
+ D,
+ t,
+ c,
+ $
+ );
+ c += $ * y;
+ let q, z;
+ for (; c < T.byteLength; ) {
+ const K = T.getUint8(c, !0);
+ c += Uint8Array.BYTES_PER_ELEMENT;
+ const Z = T.getUint32(c, s);
+ if (c += Uint32Array.BYTES_PER_ELEMENT, K === QuantizedMeshExtensionIds.OCT_VERTEX_NORMALS && e._requestVertexNormals)
+ q = new Uint8Array(t, c, D * 2);
+ else if (K === QuantizedMeshExtensionIds.WATER_MASK && e._requestWaterMask)
+ z = new Uint8Array(t, c, Z);
+ else if (K === QuantizedMeshExtensionIds.METADATA && e._requestMetadata) {
+ const ee = T.getUint32(c, !0);
+ if (ee > 0) {
+ const X = getJsonFromTypedArray(
+ new Uint8Array(t),
+ c + Uint32Array.BYTES_PER_ELEMENT,
+ ee
+ ).available;
+ if (defined(X))
+ for (let fe = 0; fe < X.length; ++fe) {
+ const de = n + fe + 1, ce = X[fe], ye = e._tilingScheme.getNumberOfYTilesAtLevel(
+ de
+ );
+ for (let ge = 0; ge < ce.length; ++ge) {
+ const re = ce[ge], be = ye - re.endY - 1, pe = ye - re.startY - 1;
+ e.availability.addAvailableTileRange(
+ de,
+ re.startX,
+ be,
+ re.endX,
+ pe
+ ), o.availability.addAvailableTileRange(
+ de,
+ re.startX,
+ be,
+ re.endX,
+ pe
+ );
+ }
+ }
+ }
+ o.availabilityTilesLoaded.addAvailableTileRange(n, i, r, i, r);
+ }
+ c += Z;
+ }
+ const H = e.getLevelMaximumGeometricError(n) * 5, Q = e._tilingScheme.tileXYToRectangle(i, r, n), ne = OrientedBoundingBox.fromRectangle(
+ Q,
+ b,
+ S,
+ e._tilingScheme.ellipsoid
+ );
+ return new QuantizedMeshTerrainData({
+ center: x,
+ minimumHeight: b,
+ maximumHeight: S,
+ boundingSphere: E,
+ orientedBoundingBox: ne,
+ horizonOcclusionPoint: A,
+ quantizedVertices: P,
+ encodedNormals: q,
+ indices: g,
+ westIndices: F,
+ southIndices: V,
+ eastIndices: k,
+ northIndices: G,
+ westSkirtHeight: H,
+ southSkirtHeight: H,
+ eastSkirtHeight: H,
+ northSkirtHeight: H,
+ childTileMask: e.availability.computeChildMaskForTile(n, i, r),
+ waterMask: z,
+ credits: e._tileCredits
+ });
+}
+CesiumTerrainProvider.prototype.requestTileGeometry = function(e, t, n, i) {
+ const r = this._layers;
+ let o;
+ const s = r.length;
+ let c = !1, l = Promise.resolve();
+ if (s === 1)
+ o = r[0];
+ else
+ for (let d = 0; d < s; ++d) {
+ const f = r[d];
+ if (!defined(f.availability) || f.availability.isTileAvailable(n, e, t)) {
+ o = f;
+ break;
+ }
+ const h = checkLayer(
+ this,
+ e,
+ t,
+ n,
+ f,
+ d === 0
+ );
+ h.result && (c = !0, l = l.then(
+ () => h.promise
+ ));
+ }
+ return !defined(o) && c ? l.then(() => new Promise((d) => {
+ setTimeout(() => {
+ const f = this.requestTileGeometry(e, t, n, i);
+ d(f);
+ }, 0);
+ })) : requestTileGeometry(this, e, t, n, o, i);
+};
+function requestTileGeometry(e, t, n, i, r, o) {
+ if (!defined(r))
+ return Promise.reject(new RuntimeError("Terrain tile doesn't exist"));
+ const s = r.tileUrlTemplates;
+ if (s.length === 0)
+ return;
+ let c;
+ !e._scheme || e._scheme === "tms" ? c = e._tilingScheme.getNumberOfYTilesAtLevel(i) - n - 1 : c = n;
+ const l = [];
+ e._requestVertexNormals && r.hasVertexNormals && l.push(
+ r.littleEndianExtensionSize ? "octvertexnormals" : "vertexnormals"
+ ), e._requestWaterMask && r.hasWaterMask && l.push("watermask"), e._requestMetadata && r.hasMetadata && l.push("metadata");
+ let d, f;
+ const h = s[(t + c + i) % s.length], p = r.resource;
+ defined(p._ionEndpoint) && !defined(p._ionEndpoint.externalType) ? (l.length !== 0 && (f = { extensions: l.join("-") }), d = getRequestHeader(void 0)) : d = getRequestHeader(l);
+ const m = p.getDerivedResource({
+ url: h,
+ templateValues: {
+ version: r.version,
+ z: i,
+ x: t,
+ y: c
+ },
+ queryParameters: f,
+ headers: d,
+ request: o
+ }).fetchArrayBuffer();
+ if (defined(m))
+ return m.then(function(_) {
+ return defined(_) ? defined(e._heightmapStructure) ? createHeightmapTerrainData(e, _) : createQuantizedMeshTerrainData(
+ e,
+ _,
+ i,
+ t,
+ n,
+ r
+ ) : Promise.reject(new RuntimeError("Mesh buffer doesn't exist."));
+ });
+}
+Object.defineProperties(CesiumTerrainProvider.prototype, {
+ /**
+ * Gets an event that is raised when the terrain provider encounters an asynchronous error. By subscribing
+ * to the event, you will be notified of the error and can potentially recover from it. Event listeners
+ * are passed an instance of {@link TileProviderError}.
+ * @memberof CesiumTerrainProvider.prototype
+ * @type {Event}
+ * @readonly
+ */
+ errorEvent: {
+ get: function() {
+ return this._errorEvent;
+ }
+ },
+ /**
+ * Gets the credit to display when this terrain provider is active. Typically this is used to credit
+ * the source of the terrain.
+ * @memberof CesiumTerrainProvider.prototype
+ * @type {Credit}
+ * @readonly
+ */
+ credit: {
+ get: function() {
+ return this._credit;
+ }
+ },
+ /**
+ * Gets the tiling scheme used by this provider.
+ * @memberof CesiumTerrainProvider.prototype
+ * @type {GeographicTilingScheme}
+ * @readonly
+ */
+ tilingScheme: {
+ get: function() {
+ return this._tilingScheme;
+ }
+ },
+ /**
+ * Gets a value indicating whether or not the provider includes a water mask. The water mask
+ * indicates which areas of the globe are water rather than land, so they can be rendered
+ * as a reflective surface with animated waves.
+ * @memberof CesiumTerrainProvider.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ hasWaterMask: {
+ get: function() {
+ return this._hasWaterMask && this._requestWaterMask;
+ }
+ },
+ /**
+ * Gets a value indicating whether or not the requested tiles include vertex normals.
+ * @memberof CesiumTerrainProvider.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ hasVertexNormals: {
+ get: function() {
+ return this._hasVertexNormals && this._requestVertexNormals;
+ }
+ },
+ /**
+ * Gets a value indicating whether or not the requested tiles include metadata.
+ * @memberof CesiumTerrainProvider.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ hasMetadata: {
+ get: function() {
+ return this._hasMetadata && this._requestMetadata;
+ }
+ },
+ /**
+ * Boolean flag that indicates if the client should request vertex normals from the server.
+ * Vertex normals data is appended to the standard tile mesh data only if the client requests the vertex normals and
+ * if the server provides vertex normals.
+ * @memberof CesiumTerrainProvider.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ requestVertexNormals: {
+ get: function() {
+ return this._requestVertexNormals;
+ }
+ },
+ /**
+ * Boolean flag that indicates if the client should request a watermask from the server.
+ * Watermask data is appended to the standard tile mesh data only if the client requests the watermask and
+ * if the server provides a watermask.
+ * @memberof CesiumTerrainProvider.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ requestWaterMask: {
+ get: function() {
+ return this._requestWaterMask;
+ }
+ },
+ /**
+ * Boolean flag that indicates if the client should request metadata from the server.
+ * Metadata is appended to the standard tile mesh data only if the client requests the metadata and
+ * if the server provides a metadata.
+ * @memberof CesiumTerrainProvider.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ requestMetadata: {
+ get: function() {
+ return this._requestMetadata;
+ }
+ },
+ /**
+ * Gets an object that can be used to determine availability of terrain from this provider, such as
+ * at points and in rectangles. This property may be undefined if availability
+ * information is not available. Note that this reflects tiles that are known to be available currently.
+ * Additional tiles may be discovered to be available in the future, e.g. if availability information
+ * exists deeper in the tree rather than it all being discoverable at the root. However, a tile that
+ * is available now will not become unavailable in the future.
+ * @memberof CesiumTerrainProvider.prototype
+ * @type {TileAvailability}
+ * @readonly
+ */
+ availability: {
+ get: function() {
+ return this._availability;
+ }
+ }
+});
+CesiumTerrainProvider.prototype.getLevelMaximumGeometricError = function(e) {
+ return this._levelZeroMaximumGeometricError / (1 << e);
+};
+CesiumTerrainProvider.fromIonAssetId = async function(e, t) {
+ const n = await IonResource.fromAssetId(e);
+ return CesiumTerrainProvider.fromUrl(n, t);
+};
+CesiumTerrainProvider.fromUrl = async function(e, t) {
+ t = defaultValue(t, defaultValue.EMPTY_OBJECT), e = await Promise.resolve(e);
+ const n = Resource.createIfNeeded(e);
+ n.appendForwardSlash();
+ const i = new TerrainProviderBuilder$1(t);
+ i.lastResource = n, i.layerJsonResource = i.lastResource.getDerivedResource(
+ {
+ url: "layer.json"
+ }
+ ), await requestLayerJson(i);
+ const r = new CesiumTerrainProvider(t);
+ return i.build(r), r;
+};
+CesiumTerrainProvider.prototype.getTileDataAvailable = function(e, t, n) {
+ if (!defined(this._availability))
+ return;
+ if (n > this._availability._maximumLevel)
+ return !1;
+ if (this._availability.isTileAvailable(n, e, t))
+ return !0;
+ if (!this._hasMetadata)
+ return !1;
+ const i = this._layers, r = i.length;
+ for (let o = 0; o < r; ++o)
+ if (checkLayer(this, e, t, n, i[o], o === 0).result)
+ return;
+ return !1;
+};
+CesiumTerrainProvider.prototype.loadTileDataAvailability = function(e, t, n) {
+ if (!defined(this._availability) || n > this._availability._maximumLevel || this._availability.isTileAvailable(n, e, t) || !this._hasMetadata)
+ return;
+ const i = this._layers, r = i.length;
+ for (let o = 0; o < r; ++o) {
+ const s = checkLayer(this, e, t, n, i[o], o === 0);
+ if (defined(s.promise))
+ return s.promise;
+ }
+};
+function getAvailabilityTile(e, t, n, i) {
+ if (i === 0)
+ return;
+ const r = e.availabilityLevels, o = i % r === 0 ? i - r : (i / r | 0) * r, s = 1 << i - o, c = t / s | 0, l = n / s | 0;
+ return {
+ level: o,
+ x: c,
+ y: l
+ };
+}
+function checkLayer(e, t, n, i, r, o) {
+ if (!defined(r.availabilityLevels))
+ return {
+ result: !1
+ };
+ let s;
+ const c = function() {
+ delete r.availabilityPromiseCache[s];
+ }, l = r.availabilityTilesLoaded, d = r.availability;
+ let f = getAvailabilityTile(r, t, n, i);
+ for (; defined(f); ) {
+ if (d.isTileAvailable(f.level, f.x, f.y) && !l.isTileAvailable(f.level, f.x, f.y)) {
+ let h;
+ if (!o && (s = `${f.level}-${f.x}-${f.y}`, h = r.availabilityPromiseCache[s], !defined(h))) {
+ const p = new Request({
+ throttle: !1,
+ throttleByServer: !0,
+ type: RequestType$1.TERRAIN
+ });
+ h = requestTileGeometry(
+ e,
+ f.x,
+ f.y,
+ f.level,
+ r,
+ p
+ ), defined(h) && (r.availabilityPromiseCache[s] = h, h.then(c));
+ }
+ return {
+ result: !0,
+ promise: h
+ };
+ }
+ f = getAvailabilityTile(r, f.x, f.y, f.level);
+ }
+ return {
+ result: !1
+ };
+}
+CesiumTerrainProvider._getAvailabilityTile = getAvailabilityTile;
+function CircleGeometry(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.radius, n = {
+ center: e.center,
+ semiMajorAxis: t,
+ semiMinorAxis: t,
+ ellipsoid: e.ellipsoid,
+ height: e.height,
+ extrudedHeight: e.extrudedHeight,
+ granularity: e.granularity,
+ vertexFormat: e.vertexFormat,
+ stRotation: e.stRotation,
+ shadowVolume: e.shadowVolume
+ };
+ this._ellipseGeometry = new EllipseGeometry(n), this._workerName = "createCircleGeometry";
+}
+CircleGeometry.packedLength = EllipseGeometry.packedLength;
+CircleGeometry.pack = function(e, t, n) {
+ return EllipseGeometry.pack(e._ellipseGeometry, t, n);
+};
+const scratchEllipseGeometry$1 = new EllipseGeometry({
+ center: new Cartesian3(),
+ semiMajorAxis: 1,
+ semiMinorAxis: 1
+}), scratchOptions$2 = {
+ center: new Cartesian3(),
+ radius: void 0,
+ ellipsoid: Ellipsoid.clone(Ellipsoid.default),
+ height: void 0,
+ extrudedHeight: void 0,
+ granularity: void 0,
+ vertexFormat: new VertexFormat(),
+ stRotation: void 0,
+ semiMajorAxis: void 0,
+ semiMinorAxis: void 0,
+ shadowVolume: void 0
+};
+CircleGeometry.unpack = function(e, t, n) {
+ const i = EllipseGeometry.unpack(
+ e,
+ t,
+ scratchEllipseGeometry$1
+ );
+ return scratchOptions$2.center = Cartesian3.clone(
+ i._center,
+ scratchOptions$2.center
+ ), scratchOptions$2.ellipsoid = Ellipsoid.clone(
+ i._ellipsoid,
+ scratchOptions$2.ellipsoid
+ ), scratchOptions$2.ellipsoid = Ellipsoid.clone(
+ i._ellipsoid,
+ scratchEllipseGeometry$1._ellipsoid
+ ), scratchOptions$2.height = i._height, scratchOptions$2.extrudedHeight = i._extrudedHeight, scratchOptions$2.granularity = i._granularity, scratchOptions$2.vertexFormat = VertexFormat.clone(
+ i._vertexFormat,
+ scratchOptions$2.vertexFormat
+ ), scratchOptions$2.stRotation = i._stRotation, scratchOptions$2.shadowVolume = i._shadowVolume, defined(n) ? (scratchOptions$2.semiMajorAxis = i._semiMajorAxis, scratchOptions$2.semiMinorAxis = i._semiMinorAxis, n._ellipseGeometry = new EllipseGeometry(scratchOptions$2), n) : (scratchOptions$2.radius = i._semiMajorAxis, new CircleGeometry(scratchOptions$2));
+};
+CircleGeometry.createGeometry = function(e) {
+ return EllipseGeometry.createGeometry(e._ellipseGeometry);
+};
+CircleGeometry.createShadowVolume = function(e, t, n) {
+ const i = e._ellipseGeometry._granularity, r = e._ellipseGeometry._ellipsoid, o = t(i, r), s = n(i, r);
+ return new CircleGeometry({
+ center: e._ellipseGeometry._center,
+ radius: e._ellipseGeometry._semiMajorAxis,
+ ellipsoid: r,
+ stRotation: e._ellipseGeometry._stRotation,
+ granularity: i,
+ extrudedHeight: o,
+ height: s,
+ vertexFormat: VertexFormat.POSITION_ONLY,
+ shadowVolume: !0
+ });
+};
+Object.defineProperties(CircleGeometry.prototype, {
+ /**
+ * @private
+ */
+ rectangle: {
+ get: function() {
+ return this._ellipseGeometry.rectangle;
+ }
+ },
+ /**
+ * For remapping texture coordinates when rendering CircleGeometries as GroundPrimitives.
+ * @private
+ */
+ textureCoordinateRotationPoints: {
+ get: function() {
+ return this._ellipseGeometry.textureCoordinateRotationPoints;
+ }
+ }
+});
+function CircleOutlineGeometry(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.radius, n = {
+ center: e.center,
+ semiMajorAxis: t,
+ semiMinorAxis: t,
+ ellipsoid: e.ellipsoid,
+ height: e.height,
+ extrudedHeight: e.extrudedHeight,
+ granularity: e.granularity,
+ numberOfVerticalLines: e.numberOfVerticalLines
+ };
+ this._ellipseGeometry = new EllipseOutlineGeometry(n), this._workerName = "createCircleOutlineGeometry";
+}
+CircleOutlineGeometry.packedLength = EllipseOutlineGeometry.packedLength;
+CircleOutlineGeometry.pack = function(e, t, n) {
+ return EllipseOutlineGeometry.pack(
+ e._ellipseGeometry,
+ t,
+ n
+ );
+};
+const scratchEllipseGeometry = new EllipseOutlineGeometry({
+ center: new Cartesian3(),
+ semiMajorAxis: 1,
+ semiMinorAxis: 1
+}), scratchOptions$1 = {
+ center: new Cartesian3(),
+ radius: void 0,
+ ellipsoid: Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),
+ height: void 0,
+ extrudedHeight: void 0,
+ granularity: void 0,
+ numberOfVerticalLines: void 0,
+ semiMajorAxis: void 0,
+ semiMinorAxis: void 0
+};
+CircleOutlineGeometry.unpack = function(e, t, n) {
+ const i = EllipseOutlineGeometry.unpack(
+ e,
+ t,
+ scratchEllipseGeometry
+ );
+ return scratchOptions$1.center = Cartesian3.clone(
+ i._center,
+ scratchOptions$1.center
+ ), scratchOptions$1.ellipsoid = Ellipsoid.clone(
+ i._ellipsoid,
+ scratchOptions$1.ellipsoid
+ ), scratchOptions$1.height = i._height, scratchOptions$1.extrudedHeight = i._extrudedHeight, scratchOptions$1.granularity = i._granularity, scratchOptions$1.numberOfVerticalLines = i._numberOfVerticalLines, defined(n) ? (scratchOptions$1.semiMajorAxis = i._semiMajorAxis, scratchOptions$1.semiMinorAxis = i._semiMinorAxis, n._ellipseGeometry = new EllipseOutlineGeometry(scratchOptions$1), n) : (scratchOptions$1.radius = i._semiMajorAxis, new CircleOutlineGeometry(scratchOptions$1));
+};
+CircleOutlineGeometry.createGeometry = function(e) {
+ return EllipseOutlineGeometry.createGeometry(e._ellipseGeometry);
+};
+function CustomHeightmapTerrainProvider(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._callback = e.callback, this._tilingScheme = e.tilingScheme, defined(this._tilingScheme) || (this._tilingScheme = new GeographicTilingScheme({
+ ellipsoid: defaultValue(e.ellipsoid, Ellipsoid.default)
+ })), this._width = e.width, this._height = e.height;
+ const t = Math.max(this._width, this._height);
+ this._levelZeroMaximumGeometricError = TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap(
+ this._tilingScheme.ellipsoid,
+ t,
+ this._tilingScheme.getNumberOfXTilesAtLevel(0)
+ ), this._errorEvent = new Event();
+ let n = e.credit;
+ typeof n == "string" && (n = new Credit(n)), this._credit = n;
+}
+Object.defineProperties(CustomHeightmapTerrainProvider.prototype, {
+ /**
+ * Gets an event that is raised when the terrain provider encounters an asynchronous error. By subscribing
+ * to the event, you will be notified of the error and can potentially recover from it. Event listeners
+ * are passed an instance of {@link TileProviderError}.
+ * @memberof CustomHeightmapTerrainProvider.prototype
+ * @type {Event}
+ * @readonly
+ */
+ errorEvent: {
+ get: function() {
+ return this._errorEvent;
+ }
+ },
+ /**
+ * Gets the credit to display when this terrain provider is active. Typically this is used to credit
+ * the source of the terrain.
+ * @memberof CustomHeightmapTerrainProvider.prototype
+ * @type {Credit}
+ * @readonly
+ */
+ credit: {
+ get: function() {
+ return this._credit;
+ }
+ },
+ /**
+ * Gets the tiling scheme used by this provider.
+ * @memberof CustomHeightmapTerrainProvider.prototype
+ * @type {TilingScheme}
+ * @readonly
+ */
+ tilingScheme: {
+ get: function() {
+ return this._tilingScheme;
+ }
+ },
+ /**
+ * Gets a value indicating whether or not the provider includes a water mask. The water mask
+ * indicates which areas of the globe are water rather than land, so they can be rendered
+ * as a reflective surface with animated waves.
+ * Water mask is not supported by {@link CustomHeightmapTerrainProvider}, so the return
+ * value will always be false.
+ * @memberof CustomHeightmapTerrainProvider.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ hasWaterMask: {
+ get: function() {
+ return !1;
+ }
+ },
+ /**
+ * Gets a value indicating whether or not the requested tiles include vertex normals.
+ * Vertex normals are not supported by {@link CustomHeightmapTerrainProvider}, so the return
+ * value will always be false.
+ * @memberof CustomHeightmapTerrainProvider.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ hasVertexNormals: {
+ get: function() {
+ return !1;
+ }
+ },
+ /**
+ * Gets an object that can be used to determine availability of terrain from this provider, such as
+ * at points and in rectangles. This property may be undefined if availability
+ * information is not available.
+ * @memberof CustomHeightmapTerrainProvider.prototype
+ * @type {TileAvailability}
+ * @readonly
+ */
+ availability: {
+ get: function() {
+ }
+ },
+ /**
+ * Gets the number of columns per heightmap tile.
+ * @memberof CustomHeightmapTerrainProvider.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ width: {
+ get: function() {
+ return this._width;
+ }
+ },
+ /**
+ * Gets the number of rows per heightmap tile.
+ * @memberof CustomHeightmapTerrainProvider.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ height: {
+ get: function() {
+ return this._height;
+ }
+ }
+});
+CustomHeightmapTerrainProvider.prototype.requestTileGeometry = function(e, t, n, i) {
+ const r = this._callback(e, t, n);
+ if (!defined(r))
+ return;
+ const o = this._width, s = this._height;
+ return Promise.resolve(r).then(function(c) {
+ let l = c;
+ return Array.isArray(l) && (l = new Float64Array(l)), new HeightmapTerrainData({
+ buffer: l,
+ width: o,
+ height: s
+ });
+ });
+};
+CustomHeightmapTerrainProvider.prototype.getLevelMaximumGeometricError = function(e) {
+ return this._levelZeroMaximumGeometricError / (1 << e);
+};
+CustomHeightmapTerrainProvider.prototype.getTileDataAvailable = function(e, t, n) {
+};
+CustomHeightmapTerrainProvider.prototype.loadTileDataAvailability = function(e, t, n) {
+};
+function DefaultProxy(e) {
+ this.proxy = e;
+}
+DefaultProxy.prototype.getURL = function(e) {
+ const t = this.proxy.indexOf("?") === -1 ? "?" : "";
+ return this.proxy + t + encodeURIComponent(e);
+};
+const GeocodeType = {
+ /**
+ * Perform a search where the input is considered complete.
+ *
+ * @type {number}
+ * @constant
+ */
+ SEARCH: 0,
+ /**
+ * Perform an auto-complete using partial input, typically
+ * reserved for providing possible results as a user is typing.
+ *
+ * @type {number}
+ * @constant
+ */
+ AUTOCOMPLETE: 1
+}, GeocodeType$1 = Object.freeze(GeocodeType);
+function GeocoderService() {
+ DeveloperError.throwInstantiationError();
+}
+Object.defineProperties(GeocoderService.prototype, {
+ /**
+ * Gets the credit to display after a geocode is performed. Typically this is used to credit
+ * the geocoder service.
+ * @memberof GeocoderService.prototype
+ * @type {Credit|undefined}
+ * @readonly
+ */
+ credit: {
+ get: DeveloperError.throwInstantiationError
+ }
+});
+GeocoderService.getCreditsFromResult = function(e) {
+ if (defined(e.attributions))
+ return e.attributions.map(Credit.getIonCredit);
+};
+GeocoderService.prototype.geocode = DeveloperError.throwInstantiationError;
+function GeometryFactory() {
+ DeveloperError.throwInstantiationError();
+}
+GeometryFactory.createGeometry = function(e) {
+ DeveloperError.throwInstantiationError();
+};
+var protobuf$2 = { exports: {} };
+/*!
+ * protobuf.js v7.3.0 (c) 2016, daniel wirtz
+ * compiled fri, 10 may 2024 03:38:34 utc
+ * licensed under the bsd-3-clause license
+ * see: https://github.com/dcodeio/protobuf.js for details
+ */
+(function(module) {
+ (function(undefined$1) {
+ (function(t, n, i) {
+ function r(s) {
+ var c = n[s];
+ return c || t[s][0].call(c = n[s] = { exports: {} }, r, c, c.exports), c.exports;
+ }
+ var o = r(i[0]);
+ o.util.global.protobuf = o, module && module.exports && (module.exports = o);
+ })({ 1: [function(e, t, n) {
+ t.exports = i;
+ function i(r, o) {
+ for (var s = new Array(arguments.length - 1), c = 0, l = 2, d = !0; l < arguments.length; )
+ s[c++] = arguments[l++];
+ return new Promise(function(h, p) {
+ s[c] = function(_) {
+ if (d)
+ if (d = !1, _)
+ p(_);
+ else {
+ for (var y = new Array(arguments.length - 1), C = 0; C < y.length; )
+ y[C++] = arguments[C];
+ h.apply(null, y);
+ }
+ };
+ try {
+ r.apply(o || null, s);
+ } catch (m) {
+ d && (d = !1, p(m));
+ }
+ });
+ }
+ }, {}], 2: [function(e, t, n) {
+ var i = n;
+ i.length = function(d) {
+ var f = d.length;
+ if (!f)
+ return 0;
+ for (var h = 0; --f % 4 > 1 && d.charAt(f) === "="; )
+ ++h;
+ return Math.ceil(d.length * 3) / 4 - h;
+ };
+ for (var r = new Array(64), o = new Array(123), s = 0; s < 64; )
+ o[r[s] = s < 26 ? s + 65 : s < 52 ? s + 71 : s < 62 ? s - 4 : s - 59 | 43] = s++;
+ i.encode = function(d, f, h) {
+ for (var p = null, m = [], _ = 0, y = 0, C; f < h; ) {
+ var T = d[f++];
+ switch (y) {
+ case 0:
+ m[_++] = r[T >> 2], C = (T & 3) << 4, y = 1;
+ break;
+ case 1:
+ m[_++] = r[C | T >> 4], C = (T & 15) << 2, y = 2;
+ break;
+ case 2:
+ m[_++] = r[C | T >> 6], m[_++] = r[T & 63], y = 0;
+ break;
+ }
+ _ > 8191 && ((p || (p = [])).push(String.fromCharCode.apply(String, m)), _ = 0);
+ }
+ return y && (m[_++] = r[C], m[_++] = 61, y === 1 && (m[_++] = 61)), p ? (_ && p.push(String.fromCharCode.apply(String, m.slice(0, _))), p.join("")) : String.fromCharCode.apply(String, m.slice(0, _));
+ };
+ var c = "invalid encoding";
+ i.decode = function(d, f, h) {
+ for (var p = h, m = 0, _, y = 0; y < d.length; ) {
+ var C = d.charCodeAt(y++);
+ if (C === 61 && m > 1)
+ break;
+ if ((C = o[C]) === undefined$1)
+ throw Error(c);
+ switch (m) {
+ case 0:
+ _ = C, m = 1;
+ break;
+ case 1:
+ f[h++] = _ << 2 | (C & 48) >> 4, _ = C, m = 2;
+ break;
+ case 2:
+ f[h++] = (_ & 15) << 4 | (C & 60) >> 2, _ = C, m = 3;
+ break;
+ case 3:
+ f[h++] = (_ & 3) << 6 | C, m = 0;
+ break;
+ }
+ }
+ if (m === 1)
+ throw Error(c);
+ return h - p;
+ }, i.test = function(d) {
+ return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(d);
+ };
+ }, {}], 3: [function(e, t, n) {
+ t.exports = i;
+ function i() {
+ this._listeners = {};
+ }
+ i.prototype.on = function(o, s, c) {
+ return (this._listeners[o] || (this._listeners[o] = [])).push({
+ fn: s,
+ ctx: c || this
+ }), this;
+ }, i.prototype.off = function(o, s) {
+ if (o === undefined$1)
+ this._listeners = {};
+ else if (s === undefined$1)
+ this._listeners[o] = [];
+ else
+ for (var c = this._listeners[o], l = 0; l < c.length; )
+ c[l].fn === s ? c.splice(l, 1) : ++l;
+ return this;
+ }, i.prototype.emit = function(o) {
+ var s = this._listeners[o];
+ if (s) {
+ for (var c = [], l = 1; l < arguments.length; )
+ c.push(arguments[l++]);
+ for (l = 0; l < s.length; )
+ s[l].fn.apply(s[l++].ctx, c);
+ }
+ return this;
+ };
+ }, {}], 4: [function(e, t, n) {
+ t.exports = i(i);
+ function i(l) {
+ return typeof Float32Array < "u" ? function() {
+ var d = new Float32Array([-0]), f = new Uint8Array(d.buffer), h = f[3] === 128;
+ function p(C, T, x) {
+ d[0] = C, T[x] = f[0], T[x + 1] = f[1], T[x + 2] = f[2], T[x + 3] = f[3];
+ }
+ function m(C, T, x) {
+ d[0] = C, T[x] = f[3], T[x + 1] = f[2], T[x + 2] = f[1], T[x + 3] = f[0];
+ }
+ l.writeFloatLE = h ? p : m, l.writeFloatBE = h ? m : p;
+ function _(C, T) {
+ return f[0] = C[T], f[1] = C[T + 1], f[2] = C[T + 2], f[3] = C[T + 3], d[0];
+ }
+ function y(C, T) {
+ return f[3] = C[T], f[2] = C[T + 1], f[1] = C[T + 2], f[0] = C[T + 3], d[0];
+ }
+ l.readFloatLE = h ? _ : y, l.readFloatBE = h ? y : _;
+ }() : function() {
+ function d(h, p, m, _) {
+ var y = p < 0 ? 1 : 0;
+ if (y && (p = -p), p === 0)
+ h(1 / p > 0 ? (
+ /* positive */
+ 0
+ ) : (
+ /* negative 0 */
+ 2147483648
+ ), m, _);
+ else if (isNaN(p))
+ h(2143289344, m, _);
+ else if (p > 34028234663852886e22)
+ h((y << 31 | 2139095040) >>> 0, m, _);
+ else if (p < 11754943508222875e-54)
+ h((y << 31 | Math.round(p / 1401298464324817e-60)) >>> 0, m, _);
+ else {
+ var C = Math.floor(Math.log(p) / Math.LN2), T = Math.round(p * Math.pow(2, -C) * 8388608) & 8388607;
+ h((y << 31 | C + 127 << 23 | T) >>> 0, m, _);
+ }
+ }
+ l.writeFloatLE = d.bind(null, r), l.writeFloatBE = d.bind(null, o);
+ function f(h, p, m) {
+ var _ = h(p, m), y = (_ >> 31) * 2 + 1, C = _ >>> 23 & 255, T = _ & 8388607;
+ return C === 255 ? T ? NaN : y * (1 / 0) : C === 0 ? y * 1401298464324817e-60 * T : y * Math.pow(2, C - 150) * (T + 8388608);
+ }
+ l.readFloatLE = f.bind(null, s), l.readFloatBE = f.bind(null, c);
+ }(), typeof Float64Array < "u" ? function() {
+ var d = new Float64Array([-0]), f = new Uint8Array(d.buffer), h = f[7] === 128;
+ function p(C, T, x) {
+ d[0] = C, T[x] = f[0], T[x + 1] = f[1], T[x + 2] = f[2], T[x + 3] = f[3], T[x + 4] = f[4], T[x + 5] = f[5], T[x + 6] = f[6], T[x + 7] = f[7];
+ }
+ function m(C, T, x) {
+ d[0] = C, T[x] = f[7], T[x + 1] = f[6], T[x + 2] = f[5], T[x + 3] = f[4], T[x + 4] = f[3], T[x + 5] = f[2], T[x + 6] = f[1], T[x + 7] = f[0];
+ }
+ l.writeDoubleLE = h ? p : m, l.writeDoubleBE = h ? m : p;
+ function _(C, T) {
+ return f[0] = C[T], f[1] = C[T + 1], f[2] = C[T + 2], f[3] = C[T + 3], f[4] = C[T + 4], f[5] = C[T + 5], f[6] = C[T + 6], f[7] = C[T + 7], d[0];
+ }
+ function y(C, T) {
+ return f[7] = C[T], f[6] = C[T + 1], f[5] = C[T + 2], f[4] = C[T + 3], f[3] = C[T + 4], f[2] = C[T + 5], f[1] = C[T + 6], f[0] = C[T + 7], d[0];
+ }
+ l.readDoubleLE = h ? _ : y, l.readDoubleBE = h ? y : _;
+ }() : function() {
+ function d(h, p, m, _, y, C) {
+ var T = _ < 0 ? 1 : 0;
+ if (T && (_ = -_), _ === 0)
+ h(0, y, C + p), h(1 / _ > 0 ? (
+ /* positive */
+ 0
+ ) : (
+ /* negative 0 */
+ 2147483648
+ ), y, C + m);
+ else if (isNaN(_))
+ h(0, y, C + p), h(2146959360, y, C + m);
+ else if (_ > 17976931348623157e292)
+ h(0, y, C + p), h((T << 31 | 2146435072) >>> 0, y, C + m);
+ else {
+ var x;
+ if (_ < 22250738585072014e-324)
+ x = _ / 5e-324, h(x >>> 0, y, C + p), h((T << 31 | x / 4294967296) >>> 0, y, C + m);
+ else {
+ var b = Math.floor(Math.log(_) / Math.LN2);
+ b === 1024 && (b = 1023), x = _ * Math.pow(2, -b), h(x * 4503599627370496 >>> 0, y, C + p), h((T << 31 | b + 1023 << 20 | x * 1048576 & 1048575) >>> 0, y, C + m);
+ }
+ }
+ }
+ l.writeDoubleLE = d.bind(null, r, 0, 4), l.writeDoubleBE = d.bind(null, o, 4, 0);
+ function f(h, p, m, _, y) {
+ var C = h(_, y + p), T = h(_, y + m), x = (T >> 31) * 2 + 1, b = T >>> 20 & 2047, S = 4294967296 * (T & 1048575) + C;
+ return b === 2047 ? S ? NaN : x * (1 / 0) : b === 0 ? x * 5e-324 * S : x * Math.pow(2, b - 1075) * (S + 4503599627370496);
+ }
+ l.readDoubleLE = f.bind(null, s, 0, 4), l.readDoubleBE = f.bind(null, c, 4, 0);
+ }(), l;
+ }
+ function r(l, d, f) {
+ d[f] = l & 255, d[f + 1] = l >>> 8 & 255, d[f + 2] = l >>> 16 & 255, d[f + 3] = l >>> 24;
+ }
+ function o(l, d, f) {
+ d[f] = l >>> 24, d[f + 1] = l >>> 16 & 255, d[f + 2] = l >>> 8 & 255, d[f + 3] = l & 255;
+ }
+ function s(l, d) {
+ return (l[d] | l[d + 1] << 8 | l[d + 2] << 16 | l[d + 3] << 24) >>> 0;
+ }
+ function c(l, d) {
+ return (l[d] << 24 | l[d + 1] << 16 | l[d + 2] << 8 | l[d + 3]) >>> 0;
+ }
+ }, {}], 5: [function(require, module, exports) {
+ module.exports = inquire;
+ function inquire(moduleName) {
+ try {
+ var mod = eval("quire".replace(/^/, "re"))(moduleName);
+ if (mod && (mod.length || Object.keys(mod).length))
+ return mod;
+ } catch (e) {
+ }
+ return null;
+ }
+ }, {}], 6: [function(e, t, n) {
+ t.exports = i;
+ function i(r, o, s) {
+ var c = s || 8192, l = c >>> 1, d = null, f = c;
+ return function(p) {
+ if (p < 1 || p > l)
+ return r(p);
+ f + p > c && (d = r(c), f = 0);
+ var m = o.call(d, f, f += p);
+ return f & 7 && (f = (f | 7) + 1), m;
+ };
+ }
+ }, {}], 7: [function(e, t, n) {
+ var i = n;
+ i.length = function(o) {
+ for (var s = 0, c = 0, l = 0; l < o.length; ++l)
+ c = o.charCodeAt(l), c < 128 ? s += 1 : c < 2048 ? s += 2 : (c & 64512) === 55296 && (o.charCodeAt(l + 1) & 64512) === 56320 ? (++l, s += 4) : s += 3;
+ return s;
+ }, i.read = function(o, s, c) {
+ var l = c - s;
+ if (l < 1)
+ return "";
+ for (var d = null, f = [], h = 0, p; s < c; )
+ p = o[s++], p < 128 ? f[h++] = p : p > 191 && p < 224 ? f[h++] = (p & 31) << 6 | o[s++] & 63 : p > 239 && p < 365 ? (p = ((p & 7) << 18 | (o[s++] & 63) << 12 | (o[s++] & 63) << 6 | o[s++] & 63) - 65536, f[h++] = 55296 + (p >> 10), f[h++] = 56320 + (p & 1023)) : f[h++] = (p & 15) << 12 | (o[s++] & 63) << 6 | o[s++] & 63, h > 8191 && ((d || (d = [])).push(String.fromCharCode.apply(String, f)), h = 0);
+ return d ? (h && d.push(String.fromCharCode.apply(String, f.slice(0, h))), d.join("")) : String.fromCharCode.apply(String, f.slice(0, h));
+ }, i.write = function(o, s, c) {
+ for (var l = c, d, f, h = 0; h < o.length; ++h)
+ d = o.charCodeAt(h), d < 128 ? s[c++] = d : d < 2048 ? (s[c++] = d >> 6 | 192, s[c++] = d & 63 | 128) : (d & 64512) === 55296 && ((f = o.charCodeAt(h + 1)) & 64512) === 56320 ? (d = 65536 + ((d & 1023) << 10) + (f & 1023), ++h, s[c++] = d >> 18 | 240, s[c++] = d >> 12 & 63 | 128, s[c++] = d >> 6 & 63 | 128, s[c++] = d & 63 | 128) : (s[c++] = d >> 12 | 224, s[c++] = d >> 6 & 63 | 128, s[c++] = d & 63 | 128);
+ return c - l;
+ };
+ }, {}], 8: [function(e, t, n) {
+ var i = n;
+ i.build = "minimal", i.Writer = e(16), i.BufferWriter = e(17), i.Reader = e(9), i.BufferReader = e(10), i.util = e(15), i.rpc = e(12), i.roots = e(11), i.configure = r;
+ function r() {
+ i.util._configure(), i.Writer._configure(i.BufferWriter), i.Reader._configure(i.BufferReader);
+ }
+ r();
+ }, { 10: 10, 11: 11, 12: 12, 15: 15, 16: 16, 17: 17, 9: 9 }], 9: [function(e, t, n) {
+ t.exports = l;
+ var i = e(15), r, o = i.LongBits, s = i.utf8;
+ function c(_, y) {
+ return RangeError("index out of range: " + _.pos + " + " + (y || 1) + " > " + _.len);
+ }
+ function l(_) {
+ this.buf = _, this.pos = 0, this.len = _.length;
+ }
+ var d = typeof Uint8Array < "u" ? function(y) {
+ if (y instanceof Uint8Array || Array.isArray(y))
+ return new l(y);
+ throw Error("illegal buffer");
+ } : function(y) {
+ if (Array.isArray(y))
+ return new l(y);
+ throw Error("illegal buffer");
+ }, f = function() {
+ return i.Buffer ? function(C) {
+ return (l.create = function(x) {
+ return i.Buffer.isBuffer(x) ? new r(x) : d(x);
+ })(C);
+ } : d;
+ };
+ l.create = f(), l.prototype._slice = i.Array.prototype.subarray || /* istanbul ignore next */
+ i.Array.prototype.slice, l.prototype.uint32 = /* @__PURE__ */ function() {
+ var y = 4294967295;
+ return function() {
+ if (y = (this.buf[this.pos] & 127) >>> 0, this.buf[this.pos++] < 128 || (y = (y | (this.buf[this.pos] & 127) << 7) >>> 0, this.buf[this.pos++] < 128) || (y = (y | (this.buf[this.pos] & 127) << 14) >>> 0, this.buf[this.pos++] < 128) || (y = (y | (this.buf[this.pos] & 127) << 21) >>> 0, this.buf[this.pos++] < 128) || (y = (y | (this.buf[this.pos] & 15) << 28) >>> 0, this.buf[this.pos++] < 128)) return y;
+ if ((this.pos += 5) > this.len)
+ throw this.pos = this.len, c(this, 10);
+ return y;
+ };
+ }(), l.prototype.int32 = function() {
+ return this.uint32() | 0;
+ }, l.prototype.sint32 = function() {
+ var y = this.uint32();
+ return y >>> 1 ^ -(y & 1) | 0;
+ };
+ function h() {
+ var _ = new o(0, 0), y = 0;
+ if (this.len - this.pos > 4) {
+ for (; y < 4; ++y)
+ if (_.lo = (_.lo | (this.buf[this.pos] & 127) << y * 7) >>> 0, this.buf[this.pos++] < 128)
+ return _;
+ if (_.lo = (_.lo | (this.buf[this.pos] & 127) << 28) >>> 0, _.hi = (_.hi | (this.buf[this.pos] & 127) >> 4) >>> 0, this.buf[this.pos++] < 128)
+ return _;
+ y = 0;
+ } else {
+ for (; y < 3; ++y) {
+ if (this.pos >= this.len)
+ throw c(this);
+ if (_.lo = (_.lo | (this.buf[this.pos] & 127) << y * 7) >>> 0, this.buf[this.pos++] < 128)
+ return _;
+ }
+ return _.lo = (_.lo | (this.buf[this.pos++] & 127) << y * 7) >>> 0, _;
+ }
+ if (this.len - this.pos > 4) {
+ for (; y < 5; ++y)
+ if (_.hi = (_.hi | (this.buf[this.pos] & 127) << y * 7 + 3) >>> 0, this.buf[this.pos++] < 128)
+ return _;
+ } else
+ for (; y < 5; ++y) {
+ if (this.pos >= this.len)
+ throw c(this);
+ if (_.hi = (_.hi | (this.buf[this.pos] & 127) << y * 7 + 3) >>> 0, this.buf[this.pos++] < 128)
+ return _;
+ }
+ throw Error("invalid varint encoding");
+ }
+ l.prototype.bool = function() {
+ return this.uint32() !== 0;
+ };
+ function p(_, y) {
+ return (_[y - 4] | _[y - 3] << 8 | _[y - 2] << 16 | _[y - 1] << 24) >>> 0;
+ }
+ l.prototype.fixed32 = function() {
+ if (this.pos + 4 > this.len)
+ throw c(this, 4);
+ return p(this.buf, this.pos += 4);
+ }, l.prototype.sfixed32 = function() {
+ if (this.pos + 4 > this.len)
+ throw c(this, 4);
+ return p(this.buf, this.pos += 4) | 0;
+ };
+ function m() {
+ if (this.pos + 8 > this.len)
+ throw c(this, 8);
+ return new o(p(this.buf, this.pos += 4), p(this.buf, this.pos += 4));
+ }
+ l.prototype.float = function() {
+ if (this.pos + 4 > this.len)
+ throw c(this, 4);
+ var y = i.float.readFloatLE(this.buf, this.pos);
+ return this.pos += 4, y;
+ }, l.prototype.double = function() {
+ if (this.pos + 8 > this.len)
+ throw c(this, 4);
+ var y = i.float.readDoubleLE(this.buf, this.pos);
+ return this.pos += 8, y;
+ }, l.prototype.bytes = function() {
+ var y = this.uint32(), C = this.pos, T = this.pos + y;
+ if (T > this.len)
+ throw c(this, y);
+ if (this.pos += y, Array.isArray(this.buf))
+ return this.buf.slice(C, T);
+ if (C === T) {
+ var x = i.Buffer;
+ return x ? x.alloc(0) : new this.buf.constructor(0);
+ }
+ return this._slice.call(this.buf, C, T);
+ }, l.prototype.string = function() {
+ var y = this.bytes();
+ return s.read(y, 0, y.length);
+ }, l.prototype.skip = function(y) {
+ if (typeof y == "number") {
+ if (this.pos + y > this.len)
+ throw c(this, y);
+ this.pos += y;
+ } else
+ do
+ if (this.pos >= this.len)
+ throw c(this);
+ while (this.buf[this.pos++] & 128);
+ return this;
+ }, l.prototype.skipType = function(_) {
+ switch (_) {
+ case 0:
+ this.skip();
+ break;
+ case 1:
+ this.skip(8);
+ break;
+ case 2:
+ this.skip(this.uint32());
+ break;
+ case 3:
+ for (; (_ = this.uint32() & 7) !== 4; )
+ this.skipType(_);
+ break;
+ case 5:
+ this.skip(4);
+ break;
+ default:
+ throw Error("invalid wire type " + _ + " at offset " + this.pos);
+ }
+ return this;
+ }, l._configure = function(_) {
+ r = _, l.create = f(), r._configure();
+ var y = i.Long ? "toLong" : (
+ /* istanbul ignore next */
+ "toNumber"
+ );
+ i.merge(l.prototype, {
+ int64: function() {
+ return h.call(this)[y](!1);
+ },
+ uint64: function() {
+ return h.call(this)[y](!0);
+ },
+ sint64: function() {
+ return h.call(this).zzDecode()[y](!1);
+ },
+ fixed64: function() {
+ return m.call(this)[y](!0);
+ },
+ sfixed64: function() {
+ return m.call(this)[y](!1);
+ }
+ });
+ };
+ }, { 15: 15 }], 10: [function(e, t, n) {
+ t.exports = o;
+ var i = e(9);
+ (o.prototype = Object.create(i.prototype)).constructor = o;
+ var r = e(15);
+ function o(s) {
+ i.call(this, s);
+ }
+ o._configure = function() {
+ r.Buffer && (o.prototype._slice = r.Buffer.prototype.slice);
+ }, o.prototype.string = function() {
+ var c = this.uint32();
+ return this.buf.utf8Slice ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + c, this.len)) : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + c, this.len));
+ }, o._configure();
+ }, { 15: 15, 9: 9 }], 11: [function(e, t, n) {
+ t.exports = {};
+ }, {}], 12: [function(e, t, n) {
+ var i = n;
+ i.Service = e(13);
+ }, { 13: 13 }], 13: [function(e, t, n) {
+ t.exports = r;
+ var i = e(15);
+ (r.prototype = Object.create(i.EventEmitter.prototype)).constructor = r;
+ function r(o, s, c) {
+ if (typeof o != "function")
+ throw TypeError("rpcImpl must be a function");
+ i.EventEmitter.call(this), this.rpcImpl = o, this.requestDelimited = !!s, this.responseDelimited = !!c;
+ }
+ r.prototype.rpcCall = function o(s, c, l, d, f) {
+ if (!d)
+ throw TypeError("request must be specified");
+ var h = this;
+ if (!f)
+ return i.asPromise(o, h, s, c, l, d);
+ if (!h.rpcImpl)
+ return setTimeout(function() {
+ f(Error("already ended"));
+ }, 0), undefined$1;
+ try {
+ return h.rpcImpl(
+ s,
+ c[h.requestDelimited ? "encodeDelimited" : "encode"](d).finish(),
+ function(m, _) {
+ if (m)
+ return h.emit("error", m, s), f(m);
+ if (_ === null)
+ return h.end(
+ /* endedByRPC */
+ !0
+ ), undefined$1;
+ if (!(_ instanceof l))
+ try {
+ _ = l[h.responseDelimited ? "decodeDelimited" : "decode"](_);
+ } catch (y) {
+ return h.emit("error", y, s), f(y);
+ }
+ return h.emit("data", _, s), f(null, _);
+ }
+ );
+ } catch (p) {
+ return h.emit("error", p, s), setTimeout(function() {
+ f(p);
+ }, 0), undefined$1;
+ }
+ }, r.prototype.end = function(s) {
+ return this.rpcImpl && (s || this.rpcImpl(null, null, null), this.rpcImpl = null, this.emit("end").off()), this;
+ };
+ }, { 15: 15 }], 14: [function(e, t, n) {
+ t.exports = r;
+ var i = e(15);
+ function r(l, d) {
+ this.lo = l >>> 0, this.hi = d >>> 0;
+ }
+ var o = r.zero = new r(0, 0);
+ o.toNumber = function() {
+ return 0;
+ }, o.zzEncode = o.zzDecode = function() {
+ return this;
+ }, o.length = function() {
+ return 1;
+ };
+ var s = r.zeroHash = "\0\0\0\0\0\0\0\0";
+ r.fromNumber = function(d) {
+ if (d === 0)
+ return o;
+ var f = d < 0;
+ f && (d = -d);
+ var h = d >>> 0, p = (d - h) / 4294967296 >>> 0;
+ return f && (p = ~p >>> 0, h = ~h >>> 0, ++h > 4294967295 && (h = 0, ++p > 4294967295 && (p = 0))), new r(h, p);
+ }, r.from = function(d) {
+ if (typeof d == "number")
+ return r.fromNumber(d);
+ if (i.isString(d))
+ if (i.Long)
+ d = i.Long.fromString(d);
+ else
+ return r.fromNumber(parseInt(d, 10));
+ return d.low || d.high ? new r(d.low >>> 0, d.high >>> 0) : o;
+ }, r.prototype.toNumber = function(d) {
+ if (!d && this.hi >>> 31) {
+ var f = ~this.lo + 1 >>> 0, h = ~this.hi >>> 0;
+ return f || (h = h + 1 >>> 0), -(f + h * 4294967296);
+ }
+ return this.lo + this.hi * 4294967296;
+ }, r.prototype.toLong = function(d) {
+ return i.Long ? new i.Long(this.lo | 0, this.hi | 0, !!d) : { low: this.lo | 0, high: this.hi | 0, unsigned: !!d };
+ };
+ var c = String.prototype.charCodeAt;
+ r.fromHash = function(d) {
+ return d === s ? o : new r(
+ (c.call(d, 0) | c.call(d, 1) << 8 | c.call(d, 2) << 16 | c.call(d, 3) << 24) >>> 0,
+ (c.call(d, 4) | c.call(d, 5) << 8 | c.call(d, 6) << 16 | c.call(d, 7) << 24) >>> 0
+ );
+ }, r.prototype.toHash = function() {
+ return String.fromCharCode(
+ this.lo & 255,
+ this.lo >>> 8 & 255,
+ this.lo >>> 16 & 255,
+ this.lo >>> 24,
+ this.hi & 255,
+ this.hi >>> 8 & 255,
+ this.hi >>> 16 & 255,
+ this.hi >>> 24
+ );
+ }, r.prototype.zzEncode = function() {
+ var d = this.hi >> 31;
+ return this.hi = ((this.hi << 1 | this.lo >>> 31) ^ d) >>> 0, this.lo = (this.lo << 1 ^ d) >>> 0, this;
+ }, r.prototype.zzDecode = function() {
+ var d = -(this.lo & 1);
+ return this.lo = ((this.lo >>> 1 | this.hi << 31) ^ d) >>> 0, this.hi = (this.hi >>> 1 ^ d) >>> 0, this;
+ }, r.prototype.length = function() {
+ var d = this.lo, f = (this.lo >>> 28 | this.hi << 4) >>> 0, h = this.hi >>> 24;
+ return h === 0 ? f === 0 ? d < 16384 ? d < 128 ? 1 : 2 : d < 2097152 ? 3 : 4 : f < 16384 ? f < 128 ? 5 : 6 : f < 2097152 ? 7 : 8 : h < 128 ? 9 : 10;
+ };
+ }, { 15: 15 }], 15: [function(e, t, n) {
+ var i = n;
+ i.asPromise = e(1), i.base64 = e(2), i.EventEmitter = e(3), i.float = e(4), i.inquire = e(5), i.utf8 = e(7), i.pool = e(6), i.LongBits = e(14), i.isNode = !!(typeof commonjsGlobal < "u" && commonjsGlobal && commonjsGlobal.process && commonjsGlobal.process.versions && commonjsGlobal.process.versions.node), i.global = i.isNode && commonjsGlobal || typeof window < "u" && window || typeof self < "u" && self || this, i.emptyArray = Object.freeze ? Object.freeze([]) : (
+ /* istanbul ignore next */
+ []
+ ), i.emptyObject = Object.freeze ? Object.freeze({}) : (
+ /* istanbul ignore next */
+ {}
+ ), i.isInteger = Number.isInteger || /* istanbul ignore next */
+ function(c) {
+ return typeof c == "number" && isFinite(c) && Math.floor(c) === c;
+ }, i.isString = function(c) {
+ return typeof c == "string" || c instanceof String;
+ }, i.isObject = function(c) {
+ return c && typeof c == "object";
+ }, i.isset = /**
+ * Checks if a property on a message is considered to be present.
+ * @param {Object} obj Plain object or message instance
+ * @param {string} prop Property name
+ * @returns {boolean} `true` if considered to be present, otherwise `false`
+ */
+ i.isSet = function(c, l) {
+ var d = c[l];
+ return d != null && c.hasOwnProperty(l) ? typeof d != "object" || (Array.isArray(d) ? d.length : Object.keys(d).length) > 0 : !1;
+ }, i.Buffer = function() {
+ try {
+ var s = i.inquire("buffer").Buffer;
+ return s.prototype.utf8Write ? s : (
+ /* istanbul ignore next */
+ null
+ );
+ } catch {
+ return null;
+ }
+ }(), i._Buffer_from = null, i._Buffer_allocUnsafe = null, i.newBuffer = function(c) {
+ return typeof c == "number" ? i.Buffer ? i._Buffer_allocUnsafe(c) : new i.Array(c) : i.Buffer ? i._Buffer_from(c) : typeof Uint8Array > "u" ? c : new Uint8Array(c);
+ }, i.Array = typeof Uint8Array < "u" ? Uint8Array : Array, i.Long = /* istanbul ignore next */
+ i.global.dcodeIO && /* istanbul ignore next */
+ i.global.dcodeIO.Long || /* istanbul ignore next */
+ i.global.Long || i.inquire("long"), i.key2Re = /^true|false|0|1$/, i.key32Re = /^-?(?:0|[1-9][0-9]*)$/, i.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/, i.longToHash = function(c) {
+ return c ? i.LongBits.from(c).toHash() : i.LongBits.zeroHash;
+ }, i.longFromHash = function(c, l) {
+ var d = i.LongBits.fromHash(c);
+ return i.Long ? i.Long.fromBits(d.lo, d.hi, l) : d.toNumber(!!l);
+ };
+ function r(s, c, l) {
+ for (var d = Object.keys(c), f = 0; f < d.length; ++f)
+ (s[d[f]] === undefined$1 || !l) && (s[d[f]] = c[d[f]]);
+ return s;
+ }
+ i.merge = r, i.lcFirst = function(c) {
+ return c.charAt(0).toLowerCase() + c.substring(1);
+ };
+ function o(s) {
+ function c(l, d) {
+ if (!(this instanceof c))
+ return new c(l, d);
+ Object.defineProperty(this, "message", { get: function() {
+ return l;
+ } }), Error.captureStackTrace ? Error.captureStackTrace(this, c) : Object.defineProperty(this, "stack", { value: new Error().stack || "" }), d && r(this, d);
+ }
+ return c.prototype = Object.create(Error.prototype, {
+ constructor: {
+ value: c,
+ writable: !0,
+ enumerable: !1,
+ configurable: !0
+ },
+ name: {
+ get: function() {
+ return s;
+ },
+ set: undefined$1,
+ enumerable: !1,
+ // configurable: false would accurately preserve the behavior of
+ // the original, but I'm guessing that was not intentional.
+ // For an actual error subclass, this property would
+ // be configurable.
+ configurable: !0
+ },
+ toString: {
+ value: function() {
+ return this.name + ": " + this.message;
+ },
+ writable: !0,
+ enumerable: !1,
+ configurable: !0
+ }
+ }), c;
+ }
+ i.newError = o, i.ProtocolError = o("ProtocolError"), i.oneOfGetter = function(c) {
+ for (var l = {}, d = 0; d < c.length; ++d)
+ l[c[d]] = 1;
+ return function() {
+ for (var f = Object.keys(this), h = f.length - 1; h > -1; --h)
+ if (l[f[h]] === 1 && this[f[h]] !== undefined$1 && this[f[h]] !== null)
+ return f[h];
+ };
+ }, i.oneOfSetter = function(c) {
+ return function(l) {
+ for (var d = 0; d < c.length; ++d)
+ c[d] !== l && delete this[c[d]];
+ };
+ }, i.toJSONOptions = {
+ longs: String,
+ enums: String,
+ bytes: String,
+ json: !0
+ }, i._configure = function() {
+ var s = i.Buffer;
+ if (!s) {
+ i._Buffer_from = i._Buffer_allocUnsafe = null;
+ return;
+ }
+ i._Buffer_from = s.from !== Uint8Array.from && s.from || /* istanbul ignore next */
+ function(l, d) {
+ return new s(l, d);
+ }, i._Buffer_allocUnsafe = s.allocUnsafe || /* istanbul ignore next */
+ function(l) {
+ return new s(l);
+ };
+ };
+ }, { 1: 1, 14: 14, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7 }], 16: [function(e, t, n) {
+ t.exports = h;
+ var i = e(15), r, o = i.LongBits, s = i.base64, c = i.utf8;
+ function l(b, S, E) {
+ this.fn = b, this.len = S, this.next = undefined$1, this.val = E;
+ }
+ function d() {
+ }
+ function f(b) {
+ this.head = b.head, this.tail = b.tail, this.len = b.len, this.next = b.states;
+ }
+ function h() {
+ this.len = 0, this.head = new l(d, 0, 0), this.tail = this.head, this.states = null;
+ }
+ var p = function() {
+ return i.Buffer ? function() {
+ return (h.create = function() {
+ return new r();
+ })();
+ } : function() {
+ return new h();
+ };
+ };
+ h.create = p(), h.alloc = function(S) {
+ return new i.Array(S);
+ }, i.Array !== Array && (h.alloc = i.pool(h.alloc, i.Array.prototype.subarray)), h.prototype._push = function(S, E, A) {
+ return this.tail = this.tail.next = new l(S, E, A), this.len += E, this;
+ };
+ function m(b, S, E) {
+ S[E] = b & 255;
+ }
+ function _(b, S, E) {
+ for (; b > 127; )
+ S[E++] = b & 127 | 128, b >>>= 7;
+ S[E] = b;
+ }
+ function y(b, S) {
+ this.len = b, this.next = undefined$1, this.val = S;
+ }
+ y.prototype = Object.create(l.prototype), y.prototype.fn = _, h.prototype.uint32 = function(S) {
+ return this.len += (this.tail = this.tail.next = new y(
+ (S = S >>> 0) < 128 ? 1 : S < 16384 ? 2 : S < 2097152 ? 3 : S < 268435456 ? 4 : 5,
+ S
+ )).len, this;
+ }, h.prototype.int32 = function(S) {
+ return S < 0 ? this._push(C, 10, o.fromNumber(S)) : this.uint32(S);
+ }, h.prototype.sint32 = function(S) {
+ return this.uint32((S << 1 ^ S >> 31) >>> 0);
+ };
+ function C(b, S, E) {
+ for (; b.hi; )
+ S[E++] = b.lo & 127 | 128, b.lo = (b.lo >>> 7 | b.hi << 25) >>> 0, b.hi >>>= 7;
+ for (; b.lo > 127; )
+ S[E++] = b.lo & 127 | 128, b.lo = b.lo >>> 7;
+ S[E++] = b.lo;
+ }
+ h.prototype.uint64 = function(S) {
+ var E = o.from(S);
+ return this._push(C, E.length(), E);
+ }, h.prototype.int64 = h.prototype.uint64, h.prototype.sint64 = function(S) {
+ var E = o.from(S).zzEncode();
+ return this._push(C, E.length(), E);
+ }, h.prototype.bool = function(S) {
+ return this._push(m, 1, S ? 1 : 0);
+ };
+ function T(b, S, E) {
+ S[E] = b & 255, S[E + 1] = b >>> 8 & 255, S[E + 2] = b >>> 16 & 255, S[E + 3] = b >>> 24;
+ }
+ h.prototype.fixed32 = function(S) {
+ return this._push(T, 4, S >>> 0);
+ }, h.prototype.sfixed32 = h.prototype.fixed32, h.prototype.fixed64 = function(S) {
+ var E = o.from(S);
+ return this._push(T, 4, E.lo)._push(T, 4, E.hi);
+ }, h.prototype.sfixed64 = h.prototype.fixed64, h.prototype.float = function(S) {
+ return this._push(i.float.writeFloatLE, 4, S);
+ }, h.prototype.double = function(S) {
+ return this._push(i.float.writeDoubleLE, 8, S);
+ };
+ var x = i.Array.prototype.set ? function(S, E, A) {
+ E.set(S, A);
+ } : function(S, E, A) {
+ for (var D = 0; D < S.length; ++D)
+ E[A + D] = S[D];
+ };
+ h.prototype.bytes = function(S) {
+ var E = S.length >>> 0;
+ if (!E)
+ return this._push(m, 1, 0);
+ if (i.isString(S)) {
+ var A = h.alloc(E = s.length(S));
+ s.decode(S, A, 0), S = A;
+ }
+ return this.uint32(E)._push(x, E, S);
+ }, h.prototype.string = function(S) {
+ var E = c.length(S);
+ return E ? this.uint32(E)._push(c.write, E, S) : this._push(m, 1, 0);
+ }, h.prototype.fork = function() {
+ return this.states = new f(this), this.head = this.tail = new l(d, 0, 0), this.len = 0, this;
+ }, h.prototype.reset = function() {
+ return this.states ? (this.head = this.states.head, this.tail = this.states.tail, this.len = this.states.len, this.states = this.states.next) : (this.head = this.tail = new l(d, 0, 0), this.len = 0), this;
+ }, h.prototype.ldelim = function() {
+ var S = this.head, E = this.tail, A = this.len;
+ return this.reset().uint32(A), A && (this.tail.next = S.next, this.tail = E, this.len += A), this;
+ }, h.prototype.finish = function() {
+ for (var S = this.head.next, E = this.constructor.alloc(this.len), A = 0; S; )
+ S.fn(S.val, E, A), A += S.len, S = S.next;
+ return E;
+ }, h._configure = function(b) {
+ r = b, h.create = p(), r._configure();
+ };
+ }, { 15: 15 }], 17: [function(e, t, n) {
+ t.exports = o;
+ var i = e(16);
+ (o.prototype = Object.create(i.prototype)).constructor = o;
+ var r = e(15);
+ function o() {
+ i.call(this);
+ }
+ o._configure = function() {
+ o.alloc = r._Buffer_allocUnsafe, o.writeBytesBuffer = r.Buffer && r.Buffer.prototype instanceof Uint8Array && r.Buffer.prototype.set.name === "set" ? function(l, d, f) {
+ d.set(l, f);
+ } : function(l, d, f) {
+ if (l.copy)
+ l.copy(d, f, 0, l.length);
+ else for (var h = 0; h < l.length; )
+ d[f++] = l[h++];
+ };
+ }, o.prototype.bytes = function(l) {
+ r.isString(l) && (l = r._Buffer_from(l, "base64"));
+ var d = l.length >>> 0;
+ return this.uint32(d), d && this._push(o.writeBytesBuffer, d, l), this;
+ };
+ function s(c, l, d) {
+ c.length < 40 ? r.utf8.write(c, l, d) : l.utf8Write ? l.utf8Write(c, d) : l.write(c, d);
+ }
+ o.prototype.string = function(l) {
+ var d = r.Buffer.byteLength(l);
+ return this.uint32(d), d && this._push(s, d, l), this;
+ }, o._configure();
+ }, { 15: 15, 16: 16 }] }, {}, [8]);
+ })();
+})(protobuf$2);
+var protobufExports = protobuf$2.exports;
+const protobuf = /* @__PURE__ */ getDefaultExportFromCjs(protobufExports), protobuf$1 = /* @__PURE__ */ _mergeNamespaces({
+ __proto__: null,
+ default: protobuf
+}, [protobufExports]);
+function isBitSet(e, t) {
+ return (e & t) !== 0;
+}
+const childrenBitmasks = [1, 2, 4, 8], anyChildBitmask = 15, cacheFlagBitmask = 16, imageBitmask = 64, terrainBitmask = 128;
+function GoogleEarthEnterpriseTileInformation(e, t, n, i, r, o) {
+ this._bits = e, this.cnodeVersion = t, this.imageryVersion = n, this.terrainVersion = i, this.imageryProvider = r, this.terrainProvider = o, this.ancestorHasTerrain = !1, this.terrainState = void 0;
+}
+GoogleEarthEnterpriseTileInformation.clone = function(e, t) {
+ return defined(t) ? (t._bits = e._bits, t.cnodeVersion = e.cnodeVersion, t.imageryVersion = e.imageryVersion, t.terrainVersion = e.terrainVersion, t.imageryProvider = e.imageryProvider, t.terrainProvider = e.terrainProvider) : t = new GoogleEarthEnterpriseTileInformation(
+ e._bits,
+ e.cnodeVersion,
+ e.imageryVersion,
+ e.terrainVersion,
+ e.imageryProvider,
+ e.terrainProvider
+ ), t.ancestorHasTerrain = e.ancestorHasTerrain, t.terrainState = e.terrainState, t;
+};
+GoogleEarthEnterpriseTileInformation.prototype.setParent = function(e) {
+ this.ancestorHasTerrain = e.ancestorHasTerrain || this.hasTerrain();
+};
+GoogleEarthEnterpriseTileInformation.prototype.hasSubtree = function() {
+ return isBitSet(this._bits, cacheFlagBitmask);
+};
+GoogleEarthEnterpriseTileInformation.prototype.hasImagery = function() {
+ return isBitSet(this._bits, imageBitmask);
+};
+GoogleEarthEnterpriseTileInformation.prototype.hasTerrain = function() {
+ return isBitSet(this._bits, terrainBitmask);
+};
+GoogleEarthEnterpriseTileInformation.prototype.hasChildren = function() {
+ return isBitSet(this._bits, anyChildBitmask);
+};
+GoogleEarthEnterpriseTileInformation.prototype.hasChild = function(e) {
+ return isBitSet(this._bits, childrenBitmasks[e]);
+};
+GoogleEarthEnterpriseTileInformation.prototype.getChildBitmask = function() {
+ return this._bits & anyChildBitmask;
+};
+function stringToBuffer(e) {
+ const t = e.length, n = new ArrayBuffer(t), i = new Uint8Array(n);
+ for (let r = 0; r < t; ++r)
+ i[r] = e.charCodeAt(r);
+ return n;
+}
+const defaultKey = stringToBuffer(
+ `Eô½\vyâjE",ÍqøIFgQ\0B%Æèa,f)\bÆ4Üjb%y
+wmiÖðk¡½NuàA[ß@V\fÙ»r|3SîOlÔq°{ÀEVZwUe\v3*¬l5Å0sø3>mF8J´Ýð.ÝuÚDt"úa"\f3"So¯9D\v9Ù9L¹¿«\\P_"uxé\x07qh;ÁÄð
',
+ !0
+ );
+};
+const InterpolationAlgorithm = {};
+InterpolationAlgorithm.type = void 0;
+InterpolationAlgorithm.getRequiredDataPoints = DeveloperError.throwInstantiationError;
+InterpolationAlgorithm.interpolateOrderZero = DeveloperError.throwInstantiationError;
+InterpolationAlgorithm.interpolate = DeveloperError.throwInstantiationError;
+function PeliasGeocoderService(e) {
+ this._url = Resource.createIfNeeded(e), this._url.appendForwardSlash();
+}
+Object.defineProperties(PeliasGeocoderService.prototype, {
+ /**
+ * The Resource used to access the Pelias endpoint.
+ * @type {Resource}
+ * @memberof PeliasGeocoderService.prototype
+ * @readonly
+ */
+ url: {
+ get: function() {
+ return this._url;
+ }
+ },
+ /**
+ * Gets the credit to display after a geocode is performed. Typically this is used to credit
+ * the geocoder service.
+ * @memberof PeliasGeocoderService.prototype
+ * @type {Credit|undefined}
+ * @readonly
+ */
+ credit: {
+ get: function() {
+ }
+ }
+});
+PeliasGeocoderService.prototype.geocode = async function(e, t) {
+ return this._url.getDerivedResource({
+ url: t === GeocodeType$1.AUTOCOMPLETE ? "autocomplete" : "search",
+ queryParameters: {
+ text: e
+ }
+ }).fetchJson().then(function(i) {
+ return i.features.map(function(r) {
+ let o;
+ const s = r.bbox;
+ if (defined(s))
+ o = Rectangle.fromDegrees(
+ s[0],
+ s[1],
+ s[2],
+ s[3]
+ );
+ else {
+ const c = r.geometry.coordinates[0], l = r.geometry.coordinates[1];
+ o = Cartesian3.fromDegrees(c, l);
+ }
+ return {
+ displayName: r.properties.label,
+ destination: o,
+ attributions: i.attributions
+ };
+ });
+ });
+};
+function IonGeocoderService(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = defaultValue(e.accessToken, Ion.defaultAccessToken), n = Resource.createIfNeeded(
+ defaultValue(e.server, Ion.defaultServer)
+ );
+ n.appendForwardSlash();
+ const i = Ion.getDefaultTokenCredit(t);
+ defined(i) && e.scene.frameState.creditDisplay.addStaticCredit(
+ Credit.clone(i)
+ );
+ const r = n.getDerivedResource({
+ url: "v1/geocode"
+ });
+ defined(t) && r.appendQueryParameters({ access_token: t }), this._accessToken = t, this._server = n, this._pelias = new PeliasGeocoderService(r);
+}
+Object.defineProperties(IonGeocoderService.prototype, {
+ /**
+ * Gets the credit to display after a geocode is performed. Typically this is used to credit
+ * the geocoder service.
+ * @memberof IonGeocoderService.prototype
+ * @type {Credit|undefined}
+ * @readonly
+ */
+ credit: {
+ get: function() {
+ }
+ }
+});
+IonGeocoderService.prototype.geocode = async function(e, t) {
+ return this._pelias.geocode(e, t);
+};
+function MapProjection() {
+ DeveloperError.throwInstantiationError();
+}
+Object.defineProperties(MapProjection.prototype, {
+ /**
+ * Gets the {@link Ellipsoid}.
+ *
+ * @memberof MapProjection.prototype
+ *
+ * @type {Ellipsoid}
+ * @readonly
+ */
+ ellipsoid: {
+ get: DeveloperError.throwInstantiationError
+ }
+});
+MapProjection.prototype.project = DeveloperError.throwInstantiationError;
+MapProjection.prototype.unproject = DeveloperError.throwInstantiationError;
+function MorphWeightSpline(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.weights, n = e.times;
+ this._times = n, this._weights = t, this._count = t.length / n.length, this._lastTimeIndex = 0;
+}
+Object.defineProperties(MorphWeightSpline.prototype, {
+ /**
+ * An array of times for the control weights.
+ *
+ * @memberof WeightSpline.prototype
+ *
+ * @type {number[]}
+ * @readonly
+ */
+ times: {
+ get: function() {
+ return this._times;
+ }
+ },
+ /**
+ * An array of floating-point array control weights.
+ *
+ * @memberof WeightSpline.prototype
+ *
+ * @type {number[]}
+ * @readonly
+ */
+ weights: {
+ get: function() {
+ return this._weights;
+ }
+ }
+});
+MorphWeightSpline.prototype.findTimeInterval = Spline.prototype.findTimeInterval;
+MorphWeightSpline.prototype.wrapTime = Spline.prototype.wrapTime;
+MorphWeightSpline.prototype.clampTime = Spline.prototype.clampTime;
+MorphWeightSpline.prototype.evaluate = function(e, t) {
+ const n = this.weights, i = this.times, r = this._lastTimeIndex = this.findTimeInterval(
+ e,
+ this._lastTimeIndex
+ ), o = (e - i[r]) / (i[r + 1] - i[r]);
+ defined(t) || (t = new Array(this._count));
+ for (let s = 0; s < this._count; s++) {
+ const c = r * this._count + s;
+ t[s] = n[c] * (1 - o) + n[c + this._count] * o;
+ }
+ return t;
+};
+function OpenCageGeocoderService(e, t, n) {
+ e = Resource.createIfNeeded(e), e.appendForwardSlash(), e.setQueryParameters({ key: t }), this._url = e, this._params = defaultValue(n, {}), this._credit = new Credit(
+ 'Geodata copyright OpenStreetMap contributors',
+ !1
+ );
+}
+Object.defineProperties(OpenCageGeocoderService.prototype, {
+ /**
+ * The Resource used to access the OpenCage endpoint.
+ * @type {Resource}
+ * @memberof OpenCageGeocoderService.prototype
+ * @readonly
+ */
+ url: {
+ get: function() {
+ return this._url;
+ }
+ },
+ /**
+ * Optional params passed to OpenCage in order to customize geocoding
+ * @type {object}
+ * @memberof OpenCageGeocoderService.prototype
+ * @readonly
+ */
+ params: {
+ get: function() {
+ return this._params;
+ }
+ },
+ /**
+ * Gets the credit to display after a geocode is performed. Typically this is used to credit
+ * the geocoder service.
+ * @memberof OpenCageGeocoderService.prototype
+ * @type {Credit|undefined}
+ * @readonly
+ */
+ credit: {
+ get: function() {
+ return this._credit;
+ }
+ }
+});
+OpenCageGeocoderService.prototype.geocode = async function(e) {
+ return this._url.getDerivedResource({
+ url: "json",
+ queryParameters: combine$2(this._params, { q: e })
+ }).fetchJson().then(function(n) {
+ return n.results.map(function(i) {
+ let r;
+ const o = i.bounds;
+ if (defined(o))
+ r = Rectangle.fromDegrees(
+ o.southwest.lng,
+ o.southwest.lat,
+ o.northeast.lng,
+ o.northeast.lat
+ );
+ else {
+ const s = i.geometry.lat, c = i.geometry.lng;
+ r = Cartesian3.fromDegrees(s, c);
+ }
+ return {
+ displayName: i.formatted,
+ destination: r
+ };
+ });
+ });
+};
+const Packable = {
+ /**
+ * The number of elements used to pack the object into an array.
+ * @type {number}
+ */
+ packedLength: void 0,
+ /**
+ * Stores the provided instance into the provided array.
+ * @function
+ *
+ * @param {*} value The value to pack.
+ * @param {number[]} array The array to pack into.
+ * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
+ */
+ pack: DeveloperError.throwInstantiationError,
+ /**
+ * Retrieves an instance from a packed array.
+ * @function
+ *
+ * @param {number[]} array The packed array.
+ * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
+ * @param {object} [result] The object into which to store the result.
+ * @returns {object} The modified result parameter or a new Object instance if one was not provided.
+ */
+ unpack: DeveloperError.throwInstantiationError
+}, PackableForInterpolation = {
+ /**
+ * The number of elements used to store the object into an array in its interpolatable form.
+ * @type {number}
+ */
+ packedInterpolationLength: void 0,
+ /**
+ * Converts a packed array into a form suitable for interpolation.
+ * @function
+ *
+ * @param {number[]} packedArray The packed array.
+ * @param {number} [startingIndex=0] The index of the first element to be converted.
+ * @param {number} [lastIndex=packedArray.length] The index of the last element to be converted.
+ * @param {number[]} [result] The object into which to store the result.
+ */
+ convertPackedArrayForInterpolation: DeveloperError.throwInstantiationError,
+ /**
+ * Retrieves an instance from a packed array converted with {@link PackableForInterpolation.convertPackedArrayForInterpolation}.
+ * @function
+ *
+ * @param {number[]} array The array previously packed for interpolation.
+ * @param {number[]} sourceArray The original packed array.
+ * @param {number} [startingIndex=0] The startingIndex used to convert the array.
+ * @param {number} [lastIndex=packedArray.length] The lastIndex used to convert the array.
+ * @param {object} [result] The object into which to store the result.
+ * @returns {object} The modified result parameter or a new Object instance if one was not provided.
+ */
+ unpackInterpolationResult: DeveloperError.throwInstantiationError
+};
+function Proxy() {
+ DeveloperError.throwInstantiationError();
+}
+Proxy.prototype.getURL = DeveloperError.throwInstantiationError;
+function interpolateColors(e, t, n, i, r, o, s) {
+ const c = PolylinePipeline.numberOfPoints(e, t, r);
+ let l;
+ const d = n.red, f = n.green, h = n.blue, p = n.alpha, m = i.red, _ = i.green, y = i.blue, C = i.alpha;
+ if (Color.equals(n, i)) {
+ for (l = 0; l < c; l++)
+ o[s++] = Color.floatToByte(d), o[s++] = Color.floatToByte(f), o[s++] = Color.floatToByte(h), o[s++] = Color.floatToByte(p);
+ return s;
+ }
+ const T = (m - d) / c, x = (_ - f) / c, b = (y - h) / c, S = (C - p) / c;
+ let E = s;
+ for (l = 0; l < c; l++)
+ o[E++] = Color.floatToByte(d + l * T), o[E++] = Color.floatToByte(f + l * x), o[E++] = Color.floatToByte(h + l * b), o[E++] = Color.floatToByte(p + l * S);
+ return E;
+}
+function SimplePolylineGeometry(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.positions, n = e.colors, i = defaultValue(e.colorsPerVertex, !1);
+ this._positions = t, this._colors = n, this._colorsPerVertex = i, this._arcType = defaultValue(e.arcType, ArcType$1.GEODESIC), this._granularity = defaultValue(
+ e.granularity,
+ CesiumMath.RADIANS_PER_DEGREE
+ ), this._ellipsoid = defaultValue(e.ellipsoid, Ellipsoid.default), this._workerName = "createSimplePolylineGeometry";
+ let r = 1 + t.length * Cartesian3.packedLength;
+ r += defined(n) ? 1 + n.length * Color.packedLength : 1, this.packedLength = r + Ellipsoid.packedLength + 3;
+}
+SimplePolylineGeometry.pack = function(e, t, n) {
+ n = defaultValue(n, 0);
+ let i;
+ const r = e._positions;
+ let o = r.length;
+ for (t[n++] = o, i = 0; i < o; ++i, n += Cartesian3.packedLength)
+ Cartesian3.pack(r[i], t, n);
+ const s = e._colors;
+ for (o = defined(s) ? s.length : 0, t[n++] = o, i = 0; i < o; ++i, n += Color.packedLength)
+ Color.pack(s[i], t, n);
+ return Ellipsoid.pack(e._ellipsoid, t, n), n += Ellipsoid.packedLength, t[n++] = e._colorsPerVertex ? 1 : 0, t[n++] = e._arcType, t[n] = e._granularity, t;
+};
+SimplePolylineGeometry.unpack = function(e, t, n) {
+ t = defaultValue(t, 0);
+ let i, r = e[t++];
+ const o = new Array(r);
+ for (i = 0; i < r; ++i, t += Cartesian3.packedLength)
+ o[i] = Cartesian3.unpack(e, t);
+ r = e[t++];
+ const s = r > 0 ? new Array(r) : void 0;
+ for (i = 0; i < r; ++i, t += Color.packedLength)
+ s[i] = Color.unpack(e, t);
+ const c = Ellipsoid.unpack(e, t);
+ t += Ellipsoid.packedLength;
+ const l = e[t++] === 1, d = e[t++], f = e[t];
+ return defined(n) ? (n._positions = o, n._colors = s, n._ellipsoid = c, n._colorsPerVertex = l, n._arcType = d, n._granularity = f, n) : new SimplePolylineGeometry({
+ positions: o,
+ colors: s,
+ ellipsoid: c,
+ colorsPerVertex: l,
+ arcType: d,
+ granularity: f
+ });
+};
+const scratchArray1 = new Array(2), scratchArray2 = new Array(2), generateArcOptionsScratch = {
+ positions: scratchArray1,
+ height: scratchArray2,
+ ellipsoid: void 0,
+ minDistance: void 0,
+ granularity: void 0
+};
+SimplePolylineGeometry.createGeometry = function(e) {
+ const t = e._positions, n = e._colors, i = e._colorsPerVertex, r = e._arcType, o = e._granularity, s = e._ellipsoid, c = CesiumMath.chordLength(
+ o,
+ s.maximumRadius
+ ), l = defined(n) && !i;
+ let d;
+ const f = t.length;
+ let h, p, m, _, y = 0;
+ if (r === ArcType$1.GEODESIC || r === ArcType$1.RHUMB) {
+ let S, E, A;
+ r === ArcType$1.GEODESIC ? (S = CesiumMath.chordLength(
+ o,
+ s.maximumRadius
+ ), E = PolylinePipeline.numberOfPoints, A = PolylinePipeline.generateArc) : (S = o, E = PolylinePipeline.numberOfPointsRhumbLine, A = PolylinePipeline.generateRhumbArc);
+ const D = PolylinePipeline.extractHeights(t, s), P = generateArcOptionsScratch;
+ if (r === ArcType$1.GEODESIC ? P.minDistance = c : P.granularity = o, P.ellipsoid = s, l) {
+ let I = 0;
+ for (d = 0; d < f - 1; d++)
+ I += E(
+ t[d],
+ t[d + 1],
+ S
+ ) + 1;
+ h = new Float64Array(I * 3), m = new Uint8Array(I * 4), P.positions = scratchArray1, P.height = scratchArray2;
+ let M = 0;
+ for (d = 0; d < f - 1; ++d) {
+ scratchArray1[0] = t[d], scratchArray1[1] = t[d + 1], scratchArray2[0] = D[d], scratchArray2[1] = D[d + 1];
+ const R = A(P);
+ if (defined(n)) {
+ const L = R.length / 3;
+ _ = n[d];
+ for (let g = 0; g < L; ++g)
+ m[M++] = Color.floatToByte(_.red), m[M++] = Color.floatToByte(_.green), m[M++] = Color.floatToByte(_.blue), m[M++] = Color.floatToByte(_.alpha);
+ }
+ h.set(R, y), y += R.length;
+ }
+ } else if (P.positions = t, P.height = D, h = new Float64Array(
+ A(P)
+ ), defined(n)) {
+ for (m = new Uint8Array(h.length / 3 * 4), d = 0; d < f - 1; ++d) {
+ const M = t[d], R = t[d + 1], L = n[d], g = n[d + 1];
+ y = interpolateColors(
+ M,
+ R,
+ L,
+ g,
+ c,
+ m,
+ y
+ );
+ }
+ const I = n[f - 1];
+ m[y++] = Color.floatToByte(I.red), m[y++] = Color.floatToByte(I.green), m[y++] = Color.floatToByte(I.blue), m[y++] = Color.floatToByte(I.alpha);
+ }
+ } else {
+ p = l ? f * 2 - 2 : f, h = new Float64Array(p * 3), m = defined(n) ? new Uint8Array(p * 4) : void 0;
+ let S = 0, E = 0;
+ for (d = 0; d < f; ++d) {
+ const A = t[d];
+ if (l && d > 0 && (Cartesian3.pack(A, h, S), S += 3, _ = n[d - 1], m[E++] = Color.floatToByte(_.red), m[E++] = Color.floatToByte(_.green), m[E++] = Color.floatToByte(_.blue), m[E++] = Color.floatToByte(_.alpha)), l && d === f - 1)
+ break;
+ Cartesian3.pack(A, h, S), S += 3, defined(n) && (_ = n[d], m[E++] = Color.floatToByte(_.red), m[E++] = Color.floatToByte(_.green), m[E++] = Color.floatToByte(_.blue), m[E++] = Color.floatToByte(_.alpha));
+ }
+ }
+ const C = new GeometryAttributes();
+ C.position = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.DOUBLE,
+ componentsPerAttribute: 3,
+ values: h
+ }), defined(n) && (C.color = new GeometryAttribute({
+ componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE,
+ componentsPerAttribute: 4,
+ values: m,
+ normalize: !0
+ })), p = h.length / 3;
+ const T = (p - 1) * 2, x = IndexDatatype$1.createTypedArray(
+ p,
+ T
+ );
+ let b = 0;
+ for (d = 0; d < p - 1; ++d)
+ x[b++] = d, x[b++] = d + 1;
+ return new Geometry({
+ attributes: C,
+ indices: x,
+ primitiveType: PrimitiveType$1.LINES,
+ boundingSphere: BoundingSphere.fromPoints(t)
+ });
+};
+function SphereGeometry(e) {
+ const t = defaultValue(e.radius, 1), i = {
+ radii: new Cartesian3(t, t, t),
+ stackPartitions: e.stackPartitions,
+ slicePartitions: e.slicePartitions,
+ vertexFormat: e.vertexFormat
+ };
+ this._ellipsoidGeometry = new EllipsoidGeometry(i), this._workerName = "createSphereGeometry";
+}
+SphereGeometry.packedLength = EllipsoidGeometry.packedLength;
+SphereGeometry.pack = function(e, t, n) {
+ return EllipsoidGeometry.pack(e._ellipsoidGeometry, t, n);
+};
+const scratchEllipsoidGeometry = new EllipsoidGeometry(), scratchOptions = {
+ radius: void 0,
+ radii: new Cartesian3(),
+ vertexFormat: new VertexFormat(),
+ stackPartitions: void 0,
+ slicePartitions: void 0
+};
+SphereGeometry.unpack = function(e, t, n) {
+ const i = EllipsoidGeometry.unpack(
+ e,
+ t,
+ scratchEllipsoidGeometry
+ );
+ return scratchOptions.vertexFormat = VertexFormat.clone(
+ i._vertexFormat,
+ scratchOptions.vertexFormat
+ ), scratchOptions.stackPartitions = i._stackPartitions, scratchOptions.slicePartitions = i._slicePartitions, defined(n) ? (Cartesian3.clone(i._radii, scratchOptions.radii), n._ellipsoidGeometry = new EllipsoidGeometry(scratchOptions), n) : (scratchOptions.radius = i._radii.x, new SphereGeometry(scratchOptions));
+};
+SphereGeometry.createGeometry = function(e) {
+ return EllipsoidGeometry.createGeometry(e._ellipsoidGeometry);
+};
+function TilingScheme(e) {
+}
+Object.defineProperties(TilingScheme.prototype, {
+ /**
+ * Gets the ellipsoid that is tiled by the tiling scheme.
+ * @memberof TilingScheme.prototype
+ * @type {Ellipsoid}
+ */
+ ellipsoid: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * Gets the rectangle, in radians, covered by this tiling scheme.
+ * @memberof TilingScheme.prototype
+ * @type {Rectangle}
+ */
+ rectangle: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * Gets the map projection used by the tiling scheme.
+ * @memberof TilingScheme.prototype
+ * @type {MapProjection}
+ */
+ projection: {
+ get: DeveloperError.throwInstantiationError
+ }
+});
+TilingScheme.prototype.getNumberOfXTilesAtLevel = DeveloperError.throwInstantiationError;
+TilingScheme.prototype.getNumberOfYTilesAtLevel = DeveloperError.throwInstantiationError;
+TilingScheme.prototype.rectangleToNativeRectangle = DeveloperError.throwInstantiationError;
+TilingScheme.prototype.tileXYToNativeRectangle = DeveloperError.throwInstantiationError;
+TilingScheme.prototype.tileXYToRectangle = DeveloperError.throwInstantiationError;
+TilingScheme.prototype.positionToTileXY = DeveloperError.throwInstantiationError;
+function DataRectangle(e, t) {
+ this.rectangle = e, this.maxLevel = t;
+}
+function TerrainProviderBuilder(e) {
+ this.ellipsoid = defaultValue(e.ellipsoid, Ellipsoid.default), this.tilingScheme = void 0, this.heightmapWidth = void 0, this.heightmapHeight = void 0, this.levelZeroMaximumGeometricError = void 0, this.rectangles = [];
+}
+TerrainProviderBuilder.prototype.build = function(e) {
+ e._tilingScheme = this.tilingScheme, e._heightmapWidth = this.heightmapWidth, e._heightmapHeight = this.heightmapHeight, e._levelZeroMaximumGeometricError = this.levelZeroMaximumGeometricError, e._rectangles = this.rectangles;
+};
+function metadataSuccess(e, t) {
+ const n = t.getElementsByTagName("SRS")[0].textContent;
+ if (n === "EPSG:4326")
+ e.tilingScheme = new GeographicTilingScheme({
+ ellipsoid: e.ellipsoid
+ });
+ else
+ throw new RuntimeError(`SRS ${n} is not supported`);
+ const i = t.getElementsByTagName("TileFormat")[0];
+ e.heightmapWidth = parseInt(
+ i.getAttribute("width"),
+ 10
+ ), e.heightmapHeight = parseInt(
+ i.getAttribute("height"),
+ 10
+ ), e.levelZeroMaximumGeometricError = TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap(
+ e.ellipsoid,
+ Math.min(
+ e.heightmapWidth,
+ e.heightmapHeight
+ ),
+ e.tilingScheme.getNumberOfXTilesAtLevel(0)
+ );
+ const r = t.getElementsByTagName("DataExtent");
+ for (let o = 0; o < r.length; ++o) {
+ const s = r[o], c = CesiumMath.toRadians(
+ parseFloat(s.getAttribute("minx"))
+ ), l = CesiumMath.toRadians(
+ parseFloat(s.getAttribute("miny"))
+ ), d = CesiumMath.toRadians(
+ parseFloat(s.getAttribute("maxx"))
+ ), f = CesiumMath.toRadians(
+ parseFloat(s.getAttribute("maxy"))
+ ), h = parseInt(s.getAttribute("maxlevel"), 10);
+ e.rectangles.push(
+ new DataRectangle(new Rectangle(c, l, d, f), h)
+ );
+ }
+}
+function metadataFailure(e, t, n) {
+ let i = `An error occurred while accessing ${e.url}`;
+ throw defined(t) && defined(t.message) && (i = `${i}: ${t.message}`), TileProviderError.reportError(
+ void 0,
+ n,
+ defined(n) ? n._errorEvent : void 0,
+ i
+ ), new RuntimeError(i);
+}
+async function requestMetadata(e, t, n) {
+ try {
+ const i = await t.fetchXML();
+ metadataSuccess(e, i);
+ } catch (i) {
+ metadataFailure(t, i, n);
+ }
+}
+function VRTheWorldTerrainProvider(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._errorEvent = new Event(), this._terrainDataStructure = {
+ heightScale: 1 / 1e3,
+ heightOffset: -1e3,
+ elementsPerHeight: 3,
+ stride: 4,
+ elementMultiplier: 256,
+ isBigEndian: !0,
+ lowestEncodedHeight: 0,
+ highestEncodedHeight: 256 * 256 * 256 - 1
+ };
+ let t = e.credit;
+ typeof t == "string" && (t = new Credit(t)), this._credit = t, this._tilingScheme = void 0, this._rectangles = [];
+}
+Object.defineProperties(VRTheWorldTerrainProvider.prototype, {
+ /**
+ * Gets an event that is raised when the terrain provider encounters an asynchronous error. By subscribing
+ * to the event, you will be notified of the error and can potentially recover from it. Event listeners
+ * are passed an instance of {@link TileProviderError}.
+ * @memberof VRTheWorldTerrainProvider.prototype
+ * @type {Event}
+ * @readonly
+ */
+ errorEvent: {
+ get: function() {
+ return this._errorEvent;
+ }
+ },
+ /**
+ * Gets the credit to display when this terrain provider is active. Typically this is used to credit
+ * the source of the terrain.
+ * @memberof VRTheWorldTerrainProvider.prototype
+ * @type {Credit}
+ * @readonly
+ */
+ credit: {
+ get: function() {
+ return this._credit;
+ }
+ },
+ /**
+ * Gets the tiling scheme used by this provider.
+ * @memberof VRTheWorldTerrainProvider.prototype
+ * @type {GeographicTilingScheme}
+ * @readonly
+ */
+ tilingScheme: {
+ get: function() {
+ return this._tilingScheme;
+ }
+ },
+ /**
+ * Gets a value indicating whether or not the provider includes a water mask. The water mask
+ * indicates which areas of the globe are water rather than land, so they can be rendered
+ * as a reflective surface with animated waves.
+ * @memberof VRTheWorldTerrainProvider.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ hasWaterMask: {
+ get: function() {
+ return !1;
+ }
+ },
+ /**
+ * Gets a value indicating whether or not the requested tiles include vertex normals.
+ * @memberof VRTheWorldTerrainProvider.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ hasVertexNormals: {
+ get: function() {
+ return !1;
+ }
+ },
+ /**
+ * Gets an object that can be used to determine availability of terrain from this provider, such as
+ * at points and in rectangles. This property may be undefined if availability
+ * information is not available.
+ * @memberof VRTheWorldTerrainProvider.prototype
+ * @type {TileAvailability}
+ * @readonly
+ */
+ availability: {
+ get: function() {
+ }
+ }
+});
+VRTheWorldTerrainProvider.fromUrl = async function(e, t) {
+ t = defaultValue(t, defaultValue.EMPTY_OBJECT);
+ const n = new TerrainProviderBuilder(t), i = Resource.createIfNeeded(e);
+ await requestMetadata(n, i);
+ const r = new VRTheWorldTerrainProvider(t);
+ return n.build(r), r._resource = i, r;
+};
+VRTheWorldTerrainProvider.prototype.requestTileGeometry = function(e, t, n, i) {
+ const r = this._tilingScheme.getNumberOfYTilesAtLevel(n), s = this._resource.getDerivedResource({
+ url: `${n}/${e}/${r - t - 1}.tif`,
+ queryParameters: {
+ cesium: !0
+ },
+ request: i
+ }).fetchImage({
+ preferImageBitmap: !0
+ });
+ if (!defined(s))
+ return;
+ const c = this;
+ return Promise.resolve(s).then(function(l) {
+ return new HeightmapTerrainData({
+ buffer: getImagePixels(l),
+ width: c._heightmapWidth,
+ height: c._heightmapHeight,
+ childTileMask: getChildMask(c, e, t, n),
+ structure: c._terrainDataStructure
+ });
+ });
+};
+VRTheWorldTerrainProvider.prototype.getLevelMaximumGeometricError = function(e) {
+ return this._levelZeroMaximumGeometricError / (1 << e);
+};
+const rectangleScratch = new Rectangle();
+function getChildMask(e, t, n, i) {
+ const r = e._tilingScheme, o = e._rectangles, s = r.tileXYToRectangle(t, n, i);
+ let c = 0;
+ for (let l = 0; l < o.length && c !== 15; ++l) {
+ const d = o[l];
+ if (d.maxLevel <= i)
+ continue;
+ const f = d.rectangle, h = Rectangle.intersection(
+ f,
+ s,
+ rectangleScratch
+ );
+ defined(h) && (isTileInRectangle(r, f, t * 2, n * 2, i + 1) && (c |= 4), isTileInRectangle(
+ r,
+ f,
+ t * 2 + 1,
+ n * 2,
+ i + 1
+ ) && (c |= 8), isTileInRectangle(
+ r,
+ f,
+ t * 2,
+ n * 2 + 1,
+ i + 1
+ ) && (c |= 1), isTileInRectangle(
+ r,
+ f,
+ t * 2 + 1,
+ n * 2 + 1,
+ i + 1
+ ) && (c |= 2));
+ }
+ return c;
+}
+function isTileInRectangle(e, t, n, i, r) {
+ const o = e.tileXYToRectangle(n, i, r);
+ return defined(
+ Rectangle.intersection(o, t, rectangleScratch)
+ );
+}
+VRTheWorldTerrainProvider.prototype.getTileDataAvailable = function(e, t, n) {
+};
+VRTheWorldTerrainProvider.prototype.loadTileDataAvailability = function(e, t, n) {
+};
+function VideoSynchronizer(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._clock = void 0, this._element = void 0, this._clockSubscription = void 0, this._seekFunction = void 0, this._lastPlaybackRate = void 0, this.clock = e.clock, this.element = e.element, this.epoch = defaultValue(e.epoch, Iso8601.MINIMUM_VALUE), this.tolerance = defaultValue(e.tolerance, 1), this._seeking = !1, this._seekFunction = void 0, this._firstTickAfterSeek = !1;
+}
+Object.defineProperties(VideoSynchronizer.prototype, {
+ /**
+ * Gets or sets the clock used to drive the video element.
+ *
+ * @memberof VideoSynchronizer.prototype
+ * @type {Clock}
+ */
+ clock: {
+ get: function() {
+ return this._clock;
+ },
+ set: function(e) {
+ const t = this._clock;
+ t !== e && (defined(t) && (this._clockSubscription(), this._clockSubscription = void 0), defined(e) && (this._clockSubscription = e.onTick.addEventListener(
+ VideoSynchronizer.prototype._onTick,
+ this
+ )), this._clock = e);
+ }
+ },
+ /**
+ * Gets or sets the video element to synchronize.
+ *
+ * @memberof VideoSynchronizer.prototype
+ * @type {HTMLVideoElement}
+ */
+ element: {
+ get: function() {
+ return this._element;
+ },
+ set: function(e) {
+ const t = this._element;
+ t !== e && (defined(t) && t.removeEventListener("seeked", this._seekFunction, !1), defined(e) && (this._seeking = !1, this._seekFunction = createSeekFunction(this), e.addEventListener("seeked", this._seekFunction, !1)), this._element = e, this._seeking = !1, this._firstTickAfterSeek = !1);
+ }
+ }
+});
+VideoSynchronizer.prototype.destroy = function() {
+ return this.element = void 0, this.clock = void 0, destroyObject(this);
+};
+VideoSynchronizer.prototype.isDestroyed = function() {
+ return !1;
+};
+VideoSynchronizer.prototype._trySetPlaybackRate = function(e) {
+ if (this._lastPlaybackRate === e.multiplier)
+ return;
+ const t = this._element;
+ try {
+ t.playbackRate = e.multiplier;
+ } catch {
+ t.playbackRate = 0;
+ }
+ this._lastPlaybackRate = e.multiplier;
+};
+VideoSynchronizer.prototype._onTick = function(e) {
+ const t = this._element;
+ if (!defined(t) || t.readyState < 2)
+ return;
+ const n = t.paused, i = e.shouldAnimate;
+ if (i === n && (i ? t.play() : t.pause()), this._seeking || this._firstTickAfterSeek) {
+ this._firstTickAfterSeek = !1;
+ return;
+ }
+ this._trySetPlaybackRate(e);
+ const r = e.currentTime, o = defaultValue(this.epoch, Iso8601.MINIMUM_VALUE);
+ let s = JulianDate.secondsDifference(r, o);
+ const c = t.duration;
+ let l;
+ const d = t.currentTime;
+ t.loop ? (s = s % c, s < 0 && (s = c - s), l = s) : s > c ? l = c : s < 0 ? l = 0 : l = s;
+ const f = i ? defaultValue(this.tolerance, 1) : 1e-3;
+ Math.abs(l - d) > f && (this._seeking = !0, t.currentTime = l);
+};
+function createSeekFunction(e) {
+ return function() {
+ e._seeking = !1, e._firstTickAfterSeek = !0;
+ };
+}
+const VulkanConstants = {
+ VK_FORMAT_UNDEFINED: 0,
+ VK_FORMAT_R4G4_UNORM_PACK8: 1,
+ VK_FORMAT_R4G4B4A4_UNORM_PACK16: 2,
+ VK_FORMAT_B4G4R4A4_UNORM_PACK16: 3,
+ VK_FORMAT_R5G6B5_UNORM_PACK16: 4,
+ VK_FORMAT_B5G6R5_UNORM_PACK16: 5,
+ VK_FORMAT_R5G5B5A1_UNORM_PACK16: 6,
+ VK_FORMAT_B5G5R5A1_UNORM_PACK16: 7,
+ VK_FORMAT_A1R5G5B5_UNORM_PACK16: 8,
+ VK_FORMAT_R8_UNORM: 9,
+ VK_FORMAT_R8_SNORM: 10,
+ VK_FORMAT_R8_USCALED: 11,
+ VK_FORMAT_R8_SSCALED: 12,
+ VK_FORMAT_R8_UINT: 13,
+ VK_FORMAT_R8_SINT: 14,
+ VK_FORMAT_R8_SRGB: 15,
+ VK_FORMAT_R8G8_UNORM: 16,
+ VK_FORMAT_R8G8_SNORM: 17,
+ VK_FORMAT_R8G8_USCALED: 18,
+ VK_FORMAT_R8G8_SSCALED: 19,
+ VK_FORMAT_R8G8_UINT: 20,
+ VK_FORMAT_R8G8_SINT: 21,
+ VK_FORMAT_R8G8_SRGB: 22,
+ VK_FORMAT_R8G8B8_UNORM: 23,
+ VK_FORMAT_R8G8B8_SNORM: 24,
+ VK_FORMAT_R8G8B8_USCALED: 25,
+ VK_FORMAT_R8G8B8_SSCALED: 26,
+ VK_FORMAT_R8G8B8_UINT: 27,
+ VK_FORMAT_R8G8B8_SINT: 28,
+ VK_FORMAT_R8G8B8_SRGB: 29,
+ VK_FORMAT_B8G8R8_UNORM: 30,
+ VK_FORMAT_B8G8R8_SNORM: 31,
+ VK_FORMAT_B8G8R8_USCALED: 32,
+ VK_FORMAT_B8G8R8_SSCALED: 33,
+ VK_FORMAT_B8G8R8_UINT: 34,
+ VK_FORMAT_B8G8R8_SINT: 35,
+ VK_FORMAT_B8G8R8_SRGB: 36,
+ VK_FORMAT_R8G8B8A8_UNORM: 37,
+ VK_FORMAT_R8G8B8A8_SNORM: 38,
+ VK_FORMAT_R8G8B8A8_USCALED: 39,
+ VK_FORMAT_R8G8B8A8_SSCALED: 40,
+ VK_FORMAT_R8G8B8A8_UINT: 41,
+ VK_FORMAT_R8G8B8A8_SINT: 42,
+ VK_FORMAT_R8G8B8A8_SRGB: 43,
+ VK_FORMAT_B8G8R8A8_UNORM: 44,
+ VK_FORMAT_B8G8R8A8_SNORM: 45,
+ VK_FORMAT_B8G8R8A8_USCALED: 46,
+ VK_FORMAT_B8G8R8A8_SSCALED: 47,
+ VK_FORMAT_B8G8R8A8_UINT: 48,
+ VK_FORMAT_B8G8R8A8_SINT: 49,
+ VK_FORMAT_B8G8R8A8_SRGB: 50,
+ VK_FORMAT_A8B8G8R8_UNORM_PACK32: 51,
+ VK_FORMAT_A8B8G8R8_SNORM_PACK32: 52,
+ VK_FORMAT_A8B8G8R8_USCALED_PACK32: 53,
+ VK_FORMAT_A8B8G8R8_SSCALED_PACK32: 54,
+ VK_FORMAT_A8B8G8R8_UINT_PACK32: 55,
+ VK_FORMAT_A8B8G8R8_SINT_PACK32: 56,
+ VK_FORMAT_A8B8G8R8_SRGB_PACK32: 57,
+ VK_FORMAT_A2R10G10B10_UNORM_PACK32: 58,
+ VK_FORMAT_A2R10G10B10_SNORM_PACK32: 59,
+ VK_FORMAT_A2R10G10B10_USCALED_PACK32: 60,
+ VK_FORMAT_A2R10G10B10_SSCALED_PACK32: 61,
+ VK_FORMAT_A2R10G10B10_UINT_PACK32: 62,
+ VK_FORMAT_A2R10G10B10_SINT_PACK32: 63,
+ VK_FORMAT_A2B10G10R10_UNORM_PACK32: 64,
+ VK_FORMAT_A2B10G10R10_SNORM_PACK32: 65,
+ VK_FORMAT_A2B10G10R10_USCALED_PACK32: 66,
+ VK_FORMAT_A2B10G10R10_SSCALED_PACK32: 67,
+ VK_FORMAT_A2B10G10R10_UINT_PACK32: 68,
+ VK_FORMAT_A2B10G10R10_SINT_PACK32: 69,
+ VK_FORMAT_R16_UNORM: 70,
+ VK_FORMAT_R16_SNORM: 71,
+ VK_FORMAT_R16_USCALED: 72,
+ VK_FORMAT_R16_SSCALED: 73,
+ VK_FORMAT_R16_UINT: 74,
+ VK_FORMAT_R16_SINT: 75,
+ VK_FORMAT_R16_SFLOAT: 76,
+ VK_FORMAT_R16G16_UNORM: 77,
+ VK_FORMAT_R16G16_SNORM: 78,
+ VK_FORMAT_R16G16_USCALED: 79,
+ VK_FORMAT_R16G16_SSCALED: 80,
+ VK_FORMAT_R16G16_UINT: 81,
+ VK_FORMAT_R16G16_SINT: 82,
+ VK_FORMAT_R16G16_SFLOAT: 83,
+ VK_FORMAT_R16G16B16_UNORM: 84,
+ VK_FORMAT_R16G16B16_SNORM: 85,
+ VK_FORMAT_R16G16B16_USCALED: 86,
+ VK_FORMAT_R16G16B16_SSCALED: 87,
+ VK_FORMAT_R16G16B16_UINT: 88,
+ VK_FORMAT_R16G16B16_SINT: 89,
+ VK_FORMAT_R16G16B16_SFLOAT: 90,
+ VK_FORMAT_R16G16B16A16_UNORM: 91,
+ VK_FORMAT_R16G16B16A16_SNORM: 92,
+ VK_FORMAT_R16G16B16A16_USCALED: 93,
+ VK_FORMAT_R16G16B16A16_SSCALED: 94,
+ VK_FORMAT_R16G16B16A16_UINT: 95,
+ VK_FORMAT_R16G16B16A16_SINT: 96,
+ VK_FORMAT_R16G16B16A16_SFLOAT: 97,
+ VK_FORMAT_R32_UINT: 98,
+ VK_FORMAT_R32_SINT: 99,
+ VK_FORMAT_R32_SFLOAT: 100,
+ VK_FORMAT_R32G32_UINT: 101,
+ VK_FORMAT_R32G32_SINT: 102,
+ VK_FORMAT_R32G32_SFLOAT: 103,
+ VK_FORMAT_R32G32B32_UINT: 104,
+ VK_FORMAT_R32G32B32_SINT: 105,
+ VK_FORMAT_R32G32B32_SFLOAT: 106,
+ VK_FORMAT_R32G32B32A32_UINT: 107,
+ VK_FORMAT_R32G32B32A32_SINT: 108,
+ VK_FORMAT_R32G32B32A32_SFLOAT: 109,
+ VK_FORMAT_R64_UINT: 110,
+ VK_FORMAT_R64_SINT: 111,
+ VK_FORMAT_R64_SFLOAT: 112,
+ VK_FORMAT_R64G64_UINT: 113,
+ VK_FORMAT_R64G64_SINT: 114,
+ VK_FORMAT_R64G64_SFLOAT: 115,
+ VK_FORMAT_R64G64B64_UINT: 116,
+ VK_FORMAT_R64G64B64_SINT: 117,
+ VK_FORMAT_R64G64B64_SFLOAT: 118,
+ VK_FORMAT_R64G64B64A64_UINT: 119,
+ VK_FORMAT_R64G64B64A64_SINT: 120,
+ VK_FORMAT_R64G64B64A64_SFLOAT: 121,
+ VK_FORMAT_B10G11R11_UFLOAT_PACK32: 122,
+ VK_FORMAT_E5B9G9R9_UFLOAT_PACK32: 123,
+ VK_FORMAT_D16_UNORM: 124,
+ VK_FORMAT_X8_D24_UNORM_PACK32: 125,
+ VK_FORMAT_D32_SFLOAT: 126,
+ VK_FORMAT_S8_UINT: 127,
+ VK_FORMAT_D16_UNORM_S8_UINT: 128,
+ VK_FORMAT_D24_UNORM_S8_UINT: 129,
+ VK_FORMAT_D32_SFLOAT_S8_UINT: 130,
+ VK_FORMAT_BC1_RGB_UNORM_BLOCK: 131,
+ VK_FORMAT_BC1_RGB_SRGB_BLOCK: 132,
+ VK_FORMAT_BC1_RGBA_UNORM_BLOCK: 133,
+ VK_FORMAT_BC1_RGBA_SRGB_BLOCK: 134,
+ VK_FORMAT_BC2_UNORM_BLOCK: 135,
+ VK_FORMAT_BC2_SRGB_BLOCK: 136,
+ VK_FORMAT_BC3_UNORM_BLOCK: 137,
+ VK_FORMAT_BC3_SRGB_BLOCK: 138,
+ VK_FORMAT_BC4_UNORM_BLOCK: 139,
+ VK_FORMAT_BC4_SNORM_BLOCK: 140,
+ VK_FORMAT_BC5_UNORM_BLOCK: 141,
+ VK_FORMAT_BC5_SNORM_BLOCK: 142,
+ VK_FORMAT_BC6H_UFLOAT_BLOCK: 143,
+ VK_FORMAT_BC6H_SFLOAT_BLOCK: 144,
+ VK_FORMAT_BC7_UNORM_BLOCK: 145,
+ VK_FORMAT_BC7_SRGB_BLOCK: 146,
+ VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK: 147,
+ VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK: 148,
+ VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK: 149,
+ VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK: 150,
+ VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK: 151,
+ VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK: 152,
+ VK_FORMAT_EAC_R11_UNORM_BLOCK: 153,
+ VK_FORMAT_EAC_R11_SNORM_BLOCK: 154,
+ VK_FORMAT_EAC_R11G11_UNORM_BLOCK: 155,
+ VK_FORMAT_EAC_R11G11_SNORM_BLOCK: 156,
+ VK_FORMAT_ASTC_4x4_UNORM_BLOCK: 157,
+ VK_FORMAT_ASTC_4x4_SRGB_BLOCK: 158,
+ VK_FORMAT_ASTC_5x4_UNORM_BLOCK: 159,
+ VK_FORMAT_ASTC_5x4_SRGB_BLOCK: 160,
+ VK_FORMAT_ASTC_5x5_UNORM_BLOCK: 161,
+ VK_FORMAT_ASTC_5x5_SRGB_BLOCK: 162,
+ VK_FORMAT_ASTC_6x5_UNORM_BLOCK: 163,
+ VK_FORMAT_ASTC_6x5_SRGB_BLOCK: 164,
+ VK_FORMAT_ASTC_6x6_UNORM_BLOCK: 165,
+ VK_FORMAT_ASTC_6x6_SRGB_BLOCK: 166,
+ VK_FORMAT_ASTC_8x5_UNORM_BLOCK: 167,
+ VK_FORMAT_ASTC_8x5_SRGB_BLOCK: 168,
+ VK_FORMAT_ASTC_8x6_UNORM_BLOCK: 169,
+ VK_FORMAT_ASTC_8x6_SRGB_BLOCK: 170,
+ VK_FORMAT_ASTC_8x8_UNORM_BLOCK: 171,
+ VK_FORMAT_ASTC_8x8_SRGB_BLOCK: 172,
+ VK_FORMAT_ASTC_10x5_UNORM_BLOCK: 173,
+ VK_FORMAT_ASTC_10x5_SRGB_BLOCK: 174,
+ VK_FORMAT_ASTC_10x6_UNORM_BLOCK: 175,
+ VK_FORMAT_ASTC_10x6_SRGB_BLOCK: 176,
+ VK_FORMAT_ASTC_10x8_UNORM_BLOCK: 177,
+ VK_FORMAT_ASTC_10x8_SRGB_BLOCK: 178,
+ VK_FORMAT_ASTC_10x10_UNORM_BLOCK: 179,
+ VK_FORMAT_ASTC_10x10_SRGB_BLOCK: 180,
+ VK_FORMAT_ASTC_12x10_UNORM_BLOCK: 181,
+ VK_FORMAT_ASTC_12x10_SRGB_BLOCK: 182,
+ VK_FORMAT_ASTC_12x12_UNORM_BLOCK: 183,
+ VK_FORMAT_ASTC_12x12_SRGB_BLOCK: 184,
+ VK_FORMAT_G8B8G8R8_422_UNORM: 1000156e3,
+ VK_FORMAT_B8G8R8G8_422_UNORM: 1000156001,
+ VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM: 1000156002,
+ VK_FORMAT_G8_B8R8_2PLANE_420_UNORM: 1000156003,
+ VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM: 1000156004,
+ VK_FORMAT_G8_B8R8_2PLANE_422_UNORM: 1000156005,
+ VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM: 1000156006,
+ VK_FORMAT_R10X6_UNORM_PACK16: 1000156007,
+ VK_FORMAT_R10X6G10X6_UNORM_2PACK16: 1000156008,
+ VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16: 1000156009,
+ VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16: 1000156010,
+ VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16: 1000156011,
+ VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16: 1000156012,
+ VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16: 1000156013,
+ VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16: 1000156014,
+ VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16: 1000156015,
+ VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16: 1000156016,
+ VK_FORMAT_R12X4_UNORM_PACK16: 1000156017,
+ VK_FORMAT_R12X4G12X4_UNORM_2PACK16: 1000156018,
+ VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16: 1000156019,
+ VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16: 1000156020,
+ VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16: 1000156021,
+ VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16: 1000156022,
+ VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16: 1000156023,
+ VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16: 1000156024,
+ VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16: 1000156025,
+ VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16: 1000156026,
+ VK_FORMAT_G16B16G16R16_422_UNORM: 1000156027,
+ VK_FORMAT_B16G16R16G16_422_UNORM: 1000156028,
+ VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM: 1000156029,
+ VK_FORMAT_G16_B16R16_2PLANE_420_UNORM: 1000156030,
+ VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM: 1000156031,
+ VK_FORMAT_G16_B16R16_2PLANE_422_UNORM: 1000156032,
+ VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM: 1000156033,
+ VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG: 1000054e3,
+ VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG: 1000054001,
+ VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG: 1000054002,
+ VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG: 1000054003,
+ VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG: 1000054004,
+ VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG: 1000054005,
+ VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG: 1000054006,
+ VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG: 1000054007,
+ VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT: 1000066e3,
+ VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT: 1000066001,
+ VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT: 1000066002,
+ VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT: 1000066003,
+ VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT: 1000066004,
+ VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT: 1000066005,
+ VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT: 1000066006,
+ VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT: 1000066007,
+ VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT: 1000066008,
+ VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT: 1000066009,
+ VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT: 1000066010,
+ VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT: 1000066011,
+ VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT: 1000066012,
+ VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT: 1000066013,
+ VK_FORMAT_G8B8G8R8_422_UNORM_KHR: 1000156e3,
+ VK_FORMAT_B8G8R8G8_422_UNORM_KHR: 1000156001,
+ VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR: 1000156002,
+ VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR: 1000156003,
+ VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR: 1000156004,
+ VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR: 1000156005,
+ VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR: 1000156006,
+ VK_FORMAT_R10X6_UNORM_PACK16_KHR: 1000156007,
+ VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR: 1000156008,
+ VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR: 1000156009,
+ VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR: 1000156010,
+ VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR: 1000156011,
+ VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR: 1000156012,
+ VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR: 1000156013,
+ VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR: 1000156014,
+ VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR: 1000156015,
+ VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR: 1000156016,
+ VK_FORMAT_R12X4_UNORM_PACK16_KHR: 1000156017,
+ VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR: 1000156018,
+ VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR: 1000156019,
+ VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR: 1000156020,
+ VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR: 1000156021,
+ VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR: 1000156022,
+ VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR: 1000156023,
+ VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR: 1000156024,
+ VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR: 1000156025,
+ VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR: 1000156026,
+ VK_FORMAT_G16B16G16R16_422_UNORM_KHR: 1000156027,
+ VK_FORMAT_B16G16R16G16_422_UNORM_KHR: 1000156028,
+ VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR: 1000156029,
+ VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR: 1000156030,
+ VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR: 1000156031,
+ VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR: 1000156032,
+ VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR: 1000156033
+}, VulkanConstants$1 = Object.freeze(VulkanConstants);
+function createWorldBathymetryAsync(e) {
+ return e = defaultValue(e, defaultValue.EMPTY_OBJECT), CesiumTerrainProvider.fromIonAssetId(2426648, {
+ requestVertexNormals: defaultValue(e.requestVertexNormals, !1)
+ });
+}
+function createWorldTerrainAsync(e) {
+ return e = defaultValue(e, defaultValue.EMPTY_OBJECT), CesiumTerrainProvider.fromIonAssetId(1, {
+ requestVertexNormals: defaultValue(e.requestVertexNormals, !1),
+ requestWaterMask: defaultValue(e.requestWaterMask, !1),
+ ellipsoid: Ellipsoid.WGS84
+ });
+}
+const compressedMagic = 1953029805, compressedMagicSwap = 2917034100;
+function decodeGoogleEarthEnterpriseData(e, t) {
+ if (decodeGoogleEarthEnterpriseData.passThroughDataForTesting)
+ return t;
+ const n = e.byteLength;
+ if (n === 0 || n % 4 !== 0)
+ throw new RuntimeError(
+ "The length of key must be greater than 0 and a multiple of 4."
+ );
+ const i = new DataView(t), r = i.getUint32(0, !0);
+ if (r === compressedMagic || r === compressedMagicSwap)
+ return t;
+ const o = new DataView(e);
+ let s = 0;
+ const c = t.byteLength, l = c - c % 8, d = n;
+ let f, h = 8;
+ for (; s < l; )
+ for (h = (h + 8) % 24, f = h; s < l && f < d; )
+ i.setUint32(
+ s,
+ i.getUint32(s, !0) ^ o.getUint32(f, !0),
+ !0
+ ), i.setUint32(
+ s + 4,
+ i.getUint32(s + 4, !0) ^ o.getUint32(f + 4, !0),
+ !0
+ ), s += 8, f += 24;
+ if (s < c)
+ for (f >= d && (h = (h + 8) % 24, f = h); s < c; )
+ i.setUint8(s, i.getUint8(s) ^ o.getUint8(f)), s++, f++;
+}
+decodeGoogleEarthEnterpriseData.passThroughDataForTesting = !1;
+const scratchBarycentricCoords = new Cartesian3();
+function pointInsideTriangle(e, t, n, i) {
+ const r = barycentricCoordinates(
+ e,
+ t,
+ n,
+ i,
+ scratchBarycentricCoords
+ );
+ return defined(r) ? r.x > 0 && r.y > 0 && r.z > 0 : !1;
+}
+async function sampleTerrain(e, t, n, i) {
+ return defined(i) || (i = !1), doSampling(e, t, n, i);
+}
+function attemptConsumeNextQueueItem(e, t, n) {
+ const i = e[0], r = i.terrainProvider.requestTileGeometry(
+ i.x,
+ i.y,
+ i.level
+ );
+ if (!r)
+ return !1;
+ let o;
+ return n ? o = r.then(createInterpolateFunction(i)) : o = r.then(createInterpolateFunction(i)).catch(createMarkFailedFunction(i)), e.shift(), t.push(o), !0;
+}
+function delay(e) {
+ return new Promise(function(t) {
+ setTimeout(t, e);
+ });
+}
+function drainTileRequestQueue(e, t, n) {
+ return e.length ? attemptConsumeNextQueueItem(
+ e,
+ t,
+ n
+ ) ? drainTileRequestQueue(e, t, n) : delay(100).then(() => drainTileRequestQueue(e, t, n)) : Promise.resolve();
+}
+function doSampling(e, t, n, i) {
+ const r = e.tilingScheme;
+ let o;
+ const s = [], c = {};
+ for (o = 0; o < n.length; ++o) {
+ const d = r.positionToTileXY(n[o], t);
+ if (!defined(d))
+ continue;
+ const f = d.toString();
+ if (!c.hasOwnProperty(f)) {
+ const h = {
+ x: d.x,
+ y: d.y,
+ level: t,
+ tilingScheme: r,
+ terrainProvider: e,
+ positions: []
+ };
+ c[f] = h, s.push(h);
+ }
+ c[f].positions.push(n[o]);
+ }
+ const l = [];
+ return drainTileRequestQueue(
+ s,
+ l,
+ i
+ ).then(function() {
+ return Promise.all(l).then(function() {
+ return n;
+ });
+ });
+}
+function interpolateAndAssignHeight(e, t, n) {
+ const i = t.interpolateHeight(
+ n,
+ e.longitude,
+ e.latitude
+ );
+ return i === void 0 ? !1 : (e.height = i, !0);
+}
+function createInterpolateFunction(e) {
+ const t = e.positions, n = e.tilingScheme.tileXYToRectangle(
+ e.x,
+ e.y,
+ e.level
+ );
+ return function(i) {
+ let r = !1;
+ for (let o = 0; o < t.length; ++o) {
+ const s = t[o];
+ if (!interpolateAndAssignHeight(
+ s,
+ i,
+ n
+ )) {
+ r = !0;
+ break;
+ }
+ }
+ return r ? i.createMesh({
+ tilingScheme: e.tilingScheme,
+ x: e.x,
+ y: e.y,
+ level: e.level,
+ // don't throttle this mesh creation because we've asked to sample these points;
+ // so sample them! We don't care how many tiles that is!
+ throttle: !1
+ }).then(function() {
+ for (let o = 0; o < t.length; ++o) {
+ const s = t[o];
+ interpolateAndAssignHeight(s, i, n);
+ }
+ }) : Promise.resolve();
+ };
+}
+function createMarkFailedFunction(e) {
+ const t = e.positions;
+ return function() {
+ for (let n = 0; n < t.length; ++n) {
+ const i = t[n];
+ i.height = void 0;
+ }
+ };
+}
+const scratchCartesian2$1 = new Cartesian2();
+async function sampleTerrainMostDetailed(e, t, n) {
+ defined(n) || (n = !1);
+ const i = [], r = [], o = e.availability, s = [];
+ for (let l = 0; l < t.length; ++l) {
+ const d = t[l], f = o.computeMaximumLevelAtPosition(d);
+ if (r[l] = f, f === 0) {
+ e.tilingScheme.positionToTileXY(
+ d,
+ 1,
+ scratchCartesian2$1
+ );
+ const p = e.loadTileDataAvailability(
+ scratchCartesian2$1.x,
+ scratchCartesian2$1.y,
+ 1
+ );
+ defined(p) && s.push(p);
+ }
+ let h = i[f];
+ defined(h) || (i[f] = h = []), h.push(d);
+ }
+ await Promise.all(s), await Promise.all(
+ i.map(function(l, d) {
+ if (defined(l))
+ return sampleTerrain(
+ e,
+ d,
+ l,
+ n
+ );
+ })
+ );
+ const c = [];
+ for (let l = 0; l < t.length; ++l) {
+ const d = t[l];
+ o.computeMaximumLevelAtPosition(d) !== r[l] && c.push(d);
+ }
+ return c.length > 0 && await sampleTerrainMostDetailed(
+ e,
+ c,
+ n
+ ), t;
+}
+function srgbToLinear(e) {
+ return e <= 0.04045 ? e * 0.07739938080495357 : Math.pow(
+ // eslint-disable-next-line no-loss-of-precision
+ (e + 0.055) * 0.9478672985781991,
+ 2.4
+ );
+}
+function webGLConstantToGlslType(e) {
+ switch (e) {
+ case WebGLConstants$1.FLOAT:
+ return "float";
+ case WebGLConstants$1.FLOAT_VEC2:
+ return "vec2";
+ case WebGLConstants$1.FLOAT_VEC3:
+ return "vec3";
+ case WebGLConstants$1.FLOAT_VEC4:
+ return "vec4";
+ case WebGLConstants$1.FLOAT_MAT2:
+ return "mat2";
+ case WebGLConstants$1.FLOAT_MAT3:
+ return "mat3";
+ case WebGLConstants$1.FLOAT_MAT4:
+ return "mat4";
+ case WebGLConstants$1.SAMPLER_2D:
+ return "sampler2D";
+ case WebGLConstants$1.BOOL:
+ return "bool";
+ }
+}
+function wrapFunction(e, t, n) {
+ return function() {
+ n.apply(e, arguments), t.apply(e, arguments);
+ };
+}
+const defaultDimensions = new Cartesian3(1, 1, 1);
+function BoxEmitter(e) {
+ e = defaultValue(e, defaultDimensions), this._dimensions = Cartesian3.clone(e);
+}
+Object.defineProperties(BoxEmitter.prototype, {
+ /**
+ * The width, height and depth dimensions of the box in meters.
+ * @memberof BoxEmitter.prototype
+ * @type {Cartesian3}
+ * @default new Cartesian3(1.0, 1.0, 1.0)
+ */
+ dimensions: {
+ get: function() {
+ return this._dimensions;
+ },
+ set: function(e) {
+ Cartesian3.clone(e, this._dimensions);
+ }
+ }
+});
+const scratchHalfDim = new Cartesian3();
+BoxEmitter.prototype.emit = function(e) {
+ const t = this._dimensions, n = Cartesian3.multiplyByScalar(t, 0.5, scratchHalfDim), i = CesiumMath.randomBetween(-n.x, n.x), r = CesiumMath.randomBetween(-n.y, n.y), o = CesiumMath.randomBetween(-n.z, n.z);
+ e.position = Cartesian3.fromElements(i, r, o, e.position), e.velocity = Cartesian3.normalize(
+ e.position,
+ e.velocity
+ );
+};
+function Cesium3DTileContent() {
+ this.featurePropertiesDirty = !1;
+}
+Object.defineProperties(Cesium3DTileContent.prototype, {
+ /**
+ * Gets the number of features in the tile.
+ *
+ * @memberof Cesium3DTileContent.prototype
+ *
+ * @type {number}
+ * @readonly
+ */
+ featuresLength: {
+ // eslint-disable-next-line getter-return
+ get: function() {
+ DeveloperError.throwInstantiationError();
+ }
+ },
+ /**
+ * Gets the number of points in the tile.
+ *
+ * Only applicable for tiles with Point Cloud content. This is different than {@link Cesium3DTileContent#featuresLength} which
+ * equals the number of groups of points as distinguished by the BATCH_ID feature table semantic.
+ *
+ * This is used to implement the Cesium3DTileContent interface, but is
+ * not part of the public Cesium API.
+ *
+ * This is used to implement the Cesium3DTileContent interface, but is
+ * not part of the public Cesium API.
+ *
3DTILES_metadata extension. If neither are present,
+ * this property should be undefined.
+ *
+ * This is used to implement the Cesium3DTileContent interface, but is
+ * not part of the public Cesium API.
+ *
show property. Alternatively a boolean, string, or object defining a show style can be used.
+ * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+ *
+ * The expression must return or convert to a Boolean.
+ *
+ * This expression is applicable to all tile formats. + *
+ * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @example + * const style = new Cesium3DTileStyle({ + * show : '(regExp("^Chest").test(${County})) && (${YearBuilt} >= 1970)' + * }); + * style.show.evaluate(feature); // returns true or false depending on the feature's properties + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override show expression with a custom function + * style.show = { + * evaluate : function(feature) { + * return true; + * } + * }; + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override show expression with a boolean + * style.show = true; + * }; + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override show expression with a string + * style.show = '${Height} > 0'; + * }; + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override show expression with a condition + * style.show = { + * conditions: [ + * ['${height} > 2', 'false'], + * ['true', 'true'] + * ]; + * }; + */ + show: { + get: function() { + return this._show; + }, + set: function(e) { + this._show = getExpression(this, e), this._style.show = getJsonFromExpression(this._show), this._showShaderFunctionReady = !1; + } + }, + /** + * Gets or sets the {@link StyleExpression} object used to evaluate the style'scolor property. Alternatively a string or object defining a color style can be used.
+ * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+ *
+ * The expression must return a Color.
+ *
+ * This expression is applicable to all tile formats. + *
+ * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @example + * const style = new Cesium3DTileStyle({ + * color : '(${Temperature} > 90) ? color("red") : color("white")' + * }); + * style.color.evaluateColor(feature, result); // returns a Cesium.Color object + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override color expression with a custom function + * style.color = { + * evaluateColor : function(feature, result) { + * return Cesium.Color.clone(Cesium.Color.WHITE, result); + * } + * }; + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override color expression with a string + * style.color = 'color("blue")'; + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override color expression with a condition + * style.color = { + * conditions : [ + * ['${height} > 2', 'color("cyan")'], + * ['true', 'color("blue")'] + * ] + * }; + */ + color: { + get: function() { + return this._color; + }, + set: function(e) { + this._color = getExpression(this, e), this._style.color = getJsonFromExpression(this._color), this._colorShaderFunctionReady = !1; + } + }, + /** + * Gets or sets the {@link StyleExpression} object used to evaluate the style'spointSize property. Alternatively a string or object defining a point size style can be used.
+ * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+ *
+ * The expression must return a Number.
+ *
+ * This expression is only applicable to point features in a Vector tile or a Point Cloud tile. + *
+ * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @example + * const style = new Cesium3DTileStyle({ + * pointSize : '(${Temperature} > 90) ? 2.0 : 1.0' + * }); + * style.pointSize.evaluate(feature); // returns a Number + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override pointSize expression with a custom function + * style.pointSize = { + * evaluate : function(feature) { + * return 1.0; + * } + * }; + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override pointSize expression with a number + * style.pointSize = 1.0; + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override pointSize expression with a string + * style.pointSize = '${height} / 10'; + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override pointSize expression with a condition + * style.pointSize = { + * conditions : [ + * ['${height} > 2', '1.0'], + * ['true', '2.0'] + * ] + * }; + */ + pointSize: { + get: function() { + return this._pointSize; + }, + set: function(e) { + this._pointSize = getExpression(this, e), this._style.pointSize = getJsonFromExpression(this._pointSize), this._pointSizeShaderFunctionReady = !1; + } + }, + /** + * Gets or sets the {@link StyleExpression} object used to evaluate the style'spointOutlineColor property. Alternatively a string or object defining a color style can be used.
+ * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+ *
+ * The expression must return a Color.
+ *
+ * This expression is only applicable to point features in a Vector tile. + *
+ * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override pointOutlineColor expression with a string + * style.pointOutlineColor = 'color("blue")'; + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override pointOutlineColor expression with a condition + * style.pointOutlineColor = { + * conditions : [ + * ['${height} > 2', 'color("cyan")'], + * ['true', 'color("blue")'] + * ] + * }; + */ + pointOutlineColor: { + get: function() { + return this._pointOutlineColor; + }, + set: function(e) { + this._pointOutlineColor = getExpression(this, e), this._style.pointOutlineColor = getJsonFromExpression( + this._pointOutlineColor + ); + } + }, + /** + * Gets or sets the {@link StyleExpression} object used to evaluate the style'spointOutlineWidth property. Alternatively a string or object defining a number style can be used.
+ * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+ *
+ * The expression must return a Number.
+ *
+ * This expression is only applicable to point features in a Vector tile. + *
+ * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override pointOutlineWidth expression with a string + * style.pointOutlineWidth = '5'; + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override pointOutlineWidth expression with a condition + * style.pointOutlineWidth = { + * conditions : [ + * ['${height} > 2', '5'], + * ['true', '0'] + * ] + * }; + */ + pointOutlineWidth: { + get: function() { + return this._pointOutlineWidth; + }, + set: function(e) { + this._pointOutlineWidth = getExpression(this, e), this._style.pointOutlineWidth = getJsonFromExpression( + this._pointOutlineWidth + ); + } + }, + /** + * Gets or sets the {@link StyleExpression} object used to evaluate the style'slabelColor property. Alternatively a string or object defining a color style can be used.
+ * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+ *
+ * The expression must return a Color.
+ *
+ * This expression is only applicable to point features in a Vector tile. + *
+ * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override labelColor expression with a string + * style.labelColor = 'color("blue")'; + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override labelColor expression with a condition + * style.labelColor = { + * conditions : [ + * ['${height} > 2', 'color("cyan")'], + * ['true', 'color("blue")'] + * ] + * }; + */ + labelColor: { + get: function() { + return this._labelColor; + }, + set: function(e) { + this._labelColor = getExpression(this, e), this._style.labelColor = getJsonFromExpression(this._labelColor); + } + }, + /** + * Gets or sets the {@link StyleExpression} object used to evaluate the style'slabelOutlineColor property. Alternatively a string or object defining a color style can be used.
+ * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+ *
+ * The expression must return a Color.
+ *
+ * This expression is only applicable to point features in a Vector tile. + *
+ * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override labelOutlineColor expression with a string + * style.labelOutlineColor = 'color("blue")'; + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override labelOutlineColor expression with a condition + * style.labelOutlineColor = { + * conditions : [ + * ['${height} > 2', 'color("cyan")'], + * ['true', 'color("blue")'] + * ] + * }; + */ + labelOutlineColor: { + get: function() { + return this._labelOutlineColor; + }, + set: function(e) { + this._labelOutlineColor = getExpression(this, e), this._style.labelOutlineColor = getJsonFromExpression( + this._labelOutlineColor + ); + } + }, + /** + * Gets or sets the {@link StyleExpression} object used to evaluate the style'slabelOutlineWidth property. Alternatively a string or object defining a number style can be used.
+ * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+ *
+ * The expression must return a Number.
+ *
+ * This expression is only applicable to point features in a Vector tile. + *
+ * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override labelOutlineWidth expression with a string + * style.labelOutlineWidth = '5'; + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override labelOutlineWidth expression with a condition + * style.labelOutlineWidth = { + * conditions : [ + * ['${height} > 2', '5'], + * ['true', '0'] + * ] + * }; + */ + labelOutlineWidth: { + get: function() { + return this._labelOutlineWidth; + }, + set: function(e) { + this._labelOutlineWidth = getExpression(this, e), this._style.labelOutlineWidth = getJsonFromExpression( + this._labelOutlineWidth + ); + } + }, + /** + * Gets or sets the {@link StyleExpression} object used to evaluate the style'sfont property. Alternatively a string or object defining a string style can be used.
+ * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+ *
+ * The expression must return a String.
+ *
+ * This expression is only applicable to point features in a Vector tile. + *
+ * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + * + * @example + * const style = new Cesium3DTileStyle({ + * font : '(${Temperature} > 90) ? "30px Helvetica" : "24px Helvetica"' + * }); + * style.font.evaluate(feature); // returns a String + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override font expression with a custom function + * style.font = { + * evaluate : function(feature) { + * return '24px Helvetica'; + * } + * }; + */ + font: { + get: function() { + return this._font; + }, + set: function(e) { + this._font = getExpression(this, e), this._style.font = getJsonFromExpression(this._font); + } + }, + /** + * Gets or sets the {@link StyleExpression} object used to evaluate the style'slabel style property. Alternatively a string or object defining a number style can be used.
+ * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+ *
+ * The expression must return a LabelStyle.
+ *
+ * This expression is only applicable to point features in a Vector tile. + *
+ * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + * + * @example + * const style = new Cesium3DTileStyle({ + * labelStyle : `(\${Temperature} > 90) ? ${LabelStyle.FILL_AND_OUTLINE} : ${LabelStyle.FILL}` + * }); + * style.labelStyle.evaluate(feature); // returns a LabelStyle + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override labelStyle expression with a custom function + * style.labelStyle = { + * evaluate : function(feature) { + * return LabelStyle.FILL; + * } + * }; + */ + labelStyle: { + get: function() { + return this._labelStyle; + }, + set: function(e) { + this._labelStyle = getExpression(this, e), this._style.labelStyle = getJsonFromExpression(this._labelStyle); + } + }, + /** + * Gets or sets the {@link StyleExpression} object used to evaluate the style'slabelText property. Alternatively a string or object defining a string style can be used.
+ * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+ *
+ * The expression must return a String.
+ *
+ * This expression is only applicable to point features in a Vector tile. + *
+ * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + * + * @example + * const style = new Cesium3DTileStyle({ + * labelText : '(${Temperature} > 90) ? ">90" : "<=90"' + * }); + * style.labelText.evaluate(feature); // returns a String + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override labelText expression with a custom function + * style.labelText = { + * evaluate : function(feature) { + * return 'Example label text'; + * } + * }; + */ + labelText: { + get: function() { + return this._labelText; + }, + set: function(e) { + this._labelText = getExpression(this, e), this._style.labelText = getJsonFromExpression(this._labelText); + } + }, + /** + * Gets or sets the {@link StyleExpression} object used to evaluate the style'sbackgroundColor property. Alternatively a string or object defining a color style can be used.
+ * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+ *
+ * The expression must return a Color.
+ *
+ * This expression is only applicable to point features in a Vector tile. + *
+ * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override backgroundColor expression with a string + * style.backgroundColor = 'color("blue")'; + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override backgroundColor expression with a condition + * style.backgroundColor = { + * conditions : [ + * ['${height} > 2', 'color("cyan")'], + * ['true', 'color("blue")'] + * ] + * }; + */ + backgroundColor: { + get: function() { + return this._backgroundColor; + }, + set: function(e) { + this._backgroundColor = getExpression(this, e), this._style.backgroundColor = getJsonFromExpression( + this._backgroundColor + ); + } + }, + /** + * Gets or sets the {@link StyleExpression} object used to evaluate the style'sbackgroundPadding property. Alternatively a string or object defining a vec2 style can be used.
+ * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+ *
+ * The expression must return a Cartesian2.
+ *
+ * This expression is only applicable to point features in a Vector tile. + *
+ * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override backgroundPadding expression with a string + * style.backgroundPadding = 'vec2(5.0, 7.0)'; + * style.backgroundPadding.evaluate(feature); // returns a Cartesian2 + */ + backgroundPadding: { + get: function() { + return this._backgroundPadding; + }, + set: function(e) { + this._backgroundPadding = getExpression(this, e), this._style.backgroundPadding = getJsonFromExpression( + this._backgroundPadding + ); + } + }, + /** + * Gets or sets the {@link StyleExpression} object used to evaluate the style'sbackgroundEnabled property. Alternatively a string or object defining a boolean style can be used.
+ * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+ *
+ * The expression must return a Boolean.
+ *
+ * This expression is only applicable to point features in a Vector tile. + *
+ * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override backgroundEnabled expression with a string + * style.backgroundEnabled = 'true'; + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override backgroundEnabled expression with a condition + * style.backgroundEnabled = { + * conditions : [ + * ['${height} > 2', 'true'], + * ['true', 'false'] + * ] + * }; + */ + backgroundEnabled: { + get: function() { + return this._backgroundEnabled; + }, + set: function(e) { + this._backgroundEnabled = getExpression(this, e), this._style.backgroundEnabled = getJsonFromExpression( + this._backgroundEnabled + ); + } + }, + /** + * Gets or sets the {@link StyleExpression} object used to evaluate the style'sscaleByDistance property. Alternatively a string or object defining a vec4 style can be used.
+ * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+ *
+ * The expression must return a Cartesian4.
+ *
+ * This expression is only applicable to point features in a Vector tile. + *
+ * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override scaleByDistance expression with a string + * style.scaleByDistance = 'vec4(1.5e2, 2.0, 1.5e7, 0.5)'; + * style.scaleByDistance.evaluate(feature); // returns a Cartesian4 + */ + scaleByDistance: { + get: function() { + return this._scaleByDistance; + }, + set: function(e) { + this._scaleByDistance = getExpression(this, e), this._style.scaleByDistance = getJsonFromExpression( + this._scaleByDistance + ); + } + }, + /** + * Gets or sets the {@link StyleExpression} object used to evaluate the style'sscale property. Alternatively a string or object defining a number style can be used.
+ * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+ *
+ * The expression must return a Number.
+ *
+ * This expression is only applicable to point features in a Vector tile. + *
+ * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + * + * @example + * var style = new Cesium.Cesium3DTileStyle(); + * // Override scale expression with a string + * style.scale = '5'; + * + * @example + * var style = new Cesium.Cesium3DTileStyle(); + * // Override scale expression with a condition + * style.scale = { + * conditions : [ + * ['${height} > 2', '5'], + * ['true', '0'] + * ] + * }; + */ + scale: { + get: function() { + return this._scale; + }, + set: function(e) { + this._scale = getExpression(this, e), this._style.scale = getJsonFromExpression(this._scale); + } + }, + /** + * Gets or sets the {@link StyleExpression} object used to evaluate the style'stranslucencyByDistance property. Alternatively a string or object defining a vec4 style can be used.
+ * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+ *
+ * The expression must return a Cartesian4.
+ *
+ * This expression is only applicable to point features in a Vector tile. + *
+ * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override translucencyByDistance expression with a string + * style.translucencyByDistance = 'vec4(1.5e2, 1.0, 1.5e7, 0.2)'; + * style.translucencyByDistance.evaluate(feature); // returns a Cartesian4 + */ + translucencyByDistance: { + get: function() { + return this._translucencyByDistance; + }, + set: function(e) { + this._translucencyByDistance = getExpression(this, e), this._style.translucencyByDistance = getJsonFromExpression( + this._translucencyByDistance + ); + } + }, + /** + * Gets or sets the {@link StyleExpression} object used to evaluate the style'sdistanceDisplayCondition property. Alternatively a string or object defining a vec2 style can be used.
+ * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+ *
+ * The expression must return a Cartesian2.
+ *
+ * This expression is only applicable to point features in a Vector tile. + *
+ * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override distanceDisplayCondition expression with a string + * style.distanceDisplayCondition = 'vec2(0.0, 5.5e6)'; + * style.distanceDisplayCondition.evaluate(feature); // returns a Cartesian2 + */ + distanceDisplayCondition: { + get: function() { + return this._distanceDisplayCondition; + }, + set: function(e) { + this._distanceDisplayCondition = getExpression(this, e), this._style.distanceDisplayCondition = getJsonFromExpression( + this._distanceDisplayCondition + ); + } + }, + /** + * Gets or sets the {@link StyleExpression} object used to evaluate the style'sheightOffset property. Alternatively a string or object defining a number style can be used.
+ * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+ *
+ * The expression must return a Number.
+ *
+ * This expression is only applicable to point features in a Vector tile. + *
+ * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override heightOffset expression with a string + * style.heightOffset = '2.0'; + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override heightOffset expression with a condition + * style.heightOffset = { + * conditions : [ + * ['${height} > 2', '4.0'], + * ['true', '2.0'] + * ] + * }; + */ + heightOffset: { + get: function() { + return this._heightOffset; + }, + set: function(e) { + this._heightOffset = getExpression(this, e), this._style.heightOffset = getJsonFromExpression(this._heightOffset); + } + }, + /** + * Gets or sets the {@link StyleExpression} object used to evaluate the style'sanchorLineEnabled property. Alternatively a string or object defining a boolean style can be used.
+ * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+ *
+ * The expression must return a Boolean.
+ *
+ * This expression is only applicable to point features in a Vector tile. + *
+ * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override anchorLineEnabled expression with a string + * style.anchorLineEnabled = 'true'; + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override anchorLineEnabled expression with a condition + * style.anchorLineEnabled = { + * conditions : [ + * ['${height} > 2', 'true'], + * ['true', 'false'] + * ] + * }; + */ + anchorLineEnabled: { + get: function() { + return this._anchorLineEnabled; + }, + set: function(e) { + this._anchorLineEnabled = getExpression(this, e), this._style.anchorLineEnabled = getJsonFromExpression( + this._anchorLineEnabled + ); + } + }, + /** + * Gets or sets the {@link StyleExpression} object used to evaluate the style'sanchorLineColor property. Alternatively a string or object defining a color style can be used.
+ * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+ *
+ * The expression must return a Color.
+ *
+ * This expression is only applicable to point features in a Vector tile. + *
+ * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override anchorLineColor expression with a string + * style.anchorLineColor = 'color("blue")'; + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override anchorLineColor expression with a condition + * style.anchorLineColor = { + * conditions : [ + * ['${height} > 2', 'color("cyan")'], + * ['true', 'color("blue")'] + * ] + * }; + */ + anchorLineColor: { + get: function() { + return this._anchorLineColor; + }, + set: function(e) { + this._anchorLineColor = getExpression(this, e), this._style.anchorLineColor = getJsonFromExpression( + this._anchorLineColor + ); + } + }, + /** + * Gets or sets the {@link StyleExpression} object used to evaluate the style'simage property. Alternatively a string or object defining a string style can be used.
+ * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+ *
+ * The expression must return a String.
+ *
+ * This expression is only applicable to point features in a Vector tile. + *
+ * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + * + * @example + * const style = new Cesium3DTileStyle({ + * image : '(${Temperature} > 90) ? "/url/to/image1" : "/url/to/image2"' + * }); + * style.image.evaluate(feature); // returns a String + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override image expression with a custom function + * style.image = { + * evaluate : function(feature) { + * return '/url/to/image'; + * } + * }; + */ + image: { + get: function() { + return this._image; + }, + set: function(e) { + this._image = getExpression(this, e), this._style.image = getJsonFromExpression(this._image); + } + }, + /** + * Gets or sets the {@link StyleExpression} object used to evaluate the style'sdisableDepthTestDistance property. Alternatively a string or object defining a number style can be used.
+ * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+ *
+ * The expression must return a Number.
+ *
+ * This expression is only applicable to point features in a Vector tile. + *
+ * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override disableDepthTestDistance expression with a string + * style.disableDepthTestDistance = '1000.0'; + * style.disableDepthTestDistance.evaluate(feature); // returns a Number + */ + disableDepthTestDistance: { + get: function() { + return this._disableDepthTestDistance; + }, + set: function(e) { + this._disableDepthTestDistance = getExpression(this, e), this._style.disableDepthTestDistance = getJsonFromExpression( + this._disableDepthTestDistance + ); + } + }, + /** + * Gets or sets the {@link StyleExpression} object used to evaluate the style'shorizontalOrigin property. Alternatively a string or object defining a number style can be used.
+ * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+ *
+ * The expression must return a HorizontalOrigin.
+ *
+ * This expression is only applicable to point features in a Vector tile. + *
+ * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + * + * @example + * const style = new Cesium3DTileStyle({ + * horizontalOrigin : HorizontalOrigin.LEFT + * }); + * style.horizontalOrigin.evaluate(feature); // returns a HorizontalOrigin + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override horizontalOrigin expression with a custom function + * style.horizontalOrigin = { + * evaluate : function(feature) { + * return HorizontalOrigin.CENTER; + * } + * }; + */ + horizontalOrigin: { + get: function() { + return this._horizontalOrigin; + }, + set: function(e) { + this._horizontalOrigin = getExpression(this, e), this._style.horizontalOrigin = getJsonFromExpression( + this._horizontalOrigin + ); + } + }, + /** + * Gets or sets the {@link StyleExpression} object used to evaluate the style'sverticalOrigin property. Alternatively a string or object defining a number style can be used.
+ * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+ *
+ * The expression must return a VerticalOrigin.
+ *
+ * This expression is only applicable to point features in a Vector tile. + *
+ * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + * + * @example + * const style = new Cesium3DTileStyle({ + * verticalOrigin : VerticalOrigin.TOP + * }); + * style.verticalOrigin.evaluate(feature); // returns a VerticalOrigin + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override verticalOrigin expression with a custom function + * style.verticalOrigin = { + * evaluate : function(feature) { + * return VerticalOrigin.CENTER; + * } + * }; + */ + verticalOrigin: { + get: function() { + return this._verticalOrigin; + }, + set: function(e) { + this._verticalOrigin = getExpression(this, e), this._style.verticalOrigin = getJsonFromExpression(this._verticalOrigin); + } + }, + /** + Gets or sets the {@link StyleExpression} object used to evaluate the style'slabelHorizontalOrigin property. Alternatively a string or object defining a number style can be used.
+ * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+ *
+ * The expression must return a HorizontalOrigin.
+ *
+ * This expression is only applicable to point features in a Vector tile. + *
+ * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + * + * @example + * const style = new Cesium3DTileStyle({ + * labelHorizontalOrigin : HorizontalOrigin.LEFT + * }); + * style.labelHorizontalOrigin.evaluate(feature); // returns a HorizontalOrigin + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override labelHorizontalOrigin expression with a custom function + * style.labelHorizontalOrigin = { + * evaluate : function(feature) { + * return HorizontalOrigin.CENTER; + * } + * }; + */ + labelHorizontalOrigin: { + get: function() { + return this._labelHorizontalOrigin; + }, + set: function(e) { + this._labelHorizontalOrigin = getExpression(this, e), this._style.labelHorizontalOrigin = getJsonFromExpression( + this._labelHorizontalOrigin + ); + } + }, + /** + * Gets or sets the {@link StyleExpression} object used to evaluate the style'slabelVerticalOrigin property. Alternatively a string or object defining a number style can be used.
+ * The getter will return the internal {@link Expression} or {@link ConditionsExpression}, which may differ from the value provided to the setter.
+ *
+ * The expression must return a VerticalOrigin.
+ *
+ * This expression is only applicable to point features in a Vector tile. + *
+ * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. + * + * @example + * const style = new Cesium3DTileStyle({ + * labelVerticalOrigin : VerticalOrigin.TOP + * }); + * style.labelVerticalOrigin.evaluate(feature); // returns a VerticalOrigin + * + * @example + * const style = new Cesium.Cesium3DTileStyle(); + * // Override labelVerticalOrigin expression with a custom function + * style.labelVerticalOrigin = { + * evaluate : function(feature) { + * return VerticalOrigin.CENTER; + * } + * }; + */ + labelVerticalOrigin: { + get: function() { + return this._labelVerticalOrigin; + }, + set: function(e) { + this._labelVerticalOrigin = getExpression(this, e), this._style.labelVerticalOrigin = getJsonFromExpression( + this._labelVerticalOrigin + ); + } + }, + /** + * Gets or sets the object containing application-specific expression that can be explicitly + * evaluated, e.g., for display in a UI. + * + * @memberof Cesium3DTileStyle.prototype + * + * @type {StyleExpression} + * + * @example + * const style = new Cesium3DTileStyle({ + * meta : { + * description : '"Building id ${id} has height ${Height}."' + * } + * }); + * style.meta.description.evaluate(feature); // returns a String with the substituted variables + */ + meta: { + get: function() { + return this._meta; + }, + set: function(e) { + this._meta = e; + } + } +}); +Cesium3DTileStyle.fromUrl = function(e) { + return Resource.createIfNeeded(e).fetchJson(e).then(function(n) { + return new Cesium3DTileStyle(n); + }); +}; +Cesium3DTileStyle.prototype.getColorShaderFunction = function(e, t, n) { + return this._colorShaderFunctionReady ? (n.translucent = this._colorShaderTranslucent, this._colorShaderFunction) : (this._colorShaderFunctionReady = !0, defined(this.color) && defined(this.color.getShaderFunction) ? this._colorShaderFunction = this.color.getShaderFunction( + e, + t, + n, + "vec4" + ) : this._colorShaderFunction = void 0, this._colorShaderTranslucent = n.translucent, this._colorShaderFunction); +}; +Cesium3DTileStyle.prototype.getShowShaderFunction = function(e, t, n) { + return this._showShaderFunctionReady ? this._showShaderFunction : (this._showShaderFunctionReady = !0, defined(this.show) && defined(this.show.getShaderFunction) ? this._showShaderFunction = this.show.getShaderFunction( + e, + t, + n, + "bool" + ) : this._showShaderFunction = void 0, this._showShaderFunction); +}; +Cesium3DTileStyle.prototype.getPointSizeShaderFunction = function(e, t, n) { + return this._pointSizeShaderFunctionReady ? this._pointSizeShaderFunction : (this._pointSizeShaderFunctionReady = !0, defined(this.pointSize) && defined(this.pointSize.getShaderFunction) ? this._pointSizeShaderFunction = this.pointSize.getShaderFunction( + e, + t, + n, + "float" + ) : this._pointSizeShaderFunction = void 0, this._pointSizeShaderFunction); +}; +Cesium3DTileStyle.prototype.getVariables = function() { + let e = []; + return defined(this.color) && defined(this.color.getVariables) && e.push.apply(e, this.color.getVariables()), defined(this.show) && defined(this.show.getVariables) && e.push.apply(e, this.show.getVariables()), defined(this.pointSize) && defined(this.pointSize.getVariables) && e.push.apply(e, this.pointSize.getVariables()), e = e.filter(function(t, n, i) { + return i.indexOf(t) === n; + }), e; +}; +function ImplicitSubtreeCache(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._maximumSubtreeCount = defaultValue(e.maximumSubtreeCount, 0), this._subtreeRequestCounter = 0, this._queue = new DoubleEndedPriorityQueue({ + comparator: ImplicitSubtreeCache.comparator + }); +} +ImplicitSubtreeCache.prototype.addSubtree = function(e) { + const t = new ImplicitSubtreeCacheNode( + e, + this._subtreeRequestCounter + ); + this._subtreeRequestCounter++, this._queue.insert(t); + const n = e.implicitCoordinates; + if (n.level > 0) { + const i = n.getParentSubtreeCoordinates(); + this.find(i); + } + if (this._maximumSubtreeCount > 0) + for (; this._queue.length > this._maximumSubtreeCount && this._queue.getMinimum() !== t; ) + this._queue.removeMinimum(); +}; +ImplicitSubtreeCache.prototype.find = function(e) { + const t = this._queue, n = t.internalArray, i = t.length; + for (let r = 0; r < i; r++) { + const o = n[r], c = o.subtree.implicitCoordinates; + if (e.isEqual(c)) + return o.subtree; + } +}; +ImplicitSubtreeCache.comparator = function(e, t) { + const n = e.subtree.implicitCoordinates, i = t.subtree.implicitCoordinates; + return n.isAncestor(i) ? 1 : i.isAncestor(n) ? -1 : e.stamp - t.stamp; +}; +function ImplicitSubtreeCacheNode(e, t) { + this.subtree = e, this.stamp = t; +} +function VoxelContent(e) { + this._resource = e, this._metadataTable = void 0; +} +Object.defineProperties(VoxelContent.prototype, { + /** + * The {@link MetadataTable} storing voxel property values. + * + * @type {MetadataTable} + * @readonly + * @private + */ + metadataTable: { + get: function() { + return this._metadataTable; + } + } +}); +VoxelContent.fromJson = async function(e, t, n, i) { + let r; + defined(t) ? r = { + json: t, + binary: void 0 + } : r = parseVoxelChunks(n); + const o = await requestBuffers(e, r.json, r.binary), s = {}, c = r.json.bufferViews.length; + for (let h = 0; h < c; ++h) { + const p = r.json.bufferViews[h], m = p.byteOffset, _ = m + p.byteLength, C = o[p.buffer].subarray(m, _); + s[h] = C; + } + const l = r.json.voxelTable, d = r.json.propertyTables[l], f = new VoxelContent(e); + return f._metadataTable = new MetadataTable({ + count: d.count, + properties: d.properties, + class: i.classes[d.class], + bufferViews: s + }), f; +}; +function requestBuffers(e, t, n) { + const i = t.buffers.length, r = new Array(i); + for (let o = 0; o < i; o++) { + const s = t.buffers[o]; + if (defined(s.uri)) { + const l = e.getDerivedResource({ + url: s.uri + }); + r[o] = l.fetchArrayBuffer().then(function(d) { + return new Uint8Array(d); + }); + } else + r[o] = Promise.resolve(n); + } + return Promise.all(r); +} +function parseVoxelChunks(e) { + const n = new DataView(e.buffer, e.byteOffset); + let i = 8; + const r = n.getUint32(i, !0); + i += 8; + const o = n.getUint32(i, !0); + i += 8; + const s = getJsonFromTypedArray(e, i, r); + i += r; + const c = e.subarray(i, i + o); + return { + json: s, + binary: c + }; +} +function Cesium3DTilesVoxelProvider(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT), this.shapeTransform = void 0, this.globalTransform = void 0, this.shape = void 0, this.minBounds = void 0, this.maxBounds = void 0, this.dimensions = void 0, this.paddingBefore = void 0, this.paddingAfter = void 0, this.names = void 0, this.types = void 0, this.componentTypes = void 0, this.minimumValues = void 0, this.maximumValues = void 0, this.maximumTileCount = void 0, this._implicitTileset = void 0, this._subtreeCache = new ImplicitSubtreeCache(); +} +Cesium3DTilesVoxelProvider.fromUrl = async function(e) { + const t = Resource.createIfNeeded(e), n = await t.fetchJson(); + validate(n); + const i = getMetadataSchemaLoader(n, t); + await i.load(); + const r = n.root, o = r.content.extensions["3DTILES_content_voxels"], s = o.class, c = hasExtension(n, "3DTILES_metadata") ? n.extensions["3DTILES_metadata"] : n, l = i.schema, d = new Cesium3DTilesetMetadata({ + metadataJson: c, + schema: l + }), f = new Cesium3DTilesVoxelProvider(); + addAttributeInfo(f, d, s); + const h = new ImplicitTileset(t, r, l), { + shape: p, + minBounds: m, + maxBounds: _, + shapeTransform: y, + globalTransform: C + } = getShape(r); + f.shape = p, f.minBounds = m, f.maxBounds = _, f.dimensions = Cartesian3.unpack(o.dimensions), f.shapeTransform = y, f.globalTransform = C, f.maximumTileCount = getTileCount(d); + let T, x; + return defined(o.padding) && (T = Cartesian3.unpack(o.padding.before), x = Cartesian3.unpack(o.padding.after)), f.paddingBefore = T, f.paddingAfter = x, f._implicitTileset = h, ResourceCache.unload(i), f; +}; +function getTileCount(e) { + if (defined(e.tileset)) + return e.tileset.getPropertyBySemantic( + MetadataSemantic$1.TILESET_TILE_COUNT + ); +} +function validate(e) { + const t = e.root; + if (!defined(t.content)) + throw new RuntimeError("Root must have content"); + if (!hasExtension(t.content, "3DTILES_content_voxels")) + throw new RuntimeError( + "Root tile content must have 3DTILES_content_voxels extension" + ); + if (!hasExtension(t, "3DTILES_implicit_tiling") && !defined(t.implicitTiling)) + throw new RuntimeError("Root tile must have implicit tiling"); + if (!defined(e.schema) && !defined(e.schemaUri) && !hasExtension(e, "3DTILES_metadata")) + throw new RuntimeError("Tileset must have a metadata schema"); +} +function getShape(e) { + const t = e.boundingVolume; + let n; + if (defined(e.transform) ? n = Matrix4.unpack(e.transform) : n = Matrix4.clone(Matrix4.IDENTITY), defined(t.box)) + return getBoxShape(t.box, n); + if (defined(t.region)) + return getEllipsoidShape(t.region); + if (hasExtension(t, "3DTILES_bounding_volume_cylinder")) + return getCylinderShape( + t.extensions["3DTILES_bounding_volume_cylinder"].cylinder, + n + ); + throw new RuntimeError( + "Only box, region and 3DTILES_bounding_volume_cylinder are supported in Cesium3DTilesVoxelProvider" + ); +} +function getEllipsoidShape(e) { + const t = e[0], n = e[1], i = e[2], r = e[3], o = e[4], s = e[5], c = Matrix4.fromScale(Ellipsoid.WGS84.radii), l = new Cartesian3(t, n, o), d = new Cartesian3(i, r, s); + return { + shape: VoxelShapeType$1.ELLIPSOID, + minBounds: l, + maxBounds: d, + shapeTransform: c, + globalTransform: Matrix4.clone(Matrix4.IDENTITY) + }; +} +function getBoxShape(e, t) { + const n = OrientedBoundingBox.unpack(e), i = Matrix4.fromRotationTranslation( + n.halfAxes, + n.center + ); + return { + shape: VoxelShapeType$1.BOX, + minBounds: Cartesian3.clone(VoxelBoxShape.DefaultMinBounds), + maxBounds: Cartesian3.clone(VoxelBoxShape.DefaultMaxBounds), + shapeTransform: i, + globalTransform: t + }; +} +function getCylinderShape(e, t) { + const n = OrientedBoundingBox.unpack(e), i = Matrix4.fromRotationTranslation( + n.halfAxes, + n.center + ); + return { + shape: VoxelShapeType$1.CYLINDER, + minBounds: Cartesian3.clone(VoxelCylinderShape.DefaultMinBounds), + maxBounds: Cartesian3.clone(VoxelCylinderShape.DefaultMaxBounds), + shapeTransform: i, + globalTransform: t + }; +} +function getMetadataSchemaLoader(e, t) { + const { schemaUri: n, schema: i } = e; + return defined(n) ? ResourceCache.getSchemaLoader({ + resource: t.getDerivedResource({ + url: n + }) + }) : ResourceCache.getSchemaLoader({ schema: i }); +} +function addAttributeInfo(e, t, n) { + const { schema: i, statistics: r } = t, o = r == null ? void 0 : r.classes[n], s = i.classes[n].properties, c = Object.entries(s).map(([h, p]) => { + const { type: m, componentType: _ } = p, y = o == null ? void 0 : o.properties[h].min, C = o == null ? void 0 : o.properties[h].max, T = MetadataType$1.getComponentCount(m), x = copyArray(y, T), b = copyArray(C, T); + return { id: h, type: m, componentType: _, minValue: x, maxValue: b }; + }); + e.names = c.map((h) => h.id), e.types = c.map((h) => h.type), e.componentTypes = c.map((h) => h.componentType); + const l = c.map((h) => h.minValue), d = c.map((h) => h.maxValue), f = l.some(defined); + e.minimumValues = f ? l : void 0, e.maximumValues = f ? d : void 0; +} +function copyArray(e, t) { + if (!defined(e)) + return; + const n = Array.isArray(e) ? e : [e]; + return Array.from({ length: t }, (i, r) => n[r]); +} +async function getVoxelContent(e, t) { + const n = e.contentUriTemplates[0].getDerivedResource( + { + templateValues: t.getTemplateValues() + } + ), i = e.baseResource.getDerivedResource({ + url: n.url + }), r = await i.fetchArrayBuffer(), o = preprocess3DTileContent(r); + return await VoxelContent.fromJson( + i, + o.jsonPayload, + o.binaryPayload, + e.metadataSchema + ); +} +async function getSubtreePromise(e, t) { + const n = e._implicitTileset, i = e._subtreeCache; + let r = i.find(t); + if (defined(r)) + return r; + const o = n.subtreeUriTemplate.getDerivedResource( + { + templateValues: t.getTemplateValues() + } + ), s = n.baseResource.getDerivedResource({ + url: o.url + }), c = await s.fetchArrayBuffer(); + if (r = i.find(t), defined(r)) + return r; + const l = preprocess3DTileContent(c); + return r = await ImplicitSubtree.fromSubtreeJson( + s, + l.jsonPayload, + l.binaryPayload, + n, + t + ), i.addSubtree(r), r; +} +Cesium3DTilesVoxelProvider.prototype.requestData = function(e) { + e = defaultValue(e, defaultValue.EMPTY_OBJECT); + const t = defaultValue(e.tileLevel, 0), n = defaultValue(e.tileX, 0), i = defaultValue(e.tileY, 0), r = defaultValue(e.tileZ, 0); + if (defaultValue(e.keyframe, 0) !== 0) + return; + const s = this._implicitTileset, c = this.names, l = new ImplicitTileCoordinates({ + subdivisionScheme: s.subdivisionScheme, + subtreeLevels: s.subtreeLevels, + level: t, + x: n, + y: i, + z: r + }), d = l.isSubtreeRoot() && l.level > 0, f = d ? l.getParentSubtreeCoordinates() : l.getSubtreeCoordinates(); + return getSubtreePromise(this, f).then(function(p) { + return (d ? p.childSubtreeIsAvailableAtCoordinates(l) : p.tileIsAvailableAtCoordinates(l)) ? getVoxelContent(s, l) : Promise.reject("Tile is not available"); + }).then(function(p) { + return c.map(function(m) { + return p.metadataTable.getPropertyTypedArray(m); + }); + }); +}; +function CircleEmitter(e) { + e = defaultValue(e, 1), this._radius = defaultValue(e, 1); +} +Object.defineProperties(CircleEmitter.prototype, { + /** + * The radius of the circle in meters. + * @memberof CircleEmitter.prototype + * @type {number} + * @default 1.0 + */ + radius: { + get: function() { + return this._radius; + }, + set: function(e) { + this._radius = e; + } + } +}); +CircleEmitter.prototype.emit = function(e) { + const t = CesiumMath.randomBetween(0, CesiumMath.TWO_PI), n = CesiumMath.randomBetween(0, this._radius), i = n * Math.cos(t), r = n * Math.sin(t), o = 0; + e.position = Cartesian3.fromElements(i, r, o, e.position), e.velocity = Cartesian3.clone(Cartesian3.UNIT_Z, e.velocity); +}; +const CloudType = { + /** + * Cumulus cloud. + * + * @type {number} + * @constant + */ + CUMULUS: 0 +}; +CloudType.validate = function(e) { + return e === CloudType.CUMULUS; +}; +const CloudType$1 = Object.freeze(CloudType); +function CumulusCloud(e, t) { + if (e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._show = defaultValue(e.show, !0), this._position = Cartesian3.clone( + defaultValue(e.position, Cartesian3.ZERO) + ), !defined(e.scale) && defined(e.maximumSize)) + this._maximumSize = Cartesian3.clone(e.maximumSize), this._scale = new Cartesian2(this._maximumSize.x, this._maximumSize.y); + else { + this._scale = Cartesian2.clone( + defaultValue(e.scale, new Cartesian2(20, 12)) + ); + const n = new Cartesian3( + this._scale.x, + this._scale.y, + Math.min(this._scale.x, this._scale.y) / 1.5 + ); + this._maximumSize = Cartesian3.clone( + defaultValue(e.maximumSize, n) + ); + } + this._slice = defaultValue(e.slice, -1), this._color = Color.clone(defaultValue(e.color, Color.WHITE)), this._brightness = defaultValue(e.brightness, 1), this._cloudCollection = t, this._index = -1; +} +const SHOW_INDEX$1 = CumulusCloud.SHOW_INDEX = 0, POSITION_INDEX$1 = CumulusCloud.POSITION_INDEX = 1, SCALE_INDEX$1 = CumulusCloud.SCALE_INDEX = 2, MAXIMUM_SIZE_INDEX$1 = CumulusCloud.MAXIMUM_SIZE_INDEX = 3, SLICE_INDEX$1 = CumulusCloud.SLICE_INDEX = 4, BRIGHTNESS_INDEX$1 = CumulusCloud.BRIGHTNESS_INDEX = 5, COLOR_INDEX$1 = CumulusCloud.COLOR_INDEX = 6; +CumulusCloud.NUMBER_OF_PROPERTIES = 7; +function makeDirty(e, t) { + const n = e._cloudCollection; + defined(n) && (n._updateCloud(e, t), e._dirty = !0); +} +Object.defineProperties(CumulusCloud.prototype, { + /** + * Determines if this cumulus cloud will be shown. Use this to hide or show a cloud, instead + * of removing it and re-adding it to the collection. + * @memberof CumulusCloud.prototype + * @type {boolean} + * @default true + */ + show: { + get: function() { + return this._show; + }, + set: function(e) { + this._show !== e && (this._show = e, makeDirty(this, SHOW_INDEX$1)); + } + }, + /** + * Gets or sets the Cartesian position of this cumulus cloud. + * @memberof CumulusCloud.prototype + * @type {Cartesian3} + */ + position: { + get: function() { + return this._position; + }, + set: function(e) { + const t = this._position; + Cartesian3.equals(t, e) || (Cartesian3.clone(e, t), makeDirty(this, POSITION_INDEX$1)); + } + }, + /** + *Gets or sets the scale of the cumulus cloud billboard in meters.
+ * The scale property will affect the size of the billboard,
+ * but not the cloud's actual appearance.
+ * cloud.scale = new Cesium.Cartesian2(12, 8);+ *
+ * |
+ *
+ * cloud.scale = new Cesium.Cartesian2(24, 10);+ *
+ * |
+ *
To modify the cloud's appearance, modify its maximumSize
+ * and slice properties.
Gets or sets the maximum size of the cumulus cloud rendered on the billboard. + * This defines a maximum ellipsoid volume that the cloud can appear in. + * Rather than guaranteeing a specific size, this specifies a boundary for the + * cloud to appear in, and changing it can affect the shape of the cloud.
+ *Changing the z-value of maximumSize has the most dramatic effect
+ * on the cloud's appearance because it changes the depth of the cloud, and thus the
+ * positions at which the cloud-shaping texture is sampled.
+ * cloud.maximumSize = new Cesium.Cartesian3(14, 9, 10);+ *
+ * |
+ *
+ * cloud.maximumSize.x = 25;+ *
+ * |
+ *
+ * cloud.maximumSize.y = 5;+ *
+ * |
+ *
+ * cloud.maximumSize.z = 17;+ *
+ * |
+ *
To modify the billboard's actual size, modify the cloud's scale property.
Gets or sets the "slice" of the cloud that is rendered on the billboard, i.e. + * the specific cross-section of the cloud chosen for the billboard's appearance. + * Given a value between 0 and 1, the slice specifies how deeply into the cloud + * to intersect based on its maximum size in the z-direction.
+ *cloud.slice = 0.32;![]() |
+ * cloud.slice = 0.5;![]() |
+ * cloud.slice = 0.6;![]() |
+ *
Due to the nature in which this slice is calculated,
+ * values below 0.2 may result in cross-sections that are too small,
+ * and the edge of the ellipsoid will be visible. Similarly, values above 0.7
+ * will cause the cloud to appear smaller. Values outside the range [0.1, 0.9]
+ * should be avoided entirely because they do not produce desirable results.
cloud.slice = 0.08;![]() |
+ * cloud.slice = 0.8;![]() |
+ *
If slice is set to a negative number, the cloud will not render a cross-section.
+ * Instead, it will render the outside of the ellipsoid that is visible. For clouds with
+ * small values of `maximumSize.z`, this can produce good-looking results, but for larger
+ * clouds, this can result in a cloud that is undesirably warped to the ellipsoid volume.
+ * cloud.slice = -1.0;+ *
+ * |
+ *
+ * cloud.slice = -1.0;+ * ![]() |
+ *
cloud.brightness = 1.0;![]() |
+ * cloud.brightness = 0.6;![]() |
+ * cloud.brightness = 0.0;![]() |
+ *
true, the geometry is expected to be closed.
+ *
+ * @memberof DebugAppearance.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default false
+ */
+ closed: {
+ get: function() {
+ return this._closed;
+ }
+ },
+ /**
+ * The name of the attribute being visualized.
+ *
+ * @memberof DebugAppearance.prototype
+ *
+ * @type {string}
+ * @readonly
+ */
+ attributeName: {
+ get: function() {
+ return this._attributeName;
+ }
+ },
+ /**
+ * The GLSL datatype of the attribute being visualized.
+ *
+ * @memberof DebugAppearance.prototype
+ *
+ * @type {string}
+ * @readonly
+ */
+ glslDatatype: {
+ get: function() {
+ return this._glslDatatype;
+ }
+ }
+});
+DebugAppearance.prototype.getFragmentShaderSource = Appearance.prototype.getFragmentShaderSource;
+DebugAppearance.prototype.isTranslucent = Appearance.prototype.isTranslucent;
+DebugAppearance.prototype.getRenderState = Appearance.prototype.getRenderState;
+function DebugModelMatrixPrimitive(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this.length = defaultValue(e.length, 1e7), this._length = void 0, this.width = defaultValue(e.width, 2), this._width = void 0, this.show = defaultValue(e.show, !0), this.modelMatrix = Matrix4.clone(
+ defaultValue(e.modelMatrix, Matrix4.IDENTITY)
+ ), this._modelMatrix = new Matrix4(), this.id = e.id, this._id = void 0, this._primitive = void 0;
+}
+DebugModelMatrixPrimitive.prototype.update = function(e) {
+ if (this.show) {
+ if (!defined(this._primitive) || !Matrix4.equals(this._modelMatrix, this.modelMatrix) || this._length !== this.length || this._width !== this.width || this._id !== this.id) {
+ this._modelMatrix = Matrix4.clone(this.modelMatrix, this._modelMatrix), this._length = this.length, this._width = this.width, this._id = this.id, defined(this._primitive) && this._primitive.destroy(), this.modelMatrix[12] === 0 && this.modelMatrix[13] === 0 && this.modelMatrix[14] === 0 && (this.modelMatrix[14] = 0.01);
+ const t = new GeometryInstance({
+ geometry: new PolylineGeometry({
+ positions: [Cartesian3.ZERO, Cartesian3.UNIT_X],
+ width: this.width,
+ vertexFormat: PolylineColorAppearance.VERTEX_FORMAT,
+ colors: [Color.RED, Color.RED],
+ arcType: ArcType$1.NONE
+ }),
+ modelMatrix: Matrix4.multiplyByUniformScale(
+ this.modelMatrix,
+ this.length,
+ new Matrix4()
+ ),
+ id: this.id,
+ pickPrimitive: this
+ }), n = new GeometryInstance({
+ geometry: new PolylineGeometry({
+ positions: [Cartesian3.ZERO, Cartesian3.UNIT_Y],
+ width: this.width,
+ vertexFormat: PolylineColorAppearance.VERTEX_FORMAT,
+ colors: [Color.GREEN, Color.GREEN],
+ arcType: ArcType$1.NONE
+ }),
+ modelMatrix: Matrix4.multiplyByUniformScale(
+ this.modelMatrix,
+ this.length,
+ new Matrix4()
+ ),
+ id: this.id,
+ pickPrimitive: this
+ }), i = new GeometryInstance({
+ geometry: new PolylineGeometry({
+ positions: [Cartesian3.ZERO, Cartesian3.UNIT_Z],
+ width: this.width,
+ vertexFormat: PolylineColorAppearance.VERTEX_FORMAT,
+ colors: [Color.BLUE, Color.BLUE],
+ arcType: ArcType$1.NONE
+ }),
+ modelMatrix: Matrix4.multiplyByUniformScale(
+ this.modelMatrix,
+ this.length,
+ new Matrix4()
+ ),
+ id: this.id,
+ pickPrimitive: this
+ });
+ this._primitive = new Primitive$3({
+ geometryInstances: [t, n, i],
+ appearance: new PolylineColorAppearance(),
+ asynchronous: !1
+ });
+ }
+ this._primitive.update(e);
+ }
+};
+DebugModelMatrixPrimitive.prototype.isDestroyed = function() {
+ return !1;
+};
+DebugModelMatrixPrimitive.prototype.destroy = function() {
+ return this._primitive = this._primitive && this._primitive.destroy(), destroyObject(this);
+};
+function DirectionalLight(e) {
+ this.direction = Cartesian3.clone(e.direction), this.color = Color.clone(defaultValue(e.color, Color.WHITE)), this.intensity = defaultValue(e.intensity, 1);
+}
+const EllipsoidSurfaceAppearanceFS = `in vec3 v_positionMC;
+in vec3 v_positionEC;
+in vec2 v_st;
+
+void main()
+{
+ czm_materialInput materialInput;
+
+ vec3 normalEC = normalize(czm_normal3D * czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)));
+#ifdef FACE_FORWARD
+ normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
+#endif
+
+ materialInput.s = v_st.s;
+ materialInput.st = v_st;
+ materialInput.str = vec3(v_st, 0.0);
+
+ // Convert tangent space material normal to eye space
+ materialInput.normalEC = normalEC;
+ materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, materialInput.normalEC);
+
+ // Convert view vector to world space
+ vec3 positionToEyeEC = -v_positionEC;
+ materialInput.positionToEyeEC = positionToEyeEC;
+
+ czm_material material = czm_getMaterial(materialInput);
+
+#ifdef FLAT
+ out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
+#else
+ out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
+#endif
+}
+`, EllipsoidSurfaceAppearanceVS = `in vec3 position3DHigh;
+in vec3 position3DLow;
+in vec2 st;
+in float batchId;
+
+out vec3 v_positionMC;
+out vec3 v_positionEC;
+out vec2 v_st;
+
+void main()
+{
+ vec4 p = czm_computePosition();
+
+ v_positionMC = position3DHigh + position3DLow; // position in model coordinates
+ v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
+ v_st = st;
+
+ gl_Position = czm_modelViewProjectionRelativeToEye * p;
+}
+`;
+function EllipsoidSurfaceAppearance(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = defaultValue(e.translucent, !0), n = defaultValue(e.aboveGround, !1);
+ this.material = defined(e.material) ? e.material : Material$4.fromType(Material$4.ColorType), this.translucent = defaultValue(e.translucent, !0), this._vertexShaderSource = defaultValue(
+ e.vertexShaderSource,
+ EllipsoidSurfaceAppearanceVS
+ ), this._fragmentShaderSource = defaultValue(
+ e.fragmentShaderSource,
+ EllipsoidSurfaceAppearanceFS
+ ), this._renderState = Appearance.getDefaultRenderState(
+ t,
+ !n,
+ e.renderState
+ ), this._closed = !1, this._flat = defaultValue(e.flat, !1), this._faceForward = defaultValue(e.faceForward, n), this._aboveGround = n;
+}
+Object.defineProperties(EllipsoidSurfaceAppearance.prototype, {
+ /**
+ * The GLSL source code for the vertex shader.
+ *
+ * @memberof EllipsoidSurfaceAppearance.prototype
+ *
+ * @type {string}
+ * @readonly
+ */
+ vertexShaderSource: {
+ get: function() {
+ return this._vertexShaderSource;
+ }
+ },
+ /**
+ * The GLSL source code for the fragment shader. The full fragment shader
+ * source is built procedurally taking into account {@link EllipsoidSurfaceAppearance#material},
+ * {@link EllipsoidSurfaceAppearance#flat}, and {@link EllipsoidSurfaceAppearance#faceForward}.
+ * Use {@link EllipsoidSurfaceAppearance#getFragmentShaderSource} to get the full source.
+ *
+ * @memberof EllipsoidSurfaceAppearance.prototype
+ *
+ * @type {string}
+ * @readonly
+ */
+ fragmentShaderSource: {
+ get: function() {
+ return this._fragmentShaderSource;
+ }
+ },
+ /**
+ * The WebGL fixed-function state to use when rendering the geometry.
+ * + * The render state can be explicitly defined when constructing a {@link EllipsoidSurfaceAppearance} + * instance, or it is set implicitly via {@link EllipsoidSurfaceAppearance#translucent} + * and {@link EllipsoidSurfaceAppearance#aboveGround}. + *
+ * + * @memberof EllipsoidSurfaceAppearance.prototype + * + * @type {object} + * @readonly + */ + renderState: { + get: function() { + return this._renderState; + } + }, + /** + * Whentrue, the geometry is expected to be closed so
+ * {@link EllipsoidSurfaceAppearance#renderState} has backface culling enabled.
+ * If the viewer enters the geometry, it will not be visible.
+ *
+ * @memberof EllipsoidSurfaceAppearance.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default false
+ */
+ closed: {
+ get: function() {
+ return this._closed;
+ }
+ },
+ /**
+ * The {@link VertexFormat} that this appearance instance is compatible with.
+ * A geometry can have more vertex attributes and still be compatible - at a
+ * potential performance cost - but it can't have less.
+ *
+ * @memberof EllipsoidSurfaceAppearance.prototype
+ *
+ * @type VertexFormat
+ * @readonly
+ *
+ * @default {@link EllipsoidSurfaceAppearance.VERTEX_FORMAT}
+ */
+ vertexFormat: {
+ get: function() {
+ return EllipsoidSurfaceAppearance.VERTEX_FORMAT;
+ }
+ },
+ /**
+ * When true, flat shading is used in the fragment shader,
+ * which means lighting is not taking into account.
+ *
+ * @memberof EllipsoidSurfaceAppearance.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default false
+ */
+ flat: {
+ get: function() {
+ return this._flat;
+ }
+ },
+ /**
+ * When true, the fragment shader flips the surface normal
+ * as needed to ensure that the normal faces the viewer to avoid
+ * dark spots. This is useful when both sides of a geometry should be
+ * shaded like {@link WallGeometry}.
+ *
+ * @memberof EllipsoidSurfaceAppearance.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default true
+ */
+ faceForward: {
+ get: function() {
+ return this._faceForward;
+ }
+ },
+ /**
+ * When true, the geometry is expected to be on the ellipsoid's
+ * surface - not at a constant height above it - so {@link EllipsoidSurfaceAppearance#renderState}
+ * has backface culling enabled.
+ *
+ *
+ * @memberof EllipsoidSurfaceAppearance.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default false
+ */
+ aboveGround: {
+ get: function() {
+ return this._aboveGround;
+ }
+ }
+});
+EllipsoidSurfaceAppearance.VERTEX_FORMAT = VertexFormat.POSITION_AND_ST;
+EllipsoidSurfaceAppearance.prototype.getFragmentShaderSource = Appearance.prototype.getFragmentShaderSource;
+EllipsoidSurfaceAppearance.prototype.isTranslucent = Appearance.prototype.isTranslucent;
+EllipsoidSurfaceAppearance.prototype.getRenderState = Appearance.prototype.getRenderState;
+function FrameRateMonitor(e) {
+ this._scene = e.scene, this.samplingWindow = defaultValue(
+ e.samplingWindow,
+ FrameRateMonitor.defaultSettings.samplingWindow
+ ), this.quietPeriod = defaultValue(
+ e.quietPeriod,
+ FrameRateMonitor.defaultSettings.quietPeriod
+ ), this.warmupPeriod = defaultValue(
+ e.warmupPeriod,
+ FrameRateMonitor.defaultSettings.warmupPeriod
+ ), this.minimumFrameRateDuringWarmup = defaultValue(
+ e.minimumFrameRateDuringWarmup,
+ FrameRateMonitor.defaultSettings.minimumFrameRateDuringWarmup
+ ), this.minimumFrameRateAfterWarmup = defaultValue(
+ e.minimumFrameRateAfterWarmup,
+ FrameRateMonitor.defaultSettings.minimumFrameRateAfterWarmup
+ ), this._lowFrameRate = new Event(), this._nominalFrameRate = new Event(), this._frameTimes = [], this._needsQuietPeriod = !0, this._quietPeriodEndTime = 0, this._warmupPeriodEndTime = 0, this._frameRateIsLow = !1, this._lastFramesPerSecond = void 0, this._pauseCount = 0;
+ const t = this;
+ this._preUpdateRemoveListener = this._scene.preUpdate.addEventListener(
+ function(r, o) {
+ update(t);
+ }
+ ), this._hiddenPropertyName = document.hidden !== void 0 ? "hidden" : document.mozHidden !== void 0 ? "mozHidden" : document.msHidden !== void 0 ? "msHidden" : document.webkitHidden !== void 0 ? "webkitHidden" : void 0;
+ const n = document.hidden !== void 0 ? "visibilitychange" : document.mozHidden !== void 0 ? "mozvisibilitychange" : document.msHidden !== void 0 ? "msvisibilitychange" : document.webkitHidden !== void 0 ? "webkitvisibilitychange" : void 0;
+ function i() {
+ visibilityChanged(t);
+ }
+ this._visibilityChangeRemoveListener = void 0, defined(n) && (document.addEventListener(
+ n,
+ i,
+ !1
+ ), this._visibilityChangeRemoveListener = function() {
+ document.removeEventListener(
+ n,
+ i,
+ !1
+ );
+ });
+}
+FrameRateMonitor.defaultSettings = {
+ samplingWindow: 5,
+ quietPeriod: 2,
+ warmupPeriod: 5,
+ minimumFrameRateDuringWarmup: 4,
+ minimumFrameRateAfterWarmup: 8
+};
+FrameRateMonitor.fromScene = function(e) {
+ return (!defined(e._frameRateMonitor) || e._frameRateMonitor.isDestroyed()) && (e._frameRateMonitor = new FrameRateMonitor({
+ scene: e
+ })), e._frameRateMonitor;
+};
+Object.defineProperties(FrameRateMonitor.prototype, {
+ /**
+ * Gets the {@link Scene} instance for which to monitor performance.
+ * @memberof FrameRateMonitor.prototype
+ * @type {Scene}
+ */
+ scene: {
+ get: function() {
+ return this._scene;
+ }
+ },
+ /**
+ * Gets the event that is raised when a low frame rate is detected. The function will be passed
+ * the {@link Scene} instance as its first parameter and the average number of frames per second
+ * over the sampling window as its second parameter.
+ * @memberof FrameRateMonitor.prototype
+ * @type {Event}
+ */
+ lowFrameRate: {
+ get: function() {
+ return this._lowFrameRate;
+ }
+ },
+ /**
+ * Gets the event that is raised when the frame rate returns to a normal level after having been low.
+ * The function will be passed the {@link Scene} instance as its first parameter and the average
+ * number of frames per second over the sampling window as its second parameter.
+ * @memberof FrameRateMonitor.prototype
+ * @type {Event}
+ */
+ nominalFrameRate: {
+ get: function() {
+ return this._nominalFrameRate;
+ }
+ },
+ /**
+ * Gets the most recently computed average frames-per-second over the last samplingWindow.
+ * This property may be undefined if the frame rate has not been computed.
+ * @memberof FrameRateMonitor.prototype
+ * @type {number}
+ */
+ lastFramesPerSecond: {
+ get: function() {
+ return this._lastFramesPerSecond;
+ }
+ }
+});
+FrameRateMonitor.prototype.pause = function() {
+ ++this._pauseCount, this._pauseCount === 1 && (this._frameTimes.length = 0, this._lastFramesPerSecond = void 0);
+};
+FrameRateMonitor.prototype.unpause = function() {
+ --this._pauseCount, this._pauseCount <= 0 && (this._pauseCount = 0, this._needsQuietPeriod = !0);
+};
+FrameRateMonitor.prototype.isDestroyed = function() {
+ return !1;
+};
+FrameRateMonitor.prototype.destroy = function() {
+ return this._preUpdateRemoveListener(), defined(this._visibilityChangeRemoveListener) && this._visibilityChangeRemoveListener(), destroyObject(this);
+};
+function update(e, t) {
+ if (e._pauseCount > 0)
+ return;
+ const n = getTimestamp$1();
+ if (e._needsQuietPeriod)
+ e._needsQuietPeriod = !1, e._frameTimes.length = 0, e._quietPeriodEndTime = n + e.quietPeriod / TimeConstants$1.SECONDS_PER_MILLISECOND, e._warmupPeriodEndTime = e._quietPeriodEndTime + (e.warmupPeriod + e.samplingWindow) / TimeConstants$1.SECONDS_PER_MILLISECOND;
+ else if (n >= e._quietPeriodEndTime) {
+ e._frameTimes.push(n);
+ const i = n - e.samplingWindow / TimeConstants$1.SECONDS_PER_MILLISECOND;
+ if (e._frameTimes.length >= 2 && e._frameTimes[0] <= i) {
+ for (; e._frameTimes.length >= 2 && e._frameTimes[1] < i; )
+ e._frameTimes.shift();
+ const r = (n - e._frameTimes[0]) / (e._frameTimes.length - 1);
+ e._lastFramesPerSecond = 1e3 / r;
+ const o = 1e3 / (n > e._warmupPeriodEndTime ? e.minimumFrameRateAfterWarmup : e.minimumFrameRateDuringWarmup);
+ r > o ? e._frameRateIsLow || (e._frameRateIsLow = !0, e._needsQuietPeriod = !0, e.lowFrameRate.raiseEvent(
+ e.scene,
+ e._lastFramesPerSecond
+ )) : e._frameRateIsLow && (e._frameRateIsLow = !1, e._needsQuietPeriod = !0, e.nominalFrameRate.raiseEvent(
+ e.scene,
+ e._lastFramesPerSecond
+ ));
+ }
+ }
+}
+function visibilityChanged(e) {
+ document[e._hiddenPropertyName] ? e.pause() : e.unpause();
+}
+function GoogleEarthEnterpriseDiscardPolicy() {
+ this._image = new Image();
+}
+GoogleEarthEnterpriseDiscardPolicy.prototype.isReady = function() {
+ return !0;
+};
+GoogleEarthEnterpriseDiscardPolicy.prototype.shouldDiscardImage = function(e) {
+ return e === this._image;
+};
+function GoogleEarthEnterpriseImageryProvider(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._defaultAlpha = void 0, this._defaultNightAlpha = void 0, this._defaultDayAlpha = void 0, this._defaultBrightness = void 0, this._defaultContrast = void 0, this._defaultHue = void 0, this._defaultSaturation = void 0, this._defaultGamma = void 0, this._defaultMinificationFilter = void 0, this._defaultMagnificationFilter = void 0, this._tileDiscardPolicy = e.tileDiscardPolicy, this._tilingScheme = new GeographicTilingScheme({
+ numberOfLevelZeroTilesX: 2,
+ numberOfLevelZeroTilesY: 2,
+ rectangle: new Rectangle(
+ -CesiumMath.PI,
+ -CesiumMath.PI,
+ CesiumMath.PI,
+ CesiumMath.PI
+ ),
+ ellipsoid: e.ellipsoid
+ });
+ let t = e.credit;
+ typeof t == "string" && (t = new Credit(t)), this._credit = t, this._tileWidth = 256, this._tileHeight = 256, this._maximumLevel = 23, defined(this._tileDiscardPolicy) || (this._tileDiscardPolicy = new GoogleEarthEnterpriseDiscardPolicy()), this._errorEvent = new Event();
+}
+Object.defineProperties(GoogleEarthEnterpriseImageryProvider.prototype, {
+ /**
+ * Gets the name of the Google Earth Enterprise server url hosting the imagery.
+ * @memberof GoogleEarthEnterpriseImageryProvider.prototype
+ * @type {string}
+ * @readonly
+ */
+ url: {
+ get: function() {
+ return this._metadata.url;
+ }
+ },
+ /**
+ * Gets the proxy used by this provider.
+ * @memberof GoogleEarthEnterpriseImageryProvider.prototype
+ * @type {Proxy}
+ * @readonly
+ */
+ proxy: {
+ get: function() {
+ return this._metadata.proxy;
+ }
+ },
+ /**
+ * Gets the width of each tile, in pixels.
+ * @memberof GoogleEarthEnterpriseImageryProvider.prototype
+ * @type {number}
+ * @readonly
+ */
+ tileWidth: {
+ get: function() {
+ return this._tileWidth;
+ }
+ },
+ /**
+ * Gets the height of each tile, in pixels.
+ * @memberof GoogleEarthEnterpriseImageryProvider.prototype
+ * @type {number}
+ * @readonly
+ */
+ tileHeight: {
+ get: function() {
+ return this._tileHeight;
+ }
+ },
+ /**
+ * Gets the maximum level-of-detail that can be requested.
+ * @memberof GoogleEarthEnterpriseImageryProvider.prototype
+ * @type {number|undefined}
+ * @readonly
+ */
+ maximumLevel: {
+ get: function() {
+ return this._maximumLevel;
+ }
+ },
+ /**
+ * Gets the minimum level-of-detail that can be requested.
+ * @memberof GoogleEarthEnterpriseImageryProvider.prototype
+ * @type {number}
+ * @readonly
+ */
+ minimumLevel: {
+ get: function() {
+ return 0;
+ }
+ },
+ /**
+ * Gets the tiling scheme used by this provider.
+ * @memberof GoogleEarthEnterpriseImageryProvider.prototype
+ * @type {TilingScheme}
+ * @readonly
+ */
+ tilingScheme: {
+ get: function() {
+ return this._tilingScheme;
+ }
+ },
+ /**
+ * Gets the rectangle, in radians, of the imagery provided by this instance.
+ * @memberof GoogleEarthEnterpriseImageryProvider.prototype
+ * @type {Rectangle}
+ * @readonly
+ */
+ rectangle: {
+ get: function() {
+ return this._tilingScheme.rectangle;
+ }
+ },
+ /**
+ * Gets the tile discard policy. If not undefined, the discard policy is responsible
+ * for filtering out "missing" tiles via its shouldDiscardImage function. If this function
+ * returns undefined, no tiles are filtered.
+ * @memberof GoogleEarthEnterpriseImageryProvider.prototype
+ * @type {TileDiscardPolicy}
+ * @readonly
+ */
+ tileDiscardPolicy: {
+ get: function() {
+ return this._tileDiscardPolicy;
+ }
+ },
+ /**
+ * Gets an event that is raised when the imagery provider encounters an asynchronous error. By subscribing
+ * to the event, you will be notified of the error and can potentially recover from it. Event listeners
+ * are passed an instance of {@link TileProviderError}.
+ * @memberof GoogleEarthEnterpriseImageryProvider.prototype
+ * @type {Event}
+ * @readonly
+ */
+ errorEvent: {
+ get: function() {
+ return this._errorEvent;
+ }
+ },
+ /**
+ * Gets the credit to display when this imagery provider is active. Typically this is used to credit
+ * the source of the imagery.
+ * @memberof GoogleEarthEnterpriseImageryProvider.prototype
+ * @type {Credit}
+ * @readonly
+ */
+ credit: {
+ get: function() {
+ return this._credit;
+ }
+ },
+ /**
+ * Gets a value indicating whether or not the images provided by this imagery provider
+ * include an alpha channel. If this property is false, an alpha channel, if present, will
+ * be ignored. If this property is true, any images without an alpha channel will be treated
+ * as if their alpha is 1.0 everywhere. Setting this property to false reduces memory usage
+ * and texture upload time.
+ * @memberof GoogleEarthEnterpriseImageryProvider.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ hasAlphaChannel: {
+ get: function() {
+ return !1;
+ }
+ }
+});
+GoogleEarthEnterpriseImageryProvider.fromMetadata = function(e, t) {
+ if (!e.imageryPresent)
+ throw new RuntimeError(`The server ${e.url} doesn't have imagery`);
+ const n = new GoogleEarthEnterpriseImageryProvider(t);
+ return n._metadata = e, n;
+};
+GoogleEarthEnterpriseImageryProvider.prototype.getTileCredits = function(e, t, n) {
+ const i = this._metadata, r = i.getTileInformation(e, t, n);
+ if (defined(r)) {
+ const o = i.providers[r.imageryProvider];
+ if (defined(o))
+ return [o];
+ }
+};
+GoogleEarthEnterpriseImageryProvider.prototype.requestImage = function(e, t, n, i) {
+ const r = this._tileDiscardPolicy._image, o = this._metadata, s = GoogleEarthEnterpriseMetadata.tileXYToQuadKey(e, t, n), c = o.getTileInformation(e, t, n);
+ if (!defined(c)) {
+ if (o.isValid(s)) {
+ const d = new Request({
+ throttle: i.throttle,
+ throttleByServer: i.throttleByServer,
+ type: i.type,
+ priorityFunction: i.priorityFunction
+ });
+ o.populateSubtree(e, t, n, d);
+ return;
+ }
+ return Promise.resolve(r);
+ }
+ if (!c.hasImagery())
+ return Promise.resolve(r);
+ const l = buildImageResource(
+ this,
+ c,
+ e,
+ t,
+ n,
+ i
+ ).fetchArrayBuffer();
+ if (defined(l))
+ return l.then(function(d) {
+ decodeGoogleEarthEnterpriseData(o.key, d);
+ let f = new Uint8Array(d), h;
+ const p = o.protoImagery;
+ if ((!defined(p) || !p) && (h = getImageType(f)), !defined(h) && (!defined(p) || p)) {
+ const m = decodeEarthImageryPacket(f);
+ h = m.imageType, f = m.imageData;
+ }
+ return !defined(h) || !defined(f) ? r : loadImageFromTypedArray({
+ uint8Array: f,
+ format: h,
+ flipY: !0
+ });
+ });
+};
+GoogleEarthEnterpriseImageryProvider.prototype.pickFeatures = function(e, t, n, i, r) {
+};
+function buildImageResource(e, t, n, i, r, o) {
+ const s = GoogleEarthEnterpriseMetadata.tileXYToQuadKey(n, i, r);
+ let c = t.imageryVersion;
+ return c = defined(c) && c > 0 ? c : 1, e._metadata.resource.getDerivedResource({
+ url: `flatfile?f1-0${s}-i.${c.toString()}`,
+ request: o
+ });
+}
+function getImageType(e) {
+ const t = "JFIF";
+ if (e[6] === t.charCodeAt(0) && e[7] === t.charCodeAt(1) && e[8] === t.charCodeAt(2) && e[9] === t.charCodeAt(3))
+ return "image/jpeg";
+ const n = "PNG";
+ if (e[1] === n.charCodeAt(0) && e[2] === n.charCodeAt(1) && e[3] === n.charCodeAt(2))
+ return "image/png";
+}
+function decodeEarthImageryPacket(e) {
+ const t = protobufExports.Reader.create(e), n = t.len, i = {};
+ for (; t.pos < n; ) {
+ const s = t.uint32();
+ let c;
+ switch (s >>> 3) {
+ case 1:
+ i.imageType = t.uint32();
+ break;
+ case 2:
+ i.imageData = t.bytes();
+ break;
+ case 3:
+ i.alphaType = t.uint32();
+ break;
+ case 4:
+ i.imageAlpha = t.bytes();
+ break;
+ case 5:
+ if (c = i.copyrightIds, defined(c) || (c = i.copyrightIds = []), (s & 7) === 2) {
+ const l = t.uint32() + t.pos;
+ for (; t.pos < l; )
+ c.push(t.uint32());
+ } else
+ c.push(t.uint32());
+ break;
+ default:
+ t.skipType(s & 7);
+ break;
+ }
+ }
+ const r = i.imageType;
+ if (defined(r))
+ switch (r) {
+ case 0:
+ i.imageType = "image/jpeg";
+ break;
+ case 4:
+ i.imageType = "image/png";
+ break;
+ default:
+ throw new RuntimeError(
+ "GoogleEarthEnterpriseImageryProvider: Unsupported image type."
+ );
+ }
+ const o = i.alphaType;
+ return defined(o) && o !== 0 && (console.log(
+ "GoogleEarthEnterpriseImageryProvider: External alpha not supported."
+ ), delete i.alphaType, delete i.imageAlpha), i;
+}
+const defaultColor = new Color(1, 1, 1, 0.4), defaultGlowColor = new Color(0, 1, 0, 0.05), defaultBackgroundColor = new Color(0, 0.5, 0, 0.2);
+function GridImageryProvider(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._defaultAlpha = void 0, this._defaultNightAlpha = void 0, this._defaultDayAlpha = void 0, this._defaultBrightness = void 0, this._defaultContrast = void 0, this._defaultHue = void 0, this._defaultSaturation = void 0, this._defaultGamma = void 0, this._defaultMinificationFilter = void 0, this._defaultMagnificationFilter = void 0, this._tilingScheme = defined(e.tilingScheme) ? e.tilingScheme : new GeographicTilingScheme({ ellipsoid: e.ellipsoid }), this._cells = defaultValue(e.cells, 8), this._color = defaultValue(e.color, defaultColor), this._glowColor = defaultValue(e.glowColor, defaultGlowColor), this._glowWidth = defaultValue(e.glowWidth, 6), this._backgroundColor = defaultValue(
+ e.backgroundColor,
+ defaultBackgroundColor
+ ), this._errorEvent = new Event(), this._tileWidth = defaultValue(e.tileWidth, 256), this._tileHeight = defaultValue(e.tileHeight, 256), this._canvasSize = defaultValue(e.canvasSize, 256), this._canvas = this._createGridCanvas();
+}
+Object.defineProperties(GridImageryProvider.prototype, {
+ /**
+ * Gets the proxy used by this provider.
+ * @memberof GridImageryProvider.prototype
+ * @type {Proxy}
+ * @readonly
+ */
+ proxy: {
+ get: function() {
+ }
+ },
+ /**
+ * Gets the width of each tile, in pixels.
+ * @memberof GridImageryProvider.prototype
+ * @type {number}
+ * @readonly
+ */
+ tileWidth: {
+ get: function() {
+ return this._tileWidth;
+ }
+ },
+ /**
+ * Gets the height of each tile, in pixels.
+ * @memberof GridImageryProvider.prototype
+ * @type {number}
+ * @readonly
+ */
+ tileHeight: {
+ get: function() {
+ return this._tileHeight;
+ }
+ },
+ /**
+ * Gets the maximum level-of-detail that can be requested.
+ * @memberof GridImageryProvider.prototype
+ * @type {number|undefined}
+ * @readonly
+ */
+ maximumLevel: {
+ get: function() {
+ }
+ },
+ /**
+ * Gets the minimum level-of-detail that can be requested.
+ * @memberof GridImageryProvider.prototype
+ * @type {number}
+ * @readonly
+ */
+ minimumLevel: {
+ get: function() {
+ }
+ },
+ /**
+ * Gets the tiling scheme used by this provider.
+ * @memberof GridImageryProvider.prototype
+ * @type {TilingScheme}
+ * @readonly
+ */
+ tilingScheme: {
+ get: function() {
+ return this._tilingScheme;
+ }
+ },
+ /**
+ * Gets the rectangle, in radians, of the imagery provided by this instance.
+ * @memberof GridImageryProvider.prototype
+ * @type {Rectangle}
+ * @readonly
+ */
+ rectangle: {
+ get: function() {
+ return this._tilingScheme.rectangle;
+ }
+ },
+ /**
+ * Gets the tile discard policy. If not undefined, the discard policy is responsible
+ * for filtering out "missing" tiles via its shouldDiscardImage function. If this function
+ * returns undefined, no tiles are filtered.
+ * @memberof GridImageryProvider.prototype
+ * @type {TileDiscardPolicy}
+ * @readonly
+ */
+ tileDiscardPolicy: {
+ get: function() {
+ }
+ },
+ /**
+ * Gets an event that is raised when the imagery provider encounters an asynchronous error. By subscribing
+ * to the event, you will be notified of the error and can potentially recover from it. Event listeners
+ * are passed an instance of {@link TileProviderError}.
+ * @memberof GridImageryProvider.prototype
+ * @type {Event}
+ * @readonly
+ */
+ errorEvent: {
+ get: function() {
+ return this._errorEvent;
+ }
+ },
+ /**
+ * Gets the credit to display when this imagery provider is active. Typically this is used to credit
+ * the source of the imagery.
+ * @memberof GridImageryProvider.prototype
+ * @type {Credit}
+ * @readonly
+ */
+ credit: {
+ get: function() {
+ }
+ },
+ /**
+ * Gets a value indicating whether or not the images provided by this imagery provider
+ * include an alpha channel. If this property is false, an alpha channel, if present, will
+ * be ignored. If this property is true, any images without an alpha channel will be treated
+ * as if their alpha is 1.0 everywhere. When this property is false, memory usage
+ * and texture upload time are reduced.
+ * @memberof GridImageryProvider.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ hasAlphaChannel: {
+ get: function() {
+ return !0;
+ }
+ }
+});
+GridImageryProvider.prototype._drawGrid = function(e) {
+ const n = this._canvasSize;
+ for (let i = 0; i <= this._cells; ++i) {
+ const o = 1 + i / this._cells * (n - 1);
+ e.moveTo(o, 0), e.lineTo(o, n), e.moveTo(0, o), e.lineTo(n, o);
+ }
+ e.stroke();
+};
+GridImageryProvider.prototype._createGridCanvas = function() {
+ const e = document.createElement("canvas");
+ e.width = this._canvasSize, e.height = this._canvasSize;
+ const t = 0, n = this._canvasSize, i = e.getContext("2d"), r = this._backgroundColor.toCssColorString();
+ i.fillStyle = r, i.fillRect(t, t, n, n);
+ const o = this._glowColor.toCssColorString();
+ i.strokeStyle = o, i.lineWidth = this._glowWidth, i.strokeRect(t, t, n, n), this._drawGrid(i), i.lineWidth = this._glowWidth * 0.5, i.strokeRect(t, t, n, n), this._drawGrid(i);
+ const s = this._color.toCssColorString();
+ return i.strokeStyle = s, i.lineWidth = 2, i.strokeRect(t, t, n, n), i.lineWidth = 1, this._drawGrid(i), e;
+};
+GridImageryProvider.prototype.getTileCredits = function(e, t, n) {
+};
+GridImageryProvider.prototype.requestImage = function(e, t, n, i) {
+ return Promise.resolve(this._canvas);
+};
+GridImageryProvider.prototype.pickFeatures = function(e, t, n, i, r) {
+};
+function I3SDecoder() {
+}
+I3SDecoder._maxDecodingConcurrency = Math.max(
+ FeatureDetection.hardwareConcurrency - 1,
+ 1
+);
+I3SDecoder._decodeTaskProcessor = new TaskProcessor(
+ "decodeI3S",
+ I3SDecoder._maxDecodingConcurrency
+);
+I3SDecoder._promise = void 0;
+async function initializeDecoder() {
+ if (await I3SDecoder._decodeTaskProcessor.initWebAssemblyModule({
+ wasmBinaryFile: "ThirdParty/draco_decoder.wasm"
+ }))
+ return I3SDecoder._decodeTaskProcessor;
+ throw new RuntimeError("I3S decoder could not be initialized.");
+}
+I3SDecoder.decode = async function(e, t, n, i, r) {
+ return defined(I3SDecoder._promise) || (I3SDecoder._promise = initializeDecoder()), I3SDecoder._promise.then(function(o) {
+ const s = n._parent._data, c = n._parent._inverseRotationMatrix;
+ let l = 0, d = 0, f = 0;
+ defined(s.obb) ? (l = s.obb.center[0], d = s.obb.center[1], f = s.obb.center[2]) : defined(s.mbs) && (l = s.mbs[0], d = s.mbs[1], f = s.mbs[2]);
+ const h = Matrix3.fromRotationX(-CesiumMath.PI_OVER_TWO), p = new Matrix3();
+ Matrix3.multiply(
+ h,
+ c,
+ p
+ );
+ const m = Cartographic.fromDegrees(
+ l,
+ d,
+ f
+ ), _ = Ellipsoid.WGS84.cartographicToCartesian(
+ m
+ ), y = {
+ binaryData: n._data,
+ featureData: defined(i) && defined(i[0]) ? i[0].data : void 0,
+ schema: t,
+ bufferInfo: n._geometryBufferInfo,
+ ellipsoidRadiiSquare: Ellipsoid.WGS84.radiiSquared,
+ url: e,
+ geoidDataList: n._dataProvider._geoidDataList,
+ cartographicCenter: m,
+ cartesianCenter: _,
+ parentRotation: p,
+ enableFeatures: n._dataProvider.showFeatures,
+ splitGeometryByColorTransparency: n._dataProvider.adjustMaterialAlphaMode,
+ symbologyData: r,
+ calculateNormals: n._dataProvider.calculateNormals
+ };
+ return o.scheduleTask(y);
+ });
+};
+function I3SFeature(e, t) {
+ this._parent = e, this._dataProvider = e._dataProvider, this._layer = e._layer, defined(this._parent._nodeIndex) ? this._resource = this._parent._layer.resource.getDerivedResource({
+ url: `nodes/${this._parent._data.mesh.attribute.resource}/${t}`
+ }) : this._resource = this._parent.resource.getDerivedResource({ url: t });
+}
+Object.defineProperties(I3SFeature.prototype, {
+ /**
+ * Gets the resource for the feature
+ * @memberof I3SFeature.prototype
+ * @type {Resource}
+ * @readonly
+ */
+ resource: {
+ get: function() {
+ return this._resource;
+ }
+ },
+ /**
+ * Gets the I3S data for this object.
+ * @memberof I3SFeature.prototype
+ * @type {object}
+ * @readonly
+ */
+ data: {
+ get: function() {
+ return this._data;
+ }
+ }
+});
+I3SFeature.prototype.load = async function() {
+ return this._data = await I3SDataProvider.loadJson(this._resource), this._data;
+};
+function I3SField(e, t) {
+ this._storageInfo = t, this._parent = e, this._dataProvider = e._dataProvider, this._loadPromise = void 0;
+ const n = `attributes/${t.key}/0`;
+ defined(this._parent._nodeIndex) ? this._resource = this._parent._layer.resource.getDerivedResource({
+ url: `nodes/${this._parent._data.mesh.attribute.resource}/${n}`
+ }) : this._resource = this._parent.resource.getDerivedResource({ url: n });
+}
+Object.defineProperties(I3SField.prototype, {
+ /**
+ * Gets the resource for the fields
+ * @memberof I3SField.prototype
+ * @type {Resource}
+ * @readonly
+ */
+ resource: {
+ get: function() {
+ return this._resource;
+ }
+ },
+ /**
+ * Gets the header for this field.
+ * @memberof I3SField.prototype
+ * @type {object}
+ * @readonly
+ */
+ header: {
+ get: function() {
+ return this._header;
+ }
+ },
+ /**
+ * Gets the values for this field.
+ * @memberof I3SField.prototype
+ * @type {object}
+ * @readonly
+ */
+ values: {
+ get: function() {
+ if (defined(this._values)) {
+ if (defined(this._values.attributeValues))
+ return this._values.attributeValues;
+ if (defined(this._values.objectIds))
+ return this._values.objectIds;
+ }
+ return [];
+ }
+ },
+ /**
+ * Gets the name for the field.
+ * @memberof I3SField.prototype
+ * @type {string}
+ * @readonly
+ */
+ name: {
+ get: function() {
+ return this._storageInfo.name;
+ }
+ }
+});
+function getNumericTypeSize(e) {
+ return e === "UInt8" || e === "Int8" ? 1 : e === "UInt16" || e === "Int16" ? 2 : e === "UInt32" || e === "Int32" || e === "Oid32" || e === "Float32" ? 4 : e === "UInt64" || e === "Int64" || e === "Float64" ? 8 : 0;
+}
+function getValueTypeSize(e) {
+ return e === "String" ? 1 : getNumericTypeSize(e);
+}
+async function load(e) {
+ const t = await e._dataProvider._loadBinary(e._resource), n = new DataView(t);
+ e._data = t, e._validateHeader(n);
+ const i = e._parseHeader(n), r = e._getBodyOffset(i);
+ e._validateBody(n, r), e._parseBody(n, r);
+}
+I3SField.prototype.load = function() {
+ return defined(this._loadPromise) ? this._loadPromise : (this._loadPromise = load(this).catch(function(e) {
+ console.error(e);
+ }), this._loadPromise);
+};
+I3SField.prototype._parseValue = function(e, t, n) {
+ let i;
+ if (t === "UInt8")
+ i = e.getUint8(n), n += 1;
+ else if (t === "Int8")
+ i = e.getInt8(n), n += 1;
+ else if (t === "UInt16")
+ i = e.getUint16(n, !0), n += 2;
+ else if (t === "Int16")
+ i = e.getInt16(n, !0), n += 2;
+ else if (t === "UInt32")
+ i = e.getUint32(n, !0), n += 4;
+ else if (t === "Oid32")
+ i = e.getUint32(n, !0), n += 4;
+ else if (t === "Int32")
+ i = e.getInt32(n, !0), n += 4;
+ else if (t === "UInt64") {
+ const r = e.getUint32(n, !0), o = e.getUint32(n + 4, !0);
+ i = r + Math.pow(2, 32) * o, n += 8;
+ } else if (t === "Int64") {
+ const r = e.getUint32(n, !0), o = e.getUint32(n + 4, !0);
+ o < Math.pow(2, 31) ? i = r + Math.pow(2, 32) * o : i = r + Math.pow(2, 32) * (o - Math.pow(2, 32)), n += 8;
+ } else t === "Float32" ? (i = e.getFloat32(n, !0), n += 4) : t === "Float64" ? (i = e.getFloat64(n, !0), n += 8) : t === "String" && (i = String.fromCharCode(e.getUint8(n)), n += 1);
+ return {
+ value: i,
+ offset: n
+ };
+};
+I3SField.prototype._parseHeader = function(e) {
+ let t = 0;
+ this._header = {};
+ for (let n = 0; n < this._storageInfo.header.length; n++) {
+ const i = this._storageInfo.header[n], r = this._parseValue(e, i.valueType, t);
+ this._header[i.property] = r.value, t = r.offset;
+ }
+ return t;
+};
+I3SField.prototype._parseBody = function(e, t) {
+ this._values = {};
+ for (let n = 0; n < this._storageInfo.ordering.length; n++) {
+ const i = this._storageInfo.ordering[n], r = i === "ObjectIds" ? "objectIds" : i, o = this._storageInfo[r];
+ if (defined(o)) {
+ this._values[r] = [];
+ for (let s = 0; s < this._header.count; ++s)
+ if (o.valueType !== "String") {
+ const c = this._parseValue(
+ e,
+ o.valueType,
+ t
+ );
+ this._values[r].push(c.value), t = c.offset;
+ } else {
+ const c = this._values.attributeByteCounts[s];
+ let l = "";
+ for (let d = 0; d < c; ++d) {
+ const f = this._parseValue(
+ e,
+ o.valueType,
+ t
+ );
+ f.value.charCodeAt(0) !== 0 && (l += f.value), t = f.offset;
+ }
+ this._values[r].push(l);
+ }
+ }
+ }
+};
+I3SField.prototype._getBodyOffset = function(e) {
+ let t = 0;
+ return defined(this._storageInfo.attributeValues) ? t = getNumericTypeSize(this._storageInfo.attributeValues.valueType) : defined(this._storageInfo.objectIds) && (t = getNumericTypeSize(this._storageInfo.objectIds.valueType)), t > 0 ? Math.ceil(e / t) * t : e;
+};
+I3SField.prototype._validateHeader = function(e) {
+ let t = 0;
+ for (let n = 0; n < this._storageInfo.header.length; n++) {
+ const i = this._storageInfo.header[n];
+ t += getValueTypeSize(i.valueType);
+ }
+ if (e.byteLength < t)
+ throw new RuntimeError(
+ `Invalid attribute buffer size (field: ${this.name}, header: ${t}, actual: ${e.byteLength})`
+ );
+};
+I3SField.prototype._validateBody = function(e, t) {
+ if (!defined(this._header.count))
+ throw new RuntimeError(
+ `Invalid attribute buffer (field: ${this.name}, count is missing)`
+ );
+ let n;
+ for (let i = 0; i < this._storageInfo.ordering.length && t < e.byteLength; i++) {
+ const r = this._storageInfo.ordering[i], o = r === "ObjectIds" ? "objectIds" : r, s = this._storageInfo[o];
+ if (defined(s))
+ if (s.valueType !== "String") {
+ o === "attributeByteCounts" && (n = t);
+ const c = getNumericTypeSize(s.valueType);
+ t += c * this._header.count;
+ } else {
+ if (!defined(n))
+ throw new RuntimeError(
+ `Invalid attribute buffer (field: ${this.name}, attributeByteCounts is missing)`
+ );
+ for (let c = 0; c < this._header.count && t < e.byteLength; ++c) {
+ const l = this._parseValue(
+ e,
+ this._storageInfo.attributeByteCounts.valueType,
+ n
+ );
+ t += l.value, n = l.offset;
+ }
+ }
+ else
+ throw new RuntimeError(
+ `Invalid attribute buffer (field: ${this.name}, ${o} is missing)`
+ );
+ }
+ if (e.byteLength < t)
+ throw new RuntimeError(
+ `Invalid attribute buffer size (field: ${this.name}, expected: ${t}, actual: ${e.byteLength})`
+ );
+};
+function I3SGeometry(e, t) {
+ const n = e._dataProvider, i = e._layer;
+ let r;
+ defined(e._nodeIndex) ? r = i.resource.getDerivedResource({
+ url: `nodes/${e._data.mesh.geometry.resource}/${t}`
+ }) : r = e.resource.getDerivedResource({ url: t }), this._parent = e, this._dataProvider = n, this._layer = i, this._resource = r, this._customAttributes = void 0;
+}
+Object.defineProperties(I3SGeometry.prototype, {
+ /**
+ * Gets the resource for the geometry
+ * @memberof I3SGeometry.prototype
+ * @type {Resource}
+ * @readonly
+ */
+ resource: {
+ get: function() {
+ return this._resource;
+ }
+ },
+ /**
+ * Gets the I3S data for this object.
+ * @memberof I3SGeometry.prototype
+ * @type {object}
+ * @readonly
+ */
+ data: {
+ get: function() {
+ return this._data;
+ }
+ },
+ /**
+ * Gets the custom attributes of the geometry.
+ * @memberof I3SGeometry.prototype
+ * @type {object}
+ * @readonly
+ */
+ customAttributes: {
+ get: function() {
+ return this._customAttributes;
+ }
+ }
+});
+I3SGeometry.prototype.load = function() {
+ const e = this;
+ return this._dataProvider._loadBinary(this._resource).then(function(t) {
+ return e._data = t, t;
+ });
+};
+const scratchAb = new Cartesian3(), scratchAp1 = new Cartesian3(), scratchAp2 = new Cartesian3(), scratchCp1 = new Cartesian3(), scratchCp2 = new Cartesian3();
+function sameSide(e, t, n, i) {
+ const r = Cartesian3.subtract(i, n, scratchAb), o = Cartesian3.cross(
+ r,
+ Cartesian3.subtract(e, n, scratchAp1),
+ scratchCp1
+ ), s = Cartesian3.cross(
+ r,
+ Cartesian3.subtract(t, n, scratchAp2),
+ scratchCp2
+ );
+ return Cartesian3.dot(o, s) >= 0;
+}
+const scratchV0 = new Cartesian3(), scratchV1 = new Cartesian3(), scratchV0V1 = new Cartesian3(), scratchV0V2 = new Cartesian3(), scratchCrossProd = new Cartesian3(), scratchNormal = new Cartesian3(), scratchV0p = new Cartesian3(), scratchV1p = new Cartesian3(), scratchV2p = new Cartesian3();
+I3SGeometry.prototype.getClosestPointIndexOnTriangle = function(e, t, n) {
+ if (defined(this._customAttributes) && defined(this._customAttributes.positions)) {
+ const i = new Cartesian3(e, t, n);
+ i.x -= this._customAttributes.cartesianCenter.x, i.y -= this._customAttributes.cartesianCenter.y, i.z -= this._customAttributes.cartesianCenter.z, Matrix3.multiplyByVector(
+ this._customAttributes.parentRotation,
+ i,
+ i
+ );
+ let r = Number.MAX_VALUE, o, s, c, l;
+ const d = this._customAttributes.positions, f = this._customAttributes.indices;
+ let h;
+ defined(f) ? h = f.length : h = d.length / 3;
+ for (let p = 0; p < h; p++) {
+ let m, _, y;
+ defined(f) ? (m = f[p], _ = f[p + 1], y = f[p + 2]) : (m = p * 3, _ = p * 3 + 1, y = p * 3 + 2);
+ const C = Cartesian3.fromElements(
+ d[m * 3],
+ d[m * 3 + 1],
+ d[m * 3 + 2],
+ scratchV0
+ ), T = Cartesian3.fromElements(
+ d[_ * 3],
+ d[_ * 3 + 1],
+ d[_ * 3 + 2],
+ scratchV1
+ ), x = new Cartesian3(
+ d[y * 3],
+ d[y * 3 + 1],
+ d[y * 3 + 2]
+ );
+ if (!sameSide(i, C, T, x) || !sameSide(i, T, C, x) || !sameSide(i, x, C, T))
+ continue;
+ const b = Cartesian3.subtract(T, C, scratchV0V1), S = Cartesian3.subtract(x, C, scratchV0V2), E = Cartesian3.cross(b, S, scratchCrossProd);
+ if (Cartesian3.magnitude(E) === 0)
+ continue;
+ const A = Cartesian3.normalize(E, scratchNormal), D = Cartesian3.subtract(i, C, scratchV0p), P = Math.abs(Cartesian3.dot(D, A));
+ if (P < r) {
+ r = P, o = p;
+ const I = Cartesian3.magnitudeSquared(
+ Cartesian3.subtract(i, C, D)
+ ), M = Cartesian3.magnitudeSquared(
+ Cartesian3.subtract(i, T, scratchV1p)
+ ), R = Cartesian3.magnitudeSquared(
+ Cartesian3.subtract(i, x, scratchV2p)
+ );
+ I < M && I < R ? (c = m, l = C, s = I) : M < R ? (c = _, l = T, s = M) : (c = y, l = x, s = R);
+ }
+ }
+ if (defined(o))
+ return {
+ index: c,
+ distanceSquared: s,
+ distance: Math.sqrt(s),
+ queriedPosition: i,
+ closestPosition: Cartesian3.clone(l)
+ };
+ }
+ return {
+ index: -1,
+ distanceSquared: Number.Infinity,
+ distance: Number.Infinity
+ };
+};
+function convertColorFactor(e) {
+ const t = [], n = e.length;
+ for (let i = 0; i < n; i++)
+ i < 3 ? t.push(srgbToLinear(e[i])) : t.push(e[i]);
+ return t;
+}
+I3SGeometry.prototype._generateGltf = function(e, t, n, i, r, o, s, c) {
+ let l = {
+ pbrMetallicRoughness: {
+ metallicFactor: 0
+ },
+ doubleSided: !0,
+ name: "Material"
+ }, d = !1, f, h = "";
+ if (defined(this._parent._data.mesh) && defined(this._layer._data.materialDefinitions)) {
+ const b = this._parent._data.mesh.material.definition;
+ if (b >= 0 && b < this._layer._data.materialDefinitions.length) {
+ if (f = this._layer._data.materialDefinitions[b], l = f, defined(l.pbrMetallicRoughness) && defined(l.pbrMetallicRoughness.baseColorTexture)) {
+ d = !0, l.pbrMetallicRoughness.baseColorTexture.index = 0;
+ let S = "0";
+ if (defined(this._layer._data.textureSetDefinitions))
+ for (let E = 0; E < this._layer._data.textureSetDefinitions.length; E++) {
+ const A = this._layer._data.textureSetDefinitions[E];
+ for (let D = 0; D < A.formats.length; D++) {
+ const P = A.formats[D];
+ if (P.format === "jpg") {
+ S = P.name;
+ break;
+ }
+ }
+ }
+ defined(this._parent._data.mesh) && this._parent._data.mesh.material.resource >= 0 && (h = this._layer.resource.getDerivedResource({
+ url: `nodes/${this._parent._data.mesh.material.resource}/textures/${S}`
+ }).url);
+ }
+ defined(l.pbrMetallicRoughness) && defined(l.pbrMetallicRoughness.baseColorFactor) && (l.pbrMetallicRoughness.baseColorFactor = convertColorFactor(
+ l.pbrMetallicRoughness.baseColorFactor
+ )), defined(l.emissiveFactor) && (l.emissiveFactor = convertColorFactor(
+ l.emissiveFactor
+ ));
+ }
+ } else defined(this._parent._data.textureData) && (d = !0, h = this._parent.resource.getDerivedResource({
+ url: `${this._parent._data.textureData[0].href}`
+ }).url, l.pbrMetallicRoughness.baseColorTexture = { index: 0 });
+ defined(l.alphaMode) && (l.alphaMode = l.alphaMode.toUpperCase());
+ let p = [], m = [], _ = [];
+ d && (p = [
+ {
+ sampler: 0,
+ source: 0
+ }
+ ], m = [
+ {
+ uri: h
+ }
+ ], _ = [
+ {
+ magFilter: 9729,
+ minFilter: 9986,
+ wrapS: 10497,
+ wrapT: 10497
+ }
+ ]);
+ const y = [], C = n.length;
+ for (let x = 0; x < C; x++) {
+ const b = n[x].primitives, S = b.length;
+ for (let E = 0; E < S; E++) {
+ const A = b[E];
+ if (defined(A.material)) {
+ for (; A.material >= y.length; ) {
+ const P = clone$1(l, !0);
+ y.push(P);
+ }
+ const D = y[A.material];
+ defined(A.extra) && A.extra.isTransparent ? defined(D.alphaMode) || (D.alphaMode = "BLEND") : D.alphaMode === "BLEND" && (D.alphaMode = "OPAQUE");
+ }
+ }
+ }
+ return {
+ scene: 0,
+ scenes: [
+ {
+ nodes: e
+ }
+ ],
+ nodes: t,
+ meshes: n,
+ buffers: i,
+ bufferViews: r,
+ accessors: o,
+ materials: y,
+ textures: p,
+ images: m,
+ samplers: _,
+ asset: {
+ version: "2.0"
+ },
+ extensions: s,
+ extensionsUsed: c
+ };
+};
+function I3SNode(e, t, n) {
+ let i, r, o, s;
+ n ? (i = 0, r = e) : (i = e._level + 1, r = e._layer), typeof t == "number" ? o = t : s = e.resource.getDerivedResource({
+ url: `${t}/`
+ }), this._parent = e, this._dataProvider = e._dataProvider, this._isRoot = n, this._level = i, this._layer = r, this._nodeIndex = o, this._resource = s, this._isLoading = !1, this._tile = void 0, this._data = void 0, this._geometryData = [], this._featureData = [], this._fields = {}, this._children = [], this._childrenReadyPromise = void 0, this._globalTransform = void 0, this._inverseGlobalTransform = void 0, this._inverseRotationMatrix = void 0, this._symbologyData = void 0;
+}
+Object.defineProperties(I3SNode.prototype, {
+ /**
+ * Gets the resource for the node.
+ * @memberof I3SNode.prototype
+ * @type {Resource}
+ * @readonly
+ */
+ resource: {
+ get: function() {
+ return this._resource;
+ }
+ },
+ /**
+ * Gets the parent layer.
+ * @memberof I3SNode.prototype
+ * @type {I3SLayer}
+ * @readonly
+ */
+ layer: {
+ get: function() {
+ return this._layer;
+ }
+ },
+ /**
+ * Gets the parent node.
+ * @memberof I3SNode.prototype
+ * @type {I3SNode|undefined}
+ * @readonly
+ */
+ parent: {
+ get: function() {
+ return this._parent;
+ }
+ },
+ /**
+ * Gets the children nodes.
+ * @memberof I3SNode.prototype
+ * @type {I3SNode[]}
+ * @readonly
+ */
+ children: {
+ get: function() {
+ return this._children;
+ }
+ },
+ /**
+ * Gets the collection of geometries.
+ * @memberof I3SNode.prototype
+ * @type {I3SGeometry[]}
+ * @readonly
+ */
+ geometryData: {
+ get: function() {
+ return this._geometryData;
+ }
+ },
+ /**
+ * Gets the collection of features.
+ * @memberof I3SNode.prototype
+ * @type {I3SFeature[]}
+ * @readonly
+ */
+ featureData: {
+ get: function() {
+ return this._featureData;
+ }
+ },
+ /**
+ * Gets the collection of fields.
+ * @memberof I3SNode.prototype
+ * @type {I3SField[]}
+ * @readonly
+ */
+ fields: {
+ get: function() {
+ return this._fields;
+ }
+ },
+ /**
+ * Gets the Cesium3DTile for this node.
+ * @memberof I3SNode.prototype
+ * @type {Cesium3DTile}
+ * @readonly
+ */
+ tile: {
+ get: function() {
+ return this._tile;
+ }
+ },
+ /**
+ * Gets the I3S data for this object.
+ * @memberof I3SNode.prototype
+ * @type {object}
+ * @readonly
+ */
+ data: {
+ get: function() {
+ return this._data;
+ }
+ }
+});
+I3SNode.prototype.load = async function() {
+ const e = this;
+ function t() {
+ if (!e._isRoot) {
+ const r = e._create3DTileDefinition();
+ e._tile = new Cesium3DTile(
+ e._layer._tileset,
+ e._dataProvider.resource,
+ r,
+ e._parent._tile
+ ), e._tile._i3sNode = e;
+ }
+ }
+ if (!defined(this._nodeIndex)) {
+ const r = await I3SDataProvider.loadJson(this._resource);
+ e._data = r, t();
+ return;
+ }
+ const n = await this._layer._getNodeInNodePages(this._nodeIndex);
+ e._data = n;
+ let i;
+ e._isRoot ? i = "nodes/root/" : defined(n.mesh) && (i = `../${n.mesh.geometry.resource}/`), defined(i) && (e._resource = e._parent.resource.getDerivedResource({ url: i })), t();
+};
+function createAndLoadField(e, t) {
+ const n = new I3SField(e, t);
+ return e._fields[t.name] = n, n.load();
+}
+I3SNode.prototype.loadFields = function() {
+ const e = this._layer._data.attributeStorageInfo, t = [];
+ if (defined(e))
+ for (let n = 0; n < e.length; n++) {
+ const i = e[n], r = this._fields[i.name];
+ defined(r) ? t.push(r.load()) : t.push(createAndLoadField(this, i));
+ }
+ return Promise.all(t);
+};
+I3SNode.prototype.loadField = function(e) {
+ const t = this._fields[e];
+ if (defined(t))
+ return t.load();
+ const n = this._layer._data.attributeStorageInfo;
+ if (defined(n))
+ for (let i = 0; i < n.length; i++) {
+ const r = n[i];
+ if (r.name === e)
+ return createAndLoadField(this, r);
+ }
+ return Promise.resolve();
+};
+I3SNode.prototype.getFieldsForPickedPosition = function(e) {
+ const t = this.geometryData[0];
+ if (!defined(t.customAttributes.featureIndex))
+ return {};
+ const n = t.getClosestPointIndexOnTriangle(
+ e.x,
+ e.y,
+ e.z
+ );
+ if (n.index === -1 || n.index > t.customAttributes.featureIndex.length)
+ return {};
+ const i = t.customAttributes.featureIndex[n.index];
+ return this.getFieldsForFeature(i);
+};
+I3SNode.prototype.getFieldsForFeature = function(e) {
+ const t = {};
+ for (const n in this.fields)
+ if (this.fields.hasOwnProperty(n)) {
+ const i = this.fields[n];
+ e >= 0 && e < i.values.length && (t[i.name] = i.values[e]);
+ }
+ return t;
+};
+I3SNode.prototype._loadChildren = function() {
+ const e = this;
+ if (defined(this._childrenReadyPromise))
+ return this._childrenReadyPromise;
+ const t = [];
+ if (defined(e._data.children))
+ for (let n = 0; n < e._data.children.length; n++) {
+ const i = e._data.children[n], r = new I3SNode(
+ e,
+ defaultValue(i.href, i),
+ !1
+ );
+ e._children.push(r), t.push(r.load());
+ }
+ return this._childrenReadyPromise = Promise.all(t).then(function() {
+ for (let n = 0; n < e._children.length; n++)
+ e._tile.children.push(e._children[n]._tile);
+ }), this._childrenReadyPromise;
+};
+I3SNode.prototype._loadGeometryData = function() {
+ const e = [];
+ if (defined(this._data.geometryData))
+ for (let t = 0; t < this._data.geometryData.length; t++) {
+ const n = new I3SGeometry(
+ this,
+ this._data.geometryData[t].href
+ );
+ this._geometryData.push(n), e.push(n.load());
+ }
+ else if (defined(this._data.mesh)) {
+ const t = this._layer._findBestGeometryBuffers(
+ this._data.mesh.geometry.definition,
+ ["position", "uv0"]
+ ), n = `./geometries/${t.bufferIndex}/`, i = new I3SGeometry(this, n);
+ i._geometryDefinitions = t.definition, i._geometryBufferInfo = t.geometryBufferInfo, this._geometryData.push(i), e.push(i.load());
+ }
+ return Promise.all(e);
+};
+I3SNode.prototype._loadFeatureData = function() {
+ const e = [];
+ if (defined(this._data.featureData))
+ for (let t = 0; t < this._data.featureData.length; t++) {
+ const n = new I3SFeature(
+ this,
+ this._data.featureData[t].href
+ );
+ this._featureData.push(n), e.push(n.load());
+ }
+ return Promise.all(e);
+};
+I3SNode.prototype._clearGeometryData = function() {
+ this._geometryData = [];
+};
+I3SNode.prototype._create3DTileDefinition = function() {
+ const e = this._data.obb, t = this._data.mbs;
+ if (!defined(e) && !defined(t)) {
+ console.error("Failed to load I3S node. Bounding volume is required.");
+ return;
+ }
+ let n;
+ if (defined(e) ? n = Cartographic.fromDegrees(
+ e.center[0],
+ e.center[1],
+ e.center[2]
+ ) : n = Cartographic.fromDegrees(t[0], t[1], t[2]), defined(this._dataProvider._geoidDataList) && defined(n))
+ for (let T = 0; T < this._dataProvider._geoidDataList.length; T++) {
+ const x = this._dataProvider._geoidDataList[T], b = x.projection.project(n);
+ if (b.x > x.nativeExtent.west && b.x < x.nativeExtent.east && b.y > x.nativeExtent.south && b.y < x.nativeExtent.north) {
+ n.height += sampleGeoid(b.x, b.y, x);
+ break;
+ }
+ }
+ let i = {}, r, o = 0;
+ defined(e) ? (i = {
+ box: [
+ 0,
+ 0,
+ 0,
+ e.halfSize[0],
+ 0,
+ 0,
+ 0,
+ e.halfSize[1],
+ 0,
+ 0,
+ 0,
+ e.halfSize[2]
+ ]
+ }, o = Math.max(
+ Math.max(this._data.obb.halfSize[0], this._data.obb.halfSize[1]),
+ this._data.obb.halfSize[2]
+ ), r = Ellipsoid.WGS84.cartographicToCartesian(n)) : (i = {
+ sphere: [0, 0, 0, t[3]]
+ }, r = Ellipsoid.WGS84.cartographicToCartesian(n), o = this._data.mbs[3]), o *= 2;
+ let s = 1 / 0;
+ if (defined(this._data.lodThreshold))
+ if (this._layer._data.nodePages.lodSelectionMetricType === "maxScreenThresholdSQ") {
+ const T = Math.sqrt(
+ this._data.lodThreshold / (Math.PI * 0.25)
+ );
+ s = o / T;
+ } else if (this._layer._data.nodePages.lodSelectionMetricType === "maxScreenThreshold") {
+ const T = this._data.lodThreshold;
+ s = o / T;
+ } else
+ console.error("Invalid lodSelectionMetricType in Layer");
+ else if (defined(this._data.lodSelection))
+ for (let T = 0; T < this._data.lodSelection.length; T++)
+ this._data.lodSelection[T].metricType === "maxScreenThreshold" && (s = o / this._data.lodSelection[T].maxError);
+ s === 1 / 0 && (s = 1e5);
+ const c = s * 16, l = new HeadingPitchRoll(0, 0, 0);
+ let d = Transforms.headingPitchRollQuaternion(r, l);
+ defined(this._data.obb) && (d = new Quaternion(
+ this._data.obb.quaternion[0],
+ this._data.obb.quaternion[1],
+ this._data.obb.quaternion[2],
+ this._data.obb.quaternion[3]
+ ));
+ const f = Matrix3.fromQuaternion(d), h = Matrix3.inverse(f, new Matrix3()), p = new Matrix4(
+ f[0],
+ f[1],
+ f[2],
+ 0,
+ f[3],
+ f[4],
+ f[5],
+ 0,
+ f[6],
+ f[7],
+ f[8],
+ 0,
+ r.x,
+ r.y,
+ r.z,
+ 1
+ ), m = Matrix4.inverse(
+ p,
+ new Matrix4()
+ ), _ = Matrix4.clone(p);
+ defined(this._parent._globalTransform) && Matrix4.multiply(
+ p,
+ this._parent._inverseGlobalTransform,
+ _
+ ), this._globalTransform = p, this._inverseGlobalTransform = m, this._inverseRotationMatrix = h;
+ const y = [];
+ for (let T = 0; T < this._children.length; T++)
+ y.push(
+ this._children[T]._create3DTileDefinition()
+ );
+ return {
+ children: y,
+ refine: "REPLACE",
+ boundingVolume: i,
+ transform: [
+ _[0],
+ _[4],
+ _[8],
+ _[12],
+ _[1],
+ _[5],
+ _[9],
+ _[13],
+ _[2],
+ _[6],
+ _[10],
+ _[14],
+ _[3],
+ _[7],
+ _[11],
+ _[15]
+ ],
+ content: {
+ uri: defined(this._resource) ? this._resource.url : void 0
+ },
+ geometricError: c
+ };
+};
+I3SNode.prototype._loadSymbology = async function() {
+ !defined(this._symbologyData) && defined(this._layer._symbology) && (this._symbologyData = await this._layer._symbology._getSymbology(this));
+};
+I3SNode.prototype._createContentURL = async function() {
+ let e = {
+ scene: 0,
+ scenes: [
+ {
+ nodes: [0]
+ }
+ ],
+ nodes: [
+ {
+ name: "singleNode"
+ }
+ ],
+ meshes: [],
+ buffers: [],
+ bufferViews: [],
+ accessors: [],
+ materials: [],
+ textures: [],
+ images: [],
+ samplers: [],
+ asset: {
+ version: "2.0"
+ }
+ };
+ const t = [this._loadGeometryData()];
+ if (this._dataProvider.legacyVersion16 && t.push(this._loadFeatureData()), await Promise.all(t), defined(this._geometryData) && this._geometryData.length > 0) {
+ this._dataProvider._applySymbology && await this._loadSymbology();
+ const r = this._geometryData[0].resource.url, o = this._layer._data.store.defaultGeometrySchema, s = this._geometryData[0], c = await I3SDecoder.decode(
+ r,
+ o,
+ s,
+ this._featureData[0],
+ this._symbologyData
+ );
+ if (!defined(c))
+ return;
+ e = s._generateGltf(
+ c.meshData.nodesInScene,
+ c.meshData.nodes,
+ c.meshData.meshes,
+ c.meshData.buffers,
+ c.meshData.bufferViews,
+ c.meshData.accessors,
+ c.meshData.rootExtensions,
+ c.meshData.extensionsUsed
+ ), this._geometryData[0]._customAttributes = c.meshData._customAttributes;
+ }
+ const n = this._dataProvider._binarizeGltf(e), i = new Blob([n], {
+ type: "application/binary"
+ });
+ return URL.createObjectURL(i);
+};
+async function loadFilters(e) {
+ const t = e._layer._filters, n = [];
+ for (let i = 0; i < t.length; i++) {
+ const r = e.loadField(t[i].name);
+ n.push(r);
+ }
+ return await Promise.all(n), t;
+}
+function checkFeatureValue(e, t, n) {
+ if (!defined(n.values) || n.values.length === 0)
+ return !1;
+ const i = defined(t) ? t.values : [];
+ let r;
+ e < i.length && (r = i[e]);
+ let o = !1;
+ for (let s = 0; s < n.values.length; s++)
+ if (n.values[s] === r) {
+ o = !0;
+ break;
+ }
+ return o;
+}
+async function filterFeatures(e, t) {
+ const n = e._tile.content.batchTable;
+ if (defined(n) && n.featuresLength > 0) {
+ n.setAllShow(!0);
+ const i = await loadFilters(e);
+ if (i.length > 0)
+ for (let r = 0; r < n.featuresLength; r++)
+ for (let o = 0; o < i.length; o++) {
+ const s = i[o];
+ if (!checkFeatureValue(r, e._fields[s.name], s)) {
+ n.setShow(r, !1);
+ break;
+ }
+ }
+ }
+ t.show = !0;
+}
+I3SNode.prototype._filterFeatures = function() {
+ var n, i;
+ const e = [];
+ for (let r = 0; r < this._children.length; r++) {
+ const o = this._children[r]._filterFeatures();
+ e.push(o);
+ }
+ const t = (i = (n = this._tile) == null ? void 0 : n.content) == null ? void 0 : i._model;
+ if (defined(this._geometryData) && this._geometryData.length > 0 && defined(t) && t.ready) {
+ t.show = !1;
+ const r = filterFeatures(this, t);
+ e.push(r);
+ }
+ return Promise.all(e);
+};
+Cesium3DTile.prototype._hookedRequestContent = Cesium3DTile.prototype.requestContent;
+Cesium3DTile.prototype.requestContent = function() {
+ if (!this.tileset._isI3STileSet)
+ return this._hookedRequestContent();
+ if (!this._isLoading) {
+ this._isLoading = !0;
+ const e = this;
+ return this._i3sNode._createContentURL().then((t) => {
+ if (!defined(t)) {
+ e._isLoading = !1;
+ return;
+ }
+ return e._contentResource = new Resource({ url: t }), e._hookedRequestContent();
+ }).then((t) => {
+ const n = t == null ? void 0 : t._model;
+ return defined(e._i3sNode._geometryData) && e._i3sNode._geometryData.length > 0 && defined(n) && (n.show = !1, n.readyEvent.addEventListener(() => {
+ filterFeatures(e._i3sNode, n);
+ })), e._isLoading = !1, t;
+ });
+ }
+};
+function bilinearInterpolate(e, t, n, i, r, o) {
+ const s = n * (1 - e) + i * e, c = r * (1 - e) + o * e;
+ return s * (1 - t) + c * t;
+}
+function sampleMap(e, t, n, i) {
+ const r = e + t * n;
+ return i[r];
+}
+function sampleGeoid(e, t, n) {
+ const i = n.nativeExtent;
+ let r = (e - i.west) / (i.east - i.west) * (n.width - 1), o = (t - i.south) / (i.north - i.south) * (n.height - 1);
+ const s = Math.floor(r);
+ let c = Math.floor(o);
+ r -= s, o -= c;
+ const l = s < n.width ? s + 1 : s;
+ let d = c < n.height ? c + 1 : c;
+ c = n.height - 1 - c, d = n.height - 1 - d;
+ const f = sampleMap(s, c, n.width, n.buffer), h = sampleMap(l, c, n.width, n.buffer), p = sampleMap(s, d, n.width, n.buffer), m = sampleMap(l, d, n.width, n.buffer);
+ let _ = bilinearInterpolate(r, o, f, h, p, m);
+ return _ = _ * n.scale + n.offset, _;
+}
+Object.defineProperties(Cesium3DTile.prototype, {
+ /**
+ * Gets the I3S Node for the tile.
+ * @memberof Cesium3DTile.prototype
+ * @type {string}
+ */
+ i3sNode: {
+ get: function() {
+ return this._i3sNode;
+ }
+ }
+});
+function I3SSymbology(e) {
+ this._layer = e, this._defaultSymbology = void 0, this._valueFields = [], this._uniqueValueHash = void 0, this._classBreaksHash = void 0, this._parseLayerSymbology();
+}
+Object.defineProperties(I3SSymbology.prototype, {
+ /**
+ * Gets the default symbology data.
+ * @memberof I3SSymbology.prototype
+ * @type {object}
+ * @readonly
+ */
+ defaultSymbology: {
+ get: function() {
+ return this._defaultSymbology;
+ }
+ }
+});
+function convertColor(e, t) {
+ const n = [];
+ for (let i = 0; i < e.length; i++) {
+ const r = Color.byteToFloat(e[i]);
+ i < 3 ? n.push(srgbToLinear(r)) : n.push(r);
+ }
+ return n.length === 3 && (defined(t) ? n.push(1 - t / 100) : n.push(1)), n;
+}
+function parseSymbol(e, t) {
+ const n = {
+ edges: void 0,
+ material: void 0
+ };
+ if (defined(e) && defined(e.symbolLayers))
+ for (let i = 0; i < e.symbolLayers.length; i++) {
+ const r = e.symbolLayers[i];
+ if (r.type === "Fill") {
+ const o = r.edges, s = r.outline;
+ if (defined(o) ? (n.edges = {}, defined(o.color) && (n.edges.color = convertColor(
+ o.color,
+ o.transparency
+ ))) : defined(s) && (n.edges = {}, defined(s.color) && (n.edges.color = convertColor(
+ s.color,
+ s.transparency
+ ))), !t) {
+ const c = r.material;
+ defined(c) && (n.material = {
+ colorMixMode: c.colorMixMode
+ }, defined(c.color) && (n.material.color = convertColor(
+ c.color,
+ c.transparency
+ )));
+ }
+ break;
+ }
+ }
+ return n;
+}
+function buildUniqueValueHash(e, t) {
+ if (defined(e.uniqueValueGroups)) {
+ const n = {};
+ for (let i = 0; i < e.uniqueValueGroups.length; i++) {
+ const r = e.uniqueValueGroups[i].classes;
+ if (defined(r))
+ for (let o = 0; o < r.length; o++) {
+ const s = parseSymbol(
+ r[o].symbol,
+ t
+ ), c = r[o].values;
+ for (let l = 0; l < c.length; l++) {
+ const d = c[l];
+ let f = n;
+ for (let h = 0; h < d.length; h++) {
+ const p = d[h];
+ h === d.length - 1 ? f[p] = s : (defined(f[p]) || (f[p] = {}), f = f[p]);
+ }
+ }
+ }
+ }
+ return n;
+ }
+ if (defined(e.uniqueValueInfos)) {
+ const n = {};
+ for (let i = 0; i < e.uniqueValueInfos.length; i++) {
+ const r = e.uniqueValueInfos[i];
+ n[r.value] = parseSymbol(r.symbol, t);
+ }
+ return n;
+ }
+}
+function buildClassBreaksHash(e, t) {
+ if (defined(e.classBreakInfos)) {
+ const n = [...e.classBreakInfos];
+ n.sort(function(r, o) {
+ const s = defaultValue(r.classMaxValue, r.classMinValue), c = defaultValue(o.classMaxValue, o.classMinValue);
+ return s - c;
+ });
+ const i = {
+ ranges: [],
+ symbols: []
+ };
+ defined(e.minValue) && (i.ranges.push(e.minValue), i.symbols.push(void 0));
+ for (let r = 0; r < n.length; r++) {
+ const o = n[r];
+ defined(o.classMinValue) && (i.ranges.length === 0 || o.classMinValue > i.ranges[i.ranges.length - 1]) && (i.ranges.push(o.classMinValue), i.symbols.push(void 0)), defined(o.classMaxValue) && (i.ranges.length === 0 || o.classMaxValue > i.ranges[i.ranges.length - 1]) && (i.ranges.push(o.classMaxValue), i.symbols.push(parseSymbol(o.symbol, t)));
+ }
+ return i.symbols.push(void 0), i;
+ }
+}
+I3SSymbology.prototype._parseLayerSymbology = function() {
+ const e = this._layer.data.drawingInfo;
+ if (defined(e) && defined(e.renderer)) {
+ const t = this._layer.data.cachedDrawingInfo, n = defined(t) && t.color === !0, i = e.renderer;
+ i.type === "simple" ? this._defaultSymbology = parseSymbol(i.symbol, n) : i.type === "uniqueValue" ? (this._defaultSymbology = parseSymbol(
+ i.defaultSymbol,
+ n
+ ), this._valueFields.push(i.field1), defined(i.field2) && this._valueFields.push(i.field2), defined(i.field3) && this._valueFields.push(i.field3), this._uniqueValueHash = buildUniqueValueHash(i, n)) : i.type === "classBreaks" && (this._defaultSymbology = parseSymbol(
+ i.defaultSymbol,
+ n
+ ), this._valueFields.push(i.field), this._classBreaksHash = buildClassBreaksHash(i, n));
+ }
+};
+function findHashForUniqueValues(e, t, n, i) {
+ const r = t[n];
+ if (i < r.length) {
+ const o = r[i], s = e[o];
+ return defined(s) && ++n < t.length ? findHashForUniqueValues(s, t, n, i) : s;
+ }
+}
+function bisect(e, t) {
+ let n = 0, i = e.length;
+ if (n < i)
+ do {
+ const r = n + i >>> 1;
+ e[r] < t ? n = r + 1 : i = r;
+ } while (n < i);
+ return n;
+}
+function findHashForClassBreaks(e, t, n) {
+ const i = t[n], r = bisect(e.ranges, i);
+ return e.symbols[r];
+}
+I3SSymbology.prototype._getSymbology = async function(e) {
+ const t = {
+ default: this._defaultSymbology
+ };
+ if (this._valueFields.length > 0) {
+ const n = [];
+ for (let o = 0; o < this._valueFields.length; o++)
+ n.push(e.loadField(this._valueFields[o]));
+ await Promise.all(n);
+ const i = [];
+ for (let o = 0; o < this._valueFields.length; o++)
+ i.push(e.fields[this._valueFields[o]].values);
+ let r;
+ if (defined(this._uniqueValueHash) ? r = (o) => findHashForUniqueValues(
+ this._uniqueValueHash,
+ i,
+ 0,
+ o
+ ) : defined(this._classBreaksHash) && (r = (o) => findHashForClassBreaks(
+ this._classBreaksHash,
+ i[0],
+ o
+ )), defined(r)) {
+ const o = i[0];
+ for (let s = 0; s < o.length; s++) {
+ const c = r(s);
+ defined(c) && (t[s] = c);
+ }
+ }
+ }
+ return t;
+};
+function I3SLayer(e, t, n) {
+ this._dataProvider = e, this._parent = n, !defined(t.href) && defined(t.id) && (t.href = `layers/${t.id}`);
+ const i = this._parent.resource.getUrlComponent();
+ let r = "";
+ i.match(/layers\/\d/) ? r = `${i}`.replace(/\/+$/, "") : r = `${i}`.replace(/\/?$/, "/").concat(`${t.href}`), this._version = t.store.version;
+ const o = this._version.split(".");
+ this._majorVersion = parseInt(o[0]), this._minorVersion = o.length > 1 ? parseInt(o[1]) : 0, this._resource = new Resource({ url: r }), this._resource.setQueryParameters(
+ this._dataProvider.resource.queryParameters
+ ), this._resource.appendForwardSlash(), this._data = t, this._rootNode = void 0, this._nodePages = {}, this._nodePageFetches = {}, this._extent = void 0, this._tileset = void 0, this._geometryDefinitions = void 0, this._filters = [], this._symbology = void 0, this._computeGeometryDefinitions(!0), this._computeExtent();
+}
+Object.defineProperties(I3SLayer.prototype, {
+ /**
+ * Gets the resource for the layer.
+ * @memberof I3SLayer.prototype
+ * @type {Resource}
+ * @readonly
+ */
+ resource: {
+ get: function() {
+ return this._resource;
+ }
+ },
+ /**
+ * Gets the root node of this layer.
+ * @memberof I3SLayer.prototype
+ * @type {I3SNode}
+ * @readonly
+ */
+ rootNode: {
+ get: function() {
+ return this._rootNode;
+ }
+ },
+ /**
+ * Gets the Cesium3DTileset for this layer.
+ * @memberof I3SLayer.prototype
+ * @type {Cesium3DTileset|undefined}
+ * @readonly
+ */
+ tileset: {
+ get: function() {
+ return this._tileset;
+ }
+ },
+ /**
+ * Gets the I3S data for this object.
+ * @memberof I3SLayer.prototype
+ * @type {object}
+ * @readonly
+ */
+ data: {
+ get: function() {
+ return this._data;
+ }
+ },
+ /**
+ * The version string of the loaded I3S dataset
+ * @memberof I3SLayer.prototype
+ * @type {string}
+ * @readonly
+ */
+ version: {
+ get: function() {
+ return this._version;
+ }
+ },
+ /**
+ * The major version number of the loaded I3S dataset
+ * @memberof I3SLayer.prototype
+ * @type {number}
+ * @readonly
+ */
+ majorVersion: {
+ get: function() {
+ return this._majorVersion;
+ }
+ },
+ /**
+ * The minor version number of the loaded I3S dataset
+ * @memberof I3SLayer.prototype
+ * @type {number}
+ * @readonly
+ */
+ minorVersion: {
+ get: function() {
+ return this._minorVersion;
+ }
+ },
+ /**
+ * When true, when the loaded I3S version is 1.6 or older
+ * @memberof I3SLayer.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ legacyVersion16: {
+ get: function() {
+ if (defined(this.version))
+ return this.majorVersion < 1 || this.majorVersion === 1 && this.minorVersion <= 6;
+ }
+ }
+});
+I3SLayer.prototype.load = async function(e) {
+ if (this._data.spatialReference.wkid !== 4326)
+ throw new RuntimeError(
+ `Unsupported spatial reference: ${this._data.spatialReference.wkid}`
+ );
+ if (this._dataProvider.applySymbology && (this._symbology = new I3SSymbology(this)), await this._dataProvider.loadGeoidData(), await this._loadRootNode(e), await this._create3DTileset(e), this._rootNode._tile = this._tileset._root, this._tileset._root._i3sNode = this._rootNode, this.legacyVersion16)
+ return this._rootNode._loadChildren();
+};
+I3SLayer.prototype._computeGeometryDefinitions = function(e) {
+ if (this._geometryDefinitions = [], defined(this._data.geometryDefinitions))
+ for (let t = 0; t < this._data.geometryDefinitions.length; t++) {
+ const n = [], i = this._data.geometryDefinitions[t].geometryBuffers;
+ for (let r = 0; r < i.length; r++) {
+ const o = i[r], s = [];
+ let c = !1;
+ if (defined(o.compressedAttributes) && e) {
+ c = !0;
+ const l = o.compressedAttributes.attributes;
+ for (let d = 0; d < l.length; d++)
+ s.push(l[d]);
+ } else
+ for (const l in o)
+ l !== "offset" && s.push(l);
+ n.push({
+ compressed: c,
+ attributes: s,
+ index: i.indexOf(o)
+ });
+ }
+ n.sort(function(r, o) {
+ return r.compressed && !o.compressed ? -1 : !r.compressed && o.compressed ? 1 : r.attributes.length - o.attributes.length;
+ }), this._geometryDefinitions.push(n);
+ }
+};
+I3SLayer.prototype._findBestGeometryBuffers = function(e, t) {
+ const n = this._geometryDefinitions[e];
+ if (defined(n))
+ for (let i = 0; i < n.length; ++i) {
+ const r = n[i];
+ let o = !1;
+ const s = r.attributes;
+ for (let c = 0; c < t.length; c++)
+ if (!s.includes(t[c])) {
+ o = !0;
+ break;
+ }
+ if (!o)
+ return {
+ bufferIndex: r.index,
+ definition: n,
+ geometryBufferInfo: r
+ };
+ }
+ return 0;
+};
+I3SLayer.prototype._loadRootNode = function(e) {
+ if (defined(this._data.nodePages)) {
+ let t = 0;
+ defined(this._data.nodePages.rootIndex) && (t = this._data.nodePages.rootIndex), this._rootNode = new I3SNode(this, t, !0);
+ } else
+ this._rootNode = new I3SNode(this, this._data.store.rootNode, !0);
+ return this._rootNode.load(e);
+};
+I3SLayer.prototype._getNodeInNodePages = function(e) {
+ const t = Math.floor(e / this._data.nodePages.nodesPerPage), n = e % this._data.nodePages.nodesPerPage;
+ return this._loadNodePage(t).then(function(i) {
+ return i.nodes[n];
+ });
+};
+I3SLayer._fetchJson = function(e) {
+ return e.fetchJson();
+};
+I3SLayer.prototype._loadNodePage = function(e) {
+ const t = this;
+ if (!defined(this._nodePageFetches[e])) {
+ const n = this.resource.getDerivedResource({
+ url: `nodepages/${e}/`
+ }), i = I3SLayer._fetchJson(n).then(function(r) {
+ return defined(r.error) && r.error.code !== 200 ? Promise.reject(r.error) : (t._nodePages[e] = r.nodes, r);
+ });
+ this._nodePageFetches[e] = i;
+ }
+ return this._nodePageFetches[e];
+};
+I3SLayer.prototype._computeExtent = function() {
+ defined(this._data.fullExtent) ? this._extent = Rectangle.fromDegrees(
+ this._data.fullExtent.xmin,
+ this._data.fullExtent.ymin,
+ this._data.fullExtent.xmax,
+ this._data.fullExtent.ymax
+ ) : defined(this._data.store.extent) && (this._extent = Rectangle.fromDegrees(
+ this._data.store.extent[0],
+ this._data.store.extent[1],
+ this._data.store.extent[2],
+ this._data.store.extent[3]
+ ));
+};
+I3SLayer.prototype._create3DTileset = async function(e) {
+ var o, s, c;
+ const t = {
+ asset: {
+ version: "1.0"
+ },
+ geometricError: Number.MAX_VALUE,
+ root: this._rootNode._create3DTileDefinition()
+ }, n = new Blob([JSON.stringify(t)], {
+ type: "application/json"
+ }), i = URL.createObjectURL(n), r = (c = (s = (o = this._symbology) == null ? void 0 : o.defaultSymbology) == null ? void 0 : s.edges) == null ? void 0 : c.color;
+ defined(r) && !defined(e == null ? void 0 : e.outlineColor) && (e = defined(e) ? clone$1(e) : {}, e.outlineColor = Color.fromCartesian4(
+ Cartesian4.fromArray(r)
+ )), this._tileset = await Cesium3DTileset.fromUrl(
+ i,
+ e
+ ), this._tileset.show = this._parent.show, this._tileset._isI3STileSet = !0, this._tileset.tileUnload.addEventListener(function(l) {
+ l._i3sNode._clearGeometryData(), URL.revokeObjectURL(l._contentResource._url), l._contentResource = l._i3sNode.resource;
+ }), this._tileset.tileVisible.addEventListener(function(l) {
+ defined(l._i3sNode) && l._i3sNode._loadChildren();
+ });
+};
+I3SLayer.prototype._updateVisibility = function() {
+ defined(this._tileset) && (this._tileset.show = this._parent.show);
+};
+I3SLayer.prototype.filterByAttributes = function(e) {
+ this._filters = defined(e) ? clone$1(e, !0) : [];
+ const t = this._rootNode;
+ return defined(t) ? t._filterFeatures() : Promise.resolve();
+};
+function I3SStatistics(e, t) {
+ this._dataProvider = e, this._resource = new Resource({ url: t }), this._resource.setQueryParameters(e.resource.queryParameters), this._resource.appendForwardSlash();
+}
+Object.defineProperties(I3SStatistics.prototype, {
+ /**
+ * Gets the resource for the statistics
+ * @memberof I3SStatistics.prototype
+ * @type {Resource}
+ * @readonly
+ */
+ resource: {
+ get: function() {
+ return this._resource;
+ }
+ },
+ /**
+ * Gets the I3S data for this object.
+ * @memberof I3SStatistics.prototype
+ * @type {object}
+ * @readonly
+ */
+ data: {
+ get: function() {
+ return this._data;
+ }
+ },
+ /**
+ * Gets the collection of attribute names.
+ * @memberof I3SStatistics.prototype
+ * @type {string[]}
+ * @readonly
+ */
+ names: {
+ get: function() {
+ const e = [], t = this._data.summary;
+ if (defined(t))
+ for (let n = 0; n < t.length; ++n)
+ e.push(t[n].fieldName);
+ return e;
+ }
+ }
+});
+I3SStatistics.prototype.load = async function() {
+ return this._data = await I3SDataProvider.loadJson(this._resource), this._data;
+};
+I3SStatistics.prototype._getValues = function(e) {
+ const t = this._data.summary;
+ if (defined(t))
+ for (let n = 0; n < t.length; ++n) {
+ const i = t[n];
+ if (i.fieldName === e)
+ return defined(i.mostFrequentValues) ? [...i.mostFrequentValues] : [];
+ }
+};
+function I3SSublayer(e, t, n) {
+ this._dataProvider = e, this._parent = t, this._data = n, this._name = n.name, this._modelName = n.modelName, this._visibility = defaultValue(n.visibility, !0), this._resource = void 0, this._sublayers = [], this._i3sLayers = [];
+}
+Object.defineProperties(I3SSublayer.prototype, {
+ /**
+ * Gets the resource for the sublayer
+ * @memberof I3SSublayer.prototype
+ * @type {Resource}
+ * @readonly
+ */
+ resource: {
+ get: function() {
+ return this._resource;
+ }
+ },
+ /**
+ * Gets the I3S data for this object.
+ * @memberof I3SSublayer.prototype
+ * @type {object}
+ * @readonly
+ */
+ data: {
+ get: function() {
+ return this._data;
+ }
+ },
+ /**
+ * Gets the name for the sublayer.
+ * @memberof I3SSublayer.prototype
+ * @type {string}
+ * @readonly
+ */
+ name: {
+ get: function() {
+ return this._name;
+ }
+ },
+ /**
+ * Gets the model name for the sublayer.
+ * @memberof I3SSublayer.prototype
+ * @type {string}
+ * @readonly
+ */
+ modelName: {
+ get: function() {
+ return this._modelName;
+ }
+ },
+ /**
+ * Gets the collection of child sublayers.
+ * @memberof I3SSublayer.prototype
+ * @type {I3SSublayer[]}
+ * @readonly
+ */
+ sublayers: {
+ get: function() {
+ return this._sublayers;
+ }
+ },
+ /**
+ * Gets or sets the sublayer visibility.
+ * @memberof I3SSublayer.prototype
+ * @type {boolean}
+ */
+ visibility: {
+ get: function() {
+ return this._visibility;
+ },
+ set: function(e) {
+ if (this._visibility !== e) {
+ this._visibility = e;
+ for (let t = 0; t < this._i3sLayers.length; t++)
+ this._i3sLayers[t]._updateVisibility();
+ }
+ }
+ },
+ /**
+ * Determines if the sublayer will be shown.
+ * @memberof I3SSublayer.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ show: {
+ get: function() {
+ return this._visibility && this._parent.show;
+ }
+ }
+});
+I3SSublayer._fromData = async function(e, t, n, i) {
+ const r = new I3SSublayer(e, i, n);
+ if (r._data.layerType === "group") {
+ const o = r._data.sublayers;
+ if (defined(o)) {
+ const s = [];
+ for (let l = 0; l < o.length; l++) {
+ const d = I3SSublayer._fromData(
+ e,
+ t,
+ o[l],
+ r
+ );
+ s.push(d);
+ }
+ const c = await Promise.all(s);
+ for (let l = 0; l < c.length; l++) {
+ const d = c[l];
+ r._sublayers.push(d), r._i3sLayers.push(...d._i3sLayers);
+ }
+ }
+ } else if (r._data.layerType === "3DObject") {
+ const o = t.concat(
+ `/sublayers/${r._data.id}`
+ ), s = new Resource({ url: o });
+ s.setQueryParameters(e.resource.queryParameters), s.appendForwardSlash(), r._resource = s;
+ const c = await I3SDataProvider.loadJson(r._resource), l = new I3SLayer(e, c, r);
+ r._i3sLayers.push(l);
+ } else
+ console.log(
+ `${r._data.layerType} layer ${r._data.name} is skipped as not supported.`
+ );
+ return r;
+};
+var LercDecode = { exports: {} };
+(function(e) {
+ /* Copyright 2015-2018 Esri. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @preserve */
+ (function() {
+ var t = function() {
+ var o = {};
+ o.defaultNoDataValue = -34027999387901484e22, o.decode = function(h, p) {
+ p = p || {};
+ var m = p.encodedMaskData || p.encodedMaskData === null, _ = d(h, p.inputOffset || 0, m), y = p.noDataValue !== null ? p.noDataValue : o.defaultNoDataValue, C = s(
+ _,
+ p.pixelType || Float32Array,
+ p.encodedMaskData,
+ y,
+ p.returnMask
+ ), T = {
+ width: _.width,
+ height: _.height,
+ pixelData: C.resultPixels,
+ minValue: C.minValue,
+ maxValue: _.pixels.maxValue,
+ noDataValue: y
+ };
+ return C.resultMask && (T.maskData = C.resultMask), p.returnEncodedMask && _.mask && (T.encodedMaskData = _.mask.bitset ? _.mask.bitset : null), p.returnFileInfo && (T.fileInfo = c(_), p.computeUsedBitDepths && (T.fileInfo.bitDepths = l(_))), T;
+ };
+ var s = function(h, p, m, _, y) {
+ var C = 0, T = h.pixels.numBlocksX, x = h.pixels.numBlocksY, b = Math.floor(h.width / T), S = Math.floor(h.height / x), E = 2 * h.maxZError, A = Number.MAX_VALUE, D;
+ m = m || (h.mask ? h.mask.bitset : null);
+ var P, I;
+ P = new p(h.width * h.height), y && m && (I = new Uint8Array(h.width * h.height));
+ for (var M = new Float32Array(b * S), R, L, g = 0; g <= x; g++) {
+ var w = g !== x ? S : h.height % x;
+ if (w !== 0)
+ for (var O = 0; O <= T; O++) {
+ var N = O !== T ? b : h.width % T;
+ if (N !== 0) {
+ var F = g * h.width * S + O * b, B = h.width - N, V = h.pixels.blocks[C], U, k, $;
+ V.encoding < 2 ? (V.encoding === 0 ? U = V.rawData : (f(V.stuffedData, V.bitsPerPixel, V.numValidPixels, V.offset, E, M, h.pixels.maxValue), U = M), k = 0) : V.encoding === 2 ? $ = 0 : $ = V.offset;
+ var G;
+ if (m)
+ for (L = 0; L < w; L++) {
+ for (F & 7 && (G = m[F >> 3], G <<= F & 7), R = 0; R < N; R++)
+ F & 7 || (G = m[F >> 3]), G & 128 ? (I && (I[F] = 1), D = V.encoding < 2 ? U[k++] : $, A = A > D ? D : A, P[F++] = D) : (I && (I[F] = 0), P[F++] = _), G <<= 1;
+ F += B;
+ }
+ else if (V.encoding < 2)
+ for (L = 0; L < w; L++) {
+ for (R = 0; R < N; R++)
+ D = U[k++], A = A > D ? D : A, P[F++] = D;
+ F += B;
+ }
+ else
+ for (A = A > $ ? $ : A, L = 0; L < w; L++) {
+ for (R = 0; R < N; R++)
+ P[F++] = $;
+ F += B;
+ }
+ if (V.encoding === 1 && k !== V.numValidPixels)
+ throw "Block and Mask do not match";
+ C++;
+ }
+ }
+ }
+ return {
+ resultPixels: P,
+ resultMask: I,
+ minValue: A
+ };
+ }, c = function(h) {
+ return {
+ fileIdentifierString: h.fileIdentifierString,
+ fileVersion: h.fileVersion,
+ imageType: h.imageType,
+ height: h.height,
+ width: h.width,
+ maxZError: h.maxZError,
+ eofOffset: h.eofOffset,
+ mask: h.mask ? {
+ numBlocksX: h.mask.numBlocksX,
+ numBlocksY: h.mask.numBlocksY,
+ numBytes: h.mask.numBytes,
+ maxValue: h.mask.maxValue
+ } : null,
+ pixels: {
+ numBlocksX: h.pixels.numBlocksX,
+ numBlocksY: h.pixels.numBlocksY,
+ numBytes: h.pixels.numBytes,
+ maxValue: h.pixels.maxValue,
+ noDataValue: h.noDataValue
+ }
+ };
+ }, l = function(h) {
+ for (var p = h.pixels.numBlocksX * h.pixels.numBlocksY, m = {}, _ = 0; _ < p; _++) {
+ var y = h.pixels.blocks[_];
+ y.encoding === 0 ? m.float32 = !0 : y.encoding === 1 ? m[y.bitsPerPixel] = !0 : m[0] = !0;
+ }
+ return Object.keys(m);
+ }, d = function(h, p, m) {
+ var _ = {}, y = new Uint8Array(h, p, 10);
+ if (_.fileIdentifierString = String.fromCharCode.apply(null, y), _.fileIdentifierString.trim() !== "CntZImage")
+ throw "Unexpected file identifier string: " + _.fileIdentifierString;
+ p += 10;
+ var C = new DataView(h, p, 24);
+ if (_.fileVersion = C.getInt32(0, !0), _.imageType = C.getInt32(4, !0), _.height = C.getUint32(8, !0), _.width = C.getUint32(12, !0), _.maxZError = C.getFloat64(16, !0), p += 24, !m)
+ if (C = new DataView(h, p, 16), _.mask = {}, _.mask.numBlocksY = C.getUint32(0, !0), _.mask.numBlocksX = C.getUint32(4, !0), _.mask.numBytes = C.getUint32(8, !0), _.mask.maxValue = C.getFloat32(12, !0), p += 16, _.mask.numBytes > 0) {
+ var T = new Uint8Array(Math.ceil(_.width * _.height / 8));
+ C = new DataView(h, p, _.mask.numBytes);
+ var x = C.getInt16(0, !0), b = 2, S = 0;
+ do {
+ if (x > 0)
+ for (; x--; )
+ T[S++] = C.getUint8(b++);
+ else {
+ var E = C.getUint8(b++);
+ for (x = -x; x--; )
+ T[S++] = E;
+ }
+ x = C.getInt16(b, !0), b += 2;
+ } while (b < _.mask.numBytes);
+ if (x !== -32768 || S < T.length)
+ throw "Unexpected end of mask RLE encoding";
+ _.mask.bitset = T, p += _.mask.numBytes;
+ } else _.mask.numBytes | _.mask.numBlocksY | _.mask.maxValue || (_.mask.bitset = new Uint8Array(Math.ceil(_.width * _.height / 8)));
+ C = new DataView(h, p, 16), _.pixels = {}, _.pixels.numBlocksY = C.getUint32(0, !0), _.pixels.numBlocksX = C.getUint32(4, !0), _.pixels.numBytes = C.getUint32(8, !0), _.pixels.maxValue = C.getFloat32(12, !0), p += 16;
+ var A = _.pixels.numBlocksX, D = _.pixels.numBlocksY, P = A + (_.width % A > 0 ? 1 : 0), I = D + (_.height % D > 0 ? 1 : 0);
+ _.pixels.blocks = new Array(P * I);
+ for (var M = 0, R = 0; R < I; R++)
+ for (var L = 0; L < P; L++) {
+ var g = 0, w = h.byteLength - p;
+ C = new DataView(h, p, Math.min(10, w));
+ var O = {};
+ _.pixels.blocks[M++] = O;
+ var N = C.getUint8(0);
+ if (g++, O.encoding = N & 63, O.encoding > 3)
+ throw "Invalid block encoding (" + O.encoding + ")";
+ if (O.encoding === 2) {
+ p++;
+ continue;
+ }
+ if (N !== 0 && N !== 2) {
+ if (N >>= 6, O.offsetType = N, N === 2)
+ O.offset = C.getInt8(1), g++;
+ else if (N === 1)
+ O.offset = C.getInt16(1, !0), g += 2;
+ else if (N === 0)
+ O.offset = C.getFloat32(1, !0), g += 4;
+ else
+ throw "Invalid block offset type";
+ if (O.encoding === 1)
+ if (N = C.getUint8(g), g++, O.bitsPerPixel = N & 63, N >>= 6, O.numValidPixelsType = N, N === 2)
+ O.numValidPixels = C.getUint8(g), g++;
+ else if (N === 1)
+ O.numValidPixels = C.getUint16(g, !0), g += 2;
+ else if (N === 0)
+ O.numValidPixels = C.getUint32(g, !0), g += 4;
+ else
+ throw "Invalid valid pixel count type";
+ }
+ if (p += g, O.encoding !== 3) {
+ var F, B;
+ if (O.encoding === 0) {
+ var V = (_.pixels.numBytes - 1) / 4;
+ if (V !== Math.floor(V))
+ throw "uncompressed block has invalid length";
+ F = new ArrayBuffer(V * 4), B = new Uint8Array(F), B.set(new Uint8Array(h, p, V * 4));
+ var U = new Float32Array(F);
+ O.rawData = U, p += V * 4;
+ } else if (O.encoding === 1) {
+ var k = Math.ceil(O.numValidPixels * O.bitsPerPixel / 8), $ = Math.ceil(k / 4);
+ F = new ArrayBuffer($ * 4), B = new Uint8Array(F), B.set(new Uint8Array(h, p, k)), O.stuffedData = new Uint32Array(F), p += k;
+ }
+ }
+ }
+ return _.eofOffset = p, _;
+ }, f = function(h, p, m, _, y, C, T) {
+ var x = (1 << p) - 1, b = 0, S, E = 0, A, D, P = Math.ceil((T - _) / y), I = h.length * 4 - Math.ceil(p * m / 8);
+ for (h[h.length - 1] <<= 8 * I, S = 0; S < m; S++) {
+ if (E === 0 && (D = h[b++], E = 32), E >= p)
+ A = D >>> E - p & x, E -= p;
+ else {
+ var M = p - E;
+ A = (D & x) << M & x, D = h[b++], E = 32 - M, A += D >>> E;
+ }
+ C[S] = A < P ? _ + A * y : T;
+ }
+ return C;
+ };
+ return o;
+ }(), n = /* @__PURE__ */ function() {
+ var o = {
+ //methods ending with 2 are for the new byte order used by Lerc2.3 and above.
+ //originalUnstuff is used to unpack Huffman code table. code is duplicated to unstuffx for performance reasons.
+ unstuff: function(d, f, h, p, m, _, y, C) {
+ var T = (1 << h) - 1, x = 0, b, S = 0, E, A, D, P, I = d.length * 4 - Math.ceil(h * p / 8);
+ if (d[d.length - 1] <<= 8 * I, m)
+ for (b = 0; b < p; b++)
+ S === 0 && (A = d[x++], S = 32), S >= h ? (E = A >>> S - h & T, S -= h) : (D = h - S, E = (A & T) << D & T, A = d[x++], S = 32 - D, E += A >>> S), f[b] = m[E];
+ else
+ for (P = Math.ceil((C - _) / y), b = 0; b < p; b++)
+ S === 0 && (A = d[x++], S = 32), S >= h ? (E = A >>> S - h & T, S -= h) : (D = h - S, E = (A & T) << D & T, A = d[x++], S = 32 - D, E += A >>> S), f[b] = E < P ? _ + E * y : C;
+ },
+ unstuffLUT: function(d, f, h, p, m, _) {
+ var y = (1 << f) - 1, C = 0, T = 0, x = 0, b = 0, S = 0, E, A = [], D = d.length * 4 - Math.ceil(f * h / 8);
+ d[d.length - 1] <<= 8 * D;
+ var P = Math.ceil((_ - p) / m);
+ for (T = 0; T < h; T++)
+ b === 0 && (E = d[C++], b = 32), b >= f ? (S = E >>> b - f & y, b -= f) : (x = f - b, S = (E & y) << x & y, E = d[C++], b = 32 - x, S += E >>> b), A[T] = S < P ? p + S * m : _;
+ return A.unshift(p), A;
+ },
+ unstuff2: function(d, f, h, p, m, _, y, C) {
+ var T = (1 << h) - 1, x = 0, b, S = 0, E = 0, A, D, P;
+ if (m)
+ for (b = 0; b < p; b++)
+ S === 0 && (D = d[x++], S = 32, E = 0), S >= h ? (A = D >>> E & T, S -= h, E += h) : (P = h - S, A = D >>> E & T, D = d[x++], S = 32 - P, A |= (D & (1 << P) - 1) << h - P, E = P), f[b] = m[A];
+ else {
+ var I = Math.ceil((C - _) / y);
+ for (b = 0; b < p; b++)
+ S === 0 && (D = d[x++], S = 32, E = 0), S >= h ? (A = D >>> E & T, S -= h, E += h) : (P = h - S, A = D >>> E & T, D = d[x++], S = 32 - P, A |= (D & (1 << P) - 1) << h - P, E = P), f[b] = A < I ? _ + A * y : C;
+ }
+ return f;
+ },
+ unstuffLUT2: function(d, f, h, p, m, _) {
+ var y = (1 << f) - 1, C = 0, T = 0, x = 0, b = 0, S = 0, E = 0, A, D = [], P = Math.ceil((_ - p) / m);
+ for (T = 0; T < h; T++)
+ b === 0 && (A = d[C++], b = 32, E = 0), b >= f ? (S = A >>> E & y, b -= f, E += f) : (x = f - b, S = A >>> E & y, A = d[C++], b = 32 - x, S |= (A & (1 << x) - 1) << f - x, E = x), D[T] = S < P ? p + S * m : _;
+ return D.unshift(p), D;
+ },
+ originalUnstuff: function(d, f, h, p) {
+ var m = (1 << h) - 1, _ = 0, y, C = 0, T, x, b, S = d.length * 4 - Math.ceil(h * p / 8);
+ for (d[d.length - 1] <<= 8 * S, y = 0; y < p; y++)
+ C === 0 && (x = d[_++], C = 32), C >= h ? (T = x >>> C - h & m, C -= h) : (b = h - C, T = (x & m) << b & m, x = d[_++], C = 32 - b, T += x >>> C), f[y] = T;
+ return f;
+ },
+ originalUnstuff2: function(d, f, h, p) {
+ var m = (1 << h) - 1, _ = 0, y, C = 0, T = 0, x, b, S;
+ for (y = 0; y < p; y++)
+ C === 0 && (b = d[_++], C = 32, T = 0), C >= h ? (x = b >>> T & m, C -= h, T += h) : (S = h - C, x = b >>> T & m, b = d[_++], C = 32 - S, x |= (b & (1 << S) - 1) << h - S, T = S), f[y] = x;
+ return f;
+ }
+ }, s = {
+ HUFFMAN_LUT_BITS_MAX: 12,
+ //use 2^12 lut, treat it like constant
+ computeChecksumFletcher32: function(d) {
+ for (var f = 65535, h = 65535, p = d.length, m = Math.floor(p / 2), _ = 0; m; ) {
+ var y = m >= 359 ? 359 : m;
+ m -= y;
+ do
+ f += d[_++] << 8, h += f += d[_++];
+ while (--y);
+ f = (f & 65535) + (f >>> 16), h = (h & 65535) + (h >>> 16);
+ }
+ return p & 1 && (h += f += d[_] << 8), f = (f & 65535) + (f >>> 16), h = (h & 65535) + (h >>> 16), (h << 16 | f) >>> 0;
+ },
+ readHeaderInfo: function(d, f) {
+ var h = f.ptr, p = new Uint8Array(d, h, 6), m = {};
+ if (m.fileIdentifierString = String.fromCharCode.apply(null, p), m.fileIdentifierString.lastIndexOf("Lerc2", 0) !== 0)
+ throw "Unexpected file identifier string (expect Lerc2 ): " + m.fileIdentifierString;
+ h += 6;
+ var _ = new DataView(d, h, 8), y = _.getInt32(0, !0);
+ m.fileVersion = y, h += 4, y >= 3 && (m.checksum = _.getUint32(4, !0), h += 4), _ = new DataView(d, h, 12), m.height = _.getUint32(0, !0), m.width = _.getUint32(4, !0), h += 8, y >= 4 ? (m.numDims = _.getUint32(8, !0), h += 4) : m.numDims = 1, _ = new DataView(d, h, 40), m.numValidPixel = _.getUint32(0, !0), m.microBlockSize = _.getInt32(4, !0), m.blobSize = _.getInt32(8, !0), m.imageType = _.getInt32(12, !0), m.maxZError = _.getFloat64(16, !0), m.zMin = _.getFloat64(24, !0), m.zMax = _.getFloat64(32, !0), h += 40, f.headerInfo = m, f.ptr = h;
+ var C, T;
+ if (y >= 3 && (T = y >= 4 ? 52 : 48, C = this.computeChecksumFletcher32(new Uint8Array(d, h - T, m.blobSize - 14)), C !== m.checksum))
+ throw "Checksum failed.";
+ return !0;
+ },
+ checkMinMaxRanges: function(d, f) {
+ var h = f.headerInfo, p = this.getDataTypeArray(h.imageType), m = h.numDims * this.getDataTypeSize(h.imageType), _ = this.readSubArray(d, f.ptr, p, m), y = this.readSubArray(d, f.ptr + m, p, m);
+ f.ptr += 2 * m;
+ var C, T = !0;
+ for (C = 0; C < h.numDims; C++)
+ if (_[C] !== y[C]) {
+ T = !1;
+ break;
+ }
+ return h.minValues = _, h.maxValues = y, T;
+ },
+ readSubArray: function(d, f, h, p) {
+ var m;
+ if (h === Uint8Array)
+ m = new Uint8Array(d, f, p);
+ else {
+ var _ = new ArrayBuffer(p), y = new Uint8Array(_);
+ y.set(new Uint8Array(d, f, p)), m = new h(_);
+ }
+ return m;
+ },
+ readMask: function(d, f) {
+ var h = f.ptr, p = f.headerInfo, m = p.width * p.height, _ = p.numValidPixel, y = new DataView(d, h, 4), C = {};
+ if (C.numBytes = y.getUint32(0, !0), h += 4, (_ === 0 || m === _) && C.numBytes !== 0)
+ throw "invalid mask";
+ var T, x;
+ if (_ === 0)
+ T = new Uint8Array(Math.ceil(m / 8)), C.bitset = T, x = new Uint8Array(m), f.pixels.resultMask = x, h += C.numBytes;
+ else if (C.numBytes > 0) {
+ T = new Uint8Array(Math.ceil(m / 8)), y = new DataView(d, h, C.numBytes);
+ var b = y.getInt16(0, !0), S = 2, E = 0, A = 0;
+ do {
+ if (b > 0)
+ for (; b--; )
+ T[E++] = y.getUint8(S++);
+ else
+ for (A = y.getUint8(S++), b = -b; b--; )
+ T[E++] = A;
+ b = y.getInt16(S, !0), S += 2;
+ } while (S < C.numBytes);
+ if (b !== -32768 || E < T.length)
+ throw "Unexpected end of mask RLE encoding";
+ x = new Uint8Array(m);
+ var D = 0, P = 0;
+ for (P = 0; P < m; P++)
+ P & 7 ? (D = T[P >> 3], D <<= P & 7) : D = T[P >> 3], D & 128 && (x[P] = 1);
+ f.pixels.resultMask = x, C.bitset = T, h += C.numBytes;
+ }
+ return f.ptr = h, f.mask = C, !0;
+ },
+ readDataOneSweep: function(d, f, h) {
+ var p = f.ptr, m = f.headerInfo, _ = m.numDims, y = m.width * m.height, C = m.imageType, T = m.numValidPixel * s.getDataTypeSize(C) * _, x, b = f.pixels.resultMask;
+ if (h === Uint8Array)
+ x = new Uint8Array(d, p, T);
+ else {
+ var S = new ArrayBuffer(T), E = new Uint8Array(S);
+ E.set(new Uint8Array(d, p, T)), x = new h(S);
+ }
+ if (x.length === y * _)
+ f.pixels.resultPixels = x;
+ else {
+ f.pixels.resultPixels = new h(y * _);
+ var A = 0, D = 0, P = 0, I = 0;
+ if (_ > 1)
+ for (P = 0; P < _; P++)
+ for (I = P * y, D = 0; D < y; D++)
+ b[D] && (f.pixels.resultPixels[I + D] = x[A++]);
+ else
+ for (D = 0; D < y; D++)
+ b[D] && (f.pixels.resultPixels[D] = x[A++]);
+ }
+ return p += T, f.ptr = p, !0;
+ },
+ readHuffmanTree: function(d, f) {
+ var h = this.HUFFMAN_LUT_BITS_MAX, p = new DataView(d, f.ptr, 16);
+ f.ptr += 16;
+ var m = p.getInt32(0, !0);
+ if (m < 2)
+ throw "unsupported Huffman version";
+ var _ = p.getInt32(4, !0), y = p.getInt32(8, !0), C = p.getInt32(12, !0);
+ if (y >= C)
+ return !1;
+ var T = new Uint32Array(C - y);
+ s.decodeBits(d, f, T);
+ var x = [], b, S, E, A;
+ for (b = y; b < C; b++)
+ S = b - (b < _ ? 0 : _), x[S] = { first: T[b - y], second: null };
+ var D = d.byteLength - f.ptr, P = Math.ceil(D / 4), I = new ArrayBuffer(P * 4), M = new Uint8Array(I);
+ M.set(new Uint8Array(d, f.ptr, D));
+ var R = new Uint32Array(I), L = 0, g, w = 0;
+ for (g = R[0], b = y; b < C; b++)
+ S = b - (b < _ ? 0 : _), A = x[S].first, A > 0 && (x[S].second = g << L >>> 32 - A, 32 - L >= A ? (L += A, L === 32 && (L = 0, w++, g = R[w])) : (L += A - 32, w++, g = R[w], x[S].second |= g >>> 32 - L));
+ var O = 0, N = 0, F = new c();
+ for (b = 0; b < x.length; b++)
+ x[b] !== void 0 && (O = Math.max(O, x[b].first));
+ O >= h ? N = h : N = O, O >= 30 && console.log("WARning, large NUM LUT BITS IS " + O);
+ var B = [], V, U, k, $, G, q;
+ for (b = y; b < C; b++)
+ if (S = b - (b < _ ? 0 : _), A = x[S].first, A > 0)
+ if (V = [A, S], A <= N)
+ for (U = x[S].second << N - A, k = 1 << N - A, E = 0; E < k; E++)
+ B[U | E] = V;
+ else
+ for (U = x[S].second, q = F, $ = A - 1; $ >= 0; $--)
+ G = U >>> $ & 1, G ? (q.right || (q.right = new c()), q = q.right) : (q.left || (q.left = new c()), q = q.left), $ === 0 && !q.val && (q.val = V[1]);
+ return {
+ decodeLut: B,
+ numBitsLUTQick: N,
+ numBitsLUT: O,
+ tree: F,
+ stuffedData: R,
+ srcPtr: w,
+ bitPos: L
+ };
+ },
+ readHuffman: function(d, f, h) {
+ var p = f.headerInfo, m = p.numDims, _ = f.headerInfo.height, y = f.headerInfo.width, C = y * _, T = this.readHuffmanTree(d, f), x = T.decodeLut, b = T.tree, S = T.stuffedData, E = T.srcPtr, A = T.bitPos, D = T.numBitsLUTQick, P = T.numBitsLUT, I = f.headerInfo.imageType === 0 ? 128 : 0, M, R, L, g = f.pixels.resultMask, w, O, N, F, B, V, U, k = 0;
+ A > 0 && (E++, A = 0);
+ var $ = S[E], G = f.encodeMode === 1, q = new h(C * m), z = q, H;
+ for (H = 0; H < p.numDims; H++) {
+ if (m > 1 && (z = new h(q.buffer, C * H, C), k = 0), f.headerInfo.numValidPixel === y * _)
+ for (V = 0, F = 0; F < _; F++)
+ for (B = 0; B < y; B++, V++) {
+ if (R = 0, w = $ << A >>> 32 - D, O = w, 32 - A < D && (w |= S[E + 1] >>> 64 - A - D, O = w), x[O])
+ R = x[O][1], A += x[O][0];
+ else
+ for (w = $ << A >>> 32 - P, O = w, 32 - A < P && (w |= S[E + 1] >>> 64 - A - P, O = w), M = b, U = 0; U < P; U++)
+ if (N = w >>> P - U - 1 & 1, M = N ? M.right : M.left, !(M.left || M.right)) {
+ R = M.val, A = A + U + 1;
+ break;
+ }
+ A >= 32 && (A -= 32, E++, $ = S[E]), L = R - I, G ? (B > 0 ? L += k : F > 0 ? L += z[V - y] : L += k, L &= 255, z[V] = L, k = L) : z[V] = L;
+ }
+ else
+ for (V = 0, F = 0; F < _; F++)
+ for (B = 0; B < y; B++, V++)
+ if (g[V]) {
+ if (R = 0, w = $ << A >>> 32 - D, O = w, 32 - A < D && (w |= S[E + 1] >>> 64 - A - D, O = w), x[O])
+ R = x[O][1], A += x[O][0];
+ else
+ for (w = $ << A >>> 32 - P, O = w, 32 - A < P && (w |= S[E + 1] >>> 64 - A - P, O = w), M = b, U = 0; U < P; U++)
+ if (N = w >>> P - U - 1 & 1, M = N ? M.right : M.left, !(M.left || M.right)) {
+ R = M.val, A = A + U + 1;
+ break;
+ }
+ A >= 32 && (A -= 32, E++, $ = S[E]), L = R - I, G ? (B > 0 && g[V - 1] ? L += k : F > 0 && g[V - y] ? L += z[V - y] : L += k, L &= 255, z[V] = L, k = L) : z[V] = L;
+ }
+ f.ptr = f.ptr + (E + 1) * 4 + (A > 0 ? 4 : 0);
+ }
+ f.pixels.resultPixels = q;
+ },
+ decodeBits: function(d, f, h, p, m) {
+ {
+ var _ = f.headerInfo, y = _.fileVersion, C = 0, T = new DataView(d, f.ptr, 5), x = T.getUint8(0);
+ C++;
+ var b = x >> 6, S = b === 0 ? 4 : 3 - b, E = (x & 32) > 0, A = x & 31, D = 0;
+ if (S === 1)
+ D = T.getUint8(C), C++;
+ else if (S === 2)
+ D = T.getUint16(C, !0), C += 2;
+ else if (S === 4)
+ D = T.getUint32(C, !0), C += 4;
+ else
+ throw "Invalid valid pixel count type";
+ var P = 2 * _.maxZError, I, M, R, L, g, w, O, N, F, B = _.numDims > 1 ? _.maxValues[m] : _.zMax;
+ if (E) {
+ for (f.counter.lut++, N = T.getUint8(C), C++, L = Math.ceil((N - 1) * A / 8), g = Math.ceil(L / 4), M = new ArrayBuffer(g * 4), R = new Uint8Array(M), f.ptr += C, R.set(new Uint8Array(d, f.ptr, L)), O = new Uint32Array(M), f.ptr += L, F = 0; N - 1 >>> F; )
+ F++;
+ L = Math.ceil(D * F / 8), g = Math.ceil(L / 4), M = new ArrayBuffer(g * 4), R = new Uint8Array(M), R.set(new Uint8Array(d, f.ptr, L)), I = new Uint32Array(M), f.ptr += L, y >= 3 ? w = o.unstuffLUT2(O, A, N - 1, p, P, B) : w = o.unstuffLUT(O, A, N - 1, p, P, B), y >= 3 ? o.unstuff2(I, h, F, D, w) : o.unstuff(I, h, F, D, w);
+ } else
+ f.counter.bitstuffer++, F = A, f.ptr += C, F > 0 && (L = Math.ceil(D * F / 8), g = Math.ceil(L / 4), M = new ArrayBuffer(g * 4), R = new Uint8Array(M), R.set(new Uint8Array(d, f.ptr, L)), I = new Uint32Array(M), f.ptr += L, y >= 3 ? p == null ? o.originalUnstuff2(I, h, F, D) : o.unstuff2(I, h, F, D, !1, p, P, B) : p == null ? o.originalUnstuff(I, h, F, D) : o.unstuff(I, h, F, D, !1, p, P, B));
+ }
+ },
+ readTiles: function(d, f, h) {
+ var p = f.headerInfo, m = p.width, _ = p.height, y = p.microBlockSize, C = p.imageType, T = s.getDataTypeSize(C), x = Math.ceil(m / y), b = Math.ceil(_ / y);
+ f.pixels.numBlocksY = b, f.pixels.numBlocksX = x, f.pixels.ptr = 0;
+ var S = 0, E = 0, A = 0, D = 0, P = 0, I = 0, M = 0, R = 0, L = 0, g = 0, w = 0, O = 0, N = 0, F = 0, B = 0, V = 0, U, k, $, G, q, z, H = new h(y * y), Q = _ % y || y, ne = m % y || y, K, Z, ee = p.numDims, oe, X = f.pixels.resultMask, fe = f.pixels.resultPixels;
+ for (A = 0; A < b; A++)
+ for (P = A !== b - 1 ? y : Q, D = 0; D < x; D++)
+ for (I = D !== x - 1 ? y : ne, w = A * m * y + D * y, O = m - I, oe = 0; oe < ee; oe++) {
+ if (ee > 1 && (fe = new h(f.pixels.resultPixels.buffer, m * _ * oe * T, m * _)), M = d.byteLength - f.ptr, U = new DataView(d, f.ptr, Math.min(10, M)), k = {}, V = 0, R = U.getUint8(0), V++, L = R >> 6 & 255, g = R >> 2 & 15, g !== (D * y >> 3 & 15))
+ throw "integrity issue";
+ if (z = R & 3, z > 3)
+ throw f.ptr += V, "Invalid block encoding (" + z + ")";
+ if (z === 2) {
+ f.counter.constant++, f.ptr += V;
+ continue;
+ } else if (z === 0) {
+ if (f.counter.uncompressed++, f.ptr += V, N = P * I * T, F = d.byteLength - f.ptr, N = N < F ? N : F, $ = new ArrayBuffer(N % T === 0 ? N : N + T - N % T), G = new Uint8Array($), G.set(new Uint8Array(d, f.ptr, N)), q = new h($), B = 0, X)
+ for (S = 0; S < P; S++) {
+ for (E = 0; E < I; E++)
+ X[w] && (fe[w] = q[B++]), w++;
+ w += O;
+ }
+ else
+ for (S = 0; S < P; S++) {
+ for (E = 0; E < I; E++)
+ fe[w++] = q[B++];
+ w += O;
+ }
+ f.ptr += B * T;
+ } else if (K = s.getDataTypeUsed(C, L), Z = s.getOnePixel(k, V, K, U), V += s.getDataTypeSize(K), z === 3)
+ if (f.ptr += V, f.counter.constantoffset++, X)
+ for (S = 0; S < P; S++) {
+ for (E = 0; E < I; E++)
+ X[w] && (fe[w] = Z), w++;
+ w += O;
+ }
+ else
+ for (S = 0; S < P; S++) {
+ for (E = 0; E < I; E++)
+ fe[w++] = Z;
+ w += O;
+ }
+ else if (f.ptr += V, s.decodeBits(d, f, H, Z, oe), V = 0, X)
+ for (S = 0; S < P; S++) {
+ for (E = 0; E < I; E++)
+ X[w] && (fe[w] = H[V++]), w++;
+ w += O;
+ }
+ else
+ for (S = 0; S < P; S++) {
+ for (E = 0; E < I; E++)
+ fe[w++] = H[V++];
+ w += O;
+ }
+ }
+ },
+ /*****************
+ * private methods (helper methods)
+ *****************/
+ formatFileInfo: function(d) {
+ return {
+ fileIdentifierString: d.headerInfo.fileIdentifierString,
+ fileVersion: d.headerInfo.fileVersion,
+ imageType: d.headerInfo.imageType,
+ height: d.headerInfo.height,
+ width: d.headerInfo.width,
+ numValidPixel: d.headerInfo.numValidPixel,
+ microBlockSize: d.headerInfo.microBlockSize,
+ blobSize: d.headerInfo.blobSize,
+ maxZError: d.headerInfo.maxZError,
+ pixelType: s.getPixelType(d.headerInfo.imageType),
+ eofOffset: d.eofOffset,
+ mask: d.mask ? {
+ numBytes: d.mask.numBytes
+ } : null,
+ pixels: {
+ numBlocksX: d.pixels.numBlocksX,
+ numBlocksY: d.pixels.numBlocksY,
+ //"numBytes": data.pixels.numBytes,
+ maxValue: d.headerInfo.zMax,
+ minValue: d.headerInfo.zMin,
+ noDataValue: d.noDataValue
+ }
+ };
+ },
+ constructConstantSurface: function(d) {
+ var f = d.headerInfo.zMax, h = d.headerInfo.numDims, p = d.headerInfo.height * d.headerInfo.width, m = p * h, _ = 0, y = 0, C = 0, T = d.pixels.resultMask;
+ if (T)
+ if (h > 1)
+ for (_ = 0; _ < h; _++)
+ for (C = _ * p, y = 0; y < p; y++)
+ T[y] && (d.pixels.resultPixels[C + y] = f);
+ else
+ for (y = 0; y < p; y++)
+ T[y] && (d.pixels.resultPixels[y] = f);
+ else if (d.pixels.resultPixels.fill)
+ d.pixels.resultPixels.fill(f);
+ else
+ for (y = 0; y < m; y++)
+ d.pixels.resultPixels[y] = f;
+ },
+ getDataTypeArray: function(d) {
+ var f;
+ switch (d) {
+ case 0:
+ f = Int8Array;
+ break;
+ case 1:
+ f = Uint8Array;
+ break;
+ case 2:
+ f = Int16Array;
+ break;
+ case 3:
+ f = Uint16Array;
+ break;
+ case 4:
+ f = Int32Array;
+ break;
+ case 5:
+ f = Uint32Array;
+ break;
+ case 6:
+ f = Float32Array;
+ break;
+ case 7:
+ f = Float64Array;
+ break;
+ default:
+ f = Float32Array;
+ }
+ return f;
+ },
+ getPixelType: function(d) {
+ var f;
+ switch (d) {
+ case 0:
+ f = "S8";
+ break;
+ case 1:
+ f = "U8";
+ break;
+ case 2:
+ f = "S16";
+ break;
+ case 3:
+ f = "U16";
+ break;
+ case 4:
+ f = "S32";
+ break;
+ case 5:
+ f = "U32";
+ break;
+ case 6:
+ f = "F32";
+ break;
+ case 7:
+ f = "F64";
+ break;
+ default:
+ f = "F32";
+ }
+ return f;
+ },
+ isValidPixelValue: function(d, f) {
+ if (f == null)
+ return !1;
+ var h;
+ switch (d) {
+ case 0:
+ h = f >= -128 && f <= 127;
+ break;
+ case 1:
+ h = f >= 0 && f <= 255;
+ break;
+ case 2:
+ h = f >= -32768 && f <= 32767;
+ break;
+ case 3:
+ h = f >= 0 && f <= 65536;
+ break;
+ case 4:
+ h = f >= -2147483648 && f <= 2147483647;
+ break;
+ case 5:
+ h = f >= 0 && f <= 4294967296;
+ break;
+ case 6:
+ h = f >= -34027999387901484e22 && f <= 34027999387901484e22;
+ break;
+ case 7:
+ h = f >= 5e-324 && f <= 17976931348623157e292;
+ break;
+ default:
+ h = !1;
+ }
+ return h;
+ },
+ getDataTypeSize: function(d) {
+ var f = 0;
+ switch (d) {
+ case 0:
+ case 1:
+ f = 1;
+ break;
+ case 2:
+ case 3:
+ f = 2;
+ break;
+ case 4:
+ case 5:
+ case 6:
+ f = 4;
+ break;
+ case 7:
+ f = 8;
+ break;
+ default:
+ f = d;
+ }
+ return f;
+ },
+ getDataTypeUsed: function(d, f) {
+ var h = d;
+ switch (d) {
+ case 2:
+ case 4:
+ h = d - f;
+ break;
+ case 3:
+ case 5:
+ h = d - 2 * f;
+ break;
+ case 6:
+ f === 0 ? h = d : f === 1 ? h = 2 : h = 1;
+ break;
+ case 7:
+ f === 0 ? h = d : h = d - 2 * f + 1;
+ break;
+ default:
+ h = d;
+ break;
+ }
+ return h;
+ },
+ getOnePixel: function(d, f, h, p) {
+ var m = 0;
+ switch (h) {
+ case 0:
+ m = p.getInt8(f);
+ break;
+ case 1:
+ m = p.getUint8(f);
+ break;
+ case 2:
+ m = p.getInt16(f, !0);
+ break;
+ case 3:
+ m = p.getUint16(f, !0);
+ break;
+ case 4:
+ m = p.getInt32(f, !0);
+ break;
+ case 5:
+ m = p.getUInt32(f, !0);
+ break;
+ case 6:
+ m = p.getFloat32(f, !0);
+ break;
+ case 7:
+ m = p.getFloat64(f, !0);
+ break;
+ default:
+ throw "the decoder does not understand this pixel type";
+ }
+ return m;
+ }
+ }, c = function(d, f, h) {
+ this.val = d, this.left = f, this.right = h;
+ }, l = {
+ /*
+ * ********removed options compared to LERC1. We can bring some of them back if needed.
+ * removed pixel type. LERC2 is typed and doesn't require user to give pixel type
+ * changed encodedMaskData to maskData. LERC2 's js version make it faster to use maskData directly.
+ * removed returnMask. mask is used by LERC2 internally and is cost free. In case of user input mask, it's returned as well and has neglible cost.
+ * removed nodatavalue. Because LERC2 pixels are typed, nodatavalue will sacrify a useful value for many types (8bit, 16bit) etc,
+ * user has to be knowledgable enough about raster and their data to avoid usability issues. so nodata value is simply removed now.
+ * We can add it back later if their's a clear requirement.
+ * removed encodedMask. This option was not implemented in LercDecode. It can be done after decoding (less efficient)
+ * removed computeUsedBitDepths.
+ *
+ *
+ * response changes compared to LERC1
+ * 1. encodedMaskData is not available
+ * 2. noDataValue is optional (returns only if user's noDataValue is with in the valid data type range)
+ * 3. maskData is always available
+ */
+ /*****************
+ * public properties
+ ******************/
+ //HUFFMAN_LUT_BITS_MAX: 12, //use 2^12 lut, not configurable
+ /*****************
+ * public methods
+ *****************/
+ /**
+ * Decode a LERC2 byte stream and return an object containing the pixel data and optional metadata.
+ *
+ * @param {ArrayBuffer} input The LERC input byte stream
+ * @param {object} [options] options Decoding options
+ * @param {number} [options.inputOffset] The number of bytes to skip in the input byte stream. A valid LERC file is expected at that position
+ * @param {boolean} [options.returnFileInfo] If true, the return value will have a fileInfo property that contains metadata obtained from the LERC headers and the decoding process
+ */
+ decode: function(d, f) {
+ f = f || {};
+ var h = f.noDataValue, p = 0, m = {};
+ if (m.ptr = f.inputOffset || 0, m.pixels = {}, !!s.readHeaderInfo(d, m)) {
+ var _ = m.headerInfo, y = _.fileVersion, C = s.getDataTypeArray(_.imageType);
+ s.readMask(d, m), _.numValidPixel !== _.width * _.height && !m.pixels.resultMask && (m.pixels.resultMask = f.maskData);
+ var T = _.width * _.height;
+ if (m.pixels.resultPixels = new C(T * _.numDims), m.counter = {
+ onesweep: 0,
+ uncompressed: 0,
+ lut: 0,
+ bitstuffer: 0,
+ constant: 0,
+ constantoffset: 0
+ }, _.numValidPixel !== 0)
+ if (_.zMax === _.zMin)
+ s.constructConstantSurface(m);
+ else if (y >= 4 && s.checkMinMaxRanges(d, m))
+ s.constructConstantSurface(m);
+ else {
+ var x = new DataView(d, m.ptr, 2), b = x.getUint8(0);
+ if (m.ptr++, b)
+ s.readDataOneSweep(d, m, C);
+ else if (y > 1 && _.imageType <= 1 && Math.abs(_.maxZError - 0.5) < 1e-5) {
+ var S = x.getUint8(1);
+ if (m.ptr++, m.encodeMode = S, S > 2 || y < 4 && S > 1)
+ throw "Invalid Huffman flag " + S;
+ S ? s.readHuffman(d, m, C) : s.readTiles(d, m, C);
+ } else
+ s.readTiles(d, m, C);
+ }
+ m.eofOffset = m.ptr;
+ var E;
+ f.inputOffset ? (E = m.headerInfo.blobSize + f.inputOffset - m.ptr, Math.abs(E) >= 1 && (m.eofOffset = f.inputOffset + m.headerInfo.blobSize)) : (E = m.headerInfo.blobSize - m.ptr, Math.abs(E) >= 1 && (m.eofOffset = m.headerInfo.blobSize));
+ var A = {
+ width: _.width,
+ height: _.height,
+ pixelData: m.pixels.resultPixels,
+ minValue: _.zMin,
+ maxValue: _.zMax,
+ validPixelCount: _.numValidPixel,
+ dimCount: _.numDims,
+ dimStats: {
+ minValues: _.minValues,
+ maxValues: _.maxValues
+ },
+ maskData: m.pixels.resultMask
+ //noDataValue: noDataValue
+ };
+ if (m.pixels.resultMask && s.isValidPixelValue(_.imageType, h)) {
+ var D = m.pixels.resultMask;
+ for (p = 0; p < T; p++)
+ D[p] || (A.pixelData[p] = h);
+ A.noDataValue = h;
+ }
+ return m.noDataValue = h, f.returnFileInfo && (A.fileInfo = s.formatFileInfo(m)), A;
+ }
+ },
+ getBandCount: function(d) {
+ var f = 0, h = 0, p = {};
+ for (p.ptr = 0, p.pixels = {}; h < d.byteLength - 58; )
+ s.readHeaderInfo(d, p), h += p.headerInfo.blobSize, f++, p.ptr = h;
+ return f;
+ }
+ };
+ return l;
+ }(), i = function() {
+ var o = new ArrayBuffer(4), s = new Uint8Array(o), c = new Uint32Array(o);
+ return c[0] = 1, s[0] === 1;
+ }(), r = {
+ /************wrapper**********************************************/
+ /**
+ * A wrapper for decoding both LERC1 and LERC2 byte streams capable of handling multiband pixel blocks for various pixel types.
+ *
+ * @alias module:Lerc
+ * @param {ArrayBuffer} input The LERC input byte stream
+ * @param {object} [options] The decoding options below are optional.
+ * @param {number} [options.inputOffset] The number of bytes to skip in the input byte stream. A valid Lerc file is expected at that position.
+ * @param {string} [options.pixelType] (LERC1 only) Default value is F32. Valid pixel types for input are U8/S8/S16/U16/S32/U32/F32.
+ * @param {number} [options.noDataValue] (LERC1 only). It is recommended to use the returned mask instead of setting this value.
+ * @returns {{width, height, pixels, pixelType, mask, statistics}}
+ * @property {number} width Width of decoded image.
+ * @property {number} height Height of decoded image.
+ * @property {array} pixels [band1, band2, …] Each band is a typed array of width*height.
+ * @property {string} pixelType The type of pixels represented in the output.
+ * @property {mask} mask Typed array with a size of width*height, or null if all pixels are valid.
+ * @property {array} statistics [statistics_band1, statistics_band2, …] Each element is a statistics object representing min and max values
+ **/
+ decode: function(o, s) {
+ if (!i)
+ throw "Big endian system is not supported.";
+ s = s || {};
+ var c = s.inputOffset || 0, l = new Uint8Array(o, c, 10), d = String.fromCharCode.apply(null, l), f, h;
+ if (d.trim() === "CntZImage")
+ f = t, h = 1;
+ else if (d.substring(0, 5) === "Lerc2")
+ f = n, h = 2;
+ else
+ throw "Unexpected file identifier string: " + d;
+ for (var p = 0, m = o.byteLength - 10, _, y = [], C, T, x = {
+ width: 0,
+ height: 0,
+ pixels: [],
+ pixelType: s.pixelType,
+ mask: null,
+ statistics: []
+ }; c < m; ) {
+ var b = f.decode(o, {
+ inputOffset: c,
+ //for both lerc1 and lerc2
+ encodedMaskData: _,
+ //lerc1 only
+ maskData: T,
+ //lerc2 only
+ returnMask: p === 0,
+ //lerc1 only
+ returnEncodedMask: p === 0,
+ //lerc1 only
+ returnFileInfo: !0,
+ //for both lerc1 and lerc2
+ pixelType: s.pixelType || null,
+ //lerc1 only
+ noDataValue: s.noDataValue || null
+ //lerc1 only
+ });
+ c = b.fileInfo.eofOffset, p === 0 && (_ = b.encodedMaskData, T = b.maskData, x.width = b.width, x.height = b.height, x.dimCount = b.dimCount || 1, x.pixelType = b.pixelType || b.fileInfo.pixelType, x.mask = b.maskData), h > 1 && b.fileInfo.mask && b.fileInfo.mask.numBytes > 0 && y.push(b.maskData), p++, x.pixels.push(b.pixelData), x.statistics.push({
+ minValue: b.minValue,
+ maxValue: b.maxValue,
+ noDataValue: b.noDataValue,
+ dimStats: b.dimStats
+ });
+ }
+ var S, E, A;
+ if (h > 1 && y.length > 1) {
+ for (A = x.width * x.height, x.bandMasks = y, T = new Uint8Array(A), T.set(y[0]), S = 1; S < y.length; S++)
+ for (C = y[S], E = 0; E < A; E++)
+ T[E] = T[E] & C[E];
+ x.maskData = T;
+ }
+ return x;
+ }
+ };
+ e.exports ? e.exports = r : this.Lerc = r;
+ })();
+})(LercDecode);
+var LercDecodeExports = LercDecode.exports;
+const Lerc = /* @__PURE__ */ getDefaultExportFromCjs(LercDecodeExports);
+function I3SDataProvider(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this._name = e.name, this._show = defaultValue(e.show, !0), this._geoidTiledTerrainProvider = e.geoidTiledTerrainProvider, this._showFeatures = defaultValue(e.showFeatures, !1), this._adjustMaterialAlphaMode = defaultValue(
+ e.adjustMaterialAlphaMode,
+ !1
+ ), this._applySymbology = defaultValue(e.applySymbology, !1), this._calculateNormals = defaultValue(e.calculateNormals, !1), this._cesium3dTilesetOptions = defaultValue(
+ e.cesium3dTilesetOptions,
+ defaultValue.EMPTY_OBJECT
+ ), this._layers = [], this._sublayers = [], this._data = void 0, this._extent = void 0, this._geoidDataPromise = void 0, this._geoidDataList = void 0, this._decoderTaskProcessor = void 0, this._taskProcessorReadyPromise = void 0, this._attributeStatistics = [], this._layersExtent = [];
+}
+Object.defineProperties(I3SDataProvider.prototype, {
+ /**
+ * Gets a human-readable name for this dataset.
+ * @memberof I3SDataProvider.prototype
+ * @type {string}
+ * @readonly
+ */
+ name: {
+ get: function() {
+ return this._name;
+ }
+ },
+ /**
+ * Determines if the dataset will be shown.
+ * @memberof I3SDataProvider.prototype
+ * @type {boolean}
+ */
+ show: {
+ get: function() {
+ return this._show;
+ },
+ set: function(e) {
+ if (this._show !== e) {
+ this._show = e;
+ for (let t = 0; t < this._layers.length; t++)
+ this._layers[t]._updateVisibility();
+ }
+ }
+ },
+ /**
+ * The terrain provider referencing the GEOID service to be used for orthometric to ellipsoidal conversion.
+ * @memberof I3SDataProvider.prototype
+ * @type {ArcGISTiledElevationTerrainProvider}
+ * @readonly
+ */
+ geoidTiledTerrainProvider: {
+ get: function() {
+ return this._geoidTiledTerrainProvider;
+ }
+ },
+ /**
+ * Gets the collection of layers.
+ * @memberof I3SDataProvider.prototype
+ * @type {I3SLayer[]}
+ * @readonly
+ */
+ layers: {
+ get: function() {
+ return this._layers;
+ }
+ },
+ /**
+ * Gets the collection of building sublayers.
+ * @memberof I3SDataProvider.prototype
+ * @type {I3SSublayer[]}
+ * @readonly
+ */
+ sublayers: {
+ get: function() {
+ return this._sublayers;
+ }
+ },
+ /**
+ * Gets the I3S data for this object.
+ * @memberof I3SDataProvider.prototype
+ * @type {object}
+ * @readonly
+ */
+ data: {
+ get: function() {
+ return this._data;
+ }
+ },
+ /**
+ * Gets the extent covered by this I3S.
+ * @memberof I3SDataProvider.prototype
+ * @type {Rectangle}
+ * @readonly
+ */
+ extent: {
+ get: function() {
+ return this._extent;
+ }
+ },
+ /**
+ * The resource used to fetch the I3S dataset.
+ * @memberof I3SDataProvider.prototype
+ * @type {Resource}
+ * @readonly
+ */
+ resource: {
+ get: function() {
+ return this._resource;
+ }
+ },
+ /**
+ * Determines if the features will be shown.
+ * @memberof I3SDataProvider.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ showFeatures: {
+ get: function() {
+ return this._showFeatures;
+ }
+ },
+ /**
+ * Determines if the alpha mode of the material will be adjusted depending on the color vertex attribute.
+ * @memberof I3SDataProvider.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ adjustMaterialAlphaMode: {
+ get: function() {
+ return this._adjustMaterialAlphaMode;
+ }
+ },
+ /**
+ * Determines if the I3S symbology will be parsed and applied for the layers.
+ * @memberof I3SDataProvider.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ applySymbology: {
+ get: function() {
+ return this._applySymbology;
+ }
+ },
+ /**
+ * Determines if the flat normals will be generated for I3S geometry without normals.
+ * @memberof I3SDataProvider.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ calculateNormals: {
+ get: function() {
+ return this._calculateNormals;
+ }
+ }
+});
+I3SDataProvider.prototype.destroy = function() {
+ for (let e = 0; e < this._layers.length; e++)
+ defined(this._layers[e]._tileset) && this._layers[e]._tileset.destroy();
+ return destroyObject(this);
+};
+I3SDataProvider.prototype.isDestroyed = function() {
+ return !1;
+};
+I3SDataProvider.prototype.update = function(e) {
+ for (let t = 0; t < this._layers.length; t++)
+ defined(this._layers[t]._tileset) && this._layers[t]._tileset.update(e);
+};
+I3SDataProvider.prototype.prePassesUpdate = function(e) {
+ for (let t = 0; t < this._layers.length; t++)
+ defined(this._layers[t]._tileset) && this._layers[t]._tileset.prePassesUpdate(e);
+};
+I3SDataProvider.prototype.postPassesUpdate = function(e) {
+ for (let t = 0; t < this._layers.length; t++)
+ defined(this._layers[t]._tileset) && this._layers[t]._tileset.postPassesUpdate(e);
+};
+I3SDataProvider.prototype.updateForPass = function(e, t) {
+ for (let n = 0; n < this._layers.length; n++)
+ defined(this._layers[n]._tileset) && this._layers[n]._tileset.updateForPass(e, t);
+};
+function buildLayerUrl(e, t) {
+ const n = e.resource.getUrlComponent();
+ let i = "";
+ return n.match(/layers\/\d/) ? i = `${n}`.replace(/\/+$/, "") : i = `${n}`.replace(/\/?$/, "/").concat(`layers/${t}`), i;
+}
+async function addLayers(e, t, n) {
+ if (t.layerType === "Building") {
+ defined(n.showFeatures) || (e._showFeatures = !0), defined(n.adjustMaterialAlphaMode) || (e._adjustMaterialAlphaMode = !0), defined(n.applySymbology) || (e._applySymbology = !0), defined(n.calculateNormals) || (e._calculateNormals = !0);
+ const i = buildLayerUrl(e, t.id);
+ if (defined(t.sublayers)) {
+ const r = [];
+ for (let s = 0; s < t.sublayers.length; s++) {
+ const c = I3SSublayer._fromData(
+ e,
+ i,
+ t.sublayers[s],
+ e
+ );
+ r.push(c);
+ }
+ const o = await Promise.all(r);
+ for (let s = 0; s < o.length; s++) {
+ const c = o[s];
+ e._sublayers.push(c), e._layers.push(...c._i3sLayers);
+ }
+ }
+ if (defined(t.statisticsHRef)) {
+ const r = i.concat(`/${t.statisticsHRef}`), o = new I3SStatistics(e, r);
+ await o.load(), e._attributeStatistics.push(o);
+ }
+ if (defined(t.fullExtent)) {
+ const r = Rectangle.fromDegrees(
+ t.fullExtent.xmin,
+ t.fullExtent.ymin,
+ t.fullExtent.xmax,
+ t.fullExtent.ymax
+ );
+ e._layersExtent.push(r);
+ }
+ } else if (t.layerType === "3DObject" || t.layerType === "IntegratedMesh") {
+ !defined(n.calculateNormals) && !defined(t.textureSetDefinitions) && (e._calculateNormals = !0);
+ const i = new I3SLayer(e, t, e);
+ e._layers.push(i), defined(i._extent) && e._layersExtent.push(i._extent);
+ } else
+ console.log(
+ `${t.layerType} layer ${t.name} is skipped as not supported.`
+ );
+}
+I3SDataProvider.fromUrl = async function(e, t) {
+ t = defaultValue(t, defaultValue.EMPTY_OBJECT);
+ const n = Resource.createIfNeeded(e);
+ n.setQueryParameters({ f: "pjson" }, !0);
+ const i = await I3SDataProvider.loadJson(n), r = new I3SDataProvider(t);
+ if (r._resource = n, r._data = i, defined(i.layers)) {
+ const s = [];
+ for (let c = 0; c < i.layers.length; c++) {
+ const l = addLayers(r, i.layers[c], t);
+ s.push(l);
+ }
+ await Promise.all(s);
+ } else
+ await addLayers(r, i, t);
+ r._computeExtent();
+ const o = [];
+ for (let s = 0; s < r._layers.length; s++)
+ o.push(
+ r._layers[s].load(t.cesium3dTilesetOptions)
+ );
+ return await Promise.all(o), r;
+};
+I3SDataProvider._fetchJson = function(e) {
+ return e.fetchJson();
+};
+I3SDataProvider.loadJson = async function(e) {
+ const t = await I3SDataProvider._fetchJson(e);
+ if (defined(t.error)) {
+ if (console.error("Failed to fetch I3S ", e.url), defined(t.error.message) && console.error(t.error.message), defined(t.error.details))
+ for (let n = 0; n < t.error.details.length; n++)
+ console.log(t.error.details[n]);
+ throw new RuntimeError(t.error);
+ }
+ return t;
+};
+I3SDataProvider.prototype._loadBinary = async function(e) {
+ const t = await e.fetchArrayBuffer();
+ if (t.byteLength > 0 && new Uint8Array(t)[0] === 123 && new TextDecoder().decode(t).includes("404"))
+ throw new RuntimeError(`Failed to load binary: ${e.url}`);
+ return t;
+};
+I3SDataProvider.prototype._binarizeGltf = function(e) {
+ const n = new TextEncoder().encode(JSON.stringify(e)), i = new Uint8Array(n.byteLength + 20), r = {
+ magic: new Uint8Array(i.buffer, 0, 4),
+ version: new Uint32Array(i.buffer, 4, 1),
+ length: new Uint32Array(i.buffer, 8, 1),
+ chunkLength: new Uint32Array(i.buffer, 12, 1),
+ chunkType: new Uint32Array(i.buffer, 16, 1),
+ chunkData: new Uint8Array(
+ i.buffer,
+ 20,
+ n.byteLength
+ )
+ };
+ return r.magic[0] = 103, r.magic[1] = 108, r.magic[2] = 84, r.magic[3] = 70, r.version[0] = 2, r.length[0] = i.byteLength, r.chunkLength[0] = n.byteLength, r.chunkType[0] = 1313821514, r.chunkData.set(n), i;
+};
+const scratchCartesian2 = new Cartesian2();
+function getCoveredTiles(e, t) {
+ const n = e.tilingScheme, i = [], r = {}, o = e._lodCount, s = Cartographic.fromRadians(t.west, t.north), c = Cartographic.fromRadians(t.east, t.south), l = n.positionToTileXY(s, o), d = n.positionToTileXY(
+ c,
+ o
+ );
+ for (let h = l.x; h <= d.x; h++)
+ for (let p = l.y; p <= d.y; p++) {
+ const m = Cartesian2.fromElements(h, p, scratchCartesian2), _ = m.toString();
+ if (!r.hasOwnProperty(_)) {
+ const y = {
+ x: m.x,
+ y: m.y,
+ level: o,
+ tilingScheme: n,
+ terrainProvider: e,
+ positions: []
+ };
+ r[_] = y, i.push(y);
+ }
+ }
+ const f = [];
+ for (let h = 0; h < i.length; ++h) {
+ const p = i[h], m = p.terrainProvider.requestTileGeometry(
+ p.x,
+ p.y,
+ p.level
+ );
+ f.push(m);
+ }
+ return Promise.all(f).then(function(h) {
+ const p = [];
+ for (let m = 0; m < h.length; m++) {
+ const _ = {
+ tilingScheme: n,
+ x: i[m].x,
+ y: i[m].y,
+ level: i[m].level
+ }, y = h[m];
+ let C = "Geographic";
+ n._projection instanceof WebMercatorProjection && (C = "WebMercator");
+ const T = {
+ projectionType: C,
+ projection: n._projection,
+ nativeExtent: n.tileXYToNativeRectangle(
+ _.x,
+ _.y,
+ _.level
+ ),
+ height: y._height,
+ width: y._width,
+ scale: y._structure.heightScale,
+ offset: y._structure.heightOffset
+ };
+ if (y._encoding === HeightmapEncoding$1.LERC) {
+ const x = Lerc.decode(y._buffer);
+ T.buffer = x.pixels[0];
+ } else
+ T.buffer = y._buffer;
+ p.push(T);
+ }
+ return p;
+ });
+}
+async function loadGeoidData(e) {
+ const t = e._geoidTiledTerrainProvider;
+ if (defined(t))
+ try {
+ const n = await getCoveredTiles(
+ t,
+ e._extent
+ );
+ e._geoidDataList = n;
+ } catch {
+ console.log(
+ "Error retrieving Geoid Terrain tiles - no geoid conversion will be performed."
+ );
+ }
+}
+I3SDataProvider.prototype.loadGeoidData = async function() {
+ return defined(this._geoidDataPromise) ? this._geoidDataPromise : (this._geoidDataPromise = loadGeoidData(this), this._geoidDataPromise);
+};
+I3SDataProvider.prototype._computeExtent = function() {
+ let e;
+ for (let t = 0; t < this._layersExtent.length; t++) {
+ const n = this._layersExtent[t];
+ defined(e) ? Rectangle.union(e, n, e) : e = Rectangle.clone(n);
+ }
+ this._extent = e;
+};
+I3SDataProvider.prototype.getAttributeNames = function() {
+ const e = [];
+ for (let t = 0; t < this._attributeStatistics.length; ++t)
+ e.push(...this._attributeStatistics[t].names);
+ return e;
+};
+I3SDataProvider.prototype.getAttributeValues = function(e) {
+ for (let t = 0; t < this._attributeStatistics.length; ++t) {
+ const n = this._attributeStatistics[t]._getValues(e);
+ if (defined(n))
+ return n;
+ }
+ return [];
+};
+I3SDataProvider.prototype.filterByAttributes = function(e) {
+ const t = [];
+ for (let n = 0; n < this._layers.length; n++) {
+ const i = this._layers[n].filterByAttributes(e);
+ t.push(i);
+ }
+ return Promise.all(t);
+};
+function Light() {
+}
+Object.defineProperties(Light.prototype, {
+ /**
+ * The color of the light.
+ * @memberof Light.prototype
+ * @type {Color}
+ */
+ color: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * The intensity controls the strength of the light. intensity has a minimum value of 0.0 and no maximum value.
+ * @memberof Light.prototype
+ * @type {number}
+ */
+ intensity: {
+ get: DeveloperError.throwInstantiationError
+ }
+});
+const trailingSlashRegex = /\/$/, defaultCredit$1 = new Credit(
+ '© Mapbox © OpenStreetMap Improve this map'
+);
+function MapboxStyleImageryProvider(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = e.styleId, n = e.accessToken;
+ this._defaultAlpha = void 0, this._defaultNightAlpha = void 0, this._defaultDayAlpha = void 0, this._defaultBrightness = void 0, this._defaultContrast = void 0, this._defaultHue = void 0, this._defaultSaturation = void 0, this._defaultGamma = void 0, this._defaultMinificationFilter = void 0, this._defaultMagnificationFilter = void 0;
+ const i = Resource.createIfNeeded(
+ defaultValue(e.url, "https://api.mapbox.com/styles/v1/")
+ );
+ this._styleId = t, this._accessToken = n;
+ const r = defaultValue(e.tilesize, 512);
+ this._tilesize = r;
+ const o = defaultValue(e.username, "mapbox");
+ this._username = o;
+ const s = defined(e.scaleFactor) ? "@2x" : "";
+ let c = i.getUrlComponent();
+ trailingSlashRegex.test(c) || (c += "/"), c += `${this._username}/${t}/tiles/${this._tilesize}/{z}/{x}/{y}${s}`, i.url = c, i.setQueryParameters({
+ access_token: n
+ });
+ let l;
+ defined(e.credit) ? (l = e.credit, typeof l == "string" && (l = new Credit(l))) : l = defaultCredit$1, this._resource = i, this._imageryProvider = new UrlTemplateImageryProvider({
+ url: i,
+ credit: l,
+ ellipsoid: e.ellipsoid,
+ minimumLevel: e.minimumLevel,
+ maximumLevel: e.maximumLevel,
+ rectangle: e.rectangle
+ });
+}
+Object.defineProperties(MapboxStyleImageryProvider.prototype, {
+ /**
+ * Gets the URL of the Mapbox server.
+ * @memberof MapboxStyleImageryProvider.prototype
+ * @type {string}
+ * @readonly
+ */
+ url: {
+ get: function() {
+ return this._imageryProvider.url;
+ }
+ },
+ /**
+ * Gets the rectangle, in radians, of the imagery provided by the instance.
+ * @memberof MapboxStyleImageryProvider.prototype
+ * @type {Rectangle}
+ * @readonly
+ */
+ rectangle: {
+ get: function() {
+ return this._imageryProvider.rectangle;
+ }
+ },
+ /**
+ * Gets the width of each tile, in pixels.
+ * @memberof MapboxStyleImageryProvider.prototype
+ * @type {number}
+ * @readonly
+ */
+ tileWidth: {
+ get: function() {
+ return this._imageryProvider.tileWidth;
+ }
+ },
+ /**
+ * Gets the height of each tile, in pixels.
+ * @memberof MapboxStyleImageryProvider.prototype
+ * @type {number}
+ * @readonly
+ */
+ tileHeight: {
+ get: function() {
+ return this._imageryProvider.tileHeight;
+ }
+ },
+ /**
+ * Gets the maximum level-of-detail that can be requested.
+ * @memberof MapboxStyleImageryProvider.prototype
+ * @type {number|undefined}
+ * @readonly
+ */
+ maximumLevel: {
+ get: function() {
+ return this._imageryProvider.maximumLevel;
+ }
+ },
+ /**
+ * Gets the minimum level-of-detail that can be requested. Generally,
+ * a minimum level should only be used when the rectangle of the imagery is small
+ * enough that the number of tiles at the minimum level is small. An imagery
+ * provider with more than a few tiles at the minimum level will lead to
+ * rendering problems.
+ * @memberof MapboxStyleImageryProvider.prototype
+ * @type {number}
+ * @readonly
+ */
+ minimumLevel: {
+ get: function() {
+ return this._imageryProvider.minimumLevel;
+ }
+ },
+ /**
+ * Gets the tiling scheme used by the provider.
+ * @memberof MapboxStyleImageryProvider.prototype
+ * @type {TilingScheme}
+ * @readonly
+ */
+ tilingScheme: {
+ get: function() {
+ return this._imageryProvider.tilingScheme;
+ }
+ },
+ /**
+ * Gets the tile discard policy. If not undefined, the discard policy is responsible
+ * for filtering out "missing" tiles via its shouldDiscardImage function. If this function
+ * returns undefined, no tiles are filtered.
+ * @memberof MapboxStyleImageryProvider.prototype
+ * @type {TileDiscardPolicy}
+ * @readonly
+ */
+ tileDiscardPolicy: {
+ get: function() {
+ return this._imageryProvider.tileDiscardPolicy;
+ }
+ },
+ /**
+ * Gets an event that is raised when the imagery provider encounters an asynchronous error.. By subscribing
+ * to the event, you will be notified of the error and can potentially recover from it. Event listeners
+ * are passed an instance of {@link TileProviderError}.
+ * @memberof MapboxStyleImageryProvider.prototype
+ * @type {Event}
+ * @readonly
+ */
+ errorEvent: {
+ get: function() {
+ return this._imageryProvider.errorEvent;
+ }
+ },
+ /**
+ * Gets the credit to display when this imagery provider is active. Typically this is used to credit
+ * the source of the imagery.
+ * @memberof MapboxStyleImageryProvider.prototype
+ * @type {Credit}
+ * @readonly
+ */
+ credit: {
+ get: function() {
+ return this._imageryProvider.credit;
+ }
+ },
+ /**
+ * Gets the proxy used by this provider.
+ * @memberof MapboxStyleImageryProvider.prototype
+ * @type {Proxy}
+ * @readonly
+ */
+ proxy: {
+ get: function() {
+ return this._imageryProvider.proxy;
+ }
+ },
+ /**
+ * Gets a value indicating whether or not the images provided by this imagery provider
+ * include an alpha channel. If this property is false, an alpha channel, if present, will
+ * be ignored. If this property is true, any images without an alpha channel will be treated
+ * as if their alpha is 1.0 everywhere. When this property is false, memory usage
+ * and texture upload time are reduced.
+ * @memberof MapboxStyleImageryProvider.prototype
+ * @type {boolean}
+ * @readonly
+ */
+ hasAlphaChannel: {
+ get: function() {
+ return this._imageryProvider.hasAlphaChannel;
+ }
+ }
+});
+MapboxStyleImageryProvider.prototype.getTileCredits = function(e, t, n) {
+};
+MapboxStyleImageryProvider.prototype.requestImage = function(e, t, n, i) {
+ return this._imageryProvider.requestImage(e, t, n, i);
+};
+MapboxStyleImageryProvider.prototype.pickFeatures = function(e, t, n, i, r) {
+ return this._imageryProvider.pickFeatures(e, t, n, i, r);
+};
+MapboxStyleImageryProvider._defaultCredit = defaultCredit$1;
+function NeverTileDiscardPolicy(e) {
+}
+NeverTileDiscardPolicy.prototype.isReady = function() {
+ return !0;
+};
+NeverTileDiscardPolicy.prototype.shouldDiscardImage = function(e) {
+ return !1;
+};
+const defaultCredit = new Credit(
+ "MapQuest, Open Street Map and contributors, CC-BY-SA"
+);
+function OpenStreetMapImageryProvider(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT);
+ const t = Resource.createIfNeeded(
+ defaultValue(e.url, "https://tile.openstreetmap.org/")
+ );
+ t.appendForwardSlash(), t.url += `{z}/{x}/{y}${e.retinaTiles ? "@2x" : ""}.${defaultValue(e.fileExtension, "png")}`;
+ const n = new WebMercatorTilingScheme({
+ ellipsoid: e.ellipsoid
+ }), i = 256, r = 256, o = defaultValue(e.minimumLevel, 0), s = e.maximumLevel, c = defaultValue(e.rectangle, n.rectangle), l = n.positionToTileXY(
+ Rectangle.southwest(c),
+ o
+ ), d = n.positionToTileXY(
+ Rectangle.northeast(c),
+ o
+ );
+ (Math.abs(d.x - l.x) + 1) * (Math.abs(d.y - l.y) + 1);
+ let f = defaultValue(e.credit, defaultCredit);
+ typeof f == "string" && (f = new Credit(f)), UrlTemplateImageryProvider.call(this, {
+ url: t,
+ credit: f,
+ tilingScheme: n,
+ tileWidth: i,
+ tileHeight: r,
+ minimumLevel: o,
+ maximumLevel: s,
+ rectangle: c
+ });
+}
+defined(Object.create) && (OpenStreetMapImageryProvider.prototype = Object.create(
+ UrlTemplateImageryProvider.prototype
+), OpenStreetMapImageryProvider.prototype.constructor = OpenStreetMapImageryProvider);
+const defaultSize = new Cartesian2(1, 1);
+function Particle(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this.mass = defaultValue(e.mass, 1), this.position = Cartesian3.clone(
+ defaultValue(e.position, Cartesian3.ZERO)
+ ), this.velocity = Cartesian3.clone(
+ defaultValue(e.velocity, Cartesian3.ZERO)
+ ), this.life = defaultValue(e.life, Number.MAX_VALUE), this.image = e.image, this.startColor = Color.clone(defaultValue(e.startColor, Color.WHITE)), this.endColor = Color.clone(defaultValue(e.endColor, Color.WHITE)), this.startScale = defaultValue(e.startScale, 1), this.endScale = defaultValue(e.endScale, 1), this.imageSize = Cartesian2.clone(
+ defaultValue(e.imageSize, defaultSize)
+ ), this._age = 0, this._normalizedAge = 0, this._billboard = void 0;
+}
+Object.defineProperties(Particle.prototype, {
+ /**
+ * Gets the age of the particle in seconds.
+ * @memberof Particle.prototype
+ * @type {number}
+ */
+ age: {
+ get: function() {
+ return this._age;
+ }
+ },
+ /**
+ * Gets the age normalized to a value in the range [0.0, 1.0].
+ * @memberof Particle.prototype
+ * @type {number}
+ */
+ normalizedAge: {
+ get: function() {
+ return this._normalizedAge;
+ }
+ }
+});
+const deltaScratch = new Cartesian3();
+Particle.prototype.update = function(e, t) {
+ return Cartesian3.multiplyByScalar(this.velocity, e, deltaScratch), Cartesian3.add(this.position, deltaScratch, this.position), defined(t) && t(this, e), this._age += e, this.life === Number.MAX_VALUE ? this._normalizedAge = 0 : this._normalizedAge = this._age / this.life, this._age <= this.life;
+};
+function ParticleBurst(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this.time = defaultValue(e.time, 0), this.minimum = defaultValue(e.minimum, 0), this.maximum = defaultValue(e.maximum, 50), this._complete = !1;
+}
+Object.defineProperties(ParticleBurst.prototype, {
+ /**
+ * true if the burst has been completed; false otherwise.
+ * @memberof ParticleBurst.prototype
+ * @type {boolean}
+ */
+ complete: {
+ get: function() {
+ return this._complete;
+ }
+ }
+});
+function ParticleEmitter(e) {
+}
+ParticleEmitter.prototype.emit = function(e) {
+ DeveloperError.throwInstantiationError();
+};
+const defaultImageSize = new Cartesian2(1, 1);
+function ParticleSystem(e) {
+ e = defaultValue(e, defaultValue.EMPTY_OBJECT), this.show = defaultValue(e.show, !0), this.updateCallback = e.updateCallback, this.loop = defaultValue(e.loop, !0), this.image = defaultValue(e.image, void 0);
+ let t = e.emitter;
+ defined(t) || (t = new CircleEmitter(0.5)), this._emitter = t, this._bursts = e.bursts, this._modelMatrix = Matrix4.clone(
+ defaultValue(e.modelMatrix, Matrix4.IDENTITY)
+ ), this._emitterModelMatrix = Matrix4.clone(
+ defaultValue(e.emitterModelMatrix, Matrix4.IDENTITY)
+ ), this._matrixDirty = !0, this._combinedMatrix = new Matrix4(), this._startColor = Color.clone(
+ defaultValue(e.color, defaultValue(e.startColor, Color.WHITE))
+ ), this._endColor = Color.clone(
+ defaultValue(e.color, defaultValue(e.endColor, Color.WHITE))
+ ), this._startScale = defaultValue(
+ e.scale,
+ defaultValue(e.startScale, 1)
+ ), this._endScale = defaultValue(
+ e.scale,
+ defaultValue(e.endScale, 1)
+ ), this._emissionRate = defaultValue(e.emissionRate, 5), this._minimumSpeed = defaultValue(
+ e.speed,
+ defaultValue(e.minimumSpeed, 1)
+ ), this._maximumSpeed = defaultValue(
+ e.speed,
+ defaultValue(e.maximumSpeed, 1)
+ ), this._minimumParticleLife = defaultValue(
+ e.particleLife,
+ defaultValue(e.minimumParticleLife, 5)
+ ), this._maximumParticleLife = defaultValue(
+ e.particleLife,
+ defaultValue(e.maximumParticleLife, 5)
+ ), this._minimumMass = defaultValue(
+ e.mass,
+ defaultValue(e.minimumMass, 1)
+ ), this._maximumMass = defaultValue(
+ e.mass,
+ defaultValue(e.maximumMass, 1)
+ ), this._minimumImageSize = Cartesian2.clone(
+ defaultValue(
+ e.imageSize,
+ defaultValue(e.minimumImageSize, defaultImageSize)
+ )
+ ), this._maximumImageSize = Cartesian2.clone(
+ defaultValue(
+ e.imageSize,
+ defaultValue(e.maximumImageSize, defaultImageSize)
+ )
+ ), this._sizeInMeters = defaultValue(e.sizeInMeters, !1), this._lifetime = defaultValue(e.lifetime, Number.MAX_VALUE), this._billboardCollection = void 0, this._particles = [], this._particlePool = [], this._previousTime = void 0, this._currentTime = 0, this._carryOver = 0, this._complete = new Event(), this._isComplete = !1, this._updateParticlePool = !0, this._particleEstimate = 0;
+}
+Object.defineProperties(ParticleSystem.prototype, {
+ /**
+ * The particle emitter for this
+ * @memberof ParticleSystem.prototype
+ * @type {ParticleEmitter}
+ * @default CircleEmitter
+ */
+ emitter: {
+ get: function() {
+ return this._emitter;
+ },
+ set: function(e) {
+ this._emitter = e;
+ }
+ },
+ /**
+ * An array of {@link ParticleBurst}, emitting bursts of particles at periodic times.
+ * @memberof ParticleSystem.prototype
+ * @type {ParticleBurst[]}
+ * @default undefined
+ */
+ bursts: {
+ get: function() {
+ return this._bursts;
+ },
+ set: function(e) {
+ this._bursts = e, this._updateParticlePool = !0;
+ }
+ },
+ /**
+ * The 4x4 transformation matrix that transforms the particle system from model to world coordinates.
+ * @memberof ParticleSystem.prototype
+ * @type {Matrix4}
+ * @default Matrix4.IDENTITY
+ */
+ modelMatrix: {
+ get: function() {
+ return this._modelMatrix;
+ },
+ set: function(e) {
+ this._matrixDirty = this._matrixDirty || !Matrix4.equals(this._modelMatrix, e), Matrix4.clone(e, this._modelMatrix);
+ }
+ },
+ /**
+ * The 4x4 transformation matrix that transforms the particle system emitter within the particle systems local coordinate system.
+ * @memberof ParticleSystem.prototype
+ * @type {Matrix4}
+ * @default Matrix4.IDENTITY
+ */
+ emitterModelMatrix: {
+ get: function() {
+ return this._emitterModelMatrix;
+ },
+ set: function(e) {
+ this._matrixDirty = this._matrixDirty || !Matrix4.equals(this._emitterModelMatrix, e), Matrix4.clone(e, this._emitterModelMatrix);
+ }
+ },
+ /**
+ * The color of the particle at the beginning of its life.
+ * @memberof ParticleSystem.prototype
+ * @type {Color}
+ * @default Color.WHITE
+ */
+ startColor: {
+ get: function() {
+ return this._startColor;
+ },
+ set: function(e) {
+ Color.clone(e, this._startColor);
+ }
+ },
+ /**
+ * The color of the particle at the end of its life.
+ * @memberof ParticleSystem.prototype
+ * @type {Color}
+ * @default Color.WHITE
+ */
+ endColor: {
+ get: function() {
+ return this._endColor;
+ },
+ set: function(e) {
+ Color.clone(e, this._endColor);
+ }
+ },
+ /**
+ * The initial scale to apply to the image of the particle at the beginning of its life.
+ * @memberof ParticleSystem.prototype
+ * @type {number}
+ * @default 1.0
+ */
+ startScale: {
+ get: function() {
+ return this._startScale;
+ },
+ set: function(e) {
+ this._startScale = e;
+ }
+ },
+ /**
+ * The final scale to apply to the image of the particle at the end of its life.
+ * @memberof ParticleSystem.prototype
+ * @type {number}
+ * @default 1.0
+ */
+ endScale: {
+ get: function() {
+ return this._endScale;
+ },
+ set: function(e) {
+ this._endScale = e;
+ }
+ },
+ /**
+ * The number of particles to emit per second.
+ * @memberof ParticleSystem.prototype
+ * @type {number}
+ * @default 5
+ */
+ emissionRate: {
+ get: function() {
+ return this._emissionRate;
+ },
+ set: function(e) {
+ this._emissionRate = e, this._updateParticlePool = !0;
+ }
+ },
+ /**
+ * Sets the minimum bound in meters per second above which a particle's actual speed will be randomly chosen.
+ * @memberof ParticleSystem.prototype
+ * @type {number}
+ * @default 1.0
+ */
+ minimumSpeed: {
+ get: function() {
+ return this._minimumSpeed;
+ },
+ set: function(e) {
+ this._minimumSpeed = e;
+ }
+ },
+ /**
+ * Sets the maximum bound in meters per second below which a particle's actual speed will be randomly chosen.
+ * @memberof ParticleSystem.prototype
+ * @type {number}
+ * @default 1.0
+ */
+ maximumSpeed: {
+ get: function() {
+ return this._maximumSpeed;
+ },
+ set: function(e) {
+ this._maximumSpeed = e;
+ }
+ },
+ /**
+ * Sets the minimum bound in seconds for the possible duration of a particle's life above which a particle's actual life will be randomly chosen.
+ * @memberof ParticleSystem.prototype
+ * @type {number}
+ * @default 5.0
+ */
+ minimumParticleLife: {
+ get: function() {
+ return this._minimumParticleLife;
+ },
+ set: function(e) {
+ this._minimumParticleLife = e;
+ }
+ },
+ /**
+ * Sets the maximum bound in seconds for the possible duration of a particle's life below which a particle's actual life will be randomly chosen.
+ * @memberof ParticleSystem.prototype
+ * @type {number}
+ * @default 5.0
+ */
+ maximumParticleLife: {
+ get: function() {
+ return this._maximumParticleLife;
+ },
+ set: function(e) {
+ this._maximumParticleLife = e, this._updateParticlePool = !0;
+ }
+ },
+ /**
+ * Sets the minimum mass of particles in kilograms.
+ * @memberof ParticleSystem.prototype
+ * @type {number}
+ * @default 1.0
+ */
+ minimumMass: {
+ get: function() {
+ return this._minimumMass;
+ },
+ set: function(e) {
+ this._minimumMass = e;
+ }
+ },
+ /**
+ * Sets the maximum mass of particles in kilograms.
+ * @memberof ParticleSystem.prototype
+ * @type {number}
+ * @default 1.0
+ */
+ maximumMass: {
+ get: function() {
+ return this._maximumMass;
+ },
+ set: function(e) {
+ this._maximumMass = e;
+ }
+ },
+ /**
+ * Sets the minimum bound, width by height, above which to randomly scale the particle image's dimensions in pixels.
+ * @memberof ParticleSystem.prototype
+ * @type {Cartesian2}
+ * @default new Cartesian2(1.0, 1.0)
+ */
+ minimumImageSize: {
+ get: function() {
+ return this._minimumImageSize;
+ },
+ set: function(e) {
+ this._minimumImageSize = e;
+ }
+ },
+ /**
+ * Sets the maximum bound, width by height, below which to randomly scale the particle image's dimensions in pixels.
+ * @memberof ParticleSystem.prototype
+ * @type {Cartesian2}
+ * @default new Cartesian2(1.0, 1.0)
+ */
+ maximumImageSize: {
+ get: function() {
+ return this._maximumImageSize;
+ },
+ set: function(e) {
+ this._maximumImageSize = e;
+ }
+ },
+ /**
+ * Gets or sets if the particle size is in meters or pixels. true to size particles in meters; otherwise, the size is in pixels.
+ * @memberof ParticleSystem.prototype
+ * @type {boolean}
+ * @default false
+ */
+ sizeInMeters: {
+ get: function() {
+ return this._sizeInMeters;
+ },
+ set: function(e) {
+ this._sizeInMeters = e;
+ }
+ },
+ /**
+ * How long the particle system will emit particles, in seconds.
+ * @memberof ParticleSystem.prototype
+ * @type {number}
+ * @default Number.MAX_VALUE
+ */
+ lifetime: {
+ get: function() {
+ return this._lifetime;
+ },
+ set: function(e) {
+ this._lifetime = e;
+ }
+ },
+ /**
+ * Fires an event when the particle system has reached the end of its lifetime.
+ * @memberof ParticleSystem.prototype
+ * @type {Event}
+ */
+ complete: {
+ get: function() {
+ return this._complete;
+ }
+ },
+ /**
+ * When true, the particle system has reached the end of its lifetime; false otherwise.
+ * @memberof ParticleSystem.prototype
+ * @type {boolean}
+ */
+ isComplete: {
+ get: function() {
+ return this._isComplete;
+ }
+ }
+});
+function updateParticlePool(e) {
+ const t = e._emissionRate, n = e._maximumParticleLife;
+ let i = 0;
+ const r = e._bursts;
+ if (defined(r)) {
+ const h = r.length;
+ for (let p = 0; p < h; ++p)
+ i += r[p].maximum;
+ }
+ const o = e._billboardCollection, s = e.image, c = Math.ceil(t * n + i), l = e._particles, d = e._particlePool, f = Math.max(
+ c - l.length - d.length,
+ 0
+ );
+ for (let h = 0; h < f; ++h) {
+ const p = new Particle();
+ p._billboard = o.add({
+ image: s,
+ // Make the newly added billboards invisible when updating the particle pool
+ // to prevent the billboards from being displayed when the particles
+ // are not created. The billboard will always be set visible in
+ // updateBillboard function when its corresponding particle update.
+ show: !1
+ }), d.push(p);
+ }
+ e._particleEstimate = c;
+}
+function getOrCreateParticle(e) {
+ let t = e._particlePool.pop();
+ return defined(t) || (t = new Particle()), t;
+}
+function addParticleToPool(e, t) {
+ e._particlePool.push(t);
+}
+function freeParticlePool(e) {
+ const t = e._particles, n = e._particlePool, i = e._billboardCollection, r = t.length, o = n.length, s = e._particleEstimate, c = o - Math.max(s - r - o, 0);
+ for (let l = c; l < o; ++l) {
+ const d = n[l];
+ i.remove(d._billboard);
+ }
+ n.length = c;
+}
+function removeBillboard(e) {
+ defined(e._billboard) && (e._billboard.show = !1);
+}
+function updateBillboard(e, t) {
+ let n = t._billboard;
+ defined(n) || (n = t._billboard = e._billboardCollection.add({
+ image: t.image
+ })), n.width = t.imageSize.x, n.height = t.imageSize.y, n.position = t.position, n.sizeInMeters = e.sizeInMeters, n.show = !0;
+ const i = CesiumMath.lerp(
+ t.startColor.red,
+ t.endColor.red,
+ t.normalizedAge
+ ), r = CesiumMath.lerp(
+ t.startColor.green,
+ t.endColor.green,
+ t.normalizedAge
+ ), o = CesiumMath.lerp(
+ t.startColor.blue,
+ t.endColor.blue,
+ t.normalizedAge
+ ), s = CesiumMath.lerp(
+ t.startColor.alpha,
+ t.endColor.alpha,
+ t.normalizedAge
+ );
+ n.color = new Color(i, r, o, s), n.scale = CesiumMath.lerp(
+ t.startScale,
+ t.endScale,
+ t.normalizedAge
+ );
+}
+function addParticle(e, t) {
+ t.startColor = Color.clone(e._startColor, t.startColor), t.endColor = Color.clone(e._endColor, t.endColor), t.startScale = e._startScale, t.endScale = e._endScale, t.image = e.image, t.life = CesiumMath.randomBetween(
+ e._minimumParticleLife,
+ e._maximumParticleLife
+ ), t.mass = CesiumMath.randomBetween(
+ e._minimumMass,
+ e._maximumMass
+ ), t.imageSize.x = CesiumMath.randomBetween(
+ e._minimumImageSize.x,
+ e._maximumImageSize.x
+ ), t.imageSize.y = CesiumMath.randomBetween(
+ e._minimumImageSize.y,
+ e._maximumImageSize.y
+ ), t._normalizedAge = 0, t._age = 0;
+ const n = CesiumMath.randomBetween(
+ e._minimumSpeed,
+ e._maximumSpeed
+ );
+ Cartesian3.multiplyByScalar(t.velocity, n, t.velocity), e._particles.push(t);
+}
+function calculateNumberToEmit(e, t) {
+ if (e._isComplete)
+ return 0;
+ t = CesiumMath.mod(t, e._lifetime);
+ const n = t * e._emissionRate;
+ let i = Math.floor(n);
+ if (e._carryOver += n - i, e._carryOver > 1 && (i++, e._carryOver -= 1), defined(e.bursts)) {
+ const r = e.bursts.length;
+ for (let o = 0; o < r; o++) {
+ const s = e.bursts[o], c = e._currentTime;
+ defined(s) && !s._complete && c > s.time && (i += CesiumMath.randomBetween(s.minimum, s.maximum), s._complete = !0);
+ }
+ }
+ return i;
+}
+const rotatedVelocityScratch = new Cartesian3();
+ParticleSystem.prototype.update = function(e) {
+ if (!this.show)
+ return;
+ defined(this._billboardCollection) || (this._billboardCollection = new BillboardCollection()), this._updateParticlePool && (updateParticlePool(this), this._updateParticlePool = !1);
+ let t = 0;
+ this._previousTime && (t = JulianDate.secondsDifference(e.time, this._previousTime)), t < 0 && (t = 0);
+ const n = this._particles, i = this._emitter, r = this.updateCallback;
+ let o, s, c = n.length;
+ for (o = 0; o < c; ++o)
+ s = n[o], s.update(t, r) ? updateBillboard(this, s) : (removeBillboard(s), addParticleToPool(this, s), n[o] = n[c - 1], --o, --c);
+ n.length = c;
+ const l = calculateNumberToEmit(this, t);
+ if (l > 0 && defined(i)) {
+ this._matrixDirty && (this._combinedMatrix = Matrix4.multiply(
+ this.modelMatrix,
+ this.emitterModelMatrix,
+ this._combinedMatrix
+ ), this._matrixDirty = !1);
+ const d = this._combinedMatrix;
+ for (o = 0; o < l; o++)
+ s = getOrCreateParticle(this), this._emitter.emit(s), Cartesian3.add(
+ s.position,
+ s.velocity,
+ rotatedVelocityScratch
+ ), Matrix4.multiplyByPoint(
+ d,
+ rotatedVelocityScratch,
+ rotatedVelocityScratch
+ ), s.position = Matrix4.multiplyByPoint(
+ d,
+ s.position,
+ s.position
+ ), Cartesian3.subtract(
+ rotatedVelocityScratch,
+ s.position,
+ s.velocity
+ ), Cartesian3.normalize(s.velocity, s.velocity), addParticle(this, s), updateBillboard(this, s);
+ }
+ if (this._billboardCollection.update(e), this._previousTime = JulianDate.clone(e.time, this._previousTime), this._currentTime += t, this._lifetime !== Number.MAX_VALUE && this._currentTime > this._lifetime)
+ if (this.loop) {
+ if (this._currentTime = CesiumMath.mod(this._currentTime, this._lifetime), this.bursts) {
+ const d = this.bursts.length;
+ for (o = 0; o < d; o++)
+ this.bursts[o]._complete = !1;
+ }
+ } else
+ this._isComplete = !0, this._complete.raiseEvent(this);
+ e.frameNumber % 120 === 0 && freeParticlePool(this);
+};
+ParticleSystem.prototype.isDestroyed = function() {
+ return !1;
+};
+ParticleSystem.prototype.destroy = function() {
+ return this._billboardCollection = this._billboardCollection && this._billboardCollection.destroy(), destroyObject(this);
+};
+function getClipAndStyleCode(e, t, n) {
+ return ` float clipDistance = clip(gl_FragCoord, ${e}, ${t});
+ vec4 clippingPlanesEdgeColor = vec4(1.0);
+ clippingPlanesEdgeColor.rgb = ${n}.rgb;
+ float clippingPlanesEdgeWidth = ${n}.a;
+ if (clipDistance > 0.0 && clipDistance < clippingPlanesEdgeWidth)
+ {
+ out_FragColor = clippingPlanesEdgeColor;
+ }
+`;
+}
+const Splitter = {
+ /**
+ * Given a fragment shader string, returns a modified version of it that
+ * only renders on one side of the screen or the other. Fragments on the
+ * other side are discarded. The screen side is given by a uniform called
+ * `czm_splitDirection`, which can be added by calling
+ * {@link Splitter#addUniforms}, and the split position is given by an
+ * automatic uniform called `czm_splitPosition`.
+ */
+ modifyFragmentShader: function e(t) {
+ return t = ShaderSource.replaceMain(t, "czm_splitter_main"), t += // czm_splitPosition is not declared because it is an automatic uniform.
+ `uniform float czm_splitDirection;
+void main()
+{
+#ifndef SHADOW_MAP
+ if (czm_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
+ if (czm_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;
+#endif
+ czm_splitter_main();
+}
+`, t;
+ },
+ /**
+ * Add `czm_splitDirection` to the given uniform map.
+ *
+ * @param {object} object The object on which the `splitDirection` property may be found.
+ * @param {object} uniformMap The uniform map.
+ */
+ addUniforms: function e(t, n) {
+ n.czm_splitDirection = function() {
+ return t.splitDirection;
+ };
+ }
+}, DecodingState = {
+ NEEDS_DECODE: 0,
+ DECODING: 1,
+ READY: 2,
+ FAILED: 3
+};
+function PointCloud(e) {
+ this._parsedContent = void 0, this._drawCommand = void 0, this._isTranslucent = !1, this._styleTranslucent = !1, this._constantColor = Color.clone(Color.DARKGRAY), this._highlightColor = Color.clone(Color.WHITE), this._pointSize = 1, this._rtcCenter = void 0, this._quantizedVolumeScale = void 0, this._quantizedVolumeOffset = void 0, this._styleableShaderAttributes = void 0, this._isQuantized = !1, this._isOctEncoded16P = !1, this._isRGB565 = !1, this._hasColors = !1, this._hasNormals = !1, this._hasBatchIds = !1, this._decodingState = DecodingState.READY, this._dequantizeInShader = !0, this._isQuantizedDraco = !1, this._isOctEncodedDraco = !1, this._quantizedRange = 0, this._octEncodedRange = 0, this.backFaceCulling = !1, this._backFaceCulling = !1, this.normalShading = !0, this._normalShading = !0, this._opaqueRenderState = void 0, this._translucentRenderState = void 0, this._mode = void 0, this._ready = !1, this._pointsLength = 0, this._geometryByteLength = 0, this._vertexShaderLoaded = e.vertexShaderLoaded, this._fragmentShaderLoaded = e.fragmentShaderLoaded, this._uniformMapLoaded = e.uniformMapLoaded, this._batchTableLoaded = e.batchTableLoaded, this._pickIdLoaded = e.pickIdLoaded, this._opaquePass = defaultValue(e.opaquePass, Pass$1.OPAQUE), this._cull = defaultValue(e.cull, !0), this.style = void 0, this._style = void 0, this.styleDirty = !1, this.modelMatrix = Matrix4.clone(Matrix4.IDENTITY), this._modelMatrix = Matrix4.clone(Matrix4.IDENTITY), this.time = 0, this.shadows = ShadowMode$1.ENABLED, this._boundingSphere = void 0, this.clippingPlanes = void 0, this.isClipped = !1, this.clippingPlanesDirty = !1, this.clippingPlanesOriginMatrix = void 0, this.attenuation = !1, this._attenuation = !1, this.geometricError = 0, this.geometricErrorScale = 1, this.maximumAttenuation = this._pointSize, this.splitDirection = defaultValue(
+ e.splitDirection,
+ SplitDirection$1.NONE
+ ), this._splittingEnabled = !1, this._error = void 0, initialize(this, e);
+}
+Object.defineProperties(PointCloud.prototype, {
+ pointsLength: {
+ get: function() {
+ return this._pointsLength;
+ }
+ },
+ geometryByteLength: {
+ get: function() {
+ return this._geometryByteLength;
+ }
+ },
+ ready: {
+ get: function() {
+ return this._ready;
+ }
+ },
+ color: {
+ get: function() {
+ return Color.clone(this._highlightColor);
+ },
+ set: function(e) {
+ this._highlightColor = Color.clone(e, this._highlightColor);
+ }
+ },
+ boundingSphere: {
+ get: function() {
+ if (defined(this._drawCommand))
+ return this._drawCommand.boundingVolume;
+ },
+ set: function(e) {
+ this._boundingSphere = BoundingSphere.clone(e, this._boundingSphere);
+ }
+ }
+});
+function initialize(e, t) {
+ const n = PntsParser.parse(
+ t.arrayBuffer,
+ t.byteOffset
+ );
+ if (e._parsedContent = n, e._rtcCenter = n.rtcCenter, e._hasNormals = n.hasNormals, e._hasColors = n.hasColors, e._hasBatchIds = n.hasBatchIds, e._isTranslucent = n.isTranslucent, !n.hasBatchIds && defined(n.batchTableBinary) && (n.styleableProperties = Cesium3DTileBatchTable.getBinaryProperties(
+ n.pointsLength,
+ n.batchTableJson,
+ n.batchTableBinary
+ )), defined(n.draco)) {
+ const c = n.draco;
+ e._decodingState = DecodingState.NEEDS_DECODE, c.dequantizeInShader = e._dequantizeInShader;
+ }
+ const i = n.positions;
+ defined(i) && (e._isQuantized = i.isQuantized, e._quantizedVolumeScale = i.quantizedVolumeScale, e._quantizedVolumeOffset = i.quantizedVolumeOffset, e._quantizedRange = i.quantizedRange);
+ const r = n.normals;
+ defined(r) && (e._isOctEncoded16P = r.octEncoded);
+ const o = n.colors;
+ defined(o) && (defined(o.constantColor) && (e._constantColor = Color.clone(
+ o.constantColor,
+ e._constantColor
+ ), e._hasColors = !1), e._isRGB565 = o.isRGB565);
+ const s = n.batchIds;
+ defined(n.batchIds) && (s.name = "BATCH_ID", s.semantic = "BATCH_ID", s.setIndex = void 0), n.hasBatchIds && e._batchTableLoaded(
+ n.batchLength,
+ n.batchTableJson,
+ n.batchTableBinary
+ ), e._pointsLength = n.pointsLength;
+}
+const scratchMin = new Cartesian3(), scratchMax = new Cartesian3(), scratchPosition = new Cartesian3();
+let randomNumberGenerator, randomValues;
+function getRandomValues(e) {
+ if (!defined(randomValues)) {
+ randomNumberGenerator = new MersenneTwister$1(0), randomValues = new Array(e);
+ for (let t = 0; t < e; ++t)
+ randomValues[t] = randomNumberGenerator.random();
+ }
+ return randomValues;
+}
+function computeApproximateBoundingSphereFromPositions(e) {
+ const n = e.length / 3, i = Math.min(n, 20), r = getRandomValues(20), o = Number.MAX_VALUE, s = -Number.MAX_VALUE, c = Cartesian3.fromElements(o, o, o, scratchMin), l = Cartesian3.fromElements(s, s, s, scratchMax);
+ for (let f = 0; f < i; ++f) {
+ const h = Math.floor(r[f] * n), p = Cartesian3.unpack(e, h * 3, scratchPosition);
+ Cartesian3.minimumByComponent(c, p, c), Cartesian3.maximumByComponent(l, p, l);
+ }
+ const d = BoundingSphere.fromCornerPoints(c, l);
+ return d.radius += CesiumMath.EPSILON2, d;
+}
+function prepareVertexAttribute(e, t) {
+ const n = ComponentDatatype$1.fromTypedArray(e);
+ return n === ComponentDatatype$1.INT || n === ComponentDatatype$1.UNSIGNED_INT || n === ComponentDatatype$1.DOUBLE ? (oneTimeWarning(
+ "Cast pnts property to floats",
+ `Point cloud property "${t}" will be cast to a float array because INT, UNSIGNED_INT, and DOUBLE are not valid WebGL vertex attribute types. Some precision may be lost.`
+ ), new Float32Array(e)) : e;
+}
+const scratchPointSizeAndTimeAndGeometricErrorAndDepthMultiplier = new Cartesian4(), scratchQuantizedVolumeScaleAndOctEncodedRange = new Cartesian4(), scratchColor$1 = new Color(), positionLocation = 0, colorLocation = 1, normalLocation = 2, batchIdLocation = 3, numberOfAttributes = 4, scratchClippingPlanesMatrix = new Matrix4(), scratchInverseTransposeClippingPlanesMatrix = new Matrix4();
+function createResources(e, t) {
+ const n = t.context, i = e._parsedContent, r = e._pointsLength, o = i.positions, s = i.colors, c = i.normals, l = i.batchIds, d = i.styleableProperties, f = defined(d), h = e._isQuantized, p = e._isQuantizedDraco, m = e._isOctEncoded16P, _ = e._isOctEncodedDraco, y = e._quantizedRange, C = e._octEncodedRange, T = e._isRGB565, x = e._isTranslucent, b = e._hasColors, S = e._hasNormals, E = e._hasBatchIds;
+ let A, D;
+ const P = [], I = {};
+ if (e._styleableShaderAttributes = I, f) {
+ let B = numberOfAttributes;
+ for (const V in d)
+ if (d.hasOwnProperty(V)) {
+ const U = d[V], k = prepareVertexAttribute(U.typedArray, V);
+ A = U.componentCount, D = ComponentDatatype$1.fromTypedArray(k);
+ const $ = Buffer.createVertexBuffer({
+ context: n,
+ typedArray: k,
+ usage: BufferUsage$1.STATIC_DRAW
+ });
+ e._geometryByteLength += $.sizeInBytes;
+ const G = {
+ index: B,
+ vertexBuffer: $,
+ componentsPerAttribute: A,
+ componentDatatype: D,
+ normalize: !1,
+ offsetInBytes: 0,
+ strideInBytes: 0
+ };
+ P.push(G), I[V] = {
+ location: B,
+ componentCount: A
+ }, ++B;
+ }
+ }
+ const M = Buffer.createVertexBuffer({
+ context: n,
+ typedArray: o.typedArray,
+ usage: BufferUsage$1.STATIC_DRAW
+ });
+ e._geometryByteLength += M.sizeInBytes;
+ let R;
+ b && (R = Buffer.createVertexBuffer({
+ context: n,
+ typedArray: s.typedArray,
+ usage: BufferUsage$1.STATIC_DRAW
+ }), e._geometryByteLength += R.sizeInBytes);
+ let L;
+ S && (L = Buffer.createVertexBuffer({
+ context: n,
+ typedArray: c.typedArray,
+ usage: BufferUsage$1.STATIC_DRAW
+ }), e._geometryByteLength += L.sizeInBytes);
+ let g;
+ E && (l.typedArray = prepareVertexAttribute(
+ l.typedArray,
+ "batchIds"
+ ), g = Buffer.createVertexBuffer({
+ context: n,
+ typedArray: l.typedArray,
+ usage: BufferUsage$1.STATIC_DRAW
+ }), e._geometryByteLength += g.sizeInBytes);
+ let w = [];
+ if (h ? D = ComponentDatatype$1.UNSIGNED_SHORT : p ? D = y <= 255 ? ComponentDatatype$1.UNSIGNED_BYTE : ComponentDatatype$1.UNSIGNED_SHORT : D = ComponentDatatype$1.FLOAT, w.push({
+ index: positionLocation,
+ vertexBuffer: M,
+ componentsPerAttribute: 3,
+ componentDatatype: D,
+ normalize: !1,
+ offsetInBytes: 0,
+ strideInBytes: 0
+ }), e._cull && (h || p ? e._boundingSphere = BoundingSphere.fromCornerPoints(
+ Cartesian3.ZERO,
+ e._quantizedVolumeScale
+ ) : e._boundingSphere = computeApproximateBoundingSphereFromPositions(
+ o.typedArray
+ )), b)
+ if (T)
+ w.push({
+ index: colorLocation,
+ vertexBuffer: R,
+ componentsPerAttribute: 1,
+ componentDatatype: ComponentDatatype$1.UNSIGNED_SHORT,
+ normalize: !1,
+ offsetInBytes: 0,
+ strideInBytes: 0
+ });
+ else {
+ const B = x ? 4 : 3;
+ w.push({
+ index: colorLocation,
+ vertexBuffer: R,
+ componentsPerAttribute: B,
+ componentDatatype: ComponentDatatype$1.UNSIGNED_BYTE,
+ normalize: !0,
+ offsetInBytes: 0,
+ strideInBytes: 0
+ });
+ }
+ S && (m ? (A = 2, D = ComponentDatatype$1.UNSIGNED_BYTE) : _ ? (A = 2, D = C <= 255 ? ComponentDatatype$1.UNSIGNED_BYTE : ComponentDatatype$1.UNSIGNED_SHORT) : (A = 3, D = ComponentDatatype$1.FLOAT), w.push({
+ index: normalLocation,
+ vertexBuffer: L,
+ componentsPerAttribute: A,
+ componentDatatype: D,
+ normalize: !1,
+ offsetInBytes: 0,
+ strideInBytes: 0
+ })), E && w.push({
+ index: batchIdLocation,
+ vertexBuffer: g,
+ componentsPerAttribute: 1,
+ componentDatatype: ComponentDatatype$1.fromTypedArray(l.typedArray),
+ normalize: !1,
+ offsetInBytes: 0,
+ strideInBytes: 0
+ }), f && (w = w.concat(P));
+ const O = new VertexArray({
+ context: n,
+ attributes: w
+ }), N = {
+ depthTest: {
+ enabled: !0
+ }
+ }, F = {
+ depthTest: {
+ enabled: !0
+ },
+ depthMask: !1,
+ blending: BlendingState$1.ALPHA_BLEND
+ };
+ e._opaquePass === Pass$1.CESIUM_3D_TILE && (N.stencilTest = StencilConstants$1.setCesium3DTileBit(), N.stencilMask = StencilConstants$1.CESIUM_3D_TILE_MASK, F.stencilTest = StencilConstants$1.setCesium3DTileBit(), F.stencilMask = StencilConstants$1.CESIUM_3D_TILE_MASK), e._opaqueRenderState = RenderState.fromCache(N), e._translucentRenderState = RenderState.fromCache(
+ F
+ ), e._drawCommand = new DrawCommand({
+ boundingVolume: new BoundingSphere(),
+ cull: e._cull,
+ modelMatrix: new Matrix4(),
+ primitiveType: PrimitiveType$1.POINTS,
+ vertexArray: O,
+ count: r,
+ shaderProgram: void 0,
+ // Updated in createShaders
+ uniformMap: void 0,
+ // Updated in createShaders
+ renderState: x ? e._translucentRenderState : e._opaqueRenderState,
+ pass: x ? Pass$1.TRANSLUCENT : e._opaquePass,
+ owner: e,
+ castShadows: !1,
+ receiveShadows: !1,
+ pickId: e._pickIdLoaded()
+ });
+}
+function createUniformMap(e, t) {
+ const n = t.context, i = e._isQuantized, r = e._isQuantizedDraco, o = e._isOctEncodedDraco;
+ let s = {
+ u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier: function() {
+ const c = scratchPointSizeAndTimeAndGeometricErrorAndDepthMultiplier;
+ if (c.x = e._attenuation ? e.maximumAttenuation : e._pointSize, c.x *= t.pixelRatio, c.y = e.time, e._attenuation) {
+ const l = t.camera.frustum;
+ let d;
+ t.mode === SceneMode$1.SCENE2D || l instanceof OrthographicFrustum ? d = Number.POSITIVE_INFINITY : d = n.drawingBufferHeight / t.camera.frustum.sseDenominator, c.z = e.geometricError * e.geometricErrorScale, c.w = d;
+ }
+ return c;
+ },
+ u_highlightColor: function() {
+ return e._highlightColor;
+ },
+ u_constantColor: function() {
+ return e._constantColor;
+ },
+ u_clippingPlanes: function() {
+ const c = e.clippingPlanes;
+ return e.isClipped ? c.texture : n.defaultTexture;
+ },
+ u_clippingPlanesEdgeStyle: function() {
+ const c = e.clippingPlanes;
+ if (!defined(c))
+ return Color.TRANSPARENT;
+ const l = Color.clone(c.edgeColor, scratchColor$1);
+ return l.alpha = c.edgeWidth, l;
+ },
+ u_clippingPlanesMatrix: function() {
+ const c = e.clippingPlanes;
+ if (!defined(c))
+ return Matrix4.IDENTITY;
+ const l = defaultValue(
+ e.clippingPlanesOriginMatrix,
+ e._modelMatrix
+ );
+ Matrix4.multiply(
+ n.uniformState.view3D,
+ l,
+ scratchClippingPlanesMatrix
+ );
+ const d = Matrix4.multiply(
+ scratchClippingPlanesMatrix,
+ c.modelMatrix,
+ scratchClippingPlanesMatrix
+ );
+ return Matrix4.inverseTranspose(
+ d,
+ scratchInverseTransposeClippingPlanesMatrix
+ );
+ }
+ };
+ Splitter.addUniforms(e, s), (i || r || o) && (s = combine$2(s, {
+ u_quantizedVolumeScaleAndOctEncodedRange: function() {
+ const c = scratchQuantizedVolumeScaleAndOctEncodedRange;
+ if (defined(e._quantizedVolumeScale)) {
+ const l = Cartesian3.clone(
+ e._quantizedVolumeScale,
+ c
+ );
+ Cartesian3.divideByScalar(l, e._quantizedRange, c);
+ }
+ return c.w = e._octEncodedRange, c;
+ }
+ })), defined(e._uniformMapLoaded) && (s = e._uniformMapLoaded(s)), e._drawCommand.uniformMap = s;
+}
+function getStyleablePropertyIds(e, t) {
+ const n = /czm_3dtiles_property_(\d+)/g;
+ let i = n.exec(e);
+ for (; i !== null; ) {
+ const r = parseInt(i[1]);
+ t.indexOf(r) === -1 && t.push(r), i = n.exec(e);
+ }
+}
+function getBuiltinPropertyNames(e, t) {
+ e = e.slice(e.indexOf(`
+`));
+ const n = /czm_3dtiles_builtin_property_(\w+)/g;
+ let i = n.exec(e);
+ for (; i !== null; ) {
+ const r = i[1];
+ t.indexOf(r) === -1 && t.push(r), i = n.exec(e);
+ }
+}
+function getVertexAttribute(e, t) {
+ const n = e.numberOfAttributes;
+ for (let i = 0; i < n; ++i) {
+ const r = e.getAttribute(i);
+ if (r.index === t)
+ return r;
+ }
+}
+const builtinVariableSubstitutionMap = {
+ POSITION: "czm_3dtiles_builtin_property_POSITION",
+ POSITION_ABSOLUTE: "czm_3dtiles_builtin_property_POSITION_ABSOLUTE",
+ COLOR: "czm_3dtiles_builtin_property_COLOR",
+ NORMAL: "czm_3dtiles_builtin_property_NORMAL"
+};
+function createShaders(e, t, n) {
+ let i, r, o;
+ const s = t.context, c = defined(n), l = e._isQuantized, d = e._isQuantizedDraco, f = e._isOctEncoded16P, h = e._isOctEncodedDraco, p = e._isRGB565, m = e._isTranslucent, _ = e._hasColors, y = e._hasNormals, C = e._hasBatchIds, T = e._backFaceCulling, x = e._normalShading, b = e._drawCommand.vertexArray, S = e.clippingPlanes, E = e._attenuation;
+ let A, D, P, I = m;
+ const M = clone$1(builtinVariableSubstitutionMap), R = {}, L = e._styleableShaderAttributes;
+ for (r in L)
+ L.hasOwnProperty(r) && (o = L[r], M[r] = `czm_3dtiles_property_${o.location}`, R[o.location] = o);
+ if (c) {
+ const K = {
+ translucent: !1
+ }, Z = "(vec3 czm_3dtiles_builtin_property_POSITION, vec3 czm_3dtiles_builtin_property_POSITION_ABSOLUTE, vec4 czm_3dtiles_builtin_property_COLOR, vec3 czm_3dtiles_builtin_property_NORMAL)";
+ A = n.getColorShaderFunction(
+ `getColorFromStyle${Z}`,
+ M,
+ K
+ ), D = n.getShowShaderFunction(
+ `getShowFromStyle${Z}`,
+ M,
+ K
+ ), P = n.getPointSizeShaderFunction(
+ `getPointSizeFromStyle${Z}`,
+ M,
+ K
+ ), defined(A) && K.translucent && (I = !0);
+ }
+ e._styleTranslucent = I;
+ const g = defined(A), w = defined(D), O = defined(P), N = e.isClipped, F = [], B = [];
+ g && (getStyleablePropertyIds(A, F), getBuiltinPropertyNames(A, B)), w && (getStyleablePropertyIds(D, F), getBuiltinPropertyNames(D, B)), O && (getStyleablePropertyIds(P, F), getBuiltinPropertyNames(P, B));
+ const V = B.indexOf("COLOR") >= 0, U = B.indexOf("NORMAL") >= 0;
+ if (U && !y)
+ throw new RuntimeError(
+ "Style references the NORMAL semantic but the point cloud does not have normals"
+ );
+ for (r in L)
+ if (L.hasOwnProperty(r)) {
+ o = L[r];
+ const K = F.indexOf(o.location) >= 0, Z = getVertexAttribute(
+ b,
+ o.location
+ );
+ Z.enabled = K;
+ }
+ const k = _ && (!g || V);
+ if (_) {
+ const K = getVertexAttribute(b, colorLocation);
+ K.enabled = k;
+ }
+ const $ = y && (x || T || U);
+ if (y) {
+ const K = getVertexAttribute(
+ b,
+ normalLocation
+ );
+ K.enabled = $;
+ }
+ const G = {
+ a_position: positionLocation
+ };
+ k && (G.a_color = colorLocation), $ && (G.a_normal = normalLocation), C && (G.a_batchId = batchIdLocation);
+ let q = "";
+ const z = F.length;
+ for (i = 0; i < z; ++i) {
+ const K = F[i];
+ o = R[K];
+ const Z = o.componentCount, ee = `czm_3dtiles_property_${K}`;
+ let oe;
+ Z === 1 ? oe = "float" : oe = `vec${Z}`, q += `in ${oe} ${ee};
+`, G[ee] = o.location;
+ }
+ createUniformMap(e, t);
+ let H = `in vec3 a_position;
+out vec4 v_color;
+uniform vec4 u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier;
+uniform vec4 u_constantColor;
+uniform vec4 u_highlightColor;
+`;
+ H += `float u_pointSize;
+float tiles3d_tileset_time;
+`, E && (H += `float u_geometricError;
+float u_depthMultiplier;
+`), H += q, k && (m ? H += `in vec4 a_color;
+` : p ? H += `in float a_color;
+const float SHIFT_RIGHT_11 = 1.0 / 2048.0;
+const float SHIFT_RIGHT_5 = 1.0 / 32.0;
+const float SHIFT_LEFT_11 = 2048.0;
+const float SHIFT_LEFT_5 = 32.0;
+const float NORMALIZE_6 = 1.0 / 64.0;
+const float NORMALIZE_5 = 1.0 / 32.0;
+` : H += `in vec3 a_color;
+`), $ && (f || h ? H += `in vec2 a_normal;
+` : H += `in vec3 a_normal;
+`), C && (H += `in float a_batchId;
+`), (l || d || h) && (H += `uniform vec4 u_quantizedVolumeScaleAndOctEncodedRange;
+`), g && (H += A), w && (H += D), O && (H += P), H += `void main()
+{
+ u_pointSize = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.x;
+ tiles3d_tileset_time = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.y;
+`, E && (H += ` u_geometricError = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.z;
+ u_depthMultiplier = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.w;
+`), k ? m ? H += ` vec4 color = a_color;
+` : p ? H += ` float compressed = a_color;
+ float r = floor(compressed * SHIFT_RIGHT_11);
+ compressed -= r * SHIFT_LEFT_11;
+ float g = floor(compressed * SHIFT_RIGHT_5);
+ compressed -= g * SHIFT_LEFT_5;
+ float b = compressed;
+ vec3 rgb = vec3(r * NORMALIZE_5, g * NORMALIZE_6, b * NORMALIZE_5);
+ vec4 color = vec4(rgb, 1.0);
+` : H += ` vec4 color = vec4(a_color, 1.0);
+` : H += ` vec4 color = u_constantColor;
+`, l || d ? H += ` vec3 position = a_position * u_quantizedVolumeScaleAndOctEncodedRange.xyz;
+` : H += ` vec3 position = a_position;
+`, H += ` vec3 position_absolute = vec3(czm_model * vec4(position, 1.0));
+`, $ ? (f ? H += ` vec3 normal = czm_octDecode(a_normal);
+` : h ? H += ` vec3 normal = czm_octDecode(a_normal, u_quantizedVolumeScaleAndOctEncodedRange.w).zxy;
+` : H += ` vec3 normal = a_normal;
+`, H += ` vec3 normalEC = czm_normal * normal;
+`) : H += ` vec3 normal = vec3(1.0);
+`, g && (H += ` color = getColorFromStyle(position, position_absolute, color, normal);
+`), w && (H += ` float show = float(getShowFromStyle(position, position_absolute, color, normal));
+`), O ? H += ` gl_PointSize = getPointSizeFromStyle(position, position_absolute, color, normal) * czm_pixelRatio;
+` : E ? H += ` vec4 positionEC = czm_modelView * vec4(position, 1.0);
+ float depth = -positionEC.z;
+ gl_PointSize = min((u_geometricError / depth) * u_depthMultiplier, u_pointSize);
+` : H += ` gl_PointSize = u_pointSize;
+`, H += ` color = color * u_highlightColor;
+`, $ && x && (H += ` float diffuseStrength = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC);
+ diffuseStrength = max(diffuseStrength, 0.4);
+ color.xyz *= diffuseStrength * czm_lightColor;
+`), H += ` v_color = color;
+ gl_Position = czm_modelViewProjection * vec4(position, 1.0);
+`, $ && T && (H += ` float visible = step(-normalEC.z, 0.0);
+ gl_Position *= visible;
+ gl_PointSize *= visible;
+`), w && (H += ` gl_Position.w *= float(show);
+ gl_PointSize *= float(show);
+`), H += `}
+`;
+ let Q = `in vec4 v_color;
+`;
+ N && (Q += `uniform highp sampler2D u_clippingPlanes;
+uniform mat4 u_clippingPlanesMatrix;
+uniform vec4 u_clippingPlanesEdgeStyle;
+`, Q += `
+`, Q += getClippingFunction(S, s), Q += `
+`), Q += `void main()
+{
+ out_FragColor = czm_gammaCorrect(v_color);
+`, N && (Q += getClipAndStyleCode(
+ "u_clippingPlanes",
+ "u_clippingPlanesMatrix",
+ "u_clippingPlanesEdgeStyle"
+ )), Q += `}
+`, e.splitDirection !== SplitDirection$1.NONE && (Q = Splitter.modifyFragmentShader(Q)), defined(e._vertexShaderLoaded) && (H = e._vertexShaderLoaded(H)), defined(e._fragmentShaderLoaded) && (Q = e._fragmentShaderLoaded(Q));
+ const ne = e._drawCommand;
+ defined(ne.shaderProgram) && ne.shaderProgram.destroy(), ne.shaderProgram = ShaderProgram.fromCache({
+ context: s,
+ vertexShaderSource: H,
+ fragmentShaderSource: Q,
+ attributeLocations: G
+ });
+ try {
+ ne.shaderProgram._bind();
+ } catch {
+ throw new RuntimeError(
+ "Error generating style shader: this may be caused by a type mismatch, index out-of-bounds, or other syntax error."
+ );
+ }
+}
+function decodeDraco(e, t) {
+ if (e._decodingState === DecodingState.READY)
+ return !1;
+ if (e._decodingState === DecodingState.NEEDS_DECODE) {
+ const n = e._parsedContent, i = n.draco, r = DracoLoader.decodePointCloud(i, t);
+ defined(r) && (e._decodingState = DecodingState.DECODING, r.then(function(o) {
+ e._decodingState = DecodingState.READY;
+ const s = defined(o.POSITION) ? o.POSITION.array : void 0, c = defined(o.RGB) ? o.RGB.array : void 0, l = defined(o.RGBA) ? o.RGBA.array : void 0, d = defined(o.NORMAL) ? o.NORMAL.array : void 0, f = defined(o.BATCH_ID) ? o.BATCH_ID.array : void 0, h = defined(s) && defined(o.POSITION.data.quantization), p = defined(d) && defined(o.NORMAL.data.quantization);
+ if (h) {
+ const C = o.POSITION.data.quantization, T = C.range;
+ e._quantizedVolumeScale = Cartesian3.fromElements(
+ T,
+ T,
+ T
+ ), e._quantizedVolumeOffset = Cartesian3.unpack(
+ C.minValues
+ ), e._quantizedRange = (1 << C.quantizationBits) - 1, e._isQuantizedDraco = !0;
+ }
+ p && (e._octEncodedRange = (1 << o.NORMAL.data.quantization.quantizationBits) - 1, e._isOctEncodedDraco = !0);
+ let m = n.styleableProperties;
+ const _ = i.batchTableProperties;
+ for (const C in _)
+ if (_.hasOwnProperty(C)) {
+ const T = o[C];
+ defined(m) || (m = {}), m[C] = {
+ typedArray: T.array,
+ componentCount: T.data.componentsPerAttribute
+ };
+ }
+ defined(s) && (n.positions = {
+ typedArray: s
+ });
+ const y = defaultValue(l, c);
+ defined(y) && (n.colors = {
+ typedArray: y
+ }), defined(d) && (n.normals = {
+ typedArray: d
+ }), defined(f) && (n.batchIds = {
+ typedArray: f
+ }), n.styleableProperties = m;
+ }).catch(function(o) {
+ e._decodingState = DecodingState.FAILED, e._error = o;
+ }));
+ }
+ return !0;
+}
+const scratchComputedTranslation = new Cartesian4(), scratchScale = new Cartesian3();
+PointCloud.prototype.update = function(e) {
+ const t = e.context;
+ if (defined(this._error)) {
+ const d = this._error;
+ throw this._error = void 0, d;
+ }
+ if (decodeDraco(this, t))
+ return;
+ let i = !1, r = !Matrix4.equals(this._modelMatrix, this.modelMatrix);
+ if (this._mode !== e.mode && (this._mode = e.mode, r = !0), defined(this._drawCommand) || (createResources(this, e), r = !0, i = !0, this._ready = !0, this._parsedContent = void 0), r) {
+ Matrix4.clone(this.modelMatrix, this._modelMatrix);
+ const d = this._drawCommand.modelMatrix;
+ if (Matrix4.clone(this._modelMatrix, d), defined(this._rtcCenter) && Matrix4.multiplyByTranslation(d, this._rtcCenter, d), defined(this._quantizedVolumeOffset) && Matrix4.multiplyByTranslation(
+ d,
+ this._quantizedVolumeOffset,
+ d
+ ), e.mode !== SceneMode$1.SCENE3D) {
+ const h = e.mapProjection, p = Matrix4.getColumn(
+ d,
+ 3,
+ scratchComputedTranslation
+ );
+ Cartesian4.equals(p, Cartesian4.UNIT_W) || Transforms.basisTo2D(h, d, d);
+ }
+ const f = this._drawCommand.boundingVolume;
+ if (BoundingSphere.clone(this._boundingSphere, f), this._cull) {
+ const h = f.center;
+ Matrix4.multiplyByPoint(d, h, h);
+ const p = Matrix4.getScale(d, scratchScale);
+ f.radius *= Cartesian3.maximumComponent(p);
+ }
+ }
+ this.clippingPlanesDirty && (this.clippingPlanesDirty = !1, i = !0), this._attenuation !== this.attenuation && (this._attenuation = this.attenuation, i = !0), this.backFaceCulling !== this._backFaceCulling && (this._backFaceCulling = this.backFaceCulling, i = !0), this.normalShading !== this._normalShading && (this._normalShading = this.normalShading, i = !0), (this._style !== this.style || this.styleDirty) && (this._style = this.style, this.styleDirty = !1, i = !0);
+ const o = this.splitDirection !== SplitDirection$1.NONE;
+ this._splittingEnabled !== o && (this._splittingEnabled = o, i = !0), i && createShaders(this, e, this._style), this._drawCommand.castShadows = ShadowMode$1.castShadows(this.shadows), this._drawCommand.receiveShadows = ShadowMode$1.receiveShadows(this.shadows);
+ const s = this._highlightColor.alpha < 1 || this._constantColor.alpha < 1 || this._styleTranslucent;
+ this._drawCommand.renderState = s ? this._translucentRenderState : this._opaqueRenderState, this._drawCommand.pass = s ? Pass$1.TRANSLUCENT : this._opaquePass;
+ const c = e.commandList, l = e.passes;
+ (l.render || l.pick) && c.push(this._drawCommand);
+};
+PointCloud.prototype.isDestroyed = function() {
+ return !1;
+};
+PointCloud.prototype.destroy = function() {
+ const e = this._drawCommand;
+ return defined(e) && (e.vertexArray = e.vertexArray && e.vertexArray.destroy(), e.shaderProgram = e.shaderProgram && e.shaderProgram.destroy()), destroyObject(this);
+};
+function QuadtreeTileProvider() {
+ DeveloperError.throwInstantiationError();
+}
+QuadtreeTileProvider.computeDefaultLevelZeroMaximumGeometricError = function(e) {
+ return e.ellipsoid.maximumRadius * 2 * Math.PI * 0.25 / (65 * e.getNumberOfXTilesAtLevel(0));
+};
+Object.defineProperties(QuadtreeTileProvider.prototype, {
+ /**
+ * Gets or sets the {@link QuadtreePrimitive} for which this provider is
+ * providing tiles.
+ * @memberof QuadtreeTileProvider.prototype
+ * @type {QuadtreePrimitive}
+ */
+ quadtree: {
+ get: DeveloperError.throwInstantiationError,
+ set: DeveloperError.throwInstantiationError
+ },
+ /**
+ * Gets the tiling scheme used by the provider.
+ * @memberof QuadtreeTileProvider.prototype
+ * @type {TilingScheme}
+ */
+ tilingScheme: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * Gets an event that is raised when the geometry provider encounters an asynchronous error. By subscribing
+ * to the event, you will be notified of the error and can potentially recover from it. Event listeners
+ * are passed an instance of {@link TileProviderError}.
+ * @memberof QuadtreeTileProvider.prototype
+ * @type {Event}
+ */
+ errorEvent: {
+ get: DeveloperError.throwInstantiationError
+ }
+});
+QuadtreeTileProvider.prototype.update = DeveloperError.throwInstantiationError;
+QuadtreeTileProvider.prototype.beginUpdate = DeveloperError.throwInstantiationError;
+QuadtreeTileProvider.prototype.endUpdate = DeveloperError.throwInstantiationError;
+QuadtreeTileProvider.prototype.getLevelMaximumGeometricError = DeveloperError.throwInstantiationError;
+QuadtreeTileProvider.prototype.loadTile = DeveloperError.throwInstantiationError;
+QuadtreeTileProvider.prototype.computeTileVisibility = DeveloperError.throwInstantiationError;
+QuadtreeTileProvider.prototype.showTileThisFrame = DeveloperError.throwInstantiationError;
+QuadtreeTileProvider.prototype.computeDistanceToTile = DeveloperError.throwInstantiationError;
+QuadtreeTileProvider.prototype.isDestroyed = DeveloperError.throwInstantiationError;
+QuadtreeTileProvider.prototype.destroy = DeveloperError.throwInstantiationError;
+function SphereEmitter(e) {
+ e = defaultValue(e, 1), this._radius = defaultValue(e, 1);
+}
+Object.defineProperties(SphereEmitter.prototype, {
+ /**
+ * The radius of the sphere in meters.
+ * @memberof SphereEmitter.prototype
+ * @type {number}
+ * @default 1.0
+ */
+ radius: {
+ get: function() {
+ return this._radius;
+ },
+ set: function(e) {
+ this._radius = e;
+ }
+ }
+});
+SphereEmitter.prototype.emit = function(e) {
+ const t = CesiumMath.randomBetween(0, CesiumMath.TWO_PI), n = CesiumMath.randomBetween(0, CesiumMath.PI), i = CesiumMath.randomBetween(0, this._radius), r = i * Math.cos(t) * Math.sin(n), o = i * Math.sin(t) * Math.sin(n), s = i * Math.cos(n);
+ e.position = Cartesian3.fromElements(r, o, s, e.position), e.velocity = Cartesian3.normalize(
+ e.position,
+ e.velocity
+ );
+};
+function StyleExpression() {
+}
+StyleExpression.prototype.evaluate = function(e, t) {
+ DeveloperError.throwInstantiationError();
+};
+StyleExpression.prototype.evaluateColor = function(e, t) {
+ DeveloperError.throwInstantiationError();
+};
+StyleExpression.prototype.getShaderFunction = function(e, t, n, i) {
+ DeveloperError.throwInstantiationError();
+};
+StyleExpression.prototype.getVariables = function() {
+ DeveloperError.throwInstantiationError();
+};
+function Terrain(e) {
+ this._ready = !1, this._provider = void 0, this._errorEvent = new Event(), this._readyEvent = new Event(), handlePromise(this, e);
+}
+Object.defineProperties(Terrain.prototype, {
+ /**
+ * Gets an event that is raised when the terrain provider encounters an asynchronous error. By subscribing
+ * to the event, you will be notified of the error and can potentially recover from it. Event listeners
+ * are passed an instance of the thrown error.
+ * @memberof Terrain.prototype
+ * @type {Eventundefined if no frame is being rendered.
+ *
+ * @memberof TimeDynamicPointCloud.prototype
+ *
+ * @type {BoundingSphere}
+ * @readonly
+ */
+ boundingSphere: {
+ get: function() {
+ if (defined(this._lastRenderedFrame))
+ return this._lastRenderedFrame.pointCloud.boundingSphere;
+ }
+ }
+});
+function getFragmentShaderLoaded(e) {
+ return `uniform vec4 czm_pickColor;
+${e}`;
+}
+function getUniformMapLoaded(e) {
+ return function(t) {
+ return combine$2(t, {
+ czm_pickColor: function() {
+ return e._pickId.color;
+ }
+ });
+ };
+}
+function getPickIdLoaded() {
+ return "czm_pickColor";
+}
+TimeDynamicPointCloud.prototype.makeStyleDirty = function() {
+ this._styleDirty = !0;
+};
+TimeDynamicPointCloud.prototype._getAverageLoadTime = function() {
+ return this._runningLength === 0 ? 0.05 : this._runningAverage;
+};
+const scratchDate = new JulianDate();
+function getClockMultiplier(e) {
+ const t = e._clock, n = t.canAnimate && t.shouldAnimate, i = t.multiplier;
+ return n ? i : 0;
+}
+function getIntervalIndex(e, t) {
+ return e._intervals.indexOf(t.start);
+}
+function getNextInterval(e, t) {
+ const n = e._intervals, i = e._clock, r = getClockMultiplier(e);
+ if (r === 0)
+ return;
+ const o = e._getAverageLoadTime(), s = JulianDate.addSeconds(
+ i.currentTime,
+ o * r,
+ scratchDate
+ );
+ let c = n.indexOf(s);
+ const l = getIntervalIndex(e, t);
+ return c === l && (r >= 0 ? ++c : --c), n.get(c);
+}
+function getCurrentInterval(e) {
+ const t = e._intervals, i = e._clock.currentTime, r = t.indexOf(i);
+ return t.get(r);
+}
+function reachedInterval(e, t, n) {
+ const i = getClockMultiplier(e), r = getIntervalIndex(e, t), o = getIntervalIndex(e, n);
+ return i >= 0 ? r >= o : r <= o;
+}
+function handleFrameFailure(e, t) {
+ return function(n) {
+ const i = defined(n.message) ? n.message : n.toString();
+ e.frameFailed.numberOfListeners > 0 ? e.frameFailed.raiseEvent({
+ uri: t,
+ message: i
+ }) : (console.log(`A frame failed to load: ${t}`), console.log(`Error: ${i}`));
+ };
+}
+function requestFrame(e, t, n) {
+ const i = getIntervalIndex(e, t), r = e._frames;
+ let o = r[i];
+ if (!defined(o)) {
+ const s = t.data.transform, c = defined(s) ? Matrix4.fromArray(s) : void 0, l = t.data.uri;
+ o = {
+ pointCloud: void 0,
+ transform: c,
+ timestamp: getTimestamp$1(),
+ sequential: !0,
+ ready: !1,
+ touchedFrameNumber: n.frameNumber,
+ uri: l
+ }, r[i] = o, Resource.fetchArrayBuffer({
+ url: l
+ }).then(function(d) {
+ o.pointCloud = new PointCloud({
+ arrayBuffer: d,
+ cull: !0,
+ fragmentShaderLoaded: getFragmentShaderLoaded,
+ uniformMapLoaded: getUniformMapLoaded(e),
+ pickIdLoaded: getPickIdLoaded
+ });
+ }).catch(handleFrameFailure(e, l));
+ }
+ return o;
+}
+function updateAverageLoadTime(e, t) {
+ e._runningSum += t, e._runningSum -= e._runningSamples[e._runningIndex], e._runningSamples[e._runningIndex] = t, e._runningLength = Math.min(
+ e._runningLength + 1,
+ e._runningSamples.length
+ ), e._runningIndex = (e._runningIndex + 1) % e._runningSamples.length, e._runningAverage = e._runningSum / e._runningLength;
+}
+function prepareFrame(e, t, n, i) {
+ t.touchedFrameNumber < i.frameNumber - 1 && (t.sequential = !1);
+ const r = t.pointCloud;
+ if (defined(r) && !t.ready) {
+ const o = i.commandList, s = o.length;
+ if (renderFrame(e, t, n, i), r.ready && (t.ready = !0, e._totalMemoryUsageInBytes += r.geometryByteLength, o.length = s, t.sequential)) {
+ const c = (getTimestamp$1() - t.timestamp) / 1e3;
+ updateAverageLoadTime(e, c);
+ }
+ }
+ t.touchedFrameNumber = i.frameNumber;
+}
+const scratchModelMatrix = new Matrix4();
+function getGeometricError(e, t) {
+ const n = e.shading;
+ return defined(n) && defined(n.baseResolution) ? n.baseResolution : defined(t.boundingSphere) ? CesiumMath.cbrt(
+ t.boundingSphere.volume() / t.pointsLength
+ ) : 0;
+}
+function getMaximumAttenuation(e) {
+ const t = e.shading;
+ return defined(t) && defined(t.maximumAttenuation) ? t.maximumAttenuation : 10;
+}
+const defaultShading = new PointCloudShading();
+function renderFrame(e, t, n, i) {
+ const r = defaultValue(e.shading, defaultShading), o = t.pointCloud, s = defaultValue(t.transform, Matrix4.IDENTITY);
+ o.modelMatrix = Matrix4.multiplyTransformation(
+ e.modelMatrix,
+ s,
+ scratchModelMatrix
+ ), o.style = e.style, o.time = n.timeSinceLoad, o.shadows = e.shadows, o.clippingPlanes = e._clippingPlanes, o.isClipped = n.isClipped, o.attenuation = r.attenuation, o.backFaceCulling = r.backFaceCulling, o.normalShading = r.normalShading, o.geometricError = getGeometricError(e, o), o.geometricErrorScale = r.geometricErrorScale, o.maximumAttenuation = getMaximumAttenuation(e);
+ try {
+ o.update(i);
+ } catch (c) {
+ handleFrameFailure(e, t.uri)(c);
+ }
+ t.touchedFrameNumber = i.frameNumber;
+}
+function loadFrame(e, t, n, i) {
+ const r = requestFrame(e, t, i);
+ prepareFrame(e, r, n, i);
+}
+function getUnloadCondition(e) {
+ return function(t) {
+ return t.touchedFrameNumber < e.frameNumber;
+ };
+}
+function unloadFrames(e, t) {
+ const n = e._frames, i = n.length;
+ for (let r = 0; r < i; ++r) {
+ const o = n[r];
+ if (defined(o) && (!defined(t) || t(o))) {
+ const s = o.pointCloud;
+ o.ready && (e._totalMemoryUsageInBytes -= s.geometryByteLength), defined(s) && s.destroy(), o === e._lastRenderedFrame && (e._lastRenderedFrame = void 0), n[r] = void 0;
+ }
+ }
+}
+function getFrame(e, t) {
+ const n = getIntervalIndex(e, t), i = e._frames[n];
+ if (defined(i) && i.ready)
+ return i;
+}
+function updateInterval(e, t, n, i, r) {
+ return defined(n) ? n.ready ? !0 : (loadFrame(e, t, i, r), n.ready) : !1;
+}
+function getNearestReadyInterval(e, t, n, i, r) {
+ let o, s, c;
+ const l = e._intervals, d = e._frames, f = getIntervalIndex(e, n), h = getIntervalIndex(e, t);
+ if (f >= h) {
+ for (o = f; o >= h; --o)
+ if (s = l.get(o), c = d[o], updateInterval(e, s, c, i, r))
+ return s;
+ } else
+ for (o = f; o <= h; ++o)
+ if (s = l.get(o), c = d[o], updateInterval(e, s, c, i, r))
+ return s;
+ return t;
+}
+function setFramesDirty(e, t, n) {
+ const i = e._frames, r = i.length;
+ for (let o = 0; o < r; ++o) {
+ const s = i[o];
+ defined(s) && defined(s.pointCloud) && (s.pointCloud.clippingPlanesDirty = t, s.pointCloud.styleDirty = n);
+ }
+}
+const updateState = {
+ timeSinceLoad: 0,
+ isClipped: !1,
+ clippingPlanesDirty: !1
+};
+TimeDynamicPointCloud.prototype.update = function(e) {
+ if (e.mode === SceneMode$1.MORPHING || !this.show)
+ return;
+ defined(this._pickId) || (this._pickId = e.context.createPickId({
+ primitive: this
+ })), defined(this._loadTimestamp) || (this._loadTimestamp = JulianDate.clone(e.time));
+ const t = Math.max(
+ JulianDate.secondsDifference(e.time, this._loadTimestamp) * 1e3,
+ 0
+ ), n = this._clippingPlanes;
+ let i = 0, r = !1;
+ const o = defined(n) && n.enabled;
+ o && (n.update(e), i = n.clippingPlanesState), this._clippingPlanesState !== i && (this._clippingPlanesState = i, r = !0);
+ const s = this._styleDirty;
+ this._styleDirty = !1, (r || s) && setFramesDirty(this, r, s), updateState.timeSinceLoad = t, updateState.isClipped = o;
+ const c = this.shading, l = this._pointCloudEyeDomeLighting, d = e.commandList, f = d.length;
+ let h = this._previousInterval, p = this._nextInterval;
+ const m = getCurrentInterval(this);
+ if (!defined(m))
+ return;
+ let _ = !1;
+ const y = getClockMultiplier(this), C = y === 0;
+ y !== this._clockMultiplier && (_ = !0, this._clockMultiplier = y), (!defined(h) || C) && (h = m), (!defined(p) || _ || reachedInterval(this, m, p)) && (p = getNextInterval(this, m)), h = getNearestReadyInterval(
+ this,
+ h,
+ m,
+ updateState,
+ e
+ );
+ let T = getFrame(this, h);
+ defined(T) || (loadFrame(this, h, updateState, e), T = this._lastRenderedFrame), defined(T) && renderFrame(this, T, updateState, e), defined(p) && loadFrame(this, p, updateState, e);
+ const x = this;
+ defined(T) && !defined(this._lastRenderedFrame) && e.afterRender.push(function() {
+ return !0;
+ }), defined(T) && T !== this._lastRenderedFrame && x.frameChanged.numberOfListeners > 0 && e.afterRender.push(function() {
+ return x.frameChanged.raiseEvent(x), !0;
+ }), this._previousInterval = h, this._nextInterval = p, this._lastRenderedFrame = T;
+ const b = this._totalMemoryUsageInBytes, S = this.maximumMemoryUsage * 1024 * 1024;
+ b > S && unloadFrames(this, getUnloadCondition(e));
+ const A = d.length - f;
+ defined(c) && c.attenuation && c.eyeDomeLighting && A > 0 && l.update(
+ e,
+ f,
+ c,
+ this.boundingSphere
+ );
+};
+TimeDynamicPointCloud.prototype.isDestroyed = function() {
+ return !1;
+};
+TimeDynamicPointCloud.prototype.destroy = function() {
+ return unloadFrames(this), this._clippingPlanes = this._clippingPlanes && this._clippingPlanes.destroy(), this._pickId = this._pickId && this._pickId.destroy(), destroyObject(this);
+};
+function ViewportQuad(e, t) {
+ this.show = !0, defined(e) || (e = new BoundingRectangle()), this.rectangle = BoundingRectangle.clone(e), defined(t) || (t = Material$4.fromType(Material$4.ColorType, {
+ color: new Color(1, 1, 1, 1)
+ })), this.material = t, this._material = void 0, this._overlayCommand = void 0, this._rs = void 0;
+}
+ViewportQuad.prototype.update = function(e) {
+ if (!this.show)
+ return;
+ const t = this._rs;
+ if ((!defined(t) || !BoundingRectangle.equals(t.viewport, this.rectangle)) && (this._rs = RenderState.fromCache({
+ blending: BlendingState$1.ALPHA_BLEND,
+ viewport: this.rectangle
+ })), e.passes.render) {
+ const i = e.context;
+ if (this._material !== this.material || !defined(this._overlayCommand)) {
+ this._material = this.material, defined(this._overlayCommand) && this._overlayCommand.shaderProgram.destroy();
+ const r = new ShaderSource({
+ sources: [this._material.shaderSource, ViewportQuadFS]
+ });
+ this._overlayCommand = i.createViewportQuadCommand(r, {
+ renderState: this._rs,
+ uniformMap: this._material._uniforms,
+ owner: this
+ }), this._overlayCommand.pass = Pass$1.OVERLAY;
+ }
+ this._material.update(i), this._overlayCommand.renderState = this._rs, this._overlayCommand.uniformMap = this._material._uniforms, e.commandList.push(this._overlayCommand);
+ }
+};
+ViewportQuad.prototype.isDestroyed = function() {
+ return !1;
+};
+ViewportQuad.prototype.destroy = function() {
+ return defined(this._overlayCommand) && (this._overlayCommand.shaderProgram = this._overlayCommand.shaderProgram && this._overlayCommand.shaderProgram.destroy()), destroyObject(this);
+};
+function VoxelProvider() {
+ DeveloperError.throwInstantiationError();
+}
+Object.defineProperties(VoxelProvider.prototype, {
+ /**
+ * A transform from local space to global space. If undefined, the identity matrix will be used instead.
+ *
+ * @memberof VoxelProvider.prototype
+ * @type {Matrix4|undefined}
+ * @readonly
+ */
+ globalTransform: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * A transform from shape space to local space. If undefined, the identity matrix will be used instead.
+ *
+ * @memberof VoxelProvider.prototype
+ * @type {Matrix4|undefined}
+ * @readonly
+ */
+ shapeTransform: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * Gets the {@link VoxelShapeType}
+ * This should not be called before {@link VoxelProvider#ready} returns true.
+ *
+ * @memberof VoxelProvider.prototype
+ * @type {VoxelShapeType}
+ * @readonly
+ */
+ shape: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * Gets the minimum bounds.
+ * If undefined, the shape's default minimum bounds will be used instead.
+ * This should not be called before {@link VoxelProvider#ready} returns true.
+ *
+ * @memberof VoxelProvider.prototype
+ * @type {Cartesian3|undefined}
+ * @readonly
+ */
+ minBounds: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * Gets the maximum bounds.
+ * If undefined, the shape's default maximum bounds will be used instead.
+ * This should not be called before {@link VoxelProvider#ready} returns true.
+ *
+ * @memberof VoxelProvider.prototype
+ * @type {Cartesian3|undefined}
+ * @readonly
+ */
+ maxBounds: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * Gets the number of voxels per dimension of a tile. This is the same for all tiles in the dataset.
+ * This should not be called before {@link VoxelProvider#ready} returns true.
+ *
+ * @memberof VoxelProvider.prototype
+ * @type {Cartesian3}
+ * @readonly
+ */
+ dimensions: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * Gets the number of padding voxels before the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
+ * This should not be called before {@link VoxelProvider#ready} returns true.
+ *
+ * @memberof VoxelProvider.prototype
+ * @type {Cartesian3|undefined}
+ * @readonly
+ */
+ paddingBefore: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * Gets the number of padding voxels after the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
+ * This should not be called before {@link VoxelProvider#ready} returns true.
+ *
+ * @memberof VoxelProvider.prototype
+ * @type {Cartesian3|undefined}
+ * @readonly
+ */
+ paddingAfter: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * Gets the metadata names.
+ * This should not be called before {@link VoxelProvider#ready} returns true.
+ *
+ * @memberof VoxelProvider.prototype
+ * @type {string[]}
+ * @readonly
+ */
+ names: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * Gets the metadata types.
+ * This should not be called before {@link VoxelProvider#ready} returns true.
+ *
+ * @memberof VoxelProvider.prototype
+ * @type {MetadataType[]}
+ * @readonly
+ */
+ types: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * Gets the metadata component types.
+ * This should not be called before {@link VoxelProvider#ready} returns true.
+ *
+ * @memberof VoxelProvider.prototype
+ * @type {MetadataComponentType[]}
+ * @readonly
+ */
+ componentTypes: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * Gets the metadata minimum values.
+ * This should not be called before {@link VoxelProvider#ready} returns true.
+ *
+ * @memberof VoxelProvider.prototype
+ * @type {number[][]|undefined}
+ * @readonly
+ */
+ minimumValues: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * Gets the metadata maximum values.
+ * This should not be called before {@link VoxelProvider#ready} returns true.
+ *
+ * @memberof VoxelProvider.prototype
+ * @type {number[][]|undefined}
+ * @readonly
+ */
+ maximumValues: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * The maximum number of tiles that exist for this provider. This value is used as a hint to the voxel renderer to allocate an appropriate amount of GPU memory. If this value is not known it can be undefined.
+ * This should not be called before {@link VoxelProvider#ready} returns true.
+ *
+ * @memberof VoxelProvider.prototype
+ * @type {number|undefined}
+ * @readonly
+ */
+ maximumTileCount: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * Gets the number of keyframes in the dataset.
+ * This should not be called before {@link VoxelProvider#ready} returns true.
+ *
+ * @memberof VoxelProvider.prototype
+ * @type {number}
+ * @readonly
+ * @private
+ */
+ keyframeCount: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * Gets the {@link TimeIntervalCollection} for the dataset, or undefined if it doesn't have timestamps.
+ * This should not be called before {@link VoxelProvider#ready} returns true.
+ *
+ * @memberof VoxelProvider.prototype
+ * @type {TimeIntervalCollection}
+ * @readonly
+ * @private
+ */
+ timeIntervalCollection: {
+ get: DeveloperError.throwInstantiationError
+ }
+});
+VoxelProvider.prototype.requestData = DeveloperError.throwInstantiationError;
+function VoxelShape() {
+ DeveloperError.throwInstantiationError();
+}
+Object.defineProperties(VoxelShape.prototype, {
+ /**
+ * An oriented bounding box containing the bounded shape.
+ * The update function must be called before accessing this value.
+ *
+ * @memberof VoxelShape.prototype
+ * @type {OrientedBoundingBox}
+ * @readonly
+ */
+ orientedBoundingBox: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * A bounding sphere containing the bounded shape.
+ * The update function must be called before accessing this value.
+ *
+ * @memberof VoxelShape.prototype
+ * @type {BoundingSphere}
+ * @readonly
+ */
+ boundingSphere: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * A transformation matrix containing the bounded shape.
+ * The update function must be called before accessing this value.
+ *
+ * @memberof VoxelShape.prototype
+ * @type {Matrix4}
+ * @readonly
+ */
+ boundTransform: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * A transformation matrix containing the shape, ignoring the bounds.
+ * The update function must be called before accessing this value.
+ *
+ * @memberof VoxelShape.prototype
+ * @type {Matrix4}
+ * @readonly
+ */
+ shapeTransform: {
+ get: DeveloperError.throwInstantiationError
+ },
+ /**
+ * @type {Object>>=p,w-=p),w<15&&(u+=R[i++]< l){e.msg="invalid distance too far back",Z.mode=a;break e}if(u>>>=p,w-=p,p=r-o,x>p){if(p=x-p,p>f&&Z.sane){e.msg="invalid distance too far back",Z.mode=a;break e}if(y=0,E=h,0===c){if(y+=d-p,p
+ *
+ * Corner has a smooth edge.
+ * @type {number}
+ * @constant
+ */
+ ROUNDED: 0,
+ /**
+ *
+ *
+ * Corner point is the intersection of adjacent edges.
+ * @type {number}
+ * @constant
+ */
+ MITERED: 1,
+ /**
+ *
+ *
+ * Corner is clipped.
+ * @type {number}
+ * @constant
+ */
+ BEVELED: 2
+};
+var CornerType_default = Object.freeze(CornerType);
+
+// packages/engine/Source/Core/oneTimeWarning.js
+var warnings = {};
+function oneTimeWarning(identifier, message) {
+ if (!defined_default(identifier)) {
+ throw new DeveloperError_default("identifier is required.");
+ }
+ if (!defined_default(warnings[identifier])) {
+ warnings[identifier] = true;
+ console.warn(defaultValue_default(message, identifier));
+ }
+}
+oneTimeWarning.geometryOutlines = "Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.";
+oneTimeWarning.geometryZIndex = "Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored";
+oneTimeWarning.geometryHeightReference = "Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored";
+oneTimeWarning.geometryExtrudedHeightReference = "Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";
+var oneTimeWarning_default = oneTimeWarning;
+
+// packages/engine/Source/Core/PolylineVolumeGeometryLibrary.js
+var scratch2Array = [new Cartesian3_default(), new Cartesian3_default()];
+var scratchCartesian1 = new Cartesian3_default();
+var scratchCartesian2 = new Cartesian3_default();
+var scratchCartesian3 = new Cartesian3_default();
+var scratchCartesian4 = new Cartesian3_default();
+var scratchCartesian5 = new Cartesian3_default();
+var scratchCartesian6 = new Cartesian3_default();
+var scratchCartesian7 = new Cartesian3_default();
+var scratchCartesian8 = new Cartesian3_default();
+var scratchCartesian9 = new Cartesian3_default();
+var scratch1 = new Cartesian3_default();
+var scratch2 = new Cartesian3_default();
+var PolylineVolumeGeometryLibrary = {};
+var cartographic = new Cartographic_default();
+function scaleToSurface(positions, ellipsoid) {
+ const heights = new Array(positions.length);
+ for (let i = 0; i < positions.length; i++) {
+ const pos = positions[i];
+ cartographic = ellipsoid.cartesianToCartographic(pos, cartographic);
+ heights[i] = cartographic.height;
+ positions[i] = ellipsoid.scaleToGeodeticSurface(pos, pos);
+ }
+ return heights;
+}
+function subdivideHeights(points, h0, h1, granularity) {
+ const p0 = points[0];
+ const p1 = points[1];
+ const angleBetween = Cartesian3_default.angleBetween(p0, p1);
+ const numPoints = Math.ceil(angleBetween / granularity);
+ const heights = new Array(numPoints);
+ let i;
+ if (h0 === h1) {
+ for (i = 0; i < numPoints; i++) {
+ heights[i] = h0;
+ }
+ heights.push(h1);
+ return heights;
+ }
+ const dHeight = h1 - h0;
+ const heightPerVertex = dHeight / numPoints;
+ for (i = 1; i < numPoints; i++) {
+ const h = h0 + i * heightPerVertex;
+ heights[i] = h;
+ }
+ heights[0] = h0;
+ heights.push(h1);
+ return heights;
+}
+var nextScratch = new Cartesian3_default();
+var prevScratch = new Cartesian3_default();
+function computeRotationAngle(start, end, position, ellipsoid) {
+ const tangentPlane = new EllipsoidTangentPlane_default(position, ellipsoid);
+ const next = tangentPlane.projectPointOntoPlane(
+ Cartesian3_default.add(position, start, nextScratch),
+ nextScratch
+ );
+ const prev = tangentPlane.projectPointOntoPlane(
+ Cartesian3_default.add(position, end, prevScratch),
+ prevScratch
+ );
+ const angle = Cartesian2_default.angleBetween(next, prev);
+ return prev.x * next.y - prev.y * next.x >= 0 ? -angle : angle;
+}
+var negativeX = new Cartesian3_default(-1, 0, 0);
+var transform = new Matrix4_default();
+var translation = new Matrix4_default();
+var rotationZ = new Matrix3_default();
+var scaleMatrix = Matrix3_default.IDENTITY.clone();
+var westScratch = new Cartesian3_default();
+var finalPosScratch = new Cartesian4_default();
+var heightCartesian = new Cartesian3_default();
+function addPosition(center, left, shape, finalPositions, ellipsoid, height, xScalar, repeat) {
+ let west = westScratch;
+ let finalPosition = finalPosScratch;
+ transform = Transforms_default.eastNorthUpToFixedFrame(center, ellipsoid, transform);
+ west = Matrix4_default.multiplyByPointAsVector(transform, negativeX, west);
+ west = Cartesian3_default.normalize(west, west);
+ const angle = computeRotationAngle(west, left, center, ellipsoid);
+ rotationZ = Matrix3_default.fromRotationZ(angle, rotationZ);
+ heightCartesian.z = height;
+ transform = Matrix4_default.multiplyTransformation(
+ transform,
+ Matrix4_default.fromRotationTranslation(rotationZ, heightCartesian, translation),
+ transform
+ );
+ const scale = scaleMatrix;
+ scale[0] = xScalar;
+ for (let j = 0; j < repeat; j++) {
+ for (let i = 0; i < shape.length; i += 3) {
+ finalPosition = Cartesian3_default.fromArray(shape, i, finalPosition);
+ finalPosition = Matrix3_default.multiplyByVector(
+ scale,
+ finalPosition,
+ finalPosition
+ );
+ finalPosition = Matrix4_default.multiplyByPoint(
+ transform,
+ finalPosition,
+ finalPosition
+ );
+ finalPositions.push(finalPosition.x, finalPosition.y, finalPosition.z);
+ }
+ }
+ return finalPositions;
+}
+var centerScratch = new Cartesian3_default();
+function addPositions(centers, left, shape, finalPositions, ellipsoid, heights, xScalar) {
+ for (let i = 0; i < centers.length; i += 3) {
+ const center = Cartesian3_default.fromArray(centers, i, centerScratch);
+ finalPositions = addPosition(
+ center,
+ left,
+ shape,
+ finalPositions,
+ ellipsoid,
+ heights[i / 3],
+ xScalar,
+ 1
+ );
+ }
+ return finalPositions;
+}
+function convertShapeTo3DDuplicate(shape2D, boundingRectangle) {
+ const length = shape2D.length;
+ const shape = new Array(length * 6);
+ let index = 0;
+ const xOffset = boundingRectangle.x + boundingRectangle.width / 2;
+ const yOffset = boundingRectangle.y + boundingRectangle.height / 2;
+ let point = shape2D[0];
+ shape[index++] = point.x - xOffset;
+ shape[index++] = 0;
+ shape[index++] = point.y - yOffset;
+ for (let i = 1; i < length; i++) {
+ point = shape2D[i];
+ const x = point.x - xOffset;
+ const z = point.y - yOffset;
+ shape[index++] = x;
+ shape[index++] = 0;
+ shape[index++] = z;
+ shape[index++] = x;
+ shape[index++] = 0;
+ shape[index++] = z;
+ }
+ point = shape2D[0];
+ shape[index++] = point.x - xOffset;
+ shape[index++] = 0;
+ shape[index++] = point.y - yOffset;
+ return shape;
+}
+function convertShapeTo3D(shape2D, boundingRectangle) {
+ const length = shape2D.length;
+ const shape = new Array(length * 3);
+ let index = 0;
+ const xOffset = boundingRectangle.x + boundingRectangle.width / 2;
+ const yOffset = boundingRectangle.y + boundingRectangle.height / 2;
+ for (let i = 0; i < length; i++) {
+ shape[index++] = shape2D[i].x - xOffset;
+ shape[index++] = 0;
+ shape[index++] = shape2D[i].y - yOffset;
+ }
+ return shape;
+}
+var quaterion = new Quaternion_default();
+var startPointScratch = new Cartesian3_default();
+var rotMatrix = new Matrix3_default();
+function computeRoundCorner(pivot, startPoint, endPoint, cornerType, leftIsOutside, ellipsoid, finalPositions, shape, height, duplicatePoints) {
+ const angle = Cartesian3_default.angleBetween(
+ Cartesian3_default.subtract(startPoint, pivot, scratch1),
+ Cartesian3_default.subtract(endPoint, pivot, scratch2)
+ );
+ const granularity = cornerType === CornerType_default.BEVELED ? 0 : Math.ceil(angle / Math_default.toRadians(5));
+ let m;
+ if (leftIsOutside) {
+ m = Matrix3_default.fromQuaternion(
+ Quaternion_default.fromAxisAngle(
+ Cartesian3_default.negate(pivot, scratch1),
+ angle / (granularity + 1),
+ quaterion
+ ),
+ rotMatrix
+ );
+ } else {
+ m = Matrix3_default.fromQuaternion(
+ Quaternion_default.fromAxisAngle(pivot, angle / (granularity + 1), quaterion),
+ rotMatrix
+ );
+ }
+ let left;
+ let surfacePoint;
+ startPoint = Cartesian3_default.clone(startPoint, startPointScratch);
+ if (granularity > 0) {
+ const repeat = duplicatePoints ? 2 : 1;
+ for (let i = 0; i < granularity; i++) {
+ startPoint = Matrix3_default.multiplyByVector(m, startPoint, startPoint);
+ left = Cartesian3_default.subtract(startPoint, pivot, scratch1);
+ left = Cartesian3_default.normalize(left, left);
+ if (!leftIsOutside) {
+ left = Cartesian3_default.negate(left, left);
+ }
+ surfacePoint = ellipsoid.scaleToGeodeticSurface(startPoint, scratch2);
+ finalPositions = addPosition(
+ surfacePoint,
+ left,
+ shape,
+ finalPositions,
+ ellipsoid,
+ height,
+ 1,
+ repeat
+ );
+ }
+ } else {
+ left = Cartesian3_default.subtract(startPoint, pivot, scratch1);
+ left = Cartesian3_default.normalize(left, left);
+ if (!leftIsOutside) {
+ left = Cartesian3_default.negate(left, left);
+ }
+ surfacePoint = ellipsoid.scaleToGeodeticSurface(startPoint, scratch2);
+ finalPositions = addPosition(
+ surfacePoint,
+ left,
+ shape,
+ finalPositions,
+ ellipsoid,
+ height,
+ 1,
+ 1
+ );
+ endPoint = Cartesian3_default.clone(endPoint, startPointScratch);
+ left = Cartesian3_default.subtract(endPoint, pivot, scratch1);
+ left = Cartesian3_default.normalize(left, left);
+ if (!leftIsOutside) {
+ left = Cartesian3_default.negate(left, left);
+ }
+ surfacePoint = ellipsoid.scaleToGeodeticSurface(endPoint, scratch2);
+ finalPositions = addPosition(
+ surfacePoint,
+ left,
+ shape,
+ finalPositions,
+ ellipsoid,
+ height,
+ 1,
+ 1
+ );
+ }
+ return finalPositions;
+}
+PolylineVolumeGeometryLibrary.removeDuplicatesFromShape = function(shapePositions) {
+ const length = shapePositions.length;
+ const cleanedPositions = [];
+ for (let i0 = length - 1, i1 = 0; i1 < length; i0 = i1++) {
+ const v0 = shapePositions[i0];
+ const v1 = shapePositions[i1];
+ if (!Cartesian2_default.equals(v0, v1)) {
+ cleanedPositions.push(v1);
+ }
+ }
+ return cleanedPositions;
+};
+PolylineVolumeGeometryLibrary.angleIsGreaterThanPi = function(forward, backward, position, ellipsoid) {
+ const tangentPlane = new EllipsoidTangentPlane_default(position, ellipsoid);
+ const next = tangentPlane.projectPointOntoPlane(
+ Cartesian3_default.add(position, forward, nextScratch),
+ nextScratch
+ );
+ const prev = tangentPlane.projectPointOntoPlane(
+ Cartesian3_default.add(position, backward, prevScratch),
+ prevScratch
+ );
+ return prev.x * next.y - prev.y * next.x >= 0;
+};
+var scratchForwardProjection = new Cartesian3_default();
+var scratchBackwardProjection = new Cartesian3_default();
+PolylineVolumeGeometryLibrary.computePositions = function(positions, shape2D, boundingRectangle, geometry, duplicatePoints) {
+ const ellipsoid = geometry._ellipsoid;
+ const heights = scaleToSurface(positions, ellipsoid);
+ const granularity = geometry._granularity;
+ const cornerType = geometry._cornerType;
+ const shapeForSides = duplicatePoints ? convertShapeTo3DDuplicate(shape2D, boundingRectangle) : convertShapeTo3D(shape2D, boundingRectangle);
+ const shapeForEnds = duplicatePoints ? convertShapeTo3D(shape2D, boundingRectangle) : void 0;
+ const heightOffset = boundingRectangle.height / 2;
+ const width = boundingRectangle.width / 2;
+ let length = positions.length;
+ let finalPositions = [];
+ let ends = duplicatePoints ? [] : void 0;
+ let forward = scratchCartesian1;
+ let backward = scratchCartesian2;
+ let cornerDirection = scratchCartesian3;
+ let surfaceNormal = scratchCartesian4;
+ let pivot = scratchCartesian5;
+ let start = scratchCartesian6;
+ let end = scratchCartesian7;
+ let left = scratchCartesian8;
+ let previousPosition = scratchCartesian9;
+ let position = positions[0];
+ let nextPosition = positions[1];
+ surfaceNormal = ellipsoid.geodeticSurfaceNormal(position, surfaceNormal);
+ forward = Cartesian3_default.subtract(nextPosition, position, forward);
+ forward = Cartesian3_default.normalize(forward, forward);
+ left = Cartesian3_default.cross(surfaceNormal, forward, left);
+ left = Cartesian3_default.normalize(left, left);
+ let h0 = heights[0];
+ let h1 = heights[1];
+ if (duplicatePoints) {
+ ends = addPosition(
+ position,
+ left,
+ shapeForEnds,
+ ends,
+ ellipsoid,
+ h0 + heightOffset,
+ 1,
+ 1
+ );
+ }
+ previousPosition = Cartesian3_default.clone(position, previousPosition);
+ position = nextPosition;
+ backward = Cartesian3_default.negate(forward, backward);
+ let subdividedHeights;
+ let subdividedPositions;
+ for (let i = 1; i < length - 1; i++) {
+ const repeat = duplicatePoints ? 2 : 1;
+ nextPosition = positions[i + 1];
+ if (position.equals(nextPosition)) {
+ oneTimeWarning_default(
+ "Positions are too close and are considered equivalent with rounding error."
+ );
+ continue;
+ }
+ forward = Cartesian3_default.subtract(nextPosition, position, forward);
+ forward = Cartesian3_default.normalize(forward, forward);
+ cornerDirection = Cartesian3_default.add(forward, backward, cornerDirection);
+ cornerDirection = Cartesian3_default.normalize(cornerDirection, cornerDirection);
+ surfaceNormal = ellipsoid.geodeticSurfaceNormal(position, surfaceNormal);
+ const forwardProjection = Cartesian3_default.multiplyByScalar(
+ surfaceNormal,
+ Cartesian3_default.dot(forward, surfaceNormal),
+ scratchForwardProjection
+ );
+ Cartesian3_default.subtract(forward, forwardProjection, forwardProjection);
+ Cartesian3_default.normalize(forwardProjection, forwardProjection);
+ const backwardProjection = Cartesian3_default.multiplyByScalar(
+ surfaceNormal,
+ Cartesian3_default.dot(backward, surfaceNormal),
+ scratchBackwardProjection
+ );
+ Cartesian3_default.subtract(backward, backwardProjection, backwardProjection);
+ Cartesian3_default.normalize(backwardProjection, backwardProjection);
+ const doCorner = !Math_default.equalsEpsilon(
+ Math.abs(Cartesian3_default.dot(forwardProjection, backwardProjection)),
+ 1,
+ Math_default.EPSILON7
+ );
+ if (doCorner) {
+ cornerDirection = Cartesian3_default.cross(
+ cornerDirection,
+ surfaceNormal,
+ cornerDirection
+ );
+ cornerDirection = Cartesian3_default.cross(
+ surfaceNormal,
+ cornerDirection,
+ cornerDirection
+ );
+ cornerDirection = Cartesian3_default.normalize(cornerDirection, cornerDirection);
+ const scalar = 1 / Math.max(
+ 0.25,
+ Cartesian3_default.magnitude(
+ Cartesian3_default.cross(cornerDirection, backward, scratch1)
+ )
+ );
+ const leftIsOutside = PolylineVolumeGeometryLibrary.angleIsGreaterThanPi(
+ forward,
+ backward,
+ position,
+ ellipsoid
+ );
+ if (leftIsOutside) {
+ pivot = Cartesian3_default.add(
+ position,
+ Cartesian3_default.multiplyByScalar(
+ cornerDirection,
+ scalar * width,
+ cornerDirection
+ ),
+ pivot
+ );
+ start = Cartesian3_default.add(
+ pivot,
+ Cartesian3_default.multiplyByScalar(left, width, start),
+ start
+ );
+ scratch2Array[0] = Cartesian3_default.clone(previousPosition, scratch2Array[0]);
+ scratch2Array[1] = Cartesian3_default.clone(start, scratch2Array[1]);
+ subdividedHeights = subdivideHeights(
+ scratch2Array,
+ h0 + heightOffset,
+ h1 + heightOffset,
+ granularity
+ );
+ subdividedPositions = PolylinePipeline_default.generateArc({
+ positions: scratch2Array,
+ granularity,
+ ellipsoid
+ });
+ finalPositions = addPositions(
+ subdividedPositions,
+ left,
+ shapeForSides,
+ finalPositions,
+ ellipsoid,
+ subdividedHeights,
+ 1
+ );
+ left = Cartesian3_default.cross(surfaceNormal, forward, left);
+ left = Cartesian3_default.normalize(left, left);
+ end = Cartesian3_default.add(
+ pivot,
+ Cartesian3_default.multiplyByScalar(left, width, end),
+ end
+ );
+ if (cornerType === CornerType_default.ROUNDED || cornerType === CornerType_default.BEVELED) {
+ computeRoundCorner(
+ pivot,
+ start,
+ end,
+ cornerType,
+ leftIsOutside,
+ ellipsoid,
+ finalPositions,
+ shapeForSides,
+ h1 + heightOffset,
+ duplicatePoints
+ );
+ } else {
+ cornerDirection = Cartesian3_default.negate(cornerDirection, cornerDirection);
+ finalPositions = addPosition(
+ position,
+ cornerDirection,
+ shapeForSides,
+ finalPositions,
+ ellipsoid,
+ h1 + heightOffset,
+ scalar,
+ repeat
+ );
+ }
+ previousPosition = Cartesian3_default.clone(end, previousPosition);
+ } else {
+ pivot = Cartesian3_default.add(
+ position,
+ Cartesian3_default.multiplyByScalar(
+ cornerDirection,
+ scalar * width,
+ cornerDirection
+ ),
+ pivot
+ );
+ start = Cartesian3_default.add(
+ pivot,
+ Cartesian3_default.multiplyByScalar(left, -width, start),
+ start
+ );
+ scratch2Array[0] = Cartesian3_default.clone(previousPosition, scratch2Array[0]);
+ scratch2Array[1] = Cartesian3_default.clone(start, scratch2Array[1]);
+ subdividedHeights = subdivideHeights(
+ scratch2Array,
+ h0 + heightOffset,
+ h1 + heightOffset,
+ granularity
+ );
+ subdividedPositions = PolylinePipeline_default.generateArc({
+ positions: scratch2Array,
+ granularity,
+ ellipsoid
+ });
+ finalPositions = addPositions(
+ subdividedPositions,
+ left,
+ shapeForSides,
+ finalPositions,
+ ellipsoid,
+ subdividedHeights,
+ 1
+ );
+ left = Cartesian3_default.cross(surfaceNormal, forward, left);
+ left = Cartesian3_default.normalize(left, left);
+ end = Cartesian3_default.add(
+ pivot,
+ Cartesian3_default.multiplyByScalar(left, -width, end),
+ end
+ );
+ if (cornerType === CornerType_default.ROUNDED || cornerType === CornerType_default.BEVELED) {
+ computeRoundCorner(
+ pivot,
+ start,
+ end,
+ cornerType,
+ leftIsOutside,
+ ellipsoid,
+ finalPositions,
+ shapeForSides,
+ h1 + heightOffset,
+ duplicatePoints
+ );
+ } else {
+ finalPositions = addPosition(
+ position,
+ cornerDirection,
+ shapeForSides,
+ finalPositions,
+ ellipsoid,
+ h1 + heightOffset,
+ scalar,
+ repeat
+ );
+ }
+ previousPosition = Cartesian3_default.clone(end, previousPosition);
+ }
+ backward = Cartesian3_default.negate(forward, backward);
+ } else {
+ finalPositions = addPosition(
+ previousPosition,
+ left,
+ shapeForSides,
+ finalPositions,
+ ellipsoid,
+ h0 + heightOffset,
+ 1,
+ 1
+ );
+ previousPosition = position;
+ }
+ h0 = h1;
+ h1 = heights[i + 1];
+ position = nextPosition;
+ }
+ scratch2Array[0] = Cartesian3_default.clone(previousPosition, scratch2Array[0]);
+ scratch2Array[1] = Cartesian3_default.clone(position, scratch2Array[1]);
+ subdividedHeights = subdivideHeights(
+ scratch2Array,
+ h0 + heightOffset,
+ h1 + heightOffset,
+ granularity
+ );
+ subdividedPositions = PolylinePipeline_default.generateArc({
+ positions: scratch2Array,
+ granularity,
+ ellipsoid
+ });
+ finalPositions = addPositions(
+ subdividedPositions,
+ left,
+ shapeForSides,
+ finalPositions,
+ ellipsoid,
+ subdividedHeights,
+ 1
+ );
+ if (duplicatePoints) {
+ ends = addPosition(
+ position,
+ left,
+ shapeForEnds,
+ ends,
+ ellipsoid,
+ h1 + heightOffset,
+ 1,
+ 1
+ );
+ }
+ length = finalPositions.length;
+ const posLength = duplicatePoints ? length + ends.length : length;
+ const combinedPositions = new Float64Array(posLength);
+ combinedPositions.set(finalPositions);
+ if (duplicatePoints) {
+ combinedPositions.set(ends, length);
+ }
+ return combinedPositions;
+};
+var PolylineVolumeGeometryLibrary_default = PolylineVolumeGeometryLibrary;
+
+export {
+ CornerType_default,
+ oneTimeWarning_default,
+ PolylineVolumeGeometryLibrary_default
+};
diff --git a/public/assets/cesium/Workers/chunk-44QAAS4P.js b/public/assets/cesium/Workers/chunk-44QAAS4P.js
new file mode 100644
index 0000000000000000000000000000000000000000..296e62a9d47dc3dca641de59b57b6330d48f29f5
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-44QAAS4P.js
@@ -0,0 +1,220 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ GeographicProjection_default,
+ Intersect_default
+} from "./chunk-KHZNBFOH.js";
+import {
+ Rectangle_default
+} from "./chunk-6SQMLVGV.js";
+import {
+ Cartesian2_default,
+ Cartographic_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/BoundingRectangle.js
+function BoundingRectangle(x, y, width, height) {
+ this.x = defaultValue_default(x, 0);
+ this.y = defaultValue_default(y, 0);
+ this.width = defaultValue_default(width, 0);
+ this.height = defaultValue_default(height, 0);
+}
+BoundingRectangle.packedLength = 4;
+BoundingRectangle.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ array[startingIndex++] = value.x;
+ array[startingIndex++] = value.y;
+ array[startingIndex++] = value.width;
+ array[startingIndex] = value.height;
+ return array;
+};
+BoundingRectangle.unpack = function(array, startingIndex, result) {
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ if (!defined_default(result)) {
+ result = new BoundingRectangle();
+ }
+ result.x = array[startingIndex++];
+ result.y = array[startingIndex++];
+ result.width = array[startingIndex++];
+ result.height = array[startingIndex];
+ return result;
+};
+BoundingRectangle.fromPoints = function(positions, result) {
+ if (!defined_default(result)) {
+ result = new BoundingRectangle();
+ }
+ if (!defined_default(positions) || positions.length === 0) {
+ result.x = 0;
+ result.y = 0;
+ result.width = 0;
+ result.height = 0;
+ return result;
+ }
+ const length = positions.length;
+ let minimumX = positions[0].x;
+ let minimumY = positions[0].y;
+ let maximumX = positions[0].x;
+ let maximumY = positions[0].y;
+ for (let i = 1; i < length; i++) {
+ const p = positions[i];
+ const x = p.x;
+ const y = p.y;
+ minimumX = Math.min(x, minimumX);
+ maximumX = Math.max(x, maximumX);
+ minimumY = Math.min(y, minimumY);
+ maximumY = Math.max(y, maximumY);
+ }
+ result.x = minimumX;
+ result.y = minimumY;
+ result.width = maximumX - minimumX;
+ result.height = maximumY - minimumY;
+ return result;
+};
+var defaultProjection = new GeographicProjection_default();
+var fromRectangleLowerLeft = new Cartographic_default();
+var fromRectangleUpperRight = new Cartographic_default();
+BoundingRectangle.fromRectangle = function(rectangle, projection, result) {
+ if (!defined_default(result)) {
+ result = new BoundingRectangle();
+ }
+ if (!defined_default(rectangle)) {
+ result.x = 0;
+ result.y = 0;
+ result.width = 0;
+ result.height = 0;
+ return result;
+ }
+ defaultProjection._ellipsoid = Ellipsoid_default.default;
+ projection = defaultValue_default(projection, defaultProjection);
+ const lowerLeft = projection.project(
+ Rectangle_default.southwest(rectangle, fromRectangleLowerLeft)
+ );
+ const upperRight = projection.project(
+ Rectangle_default.northeast(rectangle, fromRectangleUpperRight)
+ );
+ Cartesian2_default.subtract(upperRight, lowerLeft, upperRight);
+ result.x = lowerLeft.x;
+ result.y = lowerLeft.y;
+ result.width = upperRight.x;
+ result.height = upperRight.y;
+ return result;
+};
+BoundingRectangle.clone = function(rectangle, result) {
+ if (!defined_default(rectangle)) {
+ return void 0;
+ }
+ if (!defined_default(result)) {
+ return new BoundingRectangle(
+ rectangle.x,
+ rectangle.y,
+ rectangle.width,
+ rectangle.height
+ );
+ }
+ result.x = rectangle.x;
+ result.y = rectangle.y;
+ result.width = rectangle.width;
+ result.height = rectangle.height;
+ return result;
+};
+BoundingRectangle.union = function(left, right, result) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ if (!defined_default(result)) {
+ result = new BoundingRectangle();
+ }
+ const lowerLeftX = Math.min(left.x, right.x);
+ const lowerLeftY = Math.min(left.y, right.y);
+ const upperRightX = Math.max(left.x + left.width, right.x + right.width);
+ const upperRightY = Math.max(left.y + left.height, right.y + right.height);
+ result.x = lowerLeftX;
+ result.y = lowerLeftY;
+ result.width = upperRightX - lowerLeftX;
+ result.height = upperRightY - lowerLeftY;
+ return result;
+};
+BoundingRectangle.expand = function(rectangle, point, result) {
+ Check_default.typeOf.object("rectangle", rectangle);
+ Check_default.typeOf.object("point", point);
+ result = BoundingRectangle.clone(rectangle, result);
+ const width = point.x - result.x;
+ const height = point.y - result.y;
+ if (width > result.width) {
+ result.width = width;
+ } else if (width < 0) {
+ result.width -= width;
+ result.x = point.x;
+ }
+ if (height > result.height) {
+ result.height = height;
+ } else if (height < 0) {
+ result.height -= height;
+ result.y = point.y;
+ }
+ return result;
+};
+BoundingRectangle.intersect = function(left, right) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ const leftX = left.x;
+ const leftY = left.y;
+ const rightX = right.x;
+ const rightY = right.y;
+ if (!(leftX > rightX + right.width || leftX + left.width < rightX || leftY + left.height < rightY || leftY > rightY + right.height)) {
+ return Intersect_default.INTERSECTING;
+ }
+ return Intersect_default.OUTSIDE;
+};
+BoundingRectangle.equals = function(left, right) {
+ return left === right || defined_default(left) && defined_default(right) && left.x === right.x && left.y === right.y && left.width === right.width && left.height === right.height;
+};
+BoundingRectangle.prototype.clone = function(result) {
+ return BoundingRectangle.clone(this, result);
+};
+BoundingRectangle.prototype.intersect = function(right) {
+ return BoundingRectangle.intersect(this, right);
+};
+BoundingRectangle.prototype.equals = function(right) {
+ return BoundingRectangle.equals(this, right);
+};
+var BoundingRectangle_default = BoundingRectangle;
+
+export {
+ BoundingRectangle_default
+};
diff --git a/public/assets/cesium/Workers/chunk-56EDBCGT.js b/public/assets/cesium/Workers/chunk-56EDBCGT.js
new file mode 100644
index 0000000000000000000000000000000000000000..95e33b97b16d5beeb73c2540f0e6582655ed1004
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-56EDBCGT.js
@@ -0,0 +1,768 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ AttributeCompression_default
+} from "./chunk-LJ2JQHJT.js";
+import {
+ BoundingSphere_default
+} from "./chunk-KHZNBFOH.js";
+import {
+ Matrix4_default,
+ Rectangle_default
+} from "./chunk-6SQMLVGV.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian2_default,
+ Cartesian3_default,
+ Cartographic_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default,
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/EllipsoidalOccluder.js
+function EllipsoidalOccluder(ellipsoid, cameraPosition) {
+ Check_default.typeOf.object("ellipsoid", ellipsoid);
+ this._ellipsoid = ellipsoid;
+ this._cameraPosition = new Cartesian3_default();
+ this._cameraPositionInScaledSpace = new Cartesian3_default();
+ this._distanceToLimbInScaledSpaceSquared = 0;
+ if (defined_default(cameraPosition)) {
+ this.cameraPosition = cameraPosition;
+ }
+}
+Object.defineProperties(EllipsoidalOccluder.prototype, {
+ /**
+ * Gets the occluding ellipsoid.
+ * @memberof EllipsoidalOccluder.prototype
+ * @type {Ellipsoid}
+ */
+ ellipsoid: {
+ get: function() {
+ return this._ellipsoid;
+ }
+ },
+ /**
+ * Gets or sets the position of the camera.
+ * @memberof EllipsoidalOccluder.prototype
+ * @type {Cartesian3}
+ */
+ cameraPosition: {
+ get: function() {
+ return this._cameraPosition;
+ },
+ set: function(cameraPosition) {
+ const ellipsoid = this._ellipsoid;
+ const cv = ellipsoid.transformPositionToScaledSpace(
+ cameraPosition,
+ this._cameraPositionInScaledSpace
+ );
+ const vhMagnitudeSquared = Cartesian3_default.magnitudeSquared(cv) - 1;
+ Cartesian3_default.clone(cameraPosition, this._cameraPosition);
+ this._cameraPositionInScaledSpace = cv;
+ this._distanceToLimbInScaledSpaceSquared = vhMagnitudeSquared;
+ }
+ }
+});
+var scratchCartesian = new Cartesian3_default();
+EllipsoidalOccluder.prototype.isPointVisible = function(occludee) {
+ const ellipsoid = this._ellipsoid;
+ const occludeeScaledSpacePosition = ellipsoid.transformPositionToScaledSpace(
+ occludee,
+ scratchCartesian
+ );
+ return isScaledSpacePointVisible(
+ occludeeScaledSpacePosition,
+ this._cameraPositionInScaledSpace,
+ this._distanceToLimbInScaledSpaceSquared
+ );
+};
+EllipsoidalOccluder.prototype.isScaledSpacePointVisible = function(occludeeScaledSpacePosition) {
+ return isScaledSpacePointVisible(
+ occludeeScaledSpacePosition,
+ this._cameraPositionInScaledSpace,
+ this._distanceToLimbInScaledSpaceSquared
+ );
+};
+var scratchCameraPositionInScaledSpaceShrunk = new Cartesian3_default();
+EllipsoidalOccluder.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid = function(occludeeScaledSpacePosition, minimumHeight) {
+ const ellipsoid = this._ellipsoid;
+ let vhMagnitudeSquared;
+ let cv;
+ if (defined_default(minimumHeight) && minimumHeight < 0 && ellipsoid.minimumRadius > -minimumHeight) {
+ cv = scratchCameraPositionInScaledSpaceShrunk;
+ cv.x = this._cameraPosition.x / (ellipsoid.radii.x + minimumHeight);
+ cv.y = this._cameraPosition.y / (ellipsoid.radii.y + minimumHeight);
+ cv.z = this._cameraPosition.z / (ellipsoid.radii.z + minimumHeight);
+ vhMagnitudeSquared = cv.x * cv.x + cv.y * cv.y + cv.z * cv.z - 1;
+ } else {
+ cv = this._cameraPositionInScaledSpace;
+ vhMagnitudeSquared = this._distanceToLimbInScaledSpaceSquared;
+ }
+ return isScaledSpacePointVisible(
+ occludeeScaledSpacePosition,
+ cv,
+ vhMagnitudeSquared
+ );
+};
+EllipsoidalOccluder.prototype.computeHorizonCullingPoint = function(directionToPoint, positions, result) {
+ return computeHorizonCullingPointFromPositions(
+ this._ellipsoid,
+ directionToPoint,
+ positions,
+ result
+ );
+};
+var scratchEllipsoidShrunk = Ellipsoid_default.clone(Ellipsoid_default.UNIT_SPHERE);
+EllipsoidalOccluder.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid = function(directionToPoint, positions, minimumHeight, result) {
+ const possiblyShrunkEllipsoid = getPossiblyShrunkEllipsoid(
+ this._ellipsoid,
+ minimumHeight,
+ scratchEllipsoidShrunk
+ );
+ return computeHorizonCullingPointFromPositions(
+ possiblyShrunkEllipsoid,
+ directionToPoint,
+ positions,
+ result
+ );
+};
+EllipsoidalOccluder.prototype.computeHorizonCullingPointFromVertices = function(directionToPoint, vertices, stride, center, result) {
+ return computeHorizonCullingPointFromVertices(
+ this._ellipsoid,
+ directionToPoint,
+ vertices,
+ stride,
+ center,
+ result
+ );
+};
+EllipsoidalOccluder.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid = function(directionToPoint, vertices, stride, center, minimumHeight, result) {
+ const possiblyShrunkEllipsoid = getPossiblyShrunkEllipsoid(
+ this._ellipsoid,
+ minimumHeight,
+ scratchEllipsoidShrunk
+ );
+ return computeHorizonCullingPointFromVertices(
+ possiblyShrunkEllipsoid,
+ directionToPoint,
+ vertices,
+ stride,
+ center,
+ result
+ );
+};
+var subsampleScratch = [];
+EllipsoidalOccluder.prototype.computeHorizonCullingPointFromRectangle = function(rectangle, ellipsoid, result) {
+ Check_default.typeOf.object("rectangle", rectangle);
+ const positions = Rectangle_default.subsample(
+ rectangle,
+ ellipsoid,
+ 0,
+ subsampleScratch
+ );
+ const bs = BoundingSphere_default.fromPoints(positions);
+ if (Cartesian3_default.magnitude(bs.center) < 0.1 * ellipsoid.minimumRadius) {
+ return void 0;
+ }
+ return this.computeHorizonCullingPoint(bs.center, positions, result);
+};
+var scratchEllipsoidShrunkRadii = new Cartesian3_default();
+function getPossiblyShrunkEllipsoid(ellipsoid, minimumHeight, result) {
+ if (defined_default(minimumHeight) && minimumHeight < 0 && ellipsoid.minimumRadius > -minimumHeight) {
+ const ellipsoidShrunkRadii = Cartesian3_default.fromElements(
+ ellipsoid.radii.x + minimumHeight,
+ ellipsoid.radii.y + minimumHeight,
+ ellipsoid.radii.z + minimumHeight,
+ scratchEllipsoidShrunkRadii
+ );
+ ellipsoid = Ellipsoid_default.fromCartesian3(ellipsoidShrunkRadii, result);
+ }
+ return ellipsoid;
+}
+function computeHorizonCullingPointFromPositions(ellipsoid, directionToPoint, positions, result) {
+ Check_default.typeOf.object("directionToPoint", directionToPoint);
+ Check_default.defined("positions", positions);
+ if (!defined_default(result)) {
+ result = new Cartesian3_default();
+ }
+ const scaledSpaceDirectionToPoint = computeScaledSpaceDirectionToPoint(
+ ellipsoid,
+ directionToPoint
+ );
+ let resultMagnitude = 0;
+ for (let i = 0, len = positions.length; i < len; ++i) {
+ const position = positions[i];
+ const candidateMagnitude = computeMagnitude(
+ ellipsoid,
+ position,
+ scaledSpaceDirectionToPoint
+ );
+ if (candidateMagnitude < 0) {
+ return void 0;
+ }
+ resultMagnitude = Math.max(resultMagnitude, candidateMagnitude);
+ }
+ return magnitudeToPoint(scaledSpaceDirectionToPoint, resultMagnitude, result);
+}
+var positionScratch = new Cartesian3_default();
+function computeHorizonCullingPointFromVertices(ellipsoid, directionToPoint, vertices, stride, center, result) {
+ Check_default.typeOf.object("directionToPoint", directionToPoint);
+ Check_default.defined("vertices", vertices);
+ Check_default.typeOf.number("stride", stride);
+ if (!defined_default(result)) {
+ result = new Cartesian3_default();
+ }
+ stride = defaultValue_default(stride, 3);
+ center = defaultValue_default(center, Cartesian3_default.ZERO);
+ const scaledSpaceDirectionToPoint = computeScaledSpaceDirectionToPoint(
+ ellipsoid,
+ directionToPoint
+ );
+ let resultMagnitude = 0;
+ for (let i = 0, len = vertices.length; i < len; i += stride) {
+ positionScratch.x = vertices[i] + center.x;
+ positionScratch.y = vertices[i + 1] + center.y;
+ positionScratch.z = vertices[i + 2] + center.z;
+ const candidateMagnitude = computeMagnitude(
+ ellipsoid,
+ positionScratch,
+ scaledSpaceDirectionToPoint
+ );
+ if (candidateMagnitude < 0) {
+ return void 0;
+ }
+ resultMagnitude = Math.max(resultMagnitude, candidateMagnitude);
+ }
+ return magnitudeToPoint(scaledSpaceDirectionToPoint, resultMagnitude, result);
+}
+function isScaledSpacePointVisible(occludeeScaledSpacePosition, cameraPositionInScaledSpace, distanceToLimbInScaledSpaceSquared) {
+ const cv = cameraPositionInScaledSpace;
+ const vhMagnitudeSquared = distanceToLimbInScaledSpaceSquared;
+ const vt = Cartesian3_default.subtract(
+ occludeeScaledSpacePosition,
+ cv,
+ scratchCartesian
+ );
+ const vtDotVc = -Cartesian3_default.dot(vt, cv);
+ const isOccluded = vhMagnitudeSquared < 0 ? vtDotVc > 0 : vtDotVc > vhMagnitudeSquared && vtDotVc * vtDotVc / Cartesian3_default.magnitudeSquared(vt) > vhMagnitudeSquared;
+ return !isOccluded;
+}
+var scaledSpaceScratch = new Cartesian3_default();
+var directionScratch = new Cartesian3_default();
+function computeMagnitude(ellipsoid, position, scaledSpaceDirectionToPoint) {
+ const scaledSpacePosition = ellipsoid.transformPositionToScaledSpace(
+ position,
+ scaledSpaceScratch
+ );
+ let magnitudeSquared = Cartesian3_default.magnitudeSquared(scaledSpacePosition);
+ let magnitude = Math.sqrt(magnitudeSquared);
+ const direction = Cartesian3_default.divideByScalar(
+ scaledSpacePosition,
+ magnitude,
+ directionScratch
+ );
+ magnitudeSquared = Math.max(1, magnitudeSquared);
+ magnitude = Math.max(1, magnitude);
+ const cosAlpha = Cartesian3_default.dot(direction, scaledSpaceDirectionToPoint);
+ const sinAlpha = Cartesian3_default.magnitude(
+ Cartesian3_default.cross(direction, scaledSpaceDirectionToPoint, direction)
+ );
+ const cosBeta = 1 / magnitude;
+ const sinBeta = Math.sqrt(magnitudeSquared - 1) * cosBeta;
+ return 1 / (cosAlpha * cosBeta - sinAlpha * sinBeta);
+}
+function magnitudeToPoint(scaledSpaceDirectionToPoint, resultMagnitude, result) {
+ if (resultMagnitude <= 0 || resultMagnitude === 1 / 0 || resultMagnitude !== resultMagnitude) {
+ return void 0;
+ }
+ return Cartesian3_default.multiplyByScalar(
+ scaledSpaceDirectionToPoint,
+ resultMagnitude,
+ result
+ );
+}
+var directionToPointScratch = new Cartesian3_default();
+function computeScaledSpaceDirectionToPoint(ellipsoid, directionToPoint) {
+ if (Cartesian3_default.equals(directionToPoint, Cartesian3_default.ZERO)) {
+ return directionToPoint;
+ }
+ ellipsoid.transformPositionToScaledSpace(
+ directionToPoint,
+ directionToPointScratch
+ );
+ return Cartesian3_default.normalize(directionToPointScratch, directionToPointScratch);
+}
+var EllipsoidalOccluder_default = EllipsoidalOccluder;
+
+// packages/engine/Source/Core/VerticalExaggeration.js
+var VerticalExaggeration = {};
+VerticalExaggeration.getHeight = function(height, scale, relativeHeight) {
+ if (!Number.isFinite(scale)) {
+ throw new DeveloperError_default("scale must be a finite number.");
+ }
+ if (!Number.isFinite(relativeHeight)) {
+ throw new DeveloperError_default("relativeHeight must be a finite number.");
+ }
+ return (height - relativeHeight) * scale + relativeHeight;
+};
+var scratchCartographic = new Cartographic_default();
+VerticalExaggeration.getPosition = function(position, ellipsoid, verticalExaggeration, verticalExaggerationRelativeHeight, result) {
+ const cartographic = ellipsoid.cartesianToCartographic(
+ position,
+ scratchCartographic
+ );
+ if (!defined_default(cartographic)) {
+ return Cartesian3_default.clone(position, result);
+ }
+ const newHeight = VerticalExaggeration.getHeight(
+ cartographic.height,
+ verticalExaggeration,
+ verticalExaggerationRelativeHeight
+ );
+ return Cartesian3_default.fromRadians(
+ cartographic.longitude,
+ cartographic.latitude,
+ newHeight,
+ ellipsoid,
+ result
+ );
+};
+var VerticalExaggeration_default = VerticalExaggeration;
+
+// packages/engine/Source/Core/TerrainQuantization.js
+var TerrainQuantization = {
+ /**
+ * The vertices are not compressed.
+ *
+ * @type {number}
+ * @constant
+ */
+ NONE: 0,
+ /**
+ * The vertices are compressed to 12 bits.
+ *
+ * @type {number}
+ * @constant
+ */
+ BITS12: 1
+};
+var TerrainQuantization_default = Object.freeze(TerrainQuantization);
+
+// packages/engine/Source/Core/TerrainEncoding.js
+var cartesian3Scratch = new Cartesian3_default();
+var cartesian3DimScratch = new Cartesian3_default();
+var cartesian2Scratch = new Cartesian2_default();
+var matrix4Scratch = new Matrix4_default();
+var matrix4Scratch2 = new Matrix4_default();
+var SHIFT_LEFT_12 = Math.pow(2, 12);
+function TerrainEncoding(center, axisAlignedBoundingBox, minimumHeight, maximumHeight, fromENU, hasVertexNormals, hasWebMercatorT, hasGeodeticSurfaceNormals, exaggeration, exaggerationRelativeHeight) {
+ let quantization = TerrainQuantization_default.NONE;
+ let toENU;
+ let matrix;
+ if (defined_default(axisAlignedBoundingBox) && defined_default(minimumHeight) && defined_default(maximumHeight) && defined_default(fromENU)) {
+ const minimum = axisAlignedBoundingBox.minimum;
+ const maximum = axisAlignedBoundingBox.maximum;
+ const dimensions = Cartesian3_default.subtract(
+ maximum,
+ minimum,
+ cartesian3DimScratch
+ );
+ const hDim = maximumHeight - minimumHeight;
+ const maxDim = Math.max(Cartesian3_default.maximumComponent(dimensions), hDim);
+ if (maxDim < SHIFT_LEFT_12 - 1) {
+ quantization = TerrainQuantization_default.BITS12;
+ } else {
+ quantization = TerrainQuantization_default.NONE;
+ }
+ toENU = Matrix4_default.inverseTransformation(fromENU, new Matrix4_default());
+ const translation = Cartesian3_default.negate(minimum, cartesian3Scratch);
+ Matrix4_default.multiply(
+ Matrix4_default.fromTranslation(translation, matrix4Scratch),
+ toENU,
+ toENU
+ );
+ const scale = cartesian3Scratch;
+ scale.x = 1 / dimensions.x;
+ scale.y = 1 / dimensions.y;
+ scale.z = 1 / dimensions.z;
+ Matrix4_default.multiply(Matrix4_default.fromScale(scale, matrix4Scratch), toENU, toENU);
+ matrix = Matrix4_default.clone(fromENU);
+ Matrix4_default.setTranslation(matrix, Cartesian3_default.ZERO, matrix);
+ fromENU = Matrix4_default.clone(fromENU, new Matrix4_default());
+ const translationMatrix = Matrix4_default.fromTranslation(minimum, matrix4Scratch);
+ const scaleMatrix = Matrix4_default.fromScale(dimensions, matrix4Scratch2);
+ const st = Matrix4_default.multiply(translationMatrix, scaleMatrix, matrix4Scratch);
+ Matrix4_default.multiply(fromENU, st, fromENU);
+ Matrix4_default.multiply(matrix, st, matrix);
+ }
+ this.quantization = quantization;
+ this.minimumHeight = minimumHeight;
+ this.maximumHeight = maximumHeight;
+ this.center = Cartesian3_default.clone(center);
+ this.toScaledENU = toENU;
+ this.fromScaledENU = fromENU;
+ this.matrix = matrix;
+ this.hasVertexNormals = hasVertexNormals;
+ this.hasWebMercatorT = defaultValue_default(hasWebMercatorT, false);
+ this.hasGeodeticSurfaceNormals = defaultValue_default(
+ hasGeodeticSurfaceNormals,
+ false
+ );
+ this.exaggeration = defaultValue_default(exaggeration, 1);
+ this.exaggerationRelativeHeight = defaultValue_default(
+ exaggerationRelativeHeight,
+ 0
+ );
+ this.stride = 0;
+ this._offsetGeodeticSurfaceNormal = 0;
+ this._offsetVertexNormal = 0;
+ this._calculateStrideAndOffsets();
+}
+TerrainEncoding.prototype.encode = function(vertexBuffer, bufferIndex, position, uv, height, normalToPack, webMercatorT, geodeticSurfaceNormal) {
+ const u = uv.x;
+ const v = uv.y;
+ if (this.quantization === TerrainQuantization_default.BITS12) {
+ position = Matrix4_default.multiplyByPoint(
+ this.toScaledENU,
+ position,
+ cartesian3Scratch
+ );
+ position.x = Math_default.clamp(position.x, 0, 1);
+ position.y = Math_default.clamp(position.y, 0, 1);
+ position.z = Math_default.clamp(position.z, 0, 1);
+ const hDim = this.maximumHeight - this.minimumHeight;
+ const h = Math_default.clamp((height - this.minimumHeight) / hDim, 0, 1);
+ Cartesian2_default.fromElements(position.x, position.y, cartesian2Scratch);
+ const compressed0 = AttributeCompression_default.compressTextureCoordinates(
+ cartesian2Scratch
+ );
+ Cartesian2_default.fromElements(position.z, h, cartesian2Scratch);
+ const compressed1 = AttributeCompression_default.compressTextureCoordinates(
+ cartesian2Scratch
+ );
+ Cartesian2_default.fromElements(u, v, cartesian2Scratch);
+ const compressed2 = AttributeCompression_default.compressTextureCoordinates(
+ cartesian2Scratch
+ );
+ vertexBuffer[bufferIndex++] = compressed0;
+ vertexBuffer[bufferIndex++] = compressed1;
+ vertexBuffer[bufferIndex++] = compressed2;
+ if (this.hasWebMercatorT) {
+ Cartesian2_default.fromElements(webMercatorT, 0, cartesian2Scratch);
+ const compressed3 = AttributeCompression_default.compressTextureCoordinates(
+ cartesian2Scratch
+ );
+ vertexBuffer[bufferIndex++] = compressed3;
+ }
+ } else {
+ Cartesian3_default.subtract(position, this.center, cartesian3Scratch);
+ vertexBuffer[bufferIndex++] = cartesian3Scratch.x;
+ vertexBuffer[bufferIndex++] = cartesian3Scratch.y;
+ vertexBuffer[bufferIndex++] = cartesian3Scratch.z;
+ vertexBuffer[bufferIndex++] = height;
+ vertexBuffer[bufferIndex++] = u;
+ vertexBuffer[bufferIndex++] = v;
+ if (this.hasWebMercatorT) {
+ vertexBuffer[bufferIndex++] = webMercatorT;
+ }
+ }
+ if (this.hasVertexNormals) {
+ vertexBuffer[bufferIndex++] = AttributeCompression_default.octPackFloat(
+ normalToPack
+ );
+ }
+ if (this.hasGeodeticSurfaceNormals) {
+ vertexBuffer[bufferIndex++] = geodeticSurfaceNormal.x;
+ vertexBuffer[bufferIndex++] = geodeticSurfaceNormal.y;
+ vertexBuffer[bufferIndex++] = geodeticSurfaceNormal.z;
+ }
+ return bufferIndex;
+};
+var scratchPosition = new Cartesian3_default();
+var scratchGeodeticSurfaceNormal = new Cartesian3_default();
+TerrainEncoding.prototype.addGeodeticSurfaceNormals = function(oldBuffer, newBuffer, ellipsoid) {
+ if (this.hasGeodeticSurfaceNormals) {
+ return;
+ }
+ const oldStride = this.stride;
+ const vertexCount = oldBuffer.length / oldStride;
+ this.hasGeodeticSurfaceNormals = true;
+ this._calculateStrideAndOffsets();
+ const newStride = this.stride;
+ for (let index = 0; index < vertexCount; index++) {
+ for (let offset = 0; offset < oldStride; offset++) {
+ const oldIndex = index * oldStride + offset;
+ const newIndex = index * newStride + offset;
+ newBuffer[newIndex] = oldBuffer[oldIndex];
+ }
+ const position = this.decodePosition(newBuffer, index, scratchPosition);
+ const geodeticSurfaceNormal = ellipsoid.geodeticSurfaceNormal(
+ position,
+ scratchGeodeticSurfaceNormal
+ );
+ const bufferIndex = index * newStride + this._offsetGeodeticSurfaceNormal;
+ newBuffer[bufferIndex] = geodeticSurfaceNormal.x;
+ newBuffer[bufferIndex + 1] = geodeticSurfaceNormal.y;
+ newBuffer[bufferIndex + 2] = geodeticSurfaceNormal.z;
+ }
+};
+TerrainEncoding.prototype.removeGeodeticSurfaceNormals = function(oldBuffer, newBuffer) {
+ if (!this.hasGeodeticSurfaceNormals) {
+ return;
+ }
+ const oldStride = this.stride;
+ const vertexCount = oldBuffer.length / oldStride;
+ this.hasGeodeticSurfaceNormals = false;
+ this._calculateStrideAndOffsets();
+ const newStride = this.stride;
+ for (let index = 0; index < vertexCount; index++) {
+ for (let offset = 0; offset < newStride; offset++) {
+ const oldIndex = index * oldStride + offset;
+ const newIndex = index * newStride + offset;
+ newBuffer[newIndex] = oldBuffer[oldIndex];
+ }
+ }
+};
+TerrainEncoding.prototype.decodePosition = function(buffer, index, result) {
+ if (!defined_default(result)) {
+ result = new Cartesian3_default();
+ }
+ index *= this.stride;
+ if (this.quantization === TerrainQuantization_default.BITS12) {
+ const xy = AttributeCompression_default.decompressTextureCoordinates(
+ buffer[index],
+ cartesian2Scratch
+ );
+ result.x = xy.x;
+ result.y = xy.y;
+ const zh = AttributeCompression_default.decompressTextureCoordinates(
+ buffer[index + 1],
+ cartesian2Scratch
+ );
+ result.z = zh.x;
+ return Matrix4_default.multiplyByPoint(this.fromScaledENU, result, result);
+ }
+ result.x = buffer[index];
+ result.y = buffer[index + 1];
+ result.z = buffer[index + 2];
+ return Cartesian3_default.add(result, this.center, result);
+};
+TerrainEncoding.prototype.getExaggeratedPosition = function(buffer, index, result) {
+ result = this.decodePosition(buffer, index, result);
+ const exaggeration = this.exaggeration;
+ const exaggerationRelativeHeight = this.exaggerationRelativeHeight;
+ const hasExaggeration = exaggeration !== 1;
+ if (hasExaggeration && this.hasGeodeticSurfaceNormals) {
+ const geodeticSurfaceNormal = this.decodeGeodeticSurfaceNormal(
+ buffer,
+ index,
+ scratchGeodeticSurfaceNormal
+ );
+ const rawHeight = this.decodeHeight(buffer, index);
+ const heightDifference = VerticalExaggeration_default.getHeight(
+ rawHeight,
+ exaggeration,
+ exaggerationRelativeHeight
+ ) - rawHeight;
+ result.x += geodeticSurfaceNormal.x * heightDifference;
+ result.y += geodeticSurfaceNormal.y * heightDifference;
+ result.z += geodeticSurfaceNormal.z * heightDifference;
+ }
+ return result;
+};
+TerrainEncoding.prototype.decodeTextureCoordinates = function(buffer, index, result) {
+ if (!defined_default(result)) {
+ result = new Cartesian2_default();
+ }
+ index *= this.stride;
+ if (this.quantization === TerrainQuantization_default.BITS12) {
+ return AttributeCompression_default.decompressTextureCoordinates(
+ buffer[index + 2],
+ result
+ );
+ }
+ return Cartesian2_default.fromElements(buffer[index + 4], buffer[index + 5], result);
+};
+TerrainEncoding.prototype.decodeHeight = function(buffer, index) {
+ index *= this.stride;
+ if (this.quantization === TerrainQuantization_default.BITS12) {
+ const zh = AttributeCompression_default.decompressTextureCoordinates(
+ buffer[index + 1],
+ cartesian2Scratch
+ );
+ return zh.y * (this.maximumHeight - this.minimumHeight) + this.minimumHeight;
+ }
+ return buffer[index + 3];
+};
+TerrainEncoding.prototype.decodeWebMercatorT = function(buffer, index) {
+ index *= this.stride;
+ if (this.quantization === TerrainQuantization_default.BITS12) {
+ return AttributeCompression_default.decompressTextureCoordinates(
+ buffer[index + 3],
+ cartesian2Scratch
+ ).x;
+ }
+ return buffer[index + 6];
+};
+TerrainEncoding.prototype.getOctEncodedNormal = function(buffer, index, result) {
+ index = index * this.stride + this._offsetVertexNormal;
+ const temp = buffer[index] / 256;
+ const x = Math.floor(temp);
+ const y = (temp - x) * 256;
+ return Cartesian2_default.fromElements(x, y, result);
+};
+TerrainEncoding.prototype.decodeGeodeticSurfaceNormal = function(buffer, index, result) {
+ index = index * this.stride + this._offsetGeodeticSurfaceNormal;
+ result.x = buffer[index];
+ result.y = buffer[index + 1];
+ result.z = buffer[index + 2];
+ return result;
+};
+TerrainEncoding.prototype._calculateStrideAndOffsets = function() {
+ let vertexStride = 0;
+ switch (this.quantization) {
+ case TerrainQuantization_default.BITS12:
+ vertexStride += 3;
+ break;
+ default:
+ vertexStride += 6;
+ }
+ if (this.hasWebMercatorT) {
+ vertexStride += 1;
+ }
+ if (this.hasVertexNormals) {
+ this._offsetVertexNormal = vertexStride;
+ vertexStride += 1;
+ }
+ if (this.hasGeodeticSurfaceNormals) {
+ this._offsetGeodeticSurfaceNormal = vertexStride;
+ vertexStride += 3;
+ }
+ this.stride = vertexStride;
+};
+var attributesIndicesNone = {
+ position3DAndHeight: 0,
+ textureCoordAndEncodedNormals: 1,
+ geodeticSurfaceNormal: 2
+};
+var attributesIndicesBits12 = {
+ compressed0: 0,
+ compressed1: 1,
+ geodeticSurfaceNormal: 2
+};
+TerrainEncoding.prototype.getAttributes = function(buffer) {
+ const datatype = ComponentDatatype_default.FLOAT;
+ const sizeInBytes = ComponentDatatype_default.getSizeInBytes(datatype);
+ const strideInBytes = this.stride * sizeInBytes;
+ let offsetInBytes = 0;
+ const attributes = [];
+ function addAttribute(index, componentsPerAttribute) {
+ attributes.push({
+ index,
+ vertexBuffer: buffer,
+ componentDatatype: datatype,
+ componentsPerAttribute,
+ offsetInBytes,
+ strideInBytes
+ });
+ offsetInBytes += componentsPerAttribute * sizeInBytes;
+ }
+ if (this.quantization === TerrainQuantization_default.NONE) {
+ addAttribute(attributesIndicesNone.position3DAndHeight, 4);
+ let componentsTexCoordAndNormals = 2;
+ componentsTexCoordAndNormals += this.hasWebMercatorT ? 1 : 0;
+ componentsTexCoordAndNormals += this.hasVertexNormals ? 1 : 0;
+ addAttribute(
+ attributesIndicesNone.textureCoordAndEncodedNormals,
+ componentsTexCoordAndNormals
+ );
+ if (this.hasGeodeticSurfaceNormals) {
+ addAttribute(attributesIndicesNone.geodeticSurfaceNormal, 3);
+ }
+ } else {
+ const usingAttribute0Component4 = this.hasWebMercatorT || this.hasVertexNormals;
+ const usingAttribute1Component1 = this.hasWebMercatorT && this.hasVertexNormals;
+ addAttribute(
+ attributesIndicesBits12.compressed0,
+ usingAttribute0Component4 ? 4 : 3
+ );
+ if (usingAttribute1Component1) {
+ addAttribute(attributesIndicesBits12.compressed1, 1);
+ }
+ if (this.hasGeodeticSurfaceNormals) {
+ addAttribute(attributesIndicesBits12.geodeticSurfaceNormal, 3);
+ }
+ }
+ return attributes;
+};
+TerrainEncoding.prototype.getAttributeLocations = function() {
+ if (this.quantization === TerrainQuantization_default.NONE) {
+ return attributesIndicesNone;
+ }
+ return attributesIndicesBits12;
+};
+TerrainEncoding.clone = function(encoding, result) {
+ if (!defined_default(encoding)) {
+ return void 0;
+ }
+ if (!defined_default(result)) {
+ result = new TerrainEncoding();
+ }
+ result.quantization = encoding.quantization;
+ result.minimumHeight = encoding.minimumHeight;
+ result.maximumHeight = encoding.maximumHeight;
+ result.center = Cartesian3_default.clone(encoding.center);
+ result.toScaledENU = Matrix4_default.clone(encoding.toScaledENU);
+ result.fromScaledENU = Matrix4_default.clone(encoding.fromScaledENU);
+ result.matrix = Matrix4_default.clone(encoding.matrix);
+ result.hasVertexNormals = encoding.hasVertexNormals;
+ result.hasWebMercatorT = encoding.hasWebMercatorT;
+ result.hasGeodeticSurfaceNormals = encoding.hasGeodeticSurfaceNormals;
+ result.exaggeration = encoding.exaggeration;
+ result.exaggerationRelativeHeight = encoding.exaggerationRelativeHeight;
+ result._calculateStrideAndOffsets();
+ return result;
+};
+var TerrainEncoding_default = TerrainEncoding;
+
+export {
+ EllipsoidalOccluder_default,
+ TerrainEncoding_default
+};
diff --git a/public/assets/cesium/Workers/chunk-57H6I3SV.js b/public/assets/cesium/Workers/chunk-57H6I3SV.js
new file mode 100644
index 0000000000000000000000000000000000000000..2232ec15f5c81b3d9fb117e4de931e3cbc8748ee
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-57H6I3SV.js
@@ -0,0 +1,100 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/arrayRemoveDuplicates.js
+var removeDuplicatesEpsilon = Math_default.EPSILON10;
+function arrayRemoveDuplicates(values, equalsEpsilon, wrapAround, removedIndices) {
+ Check_default.defined("equalsEpsilon", equalsEpsilon);
+ if (!defined_default(values)) {
+ return void 0;
+ }
+ wrapAround = defaultValue_default(wrapAround, false);
+ const storeRemovedIndices = defined_default(removedIndices);
+ const length = values.length;
+ if (length < 2) {
+ return values;
+ }
+ let i;
+ let v0 = values[0];
+ let v1;
+ let cleanedValues;
+ let lastCleanIndex = 0;
+ let removedIndexLCI = -1;
+ for (i = 1; i < length; ++i) {
+ v1 = values[i];
+ if (equalsEpsilon(v0, v1, removeDuplicatesEpsilon)) {
+ if (!defined_default(cleanedValues)) {
+ cleanedValues = values.slice(0, i);
+ lastCleanIndex = i - 1;
+ removedIndexLCI = 0;
+ }
+ if (storeRemovedIndices) {
+ removedIndices.push(i);
+ }
+ } else {
+ if (defined_default(cleanedValues)) {
+ cleanedValues.push(v1);
+ lastCleanIndex = i;
+ if (storeRemovedIndices) {
+ removedIndexLCI = removedIndices.length;
+ }
+ }
+ v0 = v1;
+ }
+ }
+ if (wrapAround && equalsEpsilon(values[0], values[length - 1], removeDuplicatesEpsilon)) {
+ if (storeRemovedIndices) {
+ if (defined_default(cleanedValues)) {
+ removedIndices.splice(removedIndexLCI, 0, lastCleanIndex);
+ } else {
+ removedIndices.push(length - 1);
+ }
+ }
+ if (defined_default(cleanedValues)) {
+ cleanedValues.length -= 1;
+ } else {
+ cleanedValues = values.slice(0, -1);
+ }
+ }
+ return defined_default(cleanedValues) ? cleanedValues : values;
+}
+var arrayRemoveDuplicates_default = arrayRemoveDuplicates;
+
+export {
+ arrayRemoveDuplicates_default
+};
diff --git a/public/assets/cesium/Workers/chunk-6SQMLVGV.js b/public/assets/cesium/Workers/chunk-6SQMLVGV.js
new file mode 100644
index 0000000000000000000000000000000000000000..889d19ec101282a7a66d1c50b6a11ddaf2103944
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-6SQMLVGV.js
@@ -0,0 +1,10367 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ Cartesian2_default,
+ Cartesian3_default,
+ Cartographic_default,
+ Ellipsoid_default,
+ FeatureDetection_default,
+ Matrix3_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import {
+ RuntimeError_default
+} from "./chunk-LLAF3CPH.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default,
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ __commonJS,
+ __require,
+ __toESM,
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// node_modules/urijs/src/punycode.js
+var require_punycode = __commonJS({
+ "node_modules/urijs/src/punycode.js"(exports, module) {
+ /*! https://mths.be/punycode v1.4.0 by @mathias */
+ (function(root) {
+ var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
+ var freeModule = typeof module == "object" && module && !module.nodeType && module;
+ var freeGlobal = typeof global == "object" && global;
+ if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal) {
+ root = freeGlobal;
+ }
+ var punycode, maxInt = 2147483647, base = 36, tMin = 1, tMax = 26, skew = 38, damp = 700, initialBias = 72, initialN = 128, delimiter = "-", regexPunycode = /^xn--/, regexNonASCII = /[^\x20-\x7E]/, regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, errors = {
+ "overflow": "Overflow: input needs wider integers to process",
+ "not-basic": "Illegal input >= 0x80 (not a basic code point)",
+ "invalid-input": "Invalid input"
+ }, baseMinusTMin = base - tMin, floor = Math.floor, stringFromCharCode = String.fromCharCode, key;
+ function error(type) {
+ throw new RangeError(errors[type]);
+ }
+ function map(array, fn) {
+ var length = array.length;
+ var result = [];
+ while (length--) {
+ result[length] = fn(array[length]);
+ }
+ return result;
+ }
+ function mapDomain(string, fn) {
+ var parts = string.split("@");
+ var result = "";
+ if (parts.length > 1) {
+ result = parts[0] + "@";
+ string = parts[1];
+ }
+ string = string.replace(regexSeparators, ".");
+ var labels = string.split(".");
+ var encoded = map(labels, fn).join(".");
+ return result + encoded;
+ }
+ function ucs2decode(string) {
+ var output = [], counter = 0, length = string.length, value, extra;
+ while (counter < length) {
+ value = string.charCodeAt(counter++);
+ if (value >= 55296 && value <= 56319 && counter < length) {
+ extra = string.charCodeAt(counter++);
+ if ((extra & 64512) == 56320) {
+ output.push(((value & 1023) << 10) + (extra & 1023) + 65536);
+ } else {
+ output.push(value);
+ counter--;
+ }
+ } else {
+ output.push(value);
+ }
+ }
+ return output;
+ }
+ function ucs2encode(array) {
+ return map(array, function(value) {
+ var output = "";
+ if (value > 65535) {
+ value -= 65536;
+ output += stringFromCharCode(value >>> 10 & 1023 | 55296);
+ value = 56320 | value & 1023;
+ }
+ output += stringFromCharCode(value);
+ return output;
+ }).join("");
+ }
+ function basicToDigit(codePoint) {
+ if (codePoint - 48 < 10) {
+ return codePoint - 22;
+ }
+ if (codePoint - 65 < 26) {
+ return codePoint - 65;
+ }
+ if (codePoint - 97 < 26) {
+ return codePoint - 97;
+ }
+ return base;
+ }
+ function digitToBasic(digit, flag) {
+ return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
+ }
+ function adapt(delta, numPoints, firstTime) {
+ var k = 0;
+ delta = firstTime ? floor(delta / damp) : delta >> 1;
+ delta += floor(delta / numPoints);
+ for (; delta > baseMinusTMin * tMax >> 1; k += base) {
+ delta = floor(delta / baseMinusTMin);
+ }
+ return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
+ }
+ function decode(input) {
+ var output = [], inputLength = input.length, out, i = 0, n = initialN, bias = initialBias, basic, j, index, oldi, w, k, digit, t, baseMinusT;
+ basic = input.lastIndexOf(delimiter);
+ if (basic < 0) {
+ basic = 0;
+ }
+ for (j = 0; j < basic; ++j) {
+ if (input.charCodeAt(j) >= 128) {
+ error("not-basic");
+ }
+ output.push(input.charCodeAt(j));
+ }
+ for (index = basic > 0 ? basic + 1 : 0; index < inputLength; ) {
+ for (oldi = i, w = 1, k = base; ; k += base) {
+ if (index >= inputLength) {
+ error("invalid-input");
+ }
+ digit = basicToDigit(input.charCodeAt(index++));
+ if (digit >= base || digit > floor((maxInt - i) / w)) {
+ error("overflow");
+ }
+ i += digit * w;
+ t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
+ if (digit < t) {
+ break;
+ }
+ baseMinusT = base - t;
+ if (w > floor(maxInt / baseMinusT)) {
+ error("overflow");
+ }
+ w *= baseMinusT;
+ }
+ out = output.length + 1;
+ bias = adapt(i - oldi, out, oldi == 0);
+ if (floor(i / out) > maxInt - n) {
+ error("overflow");
+ }
+ n += floor(i / out);
+ i %= out;
+ output.splice(i++, 0, n);
+ }
+ return ucs2encode(output);
+ }
+ function encode(input) {
+ var n, delta, handledCPCount, basicLength, bias, j, m, q, k, t, currentValue, output = [], inputLength, handledCPCountPlusOne, baseMinusT, qMinusT;
+ input = ucs2decode(input);
+ inputLength = input.length;
+ n = initialN;
+ delta = 0;
+ bias = initialBias;
+ for (j = 0; j < inputLength; ++j) {
+ currentValue = input[j];
+ if (currentValue < 128) {
+ output.push(stringFromCharCode(currentValue));
+ }
+ }
+ handledCPCount = basicLength = output.length;
+ if (basicLength) {
+ output.push(delimiter);
+ }
+ while (handledCPCount < inputLength) {
+ for (m = maxInt, j = 0; j < inputLength; ++j) {
+ currentValue = input[j];
+ if (currentValue >= n && currentValue < m) {
+ m = currentValue;
+ }
+ }
+ handledCPCountPlusOne = handledCPCount + 1;
+ if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
+ error("overflow");
+ }
+ delta += (m - n) * handledCPCountPlusOne;
+ n = m;
+ for (j = 0; j < inputLength; ++j) {
+ currentValue = input[j];
+ if (currentValue < n && ++delta > maxInt) {
+ error("overflow");
+ }
+ if (currentValue == n) {
+ for (q = delta, k = base; ; k += base) {
+ t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
+ if (q < t) {
+ break;
+ }
+ qMinusT = q - t;
+ baseMinusT = base - t;
+ output.push(
+ stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
+ );
+ q = floor(qMinusT / baseMinusT);
+ }
+ output.push(stringFromCharCode(digitToBasic(q, 0)));
+ bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
+ delta = 0;
+ ++handledCPCount;
+ }
+ }
+ ++delta;
+ ++n;
+ }
+ return output.join("");
+ }
+ function toUnicode(input) {
+ return mapDomain(input, function(string) {
+ return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
+ });
+ }
+ function toASCII(input) {
+ return mapDomain(input, function(string) {
+ return regexNonASCII.test(string) ? "xn--" + encode(string) : string;
+ });
+ }
+ punycode = {
+ /**
+ * A string representing the current Punycode.js version number.
+ * @memberOf punycode
+ * @type String
+ */
+ "version": "1.3.2",
+ /**
+ * An object of methods to convert from JavaScript's internal character
+ * representation (UCS-2) to Unicode code points, and back.
+ * @see 0.001
+ * @type {number}
+ * @constant
+ */
+ SECONDS_PER_MILLISECOND: 1e-3,
+ /**
+ * The number of seconds in one minute: 60.
+ * @type {number}
+ * @constant
+ */
+ SECONDS_PER_MINUTE: 60,
+ /**
+ * The number of minutes in one hour: 60.
+ * @type {number}
+ * @constant
+ */
+ MINUTES_PER_HOUR: 60,
+ /**
+ * The number of hours in one day: 24.
+ * @type {number}
+ * @constant
+ */
+ HOURS_PER_DAY: 24,
+ /**
+ * The number of seconds in one hour: 3600.
+ * @type {number}
+ * @constant
+ */
+ SECONDS_PER_HOUR: 3600,
+ /**
+ * The number of minutes in one day: 1440.
+ * @type {number}
+ * @constant
+ */
+ MINUTES_PER_DAY: 1440,
+ /**
+ * The number of seconds in one day, ignoring leap seconds: 86400.
+ * @type {number}
+ * @constant
+ */
+ SECONDS_PER_DAY: 86400,
+ /**
+ * The number of days in one Julian century: 36525.
+ * @type {number}
+ * @constant
+ */
+ DAYS_PER_JULIAN_CENTURY: 36525,
+ /**
+ * One trillionth of a second.
+ * @type {number}
+ * @constant
+ */
+ PICOSECOND: 1e-9,
+ /**
+ * The number of days to subtract from a Julian date to determine the
+ * modified Julian date, which gives the number of days since midnight
+ * on November 17, 1858.
+ * @type {number}
+ * @constant
+ */
+ MODIFIED_JULIAN_DATE_DIFFERENCE: 24000005e-1
+};
+var TimeConstants_default = Object.freeze(TimeConstants);
+
+// packages/engine/Source/Core/TimeStandard.js
+var TimeStandard = {
+ /**
+ * Represents the coordinated Universal Time (UTC) time standard.
+ *
+ * UTC is related to TAI according to the relationship
+ * UTC = TAI - deltaT where deltaT is the number of leap
+ * seconds which have been introduced as of the time in TAI.
+ *
+ * @type {number}
+ * @constant
+ */
+ UTC: 0,
+ /**
+ * Represents the International Atomic Time (TAI) time standard.
+ * TAI is the principal time standard to which the other time standards are related.
+ *
+ * @type {number}
+ * @constant
+ */
+ TAI: 1
+};
+var TimeStandard_default = Object.freeze(TimeStandard);
+
+// packages/engine/Source/Core/JulianDate.js
+var gregorianDateScratch = new GregorianDate_default();
+var daysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
+var daysInLeapFeburary = 29;
+function compareLeapSecondDates(leapSecond, dateToFind) {
+ return JulianDate.compare(leapSecond.julianDate, dateToFind.julianDate);
+}
+var binarySearchScratchLeapSecond = new LeapSecond_default();
+function convertUtcToTai(julianDate) {
+ binarySearchScratchLeapSecond.julianDate = julianDate;
+ const leapSeconds = JulianDate.leapSeconds;
+ let index = binarySearch_default(
+ leapSeconds,
+ binarySearchScratchLeapSecond,
+ compareLeapSecondDates
+ );
+ if (index < 0) {
+ index = ~index;
+ }
+ if (index >= leapSeconds.length) {
+ index = leapSeconds.length - 1;
+ }
+ let offset = leapSeconds[index].offset;
+ if (index > 0) {
+ const difference = JulianDate.secondsDifference(
+ leapSeconds[index].julianDate,
+ julianDate
+ );
+ if (difference > offset) {
+ index--;
+ offset = leapSeconds[index].offset;
+ }
+ }
+ JulianDate.addSeconds(julianDate, offset, julianDate);
+}
+function convertTaiToUtc(julianDate, result) {
+ binarySearchScratchLeapSecond.julianDate = julianDate;
+ const leapSeconds = JulianDate.leapSeconds;
+ let index = binarySearch_default(
+ leapSeconds,
+ binarySearchScratchLeapSecond,
+ compareLeapSecondDates
+ );
+ if (index < 0) {
+ index = ~index;
+ }
+ if (index === 0) {
+ return JulianDate.addSeconds(julianDate, -leapSeconds[0].offset, result);
+ }
+ if (index >= leapSeconds.length) {
+ return JulianDate.addSeconds(
+ julianDate,
+ -leapSeconds[index - 1].offset,
+ result
+ );
+ }
+ const difference = JulianDate.secondsDifference(
+ leapSeconds[index].julianDate,
+ julianDate
+ );
+ if (difference === 0) {
+ return JulianDate.addSeconds(
+ julianDate,
+ -leapSeconds[index].offset,
+ result
+ );
+ }
+ if (difference <= 1) {
+ return void 0;
+ }
+ return JulianDate.addSeconds(
+ julianDate,
+ -leapSeconds[--index].offset,
+ result
+ );
+}
+function setComponents(wholeDays, secondsOfDay, julianDate) {
+ const extraDays = secondsOfDay / TimeConstants_default.SECONDS_PER_DAY | 0;
+ wholeDays += extraDays;
+ secondsOfDay -= TimeConstants_default.SECONDS_PER_DAY * extraDays;
+ if (secondsOfDay < 0) {
+ wholeDays--;
+ secondsOfDay += TimeConstants_default.SECONDS_PER_DAY;
+ }
+ julianDate.dayNumber = wholeDays;
+ julianDate.secondsOfDay = secondsOfDay;
+ return julianDate;
+}
+function computeJulianDateComponents(year, month, day, hour, minute, second, millisecond) {
+ const a3 = (month - 14) / 12 | 0;
+ const b = year + 4800 + a3;
+ let dayNumber = (1461 * b / 4 | 0) + (367 * (month - 2 - 12 * a3) / 12 | 0) - (3 * ((b + 100) / 100 | 0) / 4 | 0) + day - 32075;
+ hour = hour - 12;
+ if (hour < 0) {
+ hour += 24;
+ }
+ const secondsOfDay = second + (hour * TimeConstants_default.SECONDS_PER_HOUR + minute * TimeConstants_default.SECONDS_PER_MINUTE + millisecond * TimeConstants_default.SECONDS_PER_MILLISECOND);
+ if (secondsOfDay >= 43200) {
+ dayNumber -= 1;
+ }
+ return [dayNumber, secondsOfDay];
+}
+var matchCalendarYear = /^(\d{4})$/;
+var matchCalendarMonth = /^(\d{4})-(\d{2})$/;
+var matchOrdinalDate = /^(\d{4})-?(\d{3})$/;
+var matchWeekDate = /^(\d{4})-?W(\d{2})-?(\d{1})?$/;
+var matchCalendarDate = /^(\d{4})-?(\d{2})-?(\d{2})$/;
+var utcOffset = /([Z+\-])?(\d{2})?:?(\d{2})?$/;
+var matchHours = /^(\d{2})(\.\d+)?/.source + utcOffset.source;
+var matchHoursMinutes = /^(\d{2}):?(\d{2})(\.\d+)?/.source + utcOffset.source;
+var matchHoursMinutesSeconds = /^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source + utcOffset.source;
+var iso8601ErrorMessage = "Invalid ISO 8601 date.";
+function JulianDate(julianDayNumber, secondsOfDay, timeStandard) {
+ this.dayNumber = void 0;
+ this.secondsOfDay = void 0;
+ julianDayNumber = defaultValue_default(julianDayNumber, 0);
+ secondsOfDay = defaultValue_default(secondsOfDay, 0);
+ timeStandard = defaultValue_default(timeStandard, TimeStandard_default.UTC);
+ const wholeDays = julianDayNumber | 0;
+ secondsOfDay = secondsOfDay + (julianDayNumber - wholeDays) * TimeConstants_default.SECONDS_PER_DAY;
+ setComponents(wholeDays, secondsOfDay, this);
+ if (timeStandard === TimeStandard_default.UTC) {
+ convertUtcToTai(this);
+ }
+}
+JulianDate.fromGregorianDate = function(date, result) {
+ if (!(date instanceof GregorianDate_default)) {
+ throw new DeveloperError_default("date must be a valid GregorianDate.");
+ }
+ const components = computeJulianDateComponents(
+ date.year,
+ date.month,
+ date.day,
+ date.hour,
+ date.minute,
+ date.second,
+ date.millisecond
+ );
+ if (!defined_default(result)) {
+ return new JulianDate(components[0], components[1], TimeStandard_default.UTC);
+ }
+ setComponents(components[0], components[1], result);
+ convertUtcToTai(result);
+ return result;
+};
+JulianDate.fromDate = function(date, result) {
+ if (!(date instanceof Date) || isNaN(date.getTime())) {
+ throw new DeveloperError_default("date must be a valid JavaScript Date.");
+ }
+ const components = computeJulianDateComponents(
+ date.getUTCFullYear(),
+ date.getUTCMonth() + 1,
+ date.getUTCDate(),
+ date.getUTCHours(),
+ date.getUTCMinutes(),
+ date.getUTCSeconds(),
+ date.getUTCMilliseconds()
+ );
+ if (!defined_default(result)) {
+ return new JulianDate(components[0], components[1], TimeStandard_default.UTC);
+ }
+ setComponents(components[0], components[1], result);
+ convertUtcToTai(result);
+ return result;
+};
+JulianDate.fromIso8601 = function(iso8601String, result) {
+ if (typeof iso8601String !== "string") {
+ throw new DeveloperError_default(iso8601ErrorMessage);
+ }
+ iso8601String = iso8601String.replace(",", ".");
+ let tokens = iso8601String.split("T");
+ let year;
+ let month = 1;
+ let day = 1;
+ let hour = 0;
+ let minute = 0;
+ let second = 0;
+ let millisecond = 0;
+ const date = tokens[0];
+ const time = tokens[1];
+ let tmp;
+ let inLeapYear;
+ if (!defined_default(date)) {
+ throw new DeveloperError_default(iso8601ErrorMessage);
+ }
+ let dashCount;
+ tokens = date.match(matchCalendarDate);
+ if (tokens !== null) {
+ dashCount = date.split("-").length - 1;
+ if (dashCount > 0 && dashCount !== 2) {
+ throw new DeveloperError_default(iso8601ErrorMessage);
+ }
+ year = +tokens[1];
+ month = +tokens[2];
+ day = +tokens[3];
+ } else {
+ tokens = date.match(matchCalendarMonth);
+ if (tokens !== null) {
+ year = +tokens[1];
+ month = +tokens[2];
+ } else {
+ tokens = date.match(matchCalendarYear);
+ if (tokens !== null) {
+ year = +tokens[1];
+ } else {
+ let dayOfYear;
+ tokens = date.match(matchOrdinalDate);
+ if (tokens !== null) {
+ year = +tokens[1];
+ dayOfYear = +tokens[2];
+ inLeapYear = isLeapYear_default(year);
+ if (dayOfYear < 1 || inLeapYear && dayOfYear > 366 || !inLeapYear && dayOfYear > 365) {
+ throw new DeveloperError_default(iso8601ErrorMessage);
+ }
+ } else {
+ tokens = date.match(matchWeekDate);
+ if (tokens !== null) {
+ year = +tokens[1];
+ const weekNumber = +tokens[2];
+ const dayOfWeek = +tokens[3] || 0;
+ dashCount = date.split("-").length - 1;
+ if (dashCount > 0 && (!defined_default(tokens[3]) && dashCount !== 1 || defined_default(tokens[3]) && dashCount !== 2)) {
+ throw new DeveloperError_default(iso8601ErrorMessage);
+ }
+ const january4 = new Date(Date.UTC(year, 0, 4));
+ dayOfYear = weekNumber * 7 + dayOfWeek - january4.getUTCDay() - 3;
+ } else {
+ throw new DeveloperError_default(iso8601ErrorMessage);
+ }
+ }
+ tmp = new Date(Date.UTC(year, 0, 1));
+ tmp.setUTCDate(dayOfYear);
+ month = tmp.getUTCMonth() + 1;
+ day = tmp.getUTCDate();
+ }
+ }
+ }
+ inLeapYear = isLeapYear_default(year);
+ if (month < 1 || month > 12 || day < 1 || (month !== 2 || !inLeapYear) && day > daysInMonth[month - 1] || inLeapYear && month === 2 && day > daysInLeapFeburary) {
+ throw new DeveloperError_default(iso8601ErrorMessage);
+ }
+ let offsetIndex;
+ if (defined_default(time)) {
+ tokens = time.match(matchHoursMinutesSeconds);
+ if (tokens !== null) {
+ dashCount = time.split(":").length - 1;
+ if (dashCount > 0 && dashCount !== 2 && dashCount !== 3) {
+ throw new DeveloperError_default(iso8601ErrorMessage);
+ }
+ hour = +tokens[1];
+ minute = +tokens[2];
+ second = +tokens[3];
+ millisecond = +(tokens[4] || 0) * 1e3;
+ offsetIndex = 5;
+ } else {
+ tokens = time.match(matchHoursMinutes);
+ if (tokens !== null) {
+ dashCount = time.split(":").length - 1;
+ if (dashCount > 2) {
+ throw new DeveloperError_default(iso8601ErrorMessage);
+ }
+ hour = +tokens[1];
+ minute = +tokens[2];
+ second = +(tokens[3] || 0) * 60;
+ offsetIndex = 4;
+ } else {
+ tokens = time.match(matchHours);
+ if (tokens !== null) {
+ hour = +tokens[1];
+ minute = +(tokens[2] || 0) * 60;
+ offsetIndex = 3;
+ } else {
+ throw new DeveloperError_default(iso8601ErrorMessage);
+ }
+ }
+ }
+ if (minute >= 60 || second >= 61 || hour > 24 || hour === 24 && (minute > 0 || second > 0 || millisecond > 0)) {
+ throw new DeveloperError_default(iso8601ErrorMessage);
+ }
+ const offset = tokens[offsetIndex];
+ const offsetHours = +tokens[offsetIndex + 1];
+ const offsetMinutes = +(tokens[offsetIndex + 2] || 0);
+ switch (offset) {
+ case "+":
+ hour = hour - offsetHours;
+ minute = minute - offsetMinutes;
+ break;
+ case "-":
+ hour = hour + offsetHours;
+ minute = minute + offsetMinutes;
+ break;
+ case "Z":
+ break;
+ default:
+ minute = minute + new Date(
+ Date.UTC(year, month - 1, day, hour, minute)
+ ).getTimezoneOffset();
+ break;
+ }
+ }
+ const isLeapSecond = second === 60;
+ if (isLeapSecond) {
+ second--;
+ }
+ while (minute >= 60) {
+ minute -= 60;
+ hour++;
+ }
+ while (hour >= 24) {
+ hour -= 24;
+ day++;
+ }
+ tmp = inLeapYear && month === 2 ? daysInLeapFeburary : daysInMonth[month - 1];
+ while (day > tmp) {
+ day -= tmp;
+ month++;
+ if (month > 12) {
+ month -= 12;
+ year++;
+ }
+ tmp = inLeapYear && month === 2 ? daysInLeapFeburary : daysInMonth[month - 1];
+ }
+ while (minute < 0) {
+ minute += 60;
+ hour--;
+ }
+ while (hour < 0) {
+ hour += 24;
+ day--;
+ }
+ while (day < 1) {
+ month--;
+ if (month < 1) {
+ month += 12;
+ year--;
+ }
+ tmp = inLeapYear && month === 2 ? daysInLeapFeburary : daysInMonth[month - 1];
+ day += tmp;
+ }
+ const components = computeJulianDateComponents(
+ year,
+ month,
+ day,
+ hour,
+ minute,
+ second,
+ millisecond
+ );
+ if (!defined_default(result)) {
+ result = new JulianDate(components[0], components[1], TimeStandard_default.UTC);
+ } else {
+ setComponents(components[0], components[1], result);
+ convertUtcToTai(result);
+ }
+ if (isLeapSecond) {
+ JulianDate.addSeconds(result, 1, result);
+ }
+ return result;
+};
+JulianDate.now = function(result) {
+ return JulianDate.fromDate(/* @__PURE__ */ new Date(), result);
+};
+var toGregorianDateScratch = new JulianDate(0, 0, TimeStandard_default.TAI);
+JulianDate.toGregorianDate = function(julianDate, result) {
+ if (!defined_default(julianDate)) {
+ throw new DeveloperError_default("julianDate is required.");
+ }
+ let isLeapSecond = false;
+ let thisUtc = convertTaiToUtc(julianDate, toGregorianDateScratch);
+ if (!defined_default(thisUtc)) {
+ JulianDate.addSeconds(julianDate, -1, toGregorianDateScratch);
+ thisUtc = convertTaiToUtc(toGregorianDateScratch, toGregorianDateScratch);
+ isLeapSecond = true;
+ }
+ let julianDayNumber = thisUtc.dayNumber;
+ const secondsOfDay = thisUtc.secondsOfDay;
+ if (secondsOfDay >= 43200) {
+ julianDayNumber += 1;
+ }
+ let L = julianDayNumber + 68569 | 0;
+ const N = 4 * L / 146097 | 0;
+ L = L - ((146097 * N + 3) / 4 | 0) | 0;
+ const I = 4e3 * (L + 1) / 1461001 | 0;
+ L = L - (1461 * I / 4 | 0) + 31 | 0;
+ const J = 80 * L / 2447 | 0;
+ const day = L - (2447 * J / 80 | 0) | 0;
+ L = J / 11 | 0;
+ const month = J + 2 - 12 * L | 0;
+ const year = 100 * (N - 49) + I + L | 0;
+ let hour = secondsOfDay / TimeConstants_default.SECONDS_PER_HOUR | 0;
+ let remainingSeconds = secondsOfDay - hour * TimeConstants_default.SECONDS_PER_HOUR;
+ const minute = remainingSeconds / TimeConstants_default.SECONDS_PER_MINUTE | 0;
+ remainingSeconds = remainingSeconds - minute * TimeConstants_default.SECONDS_PER_MINUTE;
+ let second = remainingSeconds | 0;
+ const millisecond = (remainingSeconds - second) / TimeConstants_default.SECONDS_PER_MILLISECOND;
+ hour += 12;
+ if (hour > 23) {
+ hour -= 24;
+ }
+ if (isLeapSecond) {
+ second += 1;
+ }
+ if (!defined_default(result)) {
+ return new GregorianDate_default(
+ year,
+ month,
+ day,
+ hour,
+ minute,
+ second,
+ millisecond,
+ isLeapSecond
+ );
+ }
+ result.year = year;
+ result.month = month;
+ result.day = day;
+ result.hour = hour;
+ result.minute = minute;
+ result.second = second;
+ result.millisecond = millisecond;
+ result.isLeapSecond = isLeapSecond;
+ return result;
+};
+JulianDate.toDate = function(julianDate) {
+ if (!defined_default(julianDate)) {
+ throw new DeveloperError_default("julianDate is required.");
+ }
+ const gDate = JulianDate.toGregorianDate(julianDate, gregorianDateScratch);
+ let second = gDate.second;
+ if (gDate.isLeapSecond) {
+ second -= 1;
+ }
+ return new Date(
+ Date.UTC(
+ gDate.year,
+ gDate.month - 1,
+ gDate.day,
+ gDate.hour,
+ gDate.minute,
+ second,
+ gDate.millisecond
+ )
+ );
+};
+JulianDate.toIso8601 = function(julianDate, precision) {
+ if (!defined_default(julianDate)) {
+ throw new DeveloperError_default("julianDate is required.");
+ }
+ const gDate = JulianDate.toGregorianDate(julianDate, gregorianDateScratch);
+ let year = gDate.year;
+ let month = gDate.month;
+ let day = gDate.day;
+ let hour = gDate.hour;
+ const minute = gDate.minute;
+ const second = gDate.second;
+ const millisecond = gDate.millisecond;
+ if (year === 1e4 && month === 1 && day === 1 && hour === 0 && minute === 0 && second === 0 && millisecond === 0) {
+ year = 9999;
+ month = 12;
+ day = 31;
+ hour = 24;
+ }
+ let millisecondStr;
+ if (!defined_default(precision) && millisecond !== 0) {
+ millisecondStr = (millisecond * 0.01).toString().replace(".", "");
+ return `${year.toString().padStart(4, "0")}-${month.toString().padStart(2, "0")}-${day.toString().padStart(2, "0")}T${hour.toString().padStart(2, "0")}:${minute.toString().padStart(2, "0")}:${second.toString().padStart(2, "0")}.${millisecondStr}Z`;
+ }
+ if (!defined_default(precision) || precision === 0) {
+ return `${year.toString().padStart(4, "0")}-${month.toString().padStart(2, "0")}-${day.toString().padStart(2, "0")}T${hour.toString().padStart(2, "0")}:${minute.toString().padStart(2, "0")}:${second.toString().padStart(2, "0")}Z`;
+ }
+ millisecondStr = (millisecond * 0.01).toFixed(precision).replace(".", "").slice(0, precision);
+ return `${year.toString().padStart(4, "0")}-${month.toString().padStart(2, "0")}-${day.toString().padStart(2, "0")}T${hour.toString().padStart(2, "0")}:${minute.toString().padStart(2, "0")}:${second.toString().padStart(2, "0")}.${millisecondStr}Z`;
+};
+JulianDate.clone = function(julianDate, result) {
+ if (!defined_default(julianDate)) {
+ return void 0;
+ }
+ if (!defined_default(result)) {
+ return new JulianDate(
+ julianDate.dayNumber,
+ julianDate.secondsOfDay,
+ TimeStandard_default.TAI
+ );
+ }
+ result.dayNumber = julianDate.dayNumber;
+ result.secondsOfDay = julianDate.secondsOfDay;
+ return result;
+};
+JulianDate.compare = function(left, right) {
+ if (!defined_default(left)) {
+ throw new DeveloperError_default("left is required.");
+ }
+ if (!defined_default(right)) {
+ throw new DeveloperError_default("right is required.");
+ }
+ const julianDayNumberDifference = left.dayNumber - right.dayNumber;
+ if (julianDayNumberDifference !== 0) {
+ return julianDayNumberDifference;
+ }
+ return left.secondsOfDay - right.secondsOfDay;
+};
+JulianDate.equals = function(left, right) {
+ return left === right || defined_default(left) && defined_default(right) && left.dayNumber === right.dayNumber && left.secondsOfDay === right.secondsOfDay;
+};
+JulianDate.equalsEpsilon = function(left, right, epsilon) {
+ epsilon = defaultValue_default(epsilon, 0);
+ return left === right || defined_default(left) && defined_default(right) && Math.abs(JulianDate.secondsDifference(left, right)) <= epsilon;
+};
+JulianDate.totalDays = function(julianDate) {
+ if (!defined_default(julianDate)) {
+ throw new DeveloperError_default("julianDate is required.");
+ }
+ return julianDate.dayNumber + julianDate.secondsOfDay / TimeConstants_default.SECONDS_PER_DAY;
+};
+JulianDate.secondsDifference = function(left, right) {
+ if (!defined_default(left)) {
+ throw new DeveloperError_default("left is required.");
+ }
+ if (!defined_default(right)) {
+ throw new DeveloperError_default("right is required.");
+ }
+ const dayDifference = (left.dayNumber - right.dayNumber) * TimeConstants_default.SECONDS_PER_DAY;
+ return dayDifference + (left.secondsOfDay - right.secondsOfDay);
+};
+JulianDate.daysDifference = function(left, right) {
+ if (!defined_default(left)) {
+ throw new DeveloperError_default("left is required.");
+ }
+ if (!defined_default(right)) {
+ throw new DeveloperError_default("right is required.");
+ }
+ const dayDifference = left.dayNumber - right.dayNumber;
+ const secondDifference = (left.secondsOfDay - right.secondsOfDay) / TimeConstants_default.SECONDS_PER_DAY;
+ return dayDifference + secondDifference;
+};
+JulianDate.computeTaiMinusUtc = function(julianDate) {
+ binarySearchScratchLeapSecond.julianDate = julianDate;
+ const leapSeconds = JulianDate.leapSeconds;
+ let index = binarySearch_default(
+ leapSeconds,
+ binarySearchScratchLeapSecond,
+ compareLeapSecondDates
+ );
+ if (index < 0) {
+ index = ~index;
+ --index;
+ if (index < 0) {
+ index = 0;
+ }
+ }
+ return leapSeconds[index].offset;
+};
+JulianDate.addSeconds = function(julianDate, seconds, result) {
+ if (!defined_default(julianDate)) {
+ throw new DeveloperError_default("julianDate is required.");
+ }
+ if (!defined_default(seconds)) {
+ throw new DeveloperError_default("seconds is required.");
+ }
+ if (!defined_default(result)) {
+ throw new DeveloperError_default("result is required.");
+ }
+ return setComponents(
+ julianDate.dayNumber,
+ julianDate.secondsOfDay + seconds,
+ result
+ );
+};
+JulianDate.addMinutes = function(julianDate, minutes, result) {
+ if (!defined_default(julianDate)) {
+ throw new DeveloperError_default("julianDate is required.");
+ }
+ if (!defined_default(minutes)) {
+ throw new DeveloperError_default("minutes is required.");
+ }
+ if (!defined_default(result)) {
+ throw new DeveloperError_default("result is required.");
+ }
+ const newSecondsOfDay = julianDate.secondsOfDay + minutes * TimeConstants_default.SECONDS_PER_MINUTE;
+ return setComponents(julianDate.dayNumber, newSecondsOfDay, result);
+};
+JulianDate.addHours = function(julianDate, hours, result) {
+ if (!defined_default(julianDate)) {
+ throw new DeveloperError_default("julianDate is required.");
+ }
+ if (!defined_default(hours)) {
+ throw new DeveloperError_default("hours is required.");
+ }
+ if (!defined_default(result)) {
+ throw new DeveloperError_default("result is required.");
+ }
+ const newSecondsOfDay = julianDate.secondsOfDay + hours * TimeConstants_default.SECONDS_PER_HOUR;
+ return setComponents(julianDate.dayNumber, newSecondsOfDay, result);
+};
+JulianDate.addDays = function(julianDate, days, result) {
+ if (!defined_default(julianDate)) {
+ throw new DeveloperError_default("julianDate is required.");
+ }
+ if (!defined_default(days)) {
+ throw new DeveloperError_default("days is required.");
+ }
+ if (!defined_default(result)) {
+ throw new DeveloperError_default("result is required.");
+ }
+ const newJulianDayNumber = julianDate.dayNumber + days;
+ return setComponents(newJulianDayNumber, julianDate.secondsOfDay, result);
+};
+JulianDate.lessThan = function(left, right) {
+ return JulianDate.compare(left, right) < 0;
+};
+JulianDate.lessThanOrEquals = function(left, right) {
+ return JulianDate.compare(left, right) <= 0;
+};
+JulianDate.greaterThan = function(left, right) {
+ return JulianDate.compare(left, right) > 0;
+};
+JulianDate.greaterThanOrEquals = function(left, right) {
+ return JulianDate.compare(left, right) >= 0;
+};
+JulianDate.prototype.clone = function(result) {
+ return JulianDate.clone(this, result);
+};
+JulianDate.prototype.equals = function(right) {
+ return JulianDate.equals(this, right);
+};
+JulianDate.prototype.equalsEpsilon = function(right, epsilon) {
+ return JulianDate.equalsEpsilon(this, right, epsilon);
+};
+JulianDate.prototype.toString = function() {
+ return JulianDate.toIso8601(this);
+};
+JulianDate.leapSeconds = [
+ new LeapSecond_default(new JulianDate(2441317, 43210, TimeStandard_default.TAI), 10),
+ // January 1, 1972 00:00:00 UTC
+ new LeapSecond_default(new JulianDate(2441499, 43211, TimeStandard_default.TAI), 11),
+ // July 1, 1972 00:00:00 UTC
+ new LeapSecond_default(new JulianDate(2441683, 43212, TimeStandard_default.TAI), 12),
+ // January 1, 1973 00:00:00 UTC
+ new LeapSecond_default(new JulianDate(2442048, 43213, TimeStandard_default.TAI), 13),
+ // January 1, 1974 00:00:00 UTC
+ new LeapSecond_default(new JulianDate(2442413, 43214, TimeStandard_default.TAI), 14),
+ // January 1, 1975 00:00:00 UTC
+ new LeapSecond_default(new JulianDate(2442778, 43215, TimeStandard_default.TAI), 15),
+ // January 1, 1976 00:00:00 UTC
+ new LeapSecond_default(new JulianDate(2443144, 43216, TimeStandard_default.TAI), 16),
+ // January 1, 1977 00:00:00 UTC
+ new LeapSecond_default(new JulianDate(2443509, 43217, TimeStandard_default.TAI), 17),
+ // January 1, 1978 00:00:00 UTC
+ new LeapSecond_default(new JulianDate(2443874, 43218, TimeStandard_default.TAI), 18),
+ // January 1, 1979 00:00:00 UTC
+ new LeapSecond_default(new JulianDate(2444239, 43219, TimeStandard_default.TAI), 19),
+ // January 1, 1980 00:00:00 UTC
+ new LeapSecond_default(new JulianDate(2444786, 43220, TimeStandard_default.TAI), 20),
+ // July 1, 1981 00:00:00 UTC
+ new LeapSecond_default(new JulianDate(2445151, 43221, TimeStandard_default.TAI), 21),
+ // July 1, 1982 00:00:00 UTC
+ new LeapSecond_default(new JulianDate(2445516, 43222, TimeStandard_default.TAI), 22),
+ // July 1, 1983 00:00:00 UTC
+ new LeapSecond_default(new JulianDate(2446247, 43223, TimeStandard_default.TAI), 23),
+ // July 1, 1985 00:00:00 UTC
+ new LeapSecond_default(new JulianDate(2447161, 43224, TimeStandard_default.TAI), 24),
+ // January 1, 1988 00:00:00 UTC
+ new LeapSecond_default(new JulianDate(2447892, 43225, TimeStandard_default.TAI), 25),
+ // January 1, 1990 00:00:00 UTC
+ new LeapSecond_default(new JulianDate(2448257, 43226, TimeStandard_default.TAI), 26),
+ // January 1, 1991 00:00:00 UTC
+ new LeapSecond_default(new JulianDate(2448804, 43227, TimeStandard_default.TAI), 27),
+ // July 1, 1992 00:00:00 UTC
+ new LeapSecond_default(new JulianDate(2449169, 43228, TimeStandard_default.TAI), 28),
+ // July 1, 1993 00:00:00 UTC
+ new LeapSecond_default(new JulianDate(2449534, 43229, TimeStandard_default.TAI), 29),
+ // July 1, 1994 00:00:00 UTC
+ new LeapSecond_default(new JulianDate(2450083, 43230, TimeStandard_default.TAI), 30),
+ // January 1, 1996 00:00:00 UTC
+ new LeapSecond_default(new JulianDate(2450630, 43231, TimeStandard_default.TAI), 31),
+ // July 1, 1997 00:00:00 UTC
+ new LeapSecond_default(new JulianDate(2451179, 43232, TimeStandard_default.TAI), 32),
+ // January 1, 1999 00:00:00 UTC
+ new LeapSecond_default(new JulianDate(2453736, 43233, TimeStandard_default.TAI), 33),
+ // January 1, 2006 00:00:00 UTC
+ new LeapSecond_default(new JulianDate(2454832, 43234, TimeStandard_default.TAI), 34),
+ // January 1, 2009 00:00:00 UTC
+ new LeapSecond_default(new JulianDate(2456109, 43235, TimeStandard_default.TAI), 35),
+ // July 1, 2012 00:00:00 UTC
+ new LeapSecond_default(new JulianDate(2457204, 43236, TimeStandard_default.TAI), 36),
+ // July 1, 2015 00:00:00 UTC
+ new LeapSecond_default(new JulianDate(2457754, 43237, TimeStandard_default.TAI), 37)
+ // January 1, 2017 00:00:00 UTC
+];
+var JulianDate_default = JulianDate;
+
+// packages/engine/Source/Core/Resource.js
+var import_urijs6 = __toESM(require_URI(), 1);
+
+// packages/engine/Source/Core/appendForwardSlash.js
+function appendForwardSlash(url) {
+ if (url.length === 0 || url[url.length - 1] !== "/") {
+ url = `${url}/`;
+ }
+ return url;
+}
+var appendForwardSlash_default = appendForwardSlash;
+
+// packages/engine/Source/Core/clone.js
+function clone(object, deep) {
+ if (object === null || typeof object !== "object") {
+ return object;
+ }
+ deep = defaultValue_default(deep, false);
+ const result = new object.constructor();
+ for (const propertyName in object) {
+ if (object.hasOwnProperty(propertyName)) {
+ let value = object[propertyName];
+ if (deep) {
+ value = clone(value, deep);
+ }
+ result[propertyName] = value;
+ }
+ }
+ return result;
+}
+var clone_default = clone;
+
+// packages/engine/Source/Core/defer.js
+function defer() {
+ let resolve;
+ let reject;
+ const promise = new Promise(function(res, rej) {
+ resolve = res;
+ reject = rej;
+ });
+ return {
+ resolve,
+ reject,
+ promise
+ };
+}
+var defer_default = defer;
+
+// packages/engine/Source/Core/getAbsoluteUri.js
+var import_urijs = __toESM(require_URI(), 1);
+function getAbsoluteUri(relative, base) {
+ let documentObject;
+ if (typeof document !== "undefined") {
+ documentObject = document;
+ }
+ return getAbsoluteUri._implementation(relative, base, documentObject);
+}
+getAbsoluteUri._implementation = function(relative, base, documentObject) {
+ if (!defined_default(relative)) {
+ throw new DeveloperError_default("relative uri is required.");
+ }
+ if (!defined_default(base)) {
+ if (typeof documentObject === "undefined") {
+ return relative;
+ }
+ base = defaultValue_default(documentObject.baseURI, documentObject.location.href);
+ }
+ const relativeUri = new import_urijs.default(relative);
+ if (relativeUri.scheme() !== "") {
+ return relativeUri.toString();
+ }
+ return relativeUri.absoluteTo(base).toString();
+};
+var getAbsoluteUri_default = getAbsoluteUri;
+
+// packages/engine/Source/Core/getBaseUri.js
+var import_urijs2 = __toESM(require_URI(), 1);
+function getBaseUri(uri, includeQuery) {
+ if (!defined_default(uri)) {
+ throw new DeveloperError_default("uri is required.");
+ }
+ let basePath = "";
+ const i = uri.lastIndexOf("/");
+ if (i !== -1) {
+ basePath = uri.substring(0, i + 1);
+ }
+ if (!includeQuery) {
+ return basePath;
+ }
+ uri = new import_urijs2.default(uri);
+ if (uri.query().length !== 0) {
+ basePath += `?${uri.query()}`;
+ }
+ if (uri.fragment().length !== 0) {
+ basePath += `#${uri.fragment()}`;
+ }
+ return basePath;
+}
+var getBaseUri_default = getBaseUri;
+
+// packages/engine/Source/Core/getExtensionFromUri.js
+var import_urijs3 = __toESM(require_URI(), 1);
+function getExtensionFromUri(uri) {
+ if (!defined_default(uri)) {
+ throw new DeveloperError_default("uri is required.");
+ }
+ const uriObject = new import_urijs3.default(uri);
+ uriObject.normalize();
+ let path = uriObject.path();
+ let index = path.lastIndexOf("/");
+ if (index !== -1) {
+ path = path.substr(index + 1);
+ }
+ index = path.lastIndexOf(".");
+ if (index === -1) {
+ path = "";
+ } else {
+ path = path.substr(index + 1);
+ }
+ return path;
+}
+var getExtensionFromUri_default = getExtensionFromUri;
+
+// packages/engine/Source/Core/getImagePixels.js
+var context2DsByWidthAndHeight = {};
+function getImagePixels(image, width, height) {
+ if (!defined_default(width)) {
+ width = image.width;
+ }
+ if (!defined_default(height)) {
+ height = image.height;
+ }
+ let context2DsByHeight = context2DsByWidthAndHeight[width];
+ if (!defined_default(context2DsByHeight)) {
+ context2DsByHeight = {};
+ context2DsByWidthAndHeight[width] = context2DsByHeight;
+ }
+ let context2d = context2DsByHeight[height];
+ if (!defined_default(context2d)) {
+ const canvas = document.createElement("canvas");
+ canvas.width = width;
+ canvas.height = height;
+ context2d = canvas.getContext("2d", { willReadFrequently: true });
+ context2d.globalCompositeOperation = "copy";
+ context2DsByHeight[height] = context2d;
+ }
+ context2d.drawImage(image, 0, 0, width, height);
+ return context2d.getImageData(0, 0, width, height).data;
+}
+var getImagePixels_default = getImagePixels;
+
+// packages/engine/Source/Core/isBlobUri.js
+var blobUriRegex = /^blob:/i;
+function isBlobUri(uri) {
+ Check_default.typeOf.string("uri", uri);
+ return blobUriRegex.test(uri);
+}
+var isBlobUri_default = isBlobUri;
+
+// packages/engine/Source/Core/isCrossOriginUrl.js
+var a;
+function isCrossOriginUrl(url) {
+ if (!defined_default(a)) {
+ a = document.createElement("a");
+ }
+ a.href = window.location.href;
+ const host = a.host;
+ const protocol = a.protocol;
+ a.href = url;
+ a.href = a.href;
+ return protocol !== a.protocol || host !== a.host;
+}
+var isCrossOriginUrl_default = isCrossOriginUrl;
+
+// packages/engine/Source/Core/isDataUri.js
+var dataUriRegex = /^data:/i;
+function isDataUri(uri) {
+ Check_default.typeOf.string("uri", uri);
+ return dataUriRegex.test(uri);
+}
+var isDataUri_default = isDataUri;
+
+// packages/engine/Source/Core/loadAndExecuteScript.js
+function loadAndExecuteScript(url) {
+ const script = document.createElement("script");
+ script.async = true;
+ script.src = url;
+ return new Promise((resolve, reject) => {
+ if (window.crossOriginIsolated) {
+ script.setAttribute("crossorigin", "anonymous");
+ }
+ const head = document.getElementsByTagName("head")[0];
+ script.onload = function() {
+ script.onload = void 0;
+ head.removeChild(script);
+ resolve();
+ };
+ script.onerror = function(e) {
+ reject(e);
+ };
+ head.appendChild(script);
+ });
+}
+var loadAndExecuteScript_default = loadAndExecuteScript;
+
+// packages/engine/Source/Core/objectToQuery.js
+function objectToQuery(obj) {
+ if (!defined_default(obj)) {
+ throw new DeveloperError_default("obj is required.");
+ }
+ let result = "";
+ for (const propName in obj) {
+ if (obj.hasOwnProperty(propName)) {
+ const value = obj[propName];
+ const part = `${encodeURIComponent(propName)}=`;
+ if (Array.isArray(value)) {
+ for (let i = 0, len = value.length; i < len; ++i) {
+ result += `${part + encodeURIComponent(value[i])}&`;
+ }
+ } else {
+ result += `${part + encodeURIComponent(value)}&`;
+ }
+ }
+ }
+ result = result.slice(0, -1);
+ return result;
+}
+var objectToQuery_default = objectToQuery;
+
+// packages/engine/Source/Core/queryToObject.js
+function queryToObject(queryString) {
+ if (!defined_default(queryString)) {
+ throw new DeveloperError_default("queryString is required.");
+ }
+ const result = {};
+ if (queryString === "") {
+ return result;
+ }
+ const parts = queryString.replace(/\+/g, "%20").split(/[&;]/);
+ for (let i = 0, len = parts.length; i < len; ++i) {
+ const subparts = parts[i].split("=");
+ const name = decodeURIComponent(subparts[0]);
+ let value = subparts[1];
+ if (defined_default(value)) {
+ value = decodeURIComponent(value);
+ } else {
+ value = "";
+ }
+ const resultValue = result[name];
+ if (typeof resultValue === "string") {
+ result[name] = [resultValue, value];
+ } else if (Array.isArray(resultValue)) {
+ resultValue.push(value);
+ } else {
+ result[name] = value;
+ }
+ }
+ return result;
+}
+var queryToObject_default = queryToObject;
+
+// packages/engine/Source/Core/RequestState.js
+var RequestState = {
+ /**
+ * Initial unissued state.
+ *
+ * @type {number}
+ * @constant
+ */
+ UNISSUED: 0,
+ /**
+ * Issued but not yet active. Will become active when open slots are available.
+ *
+ * @type {number}
+ * @constant
+ */
+ ISSUED: 1,
+ /**
+ * Actual http request has been sent.
+ *
+ * @type {number}
+ * @constant
+ */
+ ACTIVE: 2,
+ /**
+ * Request completed successfully.
+ *
+ * @type {number}
+ * @constant
+ */
+ RECEIVED: 3,
+ /**
+ * Request was cancelled, either explicitly or automatically because of low priority.
+ *
+ * @type {number}
+ * @constant
+ */
+ CANCELLED: 4,
+ /**
+ * Request failed.
+ *
+ * @type {number}
+ * @constant
+ */
+ FAILED: 5
+};
+var RequestState_default = Object.freeze(RequestState);
+
+// packages/engine/Source/Core/RequestType.js
+var RequestType = {
+ /**
+ * Terrain request.
+ *
+ * @type {number}
+ * @constant
+ */
+ TERRAIN: 0,
+ /**
+ * Imagery request.
+ *
+ * @type {number}
+ * @constant
+ */
+ IMAGERY: 1,
+ /**
+ * 3D Tiles request.
+ *
+ * @type {number}
+ * @constant
+ */
+ TILES3D: 2,
+ /**
+ * Other request.
+ *
+ * @type {number}
+ * @constant
+ */
+ OTHER: 3
+};
+var RequestType_default = Object.freeze(RequestType);
+
+// packages/engine/Source/Core/Request.js
+function Request(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const throttleByServer = defaultValue_default(options.throttleByServer, false);
+ const throttle = defaultValue_default(options.throttle, false);
+ this.url = options.url;
+ this.requestFunction = options.requestFunction;
+ this.cancelFunction = options.cancelFunction;
+ this.priorityFunction = options.priorityFunction;
+ this.priority = defaultValue_default(options.priority, 0);
+ this.throttle = throttle;
+ this.throttleByServer = throttleByServer;
+ this.type = defaultValue_default(options.type, RequestType_default.OTHER);
+ this.serverKey = options.serverKey;
+ this.state = RequestState_default.UNISSUED;
+ this.deferred = void 0;
+ this.cancelled = false;
+}
+Request.prototype.cancel = function() {
+ this.cancelled = true;
+};
+Request.prototype.clone = function(result) {
+ if (!defined_default(result)) {
+ return new Request(this);
+ }
+ result.url = this.url;
+ result.requestFunction = this.requestFunction;
+ result.cancelFunction = this.cancelFunction;
+ result.priorityFunction = this.priorityFunction;
+ result.priority = this.priority;
+ result.throttle = this.throttle;
+ result.throttleByServer = this.throttleByServer;
+ result.type = this.type;
+ result.serverKey = this.serverKey;
+ result.state = RequestState_default.UNISSUED;
+ result.deferred = void 0;
+ result.cancelled = false;
+ return result;
+};
+var Request_default = Request;
+
+// packages/engine/Source/Core/parseResponseHeaders.js
+function parseResponseHeaders(headerString) {
+ const headers = {};
+ if (!headerString) {
+ return headers;
+ }
+ const headerPairs = headerString.split("\r\n");
+ for (let i = 0; i < headerPairs.length; ++i) {
+ const headerPair = headerPairs[i];
+ const index = headerPair.indexOf(": ");
+ if (index > 0) {
+ const key = headerPair.substring(0, index);
+ const val = headerPair.substring(index + 2);
+ headers[key] = val;
+ }
+ }
+ return headers;
+}
+var parseResponseHeaders_default = parseResponseHeaders;
+
+// packages/engine/Source/Core/RequestErrorEvent.js
+function RequestErrorEvent(statusCode, response, responseHeaders) {
+ this.statusCode = statusCode;
+ this.response = response;
+ this.responseHeaders = responseHeaders;
+ if (typeof this.responseHeaders === "string") {
+ this.responseHeaders = parseResponseHeaders_default(this.responseHeaders);
+ }
+}
+RequestErrorEvent.prototype.toString = function() {
+ let str = "Request has failed.";
+ if (defined_default(this.statusCode)) {
+ str += ` Status Code: ${this.statusCode}`;
+ }
+ return str;
+};
+var RequestErrorEvent_default = RequestErrorEvent;
+
+// packages/engine/Source/Core/RequestScheduler.js
+var import_urijs4 = __toESM(require_URI(), 1);
+
+// packages/engine/Source/Core/Event.js
+function Event() {
+ this._listeners = [];
+ this._scopes = [];
+ this._toRemove = [];
+ this._insideRaiseEvent = false;
+}
+Object.defineProperties(Event.prototype, {
+ /**
+ * The number of listeners currently subscribed to the event.
+ * @memberof Event.prototype
+ * @type {number}
+ * @readonly
+ */
+ numberOfListeners: {
+ get: function() {
+ return this._listeners.length - this._toRemove.length;
+ }
+ }
+});
+Event.prototype.addEventListener = function(listener, scope) {
+ Check_default.typeOf.func("listener", listener);
+ this._listeners.push(listener);
+ this._scopes.push(scope);
+ const event = this;
+ return function() {
+ event.removeEventListener(listener, scope);
+ };
+};
+Event.prototype.removeEventListener = function(listener, scope) {
+ Check_default.typeOf.func("listener", listener);
+ const listeners = this._listeners;
+ const scopes = this._scopes;
+ let index = -1;
+ for (let i = 0; i < listeners.length; i++) {
+ if (listeners[i] === listener && scopes[i] === scope) {
+ index = i;
+ break;
+ }
+ }
+ if (index !== -1) {
+ if (this._insideRaiseEvent) {
+ this._toRemove.push(index);
+ listeners[index] = void 0;
+ scopes[index] = void 0;
+ } else {
+ listeners.splice(index, 1);
+ scopes.splice(index, 1);
+ }
+ return true;
+ }
+ return false;
+};
+function compareNumber(a3, b) {
+ return b - a3;
+}
+Event.prototype.raiseEvent = function() {
+ this._insideRaiseEvent = true;
+ let i;
+ const listeners = this._listeners;
+ const scopes = this._scopes;
+ let length = listeners.length;
+ for (i = 0; i < length; i++) {
+ const listener = listeners[i];
+ if (defined_default(listener)) {
+ listeners[i].apply(scopes[i], arguments);
+ }
+ }
+ const toRemove = this._toRemove;
+ length = toRemove.length;
+ if (length > 0) {
+ toRemove.sort(compareNumber);
+ for (i = 0; i < length; i++) {
+ const index = toRemove[i];
+ listeners.splice(index, 1);
+ scopes.splice(index, 1);
+ }
+ toRemove.length = 0;
+ }
+ this._insideRaiseEvent = false;
+};
+var Event_default = Event;
+
+// packages/engine/Source/Core/Heap.js
+function Heap(options) {
+ Check_default.typeOf.object("options", options);
+ Check_default.defined("options.comparator", options.comparator);
+ this._comparator = options.comparator;
+ this._array = [];
+ this._length = 0;
+ this._maximumLength = void 0;
+}
+Object.defineProperties(Heap.prototype, {
+ /**
+ * Gets the length of the heap.
+ *
+ * @memberof Heap.prototype
+ *
+ * @type {number}
+ * @readonly
+ */
+ length: {
+ get: function() {
+ return this._length;
+ }
+ },
+ /**
+ * Gets the internal array.
+ *
+ * @memberof Heap.prototype
+ *
+ * @type {Array}
+ * @readonly
+ */
+ internalArray: {
+ get: function() {
+ return this._array;
+ }
+ },
+ /**
+ * Gets and sets the maximum length of the heap.
+ *
+ * @memberof Heap.prototype
+ *
+ * @type {number}
+ */
+ maximumLength: {
+ get: function() {
+ return this._maximumLength;
+ },
+ set: function(value) {
+ Check_default.typeOf.number.greaterThanOrEquals("maximumLength", value, 0);
+ const originalLength = this._length;
+ if (value < originalLength) {
+ const array = this._array;
+ for (let i = value; i < originalLength; ++i) {
+ array[i] = void 0;
+ }
+ this._length = value;
+ array.length = value;
+ }
+ this._maximumLength = value;
+ }
+ },
+ /**
+ * The comparator to use for the heap. If comparator(a, b) is less than 0, sort a to a lower index than b, otherwise sort to a higher index.
+ *
+ * @memberof Heap.prototype
+ *
+ * @type {Heap.ComparatorCallback}
+ */
+ comparator: {
+ get: function() {
+ return this._comparator;
+ }
+ }
+});
+function swap(array, a3, b) {
+ const temp = array[a3];
+ array[a3] = array[b];
+ array[b] = temp;
+}
+Heap.prototype.reserve = function(length) {
+ length = defaultValue_default(length, this._length);
+ this._array.length = length;
+};
+Heap.prototype.heapify = function(index) {
+ index = defaultValue_default(index, 0);
+ const length = this._length;
+ const comparator = this._comparator;
+ const array = this._array;
+ let candidate = -1;
+ let inserting = true;
+ while (inserting) {
+ const right = 2 * (index + 1);
+ const left = right - 1;
+ if (left < length && comparator(array[left], array[index]) < 0) {
+ candidate = left;
+ } else {
+ candidate = index;
+ }
+ if (right < length && comparator(array[right], array[candidate]) < 0) {
+ candidate = right;
+ }
+ if (candidate !== index) {
+ swap(array, candidate, index);
+ index = candidate;
+ } else {
+ inserting = false;
+ }
+ }
+};
+Heap.prototype.resort = function() {
+ const length = this._length;
+ for (let i = Math.ceil(length / 2); i >= 0; --i) {
+ this.heapify(i);
+ }
+};
+Heap.prototype.insert = function(element) {
+ Check_default.defined("element", element);
+ const array = this._array;
+ const comparator = this._comparator;
+ const maximumLength = this._maximumLength;
+ let index = this._length++;
+ if (index < array.length) {
+ array[index] = element;
+ } else {
+ array.push(element);
+ }
+ while (index !== 0) {
+ const parent = Math.floor((index - 1) / 2);
+ if (comparator(array[index], array[parent]) < 0) {
+ swap(array, index, parent);
+ index = parent;
+ } else {
+ break;
+ }
+ }
+ let removedElement;
+ if (defined_default(maximumLength) && this._length > maximumLength) {
+ removedElement = array[maximumLength];
+ this._length = maximumLength;
+ }
+ return removedElement;
+};
+Heap.prototype.pop = function(index) {
+ index = defaultValue_default(index, 0);
+ if (this._length === 0) {
+ return void 0;
+ }
+ Check_default.typeOf.number.lessThan("index", index, this._length);
+ const array = this._array;
+ const root = array[index];
+ swap(array, index, --this._length);
+ this.heapify(index);
+ array[this._length] = void 0;
+ return root;
+};
+var Heap_default = Heap;
+
+// packages/engine/Source/Core/RequestScheduler.js
+function sortRequests(a3, b) {
+ return a3.priority - b.priority;
+}
+var statistics = {
+ numberOfAttemptedRequests: 0,
+ numberOfActiveRequests: 0,
+ numberOfCancelledRequests: 0,
+ numberOfCancelledActiveRequests: 0,
+ numberOfFailedRequests: 0,
+ numberOfActiveRequestsEver: 0,
+ lastNumberOfActiveRequests: 0
+};
+var priorityHeapLength = 20;
+var requestHeap = new Heap_default({
+ comparator: sortRequests
+});
+requestHeap.maximumLength = priorityHeapLength;
+requestHeap.reserve(priorityHeapLength);
+var activeRequests = [];
+var numberOfActiveRequestsByServer = {};
+var pageUri = typeof document !== "undefined" ? new import_urijs4.default(document.location.href) : new import_urijs4.default();
+var requestCompletedEvent = new Event_default();
+function RequestScheduler() {
+}
+RequestScheduler.maximumRequests = 50;
+RequestScheduler.maximumRequestsPerServer = 18;
+RequestScheduler.requestsByServer = {};
+RequestScheduler.throttleRequests = true;
+RequestScheduler.debugShowStatistics = false;
+RequestScheduler.requestCompletedEvent = requestCompletedEvent;
+Object.defineProperties(RequestScheduler, {
+ /**
+ * Returns the statistics used by the request scheduler.
+ *
+ * @memberof RequestScheduler
+ *
+ * @type {object}
+ * @readonly
+ * @private
+ */
+ statistics: {
+ get: function() {
+ return statistics;
+ }
+ },
+ /**
+ * The maximum size of the priority heap. This limits the number of requests that are sorted by priority. Only applies to requests that are not yet active.
+ *
+ * @memberof RequestScheduler
+ *
+ * @type {number}
+ * @default 20
+ * @private
+ */
+ priorityHeapLength: {
+ get: function() {
+ return priorityHeapLength;
+ },
+ set: function(value) {
+ if (value < priorityHeapLength) {
+ while (requestHeap.length > value) {
+ const request = requestHeap.pop();
+ cancelRequest(request);
+ }
+ }
+ priorityHeapLength = value;
+ requestHeap.maximumLength = value;
+ requestHeap.reserve(value);
+ }
+ }
+});
+function updatePriority(request) {
+ if (defined_default(request.priorityFunction)) {
+ request.priority = request.priorityFunction();
+ }
+}
+RequestScheduler.serverHasOpenSlots = function(serverKey, desiredRequests) {
+ desiredRequests = defaultValue_default(desiredRequests, 1);
+ const maxRequests = defaultValue_default(
+ RequestScheduler.requestsByServer[serverKey],
+ RequestScheduler.maximumRequestsPerServer
+ );
+ const hasOpenSlotsServer = numberOfActiveRequestsByServer[serverKey] + desiredRequests <= maxRequests;
+ return hasOpenSlotsServer;
+};
+RequestScheduler.heapHasOpenSlots = function(desiredRequests) {
+ const hasOpenSlotsHeap = requestHeap.length + desiredRequests <= priorityHeapLength;
+ return hasOpenSlotsHeap;
+};
+function issueRequest(request) {
+ if (request.state === RequestState_default.UNISSUED) {
+ request.state = RequestState_default.ISSUED;
+ request.deferred = defer_default();
+ }
+ return request.deferred.promise;
+}
+function getRequestReceivedFunction(request) {
+ return function(results) {
+ if (request.state === RequestState_default.CANCELLED) {
+ return;
+ }
+ const deferred = request.deferred;
+ --statistics.numberOfActiveRequests;
+ --numberOfActiveRequestsByServer[request.serverKey];
+ requestCompletedEvent.raiseEvent();
+ request.state = RequestState_default.RECEIVED;
+ request.deferred = void 0;
+ deferred.resolve(results);
+ };
+}
+function getRequestFailedFunction(request) {
+ return function(error) {
+ if (request.state === RequestState_default.CANCELLED) {
+ return;
+ }
+ ++statistics.numberOfFailedRequests;
+ --statistics.numberOfActiveRequests;
+ --numberOfActiveRequestsByServer[request.serverKey];
+ requestCompletedEvent.raiseEvent(error);
+ request.state = RequestState_default.FAILED;
+ request.deferred.reject(error);
+ };
+}
+function startRequest(request) {
+ const promise = issueRequest(request);
+ request.state = RequestState_default.ACTIVE;
+ activeRequests.push(request);
+ ++statistics.numberOfActiveRequests;
+ ++statistics.numberOfActiveRequestsEver;
+ ++numberOfActiveRequestsByServer[request.serverKey];
+ request.requestFunction().then(getRequestReceivedFunction(request)).catch(getRequestFailedFunction(request));
+ return promise;
+}
+function cancelRequest(request) {
+ const active = request.state === RequestState_default.ACTIVE;
+ request.state = RequestState_default.CANCELLED;
+ ++statistics.numberOfCancelledRequests;
+ if (defined_default(request.deferred)) {
+ const deferred = request.deferred;
+ request.deferred = void 0;
+ deferred.reject();
+ }
+ if (active) {
+ --statistics.numberOfActiveRequests;
+ --numberOfActiveRequestsByServer[request.serverKey];
+ ++statistics.numberOfCancelledActiveRequests;
+ }
+ if (defined_default(request.cancelFunction)) {
+ request.cancelFunction();
+ }
+}
+RequestScheduler.update = function() {
+ let i;
+ let request;
+ let removeCount = 0;
+ const activeLength = activeRequests.length;
+ for (i = 0; i < activeLength; ++i) {
+ request = activeRequests[i];
+ if (request.cancelled) {
+ cancelRequest(request);
+ }
+ if (request.state !== RequestState_default.ACTIVE) {
+ ++removeCount;
+ continue;
+ }
+ if (removeCount > 0) {
+ activeRequests[i - removeCount] = request;
+ }
+ }
+ activeRequests.length -= removeCount;
+ const issuedRequests = requestHeap.internalArray;
+ const issuedLength = requestHeap.length;
+ for (i = 0; i < issuedLength; ++i) {
+ updatePriority(issuedRequests[i]);
+ }
+ requestHeap.resort();
+ const openSlots = Math.max(
+ RequestScheduler.maximumRequests - activeRequests.length,
+ 0
+ );
+ let filledSlots = 0;
+ while (filledSlots < openSlots && requestHeap.length > 0) {
+ request = requestHeap.pop();
+ if (request.cancelled) {
+ cancelRequest(request);
+ continue;
+ }
+ if (request.throttleByServer && !RequestScheduler.serverHasOpenSlots(request.serverKey)) {
+ cancelRequest(request);
+ continue;
+ }
+ startRequest(request);
+ ++filledSlots;
+ }
+ updateStatistics();
+};
+RequestScheduler.getServerKey = function(url) {
+ Check_default.typeOf.string("url", url);
+ let uri = new import_urijs4.default(url);
+ if (uri.scheme() === "") {
+ uri = uri.absoluteTo(pageUri);
+ uri.normalize();
+ }
+ let serverKey = uri.authority();
+ if (!/:/.test(serverKey)) {
+ serverKey = `${serverKey}:${uri.scheme() === "https" ? "443" : "80"}`;
+ }
+ const length = numberOfActiveRequestsByServer[serverKey];
+ if (!defined_default(length)) {
+ numberOfActiveRequestsByServer[serverKey] = 0;
+ }
+ return serverKey;
+};
+RequestScheduler.request = function(request) {
+ Check_default.typeOf.object("request", request);
+ Check_default.typeOf.string("request.url", request.url);
+ Check_default.typeOf.func("request.requestFunction", request.requestFunction);
+ if (isDataUri_default(request.url) || isBlobUri_default(request.url)) {
+ requestCompletedEvent.raiseEvent();
+ request.state = RequestState_default.RECEIVED;
+ return request.requestFunction();
+ }
+ ++statistics.numberOfAttemptedRequests;
+ if (!defined_default(request.serverKey)) {
+ request.serverKey = RequestScheduler.getServerKey(request.url);
+ }
+ if (RequestScheduler.throttleRequests && request.throttleByServer && !RequestScheduler.serverHasOpenSlots(request.serverKey)) {
+ return void 0;
+ }
+ if (!RequestScheduler.throttleRequests || !request.throttle) {
+ return startRequest(request);
+ }
+ if (activeRequests.length >= RequestScheduler.maximumRequests) {
+ return void 0;
+ }
+ updatePriority(request);
+ const removedRequest = requestHeap.insert(request);
+ if (defined_default(removedRequest)) {
+ if (removedRequest === request) {
+ return void 0;
+ }
+ cancelRequest(removedRequest);
+ }
+ return issueRequest(request);
+};
+function updateStatistics() {
+ if (!RequestScheduler.debugShowStatistics) {
+ return;
+ }
+ if (statistics.numberOfActiveRequests === 0 && statistics.lastNumberOfActiveRequests > 0) {
+ if (statistics.numberOfAttemptedRequests > 0) {
+ console.log(
+ `Number of attempted requests: ${statistics.numberOfAttemptedRequests}`
+ );
+ statistics.numberOfAttemptedRequests = 0;
+ }
+ if (statistics.numberOfCancelledRequests > 0) {
+ console.log(
+ `Number of cancelled requests: ${statistics.numberOfCancelledRequests}`
+ );
+ statistics.numberOfCancelledRequests = 0;
+ }
+ if (statistics.numberOfCancelledActiveRequests > 0) {
+ console.log(
+ `Number of cancelled active requests: ${statistics.numberOfCancelledActiveRequests}`
+ );
+ statistics.numberOfCancelledActiveRequests = 0;
+ }
+ if (statistics.numberOfFailedRequests > 0) {
+ console.log(
+ `Number of failed requests: ${statistics.numberOfFailedRequests}`
+ );
+ statistics.numberOfFailedRequests = 0;
+ }
+ }
+ statistics.lastNumberOfActiveRequests = statistics.numberOfActiveRequests;
+}
+RequestScheduler.clearForSpecs = function() {
+ while (requestHeap.length > 0) {
+ const request = requestHeap.pop();
+ cancelRequest(request);
+ }
+ const length = activeRequests.length;
+ for (let i = 0; i < length; ++i) {
+ cancelRequest(activeRequests[i]);
+ }
+ activeRequests.length = 0;
+ numberOfActiveRequestsByServer = {};
+ statistics.numberOfAttemptedRequests = 0;
+ statistics.numberOfActiveRequests = 0;
+ statistics.numberOfCancelledRequests = 0;
+ statistics.numberOfCancelledActiveRequests = 0;
+ statistics.numberOfFailedRequests = 0;
+ statistics.numberOfActiveRequestsEver = 0;
+ statistics.lastNumberOfActiveRequests = 0;
+};
+RequestScheduler.numberOfActiveRequestsByServer = function(serverKey) {
+ return numberOfActiveRequestsByServer[serverKey];
+};
+RequestScheduler.requestHeap = requestHeap;
+var RequestScheduler_default = RequestScheduler;
+
+// packages/engine/Source/Core/TrustedServers.js
+var import_urijs5 = __toESM(require_URI(), 1);
+var TrustedServers = {};
+var _servers = {};
+TrustedServers.add = function(host, port) {
+ if (!defined_default(host)) {
+ throw new DeveloperError_default("host is required.");
+ }
+ if (!defined_default(port) || port <= 0) {
+ throw new DeveloperError_default("port is required to be greater than 0.");
+ }
+ const authority = `${host.toLowerCase()}:${port}`;
+ if (!defined_default(_servers[authority])) {
+ _servers[authority] = true;
+ }
+};
+TrustedServers.remove = function(host, port) {
+ if (!defined_default(host)) {
+ throw new DeveloperError_default("host is required.");
+ }
+ if (!defined_default(port) || port <= 0) {
+ throw new DeveloperError_default("port is required to be greater than 0.");
+ }
+ const authority = `${host.toLowerCase()}:${port}`;
+ if (defined_default(_servers[authority])) {
+ delete _servers[authority];
+ }
+};
+function getAuthority(url) {
+ const uri = new import_urijs5.default(url);
+ uri.normalize();
+ let authority = uri.authority();
+ if (authority.length === 0) {
+ return void 0;
+ }
+ uri.authority(authority);
+ if (authority.indexOf("@") !== -1) {
+ const parts = authority.split("@");
+ authority = parts[1];
+ }
+ if (authority.indexOf(":") === -1) {
+ let scheme = uri.scheme();
+ if (scheme.length === 0) {
+ scheme = window.location.protocol;
+ scheme = scheme.substring(0, scheme.length - 1);
+ }
+ if (scheme === "http") {
+ authority += ":80";
+ } else if (scheme === "https") {
+ authority += ":443";
+ } else {
+ return void 0;
+ }
+ }
+ return authority;
+}
+TrustedServers.contains = function(url) {
+ if (!defined_default(url)) {
+ throw new DeveloperError_default("url is required.");
+ }
+ const authority = getAuthority(url);
+ if (defined_default(authority) && defined_default(_servers[authority])) {
+ return true;
+ }
+ return false;
+};
+TrustedServers.clear = function() {
+ _servers = {};
+};
+var TrustedServers_default = TrustedServers;
+
+// packages/engine/Source/Core/Resource.js
+var xhrBlobSupported = function() {
+ try {
+ const xhr = new XMLHttpRequest();
+ xhr.open("GET", "#", true);
+ xhr.responseType = "blob";
+ return xhr.responseType === "blob";
+ } catch (e) {
+ return false;
+ }
+}();
+function Resource(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ if (typeof options === "string") {
+ options = {
+ url: options
+ };
+ }
+ Check_default.typeOf.string("options.url", options.url);
+ this._url = void 0;
+ this._templateValues = defaultClone(options.templateValues, {});
+ this._queryParameters = defaultClone(options.queryParameters, {});
+ this.headers = defaultClone(options.headers, {});
+ this.request = defaultValue_default(options.request, new Request_default());
+ this.proxy = options.proxy;
+ this.retryCallback = options.retryCallback;
+ this.retryAttempts = defaultValue_default(options.retryAttempts, 0);
+ this._retryCount = 0;
+ const parseUrl = defaultValue_default(options.parseUrl, true);
+ if (parseUrl) {
+ this.parseUrl(options.url, true, true);
+ } else {
+ this._url = options.url;
+ }
+ this._credits = options.credits;
+}
+function defaultClone(value, defaultValue) {
+ return defined_default(value) ? clone_default(value) : defaultValue;
+}
+Resource.createIfNeeded = function(resource) {
+ if (resource instanceof Resource) {
+ return resource.getDerivedResource({
+ request: resource.request
+ });
+ }
+ if (typeof resource !== "string") {
+ return resource;
+ }
+ return new Resource({
+ url: resource
+ });
+};
+var supportsImageBitmapOptionsPromise;
+Resource.supportsImageBitmapOptions = function() {
+ if (defined_default(supportsImageBitmapOptionsPromise)) {
+ return supportsImageBitmapOptionsPromise;
+ }
+ if (typeof createImageBitmap !== "function") {
+ supportsImageBitmapOptionsPromise = Promise.resolve(false);
+ return supportsImageBitmapOptionsPromise;
+ }
+ const imageDataUri = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAAE4g3rEiDgAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADElEQVQI12Ng6GAAAAEUAIngE3ZiAAAAAElFTkSuQmCC";
+ supportsImageBitmapOptionsPromise = Resource.fetchBlob({
+ url: imageDataUri
+ }).then(function(blob) {
+ const imageBitmapOptions = {
+ imageOrientation: "flipY",
+ // default is "none"
+ premultiplyAlpha: "none",
+ // default is "default"
+ colorSpaceConversion: "none"
+ // default is "default"
+ };
+ return Promise.all([
+ createImageBitmap(blob, imageBitmapOptions),
+ createImageBitmap(blob)
+ ]);
+ }).then(function(imageBitmaps) {
+ const colorWithOptions = getImagePixels_default(imageBitmaps[0]);
+ const colorWithDefaults = getImagePixels_default(imageBitmaps[1]);
+ return colorWithOptions[1] !== colorWithDefaults[1];
+ }).catch(function() {
+ return false;
+ });
+ return supportsImageBitmapOptionsPromise;
+};
+Object.defineProperties(Resource, {
+ /**
+ * Returns true if blobs are supported.
+ *
+ * @memberof Resource
+ * @type {boolean}
+ *
+ * @readonly
+ */
+ isBlobSupported: {
+ get: function() {
+ return xhrBlobSupported;
+ }
+ }
+});
+Object.defineProperties(Resource.prototype, {
+ /**
+ * Query parameters appended to the url.
+ *
+ * @memberof Resource.prototype
+ * @type {object}
+ *
+ * @readonly
+ */
+ queryParameters: {
+ get: function() {
+ return this._queryParameters;
+ }
+ },
+ /**
+ * The key/value pairs used to replace template parameters in the url.
+ *
+ * @memberof Resource.prototype
+ * @type {object}
+ *
+ * @readonly
+ */
+ templateValues: {
+ get: function() {
+ return this._templateValues;
+ }
+ },
+ /**
+ * The url to the resource with template values replaced, query string appended and encoded by proxy if one was set.
+ *
+ * @memberof Resource.prototype
+ * @type {string}
+ */
+ url: {
+ get: function() {
+ return this.getUrlComponent(true, true);
+ },
+ set: function(value) {
+ this.parseUrl(value, false, false);
+ }
+ },
+ /**
+ * The file extension of the resource.
+ *
+ * @memberof Resource.prototype
+ * @type {string}
+ *
+ * @readonly
+ */
+ extension: {
+ get: function() {
+ return getExtensionFromUri_default(this._url);
+ }
+ },
+ /**
+ * True if the Resource refers to a data URI.
+ *
+ * @memberof Resource.prototype
+ * @type {boolean}
+ */
+ isDataUri: {
+ get: function() {
+ return isDataUri_default(this._url);
+ }
+ },
+ /**
+ * True if the Resource refers to a blob URI.
+ *
+ * @memberof Resource.prototype
+ * @type {boolean}
+ */
+ isBlobUri: {
+ get: function() {
+ return isBlobUri_default(this._url);
+ }
+ },
+ /**
+ * True if the Resource refers to a cross origin URL.
+ *
+ * @memberof Resource.prototype
+ * @type {boolean}
+ */
+ isCrossOriginUrl: {
+ get: function() {
+ return isCrossOriginUrl_default(this._url);
+ }
+ },
+ /**
+ * True if the Resource has request headers. This is equivalent to checking if the headers property has any keys.
+ *
+ * @memberof Resource.prototype
+ * @type {boolean}
+ */
+ hasHeaders: {
+ get: function() {
+ return Object.keys(this.headers).length > 0;
+ }
+ },
+ /**
+ * Gets the credits required for attribution of an asset.
+ * @private
+ */
+ credits: {
+ get: function() {
+ return this._credits;
+ }
+ }
+});
+Resource.prototype.toString = function() {
+ return this.getUrlComponent(true, true);
+};
+Resource.prototype.parseUrl = function(url, merge, preserveQuery, baseUrl) {
+ let uri = new import_urijs6.default(url);
+ const query = parseQueryString(uri.query());
+ this._queryParameters = merge ? combineQueryParameters(query, this.queryParameters, preserveQuery) : query;
+ uri.search("");
+ uri.fragment("");
+ if (defined_default(baseUrl) && uri.scheme() === "") {
+ uri = uri.absoluteTo(getAbsoluteUri_default(baseUrl));
+ }
+ this._url = uri.toString();
+};
+function parseQueryString(queryString) {
+ if (queryString.length === 0) {
+ return {};
+ }
+ if (queryString.indexOf("=") === -1) {
+ return { [queryString]: void 0 };
+ }
+ return queryToObject_default(queryString);
+}
+function combineQueryParameters(q1, q2, preserveQueryParameters) {
+ if (!preserveQueryParameters) {
+ return combine_default(q1, q2);
+ }
+ const result = clone_default(q1, true);
+ for (const param in q2) {
+ if (q2.hasOwnProperty(param)) {
+ let value = result[param];
+ const q2Value = q2[param];
+ if (defined_default(value)) {
+ if (!Array.isArray(value)) {
+ value = result[param] = [value];
+ }
+ result[param] = value.concat(q2Value);
+ } else {
+ result[param] = Array.isArray(q2Value) ? q2Value.slice() : q2Value;
+ }
+ }
+ }
+ return result;
+}
+Resource.prototype.getUrlComponent = function(query, proxy) {
+ if (this.isDataUri) {
+ return this._url;
+ }
+ let url = this._url;
+ if (query) {
+ url = `${url}${stringifyQuery(this.queryParameters)}`;
+ }
+ url = url.replace(/%7B/g, "{").replace(/%7D/g, "}");
+ const templateValues = this._templateValues;
+ if (Object.keys(templateValues).length > 0) {
+ url = url.replace(/{(.*?)}/g, function(match, key) {
+ const replacement = templateValues[key];
+ if (defined_default(replacement)) {
+ return encodeURIComponent(replacement);
+ }
+ return match;
+ });
+ }
+ if (proxy && defined_default(this.proxy)) {
+ url = this.proxy.getURL(url);
+ }
+ return url;
+};
+function stringifyQuery(queryObject) {
+ const keys = Object.keys(queryObject);
+ if (keys.length === 0) {
+ return "";
+ }
+ if (keys.length === 1 && !defined_default(queryObject[keys[0]])) {
+ return `?${keys[0]}`;
+ }
+ return `?${objectToQuery_default(queryObject)}`;
+}
+Resource.prototype.setQueryParameters = function(params, useAsDefault) {
+ if (useAsDefault) {
+ this._queryParameters = combineQueryParameters(
+ this._queryParameters,
+ params,
+ false
+ );
+ } else {
+ this._queryParameters = combineQueryParameters(
+ params,
+ this._queryParameters,
+ false
+ );
+ }
+};
+Resource.prototype.appendQueryParameters = function(params) {
+ this._queryParameters = combineQueryParameters(
+ params,
+ this._queryParameters,
+ true
+ );
+};
+Resource.prototype.setTemplateValues = function(template, useAsDefault) {
+ if (useAsDefault) {
+ this._templateValues = combine_default(this._templateValues, template);
+ } else {
+ this._templateValues = combine_default(template, this._templateValues);
+ }
+};
+Resource.prototype.getDerivedResource = function(options) {
+ const resource = this.clone();
+ resource._retryCount = 0;
+ if (defined_default(options.url)) {
+ const preserveQuery = defaultValue_default(options.preserveQueryParameters, false);
+ resource.parseUrl(options.url, true, preserveQuery, this._url);
+ }
+ if (defined_default(options.queryParameters)) {
+ resource._queryParameters = combine_default(
+ options.queryParameters,
+ resource.queryParameters
+ );
+ }
+ if (defined_default(options.templateValues)) {
+ resource._templateValues = combine_default(
+ options.templateValues,
+ resource.templateValues
+ );
+ }
+ if (defined_default(options.headers)) {
+ resource.headers = combine_default(options.headers, resource.headers);
+ }
+ if (defined_default(options.proxy)) {
+ resource.proxy = options.proxy;
+ }
+ if (defined_default(options.request)) {
+ resource.request = options.request;
+ }
+ if (defined_default(options.retryCallback)) {
+ resource.retryCallback = options.retryCallback;
+ }
+ if (defined_default(options.retryAttempts)) {
+ resource.retryAttempts = options.retryAttempts;
+ }
+ return resource;
+};
+Resource.prototype.retryOnError = function(error) {
+ const retryCallback = this.retryCallback;
+ if (typeof retryCallback !== "function" || this._retryCount >= this.retryAttempts) {
+ return Promise.resolve(false);
+ }
+ const that = this;
+ return Promise.resolve(retryCallback(this, error)).then(function(result) {
+ ++that._retryCount;
+ return result;
+ });
+};
+Resource.prototype.clone = function(result) {
+ if (!defined_default(result)) {
+ return new Resource({
+ url: this._url,
+ queryParameters: this.queryParameters,
+ templateValues: this.templateValues,
+ headers: this.headers,
+ proxy: this.proxy,
+ retryCallback: this.retryCallback,
+ retryAttempts: this.retryAttempts,
+ request: this.request.clone(),
+ parseUrl: false,
+ credits: defined_default(this.credits) ? this.credits.slice() : void 0
+ });
+ }
+ result._url = this._url;
+ result._queryParameters = clone_default(this._queryParameters);
+ result._templateValues = clone_default(this._templateValues);
+ result.headers = clone_default(this.headers);
+ result.proxy = this.proxy;
+ result.retryCallback = this.retryCallback;
+ result.retryAttempts = this.retryAttempts;
+ result._retryCount = 0;
+ result.request = this.request.clone();
+ return result;
+};
+Resource.prototype.getBaseUri = function(includeQuery) {
+ return getBaseUri_default(this.getUrlComponent(includeQuery), includeQuery);
+};
+Resource.prototype.appendForwardSlash = function() {
+ this._url = appendForwardSlash_default(this._url);
+};
+Resource.prototype.fetchArrayBuffer = function() {
+ return this.fetch({
+ responseType: "arraybuffer"
+ });
+};
+Resource.fetchArrayBuffer = function(options) {
+ const resource = new Resource(options);
+ return resource.fetchArrayBuffer();
+};
+Resource.prototype.fetchBlob = function() {
+ return this.fetch({
+ responseType: "blob"
+ });
+};
+Resource.fetchBlob = function(options) {
+ const resource = new Resource(options);
+ return resource.fetchBlob();
+};
+Resource.prototype.fetchImage = function(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const preferImageBitmap = defaultValue_default(options.preferImageBitmap, false);
+ const preferBlob = defaultValue_default(options.preferBlob, false);
+ const flipY = defaultValue_default(options.flipY, false);
+ const skipColorSpaceConversion = defaultValue_default(
+ options.skipColorSpaceConversion,
+ false
+ );
+ checkAndResetRequest(this.request);
+ if (!xhrBlobSupported || this.isDataUri || this.isBlobUri || !this.hasHeaders && !preferBlob) {
+ return fetchImage({
+ resource: this,
+ flipY,
+ skipColorSpaceConversion,
+ preferImageBitmap
+ });
+ }
+ const blobPromise = this.fetchBlob();
+ if (!defined_default(blobPromise)) {
+ return;
+ }
+ let supportsImageBitmap;
+ let useImageBitmap;
+ let generatedBlobResource;
+ let generatedBlob;
+ return Resource.supportsImageBitmapOptions().then(function(result) {
+ supportsImageBitmap = result;
+ useImageBitmap = supportsImageBitmap && preferImageBitmap;
+ return blobPromise;
+ }).then(function(blob) {
+ if (!defined_default(blob)) {
+ return;
+ }
+ generatedBlob = blob;
+ if (useImageBitmap) {
+ return Resource.createImageBitmapFromBlob(blob, {
+ flipY,
+ premultiplyAlpha: false,
+ skipColorSpaceConversion
+ });
+ }
+ const blobUrl = window.URL.createObjectURL(blob);
+ generatedBlobResource = new Resource({
+ url: blobUrl
+ });
+ return fetchImage({
+ resource: generatedBlobResource,
+ flipY,
+ skipColorSpaceConversion,
+ preferImageBitmap: false
+ });
+ }).then(function(image) {
+ if (!defined_default(image)) {
+ return;
+ }
+ image.blob = generatedBlob;
+ if (useImageBitmap) {
+ return image;
+ }
+ window.URL.revokeObjectURL(generatedBlobResource.url);
+ return image;
+ }).catch(function(error) {
+ if (defined_default(generatedBlobResource)) {
+ window.URL.revokeObjectURL(generatedBlobResource.url);
+ }
+ error.blob = generatedBlob;
+ return Promise.reject(error);
+ });
+};
+function fetchImage(options) {
+ const resource = options.resource;
+ const flipY = options.flipY;
+ const skipColorSpaceConversion = options.skipColorSpaceConversion;
+ const preferImageBitmap = options.preferImageBitmap;
+ const request = resource.request;
+ request.url = resource.url;
+ request.requestFunction = function() {
+ let crossOrigin = false;
+ if (!resource.isDataUri && !resource.isBlobUri) {
+ crossOrigin = resource.isCrossOriginUrl;
+ }
+ const deferred = defer_default();
+ Resource._Implementations.createImage(
+ request,
+ crossOrigin,
+ deferred,
+ flipY,
+ skipColorSpaceConversion,
+ preferImageBitmap
+ );
+ return deferred.promise;
+ };
+ const promise = RequestScheduler_default.request(request);
+ if (!defined_default(promise)) {
+ return;
+ }
+ return promise.catch(function(e) {
+ if (request.state !== RequestState_default.FAILED) {
+ return Promise.reject(e);
+ }
+ return resource.retryOnError(e).then(function(retry) {
+ if (retry) {
+ request.state = RequestState_default.UNISSUED;
+ request.deferred = void 0;
+ return fetchImage({
+ resource,
+ flipY,
+ skipColorSpaceConversion,
+ preferImageBitmap
+ });
+ }
+ return Promise.reject(e);
+ });
+ });
+}
+Resource.fetchImage = function(options) {
+ const resource = new Resource(options);
+ return resource.fetchImage({
+ flipY: options.flipY,
+ skipColorSpaceConversion: options.skipColorSpaceConversion,
+ preferBlob: options.preferBlob,
+ preferImageBitmap: options.preferImageBitmap
+ });
+};
+Resource.prototype.fetchText = function() {
+ return this.fetch({
+ responseType: "text"
+ });
+};
+Resource.fetchText = function(options) {
+ const resource = new Resource(options);
+ return resource.fetchText();
+};
+Resource.prototype.fetchJson = function() {
+ const promise = this.fetch({
+ responseType: "text",
+ headers: {
+ Accept: "application/json,*/*;q=0.01"
+ }
+ });
+ if (!defined_default(promise)) {
+ return void 0;
+ }
+ return promise.then(function(value) {
+ if (!defined_default(value)) {
+ return;
+ }
+ return JSON.parse(value);
+ });
+};
+Resource.fetchJson = function(options) {
+ const resource = new Resource(options);
+ return resource.fetchJson();
+};
+Resource.prototype.fetchXML = function() {
+ return this.fetch({
+ responseType: "document",
+ overrideMimeType: "text/xml"
+ });
+};
+Resource.fetchXML = function(options) {
+ const resource = new Resource(options);
+ return resource.fetchXML();
+};
+Resource.prototype.fetchJsonp = function(callbackParameterName) {
+ callbackParameterName = defaultValue_default(callbackParameterName, "callback");
+ checkAndResetRequest(this.request);
+ let functionName;
+ do {
+ functionName = `loadJsonp${Math_default.nextRandomNumber().toString().substring(2, 8)}`;
+ } while (defined_default(window[functionName]));
+ return fetchJsonp(this, callbackParameterName, functionName);
+};
+function fetchJsonp(resource, callbackParameterName, functionName) {
+ const callbackQuery = {};
+ callbackQuery[callbackParameterName] = functionName;
+ resource.setQueryParameters(callbackQuery);
+ const request = resource.request;
+ const url = resource.url;
+ request.url = url;
+ request.requestFunction = function() {
+ const deferred = defer_default();
+ window[functionName] = function(data) {
+ deferred.resolve(data);
+ try {
+ delete window[functionName];
+ } catch (e) {
+ window[functionName] = void 0;
+ }
+ };
+ Resource._Implementations.loadAndExecuteScript(url, functionName, deferred);
+ return deferred.promise;
+ };
+ const promise = RequestScheduler_default.request(request);
+ if (!defined_default(promise)) {
+ return;
+ }
+ return promise.catch(function(e) {
+ if (request.state !== RequestState_default.FAILED) {
+ return Promise.reject(e);
+ }
+ return resource.retryOnError(e).then(function(retry) {
+ if (retry) {
+ request.state = RequestState_default.UNISSUED;
+ request.deferred = void 0;
+ return fetchJsonp(resource, callbackParameterName, functionName);
+ }
+ return Promise.reject(e);
+ });
+ });
+}
+Resource.fetchJsonp = function(options) {
+ const resource = new Resource(options);
+ return resource.fetchJsonp(options.callbackParameterName);
+};
+Resource.prototype._makeRequest = function(options) {
+ const resource = this;
+ checkAndResetRequest(resource.request);
+ const request = resource.request;
+ const url = resource.url;
+ request.url = url;
+ request.requestFunction = function() {
+ const responseType = options.responseType;
+ const headers = combine_default(options.headers, resource.headers);
+ const overrideMimeType = options.overrideMimeType;
+ const method = options.method;
+ const data = options.data;
+ const deferred = defer_default();
+ const xhr = Resource._Implementations.loadWithXhr(
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ );
+ if (defined_default(xhr) && defined_default(xhr.abort)) {
+ request.cancelFunction = function() {
+ xhr.abort();
+ };
+ }
+ return deferred.promise;
+ };
+ const promise = RequestScheduler_default.request(request);
+ if (!defined_default(promise)) {
+ return;
+ }
+ return promise.then(function(data) {
+ request.cancelFunction = void 0;
+ return data;
+ }).catch(function(e) {
+ request.cancelFunction = void 0;
+ if (request.state !== RequestState_default.FAILED) {
+ return Promise.reject(e);
+ }
+ return resource.retryOnError(e).then(function(retry) {
+ if (retry) {
+ request.state = RequestState_default.UNISSUED;
+ request.deferred = void 0;
+ return resource.fetch(options);
+ }
+ return Promise.reject(e);
+ });
+ });
+};
+function checkAndResetRequest(request) {
+ if (request.state === RequestState_default.ISSUED || request.state === RequestState_default.ACTIVE) {
+ throw new RuntimeError_default("The Resource is already being fetched.");
+ }
+ request.state = RequestState_default.UNISSUED;
+ request.deferred = void 0;
+}
+var dataUriRegex2 = /^data:(.*?)(;base64)?,(.*)$/;
+function decodeDataUriText(isBase64, data) {
+ const result = decodeURIComponent(data);
+ if (isBase64) {
+ return atob(result);
+ }
+ return result;
+}
+function decodeDataUriArrayBuffer(isBase64, data) {
+ const byteString = decodeDataUriText(isBase64, data);
+ const buffer = new ArrayBuffer(byteString.length);
+ const view = new Uint8Array(buffer);
+ for (let i = 0; i < byteString.length; i++) {
+ view[i] = byteString.charCodeAt(i);
+ }
+ return buffer;
+}
+function decodeDataUri(dataUriRegexResult, responseType) {
+ responseType = defaultValue_default(responseType, "");
+ const mimeType = dataUriRegexResult[1];
+ const isBase64 = !!dataUriRegexResult[2];
+ const data = dataUriRegexResult[3];
+ let buffer;
+ let parser;
+ switch (responseType) {
+ case "":
+ case "text":
+ return decodeDataUriText(isBase64, data);
+ case "arraybuffer":
+ return decodeDataUriArrayBuffer(isBase64, data);
+ case "blob":
+ buffer = decodeDataUriArrayBuffer(isBase64, data);
+ return new Blob([buffer], {
+ type: mimeType
+ });
+ case "document":
+ parser = new DOMParser();
+ return parser.parseFromString(
+ decodeDataUriText(isBase64, data),
+ mimeType
+ );
+ case "json":
+ return JSON.parse(decodeDataUriText(isBase64, data));
+ default:
+ throw new DeveloperError_default(`Unhandled responseType: ${responseType}`);
+ }
+}
+Resource.prototype.fetch = function(options) {
+ options = defaultClone(options, {});
+ options.method = "GET";
+ return this._makeRequest(options);
+};
+Resource.fetch = function(options) {
+ const resource = new Resource(options);
+ return resource.fetch({
+ // Make copy of just the needed fields because headers can be passed to both the constructor and to fetch
+ responseType: options.responseType,
+ overrideMimeType: options.overrideMimeType
+ });
+};
+Resource.prototype.delete = function(options) {
+ options = defaultClone(options, {});
+ options.method = "DELETE";
+ return this._makeRequest(options);
+};
+Resource.delete = function(options) {
+ const resource = new Resource(options);
+ return resource.delete({
+ // Make copy of just the needed fields because headers can be passed to both the constructor and to fetch
+ responseType: options.responseType,
+ overrideMimeType: options.overrideMimeType,
+ data: options.data
+ });
+};
+Resource.prototype.head = function(options) {
+ options = defaultClone(options, {});
+ options.method = "HEAD";
+ return this._makeRequest(options);
+};
+Resource.head = function(options) {
+ const resource = new Resource(options);
+ return resource.head({
+ // Make copy of just the needed fields because headers can be passed to both the constructor and to fetch
+ responseType: options.responseType,
+ overrideMimeType: options.overrideMimeType
+ });
+};
+Resource.prototype.options = function(options) {
+ options = defaultClone(options, {});
+ options.method = "OPTIONS";
+ return this._makeRequest(options);
+};
+Resource.options = function(options) {
+ const resource = new Resource(options);
+ return resource.options({
+ // Make copy of just the needed fields because headers can be passed to both the constructor and to fetch
+ responseType: options.responseType,
+ overrideMimeType: options.overrideMimeType
+ });
+};
+Resource.prototype.post = function(data, options) {
+ Check_default.defined("data", data);
+ options = defaultClone(options, {});
+ options.method = "POST";
+ options.data = data;
+ return this._makeRequest(options);
+};
+Resource.post = function(options) {
+ const resource = new Resource(options);
+ return resource.post(options.data, {
+ // Make copy of just the needed fields because headers can be passed to both the constructor and to post
+ responseType: options.responseType,
+ overrideMimeType: options.overrideMimeType
+ });
+};
+Resource.prototype.put = function(data, options) {
+ Check_default.defined("data", data);
+ options = defaultClone(options, {});
+ options.method = "PUT";
+ options.data = data;
+ return this._makeRequest(options);
+};
+Resource.put = function(options) {
+ const resource = new Resource(options);
+ return resource.put(options.data, {
+ // Make copy of just the needed fields because headers can be passed to both the constructor and to post
+ responseType: options.responseType,
+ overrideMimeType: options.overrideMimeType
+ });
+};
+Resource.prototype.patch = function(data, options) {
+ Check_default.defined("data", data);
+ options = defaultClone(options, {});
+ options.method = "PATCH";
+ options.data = data;
+ return this._makeRequest(options);
+};
+Resource.patch = function(options) {
+ const resource = new Resource(options);
+ return resource.patch(options.data, {
+ // Make copy of just the needed fields because headers can be passed to both the constructor and to post
+ responseType: options.responseType,
+ overrideMimeType: options.overrideMimeType
+ });
+};
+Resource._Implementations = {};
+Resource._Implementations.loadImageElement = function(url, crossOrigin, deferred) {
+ const image = new Image();
+ image.onload = function() {
+ if (image.naturalWidth === 0 && image.naturalHeight === 0 && image.width === 0 && image.height === 0) {
+ image.width = 300;
+ image.height = 150;
+ }
+ deferred.resolve(image);
+ };
+ image.onerror = function(e) {
+ deferred.reject(e);
+ };
+ if (crossOrigin) {
+ if (TrustedServers_default.contains(url)) {
+ image.crossOrigin = "use-credentials";
+ } else {
+ image.crossOrigin = "";
+ }
+ }
+ image.src = url;
+};
+Resource._Implementations.createImage = function(request, crossOrigin, deferred, flipY, skipColorSpaceConversion, preferImageBitmap) {
+ const url = request.url;
+ Resource.supportsImageBitmapOptions().then(function(supportsImageBitmap) {
+ if (!(supportsImageBitmap && preferImageBitmap)) {
+ Resource._Implementations.loadImageElement(url, crossOrigin, deferred);
+ return;
+ }
+ const responseType = "blob";
+ const method = "GET";
+ const xhrDeferred = defer_default();
+ const xhr = Resource._Implementations.loadWithXhr(
+ url,
+ responseType,
+ method,
+ void 0,
+ void 0,
+ xhrDeferred,
+ void 0,
+ void 0,
+ void 0
+ );
+ if (defined_default(xhr) && defined_default(xhr.abort)) {
+ request.cancelFunction = function() {
+ xhr.abort();
+ };
+ }
+ return xhrDeferred.promise.then(function(blob) {
+ if (!defined_default(blob)) {
+ deferred.reject(
+ new RuntimeError_default(
+ `Successfully retrieved ${url} but it contained no content.`
+ )
+ );
+ return;
+ }
+ return Resource.createImageBitmapFromBlob(blob, {
+ flipY,
+ premultiplyAlpha: false,
+ skipColorSpaceConversion
+ });
+ }).then(function(image) {
+ deferred.resolve(image);
+ });
+ }).catch(function(e) {
+ deferred.reject(e);
+ });
+};
+Resource.createImageBitmapFromBlob = function(blob, options) {
+ Check_default.defined("options", options);
+ Check_default.typeOf.bool("options.flipY", options.flipY);
+ Check_default.typeOf.bool("options.premultiplyAlpha", options.premultiplyAlpha);
+ Check_default.typeOf.bool(
+ "options.skipColorSpaceConversion",
+ options.skipColorSpaceConversion
+ );
+ return createImageBitmap(blob, {
+ imageOrientation: options.flipY ? "flipY" : "none",
+ premultiplyAlpha: options.premultiplyAlpha ? "premultiply" : "none",
+ colorSpaceConversion: options.skipColorSpaceConversion ? "none" : "default"
+ });
+};
+function loadWithHttpRequest(url, responseType, method, data, headers, deferred, overrideMimeType) {
+ fetch(url, {
+ method,
+ headers
+ }).then(async (response) => {
+ if (!response.ok) {
+ const responseHeaders = {};
+ response.headers.forEach((value, key) => {
+ responseHeaders[key] = value;
+ });
+ deferred.reject(
+ new RequestErrorEvent_default(response.status, response, responseHeaders)
+ );
+ return;
+ }
+ switch (responseType) {
+ case "text":
+ deferred.resolve(response.text());
+ break;
+ case "json":
+ deferred.resolve(response.json());
+ break;
+ default:
+ deferred.resolve(new Uint8Array(await response.arrayBuffer()).buffer);
+ break;
+ }
+ }).catch(() => {
+ deferred.reject(new RequestErrorEvent_default());
+ });
+}
+var noXMLHttpRequest = typeof XMLHttpRequest === "undefined";
+Resource._Implementations.loadWithXhr = function(url, responseType, method, data, headers, deferred, overrideMimeType) {
+ const dataUriRegexResult = dataUriRegex2.exec(url);
+ if (dataUriRegexResult !== null) {
+ deferred.resolve(decodeDataUri(dataUriRegexResult, responseType));
+ return;
+ }
+ if (noXMLHttpRequest) {
+ loadWithHttpRequest(
+ url,
+ responseType,
+ method,
+ data,
+ headers,
+ deferred,
+ overrideMimeType
+ );
+ return;
+ }
+ const xhr = new XMLHttpRequest();
+ if (TrustedServers_default.contains(url)) {
+ xhr.withCredentials = true;
+ }
+ xhr.open(method, url, true);
+ if (defined_default(overrideMimeType) && defined_default(xhr.overrideMimeType)) {
+ xhr.overrideMimeType(overrideMimeType);
+ }
+ if (defined_default(headers)) {
+ for (const key in headers) {
+ if (headers.hasOwnProperty(key)) {
+ xhr.setRequestHeader(key, headers[key]);
+ }
+ }
+ }
+ if (defined_default(responseType)) {
+ xhr.responseType = responseType;
+ }
+ let localFile = false;
+ if (typeof url === "string") {
+ localFile = url.indexOf("file://") === 0 || typeof window !== "undefined" && window.location.origin === "file://";
+ }
+ xhr.onload = function() {
+ if ((xhr.status < 200 || xhr.status >= 300) && !(localFile && xhr.status === 0)) {
+ deferred.reject(
+ new RequestErrorEvent_default(
+ xhr.status,
+ xhr.response,
+ xhr.getAllResponseHeaders()
+ )
+ );
+ return;
+ }
+ const response = xhr.response;
+ const browserResponseType = xhr.responseType;
+ if (method === "HEAD" || method === "OPTIONS") {
+ const responseHeaderString = xhr.getAllResponseHeaders();
+ const splitHeaders = responseHeaderString.trim().split(/[\r\n]+/);
+ const responseHeaders = {};
+ splitHeaders.forEach(function(line) {
+ const parts = line.split(": ");
+ const header = parts.shift();
+ responseHeaders[header] = parts.join(": ");
+ });
+ deferred.resolve(responseHeaders);
+ return;
+ }
+ if (xhr.status === 204) {
+ deferred.resolve(void 0);
+ } else if (defined_default(response) && (!defined_default(responseType) || browserResponseType === responseType)) {
+ deferred.resolve(response);
+ } else if (responseType === "json" && typeof response === "string") {
+ try {
+ deferred.resolve(JSON.parse(response));
+ } catch (e) {
+ deferred.reject(e);
+ }
+ } else if ((browserResponseType === "" || browserResponseType === "document") && defined_default(xhr.responseXML) && xhr.responseXML.hasChildNodes()) {
+ deferred.resolve(xhr.responseXML);
+ } else if ((browserResponseType === "" || browserResponseType === "text") && defined_default(xhr.responseText)) {
+ deferred.resolve(xhr.responseText);
+ } else {
+ deferred.reject(
+ new RuntimeError_default("Invalid XMLHttpRequest response type.")
+ );
+ }
+ };
+ xhr.onerror = function(e) {
+ deferred.reject(new RequestErrorEvent_default());
+ };
+ xhr.send(data);
+ return xhr;
+};
+Resource._Implementations.loadAndExecuteScript = function(url, functionName, deferred) {
+ return loadAndExecuteScript_default(url, functionName).catch(function(e) {
+ deferred.reject(e);
+ });
+};
+Resource._DefaultImplementations = {};
+Resource._DefaultImplementations.createImage = Resource._Implementations.createImage;
+Resource._DefaultImplementations.loadWithXhr = Resource._Implementations.loadWithXhr;
+Resource._DefaultImplementations.loadAndExecuteScript = Resource._Implementations.loadAndExecuteScript;
+Resource.DEFAULT = Object.freeze(
+ new Resource({
+ url: typeof document === "undefined" ? "" : document.location.href.split("?")[0]
+ })
+);
+var Resource_default = Resource;
+
+// packages/engine/Source/Core/EarthOrientationParameters.js
+function EarthOrientationParameters(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ this._dates = void 0;
+ this._samples = void 0;
+ this._dateColumn = -1;
+ this._xPoleWanderRadiansColumn = -1;
+ this._yPoleWanderRadiansColumn = -1;
+ this._ut1MinusUtcSecondsColumn = -1;
+ this._xCelestialPoleOffsetRadiansColumn = -1;
+ this._yCelestialPoleOffsetRadiansColumn = -1;
+ this._taiMinusUtcSecondsColumn = -1;
+ this._columnCount = 0;
+ this._lastIndex = -1;
+ this._addNewLeapSeconds = defaultValue_default(options.addNewLeapSeconds, true);
+ if (defined_default(options.data)) {
+ onDataReady(this, options.data);
+ } else {
+ onDataReady(this, {
+ columnNames: [
+ "dateIso8601",
+ "modifiedJulianDateUtc",
+ "xPoleWanderRadians",
+ "yPoleWanderRadians",
+ "ut1MinusUtcSeconds",
+ "lengthOfDayCorrectionSeconds",
+ "xCelestialPoleOffsetRadians",
+ "yCelestialPoleOffsetRadians",
+ "taiMinusUtcSeconds"
+ ],
+ samples: []
+ });
+ }
+}
+EarthOrientationParameters.fromUrl = async function(url, options) {
+ Check_default.defined("url", url);
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const resource = Resource_default.createIfNeeded(url);
+ let eopData;
+ try {
+ eopData = await resource.fetchJson();
+ } catch (e) {
+ throw new RuntimeError_default(
+ `An error occurred while retrieving the EOP data from the URL ${resource.url}.`
+ );
+ }
+ return new EarthOrientationParameters({
+ addNewLeapSeconds: options.addNewLeapSeconds,
+ data: eopData
+ });
+};
+EarthOrientationParameters.NONE = Object.freeze({
+ compute: function(date, result) {
+ if (!defined_default(result)) {
+ result = new EarthOrientationParametersSample_default(0, 0, 0, 0, 0);
+ } else {
+ result.xPoleWander = 0;
+ result.yPoleWander = 0;
+ result.xPoleOffset = 0;
+ result.yPoleOffset = 0;
+ result.ut1MinusUtc = 0;
+ }
+ return result;
+ }
+});
+EarthOrientationParameters.prototype.compute = function(date, result) {
+ if (!defined_default(this._samples)) {
+ return void 0;
+ }
+ if (!defined_default(result)) {
+ result = new EarthOrientationParametersSample_default(0, 0, 0, 0, 0);
+ }
+ if (this._samples.length === 0) {
+ result.xPoleWander = 0;
+ result.yPoleWander = 0;
+ result.xPoleOffset = 0;
+ result.yPoleOffset = 0;
+ result.ut1MinusUtc = 0;
+ return result;
+ }
+ const dates = this._dates;
+ const lastIndex = this._lastIndex;
+ let before = 0;
+ let after = 0;
+ if (defined_default(lastIndex)) {
+ const previousIndexDate = dates[lastIndex];
+ const nextIndexDate = dates[lastIndex + 1];
+ const isAfterPrevious = JulianDate_default.lessThanOrEquals(
+ previousIndexDate,
+ date
+ );
+ const isAfterLastSample = !defined_default(nextIndexDate);
+ const isBeforeNext = isAfterLastSample || JulianDate_default.greaterThanOrEquals(nextIndexDate, date);
+ if (isAfterPrevious && isBeforeNext) {
+ before = lastIndex;
+ if (!isAfterLastSample && nextIndexDate.equals(date)) {
+ ++before;
+ }
+ after = before + 1;
+ interpolate(this, dates, this._samples, date, before, after, result);
+ return result;
+ }
+ }
+ let index = binarySearch_default(dates, date, JulianDate_default.compare, this._dateColumn);
+ if (index >= 0) {
+ if (index < dates.length - 1 && dates[index + 1].equals(date)) {
+ ++index;
+ }
+ before = index;
+ after = index;
+ } else {
+ after = ~index;
+ before = after - 1;
+ if (before < 0) {
+ before = 0;
+ }
+ }
+ this._lastIndex = before;
+ interpolate(this, dates, this._samples, date, before, after, result);
+ return result;
+};
+function compareLeapSecondDates2(leapSecond, dateToFind) {
+ return JulianDate_default.compare(leapSecond.julianDate, dateToFind);
+}
+function onDataReady(eop, eopData) {
+ if (!defined_default(eopData.columnNames)) {
+ throw new RuntimeError_default(
+ "Error in loaded EOP data: The columnNames property is required."
+ );
+ }
+ if (!defined_default(eopData.samples)) {
+ throw new RuntimeError_default(
+ "Error in loaded EOP data: The samples property is required."
+ );
+ }
+ const dateColumn = eopData.columnNames.indexOf("modifiedJulianDateUtc");
+ const xPoleWanderRadiansColumn = eopData.columnNames.indexOf(
+ "xPoleWanderRadians"
+ );
+ const yPoleWanderRadiansColumn = eopData.columnNames.indexOf(
+ "yPoleWanderRadians"
+ );
+ const ut1MinusUtcSecondsColumn = eopData.columnNames.indexOf(
+ "ut1MinusUtcSeconds"
+ );
+ const xCelestialPoleOffsetRadiansColumn = eopData.columnNames.indexOf(
+ "xCelestialPoleOffsetRadians"
+ );
+ const yCelestialPoleOffsetRadiansColumn = eopData.columnNames.indexOf(
+ "yCelestialPoleOffsetRadians"
+ );
+ const taiMinusUtcSecondsColumn = eopData.columnNames.indexOf(
+ "taiMinusUtcSeconds"
+ );
+ if (dateColumn < 0 || xPoleWanderRadiansColumn < 0 || yPoleWanderRadiansColumn < 0 || ut1MinusUtcSecondsColumn < 0 || xCelestialPoleOffsetRadiansColumn < 0 || yCelestialPoleOffsetRadiansColumn < 0 || taiMinusUtcSecondsColumn < 0) {
+ throw new RuntimeError_default(
+ "Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns"
+ );
+ }
+ const samples = eop._samples = eopData.samples;
+ const dates = eop._dates = [];
+ eop._dateColumn = dateColumn;
+ eop._xPoleWanderRadiansColumn = xPoleWanderRadiansColumn;
+ eop._yPoleWanderRadiansColumn = yPoleWanderRadiansColumn;
+ eop._ut1MinusUtcSecondsColumn = ut1MinusUtcSecondsColumn;
+ eop._xCelestialPoleOffsetRadiansColumn = xCelestialPoleOffsetRadiansColumn;
+ eop._yCelestialPoleOffsetRadiansColumn = yCelestialPoleOffsetRadiansColumn;
+ eop._taiMinusUtcSecondsColumn = taiMinusUtcSecondsColumn;
+ eop._columnCount = eopData.columnNames.length;
+ eop._lastIndex = void 0;
+ let lastTaiMinusUtc;
+ const addNewLeapSeconds = eop._addNewLeapSeconds;
+ for (let i = 0, len = samples.length; i < len; i += eop._columnCount) {
+ const mjd = samples[i + dateColumn];
+ const taiMinusUtc = samples[i + taiMinusUtcSecondsColumn];
+ const day = mjd + TimeConstants_default.MODIFIED_JULIAN_DATE_DIFFERENCE;
+ const date = new JulianDate_default(day, taiMinusUtc, TimeStandard_default.TAI);
+ dates.push(date);
+ if (addNewLeapSeconds) {
+ if (taiMinusUtc !== lastTaiMinusUtc && defined_default(lastTaiMinusUtc)) {
+ const leapSeconds = JulianDate_default.leapSeconds;
+ const leapSecondIndex = binarySearch_default(
+ leapSeconds,
+ date,
+ compareLeapSecondDates2
+ );
+ if (leapSecondIndex < 0) {
+ const leapSecond = new LeapSecond_default(date, taiMinusUtc);
+ leapSeconds.splice(~leapSecondIndex, 0, leapSecond);
+ }
+ }
+ lastTaiMinusUtc = taiMinusUtc;
+ }
+ }
+}
+function fillResultFromIndex(eop, samples, index, columnCount, result) {
+ const start = index * columnCount;
+ result.xPoleWander = samples[start + eop._xPoleWanderRadiansColumn];
+ result.yPoleWander = samples[start + eop._yPoleWanderRadiansColumn];
+ result.xPoleOffset = samples[start + eop._xCelestialPoleOffsetRadiansColumn];
+ result.yPoleOffset = samples[start + eop._yCelestialPoleOffsetRadiansColumn];
+ result.ut1MinusUtc = samples[start + eop._ut1MinusUtcSecondsColumn];
+}
+function linearInterp(dx, y1, y2) {
+ return y1 + dx * (y2 - y1);
+}
+function interpolate(eop, dates, samples, date, before, after, result) {
+ const columnCount = eop._columnCount;
+ if (after > dates.length - 1) {
+ result.xPoleWander = 0;
+ result.yPoleWander = 0;
+ result.xPoleOffset = 0;
+ result.yPoleOffset = 0;
+ result.ut1MinusUtc = 0;
+ return result;
+ }
+ const beforeDate = dates[before];
+ const afterDate = dates[after];
+ if (beforeDate.equals(afterDate) || date.equals(beforeDate)) {
+ fillResultFromIndex(eop, samples, before, columnCount, result);
+ return result;
+ } else if (date.equals(afterDate)) {
+ fillResultFromIndex(eop, samples, after, columnCount, result);
+ return result;
+ }
+ const factor = JulianDate_default.secondsDifference(date, beforeDate) / JulianDate_default.secondsDifference(afterDate, beforeDate);
+ const startBefore = before * columnCount;
+ const startAfter = after * columnCount;
+ let beforeUt1MinusUtc = samples[startBefore + eop._ut1MinusUtcSecondsColumn];
+ let afterUt1MinusUtc = samples[startAfter + eop._ut1MinusUtcSecondsColumn];
+ const offsetDifference = afterUt1MinusUtc - beforeUt1MinusUtc;
+ if (offsetDifference > 0.5 || offsetDifference < -0.5) {
+ const beforeTaiMinusUtc = samples[startBefore + eop._taiMinusUtcSecondsColumn];
+ const afterTaiMinusUtc = samples[startAfter + eop._taiMinusUtcSecondsColumn];
+ if (beforeTaiMinusUtc !== afterTaiMinusUtc) {
+ if (afterDate.equals(date)) {
+ beforeUt1MinusUtc = afterUt1MinusUtc;
+ } else {
+ afterUt1MinusUtc -= afterTaiMinusUtc - beforeTaiMinusUtc;
+ }
+ }
+ }
+ result.xPoleWander = linearInterp(
+ factor,
+ samples[startBefore + eop._xPoleWanderRadiansColumn],
+ samples[startAfter + eop._xPoleWanderRadiansColumn]
+ );
+ result.yPoleWander = linearInterp(
+ factor,
+ samples[startBefore + eop._yPoleWanderRadiansColumn],
+ samples[startAfter + eop._yPoleWanderRadiansColumn]
+ );
+ result.xPoleOffset = linearInterp(
+ factor,
+ samples[startBefore + eop._xCelestialPoleOffsetRadiansColumn],
+ samples[startAfter + eop._xCelestialPoleOffsetRadiansColumn]
+ );
+ result.yPoleOffset = linearInterp(
+ factor,
+ samples[startBefore + eop._yCelestialPoleOffsetRadiansColumn],
+ samples[startAfter + eop._yCelestialPoleOffsetRadiansColumn]
+ );
+ result.ut1MinusUtc = linearInterp(
+ factor,
+ beforeUt1MinusUtc,
+ afterUt1MinusUtc
+ );
+ return result;
+}
+var EarthOrientationParameters_default = EarthOrientationParameters;
+
+// packages/engine/Source/Core/HeadingPitchRoll.js
+function HeadingPitchRoll(heading, pitch, roll) {
+ this.heading = defaultValue_default(heading, 0);
+ this.pitch = defaultValue_default(pitch, 0);
+ this.roll = defaultValue_default(roll, 0);
+}
+HeadingPitchRoll.fromQuaternion = function(quaternion, result) {
+ if (!defined_default(quaternion)) {
+ throw new DeveloperError_default("quaternion is required");
+ }
+ if (!defined_default(result)) {
+ result = new HeadingPitchRoll();
+ }
+ const test = 2 * (quaternion.w * quaternion.y - quaternion.z * quaternion.x);
+ const denominatorRoll = 1 - 2 * (quaternion.x * quaternion.x + quaternion.y * quaternion.y);
+ const numeratorRoll = 2 * (quaternion.w * quaternion.x + quaternion.y * quaternion.z);
+ const denominatorHeading = 1 - 2 * (quaternion.y * quaternion.y + quaternion.z * quaternion.z);
+ const numeratorHeading = 2 * (quaternion.w * quaternion.z + quaternion.x * quaternion.y);
+ result.heading = -Math.atan2(numeratorHeading, denominatorHeading);
+ result.roll = Math.atan2(numeratorRoll, denominatorRoll);
+ result.pitch = -Math_default.asinClamped(test);
+ return result;
+};
+HeadingPitchRoll.fromDegrees = function(heading, pitch, roll, result) {
+ if (!defined_default(heading)) {
+ throw new DeveloperError_default("heading is required");
+ }
+ if (!defined_default(pitch)) {
+ throw new DeveloperError_default("pitch is required");
+ }
+ if (!defined_default(roll)) {
+ throw new DeveloperError_default("roll is required");
+ }
+ if (!defined_default(result)) {
+ result = new HeadingPitchRoll();
+ }
+ result.heading = heading * Math_default.RADIANS_PER_DEGREE;
+ result.pitch = pitch * Math_default.RADIANS_PER_DEGREE;
+ result.roll = roll * Math_default.RADIANS_PER_DEGREE;
+ return result;
+};
+HeadingPitchRoll.clone = function(headingPitchRoll, result) {
+ if (!defined_default(headingPitchRoll)) {
+ return void 0;
+ }
+ if (!defined_default(result)) {
+ return new HeadingPitchRoll(
+ headingPitchRoll.heading,
+ headingPitchRoll.pitch,
+ headingPitchRoll.roll
+ );
+ }
+ result.heading = headingPitchRoll.heading;
+ result.pitch = headingPitchRoll.pitch;
+ result.roll = headingPitchRoll.roll;
+ return result;
+};
+HeadingPitchRoll.equals = function(left, right) {
+ return left === right || defined_default(left) && defined_default(right) && left.heading === right.heading && left.pitch === right.pitch && left.roll === right.roll;
+};
+HeadingPitchRoll.equalsEpsilon = function(left, right, relativeEpsilon, absoluteEpsilon) {
+ return left === right || defined_default(left) && defined_default(right) && Math_default.equalsEpsilon(
+ left.heading,
+ right.heading,
+ relativeEpsilon,
+ absoluteEpsilon
+ ) && Math_default.equalsEpsilon(
+ left.pitch,
+ right.pitch,
+ relativeEpsilon,
+ absoluteEpsilon
+ ) && Math_default.equalsEpsilon(
+ left.roll,
+ right.roll,
+ relativeEpsilon,
+ absoluteEpsilon
+ );
+};
+HeadingPitchRoll.prototype.clone = function(result) {
+ return HeadingPitchRoll.clone(this, result);
+};
+HeadingPitchRoll.prototype.equals = function(right) {
+ return HeadingPitchRoll.equals(this, right);
+};
+HeadingPitchRoll.prototype.equalsEpsilon = function(right, relativeEpsilon, absoluteEpsilon) {
+ return HeadingPitchRoll.equalsEpsilon(
+ this,
+ right,
+ relativeEpsilon,
+ absoluteEpsilon
+ );
+};
+HeadingPitchRoll.prototype.toString = function() {
+ return `(${this.heading}, ${this.pitch}, ${this.roll})`;
+};
+var HeadingPitchRoll_default = HeadingPitchRoll;
+
+// packages/engine/Source/Core/buildModuleUrl.js
+var cesiumScriptRegex = /((?:.*\/)|^)Cesium\.js(?:\?|\#|$)/;
+function getBaseUrlFromCesiumScript() {
+ const scripts = document.getElementsByTagName("script");
+ for (let i = 0, len = scripts.length; i < len; ++i) {
+ const src = scripts[i].getAttribute("src");
+ const result = cesiumScriptRegex.exec(src);
+ if (result !== null) {
+ return result[1];
+ }
+ }
+ return void 0;
+}
+var a2;
+function tryMakeAbsolute(url) {
+ if (typeof document === "undefined") {
+ return url;
+ }
+ if (!defined_default(a2)) {
+ a2 = document.createElement("a");
+ }
+ a2.href = url;
+ return a2.href;
+}
+var baseResource;
+function getCesiumBaseUrl() {
+ if (defined_default(baseResource)) {
+ return baseResource;
+ }
+ let baseUrlString;
+ if (typeof CESIUM_BASE_URL !== "undefined") {
+ baseUrlString = CESIUM_BASE_URL;
+ } else if (defined_default(import.meta?.url)) {
+ baseUrlString = getAbsoluteUri_default(".", import.meta.url);
+ } else if (typeof define === "object" && defined_default(define.amd) && !define.amd.toUrlUndefined && defined_default(__require.toUrl)) {
+ baseUrlString = getAbsoluteUri_default(
+ "..",
+ buildModuleUrl("Core/buildModuleUrl.js")
+ );
+ } else {
+ baseUrlString = getBaseUrlFromCesiumScript();
+ }
+ if (!defined_default(baseUrlString)) {
+ throw new DeveloperError_default(
+ "Unable to determine Cesium base URL automatically, try defining a global variable called CESIUM_BASE_URL."
+ );
+ }
+ baseResource = new Resource_default({
+ url: tryMakeAbsolute(baseUrlString)
+ });
+ baseResource.appendForwardSlash();
+ return baseResource;
+}
+function buildModuleUrlFromRequireToUrl(moduleID) {
+ return tryMakeAbsolute(__require.toUrl(`../${moduleID}`));
+}
+function buildModuleUrlFromBaseUrl(moduleID) {
+ const resource = getCesiumBaseUrl().getDerivedResource({
+ url: moduleID
+ });
+ return resource.url;
+}
+var implementation;
+function buildModuleUrl(relativeUrl) {
+ if (!defined_default(implementation)) {
+ if (typeof define === "object" && defined_default(define.amd) && !define.amd.toUrlUndefined && defined_default(__require.toUrl)) {
+ implementation = buildModuleUrlFromRequireToUrl;
+ } else {
+ implementation = buildModuleUrlFromBaseUrl;
+ }
+ }
+ const url = implementation(relativeUrl);
+ return url;
+}
+buildModuleUrl._cesiumScriptRegex = cesiumScriptRegex;
+buildModuleUrl._buildModuleUrlFromBaseUrl = buildModuleUrlFromBaseUrl;
+buildModuleUrl._clearBaseResource = function() {
+ baseResource = void 0;
+};
+buildModuleUrl.setBaseUrl = function(value) {
+ baseResource = Resource_default.DEFAULT.getDerivedResource({
+ url: value
+ });
+};
+buildModuleUrl.getCesiumBaseUrl = getCesiumBaseUrl;
+var buildModuleUrl_default = buildModuleUrl;
+
+// packages/engine/Source/Core/Iau2006XysSample.js
+function Iau2006XysSample(x, y, s) {
+ this.x = x;
+ this.y = y;
+ this.s = s;
+}
+var Iau2006XysSample_default = Iau2006XysSample;
+
+// packages/engine/Source/Core/Iau2006XysData.js
+function Iau2006XysData(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ this._xysFileUrlTemplate = Resource_default.createIfNeeded(
+ options.xysFileUrlTemplate
+ );
+ this._interpolationOrder = defaultValue_default(options.interpolationOrder, 9);
+ this._sampleZeroJulianEphemerisDate = defaultValue_default(
+ options.sampleZeroJulianEphemerisDate,
+ 24423965e-1
+ );
+ this._sampleZeroDateTT = new JulianDate_default(
+ this._sampleZeroJulianEphemerisDate,
+ 0,
+ TimeStandard_default.TAI
+ );
+ this._stepSizeDays = defaultValue_default(options.stepSizeDays, 1);
+ this._samplesPerXysFile = defaultValue_default(options.samplesPerXysFile, 1e3);
+ this._totalSamples = defaultValue_default(options.totalSamples, 27426);
+ this._samples = new Array(this._totalSamples * 3);
+ this._chunkDownloadsInProgress = [];
+ const order = this._interpolationOrder;
+ const denom = this._denominators = new Array(order + 1);
+ const xTable = this._xTable = new Array(order + 1);
+ const stepN = Math.pow(this._stepSizeDays, order);
+ for (let i = 0; i <= order; ++i) {
+ denom[i] = stepN;
+ xTable[i] = i * this._stepSizeDays;
+ for (let j = 0; j <= order; ++j) {
+ if (j !== i) {
+ denom[i] *= i - j;
+ }
+ }
+ denom[i] = 1 / denom[i];
+ }
+ this._work = new Array(order + 1);
+ this._coef = new Array(order + 1);
+}
+var julianDateScratch = new JulianDate_default(0, 0, TimeStandard_default.TAI);
+function getDaysSinceEpoch(xys, dayTT, secondTT) {
+ const dateTT = julianDateScratch;
+ dateTT.dayNumber = dayTT;
+ dateTT.secondsOfDay = secondTT;
+ return JulianDate_default.daysDifference(dateTT, xys._sampleZeroDateTT);
+}
+Iau2006XysData.prototype.preload = function(startDayTT, startSecondTT, stopDayTT, stopSecondTT) {
+ const startDaysSinceEpoch = getDaysSinceEpoch(
+ this,
+ startDayTT,
+ startSecondTT
+ );
+ const stopDaysSinceEpoch = getDaysSinceEpoch(this, stopDayTT, stopSecondTT);
+ let startIndex = startDaysSinceEpoch / this._stepSizeDays - this._interpolationOrder / 2 | 0;
+ if (startIndex < 0) {
+ startIndex = 0;
+ }
+ let stopIndex = stopDaysSinceEpoch / this._stepSizeDays - this._interpolationOrder / 2 | 0 + this._interpolationOrder;
+ if (stopIndex >= this._totalSamples) {
+ stopIndex = this._totalSamples - 1;
+ }
+ const startChunk = startIndex / this._samplesPerXysFile | 0;
+ const stopChunk = stopIndex / this._samplesPerXysFile | 0;
+ const promises = [];
+ for (let i = startChunk; i <= stopChunk; ++i) {
+ promises.push(requestXysChunk(this, i));
+ }
+ return Promise.all(promises);
+};
+Iau2006XysData.prototype.computeXysRadians = function(dayTT, secondTT, result) {
+ const daysSinceEpoch = getDaysSinceEpoch(this, dayTT, secondTT);
+ if (daysSinceEpoch < 0) {
+ return void 0;
+ }
+ const centerIndex = daysSinceEpoch / this._stepSizeDays | 0;
+ if (centerIndex >= this._totalSamples) {
+ return void 0;
+ }
+ const degree = this._interpolationOrder;
+ let firstIndex = centerIndex - (degree / 2 | 0);
+ if (firstIndex < 0) {
+ firstIndex = 0;
+ }
+ let lastIndex = firstIndex + degree;
+ if (lastIndex >= this._totalSamples) {
+ lastIndex = this._totalSamples - 1;
+ firstIndex = lastIndex - degree;
+ if (firstIndex < 0) {
+ firstIndex = 0;
+ }
+ }
+ let isDataMissing = false;
+ const samples = this._samples;
+ if (!defined_default(samples[firstIndex * 3])) {
+ requestXysChunk(this, firstIndex / this._samplesPerXysFile | 0);
+ isDataMissing = true;
+ }
+ if (!defined_default(samples[lastIndex * 3])) {
+ requestXysChunk(this, lastIndex / this._samplesPerXysFile | 0);
+ isDataMissing = true;
+ }
+ if (isDataMissing) {
+ return void 0;
+ }
+ if (!defined_default(result)) {
+ result = new Iau2006XysSample_default(0, 0, 0);
+ } else {
+ result.x = 0;
+ result.y = 0;
+ result.s = 0;
+ }
+ const x = daysSinceEpoch - firstIndex * this._stepSizeDays;
+ const work = this._work;
+ const denom = this._denominators;
+ const coef = this._coef;
+ const xTable = this._xTable;
+ let i, j;
+ for (i = 0; i <= degree; ++i) {
+ work[i] = x - xTable[i];
+ }
+ for (i = 0; i <= degree; ++i) {
+ coef[i] = 1;
+ for (j = 0; j <= degree; ++j) {
+ if (j !== i) {
+ coef[i] *= work[j];
+ }
+ }
+ coef[i] *= denom[i];
+ let sampleIndex = (firstIndex + i) * 3;
+ result.x += coef[i] * samples[sampleIndex++];
+ result.y += coef[i] * samples[sampleIndex++];
+ result.s += coef[i] * samples[sampleIndex];
+ }
+ return result;
+};
+function requestXysChunk(xysData, chunkIndex) {
+ if (xysData._chunkDownloadsInProgress[chunkIndex]) {
+ return xysData._chunkDownloadsInProgress[chunkIndex];
+ }
+ let chunkUrl;
+ const xysFileUrlTemplate = xysData._xysFileUrlTemplate;
+ if (defined_default(xysFileUrlTemplate)) {
+ chunkUrl = xysFileUrlTemplate.getDerivedResource({
+ templateValues: {
+ 0: chunkIndex
+ }
+ });
+ } else {
+ chunkUrl = new Resource_default({
+ url: buildModuleUrl_default(`Assets/IAU2006_XYS/IAU2006_XYS_${chunkIndex}.json`)
+ });
+ }
+ const promise = chunkUrl.fetchJson().then(function(chunk) {
+ xysData._chunkDownloadsInProgress[chunkIndex] = false;
+ const samples = xysData._samples;
+ const newSamples = chunk.samples;
+ const startIndex = chunkIndex * xysData._samplesPerXysFile * 3;
+ for (let i = 0, len = newSamples.length; i < len; ++i) {
+ samples[startIndex + i] = newSamples[i];
+ }
+ });
+ xysData._chunkDownloadsInProgress[chunkIndex] = promise;
+ return promise;
+}
+var Iau2006XysData_default = Iau2006XysData;
+
+// packages/engine/Source/Core/Quaternion.js
+function Quaternion(x, y, z, w) {
+ this.x = defaultValue_default(x, 0);
+ this.y = defaultValue_default(y, 0);
+ this.z = defaultValue_default(z, 0);
+ this.w = defaultValue_default(w, 0);
+}
+var fromAxisAngleScratch = new Cartesian3_default();
+Quaternion.fromAxisAngle = function(axis, angle, result) {
+ Check_default.typeOf.object("axis", axis);
+ Check_default.typeOf.number("angle", angle);
+ const halfAngle = angle / 2;
+ const s = Math.sin(halfAngle);
+ fromAxisAngleScratch = Cartesian3_default.normalize(axis, fromAxisAngleScratch);
+ const x = fromAxisAngleScratch.x * s;
+ const y = fromAxisAngleScratch.y * s;
+ const z = fromAxisAngleScratch.z * s;
+ const w = Math.cos(halfAngle);
+ if (!defined_default(result)) {
+ return new Quaternion(x, y, z, w);
+ }
+ result.x = x;
+ result.y = y;
+ result.z = z;
+ result.w = w;
+ return result;
+};
+var fromRotationMatrixNext = [1, 2, 0];
+var fromRotationMatrixQuat = new Array(3);
+Quaternion.fromRotationMatrix = function(matrix, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ let root;
+ let x;
+ let y;
+ let z;
+ let w;
+ const m00 = matrix[Matrix3_default.COLUMN0ROW0];
+ const m11 = matrix[Matrix3_default.COLUMN1ROW1];
+ const m22 = matrix[Matrix3_default.COLUMN2ROW2];
+ const trace = m00 + m11 + m22;
+ if (trace > 0) {
+ root = Math.sqrt(trace + 1);
+ w = 0.5 * root;
+ root = 0.5 / root;
+ x = (matrix[Matrix3_default.COLUMN1ROW2] - matrix[Matrix3_default.COLUMN2ROW1]) * root;
+ y = (matrix[Matrix3_default.COLUMN2ROW0] - matrix[Matrix3_default.COLUMN0ROW2]) * root;
+ z = (matrix[Matrix3_default.COLUMN0ROW1] - matrix[Matrix3_default.COLUMN1ROW0]) * root;
+ } else {
+ const next = fromRotationMatrixNext;
+ let i = 0;
+ if (m11 > m00) {
+ i = 1;
+ }
+ if (m22 > m00 && m22 > m11) {
+ i = 2;
+ }
+ const j = next[i];
+ const k = next[j];
+ root = Math.sqrt(
+ matrix[Matrix3_default.getElementIndex(i, i)] - matrix[Matrix3_default.getElementIndex(j, j)] - matrix[Matrix3_default.getElementIndex(k, k)] + 1
+ );
+ const quat = fromRotationMatrixQuat;
+ quat[i] = 0.5 * root;
+ root = 0.5 / root;
+ w = (matrix[Matrix3_default.getElementIndex(k, j)] - matrix[Matrix3_default.getElementIndex(j, k)]) * root;
+ quat[j] = (matrix[Matrix3_default.getElementIndex(j, i)] + matrix[Matrix3_default.getElementIndex(i, j)]) * root;
+ quat[k] = (matrix[Matrix3_default.getElementIndex(k, i)] + matrix[Matrix3_default.getElementIndex(i, k)]) * root;
+ x = -quat[0];
+ y = -quat[1];
+ z = -quat[2];
+ }
+ if (!defined_default(result)) {
+ return new Quaternion(x, y, z, w);
+ }
+ result.x = x;
+ result.y = y;
+ result.z = z;
+ result.w = w;
+ return result;
+};
+var scratchHPRQuaternion = new Quaternion();
+var scratchHeadingQuaternion = new Quaternion();
+var scratchPitchQuaternion = new Quaternion();
+var scratchRollQuaternion = new Quaternion();
+Quaternion.fromHeadingPitchRoll = function(headingPitchRoll, result) {
+ Check_default.typeOf.object("headingPitchRoll", headingPitchRoll);
+ scratchRollQuaternion = Quaternion.fromAxisAngle(
+ Cartesian3_default.UNIT_X,
+ headingPitchRoll.roll,
+ scratchHPRQuaternion
+ );
+ scratchPitchQuaternion = Quaternion.fromAxisAngle(
+ Cartesian3_default.UNIT_Y,
+ -headingPitchRoll.pitch,
+ result
+ );
+ result = Quaternion.multiply(
+ scratchPitchQuaternion,
+ scratchRollQuaternion,
+ scratchPitchQuaternion
+ );
+ scratchHeadingQuaternion = Quaternion.fromAxisAngle(
+ Cartesian3_default.UNIT_Z,
+ -headingPitchRoll.heading,
+ scratchHPRQuaternion
+ );
+ return Quaternion.multiply(scratchHeadingQuaternion, result, result);
+};
+var sampledQuaternionAxis = new Cartesian3_default();
+var sampledQuaternionRotation = new Cartesian3_default();
+var sampledQuaternionTempQuaternion = new Quaternion();
+var sampledQuaternionQuaternion0 = new Quaternion();
+var sampledQuaternionQuaternion0Conjugate = new Quaternion();
+Quaternion.packedLength = 4;
+Quaternion.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ array[startingIndex++] = value.x;
+ array[startingIndex++] = value.y;
+ array[startingIndex++] = value.z;
+ array[startingIndex] = value.w;
+ return array;
+};
+Quaternion.unpack = function(array, startingIndex, result) {
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ if (!defined_default(result)) {
+ result = new Quaternion();
+ }
+ result.x = array[startingIndex];
+ result.y = array[startingIndex + 1];
+ result.z = array[startingIndex + 2];
+ result.w = array[startingIndex + 3];
+ return result;
+};
+Quaternion.packedInterpolationLength = 3;
+Quaternion.convertPackedArrayForInterpolation = function(packedArray, startingIndex, lastIndex, result) {
+ Quaternion.unpack(
+ packedArray,
+ lastIndex * 4,
+ sampledQuaternionQuaternion0Conjugate
+ );
+ Quaternion.conjugate(
+ sampledQuaternionQuaternion0Conjugate,
+ sampledQuaternionQuaternion0Conjugate
+ );
+ for (let i = 0, len = lastIndex - startingIndex + 1; i < len; i++) {
+ const offset = i * 3;
+ Quaternion.unpack(
+ packedArray,
+ (startingIndex + i) * 4,
+ sampledQuaternionTempQuaternion
+ );
+ Quaternion.multiply(
+ sampledQuaternionTempQuaternion,
+ sampledQuaternionQuaternion0Conjugate,
+ sampledQuaternionTempQuaternion
+ );
+ if (sampledQuaternionTempQuaternion.w < 0) {
+ Quaternion.negate(
+ sampledQuaternionTempQuaternion,
+ sampledQuaternionTempQuaternion
+ );
+ }
+ Quaternion.computeAxis(
+ sampledQuaternionTempQuaternion,
+ sampledQuaternionAxis
+ );
+ const angle = Quaternion.computeAngle(sampledQuaternionTempQuaternion);
+ if (!defined_default(result)) {
+ result = [];
+ }
+ result[offset] = sampledQuaternionAxis.x * angle;
+ result[offset + 1] = sampledQuaternionAxis.y * angle;
+ result[offset + 2] = sampledQuaternionAxis.z * angle;
+ }
+};
+Quaternion.unpackInterpolationResult = function(array, sourceArray, firstIndex, lastIndex, result) {
+ if (!defined_default(result)) {
+ result = new Quaternion();
+ }
+ Cartesian3_default.fromArray(array, 0, sampledQuaternionRotation);
+ const magnitude = Cartesian3_default.magnitude(sampledQuaternionRotation);
+ Quaternion.unpack(sourceArray, lastIndex * 4, sampledQuaternionQuaternion0);
+ if (magnitude === 0) {
+ Quaternion.clone(Quaternion.IDENTITY, sampledQuaternionTempQuaternion);
+ } else {
+ Quaternion.fromAxisAngle(
+ sampledQuaternionRotation,
+ magnitude,
+ sampledQuaternionTempQuaternion
+ );
+ }
+ return Quaternion.multiply(
+ sampledQuaternionTempQuaternion,
+ sampledQuaternionQuaternion0,
+ result
+ );
+};
+Quaternion.clone = function(quaternion, result) {
+ if (!defined_default(quaternion)) {
+ return void 0;
+ }
+ if (!defined_default(result)) {
+ return new Quaternion(
+ quaternion.x,
+ quaternion.y,
+ quaternion.z,
+ quaternion.w
+ );
+ }
+ result.x = quaternion.x;
+ result.y = quaternion.y;
+ result.z = quaternion.z;
+ result.w = quaternion.w;
+ return result;
+};
+Quaternion.conjugate = function(quaternion, result) {
+ Check_default.typeOf.object("quaternion", quaternion);
+ Check_default.typeOf.object("result", result);
+ result.x = -quaternion.x;
+ result.y = -quaternion.y;
+ result.z = -quaternion.z;
+ result.w = quaternion.w;
+ return result;
+};
+Quaternion.magnitudeSquared = function(quaternion) {
+ Check_default.typeOf.object("quaternion", quaternion);
+ return quaternion.x * quaternion.x + quaternion.y * quaternion.y + quaternion.z * quaternion.z + quaternion.w * quaternion.w;
+};
+Quaternion.magnitude = function(quaternion) {
+ return Math.sqrt(Quaternion.magnitudeSquared(quaternion));
+};
+Quaternion.normalize = function(quaternion, result) {
+ Check_default.typeOf.object("result", result);
+ const inverseMagnitude = 1 / Quaternion.magnitude(quaternion);
+ const x = quaternion.x * inverseMagnitude;
+ const y = quaternion.y * inverseMagnitude;
+ const z = quaternion.z * inverseMagnitude;
+ const w = quaternion.w * inverseMagnitude;
+ result.x = x;
+ result.y = y;
+ result.z = z;
+ result.w = w;
+ return result;
+};
+Quaternion.inverse = function(quaternion, result) {
+ Check_default.typeOf.object("result", result);
+ const magnitudeSquared = Quaternion.magnitudeSquared(quaternion);
+ result = Quaternion.conjugate(quaternion, result);
+ return Quaternion.multiplyByScalar(result, 1 / magnitudeSquared, result);
+};
+Quaternion.add = function(left, right, result) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Check_default.typeOf.object("result", result);
+ result.x = left.x + right.x;
+ result.y = left.y + right.y;
+ result.z = left.z + right.z;
+ result.w = left.w + right.w;
+ return result;
+};
+Quaternion.subtract = function(left, right, result) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Check_default.typeOf.object("result", result);
+ result.x = left.x - right.x;
+ result.y = left.y - right.y;
+ result.z = left.z - right.z;
+ result.w = left.w - right.w;
+ return result;
+};
+Quaternion.negate = function(quaternion, result) {
+ Check_default.typeOf.object("quaternion", quaternion);
+ Check_default.typeOf.object("result", result);
+ result.x = -quaternion.x;
+ result.y = -quaternion.y;
+ result.z = -quaternion.z;
+ result.w = -quaternion.w;
+ return result;
+};
+Quaternion.dot = function(left, right) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ return left.x * right.x + left.y * right.y + left.z * right.z + left.w * right.w;
+};
+Quaternion.multiply = function(left, right, result) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Check_default.typeOf.object("result", result);
+ const leftX = left.x;
+ const leftY = left.y;
+ const leftZ = left.z;
+ const leftW = left.w;
+ const rightX = right.x;
+ const rightY = right.y;
+ const rightZ = right.z;
+ const rightW = right.w;
+ const x = leftW * rightX + leftX * rightW + leftY * rightZ - leftZ * rightY;
+ const y = leftW * rightY - leftX * rightZ + leftY * rightW + leftZ * rightX;
+ const z = leftW * rightZ + leftX * rightY - leftY * rightX + leftZ * rightW;
+ const w = leftW * rightW - leftX * rightX - leftY * rightY - leftZ * rightZ;
+ result.x = x;
+ result.y = y;
+ result.z = z;
+ result.w = w;
+ return result;
+};
+Quaternion.multiplyByScalar = function(quaternion, scalar, result) {
+ Check_default.typeOf.object("quaternion", quaternion);
+ Check_default.typeOf.number("scalar", scalar);
+ Check_default.typeOf.object("result", result);
+ result.x = quaternion.x * scalar;
+ result.y = quaternion.y * scalar;
+ result.z = quaternion.z * scalar;
+ result.w = quaternion.w * scalar;
+ return result;
+};
+Quaternion.divideByScalar = function(quaternion, scalar, result) {
+ Check_default.typeOf.object("quaternion", quaternion);
+ Check_default.typeOf.number("scalar", scalar);
+ Check_default.typeOf.object("result", result);
+ result.x = quaternion.x / scalar;
+ result.y = quaternion.y / scalar;
+ result.z = quaternion.z / scalar;
+ result.w = quaternion.w / scalar;
+ return result;
+};
+Quaternion.computeAxis = function(quaternion, result) {
+ Check_default.typeOf.object("quaternion", quaternion);
+ Check_default.typeOf.object("result", result);
+ const w = quaternion.w;
+ if (Math.abs(w - 1) < Math_default.EPSILON6 || Math.abs(w + 1) < Math_default.EPSILON6) {
+ result.x = 1;
+ result.y = result.z = 0;
+ return result;
+ }
+ const scalar = 1 / Math.sqrt(1 - w * w);
+ result.x = quaternion.x * scalar;
+ result.y = quaternion.y * scalar;
+ result.z = quaternion.z * scalar;
+ return result;
+};
+Quaternion.computeAngle = function(quaternion) {
+ Check_default.typeOf.object("quaternion", quaternion);
+ if (Math.abs(quaternion.w - 1) < Math_default.EPSILON6) {
+ return 0;
+ }
+ return 2 * Math.acos(quaternion.w);
+};
+var lerpScratch2 = new Quaternion();
+Quaternion.lerp = function(start, end, t, result) {
+ Check_default.typeOf.object("start", start);
+ Check_default.typeOf.object("end", end);
+ Check_default.typeOf.number("t", t);
+ Check_default.typeOf.object("result", result);
+ lerpScratch2 = Quaternion.multiplyByScalar(end, t, lerpScratch2);
+ result = Quaternion.multiplyByScalar(start, 1 - t, result);
+ return Quaternion.add(lerpScratch2, result, result);
+};
+var slerpEndNegated = new Quaternion();
+var slerpScaledP = new Quaternion();
+var slerpScaledR = new Quaternion();
+Quaternion.slerp = function(start, end, t, result) {
+ Check_default.typeOf.object("start", start);
+ Check_default.typeOf.object("end", end);
+ Check_default.typeOf.number("t", t);
+ Check_default.typeOf.object("result", result);
+ let dot = Quaternion.dot(start, end);
+ let r = end;
+ if (dot < 0) {
+ dot = -dot;
+ r = slerpEndNegated = Quaternion.negate(end, slerpEndNegated);
+ }
+ if (1 - dot < Math_default.EPSILON6) {
+ return Quaternion.lerp(start, r, t, result);
+ }
+ const theta = Math.acos(dot);
+ slerpScaledP = Quaternion.multiplyByScalar(
+ start,
+ Math.sin((1 - t) * theta),
+ slerpScaledP
+ );
+ slerpScaledR = Quaternion.multiplyByScalar(
+ r,
+ Math.sin(t * theta),
+ slerpScaledR
+ );
+ result = Quaternion.add(slerpScaledP, slerpScaledR, result);
+ return Quaternion.multiplyByScalar(result, 1 / Math.sin(theta), result);
+};
+Quaternion.log = function(quaternion, result) {
+ Check_default.typeOf.object("quaternion", quaternion);
+ Check_default.typeOf.object("result", result);
+ const theta = Math_default.acosClamped(quaternion.w);
+ let thetaOverSinTheta = 0;
+ if (theta !== 0) {
+ thetaOverSinTheta = theta / Math.sin(theta);
+ }
+ return Cartesian3_default.multiplyByScalar(quaternion, thetaOverSinTheta, result);
+};
+Quaternion.exp = function(cartesian, result) {
+ Check_default.typeOf.object("cartesian", cartesian);
+ Check_default.typeOf.object("result", result);
+ const theta = Cartesian3_default.magnitude(cartesian);
+ let sinThetaOverTheta = 0;
+ if (theta !== 0) {
+ sinThetaOverTheta = Math.sin(theta) / theta;
+ }
+ result.x = cartesian.x * sinThetaOverTheta;
+ result.y = cartesian.y * sinThetaOverTheta;
+ result.z = cartesian.z * sinThetaOverTheta;
+ result.w = Math.cos(theta);
+ return result;
+};
+var squadScratchCartesian0 = new Cartesian3_default();
+var squadScratchCartesian1 = new Cartesian3_default();
+var squadScratchQuaternion0 = new Quaternion();
+var squadScratchQuaternion1 = new Quaternion();
+Quaternion.computeInnerQuadrangle = function(q0, q1, q2, result) {
+ Check_default.typeOf.object("q0", q0);
+ Check_default.typeOf.object("q1", q1);
+ Check_default.typeOf.object("q2", q2);
+ Check_default.typeOf.object("result", result);
+ const qInv = Quaternion.conjugate(q1, squadScratchQuaternion0);
+ Quaternion.multiply(qInv, q2, squadScratchQuaternion1);
+ const cart0 = Quaternion.log(squadScratchQuaternion1, squadScratchCartesian0);
+ Quaternion.multiply(qInv, q0, squadScratchQuaternion1);
+ const cart1 = Quaternion.log(squadScratchQuaternion1, squadScratchCartesian1);
+ Cartesian3_default.add(cart0, cart1, cart0);
+ Cartesian3_default.multiplyByScalar(cart0, 0.25, cart0);
+ Cartesian3_default.negate(cart0, cart0);
+ Quaternion.exp(cart0, squadScratchQuaternion0);
+ return Quaternion.multiply(q1, squadScratchQuaternion0, result);
+};
+Quaternion.squad = function(q0, q1, s0, s1, t, result) {
+ Check_default.typeOf.object("q0", q0);
+ Check_default.typeOf.object("q1", q1);
+ Check_default.typeOf.object("s0", s0);
+ Check_default.typeOf.object("s1", s1);
+ Check_default.typeOf.number("t", t);
+ Check_default.typeOf.object("result", result);
+ const slerp0 = Quaternion.slerp(q0, q1, t, squadScratchQuaternion0);
+ const slerp1 = Quaternion.slerp(s0, s1, t, squadScratchQuaternion1);
+ return Quaternion.slerp(slerp0, slerp1, 2 * t * (1 - t), result);
+};
+var fastSlerpScratchQuaternion = new Quaternion();
+var opmu = 1.9011074535173003;
+var u = FeatureDetection_default.supportsTypedArrays() ? new Float32Array(8) : [];
+var v = FeatureDetection_default.supportsTypedArrays() ? new Float32Array(8) : [];
+var bT = FeatureDetection_default.supportsTypedArrays() ? new Float32Array(8) : [];
+var bD = FeatureDetection_default.supportsTypedArrays() ? new Float32Array(8) : [];
+for (let i = 0; i < 7; ++i) {
+ const s = i + 1;
+ const t = 2 * s + 1;
+ u[i] = 1 / (s * t);
+ v[i] = s / t;
+}
+u[7] = opmu / (8 * 17);
+v[7] = opmu * 8 / 17;
+Quaternion.fastSlerp = function(start, end, t, result) {
+ Check_default.typeOf.object("start", start);
+ Check_default.typeOf.object("end", end);
+ Check_default.typeOf.number("t", t);
+ Check_default.typeOf.object("result", result);
+ let x = Quaternion.dot(start, end);
+ let sign;
+ if (x >= 0) {
+ sign = 1;
+ } else {
+ sign = -1;
+ x = -x;
+ }
+ const xm1 = x - 1;
+ const d = 1 - t;
+ const sqrT = t * t;
+ const sqrD = d * d;
+ for (let i = 7; i >= 0; --i) {
+ bT[i] = (u[i] * sqrT - v[i]) * xm1;
+ bD[i] = (u[i] * sqrD - v[i]) * xm1;
+ }
+ const cT = sign * t * (1 + bT[0] * (1 + bT[1] * (1 + bT[2] * (1 + bT[3] * (1 + bT[4] * (1 + bT[5] * (1 + bT[6] * (1 + bT[7]))))))));
+ const cD = d * (1 + bD[0] * (1 + bD[1] * (1 + bD[2] * (1 + bD[3] * (1 + bD[4] * (1 + bD[5] * (1 + bD[6] * (1 + bD[7]))))))));
+ const temp = Quaternion.multiplyByScalar(
+ start,
+ cD,
+ fastSlerpScratchQuaternion
+ );
+ Quaternion.multiplyByScalar(end, cT, result);
+ return Quaternion.add(temp, result, result);
+};
+Quaternion.fastSquad = function(q0, q1, s0, s1, t, result) {
+ Check_default.typeOf.object("q0", q0);
+ Check_default.typeOf.object("q1", q1);
+ Check_default.typeOf.object("s0", s0);
+ Check_default.typeOf.object("s1", s1);
+ Check_default.typeOf.number("t", t);
+ Check_default.typeOf.object("result", result);
+ const slerp0 = Quaternion.fastSlerp(q0, q1, t, squadScratchQuaternion0);
+ const slerp1 = Quaternion.fastSlerp(s0, s1, t, squadScratchQuaternion1);
+ return Quaternion.fastSlerp(slerp0, slerp1, 2 * t * (1 - t), result);
+};
+Quaternion.equals = function(left, right) {
+ return left === right || defined_default(left) && defined_default(right) && left.x === right.x && left.y === right.y && left.z === right.z && left.w === right.w;
+};
+Quaternion.equalsEpsilon = function(left, right, epsilon) {
+ epsilon = defaultValue_default(epsilon, 0);
+ return left === right || defined_default(left) && defined_default(right) && Math.abs(left.x - right.x) <= epsilon && Math.abs(left.y - right.y) <= epsilon && Math.abs(left.z - right.z) <= epsilon && Math.abs(left.w - right.w) <= epsilon;
+};
+Quaternion.ZERO = Object.freeze(new Quaternion(0, 0, 0, 0));
+Quaternion.IDENTITY = Object.freeze(new Quaternion(0, 0, 0, 1));
+Quaternion.prototype.clone = function(result) {
+ return Quaternion.clone(this, result);
+};
+Quaternion.prototype.equals = function(right) {
+ return Quaternion.equals(this, right);
+};
+Quaternion.prototype.equalsEpsilon = function(right, epsilon) {
+ return Quaternion.equalsEpsilon(this, right, epsilon);
+};
+Quaternion.prototype.toString = function() {
+ return `(${this.x}, ${this.y}, ${this.z}, ${this.w})`;
+};
+var Quaternion_default = Quaternion;
+
+// packages/engine/Source/Core/Transforms.js
+var Transforms = {};
+var vectorProductLocalFrame = {
+ up: {
+ south: "east",
+ north: "west",
+ west: "south",
+ east: "north"
+ },
+ down: {
+ south: "west",
+ north: "east",
+ west: "north",
+ east: "south"
+ },
+ south: {
+ up: "west",
+ down: "east",
+ west: "down",
+ east: "up"
+ },
+ north: {
+ up: "east",
+ down: "west",
+ west: "up",
+ east: "down"
+ },
+ west: {
+ up: "north",
+ down: "south",
+ north: "down",
+ south: "up"
+ },
+ east: {
+ up: "south",
+ down: "north",
+ north: "up",
+ south: "down"
+ }
+};
+var degeneratePositionLocalFrame = {
+ north: [-1, 0, 0],
+ east: [0, 1, 0],
+ up: [0, 0, 1],
+ south: [1, 0, 0],
+ west: [0, -1, 0],
+ down: [0, 0, -1]
+};
+var localFrameToFixedFrameCache = {};
+var scratchCalculateCartesian = {
+ east: new Cartesian3_default(),
+ north: new Cartesian3_default(),
+ up: new Cartesian3_default(),
+ west: new Cartesian3_default(),
+ south: new Cartesian3_default(),
+ down: new Cartesian3_default()
+};
+var scratchFirstCartesian = new Cartesian3_default();
+var scratchSecondCartesian = new Cartesian3_default();
+var scratchThirdCartesian = new Cartesian3_default();
+Transforms.localFrameToFixedFrameGenerator = function(firstAxis, secondAxis) {
+ if (!vectorProductLocalFrame.hasOwnProperty(firstAxis) || !vectorProductLocalFrame[firstAxis].hasOwnProperty(secondAxis)) {
+ throw new DeveloperError_default(
+ "firstAxis and secondAxis must be east, north, up, west, south or down."
+ );
+ }
+ const thirdAxis = vectorProductLocalFrame[firstAxis][secondAxis];
+ let resultat;
+ const hashAxis = firstAxis + secondAxis;
+ if (defined_default(localFrameToFixedFrameCache[hashAxis])) {
+ resultat = localFrameToFixedFrameCache[hashAxis];
+ } else {
+ resultat = function(origin, ellipsoid, result) {
+ if (!defined_default(origin)) {
+ throw new DeveloperError_default("origin is required.");
+ }
+ if (isNaN(origin.x) || isNaN(origin.y) || isNaN(origin.z)) {
+ throw new DeveloperError_default("origin has a NaN component");
+ }
+ if (!defined_default(result)) {
+ result = new Matrix4_default();
+ }
+ if (Cartesian3_default.equalsEpsilon(origin, Cartesian3_default.ZERO, Math_default.EPSILON14)) {
+ Cartesian3_default.unpack(
+ degeneratePositionLocalFrame[firstAxis],
+ 0,
+ scratchFirstCartesian
+ );
+ Cartesian3_default.unpack(
+ degeneratePositionLocalFrame[secondAxis],
+ 0,
+ scratchSecondCartesian
+ );
+ Cartesian3_default.unpack(
+ degeneratePositionLocalFrame[thirdAxis],
+ 0,
+ scratchThirdCartesian
+ );
+ } else if (Math_default.equalsEpsilon(origin.x, 0, Math_default.EPSILON14) && Math_default.equalsEpsilon(origin.y, 0, Math_default.EPSILON14)) {
+ const sign = Math_default.sign(origin.z);
+ Cartesian3_default.unpack(
+ degeneratePositionLocalFrame[firstAxis],
+ 0,
+ scratchFirstCartesian
+ );
+ if (firstAxis !== "east" && firstAxis !== "west") {
+ Cartesian3_default.multiplyByScalar(
+ scratchFirstCartesian,
+ sign,
+ scratchFirstCartesian
+ );
+ }
+ Cartesian3_default.unpack(
+ degeneratePositionLocalFrame[secondAxis],
+ 0,
+ scratchSecondCartesian
+ );
+ if (secondAxis !== "east" && secondAxis !== "west") {
+ Cartesian3_default.multiplyByScalar(
+ scratchSecondCartesian,
+ sign,
+ scratchSecondCartesian
+ );
+ }
+ Cartesian3_default.unpack(
+ degeneratePositionLocalFrame[thirdAxis],
+ 0,
+ scratchThirdCartesian
+ );
+ if (thirdAxis !== "east" && thirdAxis !== "west") {
+ Cartesian3_default.multiplyByScalar(
+ scratchThirdCartesian,
+ sign,
+ scratchThirdCartesian
+ );
+ }
+ } else {
+ ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.default);
+ ellipsoid.geodeticSurfaceNormal(origin, scratchCalculateCartesian.up);
+ const up = scratchCalculateCartesian.up;
+ const east = scratchCalculateCartesian.east;
+ east.x = -origin.y;
+ east.y = origin.x;
+ east.z = 0;
+ Cartesian3_default.normalize(east, scratchCalculateCartesian.east);
+ Cartesian3_default.cross(up, east, scratchCalculateCartesian.north);
+ Cartesian3_default.multiplyByScalar(
+ scratchCalculateCartesian.up,
+ -1,
+ scratchCalculateCartesian.down
+ );
+ Cartesian3_default.multiplyByScalar(
+ scratchCalculateCartesian.east,
+ -1,
+ scratchCalculateCartesian.west
+ );
+ Cartesian3_default.multiplyByScalar(
+ scratchCalculateCartesian.north,
+ -1,
+ scratchCalculateCartesian.south
+ );
+ scratchFirstCartesian = scratchCalculateCartesian[firstAxis];
+ scratchSecondCartesian = scratchCalculateCartesian[secondAxis];
+ scratchThirdCartesian = scratchCalculateCartesian[thirdAxis];
+ }
+ result[0] = scratchFirstCartesian.x;
+ result[1] = scratchFirstCartesian.y;
+ result[2] = scratchFirstCartesian.z;
+ result[3] = 0;
+ result[4] = scratchSecondCartesian.x;
+ result[5] = scratchSecondCartesian.y;
+ result[6] = scratchSecondCartesian.z;
+ result[7] = 0;
+ result[8] = scratchThirdCartesian.x;
+ result[9] = scratchThirdCartesian.y;
+ result[10] = scratchThirdCartesian.z;
+ result[11] = 0;
+ result[12] = origin.x;
+ result[13] = origin.y;
+ result[14] = origin.z;
+ result[15] = 1;
+ return result;
+ };
+ localFrameToFixedFrameCache[hashAxis] = resultat;
+ }
+ return resultat;
+};
+Transforms.eastNorthUpToFixedFrame = Transforms.localFrameToFixedFrameGenerator(
+ "east",
+ "north"
+);
+Transforms.northEastDownToFixedFrame = Transforms.localFrameToFixedFrameGenerator(
+ "north",
+ "east"
+);
+Transforms.northUpEastToFixedFrame = Transforms.localFrameToFixedFrameGenerator(
+ "north",
+ "up"
+);
+Transforms.northWestUpToFixedFrame = Transforms.localFrameToFixedFrameGenerator(
+ "north",
+ "west"
+);
+var scratchHPRQuaternion2 = new Quaternion_default();
+var scratchScale = new Cartesian3_default(1, 1, 1);
+var scratchHPRMatrix4 = new Matrix4_default();
+Transforms.headingPitchRollToFixedFrame = function(origin, headingPitchRoll, ellipsoid, fixedFrameTransform, result) {
+ Check_default.typeOf.object("HeadingPitchRoll", headingPitchRoll);
+ fixedFrameTransform = defaultValue_default(
+ fixedFrameTransform,
+ Transforms.eastNorthUpToFixedFrame
+ );
+ const hprQuaternion = Quaternion_default.fromHeadingPitchRoll(
+ headingPitchRoll,
+ scratchHPRQuaternion2
+ );
+ const hprMatrix = Matrix4_default.fromTranslationQuaternionRotationScale(
+ Cartesian3_default.ZERO,
+ hprQuaternion,
+ scratchScale,
+ scratchHPRMatrix4
+ );
+ result = fixedFrameTransform(origin, ellipsoid, result);
+ return Matrix4_default.multiply(result, hprMatrix, result);
+};
+var scratchENUMatrix4 = new Matrix4_default();
+var scratchHPRMatrix3 = new Matrix3_default();
+Transforms.headingPitchRollQuaternion = function(origin, headingPitchRoll, ellipsoid, fixedFrameTransform, result) {
+ Check_default.typeOf.object("HeadingPitchRoll", headingPitchRoll);
+ const transform = Transforms.headingPitchRollToFixedFrame(
+ origin,
+ headingPitchRoll,
+ ellipsoid,
+ fixedFrameTransform,
+ scratchENUMatrix4
+ );
+ const rotation = Matrix4_default.getMatrix3(transform, scratchHPRMatrix3);
+ return Quaternion_default.fromRotationMatrix(rotation, result);
+};
+var noScale = new Cartesian3_default(1, 1, 1);
+var hprCenterScratch = new Cartesian3_default();
+var ffScratch = new Matrix4_default();
+var hprTransformScratch = new Matrix4_default();
+var hprRotationScratch = new Matrix3_default();
+var hprQuaternionScratch = new Quaternion_default();
+Transforms.fixedFrameToHeadingPitchRoll = function(transform, ellipsoid, fixedFrameTransform, result) {
+ Check_default.defined("transform", transform);
+ ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.default);
+ fixedFrameTransform = defaultValue_default(
+ fixedFrameTransform,
+ Transforms.eastNorthUpToFixedFrame
+ );
+ if (!defined_default(result)) {
+ result = new HeadingPitchRoll_default();
+ }
+ const center = Matrix4_default.getTranslation(transform, hprCenterScratch);
+ if (Cartesian3_default.equals(center, Cartesian3_default.ZERO)) {
+ result.heading = 0;
+ result.pitch = 0;
+ result.roll = 0;
+ return result;
+ }
+ let toFixedFrame = Matrix4_default.inverseTransformation(
+ fixedFrameTransform(center, ellipsoid, ffScratch),
+ ffScratch
+ );
+ let transformCopy = Matrix4_default.setScale(transform, noScale, hprTransformScratch);
+ transformCopy = Matrix4_default.setTranslation(
+ transformCopy,
+ Cartesian3_default.ZERO,
+ transformCopy
+ );
+ toFixedFrame = Matrix4_default.multiply(toFixedFrame, transformCopy, toFixedFrame);
+ let quaternionRotation = Quaternion_default.fromRotationMatrix(
+ Matrix4_default.getMatrix3(toFixedFrame, hprRotationScratch),
+ hprQuaternionScratch
+ );
+ quaternionRotation = Quaternion_default.normalize(
+ quaternionRotation,
+ quaternionRotation
+ );
+ return HeadingPitchRoll_default.fromQuaternion(quaternionRotation, result);
+};
+var gmstConstant0 = 6 * 3600 + 41 * 60 + 50.54841;
+var gmstConstant1 = 8640184812866e-6;
+var gmstConstant2 = 0.093104;
+var gmstConstant3 = -62e-7;
+var rateCoef = 11772758384668e-32;
+var wgs84WRPrecessing = 72921158553e-15;
+var twoPiOverSecondsInDay = Math_default.TWO_PI / 86400;
+var dateInUtc = new JulianDate_default();
+Transforms.computeIcrfToCentralBodyFixedMatrix = function(date, result) {
+ let transformMatrix = Transforms.computeIcrfToFixedMatrix(date, result);
+ if (!defined_default(transformMatrix)) {
+ transformMatrix = Transforms.computeTemeToPseudoFixedMatrix(date, result);
+ }
+ return transformMatrix;
+};
+Transforms.computeTemeToPseudoFixedMatrix = function(date, result) {
+ if (!defined_default(date)) {
+ throw new DeveloperError_default("date is required.");
+ }
+ dateInUtc = JulianDate_default.addSeconds(
+ date,
+ -JulianDate_default.computeTaiMinusUtc(date),
+ dateInUtc
+ );
+ const utcDayNumber = dateInUtc.dayNumber;
+ const utcSecondsIntoDay = dateInUtc.secondsOfDay;
+ let t;
+ const diffDays = utcDayNumber - 2451545;
+ if (utcSecondsIntoDay >= 43200) {
+ t = (diffDays + 0.5) / TimeConstants_default.DAYS_PER_JULIAN_CENTURY;
+ } else {
+ t = (diffDays - 0.5) / TimeConstants_default.DAYS_PER_JULIAN_CENTURY;
+ }
+ const gmst0 = gmstConstant0 + t * (gmstConstant1 + t * (gmstConstant2 + t * gmstConstant3));
+ const angle = gmst0 * twoPiOverSecondsInDay % Math_default.TWO_PI;
+ const ratio = wgs84WRPrecessing + rateCoef * (utcDayNumber - 24515455e-1);
+ const secondsSinceMidnight = (utcSecondsIntoDay + TimeConstants_default.SECONDS_PER_DAY * 0.5) % TimeConstants_default.SECONDS_PER_DAY;
+ const gha = angle + ratio * secondsSinceMidnight;
+ const cosGha = Math.cos(gha);
+ const sinGha = Math.sin(gha);
+ if (!defined_default(result)) {
+ return new Matrix3_default(
+ cosGha,
+ sinGha,
+ 0,
+ -sinGha,
+ cosGha,
+ 0,
+ 0,
+ 0,
+ 1
+ );
+ }
+ result[0] = cosGha;
+ result[1] = -sinGha;
+ result[2] = 0;
+ result[3] = sinGha;
+ result[4] = cosGha;
+ result[5] = 0;
+ result[6] = 0;
+ result[7] = 0;
+ result[8] = 1;
+ return result;
+};
+Transforms.iau2006XysData = new Iau2006XysData_default();
+Transforms.earthOrientationParameters = EarthOrientationParameters_default.NONE;
+var ttMinusTai = 32.184;
+var j2000ttDays = 2451545;
+Transforms.preloadIcrfFixed = function(timeInterval) {
+ const startDayTT = timeInterval.start.dayNumber;
+ const startSecondTT = timeInterval.start.secondsOfDay + ttMinusTai;
+ const stopDayTT = timeInterval.stop.dayNumber;
+ const stopSecondTT = timeInterval.stop.secondsOfDay + ttMinusTai;
+ return Transforms.iau2006XysData.preload(
+ startDayTT,
+ startSecondTT,
+ stopDayTT,
+ stopSecondTT
+ );
+};
+Transforms.computeIcrfToFixedMatrix = function(date, result) {
+ if (!defined_default(date)) {
+ throw new DeveloperError_default("date is required.");
+ }
+ if (!defined_default(result)) {
+ result = new Matrix3_default();
+ }
+ const fixedToIcrfMtx = Transforms.computeFixedToIcrfMatrix(date, result);
+ if (!defined_default(fixedToIcrfMtx)) {
+ return void 0;
+ }
+ return Matrix3_default.transpose(fixedToIcrfMtx, result);
+};
+var TdtMinusTai = 32.184;
+var J2000d = 2451545;
+var scratchHpr = new HeadingPitchRoll_default();
+var scratchRotationMatrix = new Matrix3_default();
+var dateScratch = new JulianDate_default();
+Transforms.computeMoonFixedToIcrfMatrix = function(date, result) {
+ if (!defined_default(date)) {
+ throw new DeveloperError_default("date is required.");
+ }
+ if (!defined_default(result)) {
+ result = new Matrix3_default();
+ }
+ const secondsTT = JulianDate_default.addSeconds(date, TdtMinusTai, dateScratch);
+ const d = JulianDate_default.totalDays(secondsTT) - J2000d;
+ const e1 = Math_default.toRadians(12.112) - Math_default.toRadians(0.052992) * d;
+ const e2 = Math_default.toRadians(24.224) - Math_default.toRadians(0.105984) * d;
+ const e3 = Math_default.toRadians(227.645) + Math_default.toRadians(13.012) * d;
+ const e4 = Math_default.toRadians(261.105) + Math_default.toRadians(13.340716) * d;
+ const e5 = Math_default.toRadians(358) + Math_default.toRadians(0.9856) * d;
+ scratchHpr.pitch = Math_default.toRadians(270 - 90) - Math_default.toRadians(3.878) * Math.sin(e1) - Math_default.toRadians(0.12) * Math.sin(e2) + Math_default.toRadians(0.07) * Math.sin(e3) - Math_default.toRadians(0.017) * Math.sin(e4);
+ scratchHpr.roll = Math_default.toRadians(66.53 - 90) + Math_default.toRadians(1.543) * Math.cos(e1) + Math_default.toRadians(0.24) * Math.cos(e2) - Math_default.toRadians(0.028) * Math.cos(e3) + Math_default.toRadians(7e-3) * Math.cos(e4);
+ scratchHpr.heading = Math_default.toRadians(244.375 - 90) + Math_default.toRadians(13.17635831) * d + Math_default.toRadians(3.558) * Math.sin(e1) + Math_default.toRadians(0.121) * Math.sin(e2) - Math_default.toRadians(0.064) * Math.sin(e3) + Math_default.toRadians(0.016) * Math.sin(e4) + Math_default.toRadians(0.025) * Math.sin(e5);
+ return Matrix3_default.fromHeadingPitchRoll(scratchHpr, scratchRotationMatrix);
+};
+Transforms.computeIcrfToMoonFixedMatrix = function(date, result) {
+ if (!defined_default(date)) {
+ throw new DeveloperError_default("date is required.");
+ }
+ if (!defined_default(result)) {
+ result = new Matrix3_default();
+ }
+ const fixedToIcrfMtx = Transforms.computeMoonFixedToIcrfMatrix(date, result);
+ if (!defined_default(fixedToIcrfMtx)) {
+ return void 0;
+ }
+ return Matrix3_default.transpose(fixedToIcrfMtx, result);
+};
+var xysScratch = new Iau2006XysSample_default(0, 0, 0);
+var eopScratch = new EarthOrientationParametersSample_default(
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0
+);
+var rotation1Scratch = new Matrix3_default();
+var rotation2Scratch = new Matrix3_default();
+Transforms.computeFixedToIcrfMatrix = function(date, result) {
+ if (!defined_default(date)) {
+ throw new DeveloperError_default("date is required.");
+ }
+ if (!defined_default(result)) {
+ result = new Matrix3_default();
+ }
+ const eop = Transforms.earthOrientationParameters.compute(date, eopScratch);
+ if (!defined_default(eop)) {
+ return void 0;
+ }
+ const dayTT = date.dayNumber;
+ const secondTT = date.secondsOfDay + ttMinusTai;
+ const xys = Transforms.iau2006XysData.computeXysRadians(
+ dayTT,
+ secondTT,
+ xysScratch
+ );
+ if (!defined_default(xys)) {
+ return void 0;
+ }
+ const x = xys.x + eop.xPoleOffset;
+ const y = xys.y + eop.yPoleOffset;
+ const a3 = 1 / (1 + Math.sqrt(1 - x * x - y * y));
+ const rotation1 = rotation1Scratch;
+ rotation1[0] = 1 - a3 * x * x;
+ rotation1[3] = -a3 * x * y;
+ rotation1[6] = x;
+ rotation1[1] = -a3 * x * y;
+ rotation1[4] = 1 - a3 * y * y;
+ rotation1[7] = y;
+ rotation1[2] = -x;
+ rotation1[5] = -y;
+ rotation1[8] = 1 - a3 * (x * x + y * y);
+ const rotation2 = Matrix3_default.fromRotationZ(-xys.s, rotation2Scratch);
+ const matrixQ = Matrix3_default.multiply(rotation1, rotation2, rotation1Scratch);
+ const dateUt1day = date.dayNumber;
+ const dateUt1sec = date.secondsOfDay - JulianDate_default.computeTaiMinusUtc(date) + eop.ut1MinusUtc;
+ const daysSinceJ2000 = dateUt1day - 2451545;
+ const fractionOfDay = dateUt1sec / TimeConstants_default.SECONDS_PER_DAY;
+ let era = 0.779057273264 + fractionOfDay + 0.00273781191135448 * (daysSinceJ2000 + fractionOfDay);
+ era = era % 1 * Math_default.TWO_PI;
+ const earthRotation = Matrix3_default.fromRotationZ(era, rotation2Scratch);
+ const pfToIcrf = Matrix3_default.multiply(matrixQ, earthRotation, rotation1Scratch);
+ const cosxp = Math.cos(eop.xPoleWander);
+ const cosyp = Math.cos(eop.yPoleWander);
+ const sinxp = Math.sin(eop.xPoleWander);
+ const sinyp = Math.sin(eop.yPoleWander);
+ let ttt = dayTT - j2000ttDays + secondTT / TimeConstants_default.SECONDS_PER_DAY;
+ ttt /= 36525;
+ const sp = -47e-6 * ttt * Math_default.RADIANS_PER_DEGREE / 3600;
+ const cossp = Math.cos(sp);
+ const sinsp = Math.sin(sp);
+ const fToPfMtx = rotation2Scratch;
+ fToPfMtx[0] = cosxp * cossp;
+ fToPfMtx[1] = cosxp * sinsp;
+ fToPfMtx[2] = sinxp;
+ fToPfMtx[3] = -cosyp * sinsp + sinyp * sinxp * cossp;
+ fToPfMtx[4] = cosyp * cossp + sinyp * sinxp * sinsp;
+ fToPfMtx[5] = -sinyp * cosxp;
+ fToPfMtx[6] = -sinyp * sinsp - cosyp * sinxp * cossp;
+ fToPfMtx[7] = sinyp * cossp - cosyp * sinxp * sinsp;
+ fToPfMtx[8] = cosyp * cosxp;
+ return Matrix3_default.multiply(pfToIcrf, fToPfMtx, result);
+};
+var pointToWindowCoordinatesTemp = new Cartesian4_default();
+Transforms.pointToWindowCoordinates = function(modelViewProjectionMatrix, viewportTransformation, point, result) {
+ result = Transforms.pointToGLWindowCoordinates(
+ modelViewProjectionMatrix,
+ viewportTransformation,
+ point,
+ result
+ );
+ result.y = 2 * viewportTransformation[5] - result.y;
+ return result;
+};
+Transforms.pointToGLWindowCoordinates = function(modelViewProjectionMatrix, viewportTransformation, point, result) {
+ if (!defined_default(modelViewProjectionMatrix)) {
+ throw new DeveloperError_default("modelViewProjectionMatrix is required.");
+ }
+ if (!defined_default(viewportTransformation)) {
+ throw new DeveloperError_default("viewportTransformation is required.");
+ }
+ if (!defined_default(point)) {
+ throw new DeveloperError_default("point is required.");
+ }
+ if (!defined_default(result)) {
+ result = new Cartesian2_default();
+ }
+ const tmp = pointToWindowCoordinatesTemp;
+ Matrix4_default.multiplyByVector(
+ modelViewProjectionMatrix,
+ Cartesian4_default.fromElements(point.x, point.y, point.z, 1, tmp),
+ tmp
+ );
+ Cartesian4_default.multiplyByScalar(tmp, 1 / tmp.w, tmp);
+ Matrix4_default.multiplyByVector(viewportTransformation, tmp, tmp);
+ return Cartesian2_default.fromCartesian4(tmp, result);
+};
+var normalScratch = new Cartesian3_default();
+var rightScratch = new Cartesian3_default();
+var upScratch = new Cartesian3_default();
+Transforms.rotationMatrixFromPositionVelocity = function(position, velocity, ellipsoid, result) {
+ if (!defined_default(position)) {
+ throw new DeveloperError_default("position is required.");
+ }
+ if (!defined_default(velocity)) {
+ throw new DeveloperError_default("velocity is required.");
+ }
+ const normal = defaultValue_default(
+ ellipsoid,
+ Ellipsoid_default.default
+ ).geodeticSurfaceNormal(position, normalScratch);
+ let right = Cartesian3_default.cross(velocity, normal, rightScratch);
+ if (Cartesian3_default.equalsEpsilon(right, Cartesian3_default.ZERO, Math_default.EPSILON6)) {
+ right = Cartesian3_default.clone(Cartesian3_default.UNIT_X, right);
+ }
+ const up = Cartesian3_default.cross(right, velocity, upScratch);
+ Cartesian3_default.normalize(up, up);
+ Cartesian3_default.cross(velocity, up, right);
+ Cartesian3_default.negate(right, right);
+ Cartesian3_default.normalize(right, right);
+ if (!defined_default(result)) {
+ result = new Matrix3_default();
+ }
+ result[0] = velocity.x;
+ result[1] = velocity.y;
+ result[2] = velocity.z;
+ result[3] = right.x;
+ result[4] = right.y;
+ result[5] = right.z;
+ result[6] = up.x;
+ result[7] = up.y;
+ result[8] = up.z;
+ return result;
+};
+var swizzleMatrix = new Matrix4_default(
+ 0,
+ 0,
+ 1,
+ 0,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1
+);
+var scratchCartographic = new Cartographic_default();
+var scratchCartesian3Projection = new Cartesian3_default();
+var scratchCenter = new Cartesian3_default();
+var scratchRotation = new Matrix3_default();
+var scratchFromENU = new Matrix4_default();
+var scratchToENU = new Matrix4_default();
+Transforms.basisTo2D = function(projection, matrix, result) {
+ if (!defined_default(projection)) {
+ throw new DeveloperError_default("projection is required.");
+ }
+ if (!defined_default(matrix)) {
+ throw new DeveloperError_default("matrix is required.");
+ }
+ if (!defined_default(result)) {
+ throw new DeveloperError_default("result is required.");
+ }
+ const rtcCenter = Matrix4_default.getTranslation(matrix, scratchCenter);
+ const ellipsoid = projection.ellipsoid;
+ let projectedPosition;
+ if (Cartesian3_default.equals(rtcCenter, Cartesian3_default.ZERO)) {
+ projectedPosition = Cartesian3_default.clone(
+ Cartesian3_default.ZERO,
+ scratchCartesian3Projection
+ );
+ } else {
+ const cartographic = ellipsoid.cartesianToCartographic(
+ rtcCenter,
+ scratchCartographic
+ );
+ projectedPosition = projection.project(
+ cartographic,
+ scratchCartesian3Projection
+ );
+ Cartesian3_default.fromElements(
+ projectedPosition.z,
+ projectedPosition.x,
+ projectedPosition.y,
+ projectedPosition
+ );
+ }
+ const fromENU = Transforms.eastNorthUpToFixedFrame(
+ rtcCenter,
+ ellipsoid,
+ scratchFromENU
+ );
+ const toENU = Matrix4_default.inverseTransformation(fromENU, scratchToENU);
+ const rotation = Matrix4_default.getMatrix3(matrix, scratchRotation);
+ const local = Matrix4_default.multiplyByMatrix3(toENU, rotation, result);
+ Matrix4_default.multiply(swizzleMatrix, local, result);
+ Matrix4_default.setTranslation(result, projectedPosition, result);
+ return result;
+};
+Transforms.ellipsoidTo2DModelMatrix = function(projection, center, result) {
+ if (!defined_default(projection)) {
+ throw new DeveloperError_default("projection is required.");
+ }
+ if (!defined_default(center)) {
+ throw new DeveloperError_default("center is required.");
+ }
+ if (!defined_default(result)) {
+ throw new DeveloperError_default("result is required.");
+ }
+ const ellipsoid = projection.ellipsoid;
+ const fromENU = Transforms.eastNorthUpToFixedFrame(
+ center,
+ ellipsoid,
+ scratchFromENU
+ );
+ const toENU = Matrix4_default.inverseTransformation(fromENU, scratchToENU);
+ const cartographic = ellipsoid.cartesianToCartographic(
+ center,
+ scratchCartographic
+ );
+ const projectedPosition = projection.project(
+ cartographic,
+ scratchCartesian3Projection
+ );
+ Cartesian3_default.fromElements(
+ projectedPosition.z,
+ projectedPosition.x,
+ projectedPosition.y,
+ projectedPosition
+ );
+ const translation = Matrix4_default.fromTranslation(
+ projectedPosition,
+ scratchFromENU
+ );
+ Matrix4_default.multiply(swizzleMatrix, toENU, result);
+ Matrix4_default.multiply(translation, result, result);
+ return result;
+};
+var Transforms_default = Transforms;
+
+// packages/engine/Source/Core/Rectangle.js
+function Rectangle(west, south, east, north) {
+ this.west = defaultValue_default(west, 0);
+ this.south = defaultValue_default(south, 0);
+ this.east = defaultValue_default(east, 0);
+ this.north = defaultValue_default(north, 0);
+}
+Object.defineProperties(Rectangle.prototype, {
+ /**
+ * Gets the width of the rectangle in radians.
+ * @memberof Rectangle.prototype
+ * @type {number}
+ * @readonly
+ */
+ width: {
+ get: function() {
+ return Rectangle.computeWidth(this);
+ }
+ },
+ /**
+ * Gets the height of the rectangle in radians.
+ * @memberof Rectangle.prototype
+ * @type {number}
+ * @readonly
+ */
+ height: {
+ get: function() {
+ return Rectangle.computeHeight(this);
+ }
+ }
+});
+Rectangle.packedLength = 4;
+Rectangle.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ array[startingIndex++] = value.west;
+ array[startingIndex++] = value.south;
+ array[startingIndex++] = value.east;
+ array[startingIndex] = value.north;
+ return array;
+};
+Rectangle.unpack = function(array, startingIndex, result) {
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ if (!defined_default(result)) {
+ result = new Rectangle();
+ }
+ result.west = array[startingIndex++];
+ result.south = array[startingIndex++];
+ result.east = array[startingIndex++];
+ result.north = array[startingIndex];
+ return result;
+};
+Rectangle.computeWidth = function(rectangle) {
+ Check_default.typeOf.object("rectangle", rectangle);
+ let east = rectangle.east;
+ const west = rectangle.west;
+ if (east < west) {
+ east += Math_default.TWO_PI;
+ }
+ return east - west;
+};
+Rectangle.computeHeight = function(rectangle) {
+ Check_default.typeOf.object("rectangle", rectangle);
+ return rectangle.north - rectangle.south;
+};
+Rectangle.fromDegrees = function(west, south, east, north, result) {
+ west = Math_default.toRadians(defaultValue_default(west, 0));
+ south = Math_default.toRadians(defaultValue_default(south, 0));
+ east = Math_default.toRadians(defaultValue_default(east, 0));
+ north = Math_default.toRadians(defaultValue_default(north, 0));
+ if (!defined_default(result)) {
+ return new Rectangle(west, south, east, north);
+ }
+ result.west = west;
+ result.south = south;
+ result.east = east;
+ result.north = north;
+ return result;
+};
+Rectangle.fromRadians = function(west, south, east, north, result) {
+ if (!defined_default(result)) {
+ return new Rectangle(west, south, east, north);
+ }
+ result.west = defaultValue_default(west, 0);
+ result.south = defaultValue_default(south, 0);
+ result.east = defaultValue_default(east, 0);
+ result.north = defaultValue_default(north, 0);
+ return result;
+};
+Rectangle.fromCartographicArray = function(cartographics, result) {
+ Check_default.defined("cartographics", cartographics);
+ let west = Number.MAX_VALUE;
+ let east = -Number.MAX_VALUE;
+ let westOverIDL = Number.MAX_VALUE;
+ let eastOverIDL = -Number.MAX_VALUE;
+ let south = Number.MAX_VALUE;
+ let north = -Number.MAX_VALUE;
+ for (let i = 0, len = cartographics.length; i < len; i++) {
+ const position = cartographics[i];
+ west = Math.min(west, position.longitude);
+ east = Math.max(east, position.longitude);
+ south = Math.min(south, position.latitude);
+ north = Math.max(north, position.latitude);
+ const lonAdjusted = position.longitude >= 0 ? position.longitude : position.longitude + Math_default.TWO_PI;
+ westOverIDL = Math.min(westOverIDL, lonAdjusted);
+ eastOverIDL = Math.max(eastOverIDL, lonAdjusted);
+ }
+ if (east - west > eastOverIDL - westOverIDL) {
+ west = westOverIDL;
+ east = eastOverIDL;
+ if (east > Math_default.PI) {
+ east = east - Math_default.TWO_PI;
+ }
+ if (west > Math_default.PI) {
+ west = west - Math_default.TWO_PI;
+ }
+ }
+ if (!defined_default(result)) {
+ return new Rectangle(west, south, east, north);
+ }
+ result.west = west;
+ result.south = south;
+ result.east = east;
+ result.north = north;
+ return result;
+};
+Rectangle.fromCartesianArray = function(cartesians, ellipsoid, result) {
+ Check_default.defined("cartesians", cartesians);
+ ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.default);
+ let west = Number.MAX_VALUE;
+ let east = -Number.MAX_VALUE;
+ let westOverIDL = Number.MAX_VALUE;
+ let eastOverIDL = -Number.MAX_VALUE;
+ let south = Number.MAX_VALUE;
+ let north = -Number.MAX_VALUE;
+ for (let i = 0, len = cartesians.length; i < len; i++) {
+ const position = ellipsoid.cartesianToCartographic(cartesians[i]);
+ west = Math.min(west, position.longitude);
+ east = Math.max(east, position.longitude);
+ south = Math.min(south, position.latitude);
+ north = Math.max(north, position.latitude);
+ const lonAdjusted = position.longitude >= 0 ? position.longitude : position.longitude + Math_default.TWO_PI;
+ westOverIDL = Math.min(westOverIDL, lonAdjusted);
+ eastOverIDL = Math.max(eastOverIDL, lonAdjusted);
+ }
+ if (east - west > eastOverIDL - westOverIDL) {
+ west = westOverIDL;
+ east = eastOverIDL;
+ if (east > Math_default.PI) {
+ east = east - Math_default.TWO_PI;
+ }
+ if (west > Math_default.PI) {
+ west = west - Math_default.TWO_PI;
+ }
+ }
+ if (!defined_default(result)) {
+ return new Rectangle(west, south, east, north);
+ }
+ result.west = west;
+ result.south = south;
+ result.east = east;
+ result.north = north;
+ return result;
+};
+var fromBoundingSphereMatrixScratch = new Cartesian3_default();
+var fromBoundingSphereEastScratch = new Cartesian3_default();
+var fromBoundingSphereNorthScratch = new Cartesian3_default();
+var fromBoundingSphereWestScratch = new Cartesian3_default();
+var fromBoundingSphereSouthScratch = new Cartesian3_default();
+var fromBoundingSpherePositionsScratch = new Array(5);
+for (let n = 0; n < fromBoundingSpherePositionsScratch.length; ++n) {
+ fromBoundingSpherePositionsScratch[n] = new Cartesian3_default();
+}
+Rectangle.fromBoundingSphere = function(boundingSphere, ellipsoid, result) {
+ Check_default.typeOf.object("boundingSphere", boundingSphere);
+ const center = boundingSphere.center;
+ const radius = boundingSphere.radius;
+ if (!defined_default(ellipsoid)) {
+ ellipsoid = Ellipsoid_default.default;
+ }
+ if (!defined_default(result)) {
+ result = new Rectangle();
+ }
+ if (Cartesian3_default.equals(center, Cartesian3_default.ZERO)) {
+ Rectangle.clone(Rectangle.MAX_VALUE, result);
+ return result;
+ }
+ const fromENU = Transforms_default.eastNorthUpToFixedFrame(
+ center,
+ ellipsoid,
+ fromBoundingSphereMatrixScratch
+ );
+ const east = Matrix4_default.multiplyByPointAsVector(
+ fromENU,
+ Cartesian3_default.UNIT_X,
+ fromBoundingSphereEastScratch
+ );
+ Cartesian3_default.normalize(east, east);
+ const north = Matrix4_default.multiplyByPointAsVector(
+ fromENU,
+ Cartesian3_default.UNIT_Y,
+ fromBoundingSphereNorthScratch
+ );
+ Cartesian3_default.normalize(north, north);
+ Cartesian3_default.multiplyByScalar(north, radius, north);
+ Cartesian3_default.multiplyByScalar(east, radius, east);
+ const south = Cartesian3_default.negate(north, fromBoundingSphereSouthScratch);
+ const west = Cartesian3_default.negate(east, fromBoundingSphereWestScratch);
+ const positions = fromBoundingSpherePositionsScratch;
+ let corner = positions[0];
+ Cartesian3_default.add(center, north, corner);
+ corner = positions[1];
+ Cartesian3_default.add(center, west, corner);
+ corner = positions[2];
+ Cartesian3_default.add(center, south, corner);
+ corner = positions[3];
+ Cartesian3_default.add(center, east, corner);
+ positions[4] = center;
+ return Rectangle.fromCartesianArray(positions, ellipsoid, result);
+};
+Rectangle.clone = function(rectangle, result) {
+ if (!defined_default(rectangle)) {
+ return void 0;
+ }
+ if (!defined_default(result)) {
+ return new Rectangle(
+ rectangle.west,
+ rectangle.south,
+ rectangle.east,
+ rectangle.north
+ );
+ }
+ result.west = rectangle.west;
+ result.south = rectangle.south;
+ result.east = rectangle.east;
+ result.north = rectangle.north;
+ return result;
+};
+Rectangle.equalsEpsilon = function(left, right, absoluteEpsilon) {
+ absoluteEpsilon = defaultValue_default(absoluteEpsilon, 0);
+ return left === right || defined_default(left) && defined_default(right) && Math.abs(left.west - right.west) <= absoluteEpsilon && Math.abs(left.south - right.south) <= absoluteEpsilon && Math.abs(left.east - right.east) <= absoluteEpsilon && Math.abs(left.north - right.north) <= absoluteEpsilon;
+};
+Rectangle.prototype.clone = function(result) {
+ return Rectangle.clone(this, result);
+};
+Rectangle.prototype.equals = function(other) {
+ return Rectangle.equals(this, other);
+};
+Rectangle.equals = function(left, right) {
+ return left === right || defined_default(left) && defined_default(right) && left.west === right.west && left.south === right.south && left.east === right.east && left.north === right.north;
+};
+Rectangle.prototype.equalsEpsilon = function(other, epsilon) {
+ return Rectangle.equalsEpsilon(this, other, epsilon);
+};
+Rectangle.validate = function(rectangle) {
+ Check_default.typeOf.object("rectangle", rectangle);
+ const north = rectangle.north;
+ Check_default.typeOf.number.greaterThanOrEquals(
+ "north",
+ north,
+ -Math_default.PI_OVER_TWO
+ );
+ Check_default.typeOf.number.lessThanOrEquals("north", north, Math_default.PI_OVER_TWO);
+ const south = rectangle.south;
+ Check_default.typeOf.number.greaterThanOrEquals(
+ "south",
+ south,
+ -Math_default.PI_OVER_TWO
+ );
+ Check_default.typeOf.number.lessThanOrEquals("south", south, Math_default.PI_OVER_TWO);
+ const west = rectangle.west;
+ Check_default.typeOf.number.greaterThanOrEquals("west", west, -Math.PI);
+ Check_default.typeOf.number.lessThanOrEquals("west", west, Math.PI);
+ const east = rectangle.east;
+ Check_default.typeOf.number.greaterThanOrEquals("east", east, -Math.PI);
+ Check_default.typeOf.number.lessThanOrEquals("east", east, Math.PI);
+};
+Rectangle.southwest = function(rectangle, result) {
+ Check_default.typeOf.object("rectangle", rectangle);
+ if (!defined_default(result)) {
+ return new Cartographic_default(rectangle.west, rectangle.south);
+ }
+ result.longitude = rectangle.west;
+ result.latitude = rectangle.south;
+ result.height = 0;
+ return result;
+};
+Rectangle.northwest = function(rectangle, result) {
+ Check_default.typeOf.object("rectangle", rectangle);
+ if (!defined_default(result)) {
+ return new Cartographic_default(rectangle.west, rectangle.north);
+ }
+ result.longitude = rectangle.west;
+ result.latitude = rectangle.north;
+ result.height = 0;
+ return result;
+};
+Rectangle.northeast = function(rectangle, result) {
+ Check_default.typeOf.object("rectangle", rectangle);
+ if (!defined_default(result)) {
+ return new Cartographic_default(rectangle.east, rectangle.north);
+ }
+ result.longitude = rectangle.east;
+ result.latitude = rectangle.north;
+ result.height = 0;
+ return result;
+};
+Rectangle.southeast = function(rectangle, result) {
+ Check_default.typeOf.object("rectangle", rectangle);
+ if (!defined_default(result)) {
+ return new Cartographic_default(rectangle.east, rectangle.south);
+ }
+ result.longitude = rectangle.east;
+ result.latitude = rectangle.south;
+ result.height = 0;
+ return result;
+};
+Rectangle.center = function(rectangle, result) {
+ Check_default.typeOf.object("rectangle", rectangle);
+ let east = rectangle.east;
+ const west = rectangle.west;
+ if (east < west) {
+ east += Math_default.TWO_PI;
+ }
+ const longitude = Math_default.negativePiToPi((west + east) * 0.5);
+ const latitude = (rectangle.south + rectangle.north) * 0.5;
+ if (!defined_default(result)) {
+ return new Cartographic_default(longitude, latitude);
+ }
+ result.longitude = longitude;
+ result.latitude = latitude;
+ result.height = 0;
+ return result;
+};
+Rectangle.intersection = function(rectangle, otherRectangle, result) {
+ Check_default.typeOf.object("rectangle", rectangle);
+ Check_default.typeOf.object("otherRectangle", otherRectangle);
+ let rectangleEast = rectangle.east;
+ let rectangleWest = rectangle.west;
+ let otherRectangleEast = otherRectangle.east;
+ let otherRectangleWest = otherRectangle.west;
+ if (rectangleEast < rectangleWest && otherRectangleEast > 0) {
+ rectangleEast += Math_default.TWO_PI;
+ } else if (otherRectangleEast < otherRectangleWest && rectangleEast > 0) {
+ otherRectangleEast += Math_default.TWO_PI;
+ }
+ if (rectangleEast < rectangleWest && otherRectangleWest < 0) {
+ otherRectangleWest += Math_default.TWO_PI;
+ } else if (otherRectangleEast < otherRectangleWest && rectangleWest < 0) {
+ rectangleWest += Math_default.TWO_PI;
+ }
+ const west = Math_default.negativePiToPi(
+ Math.max(rectangleWest, otherRectangleWest)
+ );
+ const east = Math_default.negativePiToPi(
+ Math.min(rectangleEast, otherRectangleEast)
+ );
+ if ((rectangle.west < rectangle.east || otherRectangle.west < otherRectangle.east) && east <= west) {
+ return void 0;
+ }
+ const south = Math.max(rectangle.south, otherRectangle.south);
+ const north = Math.min(rectangle.north, otherRectangle.north);
+ if (south >= north) {
+ return void 0;
+ }
+ if (!defined_default(result)) {
+ return new Rectangle(west, south, east, north);
+ }
+ result.west = west;
+ result.south = south;
+ result.east = east;
+ result.north = north;
+ return result;
+};
+Rectangle.simpleIntersection = function(rectangle, otherRectangle, result) {
+ Check_default.typeOf.object("rectangle", rectangle);
+ Check_default.typeOf.object("otherRectangle", otherRectangle);
+ const west = Math.max(rectangle.west, otherRectangle.west);
+ const south = Math.max(rectangle.south, otherRectangle.south);
+ const east = Math.min(rectangle.east, otherRectangle.east);
+ const north = Math.min(rectangle.north, otherRectangle.north);
+ if (south >= north || west >= east) {
+ return void 0;
+ }
+ if (!defined_default(result)) {
+ return new Rectangle(west, south, east, north);
+ }
+ result.west = west;
+ result.south = south;
+ result.east = east;
+ result.north = north;
+ return result;
+};
+Rectangle.union = function(rectangle, otherRectangle, result) {
+ Check_default.typeOf.object("rectangle", rectangle);
+ Check_default.typeOf.object("otherRectangle", otherRectangle);
+ if (!defined_default(result)) {
+ result = new Rectangle();
+ }
+ let rectangleEast = rectangle.east;
+ let rectangleWest = rectangle.west;
+ let otherRectangleEast = otherRectangle.east;
+ let otherRectangleWest = otherRectangle.west;
+ if (rectangleEast < rectangleWest && otherRectangleEast > 0) {
+ rectangleEast += Math_default.TWO_PI;
+ } else if (otherRectangleEast < otherRectangleWest && rectangleEast > 0) {
+ otherRectangleEast += Math_default.TWO_PI;
+ }
+ if (rectangleEast < rectangleWest && otherRectangleWest < 0) {
+ otherRectangleWest += Math_default.TWO_PI;
+ } else if (otherRectangleEast < otherRectangleWest && rectangleWest < 0) {
+ rectangleWest += Math_default.TWO_PI;
+ }
+ const west = Math_default.negativePiToPi(
+ Math.min(rectangleWest, otherRectangleWest)
+ );
+ const east = Math_default.negativePiToPi(
+ Math.max(rectangleEast, otherRectangleEast)
+ );
+ result.west = west;
+ result.south = Math.min(rectangle.south, otherRectangle.south);
+ result.east = east;
+ result.north = Math.max(rectangle.north, otherRectangle.north);
+ return result;
+};
+Rectangle.expand = function(rectangle, cartographic, result) {
+ Check_default.typeOf.object("rectangle", rectangle);
+ Check_default.typeOf.object("cartographic", cartographic);
+ if (!defined_default(result)) {
+ result = new Rectangle();
+ }
+ result.west = Math.min(rectangle.west, cartographic.longitude);
+ result.south = Math.min(rectangle.south, cartographic.latitude);
+ result.east = Math.max(rectangle.east, cartographic.longitude);
+ result.north = Math.max(rectangle.north, cartographic.latitude);
+ return result;
+};
+Rectangle.contains = function(rectangle, cartographic) {
+ Check_default.typeOf.object("rectangle", rectangle);
+ Check_default.typeOf.object("cartographic", cartographic);
+ let longitude = cartographic.longitude;
+ const latitude = cartographic.latitude;
+ const west = rectangle.west;
+ let east = rectangle.east;
+ if (east < west) {
+ east += Math_default.TWO_PI;
+ if (longitude < 0) {
+ longitude += Math_default.TWO_PI;
+ }
+ }
+ return (longitude > west || Math_default.equalsEpsilon(longitude, west, Math_default.EPSILON14)) && (longitude < east || Math_default.equalsEpsilon(longitude, east, Math_default.EPSILON14)) && latitude >= rectangle.south && latitude <= rectangle.north;
+};
+var subsampleLlaScratch = new Cartographic_default();
+Rectangle.subsample = function(rectangle, ellipsoid, surfaceHeight, result) {
+ Check_default.typeOf.object("rectangle", rectangle);
+ ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.default);
+ surfaceHeight = defaultValue_default(surfaceHeight, 0);
+ if (!defined_default(result)) {
+ result = [];
+ }
+ let length = 0;
+ const north = rectangle.north;
+ const south = rectangle.south;
+ const east = rectangle.east;
+ const west = rectangle.west;
+ const lla = subsampleLlaScratch;
+ lla.height = surfaceHeight;
+ lla.longitude = west;
+ lla.latitude = north;
+ result[length] = ellipsoid.cartographicToCartesian(lla, result[length]);
+ length++;
+ lla.longitude = east;
+ result[length] = ellipsoid.cartographicToCartesian(lla, result[length]);
+ length++;
+ lla.latitude = south;
+ result[length] = ellipsoid.cartographicToCartesian(lla, result[length]);
+ length++;
+ lla.longitude = west;
+ result[length] = ellipsoid.cartographicToCartesian(lla, result[length]);
+ length++;
+ if (north < 0) {
+ lla.latitude = north;
+ } else if (south > 0) {
+ lla.latitude = south;
+ } else {
+ lla.latitude = 0;
+ }
+ for (let i = 1; i < 8; ++i) {
+ lla.longitude = -Math.PI + i * Math_default.PI_OVER_TWO;
+ if (Rectangle.contains(rectangle, lla)) {
+ result[length] = ellipsoid.cartographicToCartesian(lla, result[length]);
+ length++;
+ }
+ }
+ if (lla.latitude === 0) {
+ lla.longitude = west;
+ result[length] = ellipsoid.cartographicToCartesian(lla, result[length]);
+ length++;
+ lla.longitude = east;
+ result[length] = ellipsoid.cartographicToCartesian(lla, result[length]);
+ length++;
+ }
+ result.length = length;
+ return result;
+};
+Rectangle.subsection = function(rectangle, westLerp, southLerp, eastLerp, northLerp, result) {
+ Check_default.typeOf.object("rectangle", rectangle);
+ Check_default.typeOf.number.greaterThanOrEquals("westLerp", westLerp, 0);
+ Check_default.typeOf.number.lessThanOrEquals("westLerp", westLerp, 1);
+ Check_default.typeOf.number.greaterThanOrEquals("southLerp", southLerp, 0);
+ Check_default.typeOf.number.lessThanOrEquals("southLerp", southLerp, 1);
+ Check_default.typeOf.number.greaterThanOrEquals("eastLerp", eastLerp, 0);
+ Check_default.typeOf.number.lessThanOrEquals("eastLerp", eastLerp, 1);
+ Check_default.typeOf.number.greaterThanOrEquals("northLerp", northLerp, 0);
+ Check_default.typeOf.number.lessThanOrEquals("northLerp", northLerp, 1);
+ Check_default.typeOf.number.lessThanOrEquals("westLerp", westLerp, eastLerp);
+ Check_default.typeOf.number.lessThanOrEquals("southLerp", southLerp, northLerp);
+ if (!defined_default(result)) {
+ result = new Rectangle();
+ }
+ if (rectangle.west <= rectangle.east) {
+ const width = rectangle.east - rectangle.west;
+ result.west = rectangle.west + westLerp * width;
+ result.east = rectangle.west + eastLerp * width;
+ } else {
+ const width = Math_default.TWO_PI + rectangle.east - rectangle.west;
+ result.west = Math_default.negativePiToPi(rectangle.west + westLerp * width);
+ result.east = Math_default.negativePiToPi(rectangle.west + eastLerp * width);
+ }
+ const height = rectangle.north - rectangle.south;
+ result.south = rectangle.south + southLerp * height;
+ result.north = rectangle.south + northLerp * height;
+ if (westLerp === 1) {
+ result.west = rectangle.east;
+ }
+ if (eastLerp === 1) {
+ result.east = rectangle.east;
+ }
+ if (southLerp === 1) {
+ result.south = rectangle.north;
+ }
+ if (northLerp === 1) {
+ result.north = rectangle.north;
+ }
+ return result;
+};
+Rectangle.MAX_VALUE = Object.freeze(
+ new Rectangle(
+ -Math.PI,
+ -Math_default.PI_OVER_TWO,
+ Math.PI,
+ Math_default.PI_OVER_TWO
+ )
+);
+var Rectangle_default = Rectangle;
+
+// packages/engine/Source/Core/Matrix2.js
+function Matrix2(column0Row0, column1Row0, column0Row1, column1Row1) {
+ this[0] = defaultValue_default(column0Row0, 0);
+ this[1] = defaultValue_default(column0Row1, 0);
+ this[2] = defaultValue_default(column1Row0, 0);
+ this[3] = defaultValue_default(column1Row1, 0);
+}
+Matrix2.packedLength = 4;
+Matrix2.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ array[startingIndex++] = value[0];
+ array[startingIndex++] = value[1];
+ array[startingIndex++] = value[2];
+ array[startingIndex++] = value[3];
+ return array;
+};
+Matrix2.unpack = function(array, startingIndex, result) {
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ if (!defined_default(result)) {
+ result = new Matrix2();
+ }
+ result[0] = array[startingIndex++];
+ result[1] = array[startingIndex++];
+ result[2] = array[startingIndex++];
+ result[3] = array[startingIndex++];
+ return result;
+};
+Matrix2.packArray = function(array, result) {
+ Check_default.defined("array", array);
+ const length = array.length;
+ const resultLength = length * 4;
+ if (!defined_default(result)) {
+ result = new Array(resultLength);
+ } else if (!Array.isArray(result) && result.length !== resultLength) {
+ throw new DeveloperError_default(
+ "If result is a typed array, it must have exactly array.length * 4 elements"
+ );
+ } else if (result.length !== resultLength) {
+ result.length = resultLength;
+ }
+ for (let i = 0; i < length; ++i) {
+ Matrix2.pack(array[i], result, i * 4);
+ }
+ return result;
+};
+Matrix2.unpackArray = function(array, result) {
+ Check_default.defined("array", array);
+ Check_default.typeOf.number.greaterThanOrEquals("array.length", array.length, 4);
+ if (array.length % 4 !== 0) {
+ throw new DeveloperError_default("array length must be a multiple of 4.");
+ }
+ const length = array.length;
+ if (!defined_default(result)) {
+ result = new Array(length / 4);
+ } else {
+ result.length = length / 4;
+ }
+ for (let i = 0; i < length; i += 4) {
+ const index = i / 4;
+ result[index] = Matrix2.unpack(array, i, result[index]);
+ }
+ return result;
+};
+Matrix2.clone = function(matrix, result) {
+ if (!defined_default(matrix)) {
+ return void 0;
+ }
+ if (!defined_default(result)) {
+ return new Matrix2(matrix[0], matrix[2], matrix[1], matrix[3]);
+ }
+ result[0] = matrix[0];
+ result[1] = matrix[1];
+ result[2] = matrix[2];
+ result[3] = matrix[3];
+ return result;
+};
+Matrix2.fromArray = Matrix2.unpack;
+Matrix2.fromColumnMajorArray = function(values, result) {
+ Check_default.defined("values", values);
+ return Matrix2.clone(values, result);
+};
+Matrix2.fromRowMajorArray = function(values, result) {
+ Check_default.defined("values", values);
+ if (!defined_default(result)) {
+ return new Matrix2(values[0], values[1], values[2], values[3]);
+ }
+ result[0] = values[0];
+ result[1] = values[2];
+ result[2] = values[1];
+ result[3] = values[3];
+ return result;
+};
+Matrix2.fromScale = function(scale, result) {
+ Check_default.typeOf.object("scale", scale);
+ if (!defined_default(result)) {
+ return new Matrix2(scale.x, 0, 0, scale.y);
+ }
+ result[0] = scale.x;
+ result[1] = 0;
+ result[2] = 0;
+ result[3] = scale.y;
+ return result;
+};
+Matrix2.fromUniformScale = function(scale, result) {
+ Check_default.typeOf.number("scale", scale);
+ if (!defined_default(result)) {
+ return new Matrix2(scale, 0, 0, scale);
+ }
+ result[0] = scale;
+ result[1] = 0;
+ result[2] = 0;
+ result[3] = scale;
+ return result;
+};
+Matrix2.fromRotation = function(angle, result) {
+ Check_default.typeOf.number("angle", angle);
+ const cosAngle = Math.cos(angle);
+ const sinAngle = Math.sin(angle);
+ if (!defined_default(result)) {
+ return new Matrix2(cosAngle, -sinAngle, sinAngle, cosAngle);
+ }
+ result[0] = cosAngle;
+ result[1] = sinAngle;
+ result[2] = -sinAngle;
+ result[3] = cosAngle;
+ return result;
+};
+Matrix2.toArray = function(matrix, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ if (!defined_default(result)) {
+ return [matrix[0], matrix[1], matrix[2], matrix[3]];
+ }
+ result[0] = matrix[0];
+ result[1] = matrix[1];
+ result[2] = matrix[2];
+ result[3] = matrix[3];
+ return result;
+};
+Matrix2.getElementIndex = function(column, row) {
+ Check_default.typeOf.number.greaterThanOrEquals("row", row, 0);
+ Check_default.typeOf.number.lessThanOrEquals("row", row, 1);
+ Check_default.typeOf.number.greaterThanOrEquals("column", column, 0);
+ Check_default.typeOf.number.lessThanOrEquals("column", column, 1);
+ return column * 2 + row;
+};
+Matrix2.getColumn = function(matrix, index, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.number.greaterThanOrEquals("index", index, 0);
+ Check_default.typeOf.number.lessThanOrEquals("index", index, 1);
+ Check_default.typeOf.object("result", result);
+ const startIndex = index * 2;
+ const x = matrix[startIndex];
+ const y = matrix[startIndex + 1];
+ result.x = x;
+ result.y = y;
+ return result;
+};
+Matrix2.setColumn = function(matrix, index, cartesian, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.number.greaterThanOrEquals("index", index, 0);
+ Check_default.typeOf.number.lessThanOrEquals("index", index, 1);
+ Check_default.typeOf.object("cartesian", cartesian);
+ Check_default.typeOf.object("result", result);
+ result = Matrix2.clone(matrix, result);
+ const startIndex = index * 2;
+ result[startIndex] = cartesian.x;
+ result[startIndex + 1] = cartesian.y;
+ return result;
+};
+Matrix2.getRow = function(matrix, index, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.number.greaterThanOrEquals("index", index, 0);
+ Check_default.typeOf.number.lessThanOrEquals("index", index, 1);
+ Check_default.typeOf.object("result", result);
+ const x = matrix[index];
+ const y = matrix[index + 2];
+ result.x = x;
+ result.y = y;
+ return result;
+};
+Matrix2.setRow = function(matrix, index, cartesian, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.number.greaterThanOrEquals("index", index, 0);
+ Check_default.typeOf.number.lessThanOrEquals("index", index, 1);
+ Check_default.typeOf.object("cartesian", cartesian);
+ Check_default.typeOf.object("result", result);
+ result = Matrix2.clone(matrix, result);
+ result[index] = cartesian.x;
+ result[index + 2] = cartesian.y;
+ return result;
+};
+var scaleScratch12 = new Cartesian2_default();
+Matrix2.setScale = function(matrix, scale, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.object("scale", scale);
+ Check_default.typeOf.object("result", result);
+ const existingScale = Matrix2.getScale(matrix, scaleScratch12);
+ const scaleRatioX = scale.x / existingScale.x;
+ const scaleRatioY = scale.y / existingScale.y;
+ result[0] = matrix[0] * scaleRatioX;
+ result[1] = matrix[1] * scaleRatioX;
+ result[2] = matrix[2] * scaleRatioY;
+ result[3] = matrix[3] * scaleRatioY;
+ return result;
+};
+var scaleScratch22 = new Cartesian2_default();
+Matrix2.setUniformScale = function(matrix, scale, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.number("scale", scale);
+ Check_default.typeOf.object("result", result);
+ const existingScale = Matrix2.getScale(matrix, scaleScratch22);
+ const scaleRatioX = scale / existingScale.x;
+ const scaleRatioY = scale / existingScale.y;
+ result[0] = matrix[0] * scaleRatioX;
+ result[1] = matrix[1] * scaleRatioX;
+ result[2] = matrix[2] * scaleRatioY;
+ result[3] = matrix[3] * scaleRatioY;
+ return result;
+};
+var scratchColumn2 = new Cartesian2_default();
+Matrix2.getScale = function(matrix, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.object("result", result);
+ result.x = Cartesian2_default.magnitude(
+ Cartesian2_default.fromElements(matrix[0], matrix[1], scratchColumn2)
+ );
+ result.y = Cartesian2_default.magnitude(
+ Cartesian2_default.fromElements(matrix[2], matrix[3], scratchColumn2)
+ );
+ return result;
+};
+var scaleScratch32 = new Cartesian2_default();
+Matrix2.getMaximumScale = function(matrix) {
+ Matrix2.getScale(matrix, scaleScratch32);
+ return Cartesian2_default.maximumComponent(scaleScratch32);
+};
+var scaleScratch42 = new Cartesian2_default();
+Matrix2.setRotation = function(matrix, rotation, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.object("result", result);
+ const scale = Matrix2.getScale(matrix, scaleScratch42);
+ result[0] = rotation[0] * scale.x;
+ result[1] = rotation[1] * scale.x;
+ result[2] = rotation[2] * scale.y;
+ result[3] = rotation[3] * scale.y;
+ return result;
+};
+var scaleScratch52 = new Cartesian2_default();
+Matrix2.getRotation = function(matrix, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.object("result", result);
+ const scale = Matrix2.getScale(matrix, scaleScratch52);
+ result[0] = matrix[0] / scale.x;
+ result[1] = matrix[1] / scale.x;
+ result[2] = matrix[2] / scale.y;
+ result[3] = matrix[3] / scale.y;
+ return result;
+};
+Matrix2.multiply = function(left, right, result) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Check_default.typeOf.object("result", result);
+ const column0Row0 = left[0] * right[0] + left[2] * right[1];
+ const column1Row0 = left[0] * right[2] + left[2] * right[3];
+ const column0Row1 = left[1] * right[0] + left[3] * right[1];
+ const column1Row1 = left[1] * right[2] + left[3] * right[3];
+ result[0] = column0Row0;
+ result[1] = column0Row1;
+ result[2] = column1Row0;
+ result[3] = column1Row1;
+ return result;
+};
+Matrix2.add = function(left, right, result) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Check_default.typeOf.object("result", result);
+ result[0] = left[0] + right[0];
+ result[1] = left[1] + right[1];
+ result[2] = left[2] + right[2];
+ result[3] = left[3] + right[3];
+ return result;
+};
+Matrix2.subtract = function(left, right, result) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Check_default.typeOf.object("result", result);
+ result[0] = left[0] - right[0];
+ result[1] = left[1] - right[1];
+ result[2] = left[2] - right[2];
+ result[3] = left[3] - right[3];
+ return result;
+};
+Matrix2.multiplyByVector = function(matrix, cartesian, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.object("cartesian", cartesian);
+ Check_default.typeOf.object("result", result);
+ const x = matrix[0] * cartesian.x + matrix[2] * cartesian.y;
+ const y = matrix[1] * cartesian.x + matrix[3] * cartesian.y;
+ result.x = x;
+ result.y = y;
+ return result;
+};
+Matrix2.multiplyByScalar = function(matrix, scalar, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.number("scalar", scalar);
+ Check_default.typeOf.object("result", result);
+ result[0] = matrix[0] * scalar;
+ result[1] = matrix[1] * scalar;
+ result[2] = matrix[2] * scalar;
+ result[3] = matrix[3] * scalar;
+ return result;
+};
+Matrix2.multiplyByScale = function(matrix, scale, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.object("scale", scale);
+ Check_default.typeOf.object("result", result);
+ result[0] = matrix[0] * scale.x;
+ result[1] = matrix[1] * scale.x;
+ result[2] = matrix[2] * scale.y;
+ result[3] = matrix[3] * scale.y;
+ return result;
+};
+Matrix2.multiplyByUniformScale = function(matrix, scale, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.number("scale", scale);
+ Check_default.typeOf.object("result", result);
+ result[0] = matrix[0] * scale;
+ result[1] = matrix[1] * scale;
+ result[2] = matrix[2] * scale;
+ result[3] = matrix[3] * scale;
+ return result;
+};
+Matrix2.negate = function(matrix, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.object("result", result);
+ result[0] = -matrix[0];
+ result[1] = -matrix[1];
+ result[2] = -matrix[2];
+ result[3] = -matrix[3];
+ return result;
+};
+Matrix2.transpose = function(matrix, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.object("result", result);
+ const column0Row0 = matrix[0];
+ const column0Row1 = matrix[2];
+ const column1Row0 = matrix[1];
+ const column1Row1 = matrix[3];
+ result[0] = column0Row0;
+ result[1] = column0Row1;
+ result[2] = column1Row0;
+ result[3] = column1Row1;
+ return result;
+};
+Matrix2.abs = function(matrix, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.object("result", result);
+ result[0] = Math.abs(matrix[0]);
+ result[1] = Math.abs(matrix[1]);
+ result[2] = Math.abs(matrix[2]);
+ result[3] = Math.abs(matrix[3]);
+ return result;
+};
+Matrix2.equals = function(left, right) {
+ return left === right || defined_default(left) && defined_default(right) && left[0] === right[0] && left[1] === right[1] && left[2] === right[2] && left[3] === right[3];
+};
+Matrix2.equalsArray = function(matrix, array, offset) {
+ return matrix[0] === array[offset] && matrix[1] === array[offset + 1] && matrix[2] === array[offset + 2] && matrix[3] === array[offset + 3];
+};
+Matrix2.equalsEpsilon = function(left, right, epsilon) {
+ epsilon = defaultValue_default(epsilon, 0);
+ return left === right || defined_default(left) && defined_default(right) && Math.abs(left[0] - right[0]) <= epsilon && Math.abs(left[1] - right[1]) <= epsilon && Math.abs(left[2] - right[2]) <= epsilon && Math.abs(left[3] - right[3]) <= epsilon;
+};
+Matrix2.IDENTITY = Object.freeze(new Matrix2(1, 0, 0, 1));
+Matrix2.ZERO = Object.freeze(new Matrix2(0, 0, 0, 0));
+Matrix2.COLUMN0ROW0 = 0;
+Matrix2.COLUMN0ROW1 = 1;
+Matrix2.COLUMN1ROW0 = 2;
+Matrix2.COLUMN1ROW1 = 3;
+Object.defineProperties(Matrix2.prototype, {
+ /**
+ * Gets the number of items in the collection.
+ * @memberof Matrix2.prototype
+ *
+ * @type {number}
+ */
+ length: {
+ get: function() {
+ return Matrix2.packedLength;
+ }
+ }
+});
+Matrix2.prototype.clone = function(result) {
+ return Matrix2.clone(this, result);
+};
+Matrix2.prototype.equals = function(right) {
+ return Matrix2.equals(this, right);
+};
+Matrix2.prototype.equalsEpsilon = function(right, epsilon) {
+ return Matrix2.equalsEpsilon(this, right, epsilon);
+};
+Matrix2.prototype.toString = function() {
+ return `(${this[0]}, ${this[2]})
+(${this[1]}, ${this[3]})`;
+};
+var Matrix2_default = Matrix2;
+
+export {
+ Cartesian4_default,
+ Matrix4_default,
+ combine_default,
+ Resource_default,
+ buildModuleUrl_default,
+ Quaternion_default,
+ Transforms_default,
+ Rectangle_default,
+ Matrix2_default
+};
diff --git a/public/assets/cesium/Workers/chunk-7YIOHQWH.js b/public/assets/cesium/Workers/chunk-7YIOHQWH.js
new file mode 100644
index 0000000000000000000000000000000000000000..8f8088431610127eabb38d6a202d772b3982111c
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-7YIOHQWH.js
@@ -0,0 +1,1477 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ VertexFormat_default
+} from "./chunk-JBSKHTNX.js";
+import {
+ Plane_default
+} from "./chunk-EDLRS3AW.js";
+import {
+ GeometryAttributes_default
+} from "./chunk-X7IQYYHF.js";
+import {
+ GeometryAttribute_default,
+ Geometry_default,
+ PrimitiveType_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ BoundingSphere_default,
+ Intersect_default
+} from "./chunk-KHZNBFOH.js";
+import {
+ Cartesian4_default,
+ Matrix4_default,
+ Quaternion_default
+} from "./chunk-6SQMLVGV.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian3_default,
+ Matrix3_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default,
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/CullingVolume.js
+function CullingVolume(planes) {
+ this.planes = defaultValue_default(planes, []);
+}
+var faces = [new Cartesian3_default(), new Cartesian3_default(), new Cartesian3_default()];
+Cartesian3_default.clone(Cartesian3_default.UNIT_X, faces[0]);
+Cartesian3_default.clone(Cartesian3_default.UNIT_Y, faces[1]);
+Cartesian3_default.clone(Cartesian3_default.UNIT_Z, faces[2]);
+var scratchPlaneCenter = new Cartesian3_default();
+var scratchPlaneNormal = new Cartesian3_default();
+var scratchPlane = new Plane_default(new Cartesian3_default(1, 0, 0), 0);
+CullingVolume.fromBoundingSphere = function(boundingSphere, result) {
+ if (!defined_default(boundingSphere)) {
+ throw new DeveloperError_default("boundingSphere is required.");
+ }
+ if (!defined_default(result)) {
+ result = new CullingVolume();
+ }
+ const length = faces.length;
+ const planes = result.planes;
+ planes.length = 2 * length;
+ const center = boundingSphere.center;
+ const radius = boundingSphere.radius;
+ let planeIndex = 0;
+ for (let i = 0; i < length; ++i) {
+ const faceNormal = faces[i];
+ let plane0 = planes[planeIndex];
+ let plane1 = planes[planeIndex + 1];
+ if (!defined_default(plane0)) {
+ plane0 = planes[planeIndex] = new Cartesian4_default();
+ }
+ if (!defined_default(plane1)) {
+ plane1 = planes[planeIndex + 1] = new Cartesian4_default();
+ }
+ Cartesian3_default.multiplyByScalar(faceNormal, -radius, scratchPlaneCenter);
+ Cartesian3_default.add(center, scratchPlaneCenter, scratchPlaneCenter);
+ plane0.x = faceNormal.x;
+ plane0.y = faceNormal.y;
+ plane0.z = faceNormal.z;
+ plane0.w = -Cartesian3_default.dot(faceNormal, scratchPlaneCenter);
+ Cartesian3_default.multiplyByScalar(faceNormal, radius, scratchPlaneCenter);
+ Cartesian3_default.add(center, scratchPlaneCenter, scratchPlaneCenter);
+ plane1.x = -faceNormal.x;
+ plane1.y = -faceNormal.y;
+ plane1.z = -faceNormal.z;
+ plane1.w = -Cartesian3_default.dot(
+ Cartesian3_default.negate(faceNormal, scratchPlaneNormal),
+ scratchPlaneCenter
+ );
+ planeIndex += 2;
+ }
+ return result;
+};
+CullingVolume.prototype.computeVisibility = function(boundingVolume) {
+ if (!defined_default(boundingVolume)) {
+ throw new DeveloperError_default("boundingVolume is required.");
+ }
+ const planes = this.planes;
+ let intersecting = false;
+ for (let k = 0, len = planes.length; k < len; ++k) {
+ const result = boundingVolume.intersectPlane(
+ Plane_default.fromCartesian4(planes[k], scratchPlane)
+ );
+ if (result === Intersect_default.OUTSIDE) {
+ return Intersect_default.OUTSIDE;
+ } else if (result === Intersect_default.INTERSECTING) {
+ intersecting = true;
+ }
+ }
+ return intersecting ? Intersect_default.INTERSECTING : Intersect_default.INSIDE;
+};
+CullingVolume.prototype.computeVisibilityWithPlaneMask = function(boundingVolume, parentPlaneMask) {
+ if (!defined_default(boundingVolume)) {
+ throw new DeveloperError_default("boundingVolume is required.");
+ }
+ if (!defined_default(parentPlaneMask)) {
+ throw new DeveloperError_default("parentPlaneMask is required.");
+ }
+ if (parentPlaneMask === CullingVolume.MASK_OUTSIDE || parentPlaneMask === CullingVolume.MASK_INSIDE) {
+ return parentPlaneMask;
+ }
+ let mask = CullingVolume.MASK_INSIDE;
+ const planes = this.planes;
+ for (let k = 0, len = planes.length; k < len; ++k) {
+ const flag = k < 31 ? 1 << k : 0;
+ if (k < 31 && (parentPlaneMask & flag) === 0) {
+ continue;
+ }
+ const result = boundingVolume.intersectPlane(
+ Plane_default.fromCartesian4(planes[k], scratchPlane)
+ );
+ if (result === Intersect_default.OUTSIDE) {
+ return CullingVolume.MASK_OUTSIDE;
+ } else if (result === Intersect_default.INTERSECTING) {
+ mask |= flag;
+ }
+ }
+ return mask;
+};
+CullingVolume.MASK_OUTSIDE = 4294967295;
+CullingVolume.MASK_INSIDE = 0;
+CullingVolume.MASK_INDETERMINATE = 2147483647;
+var CullingVolume_default = CullingVolume;
+
+// packages/engine/Source/Core/OrthographicOffCenterFrustum.js
+function OrthographicOffCenterFrustum(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ this.left = options.left;
+ this._left = void 0;
+ this.right = options.right;
+ this._right = void 0;
+ this.top = options.top;
+ this._top = void 0;
+ this.bottom = options.bottom;
+ this._bottom = void 0;
+ this.near = defaultValue_default(options.near, 1);
+ this._near = this.near;
+ this.far = defaultValue_default(options.far, 5e8);
+ this._far = this.far;
+ this._cullingVolume = new CullingVolume_default();
+ this._orthographicMatrix = new Matrix4_default();
+}
+function update(frustum) {
+ if (!defined_default(frustum.right) || !defined_default(frustum.left) || !defined_default(frustum.top) || !defined_default(frustum.bottom) || !defined_default(frustum.near) || !defined_default(frustum.far)) {
+ throw new DeveloperError_default(
+ "right, left, top, bottom, near, or far parameters are not set."
+ );
+ }
+ if (frustum.top !== frustum._top || frustum.bottom !== frustum._bottom || frustum.left !== frustum._left || frustum.right !== frustum._right || frustum.near !== frustum._near || frustum.far !== frustum._far) {
+ if (frustum.left > frustum.right) {
+ throw new DeveloperError_default("right must be greater than left.");
+ }
+ if (frustum.bottom > frustum.top) {
+ throw new DeveloperError_default("top must be greater than bottom.");
+ }
+ if (frustum.near <= 0 || frustum.near > frustum.far) {
+ throw new DeveloperError_default(
+ "near must be greater than zero and less than far."
+ );
+ }
+ frustum._left = frustum.left;
+ frustum._right = frustum.right;
+ frustum._top = frustum.top;
+ frustum._bottom = frustum.bottom;
+ frustum._near = frustum.near;
+ frustum._far = frustum.far;
+ frustum._orthographicMatrix = Matrix4_default.computeOrthographicOffCenter(
+ frustum.left,
+ frustum.right,
+ frustum.bottom,
+ frustum.top,
+ frustum.near,
+ frustum.far,
+ frustum._orthographicMatrix
+ );
+ }
+}
+Object.defineProperties(OrthographicOffCenterFrustum.prototype, {
+ /**
+ * Gets the orthographic projection matrix computed from the view frustum.
+ * @memberof OrthographicOffCenterFrustum.prototype
+ * @type {Matrix4}
+ * @readonly
+ */
+ projectionMatrix: {
+ get: function() {
+ update(this);
+ return this._orthographicMatrix;
+ }
+ }
+});
+var getPlanesRight = new Cartesian3_default();
+var getPlanesNearCenter = new Cartesian3_default();
+var getPlanesPoint = new Cartesian3_default();
+var negateScratch = new Cartesian3_default();
+OrthographicOffCenterFrustum.prototype.computeCullingVolume = function(position, direction, up) {
+ if (!defined_default(position)) {
+ throw new DeveloperError_default("position is required.");
+ }
+ if (!defined_default(direction)) {
+ throw new DeveloperError_default("direction is required.");
+ }
+ if (!defined_default(up)) {
+ throw new DeveloperError_default("up is required.");
+ }
+ const planes = this._cullingVolume.planes;
+ const t = this.top;
+ const b = this.bottom;
+ const r = this.right;
+ const l = this.left;
+ const n = this.near;
+ const f = this.far;
+ const right = Cartesian3_default.cross(direction, up, getPlanesRight);
+ Cartesian3_default.normalize(right, right);
+ const nearCenter = getPlanesNearCenter;
+ Cartesian3_default.multiplyByScalar(direction, n, nearCenter);
+ Cartesian3_default.add(position, nearCenter, nearCenter);
+ const point = getPlanesPoint;
+ Cartesian3_default.multiplyByScalar(right, l, point);
+ Cartesian3_default.add(nearCenter, point, point);
+ let plane = planes[0];
+ if (!defined_default(plane)) {
+ plane = planes[0] = new Cartesian4_default();
+ }
+ plane.x = right.x;
+ plane.y = right.y;
+ plane.z = right.z;
+ plane.w = -Cartesian3_default.dot(right, point);
+ Cartesian3_default.multiplyByScalar(right, r, point);
+ Cartesian3_default.add(nearCenter, point, point);
+ plane = planes[1];
+ if (!defined_default(plane)) {
+ plane = planes[1] = new Cartesian4_default();
+ }
+ plane.x = -right.x;
+ plane.y = -right.y;
+ plane.z = -right.z;
+ plane.w = -Cartesian3_default.dot(Cartesian3_default.negate(right, negateScratch), point);
+ Cartesian3_default.multiplyByScalar(up, b, point);
+ Cartesian3_default.add(nearCenter, point, point);
+ plane = planes[2];
+ if (!defined_default(plane)) {
+ plane = planes[2] = new Cartesian4_default();
+ }
+ plane.x = up.x;
+ plane.y = up.y;
+ plane.z = up.z;
+ plane.w = -Cartesian3_default.dot(up, point);
+ Cartesian3_default.multiplyByScalar(up, t, point);
+ Cartesian3_default.add(nearCenter, point, point);
+ plane = planes[3];
+ if (!defined_default(plane)) {
+ plane = planes[3] = new Cartesian4_default();
+ }
+ plane.x = -up.x;
+ plane.y = -up.y;
+ plane.z = -up.z;
+ plane.w = -Cartesian3_default.dot(Cartesian3_default.negate(up, negateScratch), point);
+ plane = planes[4];
+ if (!defined_default(plane)) {
+ plane = planes[4] = new Cartesian4_default();
+ }
+ plane.x = direction.x;
+ plane.y = direction.y;
+ plane.z = direction.z;
+ plane.w = -Cartesian3_default.dot(direction, nearCenter);
+ Cartesian3_default.multiplyByScalar(direction, f, point);
+ Cartesian3_default.add(position, point, point);
+ plane = planes[5];
+ if (!defined_default(plane)) {
+ plane = planes[5] = new Cartesian4_default();
+ }
+ plane.x = -direction.x;
+ plane.y = -direction.y;
+ plane.z = -direction.z;
+ plane.w = -Cartesian3_default.dot(Cartesian3_default.negate(direction, negateScratch), point);
+ return this._cullingVolume;
+};
+OrthographicOffCenterFrustum.prototype.getPixelDimensions = function(drawingBufferWidth, drawingBufferHeight, distance, pixelRatio, result) {
+ update(this);
+ if (!defined_default(drawingBufferWidth) || !defined_default(drawingBufferHeight)) {
+ throw new DeveloperError_default(
+ "Both drawingBufferWidth and drawingBufferHeight are required."
+ );
+ }
+ if (drawingBufferWidth <= 0) {
+ throw new DeveloperError_default("drawingBufferWidth must be greater than zero.");
+ }
+ if (drawingBufferHeight <= 0) {
+ throw new DeveloperError_default("drawingBufferHeight must be greater than zero.");
+ }
+ if (!defined_default(distance)) {
+ throw new DeveloperError_default("distance is required.");
+ }
+ if (!defined_default(pixelRatio)) {
+ throw new DeveloperError_default("pixelRatio is required.");
+ }
+ if (pixelRatio <= 0) {
+ throw new DeveloperError_default("pixelRatio must be greater than zero.");
+ }
+ if (!defined_default(result)) {
+ throw new DeveloperError_default("A result object is required.");
+ }
+ const frustumWidth = this.right - this.left;
+ const frustumHeight = this.top - this.bottom;
+ const pixelWidth = pixelRatio * frustumWidth / drawingBufferWidth;
+ const pixelHeight = pixelRatio * frustumHeight / drawingBufferHeight;
+ result.x = pixelWidth;
+ result.y = pixelHeight;
+ return result;
+};
+OrthographicOffCenterFrustum.prototype.clone = function(result) {
+ if (!defined_default(result)) {
+ result = new OrthographicOffCenterFrustum();
+ }
+ result.left = this.left;
+ result.right = this.right;
+ result.top = this.top;
+ result.bottom = this.bottom;
+ result.near = this.near;
+ result.far = this.far;
+ result._left = void 0;
+ result._right = void 0;
+ result._top = void 0;
+ result._bottom = void 0;
+ result._near = void 0;
+ result._far = void 0;
+ return result;
+};
+OrthographicOffCenterFrustum.prototype.equals = function(other) {
+ return defined_default(other) && other instanceof OrthographicOffCenterFrustum && this.right === other.right && this.left === other.left && this.top === other.top && this.bottom === other.bottom && this.near === other.near && this.far === other.far;
+};
+OrthographicOffCenterFrustum.prototype.equalsEpsilon = function(other, relativeEpsilon, absoluteEpsilon) {
+ return other === this || defined_default(other) && other instanceof OrthographicOffCenterFrustum && Math_default.equalsEpsilon(
+ this.right,
+ other.right,
+ relativeEpsilon,
+ absoluteEpsilon
+ ) && Math_default.equalsEpsilon(
+ this.left,
+ other.left,
+ relativeEpsilon,
+ absoluteEpsilon
+ ) && Math_default.equalsEpsilon(
+ this.top,
+ other.top,
+ relativeEpsilon,
+ absoluteEpsilon
+ ) && Math_default.equalsEpsilon(
+ this.bottom,
+ other.bottom,
+ relativeEpsilon,
+ absoluteEpsilon
+ ) && Math_default.equalsEpsilon(
+ this.near,
+ other.near,
+ relativeEpsilon,
+ absoluteEpsilon
+ ) && Math_default.equalsEpsilon(
+ this.far,
+ other.far,
+ relativeEpsilon,
+ absoluteEpsilon
+ );
+};
+var OrthographicOffCenterFrustum_default = OrthographicOffCenterFrustum;
+
+// packages/engine/Source/Core/OrthographicFrustum.js
+function OrthographicFrustum(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ this._offCenterFrustum = new OrthographicOffCenterFrustum_default();
+ this.width = options.width;
+ this._width = void 0;
+ this.aspectRatio = options.aspectRatio;
+ this._aspectRatio = void 0;
+ this.near = defaultValue_default(options.near, 1);
+ this._near = this.near;
+ this.far = defaultValue_default(options.far, 5e8);
+ this._far = this.far;
+}
+OrthographicFrustum.packedLength = 4;
+OrthographicFrustum.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ array[startingIndex++] = value.width;
+ array[startingIndex++] = value.aspectRatio;
+ array[startingIndex++] = value.near;
+ array[startingIndex] = value.far;
+ return array;
+};
+OrthographicFrustum.unpack = function(array, startingIndex, result) {
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ if (!defined_default(result)) {
+ result = new OrthographicFrustum();
+ }
+ result.width = array[startingIndex++];
+ result.aspectRatio = array[startingIndex++];
+ result.near = array[startingIndex++];
+ result.far = array[startingIndex];
+ return result;
+};
+function update2(frustum) {
+ if (!defined_default(frustum.width) || !defined_default(frustum.aspectRatio) || !defined_default(frustum.near) || !defined_default(frustum.far)) {
+ throw new DeveloperError_default(
+ "width, aspectRatio, near, or far parameters are not set."
+ );
+ }
+ const f = frustum._offCenterFrustum;
+ if (frustum.width !== frustum._width || frustum.aspectRatio !== frustum._aspectRatio || frustum.near !== frustum._near || frustum.far !== frustum._far) {
+ if (frustum.aspectRatio < 0) {
+ throw new DeveloperError_default("aspectRatio must be positive.");
+ }
+ if (frustum.near < 0 || frustum.near > frustum.far) {
+ throw new DeveloperError_default(
+ "near must be greater than zero and less than far."
+ );
+ }
+ frustum._aspectRatio = frustum.aspectRatio;
+ frustum._width = frustum.width;
+ frustum._near = frustum.near;
+ frustum._far = frustum.far;
+ const ratio = 1 / frustum.aspectRatio;
+ f.right = frustum.width * 0.5;
+ f.left = -f.right;
+ f.top = ratio * f.right;
+ f.bottom = -f.top;
+ f.near = frustum.near;
+ f.far = frustum.far;
+ }
+}
+Object.defineProperties(OrthographicFrustum.prototype, {
+ /**
+ * Gets the orthographic projection matrix computed from the view frustum.
+ * @memberof OrthographicFrustum.prototype
+ * @type {Matrix4}
+ * @readonly
+ */
+ projectionMatrix: {
+ get: function() {
+ update2(this);
+ return this._offCenterFrustum.projectionMatrix;
+ }
+ },
+ /**
+ * Gets the orthographic projection matrix computed from the view frustum.
+ * @memberof OrthographicFrustum.prototype
+ * @type {OrthographicOffCenterFrustum}
+ * @readonly
+ * @private
+ */
+ offCenterFrustum: {
+ get: function() {
+ update2(this);
+ return this._offCenterFrustum;
+ }
+ }
+});
+OrthographicFrustum.prototype.computeCullingVolume = function(position, direction, up) {
+ update2(this);
+ return this._offCenterFrustum.computeCullingVolume(position, direction, up);
+};
+OrthographicFrustum.prototype.getPixelDimensions = function(drawingBufferWidth, drawingBufferHeight, distance, pixelRatio, result) {
+ update2(this);
+ return this._offCenterFrustum.getPixelDimensions(
+ drawingBufferWidth,
+ drawingBufferHeight,
+ distance,
+ pixelRatio,
+ result
+ );
+};
+OrthographicFrustum.prototype.clone = function(result) {
+ if (!defined_default(result)) {
+ result = new OrthographicFrustum();
+ }
+ result.aspectRatio = this.aspectRatio;
+ result.width = this.width;
+ result.near = this.near;
+ result.far = this.far;
+ result._aspectRatio = void 0;
+ result._width = void 0;
+ result._near = void 0;
+ result._far = void 0;
+ this._offCenterFrustum.clone(result._offCenterFrustum);
+ return result;
+};
+OrthographicFrustum.prototype.equals = function(other) {
+ if (!defined_default(other) || !(other instanceof OrthographicFrustum)) {
+ return false;
+ }
+ update2(this);
+ update2(other);
+ return this.width === other.width && this.aspectRatio === other.aspectRatio && this._offCenterFrustum.equals(other._offCenterFrustum);
+};
+OrthographicFrustum.prototype.equalsEpsilon = function(other, relativeEpsilon, absoluteEpsilon) {
+ if (!defined_default(other) || !(other instanceof OrthographicFrustum)) {
+ return false;
+ }
+ update2(this);
+ update2(other);
+ return Math_default.equalsEpsilon(
+ this.width,
+ other.width,
+ relativeEpsilon,
+ absoluteEpsilon
+ ) && Math_default.equalsEpsilon(
+ this.aspectRatio,
+ other.aspectRatio,
+ relativeEpsilon,
+ absoluteEpsilon
+ ) && this._offCenterFrustum.equalsEpsilon(
+ other._offCenterFrustum,
+ relativeEpsilon,
+ absoluteEpsilon
+ );
+};
+var OrthographicFrustum_default = OrthographicFrustum;
+
+// packages/engine/Source/Core/PerspectiveOffCenterFrustum.js
+function PerspectiveOffCenterFrustum(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ this.left = options.left;
+ this._left = void 0;
+ this.right = options.right;
+ this._right = void 0;
+ this.top = options.top;
+ this._top = void 0;
+ this.bottom = options.bottom;
+ this._bottom = void 0;
+ this.near = defaultValue_default(options.near, 1);
+ this._near = this.near;
+ this.far = defaultValue_default(options.far, 5e8);
+ this._far = this.far;
+ this._cullingVolume = new CullingVolume_default();
+ this._perspectiveMatrix = new Matrix4_default();
+ this._infinitePerspective = new Matrix4_default();
+}
+function update3(frustum) {
+ if (!defined_default(frustum.right) || !defined_default(frustum.left) || !defined_default(frustum.top) || !defined_default(frustum.bottom) || !defined_default(frustum.near) || !defined_default(frustum.far)) {
+ throw new DeveloperError_default(
+ "right, left, top, bottom, near, or far parameters are not set."
+ );
+ }
+ const t = frustum.top;
+ const b = frustum.bottom;
+ const r = frustum.right;
+ const l = frustum.left;
+ const n = frustum.near;
+ const f = frustum.far;
+ if (t !== frustum._top || b !== frustum._bottom || l !== frustum._left || r !== frustum._right || n !== frustum._near || f !== frustum._far) {
+ if (frustum.near <= 0 || frustum.near > frustum.far) {
+ throw new DeveloperError_default(
+ "near must be greater than zero and less than far."
+ );
+ }
+ frustum._left = l;
+ frustum._right = r;
+ frustum._top = t;
+ frustum._bottom = b;
+ frustum._near = n;
+ frustum._far = f;
+ frustum._perspectiveMatrix = Matrix4_default.computePerspectiveOffCenter(
+ l,
+ r,
+ b,
+ t,
+ n,
+ f,
+ frustum._perspectiveMatrix
+ );
+ frustum._infinitePerspective = Matrix4_default.computeInfinitePerspectiveOffCenter(
+ l,
+ r,
+ b,
+ t,
+ n,
+ frustum._infinitePerspective
+ );
+ }
+}
+Object.defineProperties(PerspectiveOffCenterFrustum.prototype, {
+ /**
+ * Gets the perspective projection matrix computed from the view frustum.
+ * @memberof PerspectiveOffCenterFrustum.prototype
+ * @type {Matrix4}
+ * @readonly
+ *
+ * @see PerspectiveOffCenterFrustum#infiniteProjectionMatrix
+ */
+ projectionMatrix: {
+ get: function() {
+ update3(this);
+ return this._perspectiveMatrix;
+ }
+ },
+ /**
+ * Gets the perspective projection matrix computed from the view frustum with an infinite far plane.
+ * @memberof PerspectiveOffCenterFrustum.prototype
+ * @type {Matrix4}
+ * @readonly
+ *
+ * @see PerspectiveOffCenterFrustum#projectionMatrix
+ */
+ infiniteProjectionMatrix: {
+ get: function() {
+ update3(this);
+ return this._infinitePerspective;
+ }
+ }
+});
+var getPlanesRight2 = new Cartesian3_default();
+var getPlanesNearCenter2 = new Cartesian3_default();
+var getPlanesFarCenter = new Cartesian3_default();
+var getPlanesNormal = new Cartesian3_default();
+PerspectiveOffCenterFrustum.prototype.computeCullingVolume = function(position, direction, up) {
+ if (!defined_default(position)) {
+ throw new DeveloperError_default("position is required.");
+ }
+ if (!defined_default(direction)) {
+ throw new DeveloperError_default("direction is required.");
+ }
+ if (!defined_default(up)) {
+ throw new DeveloperError_default("up is required.");
+ }
+ const planes = this._cullingVolume.planes;
+ const t = this.top;
+ const b = this.bottom;
+ const r = this.right;
+ const l = this.left;
+ const n = this.near;
+ const f = this.far;
+ const right = Cartesian3_default.cross(direction, up, getPlanesRight2);
+ const nearCenter = getPlanesNearCenter2;
+ Cartesian3_default.multiplyByScalar(direction, n, nearCenter);
+ Cartesian3_default.add(position, nearCenter, nearCenter);
+ const farCenter = getPlanesFarCenter;
+ Cartesian3_default.multiplyByScalar(direction, f, farCenter);
+ Cartesian3_default.add(position, farCenter, farCenter);
+ const normal = getPlanesNormal;
+ Cartesian3_default.multiplyByScalar(right, l, normal);
+ Cartesian3_default.add(nearCenter, normal, normal);
+ Cartesian3_default.subtract(normal, position, normal);
+ Cartesian3_default.normalize(normal, normal);
+ Cartesian3_default.cross(normal, up, normal);
+ Cartesian3_default.normalize(normal, normal);
+ let plane = planes[0];
+ if (!defined_default(plane)) {
+ plane = planes[0] = new Cartesian4_default();
+ }
+ plane.x = normal.x;
+ plane.y = normal.y;
+ plane.z = normal.z;
+ plane.w = -Cartesian3_default.dot(normal, position);
+ Cartesian3_default.multiplyByScalar(right, r, normal);
+ Cartesian3_default.add(nearCenter, normal, normal);
+ Cartesian3_default.subtract(normal, position, normal);
+ Cartesian3_default.cross(up, normal, normal);
+ Cartesian3_default.normalize(normal, normal);
+ plane = planes[1];
+ if (!defined_default(plane)) {
+ plane = planes[1] = new Cartesian4_default();
+ }
+ plane.x = normal.x;
+ plane.y = normal.y;
+ plane.z = normal.z;
+ plane.w = -Cartesian3_default.dot(normal, position);
+ Cartesian3_default.multiplyByScalar(up, b, normal);
+ Cartesian3_default.add(nearCenter, normal, normal);
+ Cartesian3_default.subtract(normal, position, normal);
+ Cartesian3_default.cross(right, normal, normal);
+ Cartesian3_default.normalize(normal, normal);
+ plane = planes[2];
+ if (!defined_default(plane)) {
+ plane = planes[2] = new Cartesian4_default();
+ }
+ plane.x = normal.x;
+ plane.y = normal.y;
+ plane.z = normal.z;
+ plane.w = -Cartesian3_default.dot(normal, position);
+ Cartesian3_default.multiplyByScalar(up, t, normal);
+ Cartesian3_default.add(nearCenter, normal, normal);
+ Cartesian3_default.subtract(normal, position, normal);
+ Cartesian3_default.cross(normal, right, normal);
+ Cartesian3_default.normalize(normal, normal);
+ plane = planes[3];
+ if (!defined_default(plane)) {
+ plane = planes[3] = new Cartesian4_default();
+ }
+ plane.x = normal.x;
+ plane.y = normal.y;
+ plane.z = normal.z;
+ plane.w = -Cartesian3_default.dot(normal, position);
+ plane = planes[4];
+ if (!defined_default(plane)) {
+ plane = planes[4] = new Cartesian4_default();
+ }
+ plane.x = direction.x;
+ plane.y = direction.y;
+ plane.z = direction.z;
+ plane.w = -Cartesian3_default.dot(direction, nearCenter);
+ Cartesian3_default.negate(direction, normal);
+ plane = planes[5];
+ if (!defined_default(plane)) {
+ plane = planes[5] = new Cartesian4_default();
+ }
+ plane.x = normal.x;
+ plane.y = normal.y;
+ plane.z = normal.z;
+ plane.w = -Cartesian3_default.dot(normal, farCenter);
+ return this._cullingVolume;
+};
+PerspectiveOffCenterFrustum.prototype.getPixelDimensions = function(drawingBufferWidth, drawingBufferHeight, distance, pixelRatio, result) {
+ update3(this);
+ if (!defined_default(drawingBufferWidth) || !defined_default(drawingBufferHeight)) {
+ throw new DeveloperError_default(
+ "Both drawingBufferWidth and drawingBufferHeight are required."
+ );
+ }
+ if (drawingBufferWidth <= 0) {
+ throw new DeveloperError_default("drawingBufferWidth must be greater than zero.");
+ }
+ if (drawingBufferHeight <= 0) {
+ throw new DeveloperError_default("drawingBufferHeight must be greater than zero.");
+ }
+ if (!defined_default(distance)) {
+ throw new DeveloperError_default("distance is required.");
+ }
+ if (!defined_default(pixelRatio)) {
+ throw new DeveloperError_default("pixelRatio is required");
+ }
+ if (pixelRatio <= 0) {
+ throw new DeveloperError_default("pixelRatio must be greater than zero.");
+ }
+ if (!defined_default(result)) {
+ throw new DeveloperError_default("A result object is required.");
+ }
+ const inverseNear = 1 / this.near;
+ let tanTheta = this.top * inverseNear;
+ const pixelHeight = 2 * pixelRatio * distance * tanTheta / drawingBufferHeight;
+ tanTheta = this.right * inverseNear;
+ const pixelWidth = 2 * pixelRatio * distance * tanTheta / drawingBufferWidth;
+ result.x = pixelWidth;
+ result.y = pixelHeight;
+ return result;
+};
+PerspectiveOffCenterFrustum.prototype.clone = function(result) {
+ if (!defined_default(result)) {
+ result = new PerspectiveOffCenterFrustum();
+ }
+ result.right = this.right;
+ result.left = this.left;
+ result.top = this.top;
+ result.bottom = this.bottom;
+ result.near = this.near;
+ result.far = this.far;
+ result._left = void 0;
+ result._right = void 0;
+ result._top = void 0;
+ result._bottom = void 0;
+ result._near = void 0;
+ result._far = void 0;
+ return result;
+};
+PerspectiveOffCenterFrustum.prototype.equals = function(other) {
+ return defined_default(other) && other instanceof PerspectiveOffCenterFrustum && this.right === other.right && this.left === other.left && this.top === other.top && this.bottom === other.bottom && this.near === other.near && this.far === other.far;
+};
+PerspectiveOffCenterFrustum.prototype.equalsEpsilon = function(other, relativeEpsilon, absoluteEpsilon) {
+ return other === this || defined_default(other) && other instanceof PerspectiveOffCenterFrustum && Math_default.equalsEpsilon(
+ this.right,
+ other.right,
+ relativeEpsilon,
+ absoluteEpsilon
+ ) && Math_default.equalsEpsilon(
+ this.left,
+ other.left,
+ relativeEpsilon,
+ absoluteEpsilon
+ ) && Math_default.equalsEpsilon(
+ this.top,
+ other.top,
+ relativeEpsilon,
+ absoluteEpsilon
+ ) && Math_default.equalsEpsilon(
+ this.bottom,
+ other.bottom,
+ relativeEpsilon,
+ absoluteEpsilon
+ ) && Math_default.equalsEpsilon(
+ this.near,
+ other.near,
+ relativeEpsilon,
+ absoluteEpsilon
+ ) && Math_default.equalsEpsilon(
+ this.far,
+ other.far,
+ relativeEpsilon,
+ absoluteEpsilon
+ );
+};
+var PerspectiveOffCenterFrustum_default = PerspectiveOffCenterFrustum;
+
+// packages/engine/Source/Core/PerspectiveFrustum.js
+function PerspectiveFrustum(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ this._offCenterFrustum = new PerspectiveOffCenterFrustum_default();
+ this.fov = options.fov;
+ this._fov = void 0;
+ this._fovy = void 0;
+ this._sseDenominator = void 0;
+ this.aspectRatio = options.aspectRatio;
+ this._aspectRatio = void 0;
+ this.near = defaultValue_default(options.near, 1);
+ this._near = this.near;
+ this.far = defaultValue_default(options.far, 5e8);
+ this._far = this.far;
+ this.xOffset = defaultValue_default(options.xOffset, 0);
+ this._xOffset = this.xOffset;
+ this.yOffset = defaultValue_default(options.yOffset, 0);
+ this._yOffset = this.yOffset;
+}
+PerspectiveFrustum.packedLength = 6;
+PerspectiveFrustum.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ array[startingIndex++] = value.fov;
+ array[startingIndex++] = value.aspectRatio;
+ array[startingIndex++] = value.near;
+ array[startingIndex++] = value.far;
+ array[startingIndex++] = value.xOffset;
+ array[startingIndex] = value.yOffset;
+ return array;
+};
+PerspectiveFrustum.unpack = function(array, startingIndex, result) {
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ if (!defined_default(result)) {
+ result = new PerspectiveFrustum();
+ }
+ result.fov = array[startingIndex++];
+ result.aspectRatio = array[startingIndex++];
+ result.near = array[startingIndex++];
+ result.far = array[startingIndex++];
+ result.xOffset = array[startingIndex++];
+ result.yOffset = array[startingIndex];
+ return result;
+};
+function update4(frustum) {
+ if (!defined_default(frustum.fov) || !defined_default(frustum.aspectRatio) || !defined_default(frustum.near) || !defined_default(frustum.far)) {
+ throw new DeveloperError_default(
+ "fov, aspectRatio, near, or far parameters are not set."
+ );
+ }
+ const f = frustum._offCenterFrustum;
+ if (frustum.fov !== frustum._fov || frustum.aspectRatio !== frustum._aspectRatio || frustum.near !== frustum._near || frustum.far !== frustum._far || frustum.xOffset !== frustum._xOffset || frustum.yOffset !== frustum._yOffset) {
+ if (frustum.fov < 0 || frustum.fov >= Math.PI) {
+ throw new DeveloperError_default("fov must be in the range [0, PI).");
+ }
+ if (frustum.aspectRatio < 0) {
+ throw new DeveloperError_default("aspectRatio must be positive.");
+ }
+ if (frustum.near < 0 || frustum.near > frustum.far) {
+ throw new DeveloperError_default(
+ "near must be greater than zero and less than far."
+ );
+ }
+ frustum._aspectRatio = frustum.aspectRatio;
+ frustum._fov = frustum.fov;
+ frustum._fovy = frustum.aspectRatio <= 1 ? frustum.fov : Math.atan(Math.tan(frustum.fov * 0.5) / frustum.aspectRatio) * 2;
+ frustum._near = frustum.near;
+ frustum._far = frustum.far;
+ frustum._sseDenominator = 2 * Math.tan(0.5 * frustum._fovy);
+ frustum._xOffset = frustum.xOffset;
+ frustum._yOffset = frustum.yOffset;
+ f.top = frustum.near * Math.tan(0.5 * frustum._fovy);
+ f.bottom = -f.top;
+ f.right = frustum.aspectRatio * f.top;
+ f.left = -f.right;
+ f.near = frustum.near;
+ f.far = frustum.far;
+ f.right += frustum.xOffset;
+ f.left += frustum.xOffset;
+ f.top += frustum.yOffset;
+ f.bottom += frustum.yOffset;
+ }
+}
+Object.defineProperties(PerspectiveFrustum.prototype, {
+ /**
+ * Gets the perspective projection matrix computed from the view frustum.
+ * @memberof PerspectiveFrustum.prototype
+ * @type {Matrix4}
+ * @readonly
+ *
+ * @see PerspectiveFrustum#infiniteProjectionMatrix
+ */
+ projectionMatrix: {
+ get: function() {
+ update4(this);
+ return this._offCenterFrustum.projectionMatrix;
+ }
+ },
+ /**
+ * The perspective projection matrix computed from the view frustum with an infinite far plane.
+ * @memberof PerspectiveFrustum.prototype
+ * @type {Matrix4}
+ * @readonly
+ *
+ * @see PerspectiveFrustum#projectionMatrix
+ */
+ infiniteProjectionMatrix: {
+ get: function() {
+ update4(this);
+ return this._offCenterFrustum.infiniteProjectionMatrix;
+ }
+ },
+ /**
+ * Gets the angle of the vertical field of view, in radians.
+ * @memberof PerspectiveFrustum.prototype
+ * @type {number}
+ * @readonly
+ * @default undefined
+ */
+ fovy: {
+ get: function() {
+ update4(this);
+ return this._fovy;
+ }
+ },
+ /**
+ * @readonly
+ * @private
+ */
+ sseDenominator: {
+ get: function() {
+ update4(this);
+ return this._sseDenominator;
+ }
+ },
+ /**
+ * Gets the orthographic projection matrix computed from the view frustum.
+ * @memberof PerspectiveFrustum.prototype
+ * @type {PerspectiveOffCenterFrustum}
+ * @readonly
+ * @private
+ */
+ offCenterFrustum: {
+ get: function() {
+ update4(this);
+ return this._offCenterFrustum;
+ }
+ }
+});
+PerspectiveFrustum.prototype.computeCullingVolume = function(position, direction, up) {
+ update4(this);
+ return this._offCenterFrustum.computeCullingVolume(position, direction, up);
+};
+PerspectiveFrustum.prototype.getPixelDimensions = function(drawingBufferWidth, drawingBufferHeight, distance, pixelRatio, result) {
+ update4(this);
+ return this._offCenterFrustum.getPixelDimensions(
+ drawingBufferWidth,
+ drawingBufferHeight,
+ distance,
+ pixelRatio,
+ result
+ );
+};
+PerspectiveFrustum.prototype.clone = function(result) {
+ if (!defined_default(result)) {
+ result = new PerspectiveFrustum();
+ }
+ result.aspectRatio = this.aspectRatio;
+ result.fov = this.fov;
+ result.near = this.near;
+ result.far = this.far;
+ result._aspectRatio = void 0;
+ result._fov = void 0;
+ result._near = void 0;
+ result._far = void 0;
+ this._offCenterFrustum.clone(result._offCenterFrustum);
+ return result;
+};
+PerspectiveFrustum.prototype.equals = function(other) {
+ if (!defined_default(other) || !(other instanceof PerspectiveFrustum)) {
+ return false;
+ }
+ update4(this);
+ update4(other);
+ return this.fov === other.fov && this.aspectRatio === other.aspectRatio && this._offCenterFrustum.equals(other._offCenterFrustum);
+};
+PerspectiveFrustum.prototype.equalsEpsilon = function(other, relativeEpsilon, absoluteEpsilon) {
+ if (!defined_default(other) || !(other instanceof PerspectiveFrustum)) {
+ return false;
+ }
+ update4(this);
+ update4(other);
+ return Math_default.equalsEpsilon(
+ this.fov,
+ other.fov,
+ relativeEpsilon,
+ absoluteEpsilon
+ ) && Math_default.equalsEpsilon(
+ this.aspectRatio,
+ other.aspectRatio,
+ relativeEpsilon,
+ absoluteEpsilon
+ ) && this._offCenterFrustum.equalsEpsilon(
+ other._offCenterFrustum,
+ relativeEpsilon,
+ absoluteEpsilon
+ );
+};
+var PerspectiveFrustum_default = PerspectiveFrustum;
+
+// packages/engine/Source/Core/FrustumGeometry.js
+var PERSPECTIVE = 0;
+var ORTHOGRAPHIC = 1;
+function FrustumGeometry(options) {
+ Check_default.typeOf.object("options", options);
+ Check_default.typeOf.object("options.frustum", options.frustum);
+ Check_default.typeOf.object("options.origin", options.origin);
+ Check_default.typeOf.object("options.orientation", options.orientation);
+ const frustum = options.frustum;
+ const orientation = options.orientation;
+ const origin = options.origin;
+ const vertexFormat = defaultValue_default(options.vertexFormat, VertexFormat_default.DEFAULT);
+ const drawNearPlane = defaultValue_default(options._drawNearPlane, true);
+ let frustumType;
+ let frustumPackedLength;
+ if (frustum instanceof PerspectiveFrustum_default) {
+ frustumType = PERSPECTIVE;
+ frustumPackedLength = PerspectiveFrustum_default.packedLength;
+ } else if (frustum instanceof OrthographicFrustum_default) {
+ frustumType = ORTHOGRAPHIC;
+ frustumPackedLength = OrthographicFrustum_default.packedLength;
+ }
+ this._frustumType = frustumType;
+ this._frustum = frustum.clone();
+ this._origin = Cartesian3_default.clone(origin);
+ this._orientation = Quaternion_default.clone(orientation);
+ this._drawNearPlane = drawNearPlane;
+ this._vertexFormat = vertexFormat;
+ this._workerName = "createFrustumGeometry";
+ this.packedLength = 2 + frustumPackedLength + Cartesian3_default.packedLength + Quaternion_default.packedLength + VertexFormat_default.packedLength;
+}
+FrustumGeometry.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ const frustumType = value._frustumType;
+ const frustum = value._frustum;
+ array[startingIndex++] = frustumType;
+ if (frustumType === PERSPECTIVE) {
+ PerspectiveFrustum_default.pack(frustum, array, startingIndex);
+ startingIndex += PerspectiveFrustum_default.packedLength;
+ } else {
+ OrthographicFrustum_default.pack(frustum, array, startingIndex);
+ startingIndex += OrthographicFrustum_default.packedLength;
+ }
+ Cartesian3_default.pack(value._origin, array, startingIndex);
+ startingIndex += Cartesian3_default.packedLength;
+ Quaternion_default.pack(value._orientation, array, startingIndex);
+ startingIndex += Quaternion_default.packedLength;
+ VertexFormat_default.pack(value._vertexFormat, array, startingIndex);
+ startingIndex += VertexFormat_default.packedLength;
+ array[startingIndex] = value._drawNearPlane ? 1 : 0;
+ return array;
+};
+var scratchPackPerspective = new PerspectiveFrustum_default();
+var scratchPackOrthographic = new OrthographicFrustum_default();
+var scratchPackQuaternion = new Quaternion_default();
+var scratchPackorigin = new Cartesian3_default();
+var scratchVertexFormat = new VertexFormat_default();
+FrustumGeometry.unpack = function(array, startingIndex, result) {
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ const frustumType = array[startingIndex++];
+ let frustum;
+ if (frustumType === PERSPECTIVE) {
+ frustum = PerspectiveFrustum_default.unpack(
+ array,
+ startingIndex,
+ scratchPackPerspective
+ );
+ startingIndex += PerspectiveFrustum_default.packedLength;
+ } else {
+ frustum = OrthographicFrustum_default.unpack(
+ array,
+ startingIndex,
+ scratchPackOrthographic
+ );
+ startingIndex += OrthographicFrustum_default.packedLength;
+ }
+ const origin = Cartesian3_default.unpack(array, startingIndex, scratchPackorigin);
+ startingIndex += Cartesian3_default.packedLength;
+ const orientation = Quaternion_default.unpack(
+ array,
+ startingIndex,
+ scratchPackQuaternion
+ );
+ startingIndex += Quaternion_default.packedLength;
+ const vertexFormat = VertexFormat_default.unpack(
+ array,
+ startingIndex,
+ scratchVertexFormat
+ );
+ startingIndex += VertexFormat_default.packedLength;
+ const drawNearPlane = array[startingIndex] === 1;
+ if (!defined_default(result)) {
+ return new FrustumGeometry({
+ frustum,
+ origin,
+ orientation,
+ vertexFormat,
+ _drawNearPlane: drawNearPlane
+ });
+ }
+ const frustumResult = frustumType === result._frustumType ? result._frustum : void 0;
+ result._frustum = frustum.clone(frustumResult);
+ result._frustumType = frustumType;
+ result._origin = Cartesian3_default.clone(origin, result._origin);
+ result._orientation = Quaternion_default.clone(orientation, result._orientation);
+ result._vertexFormat = VertexFormat_default.clone(vertexFormat, result._vertexFormat);
+ result._drawNearPlane = drawNearPlane;
+ return result;
+};
+function getAttributes(offset, normals, tangents, bitangents, st, normal, tangent, bitangent) {
+ const stOffset = offset / 3 * 2;
+ for (let i = 0; i < 4; ++i) {
+ if (defined_default(normals)) {
+ normals[offset] = normal.x;
+ normals[offset + 1] = normal.y;
+ normals[offset + 2] = normal.z;
+ }
+ if (defined_default(tangents)) {
+ tangents[offset] = tangent.x;
+ tangents[offset + 1] = tangent.y;
+ tangents[offset + 2] = tangent.z;
+ }
+ if (defined_default(bitangents)) {
+ bitangents[offset] = bitangent.x;
+ bitangents[offset + 1] = bitangent.y;
+ bitangents[offset + 2] = bitangent.z;
+ }
+ offset += 3;
+ }
+ st[stOffset] = 0;
+ st[stOffset + 1] = 0;
+ st[stOffset + 2] = 1;
+ st[stOffset + 3] = 0;
+ st[stOffset + 4] = 1;
+ st[stOffset + 5] = 1;
+ st[stOffset + 6] = 0;
+ st[stOffset + 7] = 1;
+}
+var scratchRotationMatrix = new Matrix3_default();
+var scratchViewMatrix = new Matrix4_default();
+var scratchInverseMatrix = new Matrix4_default();
+var scratchXDirection = new Cartesian3_default();
+var scratchYDirection = new Cartesian3_default();
+var scratchZDirection = new Cartesian3_default();
+var scratchNegativeX = new Cartesian3_default();
+var scratchNegativeY = new Cartesian3_default();
+var scratchNegativeZ = new Cartesian3_default();
+var frustumSplits = new Array(3);
+var frustumCornersNDC = new Array(4);
+frustumCornersNDC[0] = new Cartesian4_default(-1, -1, 1, 1);
+frustumCornersNDC[1] = new Cartesian4_default(1, -1, 1, 1);
+frustumCornersNDC[2] = new Cartesian4_default(1, 1, 1, 1);
+frustumCornersNDC[3] = new Cartesian4_default(-1, 1, 1, 1);
+var scratchFrustumCorners = new Array(4);
+for (let i = 0; i < 4; ++i) {
+ scratchFrustumCorners[i] = new Cartesian4_default();
+}
+FrustumGeometry._computeNearFarPlanes = function(origin, orientation, frustumType, frustum, positions, xDirection, yDirection, zDirection) {
+ const rotationMatrix = Matrix3_default.fromQuaternion(
+ orientation,
+ scratchRotationMatrix
+ );
+ let x = defaultValue_default(xDirection, scratchXDirection);
+ let y = defaultValue_default(yDirection, scratchYDirection);
+ let z = defaultValue_default(zDirection, scratchZDirection);
+ x = Matrix3_default.getColumn(rotationMatrix, 0, x);
+ y = Matrix3_default.getColumn(rotationMatrix, 1, y);
+ z = Matrix3_default.getColumn(rotationMatrix, 2, z);
+ Cartesian3_default.normalize(x, x);
+ Cartesian3_default.normalize(y, y);
+ Cartesian3_default.normalize(z, z);
+ Cartesian3_default.negate(x, x);
+ const view = Matrix4_default.computeView(origin, z, y, x, scratchViewMatrix);
+ let inverseView;
+ let inverseViewProjection;
+ const projection = frustum.projectionMatrix;
+ if (frustumType === PERSPECTIVE) {
+ const viewProjection = Matrix4_default.multiply(
+ projection,
+ view,
+ scratchInverseMatrix
+ );
+ inverseViewProjection = Matrix4_default.inverse(
+ viewProjection,
+ scratchInverseMatrix
+ );
+ } else {
+ inverseView = Matrix4_default.inverseTransformation(view, scratchInverseMatrix);
+ }
+ if (defined_default(inverseViewProjection)) {
+ frustumSplits[0] = frustum.near;
+ frustumSplits[1] = frustum.far;
+ } else {
+ frustumSplits[0] = 0;
+ frustumSplits[1] = frustum.near;
+ frustumSplits[2] = frustum.far;
+ }
+ for (let i = 0; i < 2; ++i) {
+ for (let j = 0; j < 4; ++j) {
+ let corner = Cartesian4_default.clone(
+ frustumCornersNDC[j],
+ scratchFrustumCorners[j]
+ );
+ if (!defined_default(inverseViewProjection)) {
+ const offCenterFrustum = frustum.offCenterFrustum;
+ if (defined_default(offCenterFrustum)) {
+ frustum = offCenterFrustum;
+ }
+ const near = frustumSplits[i];
+ const far = frustumSplits[i + 1];
+ corner.x = (corner.x * (frustum.right - frustum.left) + frustum.left + frustum.right) * 0.5;
+ corner.y = (corner.y * (frustum.top - frustum.bottom) + frustum.bottom + frustum.top) * 0.5;
+ corner.z = (corner.z * (near - far) - near - far) * 0.5;
+ corner.w = 1;
+ Matrix4_default.multiplyByVector(inverseView, corner, corner);
+ } else {
+ corner = Matrix4_default.multiplyByVector(
+ inverseViewProjection,
+ corner,
+ corner
+ );
+ const w = 1 / corner.w;
+ Cartesian3_default.multiplyByScalar(corner, w, corner);
+ Cartesian3_default.subtract(corner, origin, corner);
+ Cartesian3_default.normalize(corner, corner);
+ const fac = Cartesian3_default.dot(z, corner);
+ Cartesian3_default.multiplyByScalar(corner, frustumSplits[i] / fac, corner);
+ Cartesian3_default.add(corner, origin, corner);
+ }
+ positions[12 * i + j * 3] = corner.x;
+ positions[12 * i + j * 3 + 1] = corner.y;
+ positions[12 * i + j * 3 + 2] = corner.z;
+ }
+ }
+};
+FrustumGeometry.createGeometry = function(frustumGeometry) {
+ const frustumType = frustumGeometry._frustumType;
+ const frustum = frustumGeometry._frustum;
+ const origin = frustumGeometry._origin;
+ const orientation = frustumGeometry._orientation;
+ const drawNearPlane = frustumGeometry._drawNearPlane;
+ const vertexFormat = frustumGeometry._vertexFormat;
+ const numberOfPlanes = drawNearPlane ? 6 : 5;
+ let positions = new Float64Array(3 * 4 * 6);
+ FrustumGeometry._computeNearFarPlanes(
+ origin,
+ orientation,
+ frustumType,
+ frustum,
+ positions
+ );
+ let offset = 3 * 4 * 2;
+ positions[offset] = positions[3 * 4];
+ positions[offset + 1] = positions[3 * 4 + 1];
+ positions[offset + 2] = positions[3 * 4 + 2];
+ positions[offset + 3] = positions[0];
+ positions[offset + 4] = positions[1];
+ positions[offset + 5] = positions[2];
+ positions[offset + 6] = positions[3 * 3];
+ positions[offset + 7] = positions[3 * 3 + 1];
+ positions[offset + 8] = positions[3 * 3 + 2];
+ positions[offset + 9] = positions[3 * 7];
+ positions[offset + 10] = positions[3 * 7 + 1];
+ positions[offset + 11] = positions[3 * 7 + 2];
+ offset += 3 * 4;
+ positions[offset] = positions[3 * 5];
+ positions[offset + 1] = positions[3 * 5 + 1];
+ positions[offset + 2] = positions[3 * 5 + 2];
+ positions[offset + 3] = positions[3];
+ positions[offset + 4] = positions[3 + 1];
+ positions[offset + 5] = positions[3 + 2];
+ positions[offset + 6] = positions[0];
+ positions[offset + 7] = positions[1];
+ positions[offset + 8] = positions[2];
+ positions[offset + 9] = positions[3 * 4];
+ positions[offset + 10] = positions[3 * 4 + 1];
+ positions[offset + 11] = positions[3 * 4 + 2];
+ offset += 3 * 4;
+ positions[offset] = positions[3];
+ positions[offset + 1] = positions[3 + 1];
+ positions[offset + 2] = positions[3 + 2];
+ positions[offset + 3] = positions[3 * 5];
+ positions[offset + 4] = positions[3 * 5 + 1];
+ positions[offset + 5] = positions[3 * 5 + 2];
+ positions[offset + 6] = positions[3 * 6];
+ positions[offset + 7] = positions[3 * 6 + 1];
+ positions[offset + 8] = positions[3 * 6 + 2];
+ positions[offset + 9] = positions[3 * 2];
+ positions[offset + 10] = positions[3 * 2 + 1];
+ positions[offset + 11] = positions[3 * 2 + 2];
+ offset += 3 * 4;
+ positions[offset] = positions[3 * 2];
+ positions[offset + 1] = positions[3 * 2 + 1];
+ positions[offset + 2] = positions[3 * 2 + 2];
+ positions[offset + 3] = positions[3 * 6];
+ positions[offset + 4] = positions[3 * 6 + 1];
+ positions[offset + 5] = positions[3 * 6 + 2];
+ positions[offset + 6] = positions[3 * 7];
+ positions[offset + 7] = positions[3 * 7 + 1];
+ positions[offset + 8] = positions[3 * 7 + 2];
+ positions[offset + 9] = positions[3 * 3];
+ positions[offset + 10] = positions[3 * 3 + 1];
+ positions[offset + 11] = positions[3 * 3 + 2];
+ if (!drawNearPlane) {
+ positions = positions.subarray(3 * 4);
+ }
+ const attributes = new GeometryAttributes_default({
+ position: new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: positions
+ })
+ });
+ if (defined_default(vertexFormat.normal) || defined_default(vertexFormat.tangent) || defined_default(vertexFormat.bitangent) || defined_default(vertexFormat.st)) {
+ const normals = defined_default(vertexFormat.normal) ? new Float32Array(3 * 4 * numberOfPlanes) : void 0;
+ const tangents = defined_default(vertexFormat.tangent) ? new Float32Array(3 * 4 * numberOfPlanes) : void 0;
+ const bitangents = defined_default(vertexFormat.bitangent) ? new Float32Array(3 * 4 * numberOfPlanes) : void 0;
+ const st = defined_default(vertexFormat.st) ? new Float32Array(2 * 4 * numberOfPlanes) : void 0;
+ const x = scratchXDirection;
+ const y = scratchYDirection;
+ const z = scratchZDirection;
+ const negativeX = Cartesian3_default.negate(x, scratchNegativeX);
+ const negativeY = Cartesian3_default.negate(y, scratchNegativeY);
+ const negativeZ = Cartesian3_default.negate(z, scratchNegativeZ);
+ offset = 0;
+ if (drawNearPlane) {
+ getAttributes(offset, normals, tangents, bitangents, st, negativeZ, x, y);
+ offset += 3 * 4;
+ }
+ getAttributes(offset, normals, tangents, bitangents, st, z, negativeX, y);
+ offset += 3 * 4;
+ getAttributes(
+ offset,
+ normals,
+ tangents,
+ bitangents,
+ st,
+ negativeX,
+ negativeZ,
+ y
+ );
+ offset += 3 * 4;
+ getAttributes(
+ offset,
+ normals,
+ tangents,
+ bitangents,
+ st,
+ negativeY,
+ negativeZ,
+ negativeX
+ );
+ offset += 3 * 4;
+ getAttributes(offset, normals, tangents, bitangents, st, x, z, y);
+ offset += 3 * 4;
+ getAttributes(offset, normals, tangents, bitangents, st, y, z, negativeX);
+ if (defined_default(normals)) {
+ attributes.normal = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: normals
+ });
+ }
+ if (defined_default(tangents)) {
+ attributes.tangent = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: tangents
+ });
+ }
+ if (defined_default(bitangents)) {
+ attributes.bitangent = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: bitangents
+ });
+ }
+ if (defined_default(st)) {
+ attributes.st = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 2,
+ values: st
+ });
+ }
+ }
+ const indices = new Uint16Array(6 * numberOfPlanes);
+ for (let i = 0; i < numberOfPlanes; ++i) {
+ const indexOffset = i * 6;
+ const index = i * 4;
+ indices[indexOffset] = index;
+ indices[indexOffset + 1] = index + 1;
+ indices[indexOffset + 2] = index + 2;
+ indices[indexOffset + 3] = index;
+ indices[indexOffset + 4] = index + 2;
+ indices[indexOffset + 5] = index + 3;
+ }
+ return new Geometry_default({
+ attributes,
+ indices,
+ primitiveType: PrimitiveType_default.TRIANGLES,
+ boundingSphere: BoundingSphere_default.fromVertices(positions)
+ });
+};
+var FrustumGeometry_default = FrustumGeometry;
+
+export {
+ OrthographicFrustum_default,
+ PerspectiveFrustum_default,
+ FrustumGeometry_default
+};
diff --git a/public/assets/cesium/Workers/chunk-7ZZ5LMZY.js b/public/assets/cesium/Workers/chunk-7ZZ5LMZY.js
new file mode 100644
index 0000000000000000000000000000000000000000..48b0c75c67660677279dff360d35ecab107fe470
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-7ZZ5LMZY.js
@@ -0,0 +1,2717 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ AttributeCompression_default
+} from "./chunk-LJ2JQHJT.js";
+import {
+ EncodedCartesian3_default
+} from "./chunk-NGZJIN5Z.js";
+import {
+ IntersectionTests_default
+} from "./chunk-QQOZO7KO.js";
+import {
+ Plane_default
+} from "./chunk-EDLRS3AW.js";
+import {
+ IndexDatatype_default
+} from "./chunk-C4WPMOKT.js";
+import {
+ GeometryAttribute_default,
+ GeometryType_default,
+ Geometry_default,
+ PrimitiveType_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ BoundingSphere_default,
+ GeographicProjection_default,
+ Intersect_default
+} from "./chunk-KHZNBFOH.js";
+import {
+ Cartesian4_default,
+ Matrix4_default
+} from "./chunk-6SQMLVGV.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian2_default,
+ Cartesian3_default,
+ Cartographic_default,
+ Matrix3_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default,
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/barycentricCoordinates.js
+var scratchCartesian1 = new Cartesian3_default();
+var scratchCartesian2 = new Cartesian3_default();
+var scratchCartesian3 = new Cartesian3_default();
+function barycentricCoordinates(point, p0, p1, p2, result) {
+ Check_default.defined("point", point);
+ Check_default.defined("p0", p0);
+ Check_default.defined("p1", p1);
+ Check_default.defined("p2", p2);
+ if (!defined_default(result)) {
+ result = new Cartesian3_default();
+ }
+ let v02;
+ let v12;
+ let v22;
+ let dot00;
+ let dot01;
+ let dot02;
+ let dot11;
+ let dot12;
+ if (!defined_default(p0.z)) {
+ if (Cartesian2_default.equalsEpsilon(point, p0, Math_default.EPSILON14)) {
+ return Cartesian3_default.clone(Cartesian3_default.UNIT_X, result);
+ }
+ if (Cartesian2_default.equalsEpsilon(point, p1, Math_default.EPSILON14)) {
+ return Cartesian3_default.clone(Cartesian3_default.UNIT_Y, result);
+ }
+ if (Cartesian2_default.equalsEpsilon(point, p2, Math_default.EPSILON14)) {
+ return Cartesian3_default.clone(Cartesian3_default.UNIT_Z, result);
+ }
+ v02 = Cartesian2_default.subtract(p1, p0, scratchCartesian1);
+ v12 = Cartesian2_default.subtract(p2, p0, scratchCartesian2);
+ v22 = Cartesian2_default.subtract(point, p0, scratchCartesian3);
+ dot00 = Cartesian2_default.dot(v02, v02);
+ dot01 = Cartesian2_default.dot(v02, v12);
+ dot02 = Cartesian2_default.dot(v02, v22);
+ dot11 = Cartesian2_default.dot(v12, v12);
+ dot12 = Cartesian2_default.dot(v12, v22);
+ } else {
+ if (Cartesian3_default.equalsEpsilon(point, p0, Math_default.EPSILON14)) {
+ return Cartesian3_default.clone(Cartesian3_default.UNIT_X, result);
+ }
+ if (Cartesian3_default.equalsEpsilon(point, p1, Math_default.EPSILON14)) {
+ return Cartesian3_default.clone(Cartesian3_default.UNIT_Y, result);
+ }
+ if (Cartesian3_default.equalsEpsilon(point, p2, Math_default.EPSILON14)) {
+ return Cartesian3_default.clone(Cartesian3_default.UNIT_Z, result);
+ }
+ v02 = Cartesian3_default.subtract(p1, p0, scratchCartesian1);
+ v12 = Cartesian3_default.subtract(p2, p0, scratchCartesian2);
+ v22 = Cartesian3_default.subtract(point, p0, scratchCartesian3);
+ dot00 = Cartesian3_default.dot(v02, v02);
+ dot01 = Cartesian3_default.dot(v02, v12);
+ dot02 = Cartesian3_default.dot(v02, v22);
+ dot11 = Cartesian3_default.dot(v12, v12);
+ dot12 = Cartesian3_default.dot(v12, v22);
+ }
+ result.y = dot11 * dot02 - dot01 * dot12;
+ result.z = dot00 * dot12 - dot01 * dot02;
+ const q = dot00 * dot11 - dot01 * dot01;
+ if (q === 0) {
+ return void 0;
+ }
+ result.y /= q;
+ result.z /= q;
+ result.x = 1 - result.y - result.z;
+ return result;
+}
+var barycentricCoordinates_default = barycentricCoordinates;
+
+// packages/engine/Source/Core/Tipsify.js
+var Tipsify = {};
+Tipsify.calculateACMR = function(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const indices = options.indices;
+ let maximumIndex = options.maximumIndex;
+ const cacheSize = defaultValue_default(options.cacheSize, 24);
+ if (!defined_default(indices)) {
+ throw new DeveloperError_default("indices is required.");
+ }
+ const numIndices = indices.length;
+ if (numIndices < 3 || numIndices % 3 !== 0) {
+ throw new DeveloperError_default("indices length must be a multiple of three.");
+ }
+ if (maximumIndex <= 0) {
+ throw new DeveloperError_default("maximumIndex must be greater than zero.");
+ }
+ if (cacheSize < 3) {
+ throw new DeveloperError_default("cacheSize must be greater than two.");
+ }
+ if (!defined_default(maximumIndex)) {
+ maximumIndex = 0;
+ let currentIndex = 0;
+ let intoIndices = indices[currentIndex];
+ while (currentIndex < numIndices) {
+ if (intoIndices > maximumIndex) {
+ maximumIndex = intoIndices;
+ }
+ ++currentIndex;
+ intoIndices = indices[currentIndex];
+ }
+ }
+ const vertexTimeStamps = [];
+ for (let i = 0; i < maximumIndex + 1; i++) {
+ vertexTimeStamps[i] = 0;
+ }
+ let s = cacheSize + 1;
+ for (let j = 0; j < numIndices; ++j) {
+ if (s - vertexTimeStamps[indices[j]] > cacheSize) {
+ vertexTimeStamps[indices[j]] = s;
+ ++s;
+ }
+ }
+ return (s - cacheSize + 1) / (numIndices / 3);
+};
+Tipsify.tipsify = function(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const indices = options.indices;
+ const maximumIndex = options.maximumIndex;
+ const cacheSize = defaultValue_default(options.cacheSize, 24);
+ let cursor;
+ function skipDeadEnd(vertices2, deadEnd2, indices2, maximumIndexPlusOne2) {
+ while (deadEnd2.length >= 1) {
+ const d = deadEnd2[deadEnd2.length - 1];
+ deadEnd2.splice(deadEnd2.length - 1, 1);
+ if (vertices2[d].numLiveTriangles > 0) {
+ return d;
+ }
+ }
+ while (cursor < maximumIndexPlusOne2) {
+ if (vertices2[cursor].numLiveTriangles > 0) {
+ ++cursor;
+ return cursor - 1;
+ }
+ ++cursor;
+ }
+ return -1;
+ }
+ function getNextVertex(indices2, cacheSize2, oneRing2, vertices2, s2, deadEnd2, maximumIndexPlusOne2) {
+ let n = -1;
+ let p;
+ let m = -1;
+ let itOneRing = 0;
+ while (itOneRing < oneRing2.length) {
+ const index2 = oneRing2[itOneRing];
+ if (vertices2[index2].numLiveTriangles) {
+ p = 0;
+ if (s2 - vertices2[index2].timeStamp + 2 * vertices2[index2].numLiveTriangles <= cacheSize2) {
+ p = s2 - vertices2[index2].timeStamp;
+ }
+ if (p > m || m === -1) {
+ m = p;
+ n = index2;
+ }
+ }
+ ++itOneRing;
+ }
+ if (n === -1) {
+ return skipDeadEnd(vertices2, deadEnd2, indices2, maximumIndexPlusOne2);
+ }
+ return n;
+ }
+ if (!defined_default(indices)) {
+ throw new DeveloperError_default("indices is required.");
+ }
+ const numIndices = indices.length;
+ if (numIndices < 3 || numIndices % 3 !== 0) {
+ throw new DeveloperError_default("indices length must be a multiple of three.");
+ }
+ if (maximumIndex <= 0) {
+ throw new DeveloperError_default("maximumIndex must be greater than zero.");
+ }
+ if (cacheSize < 3) {
+ throw new DeveloperError_default("cacheSize must be greater than two.");
+ }
+ let maximumIndexPlusOne = 0;
+ let currentIndex = 0;
+ let intoIndices = indices[currentIndex];
+ const endIndex = numIndices;
+ if (defined_default(maximumIndex)) {
+ maximumIndexPlusOne = maximumIndex + 1;
+ } else {
+ while (currentIndex < endIndex) {
+ if (intoIndices > maximumIndexPlusOne) {
+ maximumIndexPlusOne = intoIndices;
+ }
+ ++currentIndex;
+ intoIndices = indices[currentIndex];
+ }
+ if (maximumIndexPlusOne === -1) {
+ return 0;
+ }
+ ++maximumIndexPlusOne;
+ }
+ const vertices = [];
+ let i;
+ for (i = 0; i < maximumIndexPlusOne; i++) {
+ vertices[i] = {
+ numLiveTriangles: 0,
+ timeStamp: 0,
+ vertexTriangles: []
+ };
+ }
+ currentIndex = 0;
+ let triangle = 0;
+ while (currentIndex < endIndex) {
+ vertices[indices[currentIndex]].vertexTriangles.push(triangle);
+ ++vertices[indices[currentIndex]].numLiveTriangles;
+ vertices[indices[currentIndex + 1]].vertexTriangles.push(triangle);
+ ++vertices[indices[currentIndex + 1]].numLiveTriangles;
+ vertices[indices[currentIndex + 2]].vertexTriangles.push(triangle);
+ ++vertices[indices[currentIndex + 2]].numLiveTriangles;
+ ++triangle;
+ currentIndex += 3;
+ }
+ let f = 0;
+ let s = cacheSize + 1;
+ cursor = 1;
+ let oneRing = [];
+ const deadEnd = [];
+ let vertex;
+ let intoVertices;
+ let currentOutputIndex = 0;
+ const outputIndices = [];
+ const numTriangles = numIndices / 3;
+ const triangleEmitted = [];
+ for (i = 0; i < numTriangles; i++) {
+ triangleEmitted[i] = false;
+ }
+ let index;
+ let limit;
+ while (f !== -1) {
+ oneRing = [];
+ intoVertices = vertices[f];
+ limit = intoVertices.vertexTriangles.length;
+ for (let k = 0; k < limit; ++k) {
+ triangle = intoVertices.vertexTriangles[k];
+ if (!triangleEmitted[triangle]) {
+ triangleEmitted[triangle] = true;
+ currentIndex = triangle + triangle + triangle;
+ for (let j = 0; j < 3; ++j) {
+ index = indices[currentIndex];
+ oneRing.push(index);
+ deadEnd.push(index);
+ outputIndices[currentOutputIndex] = index;
+ ++currentOutputIndex;
+ vertex = vertices[index];
+ --vertex.numLiveTriangles;
+ if (s - vertex.timeStamp > cacheSize) {
+ vertex.timeStamp = s;
+ ++s;
+ }
+ ++currentIndex;
+ }
+ }
+ }
+ f = getNextVertex(
+ indices,
+ cacheSize,
+ oneRing,
+ vertices,
+ s,
+ deadEnd,
+ maximumIndexPlusOne
+ );
+ }
+ return outputIndices;
+};
+var Tipsify_default = Tipsify;
+
+// packages/engine/Source/Core/GeometryPipeline.js
+var GeometryPipeline = {};
+function addTriangle(lines, index, i0, i1, i2) {
+ lines[index++] = i0;
+ lines[index++] = i1;
+ lines[index++] = i1;
+ lines[index++] = i2;
+ lines[index++] = i2;
+ lines[index] = i0;
+}
+function trianglesToLines(triangles) {
+ const count = triangles.length;
+ const size = count / 3 * 6;
+ const lines = IndexDatatype_default.createTypedArray(count, size);
+ let index = 0;
+ for (let i = 0; i < count; i += 3, index += 6) {
+ addTriangle(lines, index, triangles[i], triangles[i + 1], triangles[i + 2]);
+ }
+ return lines;
+}
+function triangleStripToLines(triangles) {
+ const count = triangles.length;
+ if (count >= 3) {
+ const size = (count - 2) * 6;
+ const lines = IndexDatatype_default.createTypedArray(count, size);
+ addTriangle(lines, 0, triangles[0], triangles[1], triangles[2]);
+ let index = 6;
+ for (let i = 3; i < count; ++i, index += 6) {
+ addTriangle(
+ lines,
+ index,
+ triangles[i - 1],
+ triangles[i],
+ triangles[i - 2]
+ );
+ }
+ return lines;
+ }
+ return new Uint16Array();
+}
+function triangleFanToLines(triangles) {
+ if (triangles.length > 0) {
+ const count = triangles.length - 1;
+ const size = (count - 1) * 6;
+ const lines = IndexDatatype_default.createTypedArray(count, size);
+ const base = triangles[0];
+ let index = 0;
+ for (let i = 1; i < count; ++i, index += 6) {
+ addTriangle(lines, index, base, triangles[i], triangles[i + 1]);
+ }
+ return lines;
+ }
+ return new Uint16Array();
+}
+GeometryPipeline.toWireframe = function(geometry) {
+ if (!defined_default(geometry)) {
+ throw new DeveloperError_default("geometry is required.");
+ }
+ const indices = geometry.indices;
+ if (defined_default(indices)) {
+ switch (geometry.primitiveType) {
+ case PrimitiveType_default.TRIANGLES:
+ geometry.indices = trianglesToLines(indices);
+ break;
+ case PrimitiveType_default.TRIANGLE_STRIP:
+ geometry.indices = triangleStripToLines(indices);
+ break;
+ case PrimitiveType_default.TRIANGLE_FAN:
+ geometry.indices = triangleFanToLines(indices);
+ break;
+ //>>includeStart('debug', pragmas.debug);
+ default:
+ throw new DeveloperError_default(
+ "geometry.primitiveType must be TRIANGLES, TRIANGLE_STRIP, or TRIANGLE_FAN."
+ );
+ }
+ geometry.primitiveType = PrimitiveType_default.LINES;
+ }
+ return geometry;
+};
+GeometryPipeline.createLineSegmentsForVectors = function(geometry, attributeName, length) {
+ attributeName = defaultValue_default(attributeName, "normal");
+ if (!defined_default(geometry)) {
+ throw new DeveloperError_default("geometry is required.");
+ }
+ if (!defined_default(geometry.attributes.position)) {
+ throw new DeveloperError_default("geometry.attributes.position is required.");
+ }
+ if (!defined_default(geometry.attributes[attributeName])) {
+ throw new DeveloperError_default(
+ `geometry.attributes must have an attribute with the same name as the attributeName parameter, ${attributeName}.`
+ );
+ }
+ length = defaultValue_default(length, 1e4);
+ const positions = geometry.attributes.position.values;
+ const vectors = geometry.attributes[attributeName].values;
+ const positionsLength = positions.length;
+ const newPositions = new Float64Array(2 * positionsLength);
+ let j = 0;
+ for (let i = 0; i < positionsLength; i += 3) {
+ newPositions[j++] = positions[i];
+ newPositions[j++] = positions[i + 1];
+ newPositions[j++] = positions[i + 2];
+ newPositions[j++] = positions[i] + vectors[i] * length;
+ newPositions[j++] = positions[i + 1] + vectors[i + 1] * length;
+ newPositions[j++] = positions[i + 2] + vectors[i + 2] * length;
+ }
+ let newBoundingSphere;
+ const bs = geometry.boundingSphere;
+ if (defined_default(bs)) {
+ newBoundingSphere = new BoundingSphere_default(bs.center, bs.radius + length);
+ }
+ return new Geometry_default({
+ attributes: {
+ position: new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: newPositions
+ })
+ },
+ primitiveType: PrimitiveType_default.LINES,
+ boundingSphere: newBoundingSphere
+ });
+};
+GeometryPipeline.createAttributeLocations = function(geometry) {
+ if (!defined_default(geometry)) {
+ throw new DeveloperError_default("geometry is required.");
+ }
+ const semantics = [
+ "position",
+ "positionHigh",
+ "positionLow",
+ // From VertexFormat.position - after 2D projection and high-precision encoding
+ "position3DHigh",
+ "position3DLow",
+ "position2DHigh",
+ "position2DLow",
+ // From Primitive
+ "pickColor",
+ // From VertexFormat
+ "normal",
+ "st",
+ "tangent",
+ "bitangent",
+ // For shadow volumes
+ "extrudeDirection",
+ // From compressing texture coordinates and normals
+ "compressedAttributes"
+ ];
+ const attributes = geometry.attributes;
+ const indices = {};
+ let j = 0;
+ let i;
+ const len = semantics.length;
+ for (i = 0; i < len; ++i) {
+ const semantic = semantics[i];
+ if (defined_default(attributes[semantic])) {
+ indices[semantic] = j++;
+ }
+ }
+ for (const name in attributes) {
+ if (attributes.hasOwnProperty(name) && !defined_default(indices[name])) {
+ indices[name] = j++;
+ }
+ }
+ return indices;
+};
+GeometryPipeline.reorderForPreVertexCache = function(geometry) {
+ if (!defined_default(geometry)) {
+ throw new DeveloperError_default("geometry is required.");
+ }
+ const numVertices = Geometry_default.computeNumberOfVertices(geometry);
+ const indices = geometry.indices;
+ if (defined_default(indices)) {
+ const indexCrossReferenceOldToNew = new Int32Array(numVertices);
+ for (let i = 0; i < numVertices; i++) {
+ indexCrossReferenceOldToNew[i] = -1;
+ }
+ const indicesIn = indices;
+ const numIndices = indicesIn.length;
+ const indicesOut = IndexDatatype_default.createTypedArray(numVertices, numIndices);
+ let intoIndicesIn = 0;
+ let intoIndicesOut = 0;
+ let nextIndex = 0;
+ let tempIndex;
+ while (intoIndicesIn < numIndices) {
+ tempIndex = indexCrossReferenceOldToNew[indicesIn[intoIndicesIn]];
+ if (tempIndex !== -1) {
+ indicesOut[intoIndicesOut] = tempIndex;
+ } else {
+ tempIndex = indicesIn[intoIndicesIn];
+ indexCrossReferenceOldToNew[tempIndex] = nextIndex;
+ indicesOut[intoIndicesOut] = nextIndex;
+ ++nextIndex;
+ }
+ ++intoIndicesIn;
+ ++intoIndicesOut;
+ }
+ geometry.indices = indicesOut;
+ const attributes = geometry.attributes;
+ for (const property in attributes) {
+ if (attributes.hasOwnProperty(property) && defined_default(attributes[property]) && defined_default(attributes[property].values)) {
+ const attribute = attributes[property];
+ const elementsIn = attribute.values;
+ let intoElementsIn = 0;
+ const numComponents = attribute.componentsPerAttribute;
+ const elementsOut = ComponentDatatype_default.createTypedArray(
+ attribute.componentDatatype,
+ nextIndex * numComponents
+ );
+ while (intoElementsIn < numVertices) {
+ const temp = indexCrossReferenceOldToNew[intoElementsIn];
+ if (temp !== -1) {
+ for (let j = 0; j < numComponents; j++) {
+ elementsOut[numComponents * temp + j] = elementsIn[numComponents * intoElementsIn + j];
+ }
+ }
+ ++intoElementsIn;
+ }
+ attribute.values = elementsOut;
+ }
+ }
+ }
+ return geometry;
+};
+GeometryPipeline.reorderForPostVertexCache = function(geometry, cacheCapacity) {
+ if (!defined_default(geometry)) {
+ throw new DeveloperError_default("geometry is required.");
+ }
+ const indices = geometry.indices;
+ if (geometry.primitiveType === PrimitiveType_default.TRIANGLES && defined_default(indices)) {
+ const numIndices = indices.length;
+ let maximumIndex = 0;
+ for (let j = 0; j < numIndices; j++) {
+ if (indices[j] > maximumIndex) {
+ maximumIndex = indices[j];
+ }
+ }
+ geometry.indices = Tipsify_default.tipsify({
+ indices,
+ maximumIndex,
+ cacheSize: cacheCapacity
+ });
+ }
+ return geometry;
+};
+function copyAttributesDescriptions(attributes) {
+ const newAttributes = {};
+ for (const attribute in attributes) {
+ if (attributes.hasOwnProperty(attribute) && defined_default(attributes[attribute]) && defined_default(attributes[attribute].values)) {
+ const attr = attributes[attribute];
+ newAttributes[attribute] = new GeometryAttribute_default({
+ componentDatatype: attr.componentDatatype,
+ componentsPerAttribute: attr.componentsPerAttribute,
+ normalize: attr.normalize,
+ values: []
+ });
+ }
+ }
+ return newAttributes;
+}
+function copyVertex(destinationAttributes, sourceAttributes, index) {
+ for (const attribute in sourceAttributes) {
+ if (sourceAttributes.hasOwnProperty(attribute) && defined_default(sourceAttributes[attribute]) && defined_default(sourceAttributes[attribute].values)) {
+ const attr = sourceAttributes[attribute];
+ for (let k = 0; k < attr.componentsPerAttribute; ++k) {
+ destinationAttributes[attribute].values.push(
+ attr.values[index * attr.componentsPerAttribute + k]
+ );
+ }
+ }
+ }
+}
+GeometryPipeline.fitToUnsignedShortIndices = function(geometry) {
+ if (!defined_default(geometry)) {
+ throw new DeveloperError_default("geometry is required.");
+ }
+ if (defined_default(geometry.indices) && geometry.primitiveType !== PrimitiveType_default.TRIANGLES && geometry.primitiveType !== PrimitiveType_default.LINES && geometry.primitiveType !== PrimitiveType_default.POINTS) {
+ throw new DeveloperError_default(
+ "geometry.primitiveType must equal to PrimitiveType.TRIANGLES, PrimitiveType.LINES, or PrimitiveType.POINTS."
+ );
+ }
+ const geometries = [];
+ const numberOfVertices = Geometry_default.computeNumberOfVertices(geometry);
+ if (defined_default(geometry.indices) && numberOfVertices >= Math_default.SIXTY_FOUR_KILOBYTES) {
+ let oldToNewIndex = [];
+ let newIndices = [];
+ let currentIndex = 0;
+ let newAttributes = copyAttributesDescriptions(geometry.attributes);
+ const originalIndices = geometry.indices;
+ const numberOfIndices = originalIndices.length;
+ let indicesPerPrimitive;
+ if (geometry.primitiveType === PrimitiveType_default.TRIANGLES) {
+ indicesPerPrimitive = 3;
+ } else if (geometry.primitiveType === PrimitiveType_default.LINES) {
+ indicesPerPrimitive = 2;
+ } else if (geometry.primitiveType === PrimitiveType_default.POINTS) {
+ indicesPerPrimitive = 1;
+ }
+ for (let j = 0; j < numberOfIndices; j += indicesPerPrimitive) {
+ for (let k = 0; k < indicesPerPrimitive; ++k) {
+ const x = originalIndices[j + k];
+ let i = oldToNewIndex[x];
+ if (!defined_default(i)) {
+ i = currentIndex++;
+ oldToNewIndex[x] = i;
+ copyVertex(newAttributes, geometry.attributes, x);
+ }
+ newIndices.push(i);
+ }
+ if (currentIndex + indicesPerPrimitive >= Math_default.SIXTY_FOUR_KILOBYTES) {
+ geometries.push(
+ new Geometry_default({
+ attributes: newAttributes,
+ indices: newIndices,
+ primitiveType: geometry.primitiveType,
+ boundingSphere: geometry.boundingSphere,
+ boundingSphereCV: geometry.boundingSphereCV
+ })
+ );
+ oldToNewIndex = [];
+ newIndices = [];
+ currentIndex = 0;
+ newAttributes = copyAttributesDescriptions(geometry.attributes);
+ }
+ }
+ if (newIndices.length !== 0) {
+ geometries.push(
+ new Geometry_default({
+ attributes: newAttributes,
+ indices: newIndices,
+ primitiveType: geometry.primitiveType,
+ boundingSphere: geometry.boundingSphere,
+ boundingSphereCV: geometry.boundingSphereCV
+ })
+ );
+ }
+ } else {
+ geometries.push(geometry);
+ }
+ return geometries;
+};
+var scratchProjectTo2DCartesian3 = new Cartesian3_default();
+var scratchProjectTo2DCartographic = new Cartographic_default();
+GeometryPipeline.projectTo2D = function(geometry, attributeName, attributeName3D, attributeName2D, projection) {
+ if (!defined_default(geometry)) {
+ throw new DeveloperError_default("geometry is required.");
+ }
+ if (!defined_default(attributeName)) {
+ throw new DeveloperError_default("attributeName is required.");
+ }
+ if (!defined_default(attributeName3D)) {
+ throw new DeveloperError_default("attributeName3D is required.");
+ }
+ if (!defined_default(attributeName2D)) {
+ throw new DeveloperError_default("attributeName2D is required.");
+ }
+ if (!defined_default(geometry.attributes[attributeName])) {
+ throw new DeveloperError_default(
+ `geometry must have attribute matching the attributeName argument: ${attributeName}.`
+ );
+ }
+ if (geometry.attributes[attributeName].componentDatatype !== ComponentDatatype_default.DOUBLE) {
+ throw new DeveloperError_default(
+ "The attribute componentDatatype must be ComponentDatatype.DOUBLE."
+ );
+ }
+ const attribute = geometry.attributes[attributeName];
+ projection = defined_default(projection) ? projection : new GeographicProjection_default();
+ const ellipsoid = projection.ellipsoid;
+ const values3D = attribute.values;
+ const projectedValues = new Float64Array(values3D.length);
+ let index = 0;
+ for (let i = 0; i < values3D.length; i += 3) {
+ const value = Cartesian3_default.fromArray(
+ values3D,
+ i,
+ scratchProjectTo2DCartesian3
+ );
+ const lonLat = ellipsoid.cartesianToCartographic(
+ value,
+ scratchProjectTo2DCartographic
+ );
+ if (!defined_default(lonLat)) {
+ throw new DeveloperError_default(
+ `Could not project point (${value.x}, ${value.y}, ${value.z}) to 2D.`
+ );
+ }
+ const projectedLonLat = projection.project(
+ lonLat,
+ scratchProjectTo2DCartesian3
+ );
+ projectedValues[index++] = projectedLonLat.x;
+ projectedValues[index++] = projectedLonLat.y;
+ projectedValues[index++] = projectedLonLat.z;
+ }
+ geometry.attributes[attributeName3D] = attribute;
+ geometry.attributes[attributeName2D] = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: projectedValues
+ });
+ delete geometry.attributes[attributeName];
+ return geometry;
+};
+var encodedResult = {
+ high: 0,
+ low: 0
+};
+GeometryPipeline.encodeAttribute = function(geometry, attributeName, attributeHighName, attributeLowName) {
+ if (!defined_default(geometry)) {
+ throw new DeveloperError_default("geometry is required.");
+ }
+ if (!defined_default(attributeName)) {
+ throw new DeveloperError_default("attributeName is required.");
+ }
+ if (!defined_default(attributeHighName)) {
+ throw new DeveloperError_default("attributeHighName is required.");
+ }
+ if (!defined_default(attributeLowName)) {
+ throw new DeveloperError_default("attributeLowName is required.");
+ }
+ if (!defined_default(geometry.attributes[attributeName])) {
+ throw new DeveloperError_default(
+ `geometry must have attribute matching the attributeName argument: ${attributeName}.`
+ );
+ }
+ if (geometry.attributes[attributeName].componentDatatype !== ComponentDatatype_default.DOUBLE) {
+ throw new DeveloperError_default(
+ "The attribute componentDatatype must be ComponentDatatype.DOUBLE."
+ );
+ }
+ const attribute = geometry.attributes[attributeName];
+ const values = attribute.values;
+ const length = values.length;
+ const highValues = new Float32Array(length);
+ const lowValues = new Float32Array(length);
+ for (let i = 0; i < length; ++i) {
+ EncodedCartesian3_default.encode(values[i], encodedResult);
+ highValues[i] = encodedResult.high;
+ lowValues[i] = encodedResult.low;
+ }
+ const componentsPerAttribute = attribute.componentsPerAttribute;
+ geometry.attributes[attributeHighName] = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute,
+ values: highValues
+ });
+ geometry.attributes[attributeLowName] = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute,
+ values: lowValues
+ });
+ delete geometry.attributes[attributeName];
+ return geometry;
+};
+var scratchCartesian32 = new Cartesian3_default();
+function transformPoint(matrix, attribute) {
+ if (defined_default(attribute)) {
+ const values = attribute.values;
+ const length = values.length;
+ for (let i = 0; i < length; i += 3) {
+ Cartesian3_default.unpack(values, i, scratchCartesian32);
+ Matrix4_default.multiplyByPoint(matrix, scratchCartesian32, scratchCartesian32);
+ Cartesian3_default.pack(scratchCartesian32, values, i);
+ }
+ }
+}
+function transformVector(matrix, attribute) {
+ if (defined_default(attribute)) {
+ const values = attribute.values;
+ const length = values.length;
+ for (let i = 0; i < length; i += 3) {
+ Cartesian3_default.unpack(values, i, scratchCartesian32);
+ Matrix3_default.multiplyByVector(matrix, scratchCartesian32, scratchCartesian32);
+ scratchCartesian32 = Cartesian3_default.normalize(
+ scratchCartesian32,
+ scratchCartesian32
+ );
+ Cartesian3_default.pack(scratchCartesian32, values, i);
+ }
+ }
+}
+var inverseTranspose = new Matrix4_default();
+var normalMatrix = new Matrix3_default();
+GeometryPipeline.transformToWorldCoordinates = function(instance) {
+ if (!defined_default(instance)) {
+ throw new DeveloperError_default("instance is required.");
+ }
+ const modelMatrix = instance.modelMatrix;
+ if (Matrix4_default.equals(modelMatrix, Matrix4_default.IDENTITY)) {
+ return instance;
+ }
+ const attributes = instance.geometry.attributes;
+ transformPoint(modelMatrix, attributes.position);
+ transformPoint(modelMatrix, attributes.prevPosition);
+ transformPoint(modelMatrix, attributes.nextPosition);
+ if (defined_default(attributes.normal) || defined_default(attributes.tangent) || defined_default(attributes.bitangent)) {
+ Matrix4_default.inverse(modelMatrix, inverseTranspose);
+ Matrix4_default.transpose(inverseTranspose, inverseTranspose);
+ Matrix4_default.getMatrix3(inverseTranspose, normalMatrix);
+ transformVector(normalMatrix, attributes.normal);
+ transformVector(normalMatrix, attributes.tangent);
+ transformVector(normalMatrix, attributes.bitangent);
+ }
+ const boundingSphere = instance.geometry.boundingSphere;
+ if (defined_default(boundingSphere)) {
+ instance.geometry.boundingSphere = BoundingSphere_default.transform(
+ boundingSphere,
+ modelMatrix,
+ boundingSphere
+ );
+ }
+ instance.modelMatrix = Matrix4_default.clone(Matrix4_default.IDENTITY);
+ return instance;
+};
+function findAttributesInAllGeometries(instances, propertyName) {
+ const length = instances.length;
+ const attributesInAllGeometries = {};
+ const attributes0 = instances[0][propertyName].attributes;
+ let name;
+ for (name in attributes0) {
+ if (attributes0.hasOwnProperty(name) && defined_default(attributes0[name]) && defined_default(attributes0[name].values)) {
+ const attribute = attributes0[name];
+ let numberOfComponents = attribute.values.length;
+ let inAllGeometries = true;
+ for (let i = 1; i < length; ++i) {
+ const otherAttribute = instances[i][propertyName].attributes[name];
+ if (!defined_default(otherAttribute) || attribute.componentDatatype !== otherAttribute.componentDatatype || attribute.componentsPerAttribute !== otherAttribute.componentsPerAttribute || attribute.normalize !== otherAttribute.normalize) {
+ inAllGeometries = false;
+ break;
+ }
+ numberOfComponents += otherAttribute.values.length;
+ }
+ if (inAllGeometries) {
+ attributesInAllGeometries[name] = new GeometryAttribute_default({
+ componentDatatype: attribute.componentDatatype,
+ componentsPerAttribute: attribute.componentsPerAttribute,
+ normalize: attribute.normalize,
+ values: ComponentDatatype_default.createTypedArray(
+ attribute.componentDatatype,
+ numberOfComponents
+ )
+ });
+ }
+ }
+ }
+ return attributesInAllGeometries;
+}
+var tempScratch = new Cartesian3_default();
+function combineGeometries(instances, propertyName) {
+ const length = instances.length;
+ let name;
+ let i;
+ let j;
+ let k;
+ const m = instances[0].modelMatrix;
+ const haveIndices = defined_default(instances[0][propertyName].indices);
+ const primitiveType = instances[0][propertyName].primitiveType;
+ for (i = 1; i < length; ++i) {
+ if (!Matrix4_default.equals(instances[i].modelMatrix, m)) {
+ throw new DeveloperError_default("All instances must have the same modelMatrix.");
+ }
+ if (defined_default(instances[i][propertyName].indices) !== haveIndices) {
+ throw new DeveloperError_default(
+ "All instance geometries must have an indices or not have one."
+ );
+ }
+ if (instances[i][propertyName].primitiveType !== primitiveType) {
+ throw new DeveloperError_default(
+ "All instance geometries must have the same primitiveType."
+ );
+ }
+ }
+ const attributes = findAttributesInAllGeometries(instances, propertyName);
+ let values;
+ let sourceValues;
+ let sourceValuesLength;
+ for (name in attributes) {
+ if (attributes.hasOwnProperty(name)) {
+ values = attributes[name].values;
+ k = 0;
+ for (i = 0; i < length; ++i) {
+ sourceValues = instances[i][propertyName].attributes[name].values;
+ sourceValuesLength = sourceValues.length;
+ for (j = 0; j < sourceValuesLength; ++j) {
+ values[k++] = sourceValues[j];
+ }
+ }
+ }
+ }
+ let indices;
+ if (haveIndices) {
+ let numberOfIndices = 0;
+ for (i = 0; i < length; ++i) {
+ numberOfIndices += instances[i][propertyName].indices.length;
+ }
+ const numberOfVertices = Geometry_default.computeNumberOfVertices(
+ new Geometry_default({
+ attributes,
+ primitiveType: PrimitiveType_default.POINTS
+ })
+ );
+ const destIndices = IndexDatatype_default.createTypedArray(
+ numberOfVertices,
+ numberOfIndices
+ );
+ let destOffset = 0;
+ let offset = 0;
+ for (i = 0; i < length; ++i) {
+ const sourceIndices = instances[i][propertyName].indices;
+ const sourceIndicesLen = sourceIndices.length;
+ for (k = 0; k < sourceIndicesLen; ++k) {
+ destIndices[destOffset++] = offset + sourceIndices[k];
+ }
+ offset += Geometry_default.computeNumberOfVertices(instances[i][propertyName]);
+ }
+ indices = destIndices;
+ }
+ let center = new Cartesian3_default();
+ let radius = 0;
+ let bs;
+ for (i = 0; i < length; ++i) {
+ bs = instances[i][propertyName].boundingSphere;
+ if (!defined_default(bs)) {
+ center = void 0;
+ break;
+ }
+ Cartesian3_default.add(bs.center, center, center);
+ }
+ if (defined_default(center)) {
+ Cartesian3_default.divideByScalar(center, length, center);
+ for (i = 0; i < length; ++i) {
+ bs = instances[i][propertyName].boundingSphere;
+ const tempRadius = Cartesian3_default.magnitude(
+ Cartesian3_default.subtract(bs.center, center, tempScratch)
+ ) + bs.radius;
+ if (tempRadius > radius) {
+ radius = tempRadius;
+ }
+ }
+ }
+ return new Geometry_default({
+ attributes,
+ indices,
+ primitiveType,
+ boundingSphere: defined_default(center) ? new BoundingSphere_default(center, radius) : void 0
+ });
+}
+GeometryPipeline.combineInstances = function(instances) {
+ if (!defined_default(instances) || instances.length < 1) {
+ throw new DeveloperError_default(
+ "instances is required and must have length greater than zero."
+ );
+ }
+ const instanceGeometry = [];
+ const instanceSplitGeometry = [];
+ const length = instances.length;
+ for (let i = 0; i < length; ++i) {
+ const instance = instances[i];
+ if (defined_default(instance.geometry)) {
+ instanceGeometry.push(instance);
+ } else if (defined_default(instance.westHemisphereGeometry) && defined_default(instance.eastHemisphereGeometry)) {
+ instanceSplitGeometry.push(instance);
+ }
+ }
+ const geometries = [];
+ if (instanceGeometry.length > 0) {
+ geometries.push(combineGeometries(instanceGeometry, "geometry"));
+ }
+ if (instanceSplitGeometry.length > 0) {
+ geometries.push(
+ combineGeometries(instanceSplitGeometry, "westHemisphereGeometry")
+ );
+ geometries.push(
+ combineGeometries(instanceSplitGeometry, "eastHemisphereGeometry")
+ );
+ }
+ return geometries;
+};
+var normal = new Cartesian3_default();
+var v0 = new Cartesian3_default();
+var v1 = new Cartesian3_default();
+var v2 = new Cartesian3_default();
+GeometryPipeline.computeNormal = function(geometry) {
+ if (!defined_default(geometry)) {
+ throw new DeveloperError_default("geometry is required.");
+ }
+ if (!defined_default(geometry.attributes.position) || !defined_default(geometry.attributes.position.values)) {
+ throw new DeveloperError_default(
+ "geometry.attributes.position.values is required."
+ );
+ }
+ if (!defined_default(geometry.indices)) {
+ throw new DeveloperError_default("geometry.indices is required.");
+ }
+ if (geometry.indices.length < 2 || geometry.indices.length % 3 !== 0) {
+ throw new DeveloperError_default(
+ "geometry.indices length must be greater than 0 and be a multiple of 3."
+ );
+ }
+ if (geometry.primitiveType !== PrimitiveType_default.TRIANGLES) {
+ throw new DeveloperError_default(
+ "geometry.primitiveType must be PrimitiveType.TRIANGLES."
+ );
+ }
+ const indices = geometry.indices;
+ const attributes = geometry.attributes;
+ const vertices = attributes.position.values;
+ const numVertices = attributes.position.values.length / 3;
+ const numIndices = indices.length;
+ const normalsPerVertex = new Array(numVertices);
+ const normalsPerTriangle = new Array(numIndices / 3);
+ const normalIndices = new Array(numIndices);
+ let i;
+ for (i = 0; i < numVertices; i++) {
+ normalsPerVertex[i] = {
+ indexOffset: 0,
+ count: 0,
+ currentCount: 0
+ };
+ }
+ let j = 0;
+ for (i = 0; i < numIndices; i += 3) {
+ const i0 = indices[i];
+ const i1 = indices[i + 1];
+ const i2 = indices[i + 2];
+ const i03 = i0 * 3;
+ const i13 = i1 * 3;
+ const i23 = i2 * 3;
+ v0.x = vertices[i03];
+ v0.y = vertices[i03 + 1];
+ v0.z = vertices[i03 + 2];
+ v1.x = vertices[i13];
+ v1.y = vertices[i13 + 1];
+ v1.z = vertices[i13 + 2];
+ v2.x = vertices[i23];
+ v2.y = vertices[i23 + 1];
+ v2.z = vertices[i23 + 2];
+ normalsPerVertex[i0].count++;
+ normalsPerVertex[i1].count++;
+ normalsPerVertex[i2].count++;
+ Cartesian3_default.subtract(v1, v0, v1);
+ Cartesian3_default.subtract(v2, v0, v2);
+ normalsPerTriangle[j] = Cartesian3_default.cross(v1, v2, new Cartesian3_default());
+ j++;
+ }
+ let indexOffset = 0;
+ for (i = 0; i < numVertices; i++) {
+ normalsPerVertex[i].indexOffset += indexOffset;
+ indexOffset += normalsPerVertex[i].count;
+ }
+ j = 0;
+ let vertexNormalData;
+ for (i = 0; i < numIndices; i += 3) {
+ vertexNormalData = normalsPerVertex[indices[i]];
+ let index = vertexNormalData.indexOffset + vertexNormalData.currentCount;
+ normalIndices[index] = j;
+ vertexNormalData.currentCount++;
+ vertexNormalData = normalsPerVertex[indices[i + 1]];
+ index = vertexNormalData.indexOffset + vertexNormalData.currentCount;
+ normalIndices[index] = j;
+ vertexNormalData.currentCount++;
+ vertexNormalData = normalsPerVertex[indices[i + 2]];
+ index = vertexNormalData.indexOffset + vertexNormalData.currentCount;
+ normalIndices[index] = j;
+ vertexNormalData.currentCount++;
+ j++;
+ }
+ const normalValues = new Float32Array(numVertices * 3);
+ for (i = 0; i < numVertices; i++) {
+ const i3 = i * 3;
+ vertexNormalData = normalsPerVertex[i];
+ Cartesian3_default.clone(Cartesian3_default.ZERO, normal);
+ if (vertexNormalData.count > 0) {
+ for (j = 0; j < vertexNormalData.count; j++) {
+ Cartesian3_default.add(
+ normal,
+ normalsPerTriangle[normalIndices[vertexNormalData.indexOffset + j]],
+ normal
+ );
+ }
+ if (Cartesian3_default.equalsEpsilon(Cartesian3_default.ZERO, normal, Math_default.EPSILON10)) {
+ Cartesian3_default.clone(
+ normalsPerTriangle[normalIndices[vertexNormalData.indexOffset]],
+ normal
+ );
+ }
+ }
+ if (Cartesian3_default.equalsEpsilon(Cartesian3_default.ZERO, normal, Math_default.EPSILON10)) {
+ normal.z = 1;
+ }
+ Cartesian3_default.normalize(normal, normal);
+ normalValues[i3] = normal.x;
+ normalValues[i3 + 1] = normal.y;
+ normalValues[i3 + 2] = normal.z;
+ }
+ geometry.attributes.normal = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: normalValues
+ });
+ return geometry;
+};
+var normalScratch = new Cartesian3_default();
+var normalScale = new Cartesian3_default();
+var tScratch = new Cartesian3_default();
+GeometryPipeline.computeTangentAndBitangent = function(geometry) {
+ if (!defined_default(geometry)) {
+ throw new DeveloperError_default("geometry is required.");
+ }
+ const attributes = geometry.attributes;
+ const indices = geometry.indices;
+ if (!defined_default(attributes.position) || !defined_default(attributes.position.values)) {
+ throw new DeveloperError_default(
+ "geometry.attributes.position.values is required."
+ );
+ }
+ if (!defined_default(attributes.normal) || !defined_default(attributes.normal.values)) {
+ throw new DeveloperError_default("geometry.attributes.normal.values is required.");
+ }
+ if (!defined_default(attributes.st) || !defined_default(attributes.st.values)) {
+ throw new DeveloperError_default("geometry.attributes.st.values is required.");
+ }
+ if (!defined_default(indices)) {
+ throw new DeveloperError_default("geometry.indices is required.");
+ }
+ if (indices.length < 2 || indices.length % 3 !== 0) {
+ throw new DeveloperError_default(
+ "geometry.indices length must be greater than 0 and be a multiple of 3."
+ );
+ }
+ if (geometry.primitiveType !== PrimitiveType_default.TRIANGLES) {
+ throw new DeveloperError_default(
+ "geometry.primitiveType must be PrimitiveType.TRIANGLES."
+ );
+ }
+ const vertices = geometry.attributes.position.values;
+ const normals = geometry.attributes.normal.values;
+ const st = geometry.attributes.st.values;
+ const numVertices = geometry.attributes.position.values.length / 3;
+ const numIndices = indices.length;
+ const tan1 = new Array(numVertices * 3);
+ let i;
+ for (i = 0; i < tan1.length; i++) {
+ tan1[i] = 0;
+ }
+ let i03;
+ let i13;
+ let i23;
+ for (i = 0; i < numIndices; i += 3) {
+ const i0 = indices[i];
+ const i1 = indices[i + 1];
+ const i2 = indices[i + 2];
+ i03 = i0 * 3;
+ i13 = i1 * 3;
+ i23 = i2 * 3;
+ const i02 = i0 * 2;
+ const i12 = i1 * 2;
+ const i22 = i2 * 2;
+ const ux = vertices[i03];
+ const uy = vertices[i03 + 1];
+ const uz = vertices[i03 + 2];
+ const wx = st[i02];
+ const wy = st[i02 + 1];
+ const t1 = st[i12 + 1] - wy;
+ const t2 = st[i22 + 1] - wy;
+ const r = 1 / ((st[i12] - wx) * t2 - (st[i22] - wx) * t1);
+ const sdirx = (t2 * (vertices[i13] - ux) - t1 * (vertices[i23] - ux)) * r;
+ const sdiry = (t2 * (vertices[i13 + 1] - uy) - t1 * (vertices[i23 + 1] - uy)) * r;
+ const sdirz = (t2 * (vertices[i13 + 2] - uz) - t1 * (vertices[i23 + 2] - uz)) * r;
+ tan1[i03] += sdirx;
+ tan1[i03 + 1] += sdiry;
+ tan1[i03 + 2] += sdirz;
+ tan1[i13] += sdirx;
+ tan1[i13 + 1] += sdiry;
+ tan1[i13 + 2] += sdirz;
+ tan1[i23] += sdirx;
+ tan1[i23 + 1] += sdiry;
+ tan1[i23 + 2] += sdirz;
+ }
+ const tangentValues = new Float32Array(numVertices * 3);
+ const bitangentValues = new Float32Array(numVertices * 3);
+ for (i = 0; i < numVertices; i++) {
+ i03 = i * 3;
+ i13 = i03 + 1;
+ i23 = i03 + 2;
+ const n = Cartesian3_default.fromArray(normals, i03, normalScratch);
+ const t = Cartesian3_default.fromArray(tan1, i03, tScratch);
+ const scalar = Cartesian3_default.dot(n, t);
+ Cartesian3_default.multiplyByScalar(n, scalar, normalScale);
+ Cartesian3_default.normalize(Cartesian3_default.subtract(t, normalScale, t), t);
+ tangentValues[i03] = t.x;
+ tangentValues[i13] = t.y;
+ tangentValues[i23] = t.z;
+ Cartesian3_default.normalize(Cartesian3_default.cross(n, t, t), t);
+ bitangentValues[i03] = t.x;
+ bitangentValues[i13] = t.y;
+ bitangentValues[i23] = t.z;
+ }
+ geometry.attributes.tangent = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: tangentValues
+ });
+ geometry.attributes.bitangent = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: bitangentValues
+ });
+ return geometry;
+};
+var scratchCartesian22 = new Cartesian2_default();
+var toEncode1 = new Cartesian3_default();
+var toEncode2 = new Cartesian3_default();
+var toEncode3 = new Cartesian3_default();
+var encodeResult2 = new Cartesian2_default();
+GeometryPipeline.compressVertices = function(geometry) {
+ if (!defined_default(geometry)) {
+ throw new DeveloperError_default("geometry is required.");
+ }
+ const extrudeAttribute = geometry.attributes.extrudeDirection;
+ let i;
+ let numVertices;
+ if (defined_default(extrudeAttribute)) {
+ const extrudeDirections = extrudeAttribute.values;
+ numVertices = extrudeDirections.length / 3;
+ const compressedDirections = new Float32Array(numVertices * 2);
+ let i2 = 0;
+ for (i = 0; i < numVertices; ++i) {
+ Cartesian3_default.fromArray(extrudeDirections, i * 3, toEncode1);
+ if (Cartesian3_default.equals(toEncode1, Cartesian3_default.ZERO)) {
+ i2 += 2;
+ continue;
+ }
+ encodeResult2 = AttributeCompression_default.octEncodeInRange(
+ toEncode1,
+ 65535,
+ encodeResult2
+ );
+ compressedDirections[i2++] = encodeResult2.x;
+ compressedDirections[i2++] = encodeResult2.y;
+ }
+ geometry.attributes.compressedAttributes = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 2,
+ values: compressedDirections
+ });
+ delete geometry.attributes.extrudeDirection;
+ return geometry;
+ }
+ const normalAttribute = geometry.attributes.normal;
+ const stAttribute = geometry.attributes.st;
+ const hasNormal = defined_default(normalAttribute);
+ const hasSt = defined_default(stAttribute);
+ if (!hasNormal && !hasSt) {
+ return geometry;
+ }
+ const tangentAttribute = geometry.attributes.tangent;
+ const bitangentAttribute = geometry.attributes.bitangent;
+ const hasTangent = defined_default(tangentAttribute);
+ const hasBitangent = defined_default(bitangentAttribute);
+ let normals;
+ let st;
+ let tangents;
+ let bitangents;
+ if (hasNormal) {
+ normals = normalAttribute.values;
+ }
+ if (hasSt) {
+ st = stAttribute.values;
+ }
+ if (hasTangent) {
+ tangents = tangentAttribute.values;
+ }
+ if (hasBitangent) {
+ bitangents = bitangentAttribute.values;
+ }
+ const length = hasNormal ? normals.length : st.length;
+ const numComponents = hasNormal ? 3 : 2;
+ numVertices = length / numComponents;
+ let compressedLength = numVertices;
+ let numCompressedComponents = hasSt && hasNormal ? 2 : 1;
+ numCompressedComponents += hasTangent || hasBitangent ? 1 : 0;
+ compressedLength *= numCompressedComponents;
+ const compressedAttributes = new Float32Array(compressedLength);
+ let normalIndex = 0;
+ for (i = 0; i < numVertices; ++i) {
+ if (hasSt) {
+ Cartesian2_default.fromArray(st, i * 2, scratchCartesian22);
+ compressedAttributes[normalIndex++] = AttributeCompression_default.compressTextureCoordinates(scratchCartesian22);
+ }
+ const index = i * 3;
+ if (hasNormal && defined_default(tangents) && defined_default(bitangents)) {
+ Cartesian3_default.fromArray(normals, index, toEncode1);
+ Cartesian3_default.fromArray(tangents, index, toEncode2);
+ Cartesian3_default.fromArray(bitangents, index, toEncode3);
+ AttributeCompression_default.octPack(
+ toEncode1,
+ toEncode2,
+ toEncode3,
+ scratchCartesian22
+ );
+ compressedAttributes[normalIndex++] = scratchCartesian22.x;
+ compressedAttributes[normalIndex++] = scratchCartesian22.y;
+ } else {
+ if (hasNormal) {
+ Cartesian3_default.fromArray(normals, index, toEncode1);
+ compressedAttributes[normalIndex++] = AttributeCompression_default.octEncodeFloat(toEncode1);
+ }
+ if (hasTangent) {
+ Cartesian3_default.fromArray(tangents, index, toEncode1);
+ compressedAttributes[normalIndex++] = AttributeCompression_default.octEncodeFloat(toEncode1);
+ }
+ if (hasBitangent) {
+ Cartesian3_default.fromArray(bitangents, index, toEncode1);
+ compressedAttributes[normalIndex++] = AttributeCompression_default.octEncodeFloat(toEncode1);
+ }
+ }
+ }
+ geometry.attributes.compressedAttributes = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: numCompressedComponents,
+ values: compressedAttributes
+ });
+ if (hasNormal) {
+ delete geometry.attributes.normal;
+ }
+ if (hasSt) {
+ delete geometry.attributes.st;
+ }
+ if (hasBitangent) {
+ delete geometry.attributes.bitangent;
+ }
+ if (hasTangent) {
+ delete geometry.attributes.tangent;
+ }
+ return geometry;
+};
+function indexTriangles(geometry) {
+ if (defined_default(geometry.indices)) {
+ return geometry;
+ }
+ const numberOfVertices = Geometry_default.computeNumberOfVertices(geometry);
+ if (numberOfVertices < 3) {
+ throw new DeveloperError_default("The number of vertices must be at least three.");
+ }
+ if (numberOfVertices % 3 !== 0) {
+ throw new DeveloperError_default(
+ "The number of vertices must be a multiple of three."
+ );
+ }
+ const indices = IndexDatatype_default.createTypedArray(
+ numberOfVertices,
+ numberOfVertices
+ );
+ for (let i = 0; i < numberOfVertices; ++i) {
+ indices[i] = i;
+ }
+ geometry.indices = indices;
+ return geometry;
+}
+function indexTriangleFan(geometry) {
+ const numberOfVertices = Geometry_default.computeNumberOfVertices(geometry);
+ if (numberOfVertices < 3) {
+ throw new DeveloperError_default("The number of vertices must be at least three.");
+ }
+ const indices = IndexDatatype_default.createTypedArray(
+ numberOfVertices,
+ (numberOfVertices - 2) * 3
+ );
+ indices[0] = 1;
+ indices[1] = 0;
+ indices[2] = 2;
+ let indicesIndex = 3;
+ for (let i = 3; i < numberOfVertices; ++i) {
+ indices[indicesIndex++] = i - 1;
+ indices[indicesIndex++] = 0;
+ indices[indicesIndex++] = i;
+ }
+ geometry.indices = indices;
+ geometry.primitiveType = PrimitiveType_default.TRIANGLES;
+ return geometry;
+}
+function indexTriangleStrip(geometry) {
+ const numberOfVertices = Geometry_default.computeNumberOfVertices(geometry);
+ if (numberOfVertices < 3) {
+ throw new DeveloperError_default("The number of vertices must be at least 3.");
+ }
+ const indices = IndexDatatype_default.createTypedArray(
+ numberOfVertices,
+ (numberOfVertices - 2) * 3
+ );
+ indices[0] = 0;
+ indices[1] = 1;
+ indices[2] = 2;
+ if (numberOfVertices > 3) {
+ indices[3] = 0;
+ indices[4] = 2;
+ indices[5] = 3;
+ }
+ let indicesIndex = 6;
+ for (let i = 3; i < numberOfVertices - 1; i += 2) {
+ indices[indicesIndex++] = i;
+ indices[indicesIndex++] = i - 1;
+ indices[indicesIndex++] = i + 1;
+ if (i + 2 < numberOfVertices) {
+ indices[indicesIndex++] = i;
+ indices[indicesIndex++] = i + 1;
+ indices[indicesIndex++] = i + 2;
+ }
+ }
+ geometry.indices = indices;
+ geometry.primitiveType = PrimitiveType_default.TRIANGLES;
+ return geometry;
+}
+function indexLines(geometry) {
+ if (defined_default(geometry.indices)) {
+ return geometry;
+ }
+ const numberOfVertices = Geometry_default.computeNumberOfVertices(geometry);
+ if (numberOfVertices < 2) {
+ throw new DeveloperError_default("The number of vertices must be at least two.");
+ }
+ if (numberOfVertices % 2 !== 0) {
+ throw new DeveloperError_default("The number of vertices must be a multiple of 2.");
+ }
+ const indices = IndexDatatype_default.createTypedArray(
+ numberOfVertices,
+ numberOfVertices
+ );
+ for (let i = 0; i < numberOfVertices; ++i) {
+ indices[i] = i;
+ }
+ geometry.indices = indices;
+ return geometry;
+}
+function indexLineStrip(geometry) {
+ const numberOfVertices = Geometry_default.computeNumberOfVertices(geometry);
+ if (numberOfVertices < 2) {
+ throw new DeveloperError_default("The number of vertices must be at least two.");
+ }
+ const indices = IndexDatatype_default.createTypedArray(
+ numberOfVertices,
+ (numberOfVertices - 1) * 2
+ );
+ indices[0] = 0;
+ indices[1] = 1;
+ let indicesIndex = 2;
+ for (let i = 2; i < numberOfVertices; ++i) {
+ indices[indicesIndex++] = i - 1;
+ indices[indicesIndex++] = i;
+ }
+ geometry.indices = indices;
+ geometry.primitiveType = PrimitiveType_default.LINES;
+ return geometry;
+}
+function indexLineLoop(geometry) {
+ const numberOfVertices = Geometry_default.computeNumberOfVertices(geometry);
+ if (numberOfVertices < 2) {
+ throw new DeveloperError_default("The number of vertices must be at least two.");
+ }
+ const indices = IndexDatatype_default.createTypedArray(
+ numberOfVertices,
+ numberOfVertices * 2
+ );
+ indices[0] = 0;
+ indices[1] = 1;
+ let indicesIndex = 2;
+ for (let i = 2; i < numberOfVertices; ++i) {
+ indices[indicesIndex++] = i - 1;
+ indices[indicesIndex++] = i;
+ }
+ indices[indicesIndex++] = numberOfVertices - 1;
+ indices[indicesIndex] = 0;
+ geometry.indices = indices;
+ geometry.primitiveType = PrimitiveType_default.LINES;
+ return geometry;
+}
+function indexPrimitive(geometry) {
+ switch (geometry.primitiveType) {
+ case PrimitiveType_default.TRIANGLE_FAN:
+ return indexTriangleFan(geometry);
+ case PrimitiveType_default.TRIANGLE_STRIP:
+ return indexTriangleStrip(geometry);
+ case PrimitiveType_default.TRIANGLES:
+ return indexTriangles(geometry);
+ case PrimitiveType_default.LINE_STRIP:
+ return indexLineStrip(geometry);
+ case PrimitiveType_default.LINE_LOOP:
+ return indexLineLoop(geometry);
+ case PrimitiveType_default.LINES:
+ return indexLines(geometry);
+ }
+ return geometry;
+}
+function offsetPointFromXZPlane(p, isBehind) {
+ if (Math.abs(p.y) < Math_default.EPSILON6) {
+ if (isBehind) {
+ p.y = -Math_default.EPSILON6;
+ } else {
+ p.y = Math_default.EPSILON6;
+ }
+ }
+}
+function offsetTriangleFromXZPlane(p0, p1, p2) {
+ if (p0.y !== 0 && p1.y !== 0 && p2.y !== 0) {
+ offsetPointFromXZPlane(p0, p0.y < 0);
+ offsetPointFromXZPlane(p1, p1.y < 0);
+ offsetPointFromXZPlane(p2, p2.y < 0);
+ return;
+ }
+ const p0y = Math.abs(p0.y);
+ const p1y = Math.abs(p1.y);
+ const p2y = Math.abs(p2.y);
+ let sign;
+ if (p0y > p1y) {
+ if (p0y > p2y) {
+ sign = Math_default.sign(p0.y);
+ } else {
+ sign = Math_default.sign(p2.y);
+ }
+ } else if (p1y > p2y) {
+ sign = Math_default.sign(p1.y);
+ } else {
+ sign = Math_default.sign(p2.y);
+ }
+ const isBehind = sign < 0;
+ offsetPointFromXZPlane(p0, isBehind);
+ offsetPointFromXZPlane(p1, isBehind);
+ offsetPointFromXZPlane(p2, isBehind);
+}
+var c3 = new Cartesian3_default();
+function getXZIntersectionOffsetPoints(p, p1, u12, v12) {
+ Cartesian3_default.add(
+ p,
+ Cartesian3_default.multiplyByScalar(
+ Cartesian3_default.subtract(p1, p, c3),
+ p.y / (p.y - p1.y),
+ c3
+ ),
+ u12
+ );
+ Cartesian3_default.clone(u12, v12);
+ offsetPointFromXZPlane(u12, true);
+ offsetPointFromXZPlane(v12, false);
+}
+var u1 = new Cartesian3_default();
+var u2 = new Cartesian3_default();
+var q1 = new Cartesian3_default();
+var q2 = new Cartesian3_default();
+var splitTriangleResult = {
+ positions: new Array(7),
+ indices: new Array(3 * 3)
+};
+function splitTriangle(p0, p1, p2) {
+ if (p0.x >= 0 || p1.x >= 0 || p2.x >= 0) {
+ return void 0;
+ }
+ offsetTriangleFromXZPlane(p0, p1, p2);
+ const p0Behind = p0.y < 0;
+ const p1Behind = p1.y < 0;
+ const p2Behind = p2.y < 0;
+ let numBehind = 0;
+ numBehind += p0Behind ? 1 : 0;
+ numBehind += p1Behind ? 1 : 0;
+ numBehind += p2Behind ? 1 : 0;
+ const indices = splitTriangleResult.indices;
+ if (numBehind === 1) {
+ indices[1] = 3;
+ indices[2] = 4;
+ indices[5] = 6;
+ indices[7] = 6;
+ indices[8] = 5;
+ if (p0Behind) {
+ getXZIntersectionOffsetPoints(p0, p1, u1, q1);
+ getXZIntersectionOffsetPoints(p0, p2, u2, q2);
+ indices[0] = 0;
+ indices[3] = 1;
+ indices[4] = 2;
+ indices[6] = 1;
+ } else if (p1Behind) {
+ getXZIntersectionOffsetPoints(p1, p2, u1, q1);
+ getXZIntersectionOffsetPoints(p1, p0, u2, q2);
+ indices[0] = 1;
+ indices[3] = 2;
+ indices[4] = 0;
+ indices[6] = 2;
+ } else if (p2Behind) {
+ getXZIntersectionOffsetPoints(p2, p0, u1, q1);
+ getXZIntersectionOffsetPoints(p2, p1, u2, q2);
+ indices[0] = 2;
+ indices[3] = 0;
+ indices[4] = 1;
+ indices[6] = 0;
+ }
+ } else if (numBehind === 2) {
+ indices[2] = 4;
+ indices[4] = 4;
+ indices[5] = 3;
+ indices[7] = 5;
+ indices[8] = 6;
+ if (!p0Behind) {
+ getXZIntersectionOffsetPoints(p0, p1, u1, q1);
+ getXZIntersectionOffsetPoints(p0, p2, u2, q2);
+ indices[0] = 1;
+ indices[1] = 2;
+ indices[3] = 1;
+ indices[6] = 0;
+ } else if (!p1Behind) {
+ getXZIntersectionOffsetPoints(p1, p2, u1, q1);
+ getXZIntersectionOffsetPoints(p1, p0, u2, q2);
+ indices[0] = 2;
+ indices[1] = 0;
+ indices[3] = 2;
+ indices[6] = 1;
+ } else if (!p2Behind) {
+ getXZIntersectionOffsetPoints(p2, p0, u1, q1);
+ getXZIntersectionOffsetPoints(p2, p1, u2, q2);
+ indices[0] = 0;
+ indices[1] = 1;
+ indices[3] = 0;
+ indices[6] = 2;
+ }
+ }
+ const positions = splitTriangleResult.positions;
+ positions[0] = p0;
+ positions[1] = p1;
+ positions[2] = p2;
+ positions.length = 3;
+ if (numBehind === 1 || numBehind === 2) {
+ positions[3] = u1;
+ positions[4] = u2;
+ positions[5] = q1;
+ positions[6] = q2;
+ positions.length = 7;
+ }
+ return splitTriangleResult;
+}
+function updateGeometryAfterSplit(geometry, computeBoundingSphere) {
+ const attributes = geometry.attributes;
+ if (attributes.position.values.length === 0) {
+ return void 0;
+ }
+ for (const property in attributes) {
+ if (attributes.hasOwnProperty(property) && defined_default(attributes[property]) && defined_default(attributes[property].values)) {
+ const attribute = attributes[property];
+ attribute.values = ComponentDatatype_default.createTypedArray(
+ attribute.componentDatatype,
+ attribute.values
+ );
+ }
+ }
+ const numberOfVertices = Geometry_default.computeNumberOfVertices(geometry);
+ geometry.indices = IndexDatatype_default.createTypedArray(
+ numberOfVertices,
+ geometry.indices
+ );
+ if (computeBoundingSphere) {
+ geometry.boundingSphere = BoundingSphere_default.fromVertices(
+ attributes.position.values
+ );
+ }
+ return geometry;
+}
+function copyGeometryForSplit(geometry) {
+ const attributes = geometry.attributes;
+ const copiedAttributes = {};
+ for (const property in attributes) {
+ if (attributes.hasOwnProperty(property) && defined_default(attributes[property]) && defined_default(attributes[property].values)) {
+ const attribute = attributes[property];
+ copiedAttributes[property] = new GeometryAttribute_default({
+ componentDatatype: attribute.componentDatatype,
+ componentsPerAttribute: attribute.componentsPerAttribute,
+ normalize: attribute.normalize,
+ values: []
+ });
+ }
+ }
+ return new Geometry_default({
+ attributes: copiedAttributes,
+ indices: [],
+ primitiveType: geometry.primitiveType
+ });
+}
+function updateInstanceAfterSplit(instance, westGeometry, eastGeometry) {
+ const computeBoundingSphere = defined_default(instance.geometry.boundingSphere);
+ westGeometry = updateGeometryAfterSplit(westGeometry, computeBoundingSphere);
+ eastGeometry = updateGeometryAfterSplit(eastGeometry, computeBoundingSphere);
+ if (defined_default(eastGeometry) && !defined_default(westGeometry)) {
+ instance.geometry = eastGeometry;
+ } else if (!defined_default(eastGeometry) && defined_default(westGeometry)) {
+ instance.geometry = westGeometry;
+ } else {
+ instance.westHemisphereGeometry = westGeometry;
+ instance.eastHemisphereGeometry = eastGeometry;
+ instance.geometry = void 0;
+ }
+}
+function generateBarycentricInterpolateFunction(CartesianType, numberOfComponents) {
+ const v0Scratch = new CartesianType();
+ const v1Scratch = new CartesianType();
+ const v2Scratch = new CartesianType();
+ return function(i0, i1, i2, coords, sourceValues, currentValues, insertedIndex, normalize) {
+ const v02 = CartesianType.fromArray(
+ sourceValues,
+ i0 * numberOfComponents,
+ v0Scratch
+ );
+ const v12 = CartesianType.fromArray(
+ sourceValues,
+ i1 * numberOfComponents,
+ v1Scratch
+ );
+ const v22 = CartesianType.fromArray(
+ sourceValues,
+ i2 * numberOfComponents,
+ v2Scratch
+ );
+ CartesianType.multiplyByScalar(v02, coords.x, v02);
+ CartesianType.multiplyByScalar(v12, coords.y, v12);
+ CartesianType.multiplyByScalar(v22, coords.z, v22);
+ const value = CartesianType.add(v02, v12, v02);
+ CartesianType.add(value, v22, value);
+ if (normalize) {
+ CartesianType.normalize(value, value);
+ }
+ CartesianType.pack(
+ value,
+ currentValues,
+ insertedIndex * numberOfComponents
+ );
+ };
+}
+var interpolateAndPackCartesian4 = generateBarycentricInterpolateFunction(
+ Cartesian4_default,
+ 4
+);
+var interpolateAndPackCartesian3 = generateBarycentricInterpolateFunction(
+ Cartesian3_default,
+ 3
+);
+var interpolateAndPackCartesian2 = generateBarycentricInterpolateFunction(
+ Cartesian2_default,
+ 2
+);
+var interpolateAndPackBoolean = function(i0, i1, i2, coords, sourceValues, currentValues, insertedIndex) {
+ const v12 = sourceValues[i0] * coords.x;
+ const v22 = sourceValues[i1] * coords.y;
+ const v3 = sourceValues[i2] * coords.z;
+ currentValues[insertedIndex] = v12 + v22 + v3 > Math_default.EPSILON6 ? 1 : 0;
+};
+var p0Scratch = new Cartesian3_default();
+var p1Scratch = new Cartesian3_default();
+var p2Scratch = new Cartesian3_default();
+var barycentricScratch = new Cartesian3_default();
+function computeTriangleAttributes(i0, i1, i2, point, positions, normals, tangents, bitangents, texCoords, extrudeDirections, applyOffset, currentAttributes, customAttributeNames, customAttributesLength, allAttributes, insertedIndex) {
+ if (!defined_default(normals) && !defined_default(tangents) && !defined_default(bitangents) && !defined_default(texCoords) && !defined_default(extrudeDirections) && customAttributesLength === 0) {
+ return;
+ }
+ const p0 = Cartesian3_default.fromArray(positions, i0 * 3, p0Scratch);
+ const p1 = Cartesian3_default.fromArray(positions, i1 * 3, p1Scratch);
+ const p2 = Cartesian3_default.fromArray(positions, i2 * 3, p2Scratch);
+ const coords = barycentricCoordinates_default(point, p0, p1, p2, barycentricScratch);
+ if (!defined_default(coords)) {
+ return;
+ }
+ if (defined_default(normals)) {
+ interpolateAndPackCartesian3(
+ i0,
+ i1,
+ i2,
+ coords,
+ normals,
+ currentAttributes.normal.values,
+ insertedIndex,
+ true
+ );
+ }
+ if (defined_default(extrudeDirections)) {
+ const d0 = Cartesian3_default.fromArray(extrudeDirections, i0 * 3, p0Scratch);
+ const d1 = Cartesian3_default.fromArray(extrudeDirections, i1 * 3, p1Scratch);
+ const d2 = Cartesian3_default.fromArray(extrudeDirections, i2 * 3, p2Scratch);
+ Cartesian3_default.multiplyByScalar(d0, coords.x, d0);
+ Cartesian3_default.multiplyByScalar(d1, coords.y, d1);
+ Cartesian3_default.multiplyByScalar(d2, coords.z, d2);
+ let direction;
+ if (!Cartesian3_default.equals(d0, Cartesian3_default.ZERO) || !Cartesian3_default.equals(d1, Cartesian3_default.ZERO) || !Cartesian3_default.equals(d2, Cartesian3_default.ZERO)) {
+ direction = Cartesian3_default.add(d0, d1, d0);
+ Cartesian3_default.add(direction, d2, direction);
+ Cartesian3_default.normalize(direction, direction);
+ } else {
+ direction = p0Scratch;
+ direction.x = 0;
+ direction.y = 0;
+ direction.z = 0;
+ }
+ Cartesian3_default.pack(
+ direction,
+ currentAttributes.extrudeDirection.values,
+ insertedIndex * 3
+ );
+ }
+ if (defined_default(applyOffset)) {
+ interpolateAndPackBoolean(
+ i0,
+ i1,
+ i2,
+ coords,
+ applyOffset,
+ currentAttributes.applyOffset.values,
+ insertedIndex
+ );
+ }
+ if (defined_default(tangents)) {
+ interpolateAndPackCartesian3(
+ i0,
+ i1,
+ i2,
+ coords,
+ tangents,
+ currentAttributes.tangent.values,
+ insertedIndex,
+ true
+ );
+ }
+ if (defined_default(bitangents)) {
+ interpolateAndPackCartesian3(
+ i0,
+ i1,
+ i2,
+ coords,
+ bitangents,
+ currentAttributes.bitangent.values,
+ insertedIndex,
+ true
+ );
+ }
+ if (defined_default(texCoords)) {
+ interpolateAndPackCartesian2(
+ i0,
+ i1,
+ i2,
+ coords,
+ texCoords,
+ currentAttributes.st.values,
+ insertedIndex
+ );
+ }
+ if (customAttributesLength > 0) {
+ for (let i = 0; i < customAttributesLength; i++) {
+ const attributeName = customAttributeNames[i];
+ genericInterpolate(
+ i0,
+ i1,
+ i2,
+ coords,
+ insertedIndex,
+ allAttributes[attributeName],
+ currentAttributes[attributeName]
+ );
+ }
+ }
+}
+function genericInterpolate(i0, i1, i2, coords, insertedIndex, sourceAttribute, currentAttribute) {
+ const componentsPerAttribute = sourceAttribute.componentsPerAttribute;
+ const sourceValues = sourceAttribute.values;
+ const currentValues = currentAttribute.values;
+ switch (componentsPerAttribute) {
+ case 4:
+ interpolateAndPackCartesian4(
+ i0,
+ i1,
+ i2,
+ coords,
+ sourceValues,
+ currentValues,
+ insertedIndex,
+ false
+ );
+ break;
+ case 3:
+ interpolateAndPackCartesian3(
+ i0,
+ i1,
+ i2,
+ coords,
+ sourceValues,
+ currentValues,
+ insertedIndex,
+ false
+ );
+ break;
+ case 2:
+ interpolateAndPackCartesian2(
+ i0,
+ i1,
+ i2,
+ coords,
+ sourceValues,
+ currentValues,
+ insertedIndex,
+ false
+ );
+ break;
+ default:
+ currentValues[insertedIndex] = sourceValues[i0] * coords.x + sourceValues[i1] * coords.y + sourceValues[i2] * coords.z;
+ }
+}
+function insertSplitPoint(currentAttributes, currentIndices, currentIndexMap, indices, currentIndex, point) {
+ const insertIndex = currentAttributes.position.values.length / 3;
+ if (currentIndex !== -1) {
+ const prevIndex = indices[currentIndex];
+ const newIndex = currentIndexMap[prevIndex];
+ if (newIndex === -1) {
+ currentIndexMap[prevIndex] = insertIndex;
+ currentAttributes.position.values.push(point.x, point.y, point.z);
+ currentIndices.push(insertIndex);
+ return insertIndex;
+ }
+ currentIndices.push(newIndex);
+ return newIndex;
+ }
+ currentAttributes.position.values.push(point.x, point.y, point.z);
+ currentIndices.push(insertIndex);
+ return insertIndex;
+}
+var NAMED_ATTRIBUTES = {
+ position: true,
+ normal: true,
+ bitangent: true,
+ tangent: true,
+ st: true,
+ extrudeDirection: true,
+ applyOffset: true
+};
+function splitLongitudeTriangles(instance) {
+ const geometry = instance.geometry;
+ const attributes = geometry.attributes;
+ const positions = attributes.position.values;
+ const normals = defined_default(attributes.normal) ? attributes.normal.values : void 0;
+ const bitangents = defined_default(attributes.bitangent) ? attributes.bitangent.values : void 0;
+ const tangents = defined_default(attributes.tangent) ? attributes.tangent.values : void 0;
+ const texCoords = defined_default(attributes.st) ? attributes.st.values : void 0;
+ const extrudeDirections = defined_default(attributes.extrudeDirection) ? attributes.extrudeDirection.values : void 0;
+ const applyOffset = defined_default(attributes.applyOffset) ? attributes.applyOffset.values : void 0;
+ const indices = geometry.indices;
+ const customAttributeNames = [];
+ for (const attributeName in attributes) {
+ if (attributes.hasOwnProperty(attributeName) && !NAMED_ATTRIBUTES[attributeName] && defined_default(attributes[attributeName])) {
+ customAttributeNames.push(attributeName);
+ }
+ }
+ const customAttributesLength = customAttributeNames.length;
+ const eastGeometry = copyGeometryForSplit(geometry);
+ const westGeometry = copyGeometryForSplit(geometry);
+ let currentAttributes;
+ let currentIndices;
+ let currentIndexMap;
+ let insertedIndex;
+ let i;
+ const westGeometryIndexMap = [];
+ westGeometryIndexMap.length = positions.length / 3;
+ const eastGeometryIndexMap = [];
+ eastGeometryIndexMap.length = positions.length / 3;
+ for (i = 0; i < westGeometryIndexMap.length; ++i) {
+ westGeometryIndexMap[i] = -1;
+ eastGeometryIndexMap[i] = -1;
+ }
+ const len = indices.length;
+ for (i = 0; i < len; i += 3) {
+ const i0 = indices[i];
+ const i1 = indices[i + 1];
+ const i2 = indices[i + 2];
+ let p0 = Cartesian3_default.fromArray(positions, i0 * 3);
+ let p1 = Cartesian3_default.fromArray(positions, i1 * 3);
+ let p2 = Cartesian3_default.fromArray(positions, i2 * 3);
+ const result = splitTriangle(p0, p1, p2);
+ if (defined_default(result) && result.positions.length > 3) {
+ const resultPositions = result.positions;
+ const resultIndices = result.indices;
+ const resultLength = resultIndices.length;
+ for (let j = 0; j < resultLength; ++j) {
+ const resultIndex = resultIndices[j];
+ const point = resultPositions[resultIndex];
+ if (point.y < 0) {
+ currentAttributes = westGeometry.attributes;
+ currentIndices = westGeometry.indices;
+ currentIndexMap = westGeometryIndexMap;
+ } else {
+ currentAttributes = eastGeometry.attributes;
+ currentIndices = eastGeometry.indices;
+ currentIndexMap = eastGeometryIndexMap;
+ }
+ insertedIndex = insertSplitPoint(
+ currentAttributes,
+ currentIndices,
+ currentIndexMap,
+ indices,
+ resultIndex < 3 ? i + resultIndex : -1,
+ point
+ );
+ computeTriangleAttributes(
+ i0,
+ i1,
+ i2,
+ point,
+ positions,
+ normals,
+ tangents,
+ bitangents,
+ texCoords,
+ extrudeDirections,
+ applyOffset,
+ currentAttributes,
+ customAttributeNames,
+ customAttributesLength,
+ attributes,
+ insertedIndex
+ );
+ }
+ } else {
+ if (defined_default(result)) {
+ p0 = result.positions[0];
+ p1 = result.positions[1];
+ p2 = result.positions[2];
+ }
+ if (p0.y < 0) {
+ currentAttributes = westGeometry.attributes;
+ currentIndices = westGeometry.indices;
+ currentIndexMap = westGeometryIndexMap;
+ } else {
+ currentAttributes = eastGeometry.attributes;
+ currentIndices = eastGeometry.indices;
+ currentIndexMap = eastGeometryIndexMap;
+ }
+ insertedIndex = insertSplitPoint(
+ currentAttributes,
+ currentIndices,
+ currentIndexMap,
+ indices,
+ i,
+ p0
+ );
+ computeTriangleAttributes(
+ i0,
+ i1,
+ i2,
+ p0,
+ positions,
+ normals,
+ tangents,
+ bitangents,
+ texCoords,
+ extrudeDirections,
+ applyOffset,
+ currentAttributes,
+ customAttributeNames,
+ customAttributesLength,
+ attributes,
+ insertedIndex
+ );
+ insertedIndex = insertSplitPoint(
+ currentAttributes,
+ currentIndices,
+ currentIndexMap,
+ indices,
+ i + 1,
+ p1
+ );
+ computeTriangleAttributes(
+ i0,
+ i1,
+ i2,
+ p1,
+ positions,
+ normals,
+ tangents,
+ bitangents,
+ texCoords,
+ extrudeDirections,
+ applyOffset,
+ currentAttributes,
+ customAttributeNames,
+ customAttributesLength,
+ attributes,
+ insertedIndex
+ );
+ insertedIndex = insertSplitPoint(
+ currentAttributes,
+ currentIndices,
+ currentIndexMap,
+ indices,
+ i + 2,
+ p2
+ );
+ computeTriangleAttributes(
+ i0,
+ i1,
+ i2,
+ p2,
+ positions,
+ normals,
+ tangents,
+ bitangents,
+ texCoords,
+ extrudeDirections,
+ applyOffset,
+ currentAttributes,
+ customAttributeNames,
+ customAttributesLength,
+ attributes,
+ insertedIndex
+ );
+ }
+ }
+ updateInstanceAfterSplit(instance, westGeometry, eastGeometry);
+}
+var xzPlane = Plane_default.fromPointNormal(Cartesian3_default.ZERO, Cartesian3_default.UNIT_Y);
+var offsetScratch = new Cartesian3_default();
+var offsetPointScratch = new Cartesian3_default();
+function computeLineAttributes(i0, i1, point, positions, insertIndex, currentAttributes, applyOffset) {
+ if (!defined_default(applyOffset)) {
+ return;
+ }
+ const p0 = Cartesian3_default.fromArray(positions, i0 * 3, p0Scratch);
+ if (Cartesian3_default.equalsEpsilon(p0, point, Math_default.EPSILON10)) {
+ currentAttributes.applyOffset.values[insertIndex] = applyOffset[i0];
+ } else {
+ currentAttributes.applyOffset.values[insertIndex] = applyOffset[i1];
+ }
+}
+function splitLongitudeLines(instance) {
+ const geometry = instance.geometry;
+ const attributes = geometry.attributes;
+ const positions = attributes.position.values;
+ const applyOffset = defined_default(attributes.applyOffset) ? attributes.applyOffset.values : void 0;
+ const indices = geometry.indices;
+ const eastGeometry = copyGeometryForSplit(geometry);
+ const westGeometry = copyGeometryForSplit(geometry);
+ let i;
+ const length = indices.length;
+ const westGeometryIndexMap = [];
+ westGeometryIndexMap.length = positions.length / 3;
+ const eastGeometryIndexMap = [];
+ eastGeometryIndexMap.length = positions.length / 3;
+ for (i = 0; i < westGeometryIndexMap.length; ++i) {
+ westGeometryIndexMap[i] = -1;
+ eastGeometryIndexMap[i] = -1;
+ }
+ for (i = 0; i < length; i += 2) {
+ const i0 = indices[i];
+ const i1 = indices[i + 1];
+ const p0 = Cartesian3_default.fromArray(positions, i0 * 3, p0Scratch);
+ const p1 = Cartesian3_default.fromArray(positions, i1 * 3, p1Scratch);
+ let insertIndex;
+ if (Math.abs(p0.y) < Math_default.EPSILON6) {
+ if (p0.y < 0) {
+ p0.y = -Math_default.EPSILON6;
+ } else {
+ p0.y = Math_default.EPSILON6;
+ }
+ }
+ if (Math.abs(p1.y) < Math_default.EPSILON6) {
+ if (p1.y < 0) {
+ p1.y = -Math_default.EPSILON6;
+ } else {
+ p1.y = Math_default.EPSILON6;
+ }
+ }
+ let p0Attributes = eastGeometry.attributes;
+ let p0Indices = eastGeometry.indices;
+ let p0IndexMap = eastGeometryIndexMap;
+ let p1Attributes = westGeometry.attributes;
+ let p1Indices = westGeometry.indices;
+ let p1IndexMap = westGeometryIndexMap;
+ const intersection = IntersectionTests_default.lineSegmentPlane(
+ p0,
+ p1,
+ xzPlane,
+ p2Scratch
+ );
+ if (defined_default(intersection)) {
+ const offset = Cartesian3_default.multiplyByScalar(
+ Cartesian3_default.UNIT_Y,
+ 5 * Math_default.EPSILON9,
+ offsetScratch
+ );
+ if (p0.y < 0) {
+ Cartesian3_default.negate(offset, offset);
+ p0Attributes = westGeometry.attributes;
+ p0Indices = westGeometry.indices;
+ p0IndexMap = westGeometryIndexMap;
+ p1Attributes = eastGeometry.attributes;
+ p1Indices = eastGeometry.indices;
+ p1IndexMap = eastGeometryIndexMap;
+ }
+ const offsetPoint = Cartesian3_default.add(
+ intersection,
+ offset,
+ offsetPointScratch
+ );
+ insertIndex = insertSplitPoint(
+ p0Attributes,
+ p0Indices,
+ p0IndexMap,
+ indices,
+ i,
+ p0
+ );
+ computeLineAttributes(
+ i0,
+ i1,
+ p0,
+ positions,
+ insertIndex,
+ p0Attributes,
+ applyOffset
+ );
+ insertIndex = insertSplitPoint(
+ p0Attributes,
+ p0Indices,
+ p0IndexMap,
+ indices,
+ -1,
+ offsetPoint
+ );
+ computeLineAttributes(
+ i0,
+ i1,
+ offsetPoint,
+ positions,
+ insertIndex,
+ p0Attributes,
+ applyOffset
+ );
+ Cartesian3_default.negate(offset, offset);
+ Cartesian3_default.add(intersection, offset, offsetPoint);
+ insertIndex = insertSplitPoint(
+ p1Attributes,
+ p1Indices,
+ p1IndexMap,
+ indices,
+ -1,
+ offsetPoint
+ );
+ computeLineAttributes(
+ i0,
+ i1,
+ offsetPoint,
+ positions,
+ insertIndex,
+ p1Attributes,
+ applyOffset
+ );
+ insertIndex = insertSplitPoint(
+ p1Attributes,
+ p1Indices,
+ p1IndexMap,
+ indices,
+ i + 1,
+ p1
+ );
+ computeLineAttributes(
+ i0,
+ i1,
+ p1,
+ positions,
+ insertIndex,
+ p1Attributes,
+ applyOffset
+ );
+ } else {
+ let currentAttributes;
+ let currentIndices;
+ let currentIndexMap;
+ if (p0.y < 0) {
+ currentAttributes = westGeometry.attributes;
+ currentIndices = westGeometry.indices;
+ currentIndexMap = westGeometryIndexMap;
+ } else {
+ currentAttributes = eastGeometry.attributes;
+ currentIndices = eastGeometry.indices;
+ currentIndexMap = eastGeometryIndexMap;
+ }
+ insertIndex = insertSplitPoint(
+ currentAttributes,
+ currentIndices,
+ currentIndexMap,
+ indices,
+ i,
+ p0
+ );
+ computeLineAttributes(
+ i0,
+ i1,
+ p0,
+ positions,
+ insertIndex,
+ currentAttributes,
+ applyOffset
+ );
+ insertIndex = insertSplitPoint(
+ currentAttributes,
+ currentIndices,
+ currentIndexMap,
+ indices,
+ i + 1,
+ p1
+ );
+ computeLineAttributes(
+ i0,
+ i1,
+ p1,
+ positions,
+ insertIndex,
+ currentAttributes,
+ applyOffset
+ );
+ }
+ }
+ updateInstanceAfterSplit(instance, westGeometry, eastGeometry);
+}
+var cartesian2Scratch0 = new Cartesian2_default();
+var cartesian2Scratch1 = new Cartesian2_default();
+var cartesian3Scratch0 = new Cartesian3_default();
+var cartesian3Scratch2 = new Cartesian3_default();
+var cartesian3Scratch3 = new Cartesian3_default();
+var cartesian3Scratch4 = new Cartesian3_default();
+var cartesian3Scratch5 = new Cartesian3_default();
+var cartesian3Scratch6 = new Cartesian3_default();
+var cartesian4Scratch0 = new Cartesian4_default();
+function updateAdjacencyAfterSplit(geometry) {
+ const attributes = geometry.attributes;
+ const positions = attributes.position.values;
+ const prevPositions = attributes.prevPosition.values;
+ const nextPositions = attributes.nextPosition.values;
+ const length = positions.length;
+ for (let j = 0; j < length; j += 3) {
+ const position = Cartesian3_default.unpack(positions, j, cartesian3Scratch0);
+ if (position.x > 0) {
+ continue;
+ }
+ const prevPosition = Cartesian3_default.unpack(
+ prevPositions,
+ j,
+ cartesian3Scratch2
+ );
+ if (position.y < 0 && prevPosition.y > 0 || position.y > 0 && prevPosition.y < 0) {
+ if (j - 3 > 0) {
+ prevPositions[j] = positions[j - 3];
+ prevPositions[j + 1] = positions[j - 2];
+ prevPositions[j + 2] = positions[j - 1];
+ } else {
+ Cartesian3_default.pack(position, prevPositions, j);
+ }
+ }
+ const nextPosition = Cartesian3_default.unpack(
+ nextPositions,
+ j,
+ cartesian3Scratch3
+ );
+ if (position.y < 0 && nextPosition.y > 0 || position.y > 0 && nextPosition.y < 0) {
+ if (j + 3 < length) {
+ nextPositions[j] = positions[j + 3];
+ nextPositions[j + 1] = positions[j + 4];
+ nextPositions[j + 2] = positions[j + 5];
+ } else {
+ Cartesian3_default.pack(position, nextPositions, j);
+ }
+ }
+ }
+}
+var offsetScalar = 5 * Math_default.EPSILON9;
+var coplanarOffset = Math_default.EPSILON6;
+function splitLongitudePolyline(instance) {
+ const geometry = instance.geometry;
+ const attributes = geometry.attributes;
+ const positions = attributes.position.values;
+ const prevPositions = attributes.prevPosition.values;
+ const nextPositions = attributes.nextPosition.values;
+ const expandAndWidths = attributes.expandAndWidth.values;
+ const texCoords = defined_default(attributes.st) ? attributes.st.values : void 0;
+ const colors = defined_default(attributes.color) ? attributes.color.values : void 0;
+ const eastGeometry = copyGeometryForSplit(geometry);
+ const westGeometry = copyGeometryForSplit(geometry);
+ let i;
+ let j;
+ let index;
+ let intersectionFound = false;
+ const length = positions.length / 3;
+ for (i = 0; i < length; i += 4) {
+ const i0 = i;
+ const i2 = i + 2;
+ const p0 = Cartesian3_default.fromArray(positions, i0 * 3, cartesian3Scratch0);
+ const p2 = Cartesian3_default.fromArray(positions, i2 * 3, cartesian3Scratch2);
+ if (Math.abs(p0.y) < coplanarOffset) {
+ p0.y = coplanarOffset * (p2.y < 0 ? -1 : 1);
+ positions[i * 3 + 1] = p0.y;
+ positions[(i + 1) * 3 + 1] = p0.y;
+ for (j = i0 * 3; j < i0 * 3 + 4 * 3; j += 3) {
+ prevPositions[j] = positions[i * 3];
+ prevPositions[j + 1] = positions[i * 3 + 1];
+ prevPositions[j + 2] = positions[i * 3 + 2];
+ }
+ }
+ if (Math.abs(p2.y) < coplanarOffset) {
+ p2.y = coplanarOffset * (p0.y < 0 ? -1 : 1);
+ positions[(i + 2) * 3 + 1] = p2.y;
+ positions[(i + 3) * 3 + 1] = p2.y;
+ for (j = i0 * 3; j < i0 * 3 + 4 * 3; j += 3) {
+ nextPositions[j] = positions[(i + 2) * 3];
+ nextPositions[j + 1] = positions[(i + 2) * 3 + 1];
+ nextPositions[j + 2] = positions[(i + 2) * 3 + 2];
+ }
+ }
+ let p0Attributes = eastGeometry.attributes;
+ let p0Indices = eastGeometry.indices;
+ let p2Attributes = westGeometry.attributes;
+ let p2Indices = westGeometry.indices;
+ const intersection = IntersectionTests_default.lineSegmentPlane(
+ p0,
+ p2,
+ xzPlane,
+ cartesian3Scratch4
+ );
+ if (defined_default(intersection)) {
+ intersectionFound = true;
+ const offset = Cartesian3_default.multiplyByScalar(
+ Cartesian3_default.UNIT_Y,
+ offsetScalar,
+ cartesian3Scratch5
+ );
+ if (p0.y < 0) {
+ Cartesian3_default.negate(offset, offset);
+ p0Attributes = westGeometry.attributes;
+ p0Indices = westGeometry.indices;
+ p2Attributes = eastGeometry.attributes;
+ p2Indices = eastGeometry.indices;
+ }
+ const offsetPoint = Cartesian3_default.add(
+ intersection,
+ offset,
+ cartesian3Scratch6
+ );
+ p0Attributes.position.values.push(p0.x, p0.y, p0.z, p0.x, p0.y, p0.z);
+ p0Attributes.position.values.push(
+ offsetPoint.x,
+ offsetPoint.y,
+ offsetPoint.z
+ );
+ p0Attributes.position.values.push(
+ offsetPoint.x,
+ offsetPoint.y,
+ offsetPoint.z
+ );
+ p0Attributes.prevPosition.values.push(
+ prevPositions[i0 * 3],
+ prevPositions[i0 * 3 + 1],
+ prevPositions[i0 * 3 + 2]
+ );
+ p0Attributes.prevPosition.values.push(
+ prevPositions[i0 * 3 + 3],
+ prevPositions[i0 * 3 + 4],
+ prevPositions[i0 * 3 + 5]
+ );
+ p0Attributes.prevPosition.values.push(p0.x, p0.y, p0.z, p0.x, p0.y, p0.z);
+ p0Attributes.nextPosition.values.push(
+ offsetPoint.x,
+ offsetPoint.y,
+ offsetPoint.z
+ );
+ p0Attributes.nextPosition.values.push(
+ offsetPoint.x,
+ offsetPoint.y,
+ offsetPoint.z
+ );
+ p0Attributes.nextPosition.values.push(
+ offsetPoint.x,
+ offsetPoint.y,
+ offsetPoint.z
+ );
+ p0Attributes.nextPosition.values.push(
+ offsetPoint.x,
+ offsetPoint.y,
+ offsetPoint.z
+ );
+ Cartesian3_default.negate(offset, offset);
+ Cartesian3_default.add(intersection, offset, offsetPoint);
+ p2Attributes.position.values.push(
+ offsetPoint.x,
+ offsetPoint.y,
+ offsetPoint.z
+ );
+ p2Attributes.position.values.push(
+ offsetPoint.x,
+ offsetPoint.y,
+ offsetPoint.z
+ );
+ p2Attributes.position.values.push(p2.x, p2.y, p2.z, p2.x, p2.y, p2.z);
+ p2Attributes.prevPosition.values.push(
+ offsetPoint.x,
+ offsetPoint.y,
+ offsetPoint.z
+ );
+ p2Attributes.prevPosition.values.push(
+ offsetPoint.x,
+ offsetPoint.y,
+ offsetPoint.z
+ );
+ p2Attributes.prevPosition.values.push(
+ offsetPoint.x,
+ offsetPoint.y,
+ offsetPoint.z
+ );
+ p2Attributes.prevPosition.values.push(
+ offsetPoint.x,
+ offsetPoint.y,
+ offsetPoint.z
+ );
+ p2Attributes.nextPosition.values.push(p2.x, p2.y, p2.z, p2.x, p2.y, p2.z);
+ p2Attributes.nextPosition.values.push(
+ nextPositions[i2 * 3],
+ nextPositions[i2 * 3 + 1],
+ nextPositions[i2 * 3 + 2]
+ );
+ p2Attributes.nextPosition.values.push(
+ nextPositions[i2 * 3 + 3],
+ nextPositions[i2 * 3 + 4],
+ nextPositions[i2 * 3 + 5]
+ );
+ const ew0 = Cartesian2_default.fromArray(
+ expandAndWidths,
+ i0 * 2,
+ cartesian2Scratch0
+ );
+ const width = Math.abs(ew0.y);
+ p0Attributes.expandAndWidth.values.push(-1, width, 1, width);
+ p0Attributes.expandAndWidth.values.push(-1, -width, 1, -width);
+ p2Attributes.expandAndWidth.values.push(-1, width, 1, width);
+ p2Attributes.expandAndWidth.values.push(-1, -width, 1, -width);
+ let t = Cartesian3_default.magnitudeSquared(
+ Cartesian3_default.subtract(intersection, p0, cartesian3Scratch3)
+ );
+ t /= Cartesian3_default.magnitudeSquared(
+ Cartesian3_default.subtract(p2, p0, cartesian3Scratch3)
+ );
+ if (defined_default(colors)) {
+ const c0 = Cartesian4_default.fromArray(colors, i0 * 4, cartesian4Scratch0);
+ const c2 = Cartesian4_default.fromArray(colors, i2 * 4, cartesian4Scratch0);
+ const r = Math_default.lerp(c0.x, c2.x, t);
+ const g = Math_default.lerp(c0.y, c2.y, t);
+ const b = Math_default.lerp(c0.z, c2.z, t);
+ const a = Math_default.lerp(c0.w, c2.w, t);
+ for (j = i0 * 4; j < i0 * 4 + 2 * 4; ++j) {
+ p0Attributes.color.values.push(colors[j]);
+ }
+ p0Attributes.color.values.push(r, g, b, a);
+ p0Attributes.color.values.push(r, g, b, a);
+ p2Attributes.color.values.push(r, g, b, a);
+ p2Attributes.color.values.push(r, g, b, a);
+ for (j = i2 * 4; j < i2 * 4 + 2 * 4; ++j) {
+ p2Attributes.color.values.push(colors[j]);
+ }
+ }
+ if (defined_default(texCoords)) {
+ const s0 = Cartesian2_default.fromArray(texCoords, i0 * 2, cartesian2Scratch0);
+ const s3 = Cartesian2_default.fromArray(
+ texCoords,
+ (i + 3) * 2,
+ cartesian2Scratch1
+ );
+ const sx = Math_default.lerp(s0.x, s3.x, t);
+ for (j = i0 * 2; j < i0 * 2 + 2 * 2; ++j) {
+ p0Attributes.st.values.push(texCoords[j]);
+ }
+ p0Attributes.st.values.push(sx, s0.y);
+ p0Attributes.st.values.push(sx, s3.y);
+ p2Attributes.st.values.push(sx, s0.y);
+ p2Attributes.st.values.push(sx, s3.y);
+ for (j = i2 * 2; j < i2 * 2 + 2 * 2; ++j) {
+ p2Attributes.st.values.push(texCoords[j]);
+ }
+ }
+ index = p0Attributes.position.values.length / 3 - 4;
+ p0Indices.push(index, index + 2, index + 1);
+ p0Indices.push(index + 1, index + 2, index + 3);
+ index = p2Attributes.position.values.length / 3 - 4;
+ p2Indices.push(index, index + 2, index + 1);
+ p2Indices.push(index + 1, index + 2, index + 3);
+ } else {
+ let currentAttributes;
+ let currentIndices;
+ if (p0.y < 0) {
+ currentAttributes = westGeometry.attributes;
+ currentIndices = westGeometry.indices;
+ } else {
+ currentAttributes = eastGeometry.attributes;
+ currentIndices = eastGeometry.indices;
+ }
+ currentAttributes.position.values.push(p0.x, p0.y, p0.z);
+ currentAttributes.position.values.push(p0.x, p0.y, p0.z);
+ currentAttributes.position.values.push(p2.x, p2.y, p2.z);
+ currentAttributes.position.values.push(p2.x, p2.y, p2.z);
+ for (j = i * 3; j < i * 3 + 4 * 3; ++j) {
+ currentAttributes.prevPosition.values.push(prevPositions[j]);
+ currentAttributes.nextPosition.values.push(nextPositions[j]);
+ }
+ for (j = i * 2; j < i * 2 + 4 * 2; ++j) {
+ currentAttributes.expandAndWidth.values.push(expandAndWidths[j]);
+ if (defined_default(texCoords)) {
+ currentAttributes.st.values.push(texCoords[j]);
+ }
+ }
+ if (defined_default(colors)) {
+ for (j = i * 4; j < i * 4 + 4 * 4; ++j) {
+ currentAttributes.color.values.push(colors[j]);
+ }
+ }
+ index = currentAttributes.position.values.length / 3 - 4;
+ currentIndices.push(index, index + 2, index + 1);
+ currentIndices.push(index + 1, index + 2, index + 3);
+ }
+ }
+ if (intersectionFound) {
+ updateAdjacencyAfterSplit(westGeometry);
+ updateAdjacencyAfterSplit(eastGeometry);
+ }
+ updateInstanceAfterSplit(instance, westGeometry, eastGeometry);
+}
+GeometryPipeline.splitLongitude = function(instance) {
+ if (!defined_default(instance)) {
+ throw new DeveloperError_default("instance is required.");
+ }
+ const geometry = instance.geometry;
+ const boundingSphere = geometry.boundingSphere;
+ if (defined_default(boundingSphere)) {
+ const minX = boundingSphere.center.x - boundingSphere.radius;
+ if (minX > 0 || BoundingSphere_default.intersectPlane(boundingSphere, Plane_default.ORIGIN_ZX_PLANE) !== Intersect_default.INTERSECTING) {
+ return instance;
+ }
+ }
+ if (geometry.geometryType !== GeometryType_default.NONE) {
+ switch (geometry.geometryType) {
+ case GeometryType_default.POLYLINES:
+ splitLongitudePolyline(instance);
+ break;
+ case GeometryType_default.TRIANGLES:
+ splitLongitudeTriangles(instance);
+ break;
+ case GeometryType_default.LINES:
+ splitLongitudeLines(instance);
+ break;
+ }
+ } else {
+ indexPrimitive(geometry);
+ if (geometry.primitiveType === PrimitiveType_default.TRIANGLES) {
+ splitLongitudeTriangles(instance);
+ } else if (geometry.primitiveType === PrimitiveType_default.LINES) {
+ splitLongitudeLines(instance);
+ }
+ }
+ return instance;
+};
+var GeometryPipeline_default = GeometryPipeline;
+
+export {
+ GeometryPipeline_default
+};
diff --git a/public/assets/cesium/Workers/chunk-BVKITG4N.js b/public/assets/cesium/Workers/chunk-BVKITG4N.js
new file mode 100644
index 0000000000000000000000000000000000000000..f2a34c1d7da8e29a09517f2db1fda8647956e652
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-BVKITG4N.js
@@ -0,0 +1,239 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ GeographicProjection_default
+} from "./chunk-KHZNBFOH.js";
+import {
+ Matrix2_default,
+ Rectangle_default
+} from "./chunk-6SQMLVGV.js";
+import {
+ Cartesian3_default,
+ Cartographic_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import {
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/RectangleGeometryLibrary.js
+var cos = Math.cos;
+var sin = Math.sin;
+var sqrt = Math.sqrt;
+var RectangleGeometryLibrary = {};
+RectangleGeometryLibrary.computePosition = function(computedOptions, ellipsoid, computeST, row, col, position, st) {
+ const radiiSquared = ellipsoid.radiiSquared;
+ const nwCorner = computedOptions.nwCorner;
+ const rectangle = computedOptions.boundingRectangle;
+ let stLatitude = nwCorner.latitude - computedOptions.granYCos * row + col * computedOptions.granXSin;
+ const cosLatitude = cos(stLatitude);
+ const nZ = sin(stLatitude);
+ const kZ = radiiSquared.z * nZ;
+ let stLongitude = nwCorner.longitude + row * computedOptions.granYSin + col * computedOptions.granXCos;
+ const nX = cosLatitude * cos(stLongitude);
+ const nY = cosLatitude * sin(stLongitude);
+ const kX = radiiSquared.x * nX;
+ const kY = radiiSquared.y * nY;
+ const gamma = sqrt(kX * nX + kY * nY + kZ * nZ);
+ position.x = kX / gamma;
+ position.y = kY / gamma;
+ position.z = kZ / gamma;
+ if (computeST) {
+ const stNwCorner = computedOptions.stNwCorner;
+ if (defined_default(stNwCorner)) {
+ stLatitude = stNwCorner.latitude - computedOptions.stGranYCos * row + col * computedOptions.stGranXSin;
+ stLongitude = stNwCorner.longitude + row * computedOptions.stGranYSin + col * computedOptions.stGranXCos;
+ st.x = (stLongitude - computedOptions.stWest) * computedOptions.lonScalar;
+ st.y = (stLatitude - computedOptions.stSouth) * computedOptions.latScalar;
+ } else {
+ st.x = (stLongitude - rectangle.west) * computedOptions.lonScalar;
+ st.y = (stLatitude - rectangle.south) * computedOptions.latScalar;
+ }
+ }
+};
+var rotationMatrixScratch = new Matrix2_default();
+var nwCartesian = new Cartesian3_default();
+var centerScratch = new Cartographic_default();
+var centerCartesian = new Cartesian3_default();
+var proj = new GeographicProjection_default();
+function getRotationOptions(nwCorner, rotation, granularityX, granularityY, center, width, height) {
+ const cosRotation = Math.cos(rotation);
+ const granYCos = granularityY * cosRotation;
+ const granXCos = granularityX * cosRotation;
+ const sinRotation = Math.sin(rotation);
+ const granYSin = granularityY * sinRotation;
+ const granXSin = granularityX * sinRotation;
+ proj._ellipsoid = Ellipsoid_default.default;
+ nwCartesian = proj.project(nwCorner, nwCartesian);
+ nwCartesian = Cartesian3_default.subtract(nwCartesian, centerCartesian, nwCartesian);
+ const rotationMatrix = Matrix2_default.fromRotation(rotation, rotationMatrixScratch);
+ nwCartesian = Matrix2_default.multiplyByVector(
+ rotationMatrix,
+ nwCartesian,
+ nwCartesian
+ );
+ nwCartesian = Cartesian3_default.add(nwCartesian, centerCartesian, nwCartesian);
+ nwCorner = proj.unproject(nwCartesian, nwCorner);
+ width -= 1;
+ height -= 1;
+ const latitude = nwCorner.latitude;
+ const latitude0 = latitude + width * granXSin;
+ const latitude1 = latitude - granYCos * height;
+ const latitude2 = latitude - granYCos * height + width * granXSin;
+ const north = Math.max(latitude, latitude0, latitude1, latitude2);
+ const south = Math.min(latitude, latitude0, latitude1, latitude2);
+ const longitude = nwCorner.longitude;
+ const longitude0 = longitude + width * granXCos;
+ const longitude1 = longitude + height * granYSin;
+ const longitude2 = longitude + height * granYSin + width * granXCos;
+ const east = Math.max(longitude, longitude0, longitude1, longitude2);
+ const west = Math.min(longitude, longitude0, longitude1, longitude2);
+ return {
+ north,
+ south,
+ east,
+ west,
+ granYCos,
+ granYSin,
+ granXCos,
+ granXSin,
+ nwCorner
+ };
+}
+RectangleGeometryLibrary.computeOptions = function(rectangle, granularity, rotation, stRotation, boundingRectangleScratch, nwCornerResult, stNwCornerResult) {
+ let east = rectangle.east;
+ let west = rectangle.west;
+ let north = rectangle.north;
+ let south = rectangle.south;
+ let northCap = false;
+ let southCap = false;
+ if (north === Math_default.PI_OVER_TWO) {
+ northCap = true;
+ }
+ if (south === -Math_default.PI_OVER_TWO) {
+ southCap = true;
+ }
+ let dx;
+ const dy = north - south;
+ if (west > east) {
+ dx = Math_default.TWO_PI - west + east;
+ } else {
+ dx = east - west;
+ }
+ const width = Math.ceil(dx / granularity) + 1;
+ const height = Math.ceil(dy / granularity) + 1;
+ const granularityX = dx / (width - 1);
+ const granularityY = dy / (height - 1);
+ const nwCorner = Rectangle_default.northwest(rectangle, nwCornerResult);
+ const center = Rectangle_default.center(rectangle, centerScratch);
+ if (rotation !== 0 || stRotation !== 0) {
+ if (center.longitude < nwCorner.longitude) {
+ center.longitude += Math_default.TWO_PI;
+ }
+ proj._ellipsoid = Ellipsoid_default.default;
+ centerCartesian = proj.project(center, centerCartesian);
+ }
+ const granYCos = granularityY;
+ const granXCos = granularityX;
+ const granYSin = 0;
+ const granXSin = 0;
+ const boundingRectangle = Rectangle_default.clone(
+ rectangle,
+ boundingRectangleScratch
+ );
+ const computedOptions = {
+ granYCos,
+ granYSin,
+ granXCos,
+ granXSin,
+ nwCorner,
+ boundingRectangle,
+ width,
+ height,
+ northCap,
+ southCap
+ };
+ if (rotation !== 0) {
+ const rotationOptions = getRotationOptions(
+ nwCorner,
+ rotation,
+ granularityX,
+ granularityY,
+ center,
+ width,
+ height
+ );
+ north = rotationOptions.north;
+ south = rotationOptions.south;
+ east = rotationOptions.east;
+ west = rotationOptions.west;
+ if (north < -Math_default.PI_OVER_TWO || north > Math_default.PI_OVER_TWO || south < -Math_default.PI_OVER_TWO || south > Math_default.PI_OVER_TWO) {
+ throw new DeveloperError_default(
+ "Rotated rectangle is invalid. It crosses over either the north or south pole."
+ );
+ }
+ computedOptions.granYCos = rotationOptions.granYCos;
+ computedOptions.granYSin = rotationOptions.granYSin;
+ computedOptions.granXCos = rotationOptions.granXCos;
+ computedOptions.granXSin = rotationOptions.granXSin;
+ boundingRectangle.north = north;
+ boundingRectangle.south = south;
+ boundingRectangle.east = east;
+ boundingRectangle.west = west;
+ }
+ if (stRotation !== 0) {
+ rotation = rotation - stRotation;
+ const stNwCorner = Rectangle_default.northwest(boundingRectangle, stNwCornerResult);
+ const stRotationOptions = getRotationOptions(
+ stNwCorner,
+ rotation,
+ granularityX,
+ granularityY,
+ center,
+ width,
+ height
+ );
+ computedOptions.stGranYCos = stRotationOptions.granYCos;
+ computedOptions.stGranXCos = stRotationOptions.granXCos;
+ computedOptions.stGranYSin = stRotationOptions.granYSin;
+ computedOptions.stGranXSin = stRotationOptions.granXSin;
+ computedOptions.stNwCorner = stNwCorner;
+ computedOptions.stWest = stRotationOptions.west;
+ computedOptions.stSouth = stRotationOptions.south;
+ }
+ return computedOptions;
+};
+var RectangleGeometryLibrary_default = RectangleGeometryLibrary;
+
+export {
+ RectangleGeometryLibrary_default
+};
diff --git a/public/assets/cesium/Workers/chunk-C3EQ27WF.js b/public/assets/cesium/Workers/chunk-C3EQ27WF.js
new file mode 100644
index 0000000000000000000000000000000000000000..c4ad745013bb843754052aadc8a559dc65c7c551
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-C3EQ27WF.js
@@ -0,0 +1,353 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ Cartesian3_default,
+ Cartographic_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/EllipsoidGeodesic.js
+function setConstants(ellipsoidGeodesic) {
+ const uSquared = ellipsoidGeodesic._uSquared;
+ const a = ellipsoidGeodesic._ellipsoid.maximumRadius;
+ const b = ellipsoidGeodesic._ellipsoid.minimumRadius;
+ const f = (a - b) / a;
+ const cosineHeading = Math.cos(ellipsoidGeodesic._startHeading);
+ const sineHeading = Math.sin(ellipsoidGeodesic._startHeading);
+ const tanU = (1 - f) * Math.tan(ellipsoidGeodesic._start.latitude);
+ const cosineU = 1 / Math.sqrt(1 + tanU * tanU);
+ const sineU = cosineU * tanU;
+ const sigma = Math.atan2(tanU, cosineHeading);
+ const sineAlpha = cosineU * sineHeading;
+ const sineSquaredAlpha = sineAlpha * sineAlpha;
+ const cosineSquaredAlpha = 1 - sineSquaredAlpha;
+ const cosineAlpha = Math.sqrt(cosineSquaredAlpha);
+ const u2Over4 = uSquared / 4;
+ const u4Over16 = u2Over4 * u2Over4;
+ const u6Over64 = u4Over16 * u2Over4;
+ const u8Over256 = u4Over16 * u4Over16;
+ const a0 = 1 + u2Over4 - 3 * u4Over16 / 4 + 5 * u6Over64 / 4 - 175 * u8Over256 / 64;
+ const a1 = 1 - u2Over4 + 15 * u4Over16 / 8 - 35 * u6Over64 / 8;
+ const a2 = 1 - 3 * u2Over4 + 35 * u4Over16 / 4;
+ const a3 = 1 - 5 * u2Over4;
+ const distanceRatio = a0 * sigma - a1 * Math.sin(2 * sigma) * u2Over4 / 2 - a2 * Math.sin(4 * sigma) * u4Over16 / 16 - a3 * Math.sin(6 * sigma) * u6Over64 / 48 - Math.sin(8 * sigma) * 5 * u8Over256 / 512;
+ const constants = ellipsoidGeodesic._constants;
+ constants.a = a;
+ constants.b = b;
+ constants.f = f;
+ constants.cosineHeading = cosineHeading;
+ constants.sineHeading = sineHeading;
+ constants.tanU = tanU;
+ constants.cosineU = cosineU;
+ constants.sineU = sineU;
+ constants.sigma = sigma;
+ constants.sineAlpha = sineAlpha;
+ constants.sineSquaredAlpha = sineSquaredAlpha;
+ constants.cosineSquaredAlpha = cosineSquaredAlpha;
+ constants.cosineAlpha = cosineAlpha;
+ constants.u2Over4 = u2Over4;
+ constants.u4Over16 = u4Over16;
+ constants.u6Over64 = u6Over64;
+ constants.u8Over256 = u8Over256;
+ constants.a0 = a0;
+ constants.a1 = a1;
+ constants.a2 = a2;
+ constants.a3 = a3;
+ constants.distanceRatio = distanceRatio;
+}
+function computeC(f, cosineSquaredAlpha) {
+ return f * cosineSquaredAlpha * (4 + f * (4 - 3 * cosineSquaredAlpha)) / 16;
+}
+function computeDeltaLambda(f, sineAlpha, cosineSquaredAlpha, sigma, sineSigma, cosineSigma, cosineTwiceSigmaMidpoint) {
+ const C = computeC(f, cosineSquaredAlpha);
+ return (1 - C) * f * sineAlpha * (sigma + C * sineSigma * (cosineTwiceSigmaMidpoint + C * cosineSigma * (2 * cosineTwiceSigmaMidpoint * cosineTwiceSigmaMidpoint - 1)));
+}
+function vincentyInverseFormula(ellipsoidGeodesic, major, minor, firstLongitude, firstLatitude, secondLongitude, secondLatitude) {
+ const eff = (major - minor) / major;
+ const l = secondLongitude - firstLongitude;
+ const u1 = Math.atan((1 - eff) * Math.tan(firstLatitude));
+ const u2 = Math.atan((1 - eff) * Math.tan(secondLatitude));
+ const cosineU1 = Math.cos(u1);
+ const sineU1 = Math.sin(u1);
+ const cosineU2 = Math.cos(u2);
+ const sineU2 = Math.sin(u2);
+ const cc = cosineU1 * cosineU2;
+ const cs = cosineU1 * sineU2;
+ const ss = sineU1 * sineU2;
+ const sc = sineU1 * cosineU2;
+ let lambda = l;
+ let lambdaDot = Math_default.TWO_PI;
+ let cosineLambda = Math.cos(lambda);
+ let sineLambda = Math.sin(lambda);
+ let sigma;
+ let cosineSigma;
+ let sineSigma;
+ let cosineSquaredAlpha;
+ let cosineTwiceSigmaMidpoint;
+ do {
+ cosineLambda = Math.cos(lambda);
+ sineLambda = Math.sin(lambda);
+ const temp = cs - sc * cosineLambda;
+ sineSigma = Math.sqrt(
+ cosineU2 * cosineU2 * sineLambda * sineLambda + temp * temp
+ );
+ cosineSigma = ss + cc * cosineLambda;
+ sigma = Math.atan2(sineSigma, cosineSigma);
+ let sineAlpha;
+ if (sineSigma === 0) {
+ sineAlpha = 0;
+ cosineSquaredAlpha = 1;
+ } else {
+ sineAlpha = cc * sineLambda / sineSigma;
+ cosineSquaredAlpha = 1 - sineAlpha * sineAlpha;
+ }
+ lambdaDot = lambda;
+ cosineTwiceSigmaMidpoint = cosineSigma - 2 * ss / cosineSquaredAlpha;
+ if (!isFinite(cosineTwiceSigmaMidpoint)) {
+ cosineTwiceSigmaMidpoint = 0;
+ }
+ lambda = l + computeDeltaLambda(
+ eff,
+ sineAlpha,
+ cosineSquaredAlpha,
+ sigma,
+ sineSigma,
+ cosineSigma,
+ cosineTwiceSigmaMidpoint
+ );
+ } while (Math.abs(lambda - lambdaDot) > Math_default.EPSILON12);
+ const uSquared = cosineSquaredAlpha * (major * major - minor * minor) / (minor * minor);
+ const A = 1 + uSquared * (4096 + uSquared * (uSquared * (320 - 175 * uSquared) - 768)) / 16384;
+ const B = uSquared * (256 + uSquared * (uSquared * (74 - 47 * uSquared) - 128)) / 1024;
+ const cosineSquaredTwiceSigmaMidpoint = cosineTwiceSigmaMidpoint * cosineTwiceSigmaMidpoint;
+ const deltaSigma = B * sineSigma * (cosineTwiceSigmaMidpoint + B * (cosineSigma * (2 * cosineSquaredTwiceSigmaMidpoint - 1) - B * cosineTwiceSigmaMidpoint * (4 * sineSigma * sineSigma - 3) * (4 * cosineSquaredTwiceSigmaMidpoint - 3) / 6) / 4);
+ const distance = minor * A * (sigma - deltaSigma);
+ const startHeading = Math.atan2(
+ cosineU2 * sineLambda,
+ cs - sc * cosineLambda
+ );
+ const endHeading = Math.atan2(cosineU1 * sineLambda, cs * cosineLambda - sc);
+ ellipsoidGeodesic._distance = distance;
+ ellipsoidGeodesic._startHeading = startHeading;
+ ellipsoidGeodesic._endHeading = endHeading;
+ ellipsoidGeodesic._uSquared = uSquared;
+}
+var scratchCart1 = new Cartesian3_default();
+var scratchCart2 = new Cartesian3_default();
+function computeProperties(ellipsoidGeodesic, start, end, ellipsoid) {
+ const firstCartesian = Cartesian3_default.normalize(
+ ellipsoid.cartographicToCartesian(start, scratchCart2),
+ scratchCart1
+ );
+ const lastCartesian = Cartesian3_default.normalize(
+ ellipsoid.cartographicToCartesian(end, scratchCart2),
+ scratchCart2
+ );
+ Check_default.typeOf.number.greaterThanOrEquals(
+ "value",
+ Math.abs(
+ Math.abs(Cartesian3_default.angleBetween(firstCartesian, lastCartesian)) - Math.PI
+ ),
+ 0.0125
+ );
+ vincentyInverseFormula(
+ ellipsoidGeodesic,
+ ellipsoid.maximumRadius,
+ ellipsoid.minimumRadius,
+ start.longitude,
+ start.latitude,
+ end.longitude,
+ end.latitude
+ );
+ ellipsoidGeodesic._start = Cartographic_default.clone(
+ start,
+ ellipsoidGeodesic._start
+ );
+ ellipsoidGeodesic._end = Cartographic_default.clone(end, ellipsoidGeodesic._end);
+ ellipsoidGeodesic._start.height = 0;
+ ellipsoidGeodesic._end.height = 0;
+ setConstants(ellipsoidGeodesic);
+}
+function EllipsoidGeodesic(start, end, ellipsoid) {
+ const e = defaultValue_default(ellipsoid, Ellipsoid_default.default);
+ this._ellipsoid = e;
+ this._start = new Cartographic_default();
+ this._end = new Cartographic_default();
+ this._constants = {};
+ this._startHeading = void 0;
+ this._endHeading = void 0;
+ this._distance = void 0;
+ this._uSquared = void 0;
+ if (defined_default(start) && defined_default(end)) {
+ computeProperties(this, start, end, e);
+ }
+}
+Object.defineProperties(EllipsoidGeodesic.prototype, {
+ /**
+ * Gets the ellipsoid.
+ * @memberof EllipsoidGeodesic.prototype
+ * @type {Ellipsoid}
+ * @readonly
+ */
+ ellipsoid: {
+ get: function() {
+ return this._ellipsoid;
+ }
+ },
+ /**
+ * Gets the surface distance between the start and end point
+ * @memberof EllipsoidGeodesic.prototype
+ * @type {number}
+ * @readonly
+ */
+ surfaceDistance: {
+ get: function() {
+ Check_default.defined("distance", this._distance);
+ return this._distance;
+ }
+ },
+ /**
+ * Gets the initial planetodetic point on the path.
+ * @memberof EllipsoidGeodesic.prototype
+ * @type {Cartographic}
+ * @readonly
+ */
+ start: {
+ get: function() {
+ return this._start;
+ }
+ },
+ /**
+ * Gets the final planetodetic point on the path.
+ * @memberof EllipsoidGeodesic.prototype
+ * @type {Cartographic}
+ * @readonly
+ */
+ end: {
+ get: function() {
+ return this._end;
+ }
+ },
+ /**
+ * Gets the heading at the initial point.
+ * @memberof EllipsoidGeodesic.prototype
+ * @type {number}
+ * @readonly
+ */
+ startHeading: {
+ get: function() {
+ Check_default.defined("distance", this._distance);
+ return this._startHeading;
+ }
+ },
+ /**
+ * Gets the heading at the final point.
+ * @memberof EllipsoidGeodesic.prototype
+ * @type {number}
+ * @readonly
+ */
+ endHeading: {
+ get: function() {
+ Check_default.defined("distance", this._distance);
+ return this._endHeading;
+ }
+ }
+});
+EllipsoidGeodesic.prototype.setEndPoints = function(start, end) {
+ Check_default.defined("start", start);
+ Check_default.defined("end", end);
+ computeProperties(this, start, end, this._ellipsoid);
+};
+EllipsoidGeodesic.prototype.interpolateUsingFraction = function(fraction, result) {
+ return this.interpolateUsingSurfaceDistance(
+ this._distance * fraction,
+ result
+ );
+};
+EllipsoidGeodesic.prototype.interpolateUsingSurfaceDistance = function(distance, result) {
+ Check_default.defined("distance", this._distance);
+ const constants = this._constants;
+ const s = constants.distanceRatio + distance / constants.b;
+ const cosine2S = Math.cos(2 * s);
+ const cosine4S = Math.cos(4 * s);
+ const cosine6S = Math.cos(6 * s);
+ const sine2S = Math.sin(2 * s);
+ const sine4S = Math.sin(4 * s);
+ const sine6S = Math.sin(6 * s);
+ const sine8S = Math.sin(8 * s);
+ const s2 = s * s;
+ const s3 = s * s2;
+ const u8Over256 = constants.u8Over256;
+ const u2Over4 = constants.u2Over4;
+ const u6Over64 = constants.u6Over64;
+ const u4Over16 = constants.u4Over16;
+ let sigma = 2 * s3 * u8Over256 * cosine2S / 3 + s * (1 - u2Over4 + 7 * u4Over16 / 4 - 15 * u6Over64 / 4 + 579 * u8Over256 / 64 - (u4Over16 - 15 * u6Over64 / 4 + 187 * u8Over256 / 16) * cosine2S - (5 * u6Over64 / 4 - 115 * u8Over256 / 16) * cosine4S - 29 * u8Over256 * cosine6S / 16) + (u2Over4 / 2 - u4Over16 + 71 * u6Over64 / 32 - 85 * u8Over256 / 16) * sine2S + (5 * u4Over16 / 16 - 5 * u6Over64 / 4 + 383 * u8Over256 / 96) * sine4S - s2 * ((u6Over64 - 11 * u8Over256 / 2) * sine2S + 5 * u8Over256 * sine4S / 2) + (29 * u6Over64 / 96 - 29 * u8Over256 / 16) * sine6S + 539 * u8Over256 * sine8S / 1536;
+ const theta = Math.asin(Math.sin(sigma) * constants.cosineAlpha);
+ const latitude = Math.atan(constants.a / constants.b * Math.tan(theta));
+ sigma = sigma - constants.sigma;
+ const cosineTwiceSigmaMidpoint = Math.cos(2 * constants.sigma + sigma);
+ const sineSigma = Math.sin(sigma);
+ const cosineSigma = Math.cos(sigma);
+ const cc = constants.cosineU * cosineSigma;
+ const ss = constants.sineU * sineSigma;
+ const lambda = Math.atan2(
+ sineSigma * constants.sineHeading,
+ cc - ss * constants.cosineHeading
+ );
+ const l = lambda - computeDeltaLambda(
+ constants.f,
+ constants.sineAlpha,
+ constants.cosineSquaredAlpha,
+ sigma,
+ sineSigma,
+ cosineSigma,
+ cosineTwiceSigmaMidpoint
+ );
+ if (defined_default(result)) {
+ result.longitude = this._start.longitude + l;
+ result.latitude = latitude;
+ result.height = 0;
+ return result;
+ }
+ return new Cartographic_default(this._start.longitude + l, latitude, 0);
+};
+var EllipsoidGeodesic_default = EllipsoidGeodesic;
+
+export {
+ EllipsoidGeodesic_default
+};
diff --git a/public/assets/cesium/Workers/chunk-C4WPMOKT.js b/public/assets/cesium/Workers/chunk-C4WPMOKT.js
new file mode 100644
index 0000000000000000000000000000000000000000..e4b1326045388031e40baf67c94057f6259f0e9b
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-C4WPMOKT.js
@@ -0,0 +1,139 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import {
+ WebGLConstants_default
+} from "./chunk-3HQMMUPU.js";
+import {
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/IndexDatatype.js
+var IndexDatatype = {
+ /**
+ * 8-bit unsigned byte corresponding to UNSIGNED_BYTE and the type
+ * of an element in Uint8Array.
+ *
+ * @type {number}
+ * @constant
+ */
+ UNSIGNED_BYTE: WebGLConstants_default.UNSIGNED_BYTE,
+ /**
+ * 16-bit unsigned short corresponding to UNSIGNED_SHORT and the type
+ * of an element in Uint16Array.
+ *
+ * @type {number}
+ * @constant
+ */
+ UNSIGNED_SHORT: WebGLConstants_default.UNSIGNED_SHORT,
+ /**
+ * 32-bit unsigned int corresponding to UNSIGNED_INT and the type
+ * of an element in Uint32Array.
+ *
+ * @type {number}
+ * @constant
+ */
+ UNSIGNED_INT: WebGLConstants_default.UNSIGNED_INT
+};
+IndexDatatype.getSizeInBytes = function(indexDatatype) {
+ switch (indexDatatype) {
+ case IndexDatatype.UNSIGNED_BYTE:
+ return Uint8Array.BYTES_PER_ELEMENT;
+ case IndexDatatype.UNSIGNED_SHORT:
+ return Uint16Array.BYTES_PER_ELEMENT;
+ case IndexDatatype.UNSIGNED_INT:
+ return Uint32Array.BYTES_PER_ELEMENT;
+ }
+ throw new DeveloperError_default(
+ "indexDatatype is required and must be a valid IndexDatatype constant."
+ );
+};
+IndexDatatype.fromSizeInBytes = function(sizeInBytes) {
+ switch (sizeInBytes) {
+ case 2:
+ return IndexDatatype.UNSIGNED_SHORT;
+ case 4:
+ return IndexDatatype.UNSIGNED_INT;
+ case 1:
+ return IndexDatatype.UNSIGNED_BYTE;
+ //>>includeStart('debug', pragmas.debug);
+ default:
+ throw new DeveloperError_default(
+ "Size in bytes cannot be mapped to an IndexDatatype"
+ );
+ }
+};
+IndexDatatype.validate = function(indexDatatype) {
+ return defined_default(indexDatatype) && (indexDatatype === IndexDatatype.UNSIGNED_BYTE || indexDatatype === IndexDatatype.UNSIGNED_SHORT || indexDatatype === IndexDatatype.UNSIGNED_INT);
+};
+IndexDatatype.createTypedArray = function(numberOfVertices, indicesLengthOrArray) {
+ if (!defined_default(numberOfVertices)) {
+ throw new DeveloperError_default("numberOfVertices is required.");
+ }
+ if (numberOfVertices >= Math_default.SIXTY_FOUR_KILOBYTES) {
+ return new Uint32Array(indicesLengthOrArray);
+ }
+ return new Uint16Array(indicesLengthOrArray);
+};
+IndexDatatype.createTypedArrayFromArrayBuffer = function(numberOfVertices, sourceArray, byteOffset, length) {
+ if (!defined_default(numberOfVertices)) {
+ throw new DeveloperError_default("numberOfVertices is required.");
+ }
+ if (!defined_default(sourceArray)) {
+ throw new DeveloperError_default("sourceArray is required.");
+ }
+ if (!defined_default(byteOffset)) {
+ throw new DeveloperError_default("byteOffset is required.");
+ }
+ if (numberOfVertices >= Math_default.SIXTY_FOUR_KILOBYTES) {
+ return new Uint32Array(sourceArray, byteOffset, length);
+ }
+ return new Uint16Array(sourceArray, byteOffset, length);
+};
+IndexDatatype.fromTypedArray = function(array) {
+ if (array instanceof Uint8Array) {
+ return IndexDatatype.UNSIGNED_BYTE;
+ }
+ if (array instanceof Uint16Array) {
+ return IndexDatatype.UNSIGNED_SHORT;
+ }
+ if (array instanceof Uint32Array) {
+ return IndexDatatype.UNSIGNED_INT;
+ }
+ throw new DeveloperError_default(
+ "array must be a Uint8Array, Uint16Array, or Uint32Array."
+ );
+};
+var IndexDatatype_default = Object.freeze(IndexDatatype);
+
+export {
+ IndexDatatype_default
+};
diff --git a/public/assets/cesium/Workers/chunk-EDLRS3AW.js b/public/assets/cesium/Workers/chunk-EDLRS3AW.js
new file mode 100644
index 0000000000000000000000000000000000000000..a4d295c8a0d8a274148d2c997a8b337406e03535
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-EDLRS3AW.js
@@ -0,0 +1,171 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ Cartesian4_default,
+ Matrix4_default
+} from "./chunk-6SQMLVGV.js";
+import {
+ Cartesian3_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import {
+ Check_default,
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/Plane.js
+function Plane(normal, distance) {
+ Check_default.typeOf.object("normal", normal);
+ if (!Math_default.equalsEpsilon(
+ Cartesian3_default.magnitude(normal),
+ 1,
+ Math_default.EPSILON6
+ )) {
+ throw new DeveloperError_default("normal must be normalized.");
+ }
+ Check_default.typeOf.number("distance", distance);
+ this.normal = Cartesian3_default.clone(normal);
+ this.distance = distance;
+}
+Plane.fromPointNormal = function(point, normal, result) {
+ Check_default.typeOf.object("point", point);
+ Check_default.typeOf.object("normal", normal);
+ if (!Math_default.equalsEpsilon(
+ Cartesian3_default.magnitude(normal),
+ 1,
+ Math_default.EPSILON6
+ )) {
+ throw new DeveloperError_default("normal must be normalized.");
+ }
+ const distance = -Cartesian3_default.dot(normal, point);
+ if (!defined_default(result)) {
+ return new Plane(normal, distance);
+ }
+ Cartesian3_default.clone(normal, result.normal);
+ result.distance = distance;
+ return result;
+};
+var scratchNormal = new Cartesian3_default();
+Plane.fromCartesian4 = function(coefficients, result) {
+ Check_default.typeOf.object("coefficients", coefficients);
+ const normal = Cartesian3_default.fromCartesian4(coefficients, scratchNormal);
+ const distance = coefficients.w;
+ if (!Math_default.equalsEpsilon(
+ Cartesian3_default.magnitude(normal),
+ 1,
+ Math_default.EPSILON6
+ )) {
+ throw new DeveloperError_default("normal must be normalized.");
+ }
+ if (!defined_default(result)) {
+ return new Plane(normal, distance);
+ }
+ Cartesian3_default.clone(normal, result.normal);
+ result.distance = distance;
+ return result;
+};
+Plane.getPointDistance = function(plane, point) {
+ Check_default.typeOf.object("plane", plane);
+ Check_default.typeOf.object("point", point);
+ return Cartesian3_default.dot(plane.normal, point) + plane.distance;
+};
+var scratchCartesian = new Cartesian3_default();
+Plane.projectPointOntoPlane = function(plane, point, result) {
+ Check_default.typeOf.object("plane", plane);
+ Check_default.typeOf.object("point", point);
+ if (!defined_default(result)) {
+ result = new Cartesian3_default();
+ }
+ const pointDistance = Plane.getPointDistance(plane, point);
+ const scaledNormal = Cartesian3_default.multiplyByScalar(
+ plane.normal,
+ pointDistance,
+ scratchCartesian
+ );
+ return Cartesian3_default.subtract(point, scaledNormal, result);
+};
+var scratchInverseTranspose = new Matrix4_default();
+var scratchPlaneCartesian4 = new Cartesian4_default();
+var scratchTransformNormal = new Cartesian3_default();
+Plane.transform = function(plane, transform, result) {
+ Check_default.typeOf.object("plane", plane);
+ Check_default.typeOf.object("transform", transform);
+ const normal = plane.normal;
+ const distance = plane.distance;
+ const inverseTranspose = Matrix4_default.inverseTranspose(
+ transform,
+ scratchInverseTranspose
+ );
+ let planeAsCartesian4 = Cartesian4_default.fromElements(
+ normal.x,
+ normal.y,
+ normal.z,
+ distance,
+ scratchPlaneCartesian4
+ );
+ planeAsCartesian4 = Matrix4_default.multiplyByVector(
+ inverseTranspose,
+ planeAsCartesian4,
+ planeAsCartesian4
+ );
+ const transformedNormal = Cartesian3_default.fromCartesian4(
+ planeAsCartesian4,
+ scratchTransformNormal
+ );
+ planeAsCartesian4 = Cartesian4_default.divideByScalar(
+ planeAsCartesian4,
+ Cartesian3_default.magnitude(transformedNormal),
+ planeAsCartesian4
+ );
+ return Plane.fromCartesian4(planeAsCartesian4, result);
+};
+Plane.clone = function(plane, result) {
+ Check_default.typeOf.object("plane", plane);
+ if (!defined_default(result)) {
+ return new Plane(plane.normal, plane.distance);
+ }
+ Cartesian3_default.clone(plane.normal, result.normal);
+ result.distance = plane.distance;
+ return result;
+};
+Plane.equals = function(left, right) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ return left.distance === right.distance && Cartesian3_default.equals(left.normal, right.normal);
+};
+Plane.ORIGIN_XY_PLANE = Object.freeze(new Plane(Cartesian3_default.UNIT_Z, 0));
+Plane.ORIGIN_YZ_PLANE = Object.freeze(new Plane(Cartesian3_default.UNIT_X, 0));
+Plane.ORIGIN_ZX_PLANE = Object.freeze(new Plane(Cartesian3_default.UNIT_Y, 0));
+var Plane_default = Plane;
+
+export {
+ Plane_default
+};
diff --git a/public/assets/cesium/Workers/chunk-EJVGYGLF.js b/public/assets/cesium/Workers/chunk-EJVGYGLF.js
new file mode 100644
index 0000000000000000000000000000000000000000..5167ceb847b5530cbfffd7093ce598d432cf9f37
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-EJVGYGLF.js
@@ -0,0 +1,476 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ CornerType_default,
+ PolylineVolumeGeometryLibrary_default
+} from "./chunk-3IFRSGEY.js";
+import {
+ PolylinePipeline_default
+} from "./chunk-QN6TBED4.js";
+import {
+ Quaternion_default
+} from "./chunk-6SQMLVGV.js";
+import {
+ Cartesian3_default,
+ Matrix3_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/CorridorGeometryLibrary.js
+var CorridorGeometryLibrary = {};
+var scratch1 = new Cartesian3_default();
+var scratch2 = new Cartesian3_default();
+var scratch3 = new Cartesian3_default();
+var scratch4 = new Cartesian3_default();
+var scaleArray2 = [new Cartesian3_default(), new Cartesian3_default()];
+var cartesian1 = new Cartesian3_default();
+var cartesian2 = new Cartesian3_default();
+var cartesian3 = new Cartesian3_default();
+var cartesian4 = new Cartesian3_default();
+var cartesian5 = new Cartesian3_default();
+var cartesian6 = new Cartesian3_default();
+var cartesian7 = new Cartesian3_default();
+var cartesian8 = new Cartesian3_default();
+var cartesian9 = new Cartesian3_default();
+var cartesian10 = new Cartesian3_default();
+var quaterion = new Quaternion_default();
+var rotMatrix = new Matrix3_default();
+function computeRoundCorner(cornerPoint, startPoint, endPoint, cornerType, leftIsOutside) {
+ const angle = Cartesian3_default.angleBetween(
+ Cartesian3_default.subtract(startPoint, cornerPoint, scratch1),
+ Cartesian3_default.subtract(endPoint, cornerPoint, scratch2)
+ );
+ const granularity = cornerType === CornerType_default.BEVELED ? 1 : Math.ceil(angle / Math_default.toRadians(5)) + 1;
+ const size = granularity * 3;
+ const array = new Array(size);
+ array[size - 3] = endPoint.x;
+ array[size - 2] = endPoint.y;
+ array[size - 1] = endPoint.z;
+ let m;
+ if (leftIsOutside) {
+ m = Matrix3_default.fromQuaternion(
+ Quaternion_default.fromAxisAngle(
+ Cartesian3_default.negate(cornerPoint, scratch1),
+ angle / granularity,
+ quaterion
+ ),
+ rotMatrix
+ );
+ } else {
+ m = Matrix3_default.fromQuaternion(
+ Quaternion_default.fromAxisAngle(cornerPoint, angle / granularity, quaterion),
+ rotMatrix
+ );
+ }
+ let index = 0;
+ startPoint = Cartesian3_default.clone(startPoint, scratch1);
+ for (let i = 0; i < granularity; i++) {
+ startPoint = Matrix3_default.multiplyByVector(m, startPoint, startPoint);
+ array[index++] = startPoint.x;
+ array[index++] = startPoint.y;
+ array[index++] = startPoint.z;
+ }
+ return array;
+}
+function addEndCaps(calculatedPositions) {
+ let cornerPoint = cartesian1;
+ let startPoint = cartesian2;
+ let endPoint = cartesian3;
+ let leftEdge = calculatedPositions[1];
+ startPoint = Cartesian3_default.fromArray(
+ calculatedPositions[1],
+ leftEdge.length - 3,
+ startPoint
+ );
+ endPoint = Cartesian3_default.fromArray(calculatedPositions[0], 0, endPoint);
+ cornerPoint = Cartesian3_default.midpoint(startPoint, endPoint, cornerPoint);
+ const firstEndCap = computeRoundCorner(
+ cornerPoint,
+ startPoint,
+ endPoint,
+ CornerType_default.ROUNDED,
+ false
+ );
+ const length = calculatedPositions.length - 1;
+ const rightEdge = calculatedPositions[length - 1];
+ leftEdge = calculatedPositions[length];
+ startPoint = Cartesian3_default.fromArray(
+ rightEdge,
+ rightEdge.length - 3,
+ startPoint
+ );
+ endPoint = Cartesian3_default.fromArray(leftEdge, 0, endPoint);
+ cornerPoint = Cartesian3_default.midpoint(startPoint, endPoint, cornerPoint);
+ const lastEndCap = computeRoundCorner(
+ cornerPoint,
+ startPoint,
+ endPoint,
+ CornerType_default.ROUNDED,
+ false
+ );
+ return [firstEndCap, lastEndCap];
+}
+function computeMiteredCorner(position, leftCornerDirection, lastPoint, leftIsOutside) {
+ let cornerPoint = scratch1;
+ if (leftIsOutside) {
+ cornerPoint = Cartesian3_default.add(position, leftCornerDirection, cornerPoint);
+ } else {
+ leftCornerDirection = Cartesian3_default.negate(
+ leftCornerDirection,
+ leftCornerDirection
+ );
+ cornerPoint = Cartesian3_default.add(position, leftCornerDirection, cornerPoint);
+ }
+ return [
+ cornerPoint.x,
+ cornerPoint.y,
+ cornerPoint.z,
+ lastPoint.x,
+ lastPoint.y,
+ lastPoint.z
+ ];
+}
+function addShiftedPositions(positions, left, scalar, calculatedPositions) {
+ const rightPositions = new Array(positions.length);
+ const leftPositions = new Array(positions.length);
+ const scaledLeft = Cartesian3_default.multiplyByScalar(left, scalar, scratch1);
+ const scaledRight = Cartesian3_default.negate(scaledLeft, scratch2);
+ let rightIndex = 0;
+ let leftIndex = positions.length - 1;
+ for (let i = 0; i < positions.length; i += 3) {
+ const pos = Cartesian3_default.fromArray(positions, i, scratch3);
+ const rightPos = Cartesian3_default.add(pos, scaledRight, scratch4);
+ rightPositions[rightIndex++] = rightPos.x;
+ rightPositions[rightIndex++] = rightPos.y;
+ rightPositions[rightIndex++] = rightPos.z;
+ const leftPos = Cartesian3_default.add(pos, scaledLeft, scratch4);
+ leftPositions[leftIndex--] = leftPos.z;
+ leftPositions[leftIndex--] = leftPos.y;
+ leftPositions[leftIndex--] = leftPos.x;
+ }
+ calculatedPositions.push(rightPositions, leftPositions);
+ return calculatedPositions;
+}
+CorridorGeometryLibrary.addAttribute = function(attribute, value, front, back) {
+ const x = value.x;
+ const y = value.y;
+ const z = value.z;
+ if (defined_default(front)) {
+ attribute[front] = x;
+ attribute[front + 1] = y;
+ attribute[front + 2] = z;
+ }
+ if (defined_default(back)) {
+ attribute[back] = z;
+ attribute[back - 1] = y;
+ attribute[back - 2] = x;
+ }
+};
+var scratchForwardProjection = new Cartesian3_default();
+var scratchBackwardProjection = new Cartesian3_default();
+CorridorGeometryLibrary.computePositions = function(params) {
+ const granularity = params.granularity;
+ const positions = params.positions;
+ const ellipsoid = params.ellipsoid;
+ const width = params.width / 2;
+ const cornerType = params.cornerType;
+ const saveAttributes = params.saveAttributes;
+ let normal = cartesian1;
+ let forward = cartesian2;
+ let backward = cartesian3;
+ let left = cartesian4;
+ let cornerDirection = cartesian5;
+ let startPoint = cartesian6;
+ let previousPos = cartesian7;
+ let rightPos = cartesian8;
+ let leftPos = cartesian9;
+ let center = cartesian10;
+ let calculatedPositions = [];
+ const calculatedLefts = saveAttributes ? [] : void 0;
+ const calculatedNormals = saveAttributes ? [] : void 0;
+ let position = positions[0];
+ let nextPosition = positions[1];
+ forward = Cartesian3_default.normalize(
+ Cartesian3_default.subtract(nextPosition, position, forward),
+ forward
+ );
+ normal = ellipsoid.geodeticSurfaceNormal(position, normal);
+ left = Cartesian3_default.normalize(Cartesian3_default.cross(normal, forward, left), left);
+ if (saveAttributes) {
+ calculatedLefts.push(left.x, left.y, left.z);
+ calculatedNormals.push(normal.x, normal.y, normal.z);
+ }
+ previousPos = Cartesian3_default.clone(position, previousPos);
+ position = nextPosition;
+ backward = Cartesian3_default.negate(forward, backward);
+ let subdividedPositions;
+ const corners = [];
+ let i;
+ const length = positions.length;
+ for (i = 1; i < length - 1; i++) {
+ normal = ellipsoid.geodeticSurfaceNormal(position, normal);
+ nextPosition = positions[i + 1];
+ forward = Cartesian3_default.normalize(
+ Cartesian3_default.subtract(nextPosition, position, forward),
+ forward
+ );
+ cornerDirection = Cartesian3_default.normalize(
+ Cartesian3_default.add(forward, backward, cornerDirection),
+ cornerDirection
+ );
+ const forwardProjection = Cartesian3_default.multiplyByScalar(
+ normal,
+ Cartesian3_default.dot(forward, normal),
+ scratchForwardProjection
+ );
+ Cartesian3_default.subtract(forward, forwardProjection, forwardProjection);
+ Cartesian3_default.normalize(forwardProjection, forwardProjection);
+ const backwardProjection = Cartesian3_default.multiplyByScalar(
+ normal,
+ Cartesian3_default.dot(backward, normal),
+ scratchBackwardProjection
+ );
+ Cartesian3_default.subtract(backward, backwardProjection, backwardProjection);
+ Cartesian3_default.normalize(backwardProjection, backwardProjection);
+ const doCorner = !Math_default.equalsEpsilon(
+ Math.abs(Cartesian3_default.dot(forwardProjection, backwardProjection)),
+ 1,
+ Math_default.EPSILON7
+ );
+ if (doCorner) {
+ cornerDirection = Cartesian3_default.cross(
+ cornerDirection,
+ normal,
+ cornerDirection
+ );
+ cornerDirection = Cartesian3_default.cross(
+ normal,
+ cornerDirection,
+ cornerDirection
+ );
+ cornerDirection = Cartesian3_default.normalize(cornerDirection, cornerDirection);
+ const scalar = width / Math.max(
+ 0.25,
+ Cartesian3_default.magnitude(
+ Cartesian3_default.cross(cornerDirection, backward, scratch1)
+ )
+ );
+ const leftIsOutside = PolylineVolumeGeometryLibrary_default.angleIsGreaterThanPi(
+ forward,
+ backward,
+ position,
+ ellipsoid
+ );
+ cornerDirection = Cartesian3_default.multiplyByScalar(
+ cornerDirection,
+ scalar,
+ cornerDirection
+ );
+ if (leftIsOutside) {
+ rightPos = Cartesian3_default.add(position, cornerDirection, rightPos);
+ center = Cartesian3_default.add(
+ rightPos,
+ Cartesian3_default.multiplyByScalar(left, width, center),
+ center
+ );
+ leftPos = Cartesian3_default.add(
+ rightPos,
+ Cartesian3_default.multiplyByScalar(left, width * 2, leftPos),
+ leftPos
+ );
+ scaleArray2[0] = Cartesian3_default.clone(previousPos, scaleArray2[0]);
+ scaleArray2[1] = Cartesian3_default.clone(center, scaleArray2[1]);
+ subdividedPositions = PolylinePipeline_default.generateArc({
+ positions: scaleArray2,
+ granularity,
+ ellipsoid
+ });
+ calculatedPositions = addShiftedPositions(
+ subdividedPositions,
+ left,
+ width,
+ calculatedPositions
+ );
+ if (saveAttributes) {
+ calculatedLefts.push(left.x, left.y, left.z);
+ calculatedNormals.push(normal.x, normal.y, normal.z);
+ }
+ startPoint = Cartesian3_default.clone(leftPos, startPoint);
+ left = Cartesian3_default.normalize(
+ Cartesian3_default.cross(normal, forward, left),
+ left
+ );
+ leftPos = Cartesian3_default.add(
+ rightPos,
+ Cartesian3_default.multiplyByScalar(left, width * 2, leftPos),
+ leftPos
+ );
+ previousPos = Cartesian3_default.add(
+ rightPos,
+ Cartesian3_default.multiplyByScalar(left, width, previousPos),
+ previousPos
+ );
+ if (cornerType === CornerType_default.ROUNDED || cornerType === CornerType_default.BEVELED) {
+ corners.push({
+ leftPositions: computeRoundCorner(
+ rightPos,
+ startPoint,
+ leftPos,
+ cornerType,
+ leftIsOutside
+ )
+ });
+ } else {
+ corners.push({
+ leftPositions: computeMiteredCorner(
+ position,
+ Cartesian3_default.negate(cornerDirection, cornerDirection),
+ leftPos,
+ leftIsOutside
+ )
+ });
+ }
+ } else {
+ leftPos = Cartesian3_default.add(position, cornerDirection, leftPos);
+ center = Cartesian3_default.add(
+ leftPos,
+ Cartesian3_default.negate(
+ Cartesian3_default.multiplyByScalar(left, width, center),
+ center
+ ),
+ center
+ );
+ rightPos = Cartesian3_default.add(
+ leftPos,
+ Cartesian3_default.negate(
+ Cartesian3_default.multiplyByScalar(left, width * 2, rightPos),
+ rightPos
+ ),
+ rightPos
+ );
+ scaleArray2[0] = Cartesian3_default.clone(previousPos, scaleArray2[0]);
+ scaleArray2[1] = Cartesian3_default.clone(center, scaleArray2[1]);
+ subdividedPositions = PolylinePipeline_default.generateArc({
+ positions: scaleArray2,
+ granularity,
+ ellipsoid
+ });
+ calculatedPositions = addShiftedPositions(
+ subdividedPositions,
+ left,
+ width,
+ calculatedPositions
+ );
+ if (saveAttributes) {
+ calculatedLefts.push(left.x, left.y, left.z);
+ calculatedNormals.push(normal.x, normal.y, normal.z);
+ }
+ startPoint = Cartesian3_default.clone(rightPos, startPoint);
+ left = Cartesian3_default.normalize(
+ Cartesian3_default.cross(normal, forward, left),
+ left
+ );
+ rightPos = Cartesian3_default.add(
+ leftPos,
+ Cartesian3_default.negate(
+ Cartesian3_default.multiplyByScalar(left, width * 2, rightPos),
+ rightPos
+ ),
+ rightPos
+ );
+ previousPos = Cartesian3_default.add(
+ leftPos,
+ Cartesian3_default.negate(
+ Cartesian3_default.multiplyByScalar(left, width, previousPos),
+ previousPos
+ ),
+ previousPos
+ );
+ if (cornerType === CornerType_default.ROUNDED || cornerType === CornerType_default.BEVELED) {
+ corners.push({
+ rightPositions: computeRoundCorner(
+ leftPos,
+ startPoint,
+ rightPos,
+ cornerType,
+ leftIsOutside
+ )
+ });
+ } else {
+ corners.push({
+ rightPositions: computeMiteredCorner(
+ position,
+ cornerDirection,
+ rightPos,
+ leftIsOutside
+ )
+ });
+ }
+ }
+ backward = Cartesian3_default.negate(forward, backward);
+ }
+ position = nextPosition;
+ }
+ normal = ellipsoid.geodeticSurfaceNormal(position, normal);
+ scaleArray2[0] = Cartesian3_default.clone(previousPos, scaleArray2[0]);
+ scaleArray2[1] = Cartesian3_default.clone(position, scaleArray2[1]);
+ subdividedPositions = PolylinePipeline_default.generateArc({
+ positions: scaleArray2,
+ granularity,
+ ellipsoid
+ });
+ calculatedPositions = addShiftedPositions(
+ subdividedPositions,
+ left,
+ width,
+ calculatedPositions
+ );
+ if (saveAttributes) {
+ calculatedLefts.push(left.x, left.y, left.z);
+ calculatedNormals.push(normal.x, normal.y, normal.z);
+ }
+ let endPositions;
+ if (cornerType === CornerType_default.ROUNDED) {
+ endPositions = addEndCaps(calculatedPositions);
+ }
+ return {
+ positions: calculatedPositions,
+ corners,
+ lefts: calculatedLefts,
+ normals: calculatedNormals,
+ endPositions
+ };
+};
+var CorridorGeometryLibrary_default = CorridorGeometryLibrary;
+
+export {
+ CorridorGeometryLibrary_default
+};
diff --git a/public/assets/cesium/Workers/chunk-FFLMY4TE.js b/public/assets/cesium/Workers/chunk-FFLMY4TE.js
new file mode 100644
index 0000000000000000000000000000000000000000..2db084a7a7fc4713a500b778f425b3d976fc69b6
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-FFLMY4TE.js
@@ -0,0 +1,2857 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default,
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/Cartesian3.js
+function Cartesian3(x, y, z) {
+ this.x = defaultValue_default(x, 0);
+ this.y = defaultValue_default(y, 0);
+ this.z = defaultValue_default(z, 0);
+}
+Cartesian3.fromSpherical = function(spherical, result) {
+ Check_default.typeOf.object("spherical", spherical);
+ if (!defined_default(result)) {
+ result = new Cartesian3();
+ }
+ const clock = spherical.clock;
+ const cone = spherical.cone;
+ const magnitude = defaultValue_default(spherical.magnitude, 1);
+ const radial = magnitude * Math.sin(cone);
+ result.x = radial * Math.cos(clock);
+ result.y = radial * Math.sin(clock);
+ result.z = magnitude * Math.cos(cone);
+ return result;
+};
+Cartesian3.fromElements = function(x, y, z, result) {
+ if (!defined_default(result)) {
+ return new Cartesian3(x, y, z);
+ }
+ result.x = x;
+ result.y = y;
+ result.z = z;
+ return result;
+};
+Cartesian3.clone = function(cartesian, result) {
+ if (!defined_default(cartesian)) {
+ return void 0;
+ }
+ if (!defined_default(result)) {
+ return new Cartesian3(cartesian.x, cartesian.y, cartesian.z);
+ }
+ result.x = cartesian.x;
+ result.y = cartesian.y;
+ result.z = cartesian.z;
+ return result;
+};
+Cartesian3.fromCartesian4 = Cartesian3.clone;
+Cartesian3.packedLength = 3;
+Cartesian3.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ array[startingIndex++] = value.x;
+ array[startingIndex++] = value.y;
+ array[startingIndex] = value.z;
+ return array;
+};
+Cartesian3.unpack = function(array, startingIndex, result) {
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ if (!defined_default(result)) {
+ result = new Cartesian3();
+ }
+ result.x = array[startingIndex++];
+ result.y = array[startingIndex++];
+ result.z = array[startingIndex];
+ return result;
+};
+Cartesian3.packArray = function(array, result) {
+ Check_default.defined("array", array);
+ const length = array.length;
+ const resultLength = length * 3;
+ if (!defined_default(result)) {
+ result = new Array(resultLength);
+ } else if (!Array.isArray(result) && result.length !== resultLength) {
+ throw new DeveloperError_default(
+ "If result is a typed array, it must have exactly array.length * 3 elements"
+ );
+ } else if (result.length !== resultLength) {
+ result.length = resultLength;
+ }
+ for (let i = 0; i < length; ++i) {
+ Cartesian3.pack(array[i], result, i * 3);
+ }
+ return result;
+};
+Cartesian3.unpackArray = function(array, result) {
+ Check_default.defined("array", array);
+ Check_default.typeOf.number.greaterThanOrEquals("array.length", array.length, 3);
+ if (array.length % 3 !== 0) {
+ throw new DeveloperError_default("array length must be a multiple of 3.");
+ }
+ const length = array.length;
+ if (!defined_default(result)) {
+ result = new Array(length / 3);
+ } else {
+ result.length = length / 3;
+ }
+ for (let i = 0; i < length; i += 3) {
+ const index = i / 3;
+ result[index] = Cartesian3.unpack(array, i, result[index]);
+ }
+ return result;
+};
+Cartesian3.fromArray = Cartesian3.unpack;
+Cartesian3.maximumComponent = function(cartesian) {
+ Check_default.typeOf.object("cartesian", cartesian);
+ return Math.max(cartesian.x, cartesian.y, cartesian.z);
+};
+Cartesian3.minimumComponent = function(cartesian) {
+ Check_default.typeOf.object("cartesian", cartesian);
+ return Math.min(cartesian.x, cartesian.y, cartesian.z);
+};
+Cartesian3.minimumByComponent = function(first, second, result) {
+ Check_default.typeOf.object("first", first);
+ Check_default.typeOf.object("second", second);
+ Check_default.typeOf.object("result", result);
+ result.x = Math.min(first.x, second.x);
+ result.y = Math.min(first.y, second.y);
+ result.z = Math.min(first.z, second.z);
+ return result;
+};
+Cartesian3.maximumByComponent = function(first, second, result) {
+ Check_default.typeOf.object("first", first);
+ Check_default.typeOf.object("second", second);
+ Check_default.typeOf.object("result", result);
+ result.x = Math.max(first.x, second.x);
+ result.y = Math.max(first.y, second.y);
+ result.z = Math.max(first.z, second.z);
+ return result;
+};
+Cartesian3.clamp = function(value, min, max, result) {
+ Check_default.typeOf.object("value", value);
+ Check_default.typeOf.object("min", min);
+ Check_default.typeOf.object("max", max);
+ Check_default.typeOf.object("result", result);
+ const x = Math_default.clamp(value.x, min.x, max.x);
+ const y = Math_default.clamp(value.y, min.y, max.y);
+ const z = Math_default.clamp(value.z, min.z, max.z);
+ result.x = x;
+ result.y = y;
+ result.z = z;
+ return result;
+};
+Cartesian3.magnitudeSquared = function(cartesian) {
+ Check_default.typeOf.object("cartesian", cartesian);
+ return cartesian.x * cartesian.x + cartesian.y * cartesian.y + cartesian.z * cartesian.z;
+};
+Cartesian3.magnitude = function(cartesian) {
+ return Math.sqrt(Cartesian3.magnitudeSquared(cartesian));
+};
+var distanceScratch = new Cartesian3();
+Cartesian3.distance = function(left, right) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Cartesian3.subtract(left, right, distanceScratch);
+ return Cartesian3.magnitude(distanceScratch);
+};
+Cartesian3.distanceSquared = function(left, right) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Cartesian3.subtract(left, right, distanceScratch);
+ return Cartesian3.magnitudeSquared(distanceScratch);
+};
+Cartesian3.normalize = function(cartesian, result) {
+ Check_default.typeOf.object("cartesian", cartesian);
+ Check_default.typeOf.object("result", result);
+ const magnitude = Cartesian3.magnitude(cartesian);
+ result.x = cartesian.x / magnitude;
+ result.y = cartesian.y / magnitude;
+ result.z = cartesian.z / magnitude;
+ if (isNaN(result.x) || isNaN(result.y) || isNaN(result.z)) {
+ throw new DeveloperError_default("normalized result is not a number");
+ }
+ return result;
+};
+Cartesian3.dot = function(left, right) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ return left.x * right.x + left.y * right.y + left.z * right.z;
+};
+Cartesian3.multiplyComponents = function(left, right, result) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Check_default.typeOf.object("result", result);
+ result.x = left.x * right.x;
+ result.y = left.y * right.y;
+ result.z = left.z * right.z;
+ return result;
+};
+Cartesian3.divideComponents = function(left, right, result) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Check_default.typeOf.object("result", result);
+ result.x = left.x / right.x;
+ result.y = left.y / right.y;
+ result.z = left.z / right.z;
+ return result;
+};
+Cartesian3.add = function(left, right, result) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Check_default.typeOf.object("result", result);
+ result.x = left.x + right.x;
+ result.y = left.y + right.y;
+ result.z = left.z + right.z;
+ return result;
+};
+Cartesian3.subtract = function(left, right, result) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Check_default.typeOf.object("result", result);
+ result.x = left.x - right.x;
+ result.y = left.y - right.y;
+ result.z = left.z - right.z;
+ return result;
+};
+Cartesian3.multiplyByScalar = function(cartesian, scalar, result) {
+ Check_default.typeOf.object("cartesian", cartesian);
+ Check_default.typeOf.number("scalar", scalar);
+ Check_default.typeOf.object("result", result);
+ result.x = cartesian.x * scalar;
+ result.y = cartesian.y * scalar;
+ result.z = cartesian.z * scalar;
+ return result;
+};
+Cartesian3.divideByScalar = function(cartesian, scalar, result) {
+ Check_default.typeOf.object("cartesian", cartesian);
+ Check_default.typeOf.number("scalar", scalar);
+ Check_default.typeOf.object("result", result);
+ result.x = cartesian.x / scalar;
+ result.y = cartesian.y / scalar;
+ result.z = cartesian.z / scalar;
+ return result;
+};
+Cartesian3.negate = function(cartesian, result) {
+ Check_default.typeOf.object("cartesian", cartesian);
+ Check_default.typeOf.object("result", result);
+ result.x = -cartesian.x;
+ result.y = -cartesian.y;
+ result.z = -cartesian.z;
+ return result;
+};
+Cartesian3.abs = function(cartesian, result) {
+ Check_default.typeOf.object("cartesian", cartesian);
+ Check_default.typeOf.object("result", result);
+ result.x = Math.abs(cartesian.x);
+ result.y = Math.abs(cartesian.y);
+ result.z = Math.abs(cartesian.z);
+ return result;
+};
+var lerpScratch = new Cartesian3();
+Cartesian3.lerp = function(start, end, t, result) {
+ Check_default.typeOf.object("start", start);
+ Check_default.typeOf.object("end", end);
+ Check_default.typeOf.number("t", t);
+ Check_default.typeOf.object("result", result);
+ Cartesian3.multiplyByScalar(end, t, lerpScratch);
+ result = Cartesian3.multiplyByScalar(start, 1 - t, result);
+ return Cartesian3.add(lerpScratch, result, result);
+};
+var angleBetweenScratch = new Cartesian3();
+var angleBetweenScratch2 = new Cartesian3();
+Cartesian3.angleBetween = function(left, right) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Cartesian3.normalize(left, angleBetweenScratch);
+ Cartesian3.normalize(right, angleBetweenScratch2);
+ const cosine = Cartesian3.dot(angleBetweenScratch, angleBetweenScratch2);
+ const sine = Cartesian3.magnitude(
+ Cartesian3.cross(
+ angleBetweenScratch,
+ angleBetweenScratch2,
+ angleBetweenScratch
+ )
+ );
+ return Math.atan2(sine, cosine);
+};
+var mostOrthogonalAxisScratch = new Cartesian3();
+Cartesian3.mostOrthogonalAxis = function(cartesian, result) {
+ Check_default.typeOf.object("cartesian", cartesian);
+ Check_default.typeOf.object("result", result);
+ const f = Cartesian3.normalize(cartesian, mostOrthogonalAxisScratch);
+ Cartesian3.abs(f, f);
+ if (f.x <= f.y) {
+ if (f.x <= f.z) {
+ result = Cartesian3.clone(Cartesian3.UNIT_X, result);
+ } else {
+ result = Cartesian3.clone(Cartesian3.UNIT_Z, result);
+ }
+ } else if (f.y <= f.z) {
+ result = Cartesian3.clone(Cartesian3.UNIT_Y, result);
+ } else {
+ result = Cartesian3.clone(Cartesian3.UNIT_Z, result);
+ }
+ return result;
+};
+Cartesian3.projectVector = function(a, b, result) {
+ Check_default.defined("a", a);
+ Check_default.defined("b", b);
+ Check_default.defined("result", result);
+ const scalar = Cartesian3.dot(a, b) / Cartesian3.dot(b, b);
+ return Cartesian3.multiplyByScalar(b, scalar, result);
+};
+Cartesian3.equals = function(left, right) {
+ return left === right || defined_default(left) && defined_default(right) && left.x === right.x && left.y === right.y && left.z === right.z;
+};
+Cartesian3.equalsArray = function(cartesian, array, offset) {
+ return cartesian.x === array[offset] && cartesian.y === array[offset + 1] && cartesian.z === array[offset + 2];
+};
+Cartesian3.equalsEpsilon = function(left, right, relativeEpsilon, absoluteEpsilon) {
+ return left === right || defined_default(left) && defined_default(right) && Math_default.equalsEpsilon(
+ left.x,
+ right.x,
+ relativeEpsilon,
+ absoluteEpsilon
+ ) && Math_default.equalsEpsilon(
+ left.y,
+ right.y,
+ relativeEpsilon,
+ absoluteEpsilon
+ ) && Math_default.equalsEpsilon(
+ left.z,
+ right.z,
+ relativeEpsilon,
+ absoluteEpsilon
+ );
+};
+Cartesian3.cross = function(left, right, result) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Check_default.typeOf.object("result", result);
+ const leftX = left.x;
+ const leftY = left.y;
+ const leftZ = left.z;
+ const rightX = right.x;
+ const rightY = right.y;
+ const rightZ = right.z;
+ const x = leftY * rightZ - leftZ * rightY;
+ const y = leftZ * rightX - leftX * rightZ;
+ const z = leftX * rightY - leftY * rightX;
+ result.x = x;
+ result.y = y;
+ result.z = z;
+ return result;
+};
+Cartesian3.midpoint = function(left, right, result) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Check_default.typeOf.object("result", result);
+ result.x = (left.x + right.x) * 0.5;
+ result.y = (left.y + right.y) * 0.5;
+ result.z = (left.z + right.z) * 0.5;
+ return result;
+};
+Cartesian3.fromDegrees = function(longitude, latitude, height, ellipsoid, result) {
+ Check_default.typeOf.number("longitude", longitude);
+ Check_default.typeOf.number("latitude", latitude);
+ longitude = Math_default.toRadians(longitude);
+ latitude = Math_default.toRadians(latitude);
+ return Cartesian3.fromRadians(longitude, latitude, height, ellipsoid, result);
+};
+var scratchN = new Cartesian3();
+var scratchK = new Cartesian3();
+Cartesian3._ellipsoidRadiiSquared = new Cartesian3(
+ 6378137 * 6378137,
+ 6378137 * 6378137,
+ 6356752314245179e-9 * 6356752314245179e-9
+);
+Cartesian3.fromRadians = function(longitude, latitude, height, ellipsoid, result) {
+ Check_default.typeOf.number("longitude", longitude);
+ Check_default.typeOf.number("latitude", latitude);
+ height = defaultValue_default(height, 0);
+ const radiiSquared = !defined_default(ellipsoid) ? Cartesian3._ellipsoidRadiiSquared : ellipsoid.radiiSquared;
+ const cosLatitude = Math.cos(latitude);
+ scratchN.x = cosLatitude * Math.cos(longitude);
+ scratchN.y = cosLatitude * Math.sin(longitude);
+ scratchN.z = Math.sin(latitude);
+ scratchN = Cartesian3.normalize(scratchN, scratchN);
+ Cartesian3.multiplyComponents(radiiSquared, scratchN, scratchK);
+ const gamma = Math.sqrt(Cartesian3.dot(scratchN, scratchK));
+ scratchK = Cartesian3.divideByScalar(scratchK, gamma, scratchK);
+ scratchN = Cartesian3.multiplyByScalar(scratchN, height, scratchN);
+ if (!defined_default(result)) {
+ result = new Cartesian3();
+ }
+ return Cartesian3.add(scratchK, scratchN, result);
+};
+Cartesian3.fromDegreesArray = function(coordinates, ellipsoid, result) {
+ Check_default.defined("coordinates", coordinates);
+ if (coordinates.length < 2 || coordinates.length % 2 !== 0) {
+ throw new DeveloperError_default(
+ "the number of coordinates must be a multiple of 2 and at least 2"
+ );
+ }
+ const length = coordinates.length;
+ if (!defined_default(result)) {
+ result = new Array(length / 2);
+ } else {
+ result.length = length / 2;
+ }
+ for (let i = 0; i < length; i += 2) {
+ const longitude = coordinates[i];
+ const latitude = coordinates[i + 1];
+ const index = i / 2;
+ result[index] = Cartesian3.fromDegrees(
+ longitude,
+ latitude,
+ 0,
+ ellipsoid,
+ result[index]
+ );
+ }
+ return result;
+};
+Cartesian3.fromRadiansArray = function(coordinates, ellipsoid, result) {
+ Check_default.defined("coordinates", coordinates);
+ if (coordinates.length < 2 || coordinates.length % 2 !== 0) {
+ throw new DeveloperError_default(
+ "the number of coordinates must be a multiple of 2 and at least 2"
+ );
+ }
+ const length = coordinates.length;
+ if (!defined_default(result)) {
+ result = new Array(length / 2);
+ } else {
+ result.length = length / 2;
+ }
+ for (let i = 0; i < length; i += 2) {
+ const longitude = coordinates[i];
+ const latitude = coordinates[i + 1];
+ const index = i / 2;
+ result[index] = Cartesian3.fromRadians(
+ longitude,
+ latitude,
+ 0,
+ ellipsoid,
+ result[index]
+ );
+ }
+ return result;
+};
+Cartesian3.fromDegreesArrayHeights = function(coordinates, ellipsoid, result) {
+ Check_default.defined("coordinates", coordinates);
+ if (coordinates.length < 3 || coordinates.length % 3 !== 0) {
+ throw new DeveloperError_default(
+ "the number of coordinates must be a multiple of 3 and at least 3"
+ );
+ }
+ const length = coordinates.length;
+ if (!defined_default(result)) {
+ result = new Array(length / 3);
+ } else {
+ result.length = length / 3;
+ }
+ for (let i = 0; i < length; i += 3) {
+ const longitude = coordinates[i];
+ const latitude = coordinates[i + 1];
+ const height = coordinates[i + 2];
+ const index = i / 3;
+ result[index] = Cartesian3.fromDegrees(
+ longitude,
+ latitude,
+ height,
+ ellipsoid,
+ result[index]
+ );
+ }
+ return result;
+};
+Cartesian3.fromRadiansArrayHeights = function(coordinates, ellipsoid, result) {
+ Check_default.defined("coordinates", coordinates);
+ if (coordinates.length < 3 || coordinates.length % 3 !== 0) {
+ throw new DeveloperError_default(
+ "the number of coordinates must be a multiple of 3 and at least 3"
+ );
+ }
+ const length = coordinates.length;
+ if (!defined_default(result)) {
+ result = new Array(length / 3);
+ } else {
+ result.length = length / 3;
+ }
+ for (let i = 0; i < length; i += 3) {
+ const longitude = coordinates[i];
+ const latitude = coordinates[i + 1];
+ const height = coordinates[i + 2];
+ const index = i / 3;
+ result[index] = Cartesian3.fromRadians(
+ longitude,
+ latitude,
+ height,
+ ellipsoid,
+ result[index]
+ );
+ }
+ return result;
+};
+Cartesian3.ZERO = Object.freeze(new Cartesian3(0, 0, 0));
+Cartesian3.ONE = Object.freeze(new Cartesian3(1, 1, 1));
+Cartesian3.UNIT_X = Object.freeze(new Cartesian3(1, 0, 0));
+Cartesian3.UNIT_Y = Object.freeze(new Cartesian3(0, 1, 0));
+Cartesian3.UNIT_Z = Object.freeze(new Cartesian3(0, 0, 1));
+Cartesian3.prototype.clone = function(result) {
+ return Cartesian3.clone(this, result);
+};
+Cartesian3.prototype.equals = function(right) {
+ return Cartesian3.equals(this, right);
+};
+Cartesian3.prototype.equalsEpsilon = function(right, relativeEpsilon, absoluteEpsilon) {
+ return Cartesian3.equalsEpsilon(
+ this,
+ right,
+ relativeEpsilon,
+ absoluteEpsilon
+ );
+};
+Cartesian3.prototype.toString = function() {
+ return `(${this.x}, ${this.y}, ${this.z})`;
+};
+var Cartesian3_default = Cartesian3;
+
+// packages/engine/Source/Core/scaleToGeodeticSurface.js
+var scaleToGeodeticSurfaceIntersection = new Cartesian3_default();
+var scaleToGeodeticSurfaceGradient = new Cartesian3_default();
+function scaleToGeodeticSurface(cartesian, oneOverRadii, oneOverRadiiSquared, centerToleranceSquared, result) {
+ if (!defined_default(cartesian)) {
+ throw new DeveloperError_default("cartesian is required.");
+ }
+ if (!defined_default(oneOverRadii)) {
+ throw new DeveloperError_default("oneOverRadii is required.");
+ }
+ if (!defined_default(oneOverRadiiSquared)) {
+ throw new DeveloperError_default("oneOverRadiiSquared is required.");
+ }
+ if (!defined_default(centerToleranceSquared)) {
+ throw new DeveloperError_default("centerToleranceSquared is required.");
+ }
+ const positionX = cartesian.x;
+ const positionY = cartesian.y;
+ const positionZ = cartesian.z;
+ const oneOverRadiiX = oneOverRadii.x;
+ const oneOverRadiiY = oneOverRadii.y;
+ const oneOverRadiiZ = oneOverRadii.z;
+ const x2 = positionX * positionX * oneOverRadiiX * oneOverRadiiX;
+ const y2 = positionY * positionY * oneOverRadiiY * oneOverRadiiY;
+ const z2 = positionZ * positionZ * oneOverRadiiZ * oneOverRadiiZ;
+ const squaredNorm = x2 + y2 + z2;
+ const ratio = Math.sqrt(1 / squaredNorm);
+ const intersection = Cartesian3_default.multiplyByScalar(
+ cartesian,
+ ratio,
+ scaleToGeodeticSurfaceIntersection
+ );
+ if (squaredNorm < centerToleranceSquared) {
+ return !isFinite(ratio) ? void 0 : Cartesian3_default.clone(intersection, result);
+ }
+ const oneOverRadiiSquaredX = oneOverRadiiSquared.x;
+ const oneOverRadiiSquaredY = oneOverRadiiSquared.y;
+ const oneOverRadiiSquaredZ = oneOverRadiiSquared.z;
+ const gradient = scaleToGeodeticSurfaceGradient;
+ gradient.x = intersection.x * oneOverRadiiSquaredX * 2;
+ gradient.y = intersection.y * oneOverRadiiSquaredY * 2;
+ gradient.z = intersection.z * oneOverRadiiSquaredZ * 2;
+ let lambda = (1 - ratio) * Cartesian3_default.magnitude(cartesian) / (0.5 * Cartesian3_default.magnitude(gradient));
+ let correction = 0;
+ let func;
+ let denominator;
+ let xMultiplier;
+ let yMultiplier;
+ let zMultiplier;
+ let xMultiplier2;
+ let yMultiplier2;
+ let zMultiplier2;
+ let xMultiplier3;
+ let yMultiplier3;
+ let zMultiplier3;
+ do {
+ lambda -= correction;
+ xMultiplier = 1 / (1 + lambda * oneOverRadiiSquaredX);
+ yMultiplier = 1 / (1 + lambda * oneOverRadiiSquaredY);
+ zMultiplier = 1 / (1 + lambda * oneOverRadiiSquaredZ);
+ xMultiplier2 = xMultiplier * xMultiplier;
+ yMultiplier2 = yMultiplier * yMultiplier;
+ zMultiplier2 = zMultiplier * zMultiplier;
+ xMultiplier3 = xMultiplier2 * xMultiplier;
+ yMultiplier3 = yMultiplier2 * yMultiplier;
+ zMultiplier3 = zMultiplier2 * zMultiplier;
+ func = x2 * xMultiplier2 + y2 * yMultiplier2 + z2 * zMultiplier2 - 1;
+ denominator = x2 * xMultiplier3 * oneOverRadiiSquaredX + y2 * yMultiplier3 * oneOverRadiiSquaredY + z2 * zMultiplier3 * oneOverRadiiSquaredZ;
+ const derivative = -2 * denominator;
+ correction = func / derivative;
+ } while (Math.abs(func) > Math_default.EPSILON12);
+ if (!defined_default(result)) {
+ return new Cartesian3_default(
+ positionX * xMultiplier,
+ positionY * yMultiplier,
+ positionZ * zMultiplier
+ );
+ }
+ result.x = positionX * xMultiplier;
+ result.y = positionY * yMultiplier;
+ result.z = positionZ * zMultiplier;
+ return result;
+}
+var scaleToGeodeticSurface_default = scaleToGeodeticSurface;
+
+// packages/engine/Source/Core/Cartographic.js
+function Cartographic(longitude, latitude, height) {
+ this.longitude = defaultValue_default(longitude, 0);
+ this.latitude = defaultValue_default(latitude, 0);
+ this.height = defaultValue_default(height, 0);
+}
+Cartographic.fromRadians = function(longitude, latitude, height, result) {
+ Check_default.typeOf.number("longitude", longitude);
+ Check_default.typeOf.number("latitude", latitude);
+ height = defaultValue_default(height, 0);
+ if (!defined_default(result)) {
+ return new Cartographic(longitude, latitude, height);
+ }
+ result.longitude = longitude;
+ result.latitude = latitude;
+ result.height = height;
+ return result;
+};
+Cartographic.fromDegrees = function(longitude, latitude, height, result) {
+ Check_default.typeOf.number("longitude", longitude);
+ Check_default.typeOf.number("latitude", latitude);
+ longitude = Math_default.toRadians(longitude);
+ latitude = Math_default.toRadians(latitude);
+ return Cartographic.fromRadians(longitude, latitude, height, result);
+};
+var cartesianToCartographicN = new Cartesian3_default();
+var cartesianToCartographicP = new Cartesian3_default();
+var cartesianToCartographicH = new Cartesian3_default();
+Cartographic._ellipsoidOneOverRadii = new Cartesian3_default(
+ 1 / 6378137,
+ 1 / 6378137,
+ 1 / 6356752314245179e-9
+);
+Cartographic._ellipsoidOneOverRadiiSquared = new Cartesian3_default(
+ 1 / (6378137 * 6378137),
+ 1 / (6378137 * 6378137),
+ 1 / (6356752314245179e-9 * 6356752314245179e-9)
+);
+Cartographic._ellipsoidCenterToleranceSquared = Math_default.EPSILON1;
+Cartographic.fromCartesian = function(cartesian, ellipsoid, result) {
+ const oneOverRadii = defined_default(ellipsoid) ? ellipsoid.oneOverRadii : Cartographic._ellipsoidOneOverRadii;
+ const oneOverRadiiSquared = defined_default(ellipsoid) ? ellipsoid.oneOverRadiiSquared : Cartographic._ellipsoidOneOverRadiiSquared;
+ const centerToleranceSquared = defined_default(ellipsoid) ? ellipsoid._centerToleranceSquared : Cartographic._ellipsoidCenterToleranceSquared;
+ const p = scaleToGeodeticSurface_default(
+ cartesian,
+ oneOverRadii,
+ oneOverRadiiSquared,
+ centerToleranceSquared,
+ cartesianToCartographicP
+ );
+ if (!defined_default(p)) {
+ return void 0;
+ }
+ let n = Cartesian3_default.multiplyComponents(
+ p,
+ oneOverRadiiSquared,
+ cartesianToCartographicN
+ );
+ n = Cartesian3_default.normalize(n, n);
+ const h = Cartesian3_default.subtract(cartesian, p, cartesianToCartographicH);
+ const longitude = Math.atan2(n.y, n.x);
+ const latitude = Math.asin(n.z);
+ const height = Math_default.sign(Cartesian3_default.dot(h, cartesian)) * Cartesian3_default.magnitude(h);
+ if (!defined_default(result)) {
+ return new Cartographic(longitude, latitude, height);
+ }
+ result.longitude = longitude;
+ result.latitude = latitude;
+ result.height = height;
+ return result;
+};
+Cartographic.toCartesian = function(cartographic, ellipsoid, result) {
+ Check_default.defined("cartographic", cartographic);
+ return Cartesian3_default.fromRadians(
+ cartographic.longitude,
+ cartographic.latitude,
+ cartographic.height,
+ ellipsoid,
+ result
+ );
+};
+Cartographic.clone = function(cartographic, result) {
+ if (!defined_default(cartographic)) {
+ return void 0;
+ }
+ if (!defined_default(result)) {
+ return new Cartographic(
+ cartographic.longitude,
+ cartographic.latitude,
+ cartographic.height
+ );
+ }
+ result.longitude = cartographic.longitude;
+ result.latitude = cartographic.latitude;
+ result.height = cartographic.height;
+ return result;
+};
+Cartographic.equals = function(left, right) {
+ return left === right || defined_default(left) && defined_default(right) && left.longitude === right.longitude && left.latitude === right.latitude && left.height === right.height;
+};
+Cartographic.equalsEpsilon = function(left, right, epsilon) {
+ epsilon = defaultValue_default(epsilon, 0);
+ return left === right || defined_default(left) && defined_default(right) && Math.abs(left.longitude - right.longitude) <= epsilon && Math.abs(left.latitude - right.latitude) <= epsilon && Math.abs(left.height - right.height) <= epsilon;
+};
+Cartographic.ZERO = Object.freeze(new Cartographic(0, 0, 0));
+Cartographic.prototype.clone = function(result) {
+ return Cartographic.clone(this, result);
+};
+Cartographic.prototype.equals = function(right) {
+ return Cartographic.equals(this, right);
+};
+Cartographic.prototype.equalsEpsilon = function(right, epsilon) {
+ return Cartographic.equalsEpsilon(this, right, epsilon);
+};
+Cartographic.prototype.toString = function() {
+ return `(${this.longitude}, ${this.latitude}, ${this.height})`;
+};
+var Cartographic_default = Cartographic;
+
+// packages/engine/Source/Core/Cartesian2.js
+function Cartesian2(x, y) {
+ this.x = defaultValue_default(x, 0);
+ this.y = defaultValue_default(y, 0);
+}
+Cartesian2.fromElements = function(x, y, result) {
+ if (!defined_default(result)) {
+ return new Cartesian2(x, y);
+ }
+ result.x = x;
+ result.y = y;
+ return result;
+};
+Cartesian2.clone = function(cartesian, result) {
+ if (!defined_default(cartesian)) {
+ return void 0;
+ }
+ if (!defined_default(result)) {
+ return new Cartesian2(cartesian.x, cartesian.y);
+ }
+ result.x = cartesian.x;
+ result.y = cartesian.y;
+ return result;
+};
+Cartesian2.fromCartesian3 = Cartesian2.clone;
+Cartesian2.fromCartesian4 = Cartesian2.clone;
+Cartesian2.packedLength = 2;
+Cartesian2.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ array[startingIndex++] = value.x;
+ array[startingIndex] = value.y;
+ return array;
+};
+Cartesian2.unpack = function(array, startingIndex, result) {
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ if (!defined_default(result)) {
+ result = new Cartesian2();
+ }
+ result.x = array[startingIndex++];
+ result.y = array[startingIndex];
+ return result;
+};
+Cartesian2.packArray = function(array, result) {
+ Check_default.defined("array", array);
+ const length = array.length;
+ const resultLength = length * 2;
+ if (!defined_default(result)) {
+ result = new Array(resultLength);
+ } else if (!Array.isArray(result) && result.length !== resultLength) {
+ throw new DeveloperError_default(
+ "If result is a typed array, it must have exactly array.length * 2 elements"
+ );
+ } else if (result.length !== resultLength) {
+ result.length = resultLength;
+ }
+ for (let i = 0; i < length; ++i) {
+ Cartesian2.pack(array[i], result, i * 2);
+ }
+ return result;
+};
+Cartesian2.unpackArray = function(array, result) {
+ Check_default.defined("array", array);
+ Check_default.typeOf.number.greaterThanOrEquals("array.length", array.length, 2);
+ if (array.length % 2 !== 0) {
+ throw new DeveloperError_default("array length must be a multiple of 2.");
+ }
+ const length = array.length;
+ if (!defined_default(result)) {
+ result = new Array(length / 2);
+ } else {
+ result.length = length / 2;
+ }
+ for (let i = 0; i < length; i += 2) {
+ const index = i / 2;
+ result[index] = Cartesian2.unpack(array, i, result[index]);
+ }
+ return result;
+};
+Cartesian2.fromArray = Cartesian2.unpack;
+Cartesian2.maximumComponent = function(cartesian) {
+ Check_default.typeOf.object("cartesian", cartesian);
+ return Math.max(cartesian.x, cartesian.y);
+};
+Cartesian2.minimumComponent = function(cartesian) {
+ Check_default.typeOf.object("cartesian", cartesian);
+ return Math.min(cartesian.x, cartesian.y);
+};
+Cartesian2.minimumByComponent = function(first, second, result) {
+ Check_default.typeOf.object("first", first);
+ Check_default.typeOf.object("second", second);
+ Check_default.typeOf.object("result", result);
+ result.x = Math.min(first.x, second.x);
+ result.y = Math.min(first.y, second.y);
+ return result;
+};
+Cartesian2.maximumByComponent = function(first, second, result) {
+ Check_default.typeOf.object("first", first);
+ Check_default.typeOf.object("second", second);
+ Check_default.typeOf.object("result", result);
+ result.x = Math.max(first.x, second.x);
+ result.y = Math.max(first.y, second.y);
+ return result;
+};
+Cartesian2.clamp = function(value, min, max, result) {
+ Check_default.typeOf.object("value", value);
+ Check_default.typeOf.object("min", min);
+ Check_default.typeOf.object("max", max);
+ Check_default.typeOf.object("result", result);
+ const x = Math_default.clamp(value.x, min.x, max.x);
+ const y = Math_default.clamp(value.y, min.y, max.y);
+ result.x = x;
+ result.y = y;
+ return result;
+};
+Cartesian2.magnitudeSquared = function(cartesian) {
+ Check_default.typeOf.object("cartesian", cartesian);
+ return cartesian.x * cartesian.x + cartesian.y * cartesian.y;
+};
+Cartesian2.magnitude = function(cartesian) {
+ return Math.sqrt(Cartesian2.magnitudeSquared(cartesian));
+};
+var distanceScratch2 = new Cartesian2();
+Cartesian2.distance = function(left, right) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Cartesian2.subtract(left, right, distanceScratch2);
+ return Cartesian2.magnitude(distanceScratch2);
+};
+Cartesian2.distanceSquared = function(left, right) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Cartesian2.subtract(left, right, distanceScratch2);
+ return Cartesian2.magnitudeSquared(distanceScratch2);
+};
+Cartesian2.normalize = function(cartesian, result) {
+ Check_default.typeOf.object("cartesian", cartesian);
+ Check_default.typeOf.object("result", result);
+ const magnitude = Cartesian2.magnitude(cartesian);
+ result.x = cartesian.x / magnitude;
+ result.y = cartesian.y / magnitude;
+ if (isNaN(result.x) || isNaN(result.y)) {
+ throw new DeveloperError_default("normalized result is not a number");
+ }
+ return result;
+};
+Cartesian2.dot = function(left, right) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ return left.x * right.x + left.y * right.y;
+};
+Cartesian2.cross = function(left, right) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ return left.x * right.y - left.y * right.x;
+};
+Cartesian2.multiplyComponents = function(left, right, result) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Check_default.typeOf.object("result", result);
+ result.x = left.x * right.x;
+ result.y = left.y * right.y;
+ return result;
+};
+Cartesian2.divideComponents = function(left, right, result) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Check_default.typeOf.object("result", result);
+ result.x = left.x / right.x;
+ result.y = left.y / right.y;
+ return result;
+};
+Cartesian2.add = function(left, right, result) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Check_default.typeOf.object("result", result);
+ result.x = left.x + right.x;
+ result.y = left.y + right.y;
+ return result;
+};
+Cartesian2.subtract = function(left, right, result) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Check_default.typeOf.object("result", result);
+ result.x = left.x - right.x;
+ result.y = left.y - right.y;
+ return result;
+};
+Cartesian2.multiplyByScalar = function(cartesian, scalar, result) {
+ Check_default.typeOf.object("cartesian", cartesian);
+ Check_default.typeOf.number("scalar", scalar);
+ Check_default.typeOf.object("result", result);
+ result.x = cartesian.x * scalar;
+ result.y = cartesian.y * scalar;
+ return result;
+};
+Cartesian2.divideByScalar = function(cartesian, scalar, result) {
+ Check_default.typeOf.object("cartesian", cartesian);
+ Check_default.typeOf.number("scalar", scalar);
+ Check_default.typeOf.object("result", result);
+ result.x = cartesian.x / scalar;
+ result.y = cartesian.y / scalar;
+ return result;
+};
+Cartesian2.negate = function(cartesian, result) {
+ Check_default.typeOf.object("cartesian", cartesian);
+ Check_default.typeOf.object("result", result);
+ result.x = -cartesian.x;
+ result.y = -cartesian.y;
+ return result;
+};
+Cartesian2.abs = function(cartesian, result) {
+ Check_default.typeOf.object("cartesian", cartesian);
+ Check_default.typeOf.object("result", result);
+ result.x = Math.abs(cartesian.x);
+ result.y = Math.abs(cartesian.y);
+ return result;
+};
+var lerpScratch2 = new Cartesian2();
+Cartesian2.lerp = function(start, end, t, result) {
+ Check_default.typeOf.object("start", start);
+ Check_default.typeOf.object("end", end);
+ Check_default.typeOf.number("t", t);
+ Check_default.typeOf.object("result", result);
+ Cartesian2.multiplyByScalar(end, t, lerpScratch2);
+ result = Cartesian2.multiplyByScalar(start, 1 - t, result);
+ return Cartesian2.add(lerpScratch2, result, result);
+};
+var angleBetweenScratch3 = new Cartesian2();
+var angleBetweenScratch22 = new Cartesian2();
+Cartesian2.angleBetween = function(left, right) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Cartesian2.normalize(left, angleBetweenScratch3);
+ Cartesian2.normalize(right, angleBetweenScratch22);
+ return Math_default.acosClamped(
+ Cartesian2.dot(angleBetweenScratch3, angleBetweenScratch22)
+ );
+};
+var mostOrthogonalAxisScratch2 = new Cartesian2();
+Cartesian2.mostOrthogonalAxis = function(cartesian, result) {
+ Check_default.typeOf.object("cartesian", cartesian);
+ Check_default.typeOf.object("result", result);
+ const f = Cartesian2.normalize(cartesian, mostOrthogonalAxisScratch2);
+ Cartesian2.abs(f, f);
+ if (f.x <= f.y) {
+ result = Cartesian2.clone(Cartesian2.UNIT_X, result);
+ } else {
+ result = Cartesian2.clone(Cartesian2.UNIT_Y, result);
+ }
+ return result;
+};
+Cartesian2.equals = function(left, right) {
+ return left === right || defined_default(left) && defined_default(right) && left.x === right.x && left.y === right.y;
+};
+Cartesian2.equalsArray = function(cartesian, array, offset) {
+ return cartesian.x === array[offset] && cartesian.y === array[offset + 1];
+};
+Cartesian2.equalsEpsilon = function(left, right, relativeEpsilon, absoluteEpsilon) {
+ return left === right || defined_default(left) && defined_default(right) && Math_default.equalsEpsilon(
+ left.x,
+ right.x,
+ relativeEpsilon,
+ absoluteEpsilon
+ ) && Math_default.equalsEpsilon(
+ left.y,
+ right.y,
+ relativeEpsilon,
+ absoluteEpsilon
+ );
+};
+Cartesian2.ZERO = Object.freeze(new Cartesian2(0, 0));
+Cartesian2.ONE = Object.freeze(new Cartesian2(1, 1));
+Cartesian2.UNIT_X = Object.freeze(new Cartesian2(1, 0));
+Cartesian2.UNIT_Y = Object.freeze(new Cartesian2(0, 1));
+Cartesian2.prototype.clone = function(result) {
+ return Cartesian2.clone(this, result);
+};
+Cartesian2.prototype.equals = function(right) {
+ return Cartesian2.equals(this, right);
+};
+Cartesian2.prototype.equalsEpsilon = function(right, relativeEpsilon, absoluteEpsilon) {
+ return Cartesian2.equalsEpsilon(
+ this,
+ right,
+ relativeEpsilon,
+ absoluteEpsilon
+ );
+};
+Cartesian2.prototype.toString = function() {
+ return `(${this.x}, ${this.y})`;
+};
+var Cartesian2_default = Cartesian2;
+
+// packages/engine/Source/Core/Ellipsoid.js
+function initialize(ellipsoid, x, y, z) {
+ x = defaultValue_default(x, 0);
+ y = defaultValue_default(y, 0);
+ z = defaultValue_default(z, 0);
+ Check_default.typeOf.number.greaterThanOrEquals("x", x, 0);
+ Check_default.typeOf.number.greaterThanOrEquals("y", y, 0);
+ Check_default.typeOf.number.greaterThanOrEquals("z", z, 0);
+ ellipsoid._radii = new Cartesian3_default(x, y, z);
+ ellipsoid._radiiSquared = new Cartesian3_default(x * x, y * y, z * z);
+ ellipsoid._radiiToTheFourth = new Cartesian3_default(
+ x * x * x * x,
+ y * y * y * y,
+ z * z * z * z
+ );
+ ellipsoid._oneOverRadii = new Cartesian3_default(
+ x === 0 ? 0 : 1 / x,
+ y === 0 ? 0 : 1 / y,
+ z === 0 ? 0 : 1 / z
+ );
+ ellipsoid._oneOverRadiiSquared = new Cartesian3_default(
+ x === 0 ? 0 : 1 / (x * x),
+ y === 0 ? 0 : 1 / (y * y),
+ z === 0 ? 0 : 1 / (z * z)
+ );
+ ellipsoid._minimumRadius = Math.min(x, y, z);
+ ellipsoid._maximumRadius = Math.max(x, y, z);
+ ellipsoid._centerToleranceSquared = Math_default.EPSILON1;
+ if (ellipsoid._radiiSquared.z !== 0) {
+ ellipsoid._squaredXOverSquaredZ = ellipsoid._radiiSquared.x / ellipsoid._radiiSquared.z;
+ }
+}
+function Ellipsoid(x, y, z) {
+ this._radii = void 0;
+ this._radiiSquared = void 0;
+ this._radiiToTheFourth = void 0;
+ this._oneOverRadii = void 0;
+ this._oneOverRadiiSquared = void 0;
+ this._minimumRadius = void 0;
+ this._maximumRadius = void 0;
+ this._centerToleranceSquared = void 0;
+ this._squaredXOverSquaredZ = void 0;
+ initialize(this, x, y, z);
+}
+Object.defineProperties(Ellipsoid.prototype, {
+ /**
+ * Gets the radii of the ellipsoid.
+ * @memberof Ellipsoid.prototype
+ * @type {Cartesian3}
+ * @readonly
+ */
+ radii: {
+ get: function() {
+ return this._radii;
+ }
+ },
+ /**
+ * Gets the squared radii of the ellipsoid.
+ * @memberof Ellipsoid.prototype
+ * @type {Cartesian3}
+ * @readonly
+ */
+ radiiSquared: {
+ get: function() {
+ return this._radiiSquared;
+ }
+ },
+ /**
+ * Gets the radii of the ellipsoid raise to the fourth power.
+ * @memberof Ellipsoid.prototype
+ * @type {Cartesian3}
+ * @readonly
+ */
+ radiiToTheFourth: {
+ get: function() {
+ return this._radiiToTheFourth;
+ }
+ },
+ /**
+ * Gets one over the radii of the ellipsoid.
+ * @memberof Ellipsoid.prototype
+ * @type {Cartesian3}
+ * @readonly
+ */
+ oneOverRadii: {
+ get: function() {
+ return this._oneOverRadii;
+ }
+ },
+ /**
+ * Gets one over the squared radii of the ellipsoid.
+ * @memberof Ellipsoid.prototype
+ * @type {Cartesian3}
+ * @readonly
+ */
+ oneOverRadiiSquared: {
+ get: function() {
+ return this._oneOverRadiiSquared;
+ }
+ },
+ /**
+ * Gets the minimum radius of the ellipsoid.
+ * @memberof Ellipsoid.prototype
+ * @type {number}
+ * @readonly
+ */
+ minimumRadius: {
+ get: function() {
+ return this._minimumRadius;
+ }
+ },
+ /**
+ * Gets the maximum radius of the ellipsoid.
+ * @memberof Ellipsoid.prototype
+ * @type {number}
+ * @readonly
+ */
+ maximumRadius: {
+ get: function() {
+ return this._maximumRadius;
+ }
+ }
+});
+Ellipsoid.clone = function(ellipsoid, result) {
+ if (!defined_default(ellipsoid)) {
+ return void 0;
+ }
+ const radii = ellipsoid._radii;
+ if (!defined_default(result)) {
+ return new Ellipsoid(radii.x, radii.y, radii.z);
+ }
+ Cartesian3_default.clone(radii, result._radii);
+ Cartesian3_default.clone(ellipsoid._radiiSquared, result._radiiSquared);
+ Cartesian3_default.clone(ellipsoid._radiiToTheFourth, result._radiiToTheFourth);
+ Cartesian3_default.clone(ellipsoid._oneOverRadii, result._oneOverRadii);
+ Cartesian3_default.clone(ellipsoid._oneOverRadiiSquared, result._oneOverRadiiSquared);
+ result._minimumRadius = ellipsoid._minimumRadius;
+ result._maximumRadius = ellipsoid._maximumRadius;
+ result._centerToleranceSquared = ellipsoid._centerToleranceSquared;
+ return result;
+};
+Ellipsoid.fromCartesian3 = function(cartesian, result) {
+ if (!defined_default(result)) {
+ result = new Ellipsoid();
+ }
+ if (!defined_default(cartesian)) {
+ return result;
+ }
+ initialize(result, cartesian.x, cartesian.y, cartesian.z);
+ return result;
+};
+Ellipsoid.WGS84 = Object.freeze(
+ new Ellipsoid(6378137, 6378137, 6356752314245179e-9)
+);
+Ellipsoid.UNIT_SPHERE = Object.freeze(new Ellipsoid(1, 1, 1));
+Ellipsoid.MOON = Object.freeze(
+ new Ellipsoid(
+ Math_default.LUNAR_RADIUS,
+ Math_default.LUNAR_RADIUS,
+ Math_default.LUNAR_RADIUS
+ )
+);
+Ellipsoid._default = Ellipsoid.WGS84;
+Object.defineProperties(Ellipsoid, {
+ /**
+ * The default ellipsoid used when not otherwise specified.
+ * @memberof Ellipsoid
+ * @type {Ellipsoid}
+ * @example
+ * Cesium.Ellipsoid.default = Cesium.Ellipsoid.MOON;
+ *
+ * // Apollo 11 landing site
+ * const position = Cesium.Cartesian3.fromRadians(
+ * 0.67416,
+ * 23.47315,
+ * );
+ */
+ default: {
+ get: function() {
+ return Ellipsoid._default;
+ },
+ set: function(value) {
+ Check_default.typeOf.object("value", value);
+ Ellipsoid._default = value;
+ Cartesian3_default._ellipsoidRadiiSquared = value.radiiSquared;
+ Cartographic_default._ellipsoidOneOverRadii = value.oneOverRadii;
+ Cartographic_default._ellipsoidOneOverRadiiSquared = value.oneOverRadiiSquared;
+ Cartographic_default._ellipsoidCenterToleranceSquared = value._centerToleranceSquared;
+ }
+ }
+});
+Ellipsoid.prototype.clone = function(result) {
+ return Ellipsoid.clone(this, result);
+};
+Ellipsoid.packedLength = Cartesian3_default.packedLength;
+Ellipsoid.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ Cartesian3_default.pack(value._radii, array, startingIndex);
+ return array;
+};
+Ellipsoid.unpack = function(array, startingIndex, result) {
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ const radii = Cartesian3_default.unpack(array, startingIndex);
+ return Ellipsoid.fromCartesian3(radii, result);
+};
+Ellipsoid.prototype.geocentricSurfaceNormal = Cartesian3_default.normalize;
+Ellipsoid.prototype.geodeticSurfaceNormalCartographic = function(cartographic, result) {
+ Check_default.typeOf.object("cartographic", cartographic);
+ const longitude = cartographic.longitude;
+ const latitude = cartographic.latitude;
+ const cosLatitude = Math.cos(latitude);
+ const x = cosLatitude * Math.cos(longitude);
+ const y = cosLatitude * Math.sin(longitude);
+ const z = Math.sin(latitude);
+ if (!defined_default(result)) {
+ result = new Cartesian3_default();
+ }
+ result.x = x;
+ result.y = y;
+ result.z = z;
+ return Cartesian3_default.normalize(result, result);
+};
+Ellipsoid.prototype.geodeticSurfaceNormal = function(cartesian, result) {
+ Check_default.typeOf.object("cartesian", cartesian);
+ if (isNaN(cartesian.x) || isNaN(cartesian.y) || isNaN(cartesian.z)) {
+ throw new DeveloperError_default("cartesian has a NaN component");
+ }
+ if (Cartesian3_default.equalsEpsilon(cartesian, Cartesian3_default.ZERO, Math_default.EPSILON14)) {
+ return void 0;
+ }
+ if (!defined_default(result)) {
+ result = new Cartesian3_default();
+ }
+ result = Cartesian3_default.multiplyComponents(
+ cartesian,
+ this._oneOverRadiiSquared,
+ result
+ );
+ return Cartesian3_default.normalize(result, result);
+};
+var cartographicToCartesianNormal = new Cartesian3_default();
+var cartographicToCartesianK = new Cartesian3_default();
+Ellipsoid.prototype.cartographicToCartesian = function(cartographic, result) {
+ const n = cartographicToCartesianNormal;
+ const k = cartographicToCartesianK;
+ this.geodeticSurfaceNormalCartographic(cartographic, n);
+ Cartesian3_default.multiplyComponents(this._radiiSquared, n, k);
+ const gamma = Math.sqrt(Cartesian3_default.dot(n, k));
+ Cartesian3_default.divideByScalar(k, gamma, k);
+ Cartesian3_default.multiplyByScalar(n, cartographic.height, n);
+ if (!defined_default(result)) {
+ result = new Cartesian3_default();
+ }
+ return Cartesian3_default.add(k, n, result);
+};
+Ellipsoid.prototype.cartographicArrayToCartesianArray = function(cartographics, result) {
+ Check_default.defined("cartographics", cartographics);
+ const length = cartographics.length;
+ if (!defined_default(result)) {
+ result = new Array(length);
+ } else {
+ result.length = length;
+ }
+ for (let i = 0; i < length; i++) {
+ result[i] = this.cartographicToCartesian(cartographics[i], result[i]);
+ }
+ return result;
+};
+var cartesianToCartographicN2 = new Cartesian3_default();
+var cartesianToCartographicP2 = new Cartesian3_default();
+var cartesianToCartographicH2 = new Cartesian3_default();
+Ellipsoid.prototype.cartesianToCartographic = function(cartesian, result) {
+ const p = this.scaleToGeodeticSurface(cartesian, cartesianToCartographicP2);
+ if (!defined_default(p)) {
+ return void 0;
+ }
+ const n = this.geodeticSurfaceNormal(p, cartesianToCartographicN2);
+ const h = Cartesian3_default.subtract(cartesian, p, cartesianToCartographicH2);
+ const longitude = Math.atan2(n.y, n.x);
+ const latitude = Math.asin(n.z);
+ const height = Math_default.sign(Cartesian3_default.dot(h, cartesian)) * Cartesian3_default.magnitude(h);
+ if (!defined_default(result)) {
+ return new Cartographic_default(longitude, latitude, height);
+ }
+ result.longitude = longitude;
+ result.latitude = latitude;
+ result.height = height;
+ return result;
+};
+Ellipsoid.prototype.cartesianArrayToCartographicArray = function(cartesians, result) {
+ Check_default.defined("cartesians", cartesians);
+ const length = cartesians.length;
+ if (!defined_default(result)) {
+ result = new Array(length);
+ } else {
+ result.length = length;
+ }
+ for (let i = 0; i < length; ++i) {
+ result[i] = this.cartesianToCartographic(cartesians[i], result[i]);
+ }
+ return result;
+};
+Ellipsoid.prototype.scaleToGeodeticSurface = function(cartesian, result) {
+ return scaleToGeodeticSurface_default(
+ cartesian,
+ this._oneOverRadii,
+ this._oneOverRadiiSquared,
+ this._centerToleranceSquared,
+ result
+ );
+};
+Ellipsoid.prototype.scaleToGeocentricSurface = function(cartesian, result) {
+ Check_default.typeOf.object("cartesian", cartesian);
+ if (!defined_default(result)) {
+ result = new Cartesian3_default();
+ }
+ const positionX = cartesian.x;
+ const positionY = cartesian.y;
+ const positionZ = cartesian.z;
+ const oneOverRadiiSquared = this._oneOverRadiiSquared;
+ const beta = 1 / Math.sqrt(
+ positionX * positionX * oneOverRadiiSquared.x + positionY * positionY * oneOverRadiiSquared.y + positionZ * positionZ * oneOverRadiiSquared.z
+ );
+ return Cartesian3_default.multiplyByScalar(cartesian, beta, result);
+};
+Ellipsoid.prototype.transformPositionToScaledSpace = function(position, result) {
+ if (!defined_default(result)) {
+ result = new Cartesian3_default();
+ }
+ return Cartesian3_default.multiplyComponents(position, this._oneOverRadii, result);
+};
+Ellipsoid.prototype.transformPositionFromScaledSpace = function(position, result) {
+ if (!defined_default(result)) {
+ result = new Cartesian3_default();
+ }
+ return Cartesian3_default.multiplyComponents(position, this._radii, result);
+};
+Ellipsoid.prototype.equals = function(right) {
+ return this === right || defined_default(right) && Cartesian3_default.equals(this._radii, right._radii);
+};
+Ellipsoid.prototype.toString = function() {
+ return this._radii.toString();
+};
+Ellipsoid.prototype.getSurfaceNormalIntersectionWithZAxis = function(position, buffer, result) {
+ Check_default.typeOf.object("position", position);
+ if (!Math_default.equalsEpsilon(
+ this._radii.x,
+ this._radii.y,
+ Math_default.EPSILON15
+ )) {
+ throw new DeveloperError_default(
+ "Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)"
+ );
+ }
+ Check_default.typeOf.number.greaterThan("Ellipsoid.radii.z", this._radii.z, 0);
+ buffer = defaultValue_default(buffer, 0);
+ const squaredXOverSquaredZ = this._squaredXOverSquaredZ;
+ if (!defined_default(result)) {
+ result = new Cartesian3_default();
+ }
+ result.x = 0;
+ result.y = 0;
+ result.z = position.z * (1 - squaredXOverSquaredZ);
+ if (Math.abs(result.z) >= this._radii.z - buffer) {
+ return void 0;
+ }
+ return result;
+};
+var scratchEndpoint = new Cartesian3_default();
+Ellipsoid.prototype.getLocalCurvature = function(surfacePosition, result) {
+ Check_default.typeOf.object("surfacePosition", surfacePosition);
+ if (!defined_default(result)) {
+ result = new Cartesian2_default();
+ }
+ const primeVerticalEndpoint = this.getSurfaceNormalIntersectionWithZAxis(
+ surfacePosition,
+ 0,
+ scratchEndpoint
+ );
+ const primeVerticalRadius = Cartesian3_default.distance(
+ surfacePosition,
+ primeVerticalEndpoint
+ );
+ const radiusRatio = this.minimumRadius * primeVerticalRadius / this.maximumRadius ** 2;
+ const meridionalRadius = primeVerticalRadius * radiusRatio ** 2;
+ return Cartesian2_default.fromElements(
+ 1 / primeVerticalRadius,
+ 1 / meridionalRadius,
+ result
+ );
+};
+var abscissas = [
+ 0.14887433898163,
+ 0.43339539412925,
+ 0.67940956829902,
+ 0.86506336668898,
+ 0.97390652851717,
+ 0
+];
+var weights = [
+ 0.29552422471475,
+ 0.26926671930999,
+ 0.21908636251598,
+ 0.14945134915058,
+ 0.066671344308684,
+ 0
+];
+function gaussLegendreQuadrature(a, b, func) {
+ Check_default.typeOf.number("a", a);
+ Check_default.typeOf.number("b", b);
+ Check_default.typeOf.func("func", func);
+ const xMean = 0.5 * (b + a);
+ const xRange = 0.5 * (b - a);
+ let sum = 0;
+ for (let i = 0; i < 5; i++) {
+ const dx = xRange * abscissas[i];
+ sum += weights[i] * (func(xMean + dx) + func(xMean - dx));
+ }
+ sum *= xRange;
+ return sum;
+}
+Ellipsoid.prototype.surfaceArea = function(rectangle) {
+ Check_default.typeOf.object("rectangle", rectangle);
+ const minLongitude = rectangle.west;
+ let maxLongitude = rectangle.east;
+ const minLatitude = rectangle.south;
+ const maxLatitude = rectangle.north;
+ while (maxLongitude < minLongitude) {
+ maxLongitude += Math_default.TWO_PI;
+ }
+ const radiiSquared = this._radiiSquared;
+ const a2 = radiiSquared.x;
+ const b2 = radiiSquared.y;
+ const c2 = radiiSquared.z;
+ const a2b2 = a2 * b2;
+ return gaussLegendreQuadrature(minLatitude, maxLatitude, function(lat) {
+ const sinPhi = Math.cos(lat);
+ const cosPhi = Math.sin(lat);
+ return Math.cos(lat) * gaussLegendreQuadrature(minLongitude, maxLongitude, function(lon) {
+ const cosTheta = Math.cos(lon);
+ const sinTheta = Math.sin(lon);
+ return Math.sqrt(
+ a2b2 * cosPhi * cosPhi + c2 * (b2 * cosTheta * cosTheta + a2 * sinTheta * sinTheta) * sinPhi * sinPhi
+ );
+ });
+ });
+};
+var Ellipsoid_default = Ellipsoid;
+
+// packages/engine/Source/Core/Matrix3.js
+function Matrix3(column0Row0, column1Row0, column2Row0, column0Row1, column1Row1, column2Row1, column0Row2, column1Row2, column2Row2) {
+ this[0] = defaultValue_default(column0Row0, 0);
+ this[1] = defaultValue_default(column0Row1, 0);
+ this[2] = defaultValue_default(column0Row2, 0);
+ this[3] = defaultValue_default(column1Row0, 0);
+ this[4] = defaultValue_default(column1Row1, 0);
+ this[5] = defaultValue_default(column1Row2, 0);
+ this[6] = defaultValue_default(column2Row0, 0);
+ this[7] = defaultValue_default(column2Row1, 0);
+ this[8] = defaultValue_default(column2Row2, 0);
+}
+Matrix3.packedLength = 9;
+Matrix3.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ array[startingIndex++] = value[0];
+ array[startingIndex++] = value[1];
+ array[startingIndex++] = value[2];
+ array[startingIndex++] = value[3];
+ array[startingIndex++] = value[4];
+ array[startingIndex++] = value[5];
+ array[startingIndex++] = value[6];
+ array[startingIndex++] = value[7];
+ array[startingIndex++] = value[8];
+ return array;
+};
+Matrix3.unpack = function(array, startingIndex, result) {
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ if (!defined_default(result)) {
+ result = new Matrix3();
+ }
+ result[0] = array[startingIndex++];
+ result[1] = array[startingIndex++];
+ result[2] = array[startingIndex++];
+ result[3] = array[startingIndex++];
+ result[4] = array[startingIndex++];
+ result[5] = array[startingIndex++];
+ result[6] = array[startingIndex++];
+ result[7] = array[startingIndex++];
+ result[8] = array[startingIndex++];
+ return result;
+};
+Matrix3.packArray = function(array, result) {
+ Check_default.defined("array", array);
+ const length = array.length;
+ const resultLength = length * 9;
+ if (!defined_default(result)) {
+ result = new Array(resultLength);
+ } else if (!Array.isArray(result) && result.length !== resultLength) {
+ throw new DeveloperError_default(
+ "If result is a typed array, it must have exactly array.length * 9 elements"
+ );
+ } else if (result.length !== resultLength) {
+ result.length = resultLength;
+ }
+ for (let i = 0; i < length; ++i) {
+ Matrix3.pack(array[i], result, i * 9);
+ }
+ return result;
+};
+Matrix3.unpackArray = function(array, result) {
+ Check_default.defined("array", array);
+ Check_default.typeOf.number.greaterThanOrEquals("array.length", array.length, 9);
+ if (array.length % 9 !== 0) {
+ throw new DeveloperError_default("array length must be a multiple of 9.");
+ }
+ const length = array.length;
+ if (!defined_default(result)) {
+ result = new Array(length / 9);
+ } else {
+ result.length = length / 9;
+ }
+ for (let i = 0; i < length; i += 9) {
+ const index = i / 9;
+ result[index] = Matrix3.unpack(array, i, result[index]);
+ }
+ return result;
+};
+Matrix3.clone = function(matrix, result) {
+ if (!defined_default(matrix)) {
+ return void 0;
+ }
+ if (!defined_default(result)) {
+ return new Matrix3(
+ matrix[0],
+ matrix[3],
+ matrix[6],
+ matrix[1],
+ matrix[4],
+ matrix[7],
+ matrix[2],
+ matrix[5],
+ matrix[8]
+ );
+ }
+ result[0] = matrix[0];
+ result[1] = matrix[1];
+ result[2] = matrix[2];
+ result[3] = matrix[3];
+ result[4] = matrix[4];
+ result[5] = matrix[5];
+ result[6] = matrix[6];
+ result[7] = matrix[7];
+ result[8] = matrix[8];
+ return result;
+};
+Matrix3.fromArray = Matrix3.unpack;
+Matrix3.fromColumnMajorArray = function(values, result) {
+ Check_default.defined("values", values);
+ return Matrix3.clone(values, result);
+};
+Matrix3.fromRowMajorArray = function(values, result) {
+ Check_default.defined("values", values);
+ if (!defined_default(result)) {
+ return new Matrix3(
+ values[0],
+ values[1],
+ values[2],
+ values[3],
+ values[4],
+ values[5],
+ values[6],
+ values[7],
+ values[8]
+ );
+ }
+ result[0] = values[0];
+ result[1] = values[3];
+ result[2] = values[6];
+ result[3] = values[1];
+ result[4] = values[4];
+ result[5] = values[7];
+ result[6] = values[2];
+ result[7] = values[5];
+ result[8] = values[8];
+ return result;
+};
+Matrix3.fromQuaternion = function(quaternion, result) {
+ Check_default.typeOf.object("quaternion", quaternion);
+ const x2 = quaternion.x * quaternion.x;
+ const xy = quaternion.x * quaternion.y;
+ const xz = quaternion.x * quaternion.z;
+ const xw = quaternion.x * quaternion.w;
+ const y2 = quaternion.y * quaternion.y;
+ const yz = quaternion.y * quaternion.z;
+ const yw = quaternion.y * quaternion.w;
+ const z2 = quaternion.z * quaternion.z;
+ const zw = quaternion.z * quaternion.w;
+ const w2 = quaternion.w * quaternion.w;
+ const m00 = x2 - y2 - z2 + w2;
+ const m01 = 2 * (xy - zw);
+ const m02 = 2 * (xz + yw);
+ const m10 = 2 * (xy + zw);
+ const m11 = -x2 + y2 - z2 + w2;
+ const m12 = 2 * (yz - xw);
+ const m20 = 2 * (xz - yw);
+ const m21 = 2 * (yz + xw);
+ const m22 = -x2 - y2 + z2 + w2;
+ if (!defined_default(result)) {
+ return new Matrix3(m00, m01, m02, m10, m11, m12, m20, m21, m22);
+ }
+ result[0] = m00;
+ result[1] = m10;
+ result[2] = m20;
+ result[3] = m01;
+ result[4] = m11;
+ result[5] = m21;
+ result[6] = m02;
+ result[7] = m12;
+ result[8] = m22;
+ return result;
+};
+Matrix3.fromHeadingPitchRoll = function(headingPitchRoll, result) {
+ Check_default.typeOf.object("headingPitchRoll", headingPitchRoll);
+ const cosTheta = Math.cos(-headingPitchRoll.pitch);
+ const cosPsi = Math.cos(-headingPitchRoll.heading);
+ const cosPhi = Math.cos(headingPitchRoll.roll);
+ const sinTheta = Math.sin(-headingPitchRoll.pitch);
+ const sinPsi = Math.sin(-headingPitchRoll.heading);
+ const sinPhi = Math.sin(headingPitchRoll.roll);
+ const m00 = cosTheta * cosPsi;
+ const m01 = -cosPhi * sinPsi + sinPhi * sinTheta * cosPsi;
+ const m02 = sinPhi * sinPsi + cosPhi * sinTheta * cosPsi;
+ const m10 = cosTheta * sinPsi;
+ const m11 = cosPhi * cosPsi + sinPhi * sinTheta * sinPsi;
+ const m12 = -sinPhi * cosPsi + cosPhi * sinTheta * sinPsi;
+ const m20 = -sinTheta;
+ const m21 = sinPhi * cosTheta;
+ const m22 = cosPhi * cosTheta;
+ if (!defined_default(result)) {
+ return new Matrix3(m00, m01, m02, m10, m11, m12, m20, m21, m22);
+ }
+ result[0] = m00;
+ result[1] = m10;
+ result[2] = m20;
+ result[3] = m01;
+ result[4] = m11;
+ result[5] = m21;
+ result[6] = m02;
+ result[7] = m12;
+ result[8] = m22;
+ return result;
+};
+Matrix3.fromScale = function(scale, result) {
+ Check_default.typeOf.object("scale", scale);
+ if (!defined_default(result)) {
+ return new Matrix3(scale.x, 0, 0, 0, scale.y, 0, 0, 0, scale.z);
+ }
+ result[0] = scale.x;
+ result[1] = 0;
+ result[2] = 0;
+ result[3] = 0;
+ result[4] = scale.y;
+ result[5] = 0;
+ result[6] = 0;
+ result[7] = 0;
+ result[8] = scale.z;
+ return result;
+};
+Matrix3.fromUniformScale = function(scale, result) {
+ Check_default.typeOf.number("scale", scale);
+ if (!defined_default(result)) {
+ return new Matrix3(scale, 0, 0, 0, scale, 0, 0, 0, scale);
+ }
+ result[0] = scale;
+ result[1] = 0;
+ result[2] = 0;
+ result[3] = 0;
+ result[4] = scale;
+ result[5] = 0;
+ result[6] = 0;
+ result[7] = 0;
+ result[8] = scale;
+ return result;
+};
+Matrix3.fromCrossProduct = function(vector, result) {
+ Check_default.typeOf.object("vector", vector);
+ if (!defined_default(result)) {
+ return new Matrix3(
+ 0,
+ -vector.z,
+ vector.y,
+ vector.z,
+ 0,
+ -vector.x,
+ -vector.y,
+ vector.x,
+ 0
+ );
+ }
+ result[0] = 0;
+ result[1] = vector.z;
+ result[2] = -vector.y;
+ result[3] = -vector.z;
+ result[4] = 0;
+ result[5] = vector.x;
+ result[6] = vector.y;
+ result[7] = -vector.x;
+ result[8] = 0;
+ return result;
+};
+Matrix3.fromRotationX = function(angle, result) {
+ Check_default.typeOf.number("angle", angle);
+ const cosAngle = Math.cos(angle);
+ const sinAngle = Math.sin(angle);
+ if (!defined_default(result)) {
+ return new Matrix3(
+ 1,
+ 0,
+ 0,
+ 0,
+ cosAngle,
+ -sinAngle,
+ 0,
+ sinAngle,
+ cosAngle
+ );
+ }
+ result[0] = 1;
+ result[1] = 0;
+ result[2] = 0;
+ result[3] = 0;
+ result[4] = cosAngle;
+ result[5] = sinAngle;
+ result[6] = 0;
+ result[7] = -sinAngle;
+ result[8] = cosAngle;
+ return result;
+};
+Matrix3.fromRotationY = function(angle, result) {
+ Check_default.typeOf.number("angle", angle);
+ const cosAngle = Math.cos(angle);
+ const sinAngle = Math.sin(angle);
+ if (!defined_default(result)) {
+ return new Matrix3(
+ cosAngle,
+ 0,
+ sinAngle,
+ 0,
+ 1,
+ 0,
+ -sinAngle,
+ 0,
+ cosAngle
+ );
+ }
+ result[0] = cosAngle;
+ result[1] = 0;
+ result[2] = -sinAngle;
+ result[3] = 0;
+ result[4] = 1;
+ result[5] = 0;
+ result[6] = sinAngle;
+ result[7] = 0;
+ result[8] = cosAngle;
+ return result;
+};
+Matrix3.fromRotationZ = function(angle, result) {
+ Check_default.typeOf.number("angle", angle);
+ const cosAngle = Math.cos(angle);
+ const sinAngle = Math.sin(angle);
+ if (!defined_default(result)) {
+ return new Matrix3(
+ cosAngle,
+ -sinAngle,
+ 0,
+ sinAngle,
+ cosAngle,
+ 0,
+ 0,
+ 0,
+ 1
+ );
+ }
+ result[0] = cosAngle;
+ result[1] = sinAngle;
+ result[2] = 0;
+ result[3] = -sinAngle;
+ result[4] = cosAngle;
+ result[5] = 0;
+ result[6] = 0;
+ result[7] = 0;
+ result[8] = 1;
+ return result;
+};
+Matrix3.toArray = function(matrix, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ if (!defined_default(result)) {
+ return [
+ matrix[0],
+ matrix[1],
+ matrix[2],
+ matrix[3],
+ matrix[4],
+ matrix[5],
+ matrix[6],
+ matrix[7],
+ matrix[8]
+ ];
+ }
+ result[0] = matrix[0];
+ result[1] = matrix[1];
+ result[2] = matrix[2];
+ result[3] = matrix[3];
+ result[4] = matrix[4];
+ result[5] = matrix[5];
+ result[6] = matrix[6];
+ result[7] = matrix[7];
+ result[8] = matrix[8];
+ return result;
+};
+Matrix3.getElementIndex = function(column, row) {
+ Check_default.typeOf.number.greaterThanOrEquals("row", row, 0);
+ Check_default.typeOf.number.lessThanOrEquals("row", row, 2);
+ Check_default.typeOf.number.greaterThanOrEquals("column", column, 0);
+ Check_default.typeOf.number.lessThanOrEquals("column", column, 2);
+ return column * 3 + row;
+};
+Matrix3.getColumn = function(matrix, index, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.number.greaterThanOrEquals("index", index, 0);
+ Check_default.typeOf.number.lessThanOrEquals("index", index, 2);
+ Check_default.typeOf.object("result", result);
+ const startIndex = index * 3;
+ const x = matrix[startIndex];
+ const y = matrix[startIndex + 1];
+ const z = matrix[startIndex + 2];
+ result.x = x;
+ result.y = y;
+ result.z = z;
+ return result;
+};
+Matrix3.setColumn = function(matrix, index, cartesian, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.number.greaterThanOrEquals("index", index, 0);
+ Check_default.typeOf.number.lessThanOrEquals("index", index, 2);
+ Check_default.typeOf.object("cartesian", cartesian);
+ Check_default.typeOf.object("result", result);
+ result = Matrix3.clone(matrix, result);
+ const startIndex = index * 3;
+ result[startIndex] = cartesian.x;
+ result[startIndex + 1] = cartesian.y;
+ result[startIndex + 2] = cartesian.z;
+ return result;
+};
+Matrix3.getRow = function(matrix, index, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.number.greaterThanOrEquals("index", index, 0);
+ Check_default.typeOf.number.lessThanOrEquals("index", index, 2);
+ Check_default.typeOf.object("result", result);
+ const x = matrix[index];
+ const y = matrix[index + 3];
+ const z = matrix[index + 6];
+ result.x = x;
+ result.y = y;
+ result.z = z;
+ return result;
+};
+Matrix3.setRow = function(matrix, index, cartesian, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.number.greaterThanOrEquals("index", index, 0);
+ Check_default.typeOf.number.lessThanOrEquals("index", index, 2);
+ Check_default.typeOf.object("cartesian", cartesian);
+ Check_default.typeOf.object("result", result);
+ result = Matrix3.clone(matrix, result);
+ result[index] = cartesian.x;
+ result[index + 3] = cartesian.y;
+ result[index + 6] = cartesian.z;
+ return result;
+};
+var scaleScratch1 = new Cartesian3_default();
+Matrix3.setScale = function(matrix, scale, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.object("scale", scale);
+ Check_default.typeOf.object("result", result);
+ const existingScale = Matrix3.getScale(matrix, scaleScratch1);
+ const scaleRatioX = scale.x / existingScale.x;
+ const scaleRatioY = scale.y / existingScale.y;
+ const scaleRatioZ = scale.z / existingScale.z;
+ result[0] = matrix[0] * scaleRatioX;
+ result[1] = matrix[1] * scaleRatioX;
+ result[2] = matrix[2] * scaleRatioX;
+ result[3] = matrix[3] * scaleRatioY;
+ result[4] = matrix[4] * scaleRatioY;
+ result[5] = matrix[5] * scaleRatioY;
+ result[6] = matrix[6] * scaleRatioZ;
+ result[7] = matrix[7] * scaleRatioZ;
+ result[8] = matrix[8] * scaleRatioZ;
+ return result;
+};
+var scaleScratch2 = new Cartesian3_default();
+Matrix3.setUniformScale = function(matrix, scale, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.number("scale", scale);
+ Check_default.typeOf.object("result", result);
+ const existingScale = Matrix3.getScale(matrix, scaleScratch2);
+ const scaleRatioX = scale / existingScale.x;
+ const scaleRatioY = scale / existingScale.y;
+ const scaleRatioZ = scale / existingScale.z;
+ result[0] = matrix[0] * scaleRatioX;
+ result[1] = matrix[1] * scaleRatioX;
+ result[2] = matrix[2] * scaleRatioX;
+ result[3] = matrix[3] * scaleRatioY;
+ result[4] = matrix[4] * scaleRatioY;
+ result[5] = matrix[5] * scaleRatioY;
+ result[6] = matrix[6] * scaleRatioZ;
+ result[7] = matrix[7] * scaleRatioZ;
+ result[8] = matrix[8] * scaleRatioZ;
+ return result;
+};
+var scratchColumn = new Cartesian3_default();
+Matrix3.getScale = function(matrix, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.object("result", result);
+ result.x = Cartesian3_default.magnitude(
+ Cartesian3_default.fromElements(matrix[0], matrix[1], matrix[2], scratchColumn)
+ );
+ result.y = Cartesian3_default.magnitude(
+ Cartesian3_default.fromElements(matrix[3], matrix[4], matrix[5], scratchColumn)
+ );
+ result.z = Cartesian3_default.magnitude(
+ Cartesian3_default.fromElements(matrix[6], matrix[7], matrix[8], scratchColumn)
+ );
+ return result;
+};
+var scaleScratch3 = new Cartesian3_default();
+Matrix3.getMaximumScale = function(matrix) {
+ Matrix3.getScale(matrix, scaleScratch3);
+ return Cartesian3_default.maximumComponent(scaleScratch3);
+};
+var scaleScratch4 = new Cartesian3_default();
+Matrix3.setRotation = function(matrix, rotation, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.object("result", result);
+ const scale = Matrix3.getScale(matrix, scaleScratch4);
+ result[0] = rotation[0] * scale.x;
+ result[1] = rotation[1] * scale.x;
+ result[2] = rotation[2] * scale.x;
+ result[3] = rotation[3] * scale.y;
+ result[4] = rotation[4] * scale.y;
+ result[5] = rotation[5] * scale.y;
+ result[6] = rotation[6] * scale.z;
+ result[7] = rotation[7] * scale.z;
+ result[8] = rotation[8] * scale.z;
+ return result;
+};
+var scaleScratch5 = new Cartesian3_default();
+Matrix3.getRotation = function(matrix, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.object("result", result);
+ const scale = Matrix3.getScale(matrix, scaleScratch5);
+ result[0] = matrix[0] / scale.x;
+ result[1] = matrix[1] / scale.x;
+ result[2] = matrix[2] / scale.x;
+ result[3] = matrix[3] / scale.y;
+ result[4] = matrix[4] / scale.y;
+ result[5] = matrix[5] / scale.y;
+ result[6] = matrix[6] / scale.z;
+ result[7] = matrix[7] / scale.z;
+ result[8] = matrix[8] / scale.z;
+ return result;
+};
+Matrix3.multiply = function(left, right, result) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Check_default.typeOf.object("result", result);
+ const column0Row0 = left[0] * right[0] + left[3] * right[1] + left[6] * right[2];
+ const column0Row1 = left[1] * right[0] + left[4] * right[1] + left[7] * right[2];
+ const column0Row2 = left[2] * right[0] + left[5] * right[1] + left[8] * right[2];
+ const column1Row0 = left[0] * right[3] + left[3] * right[4] + left[6] * right[5];
+ const column1Row1 = left[1] * right[3] + left[4] * right[4] + left[7] * right[5];
+ const column1Row2 = left[2] * right[3] + left[5] * right[4] + left[8] * right[5];
+ const column2Row0 = left[0] * right[6] + left[3] * right[7] + left[6] * right[8];
+ const column2Row1 = left[1] * right[6] + left[4] * right[7] + left[7] * right[8];
+ const column2Row2 = left[2] * right[6] + left[5] * right[7] + left[8] * right[8];
+ result[0] = column0Row0;
+ result[1] = column0Row1;
+ result[2] = column0Row2;
+ result[3] = column1Row0;
+ result[4] = column1Row1;
+ result[5] = column1Row2;
+ result[6] = column2Row0;
+ result[7] = column2Row1;
+ result[8] = column2Row2;
+ return result;
+};
+Matrix3.add = function(left, right, result) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Check_default.typeOf.object("result", result);
+ result[0] = left[0] + right[0];
+ result[1] = left[1] + right[1];
+ result[2] = left[2] + right[2];
+ result[3] = left[3] + right[3];
+ result[4] = left[4] + right[4];
+ result[5] = left[5] + right[5];
+ result[6] = left[6] + right[6];
+ result[7] = left[7] + right[7];
+ result[8] = left[8] + right[8];
+ return result;
+};
+Matrix3.subtract = function(left, right, result) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Check_default.typeOf.object("result", result);
+ result[0] = left[0] - right[0];
+ result[1] = left[1] - right[1];
+ result[2] = left[2] - right[2];
+ result[3] = left[3] - right[3];
+ result[4] = left[4] - right[4];
+ result[5] = left[5] - right[5];
+ result[6] = left[6] - right[6];
+ result[7] = left[7] - right[7];
+ result[8] = left[8] - right[8];
+ return result;
+};
+Matrix3.multiplyByVector = function(matrix, cartesian, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.object("cartesian", cartesian);
+ Check_default.typeOf.object("result", result);
+ const vX = cartesian.x;
+ const vY = cartesian.y;
+ const vZ = cartesian.z;
+ const x = matrix[0] * vX + matrix[3] * vY + matrix[6] * vZ;
+ const y = matrix[1] * vX + matrix[4] * vY + matrix[7] * vZ;
+ const z = matrix[2] * vX + matrix[5] * vY + matrix[8] * vZ;
+ result.x = x;
+ result.y = y;
+ result.z = z;
+ return result;
+};
+Matrix3.multiplyByScalar = function(matrix, scalar, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.number("scalar", scalar);
+ Check_default.typeOf.object("result", result);
+ result[0] = matrix[0] * scalar;
+ result[1] = matrix[1] * scalar;
+ result[2] = matrix[2] * scalar;
+ result[3] = matrix[3] * scalar;
+ result[4] = matrix[4] * scalar;
+ result[5] = matrix[5] * scalar;
+ result[6] = matrix[6] * scalar;
+ result[7] = matrix[7] * scalar;
+ result[8] = matrix[8] * scalar;
+ return result;
+};
+Matrix3.multiplyByScale = function(matrix, scale, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.object("scale", scale);
+ Check_default.typeOf.object("result", result);
+ result[0] = matrix[0] * scale.x;
+ result[1] = matrix[1] * scale.x;
+ result[2] = matrix[2] * scale.x;
+ result[3] = matrix[3] * scale.y;
+ result[4] = matrix[4] * scale.y;
+ result[5] = matrix[5] * scale.y;
+ result[6] = matrix[6] * scale.z;
+ result[7] = matrix[7] * scale.z;
+ result[8] = matrix[8] * scale.z;
+ return result;
+};
+Matrix3.multiplyByUniformScale = function(matrix, scale, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.number("scale", scale);
+ Check_default.typeOf.object("result", result);
+ result[0] = matrix[0] * scale;
+ result[1] = matrix[1] * scale;
+ result[2] = matrix[2] * scale;
+ result[3] = matrix[3] * scale;
+ result[4] = matrix[4] * scale;
+ result[5] = matrix[5] * scale;
+ result[6] = matrix[6] * scale;
+ result[7] = matrix[7] * scale;
+ result[8] = matrix[8] * scale;
+ return result;
+};
+Matrix3.negate = function(matrix, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.object("result", result);
+ result[0] = -matrix[0];
+ result[1] = -matrix[1];
+ result[2] = -matrix[2];
+ result[3] = -matrix[3];
+ result[4] = -matrix[4];
+ result[5] = -matrix[5];
+ result[6] = -matrix[6];
+ result[7] = -matrix[7];
+ result[8] = -matrix[8];
+ return result;
+};
+Matrix3.transpose = function(matrix, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.object("result", result);
+ const column0Row0 = matrix[0];
+ const column0Row1 = matrix[3];
+ const column0Row2 = matrix[6];
+ const column1Row0 = matrix[1];
+ const column1Row1 = matrix[4];
+ const column1Row2 = matrix[7];
+ const column2Row0 = matrix[2];
+ const column2Row1 = matrix[5];
+ const column2Row2 = matrix[8];
+ result[0] = column0Row0;
+ result[1] = column0Row1;
+ result[2] = column0Row2;
+ result[3] = column1Row0;
+ result[4] = column1Row1;
+ result[5] = column1Row2;
+ result[6] = column2Row0;
+ result[7] = column2Row1;
+ result[8] = column2Row2;
+ return result;
+};
+function computeFrobeniusNorm(matrix) {
+ let norm = 0;
+ for (let i = 0; i < 9; ++i) {
+ const temp = matrix[i];
+ norm += temp * temp;
+ }
+ return Math.sqrt(norm);
+}
+var rowVal = [1, 0, 0];
+var colVal = [2, 2, 1];
+function offDiagonalFrobeniusNorm(matrix) {
+ let norm = 0;
+ for (let i = 0; i < 3; ++i) {
+ const temp = matrix[Matrix3.getElementIndex(colVal[i], rowVal[i])];
+ norm += 2 * temp * temp;
+ }
+ return Math.sqrt(norm);
+}
+function shurDecomposition(matrix, result) {
+ const tolerance = Math_default.EPSILON15;
+ let maxDiagonal = 0;
+ let rotAxis = 1;
+ for (let i = 0; i < 3; ++i) {
+ const temp = Math.abs(
+ matrix[Matrix3.getElementIndex(colVal[i], rowVal[i])]
+ );
+ if (temp > maxDiagonal) {
+ rotAxis = i;
+ maxDiagonal = temp;
+ }
+ }
+ let c = 1;
+ let s = 0;
+ const p = rowVal[rotAxis];
+ const q = colVal[rotAxis];
+ if (Math.abs(matrix[Matrix3.getElementIndex(q, p)]) > tolerance) {
+ const qq = matrix[Matrix3.getElementIndex(q, q)];
+ const pp = matrix[Matrix3.getElementIndex(p, p)];
+ const qp = matrix[Matrix3.getElementIndex(q, p)];
+ const tau = (qq - pp) / 2 / qp;
+ let t;
+ if (tau < 0) {
+ t = -1 / (-tau + Math.sqrt(1 + tau * tau));
+ } else {
+ t = 1 / (tau + Math.sqrt(1 + tau * tau));
+ }
+ c = 1 / Math.sqrt(1 + t * t);
+ s = t * c;
+ }
+ result = Matrix3.clone(Matrix3.IDENTITY, result);
+ result[Matrix3.getElementIndex(p, p)] = result[Matrix3.getElementIndex(q, q)] = c;
+ result[Matrix3.getElementIndex(q, p)] = s;
+ result[Matrix3.getElementIndex(p, q)] = -s;
+ return result;
+}
+var jMatrix = new Matrix3();
+var jMatrixTranspose = new Matrix3();
+Matrix3.computeEigenDecomposition = function(matrix, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ const tolerance = Math_default.EPSILON20;
+ const maxSweeps = 10;
+ let count = 0;
+ let sweep = 0;
+ if (!defined_default(result)) {
+ result = {};
+ }
+ const unitaryMatrix = result.unitary = Matrix3.clone(
+ Matrix3.IDENTITY,
+ result.unitary
+ );
+ const diagMatrix = result.diagonal = Matrix3.clone(matrix, result.diagonal);
+ const epsilon = tolerance * computeFrobeniusNorm(diagMatrix);
+ while (sweep < maxSweeps && offDiagonalFrobeniusNorm(diagMatrix) > epsilon) {
+ shurDecomposition(diagMatrix, jMatrix);
+ Matrix3.transpose(jMatrix, jMatrixTranspose);
+ Matrix3.multiply(diagMatrix, jMatrix, diagMatrix);
+ Matrix3.multiply(jMatrixTranspose, diagMatrix, diagMatrix);
+ Matrix3.multiply(unitaryMatrix, jMatrix, unitaryMatrix);
+ if (++count > 2) {
+ ++sweep;
+ count = 0;
+ }
+ }
+ return result;
+};
+Matrix3.abs = function(matrix, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.object("result", result);
+ result[0] = Math.abs(matrix[0]);
+ result[1] = Math.abs(matrix[1]);
+ result[2] = Math.abs(matrix[2]);
+ result[3] = Math.abs(matrix[3]);
+ result[4] = Math.abs(matrix[4]);
+ result[5] = Math.abs(matrix[5]);
+ result[6] = Math.abs(matrix[6]);
+ result[7] = Math.abs(matrix[7]);
+ result[8] = Math.abs(matrix[8]);
+ return result;
+};
+Matrix3.determinant = function(matrix) {
+ Check_default.typeOf.object("matrix", matrix);
+ const m11 = matrix[0];
+ const m21 = matrix[3];
+ const m31 = matrix[6];
+ const m12 = matrix[1];
+ const m22 = matrix[4];
+ const m32 = matrix[7];
+ const m13 = matrix[2];
+ const m23 = matrix[5];
+ const m33 = matrix[8];
+ return m11 * (m22 * m33 - m23 * m32) + m12 * (m23 * m31 - m21 * m33) + m13 * (m21 * m32 - m22 * m31);
+};
+Matrix3.inverse = function(matrix, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.object("result", result);
+ const m11 = matrix[0];
+ const m21 = matrix[1];
+ const m31 = matrix[2];
+ const m12 = matrix[3];
+ const m22 = matrix[4];
+ const m32 = matrix[5];
+ const m13 = matrix[6];
+ const m23 = matrix[7];
+ const m33 = matrix[8];
+ const determinant = Matrix3.determinant(matrix);
+ if (Math.abs(determinant) <= Math_default.EPSILON15) {
+ throw new DeveloperError_default("matrix is not invertible");
+ }
+ result[0] = m22 * m33 - m23 * m32;
+ result[1] = m23 * m31 - m21 * m33;
+ result[2] = m21 * m32 - m22 * m31;
+ result[3] = m13 * m32 - m12 * m33;
+ result[4] = m11 * m33 - m13 * m31;
+ result[5] = m12 * m31 - m11 * m32;
+ result[6] = m12 * m23 - m13 * m22;
+ result[7] = m13 * m21 - m11 * m23;
+ result[8] = m11 * m22 - m12 * m21;
+ const scale = 1 / determinant;
+ return Matrix3.multiplyByScalar(result, scale, result);
+};
+var scratchTransposeMatrix = new Matrix3();
+Matrix3.inverseTranspose = function(matrix, result) {
+ Check_default.typeOf.object("matrix", matrix);
+ Check_default.typeOf.object("result", result);
+ return Matrix3.inverse(
+ Matrix3.transpose(matrix, scratchTransposeMatrix),
+ result
+ );
+};
+Matrix3.equals = function(left, right) {
+ return left === right || defined_default(left) && defined_default(right) && left[0] === right[0] && left[1] === right[1] && left[2] === right[2] && left[3] === right[3] && left[4] === right[4] && left[5] === right[5] && left[6] === right[6] && left[7] === right[7] && left[8] === right[8];
+};
+Matrix3.equalsEpsilon = function(left, right, epsilon) {
+ epsilon = defaultValue_default(epsilon, 0);
+ return left === right || defined_default(left) && defined_default(right) && Math.abs(left[0] - right[0]) <= epsilon && Math.abs(left[1] - right[1]) <= epsilon && Math.abs(left[2] - right[2]) <= epsilon && Math.abs(left[3] - right[3]) <= epsilon && Math.abs(left[4] - right[4]) <= epsilon && Math.abs(left[5] - right[5]) <= epsilon && Math.abs(left[6] - right[6]) <= epsilon && Math.abs(left[7] - right[7]) <= epsilon && Math.abs(left[8] - right[8]) <= epsilon;
+};
+Matrix3.IDENTITY = Object.freeze(
+ new Matrix3(1, 0, 0, 0, 1, 0, 0, 0, 1)
+);
+Matrix3.ZERO = Object.freeze(
+ new Matrix3(0, 0, 0, 0, 0, 0, 0, 0, 0)
+);
+Matrix3.COLUMN0ROW0 = 0;
+Matrix3.COLUMN0ROW1 = 1;
+Matrix3.COLUMN0ROW2 = 2;
+Matrix3.COLUMN1ROW0 = 3;
+Matrix3.COLUMN1ROW1 = 4;
+Matrix3.COLUMN1ROW2 = 5;
+Matrix3.COLUMN2ROW0 = 6;
+Matrix3.COLUMN2ROW1 = 7;
+Matrix3.COLUMN2ROW2 = 8;
+Object.defineProperties(Matrix3.prototype, {
+ /**
+ * Gets the number of items in the collection.
+ * @memberof Matrix3.prototype
+ *
+ * @type {number}
+ */
+ length: {
+ get: function() {
+ return Matrix3.packedLength;
+ }
+ }
+});
+Matrix3.prototype.clone = function(result) {
+ return Matrix3.clone(this, result);
+};
+Matrix3.prototype.equals = function(right) {
+ return Matrix3.equals(this, right);
+};
+Matrix3.equalsArray = function(matrix, array, offset) {
+ return matrix[0] === array[offset] && matrix[1] === array[offset + 1] && matrix[2] === array[offset + 2] && matrix[3] === array[offset + 3] && matrix[4] === array[offset + 4] && matrix[5] === array[offset + 5] && matrix[6] === array[offset + 6] && matrix[7] === array[offset + 7] && matrix[8] === array[offset + 8];
+};
+Matrix3.prototype.equalsEpsilon = function(right, epsilon) {
+ return Matrix3.equalsEpsilon(this, right, epsilon);
+};
+Matrix3.prototype.toString = function() {
+ return `(${this[0]}, ${this[3]}, ${this[6]})
+(${this[1]}, ${this[4]}, ${this[7]})
+(${this[2]}, ${this[5]}, ${this[8]})`;
+};
+var Matrix3_default = Matrix3;
+
+// packages/engine/Source/Core/Fullscreen.js
+var _supportsFullscreen;
+var _names = {
+ requestFullscreen: void 0,
+ exitFullscreen: void 0,
+ fullscreenEnabled: void 0,
+ fullscreenElement: void 0,
+ fullscreenchange: void 0,
+ fullscreenerror: void 0
+};
+var Fullscreen = {};
+Object.defineProperties(Fullscreen, {
+ /**
+ * The element that is currently fullscreen, if any. To simply check if the
+ * browser is in fullscreen mode or not, use {@link Fullscreen#fullscreen}.
+ * @memberof Fullscreen
+ * @type {object}
+ * @readonly
+ */
+ element: {
+ get: function() {
+ if (!Fullscreen.supportsFullscreen()) {
+ return void 0;
+ }
+ return document[_names.fullscreenElement];
+ }
+ },
+ /**
+ * The name of the event on the document that is fired when fullscreen is
+ * entered or exited. This event name is intended for use with addEventListener.
+ * In your event handler, to determine if the browser is in fullscreen mode or not,
+ * use {@link Fullscreen#fullscreen}.
+ * @memberof Fullscreen
+ * @type {string}
+ * @readonly
+ */
+ changeEventName: {
+ get: function() {
+ if (!Fullscreen.supportsFullscreen()) {
+ return void 0;
+ }
+ return _names.fullscreenchange;
+ }
+ },
+ /**
+ * The name of the event that is fired when a fullscreen error
+ * occurs. This event name is intended for use with addEventListener.
+ * @memberof Fullscreen
+ * @type {string}
+ * @readonly
+ */
+ errorEventName: {
+ get: function() {
+ if (!Fullscreen.supportsFullscreen()) {
+ return void 0;
+ }
+ return _names.fullscreenerror;
+ }
+ },
+ /**
+ * Determine whether the browser will allow an element to be made fullscreen, or not.
+ * For example, by default, iframes cannot go fullscreen unless the containing page
+ * adds an "allowfullscreen" attribute (or prefixed equivalent).
+ * @memberof Fullscreen
+ * @type {boolean}
+ * @readonly
+ */
+ enabled: {
+ get: function() {
+ if (!Fullscreen.supportsFullscreen()) {
+ return void 0;
+ }
+ return document[_names.fullscreenEnabled];
+ }
+ },
+ /**
+ * Determines if the browser is currently in fullscreen mode.
+ * @memberof Fullscreen
+ * @type {boolean}
+ * @readonly
+ */
+ fullscreen: {
+ get: function() {
+ if (!Fullscreen.supportsFullscreen()) {
+ return void 0;
+ }
+ return Fullscreen.element !== null;
+ }
+ }
+});
+Fullscreen.supportsFullscreen = function() {
+ if (defined_default(_supportsFullscreen)) {
+ return _supportsFullscreen;
+ }
+ _supportsFullscreen = false;
+ const body = document.body;
+ if (typeof body.requestFullscreen === "function") {
+ _names.requestFullscreen = "requestFullscreen";
+ _names.exitFullscreen = "exitFullscreen";
+ _names.fullscreenEnabled = "fullscreenEnabled";
+ _names.fullscreenElement = "fullscreenElement";
+ _names.fullscreenchange = "fullscreenchange";
+ _names.fullscreenerror = "fullscreenerror";
+ _supportsFullscreen = true;
+ return _supportsFullscreen;
+ }
+ const prefixes = ["webkit", "moz", "o", "ms", "khtml"];
+ let name;
+ for (let i = 0, len = prefixes.length; i < len; ++i) {
+ const prefix = prefixes[i];
+ name = `${prefix}RequestFullscreen`;
+ if (typeof body[name] === "function") {
+ _names.requestFullscreen = name;
+ _supportsFullscreen = true;
+ } else {
+ name = `${prefix}RequestFullScreen`;
+ if (typeof body[name] === "function") {
+ _names.requestFullscreen = name;
+ _supportsFullscreen = true;
+ }
+ }
+ name = `${prefix}ExitFullscreen`;
+ if (typeof document[name] === "function") {
+ _names.exitFullscreen = name;
+ } else {
+ name = `${prefix}CancelFullScreen`;
+ if (typeof document[name] === "function") {
+ _names.exitFullscreen = name;
+ }
+ }
+ name = `${prefix}FullscreenEnabled`;
+ if (document[name] !== void 0) {
+ _names.fullscreenEnabled = name;
+ } else {
+ name = `${prefix}FullScreenEnabled`;
+ if (document[name] !== void 0) {
+ _names.fullscreenEnabled = name;
+ }
+ }
+ name = `${prefix}FullscreenElement`;
+ if (document[name] !== void 0) {
+ _names.fullscreenElement = name;
+ } else {
+ name = `${prefix}FullScreenElement`;
+ if (document[name] !== void 0) {
+ _names.fullscreenElement = name;
+ }
+ }
+ name = `${prefix}fullscreenchange`;
+ if (document[`on${name}`] !== void 0) {
+ if (prefix === "ms") {
+ name = "MSFullscreenChange";
+ }
+ _names.fullscreenchange = name;
+ }
+ name = `${prefix}fullscreenerror`;
+ if (document[`on${name}`] !== void 0) {
+ if (prefix === "ms") {
+ name = "MSFullscreenError";
+ }
+ _names.fullscreenerror = name;
+ }
+ }
+ return _supportsFullscreen;
+};
+Fullscreen.requestFullscreen = function(element, vrDevice) {
+ if (!Fullscreen.supportsFullscreen()) {
+ return;
+ }
+ element[_names.requestFullscreen]({ vrDisplay: vrDevice });
+};
+Fullscreen.exitFullscreen = function() {
+ if (!Fullscreen.supportsFullscreen()) {
+ return;
+ }
+ document[_names.exitFullscreen]();
+};
+Fullscreen._names = _names;
+var Fullscreen_default = Fullscreen;
+
+// packages/engine/Source/Core/FeatureDetection.js
+var theNavigator;
+if (typeof navigator !== "undefined") {
+ theNavigator = navigator;
+} else {
+ theNavigator = {};
+}
+function extractVersion(versionString) {
+ const parts = versionString.split(".");
+ for (let i = 0, len = parts.length; i < len; ++i) {
+ parts[i] = parseInt(parts[i], 10);
+ }
+ return parts;
+}
+var isChromeResult;
+var chromeVersionResult;
+function isChrome() {
+ if (!defined_default(isChromeResult)) {
+ isChromeResult = false;
+ if (!isEdge()) {
+ const fields = / Chrome\/([\.0-9]+)/.exec(theNavigator.userAgent);
+ if (fields !== null) {
+ isChromeResult = true;
+ chromeVersionResult = extractVersion(fields[1]);
+ }
+ }
+ }
+ return isChromeResult;
+}
+function chromeVersion() {
+ return isChrome() && chromeVersionResult;
+}
+var isSafariResult;
+var safariVersionResult;
+function isSafari() {
+ if (!defined_default(isSafariResult)) {
+ isSafariResult = false;
+ if (!isChrome() && !isEdge() && / Safari\/[\.0-9]+/.test(theNavigator.userAgent)) {
+ const fields = / Version\/([\.0-9]+)/.exec(theNavigator.userAgent);
+ if (fields !== null) {
+ isSafariResult = true;
+ safariVersionResult = extractVersion(fields[1]);
+ }
+ }
+ }
+ return isSafariResult;
+}
+function safariVersion() {
+ return isSafari() && safariVersionResult;
+}
+var isWebkitResult;
+var webkitVersionResult;
+function isWebkit() {
+ if (!defined_default(isWebkitResult)) {
+ isWebkitResult = false;
+ const fields = / AppleWebKit\/([\.0-9]+)(\+?)/.exec(theNavigator.userAgent);
+ if (fields !== null) {
+ isWebkitResult = true;
+ webkitVersionResult = extractVersion(fields[1]);
+ webkitVersionResult.isNightly = !!fields[2];
+ }
+ }
+ return isWebkitResult;
+}
+function webkitVersion() {
+ return isWebkit() && webkitVersionResult;
+}
+var isInternetExplorerResult;
+var internetExplorerVersionResult;
+function isInternetExplorer() {
+ if (!defined_default(isInternetExplorerResult)) {
+ isInternetExplorerResult = false;
+ let fields;
+ if (theNavigator.appName === "Microsoft Internet Explorer") {
+ fields = /MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(theNavigator.userAgent);
+ if (fields !== null) {
+ isInternetExplorerResult = true;
+ internetExplorerVersionResult = extractVersion(fields[1]);
+ }
+ } else if (theNavigator.appName === "Netscape") {
+ fields = /Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(
+ theNavigator.userAgent
+ );
+ if (fields !== null) {
+ isInternetExplorerResult = true;
+ internetExplorerVersionResult = extractVersion(fields[1]);
+ }
+ }
+ }
+ return isInternetExplorerResult;
+}
+function internetExplorerVersion() {
+ return isInternetExplorer() && internetExplorerVersionResult;
+}
+var isEdgeResult;
+var edgeVersionResult;
+function isEdge() {
+ if (!defined_default(isEdgeResult)) {
+ isEdgeResult = false;
+ const fields = / Edg\/([\.0-9]+)/.exec(theNavigator.userAgent);
+ if (fields !== null) {
+ isEdgeResult = true;
+ edgeVersionResult = extractVersion(fields[1]);
+ }
+ }
+ return isEdgeResult;
+}
+function edgeVersion() {
+ return isEdge() && edgeVersionResult;
+}
+var isFirefoxResult;
+var firefoxVersionResult;
+function isFirefox() {
+ if (!defined_default(isFirefoxResult)) {
+ isFirefoxResult = false;
+ const fields = /Firefox\/([\.0-9]+)/.exec(theNavigator.userAgent);
+ if (fields !== null) {
+ isFirefoxResult = true;
+ firefoxVersionResult = extractVersion(fields[1]);
+ }
+ }
+ return isFirefoxResult;
+}
+var isWindowsResult;
+function isWindows() {
+ if (!defined_default(isWindowsResult)) {
+ isWindowsResult = /Windows/i.test(theNavigator.appVersion);
+ }
+ return isWindowsResult;
+}
+var isIPadOrIOSResult;
+function isIPadOrIOS() {
+ if (!defined_default(isIPadOrIOSResult)) {
+ isIPadOrIOSResult = navigator.platform === "iPhone" || navigator.platform === "iPod" || navigator.platform === "iPad";
+ }
+ return isIPadOrIOSResult;
+}
+function firefoxVersion() {
+ return isFirefox() && firefoxVersionResult;
+}
+var hasPointerEvents;
+function supportsPointerEvents() {
+ if (!defined_default(hasPointerEvents)) {
+ hasPointerEvents = typeof PointerEvent !== "undefined" && (!defined_default(theNavigator.pointerEnabled) || theNavigator.pointerEnabled);
+ }
+ return hasPointerEvents;
+}
+var imageRenderingValueResult;
+var supportsImageRenderingPixelatedResult;
+function supportsImageRenderingPixelated() {
+ if (!defined_default(supportsImageRenderingPixelatedResult)) {
+ const canvas = document.createElement("canvas");
+ canvas.setAttribute(
+ "style",
+ "image-rendering: -moz-crisp-edges;image-rendering: pixelated;"
+ );
+ const tmp = canvas.style.imageRendering;
+ supportsImageRenderingPixelatedResult = defined_default(tmp) && tmp !== "";
+ if (supportsImageRenderingPixelatedResult) {
+ imageRenderingValueResult = tmp;
+ }
+ }
+ return supportsImageRenderingPixelatedResult;
+}
+function imageRenderingValue() {
+ return supportsImageRenderingPixelated() ? imageRenderingValueResult : void 0;
+}
+function supportsWebP() {
+ if (!supportsWebP.initialized) {
+ throw new DeveloperError_default(
+ "You must call FeatureDetection.supportsWebP.initialize and wait for the promise to resolve before calling FeatureDetection.supportsWebP"
+ );
+ }
+ return supportsWebP._result;
+}
+supportsWebP._promise = void 0;
+supportsWebP._result = void 0;
+supportsWebP.initialize = function() {
+ if (defined_default(supportsWebP._promise)) {
+ return supportsWebP._promise;
+ }
+ supportsWebP._promise = new Promise((resolve) => {
+ const image = new Image();
+ image.onload = function() {
+ supportsWebP._result = image.width > 0 && image.height > 0;
+ resolve(supportsWebP._result);
+ };
+ image.onerror = function() {
+ supportsWebP._result = false;
+ resolve(supportsWebP._result);
+ };
+ image.src = "data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA";
+ });
+ return supportsWebP._promise;
+};
+Object.defineProperties(supportsWebP, {
+ initialized: {
+ get: function() {
+ return defined_default(supportsWebP._result);
+ }
+ }
+});
+var typedArrayTypes = [];
+if (typeof ArrayBuffer !== "undefined") {
+ typedArrayTypes.push(
+ Int8Array,
+ Uint8Array,
+ Int16Array,
+ Uint16Array,
+ Int32Array,
+ Uint32Array,
+ Float32Array,
+ Float64Array
+ );
+ if (typeof Uint8ClampedArray !== "undefined") {
+ typedArrayTypes.push(Uint8ClampedArray);
+ }
+ if (typeof Uint8ClampedArray !== "undefined") {
+ typedArrayTypes.push(Uint8ClampedArray);
+ }
+ if (typeof BigInt64Array !== "undefined") {
+ typedArrayTypes.push(BigInt64Array);
+ }
+ if (typeof BigUint64Array !== "undefined") {
+ typedArrayTypes.push(BigUint64Array);
+ }
+}
+var FeatureDetection = {
+ isChrome,
+ chromeVersion,
+ isSafari,
+ safariVersion,
+ isWebkit,
+ webkitVersion,
+ isInternetExplorer,
+ internetExplorerVersion,
+ isEdge,
+ edgeVersion,
+ isFirefox,
+ firefoxVersion,
+ isWindows,
+ isIPadOrIOS,
+ hardwareConcurrency: defaultValue_default(theNavigator.hardwareConcurrency, 3),
+ supportsPointerEvents,
+ supportsImageRenderingPixelated,
+ supportsWebP,
+ imageRenderingValue,
+ typedArrayTypes
+};
+FeatureDetection.supportsBasis = function(scene) {
+ return FeatureDetection.supportsWebAssembly() && scene.context.supportsBasis;
+};
+FeatureDetection.supportsFullscreen = function() {
+ return Fullscreen_default.supportsFullscreen();
+};
+FeatureDetection.supportsTypedArrays = function() {
+ return typeof ArrayBuffer !== "undefined";
+};
+FeatureDetection.supportsBigInt64Array = function() {
+ return typeof BigInt64Array !== "undefined";
+};
+FeatureDetection.supportsBigUint64Array = function() {
+ return typeof BigUint64Array !== "undefined";
+};
+FeatureDetection.supportsBigInt = function() {
+ return typeof BigInt !== "undefined";
+};
+FeatureDetection.supportsWebWorkers = function() {
+ return typeof Worker !== "undefined";
+};
+FeatureDetection.supportsWebAssembly = function() {
+ return typeof WebAssembly !== "undefined";
+};
+FeatureDetection.supportsWebgl2 = function(scene) {
+ Check_default.defined("scene", scene);
+ return scene.context.webgl2;
+};
+FeatureDetection.supportsEsmWebWorkers = function() {
+ return !isFirefox() || parseInt(firefoxVersionResult) >= 114;
+};
+var FeatureDetection_default = FeatureDetection;
+
+export {
+ Cartesian3_default,
+ Cartographic_default,
+ Cartesian2_default,
+ Ellipsoid_default,
+ Matrix3_default,
+ FeatureDetection_default
+};
diff --git a/public/assets/cesium/Workers/chunk-GBT7MJ6X.js b/public/assets/cesium/Workers/chunk-GBT7MJ6X.js
new file mode 100644
index 0000000000000000000000000000000000000000..30498e9230af799608dd482181df7017f7229334
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-GBT7MJ6X.js
@@ -0,0 +1,37 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+
+// packages/engine/Source/Core/GeometryOffsetAttribute.js
+var GeometryOffsetAttribute = {
+ NONE: 0,
+ TOP: 1,
+ ALL: 2
+};
+var GeometryOffsetAttribute_default = Object.freeze(GeometryOffsetAttribute);
+
+export {
+ GeometryOffsetAttribute_default
+};
diff --git a/public/assets/cesium/Workers/chunk-HJMNR3GC.js b/public/assets/cesium/Workers/chunk-HJMNR3GC.js
new file mode 100644
index 0000000000000000000000000000000000000000..677ee83229257906387ccb3057a80d8cb5567dd7
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-HJMNR3GC.js
@@ -0,0 +1,684 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ GeometryOffsetAttribute_default
+} from "./chunk-GBT7MJ6X.js";
+import {
+ VertexFormat_default
+} from "./chunk-JBSKHTNX.js";
+import {
+ GeometryAttributes_default
+} from "./chunk-X7IQYYHF.js";
+import {
+ GeometryAttribute_default,
+ Geometry_default,
+ PrimitiveType_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ BoundingSphere_default
+} from "./chunk-KHZNBFOH.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian3_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default,
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/BoxGeometry.js
+var diffScratch = new Cartesian3_default();
+function BoxGeometry(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const min = options.minimum;
+ const max = options.maximum;
+ Check_default.typeOf.object("min", min);
+ Check_default.typeOf.object("max", max);
+ if (defined_default(options.offsetAttribute) && options.offsetAttribute === GeometryOffsetAttribute_default.TOP) {
+ throw new DeveloperError_default(
+ "GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry."
+ );
+ }
+ const vertexFormat = defaultValue_default(options.vertexFormat, VertexFormat_default.DEFAULT);
+ this._minimum = Cartesian3_default.clone(min);
+ this._maximum = Cartesian3_default.clone(max);
+ this._vertexFormat = vertexFormat;
+ this._offsetAttribute = options.offsetAttribute;
+ this._workerName = "createBoxGeometry";
+}
+BoxGeometry.fromDimensions = function(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const dimensions = options.dimensions;
+ Check_default.typeOf.object("dimensions", dimensions);
+ Check_default.typeOf.number.greaterThanOrEquals("dimensions.x", dimensions.x, 0);
+ Check_default.typeOf.number.greaterThanOrEquals("dimensions.y", dimensions.y, 0);
+ Check_default.typeOf.number.greaterThanOrEquals("dimensions.z", dimensions.z, 0);
+ const corner = Cartesian3_default.multiplyByScalar(dimensions, 0.5, new Cartesian3_default());
+ return new BoxGeometry({
+ minimum: Cartesian3_default.negate(corner, new Cartesian3_default()),
+ maximum: corner,
+ vertexFormat: options.vertexFormat,
+ offsetAttribute: options.offsetAttribute
+ });
+};
+BoxGeometry.fromAxisAlignedBoundingBox = function(boundingBox) {
+ Check_default.typeOf.object("boundingBox", boundingBox);
+ return new BoxGeometry({
+ minimum: boundingBox.minimum,
+ maximum: boundingBox.maximum
+ });
+};
+BoxGeometry.packedLength = 2 * Cartesian3_default.packedLength + VertexFormat_default.packedLength + 1;
+BoxGeometry.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ Cartesian3_default.pack(value._minimum, array, startingIndex);
+ Cartesian3_default.pack(
+ value._maximum,
+ array,
+ startingIndex + Cartesian3_default.packedLength
+ );
+ VertexFormat_default.pack(
+ value._vertexFormat,
+ array,
+ startingIndex + 2 * Cartesian3_default.packedLength
+ );
+ array[startingIndex + 2 * Cartesian3_default.packedLength + VertexFormat_default.packedLength] = defaultValue_default(value._offsetAttribute, -1);
+ return array;
+};
+var scratchMin = new Cartesian3_default();
+var scratchMax = new Cartesian3_default();
+var scratchVertexFormat = new VertexFormat_default();
+var scratchOptions = {
+ minimum: scratchMin,
+ maximum: scratchMax,
+ vertexFormat: scratchVertexFormat,
+ offsetAttribute: void 0
+};
+BoxGeometry.unpack = function(array, startingIndex, result) {
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ const min = Cartesian3_default.unpack(array, startingIndex, scratchMin);
+ const max = Cartesian3_default.unpack(
+ array,
+ startingIndex + Cartesian3_default.packedLength,
+ scratchMax
+ );
+ const vertexFormat = VertexFormat_default.unpack(
+ array,
+ startingIndex + 2 * Cartesian3_default.packedLength,
+ scratchVertexFormat
+ );
+ const offsetAttribute = array[startingIndex + 2 * Cartesian3_default.packedLength + VertexFormat_default.packedLength];
+ if (!defined_default(result)) {
+ scratchOptions.offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
+ return new BoxGeometry(scratchOptions);
+ }
+ result._minimum = Cartesian3_default.clone(min, result._minimum);
+ result._maximum = Cartesian3_default.clone(max, result._maximum);
+ result._vertexFormat = VertexFormat_default.clone(vertexFormat, result._vertexFormat);
+ result._offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
+ return result;
+};
+BoxGeometry.createGeometry = function(boxGeometry) {
+ const min = boxGeometry._minimum;
+ const max = boxGeometry._maximum;
+ const vertexFormat = boxGeometry._vertexFormat;
+ if (Cartesian3_default.equals(min, max)) {
+ return;
+ }
+ const attributes = new GeometryAttributes_default();
+ let indices;
+ let positions;
+ if (vertexFormat.position && (vertexFormat.st || vertexFormat.normal || vertexFormat.tangent || vertexFormat.bitangent)) {
+ if (vertexFormat.position) {
+ positions = new Float64Array(6 * 4 * 3);
+ positions[0] = min.x;
+ positions[1] = min.y;
+ positions[2] = max.z;
+ positions[3] = max.x;
+ positions[4] = min.y;
+ positions[5] = max.z;
+ positions[6] = max.x;
+ positions[7] = max.y;
+ positions[8] = max.z;
+ positions[9] = min.x;
+ positions[10] = max.y;
+ positions[11] = max.z;
+ positions[12] = min.x;
+ positions[13] = min.y;
+ positions[14] = min.z;
+ positions[15] = max.x;
+ positions[16] = min.y;
+ positions[17] = min.z;
+ positions[18] = max.x;
+ positions[19] = max.y;
+ positions[20] = min.z;
+ positions[21] = min.x;
+ positions[22] = max.y;
+ positions[23] = min.z;
+ positions[24] = max.x;
+ positions[25] = min.y;
+ positions[26] = min.z;
+ positions[27] = max.x;
+ positions[28] = max.y;
+ positions[29] = min.z;
+ positions[30] = max.x;
+ positions[31] = max.y;
+ positions[32] = max.z;
+ positions[33] = max.x;
+ positions[34] = min.y;
+ positions[35] = max.z;
+ positions[36] = min.x;
+ positions[37] = min.y;
+ positions[38] = min.z;
+ positions[39] = min.x;
+ positions[40] = max.y;
+ positions[41] = min.z;
+ positions[42] = min.x;
+ positions[43] = max.y;
+ positions[44] = max.z;
+ positions[45] = min.x;
+ positions[46] = min.y;
+ positions[47] = max.z;
+ positions[48] = min.x;
+ positions[49] = max.y;
+ positions[50] = min.z;
+ positions[51] = max.x;
+ positions[52] = max.y;
+ positions[53] = min.z;
+ positions[54] = max.x;
+ positions[55] = max.y;
+ positions[56] = max.z;
+ positions[57] = min.x;
+ positions[58] = max.y;
+ positions[59] = max.z;
+ positions[60] = min.x;
+ positions[61] = min.y;
+ positions[62] = min.z;
+ positions[63] = max.x;
+ positions[64] = min.y;
+ positions[65] = min.z;
+ positions[66] = max.x;
+ positions[67] = min.y;
+ positions[68] = max.z;
+ positions[69] = min.x;
+ positions[70] = min.y;
+ positions[71] = max.z;
+ attributes.position = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: positions
+ });
+ }
+ if (vertexFormat.normal) {
+ const normals = new Float32Array(6 * 4 * 3);
+ normals[0] = 0;
+ normals[1] = 0;
+ normals[2] = 1;
+ normals[3] = 0;
+ normals[4] = 0;
+ normals[5] = 1;
+ normals[6] = 0;
+ normals[7] = 0;
+ normals[8] = 1;
+ normals[9] = 0;
+ normals[10] = 0;
+ normals[11] = 1;
+ normals[12] = 0;
+ normals[13] = 0;
+ normals[14] = -1;
+ normals[15] = 0;
+ normals[16] = 0;
+ normals[17] = -1;
+ normals[18] = 0;
+ normals[19] = 0;
+ normals[20] = -1;
+ normals[21] = 0;
+ normals[22] = 0;
+ normals[23] = -1;
+ normals[24] = 1;
+ normals[25] = 0;
+ normals[26] = 0;
+ normals[27] = 1;
+ normals[28] = 0;
+ normals[29] = 0;
+ normals[30] = 1;
+ normals[31] = 0;
+ normals[32] = 0;
+ normals[33] = 1;
+ normals[34] = 0;
+ normals[35] = 0;
+ normals[36] = -1;
+ normals[37] = 0;
+ normals[38] = 0;
+ normals[39] = -1;
+ normals[40] = 0;
+ normals[41] = 0;
+ normals[42] = -1;
+ normals[43] = 0;
+ normals[44] = 0;
+ normals[45] = -1;
+ normals[46] = 0;
+ normals[47] = 0;
+ normals[48] = 0;
+ normals[49] = 1;
+ normals[50] = 0;
+ normals[51] = 0;
+ normals[52] = 1;
+ normals[53] = 0;
+ normals[54] = 0;
+ normals[55] = 1;
+ normals[56] = 0;
+ normals[57] = 0;
+ normals[58] = 1;
+ normals[59] = 0;
+ normals[60] = 0;
+ normals[61] = -1;
+ normals[62] = 0;
+ normals[63] = 0;
+ normals[64] = -1;
+ normals[65] = 0;
+ normals[66] = 0;
+ normals[67] = -1;
+ normals[68] = 0;
+ normals[69] = 0;
+ normals[70] = -1;
+ normals[71] = 0;
+ attributes.normal = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: normals
+ });
+ }
+ if (vertexFormat.st) {
+ const texCoords = new Float32Array(6 * 4 * 2);
+ texCoords[0] = 0;
+ texCoords[1] = 0;
+ texCoords[2] = 1;
+ texCoords[3] = 0;
+ texCoords[4] = 1;
+ texCoords[5] = 1;
+ texCoords[6] = 0;
+ texCoords[7] = 1;
+ texCoords[8] = 1;
+ texCoords[9] = 0;
+ texCoords[10] = 0;
+ texCoords[11] = 0;
+ texCoords[12] = 0;
+ texCoords[13] = 1;
+ texCoords[14] = 1;
+ texCoords[15] = 1;
+ texCoords[16] = 0;
+ texCoords[17] = 0;
+ texCoords[18] = 1;
+ texCoords[19] = 0;
+ texCoords[20] = 1;
+ texCoords[21] = 1;
+ texCoords[22] = 0;
+ texCoords[23] = 1;
+ texCoords[24] = 1;
+ texCoords[25] = 0;
+ texCoords[26] = 0;
+ texCoords[27] = 0;
+ texCoords[28] = 0;
+ texCoords[29] = 1;
+ texCoords[30] = 1;
+ texCoords[31] = 1;
+ texCoords[32] = 1;
+ texCoords[33] = 0;
+ texCoords[34] = 0;
+ texCoords[35] = 0;
+ texCoords[36] = 0;
+ texCoords[37] = 1;
+ texCoords[38] = 1;
+ texCoords[39] = 1;
+ texCoords[40] = 0;
+ texCoords[41] = 0;
+ texCoords[42] = 1;
+ texCoords[43] = 0;
+ texCoords[44] = 1;
+ texCoords[45] = 1;
+ texCoords[46] = 0;
+ texCoords[47] = 1;
+ attributes.st = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 2,
+ values: texCoords
+ });
+ }
+ if (vertexFormat.tangent) {
+ const tangents = new Float32Array(6 * 4 * 3);
+ tangents[0] = 1;
+ tangents[1] = 0;
+ tangents[2] = 0;
+ tangents[3] = 1;
+ tangents[4] = 0;
+ tangents[5] = 0;
+ tangents[6] = 1;
+ tangents[7] = 0;
+ tangents[8] = 0;
+ tangents[9] = 1;
+ tangents[10] = 0;
+ tangents[11] = 0;
+ tangents[12] = -1;
+ tangents[13] = 0;
+ tangents[14] = 0;
+ tangents[15] = -1;
+ tangents[16] = 0;
+ tangents[17] = 0;
+ tangents[18] = -1;
+ tangents[19] = 0;
+ tangents[20] = 0;
+ tangents[21] = -1;
+ tangents[22] = 0;
+ tangents[23] = 0;
+ tangents[24] = 0;
+ tangents[25] = 1;
+ tangents[26] = 0;
+ tangents[27] = 0;
+ tangents[28] = 1;
+ tangents[29] = 0;
+ tangents[30] = 0;
+ tangents[31] = 1;
+ tangents[32] = 0;
+ tangents[33] = 0;
+ tangents[34] = 1;
+ tangents[35] = 0;
+ tangents[36] = 0;
+ tangents[37] = -1;
+ tangents[38] = 0;
+ tangents[39] = 0;
+ tangents[40] = -1;
+ tangents[41] = 0;
+ tangents[42] = 0;
+ tangents[43] = -1;
+ tangents[44] = 0;
+ tangents[45] = 0;
+ tangents[46] = -1;
+ tangents[47] = 0;
+ tangents[48] = -1;
+ tangents[49] = 0;
+ tangents[50] = 0;
+ tangents[51] = -1;
+ tangents[52] = 0;
+ tangents[53] = 0;
+ tangents[54] = -1;
+ tangents[55] = 0;
+ tangents[56] = 0;
+ tangents[57] = -1;
+ tangents[58] = 0;
+ tangents[59] = 0;
+ tangents[60] = 1;
+ tangents[61] = 0;
+ tangents[62] = 0;
+ tangents[63] = 1;
+ tangents[64] = 0;
+ tangents[65] = 0;
+ tangents[66] = 1;
+ tangents[67] = 0;
+ tangents[68] = 0;
+ tangents[69] = 1;
+ tangents[70] = 0;
+ tangents[71] = 0;
+ attributes.tangent = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: tangents
+ });
+ }
+ if (vertexFormat.bitangent) {
+ const bitangents = new Float32Array(6 * 4 * 3);
+ bitangents[0] = 0;
+ bitangents[1] = 1;
+ bitangents[2] = 0;
+ bitangents[3] = 0;
+ bitangents[4] = 1;
+ bitangents[5] = 0;
+ bitangents[6] = 0;
+ bitangents[7] = 1;
+ bitangents[8] = 0;
+ bitangents[9] = 0;
+ bitangents[10] = 1;
+ bitangents[11] = 0;
+ bitangents[12] = 0;
+ bitangents[13] = 1;
+ bitangents[14] = 0;
+ bitangents[15] = 0;
+ bitangents[16] = 1;
+ bitangents[17] = 0;
+ bitangents[18] = 0;
+ bitangents[19] = 1;
+ bitangents[20] = 0;
+ bitangents[21] = 0;
+ bitangents[22] = 1;
+ bitangents[23] = 0;
+ bitangents[24] = 0;
+ bitangents[25] = 0;
+ bitangents[26] = 1;
+ bitangents[27] = 0;
+ bitangents[28] = 0;
+ bitangents[29] = 1;
+ bitangents[30] = 0;
+ bitangents[31] = 0;
+ bitangents[32] = 1;
+ bitangents[33] = 0;
+ bitangents[34] = 0;
+ bitangents[35] = 1;
+ bitangents[36] = 0;
+ bitangents[37] = 0;
+ bitangents[38] = 1;
+ bitangents[39] = 0;
+ bitangents[40] = 0;
+ bitangents[41] = 1;
+ bitangents[42] = 0;
+ bitangents[43] = 0;
+ bitangents[44] = 1;
+ bitangents[45] = 0;
+ bitangents[46] = 0;
+ bitangents[47] = 1;
+ bitangents[48] = 0;
+ bitangents[49] = 0;
+ bitangents[50] = 1;
+ bitangents[51] = 0;
+ bitangents[52] = 0;
+ bitangents[53] = 1;
+ bitangents[54] = 0;
+ bitangents[55] = 0;
+ bitangents[56] = 1;
+ bitangents[57] = 0;
+ bitangents[58] = 0;
+ bitangents[59] = 1;
+ bitangents[60] = 0;
+ bitangents[61] = 0;
+ bitangents[62] = 1;
+ bitangents[63] = 0;
+ bitangents[64] = 0;
+ bitangents[65] = 1;
+ bitangents[66] = 0;
+ bitangents[67] = 0;
+ bitangents[68] = 1;
+ bitangents[69] = 0;
+ bitangents[70] = 0;
+ bitangents[71] = 1;
+ attributes.bitangent = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: bitangents
+ });
+ }
+ indices = new Uint16Array(6 * 2 * 3);
+ indices[0] = 0;
+ indices[1] = 1;
+ indices[2] = 2;
+ indices[3] = 0;
+ indices[4] = 2;
+ indices[5] = 3;
+ indices[6] = 4 + 2;
+ indices[7] = 4 + 1;
+ indices[8] = 4 + 0;
+ indices[9] = 4 + 3;
+ indices[10] = 4 + 2;
+ indices[11] = 4 + 0;
+ indices[12] = 8 + 0;
+ indices[13] = 8 + 1;
+ indices[14] = 8 + 2;
+ indices[15] = 8 + 0;
+ indices[16] = 8 + 2;
+ indices[17] = 8 + 3;
+ indices[18] = 12 + 2;
+ indices[19] = 12 + 1;
+ indices[20] = 12 + 0;
+ indices[21] = 12 + 3;
+ indices[22] = 12 + 2;
+ indices[23] = 12 + 0;
+ indices[24] = 16 + 2;
+ indices[25] = 16 + 1;
+ indices[26] = 16 + 0;
+ indices[27] = 16 + 3;
+ indices[28] = 16 + 2;
+ indices[29] = 16 + 0;
+ indices[30] = 20 + 0;
+ indices[31] = 20 + 1;
+ indices[32] = 20 + 2;
+ indices[33] = 20 + 0;
+ indices[34] = 20 + 2;
+ indices[35] = 20 + 3;
+ } else {
+ positions = new Float64Array(8 * 3);
+ positions[0] = min.x;
+ positions[1] = min.y;
+ positions[2] = min.z;
+ positions[3] = max.x;
+ positions[4] = min.y;
+ positions[5] = min.z;
+ positions[6] = max.x;
+ positions[7] = max.y;
+ positions[8] = min.z;
+ positions[9] = min.x;
+ positions[10] = max.y;
+ positions[11] = min.z;
+ positions[12] = min.x;
+ positions[13] = min.y;
+ positions[14] = max.z;
+ positions[15] = max.x;
+ positions[16] = min.y;
+ positions[17] = max.z;
+ positions[18] = max.x;
+ positions[19] = max.y;
+ positions[20] = max.z;
+ positions[21] = min.x;
+ positions[22] = max.y;
+ positions[23] = max.z;
+ attributes.position = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: positions
+ });
+ indices = new Uint16Array(6 * 2 * 3);
+ indices[0] = 4;
+ indices[1] = 5;
+ indices[2] = 6;
+ indices[3] = 4;
+ indices[4] = 6;
+ indices[5] = 7;
+ indices[6] = 1;
+ indices[7] = 0;
+ indices[8] = 3;
+ indices[9] = 1;
+ indices[10] = 3;
+ indices[11] = 2;
+ indices[12] = 1;
+ indices[13] = 6;
+ indices[14] = 5;
+ indices[15] = 1;
+ indices[16] = 2;
+ indices[17] = 6;
+ indices[18] = 2;
+ indices[19] = 3;
+ indices[20] = 7;
+ indices[21] = 2;
+ indices[22] = 7;
+ indices[23] = 6;
+ indices[24] = 3;
+ indices[25] = 0;
+ indices[26] = 4;
+ indices[27] = 3;
+ indices[28] = 4;
+ indices[29] = 7;
+ indices[30] = 0;
+ indices[31] = 1;
+ indices[32] = 5;
+ indices[33] = 0;
+ indices[34] = 5;
+ indices[35] = 4;
+ }
+ const diff = Cartesian3_default.subtract(max, min, diffScratch);
+ const radius = Cartesian3_default.magnitude(diff) * 0.5;
+ if (defined_default(boxGeometry._offsetAttribute)) {
+ const length = positions.length;
+ const offsetValue = boxGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
+ const applyOffset = new Uint8Array(length / 3).fill(offsetValue);
+ attributes.applyOffset = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: applyOffset
+ });
+ }
+ return new Geometry_default({
+ attributes,
+ indices,
+ primitiveType: PrimitiveType_default.TRIANGLES,
+ boundingSphere: new BoundingSphere_default(Cartesian3_default.ZERO, radius),
+ offsetAttribute: boxGeometry._offsetAttribute
+ });
+};
+var unitBoxGeometry;
+BoxGeometry.getUnitBox = function() {
+ if (!defined_default(unitBoxGeometry)) {
+ unitBoxGeometry = BoxGeometry.createGeometry(
+ BoxGeometry.fromDimensions({
+ dimensions: new Cartesian3_default(1, 1, 1),
+ vertexFormat: VertexFormat_default.POSITION_ONLY
+ })
+ );
+ }
+ return unitBoxGeometry;
+};
+var BoxGeometry_default = BoxGeometry;
+
+export {
+ BoxGeometry_default
+};
diff --git a/public/assets/cesium/Workers/chunk-HP5XLODI.js b/public/assets/cesium/Workers/chunk-HP5XLODI.js
new file mode 100644
index 0000000000000000000000000000000000000000..82850c3bc40061cdc7ae471fb5ba21754becd839
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-HP5XLODI.js
@@ -0,0 +1,634 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ FeatureDetection_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/Color.js
+function hue2rgb(m1, m2, h) {
+ if (h < 0) {
+ h += 1;
+ }
+ if (h > 1) {
+ h -= 1;
+ }
+ if (h * 6 < 1) {
+ return m1 + (m2 - m1) * 6 * h;
+ }
+ if (h * 2 < 1) {
+ return m2;
+ }
+ if (h * 3 < 2) {
+ return m1 + (m2 - m1) * (2 / 3 - h) * 6;
+ }
+ return m1;
+}
+function Color(red, green, blue, alpha) {
+ this.red = defaultValue_default(red, 1);
+ this.green = defaultValue_default(green, 1);
+ this.blue = defaultValue_default(blue, 1);
+ this.alpha = defaultValue_default(alpha, 1);
+}
+Color.fromCartesian4 = function(cartesian, result) {
+ Check_default.typeOf.object("cartesian", cartesian);
+ if (!defined_default(result)) {
+ return new Color(cartesian.x, cartesian.y, cartesian.z, cartesian.w);
+ }
+ result.red = cartesian.x;
+ result.green = cartesian.y;
+ result.blue = cartesian.z;
+ result.alpha = cartesian.w;
+ return result;
+};
+Color.fromBytes = function(red, green, blue, alpha, result) {
+ red = Color.byteToFloat(defaultValue_default(red, 255));
+ green = Color.byteToFloat(defaultValue_default(green, 255));
+ blue = Color.byteToFloat(defaultValue_default(blue, 255));
+ alpha = Color.byteToFloat(defaultValue_default(alpha, 255));
+ if (!defined_default(result)) {
+ return new Color(red, green, blue, alpha);
+ }
+ result.red = red;
+ result.green = green;
+ result.blue = blue;
+ result.alpha = alpha;
+ return result;
+};
+Color.fromAlpha = function(color, alpha, result) {
+ Check_default.typeOf.object("color", color);
+ Check_default.typeOf.number("alpha", alpha);
+ if (!defined_default(result)) {
+ return new Color(color.red, color.green, color.blue, alpha);
+ }
+ result.red = color.red;
+ result.green = color.green;
+ result.blue = color.blue;
+ result.alpha = alpha;
+ return result;
+};
+var scratchArrayBuffer;
+var scratchUint32Array;
+var scratchUint8Array;
+if (FeatureDetection_default.supportsTypedArrays()) {
+ scratchArrayBuffer = new ArrayBuffer(4);
+ scratchUint32Array = new Uint32Array(scratchArrayBuffer);
+ scratchUint8Array = new Uint8Array(scratchArrayBuffer);
+}
+Color.fromRgba = function(rgba, result) {
+ scratchUint32Array[0] = rgba;
+ return Color.fromBytes(
+ scratchUint8Array[0],
+ scratchUint8Array[1],
+ scratchUint8Array[2],
+ scratchUint8Array[3],
+ result
+ );
+};
+Color.fromHsl = function(hue, saturation, lightness, alpha, result) {
+ hue = defaultValue_default(hue, 0) % 1;
+ saturation = defaultValue_default(saturation, 0);
+ lightness = defaultValue_default(lightness, 0);
+ alpha = defaultValue_default(alpha, 1);
+ let red = lightness;
+ let green = lightness;
+ let blue = lightness;
+ if (saturation !== 0) {
+ let m2;
+ if (lightness < 0.5) {
+ m2 = lightness * (1 + saturation);
+ } else {
+ m2 = lightness + saturation - lightness * saturation;
+ }
+ const m1 = 2 * lightness - m2;
+ red = hue2rgb(m1, m2, hue + 1 / 3);
+ green = hue2rgb(m1, m2, hue);
+ blue = hue2rgb(m1, m2, hue - 1 / 3);
+ }
+ if (!defined_default(result)) {
+ return new Color(red, green, blue, alpha);
+ }
+ result.red = red;
+ result.green = green;
+ result.blue = blue;
+ result.alpha = alpha;
+ return result;
+};
+Color.fromRandom = function(options, result) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ let red = options.red;
+ if (!defined_default(red)) {
+ const minimumRed = defaultValue_default(options.minimumRed, 0);
+ const maximumRed = defaultValue_default(options.maximumRed, 1);
+ Check_default.typeOf.number.lessThanOrEquals("minimumRed", minimumRed, maximumRed);
+ red = minimumRed + Math_default.nextRandomNumber() * (maximumRed - minimumRed);
+ }
+ let green = options.green;
+ if (!defined_default(green)) {
+ const minimumGreen = defaultValue_default(options.minimumGreen, 0);
+ const maximumGreen = defaultValue_default(options.maximumGreen, 1);
+ Check_default.typeOf.number.lessThanOrEquals(
+ "minimumGreen",
+ minimumGreen,
+ maximumGreen
+ );
+ green = minimumGreen + Math_default.nextRandomNumber() * (maximumGreen - minimumGreen);
+ }
+ let blue = options.blue;
+ if (!defined_default(blue)) {
+ const minimumBlue = defaultValue_default(options.minimumBlue, 0);
+ const maximumBlue = defaultValue_default(options.maximumBlue, 1);
+ Check_default.typeOf.number.lessThanOrEquals(
+ "minimumBlue",
+ minimumBlue,
+ maximumBlue
+ );
+ blue = minimumBlue + Math_default.nextRandomNumber() * (maximumBlue - minimumBlue);
+ }
+ let alpha = options.alpha;
+ if (!defined_default(alpha)) {
+ const minimumAlpha = defaultValue_default(options.minimumAlpha, 0);
+ const maximumAlpha = defaultValue_default(options.maximumAlpha, 1);
+ Check_default.typeOf.number.lessThanOrEquals(
+ "minumumAlpha",
+ minimumAlpha,
+ maximumAlpha
+ );
+ alpha = minimumAlpha + Math_default.nextRandomNumber() * (maximumAlpha - minimumAlpha);
+ }
+ if (!defined_default(result)) {
+ return new Color(red, green, blue, alpha);
+ }
+ result.red = red;
+ result.green = green;
+ result.blue = blue;
+ result.alpha = alpha;
+ return result;
+};
+var rgbaMatcher = /^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i;
+var rrggbbaaMatcher = /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i;
+var rgbParenthesesMatcher = /^rgba?\s*\(\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i;
+var hslParenthesesMatcher = /^hsla?\s*\(\s*([0-9.]+)\s*[,\s]+\s*([0-9.]+%)\s*[,\s]+\s*([0-9.]+%)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i;
+Color.fromCssColorString = function(color, result) {
+ Check_default.typeOf.string("color", color);
+ if (!defined_default(result)) {
+ result = new Color();
+ }
+ color = color.trim();
+ const namedColor = Color[color.toUpperCase()];
+ if (defined_default(namedColor)) {
+ Color.clone(namedColor, result);
+ return result;
+ }
+ let matches = rgbaMatcher.exec(color);
+ if (matches !== null) {
+ result.red = parseInt(matches[1], 16) / 15;
+ result.green = parseInt(matches[2], 16) / 15;
+ result.blue = parseInt(matches[3], 16) / 15;
+ result.alpha = parseInt(defaultValue_default(matches[4], "f"), 16) / 15;
+ return result;
+ }
+ matches = rrggbbaaMatcher.exec(color);
+ if (matches !== null) {
+ result.red = parseInt(matches[1], 16) / 255;
+ result.green = parseInt(matches[2], 16) / 255;
+ result.blue = parseInt(matches[3], 16) / 255;
+ result.alpha = parseInt(defaultValue_default(matches[4], "ff"), 16) / 255;
+ return result;
+ }
+ matches = rgbParenthesesMatcher.exec(color);
+ if (matches !== null) {
+ result.red = parseFloat(matches[1]) / ("%" === matches[1].substr(-1) ? 100 : 255);
+ result.green = parseFloat(matches[2]) / ("%" === matches[2].substr(-1) ? 100 : 255);
+ result.blue = parseFloat(matches[3]) / ("%" === matches[3].substr(-1) ? 100 : 255);
+ result.alpha = parseFloat(defaultValue_default(matches[4], "1.0"));
+ return result;
+ }
+ matches = hslParenthesesMatcher.exec(color);
+ if (matches !== null) {
+ return Color.fromHsl(
+ parseFloat(matches[1]) / 360,
+ parseFloat(matches[2]) / 100,
+ parseFloat(matches[3]) / 100,
+ parseFloat(defaultValue_default(matches[4], "1.0")),
+ result
+ );
+ }
+ result = void 0;
+ return result;
+};
+Color.packedLength = 4;
+Color.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ array[startingIndex++] = value.red;
+ array[startingIndex++] = value.green;
+ array[startingIndex++] = value.blue;
+ array[startingIndex] = value.alpha;
+ return array;
+};
+Color.unpack = function(array, startingIndex, result) {
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ if (!defined_default(result)) {
+ result = new Color();
+ }
+ result.red = array[startingIndex++];
+ result.green = array[startingIndex++];
+ result.blue = array[startingIndex++];
+ result.alpha = array[startingIndex];
+ return result;
+};
+Color.byteToFloat = function(number) {
+ return number / 255;
+};
+Color.floatToByte = function(number) {
+ return number === 1 ? 255 : number * 256 | 0;
+};
+Color.clone = function(color, result) {
+ if (!defined_default(color)) {
+ return void 0;
+ }
+ if (!defined_default(result)) {
+ return new Color(color.red, color.green, color.blue, color.alpha);
+ }
+ result.red = color.red;
+ result.green = color.green;
+ result.blue = color.blue;
+ result.alpha = color.alpha;
+ return result;
+};
+Color.equals = function(left, right) {
+ return left === right || //
+ defined_default(left) && //
+ defined_default(right) && //
+ left.red === right.red && //
+ left.green === right.green && //
+ left.blue === right.blue && //
+ left.alpha === right.alpha;
+};
+Color.equalsArray = function(color, array, offset) {
+ return color.red === array[offset] && color.green === array[offset + 1] && color.blue === array[offset + 2] && color.alpha === array[offset + 3];
+};
+Color.prototype.clone = function(result) {
+ return Color.clone(this, result);
+};
+Color.prototype.equals = function(other) {
+ return Color.equals(this, other);
+};
+Color.prototype.equalsEpsilon = function(other, epsilon) {
+ return this === other || //
+ defined_default(other) && //
+ Math.abs(this.red - other.red) <= epsilon && //
+ Math.abs(this.green - other.green) <= epsilon && //
+ Math.abs(this.blue - other.blue) <= epsilon && //
+ Math.abs(this.alpha - other.alpha) <= epsilon;
+};
+Color.prototype.toString = function() {
+ return `(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`;
+};
+Color.prototype.toCssColorString = function() {
+ const red = Color.floatToByte(this.red);
+ const green = Color.floatToByte(this.green);
+ const blue = Color.floatToByte(this.blue);
+ if (this.alpha === 1) {
+ return `rgb(${red},${green},${blue})`;
+ }
+ return `rgba(${red},${green},${blue},${this.alpha})`;
+};
+Color.prototype.toCssHexString = function() {
+ let r = Color.floatToByte(this.red).toString(16);
+ if (r.length < 2) {
+ r = `0${r}`;
+ }
+ let g = Color.floatToByte(this.green).toString(16);
+ if (g.length < 2) {
+ g = `0${g}`;
+ }
+ let b = Color.floatToByte(this.blue).toString(16);
+ if (b.length < 2) {
+ b = `0${b}`;
+ }
+ if (this.alpha < 1) {
+ let hexAlpha = Color.floatToByte(this.alpha).toString(16);
+ if (hexAlpha.length < 2) {
+ hexAlpha = `0${hexAlpha}`;
+ }
+ return `#${r}${g}${b}${hexAlpha}`;
+ }
+ return `#${r}${g}${b}`;
+};
+Color.prototype.toBytes = function(result) {
+ const red = Color.floatToByte(this.red);
+ const green = Color.floatToByte(this.green);
+ const blue = Color.floatToByte(this.blue);
+ const alpha = Color.floatToByte(this.alpha);
+ if (!defined_default(result)) {
+ return [red, green, blue, alpha];
+ }
+ result[0] = red;
+ result[1] = green;
+ result[2] = blue;
+ result[3] = alpha;
+ return result;
+};
+Color.prototype.toRgba = function() {
+ scratchUint8Array[0] = Color.floatToByte(this.red);
+ scratchUint8Array[1] = Color.floatToByte(this.green);
+ scratchUint8Array[2] = Color.floatToByte(this.blue);
+ scratchUint8Array[3] = Color.floatToByte(this.alpha);
+ return scratchUint32Array[0];
+};
+Color.prototype.brighten = function(magnitude, result) {
+ Check_default.typeOf.number("magnitude", magnitude);
+ Check_default.typeOf.number.greaterThanOrEquals("magnitude", magnitude, 0);
+ Check_default.typeOf.object("result", result);
+ magnitude = 1 - magnitude;
+ result.red = 1 - (1 - this.red) * magnitude;
+ result.green = 1 - (1 - this.green) * magnitude;
+ result.blue = 1 - (1 - this.blue) * magnitude;
+ result.alpha = this.alpha;
+ return result;
+};
+Color.prototype.darken = function(magnitude, result) {
+ Check_default.typeOf.number("magnitude", magnitude);
+ Check_default.typeOf.number.greaterThanOrEquals("magnitude", magnitude, 0);
+ Check_default.typeOf.object("result", result);
+ magnitude = 1 - magnitude;
+ result.red = this.red * magnitude;
+ result.green = this.green * magnitude;
+ result.blue = this.blue * magnitude;
+ result.alpha = this.alpha;
+ return result;
+};
+Color.prototype.withAlpha = function(alpha, result) {
+ return Color.fromAlpha(this, alpha, result);
+};
+Color.add = function(left, right, result) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Check_default.typeOf.object("result", result);
+ result.red = left.red + right.red;
+ result.green = left.green + right.green;
+ result.blue = left.blue + right.blue;
+ result.alpha = left.alpha + right.alpha;
+ return result;
+};
+Color.subtract = function(left, right, result) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Check_default.typeOf.object("result", result);
+ result.red = left.red - right.red;
+ result.green = left.green - right.green;
+ result.blue = left.blue - right.blue;
+ result.alpha = left.alpha - right.alpha;
+ return result;
+};
+Color.multiply = function(left, right, result) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Check_default.typeOf.object("result", result);
+ result.red = left.red * right.red;
+ result.green = left.green * right.green;
+ result.blue = left.blue * right.blue;
+ result.alpha = left.alpha * right.alpha;
+ return result;
+};
+Color.divide = function(left, right, result) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Check_default.typeOf.object("result", result);
+ result.red = left.red / right.red;
+ result.green = left.green / right.green;
+ result.blue = left.blue / right.blue;
+ result.alpha = left.alpha / right.alpha;
+ return result;
+};
+Color.mod = function(left, right, result) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ Check_default.typeOf.object("result", result);
+ result.red = left.red % right.red;
+ result.green = left.green % right.green;
+ result.blue = left.blue % right.blue;
+ result.alpha = left.alpha % right.alpha;
+ return result;
+};
+Color.lerp = function(start, end, t, result) {
+ Check_default.typeOf.object("start", start);
+ Check_default.typeOf.object("end", end);
+ Check_default.typeOf.number("t", t);
+ Check_default.typeOf.object("result", result);
+ result.red = Math_default.lerp(start.red, end.red, t);
+ result.green = Math_default.lerp(start.green, end.green, t);
+ result.blue = Math_default.lerp(start.blue, end.blue, t);
+ result.alpha = Math_default.lerp(start.alpha, end.alpha, t);
+ return result;
+};
+Color.multiplyByScalar = function(color, scalar, result) {
+ Check_default.typeOf.object("color", color);
+ Check_default.typeOf.number("scalar", scalar);
+ Check_default.typeOf.object("result", result);
+ result.red = color.red * scalar;
+ result.green = color.green * scalar;
+ result.blue = color.blue * scalar;
+ result.alpha = color.alpha * scalar;
+ return result;
+};
+Color.divideByScalar = function(color, scalar, result) {
+ Check_default.typeOf.object("color", color);
+ Check_default.typeOf.number("scalar", scalar);
+ Check_default.typeOf.object("result", result);
+ result.red = color.red / scalar;
+ result.green = color.green / scalar;
+ result.blue = color.blue / scalar;
+ result.alpha = color.alpha / scalar;
+ return result;
+};
+Color.ALICEBLUE = Object.freeze(Color.fromCssColorString("#F0F8FF"));
+Color.ANTIQUEWHITE = Object.freeze(Color.fromCssColorString("#FAEBD7"));
+Color.AQUA = Object.freeze(Color.fromCssColorString("#00FFFF"));
+Color.AQUAMARINE = Object.freeze(Color.fromCssColorString("#7FFFD4"));
+Color.AZURE = Object.freeze(Color.fromCssColorString("#F0FFFF"));
+Color.BEIGE = Object.freeze(Color.fromCssColorString("#F5F5DC"));
+Color.BISQUE = Object.freeze(Color.fromCssColorString("#FFE4C4"));
+Color.BLACK = Object.freeze(Color.fromCssColorString("#000000"));
+Color.BLANCHEDALMOND = Object.freeze(Color.fromCssColorString("#FFEBCD"));
+Color.BLUE = Object.freeze(Color.fromCssColorString("#0000FF"));
+Color.BLUEVIOLET = Object.freeze(Color.fromCssColorString("#8A2BE2"));
+Color.BROWN = Object.freeze(Color.fromCssColorString("#A52A2A"));
+Color.BURLYWOOD = Object.freeze(Color.fromCssColorString("#DEB887"));
+Color.CADETBLUE = Object.freeze(Color.fromCssColorString("#5F9EA0"));
+Color.CHARTREUSE = Object.freeze(Color.fromCssColorString("#7FFF00"));
+Color.CHOCOLATE = Object.freeze(Color.fromCssColorString("#D2691E"));
+Color.CORAL = Object.freeze(Color.fromCssColorString("#FF7F50"));
+Color.CORNFLOWERBLUE = Object.freeze(Color.fromCssColorString("#6495ED"));
+Color.CORNSILK = Object.freeze(Color.fromCssColorString("#FFF8DC"));
+Color.CRIMSON = Object.freeze(Color.fromCssColorString("#DC143C"));
+Color.CYAN = Object.freeze(Color.fromCssColorString("#00FFFF"));
+Color.DARKBLUE = Object.freeze(Color.fromCssColorString("#00008B"));
+Color.DARKCYAN = Object.freeze(Color.fromCssColorString("#008B8B"));
+Color.DARKGOLDENROD = Object.freeze(Color.fromCssColorString("#B8860B"));
+Color.DARKGRAY = Object.freeze(Color.fromCssColorString("#A9A9A9"));
+Color.DARKGREEN = Object.freeze(Color.fromCssColorString("#006400"));
+Color.DARKGREY = Color.DARKGRAY;
+Color.DARKKHAKI = Object.freeze(Color.fromCssColorString("#BDB76B"));
+Color.DARKMAGENTA = Object.freeze(Color.fromCssColorString("#8B008B"));
+Color.DARKOLIVEGREEN = Object.freeze(Color.fromCssColorString("#556B2F"));
+Color.DARKORANGE = Object.freeze(Color.fromCssColorString("#FF8C00"));
+Color.DARKORCHID = Object.freeze(Color.fromCssColorString("#9932CC"));
+Color.DARKRED = Object.freeze(Color.fromCssColorString("#8B0000"));
+Color.DARKSALMON = Object.freeze(Color.fromCssColorString("#E9967A"));
+Color.DARKSEAGREEN = Object.freeze(Color.fromCssColorString("#8FBC8F"));
+Color.DARKSLATEBLUE = Object.freeze(Color.fromCssColorString("#483D8B"));
+Color.DARKSLATEGRAY = Object.freeze(Color.fromCssColorString("#2F4F4F"));
+Color.DARKSLATEGREY = Color.DARKSLATEGRAY;
+Color.DARKTURQUOISE = Object.freeze(Color.fromCssColorString("#00CED1"));
+Color.DARKVIOLET = Object.freeze(Color.fromCssColorString("#9400D3"));
+Color.DEEPPINK = Object.freeze(Color.fromCssColorString("#FF1493"));
+Color.DEEPSKYBLUE = Object.freeze(Color.fromCssColorString("#00BFFF"));
+Color.DIMGRAY = Object.freeze(Color.fromCssColorString("#696969"));
+Color.DIMGREY = Color.DIMGRAY;
+Color.DODGERBLUE = Object.freeze(Color.fromCssColorString("#1E90FF"));
+Color.FIREBRICK = Object.freeze(Color.fromCssColorString("#B22222"));
+Color.FLORALWHITE = Object.freeze(Color.fromCssColorString("#FFFAF0"));
+Color.FORESTGREEN = Object.freeze(Color.fromCssColorString("#228B22"));
+Color.FUCHSIA = Object.freeze(Color.fromCssColorString("#FF00FF"));
+Color.GAINSBORO = Object.freeze(Color.fromCssColorString("#DCDCDC"));
+Color.GHOSTWHITE = Object.freeze(Color.fromCssColorString("#F8F8FF"));
+Color.GOLD = Object.freeze(Color.fromCssColorString("#FFD700"));
+Color.GOLDENROD = Object.freeze(Color.fromCssColorString("#DAA520"));
+Color.GRAY = Object.freeze(Color.fromCssColorString("#808080"));
+Color.GREEN = Object.freeze(Color.fromCssColorString("#008000"));
+Color.GREENYELLOW = Object.freeze(Color.fromCssColorString("#ADFF2F"));
+Color.GREY = Color.GRAY;
+Color.HONEYDEW = Object.freeze(Color.fromCssColorString("#F0FFF0"));
+Color.HOTPINK = Object.freeze(Color.fromCssColorString("#FF69B4"));
+Color.INDIANRED = Object.freeze(Color.fromCssColorString("#CD5C5C"));
+Color.INDIGO = Object.freeze(Color.fromCssColorString("#4B0082"));
+Color.IVORY = Object.freeze(Color.fromCssColorString("#FFFFF0"));
+Color.KHAKI = Object.freeze(Color.fromCssColorString("#F0E68C"));
+Color.LAVENDER = Object.freeze(Color.fromCssColorString("#E6E6FA"));
+Color.LAVENDAR_BLUSH = Object.freeze(Color.fromCssColorString("#FFF0F5"));
+Color.LAWNGREEN = Object.freeze(Color.fromCssColorString("#7CFC00"));
+Color.LEMONCHIFFON = Object.freeze(Color.fromCssColorString("#FFFACD"));
+Color.LIGHTBLUE = Object.freeze(Color.fromCssColorString("#ADD8E6"));
+Color.LIGHTCORAL = Object.freeze(Color.fromCssColorString("#F08080"));
+Color.LIGHTCYAN = Object.freeze(Color.fromCssColorString("#E0FFFF"));
+Color.LIGHTGOLDENRODYELLOW = Object.freeze(Color.fromCssColorString("#FAFAD2"));
+Color.LIGHTGRAY = Object.freeze(Color.fromCssColorString("#D3D3D3"));
+Color.LIGHTGREEN = Object.freeze(Color.fromCssColorString("#90EE90"));
+Color.LIGHTGREY = Color.LIGHTGRAY;
+Color.LIGHTPINK = Object.freeze(Color.fromCssColorString("#FFB6C1"));
+Color.LIGHTSEAGREEN = Object.freeze(Color.fromCssColorString("#20B2AA"));
+Color.LIGHTSKYBLUE = Object.freeze(Color.fromCssColorString("#87CEFA"));
+Color.LIGHTSLATEGRAY = Object.freeze(Color.fromCssColorString("#778899"));
+Color.LIGHTSLATEGREY = Color.LIGHTSLATEGRAY;
+Color.LIGHTSTEELBLUE = Object.freeze(Color.fromCssColorString("#B0C4DE"));
+Color.LIGHTYELLOW = Object.freeze(Color.fromCssColorString("#FFFFE0"));
+Color.LIME = Object.freeze(Color.fromCssColorString("#00FF00"));
+Color.LIMEGREEN = Object.freeze(Color.fromCssColorString("#32CD32"));
+Color.LINEN = Object.freeze(Color.fromCssColorString("#FAF0E6"));
+Color.MAGENTA = Object.freeze(Color.fromCssColorString("#FF00FF"));
+Color.MAROON = Object.freeze(Color.fromCssColorString("#800000"));
+Color.MEDIUMAQUAMARINE = Object.freeze(Color.fromCssColorString("#66CDAA"));
+Color.MEDIUMBLUE = Object.freeze(Color.fromCssColorString("#0000CD"));
+Color.MEDIUMORCHID = Object.freeze(Color.fromCssColorString("#BA55D3"));
+Color.MEDIUMPURPLE = Object.freeze(Color.fromCssColorString("#9370DB"));
+Color.MEDIUMSEAGREEN = Object.freeze(Color.fromCssColorString("#3CB371"));
+Color.MEDIUMSLATEBLUE = Object.freeze(Color.fromCssColorString("#7B68EE"));
+Color.MEDIUMSPRINGGREEN = Object.freeze(Color.fromCssColorString("#00FA9A"));
+Color.MEDIUMTURQUOISE = Object.freeze(Color.fromCssColorString("#48D1CC"));
+Color.MEDIUMVIOLETRED = Object.freeze(Color.fromCssColorString("#C71585"));
+Color.MIDNIGHTBLUE = Object.freeze(Color.fromCssColorString("#191970"));
+Color.MINTCREAM = Object.freeze(Color.fromCssColorString("#F5FFFA"));
+Color.MISTYROSE = Object.freeze(Color.fromCssColorString("#FFE4E1"));
+Color.MOCCASIN = Object.freeze(Color.fromCssColorString("#FFE4B5"));
+Color.NAVAJOWHITE = Object.freeze(Color.fromCssColorString("#FFDEAD"));
+Color.NAVY = Object.freeze(Color.fromCssColorString("#000080"));
+Color.OLDLACE = Object.freeze(Color.fromCssColorString("#FDF5E6"));
+Color.OLIVE = Object.freeze(Color.fromCssColorString("#808000"));
+Color.OLIVEDRAB = Object.freeze(Color.fromCssColorString("#6B8E23"));
+Color.ORANGE = Object.freeze(Color.fromCssColorString("#FFA500"));
+Color.ORANGERED = Object.freeze(Color.fromCssColorString("#FF4500"));
+Color.ORCHID = Object.freeze(Color.fromCssColorString("#DA70D6"));
+Color.PALEGOLDENROD = Object.freeze(Color.fromCssColorString("#EEE8AA"));
+Color.PALEGREEN = Object.freeze(Color.fromCssColorString("#98FB98"));
+Color.PALETURQUOISE = Object.freeze(Color.fromCssColorString("#AFEEEE"));
+Color.PALEVIOLETRED = Object.freeze(Color.fromCssColorString("#DB7093"));
+Color.PAPAYAWHIP = Object.freeze(Color.fromCssColorString("#FFEFD5"));
+Color.PEACHPUFF = Object.freeze(Color.fromCssColorString("#FFDAB9"));
+Color.PERU = Object.freeze(Color.fromCssColorString("#CD853F"));
+Color.PINK = Object.freeze(Color.fromCssColorString("#FFC0CB"));
+Color.PLUM = Object.freeze(Color.fromCssColorString("#DDA0DD"));
+Color.POWDERBLUE = Object.freeze(Color.fromCssColorString("#B0E0E6"));
+Color.PURPLE = Object.freeze(Color.fromCssColorString("#800080"));
+Color.RED = Object.freeze(Color.fromCssColorString("#FF0000"));
+Color.ROSYBROWN = Object.freeze(Color.fromCssColorString("#BC8F8F"));
+Color.ROYALBLUE = Object.freeze(Color.fromCssColorString("#4169E1"));
+Color.SADDLEBROWN = Object.freeze(Color.fromCssColorString("#8B4513"));
+Color.SALMON = Object.freeze(Color.fromCssColorString("#FA8072"));
+Color.SANDYBROWN = Object.freeze(Color.fromCssColorString("#F4A460"));
+Color.SEAGREEN = Object.freeze(Color.fromCssColorString("#2E8B57"));
+Color.SEASHELL = Object.freeze(Color.fromCssColorString("#FFF5EE"));
+Color.SIENNA = Object.freeze(Color.fromCssColorString("#A0522D"));
+Color.SILVER = Object.freeze(Color.fromCssColorString("#C0C0C0"));
+Color.SKYBLUE = Object.freeze(Color.fromCssColorString("#87CEEB"));
+Color.SLATEBLUE = Object.freeze(Color.fromCssColorString("#6A5ACD"));
+Color.SLATEGRAY = Object.freeze(Color.fromCssColorString("#708090"));
+Color.SLATEGREY = Color.SLATEGRAY;
+Color.SNOW = Object.freeze(Color.fromCssColorString("#FFFAFA"));
+Color.SPRINGGREEN = Object.freeze(Color.fromCssColorString("#00FF7F"));
+Color.STEELBLUE = Object.freeze(Color.fromCssColorString("#4682B4"));
+Color.TAN = Object.freeze(Color.fromCssColorString("#D2B48C"));
+Color.TEAL = Object.freeze(Color.fromCssColorString("#008080"));
+Color.THISTLE = Object.freeze(Color.fromCssColorString("#D8BFD8"));
+Color.TOMATO = Object.freeze(Color.fromCssColorString("#FF6347"));
+Color.TURQUOISE = Object.freeze(Color.fromCssColorString("#40E0D0"));
+Color.VIOLET = Object.freeze(Color.fromCssColorString("#EE82EE"));
+Color.WHEAT = Object.freeze(Color.fromCssColorString("#F5DEB3"));
+Color.WHITE = Object.freeze(Color.fromCssColorString("#FFFFFF"));
+Color.WHITESMOKE = Object.freeze(Color.fromCssColorString("#F5F5F5"));
+Color.YELLOW = Object.freeze(Color.fromCssColorString("#FFFF00"));
+Color.YELLOWGREEN = Object.freeze(Color.fromCssColorString("#9ACD32"));
+Color.TRANSPARENT = Object.freeze(new Color(0, 0, 0, 0));
+var Color_default = Color;
+
+export {
+ Color_default
+};
diff --git a/public/assets/cesium/Workers/chunk-IBRIWOCM.js b/public/assets/cesium/Workers/chunk-IBRIWOCM.js
new file mode 100644
index 0000000000000000000000000000000000000000..9067ee4ce1e98a03c969ae25a36bc34b6329c690
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-IBRIWOCM.js
@@ -0,0 +1,781 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ WebMercatorProjection_default
+} from "./chunk-RJM36CNY.js";
+import {
+ GeometryPipeline_default
+} from "./chunk-7ZZ5LMZY.js";
+import {
+ IndexDatatype_default
+} from "./chunk-C4WPMOKT.js";
+import {
+ GeometryAttributes_default
+} from "./chunk-X7IQYYHF.js";
+import {
+ GeometryAttribute_default,
+ Geometry_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ BoundingSphere_default,
+ GeographicProjection_default
+} from "./chunk-KHZNBFOH.js";
+import {
+ Matrix4_default
+} from "./chunk-6SQMLVGV.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default,
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/OffsetGeometryInstanceAttribute.js
+function OffsetGeometryInstanceAttribute(x, y, z) {
+ x = defaultValue_default(x, 0);
+ y = defaultValue_default(y, 0);
+ z = defaultValue_default(z, 0);
+ this.value = new Float32Array([x, y, z]);
+}
+Object.defineProperties(OffsetGeometryInstanceAttribute.prototype, {
+ /**
+ * The datatype of each component in the attribute, e.g., individual elements in
+ * {@link OffsetGeometryInstanceAttribute#value}.
+ *
+ * @memberof OffsetGeometryInstanceAttribute.prototype
+ *
+ * @type {ComponentDatatype}
+ * @readonly
+ *
+ * @default {@link ComponentDatatype.FLOAT}
+ */
+ componentDatatype: {
+ get: function() {
+ return ComponentDatatype_default.FLOAT;
+ }
+ },
+ /**
+ * The number of components in the attributes, i.e., {@link OffsetGeometryInstanceAttribute#value}.
+ *
+ * @memberof OffsetGeometryInstanceAttribute.prototype
+ *
+ * @type {number}
+ * @readonly
+ *
+ * @default 3
+ */
+ componentsPerAttribute: {
+ get: function() {
+ return 3;
+ }
+ },
+ /**
+ * When true and componentDatatype is an integer format,
+ * indicate that the components should be mapped to the range [0, 1] (unsigned)
+ * or [-1, 1] (signed) when they are accessed as floating-point for rendering.
+ *
+ * @memberof OffsetGeometryInstanceAttribute.prototype
+ *
+ * @type {boolean}
+ * @readonly
+ *
+ * @default false
+ */
+ normalize: {
+ get: function() {
+ return false;
+ }
+ }
+});
+OffsetGeometryInstanceAttribute.fromCartesian3 = function(offset) {
+ Check_default.defined("offset", offset);
+ return new OffsetGeometryInstanceAttribute(offset.x, offset.y, offset.z);
+};
+OffsetGeometryInstanceAttribute.toValue = function(offset, result) {
+ Check_default.defined("offset", offset);
+ if (!defined_default(result)) {
+ result = new Float32Array([offset.x, offset.y, offset.z]);
+ }
+ result[0] = offset.x;
+ result[1] = offset.y;
+ result[2] = offset.z;
+ return result;
+};
+var OffsetGeometryInstanceAttribute_default = OffsetGeometryInstanceAttribute;
+
+// packages/engine/Source/Scene/PrimitivePipeline.js
+function transformToWorldCoordinates(instances, primitiveModelMatrix, scene3DOnly) {
+ let toWorld = !scene3DOnly;
+ const length = instances.length;
+ let i;
+ if (!toWorld && length > 1) {
+ const modelMatrix = instances[0].modelMatrix;
+ for (i = 1; i < length; ++i) {
+ if (!Matrix4_default.equals(modelMatrix, instances[i].modelMatrix)) {
+ toWorld = true;
+ break;
+ }
+ }
+ }
+ if (toWorld) {
+ for (i = 0; i < length; ++i) {
+ if (defined_default(instances[i].geometry)) {
+ GeometryPipeline_default.transformToWorldCoordinates(instances[i]);
+ }
+ }
+ } else {
+ Matrix4_default.multiplyTransformation(
+ primitiveModelMatrix,
+ instances[0].modelMatrix,
+ primitiveModelMatrix
+ );
+ }
+}
+function addGeometryBatchId(geometry, batchId) {
+ const attributes = geometry.attributes;
+ const positionAttr = attributes.position;
+ const numberOfComponents = positionAttr.values.length / positionAttr.componentsPerAttribute;
+ attributes.batchId = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 1,
+ values: new Float32Array(numberOfComponents)
+ });
+ const values = attributes.batchId.values;
+ for (let j = 0; j < numberOfComponents; ++j) {
+ values[j] = batchId;
+ }
+}
+function addBatchIds(instances) {
+ const length = instances.length;
+ for (let i = 0; i < length; ++i) {
+ const instance = instances[i];
+ if (defined_default(instance.geometry)) {
+ addGeometryBatchId(instance.geometry, i);
+ } else if (defined_default(instance.westHemisphereGeometry) && defined_default(instance.eastHemisphereGeometry)) {
+ addGeometryBatchId(instance.westHemisphereGeometry, i);
+ addGeometryBatchId(instance.eastHemisphereGeometry, i);
+ }
+ }
+}
+function geometryPipeline(parameters) {
+ const instances = parameters.instances;
+ const projection = parameters.projection;
+ const uintIndexSupport = parameters.elementIndexUintSupported;
+ const scene3DOnly = parameters.scene3DOnly;
+ const vertexCacheOptimize = parameters.vertexCacheOptimize;
+ const compressVertices = parameters.compressVertices;
+ const modelMatrix = parameters.modelMatrix;
+ let i;
+ let geometry;
+ let primitiveType;
+ let length = instances.length;
+ for (i = 0; i < length; ++i) {
+ if (defined_default(instances[i].geometry)) {
+ primitiveType = instances[i].geometry.primitiveType;
+ break;
+ }
+ }
+ for (i = 1; i < length; ++i) {
+ if (defined_default(instances[i].geometry) && instances[i].geometry.primitiveType !== primitiveType) {
+ throw new DeveloperError_default(
+ "All instance geometries must have the same primitiveType."
+ );
+ }
+ }
+ transformToWorldCoordinates(instances, modelMatrix, scene3DOnly);
+ if (!scene3DOnly) {
+ for (i = 0; i < length; ++i) {
+ if (defined_default(instances[i].geometry)) {
+ GeometryPipeline_default.splitLongitude(instances[i]);
+ }
+ }
+ }
+ addBatchIds(instances);
+ if (vertexCacheOptimize) {
+ for (i = 0; i < length; ++i) {
+ const instance = instances[i];
+ if (defined_default(instance.geometry)) {
+ GeometryPipeline_default.reorderForPostVertexCache(instance.geometry);
+ GeometryPipeline_default.reorderForPreVertexCache(instance.geometry);
+ } else if (defined_default(instance.westHemisphereGeometry) && defined_default(instance.eastHemisphereGeometry)) {
+ GeometryPipeline_default.reorderForPostVertexCache(
+ instance.westHemisphereGeometry
+ );
+ GeometryPipeline_default.reorderForPreVertexCache(
+ instance.westHemisphereGeometry
+ );
+ GeometryPipeline_default.reorderForPostVertexCache(
+ instance.eastHemisphereGeometry
+ );
+ GeometryPipeline_default.reorderForPreVertexCache(
+ instance.eastHemisphereGeometry
+ );
+ }
+ }
+ }
+ let geometries = GeometryPipeline_default.combineInstances(instances);
+ length = geometries.length;
+ for (i = 0; i < length; ++i) {
+ geometry = geometries[i];
+ const attributes = geometry.attributes;
+ if (!scene3DOnly) {
+ for (const name in attributes) {
+ if (attributes.hasOwnProperty(name) && attributes[name].componentDatatype === ComponentDatatype_default.DOUBLE) {
+ const name3D = `${name}3D`;
+ const name2D = `${name}2D`;
+ GeometryPipeline_default.projectTo2D(
+ geometry,
+ name,
+ name3D,
+ name2D,
+ projection
+ );
+ if (defined_default(geometry.boundingSphere) && name === "position") {
+ geometry.boundingSphereCV = BoundingSphere_default.fromVertices(
+ geometry.attributes.position2D.values
+ );
+ }
+ GeometryPipeline_default.encodeAttribute(
+ geometry,
+ name3D,
+ `${name3D}High`,
+ `${name3D}Low`
+ );
+ GeometryPipeline_default.encodeAttribute(
+ geometry,
+ name2D,
+ `${name2D}High`,
+ `${name2D}Low`
+ );
+ }
+ }
+ } else {
+ for (const name in attributes) {
+ if (attributes.hasOwnProperty(name) && attributes[name].componentDatatype === ComponentDatatype_default.DOUBLE) {
+ GeometryPipeline_default.encodeAttribute(
+ geometry,
+ name,
+ `${name}3DHigh`,
+ `${name}3DLow`
+ );
+ }
+ }
+ }
+ if (compressVertices) {
+ GeometryPipeline_default.compressVertices(geometry);
+ }
+ }
+ if (!uintIndexSupport) {
+ let splitGeometries = [];
+ length = geometries.length;
+ for (i = 0; i < length; ++i) {
+ geometry = geometries[i];
+ splitGeometries = splitGeometries.concat(
+ GeometryPipeline_default.fitToUnsignedShortIndices(geometry)
+ );
+ }
+ geometries = splitGeometries;
+ }
+ return geometries;
+}
+function createPickOffsets(instances, geometryName, geometries, pickOffsets) {
+ let offset;
+ let indexCount;
+ let geometryIndex;
+ const offsetIndex = pickOffsets.length - 1;
+ if (offsetIndex >= 0) {
+ const pickOffset = pickOffsets[offsetIndex];
+ offset = pickOffset.offset + pickOffset.count;
+ geometryIndex = pickOffset.index;
+ indexCount = geometries[geometryIndex].indices.length;
+ } else {
+ offset = 0;
+ geometryIndex = 0;
+ indexCount = geometries[geometryIndex].indices.length;
+ }
+ const length = instances.length;
+ for (let i = 0; i < length; ++i) {
+ const instance = instances[i];
+ const geometry = instance[geometryName];
+ if (!defined_default(geometry)) {
+ continue;
+ }
+ const count = geometry.indices.length;
+ if (offset + count > indexCount) {
+ offset = 0;
+ indexCount = geometries[++geometryIndex].indices.length;
+ }
+ pickOffsets.push({
+ index: geometryIndex,
+ offset,
+ count
+ });
+ offset += count;
+ }
+}
+function createInstancePickOffsets(instances, geometries) {
+ const pickOffsets = [];
+ createPickOffsets(instances, "geometry", geometries, pickOffsets);
+ createPickOffsets(
+ instances,
+ "westHemisphereGeometry",
+ geometries,
+ pickOffsets
+ );
+ createPickOffsets(
+ instances,
+ "eastHemisphereGeometry",
+ geometries,
+ pickOffsets
+ );
+ return pickOffsets;
+}
+var PrimitivePipeline = {};
+PrimitivePipeline.combineGeometry = function(parameters) {
+ let geometries;
+ let attributeLocations;
+ const instances = parameters.instances;
+ const length = instances.length;
+ let pickOffsets;
+ let offsetInstanceExtend;
+ let hasOffset = false;
+ if (length > 0) {
+ geometries = geometryPipeline(parameters);
+ if (geometries.length > 0) {
+ attributeLocations = GeometryPipeline_default.createAttributeLocations(
+ geometries[0]
+ );
+ if (parameters.createPickOffsets) {
+ pickOffsets = createInstancePickOffsets(instances, geometries);
+ }
+ }
+ if (defined_default(instances[0].attributes) && defined_default(instances[0].attributes.offset)) {
+ offsetInstanceExtend = new Array(length);
+ hasOffset = true;
+ }
+ }
+ const boundingSpheres = new Array(length);
+ const boundingSpheresCV = new Array(length);
+ for (let i = 0; i < length; ++i) {
+ const instance = instances[i];
+ const geometry = instance.geometry;
+ if (defined_default(geometry)) {
+ boundingSpheres[i] = geometry.boundingSphere;
+ boundingSpheresCV[i] = geometry.boundingSphereCV;
+ if (hasOffset) {
+ offsetInstanceExtend[i] = instance.geometry.offsetAttribute;
+ }
+ }
+ const eastHemisphereGeometry = instance.eastHemisphereGeometry;
+ const westHemisphereGeometry = instance.westHemisphereGeometry;
+ if (defined_default(eastHemisphereGeometry) && defined_default(westHemisphereGeometry)) {
+ if (defined_default(eastHemisphereGeometry.boundingSphere) && defined_default(westHemisphereGeometry.boundingSphere)) {
+ boundingSpheres[i] = BoundingSphere_default.union(
+ eastHemisphereGeometry.boundingSphere,
+ westHemisphereGeometry.boundingSphere
+ );
+ }
+ if (defined_default(eastHemisphereGeometry.boundingSphereCV) && defined_default(westHemisphereGeometry.boundingSphereCV)) {
+ boundingSpheresCV[i] = BoundingSphere_default.union(
+ eastHemisphereGeometry.boundingSphereCV,
+ westHemisphereGeometry.boundingSphereCV
+ );
+ }
+ }
+ }
+ return {
+ geometries,
+ modelMatrix: parameters.modelMatrix,
+ attributeLocations,
+ pickOffsets,
+ offsetInstanceExtend,
+ boundingSpheres,
+ boundingSpheresCV
+ };
+};
+function transferGeometry(geometry, transferableObjects) {
+ const attributes = geometry.attributes;
+ for (const name in attributes) {
+ if (attributes.hasOwnProperty(name)) {
+ const attribute = attributes[name];
+ if (defined_default(attribute) && defined_default(attribute.values)) {
+ transferableObjects.push(attribute.values.buffer);
+ }
+ }
+ }
+ if (defined_default(geometry.indices)) {
+ transferableObjects.push(geometry.indices.buffer);
+ }
+}
+function transferGeometries(geometries, transferableObjects) {
+ const length = geometries.length;
+ for (let i = 0; i < length; ++i) {
+ transferGeometry(geometries[i], transferableObjects);
+ }
+}
+function countCreateGeometryResults(items) {
+ let count = 1;
+ const length = items.length;
+ for (let i = 0; i < length; i++) {
+ const geometry = items[i];
+ ++count;
+ if (!defined_default(geometry)) {
+ continue;
+ }
+ const attributes = geometry.attributes;
+ count += 7 + 2 * BoundingSphere_default.packedLength + (defined_default(geometry.indices) ? geometry.indices.length : 0);
+ for (const property in attributes) {
+ if (attributes.hasOwnProperty(property) && defined_default(attributes[property])) {
+ const attribute = attributes[property];
+ count += 5 + attribute.values.length;
+ }
+ }
+ }
+ return count;
+}
+PrimitivePipeline.packCreateGeometryResults = function(items, transferableObjects) {
+ const packedData = new Float64Array(countCreateGeometryResults(items));
+ const stringTable = [];
+ const stringHash = {};
+ const length = items.length;
+ let count = 0;
+ packedData[count++] = length;
+ for (let i = 0; i < length; i++) {
+ const geometry = items[i];
+ const validGeometry = defined_default(geometry);
+ packedData[count++] = validGeometry ? 1 : 0;
+ if (!validGeometry) {
+ continue;
+ }
+ packedData[count++] = geometry.primitiveType;
+ packedData[count++] = geometry.geometryType;
+ packedData[count++] = defaultValue_default(geometry.offsetAttribute, -1);
+ const validBoundingSphere = defined_default(geometry.boundingSphere) ? 1 : 0;
+ packedData[count++] = validBoundingSphere;
+ if (validBoundingSphere) {
+ BoundingSphere_default.pack(geometry.boundingSphere, packedData, count);
+ }
+ count += BoundingSphere_default.packedLength;
+ const validBoundingSphereCV = defined_default(geometry.boundingSphereCV) ? 1 : 0;
+ packedData[count++] = validBoundingSphereCV;
+ if (validBoundingSphereCV) {
+ BoundingSphere_default.pack(geometry.boundingSphereCV, packedData, count);
+ }
+ count += BoundingSphere_default.packedLength;
+ const attributes = geometry.attributes;
+ const attributesToWrite = [];
+ for (const property in attributes) {
+ if (attributes.hasOwnProperty(property) && defined_default(attributes[property])) {
+ attributesToWrite.push(property);
+ if (!defined_default(stringHash[property])) {
+ stringHash[property] = stringTable.length;
+ stringTable.push(property);
+ }
+ }
+ }
+ packedData[count++] = attributesToWrite.length;
+ for (let q = 0; q < attributesToWrite.length; q++) {
+ const name = attributesToWrite[q];
+ const attribute = attributes[name];
+ packedData[count++] = stringHash[name];
+ packedData[count++] = attribute.componentDatatype;
+ packedData[count++] = attribute.componentsPerAttribute;
+ packedData[count++] = attribute.normalize ? 1 : 0;
+ packedData[count++] = attribute.values.length;
+ packedData.set(attribute.values, count);
+ count += attribute.values.length;
+ }
+ const indicesLength = defined_default(geometry.indices) ? geometry.indices.length : 0;
+ packedData[count++] = indicesLength;
+ if (indicesLength > 0) {
+ packedData.set(geometry.indices, count);
+ count += indicesLength;
+ }
+ }
+ transferableObjects.push(packedData.buffer);
+ return {
+ stringTable,
+ packedData
+ };
+};
+PrimitivePipeline.unpackCreateGeometryResults = function(createGeometryResult) {
+ const stringTable = createGeometryResult.stringTable;
+ const packedGeometry = createGeometryResult.packedData;
+ let i;
+ const result = new Array(packedGeometry[0]);
+ let resultIndex = 0;
+ let packedGeometryIndex = 1;
+ while (packedGeometryIndex < packedGeometry.length) {
+ const valid = packedGeometry[packedGeometryIndex++] === 1;
+ if (!valid) {
+ result[resultIndex++] = void 0;
+ continue;
+ }
+ const primitiveType = packedGeometry[packedGeometryIndex++];
+ const geometryType = packedGeometry[packedGeometryIndex++];
+ let offsetAttribute = packedGeometry[packedGeometryIndex++];
+ if (offsetAttribute === -1) {
+ offsetAttribute = void 0;
+ }
+ let boundingSphere;
+ let boundingSphereCV;
+ const validBoundingSphere = packedGeometry[packedGeometryIndex++] === 1;
+ if (validBoundingSphere) {
+ boundingSphere = BoundingSphere_default.unpack(
+ packedGeometry,
+ packedGeometryIndex
+ );
+ }
+ packedGeometryIndex += BoundingSphere_default.packedLength;
+ const validBoundingSphereCV = packedGeometry[packedGeometryIndex++] === 1;
+ if (validBoundingSphereCV) {
+ boundingSphereCV = BoundingSphere_default.unpack(
+ packedGeometry,
+ packedGeometryIndex
+ );
+ }
+ packedGeometryIndex += BoundingSphere_default.packedLength;
+ let length;
+ let values;
+ let componentsPerAttribute;
+ const attributes = new GeometryAttributes_default();
+ const numAttributes = packedGeometry[packedGeometryIndex++];
+ for (i = 0; i < numAttributes; i++) {
+ const name = stringTable[packedGeometry[packedGeometryIndex++]];
+ const componentDatatype = packedGeometry[packedGeometryIndex++];
+ componentsPerAttribute = packedGeometry[packedGeometryIndex++];
+ const normalize = packedGeometry[packedGeometryIndex++] !== 0;
+ length = packedGeometry[packedGeometryIndex++];
+ values = ComponentDatatype_default.createTypedArray(componentDatatype, length);
+ for (let valuesIndex = 0; valuesIndex < length; valuesIndex++) {
+ values[valuesIndex] = packedGeometry[packedGeometryIndex++];
+ }
+ attributes[name] = new GeometryAttribute_default({
+ componentDatatype,
+ componentsPerAttribute,
+ normalize,
+ values
+ });
+ }
+ let indices;
+ length = packedGeometry[packedGeometryIndex++];
+ if (length > 0) {
+ const numberOfVertices = values.length / componentsPerAttribute;
+ indices = IndexDatatype_default.createTypedArray(numberOfVertices, length);
+ for (i = 0; i < length; i++) {
+ indices[i] = packedGeometry[packedGeometryIndex++];
+ }
+ }
+ result[resultIndex++] = new Geometry_default({
+ primitiveType,
+ geometryType,
+ boundingSphere,
+ boundingSphereCV,
+ indices,
+ attributes,
+ offsetAttribute
+ });
+ }
+ return result;
+};
+function packInstancesForCombine(instances, transferableObjects) {
+ const length = instances.length;
+ const packedData = new Float64Array(1 + length * 19);
+ let count = 0;
+ packedData[count++] = length;
+ for (let i = 0; i < length; i++) {
+ const instance = instances[i];
+ Matrix4_default.pack(instance.modelMatrix, packedData, count);
+ count += Matrix4_default.packedLength;
+ if (defined_default(instance.attributes) && defined_default(instance.attributes.offset)) {
+ const values = instance.attributes.offset.value;
+ packedData[count] = values[0];
+ packedData[count + 1] = values[1];
+ packedData[count + 2] = values[2];
+ }
+ count += 3;
+ }
+ transferableObjects.push(packedData.buffer);
+ return packedData;
+}
+function unpackInstancesForCombine(data) {
+ const packedInstances = data;
+ const result = new Array(packedInstances[0]);
+ let count = 0;
+ let i = 1;
+ while (i < packedInstances.length) {
+ const modelMatrix = Matrix4_default.unpack(packedInstances, i);
+ let attributes;
+ i += Matrix4_default.packedLength;
+ if (defined_default(packedInstances[i])) {
+ attributes = {
+ offset: new OffsetGeometryInstanceAttribute_default(
+ packedInstances[i],
+ packedInstances[i + 1],
+ packedInstances[i + 2]
+ )
+ };
+ }
+ i += 3;
+ result[count++] = {
+ modelMatrix,
+ attributes
+ };
+ }
+ return result;
+}
+PrimitivePipeline.packCombineGeometryParameters = function(parameters, transferableObjects) {
+ const createGeometryResults = parameters.createGeometryResults;
+ const length = createGeometryResults.length;
+ for (let i = 0; i < length; i++) {
+ transferableObjects.push(createGeometryResults[i].packedData.buffer);
+ }
+ return {
+ createGeometryResults: parameters.createGeometryResults,
+ packedInstances: packInstancesForCombine(
+ parameters.instances,
+ transferableObjects
+ ),
+ ellipsoid: parameters.ellipsoid,
+ isGeographic: parameters.projection instanceof GeographicProjection_default,
+ elementIndexUintSupported: parameters.elementIndexUintSupported,
+ scene3DOnly: parameters.scene3DOnly,
+ vertexCacheOptimize: parameters.vertexCacheOptimize,
+ compressVertices: parameters.compressVertices,
+ modelMatrix: parameters.modelMatrix,
+ createPickOffsets: parameters.createPickOffsets
+ };
+};
+PrimitivePipeline.unpackCombineGeometryParameters = function(packedParameters) {
+ const instances = unpackInstancesForCombine(packedParameters.packedInstances);
+ const createGeometryResults = packedParameters.createGeometryResults;
+ const length = createGeometryResults.length;
+ let instanceIndex = 0;
+ for (let resultIndex = 0; resultIndex < length; resultIndex++) {
+ const geometries = PrimitivePipeline.unpackCreateGeometryResults(
+ createGeometryResults[resultIndex]
+ );
+ const geometriesLength = geometries.length;
+ for (let geometryIndex = 0; geometryIndex < geometriesLength; geometryIndex++) {
+ const geometry = geometries[geometryIndex];
+ const instance = instances[instanceIndex];
+ instance.geometry = geometry;
+ ++instanceIndex;
+ }
+ }
+ const ellipsoid = Ellipsoid_default.clone(packedParameters.ellipsoid);
+ const projection = packedParameters.isGeographic ? new GeographicProjection_default(ellipsoid) : new WebMercatorProjection_default(ellipsoid);
+ return {
+ instances,
+ ellipsoid,
+ projection,
+ elementIndexUintSupported: packedParameters.elementIndexUintSupported,
+ scene3DOnly: packedParameters.scene3DOnly,
+ vertexCacheOptimize: packedParameters.vertexCacheOptimize,
+ compressVertices: packedParameters.compressVertices,
+ modelMatrix: Matrix4_default.clone(packedParameters.modelMatrix),
+ createPickOffsets: packedParameters.createPickOffsets
+ };
+};
+function packBoundingSpheres(boundingSpheres) {
+ const length = boundingSpheres.length;
+ const bufferLength = 1 + (BoundingSphere_default.packedLength + 1) * length;
+ const buffer = new Float32Array(bufferLength);
+ let bufferIndex = 0;
+ buffer[bufferIndex++] = length;
+ for (let i = 0; i < length; ++i) {
+ const bs = boundingSpheres[i];
+ if (!defined_default(bs)) {
+ buffer[bufferIndex++] = 0;
+ } else {
+ buffer[bufferIndex++] = 1;
+ BoundingSphere_default.pack(boundingSpheres[i], buffer, bufferIndex);
+ }
+ bufferIndex += BoundingSphere_default.packedLength;
+ }
+ return buffer;
+}
+function unpackBoundingSpheres(buffer) {
+ const result = new Array(buffer[0]);
+ let count = 0;
+ let i = 1;
+ while (i < buffer.length) {
+ if (buffer[i++] === 1) {
+ result[count] = BoundingSphere_default.unpack(buffer, i);
+ }
+ ++count;
+ i += BoundingSphere_default.packedLength;
+ }
+ return result;
+}
+PrimitivePipeline.packCombineGeometryResults = function(results, transferableObjects) {
+ if (defined_default(results.geometries)) {
+ transferGeometries(results.geometries, transferableObjects);
+ }
+ const packedBoundingSpheres = packBoundingSpheres(results.boundingSpheres);
+ const packedBoundingSpheresCV = packBoundingSpheres(
+ results.boundingSpheresCV
+ );
+ transferableObjects.push(
+ packedBoundingSpheres.buffer,
+ packedBoundingSpheresCV.buffer
+ );
+ return {
+ geometries: results.geometries,
+ attributeLocations: results.attributeLocations,
+ modelMatrix: results.modelMatrix,
+ pickOffsets: results.pickOffsets,
+ offsetInstanceExtend: results.offsetInstanceExtend,
+ boundingSpheres: packedBoundingSpheres,
+ boundingSpheresCV: packedBoundingSpheresCV
+ };
+};
+PrimitivePipeline.unpackCombineGeometryResults = function(packedResult) {
+ return {
+ geometries: packedResult.geometries,
+ attributeLocations: packedResult.attributeLocations,
+ modelMatrix: packedResult.modelMatrix,
+ pickOffsets: packedResult.pickOffsets,
+ offsetInstanceExtend: packedResult.offsetInstanceExtend,
+ boundingSpheres: unpackBoundingSpheres(packedResult.boundingSpheres),
+ boundingSpheresCV: unpackBoundingSpheres(packedResult.boundingSpheresCV)
+ };
+};
+var PrimitivePipeline_default = PrimitivePipeline;
+
+export {
+ PrimitivePipeline_default
+};
diff --git a/public/assets/cesium/Workers/chunk-IZGUQO6Q.js b/public/assets/cesium/Workers/chunk-IZGUQO6Q.js
new file mode 100644
index 0000000000000000000000000000000000000000..f000725ad1c29d0553520a546deffb8628a95adb
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-IZGUQO6Q.js
@@ -0,0 +1,511 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ GeometryOffsetAttribute_default
+} from "./chunk-GBT7MJ6X.js";
+import {
+ VertexFormat_default
+} from "./chunk-JBSKHTNX.js";
+import {
+ IndexDatatype_default
+} from "./chunk-C4WPMOKT.js";
+import {
+ GeometryAttributes_default
+} from "./chunk-X7IQYYHF.js";
+import {
+ GeometryAttribute_default,
+ Geometry_default,
+ PrimitiveType_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ BoundingSphere_default
+} from "./chunk-KHZNBFOH.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian2_default,
+ Cartesian3_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/EllipsoidGeometry.js
+var scratchPosition = new Cartesian3_default();
+var scratchNormal = new Cartesian3_default();
+var scratchTangent = new Cartesian3_default();
+var scratchBitangent = new Cartesian3_default();
+var scratchNormalST = new Cartesian3_default();
+var defaultRadii = new Cartesian3_default(1, 1, 1);
+var cos = Math.cos;
+var sin = Math.sin;
+function EllipsoidGeometry(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const radii = defaultValue_default(options.radii, defaultRadii);
+ const innerRadii = defaultValue_default(options.innerRadii, radii);
+ const minimumClock = defaultValue_default(options.minimumClock, 0);
+ const maximumClock = defaultValue_default(options.maximumClock, Math_default.TWO_PI);
+ const minimumCone = defaultValue_default(options.minimumCone, 0);
+ const maximumCone = defaultValue_default(options.maximumCone, Math_default.PI);
+ const stackPartitions = Math.round(defaultValue_default(options.stackPartitions, 64));
+ const slicePartitions = Math.round(defaultValue_default(options.slicePartitions, 64));
+ const vertexFormat = defaultValue_default(options.vertexFormat, VertexFormat_default.DEFAULT);
+ if (slicePartitions < 3) {
+ throw new DeveloperError_default(
+ "options.slicePartitions cannot be less than three."
+ );
+ }
+ if (stackPartitions < 3) {
+ throw new DeveloperError_default(
+ "options.stackPartitions cannot be less than three."
+ );
+ }
+ this._radii = Cartesian3_default.clone(radii);
+ this._innerRadii = Cartesian3_default.clone(innerRadii);
+ this._minimumClock = minimumClock;
+ this._maximumClock = maximumClock;
+ this._minimumCone = minimumCone;
+ this._maximumCone = maximumCone;
+ this._stackPartitions = stackPartitions;
+ this._slicePartitions = slicePartitions;
+ this._vertexFormat = VertexFormat_default.clone(vertexFormat);
+ this._offsetAttribute = options.offsetAttribute;
+ this._workerName = "createEllipsoidGeometry";
+}
+EllipsoidGeometry.packedLength = 2 * Cartesian3_default.packedLength + VertexFormat_default.packedLength + 7;
+EllipsoidGeometry.pack = function(value, array, startingIndex) {
+ if (!defined_default(value)) {
+ throw new DeveloperError_default("value is required");
+ }
+ if (!defined_default(array)) {
+ throw new DeveloperError_default("array is required");
+ }
+ startingIndex = defaultValue_default(startingIndex, 0);
+ Cartesian3_default.pack(value._radii, array, startingIndex);
+ startingIndex += Cartesian3_default.packedLength;
+ Cartesian3_default.pack(value._innerRadii, array, startingIndex);
+ startingIndex += Cartesian3_default.packedLength;
+ VertexFormat_default.pack(value._vertexFormat, array, startingIndex);
+ startingIndex += VertexFormat_default.packedLength;
+ array[startingIndex++] = value._minimumClock;
+ array[startingIndex++] = value._maximumClock;
+ array[startingIndex++] = value._minimumCone;
+ array[startingIndex++] = value._maximumCone;
+ array[startingIndex++] = value._stackPartitions;
+ array[startingIndex++] = value._slicePartitions;
+ array[startingIndex] = defaultValue_default(value._offsetAttribute, -1);
+ return array;
+};
+var scratchRadii = new Cartesian3_default();
+var scratchInnerRadii = new Cartesian3_default();
+var scratchVertexFormat = new VertexFormat_default();
+var scratchOptions = {
+ radii: scratchRadii,
+ innerRadii: scratchInnerRadii,
+ vertexFormat: scratchVertexFormat,
+ minimumClock: void 0,
+ maximumClock: void 0,
+ minimumCone: void 0,
+ maximumCone: void 0,
+ stackPartitions: void 0,
+ slicePartitions: void 0,
+ offsetAttribute: void 0
+};
+EllipsoidGeometry.unpack = function(array, startingIndex, result) {
+ if (!defined_default(array)) {
+ throw new DeveloperError_default("array is required");
+ }
+ startingIndex = defaultValue_default(startingIndex, 0);
+ const radii = Cartesian3_default.unpack(array, startingIndex, scratchRadii);
+ startingIndex += Cartesian3_default.packedLength;
+ const innerRadii = Cartesian3_default.unpack(array, startingIndex, scratchInnerRadii);
+ startingIndex += Cartesian3_default.packedLength;
+ const vertexFormat = VertexFormat_default.unpack(
+ array,
+ startingIndex,
+ scratchVertexFormat
+ );
+ startingIndex += VertexFormat_default.packedLength;
+ const minimumClock = array[startingIndex++];
+ const maximumClock = array[startingIndex++];
+ const minimumCone = array[startingIndex++];
+ const maximumCone = array[startingIndex++];
+ const stackPartitions = array[startingIndex++];
+ const slicePartitions = array[startingIndex++];
+ const offsetAttribute = array[startingIndex];
+ if (!defined_default(result)) {
+ scratchOptions.minimumClock = minimumClock;
+ scratchOptions.maximumClock = maximumClock;
+ scratchOptions.minimumCone = minimumCone;
+ scratchOptions.maximumCone = maximumCone;
+ scratchOptions.stackPartitions = stackPartitions;
+ scratchOptions.slicePartitions = slicePartitions;
+ scratchOptions.offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
+ return new EllipsoidGeometry(scratchOptions);
+ }
+ result._radii = Cartesian3_default.clone(radii, result._radii);
+ result._innerRadii = Cartesian3_default.clone(innerRadii, result._innerRadii);
+ result._vertexFormat = VertexFormat_default.clone(vertexFormat, result._vertexFormat);
+ result._minimumClock = minimumClock;
+ result._maximumClock = maximumClock;
+ result._minimumCone = minimumCone;
+ result._maximumCone = maximumCone;
+ result._stackPartitions = stackPartitions;
+ result._slicePartitions = slicePartitions;
+ result._offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
+ return result;
+};
+EllipsoidGeometry.createGeometry = function(ellipsoidGeometry) {
+ const radii = ellipsoidGeometry._radii;
+ if (radii.x <= 0 || radii.y <= 0 || radii.z <= 0) {
+ return;
+ }
+ const innerRadii = ellipsoidGeometry._innerRadii;
+ if (innerRadii.x <= 0 || innerRadii.y <= 0 || innerRadii.z <= 0) {
+ return;
+ }
+ const minimumClock = ellipsoidGeometry._minimumClock;
+ const maximumClock = ellipsoidGeometry._maximumClock;
+ const minimumCone = ellipsoidGeometry._minimumCone;
+ const maximumCone = ellipsoidGeometry._maximumCone;
+ const vertexFormat = ellipsoidGeometry._vertexFormat;
+ let slicePartitions = ellipsoidGeometry._slicePartitions + 1;
+ let stackPartitions = ellipsoidGeometry._stackPartitions + 1;
+ slicePartitions = Math.round(
+ slicePartitions * Math.abs(maximumClock - minimumClock) / Math_default.TWO_PI
+ );
+ stackPartitions = Math.round(
+ stackPartitions * Math.abs(maximumCone - minimumCone) / Math_default.PI
+ );
+ if (slicePartitions < 2) {
+ slicePartitions = 2;
+ }
+ if (stackPartitions < 2) {
+ stackPartitions = 2;
+ }
+ let i;
+ let j;
+ let index = 0;
+ const phis = [minimumCone];
+ const thetas = [minimumClock];
+ for (i = 0; i < stackPartitions; i++) {
+ phis.push(
+ minimumCone + i * (maximumCone - minimumCone) / (stackPartitions - 1)
+ );
+ }
+ phis.push(maximumCone);
+ for (j = 0; j < slicePartitions; j++) {
+ thetas.push(
+ minimumClock + j * (maximumClock - minimumClock) / (slicePartitions - 1)
+ );
+ }
+ thetas.push(maximumClock);
+ const numPhis = phis.length;
+ const numThetas = thetas.length;
+ let extraIndices = 0;
+ let vertexMultiplier = 1;
+ const hasInnerSurface = innerRadii.x !== radii.x || innerRadii.y !== radii.y || innerRadii.z !== radii.z;
+ let isTopOpen = false;
+ let isBotOpen = false;
+ let isClockOpen = false;
+ if (hasInnerSurface) {
+ vertexMultiplier = 2;
+ if (minimumCone > 0) {
+ isTopOpen = true;
+ extraIndices += slicePartitions - 1;
+ }
+ if (maximumCone < Math.PI) {
+ isBotOpen = true;
+ extraIndices += slicePartitions - 1;
+ }
+ if ((maximumClock - minimumClock) % Math_default.TWO_PI) {
+ isClockOpen = true;
+ extraIndices += (stackPartitions - 1) * 2 + 1;
+ } else {
+ extraIndices += 1;
+ }
+ }
+ const vertexCount = numThetas * numPhis * vertexMultiplier;
+ const positions = new Float64Array(vertexCount * 3);
+ const isInner = new Array(vertexCount).fill(false);
+ const negateNormal = new Array(vertexCount).fill(false);
+ const indexCount = slicePartitions * stackPartitions * vertexMultiplier;
+ const numIndices = 6 * (indexCount + extraIndices + 1 - (slicePartitions + stackPartitions) * vertexMultiplier);
+ const indices = IndexDatatype_default.createTypedArray(indexCount, numIndices);
+ const normals = vertexFormat.normal ? new Float32Array(vertexCount * 3) : void 0;
+ const tangents = vertexFormat.tangent ? new Float32Array(vertexCount * 3) : void 0;
+ const bitangents = vertexFormat.bitangent ? new Float32Array(vertexCount * 3) : void 0;
+ const st = vertexFormat.st ? new Float32Array(vertexCount * 2) : void 0;
+ const sinPhi = new Array(numPhis);
+ const cosPhi = new Array(numPhis);
+ for (i = 0; i < numPhis; i++) {
+ sinPhi[i] = sin(phis[i]);
+ cosPhi[i] = cos(phis[i]);
+ }
+ const sinTheta = new Array(numThetas);
+ const cosTheta = new Array(numThetas);
+ for (j = 0; j < numThetas; j++) {
+ cosTheta[j] = cos(thetas[j]);
+ sinTheta[j] = sin(thetas[j]);
+ }
+ for (i = 0; i < numPhis; i++) {
+ for (j = 0; j < numThetas; j++) {
+ positions[index++] = radii.x * sinPhi[i] * cosTheta[j];
+ positions[index++] = radii.y * sinPhi[i] * sinTheta[j];
+ positions[index++] = radii.z * cosPhi[i];
+ }
+ }
+ let vertexIndex = vertexCount / 2;
+ if (hasInnerSurface) {
+ for (i = 0; i < numPhis; i++) {
+ for (j = 0; j < numThetas; j++) {
+ positions[index++] = innerRadii.x * sinPhi[i] * cosTheta[j];
+ positions[index++] = innerRadii.y * sinPhi[i] * sinTheta[j];
+ positions[index++] = innerRadii.z * cosPhi[i];
+ isInner[vertexIndex] = true;
+ if (i > 0 && i !== numPhis - 1 && j !== 0 && j !== numThetas - 1) {
+ negateNormal[vertexIndex] = true;
+ }
+ vertexIndex++;
+ }
+ }
+ }
+ index = 0;
+ let topOffset;
+ let bottomOffset;
+ for (i = 1; i < numPhis - 2; i++) {
+ topOffset = i * numThetas;
+ bottomOffset = (i + 1) * numThetas;
+ for (j = 1; j < numThetas - 2; j++) {
+ indices[index++] = bottomOffset + j;
+ indices[index++] = bottomOffset + j + 1;
+ indices[index++] = topOffset + j + 1;
+ indices[index++] = bottomOffset + j;
+ indices[index++] = topOffset + j + 1;
+ indices[index++] = topOffset + j;
+ }
+ }
+ if (hasInnerSurface) {
+ const offset = numPhis * numThetas;
+ for (i = 1; i < numPhis - 2; i++) {
+ topOffset = offset + i * numThetas;
+ bottomOffset = offset + (i + 1) * numThetas;
+ for (j = 1; j < numThetas - 2; j++) {
+ indices[index++] = bottomOffset + j;
+ indices[index++] = topOffset + j;
+ indices[index++] = topOffset + j + 1;
+ indices[index++] = bottomOffset + j;
+ indices[index++] = topOffset + j + 1;
+ indices[index++] = bottomOffset + j + 1;
+ }
+ }
+ }
+ let outerOffset;
+ let innerOffset;
+ if (hasInnerSurface) {
+ if (isTopOpen) {
+ innerOffset = numPhis * numThetas;
+ for (i = 1; i < numThetas - 2; i++) {
+ indices[index++] = i;
+ indices[index++] = i + 1;
+ indices[index++] = innerOffset + i + 1;
+ indices[index++] = i;
+ indices[index++] = innerOffset + i + 1;
+ indices[index++] = innerOffset + i;
+ }
+ }
+ if (isBotOpen) {
+ outerOffset = numPhis * numThetas - numThetas;
+ innerOffset = numPhis * numThetas * vertexMultiplier - numThetas;
+ for (i = 1; i < numThetas - 2; i++) {
+ indices[index++] = outerOffset + i + 1;
+ indices[index++] = outerOffset + i;
+ indices[index++] = innerOffset + i;
+ indices[index++] = outerOffset + i + 1;
+ indices[index++] = innerOffset + i;
+ indices[index++] = innerOffset + i + 1;
+ }
+ }
+ }
+ if (isClockOpen) {
+ for (i = 1; i < numPhis - 2; i++) {
+ innerOffset = numThetas * numPhis + numThetas * i;
+ outerOffset = numThetas * i;
+ indices[index++] = innerOffset;
+ indices[index++] = outerOffset + numThetas;
+ indices[index++] = outerOffset;
+ indices[index++] = innerOffset;
+ indices[index++] = innerOffset + numThetas;
+ indices[index++] = outerOffset + numThetas;
+ }
+ for (i = 1; i < numPhis - 2; i++) {
+ innerOffset = numThetas * numPhis + numThetas * (i + 1) - 1;
+ outerOffset = numThetas * (i + 1) - 1;
+ indices[index++] = outerOffset + numThetas;
+ indices[index++] = innerOffset;
+ indices[index++] = outerOffset;
+ indices[index++] = outerOffset + numThetas;
+ indices[index++] = innerOffset + numThetas;
+ indices[index++] = innerOffset;
+ }
+ }
+ const attributes = new GeometryAttributes_default();
+ if (vertexFormat.position) {
+ attributes.position = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: positions
+ });
+ }
+ let stIndex = 0;
+ let normalIndex = 0;
+ let tangentIndex = 0;
+ let bitangentIndex = 0;
+ const vertexCountHalf = vertexCount / 2;
+ let ellipsoid;
+ const ellipsoidOuter = Ellipsoid_default.fromCartesian3(radii);
+ const ellipsoidInner = Ellipsoid_default.fromCartesian3(innerRadii);
+ if (vertexFormat.st || vertexFormat.normal || vertexFormat.tangent || vertexFormat.bitangent) {
+ for (i = 0; i < vertexCount; i++) {
+ ellipsoid = isInner[i] ? ellipsoidInner : ellipsoidOuter;
+ const position = Cartesian3_default.fromArray(positions, i * 3, scratchPosition);
+ const normal = ellipsoid.geodeticSurfaceNormal(position, scratchNormal);
+ if (negateNormal[i]) {
+ Cartesian3_default.negate(normal, normal);
+ }
+ if (vertexFormat.st) {
+ const normalST = Cartesian2_default.negate(normal, scratchNormalST);
+ st[stIndex++] = Math.atan2(normalST.y, normalST.x) / Math_default.TWO_PI + 0.5;
+ st[stIndex++] = Math.asin(normal.z) / Math.PI + 0.5;
+ }
+ if (vertexFormat.normal) {
+ normals[normalIndex++] = normal.x;
+ normals[normalIndex++] = normal.y;
+ normals[normalIndex++] = normal.z;
+ }
+ if (vertexFormat.tangent || vertexFormat.bitangent) {
+ const tangent = scratchTangent;
+ let tangetOffset = 0;
+ let unit;
+ if (isInner[i]) {
+ tangetOffset = vertexCountHalf;
+ }
+ if (!isTopOpen && i >= tangetOffset && i < tangetOffset + numThetas * 2) {
+ unit = Cartesian3_default.UNIT_X;
+ } else {
+ unit = Cartesian3_default.UNIT_Z;
+ }
+ Cartesian3_default.cross(unit, normal, tangent);
+ Cartesian3_default.normalize(tangent, tangent);
+ if (vertexFormat.tangent) {
+ tangents[tangentIndex++] = tangent.x;
+ tangents[tangentIndex++] = tangent.y;
+ tangents[tangentIndex++] = tangent.z;
+ }
+ if (vertexFormat.bitangent) {
+ const bitangent = Cartesian3_default.cross(normal, tangent, scratchBitangent);
+ Cartesian3_default.normalize(bitangent, bitangent);
+ bitangents[bitangentIndex++] = bitangent.x;
+ bitangents[bitangentIndex++] = bitangent.y;
+ bitangents[bitangentIndex++] = bitangent.z;
+ }
+ }
+ }
+ if (vertexFormat.st) {
+ attributes.st = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 2,
+ values: st
+ });
+ }
+ if (vertexFormat.normal) {
+ attributes.normal = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: normals
+ });
+ }
+ if (vertexFormat.tangent) {
+ attributes.tangent = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: tangents
+ });
+ }
+ if (vertexFormat.bitangent) {
+ attributes.bitangent = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: bitangents
+ });
+ }
+ }
+ if (defined_default(ellipsoidGeometry._offsetAttribute)) {
+ const length = positions.length;
+ const offsetValue = ellipsoidGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
+ const applyOffset = new Uint8Array(length / 3).fill(offsetValue);
+ attributes.applyOffset = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: applyOffset
+ });
+ }
+ return new Geometry_default({
+ attributes,
+ indices,
+ primitiveType: PrimitiveType_default.TRIANGLES,
+ boundingSphere: BoundingSphere_default.fromEllipsoid(ellipsoidOuter),
+ offsetAttribute: ellipsoidGeometry._offsetAttribute
+ });
+};
+var unitEllipsoidGeometry;
+EllipsoidGeometry.getUnitEllipsoid = function() {
+ if (!defined_default(unitEllipsoidGeometry)) {
+ unitEllipsoidGeometry = EllipsoidGeometry.createGeometry(
+ new EllipsoidGeometry({
+ radii: new Cartesian3_default(1, 1, 1),
+ vertexFormat: VertexFormat_default.POSITION_ONLY
+ })
+ );
+ }
+ return unitEllipsoidGeometry;
+};
+var EllipsoidGeometry_default = EllipsoidGeometry;
+
+export {
+ EllipsoidGeometry_default
+};
diff --git a/public/assets/cesium/Workers/chunk-IZJ42N4W.js b/public/assets/cesium/Workers/chunk-IZJ42N4W.js
new file mode 100644
index 0000000000000000000000000000000000000000..f4a3dee30a809e882c9257273d11dbd04977d538
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-IZJ42N4W.js
@@ -0,0 +1,1052 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ ArcType_default
+} from "./chunk-XWOUPGUF.js";
+import {
+ GeometryPipeline_default
+} from "./chunk-7ZZ5LMZY.js";
+import {
+ PolygonPipeline_default,
+ WindingOrder_default
+} from "./chunk-TI3TRKIC.js";
+import {
+ arrayRemoveDuplicates_default
+} from "./chunk-57H6I3SV.js";
+import {
+ EllipsoidRhumbLine_default
+} from "./chunk-JSQJDZI4.js";
+import {
+ IntersectionTests_default
+} from "./chunk-QQOZO7KO.js";
+import {
+ Plane_default
+} from "./chunk-EDLRS3AW.js";
+import {
+ IndexDatatype_default
+} from "./chunk-C4WPMOKT.js";
+import {
+ GeometryAttributes_default
+} from "./chunk-X7IQYYHF.js";
+import {
+ GeometryAttribute_default,
+ Geometry_default,
+ PrimitiveType_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ Quaternion_default
+} from "./chunk-6SQMLVGV.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian2_default,
+ Cartesian3_default,
+ Cartographic_default,
+ Ellipsoid_default,
+ Matrix3_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/PolygonHierarchy.js
+function PolygonHierarchy(positions, holes) {
+ this.positions = defined_default(positions) ? positions : [];
+ this.holes = defined_default(holes) ? holes : [];
+}
+var PolygonHierarchy_default = PolygonHierarchy;
+
+// packages/engine/Source/Core/Queue.js
+function Queue() {
+ this._array = [];
+ this._offset = 0;
+ this._length = 0;
+}
+Object.defineProperties(Queue.prototype, {
+ /**
+ * The length of the queue.
+ *
+ * @memberof Queue.prototype
+ *
+ * @type {number}
+ * @readonly
+ */
+ length: {
+ get: function() {
+ return this._length;
+ }
+ }
+});
+Queue.prototype.enqueue = function(item) {
+ this._array.push(item);
+ this._length++;
+};
+Queue.prototype.dequeue = function() {
+ if (this._length === 0) {
+ return void 0;
+ }
+ const array = this._array;
+ let offset = this._offset;
+ const item = array[offset];
+ array[offset] = void 0;
+ offset++;
+ if (offset > 10 && offset * 2 > array.length) {
+ this._array = array.slice(offset);
+ offset = 0;
+ }
+ this._offset = offset;
+ this._length--;
+ return item;
+};
+Queue.prototype.peek = function() {
+ if (this._length === 0) {
+ return void 0;
+ }
+ return this._array[this._offset];
+};
+Queue.prototype.contains = function(item) {
+ return this._array.indexOf(item) !== -1;
+};
+Queue.prototype.clear = function() {
+ this._array.length = this._offset = this._length = 0;
+};
+Queue.prototype.sort = function(compareFunction) {
+ if (this._offset > 0) {
+ this._array = this._array.slice(this._offset);
+ this._offset = 0;
+ }
+ this._array.sort(compareFunction);
+};
+var Queue_default = Queue;
+
+// packages/engine/Source/Core/PolygonGeometryLibrary.js
+var PolygonGeometryLibrary = {};
+PolygonGeometryLibrary.computeHierarchyPackedLength = function(polygonHierarchy, CartesianX) {
+ let numComponents = 0;
+ const stack = [polygonHierarchy];
+ while (stack.length > 0) {
+ const hierarchy = stack.pop();
+ if (!defined_default(hierarchy)) {
+ continue;
+ }
+ numComponents += 2;
+ const positions = hierarchy.positions;
+ const holes = hierarchy.holes;
+ if (defined_default(positions) && positions.length > 0) {
+ numComponents += positions.length * CartesianX.packedLength;
+ }
+ if (defined_default(holes)) {
+ const length = holes.length;
+ for (let i = 0; i < length; ++i) {
+ stack.push(holes[i]);
+ }
+ }
+ }
+ return numComponents;
+};
+PolygonGeometryLibrary.packPolygonHierarchy = function(polygonHierarchy, array, startingIndex, CartesianX) {
+ const stack = [polygonHierarchy];
+ while (stack.length > 0) {
+ const hierarchy = stack.pop();
+ if (!defined_default(hierarchy)) {
+ continue;
+ }
+ const positions = hierarchy.positions;
+ const holes = hierarchy.holes;
+ array[startingIndex++] = defined_default(positions) ? positions.length : 0;
+ array[startingIndex++] = defined_default(holes) ? holes.length : 0;
+ if (defined_default(positions)) {
+ const positionsLength = positions.length;
+ for (let i = 0; i < positionsLength; ++i, startingIndex += CartesianX.packedLength) {
+ CartesianX.pack(positions[i], array, startingIndex);
+ }
+ }
+ if (defined_default(holes)) {
+ const holesLength = holes.length;
+ for (let j = 0; j < holesLength; ++j) {
+ stack.push(holes[j]);
+ }
+ }
+ }
+ return startingIndex;
+};
+PolygonGeometryLibrary.unpackPolygonHierarchy = function(array, startingIndex, CartesianX) {
+ const positionsLength = array[startingIndex++];
+ const holesLength = array[startingIndex++];
+ const positions = new Array(positionsLength);
+ const holes = holesLength > 0 ? new Array(holesLength) : void 0;
+ for (let i = 0; i < positionsLength; ++i, startingIndex += CartesianX.packedLength) {
+ positions[i] = CartesianX.unpack(array, startingIndex);
+ }
+ for (let j = 0; j < holesLength; ++j) {
+ holes[j] = PolygonGeometryLibrary.unpackPolygonHierarchy(
+ array,
+ startingIndex,
+ CartesianX
+ );
+ startingIndex = holes[j].startingIndex;
+ delete holes[j].startingIndex;
+ }
+ return {
+ positions,
+ holes,
+ startingIndex
+ };
+};
+var distance2DScratch = new Cartesian2_default();
+function getPointAtDistance2D(p0, p1, distance, length) {
+ Cartesian2_default.subtract(p1, p0, distance2DScratch);
+ Cartesian2_default.multiplyByScalar(
+ distance2DScratch,
+ distance / length,
+ distance2DScratch
+ );
+ Cartesian2_default.add(p0, distance2DScratch, distance2DScratch);
+ return [distance2DScratch.x, distance2DScratch.y];
+}
+var distanceScratch = new Cartesian3_default();
+function getPointAtDistance(p0, p1, distance, length) {
+ Cartesian3_default.subtract(p1, p0, distanceScratch);
+ Cartesian3_default.multiplyByScalar(
+ distanceScratch,
+ distance / length,
+ distanceScratch
+ );
+ Cartesian3_default.add(p0, distanceScratch, distanceScratch);
+ return [distanceScratch.x, distanceScratch.y, distanceScratch.z];
+}
+PolygonGeometryLibrary.subdivideLineCount = function(p0, p1, minDistance) {
+ const distance = Cartesian3_default.distance(p0, p1);
+ const n = distance / minDistance;
+ const countDivide = Math.max(0, Math.ceil(Math_default.log2(n)));
+ return Math.pow(2, countDivide);
+};
+var scratchCartographic0 = new Cartographic_default();
+var scratchCartographic1 = new Cartographic_default();
+var scratchCartographic2 = new Cartographic_default();
+var scratchCartesian0 = new Cartesian3_default();
+var scratchRhumbLine = new EllipsoidRhumbLine_default();
+PolygonGeometryLibrary.subdivideRhumbLineCount = function(ellipsoid, p0, p1, minDistance) {
+ const c0 = ellipsoid.cartesianToCartographic(p0, scratchCartographic0);
+ const c1 = ellipsoid.cartesianToCartographic(p1, scratchCartographic1);
+ const rhumb = new EllipsoidRhumbLine_default(c0, c1, ellipsoid);
+ const n = rhumb.surfaceDistance / minDistance;
+ const countDivide = Math.max(0, Math.ceil(Math_default.log2(n)));
+ return Math.pow(2, countDivide);
+};
+PolygonGeometryLibrary.subdivideTexcoordLine = function(t0, t1, p0, p1, minDistance, result) {
+ const subdivisions = PolygonGeometryLibrary.subdivideLineCount(
+ p0,
+ p1,
+ minDistance
+ );
+ const length2D = Cartesian2_default.distance(t0, t1);
+ const distanceBetweenCoords = length2D / subdivisions;
+ const texcoords = result;
+ texcoords.length = subdivisions * 2;
+ let index = 0;
+ for (let i = 0; i < subdivisions; i++) {
+ const t = getPointAtDistance2D(t0, t1, i * distanceBetweenCoords, length2D);
+ texcoords[index++] = t[0];
+ texcoords[index++] = t[1];
+ }
+ return texcoords;
+};
+PolygonGeometryLibrary.subdivideLine = function(p0, p1, minDistance, result) {
+ const numVertices = PolygonGeometryLibrary.subdivideLineCount(
+ p0,
+ p1,
+ minDistance
+ );
+ const length = Cartesian3_default.distance(p0, p1);
+ const distanceBetweenVertices = length / numVertices;
+ if (!defined_default(result)) {
+ result = [];
+ }
+ const positions = result;
+ positions.length = numVertices * 3;
+ let index = 0;
+ for (let i = 0; i < numVertices; i++) {
+ const p = getPointAtDistance(p0, p1, i * distanceBetweenVertices, length);
+ positions[index++] = p[0];
+ positions[index++] = p[1];
+ positions[index++] = p[2];
+ }
+ return positions;
+};
+PolygonGeometryLibrary.subdivideTexcoordRhumbLine = function(t0, t1, ellipsoid, p0, p1, minDistance, result) {
+ const c0 = ellipsoid.cartesianToCartographic(p0, scratchCartographic0);
+ const c1 = ellipsoid.cartesianToCartographic(p1, scratchCartographic1);
+ scratchRhumbLine.setEndPoints(c0, c1);
+ const n = scratchRhumbLine.surfaceDistance / minDistance;
+ const countDivide = Math.max(0, Math.ceil(Math_default.log2(n)));
+ const subdivisions = Math.pow(2, countDivide);
+ const length2D = Cartesian2_default.distance(t0, t1);
+ const distanceBetweenCoords = length2D / subdivisions;
+ const texcoords = result;
+ texcoords.length = subdivisions * 2;
+ let index = 0;
+ for (let i = 0; i < subdivisions; i++) {
+ const t = getPointAtDistance2D(t0, t1, i * distanceBetweenCoords, length2D);
+ texcoords[index++] = t[0];
+ texcoords[index++] = t[1];
+ }
+ return texcoords;
+};
+PolygonGeometryLibrary.subdivideRhumbLine = function(ellipsoid, p0, p1, minDistance, result) {
+ const c0 = ellipsoid.cartesianToCartographic(p0, scratchCartographic0);
+ const c1 = ellipsoid.cartesianToCartographic(p1, scratchCartographic1);
+ const rhumb = new EllipsoidRhumbLine_default(c0, c1, ellipsoid);
+ const n = rhumb.surfaceDistance / minDistance;
+ const countDivide = Math.max(0, Math.ceil(Math_default.log2(n)));
+ const numVertices = Math.pow(2, countDivide);
+ const distanceBetweenVertices = rhumb.surfaceDistance / numVertices;
+ if (!defined_default(result)) {
+ result = [];
+ }
+ const positions = result;
+ positions.length = numVertices * 3;
+ let index = 0;
+ for (let i = 0; i < numVertices; i++) {
+ const c = rhumb.interpolateUsingSurfaceDistance(
+ i * distanceBetweenVertices,
+ scratchCartographic2
+ );
+ const p = ellipsoid.cartographicToCartesian(c, scratchCartesian0);
+ positions[index++] = p.x;
+ positions[index++] = p.y;
+ positions[index++] = p.z;
+ }
+ return positions;
+};
+var scaleToGeodeticHeightN1 = new Cartesian3_default();
+var scaleToGeodeticHeightN2 = new Cartesian3_default();
+var scaleToGeodeticHeightP1 = new Cartesian3_default();
+var scaleToGeodeticHeightP2 = new Cartesian3_default();
+PolygonGeometryLibrary.scaleToGeodeticHeightExtruded = function(geometry, maxHeight, minHeight, ellipsoid, perPositionHeight) {
+ ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.default);
+ const n1 = scaleToGeodeticHeightN1;
+ let n2 = scaleToGeodeticHeightN2;
+ const p = scaleToGeodeticHeightP1;
+ let p2 = scaleToGeodeticHeightP2;
+ if (defined_default(geometry) && defined_default(geometry.attributes) && defined_default(geometry.attributes.position)) {
+ const positions = geometry.attributes.position.values;
+ const length = positions.length / 2;
+ for (let i = 0; i < length; i += 3) {
+ Cartesian3_default.fromArray(positions, i, p);
+ ellipsoid.geodeticSurfaceNormal(p, n1);
+ p2 = ellipsoid.scaleToGeodeticSurface(p, p2);
+ n2 = Cartesian3_default.multiplyByScalar(n1, minHeight, n2);
+ n2 = Cartesian3_default.add(p2, n2, n2);
+ positions[i + length] = n2.x;
+ positions[i + 1 + length] = n2.y;
+ positions[i + 2 + length] = n2.z;
+ if (perPositionHeight) {
+ p2 = Cartesian3_default.clone(p, p2);
+ }
+ n2 = Cartesian3_default.multiplyByScalar(n1, maxHeight, n2);
+ n2 = Cartesian3_default.add(p2, n2, n2);
+ positions[i] = n2.x;
+ positions[i + 1] = n2.y;
+ positions[i + 2] = n2.z;
+ }
+ }
+ return geometry;
+};
+PolygonGeometryLibrary.polygonOutlinesFromHierarchy = function(polygonHierarchy, scaleToEllipsoidSurface, ellipsoid) {
+ const polygons = [];
+ const queue = new Queue_default();
+ queue.enqueue(polygonHierarchy);
+ let i;
+ let j;
+ let length;
+ while (queue.length !== 0) {
+ const outerNode = queue.dequeue();
+ let outerRing = outerNode.positions;
+ if (scaleToEllipsoidSurface) {
+ length = outerRing.length;
+ for (i = 0; i < length; i++) {
+ ellipsoid.scaleToGeodeticSurface(outerRing[i], outerRing[i]);
+ }
+ }
+ outerRing = arrayRemoveDuplicates_default(
+ outerRing,
+ Cartesian3_default.equalsEpsilon,
+ true
+ );
+ if (outerRing.length < 3) {
+ continue;
+ }
+ const numChildren = outerNode.holes ? outerNode.holes.length : 0;
+ for (i = 0; i < numChildren; i++) {
+ const hole = outerNode.holes[i];
+ let holePositions = hole.positions;
+ if (scaleToEllipsoidSurface) {
+ length = holePositions.length;
+ for (j = 0; j < length; ++j) {
+ ellipsoid.scaleToGeodeticSurface(holePositions[j], holePositions[j]);
+ }
+ }
+ holePositions = arrayRemoveDuplicates_default(
+ holePositions,
+ Cartesian3_default.equalsEpsilon,
+ true
+ );
+ if (holePositions.length < 3) {
+ continue;
+ }
+ polygons.push(holePositions);
+ let numGrandchildren = 0;
+ if (defined_default(hole.holes)) {
+ numGrandchildren = hole.holes.length;
+ }
+ for (j = 0; j < numGrandchildren; j++) {
+ queue.enqueue(hole.holes[j]);
+ }
+ }
+ polygons.push(outerRing);
+ }
+ return polygons;
+};
+var scratchRhumbIntersection = new Cartographic_default();
+function computeEquatorIntersectionRhumb(start, end, ellipsoid) {
+ const c0 = ellipsoid.cartesianToCartographic(start, scratchCartographic0);
+ const c1 = ellipsoid.cartesianToCartographic(end, scratchCartographic1);
+ if (Math.sign(c0.latitude) === Math.sign(c1.latitude)) {
+ return;
+ }
+ scratchRhumbLine.setEndPoints(c0, c1);
+ const intersection = scratchRhumbLine.findIntersectionWithLatitude(
+ 0,
+ scratchRhumbIntersection
+ );
+ if (!defined_default(intersection)) {
+ return;
+ }
+ let minLongitude = Math.min(c0.longitude, c1.longitude);
+ let maxLongitude = Math.max(c0.longitude, c1.longitude);
+ if (Math.abs(maxLongitude - minLongitude) > Math_default.PI) {
+ const swap = minLongitude;
+ minLongitude = maxLongitude;
+ maxLongitude = swap;
+ }
+ if (intersection.longitude < minLongitude || intersection.longitude > maxLongitude) {
+ return;
+ }
+ return ellipsoid.cartographicToCartesian(intersection);
+}
+function computeEquatorIntersection(start, end, ellipsoid, arcType) {
+ if (arcType === ArcType_default.RHUMB) {
+ return computeEquatorIntersectionRhumb(start, end, ellipsoid);
+ }
+ const intersection = IntersectionTests_default.lineSegmentPlane(
+ start,
+ end,
+ Plane_default.ORIGIN_XY_PLANE
+ );
+ if (!defined_default(intersection)) {
+ return;
+ }
+ return ellipsoid.scaleToGeodeticSurface(intersection, intersection);
+}
+var scratchCartographic = new Cartographic_default();
+function computeEdgesOnPlane(positions, ellipsoid, arcType) {
+ const edgesOnPlane = [];
+ let startPoint, endPoint, type, next, intersection, i = 0;
+ while (i < positions.length) {
+ startPoint = positions[i];
+ endPoint = positions[(i + 1) % positions.length];
+ type = Math_default.sign(startPoint.z);
+ next = Math_default.sign(endPoint.z);
+ const getLongitude = (position) => {
+ const cartographic = ellipsoid.cartesianToCartographic(
+ position,
+ scratchCartographic
+ );
+ return cartographic.longitude;
+ };
+ if (type === 0) {
+ edgesOnPlane.push({
+ position: i,
+ type,
+ visited: false,
+ next,
+ theta: getLongitude(startPoint)
+ });
+ } else if (next !== 0) {
+ intersection = computeEquatorIntersection(
+ startPoint,
+ endPoint,
+ ellipsoid,
+ arcType
+ );
+ ++i;
+ if (!defined_default(intersection)) {
+ continue;
+ }
+ positions.splice(i, 0, intersection);
+ edgesOnPlane.push({
+ position: i,
+ type,
+ visited: false,
+ next,
+ theta: getLongitude(intersection)
+ });
+ }
+ ++i;
+ }
+ return edgesOnPlane;
+}
+function wirePolygon(polygons, polygonIndex, positions, edgesOnPlane, toDelete, startIndex, abovePlane) {
+ const polygon = [];
+ let i = startIndex;
+ const getMatchingEdge = (i2) => (edge) => edge.position === i2;
+ const polygonsToWire = [];
+ do {
+ const position = positions[i];
+ polygon.push(position);
+ const edgeIndex = edgesOnPlane.findIndex(getMatchingEdge(i));
+ const edge = edgesOnPlane[edgeIndex];
+ if (!defined_default(edge)) {
+ ++i;
+ continue;
+ }
+ const { visited: hasBeenVisited, type, next } = edge;
+ edge.visited = true;
+ if (type === 0) {
+ if (next === 0) {
+ const previousEdge = edgesOnPlane[edgeIndex - (abovePlane ? 1 : -1)];
+ if (previousEdge?.position === i + 1) {
+ previousEdge.visited = true;
+ } else {
+ ++i;
+ continue;
+ }
+ }
+ if (!hasBeenVisited && abovePlane && next > 0 || startIndex === i && !abovePlane && next < 0) {
+ ++i;
+ continue;
+ }
+ }
+ const followEdge = abovePlane ? type >= 0 : type <= 0;
+ if (!followEdge) {
+ ++i;
+ continue;
+ }
+ if (!hasBeenVisited) {
+ polygonsToWire.push(i);
+ }
+ const nextEdgeIndex = edgeIndex + (abovePlane ? 1 : -1);
+ const nextEdge = edgesOnPlane[nextEdgeIndex];
+ if (!defined_default(nextEdge)) {
+ ++i;
+ continue;
+ }
+ i = nextEdge.position;
+ } while (i < positions.length && i >= 0 && i !== startIndex && polygon.length < positions.length);
+ polygons.splice(polygonIndex, toDelete, polygon);
+ for (const index of polygonsToWire) {
+ polygonIndex = wirePolygon(
+ polygons,
+ ++polygonIndex,
+ positions,
+ edgesOnPlane,
+ 0,
+ index,
+ !abovePlane
+ );
+ }
+ return polygonIndex;
+}
+PolygonGeometryLibrary.splitPolygonsOnEquator = function(outerRings, ellipsoid, arcType, result) {
+ if (!defined_default(result)) {
+ result = [];
+ }
+ result.splice(0, 0, ...outerRings);
+ result.length = outerRings.length;
+ let currentPolygon = 0;
+ while (currentPolygon < result.length) {
+ const outerRing = result[currentPolygon];
+ const positions = outerRing.slice();
+ if (outerRing.length < 3) {
+ result[currentPolygon] = positions;
+ ++currentPolygon;
+ continue;
+ }
+ const edgesOnPlane = computeEdgesOnPlane(positions, ellipsoid, arcType);
+ if (positions.length === outerRing.length || edgesOnPlane.length <= 1) {
+ result[currentPolygon] = positions;
+ ++currentPolygon;
+ continue;
+ }
+ edgesOnPlane.sort((a, b) => {
+ return a.theta - b.theta;
+ });
+ const north = positions[0].z >= 0;
+ currentPolygon = wirePolygon(
+ result,
+ currentPolygon,
+ positions,
+ edgesOnPlane,
+ 1,
+ 0,
+ north
+ );
+ }
+ return result;
+};
+PolygonGeometryLibrary.polygonsFromHierarchy = function(polygonHierarchy, keepDuplicates, projectPointsTo2D, scaleToEllipsoidSurface, ellipsoid, splitPolygons) {
+ const hierarchy = [];
+ const polygons = [];
+ const queue = new Queue_default();
+ queue.enqueue(polygonHierarchy);
+ let split = defined_default(splitPolygons);
+ while (queue.length !== 0) {
+ const outerNode = queue.dequeue();
+ let outerRing = outerNode.positions;
+ const holes = outerNode.holes;
+ let i;
+ let length;
+ if (scaleToEllipsoidSurface) {
+ length = outerRing.length;
+ for (i = 0; i < length; i++) {
+ ellipsoid.scaleToGeodeticSurface(outerRing[i], outerRing[i]);
+ }
+ }
+ if (!keepDuplicates) {
+ outerRing = arrayRemoveDuplicates_default(
+ outerRing,
+ Cartesian3_default.equalsEpsilon,
+ true
+ );
+ }
+ if (outerRing.length < 3) {
+ continue;
+ }
+ let positions2D = projectPointsTo2D(outerRing);
+ if (!defined_default(positions2D)) {
+ continue;
+ }
+ const holeIndices = [];
+ let originalWindingOrder = PolygonPipeline_default.computeWindingOrder2D(
+ positions2D
+ );
+ if (originalWindingOrder === WindingOrder_default.CLOCKWISE) {
+ positions2D.reverse();
+ outerRing = outerRing.slice().reverse();
+ }
+ if (split) {
+ split = false;
+ let polygons2 = [outerRing];
+ polygons2 = splitPolygons(polygons2, polygons2);
+ if (polygons2.length > 1) {
+ for (const positions2 of polygons2) {
+ queue.enqueue(new PolygonHierarchy_default(positions2, holes));
+ }
+ continue;
+ }
+ }
+ let positions = outerRing.slice();
+ const numChildren = defined_default(holes) ? holes.length : 0;
+ const polygonHoles = [];
+ let j;
+ for (i = 0; i < numChildren; i++) {
+ const hole = holes[i];
+ let holePositions = hole.positions;
+ if (scaleToEllipsoidSurface) {
+ length = holePositions.length;
+ for (j = 0; j < length; ++j) {
+ ellipsoid.scaleToGeodeticSurface(holePositions[j], holePositions[j]);
+ }
+ }
+ if (!keepDuplicates) {
+ holePositions = arrayRemoveDuplicates_default(
+ holePositions,
+ Cartesian3_default.equalsEpsilon,
+ true
+ );
+ }
+ if (holePositions.length < 3) {
+ continue;
+ }
+ const holePositions2D = projectPointsTo2D(holePositions);
+ if (!defined_default(holePositions2D)) {
+ continue;
+ }
+ originalWindingOrder = PolygonPipeline_default.computeWindingOrder2D(
+ holePositions2D
+ );
+ if (originalWindingOrder === WindingOrder_default.CLOCKWISE) {
+ holePositions2D.reverse();
+ holePositions = holePositions.slice().reverse();
+ }
+ polygonHoles.push(holePositions);
+ holeIndices.push(positions.length);
+ positions = positions.concat(holePositions);
+ positions2D = positions2D.concat(holePositions2D);
+ let numGrandchildren = 0;
+ if (defined_default(hole.holes)) {
+ numGrandchildren = hole.holes.length;
+ }
+ for (j = 0; j < numGrandchildren; j++) {
+ queue.enqueue(hole.holes[j]);
+ }
+ }
+ hierarchy.push({
+ outerRing,
+ holes: polygonHoles
+ });
+ polygons.push({
+ positions,
+ positions2D,
+ holes: holeIndices
+ });
+ }
+ return {
+ hierarchy,
+ polygons
+ };
+};
+var computeBoundingRectangleCartesian2 = new Cartesian2_default();
+var computeBoundingRectangleCartesian3 = new Cartesian3_default();
+var computeBoundingRectangleQuaternion = new Quaternion_default();
+var computeBoundingRectangleMatrix3 = new Matrix3_default();
+PolygonGeometryLibrary.computeBoundingRectangle = function(planeNormal, projectPointTo2D, positions, angle, result) {
+ const rotation = Quaternion_default.fromAxisAngle(
+ planeNormal,
+ angle,
+ computeBoundingRectangleQuaternion
+ );
+ const textureMatrix = Matrix3_default.fromQuaternion(
+ rotation,
+ computeBoundingRectangleMatrix3
+ );
+ let minX = Number.POSITIVE_INFINITY;
+ let maxX = Number.NEGATIVE_INFINITY;
+ let minY = Number.POSITIVE_INFINITY;
+ let maxY = Number.NEGATIVE_INFINITY;
+ const length = positions.length;
+ for (let i = 0; i < length; ++i) {
+ const p = Cartesian3_default.clone(
+ positions[i],
+ computeBoundingRectangleCartesian3
+ );
+ Matrix3_default.multiplyByVector(textureMatrix, p, p);
+ const st = projectPointTo2D(p, computeBoundingRectangleCartesian2);
+ if (defined_default(st)) {
+ minX = Math.min(minX, st.x);
+ maxX = Math.max(maxX, st.x);
+ minY = Math.min(minY, st.y);
+ maxY = Math.max(maxY, st.y);
+ }
+ }
+ result.x = minX;
+ result.y = minY;
+ result.width = maxX - minX;
+ result.height = maxY - minY;
+ return result;
+};
+PolygonGeometryLibrary.createGeometryFromPositions = function(ellipsoid, polygon, textureCoordinates, granularity, perPositionHeight, vertexFormat, arcType) {
+ let indices = PolygonPipeline_default.triangulate(polygon.positions2D, polygon.holes);
+ if (indices.length < 3) {
+ indices = [0, 1, 2];
+ }
+ const positions = polygon.positions;
+ const hasTexcoords = defined_default(textureCoordinates);
+ const texcoords = hasTexcoords ? textureCoordinates.positions : void 0;
+ if (perPositionHeight) {
+ const length = positions.length;
+ const flattenedPositions = new Array(length * 3);
+ let index = 0;
+ for (let i = 0; i < length; i++) {
+ const p = positions[i];
+ flattenedPositions[index++] = p.x;
+ flattenedPositions[index++] = p.y;
+ flattenedPositions[index++] = p.z;
+ }
+ const geometryOptions = {
+ attributes: {
+ position: new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: flattenedPositions
+ })
+ },
+ indices,
+ primitiveType: PrimitiveType_default.TRIANGLES
+ };
+ if (hasTexcoords) {
+ geometryOptions.attributes.st = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 2,
+ values: Cartesian2_default.packArray(texcoords)
+ });
+ }
+ const geometry = new Geometry_default(geometryOptions);
+ if (vertexFormat.normal) {
+ return GeometryPipeline_default.computeNormal(geometry);
+ }
+ return geometry;
+ }
+ if (arcType === ArcType_default.GEODESIC) {
+ return PolygonPipeline_default.computeSubdivision(
+ ellipsoid,
+ positions,
+ indices,
+ texcoords,
+ granularity
+ );
+ } else if (arcType === ArcType_default.RHUMB) {
+ return PolygonPipeline_default.computeRhumbLineSubdivision(
+ ellipsoid,
+ positions,
+ indices,
+ texcoords,
+ granularity
+ );
+ }
+};
+var computeWallTexcoordsSubdivided = [];
+var computeWallIndicesSubdivided = [];
+var p1Scratch = new Cartesian3_default();
+var p2Scratch = new Cartesian3_default();
+PolygonGeometryLibrary.computeWallGeometry = function(positions, textureCoordinates, ellipsoid, granularity, perPositionHeight, arcType) {
+ let edgePositions;
+ let topEdgeLength;
+ let i;
+ let p1;
+ let p2;
+ let t1;
+ let t2;
+ let edgeTexcoords;
+ let topEdgeTexcoordLength;
+ let length = positions.length;
+ let index = 0;
+ let textureIndex = 0;
+ const hasTexcoords = defined_default(textureCoordinates);
+ const texcoords = hasTexcoords ? textureCoordinates.positions : void 0;
+ if (!perPositionHeight) {
+ const minDistance = Math_default.chordLength(
+ granularity,
+ ellipsoid.maximumRadius
+ );
+ let numVertices = 0;
+ if (arcType === ArcType_default.GEODESIC) {
+ for (i = 0; i < length; i++) {
+ numVertices += PolygonGeometryLibrary.subdivideLineCount(
+ positions[i],
+ positions[(i + 1) % length],
+ minDistance
+ );
+ }
+ } else if (arcType === ArcType_default.RHUMB) {
+ for (i = 0; i < length; i++) {
+ numVertices += PolygonGeometryLibrary.subdivideRhumbLineCount(
+ ellipsoid,
+ positions[i],
+ positions[(i + 1) % length],
+ minDistance
+ );
+ }
+ }
+ topEdgeLength = (numVertices + length) * 3;
+ edgePositions = new Array(topEdgeLength * 2);
+ if (hasTexcoords) {
+ topEdgeTexcoordLength = (numVertices + length) * 2;
+ edgeTexcoords = new Array(topEdgeTexcoordLength * 2);
+ }
+ for (i = 0; i < length; i++) {
+ p1 = positions[i];
+ p2 = positions[(i + 1) % length];
+ let tempPositions;
+ let tempTexcoords;
+ if (hasTexcoords) {
+ t1 = texcoords[i];
+ t2 = texcoords[(i + 1) % length];
+ }
+ if (arcType === ArcType_default.GEODESIC) {
+ tempPositions = PolygonGeometryLibrary.subdivideLine(
+ p1,
+ p2,
+ minDistance,
+ computeWallIndicesSubdivided
+ );
+ if (hasTexcoords) {
+ tempTexcoords = PolygonGeometryLibrary.subdivideTexcoordLine(
+ t1,
+ t2,
+ p1,
+ p2,
+ minDistance,
+ computeWallTexcoordsSubdivided
+ );
+ }
+ } else if (arcType === ArcType_default.RHUMB) {
+ tempPositions = PolygonGeometryLibrary.subdivideRhumbLine(
+ ellipsoid,
+ p1,
+ p2,
+ minDistance,
+ computeWallIndicesSubdivided
+ );
+ if (hasTexcoords) {
+ tempTexcoords = PolygonGeometryLibrary.subdivideTexcoordRhumbLine(
+ t1,
+ t2,
+ ellipsoid,
+ p1,
+ p2,
+ minDistance,
+ computeWallTexcoordsSubdivided
+ );
+ }
+ }
+ const tempPositionsLength = tempPositions.length;
+ for (let j = 0; j < tempPositionsLength; ++j, ++index) {
+ edgePositions[index] = tempPositions[j];
+ edgePositions[index + topEdgeLength] = tempPositions[j];
+ }
+ edgePositions[index] = p2.x;
+ edgePositions[index + topEdgeLength] = p2.x;
+ ++index;
+ edgePositions[index] = p2.y;
+ edgePositions[index + topEdgeLength] = p2.y;
+ ++index;
+ edgePositions[index] = p2.z;
+ edgePositions[index + topEdgeLength] = p2.z;
+ ++index;
+ if (hasTexcoords) {
+ const tempTexcoordsLength = tempTexcoords.length;
+ for (let k = 0; k < tempTexcoordsLength; ++k, ++textureIndex) {
+ edgeTexcoords[textureIndex] = tempTexcoords[k];
+ edgeTexcoords[textureIndex + topEdgeTexcoordLength] = tempTexcoords[k];
+ }
+ edgeTexcoords[textureIndex] = t2.x;
+ edgeTexcoords[textureIndex + topEdgeTexcoordLength] = t2.x;
+ ++textureIndex;
+ edgeTexcoords[textureIndex] = t2.y;
+ edgeTexcoords[textureIndex + topEdgeTexcoordLength] = t2.y;
+ ++textureIndex;
+ }
+ }
+ } else {
+ topEdgeLength = length * 3 * 2;
+ edgePositions = new Array(topEdgeLength * 2);
+ if (hasTexcoords) {
+ topEdgeTexcoordLength = length * 2 * 2;
+ edgeTexcoords = new Array(topEdgeTexcoordLength * 2);
+ }
+ for (i = 0; i < length; i++) {
+ p1 = positions[i];
+ p2 = positions[(i + 1) % length];
+ edgePositions[index] = edgePositions[index + topEdgeLength] = p1.x;
+ ++index;
+ edgePositions[index] = edgePositions[index + topEdgeLength] = p1.y;
+ ++index;
+ edgePositions[index] = edgePositions[index + topEdgeLength] = p1.z;
+ ++index;
+ edgePositions[index] = edgePositions[index + topEdgeLength] = p2.x;
+ ++index;
+ edgePositions[index] = edgePositions[index + topEdgeLength] = p2.y;
+ ++index;
+ edgePositions[index] = edgePositions[index + topEdgeLength] = p2.z;
+ ++index;
+ if (hasTexcoords) {
+ t1 = texcoords[i];
+ t2 = texcoords[(i + 1) % length];
+ edgeTexcoords[textureIndex] = edgeTexcoords[textureIndex + topEdgeTexcoordLength] = t1.x;
+ ++textureIndex;
+ edgeTexcoords[textureIndex] = edgeTexcoords[textureIndex + topEdgeTexcoordLength] = t1.y;
+ ++textureIndex;
+ edgeTexcoords[textureIndex] = edgeTexcoords[textureIndex + topEdgeTexcoordLength] = t2.x;
+ ++textureIndex;
+ edgeTexcoords[textureIndex] = edgeTexcoords[textureIndex + topEdgeTexcoordLength] = t2.y;
+ ++textureIndex;
+ }
+ }
+ }
+ length = edgePositions.length;
+ const indices = IndexDatatype_default.createTypedArray(
+ length / 3,
+ length - positions.length * 6
+ );
+ let edgeIndex = 0;
+ length /= 6;
+ for (i = 0; i < length; i++) {
+ const UL = i;
+ const UR = UL + 1;
+ const LL = UL + length;
+ const LR = LL + 1;
+ p1 = Cartesian3_default.fromArray(edgePositions, UL * 3, p1Scratch);
+ p2 = Cartesian3_default.fromArray(edgePositions, UR * 3, p2Scratch);
+ if (Cartesian3_default.equalsEpsilon(
+ p1,
+ p2,
+ Math_default.EPSILON10,
+ Math_default.EPSILON10
+ )) {
+ continue;
+ }
+ indices[edgeIndex++] = UL;
+ indices[edgeIndex++] = LL;
+ indices[edgeIndex++] = UR;
+ indices[edgeIndex++] = UR;
+ indices[edgeIndex++] = LL;
+ indices[edgeIndex++] = LR;
+ }
+ const geometryOptions = {
+ attributes: new GeometryAttributes_default({
+ position: new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: edgePositions
+ })
+ }),
+ indices,
+ primitiveType: PrimitiveType_default.TRIANGLES
+ };
+ if (hasTexcoords) {
+ geometryOptions.attributes.st = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 2,
+ values: edgeTexcoords
+ });
+ }
+ const geometry = new Geometry_default(geometryOptions);
+ return geometry;
+};
+var PolygonGeometryLibrary_default = PolygonGeometryLibrary;
+
+export {
+ PolygonGeometryLibrary_default
+};
diff --git a/public/assets/cesium/Workers/chunk-JBSKHTNX.js b/public/assets/cesium/Workers/chunk-JBSKHTNX.js
new file mode 100644
index 0000000000000000000000000000000000000000..29a1fa214a3fc6aa2bb92ed5cc9264ec0e0bb412
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-JBSKHTNX.js
@@ -0,0 +1,138 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/VertexFormat.js
+function VertexFormat(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ this.position = defaultValue_default(options.position, false);
+ this.normal = defaultValue_default(options.normal, false);
+ this.st = defaultValue_default(options.st, false);
+ this.bitangent = defaultValue_default(options.bitangent, false);
+ this.tangent = defaultValue_default(options.tangent, false);
+ this.color = defaultValue_default(options.color, false);
+}
+VertexFormat.POSITION_ONLY = Object.freeze(
+ new VertexFormat({
+ position: true
+ })
+);
+VertexFormat.POSITION_AND_NORMAL = Object.freeze(
+ new VertexFormat({
+ position: true,
+ normal: true
+ })
+);
+VertexFormat.POSITION_NORMAL_AND_ST = Object.freeze(
+ new VertexFormat({
+ position: true,
+ normal: true,
+ st: true
+ })
+);
+VertexFormat.POSITION_AND_ST = Object.freeze(
+ new VertexFormat({
+ position: true,
+ st: true
+ })
+);
+VertexFormat.POSITION_AND_COLOR = Object.freeze(
+ new VertexFormat({
+ position: true,
+ color: true
+ })
+);
+VertexFormat.ALL = Object.freeze(
+ new VertexFormat({
+ position: true,
+ normal: true,
+ st: true,
+ tangent: true,
+ bitangent: true
+ })
+);
+VertexFormat.DEFAULT = VertexFormat.POSITION_NORMAL_AND_ST;
+VertexFormat.packedLength = 6;
+VertexFormat.pack = function(value, array, startingIndex) {
+ if (!defined_default(value)) {
+ throw new DeveloperError_default("value is required");
+ }
+ if (!defined_default(array)) {
+ throw new DeveloperError_default("array is required");
+ }
+ startingIndex = defaultValue_default(startingIndex, 0);
+ array[startingIndex++] = value.position ? 1 : 0;
+ array[startingIndex++] = value.normal ? 1 : 0;
+ array[startingIndex++] = value.st ? 1 : 0;
+ array[startingIndex++] = value.tangent ? 1 : 0;
+ array[startingIndex++] = value.bitangent ? 1 : 0;
+ array[startingIndex] = value.color ? 1 : 0;
+ return array;
+};
+VertexFormat.unpack = function(array, startingIndex, result) {
+ if (!defined_default(array)) {
+ throw new DeveloperError_default("array is required");
+ }
+ startingIndex = defaultValue_default(startingIndex, 0);
+ if (!defined_default(result)) {
+ result = new VertexFormat();
+ }
+ result.position = array[startingIndex++] === 1;
+ result.normal = array[startingIndex++] === 1;
+ result.st = array[startingIndex++] === 1;
+ result.tangent = array[startingIndex++] === 1;
+ result.bitangent = array[startingIndex++] === 1;
+ result.color = array[startingIndex] === 1;
+ return result;
+};
+VertexFormat.clone = function(vertexFormat, result) {
+ if (!defined_default(vertexFormat)) {
+ return void 0;
+ }
+ if (!defined_default(result)) {
+ result = new VertexFormat();
+ }
+ result.position = vertexFormat.position;
+ result.normal = vertexFormat.normal;
+ result.st = vertexFormat.st;
+ result.tangent = vertexFormat.tangent;
+ result.bitangent = vertexFormat.bitangent;
+ result.color = vertexFormat.color;
+ return result;
+};
+var VertexFormat_default = VertexFormat;
+
+export {
+ VertexFormat_default
+};
diff --git a/public/assets/cesium/Workers/chunk-JISPSEF3.js b/public/assets/cesium/Workers/chunk-JISPSEF3.js
new file mode 100644
index 0000000000000000000000000000000000000000..f535b561b67ce7cf6ae86af63a2bf88f9104cb8d
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-JISPSEF3.js
@@ -0,0 +1,305 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ Quaternion_default
+} from "./chunk-6SQMLVGV.js";
+import {
+ Cartesian3_default,
+ Matrix3_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+
+// packages/engine/Source/Core/EllipseGeometryLibrary.js
+var EllipseGeometryLibrary = {};
+var rotAxis = new Cartesian3_default();
+var tempVec = new Cartesian3_default();
+var unitQuat = new Quaternion_default();
+var rotMtx = new Matrix3_default();
+function pointOnEllipsoid(theta, rotation, northVec, eastVec, aSqr, ab, bSqr, mag, unitPos, result) {
+ const azimuth = theta + rotation;
+ Cartesian3_default.multiplyByScalar(eastVec, Math.cos(azimuth), rotAxis);
+ Cartesian3_default.multiplyByScalar(northVec, Math.sin(azimuth), tempVec);
+ Cartesian3_default.add(rotAxis, tempVec, rotAxis);
+ let cosThetaSquared = Math.cos(theta);
+ cosThetaSquared = cosThetaSquared * cosThetaSquared;
+ let sinThetaSquared = Math.sin(theta);
+ sinThetaSquared = sinThetaSquared * sinThetaSquared;
+ const radius = ab / Math.sqrt(bSqr * cosThetaSquared + aSqr * sinThetaSquared);
+ const angle = radius / mag;
+ Quaternion_default.fromAxisAngle(rotAxis, angle, unitQuat);
+ Matrix3_default.fromQuaternion(unitQuat, rotMtx);
+ Matrix3_default.multiplyByVector(rotMtx, unitPos, result);
+ Cartesian3_default.normalize(result, result);
+ Cartesian3_default.multiplyByScalar(result, mag, result);
+ return result;
+}
+var scratchCartesian1 = new Cartesian3_default();
+var scratchCartesian2 = new Cartesian3_default();
+var scratchCartesian3 = new Cartesian3_default();
+var scratchNormal = new Cartesian3_default();
+EllipseGeometryLibrary.raisePositionsToHeight = function(positions, options, extrude) {
+ const ellipsoid = options.ellipsoid;
+ const height = options.height;
+ const extrudedHeight = options.extrudedHeight;
+ const size = extrude ? positions.length / 3 * 2 : positions.length / 3;
+ const finalPositions = new Float64Array(size * 3);
+ const length = positions.length;
+ const bottomOffset = extrude ? length : 0;
+ for (let i = 0; i < length; i += 3) {
+ const i1 = i + 1;
+ const i2 = i + 2;
+ const position = Cartesian3_default.fromArray(positions, i, scratchCartesian1);
+ ellipsoid.scaleToGeodeticSurface(position, position);
+ const extrudedPosition = Cartesian3_default.clone(position, scratchCartesian2);
+ const normal = ellipsoid.geodeticSurfaceNormal(position, scratchNormal);
+ const scaledNormal = Cartesian3_default.multiplyByScalar(
+ normal,
+ height,
+ scratchCartesian3
+ );
+ Cartesian3_default.add(position, scaledNormal, position);
+ if (extrude) {
+ Cartesian3_default.multiplyByScalar(normal, extrudedHeight, scaledNormal);
+ Cartesian3_default.add(extrudedPosition, scaledNormal, extrudedPosition);
+ finalPositions[i + bottomOffset] = extrudedPosition.x;
+ finalPositions[i1 + bottomOffset] = extrudedPosition.y;
+ finalPositions[i2 + bottomOffset] = extrudedPosition.z;
+ }
+ finalPositions[i] = position.x;
+ finalPositions[i1] = position.y;
+ finalPositions[i2] = position.z;
+ }
+ return finalPositions;
+};
+var unitPosScratch = new Cartesian3_default();
+var eastVecScratch = new Cartesian3_default();
+var northVecScratch = new Cartesian3_default();
+EllipseGeometryLibrary.computeEllipsePositions = function(options, addFillPositions, addEdgePositions) {
+ const semiMinorAxis = options.semiMinorAxis;
+ const semiMajorAxis = options.semiMajorAxis;
+ const rotation = options.rotation;
+ const center = options.center;
+ const granularity = options.granularity * 8;
+ const aSqr = semiMinorAxis * semiMinorAxis;
+ const bSqr = semiMajorAxis * semiMajorAxis;
+ const ab = semiMajorAxis * semiMinorAxis;
+ const mag = Cartesian3_default.magnitude(center);
+ const unitPos = Cartesian3_default.normalize(center, unitPosScratch);
+ let eastVec = Cartesian3_default.cross(Cartesian3_default.UNIT_Z, center, eastVecScratch);
+ eastVec = Cartesian3_default.normalize(eastVec, eastVec);
+ const northVec = Cartesian3_default.cross(unitPos, eastVec, northVecScratch);
+ let numPts = 1 + Math.ceil(Math_default.PI_OVER_TWO / granularity);
+ const deltaTheta = Math_default.PI_OVER_TWO / (numPts - 1);
+ let theta = Math_default.PI_OVER_TWO - numPts * deltaTheta;
+ if (theta < 0) {
+ numPts -= Math.ceil(Math.abs(theta) / deltaTheta);
+ }
+ const size = 2 * (numPts * (numPts + 2));
+ const positions = addFillPositions ? new Array(size * 3) : void 0;
+ let positionIndex = 0;
+ let position = scratchCartesian1;
+ let reflectedPosition = scratchCartesian2;
+ const outerPositionsLength = numPts * 4 * 3;
+ let outerRightIndex = outerPositionsLength - 1;
+ let outerLeftIndex = 0;
+ const outerPositions = addEdgePositions ? new Array(outerPositionsLength) : void 0;
+ let i;
+ let j;
+ let numInterior;
+ let t;
+ let interiorPosition;
+ theta = Math_default.PI_OVER_TWO;
+ position = pointOnEllipsoid(
+ theta,
+ rotation,
+ northVec,
+ eastVec,
+ aSqr,
+ ab,
+ bSqr,
+ mag,
+ unitPos,
+ position
+ );
+ if (addFillPositions) {
+ positions[positionIndex++] = position.x;
+ positions[positionIndex++] = position.y;
+ positions[positionIndex++] = position.z;
+ }
+ if (addEdgePositions) {
+ outerPositions[outerRightIndex--] = position.z;
+ outerPositions[outerRightIndex--] = position.y;
+ outerPositions[outerRightIndex--] = position.x;
+ }
+ theta = Math_default.PI_OVER_TWO - deltaTheta;
+ for (i = 1; i < numPts + 1; ++i) {
+ position = pointOnEllipsoid(
+ theta,
+ rotation,
+ northVec,
+ eastVec,
+ aSqr,
+ ab,
+ bSqr,
+ mag,
+ unitPos,
+ position
+ );
+ reflectedPosition = pointOnEllipsoid(
+ Math.PI - theta,
+ rotation,
+ northVec,
+ eastVec,
+ aSqr,
+ ab,
+ bSqr,
+ mag,
+ unitPos,
+ reflectedPosition
+ );
+ if (addFillPositions) {
+ positions[positionIndex++] = position.x;
+ positions[positionIndex++] = position.y;
+ positions[positionIndex++] = position.z;
+ numInterior = 2 * i + 2;
+ for (j = 1; j < numInterior - 1; ++j) {
+ t = j / (numInterior - 1);
+ interiorPosition = Cartesian3_default.lerp(
+ position,
+ reflectedPosition,
+ t,
+ scratchCartesian3
+ );
+ positions[positionIndex++] = interiorPosition.x;
+ positions[positionIndex++] = interiorPosition.y;
+ positions[positionIndex++] = interiorPosition.z;
+ }
+ positions[positionIndex++] = reflectedPosition.x;
+ positions[positionIndex++] = reflectedPosition.y;
+ positions[positionIndex++] = reflectedPosition.z;
+ }
+ if (addEdgePositions) {
+ outerPositions[outerRightIndex--] = position.z;
+ outerPositions[outerRightIndex--] = position.y;
+ outerPositions[outerRightIndex--] = position.x;
+ outerPositions[outerLeftIndex++] = reflectedPosition.x;
+ outerPositions[outerLeftIndex++] = reflectedPosition.y;
+ outerPositions[outerLeftIndex++] = reflectedPosition.z;
+ }
+ theta = Math_default.PI_OVER_TWO - (i + 1) * deltaTheta;
+ }
+ for (i = numPts; i > 1; --i) {
+ theta = Math_default.PI_OVER_TWO - (i - 1) * deltaTheta;
+ position = pointOnEllipsoid(
+ -theta,
+ rotation,
+ northVec,
+ eastVec,
+ aSqr,
+ ab,
+ bSqr,
+ mag,
+ unitPos,
+ position
+ );
+ reflectedPosition = pointOnEllipsoid(
+ theta + Math.PI,
+ rotation,
+ northVec,
+ eastVec,
+ aSqr,
+ ab,
+ bSqr,
+ mag,
+ unitPos,
+ reflectedPosition
+ );
+ if (addFillPositions) {
+ positions[positionIndex++] = position.x;
+ positions[positionIndex++] = position.y;
+ positions[positionIndex++] = position.z;
+ numInterior = 2 * (i - 1) + 2;
+ for (j = 1; j < numInterior - 1; ++j) {
+ t = j / (numInterior - 1);
+ interiorPosition = Cartesian3_default.lerp(
+ position,
+ reflectedPosition,
+ t,
+ scratchCartesian3
+ );
+ positions[positionIndex++] = interiorPosition.x;
+ positions[positionIndex++] = interiorPosition.y;
+ positions[positionIndex++] = interiorPosition.z;
+ }
+ positions[positionIndex++] = reflectedPosition.x;
+ positions[positionIndex++] = reflectedPosition.y;
+ positions[positionIndex++] = reflectedPosition.z;
+ }
+ if (addEdgePositions) {
+ outerPositions[outerRightIndex--] = position.z;
+ outerPositions[outerRightIndex--] = position.y;
+ outerPositions[outerRightIndex--] = position.x;
+ outerPositions[outerLeftIndex++] = reflectedPosition.x;
+ outerPositions[outerLeftIndex++] = reflectedPosition.y;
+ outerPositions[outerLeftIndex++] = reflectedPosition.z;
+ }
+ }
+ theta = Math_default.PI_OVER_TWO;
+ position = pointOnEllipsoid(
+ -theta,
+ rotation,
+ northVec,
+ eastVec,
+ aSqr,
+ ab,
+ bSqr,
+ mag,
+ unitPos,
+ position
+ );
+ const r = {};
+ if (addFillPositions) {
+ positions[positionIndex++] = position.x;
+ positions[positionIndex++] = position.y;
+ positions[positionIndex++] = position.z;
+ r.positions = positions;
+ r.numPts = numPts;
+ }
+ if (addEdgePositions) {
+ outerPositions[outerRightIndex--] = position.z;
+ outerPositions[outerRightIndex--] = position.y;
+ outerPositions[outerRightIndex--] = position.x;
+ r.outerPositions = outerPositions;
+ }
+ return r;
+};
+var EllipseGeometryLibrary_default = EllipseGeometryLibrary;
+
+export {
+ EllipseGeometryLibrary_default
+};
diff --git a/public/assets/cesium/Workers/chunk-JSQJDZI4.js b/public/assets/cesium/Workers/chunk-JSQJDZI4.js
new file mode 100644
index 0000000000000000000000000000000000000000..66505754bc0334bf43bdb5dcdd22e3316f54bfc2
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-JSQJDZI4.js
@@ -0,0 +1,456 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ Cartesian3_default,
+ Cartographic_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default,
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/EllipsoidRhumbLine.js
+function calculateM(ellipticity, major, latitude) {
+ if (ellipticity === 0) {
+ return major * latitude;
+ }
+ const e2 = ellipticity * ellipticity;
+ const e4 = e2 * e2;
+ const e6 = e4 * e2;
+ const e8 = e6 * e2;
+ const e10 = e8 * e2;
+ const e12 = e10 * e2;
+ const phi = latitude;
+ const sin2Phi = Math.sin(2 * phi);
+ const sin4Phi = Math.sin(4 * phi);
+ const sin6Phi = Math.sin(6 * phi);
+ const sin8Phi = Math.sin(8 * phi);
+ const sin10Phi = Math.sin(10 * phi);
+ const sin12Phi = Math.sin(12 * phi);
+ return major * ((1 - e2 / 4 - 3 * e4 / 64 - 5 * e6 / 256 - 175 * e8 / 16384 - 441 * e10 / 65536 - 4851 * e12 / 1048576) * phi - (3 * e2 / 8 + 3 * e4 / 32 + 45 * e6 / 1024 + 105 * e8 / 4096 + 2205 * e10 / 131072 + 6237 * e12 / 524288) * sin2Phi + (15 * e4 / 256 + 45 * e6 / 1024 + 525 * e8 / 16384 + 1575 * e10 / 65536 + 155925 * e12 / 8388608) * sin4Phi - (35 * e6 / 3072 + 175 * e8 / 12288 + 3675 * e10 / 262144 + 13475 * e12 / 1048576) * sin6Phi + (315 * e8 / 131072 + 2205 * e10 / 524288 + 43659 * e12 / 8388608) * sin8Phi - (693 * e10 / 1310720 + 6237 * e12 / 5242880) * sin10Phi + 1001 * e12 / 8388608 * sin12Phi);
+}
+function calculateInverseM(M, ellipticity, major) {
+ const d = M / major;
+ if (ellipticity === 0) {
+ return d;
+ }
+ const d2 = d * d;
+ const d3 = d2 * d;
+ const d4 = d3 * d;
+ const e = ellipticity;
+ const e2 = e * e;
+ const e4 = e2 * e2;
+ const e6 = e4 * e2;
+ const e8 = e6 * e2;
+ const e10 = e8 * e2;
+ const e12 = e10 * e2;
+ const sin2D = Math.sin(2 * d);
+ const cos2D = Math.cos(2 * d);
+ const sin4D = Math.sin(4 * d);
+ const cos4D = Math.cos(4 * d);
+ const sin6D = Math.sin(6 * d);
+ const cos6D = Math.cos(6 * d);
+ const sin8D = Math.sin(8 * d);
+ const cos8D = Math.cos(8 * d);
+ const sin10D = Math.sin(10 * d);
+ const cos10D = Math.cos(10 * d);
+ const sin12D = Math.sin(12 * d);
+ return d + d * e2 / 4 + 7 * d * e4 / 64 + 15 * d * e6 / 256 + 579 * d * e8 / 16384 + 1515 * d * e10 / 65536 + 16837 * d * e12 / 1048576 + (3 * d * e4 / 16 + 45 * d * e6 / 256 - d * (32 * d2 - 561) * e8 / 4096 - d * (232 * d2 - 1677) * e10 / 16384 + d * (399985 - 90560 * d2 + 512 * d4) * e12 / 5242880) * cos2D + (21 * d * e6 / 256 + 483 * d * e8 / 4096 - d * (224 * d2 - 1969) * e10 / 16384 - d * (33152 * d2 - 112599) * e12 / 1048576) * cos4D + (151 * d * e8 / 4096 + 4681 * d * e10 / 65536 + 1479 * d * e12 / 16384 - 453 * d3 * e12 / 32768) * cos6D + (1097 * d * e10 / 65536 + 42783 * d * e12 / 1048576) * cos8D + 8011 * d * e12 / 1048576 * cos10D + (3 * e2 / 8 + 3 * e4 / 16 + 213 * e6 / 2048 - 3 * d2 * e6 / 64 + 255 * e8 / 4096 - 33 * d2 * e8 / 512 + 20861 * e10 / 524288 - 33 * d2 * e10 / 512 + d4 * e10 / 1024 + 28273 * e12 / 1048576 - 471 * d2 * e12 / 8192 + 9 * d4 * e12 / 4096) * sin2D + (21 * e4 / 256 + 21 * e6 / 256 + 533 * e8 / 8192 - 21 * d2 * e8 / 512 + 197 * e10 / 4096 - 315 * d2 * e10 / 4096 + 584039 * e12 / 16777216 - 12517 * d2 * e12 / 131072 + 7 * d4 * e12 / 2048) * sin4D + (151 * e6 / 6144 + 151 * e8 / 4096 + 5019 * e10 / 131072 - 453 * d2 * e10 / 16384 + 26965 * e12 / 786432 - 8607 * d2 * e12 / 131072) * sin6D + (1097 * e8 / 131072 + 1097 * e10 / 65536 + 225797 * e12 / 10485760 - 1097 * d2 * e12 / 65536) * sin8D + (8011 * e10 / 2621440 + 8011 * e12 / 1048576) * sin10D + 293393 * e12 / 251658240 * sin12D;
+}
+function calculateSigma(ellipticity, latitude) {
+ if (ellipticity === 0) {
+ return Math.log(Math.tan(0.5 * (Math_default.PI_OVER_TWO + latitude)));
+ }
+ const eSinL = ellipticity * Math.sin(latitude);
+ return Math.log(Math.tan(0.5 * (Math_default.PI_OVER_TWO + latitude))) - ellipticity / 2 * Math.log((1 + eSinL) / (1 - eSinL));
+}
+function calculateHeading(ellipsoidRhumbLine, firstLongitude, firstLatitude, secondLongitude, secondLatitude) {
+ const sigma1 = calculateSigma(ellipsoidRhumbLine._ellipticity, firstLatitude);
+ const sigma2 = calculateSigma(
+ ellipsoidRhumbLine._ellipticity,
+ secondLatitude
+ );
+ return Math.atan2(
+ Math_default.negativePiToPi(secondLongitude - firstLongitude),
+ sigma2 - sigma1
+ );
+}
+function calculateArcLength(ellipsoidRhumbLine, major, minor, firstLongitude, firstLatitude, secondLongitude, secondLatitude) {
+ const heading = ellipsoidRhumbLine._heading;
+ const deltaLongitude = secondLongitude - firstLongitude;
+ let distance = 0;
+ if (Math_default.equalsEpsilon(
+ Math.abs(heading),
+ Math_default.PI_OVER_TWO,
+ Math_default.EPSILON8
+ )) {
+ if (major === minor) {
+ distance = major * Math.cos(firstLatitude) * Math_default.negativePiToPi(deltaLongitude);
+ } else {
+ const sinPhi = Math.sin(firstLatitude);
+ distance = major * Math.cos(firstLatitude) * Math_default.negativePiToPi(deltaLongitude) / Math.sqrt(1 - ellipsoidRhumbLine._ellipticitySquared * sinPhi * sinPhi);
+ }
+ } else {
+ const M1 = calculateM(
+ ellipsoidRhumbLine._ellipticity,
+ major,
+ firstLatitude
+ );
+ const M2 = calculateM(
+ ellipsoidRhumbLine._ellipticity,
+ major,
+ secondLatitude
+ );
+ distance = (M2 - M1) / Math.cos(heading);
+ }
+ return Math.abs(distance);
+}
+var scratchCart1 = new Cartesian3_default();
+var scratchCart2 = new Cartesian3_default();
+function computeProperties(ellipsoidRhumbLine, start, end, ellipsoid) {
+ const firstCartesian = Cartesian3_default.normalize(
+ ellipsoid.cartographicToCartesian(start, scratchCart2),
+ scratchCart1
+ );
+ const lastCartesian = Cartesian3_default.normalize(
+ ellipsoid.cartographicToCartesian(end, scratchCart2),
+ scratchCart2
+ );
+ Check_default.typeOf.number.greaterThanOrEquals(
+ "value",
+ Math.abs(
+ Math.abs(Cartesian3_default.angleBetween(firstCartesian, lastCartesian)) - Math.PI
+ ),
+ 0.0125
+ );
+ const major = ellipsoid.maximumRadius;
+ const minor = ellipsoid.minimumRadius;
+ const majorSquared = major * major;
+ const minorSquared = minor * minor;
+ ellipsoidRhumbLine._ellipticitySquared = (majorSquared - minorSquared) / majorSquared;
+ ellipsoidRhumbLine._ellipticity = Math.sqrt(
+ ellipsoidRhumbLine._ellipticitySquared
+ );
+ ellipsoidRhumbLine._start = Cartographic_default.clone(
+ start,
+ ellipsoidRhumbLine._start
+ );
+ ellipsoidRhumbLine._start.height = 0;
+ ellipsoidRhumbLine._end = Cartographic_default.clone(end, ellipsoidRhumbLine._end);
+ ellipsoidRhumbLine._end.height = 0;
+ ellipsoidRhumbLine._heading = calculateHeading(
+ ellipsoidRhumbLine,
+ start.longitude,
+ start.latitude,
+ end.longitude,
+ end.latitude
+ );
+ ellipsoidRhumbLine._distance = calculateArcLength(
+ ellipsoidRhumbLine,
+ ellipsoid.maximumRadius,
+ ellipsoid.minimumRadius,
+ start.longitude,
+ start.latitude,
+ end.longitude,
+ end.latitude
+ );
+}
+function interpolateUsingSurfaceDistance(start, heading, distance, major, ellipticity, result) {
+ if (distance === 0) {
+ return Cartographic_default.clone(start, result);
+ }
+ const ellipticitySquared = ellipticity * ellipticity;
+ let longitude;
+ let latitude;
+ let deltaLongitude;
+ if (Math.abs(Math_default.PI_OVER_TWO - Math.abs(heading)) > Math_default.EPSILON8) {
+ const M1 = calculateM(ellipticity, major, start.latitude);
+ const deltaM = distance * Math.cos(heading);
+ const M2 = M1 + deltaM;
+ latitude = calculateInverseM(M2, ellipticity, major);
+ if (Math.abs(heading) < Math_default.EPSILON10) {
+ longitude = Math_default.negativePiToPi(start.longitude);
+ } else {
+ const sigma1 = calculateSigma(ellipticity, start.latitude);
+ const sigma2 = calculateSigma(ellipticity, latitude);
+ deltaLongitude = Math.tan(heading) * (sigma2 - sigma1);
+ longitude = Math_default.negativePiToPi(start.longitude + deltaLongitude);
+ }
+ } else {
+ latitude = start.latitude;
+ let localRad;
+ if (ellipticity === 0) {
+ localRad = major * Math.cos(start.latitude);
+ } else {
+ const sinPhi = Math.sin(start.latitude);
+ localRad = major * Math.cos(start.latitude) / Math.sqrt(1 - ellipticitySquared * sinPhi * sinPhi);
+ }
+ deltaLongitude = distance / localRad;
+ if (heading > 0) {
+ longitude = Math_default.negativePiToPi(start.longitude + deltaLongitude);
+ } else {
+ longitude = Math_default.negativePiToPi(start.longitude - deltaLongitude);
+ }
+ }
+ if (defined_default(result)) {
+ result.longitude = longitude;
+ result.latitude = latitude;
+ result.height = 0;
+ return result;
+ }
+ return new Cartographic_default(longitude, latitude, 0);
+}
+function EllipsoidRhumbLine(start, end, ellipsoid) {
+ const e = defaultValue_default(ellipsoid, Ellipsoid_default.default);
+ this._ellipsoid = e;
+ this._start = new Cartographic_default();
+ this._end = new Cartographic_default();
+ this._heading = void 0;
+ this._distance = void 0;
+ this._ellipticity = void 0;
+ this._ellipticitySquared = void 0;
+ if (defined_default(start) && defined_default(end)) {
+ computeProperties(this, start, end, e);
+ }
+}
+Object.defineProperties(EllipsoidRhumbLine.prototype, {
+ /**
+ * Gets the ellipsoid.
+ * @memberof EllipsoidRhumbLine.prototype
+ * @type {Ellipsoid}
+ * @readonly
+ */
+ ellipsoid: {
+ get: function() {
+ return this._ellipsoid;
+ }
+ },
+ /**
+ * Gets the surface distance between the start and end point
+ * @memberof EllipsoidRhumbLine.prototype
+ * @type {number}
+ * @readonly
+ */
+ surfaceDistance: {
+ get: function() {
+ Check_default.defined("distance", this._distance);
+ return this._distance;
+ }
+ },
+ /**
+ * Gets the initial planetodetic point on the path.
+ * @memberof EllipsoidRhumbLine.prototype
+ * @type {Cartographic}
+ * @readonly
+ */
+ start: {
+ get: function() {
+ return this._start;
+ }
+ },
+ /**
+ * Gets the final planetodetic point on the path.
+ * @memberof EllipsoidRhumbLine.prototype
+ * @type {Cartographic}
+ * @readonly
+ */
+ end: {
+ get: function() {
+ return this._end;
+ }
+ },
+ /**
+ * Gets the heading from the start point to the end point.
+ * @memberof EllipsoidRhumbLine.prototype
+ * @type {number}
+ * @readonly
+ */
+ heading: {
+ get: function() {
+ Check_default.defined("distance", this._distance);
+ return this._heading;
+ }
+ }
+});
+EllipsoidRhumbLine.fromStartHeadingDistance = function(start, heading, distance, ellipsoid, result) {
+ Check_default.defined("start", start);
+ Check_default.defined("heading", heading);
+ Check_default.defined("distance", distance);
+ Check_default.typeOf.number.greaterThan("distance", distance, 0);
+ const e = defaultValue_default(ellipsoid, Ellipsoid_default.default);
+ const major = e.maximumRadius;
+ const minor = e.minimumRadius;
+ const majorSquared = major * major;
+ const minorSquared = minor * minor;
+ const ellipticity = Math.sqrt((majorSquared - minorSquared) / majorSquared);
+ heading = Math_default.negativePiToPi(heading);
+ const end = interpolateUsingSurfaceDistance(
+ start,
+ heading,
+ distance,
+ e.maximumRadius,
+ ellipticity
+ );
+ if (!defined_default(result) || defined_default(ellipsoid) && !ellipsoid.equals(result.ellipsoid)) {
+ return new EllipsoidRhumbLine(start, end, e);
+ }
+ result.setEndPoints(start, end);
+ return result;
+};
+EllipsoidRhumbLine.prototype.setEndPoints = function(start, end) {
+ Check_default.defined("start", start);
+ Check_default.defined("end", end);
+ computeProperties(this, start, end, this._ellipsoid);
+};
+EllipsoidRhumbLine.prototype.interpolateUsingFraction = function(fraction, result) {
+ return this.interpolateUsingSurfaceDistance(
+ fraction * this._distance,
+ result
+ );
+};
+EllipsoidRhumbLine.prototype.interpolateUsingSurfaceDistance = function(distance, result) {
+ Check_default.typeOf.number("distance", distance);
+ if (!defined_default(this._distance) || this._distance === 0) {
+ throw new DeveloperError_default(
+ "EllipsoidRhumbLine must have distinct start and end set."
+ );
+ }
+ return interpolateUsingSurfaceDistance(
+ this._start,
+ this._heading,
+ distance,
+ this._ellipsoid.maximumRadius,
+ this._ellipticity,
+ result
+ );
+};
+EllipsoidRhumbLine.prototype.findIntersectionWithLongitude = function(intersectionLongitude, result) {
+ Check_default.typeOf.number("intersectionLongitude", intersectionLongitude);
+ if (!defined_default(this._distance) || this._distance === 0) {
+ throw new DeveloperError_default(
+ "EllipsoidRhumbLine must have distinct start and end set."
+ );
+ }
+ const ellipticity = this._ellipticity;
+ const heading = this._heading;
+ const absHeading = Math.abs(heading);
+ const start = this._start;
+ intersectionLongitude = Math_default.negativePiToPi(intersectionLongitude);
+ if (Math_default.equalsEpsilon(
+ Math.abs(intersectionLongitude),
+ Math.PI,
+ Math_default.EPSILON14
+ )) {
+ intersectionLongitude = Math_default.sign(start.longitude) * Math.PI;
+ }
+ if (!defined_default(result)) {
+ result = new Cartographic_default();
+ }
+ if (Math.abs(Math_default.PI_OVER_TWO - absHeading) <= Math_default.EPSILON8) {
+ result.longitude = intersectionLongitude;
+ result.latitude = start.latitude;
+ result.height = 0;
+ return result;
+ } else if (Math_default.equalsEpsilon(
+ Math.abs(Math_default.PI_OVER_TWO - absHeading),
+ Math_default.PI_OVER_TWO,
+ Math_default.EPSILON8
+ )) {
+ if (Math_default.equalsEpsilon(
+ intersectionLongitude,
+ start.longitude,
+ Math_default.EPSILON12
+ )) {
+ return void 0;
+ }
+ result.longitude = intersectionLongitude;
+ result.latitude = Math_default.PI_OVER_TWO * Math_default.sign(Math_default.PI_OVER_TWO - heading);
+ result.height = 0;
+ return result;
+ }
+ const phi1 = start.latitude;
+ const eSinPhi1 = ellipticity * Math.sin(phi1);
+ const leftComponent = Math.tan(0.5 * (Math_default.PI_OVER_TWO + phi1)) * Math.exp((intersectionLongitude - start.longitude) / Math.tan(heading));
+ const denominator = (1 + eSinPhi1) / (1 - eSinPhi1);
+ let newPhi = start.latitude;
+ let phi;
+ do {
+ phi = newPhi;
+ const eSinPhi = ellipticity * Math.sin(phi);
+ const numerator = (1 + eSinPhi) / (1 - eSinPhi);
+ newPhi = 2 * Math.atan(
+ leftComponent * Math.pow(numerator / denominator, ellipticity / 2)
+ ) - Math_default.PI_OVER_TWO;
+ } while (!Math_default.equalsEpsilon(newPhi, phi, Math_default.EPSILON12));
+ result.longitude = intersectionLongitude;
+ result.latitude = newPhi;
+ result.height = 0;
+ return result;
+};
+EllipsoidRhumbLine.prototype.findIntersectionWithLatitude = function(intersectionLatitude, result) {
+ Check_default.typeOf.number("intersectionLatitude", intersectionLatitude);
+ if (!defined_default(this._distance) || this._distance === 0) {
+ throw new DeveloperError_default(
+ "EllipsoidRhumbLine must have distinct start and end set."
+ );
+ }
+ const ellipticity = this._ellipticity;
+ const heading = this._heading;
+ const start = this._start;
+ if (Math_default.equalsEpsilon(
+ Math.abs(heading),
+ Math_default.PI_OVER_TWO,
+ Math_default.EPSILON8
+ )) {
+ return;
+ }
+ const sigma1 = calculateSigma(ellipticity, start.latitude);
+ const sigma2 = calculateSigma(ellipticity, intersectionLatitude);
+ const deltaLongitude = Math.tan(heading) * (sigma2 - sigma1);
+ const longitude = Math_default.negativePiToPi(start.longitude + deltaLongitude);
+ if (defined_default(result)) {
+ result.longitude = longitude;
+ result.latitude = intersectionLatitude;
+ result.height = 0;
+ return result;
+ }
+ return new Cartographic_default(longitude, intersectionLatitude, 0);
+};
+var EllipsoidRhumbLine_default = EllipsoidRhumbLine;
+
+export {
+ EllipsoidRhumbLine_default
+};
diff --git a/public/assets/cesium/Workers/chunk-JXVLNVXC.js b/public/assets/cesium/Workers/chunk-JXVLNVXC.js
new file mode 100644
index 0000000000000000000000000000000000000000..28863d18f58fd318ee0c805f3ccb7d4b0eed3626
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-JXVLNVXC.js
@@ -0,0 +1,300 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ Matrix2_default,
+ Matrix4_default,
+ Quaternion_default,
+ Rectangle_default,
+ Transforms_default
+} from "./chunk-6SQMLVGV.js";
+import {
+ Cartesian2_default,
+ Cartesian3_default,
+ Cartographic_default,
+ Matrix3_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ WebGLConstants_default
+} from "./chunk-3HQMMUPU.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default,
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/GeometryType.js
+var GeometryType = {
+ NONE: 0,
+ TRIANGLES: 1,
+ LINES: 2,
+ POLYLINES: 3
+};
+var GeometryType_default = Object.freeze(GeometryType);
+
+// packages/engine/Source/Core/PrimitiveType.js
+var PrimitiveType = {
+ /**
+ * Points primitive where each vertex (or index) is a separate point.
+ *
+ * @type {number}
+ * @constant
+ */
+ POINTS: WebGLConstants_default.POINTS,
+ /**
+ * Lines primitive where each two vertices (or indices) is a line segment. Line segments are not necessarily connected.
+ *
+ * @type {number}
+ * @constant
+ */
+ LINES: WebGLConstants_default.LINES,
+ /**
+ * Line loop primitive where each vertex (or index) after the first connects a line to
+ * the previous vertex, and the last vertex implicitly connects to the first.
+ *
+ * @type {number}
+ * @constant
+ */
+ LINE_LOOP: WebGLConstants_default.LINE_LOOP,
+ /**
+ * Line strip primitive where each vertex (or index) after the first connects a line to the previous vertex.
+ *
+ * @type {number}
+ * @constant
+ */
+ LINE_STRIP: WebGLConstants_default.LINE_STRIP,
+ /**
+ * Triangles primitive where each three vertices (or indices) is a triangle. Triangles do not necessarily share edges.
+ *
+ * @type {number}
+ * @constant
+ */
+ TRIANGLES: WebGLConstants_default.TRIANGLES,
+ /**
+ * Triangle strip primitive where each vertex (or index) after the first two connect to
+ * the previous two vertices forming a triangle. For example, this can be used to model a wall.
+ *
+ * @type {number}
+ * @constant
+ */
+ TRIANGLE_STRIP: WebGLConstants_default.TRIANGLE_STRIP,
+ /**
+ * Triangle fan primitive where each vertex (or index) after the first two connect to
+ * the previous vertex and the first vertex forming a triangle. For example, this can be used
+ * to model a cone or circle.
+ *
+ * @type {number}
+ * @constant
+ */
+ TRIANGLE_FAN: WebGLConstants_default.TRIANGLE_FAN
+};
+PrimitiveType.isLines = function(primitiveType) {
+ return primitiveType === PrimitiveType.LINES || primitiveType === PrimitiveType.LINE_LOOP || primitiveType === PrimitiveType.LINE_STRIP;
+};
+PrimitiveType.isTriangles = function(primitiveType) {
+ return primitiveType === PrimitiveType.TRIANGLES || primitiveType === PrimitiveType.TRIANGLE_STRIP || primitiveType === PrimitiveType.TRIANGLE_FAN;
+};
+PrimitiveType.validate = function(primitiveType) {
+ return primitiveType === PrimitiveType.POINTS || primitiveType === PrimitiveType.LINES || primitiveType === PrimitiveType.LINE_LOOP || primitiveType === PrimitiveType.LINE_STRIP || primitiveType === PrimitiveType.TRIANGLES || primitiveType === PrimitiveType.TRIANGLE_STRIP || primitiveType === PrimitiveType.TRIANGLE_FAN;
+};
+var PrimitiveType_default = Object.freeze(PrimitiveType);
+
+// packages/engine/Source/Core/Geometry.js
+function Geometry(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ Check_default.typeOf.object("options.attributes", options.attributes);
+ this.attributes = options.attributes;
+ this.indices = options.indices;
+ this.primitiveType = defaultValue_default(
+ options.primitiveType,
+ PrimitiveType_default.TRIANGLES
+ );
+ this.boundingSphere = options.boundingSphere;
+ this.geometryType = defaultValue_default(options.geometryType, GeometryType_default.NONE);
+ this.boundingSphereCV = options.boundingSphereCV;
+ this.offsetAttribute = options.offsetAttribute;
+}
+Geometry.computeNumberOfVertices = function(geometry) {
+ Check_default.typeOf.object("geometry", geometry);
+ let numberOfVertices = -1;
+ for (const property in geometry.attributes) {
+ if (geometry.attributes.hasOwnProperty(property) && defined_default(geometry.attributes[property]) && defined_default(geometry.attributes[property].values)) {
+ const attribute = geometry.attributes[property];
+ const num = attribute.values.length / attribute.componentsPerAttribute;
+ if (numberOfVertices !== num && numberOfVertices !== -1) {
+ throw new DeveloperError_default(
+ "All attribute lists must have the same number of attributes."
+ );
+ }
+ numberOfVertices = num;
+ }
+ }
+ return numberOfVertices;
+};
+var rectangleCenterScratch = new Cartographic_default();
+var enuCenterScratch = new Cartesian3_default();
+var fixedFrameToEnuScratch = new Matrix4_default();
+var boundingRectanglePointsCartographicScratch = [
+ new Cartographic_default(),
+ new Cartographic_default(),
+ new Cartographic_default()
+];
+var boundingRectanglePointsEnuScratch = [
+ new Cartesian2_default(),
+ new Cartesian2_default(),
+ new Cartesian2_default()
+];
+var points2DScratch = [new Cartesian2_default(), new Cartesian2_default(), new Cartesian2_default()];
+var pointEnuScratch = new Cartesian3_default();
+var enuRotationScratch = new Quaternion_default();
+var enuRotationMatrixScratch = new Matrix4_default();
+var rotation2DScratch = new Matrix2_default();
+Geometry._textureCoordinateRotationPoints = function(positions, stRotation, ellipsoid, boundingRectangle) {
+ let i;
+ const rectangleCenter = Rectangle_default.center(
+ boundingRectangle,
+ rectangleCenterScratch
+ );
+ const enuCenter = Cartographic_default.toCartesian(
+ rectangleCenter,
+ ellipsoid,
+ enuCenterScratch
+ );
+ const enuToFixedFrame = Transforms_default.eastNorthUpToFixedFrame(
+ enuCenter,
+ ellipsoid,
+ fixedFrameToEnuScratch
+ );
+ const fixedFrameToEnu = Matrix4_default.inverse(
+ enuToFixedFrame,
+ fixedFrameToEnuScratch
+ );
+ const boundingPointsEnu = boundingRectanglePointsEnuScratch;
+ const boundingPointsCarto = boundingRectanglePointsCartographicScratch;
+ boundingPointsCarto[0].longitude = boundingRectangle.west;
+ boundingPointsCarto[0].latitude = boundingRectangle.south;
+ boundingPointsCarto[1].longitude = boundingRectangle.west;
+ boundingPointsCarto[1].latitude = boundingRectangle.north;
+ boundingPointsCarto[2].longitude = boundingRectangle.east;
+ boundingPointsCarto[2].latitude = boundingRectangle.south;
+ let posEnu = pointEnuScratch;
+ for (i = 0; i < 3; i++) {
+ Cartographic_default.toCartesian(boundingPointsCarto[i], ellipsoid, posEnu);
+ posEnu = Matrix4_default.multiplyByPointAsVector(fixedFrameToEnu, posEnu, posEnu);
+ boundingPointsEnu[i].x = posEnu.x;
+ boundingPointsEnu[i].y = posEnu.y;
+ }
+ const rotation = Quaternion_default.fromAxisAngle(
+ Cartesian3_default.UNIT_Z,
+ -stRotation,
+ enuRotationScratch
+ );
+ const textureMatrix = Matrix3_default.fromQuaternion(
+ rotation,
+ enuRotationMatrixScratch
+ );
+ const positionsLength = positions.length;
+ let enuMinX = Number.POSITIVE_INFINITY;
+ let enuMinY = Number.POSITIVE_INFINITY;
+ let enuMaxX = Number.NEGATIVE_INFINITY;
+ let enuMaxY = Number.NEGATIVE_INFINITY;
+ for (i = 0; i < positionsLength; i++) {
+ posEnu = Matrix4_default.multiplyByPointAsVector(
+ fixedFrameToEnu,
+ positions[i],
+ posEnu
+ );
+ posEnu = Matrix3_default.multiplyByVector(textureMatrix, posEnu, posEnu);
+ enuMinX = Math.min(enuMinX, posEnu.x);
+ enuMinY = Math.min(enuMinY, posEnu.y);
+ enuMaxX = Math.max(enuMaxX, posEnu.x);
+ enuMaxY = Math.max(enuMaxY, posEnu.y);
+ }
+ const toDesiredInComputed = Matrix2_default.fromRotation(
+ stRotation,
+ rotation2DScratch
+ );
+ const points2D = points2DScratch;
+ points2D[0].x = enuMinX;
+ points2D[0].y = enuMinY;
+ points2D[1].x = enuMinX;
+ points2D[1].y = enuMaxY;
+ points2D[2].x = enuMaxX;
+ points2D[2].y = enuMinY;
+ const boundingEnuMin = boundingPointsEnu[0];
+ const boundingPointsWidth = boundingPointsEnu[2].x - boundingEnuMin.x;
+ const boundingPointsHeight = boundingPointsEnu[1].y - boundingEnuMin.y;
+ for (i = 0; i < 3; i++) {
+ const point2D = points2D[i];
+ Matrix2_default.multiplyByVector(toDesiredInComputed, point2D, point2D);
+ point2D.x = (point2D.x - boundingEnuMin.x) / boundingPointsWidth;
+ point2D.y = (point2D.y - boundingEnuMin.y) / boundingPointsHeight;
+ }
+ const minXYCorner = points2D[0];
+ const maxYCorner = points2D[1];
+ const maxXCorner = points2D[2];
+ const result = new Array(6);
+ Cartesian2_default.pack(minXYCorner, result);
+ Cartesian2_default.pack(maxYCorner, result, 2);
+ Cartesian2_default.pack(maxXCorner, result, 4);
+ return result;
+};
+var Geometry_default = Geometry;
+
+// packages/engine/Source/Core/GeometryAttribute.js
+function GeometryAttribute(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ if (!defined_default(options.componentDatatype)) {
+ throw new DeveloperError_default("options.componentDatatype is required.");
+ }
+ if (!defined_default(options.componentsPerAttribute)) {
+ throw new DeveloperError_default("options.componentsPerAttribute is required.");
+ }
+ if (options.componentsPerAttribute < 1 || options.componentsPerAttribute > 4) {
+ throw new DeveloperError_default(
+ "options.componentsPerAttribute must be between 1 and 4."
+ );
+ }
+ if (!defined_default(options.values)) {
+ throw new DeveloperError_default("options.values is required.");
+ }
+ this.componentDatatype = options.componentDatatype;
+ this.componentsPerAttribute = options.componentsPerAttribute;
+ this.normalize = defaultValue_default(options.normalize, false);
+ this.values = options.values;
+}
+var GeometryAttribute_default = GeometryAttribute;
+
+export {
+ GeometryType_default,
+ PrimitiveType_default,
+ Geometry_default,
+ GeometryAttribute_default
+};
diff --git a/public/assets/cesium/Workers/chunk-KHZNBFOH.js b/public/assets/cesium/Workers/chunk-KHZNBFOH.js
new file mode 100644
index 0000000000000000000000000000000000000000..f69c2792a2b7f3944fdd27d942dd7db661cf7cde
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-KHZNBFOH.js
@@ -0,0 +1,963 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ Matrix4_default,
+ Rectangle_default
+} from "./chunk-6SQMLVGV.js";
+import {
+ Cartesian3_default,
+ Cartographic_default,
+ Ellipsoid_default,
+ Matrix3_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default,
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/GeographicProjection.js
+function GeographicProjection(ellipsoid) {
+ this._ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.default);
+ this._semimajorAxis = this._ellipsoid.maximumRadius;
+ this._oneOverSemimajorAxis = 1 / this._semimajorAxis;
+}
+Object.defineProperties(GeographicProjection.prototype, {
+ /**
+ * Gets the {@link Ellipsoid}.
+ *
+ * @memberof GeographicProjection.prototype
+ *
+ * @type {Ellipsoid}
+ * @readonly
+ */
+ ellipsoid: {
+ get: function() {
+ return this._ellipsoid;
+ }
+ }
+});
+GeographicProjection.prototype.project = function(cartographic, result) {
+ const semimajorAxis = this._semimajorAxis;
+ const x = cartographic.longitude * semimajorAxis;
+ const y = cartographic.latitude * semimajorAxis;
+ const z = cartographic.height;
+ if (!defined_default(result)) {
+ return new Cartesian3_default(x, y, z);
+ }
+ result.x = x;
+ result.y = y;
+ result.z = z;
+ return result;
+};
+GeographicProjection.prototype.unproject = function(cartesian, result) {
+ if (!defined_default(cartesian)) {
+ throw new DeveloperError_default("cartesian is required");
+ }
+ const oneOverEarthSemimajorAxis = this._oneOverSemimajorAxis;
+ const longitude = cartesian.x * oneOverEarthSemimajorAxis;
+ const latitude = cartesian.y * oneOverEarthSemimajorAxis;
+ const height = cartesian.z;
+ if (!defined_default(result)) {
+ return new Cartographic_default(longitude, latitude, height);
+ }
+ result.longitude = longitude;
+ result.latitude = latitude;
+ result.height = height;
+ return result;
+};
+var GeographicProjection_default = GeographicProjection;
+
+// packages/engine/Source/Core/Intersect.js
+var Intersect = {
+ /**
+ * Represents that an object is not contained within the frustum.
+ *
+ * @type {number}
+ * @constant
+ */
+ OUTSIDE: -1,
+ /**
+ * Represents that an object intersects one of the frustum's planes.
+ *
+ * @type {number}
+ * @constant
+ */
+ INTERSECTING: 0,
+ /**
+ * Represents that an object is fully within the frustum.
+ *
+ * @type {number}
+ * @constant
+ */
+ INSIDE: 1
+};
+var Intersect_default = Object.freeze(Intersect);
+
+// packages/engine/Source/Core/Interval.js
+function Interval(start, stop) {
+ this.start = defaultValue_default(start, 0);
+ this.stop = defaultValue_default(stop, 0);
+}
+var Interval_default = Interval;
+
+// packages/engine/Source/Core/BoundingSphere.js
+function BoundingSphere(center, radius) {
+ this.center = Cartesian3_default.clone(defaultValue_default(center, Cartesian3_default.ZERO));
+ this.radius = defaultValue_default(radius, 0);
+}
+var fromPointsXMin = new Cartesian3_default();
+var fromPointsYMin = new Cartesian3_default();
+var fromPointsZMin = new Cartesian3_default();
+var fromPointsXMax = new Cartesian3_default();
+var fromPointsYMax = new Cartesian3_default();
+var fromPointsZMax = new Cartesian3_default();
+var fromPointsCurrentPos = new Cartesian3_default();
+var fromPointsScratch = new Cartesian3_default();
+var fromPointsRitterCenter = new Cartesian3_default();
+var fromPointsMinBoxPt = new Cartesian3_default();
+var fromPointsMaxBoxPt = new Cartesian3_default();
+var fromPointsNaiveCenterScratch = new Cartesian3_default();
+var volumeConstant = 4 / 3 * Math_default.PI;
+BoundingSphere.fromPoints = function(positions, result) {
+ if (!defined_default(result)) {
+ result = new BoundingSphere();
+ }
+ if (!defined_default(positions) || positions.length === 0) {
+ result.center = Cartesian3_default.clone(Cartesian3_default.ZERO, result.center);
+ result.radius = 0;
+ return result;
+ }
+ const currentPos = Cartesian3_default.clone(positions[0], fromPointsCurrentPos);
+ const xMin = Cartesian3_default.clone(currentPos, fromPointsXMin);
+ const yMin = Cartesian3_default.clone(currentPos, fromPointsYMin);
+ const zMin = Cartesian3_default.clone(currentPos, fromPointsZMin);
+ const xMax = Cartesian3_default.clone(currentPos, fromPointsXMax);
+ const yMax = Cartesian3_default.clone(currentPos, fromPointsYMax);
+ const zMax = Cartesian3_default.clone(currentPos, fromPointsZMax);
+ const numPositions = positions.length;
+ let i;
+ for (i = 1; i < numPositions; i++) {
+ Cartesian3_default.clone(positions[i], currentPos);
+ const x = currentPos.x;
+ const y = currentPos.y;
+ const z = currentPos.z;
+ if (x < xMin.x) {
+ Cartesian3_default.clone(currentPos, xMin);
+ }
+ if (x > xMax.x) {
+ Cartesian3_default.clone(currentPos, xMax);
+ }
+ if (y < yMin.y) {
+ Cartesian3_default.clone(currentPos, yMin);
+ }
+ if (y > yMax.y) {
+ Cartesian3_default.clone(currentPos, yMax);
+ }
+ if (z < zMin.z) {
+ Cartesian3_default.clone(currentPos, zMin);
+ }
+ if (z > zMax.z) {
+ Cartesian3_default.clone(currentPos, zMax);
+ }
+ }
+ const xSpan = Cartesian3_default.magnitudeSquared(
+ Cartesian3_default.subtract(xMax, xMin, fromPointsScratch)
+ );
+ const ySpan = Cartesian3_default.magnitudeSquared(
+ Cartesian3_default.subtract(yMax, yMin, fromPointsScratch)
+ );
+ const zSpan = Cartesian3_default.magnitudeSquared(
+ Cartesian3_default.subtract(zMax, zMin, fromPointsScratch)
+ );
+ let diameter1 = xMin;
+ let diameter2 = xMax;
+ let maxSpan = xSpan;
+ if (ySpan > maxSpan) {
+ maxSpan = ySpan;
+ diameter1 = yMin;
+ diameter2 = yMax;
+ }
+ if (zSpan > maxSpan) {
+ maxSpan = zSpan;
+ diameter1 = zMin;
+ diameter2 = zMax;
+ }
+ const ritterCenter = fromPointsRitterCenter;
+ ritterCenter.x = (diameter1.x + diameter2.x) * 0.5;
+ ritterCenter.y = (diameter1.y + diameter2.y) * 0.5;
+ ritterCenter.z = (diameter1.z + diameter2.z) * 0.5;
+ let radiusSquared = Cartesian3_default.magnitudeSquared(
+ Cartesian3_default.subtract(diameter2, ritterCenter, fromPointsScratch)
+ );
+ let ritterRadius = Math.sqrt(radiusSquared);
+ const minBoxPt = fromPointsMinBoxPt;
+ minBoxPt.x = xMin.x;
+ minBoxPt.y = yMin.y;
+ minBoxPt.z = zMin.z;
+ const maxBoxPt = fromPointsMaxBoxPt;
+ maxBoxPt.x = xMax.x;
+ maxBoxPt.y = yMax.y;
+ maxBoxPt.z = zMax.z;
+ const naiveCenter = Cartesian3_default.midpoint(
+ minBoxPt,
+ maxBoxPt,
+ fromPointsNaiveCenterScratch
+ );
+ let naiveRadius = 0;
+ for (i = 0; i < numPositions; i++) {
+ Cartesian3_default.clone(positions[i], currentPos);
+ const r = Cartesian3_default.magnitude(
+ Cartesian3_default.subtract(currentPos, naiveCenter, fromPointsScratch)
+ );
+ if (r > naiveRadius) {
+ naiveRadius = r;
+ }
+ const oldCenterToPointSquared = Cartesian3_default.magnitudeSquared(
+ Cartesian3_default.subtract(currentPos, ritterCenter, fromPointsScratch)
+ );
+ if (oldCenterToPointSquared > radiusSquared) {
+ const oldCenterToPoint = Math.sqrt(oldCenterToPointSquared);
+ ritterRadius = (ritterRadius + oldCenterToPoint) * 0.5;
+ radiusSquared = ritterRadius * ritterRadius;
+ const oldToNew = oldCenterToPoint - ritterRadius;
+ ritterCenter.x = (ritterRadius * ritterCenter.x + oldToNew * currentPos.x) / oldCenterToPoint;
+ ritterCenter.y = (ritterRadius * ritterCenter.y + oldToNew * currentPos.y) / oldCenterToPoint;
+ ritterCenter.z = (ritterRadius * ritterCenter.z + oldToNew * currentPos.z) / oldCenterToPoint;
+ }
+ }
+ if (ritterRadius < naiveRadius) {
+ Cartesian3_default.clone(ritterCenter, result.center);
+ result.radius = ritterRadius;
+ } else {
+ Cartesian3_default.clone(naiveCenter, result.center);
+ result.radius = naiveRadius;
+ }
+ return result;
+};
+var defaultProjection = new GeographicProjection_default();
+var fromRectangle2DLowerLeft = new Cartesian3_default();
+var fromRectangle2DUpperRight = new Cartesian3_default();
+var fromRectangle2DSouthwest = new Cartographic_default();
+var fromRectangle2DNortheast = new Cartographic_default();
+BoundingSphere.fromRectangle2D = function(rectangle, projection, result) {
+ return BoundingSphere.fromRectangleWithHeights2D(
+ rectangle,
+ projection,
+ 0,
+ 0,
+ result
+ );
+};
+BoundingSphere.fromRectangleWithHeights2D = function(rectangle, projection, minimumHeight, maximumHeight, result) {
+ if (!defined_default(result)) {
+ result = new BoundingSphere();
+ }
+ if (!defined_default(rectangle)) {
+ result.center = Cartesian3_default.clone(Cartesian3_default.ZERO, result.center);
+ result.radius = 0;
+ return result;
+ }
+ defaultProjection._ellipsoid = Ellipsoid_default.default;
+ projection = defaultValue_default(projection, defaultProjection);
+ Rectangle_default.southwest(rectangle, fromRectangle2DSouthwest);
+ fromRectangle2DSouthwest.height = minimumHeight;
+ Rectangle_default.northeast(rectangle, fromRectangle2DNortheast);
+ fromRectangle2DNortheast.height = maximumHeight;
+ const lowerLeft = projection.project(
+ fromRectangle2DSouthwest,
+ fromRectangle2DLowerLeft
+ );
+ const upperRight = projection.project(
+ fromRectangle2DNortheast,
+ fromRectangle2DUpperRight
+ );
+ const width = upperRight.x - lowerLeft.x;
+ const height = upperRight.y - lowerLeft.y;
+ const elevation = upperRight.z - lowerLeft.z;
+ result.radius = Math.sqrt(width * width + height * height + elevation * elevation) * 0.5;
+ const center = result.center;
+ center.x = lowerLeft.x + width * 0.5;
+ center.y = lowerLeft.y + height * 0.5;
+ center.z = lowerLeft.z + elevation * 0.5;
+ return result;
+};
+var fromRectangle3DScratch = [];
+BoundingSphere.fromRectangle3D = function(rectangle, ellipsoid, surfaceHeight, result) {
+ ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.default);
+ surfaceHeight = defaultValue_default(surfaceHeight, 0);
+ if (!defined_default(result)) {
+ result = new BoundingSphere();
+ }
+ if (!defined_default(rectangle)) {
+ result.center = Cartesian3_default.clone(Cartesian3_default.ZERO, result.center);
+ result.radius = 0;
+ return result;
+ }
+ const positions = Rectangle_default.subsample(
+ rectangle,
+ ellipsoid,
+ surfaceHeight,
+ fromRectangle3DScratch
+ );
+ return BoundingSphere.fromPoints(positions, result);
+};
+BoundingSphere.fromVertices = function(positions, center, stride, result) {
+ if (!defined_default(result)) {
+ result = new BoundingSphere();
+ }
+ if (!defined_default(positions) || positions.length === 0) {
+ result.center = Cartesian3_default.clone(Cartesian3_default.ZERO, result.center);
+ result.radius = 0;
+ return result;
+ }
+ center = defaultValue_default(center, Cartesian3_default.ZERO);
+ stride = defaultValue_default(stride, 3);
+ Check_default.typeOf.number.greaterThanOrEquals("stride", stride, 3);
+ const currentPos = fromPointsCurrentPos;
+ currentPos.x = positions[0] + center.x;
+ currentPos.y = positions[1] + center.y;
+ currentPos.z = positions[2] + center.z;
+ const xMin = Cartesian3_default.clone(currentPos, fromPointsXMin);
+ const yMin = Cartesian3_default.clone(currentPos, fromPointsYMin);
+ const zMin = Cartesian3_default.clone(currentPos, fromPointsZMin);
+ const xMax = Cartesian3_default.clone(currentPos, fromPointsXMax);
+ const yMax = Cartesian3_default.clone(currentPos, fromPointsYMax);
+ const zMax = Cartesian3_default.clone(currentPos, fromPointsZMax);
+ const numElements = positions.length;
+ let i;
+ for (i = 0; i < numElements; i += stride) {
+ const x = positions[i] + center.x;
+ const y = positions[i + 1] + center.y;
+ const z = positions[i + 2] + center.z;
+ currentPos.x = x;
+ currentPos.y = y;
+ currentPos.z = z;
+ if (x < xMin.x) {
+ Cartesian3_default.clone(currentPos, xMin);
+ }
+ if (x > xMax.x) {
+ Cartesian3_default.clone(currentPos, xMax);
+ }
+ if (y < yMin.y) {
+ Cartesian3_default.clone(currentPos, yMin);
+ }
+ if (y > yMax.y) {
+ Cartesian3_default.clone(currentPos, yMax);
+ }
+ if (z < zMin.z) {
+ Cartesian3_default.clone(currentPos, zMin);
+ }
+ if (z > zMax.z) {
+ Cartesian3_default.clone(currentPos, zMax);
+ }
+ }
+ const xSpan = Cartesian3_default.magnitudeSquared(
+ Cartesian3_default.subtract(xMax, xMin, fromPointsScratch)
+ );
+ const ySpan = Cartesian3_default.magnitudeSquared(
+ Cartesian3_default.subtract(yMax, yMin, fromPointsScratch)
+ );
+ const zSpan = Cartesian3_default.magnitudeSquared(
+ Cartesian3_default.subtract(zMax, zMin, fromPointsScratch)
+ );
+ let diameter1 = xMin;
+ let diameter2 = xMax;
+ let maxSpan = xSpan;
+ if (ySpan > maxSpan) {
+ maxSpan = ySpan;
+ diameter1 = yMin;
+ diameter2 = yMax;
+ }
+ if (zSpan > maxSpan) {
+ maxSpan = zSpan;
+ diameter1 = zMin;
+ diameter2 = zMax;
+ }
+ const ritterCenter = fromPointsRitterCenter;
+ ritterCenter.x = (diameter1.x + diameter2.x) * 0.5;
+ ritterCenter.y = (diameter1.y + diameter2.y) * 0.5;
+ ritterCenter.z = (diameter1.z + diameter2.z) * 0.5;
+ let radiusSquared = Cartesian3_default.magnitudeSquared(
+ Cartesian3_default.subtract(diameter2, ritterCenter, fromPointsScratch)
+ );
+ let ritterRadius = Math.sqrt(radiusSquared);
+ const minBoxPt = fromPointsMinBoxPt;
+ minBoxPt.x = xMin.x;
+ minBoxPt.y = yMin.y;
+ minBoxPt.z = zMin.z;
+ const maxBoxPt = fromPointsMaxBoxPt;
+ maxBoxPt.x = xMax.x;
+ maxBoxPt.y = yMax.y;
+ maxBoxPt.z = zMax.z;
+ const naiveCenter = Cartesian3_default.midpoint(
+ minBoxPt,
+ maxBoxPt,
+ fromPointsNaiveCenterScratch
+ );
+ let naiveRadius = 0;
+ for (i = 0; i < numElements; i += stride) {
+ currentPos.x = positions[i] + center.x;
+ currentPos.y = positions[i + 1] + center.y;
+ currentPos.z = positions[i + 2] + center.z;
+ const r = Cartesian3_default.magnitude(
+ Cartesian3_default.subtract(currentPos, naiveCenter, fromPointsScratch)
+ );
+ if (r > naiveRadius) {
+ naiveRadius = r;
+ }
+ const oldCenterToPointSquared = Cartesian3_default.magnitudeSquared(
+ Cartesian3_default.subtract(currentPos, ritterCenter, fromPointsScratch)
+ );
+ if (oldCenterToPointSquared > radiusSquared) {
+ const oldCenterToPoint = Math.sqrt(oldCenterToPointSquared);
+ ritterRadius = (ritterRadius + oldCenterToPoint) * 0.5;
+ radiusSquared = ritterRadius * ritterRadius;
+ const oldToNew = oldCenterToPoint - ritterRadius;
+ ritterCenter.x = (ritterRadius * ritterCenter.x + oldToNew * currentPos.x) / oldCenterToPoint;
+ ritterCenter.y = (ritterRadius * ritterCenter.y + oldToNew * currentPos.y) / oldCenterToPoint;
+ ritterCenter.z = (ritterRadius * ritterCenter.z + oldToNew * currentPos.z) / oldCenterToPoint;
+ }
+ }
+ if (ritterRadius < naiveRadius) {
+ Cartesian3_default.clone(ritterCenter, result.center);
+ result.radius = ritterRadius;
+ } else {
+ Cartesian3_default.clone(naiveCenter, result.center);
+ result.radius = naiveRadius;
+ }
+ return result;
+};
+BoundingSphere.fromEncodedCartesianVertices = function(positionsHigh, positionsLow, result) {
+ if (!defined_default(result)) {
+ result = new BoundingSphere();
+ }
+ if (!defined_default(positionsHigh) || !defined_default(positionsLow) || positionsHigh.length !== positionsLow.length || positionsHigh.length === 0) {
+ result.center = Cartesian3_default.clone(Cartesian3_default.ZERO, result.center);
+ result.radius = 0;
+ return result;
+ }
+ const currentPos = fromPointsCurrentPos;
+ currentPos.x = positionsHigh[0] + positionsLow[0];
+ currentPos.y = positionsHigh[1] + positionsLow[1];
+ currentPos.z = positionsHigh[2] + positionsLow[2];
+ const xMin = Cartesian3_default.clone(currentPos, fromPointsXMin);
+ const yMin = Cartesian3_default.clone(currentPos, fromPointsYMin);
+ const zMin = Cartesian3_default.clone(currentPos, fromPointsZMin);
+ const xMax = Cartesian3_default.clone(currentPos, fromPointsXMax);
+ const yMax = Cartesian3_default.clone(currentPos, fromPointsYMax);
+ const zMax = Cartesian3_default.clone(currentPos, fromPointsZMax);
+ const numElements = positionsHigh.length;
+ let i;
+ for (i = 0; i < numElements; i += 3) {
+ const x = positionsHigh[i] + positionsLow[i];
+ const y = positionsHigh[i + 1] + positionsLow[i + 1];
+ const z = positionsHigh[i + 2] + positionsLow[i + 2];
+ currentPos.x = x;
+ currentPos.y = y;
+ currentPos.z = z;
+ if (x < xMin.x) {
+ Cartesian3_default.clone(currentPos, xMin);
+ }
+ if (x > xMax.x) {
+ Cartesian3_default.clone(currentPos, xMax);
+ }
+ if (y < yMin.y) {
+ Cartesian3_default.clone(currentPos, yMin);
+ }
+ if (y > yMax.y) {
+ Cartesian3_default.clone(currentPos, yMax);
+ }
+ if (z < zMin.z) {
+ Cartesian3_default.clone(currentPos, zMin);
+ }
+ if (z > zMax.z) {
+ Cartesian3_default.clone(currentPos, zMax);
+ }
+ }
+ const xSpan = Cartesian3_default.magnitudeSquared(
+ Cartesian3_default.subtract(xMax, xMin, fromPointsScratch)
+ );
+ const ySpan = Cartesian3_default.magnitudeSquared(
+ Cartesian3_default.subtract(yMax, yMin, fromPointsScratch)
+ );
+ const zSpan = Cartesian3_default.magnitudeSquared(
+ Cartesian3_default.subtract(zMax, zMin, fromPointsScratch)
+ );
+ let diameter1 = xMin;
+ let diameter2 = xMax;
+ let maxSpan = xSpan;
+ if (ySpan > maxSpan) {
+ maxSpan = ySpan;
+ diameter1 = yMin;
+ diameter2 = yMax;
+ }
+ if (zSpan > maxSpan) {
+ maxSpan = zSpan;
+ diameter1 = zMin;
+ diameter2 = zMax;
+ }
+ const ritterCenter = fromPointsRitterCenter;
+ ritterCenter.x = (diameter1.x + diameter2.x) * 0.5;
+ ritterCenter.y = (diameter1.y + diameter2.y) * 0.5;
+ ritterCenter.z = (diameter1.z + diameter2.z) * 0.5;
+ let radiusSquared = Cartesian3_default.magnitudeSquared(
+ Cartesian3_default.subtract(diameter2, ritterCenter, fromPointsScratch)
+ );
+ let ritterRadius = Math.sqrt(radiusSquared);
+ const minBoxPt = fromPointsMinBoxPt;
+ minBoxPt.x = xMin.x;
+ minBoxPt.y = yMin.y;
+ minBoxPt.z = zMin.z;
+ const maxBoxPt = fromPointsMaxBoxPt;
+ maxBoxPt.x = xMax.x;
+ maxBoxPt.y = yMax.y;
+ maxBoxPt.z = zMax.z;
+ const naiveCenter = Cartesian3_default.midpoint(
+ minBoxPt,
+ maxBoxPt,
+ fromPointsNaiveCenterScratch
+ );
+ let naiveRadius = 0;
+ for (i = 0; i < numElements; i += 3) {
+ currentPos.x = positionsHigh[i] + positionsLow[i];
+ currentPos.y = positionsHigh[i + 1] + positionsLow[i + 1];
+ currentPos.z = positionsHigh[i + 2] + positionsLow[i + 2];
+ const r = Cartesian3_default.magnitude(
+ Cartesian3_default.subtract(currentPos, naiveCenter, fromPointsScratch)
+ );
+ if (r > naiveRadius) {
+ naiveRadius = r;
+ }
+ const oldCenterToPointSquared = Cartesian3_default.magnitudeSquared(
+ Cartesian3_default.subtract(currentPos, ritterCenter, fromPointsScratch)
+ );
+ if (oldCenterToPointSquared > radiusSquared) {
+ const oldCenterToPoint = Math.sqrt(oldCenterToPointSquared);
+ ritterRadius = (ritterRadius + oldCenterToPoint) * 0.5;
+ radiusSquared = ritterRadius * ritterRadius;
+ const oldToNew = oldCenterToPoint - ritterRadius;
+ ritterCenter.x = (ritterRadius * ritterCenter.x + oldToNew * currentPos.x) / oldCenterToPoint;
+ ritterCenter.y = (ritterRadius * ritterCenter.y + oldToNew * currentPos.y) / oldCenterToPoint;
+ ritterCenter.z = (ritterRadius * ritterCenter.z + oldToNew * currentPos.z) / oldCenterToPoint;
+ }
+ }
+ if (ritterRadius < naiveRadius) {
+ Cartesian3_default.clone(ritterCenter, result.center);
+ result.radius = ritterRadius;
+ } else {
+ Cartesian3_default.clone(naiveCenter, result.center);
+ result.radius = naiveRadius;
+ }
+ return result;
+};
+BoundingSphere.fromCornerPoints = function(corner, oppositeCorner, result) {
+ Check_default.typeOf.object("corner", corner);
+ Check_default.typeOf.object("oppositeCorner", oppositeCorner);
+ if (!defined_default(result)) {
+ result = new BoundingSphere();
+ }
+ const center = Cartesian3_default.midpoint(corner, oppositeCorner, result.center);
+ result.radius = Cartesian3_default.distance(center, oppositeCorner);
+ return result;
+};
+BoundingSphere.fromEllipsoid = function(ellipsoid, result) {
+ Check_default.typeOf.object("ellipsoid", ellipsoid);
+ if (!defined_default(result)) {
+ result = new BoundingSphere();
+ }
+ Cartesian3_default.clone(Cartesian3_default.ZERO, result.center);
+ result.radius = ellipsoid.maximumRadius;
+ return result;
+};
+var fromBoundingSpheresScratch = new Cartesian3_default();
+BoundingSphere.fromBoundingSpheres = function(boundingSpheres, result) {
+ if (!defined_default(result)) {
+ result = new BoundingSphere();
+ }
+ if (!defined_default(boundingSpheres) || boundingSpheres.length === 0) {
+ result.center = Cartesian3_default.clone(Cartesian3_default.ZERO, result.center);
+ result.radius = 0;
+ return result;
+ }
+ const length = boundingSpheres.length;
+ if (length === 1) {
+ return BoundingSphere.clone(boundingSpheres[0], result);
+ }
+ if (length === 2) {
+ return BoundingSphere.union(boundingSpheres[0], boundingSpheres[1], result);
+ }
+ const positions = [];
+ let i;
+ for (i = 0; i < length; i++) {
+ positions.push(boundingSpheres[i].center);
+ }
+ result = BoundingSphere.fromPoints(positions, result);
+ const center = result.center;
+ let radius = result.radius;
+ for (i = 0; i < length; i++) {
+ const tmp = boundingSpheres[i];
+ radius = Math.max(
+ radius,
+ Cartesian3_default.distance(center, tmp.center, fromBoundingSpheresScratch) + tmp.radius
+ );
+ }
+ result.radius = radius;
+ return result;
+};
+var fromOrientedBoundingBoxScratchU = new Cartesian3_default();
+var fromOrientedBoundingBoxScratchV = new Cartesian3_default();
+var fromOrientedBoundingBoxScratchW = new Cartesian3_default();
+BoundingSphere.fromOrientedBoundingBox = function(orientedBoundingBox, result) {
+ Check_default.defined("orientedBoundingBox", orientedBoundingBox);
+ if (!defined_default(result)) {
+ result = new BoundingSphere();
+ }
+ const halfAxes = orientedBoundingBox.halfAxes;
+ const u = Matrix3_default.getColumn(halfAxes, 0, fromOrientedBoundingBoxScratchU);
+ const v = Matrix3_default.getColumn(halfAxes, 1, fromOrientedBoundingBoxScratchV);
+ const w = Matrix3_default.getColumn(halfAxes, 2, fromOrientedBoundingBoxScratchW);
+ Cartesian3_default.add(u, v, u);
+ Cartesian3_default.add(u, w, u);
+ result.center = Cartesian3_default.clone(orientedBoundingBox.center, result.center);
+ result.radius = Cartesian3_default.magnitude(u);
+ return result;
+};
+var scratchFromTransformationCenter = new Cartesian3_default();
+var scratchFromTransformationScale = new Cartesian3_default();
+BoundingSphere.fromTransformation = function(transformation, result) {
+ Check_default.typeOf.object("transformation", transformation);
+ if (!defined_default(result)) {
+ result = new BoundingSphere();
+ }
+ const center = Matrix4_default.getTranslation(
+ transformation,
+ scratchFromTransformationCenter
+ );
+ const scale = Matrix4_default.getScale(
+ transformation,
+ scratchFromTransformationScale
+ );
+ const radius = 0.5 * Cartesian3_default.magnitude(scale);
+ result.center = Cartesian3_default.clone(center, result.center);
+ result.radius = radius;
+ return result;
+};
+BoundingSphere.clone = function(sphere, result) {
+ if (!defined_default(sphere)) {
+ return void 0;
+ }
+ if (!defined_default(result)) {
+ return new BoundingSphere(sphere.center, sphere.radius);
+ }
+ result.center = Cartesian3_default.clone(sphere.center, result.center);
+ result.radius = sphere.radius;
+ return result;
+};
+BoundingSphere.packedLength = 4;
+BoundingSphere.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ const center = value.center;
+ array[startingIndex++] = center.x;
+ array[startingIndex++] = center.y;
+ array[startingIndex++] = center.z;
+ array[startingIndex] = value.radius;
+ return array;
+};
+BoundingSphere.unpack = function(array, startingIndex, result) {
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ if (!defined_default(result)) {
+ result = new BoundingSphere();
+ }
+ const center = result.center;
+ center.x = array[startingIndex++];
+ center.y = array[startingIndex++];
+ center.z = array[startingIndex++];
+ result.radius = array[startingIndex];
+ return result;
+};
+var unionScratch = new Cartesian3_default();
+var unionScratchCenter = new Cartesian3_default();
+BoundingSphere.union = function(left, right, result) {
+ Check_default.typeOf.object("left", left);
+ Check_default.typeOf.object("right", right);
+ if (!defined_default(result)) {
+ result = new BoundingSphere();
+ }
+ const leftCenter = left.center;
+ const leftRadius = left.radius;
+ const rightCenter = right.center;
+ const rightRadius = right.radius;
+ const toRightCenter = Cartesian3_default.subtract(
+ rightCenter,
+ leftCenter,
+ unionScratch
+ );
+ const centerSeparation = Cartesian3_default.magnitude(toRightCenter);
+ if (leftRadius >= centerSeparation + rightRadius) {
+ left.clone(result);
+ return result;
+ }
+ if (rightRadius >= centerSeparation + leftRadius) {
+ right.clone(result);
+ return result;
+ }
+ const halfDistanceBetweenTangentPoints = (leftRadius + centerSeparation + rightRadius) * 0.5;
+ const center = Cartesian3_default.multiplyByScalar(
+ toRightCenter,
+ (-leftRadius + halfDistanceBetweenTangentPoints) / centerSeparation,
+ unionScratchCenter
+ );
+ Cartesian3_default.add(center, leftCenter, center);
+ Cartesian3_default.clone(center, result.center);
+ result.radius = halfDistanceBetweenTangentPoints;
+ return result;
+};
+var expandScratch = new Cartesian3_default();
+BoundingSphere.expand = function(sphere, point, result) {
+ Check_default.typeOf.object("sphere", sphere);
+ Check_default.typeOf.object("point", point);
+ result = BoundingSphere.clone(sphere, result);
+ const radius = Cartesian3_default.magnitude(
+ Cartesian3_default.subtract(point, result.center, expandScratch)
+ );
+ if (radius > result.radius) {
+ result.radius = radius;
+ }
+ return result;
+};
+BoundingSphere.intersectPlane = function(sphere, plane) {
+ Check_default.typeOf.object("sphere", sphere);
+ Check_default.typeOf.object("plane", plane);
+ const center = sphere.center;
+ const radius = sphere.radius;
+ const normal = plane.normal;
+ const distanceToPlane = Cartesian3_default.dot(normal, center) + plane.distance;
+ if (distanceToPlane < -radius) {
+ return Intersect_default.OUTSIDE;
+ } else if (distanceToPlane < radius) {
+ return Intersect_default.INTERSECTING;
+ }
+ return Intersect_default.INSIDE;
+};
+BoundingSphere.transform = function(sphere, transform, result) {
+ Check_default.typeOf.object("sphere", sphere);
+ Check_default.typeOf.object("transform", transform);
+ if (!defined_default(result)) {
+ result = new BoundingSphere();
+ }
+ result.center = Matrix4_default.multiplyByPoint(
+ transform,
+ sphere.center,
+ result.center
+ );
+ result.radius = Matrix4_default.getMaximumScale(transform) * sphere.radius;
+ return result;
+};
+var distanceSquaredToScratch = new Cartesian3_default();
+BoundingSphere.distanceSquaredTo = function(sphere, cartesian) {
+ Check_default.typeOf.object("sphere", sphere);
+ Check_default.typeOf.object("cartesian", cartesian);
+ const diff = Cartesian3_default.subtract(
+ sphere.center,
+ cartesian,
+ distanceSquaredToScratch
+ );
+ const distance = Cartesian3_default.magnitude(diff) - sphere.radius;
+ if (distance <= 0) {
+ return 0;
+ }
+ return distance * distance;
+};
+BoundingSphere.transformWithoutScale = function(sphere, transform, result) {
+ Check_default.typeOf.object("sphere", sphere);
+ Check_default.typeOf.object("transform", transform);
+ if (!defined_default(result)) {
+ result = new BoundingSphere();
+ }
+ result.center = Matrix4_default.multiplyByPoint(
+ transform,
+ sphere.center,
+ result.center
+ );
+ result.radius = sphere.radius;
+ return result;
+};
+var scratchCartesian3 = new Cartesian3_default();
+BoundingSphere.computePlaneDistances = function(sphere, position, direction, result) {
+ Check_default.typeOf.object("sphere", sphere);
+ Check_default.typeOf.object("position", position);
+ Check_default.typeOf.object("direction", direction);
+ if (!defined_default(result)) {
+ result = new Interval_default();
+ }
+ const toCenter = Cartesian3_default.subtract(
+ sphere.center,
+ position,
+ scratchCartesian3
+ );
+ const mag = Cartesian3_default.dot(direction, toCenter);
+ result.start = mag - sphere.radius;
+ result.stop = mag + sphere.radius;
+ return result;
+};
+var projectTo2DNormalScratch = new Cartesian3_default();
+var projectTo2DEastScratch = new Cartesian3_default();
+var projectTo2DNorthScratch = new Cartesian3_default();
+var projectTo2DWestScratch = new Cartesian3_default();
+var projectTo2DSouthScratch = new Cartesian3_default();
+var projectTo2DCartographicScratch = new Cartographic_default();
+var projectTo2DPositionsScratch = new Array(8);
+for (let n = 0; n < 8; ++n) {
+ projectTo2DPositionsScratch[n] = new Cartesian3_default();
+}
+var projectTo2DProjection = new GeographicProjection_default();
+BoundingSphere.projectTo2D = function(sphere, projection, result) {
+ Check_default.typeOf.object("sphere", sphere);
+ projectTo2DProjection._ellipsoid = Ellipsoid_default.default;
+ projection = defaultValue_default(projection, projectTo2DProjection);
+ const ellipsoid = projection.ellipsoid;
+ let center = sphere.center;
+ const radius = sphere.radius;
+ let normal;
+ if (Cartesian3_default.equals(center, Cartesian3_default.ZERO)) {
+ normal = Cartesian3_default.clone(Cartesian3_default.UNIT_X, projectTo2DNormalScratch);
+ } else {
+ normal = ellipsoid.geodeticSurfaceNormal(center, projectTo2DNormalScratch);
+ }
+ const east = Cartesian3_default.cross(
+ Cartesian3_default.UNIT_Z,
+ normal,
+ projectTo2DEastScratch
+ );
+ Cartesian3_default.normalize(east, east);
+ const north = Cartesian3_default.cross(normal, east, projectTo2DNorthScratch);
+ Cartesian3_default.normalize(north, north);
+ Cartesian3_default.multiplyByScalar(normal, radius, normal);
+ Cartesian3_default.multiplyByScalar(north, radius, north);
+ Cartesian3_default.multiplyByScalar(east, radius, east);
+ const south = Cartesian3_default.negate(north, projectTo2DSouthScratch);
+ const west = Cartesian3_default.negate(east, projectTo2DWestScratch);
+ const positions = projectTo2DPositionsScratch;
+ let corner = positions[0];
+ Cartesian3_default.add(normal, north, corner);
+ Cartesian3_default.add(corner, east, corner);
+ corner = positions[1];
+ Cartesian3_default.add(normal, north, corner);
+ Cartesian3_default.add(corner, west, corner);
+ corner = positions[2];
+ Cartesian3_default.add(normal, south, corner);
+ Cartesian3_default.add(corner, west, corner);
+ corner = positions[3];
+ Cartesian3_default.add(normal, south, corner);
+ Cartesian3_default.add(corner, east, corner);
+ Cartesian3_default.negate(normal, normal);
+ corner = positions[4];
+ Cartesian3_default.add(normal, north, corner);
+ Cartesian3_default.add(corner, east, corner);
+ corner = positions[5];
+ Cartesian3_default.add(normal, north, corner);
+ Cartesian3_default.add(corner, west, corner);
+ corner = positions[6];
+ Cartesian3_default.add(normal, south, corner);
+ Cartesian3_default.add(corner, west, corner);
+ corner = positions[7];
+ Cartesian3_default.add(normal, south, corner);
+ Cartesian3_default.add(corner, east, corner);
+ const length = positions.length;
+ for (let i = 0; i < length; ++i) {
+ const position = positions[i];
+ Cartesian3_default.add(center, position, position);
+ const cartographic = ellipsoid.cartesianToCartographic(
+ position,
+ projectTo2DCartographicScratch
+ );
+ projection.project(cartographic, position);
+ }
+ result = BoundingSphere.fromPoints(positions, result);
+ center = result.center;
+ const x = center.x;
+ const y = center.y;
+ const z = center.z;
+ center.x = z;
+ center.y = x;
+ center.z = y;
+ return result;
+};
+BoundingSphere.isOccluded = function(sphere, occluder) {
+ Check_default.typeOf.object("sphere", sphere);
+ Check_default.typeOf.object("occluder", occluder);
+ return !occluder.isBoundingSphereVisible(sphere);
+};
+BoundingSphere.equals = function(left, right) {
+ return left === right || defined_default(left) && defined_default(right) && Cartesian3_default.equals(left.center, right.center) && left.radius === right.radius;
+};
+BoundingSphere.prototype.intersectPlane = function(plane) {
+ return BoundingSphere.intersectPlane(this, plane);
+};
+BoundingSphere.prototype.distanceSquaredTo = function(cartesian) {
+ return BoundingSphere.distanceSquaredTo(this, cartesian);
+};
+BoundingSphere.prototype.computePlaneDistances = function(position, direction, result) {
+ return BoundingSphere.computePlaneDistances(
+ this,
+ position,
+ direction,
+ result
+ );
+};
+BoundingSphere.prototype.isOccluded = function(occluder) {
+ return BoundingSphere.isOccluded(this, occluder);
+};
+BoundingSphere.prototype.equals = function(right) {
+ return BoundingSphere.equals(this, right);
+};
+BoundingSphere.prototype.clone = function(result) {
+ return BoundingSphere.clone(this, result);
+};
+BoundingSphere.prototype.volume = function() {
+ const radius = this.radius;
+ return volumeConstant * radius * radius * radius;
+};
+var BoundingSphere_default = BoundingSphere;
+
+export {
+ GeographicProjection_default,
+ Intersect_default,
+ Interval_default,
+ BoundingSphere_default
+};
diff --git a/public/assets/cesium/Workers/chunk-L5GODJAR.js b/public/assets/cesium/Workers/chunk-L5GODJAR.js
new file mode 100644
index 0000000000000000000000000000000000000000..9e58ea950d0a7853695acc9e946f88f50293f7af
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-L5GODJAR.js
@@ -0,0 +1,398 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ CylinderGeometryLibrary_default
+} from "./chunk-O72GZTSE.js";
+import {
+ GeometryOffsetAttribute_default
+} from "./chunk-GBT7MJ6X.js";
+import {
+ VertexFormat_default
+} from "./chunk-JBSKHTNX.js";
+import {
+ IndexDatatype_default
+} from "./chunk-C4WPMOKT.js";
+import {
+ GeometryAttributes_default
+} from "./chunk-X7IQYYHF.js";
+import {
+ GeometryAttribute_default,
+ Geometry_default,
+ PrimitiveType_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ BoundingSphere_default
+} from "./chunk-KHZNBFOH.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian2_default,
+ Cartesian3_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/CylinderGeometry.js
+var radiusScratch = new Cartesian2_default();
+var normalScratch = new Cartesian3_default();
+var bitangentScratch = new Cartesian3_default();
+var tangentScratch = new Cartesian3_default();
+var positionScratch = new Cartesian3_default();
+function CylinderGeometry(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const length = options.length;
+ const topRadius = options.topRadius;
+ const bottomRadius = options.bottomRadius;
+ const vertexFormat = defaultValue_default(options.vertexFormat, VertexFormat_default.DEFAULT);
+ const slices = defaultValue_default(options.slices, 128);
+ if (!defined_default(length)) {
+ throw new DeveloperError_default("options.length must be defined.");
+ }
+ if (!defined_default(topRadius)) {
+ throw new DeveloperError_default("options.topRadius must be defined.");
+ }
+ if (!defined_default(bottomRadius)) {
+ throw new DeveloperError_default("options.bottomRadius must be defined.");
+ }
+ if (slices < 3) {
+ throw new DeveloperError_default(
+ "options.slices must be greater than or equal to 3."
+ );
+ }
+ if (defined_default(options.offsetAttribute) && options.offsetAttribute === GeometryOffsetAttribute_default.TOP) {
+ throw new DeveloperError_default(
+ "GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry."
+ );
+ }
+ this._length = length;
+ this._topRadius = topRadius;
+ this._bottomRadius = bottomRadius;
+ this._vertexFormat = VertexFormat_default.clone(vertexFormat);
+ this._slices = slices;
+ this._offsetAttribute = options.offsetAttribute;
+ this._workerName = "createCylinderGeometry";
+}
+CylinderGeometry.packedLength = VertexFormat_default.packedLength + 5;
+CylinderGeometry.pack = function(value, array, startingIndex) {
+ if (!defined_default(value)) {
+ throw new DeveloperError_default("value is required");
+ }
+ if (!defined_default(array)) {
+ throw new DeveloperError_default("array is required");
+ }
+ startingIndex = defaultValue_default(startingIndex, 0);
+ VertexFormat_default.pack(value._vertexFormat, array, startingIndex);
+ startingIndex += VertexFormat_default.packedLength;
+ array[startingIndex++] = value._length;
+ array[startingIndex++] = value._topRadius;
+ array[startingIndex++] = value._bottomRadius;
+ array[startingIndex++] = value._slices;
+ array[startingIndex] = defaultValue_default(value._offsetAttribute, -1);
+ return array;
+};
+var scratchVertexFormat = new VertexFormat_default();
+var scratchOptions = {
+ vertexFormat: scratchVertexFormat,
+ length: void 0,
+ topRadius: void 0,
+ bottomRadius: void 0,
+ slices: void 0,
+ offsetAttribute: void 0
+};
+CylinderGeometry.unpack = function(array, startingIndex, result) {
+ if (!defined_default(array)) {
+ throw new DeveloperError_default("array is required");
+ }
+ startingIndex = defaultValue_default(startingIndex, 0);
+ const vertexFormat = VertexFormat_default.unpack(
+ array,
+ startingIndex,
+ scratchVertexFormat
+ );
+ startingIndex += VertexFormat_default.packedLength;
+ const length = array[startingIndex++];
+ const topRadius = array[startingIndex++];
+ const bottomRadius = array[startingIndex++];
+ const slices = array[startingIndex++];
+ const offsetAttribute = array[startingIndex];
+ if (!defined_default(result)) {
+ scratchOptions.length = length;
+ scratchOptions.topRadius = topRadius;
+ scratchOptions.bottomRadius = bottomRadius;
+ scratchOptions.slices = slices;
+ scratchOptions.offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
+ return new CylinderGeometry(scratchOptions);
+ }
+ result._vertexFormat = VertexFormat_default.clone(vertexFormat, result._vertexFormat);
+ result._length = length;
+ result._topRadius = topRadius;
+ result._bottomRadius = bottomRadius;
+ result._slices = slices;
+ result._offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
+ return result;
+};
+CylinderGeometry.createGeometry = function(cylinderGeometry) {
+ let length = cylinderGeometry._length;
+ const topRadius = cylinderGeometry._topRadius;
+ const bottomRadius = cylinderGeometry._bottomRadius;
+ const vertexFormat = cylinderGeometry._vertexFormat;
+ const slices = cylinderGeometry._slices;
+ if (length <= 0 || topRadius < 0 || bottomRadius < 0 || topRadius === 0 && bottomRadius === 0) {
+ return;
+ }
+ const twoSlices = slices + slices;
+ const threeSlices = slices + twoSlices;
+ const numVertices = twoSlices + twoSlices;
+ const positions = CylinderGeometryLibrary_default.computePositions(
+ length,
+ topRadius,
+ bottomRadius,
+ slices,
+ true
+ );
+ const st = vertexFormat.st ? new Float32Array(numVertices * 2) : void 0;
+ const normals = vertexFormat.normal ? new Float32Array(numVertices * 3) : void 0;
+ const tangents = vertexFormat.tangent ? new Float32Array(numVertices * 3) : void 0;
+ const bitangents = vertexFormat.bitangent ? new Float32Array(numVertices * 3) : void 0;
+ let i;
+ const computeNormal = vertexFormat.normal || vertexFormat.tangent || vertexFormat.bitangent;
+ if (computeNormal) {
+ const computeTangent = vertexFormat.tangent || vertexFormat.bitangent;
+ let normalIndex = 0;
+ let tangentIndex = 0;
+ let bitangentIndex = 0;
+ const theta = Math.atan2(bottomRadius - topRadius, length);
+ const normal = normalScratch;
+ normal.z = Math.sin(theta);
+ const normalScale = Math.cos(theta);
+ let tangent = tangentScratch;
+ let bitangent = bitangentScratch;
+ for (i = 0; i < slices; i++) {
+ const angle = i / slices * Math_default.TWO_PI;
+ const x = normalScale * Math.cos(angle);
+ const y = normalScale * Math.sin(angle);
+ if (computeNormal) {
+ normal.x = x;
+ normal.y = y;
+ if (computeTangent) {
+ tangent = Cartesian3_default.normalize(
+ Cartesian3_default.cross(Cartesian3_default.UNIT_Z, normal, tangent),
+ tangent
+ );
+ }
+ if (vertexFormat.normal) {
+ normals[normalIndex++] = normal.x;
+ normals[normalIndex++] = normal.y;
+ normals[normalIndex++] = normal.z;
+ normals[normalIndex++] = normal.x;
+ normals[normalIndex++] = normal.y;
+ normals[normalIndex++] = normal.z;
+ }
+ if (vertexFormat.tangent) {
+ tangents[tangentIndex++] = tangent.x;
+ tangents[tangentIndex++] = tangent.y;
+ tangents[tangentIndex++] = tangent.z;
+ tangents[tangentIndex++] = tangent.x;
+ tangents[tangentIndex++] = tangent.y;
+ tangents[tangentIndex++] = tangent.z;
+ }
+ if (vertexFormat.bitangent) {
+ bitangent = Cartesian3_default.normalize(
+ Cartesian3_default.cross(normal, tangent, bitangent),
+ bitangent
+ );
+ bitangents[bitangentIndex++] = bitangent.x;
+ bitangents[bitangentIndex++] = bitangent.y;
+ bitangents[bitangentIndex++] = bitangent.z;
+ bitangents[bitangentIndex++] = bitangent.x;
+ bitangents[bitangentIndex++] = bitangent.y;
+ bitangents[bitangentIndex++] = bitangent.z;
+ }
+ }
+ }
+ for (i = 0; i < slices; i++) {
+ if (vertexFormat.normal) {
+ normals[normalIndex++] = 0;
+ normals[normalIndex++] = 0;
+ normals[normalIndex++] = -1;
+ }
+ if (vertexFormat.tangent) {
+ tangents[tangentIndex++] = 1;
+ tangents[tangentIndex++] = 0;
+ tangents[tangentIndex++] = 0;
+ }
+ if (vertexFormat.bitangent) {
+ bitangents[bitangentIndex++] = 0;
+ bitangents[bitangentIndex++] = -1;
+ bitangents[bitangentIndex++] = 0;
+ }
+ }
+ for (i = 0; i < slices; i++) {
+ if (vertexFormat.normal) {
+ normals[normalIndex++] = 0;
+ normals[normalIndex++] = 0;
+ normals[normalIndex++] = 1;
+ }
+ if (vertexFormat.tangent) {
+ tangents[tangentIndex++] = 1;
+ tangents[tangentIndex++] = 0;
+ tangents[tangentIndex++] = 0;
+ }
+ if (vertexFormat.bitangent) {
+ bitangents[bitangentIndex++] = 0;
+ bitangents[bitangentIndex++] = 1;
+ bitangents[bitangentIndex++] = 0;
+ }
+ }
+ }
+ const numIndices = 12 * slices - 12;
+ const indices = IndexDatatype_default.createTypedArray(numVertices, numIndices);
+ let index = 0;
+ let j = 0;
+ for (i = 0; i < slices - 1; i++) {
+ indices[index++] = j;
+ indices[index++] = j + 2;
+ indices[index++] = j + 3;
+ indices[index++] = j;
+ indices[index++] = j + 3;
+ indices[index++] = j + 1;
+ j += 2;
+ }
+ indices[index++] = twoSlices - 2;
+ indices[index++] = 0;
+ indices[index++] = 1;
+ indices[index++] = twoSlices - 2;
+ indices[index++] = 1;
+ indices[index++] = twoSlices - 1;
+ for (i = 1; i < slices - 1; i++) {
+ indices[index++] = twoSlices + i + 1;
+ indices[index++] = twoSlices + i;
+ indices[index++] = twoSlices;
+ }
+ for (i = 1; i < slices - 1; i++) {
+ indices[index++] = threeSlices;
+ indices[index++] = threeSlices + i;
+ indices[index++] = threeSlices + i + 1;
+ }
+ let textureCoordIndex = 0;
+ if (vertexFormat.st) {
+ const rad = Math.max(topRadius, bottomRadius);
+ for (i = 0; i < numVertices; i++) {
+ const position = Cartesian3_default.fromArray(positions, i * 3, positionScratch);
+ st[textureCoordIndex++] = (position.x + rad) / (2 * rad);
+ st[textureCoordIndex++] = (position.y + rad) / (2 * rad);
+ }
+ }
+ const attributes = new GeometryAttributes_default();
+ if (vertexFormat.position) {
+ attributes.position = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: positions
+ });
+ }
+ if (vertexFormat.normal) {
+ attributes.normal = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: normals
+ });
+ }
+ if (vertexFormat.tangent) {
+ attributes.tangent = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: tangents
+ });
+ }
+ if (vertexFormat.bitangent) {
+ attributes.bitangent = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: bitangents
+ });
+ }
+ if (vertexFormat.st) {
+ attributes.st = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 2,
+ values: st
+ });
+ }
+ radiusScratch.x = length * 0.5;
+ radiusScratch.y = Math.max(bottomRadius, topRadius);
+ const boundingSphere = new BoundingSphere_default(
+ Cartesian3_default.ZERO,
+ Cartesian2_default.magnitude(radiusScratch)
+ );
+ if (defined_default(cylinderGeometry._offsetAttribute)) {
+ length = positions.length;
+ const offsetValue = cylinderGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
+ const applyOffset = new Uint8Array(length / 3).fill(offsetValue);
+ attributes.applyOffset = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: applyOffset
+ });
+ }
+ return new Geometry_default({
+ attributes,
+ indices,
+ primitiveType: PrimitiveType_default.TRIANGLES,
+ boundingSphere,
+ offsetAttribute: cylinderGeometry._offsetAttribute
+ });
+};
+var unitCylinderGeometry;
+CylinderGeometry.getUnitCylinder = function() {
+ if (!defined_default(unitCylinderGeometry)) {
+ unitCylinderGeometry = CylinderGeometry.createGeometry(
+ new CylinderGeometry({
+ topRadius: 1,
+ bottomRadius: 1,
+ length: 1,
+ vertexFormat: VertexFormat_default.POSITION_ONLY
+ })
+ );
+ }
+ return unitCylinderGeometry;
+};
+var CylinderGeometry_default = CylinderGeometry;
+
+export {
+ CylinderGeometry_default
+};
diff --git a/public/assets/cesium/Workers/chunk-LJ2JQHJT.js b/public/assets/cesium/Workers/chunk-LJ2JQHJT.js
new file mode 100644
index 0000000000000000000000000000000000000000..cb1d717b658757fc52ce481b50bcf4ff89646ab8
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-LJ2JQHJT.js
@@ -0,0 +1,435 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ Cartesian4_default,
+ Matrix2_default,
+ Matrix4_default
+} from "./chunk-6SQMLVGV.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian2_default,
+ Cartesian3_default,
+ Matrix3_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import {
+ Check_default,
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Scene/AttributeType.js
+var AttributeType = {
+ /**
+ * The attribute is a single component.
+ *
+ * @type {string}
+ * @constant
+ */
+ SCALAR: "SCALAR",
+ /**
+ * The attribute is a two-component vector.
+ *
+ * @type {string}
+ * @constant
+ */
+ VEC2: "VEC2",
+ /**
+ * The attribute is a three-component vector.
+ *
+ * @type {string}
+ * @constant
+ */
+ VEC3: "VEC3",
+ /**
+ * The attribute is a four-component vector.
+ *
+ * @type {string}
+ * @constant
+ */
+ VEC4: "VEC4",
+ /**
+ * The attribute is a 2x2 matrix.
+ *
+ * @type {string}
+ * @constant
+ */
+ MAT2: "MAT2",
+ /**
+ * The attribute is a 3x3 matrix.
+ *
+ * @type {string}
+ * @constant
+ */
+ MAT3: "MAT3",
+ /**
+ * The attribute is a 4x4 matrix.
+ *
+ * @type {string}
+ * @constant
+ */
+ MAT4: "MAT4"
+};
+AttributeType.getMathType = function(attributeType) {
+ switch (attributeType) {
+ case AttributeType.SCALAR:
+ return Number;
+ case AttributeType.VEC2:
+ return Cartesian2_default;
+ case AttributeType.VEC3:
+ return Cartesian3_default;
+ case AttributeType.VEC4:
+ return Cartesian4_default;
+ case AttributeType.MAT2:
+ return Matrix2_default;
+ case AttributeType.MAT3:
+ return Matrix3_default;
+ case AttributeType.MAT4:
+ return Matrix4_default;
+ //>>includeStart('debug', pragmas.debug);
+ default:
+ throw new DeveloperError_default("attributeType is not a valid value.");
+ }
+};
+AttributeType.getNumberOfComponents = function(attributeType) {
+ switch (attributeType) {
+ case AttributeType.SCALAR:
+ return 1;
+ case AttributeType.VEC2:
+ return 2;
+ case AttributeType.VEC3:
+ return 3;
+ case AttributeType.VEC4:
+ case AttributeType.MAT2:
+ return 4;
+ case AttributeType.MAT3:
+ return 9;
+ case AttributeType.MAT4:
+ return 16;
+ //>>includeStart('debug', pragmas.debug);
+ default:
+ throw new DeveloperError_default("attributeType is not a valid value.");
+ }
+};
+AttributeType.getAttributeLocationCount = function(attributeType) {
+ switch (attributeType) {
+ case AttributeType.SCALAR:
+ case AttributeType.VEC2:
+ case AttributeType.VEC3:
+ case AttributeType.VEC4:
+ return 1;
+ case AttributeType.MAT2:
+ return 2;
+ case AttributeType.MAT3:
+ return 3;
+ case AttributeType.MAT4:
+ return 4;
+ //>>includeStart('debug', pragmas.debug);
+ default:
+ throw new DeveloperError_default("attributeType is not a valid value.");
+ }
+};
+AttributeType.getGlslType = function(attributeType) {
+ Check_default.typeOf.string("attributeType", attributeType);
+ switch (attributeType) {
+ case AttributeType.SCALAR:
+ return "float";
+ case AttributeType.VEC2:
+ return "vec2";
+ case AttributeType.VEC3:
+ return "vec3";
+ case AttributeType.VEC4:
+ return "vec4";
+ case AttributeType.MAT2:
+ return "mat2";
+ case AttributeType.MAT3:
+ return "mat3";
+ case AttributeType.MAT4:
+ return "mat4";
+ //>>includeStart('debug', pragmas.debug);
+ default:
+ throw new DeveloperError_default("attributeType is not a valid value.");
+ }
+};
+var AttributeType_default = Object.freeze(AttributeType);
+
+// packages/engine/Source/Core/AttributeCompression.js
+var RIGHT_SHIFT = 1 / 256;
+var LEFT_SHIFT = 256;
+var AttributeCompression = {};
+AttributeCompression.octEncodeInRange = function(vector, rangeMax, result) {
+ Check_default.defined("vector", vector);
+ Check_default.defined("result", result);
+ const magSquared = Cartesian3_default.magnitudeSquared(vector);
+ if (Math.abs(magSquared - 1) > Math_default.EPSILON6) {
+ throw new DeveloperError_default("vector must be normalized.");
+ }
+ result.x = vector.x / (Math.abs(vector.x) + Math.abs(vector.y) + Math.abs(vector.z));
+ result.y = vector.y / (Math.abs(vector.x) + Math.abs(vector.y) + Math.abs(vector.z));
+ if (vector.z < 0) {
+ const x = result.x;
+ const y = result.y;
+ result.x = (1 - Math.abs(y)) * Math_default.signNotZero(x);
+ result.y = (1 - Math.abs(x)) * Math_default.signNotZero(y);
+ }
+ result.x = Math_default.toSNorm(result.x, rangeMax);
+ result.y = Math_default.toSNorm(result.y, rangeMax);
+ return result;
+};
+AttributeCompression.octEncode = function(vector, result) {
+ return AttributeCompression.octEncodeInRange(vector, 255, result);
+};
+var octEncodeScratch = new Cartesian2_default();
+var uint8ForceArray = new Uint8Array(1);
+function forceUint8(value) {
+ uint8ForceArray[0] = value;
+ return uint8ForceArray[0];
+}
+AttributeCompression.octEncodeToCartesian4 = function(vector, result) {
+ AttributeCompression.octEncodeInRange(vector, 65535, octEncodeScratch);
+ result.x = forceUint8(octEncodeScratch.x * RIGHT_SHIFT);
+ result.y = forceUint8(octEncodeScratch.x);
+ result.z = forceUint8(octEncodeScratch.y * RIGHT_SHIFT);
+ result.w = forceUint8(octEncodeScratch.y);
+ return result;
+};
+AttributeCompression.octDecodeInRange = function(x, y, rangeMax, result) {
+ Check_default.defined("result", result);
+ if (x < 0 || x > rangeMax || y < 0 || y > rangeMax) {
+ throw new DeveloperError_default(
+ `x and y must be unsigned normalized integers between 0 and ${rangeMax}`
+ );
+ }
+ result.x = Math_default.fromSNorm(x, rangeMax);
+ result.y = Math_default.fromSNorm(y, rangeMax);
+ result.z = 1 - (Math.abs(result.x) + Math.abs(result.y));
+ if (result.z < 0) {
+ const oldVX = result.x;
+ result.x = (1 - Math.abs(result.y)) * Math_default.signNotZero(oldVX);
+ result.y = (1 - Math.abs(oldVX)) * Math_default.signNotZero(result.y);
+ }
+ return Cartesian3_default.normalize(result, result);
+};
+AttributeCompression.octDecode = function(x, y, result) {
+ return AttributeCompression.octDecodeInRange(x, y, 255, result);
+};
+AttributeCompression.octDecodeFromCartesian4 = function(encoded, result) {
+ Check_default.typeOf.object("encoded", encoded);
+ Check_default.typeOf.object("result", result);
+ const x = encoded.x;
+ const y = encoded.y;
+ const z = encoded.z;
+ const w = encoded.w;
+ if (x < 0 || x > 255 || y < 0 || y > 255 || z < 0 || z > 255 || w < 0 || w > 255) {
+ throw new DeveloperError_default(
+ "x, y, z, and w must be unsigned normalized integers between 0 and 255"
+ );
+ }
+ const xOct16 = x * LEFT_SHIFT + y;
+ const yOct16 = z * LEFT_SHIFT + w;
+ return AttributeCompression.octDecodeInRange(xOct16, yOct16, 65535, result);
+};
+AttributeCompression.octPackFloat = function(encoded) {
+ Check_default.defined("encoded", encoded);
+ return 256 * encoded.x + encoded.y;
+};
+var scratchEncodeCart2 = new Cartesian2_default();
+AttributeCompression.octEncodeFloat = function(vector) {
+ AttributeCompression.octEncode(vector, scratchEncodeCart2);
+ return AttributeCompression.octPackFloat(scratchEncodeCart2);
+};
+AttributeCompression.octDecodeFloat = function(value, result) {
+ Check_default.defined("value", value);
+ const temp = value / 256;
+ const x = Math.floor(temp);
+ const y = (temp - x) * 256;
+ return AttributeCompression.octDecode(x, y, result);
+};
+AttributeCompression.octPack = function(v1, v2, v3, result) {
+ Check_default.defined("v1", v1);
+ Check_default.defined("v2", v2);
+ Check_default.defined("v3", v3);
+ Check_default.defined("result", result);
+ const encoded1 = AttributeCompression.octEncodeFloat(v1);
+ const encoded2 = AttributeCompression.octEncodeFloat(v2);
+ const encoded3 = AttributeCompression.octEncode(v3, scratchEncodeCart2);
+ result.x = 65536 * encoded3.x + encoded1;
+ result.y = 65536 * encoded3.y + encoded2;
+ return result;
+};
+AttributeCompression.octUnpack = function(packed, v1, v2, v3) {
+ Check_default.defined("packed", packed);
+ Check_default.defined("v1", v1);
+ Check_default.defined("v2", v2);
+ Check_default.defined("v3", v3);
+ let temp = packed.x / 65536;
+ const x = Math.floor(temp);
+ const encodedFloat1 = (temp - x) * 65536;
+ temp = packed.y / 65536;
+ const y = Math.floor(temp);
+ const encodedFloat2 = (temp - y) * 65536;
+ AttributeCompression.octDecodeFloat(encodedFloat1, v1);
+ AttributeCompression.octDecodeFloat(encodedFloat2, v2);
+ AttributeCompression.octDecode(x, y, v3);
+};
+AttributeCompression.compressTextureCoordinates = function(textureCoordinates) {
+ Check_default.defined("textureCoordinates", textureCoordinates);
+ const x = textureCoordinates.x * 4095 | 0;
+ const y = textureCoordinates.y * 4095 | 0;
+ return 4096 * x + y;
+};
+AttributeCompression.decompressTextureCoordinates = function(compressed, result) {
+ Check_default.defined("compressed", compressed);
+ Check_default.defined("result", result);
+ const temp = compressed / 4096;
+ const xZeroTo4095 = Math.floor(temp);
+ result.x = xZeroTo4095 / 4095;
+ result.y = (compressed - xZeroTo4095 * 4096) / 4095;
+ return result;
+};
+function zigZagDecode(value) {
+ return value >> 1 ^ -(value & 1);
+}
+AttributeCompression.zigZagDeltaDecode = function(uBuffer, vBuffer, heightBuffer) {
+ Check_default.defined("uBuffer", uBuffer);
+ Check_default.defined("vBuffer", vBuffer);
+ Check_default.typeOf.number.equals(
+ "uBuffer.length",
+ "vBuffer.length",
+ uBuffer.length,
+ vBuffer.length
+ );
+ if (defined_default(heightBuffer)) {
+ Check_default.typeOf.number.equals(
+ "uBuffer.length",
+ "heightBuffer.length",
+ uBuffer.length,
+ heightBuffer.length
+ );
+ }
+ const count = uBuffer.length;
+ let u = 0;
+ let v = 0;
+ let height = 0;
+ for (let i = 0; i < count; ++i) {
+ u += zigZagDecode(uBuffer[i]);
+ v += zigZagDecode(vBuffer[i]);
+ uBuffer[i] = u;
+ vBuffer[i] = v;
+ if (defined_default(heightBuffer)) {
+ height += zigZagDecode(heightBuffer[i]);
+ heightBuffer[i] = height;
+ }
+ }
+};
+AttributeCompression.dequantize = function(typedArray, componentDatatype, type, count) {
+ Check_default.defined("typedArray", typedArray);
+ Check_default.defined("componentDatatype", componentDatatype);
+ Check_default.defined("type", type);
+ Check_default.defined("count", count);
+ const componentsPerAttribute = AttributeType_default.getNumberOfComponents(type);
+ let divisor;
+ switch (componentDatatype) {
+ case ComponentDatatype_default.BYTE:
+ divisor = 127;
+ break;
+ case ComponentDatatype_default.UNSIGNED_BYTE:
+ divisor = 255;
+ break;
+ case ComponentDatatype_default.SHORT:
+ divisor = 32767;
+ break;
+ case ComponentDatatype_default.UNSIGNED_SHORT:
+ divisor = 65535;
+ break;
+ case ComponentDatatype_default.INT:
+ divisor = 2147483647;
+ break;
+ case ComponentDatatype_default.UNSIGNED_INT:
+ divisor = 4294967295;
+ break;
+ //>>includeStart('debug', pragmas.debug);
+ default:
+ throw new DeveloperError_default(
+ `Cannot dequantize component datatype: ${componentDatatype}`
+ );
+ }
+ const dequantizedTypedArray = new Float32Array(
+ count * componentsPerAttribute
+ );
+ for (let i = 0; i < count; i++) {
+ for (let j = 0; j < componentsPerAttribute; j++) {
+ const index = i * componentsPerAttribute + j;
+ dequantizedTypedArray[index] = Math.max(
+ typedArray[index] / divisor,
+ -1
+ );
+ }
+ }
+ return dequantizedTypedArray;
+};
+AttributeCompression.decodeRGB565 = function(typedArray, result) {
+ Check_default.defined("typedArray", typedArray);
+ const expectedLength = typedArray.length * 3;
+ if (defined_default(result)) {
+ Check_default.typeOf.number.equals(
+ "result.length",
+ "typedArray.length * 3",
+ result.length,
+ expectedLength
+ );
+ }
+ const count = typedArray.length;
+ if (!defined_default(result)) {
+ result = new Float32Array(count * 3);
+ }
+ const mask5 = (1 << 5) - 1;
+ const mask6 = (1 << 6) - 1;
+ const normalize5 = 1 / 31;
+ const normalize6 = 1 / 63;
+ for (let i = 0; i < count; i++) {
+ const value = typedArray[i];
+ const red = value >> 11;
+ const green = value >> 5 & mask6;
+ const blue = value & mask5;
+ const offset = 3 * i;
+ result[offset] = red * normalize5;
+ result[offset + 1] = green * normalize6;
+ result[offset + 2] = blue * normalize5;
+ }
+ return result;
+};
+var AttributeCompression_default = AttributeCompression;
+
+export {
+ AttributeCompression_default
+};
diff --git a/public/assets/cesium/Workers/chunk-LLAF3CPH.js b/public/assets/cesium/Workers/chunk-LLAF3CPH.js
new file mode 100644
index 0000000000000000000000000000000000000000..887d7135dda76f7e598db82acba372c56edb5651
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-LLAF3CPH.js
@@ -0,0 +1,58 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/RuntimeError.js
+function RuntimeError(message) {
+ this.name = "RuntimeError";
+ this.message = message;
+ let stack;
+ try {
+ throw new Error();
+ } catch (e) {
+ stack = e.stack;
+ }
+ this.stack = stack;
+}
+if (defined_default(Object.create)) {
+ RuntimeError.prototype = Object.create(Error.prototype);
+ RuntimeError.prototype.constructor = RuntimeError;
+}
+RuntimeError.prototype.toString = function() {
+ let str = `${this.name}: ${this.message}`;
+ if (defined_default(this.stack)) {
+ str += `
+${this.stack.toString()}`;
+ }
+ return str;
+};
+var RuntimeError_default = RuntimeError;
+
+export {
+ RuntimeError_default
+};
diff --git a/public/assets/cesium/Workers/chunk-M24KHENR.js b/public/assets/cesium/Workers/chunk-M24KHENR.js
new file mode 100644
index 0000000000000000000000000000000000000000..7279ab838cc9772a373b804019171a3ea9abe699
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-M24KHENR.js
@@ -0,0 +1,1800 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ __commonJS,
+ __require
+} from "./chunk-YCDZX5LS.js";
+
+// node_modules/draco3d/draco_decoder_nodejs.js
+var require_draco_decoder_nodejs = __commonJS({
+ "node_modules/draco3d/draco_decoder_nodejs.js"(exports, module) {
+ var $jscomp = $jscomp || {};
+ $jscomp.scope = {};
+ $jscomp.arrayIteratorImpl = function(k) {
+ var n = 0;
+ return function() {
+ return n < k.length ? { done: false, value: k[n++] } : { done: true };
+ };
+ };
+ $jscomp.arrayIterator = function(k) {
+ return { next: $jscomp.arrayIteratorImpl(k) };
+ };
+ $jscomp.makeIterator = function(k) {
+ var n = "undefined" != typeof Symbol && Symbol.iterator && k[Symbol.iterator];
+ return n ? n.call(k) : $jscomp.arrayIterator(k);
+ };
+ $jscomp.ASSUME_ES5 = false;
+ $jscomp.ASSUME_NO_NATIVE_MAP = false;
+ $jscomp.ASSUME_NO_NATIVE_SET = false;
+ $jscomp.SIMPLE_FROUND_POLYFILL = false;
+ $jscomp.ISOLATE_POLYFILLS = false;
+ $jscomp.FORCE_POLYFILL_PROMISE = false;
+ $jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION = false;
+ $jscomp.getGlobal = function(k) {
+ k = ["object" == typeof globalThis && globalThis, k, "object" == typeof window && window, "object" == typeof self && self, "object" == typeof global && global];
+ for (var n = 0; n < k.length; ++n) {
+ var l = k[n];
+ if (l && l.Math == Math) return l;
+ }
+ throw Error("Cannot find global object");
+ };
+ $jscomp.global = $jscomp.getGlobal(exports);
+ $jscomp.defineProperty = $jscomp.ASSUME_ES5 || "function" == typeof Object.defineProperties ? Object.defineProperty : function(k, n, l) {
+ if (k == Array.prototype || k == Object.prototype) return k;
+ k[n] = l.value;
+ return k;
+ };
+ $jscomp.IS_SYMBOL_NATIVE = "function" === typeof Symbol && "symbol" === typeof Symbol("x");
+ $jscomp.TRUST_ES6_POLYFILLS = !$jscomp.ISOLATE_POLYFILLS || $jscomp.IS_SYMBOL_NATIVE;
+ $jscomp.polyfills = {};
+ $jscomp.propertyToPolyfillSymbol = {};
+ $jscomp.POLYFILL_PREFIX = "$jscp$";
+ $jscomp.polyfill = function(k, n, l, p) {
+ n && ($jscomp.ISOLATE_POLYFILLS ? $jscomp.polyfillIsolated(k, n, l, p) : $jscomp.polyfillUnisolated(k, n, l, p));
+ };
+ $jscomp.polyfillUnisolated = function(k, n, l, p) {
+ l = $jscomp.global;
+ k = k.split(".");
+ for (p = 0; p < k.length - 1; p++) {
+ var h = k[p];
+ if (!(h in l)) return;
+ l = l[h];
+ }
+ k = k[k.length - 1];
+ p = l[k];
+ n = n(p);
+ n != p && null != n && $jscomp.defineProperty(l, k, { configurable: true, writable: true, value: n });
+ };
+ $jscomp.polyfillIsolated = function(k, n, l, p) {
+ var h = k.split(".");
+ k = 1 === h.length;
+ p = h[0];
+ p = !k && p in $jscomp.polyfills ? $jscomp.polyfills : $jscomp.global;
+ for (var A = 0; A < h.length - 1; A++) {
+ var f = h[A];
+ if (!(f in p)) return;
+ p = p[f];
+ }
+ h = h[h.length - 1];
+ l = $jscomp.IS_SYMBOL_NATIVE && "es6" === l ? p[h] : null;
+ n = n(l);
+ null != n && (k ? $jscomp.defineProperty($jscomp.polyfills, h, { configurable: true, writable: true, value: n }) : n !== l && (void 0 === $jscomp.propertyToPolyfillSymbol[h] && (l = 1e9 * Math.random() >>> 0, $jscomp.propertyToPolyfillSymbol[h] = $jscomp.IS_SYMBOL_NATIVE ? $jscomp.global.Symbol(h) : $jscomp.POLYFILL_PREFIX + l + "$" + h), $jscomp.defineProperty(p, $jscomp.propertyToPolyfillSymbol[h], { configurable: true, writable: true, value: n })));
+ };
+ $jscomp.polyfill("Promise", function(k) {
+ function n() {
+ this.batch_ = null;
+ }
+ function l(f) {
+ return f instanceof h ? f : new h(function(q, v) {
+ q(f);
+ });
+ }
+ if (k && (!($jscomp.FORCE_POLYFILL_PROMISE || $jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION && "undefined" === typeof $jscomp.global.PromiseRejectionEvent) || !$jscomp.global.Promise || -1 === $jscomp.global.Promise.toString().indexOf("[native code]"))) return k;
+ n.prototype.asyncExecute = function(f) {
+ if (null == this.batch_) {
+ this.batch_ = [];
+ var q = this;
+ this.asyncExecuteFunction(function() {
+ q.executeBatch_();
+ });
+ }
+ this.batch_.push(f);
+ };
+ var p = $jscomp.global.setTimeout;
+ n.prototype.asyncExecuteFunction = function(f) {
+ p(f, 0);
+ };
+ n.prototype.executeBatch_ = function() {
+ for (; this.batch_ && this.batch_.length; ) {
+ var f = this.batch_;
+ this.batch_ = [];
+ for (var q = 0; q < f.length; ++q) {
+ var v = f[q];
+ f[q] = null;
+ try {
+ v();
+ } catch (z) {
+ this.asyncThrow_(z);
+ }
+ }
+ }
+ this.batch_ = null;
+ };
+ n.prototype.asyncThrow_ = function(f) {
+ this.asyncExecuteFunction(function() {
+ throw f;
+ });
+ };
+ var h = function(f) {
+ this.state_ = 0;
+ this.result_ = void 0;
+ this.onSettledCallbacks_ = [];
+ this.isRejectionHandled_ = false;
+ var q = this.createResolveAndReject_();
+ try {
+ f(q.resolve, q.reject);
+ } catch (v) {
+ q.reject(v);
+ }
+ };
+ h.prototype.createResolveAndReject_ = function() {
+ function f(z) {
+ return function(O) {
+ v || (v = true, z.call(q, O));
+ };
+ }
+ var q = this, v = false;
+ return { resolve: f(this.resolveTo_), reject: f(this.reject_) };
+ };
+ h.prototype.resolveTo_ = function(f) {
+ if (f === this) this.reject_(new TypeError("A Promise cannot resolve to itself"));
+ else if (f instanceof h) this.settleSameAsPromise_(f);
+ else {
+ a: switch (typeof f) {
+ case "object":
+ var q = null != f;
+ break a;
+ case "function":
+ q = true;
+ break a;
+ default:
+ q = false;
+ }
+ q ? this.resolveToNonPromiseObj_(f) : this.fulfill_(f);
+ }
+ };
+ h.prototype.resolveToNonPromiseObj_ = function(f) {
+ var q = void 0;
+ try {
+ q = f.then;
+ } catch (v) {
+ this.reject_(v);
+ return;
+ }
+ "function" == typeof q ? this.settleSameAsThenable_(q, f) : this.fulfill_(f);
+ };
+ h.prototype.reject_ = function(f) {
+ this.settle_(2, f);
+ };
+ h.prototype.fulfill_ = function(f) {
+ this.settle_(1, f);
+ };
+ h.prototype.settle_ = function(f, q) {
+ if (0 != this.state_) throw Error("Cannot settle(" + f + ", " + q + "): Promise already settled in state" + this.state_);
+ this.state_ = f;
+ this.result_ = q;
+ 2 === this.state_ && this.scheduleUnhandledRejectionCheck_();
+ this.executeOnSettledCallbacks_();
+ };
+ h.prototype.scheduleUnhandledRejectionCheck_ = function() {
+ var f = this;
+ p(function() {
+ if (f.notifyUnhandledRejection_()) {
+ var q = $jscomp.global.console;
+ "undefined" !== typeof q && q.error(f.result_);
+ }
+ }, 1);
+ };
+ h.prototype.notifyUnhandledRejection_ = function() {
+ if (this.isRejectionHandled_) return false;
+ var f = $jscomp.global.CustomEvent, q = $jscomp.global.Event, v = $jscomp.global.dispatchEvent;
+ if ("undefined" === typeof v) return true;
+ "function" === typeof f ? f = new f("unhandledrejection", { cancelable: true }) : "function" === typeof q ? f = new q("unhandledrejection", { cancelable: true }) : (f = $jscomp.global.document.createEvent("CustomEvent"), f.initCustomEvent("unhandledrejection", false, true, f));
+ f.promise = this;
+ f.reason = this.result_;
+ return v(f);
+ };
+ h.prototype.executeOnSettledCallbacks_ = function() {
+ if (null != this.onSettledCallbacks_) {
+ for (var f = 0; f < this.onSettledCallbacks_.length; ++f) A.asyncExecute(this.onSettledCallbacks_[f]);
+ this.onSettledCallbacks_ = null;
+ }
+ };
+ var A = new n();
+ h.prototype.settleSameAsPromise_ = function(f) {
+ var q = this.createResolveAndReject_();
+ f.callWhenSettled_(q.resolve, q.reject);
+ };
+ h.prototype.settleSameAsThenable_ = function(f, q) {
+ var v = this.createResolveAndReject_();
+ try {
+ f.call(q, v.resolve, v.reject);
+ } catch (z) {
+ v.reject(z);
+ }
+ };
+ h.prototype.then = function(f, q) {
+ function v(t, x) {
+ return "function" == typeof t ? function(D) {
+ try {
+ z(t(D));
+ } catch (R) {
+ O(R);
+ }
+ } : x;
+ }
+ var z, O, ba = new h(function(t, x) {
+ z = t;
+ O = x;
+ });
+ this.callWhenSettled_(v(f, z), v(q, O));
+ return ba;
+ };
+ h.prototype.catch = function(f) {
+ return this.then(void 0, f);
+ };
+ h.prototype.callWhenSettled_ = function(f, q) {
+ function v() {
+ switch (z.state_) {
+ case 1:
+ f(z.result_);
+ break;
+ case 2:
+ q(z.result_);
+ break;
+ default:
+ throw Error("Unexpected state: " + z.state_);
+ }
+ }
+ var z = this;
+ null == this.onSettledCallbacks_ ? A.asyncExecute(v) : this.onSettledCallbacks_.push(v);
+ this.isRejectionHandled_ = true;
+ };
+ h.resolve = l;
+ h.reject = function(f) {
+ return new h(function(q, v) {
+ v(f);
+ });
+ };
+ h.race = function(f) {
+ return new h(function(q, v) {
+ for (var z = $jscomp.makeIterator(f), O = z.next(); !O.done; O = z.next()) l(O.value).callWhenSettled_(q, v);
+ });
+ };
+ h.all = function(f) {
+ var q = $jscomp.makeIterator(f), v = q.next();
+ return v.done ? l([]) : new h(function(z, O) {
+ function ba(D) {
+ return function(R) {
+ t[D] = R;
+ x--;
+ 0 == x && z(t);
+ };
+ }
+ var t = [], x = 0;
+ do
+ t.push(void 0), x++, l(v.value).callWhenSettled_(ba(t.length - 1), O), v = q.next();
+ while (!v.done);
+ });
+ };
+ return h;
+ }, "es6", "es3");
+ $jscomp.owns = function(k, n) {
+ return Object.prototype.hasOwnProperty.call(k, n);
+ };
+ $jscomp.assign = $jscomp.TRUST_ES6_POLYFILLS && "function" == typeof Object.assign ? Object.assign : function(k, n) {
+ for (var l = 1; l < arguments.length; l++) {
+ var p = arguments[l];
+ if (p) for (var h in p) $jscomp.owns(p, h) && (k[h] = p[h]);
+ }
+ return k;
+ };
+ $jscomp.polyfill("Object.assign", function(k) {
+ return k || $jscomp.assign;
+ }, "es6", "es3");
+ $jscomp.checkStringArgs = function(k, n, l) {
+ if (null == k) throw new TypeError("The 'this' value for String.prototype." + l + " must not be null or undefined");
+ if (n instanceof RegExp) throw new TypeError("First argument to String.prototype." + l + " must not be a regular expression");
+ return k + "";
+ };
+ $jscomp.polyfill("String.prototype.startsWith", function(k) {
+ return k ? k : function(n, l) {
+ var p = $jscomp.checkStringArgs(this, n, "startsWith");
+ n += "";
+ var h = p.length, A = n.length;
+ l = Math.max(0, Math.min(l | 0, p.length));
+ for (var f = 0; f < A && l < h; ) if (p[l++] != n[f++]) return false;
+ return f >= A;
+ };
+ }, "es6", "es3");
+ $jscomp.polyfill("Array.prototype.copyWithin", function(k) {
+ function n(l) {
+ l = Number(l);
+ return Infinity === l || -Infinity === l ? l : l | 0;
+ }
+ return k ? k : function(l, p, h) {
+ var A = this.length;
+ l = n(l);
+ p = n(p);
+ h = void 0 === h ? A : n(h);
+ l = 0 > l ? Math.max(A + l, 0) : Math.min(l, A);
+ p = 0 > p ? Math.max(A + p, 0) : Math.min(p, A);
+ h = 0 > h ? Math.max(A + h, 0) : Math.min(h, A);
+ if (l < p) for (; p < h; ) p in this ? this[l++] = this[p++] : (delete this[l++], p++);
+ else for (h = Math.min(h, A + p - l), l += h - p; h > p; ) --h in this ? this[--l] = this[h] : delete this[--l];
+ return this;
+ };
+ }, "es6", "es3");
+ $jscomp.typedArrayCopyWithin = function(k) {
+ return k ? k : Array.prototype.copyWithin;
+ };
+ $jscomp.polyfill("Int8Array.prototype.copyWithin", $jscomp.typedArrayCopyWithin, "es6", "es5");
+ $jscomp.polyfill("Uint8Array.prototype.copyWithin", $jscomp.typedArrayCopyWithin, "es6", "es5");
+ $jscomp.polyfill("Uint8ClampedArray.prototype.copyWithin", $jscomp.typedArrayCopyWithin, "es6", "es5");
+ $jscomp.polyfill("Int16Array.prototype.copyWithin", $jscomp.typedArrayCopyWithin, "es6", "es5");
+ $jscomp.polyfill("Uint16Array.prototype.copyWithin", $jscomp.typedArrayCopyWithin, "es6", "es5");
+ $jscomp.polyfill("Int32Array.prototype.copyWithin", $jscomp.typedArrayCopyWithin, "es6", "es5");
+ $jscomp.polyfill("Uint32Array.prototype.copyWithin", $jscomp.typedArrayCopyWithin, "es6", "es5");
+ $jscomp.polyfill("Float32Array.prototype.copyWithin", $jscomp.typedArrayCopyWithin, "es6", "es5");
+ $jscomp.polyfill("Float64Array.prototype.copyWithin", $jscomp.typedArrayCopyWithin, "es6", "es5");
+ var DracoDecoderModule = function() {
+ var k = "undefined" !== typeof document && document.currentScript ? document.currentScript.src : void 0;
+ "undefined" !== typeof __filename && (k = k || __filename);
+ return function(n) {
+ function l(e) {
+ return a.locateFile ? a.locateFile(e, U) : U + e;
+ }
+ function p(e, b, c) {
+ var d = b + c;
+ for (c = b; e[c] && !(c >= d); ) ++c;
+ if (16 < c - b && e.buffer && va) return va.decode(e.subarray(b, c));
+ for (d = ""; b < c; ) {
+ var g = e[b++];
+ if (g & 128) {
+ var u = e[b++] & 63;
+ if (192 == (g & 224)) d += String.fromCharCode((g & 31) << 6 | u);
+ else {
+ var X = e[b++] & 63;
+ g = 224 == (g & 240) ? (g & 15) << 12 | u << 6 | X : (g & 7) << 18 | u << 12 | X << 6 | e[b++] & 63;
+ 65536 > g ? d += String.fromCharCode(g) : (g -= 65536, d += String.fromCharCode(55296 | g >> 10, 56320 | g & 1023));
+ }
+ } else d += String.fromCharCode(g);
+ }
+ return d;
+ }
+ function h(e, b) {
+ return e ? p(ea, e, b) : "";
+ }
+ function A() {
+ var e = ja.buffer;
+ a.HEAP8 = Y = new Int8Array(e);
+ a.HEAP16 = new Int16Array(e);
+ a.HEAP32 = ca = new Int32Array(e);
+ a.HEAPU8 = ea = new Uint8Array(e);
+ a.HEAPU16 = new Uint16Array(e);
+ a.HEAPU32 = V = new Uint32Array(e);
+ a.HEAPF32 = new Float32Array(e);
+ a.HEAPF64 = new Float64Array(e);
+ }
+ function f(e) {
+ if (a.onAbort) a.onAbort(e);
+ e = "Aborted(" + e + ")";
+ da(e);
+ wa = true;
+ e = new WebAssembly.RuntimeError(e + ". Build with -sASSERTIONS for more info.");
+ ka(e);
+ throw e;
+ }
+ function q(e) {
+ try {
+ if (e == P && fa) return new Uint8Array(fa);
+ if (ma) return ma(e);
+ throw "both async and sync fetching of the wasm failed";
+ } catch (b) {
+ f(b);
+ }
+ }
+ function v() {
+ if (!fa && (xa || ha)) {
+ if ("function" == typeof fetch && !P.startsWith("file://")) return fetch(P, { credentials: "same-origin" }).then(function(e) {
+ if (!e.ok) throw "failed to load wasm binary file at '" + P + "'";
+ return e.arrayBuffer();
+ }).catch(function() {
+ return q(P);
+ });
+ if (na) return new Promise(function(e, b) {
+ na(P, function(c) {
+ e(new Uint8Array(c));
+ }, b);
+ });
+ }
+ return Promise.resolve().then(function() {
+ return q(P);
+ });
+ }
+ function z(e) {
+ for (; 0 < e.length; ) e.shift()(a);
+ }
+ function O(e) {
+ this.excPtr = e;
+ this.ptr = e - 24;
+ this.set_type = function(b) {
+ V[this.ptr + 4 >> 2] = b;
+ };
+ this.get_type = function() {
+ return V[this.ptr + 4 >> 2];
+ };
+ this.set_destructor = function(b) {
+ V[this.ptr + 8 >> 2] = b;
+ };
+ this.get_destructor = function() {
+ return V[this.ptr + 8 >> 2];
+ };
+ this.set_refcount = function(b) {
+ ca[this.ptr >> 2] = b;
+ };
+ this.set_caught = function(b) {
+ Y[this.ptr + 12 >> 0] = b ? 1 : 0;
+ };
+ this.get_caught = function() {
+ return 0 != Y[this.ptr + 12 >> 0];
+ };
+ this.set_rethrown = function(b) {
+ Y[this.ptr + 13 >> 0] = b ? 1 : 0;
+ };
+ this.get_rethrown = function() {
+ return 0 != Y[this.ptr + 13 >> 0];
+ };
+ this.init = function(b, c) {
+ this.set_adjusted_ptr(0);
+ this.set_type(b);
+ this.set_destructor(c);
+ this.set_refcount(0);
+ this.set_caught(false);
+ this.set_rethrown(false);
+ };
+ this.add_ref = function() {
+ ca[this.ptr >> 2] += 1;
+ };
+ this.release_ref = function() {
+ var b = ca[this.ptr >> 2];
+ ca[this.ptr >> 2] = b - 1;
+ return 1 === b;
+ };
+ this.set_adjusted_ptr = function(b) {
+ V[this.ptr + 16 >> 2] = b;
+ };
+ this.get_adjusted_ptr = function() {
+ return V[this.ptr + 16 >> 2];
+ };
+ this.get_exception_ptr = function() {
+ if (ya(this.get_type())) return V[this.excPtr >> 2];
+ var b = this.get_adjusted_ptr();
+ return 0 !== b ? b : this.excPtr;
+ };
+ }
+ function ba() {
+ function e() {
+ if (!la && (la = true, a.calledRun = true, !wa)) {
+ za = true;
+ z(oa);
+ Aa(a);
+ if (a.onRuntimeInitialized) a.onRuntimeInitialized();
+ if (a.postRun) for ("function" == typeof a.postRun && (a.postRun = [a.postRun]); a.postRun.length; ) Ba.unshift(a.postRun.shift());
+ z(Ba);
+ }
+ }
+ if (!(0 < aa)) {
+ if (a.preRun) for ("function" == typeof a.preRun && (a.preRun = [a.preRun]); a.preRun.length; ) Ca.unshift(a.preRun.shift());
+ z(Ca);
+ 0 < aa || (a.setStatus ? (a.setStatus("Running..."), setTimeout(function() {
+ setTimeout(function() {
+ a.setStatus("");
+ }, 1);
+ e();
+ }, 1)) : e());
+ }
+ }
+ function t() {
+ }
+ function x(e) {
+ return (e || t).__cache__;
+ }
+ function D(e, b) {
+ var c = x(b), d = c[e];
+ if (d) return d;
+ d = Object.create((b || t).prototype);
+ d.ptr = e;
+ return c[e] = d;
+ }
+ function R(e) {
+ if ("string" === typeof e) {
+ for (var b = 0, c = 0; c < e.length; ++c) {
+ var d = e.charCodeAt(c);
+ 127 >= d ? b++ : 2047 >= d ? b += 2 : 55296 <= d && 57343 >= d ? (b += 4, ++c) : b += 3;
+ }
+ b = Array(b + 1);
+ c = 0;
+ d = b.length;
+ if (0 < d) {
+ d = c + d - 1;
+ for (var g = 0; g < e.length; ++g) {
+ var u = e.charCodeAt(g);
+ if (55296 <= u && 57343 >= u) {
+ var X = e.charCodeAt(++g);
+ u = 65536 + ((u & 1023) << 10) | X & 1023;
+ }
+ if (127 >= u) {
+ if (c >= d) break;
+ b[c++] = u;
+ } else {
+ if (2047 >= u) {
+ if (c + 1 >= d) break;
+ b[c++] = 192 | u >> 6;
+ } else {
+ if (65535 >= u) {
+ if (c + 2 >= d) break;
+ b[c++] = 224 | u >> 12;
+ } else {
+ if (c + 3 >= d) break;
+ b[c++] = 240 | u >> 18;
+ b[c++] = 128 | u >> 12 & 63;
+ }
+ b[c++] = 128 | u >> 6 & 63;
+ }
+ b[c++] = 128 | u & 63;
+ }
+ }
+ b[c] = 0;
+ }
+ e = r.alloc(b, Y);
+ r.copy(b, Y, e);
+ return e;
+ }
+ return e;
+ }
+ function pa(e) {
+ if ("object" === typeof e) {
+ var b = r.alloc(e, Y);
+ r.copy(e, Y, b);
+ return b;
+ }
+ return e;
+ }
+ function Z() {
+ throw "cannot construct a VoidPtr, no constructor in IDL";
+ }
+ function S() {
+ this.ptr = Da();
+ x(S)[this.ptr] = this;
+ }
+ function Q() {
+ this.ptr = Ea();
+ x(Q)[this.ptr] = this;
+ }
+ function W() {
+ this.ptr = Fa();
+ x(W)[this.ptr] = this;
+ }
+ function w() {
+ this.ptr = Ga();
+ x(w)[this.ptr] = this;
+ }
+ function C() {
+ this.ptr = Ha();
+ x(C)[this.ptr] = this;
+ }
+ function F() {
+ this.ptr = Ia();
+ x(F)[this.ptr] = this;
+ }
+ function G() {
+ this.ptr = Ja();
+ x(G)[this.ptr] = this;
+ }
+ function E() {
+ this.ptr = Ka();
+ x(E)[this.ptr] = this;
+ }
+ function T() {
+ this.ptr = La();
+ x(T)[this.ptr] = this;
+ }
+ function B() {
+ throw "cannot construct a Status, no constructor in IDL";
+ }
+ function H() {
+ this.ptr = Ma();
+ x(H)[this.ptr] = this;
+ }
+ function I() {
+ this.ptr = Na();
+ x(I)[this.ptr] = this;
+ }
+ function J() {
+ this.ptr = Oa();
+ x(J)[this.ptr] = this;
+ }
+ function K() {
+ this.ptr = Pa();
+ x(K)[this.ptr] = this;
+ }
+ function L() {
+ this.ptr = Qa();
+ x(L)[this.ptr] = this;
+ }
+ function M() {
+ this.ptr = Ra();
+ x(M)[this.ptr] = this;
+ }
+ function N() {
+ this.ptr = Sa();
+ x(N)[this.ptr] = this;
+ }
+ function y() {
+ this.ptr = Ta();
+ x(y)[this.ptr] = this;
+ }
+ function m() {
+ this.ptr = Ua();
+ x(m)[this.ptr] = this;
+ }
+ n = void 0 === n ? {} : n;
+ var a = "undefined" != typeof n ? n : {}, Aa, ka;
+ a.ready = new Promise(function(e, b) {
+ Aa = e;
+ ka = b;
+ });
+ var Va = false, Wa = false;
+ a.onRuntimeInitialized = function() {
+ Va = true;
+ if (Wa && "function" === typeof a.onModuleLoaded) a.onModuleLoaded(a);
+ };
+ a.onModuleParsed = function() {
+ Wa = true;
+ if (Va && "function" === typeof a.onModuleLoaded) a.onModuleLoaded(a);
+ };
+ a.isVersionSupported = function(e) {
+ if ("string" !== typeof e) return false;
+ e = e.split(".");
+ return 2 > e.length || 3 < e.length ? false : 1 == e[0] && 0 <= e[1] && 5 >= e[1] ? true : 0 != e[0] || 10 < e[1] ? false : true;
+ };
+ var Xa = Object.assign({}, a), xa = "object" == typeof window, ha = "function" == typeof importScripts, Ya = "object" == typeof process && "object" == typeof process.versions && "string" == typeof process.versions.node, U = "";
+ if (Ya) {
+ var Za = __require("fs"), qa = __require("path");
+ U = ha ? qa.dirname(U) + "/" : __dirname + "/";
+ var $a = function(e, b) {
+ e = e.startsWith("file://") ? new URL(e) : qa.normalize(e);
+ return Za.readFileSync(e, b ? void 0 : "utf8");
+ };
+ var ma = function(e) {
+ e = $a(e, true);
+ e.buffer || (e = new Uint8Array(e));
+ return e;
+ };
+ var na = function(e, b, c) {
+ e = e.startsWith("file://") ? new URL(e) : qa.normalize(e);
+ Za.readFile(e, function(d, g) {
+ d ? c(d) : b(g.buffer);
+ });
+ };
+ 1 < process.argv.length && process.argv[1].replace(/\\/g, "/");
+ process.argv.slice(2);
+ a.inspect = function() {
+ return "[Emscripten Module object]";
+ };
+ } else if (xa || ha) ha ? U = self.location.href : "undefined" != typeof document && document.currentScript && (U = document.currentScript.src), k && (U = k), U = 0 !== U.indexOf("blob:") ? U.substr(0, U.replace(/[?#].*/, "").lastIndexOf("/") + 1) : "", $a = function(e) {
+ var b = new XMLHttpRequest();
+ b.open("GET", e, false);
+ b.send(null);
+ return b.responseText;
+ }, ha && (ma = function(e) {
+ var b = new XMLHttpRequest();
+ b.open("GET", e, false);
+ b.responseType = "arraybuffer";
+ b.send(null);
+ return new Uint8Array(b.response);
+ }), na = function(e, b, c) {
+ var d = new XMLHttpRequest();
+ d.open("GET", e, true);
+ d.responseType = "arraybuffer";
+ d.onload = function() {
+ 200 == d.status || 0 == d.status && d.response ? b(d.response) : c();
+ };
+ d.onerror = c;
+ d.send(null);
+ };
+ var ud = a.print || console.log.bind(console), da = a.printErr || console.warn.bind(console);
+ Object.assign(a, Xa);
+ Xa = null;
+ var fa;
+ a.wasmBinary && (fa = a.wasmBinary);
+ "object" != typeof WebAssembly && f("no native wasm support detected");
+ var ja, wa = false, va = "undefined" != typeof TextDecoder ? new TextDecoder("utf8") : void 0, Y, ea, ca, V, Ca = [], oa = [], Ba = [], za = false, aa = 0, ra = null, ia = null;
+ var P = "draco_decoder.wasm";
+ P.startsWith("data:application/octet-stream;base64,") || (P = l(P));
+ var vd = 0, wd = [null, [], []], xd = { b: function(e, b, c) {
+ new O(e).init(b, c);
+ vd++;
+ throw e;
+ }, a: function() {
+ f("");
+ }, g: function(e, b, c) {
+ ea.copyWithin(e, b, b + c);
+ }, e: function(e) {
+ var b = ea.length;
+ e >>>= 0;
+ if (2147483648 < e) return false;
+ for (var c = 1; 4 >= c; c *= 2) {
+ var d = b * (1 + 0.2 / c);
+ d = Math.min(d, e + 100663296);
+ var g = Math;
+ d = Math.max(e, d);
+ g = g.min.call(g, 2147483648, d + (65536 - d % 65536) % 65536);
+ a: {
+ d = ja.buffer;
+ try {
+ ja.grow(g - d.byteLength + 65535 >>> 16);
+ A();
+ var u = 1;
+ break a;
+ } catch (X) {
+ }
+ u = void 0;
+ }
+ if (u) return true;
+ }
+ return false;
+ }, f: function(e) {
+ return 52;
+ }, d: function(e, b, c, d, g) {
+ return 70;
+ }, c: function(e, b, c, d) {
+ for (var g = 0, u = 0; u < c; u++) {
+ var X = V[b >> 2], ab = V[b + 4 >> 2];
+ b += 8;
+ for (var sa = 0; sa < ab; sa++) {
+ var ta = ea[X + sa], ua = wd[e];
+ 0 === ta || 10 === ta ? ((1 === e ? ud : da)(p(ua, 0)), ua.length = 0) : ua.push(ta);
+ }
+ g += ab;
+ }
+ V[d >> 2] = g;
+ return 0;
+ } };
+ (function() {
+ function e(g, u) {
+ a.asm = g.exports;
+ ja = a.asm.h;
+ A();
+ oa.unshift(a.asm.i);
+ aa--;
+ a.monitorRunDependencies && a.monitorRunDependencies(aa);
+ 0 == aa && (null !== ra && (clearInterval(ra), ra = null), ia && (g = ia, ia = null, g()));
+ }
+ function b(g) {
+ e(g.instance);
+ }
+ function c(g) {
+ return v().then(function(u) {
+ return WebAssembly.instantiate(u, d);
+ }).then(function(u) {
+ return u;
+ }).then(g, function(u) {
+ da("failed to asynchronously prepare wasm: " + u);
+ f(u);
+ });
+ }
+ var d = { a: xd };
+ aa++;
+ a.monitorRunDependencies && a.monitorRunDependencies(aa);
+ if (a.instantiateWasm) try {
+ return a.instantiateWasm(d, e);
+ } catch (g) {
+ da("Module.instantiateWasm callback failed with error: " + g), ka(g);
+ }
+ (function() {
+ return fa || "function" != typeof WebAssembly.instantiateStreaming || P.startsWith("data:application/octet-stream;base64,") || P.startsWith("file://") || Ya || "function" != typeof fetch ? c(b) : fetch(P, { credentials: "same-origin" }).then(function(g) {
+ return WebAssembly.instantiateStreaming(g, d).then(b, function(u) {
+ da("wasm streaming compile failed: " + u);
+ da("falling back to ArrayBuffer instantiation");
+ return c(b);
+ });
+ });
+ })().catch(ka);
+ return {};
+ })();
+ var bb = a._emscripten_bind_VoidPtr___destroy___0 = function() {
+ return (bb = a._emscripten_bind_VoidPtr___destroy___0 = a.asm.k).apply(null, arguments);
+ }, Da = a._emscripten_bind_DecoderBuffer_DecoderBuffer_0 = function() {
+ return (Da = a._emscripten_bind_DecoderBuffer_DecoderBuffer_0 = a.asm.l).apply(null, arguments);
+ }, cb = a._emscripten_bind_DecoderBuffer_Init_2 = function() {
+ return (cb = a._emscripten_bind_DecoderBuffer_Init_2 = a.asm.m).apply(null, arguments);
+ }, db = a._emscripten_bind_DecoderBuffer___destroy___0 = function() {
+ return (db = a._emscripten_bind_DecoderBuffer___destroy___0 = a.asm.n).apply(null, arguments);
+ }, Ea = a._emscripten_bind_AttributeTransformData_AttributeTransformData_0 = function() {
+ return (Ea = a._emscripten_bind_AttributeTransformData_AttributeTransformData_0 = a.asm.o).apply(null, arguments);
+ }, eb = a._emscripten_bind_AttributeTransformData_transform_type_0 = function() {
+ return (eb = a._emscripten_bind_AttributeTransformData_transform_type_0 = a.asm.p).apply(null, arguments);
+ }, fb = a._emscripten_bind_AttributeTransformData___destroy___0 = function() {
+ return (fb = a._emscripten_bind_AttributeTransformData___destroy___0 = a.asm.q).apply(null, arguments);
+ }, Fa = a._emscripten_bind_GeometryAttribute_GeometryAttribute_0 = function() {
+ return (Fa = a._emscripten_bind_GeometryAttribute_GeometryAttribute_0 = a.asm.r).apply(null, arguments);
+ }, gb = a._emscripten_bind_GeometryAttribute___destroy___0 = function() {
+ return (gb = a._emscripten_bind_GeometryAttribute___destroy___0 = a.asm.s).apply(null, arguments);
+ }, Ga = a._emscripten_bind_PointAttribute_PointAttribute_0 = function() {
+ return (Ga = a._emscripten_bind_PointAttribute_PointAttribute_0 = a.asm.t).apply(null, arguments);
+ }, hb = a._emscripten_bind_PointAttribute_size_0 = function() {
+ return (hb = a._emscripten_bind_PointAttribute_size_0 = a.asm.u).apply(null, arguments);
+ }, ib = a._emscripten_bind_PointAttribute_GetAttributeTransformData_0 = function() {
+ return (ib = a._emscripten_bind_PointAttribute_GetAttributeTransformData_0 = a.asm.v).apply(null, arguments);
+ }, jb = a._emscripten_bind_PointAttribute_attribute_type_0 = function() {
+ return (jb = a._emscripten_bind_PointAttribute_attribute_type_0 = a.asm.w).apply(null, arguments);
+ }, kb = a._emscripten_bind_PointAttribute_data_type_0 = function() {
+ return (kb = a._emscripten_bind_PointAttribute_data_type_0 = a.asm.x).apply(null, arguments);
+ }, lb = a._emscripten_bind_PointAttribute_num_components_0 = function() {
+ return (lb = a._emscripten_bind_PointAttribute_num_components_0 = a.asm.y).apply(null, arguments);
+ }, mb = a._emscripten_bind_PointAttribute_normalized_0 = function() {
+ return (mb = a._emscripten_bind_PointAttribute_normalized_0 = a.asm.z).apply(null, arguments);
+ }, nb = a._emscripten_bind_PointAttribute_byte_stride_0 = function() {
+ return (nb = a._emscripten_bind_PointAttribute_byte_stride_0 = a.asm.A).apply(null, arguments);
+ }, ob = a._emscripten_bind_PointAttribute_byte_offset_0 = function() {
+ return (ob = a._emscripten_bind_PointAttribute_byte_offset_0 = a.asm.B).apply(null, arguments);
+ }, pb = a._emscripten_bind_PointAttribute_unique_id_0 = function() {
+ return (pb = a._emscripten_bind_PointAttribute_unique_id_0 = a.asm.C).apply(null, arguments);
+ }, qb = a._emscripten_bind_PointAttribute___destroy___0 = function() {
+ return (qb = a._emscripten_bind_PointAttribute___destroy___0 = a.asm.D).apply(null, arguments);
+ }, Ha = a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0 = function() {
+ return (Ha = a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0 = a.asm.E).apply(null, arguments);
+ }, rb = a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1 = function() {
+ return (rb = a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1 = a.asm.F).apply(null, arguments);
+ }, sb = a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0 = function() {
+ return (sb = a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0 = a.asm.G).apply(null, arguments);
+ }, tb = a._emscripten_bind_AttributeQuantizationTransform_min_value_1 = function() {
+ return (tb = a._emscripten_bind_AttributeQuantizationTransform_min_value_1 = a.asm.H).apply(null, arguments);
+ }, ub = a._emscripten_bind_AttributeQuantizationTransform_range_0 = function() {
+ return (ub = a._emscripten_bind_AttributeQuantizationTransform_range_0 = a.asm.I).apply(null, arguments);
+ }, vb = a._emscripten_bind_AttributeQuantizationTransform___destroy___0 = function() {
+ return (vb = a._emscripten_bind_AttributeQuantizationTransform___destroy___0 = a.asm.J).apply(null, arguments);
+ }, Ia = a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0 = function() {
+ return (Ia = a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0 = a.asm.K).apply(null, arguments);
+ }, wb = a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1 = function() {
+ return (wb = a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1 = a.asm.L).apply(
+ null,
+ arguments
+ );
+ }, xb = a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0 = function() {
+ return (xb = a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0 = a.asm.M).apply(null, arguments);
+ }, yb = a._emscripten_bind_AttributeOctahedronTransform___destroy___0 = function() {
+ return (yb = a._emscripten_bind_AttributeOctahedronTransform___destroy___0 = a.asm.N).apply(null, arguments);
+ }, Ja = a._emscripten_bind_PointCloud_PointCloud_0 = function() {
+ return (Ja = a._emscripten_bind_PointCloud_PointCloud_0 = a.asm.O).apply(
+ null,
+ arguments
+ );
+ }, zb = a._emscripten_bind_PointCloud_num_attributes_0 = function() {
+ return (zb = a._emscripten_bind_PointCloud_num_attributes_0 = a.asm.P).apply(null, arguments);
+ }, Ab = a._emscripten_bind_PointCloud_num_points_0 = function() {
+ return (Ab = a._emscripten_bind_PointCloud_num_points_0 = a.asm.Q).apply(null, arguments);
+ }, Bb = a._emscripten_bind_PointCloud___destroy___0 = function() {
+ return (Bb = a._emscripten_bind_PointCloud___destroy___0 = a.asm.R).apply(null, arguments);
+ }, Ka = a._emscripten_bind_Mesh_Mesh_0 = function() {
+ return (Ka = a._emscripten_bind_Mesh_Mesh_0 = a.asm.S).apply(null, arguments);
+ }, Cb = a._emscripten_bind_Mesh_num_faces_0 = function() {
+ return (Cb = a._emscripten_bind_Mesh_num_faces_0 = a.asm.T).apply(null, arguments);
+ }, Db = a._emscripten_bind_Mesh_num_attributes_0 = function() {
+ return (Db = a._emscripten_bind_Mesh_num_attributes_0 = a.asm.U).apply(null, arguments);
+ }, Eb = a._emscripten_bind_Mesh_num_points_0 = function() {
+ return (Eb = a._emscripten_bind_Mesh_num_points_0 = a.asm.V).apply(null, arguments);
+ }, Fb = a._emscripten_bind_Mesh___destroy___0 = function() {
+ return (Fb = a._emscripten_bind_Mesh___destroy___0 = a.asm.W).apply(null, arguments);
+ }, La = a._emscripten_bind_Metadata_Metadata_0 = function() {
+ return (La = a._emscripten_bind_Metadata_Metadata_0 = a.asm.X).apply(null, arguments);
+ }, Gb = a._emscripten_bind_Metadata___destroy___0 = function() {
+ return (Gb = a._emscripten_bind_Metadata___destroy___0 = a.asm.Y).apply(null, arguments);
+ }, Hb = a._emscripten_bind_Status_code_0 = function() {
+ return (Hb = a._emscripten_bind_Status_code_0 = a.asm.Z).apply(null, arguments);
+ }, Ib = a._emscripten_bind_Status_ok_0 = function() {
+ return (Ib = a._emscripten_bind_Status_ok_0 = a.asm._).apply(null, arguments);
+ }, Jb = a._emscripten_bind_Status_error_msg_0 = function() {
+ return (Jb = a._emscripten_bind_Status_error_msg_0 = a.asm.$).apply(null, arguments);
+ }, Kb = a._emscripten_bind_Status___destroy___0 = function() {
+ return (Kb = a._emscripten_bind_Status___destroy___0 = a.asm.aa).apply(null, arguments);
+ }, Ma = a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0 = function() {
+ return (Ma = a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0 = a.asm.ba).apply(null, arguments);
+ }, Lb = a._emscripten_bind_DracoFloat32Array_GetValue_1 = function() {
+ return (Lb = a._emscripten_bind_DracoFloat32Array_GetValue_1 = a.asm.ca).apply(null, arguments);
+ }, Mb = a._emscripten_bind_DracoFloat32Array_size_0 = function() {
+ return (Mb = a._emscripten_bind_DracoFloat32Array_size_0 = a.asm.da).apply(null, arguments);
+ }, Nb = a._emscripten_bind_DracoFloat32Array___destroy___0 = function() {
+ return (Nb = a._emscripten_bind_DracoFloat32Array___destroy___0 = a.asm.ea).apply(null, arguments);
+ }, Na = a._emscripten_bind_DracoInt8Array_DracoInt8Array_0 = function() {
+ return (Na = a._emscripten_bind_DracoInt8Array_DracoInt8Array_0 = a.asm.fa).apply(null, arguments);
+ }, Ob = a._emscripten_bind_DracoInt8Array_GetValue_1 = function() {
+ return (Ob = a._emscripten_bind_DracoInt8Array_GetValue_1 = a.asm.ga).apply(null, arguments);
+ }, Pb = a._emscripten_bind_DracoInt8Array_size_0 = function() {
+ return (Pb = a._emscripten_bind_DracoInt8Array_size_0 = a.asm.ha).apply(null, arguments);
+ }, Qb = a._emscripten_bind_DracoInt8Array___destroy___0 = function() {
+ return (Qb = a._emscripten_bind_DracoInt8Array___destroy___0 = a.asm.ia).apply(null, arguments);
+ }, Oa = a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0 = function() {
+ return (Oa = a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0 = a.asm.ja).apply(null, arguments);
+ }, Rb = a._emscripten_bind_DracoUInt8Array_GetValue_1 = function() {
+ return (Rb = a._emscripten_bind_DracoUInt8Array_GetValue_1 = a.asm.ka).apply(null, arguments);
+ }, Sb = a._emscripten_bind_DracoUInt8Array_size_0 = function() {
+ return (Sb = a._emscripten_bind_DracoUInt8Array_size_0 = a.asm.la).apply(null, arguments);
+ }, Tb = a._emscripten_bind_DracoUInt8Array___destroy___0 = function() {
+ return (Tb = a._emscripten_bind_DracoUInt8Array___destroy___0 = a.asm.ma).apply(null, arguments);
+ }, Pa = a._emscripten_bind_DracoInt16Array_DracoInt16Array_0 = function() {
+ return (Pa = a._emscripten_bind_DracoInt16Array_DracoInt16Array_0 = a.asm.na).apply(null, arguments);
+ }, Ub = a._emscripten_bind_DracoInt16Array_GetValue_1 = function() {
+ return (Ub = a._emscripten_bind_DracoInt16Array_GetValue_1 = a.asm.oa).apply(null, arguments);
+ }, Vb = a._emscripten_bind_DracoInt16Array_size_0 = function() {
+ return (Vb = a._emscripten_bind_DracoInt16Array_size_0 = a.asm.pa).apply(null, arguments);
+ }, Wb = a._emscripten_bind_DracoInt16Array___destroy___0 = function() {
+ return (Wb = a._emscripten_bind_DracoInt16Array___destroy___0 = a.asm.qa).apply(null, arguments);
+ }, Qa = a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0 = function() {
+ return (Qa = a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0 = a.asm.ra).apply(null, arguments);
+ }, Xb = a._emscripten_bind_DracoUInt16Array_GetValue_1 = function() {
+ return (Xb = a._emscripten_bind_DracoUInt16Array_GetValue_1 = a.asm.sa).apply(null, arguments);
+ }, Yb = a._emscripten_bind_DracoUInt16Array_size_0 = function() {
+ return (Yb = a._emscripten_bind_DracoUInt16Array_size_0 = a.asm.ta).apply(null, arguments);
+ }, Zb = a._emscripten_bind_DracoUInt16Array___destroy___0 = function() {
+ return (Zb = a._emscripten_bind_DracoUInt16Array___destroy___0 = a.asm.ua).apply(null, arguments);
+ }, Ra = a._emscripten_bind_DracoInt32Array_DracoInt32Array_0 = function() {
+ return (Ra = a._emscripten_bind_DracoInt32Array_DracoInt32Array_0 = a.asm.va).apply(null, arguments);
+ }, $b = a._emscripten_bind_DracoInt32Array_GetValue_1 = function() {
+ return ($b = a._emscripten_bind_DracoInt32Array_GetValue_1 = a.asm.wa).apply(null, arguments);
+ }, ac = a._emscripten_bind_DracoInt32Array_size_0 = function() {
+ return (ac = a._emscripten_bind_DracoInt32Array_size_0 = a.asm.xa).apply(null, arguments);
+ }, bc = a._emscripten_bind_DracoInt32Array___destroy___0 = function() {
+ return (bc = a._emscripten_bind_DracoInt32Array___destroy___0 = a.asm.ya).apply(null, arguments);
+ }, Sa = a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0 = function() {
+ return (Sa = a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0 = a.asm.za).apply(null, arguments);
+ }, cc = a._emscripten_bind_DracoUInt32Array_GetValue_1 = function() {
+ return (cc = a._emscripten_bind_DracoUInt32Array_GetValue_1 = a.asm.Aa).apply(null, arguments);
+ }, dc = a._emscripten_bind_DracoUInt32Array_size_0 = function() {
+ return (dc = a._emscripten_bind_DracoUInt32Array_size_0 = a.asm.Ba).apply(null, arguments);
+ }, ec = a._emscripten_bind_DracoUInt32Array___destroy___0 = function() {
+ return (ec = a._emscripten_bind_DracoUInt32Array___destroy___0 = a.asm.Ca).apply(null, arguments);
+ }, Ta = a._emscripten_bind_MetadataQuerier_MetadataQuerier_0 = function() {
+ return (Ta = a._emscripten_bind_MetadataQuerier_MetadataQuerier_0 = a.asm.Da).apply(null, arguments);
+ }, fc = a._emscripten_bind_MetadataQuerier_HasEntry_2 = function() {
+ return (fc = a._emscripten_bind_MetadataQuerier_HasEntry_2 = a.asm.Ea).apply(null, arguments);
+ }, gc = a._emscripten_bind_MetadataQuerier_GetIntEntry_2 = function() {
+ return (gc = a._emscripten_bind_MetadataQuerier_GetIntEntry_2 = a.asm.Fa).apply(null, arguments);
+ }, hc = a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3 = function() {
+ return (hc = a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3 = a.asm.Ga).apply(null, arguments);
+ }, ic = a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2 = function() {
+ return (ic = a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2 = a.asm.Ha).apply(null, arguments);
+ }, jc = a._emscripten_bind_MetadataQuerier_GetStringEntry_2 = function() {
+ return (jc = a._emscripten_bind_MetadataQuerier_GetStringEntry_2 = a.asm.Ia).apply(null, arguments);
+ }, kc = a._emscripten_bind_MetadataQuerier_NumEntries_1 = function() {
+ return (kc = a._emscripten_bind_MetadataQuerier_NumEntries_1 = a.asm.Ja).apply(null, arguments);
+ }, lc = a._emscripten_bind_MetadataQuerier_GetEntryName_2 = function() {
+ return (lc = a._emscripten_bind_MetadataQuerier_GetEntryName_2 = a.asm.Ka).apply(null, arguments);
+ }, mc = a._emscripten_bind_MetadataQuerier___destroy___0 = function() {
+ return (mc = a._emscripten_bind_MetadataQuerier___destroy___0 = a.asm.La).apply(null, arguments);
+ }, Ua = a._emscripten_bind_Decoder_Decoder_0 = function() {
+ return (Ua = a._emscripten_bind_Decoder_Decoder_0 = a.asm.Ma).apply(null, arguments);
+ }, nc = a._emscripten_bind_Decoder_DecodeArrayToPointCloud_3 = function() {
+ return (nc = a._emscripten_bind_Decoder_DecodeArrayToPointCloud_3 = a.asm.Na).apply(null, arguments);
+ }, oc = a._emscripten_bind_Decoder_DecodeArrayToMesh_3 = function() {
+ return (oc = a._emscripten_bind_Decoder_DecodeArrayToMesh_3 = a.asm.Oa).apply(null, arguments);
+ }, pc = a._emscripten_bind_Decoder_GetAttributeId_2 = function() {
+ return (pc = a._emscripten_bind_Decoder_GetAttributeId_2 = a.asm.Pa).apply(null, arguments);
+ }, qc = a._emscripten_bind_Decoder_GetAttributeIdByName_2 = function() {
+ return (qc = a._emscripten_bind_Decoder_GetAttributeIdByName_2 = a.asm.Qa).apply(null, arguments);
+ }, rc = a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3 = function() {
+ return (rc = a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3 = a.asm.Ra).apply(null, arguments);
+ }, sc = a._emscripten_bind_Decoder_GetAttribute_2 = function() {
+ return (sc = a._emscripten_bind_Decoder_GetAttribute_2 = a.asm.Sa).apply(null, arguments);
+ }, tc = a._emscripten_bind_Decoder_GetAttributeByUniqueId_2 = function() {
+ return (tc = a._emscripten_bind_Decoder_GetAttributeByUniqueId_2 = a.asm.Ta).apply(null, arguments);
+ }, uc = a._emscripten_bind_Decoder_GetMetadata_1 = function() {
+ return (uc = a._emscripten_bind_Decoder_GetMetadata_1 = a.asm.Ua).apply(null, arguments);
+ }, vc = a._emscripten_bind_Decoder_GetAttributeMetadata_2 = function() {
+ return (vc = a._emscripten_bind_Decoder_GetAttributeMetadata_2 = a.asm.Va).apply(null, arguments);
+ }, wc = a._emscripten_bind_Decoder_GetFaceFromMesh_3 = function() {
+ return (wc = a._emscripten_bind_Decoder_GetFaceFromMesh_3 = a.asm.Wa).apply(null, arguments);
+ }, xc = a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2 = function() {
+ return (xc = a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2 = a.asm.Xa).apply(null, arguments);
+ }, yc = a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3 = function() {
+ return (yc = a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3 = a.asm.Ya).apply(null, arguments);
+ }, zc = a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3 = function() {
+ return (zc = a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3 = a.asm.Za).apply(null, arguments);
+ }, Ac = a._emscripten_bind_Decoder_GetAttributeFloat_3 = function() {
+ return (Ac = a._emscripten_bind_Decoder_GetAttributeFloat_3 = a.asm._a).apply(null, arguments);
+ }, Bc = a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3 = function() {
+ return (Bc = a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3 = a.asm.$a).apply(null, arguments);
+ }, Cc = a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3 = function() {
+ return (Cc = a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3 = a.asm.ab).apply(null, arguments);
+ }, Dc = a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3 = function() {
+ return (Dc = a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3 = a.asm.bb).apply(null, arguments);
+ }, Ec = a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3 = function() {
+ return (Ec = a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3 = a.asm.cb).apply(null, arguments);
+ }, Fc = a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3 = function() {
+ return (Fc = a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3 = a.asm.db).apply(null, arguments);
+ }, Gc = a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3 = function() {
+ return (Gc = a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3 = a.asm.eb).apply(null, arguments);
+ }, Hc = a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3 = function() {
+ return (Hc = a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3 = a.asm.fb).apply(null, arguments);
+ }, Ic = a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3 = function() {
+ return (Ic = a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3 = a.asm.gb).apply(null, arguments);
+ }, Jc = a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5 = function() {
+ return (Jc = a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5 = a.asm.hb).apply(null, arguments);
+ }, Kc = a._emscripten_bind_Decoder_SkipAttributeTransform_1 = function() {
+ return (Kc = a._emscripten_bind_Decoder_SkipAttributeTransform_1 = a.asm.ib).apply(null, arguments);
+ }, Lc = a._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1 = function() {
+ return (Lc = a._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1 = a.asm.jb).apply(null, arguments);
+ }, Mc = a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2 = function() {
+ return (Mc = a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2 = a.asm.kb).apply(null, arguments);
+ }, Nc = a._emscripten_bind_Decoder_DecodeBufferToMesh_2 = function() {
+ return (Nc = a._emscripten_bind_Decoder_DecodeBufferToMesh_2 = a.asm.lb).apply(null, arguments);
+ }, Oc = a._emscripten_bind_Decoder___destroy___0 = function() {
+ return (Oc = a._emscripten_bind_Decoder___destroy___0 = a.asm.mb).apply(null, arguments);
+ }, Pc = a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM = function() {
+ return (Pc = a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM = a.asm.nb).apply(null, arguments);
+ }, Qc = a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM = function() {
+ return (Qc = a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM = a.asm.ob).apply(null, arguments);
+ }, Rc = a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM = function() {
+ return (Rc = a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM = a.asm.pb).apply(null, arguments);
+ }, Sc = a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM = function() {
+ return (Sc = a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM = a.asm.qb).apply(null, arguments);
+ }, Tc = a._emscripten_enum_draco_GeometryAttribute_Type_INVALID = function() {
+ return (Tc = a._emscripten_enum_draco_GeometryAttribute_Type_INVALID = a.asm.rb).apply(null, arguments);
+ }, Uc = a._emscripten_enum_draco_GeometryAttribute_Type_POSITION = function() {
+ return (Uc = a._emscripten_enum_draco_GeometryAttribute_Type_POSITION = a.asm.sb).apply(null, arguments);
+ }, Vc = a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL = function() {
+ return (Vc = a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL = a.asm.tb).apply(null, arguments);
+ }, Wc = a._emscripten_enum_draco_GeometryAttribute_Type_COLOR = function() {
+ return (Wc = a._emscripten_enum_draco_GeometryAttribute_Type_COLOR = a.asm.ub).apply(null, arguments);
+ }, Xc = a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD = function() {
+ return (Xc = a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD = a.asm.vb).apply(null, arguments);
+ }, Yc = a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC = function() {
+ return (Yc = a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC = a.asm.wb).apply(null, arguments);
+ }, Zc = a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE = function() {
+ return (Zc = a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE = a.asm.xb).apply(null, arguments);
+ }, $c = a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD = function() {
+ return ($c = a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD = a.asm.yb).apply(null, arguments);
+ }, ad = a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH = function() {
+ return (ad = a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH = a.asm.zb).apply(null, arguments);
+ }, bd = a._emscripten_enum_draco_DataType_DT_INVALID = function() {
+ return (bd = a._emscripten_enum_draco_DataType_DT_INVALID = a.asm.Ab).apply(null, arguments);
+ }, cd = a._emscripten_enum_draco_DataType_DT_INT8 = function() {
+ return (cd = a._emscripten_enum_draco_DataType_DT_INT8 = a.asm.Bb).apply(null, arguments);
+ }, dd = a._emscripten_enum_draco_DataType_DT_UINT8 = function() {
+ return (dd = a._emscripten_enum_draco_DataType_DT_UINT8 = a.asm.Cb).apply(null, arguments);
+ }, ed = a._emscripten_enum_draco_DataType_DT_INT16 = function() {
+ return (ed = a._emscripten_enum_draco_DataType_DT_INT16 = a.asm.Db).apply(null, arguments);
+ }, fd = a._emscripten_enum_draco_DataType_DT_UINT16 = function() {
+ return (fd = a._emscripten_enum_draco_DataType_DT_UINT16 = a.asm.Eb).apply(null, arguments);
+ }, gd = a._emscripten_enum_draco_DataType_DT_INT32 = function() {
+ return (gd = a._emscripten_enum_draco_DataType_DT_INT32 = a.asm.Fb).apply(null, arguments);
+ }, hd = a._emscripten_enum_draco_DataType_DT_UINT32 = function() {
+ return (hd = a._emscripten_enum_draco_DataType_DT_UINT32 = a.asm.Gb).apply(null, arguments);
+ }, id = a._emscripten_enum_draco_DataType_DT_INT64 = function() {
+ return (id = a._emscripten_enum_draco_DataType_DT_INT64 = a.asm.Hb).apply(null, arguments);
+ }, jd = a._emscripten_enum_draco_DataType_DT_UINT64 = function() {
+ return (jd = a._emscripten_enum_draco_DataType_DT_UINT64 = a.asm.Ib).apply(null, arguments);
+ }, kd = a._emscripten_enum_draco_DataType_DT_FLOAT32 = function() {
+ return (kd = a._emscripten_enum_draco_DataType_DT_FLOAT32 = a.asm.Jb).apply(
+ null,
+ arguments
+ );
+ }, ld = a._emscripten_enum_draco_DataType_DT_FLOAT64 = function() {
+ return (ld = a._emscripten_enum_draco_DataType_DT_FLOAT64 = a.asm.Kb).apply(null, arguments);
+ }, md = a._emscripten_enum_draco_DataType_DT_BOOL = function() {
+ return (md = a._emscripten_enum_draco_DataType_DT_BOOL = a.asm.Lb).apply(null, arguments);
+ }, nd = a._emscripten_enum_draco_DataType_DT_TYPES_COUNT = function() {
+ return (nd = a._emscripten_enum_draco_DataType_DT_TYPES_COUNT = a.asm.Mb).apply(null, arguments);
+ }, od = a._emscripten_enum_draco_StatusCode_OK = function() {
+ return (od = a._emscripten_enum_draco_StatusCode_OK = a.asm.Nb).apply(null, arguments);
+ }, pd = a._emscripten_enum_draco_StatusCode_DRACO_ERROR = function() {
+ return (pd = a._emscripten_enum_draco_StatusCode_DRACO_ERROR = a.asm.Ob).apply(null, arguments);
+ }, qd = a._emscripten_enum_draco_StatusCode_IO_ERROR = function() {
+ return (qd = a._emscripten_enum_draco_StatusCode_IO_ERROR = a.asm.Pb).apply(null, arguments);
+ }, rd = a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER = function() {
+ return (rd = a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER = a.asm.Qb).apply(null, arguments);
+ }, sd = a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION = function() {
+ return (sd = a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION = a.asm.Rb).apply(null, arguments);
+ }, td = a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION = function() {
+ return (td = a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION = a.asm.Sb).apply(null, arguments);
+ };
+ a._malloc = function() {
+ return (a._malloc = a.asm.Tb).apply(null, arguments);
+ };
+ a._free = function() {
+ return (a._free = a.asm.Ub).apply(null, arguments);
+ };
+ var ya = function() {
+ return (ya = a.asm.Vb).apply(null, arguments);
+ };
+ a.___start_em_js = 15856;
+ a.___stop_em_js = 15954;
+ var la;
+ ia = function b() {
+ la || ba();
+ la || (ia = b);
+ };
+ if (a.preInit) for ("function" == typeof a.preInit && (a.preInit = [a.preInit]); 0 < a.preInit.length; ) a.preInit.pop()();
+ ba();
+ t.prototype = Object.create(t.prototype);
+ t.prototype.constructor = t;
+ t.prototype.__class__ = t;
+ t.__cache__ = {};
+ a.WrapperObject = t;
+ a.getCache = x;
+ a.wrapPointer = D;
+ a.castObject = function(b, c) {
+ return D(b.ptr, c);
+ };
+ a.NULL = D(0);
+ a.destroy = function(b) {
+ if (!b.__destroy__) throw "Error: Cannot destroy object. (Did you create it yourself?)";
+ b.__destroy__();
+ delete x(b.__class__)[b.ptr];
+ };
+ a.compare = function(b, c) {
+ return b.ptr === c.ptr;
+ };
+ a.getPointer = function(b) {
+ return b.ptr;
+ };
+ a.getClass = function(b) {
+ return b.__class__;
+ };
+ var r = { buffer: 0, size: 0, pos: 0, temps: [], needed: 0, prepare: function() {
+ if (r.needed) {
+ for (var b = 0; b < r.temps.length; b++) a._free(r.temps[b]);
+ r.temps.length = 0;
+ a._free(r.buffer);
+ r.buffer = 0;
+ r.size += r.needed;
+ r.needed = 0;
+ }
+ r.buffer || (r.size += 128, r.buffer = a._malloc(r.size), r.buffer || f(void 0));
+ r.pos = 0;
+ }, alloc: function(b, c) {
+ r.buffer || f(void 0);
+ b = b.length * c.BYTES_PER_ELEMENT;
+ b = b + 7 & -8;
+ r.pos + b >= r.size ? (0 < b || f(void 0), r.needed += b, c = a._malloc(b), r.temps.push(c)) : (c = r.buffer + r.pos, r.pos += b);
+ return c;
+ }, copy: function(b, c, d) {
+ d >>>= 0;
+ switch (c.BYTES_PER_ELEMENT) {
+ case 2:
+ d >>>= 1;
+ break;
+ case 4:
+ d >>>= 2;
+ break;
+ case 8:
+ d >>>= 3;
+ }
+ for (var g = 0; g < b.length; g++) c[d + g] = b[g];
+ } };
+ Z.prototype = Object.create(t.prototype);
+ Z.prototype.constructor = Z;
+ Z.prototype.__class__ = Z;
+ Z.__cache__ = {};
+ a.VoidPtr = Z;
+ Z.prototype.__destroy__ = Z.prototype.__destroy__ = function() {
+ bb(this.ptr);
+ };
+ S.prototype = Object.create(t.prototype);
+ S.prototype.constructor = S;
+ S.prototype.__class__ = S;
+ S.__cache__ = {};
+ a.DecoderBuffer = S;
+ S.prototype.Init = S.prototype.Init = function(b, c) {
+ var d = this.ptr;
+ r.prepare();
+ "object" == typeof b && (b = pa(b));
+ c && "object" === typeof c && (c = c.ptr);
+ cb(d, b, c);
+ };
+ S.prototype.__destroy__ = S.prototype.__destroy__ = function() {
+ db(this.ptr);
+ };
+ Q.prototype = Object.create(t.prototype);
+ Q.prototype.constructor = Q;
+ Q.prototype.__class__ = Q;
+ Q.__cache__ = {};
+ a.AttributeTransformData = Q;
+ Q.prototype.transform_type = Q.prototype.transform_type = function() {
+ return eb(this.ptr);
+ };
+ Q.prototype.__destroy__ = Q.prototype.__destroy__ = function() {
+ fb(this.ptr);
+ };
+ W.prototype = Object.create(t.prototype);
+ W.prototype.constructor = W;
+ W.prototype.__class__ = W;
+ W.__cache__ = {};
+ a.GeometryAttribute = W;
+ W.prototype.__destroy__ = W.prototype.__destroy__ = function() {
+ gb(this.ptr);
+ };
+ w.prototype = Object.create(t.prototype);
+ w.prototype.constructor = w;
+ w.prototype.__class__ = w;
+ w.__cache__ = {};
+ a.PointAttribute = w;
+ w.prototype.size = w.prototype.size = function() {
+ return hb(this.ptr);
+ };
+ w.prototype.GetAttributeTransformData = w.prototype.GetAttributeTransformData = function() {
+ return D(ib(this.ptr), Q);
+ };
+ w.prototype.attribute_type = w.prototype.attribute_type = function() {
+ return jb(this.ptr);
+ };
+ w.prototype.data_type = w.prototype.data_type = function() {
+ return kb(this.ptr);
+ };
+ w.prototype.num_components = w.prototype.num_components = function() {
+ return lb(this.ptr);
+ };
+ w.prototype.normalized = w.prototype.normalized = function() {
+ return !!mb(this.ptr);
+ };
+ w.prototype.byte_stride = w.prototype.byte_stride = function() {
+ return nb(this.ptr);
+ };
+ w.prototype.byte_offset = w.prototype.byte_offset = function() {
+ return ob(this.ptr);
+ };
+ w.prototype.unique_id = w.prototype.unique_id = function() {
+ return pb(this.ptr);
+ };
+ w.prototype.__destroy__ = w.prototype.__destroy__ = function() {
+ qb(this.ptr);
+ };
+ C.prototype = Object.create(t.prototype);
+ C.prototype.constructor = C;
+ C.prototype.__class__ = C;
+ C.__cache__ = {};
+ a.AttributeQuantizationTransform = C;
+ C.prototype.InitFromAttribute = C.prototype.InitFromAttribute = function(b) {
+ var c = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ return !!rb(c, b);
+ };
+ C.prototype.quantization_bits = C.prototype.quantization_bits = function() {
+ return sb(this.ptr);
+ };
+ C.prototype.min_value = C.prototype.min_value = function(b) {
+ var c = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ return tb(c, b);
+ };
+ C.prototype.range = C.prototype.range = function() {
+ return ub(this.ptr);
+ };
+ C.prototype.__destroy__ = C.prototype.__destroy__ = function() {
+ vb(this.ptr);
+ };
+ F.prototype = Object.create(t.prototype);
+ F.prototype.constructor = F;
+ F.prototype.__class__ = F;
+ F.__cache__ = {};
+ a.AttributeOctahedronTransform = F;
+ F.prototype.InitFromAttribute = F.prototype.InitFromAttribute = function(b) {
+ var c = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ return !!wb(c, b);
+ };
+ F.prototype.quantization_bits = F.prototype.quantization_bits = function() {
+ return xb(this.ptr);
+ };
+ F.prototype.__destroy__ = F.prototype.__destroy__ = function() {
+ yb(this.ptr);
+ };
+ G.prototype = Object.create(t.prototype);
+ G.prototype.constructor = G;
+ G.prototype.__class__ = G;
+ G.__cache__ = {};
+ a.PointCloud = G;
+ G.prototype.num_attributes = G.prototype.num_attributes = function() {
+ return zb(this.ptr);
+ };
+ G.prototype.num_points = G.prototype.num_points = function() {
+ return Ab(this.ptr);
+ };
+ G.prototype.__destroy__ = G.prototype.__destroy__ = function() {
+ Bb(this.ptr);
+ };
+ E.prototype = Object.create(t.prototype);
+ E.prototype.constructor = E;
+ E.prototype.__class__ = E;
+ E.__cache__ = {};
+ a.Mesh = E;
+ E.prototype.num_faces = E.prototype.num_faces = function() {
+ return Cb(this.ptr);
+ };
+ E.prototype.num_attributes = E.prototype.num_attributes = function() {
+ return Db(this.ptr);
+ };
+ E.prototype.num_points = E.prototype.num_points = function() {
+ return Eb(this.ptr);
+ };
+ E.prototype.__destroy__ = E.prototype.__destroy__ = function() {
+ Fb(this.ptr);
+ };
+ T.prototype = Object.create(t.prototype);
+ T.prototype.constructor = T;
+ T.prototype.__class__ = T;
+ T.__cache__ = {};
+ a.Metadata = T;
+ T.prototype.__destroy__ = T.prototype.__destroy__ = function() {
+ Gb(this.ptr);
+ };
+ B.prototype = Object.create(t.prototype);
+ B.prototype.constructor = B;
+ B.prototype.__class__ = B;
+ B.__cache__ = {};
+ a.Status = B;
+ B.prototype.code = B.prototype.code = function() {
+ return Hb(this.ptr);
+ };
+ B.prototype.ok = B.prototype.ok = function() {
+ return !!Ib(this.ptr);
+ };
+ B.prototype.error_msg = B.prototype.error_msg = function() {
+ return h(Jb(this.ptr));
+ };
+ B.prototype.__destroy__ = B.prototype.__destroy__ = function() {
+ Kb(this.ptr);
+ };
+ H.prototype = Object.create(t.prototype);
+ H.prototype.constructor = H;
+ H.prototype.__class__ = H;
+ H.__cache__ = {};
+ a.DracoFloat32Array = H;
+ H.prototype.GetValue = H.prototype.GetValue = function(b) {
+ var c = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ return Lb(c, b);
+ };
+ H.prototype.size = H.prototype.size = function() {
+ return Mb(this.ptr);
+ };
+ H.prototype.__destroy__ = H.prototype.__destroy__ = function() {
+ Nb(this.ptr);
+ };
+ I.prototype = Object.create(t.prototype);
+ I.prototype.constructor = I;
+ I.prototype.__class__ = I;
+ I.__cache__ = {};
+ a.DracoInt8Array = I;
+ I.prototype.GetValue = I.prototype.GetValue = function(b) {
+ var c = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ return Ob(c, b);
+ };
+ I.prototype.size = I.prototype.size = function() {
+ return Pb(this.ptr);
+ };
+ I.prototype.__destroy__ = I.prototype.__destroy__ = function() {
+ Qb(this.ptr);
+ };
+ J.prototype = Object.create(t.prototype);
+ J.prototype.constructor = J;
+ J.prototype.__class__ = J;
+ J.__cache__ = {};
+ a.DracoUInt8Array = J;
+ J.prototype.GetValue = J.prototype.GetValue = function(b) {
+ var c = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ return Rb(c, b);
+ };
+ J.prototype.size = J.prototype.size = function() {
+ return Sb(this.ptr);
+ };
+ J.prototype.__destroy__ = J.prototype.__destroy__ = function() {
+ Tb(this.ptr);
+ };
+ K.prototype = Object.create(t.prototype);
+ K.prototype.constructor = K;
+ K.prototype.__class__ = K;
+ K.__cache__ = {};
+ a.DracoInt16Array = K;
+ K.prototype.GetValue = K.prototype.GetValue = function(b) {
+ var c = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ return Ub(c, b);
+ };
+ K.prototype.size = K.prototype.size = function() {
+ return Vb(this.ptr);
+ };
+ K.prototype.__destroy__ = K.prototype.__destroy__ = function() {
+ Wb(this.ptr);
+ };
+ L.prototype = Object.create(t.prototype);
+ L.prototype.constructor = L;
+ L.prototype.__class__ = L;
+ L.__cache__ = {};
+ a.DracoUInt16Array = L;
+ L.prototype.GetValue = L.prototype.GetValue = function(b) {
+ var c = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ return Xb(c, b);
+ };
+ L.prototype.size = L.prototype.size = function() {
+ return Yb(this.ptr);
+ };
+ L.prototype.__destroy__ = L.prototype.__destroy__ = function() {
+ Zb(this.ptr);
+ };
+ M.prototype = Object.create(t.prototype);
+ M.prototype.constructor = M;
+ M.prototype.__class__ = M;
+ M.__cache__ = {};
+ a.DracoInt32Array = M;
+ M.prototype.GetValue = M.prototype.GetValue = function(b) {
+ var c = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ return $b(c, b);
+ };
+ M.prototype.size = M.prototype.size = function() {
+ return ac(this.ptr);
+ };
+ M.prototype.__destroy__ = M.prototype.__destroy__ = function() {
+ bc(this.ptr);
+ };
+ N.prototype = Object.create(t.prototype);
+ N.prototype.constructor = N;
+ N.prototype.__class__ = N;
+ N.__cache__ = {};
+ a.DracoUInt32Array = N;
+ N.prototype.GetValue = N.prototype.GetValue = function(b) {
+ var c = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ return cc(c, b);
+ };
+ N.prototype.size = N.prototype.size = function() {
+ return dc(this.ptr);
+ };
+ N.prototype.__destroy__ = N.prototype.__destroy__ = function() {
+ ec(this.ptr);
+ };
+ y.prototype = Object.create(t.prototype);
+ y.prototype.constructor = y;
+ y.prototype.__class__ = y;
+ y.__cache__ = {};
+ a.MetadataQuerier = y;
+ y.prototype.HasEntry = y.prototype.HasEntry = function(b, c) {
+ var d = this.ptr;
+ r.prepare();
+ b && "object" === typeof b && (b = b.ptr);
+ c = c && "object" === typeof c ? c.ptr : R(c);
+ return !!fc(d, b, c);
+ };
+ y.prototype.GetIntEntry = y.prototype.GetIntEntry = function(b, c) {
+ var d = this.ptr;
+ r.prepare();
+ b && "object" === typeof b && (b = b.ptr);
+ c = c && "object" === typeof c ? c.ptr : R(c);
+ return gc(d, b, c);
+ };
+ y.prototype.GetIntEntryArray = y.prototype.GetIntEntryArray = function(b, c, d) {
+ var g = this.ptr;
+ r.prepare();
+ b && "object" === typeof b && (b = b.ptr);
+ c = c && "object" === typeof c ? c.ptr : R(c);
+ d && "object" === typeof d && (d = d.ptr);
+ hc(g, b, c, d);
+ };
+ y.prototype.GetDoubleEntry = y.prototype.GetDoubleEntry = function(b, c) {
+ var d = this.ptr;
+ r.prepare();
+ b && "object" === typeof b && (b = b.ptr);
+ c = c && "object" === typeof c ? c.ptr : R(c);
+ return ic(d, b, c);
+ };
+ y.prototype.GetStringEntry = y.prototype.GetStringEntry = function(b, c) {
+ var d = this.ptr;
+ r.prepare();
+ b && "object" === typeof b && (b = b.ptr);
+ c = c && "object" === typeof c ? c.ptr : R(c);
+ return h(jc(d, b, c));
+ };
+ y.prototype.NumEntries = y.prototype.NumEntries = function(b) {
+ var c = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ return kc(c, b);
+ };
+ y.prototype.GetEntryName = y.prototype.GetEntryName = function(b, c) {
+ var d = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ c && "object" === typeof c && (c = c.ptr);
+ return h(lc(d, b, c));
+ };
+ y.prototype.__destroy__ = y.prototype.__destroy__ = function() {
+ mc(this.ptr);
+ };
+ m.prototype = Object.create(t.prototype);
+ m.prototype.constructor = m;
+ m.prototype.__class__ = m;
+ m.__cache__ = {};
+ a.Decoder = m;
+ m.prototype.DecodeArrayToPointCloud = m.prototype.DecodeArrayToPointCloud = function(b, c, d) {
+ var g = this.ptr;
+ r.prepare();
+ "object" == typeof b && (b = pa(b));
+ c && "object" === typeof c && (c = c.ptr);
+ d && "object" === typeof d && (d = d.ptr);
+ return D(nc(g, b, c, d), B);
+ };
+ m.prototype.DecodeArrayToMesh = m.prototype.DecodeArrayToMesh = function(b, c, d) {
+ var g = this.ptr;
+ r.prepare();
+ "object" == typeof b && (b = pa(b));
+ c && "object" === typeof c && (c = c.ptr);
+ d && "object" === typeof d && (d = d.ptr);
+ return D(oc(g, b, c, d), B);
+ };
+ m.prototype.GetAttributeId = m.prototype.GetAttributeId = function(b, c) {
+ var d = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ c && "object" === typeof c && (c = c.ptr);
+ return pc(d, b, c);
+ };
+ m.prototype.GetAttributeIdByName = m.prototype.GetAttributeIdByName = function(b, c) {
+ var d = this.ptr;
+ r.prepare();
+ b && "object" === typeof b && (b = b.ptr);
+ c = c && "object" === typeof c ? c.ptr : R(c);
+ return qc(d, b, c);
+ };
+ m.prototype.GetAttributeIdByMetadataEntry = m.prototype.GetAttributeIdByMetadataEntry = function(b, c, d) {
+ var g = this.ptr;
+ r.prepare();
+ b && "object" === typeof b && (b = b.ptr);
+ c = c && "object" === typeof c ? c.ptr : R(c);
+ d = d && "object" === typeof d ? d.ptr : R(d);
+ return rc(g, b, c, d);
+ };
+ m.prototype.GetAttribute = m.prototype.GetAttribute = function(b, c) {
+ var d = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ c && "object" === typeof c && (c = c.ptr);
+ return D(sc(d, b, c), w);
+ };
+ m.prototype.GetAttributeByUniqueId = m.prototype.GetAttributeByUniqueId = function(b, c) {
+ var d = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ c && "object" === typeof c && (c = c.ptr);
+ return D(tc(d, b, c), w);
+ };
+ m.prototype.GetMetadata = m.prototype.GetMetadata = function(b) {
+ var c = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ return D(uc(c, b), T);
+ };
+ m.prototype.GetAttributeMetadata = m.prototype.GetAttributeMetadata = function(b, c) {
+ var d = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ c && "object" === typeof c && (c = c.ptr);
+ return D(vc(d, b, c), T);
+ };
+ m.prototype.GetFaceFromMesh = m.prototype.GetFaceFromMesh = function(b, c, d) {
+ var g = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ c && "object" === typeof c && (c = c.ptr);
+ d && "object" === typeof d && (d = d.ptr);
+ return !!wc(g, b, c, d);
+ };
+ m.prototype.GetTriangleStripsFromMesh = m.prototype.GetTriangleStripsFromMesh = function(b, c) {
+ var d = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ c && "object" === typeof c && (c = c.ptr);
+ return xc(d, b, c);
+ };
+ m.prototype.GetTrianglesUInt16Array = m.prototype.GetTrianglesUInt16Array = function(b, c, d) {
+ var g = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ c && "object" === typeof c && (c = c.ptr);
+ d && "object" === typeof d && (d = d.ptr);
+ return !!yc(g, b, c, d);
+ };
+ m.prototype.GetTrianglesUInt32Array = m.prototype.GetTrianglesUInt32Array = function(b, c, d) {
+ var g = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ c && "object" === typeof c && (c = c.ptr);
+ d && "object" === typeof d && (d = d.ptr);
+ return !!zc(g, b, c, d);
+ };
+ m.prototype.GetAttributeFloat = m.prototype.GetAttributeFloat = function(b, c, d) {
+ var g = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ c && "object" === typeof c && (c = c.ptr);
+ d && "object" === typeof d && (d = d.ptr);
+ return !!Ac(g, b, c, d);
+ };
+ m.prototype.GetAttributeFloatForAllPoints = m.prototype.GetAttributeFloatForAllPoints = function(b, c, d) {
+ var g = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ c && "object" === typeof c && (c = c.ptr);
+ d && "object" === typeof d && (d = d.ptr);
+ return !!Bc(g, b, c, d);
+ };
+ m.prototype.GetAttributeIntForAllPoints = m.prototype.GetAttributeIntForAllPoints = function(b, c, d) {
+ var g = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ c && "object" === typeof c && (c = c.ptr);
+ d && "object" === typeof d && (d = d.ptr);
+ return !!Cc(g, b, c, d);
+ };
+ m.prototype.GetAttributeInt8ForAllPoints = m.prototype.GetAttributeInt8ForAllPoints = function(b, c, d) {
+ var g = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ c && "object" === typeof c && (c = c.ptr);
+ d && "object" === typeof d && (d = d.ptr);
+ return !!Dc(g, b, c, d);
+ };
+ m.prototype.GetAttributeUInt8ForAllPoints = m.prototype.GetAttributeUInt8ForAllPoints = function(b, c, d) {
+ var g = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ c && "object" === typeof c && (c = c.ptr);
+ d && "object" === typeof d && (d = d.ptr);
+ return !!Ec(g, b, c, d);
+ };
+ m.prototype.GetAttributeInt16ForAllPoints = m.prototype.GetAttributeInt16ForAllPoints = function(b, c, d) {
+ var g = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ c && "object" === typeof c && (c = c.ptr);
+ d && "object" === typeof d && (d = d.ptr);
+ return !!Fc(g, b, c, d);
+ };
+ m.prototype.GetAttributeUInt16ForAllPoints = m.prototype.GetAttributeUInt16ForAllPoints = function(b, c, d) {
+ var g = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ c && "object" === typeof c && (c = c.ptr);
+ d && "object" === typeof d && (d = d.ptr);
+ return !!Gc(g, b, c, d);
+ };
+ m.prototype.GetAttributeInt32ForAllPoints = m.prototype.GetAttributeInt32ForAllPoints = function(b, c, d) {
+ var g = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ c && "object" === typeof c && (c = c.ptr);
+ d && "object" === typeof d && (d = d.ptr);
+ return !!Hc(g, b, c, d);
+ };
+ m.prototype.GetAttributeUInt32ForAllPoints = m.prototype.GetAttributeUInt32ForAllPoints = function(b, c, d) {
+ var g = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ c && "object" === typeof c && (c = c.ptr);
+ d && "object" === typeof d && (d = d.ptr);
+ return !!Ic(g, b, c, d);
+ };
+ m.prototype.GetAttributeDataArrayForAllPoints = m.prototype.GetAttributeDataArrayForAllPoints = function(b, c, d, g, u) {
+ var X = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ c && "object" === typeof c && (c = c.ptr);
+ d && "object" === typeof d && (d = d.ptr);
+ g && "object" === typeof g && (g = g.ptr);
+ u && "object" === typeof u && (u = u.ptr);
+ return !!Jc(X, b, c, d, g, u);
+ };
+ m.prototype.SkipAttributeTransform = m.prototype.SkipAttributeTransform = function(b) {
+ var c = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ Kc(c, b);
+ };
+ m.prototype.GetEncodedGeometryType_Deprecated = m.prototype.GetEncodedGeometryType_Deprecated = function(b) {
+ var c = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ return Lc(c, b);
+ };
+ m.prototype.DecodeBufferToPointCloud = m.prototype.DecodeBufferToPointCloud = function(b, c) {
+ var d = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ c && "object" === typeof c && (c = c.ptr);
+ return D(Mc(d, b, c), B);
+ };
+ m.prototype.DecodeBufferToMesh = m.prototype.DecodeBufferToMesh = function(b, c) {
+ var d = this.ptr;
+ b && "object" === typeof b && (b = b.ptr);
+ c && "object" === typeof c && (c = c.ptr);
+ return D(Nc(d, b, c), B);
+ };
+ m.prototype.__destroy__ = m.prototype.__destroy__ = function() {
+ Oc(this.ptr);
+ };
+ (function() {
+ function b() {
+ a.ATTRIBUTE_INVALID_TRANSFORM = Pc();
+ a.ATTRIBUTE_NO_TRANSFORM = Qc();
+ a.ATTRIBUTE_QUANTIZATION_TRANSFORM = Rc();
+ a.ATTRIBUTE_OCTAHEDRON_TRANSFORM = Sc();
+ a.INVALID = Tc();
+ a.POSITION = Uc();
+ a.NORMAL = Vc();
+ a.COLOR = Wc();
+ a.TEX_COORD = Xc();
+ a.GENERIC = Yc();
+ a.INVALID_GEOMETRY_TYPE = Zc();
+ a.POINT_CLOUD = $c();
+ a.TRIANGULAR_MESH = ad();
+ a.DT_INVALID = bd();
+ a.DT_INT8 = cd();
+ a.DT_UINT8 = dd();
+ a.DT_INT16 = ed();
+ a.DT_UINT16 = fd();
+ a.DT_INT32 = gd();
+ a.DT_UINT32 = hd();
+ a.DT_INT64 = id();
+ a.DT_UINT64 = jd();
+ a.DT_FLOAT32 = kd();
+ a.DT_FLOAT64 = ld();
+ a.DT_BOOL = md();
+ a.DT_TYPES_COUNT = nd();
+ a.OK = od();
+ a.DRACO_ERROR = pd();
+ a.IO_ERROR = qd();
+ a.INVALID_PARAMETER = rd();
+ a.UNSUPPORTED_VERSION = sd();
+ a.UNKNOWN_VERSION = td();
+ }
+ za ? b() : oa.unshift(b);
+ })();
+ if ("function" === typeof a.onModuleParsed) a.onModuleParsed();
+ a.Decoder.prototype.GetEncodedGeometryType = function(b) {
+ if (b.__class__ && b.__class__ === a.DecoderBuffer) return a.Decoder.prototype.GetEncodedGeometryType_Deprecated(b);
+ if (8 > b.byteLength) return a.INVALID_GEOMETRY_TYPE;
+ switch (b[7]) {
+ case 0:
+ return a.POINT_CLOUD;
+ case 1:
+ return a.TRIANGULAR_MESH;
+ default:
+ return a.INVALID_GEOMETRY_TYPE;
+ }
+ };
+ return n.ready;
+ };
+ }();
+ "object" === typeof exports && "object" === typeof module ? module.exports = DracoDecoderModule : "function" === typeof define && define.amd ? define([], function() {
+ return DracoDecoderModule;
+ }) : "object" === typeof exports && (exports.DracoDecoderModule = DracoDecoderModule);
+ }
+});
+
+export {
+ require_draco_decoder_nodejs
+};
diff --git a/public/assets/cesium/Workers/chunk-NDDI2LWR.js b/public/assets/cesium/Workers/chunk-NDDI2LWR.js
new file mode 100644
index 0000000000000000000000000000000000000000..6fdbe3a37f346134cea7e1a575bde3b5006fb046
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-NDDI2LWR.js
@@ -0,0 +1,157 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ Intersect_default
+} from "./chunk-KHZNBFOH.js";
+import {
+ Cartesian3_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/AxisAlignedBoundingBox.js
+function AxisAlignedBoundingBox(minimum, maximum, center) {
+ this.minimum = Cartesian3_default.clone(defaultValue_default(minimum, Cartesian3_default.ZERO));
+ this.maximum = Cartesian3_default.clone(defaultValue_default(maximum, Cartesian3_default.ZERO));
+ if (!defined_default(center)) {
+ center = Cartesian3_default.midpoint(this.minimum, this.maximum, new Cartesian3_default());
+ } else {
+ center = Cartesian3_default.clone(center);
+ }
+ this.center = center;
+}
+AxisAlignedBoundingBox.fromCorners = function(minimum, maximum, result) {
+ Check_default.defined("minimum", minimum);
+ Check_default.defined("maximum", maximum);
+ if (!defined_default(result)) {
+ result = new AxisAlignedBoundingBox();
+ }
+ result.minimum = Cartesian3_default.clone(minimum, result.minimum);
+ result.maximum = Cartesian3_default.clone(maximum, result.maximum);
+ result.center = Cartesian3_default.midpoint(minimum, maximum, result.center);
+ return result;
+};
+AxisAlignedBoundingBox.fromPoints = function(positions, result) {
+ if (!defined_default(result)) {
+ result = new AxisAlignedBoundingBox();
+ }
+ if (!defined_default(positions) || positions.length === 0) {
+ result.minimum = Cartesian3_default.clone(Cartesian3_default.ZERO, result.minimum);
+ result.maximum = Cartesian3_default.clone(Cartesian3_default.ZERO, result.maximum);
+ result.center = Cartesian3_default.clone(Cartesian3_default.ZERO, result.center);
+ return result;
+ }
+ let minimumX = positions[0].x;
+ let minimumY = positions[0].y;
+ let minimumZ = positions[0].z;
+ let maximumX = positions[0].x;
+ let maximumY = positions[0].y;
+ let maximumZ = positions[0].z;
+ const length = positions.length;
+ for (let i = 1; i < length; i++) {
+ const p = positions[i];
+ const x = p.x;
+ const y = p.y;
+ const z = p.z;
+ minimumX = Math.min(x, minimumX);
+ maximumX = Math.max(x, maximumX);
+ minimumY = Math.min(y, minimumY);
+ maximumY = Math.max(y, maximumY);
+ minimumZ = Math.min(z, minimumZ);
+ maximumZ = Math.max(z, maximumZ);
+ }
+ const minimum = result.minimum;
+ minimum.x = minimumX;
+ minimum.y = minimumY;
+ minimum.z = minimumZ;
+ const maximum = result.maximum;
+ maximum.x = maximumX;
+ maximum.y = maximumY;
+ maximum.z = maximumZ;
+ result.center = Cartesian3_default.midpoint(minimum, maximum, result.center);
+ return result;
+};
+AxisAlignedBoundingBox.clone = function(box, result) {
+ if (!defined_default(box)) {
+ return void 0;
+ }
+ if (!defined_default(result)) {
+ return new AxisAlignedBoundingBox(box.minimum, box.maximum, box.center);
+ }
+ result.minimum = Cartesian3_default.clone(box.minimum, result.minimum);
+ result.maximum = Cartesian3_default.clone(box.maximum, result.maximum);
+ result.center = Cartesian3_default.clone(box.center, result.center);
+ return result;
+};
+AxisAlignedBoundingBox.equals = function(left, right) {
+ return left === right || defined_default(left) && defined_default(right) && Cartesian3_default.equals(left.center, right.center) && Cartesian3_default.equals(left.minimum, right.minimum) && Cartesian3_default.equals(left.maximum, right.maximum);
+};
+var intersectScratch = new Cartesian3_default();
+AxisAlignedBoundingBox.intersectPlane = function(box, plane) {
+ Check_default.defined("box", box);
+ Check_default.defined("plane", plane);
+ intersectScratch = Cartesian3_default.subtract(
+ box.maximum,
+ box.minimum,
+ intersectScratch
+ );
+ const h = Cartesian3_default.multiplyByScalar(
+ intersectScratch,
+ 0.5,
+ intersectScratch
+ );
+ const normal = plane.normal;
+ const e = h.x * Math.abs(normal.x) + h.y * Math.abs(normal.y) + h.z * Math.abs(normal.z);
+ const s = Cartesian3_default.dot(box.center, normal) + plane.distance;
+ if (s - e > 0) {
+ return Intersect_default.INSIDE;
+ }
+ if (s + e < 0) {
+ return Intersect_default.OUTSIDE;
+ }
+ return Intersect_default.INTERSECTING;
+};
+AxisAlignedBoundingBox.prototype.clone = function(result) {
+ return AxisAlignedBoundingBox.clone(this, result);
+};
+AxisAlignedBoundingBox.prototype.intersectPlane = function(plane) {
+ return AxisAlignedBoundingBox.intersectPlane(this, plane);
+};
+AxisAlignedBoundingBox.prototype.equals = function(right) {
+ return AxisAlignedBoundingBox.equals(this, right);
+};
+var AxisAlignedBoundingBox_default = AxisAlignedBoundingBox;
+
+export {
+ AxisAlignedBoundingBox_default
+};
diff --git a/public/assets/cesium/Workers/chunk-NGZJIN5Z.js b/public/assets/cesium/Workers/chunk-NGZJIN5Z.js
new file mode 100644
index 0000000000000000000000000000000000000000..34241b3b0849b7e3b5c8c5988c5ce53e890368a8
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-NGZJIN5Z.js
@@ -0,0 +1,102 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ Cartesian3_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Check_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/EncodedCartesian3.js
+function EncodedCartesian3() {
+ this.high = Cartesian3_default.clone(Cartesian3_default.ZERO);
+ this.low = Cartesian3_default.clone(Cartesian3_default.ZERO);
+}
+EncodedCartesian3.encode = function(value, result) {
+ Check_default.typeOf.number("value", value);
+ if (!defined_default(result)) {
+ result = {
+ high: 0,
+ low: 0
+ };
+ }
+ let doubleHigh;
+ if (value >= 0) {
+ doubleHigh = Math.floor(value / 65536) * 65536;
+ result.high = doubleHigh;
+ result.low = value - doubleHigh;
+ } else {
+ doubleHigh = Math.floor(-value / 65536) * 65536;
+ result.high = -doubleHigh;
+ result.low = value + doubleHigh;
+ }
+ return result;
+};
+var scratchEncode = {
+ high: 0,
+ low: 0
+};
+EncodedCartesian3.fromCartesian = function(cartesian, result) {
+ Check_default.typeOf.object("cartesian", cartesian);
+ if (!defined_default(result)) {
+ result = new EncodedCartesian3();
+ }
+ const high = result.high;
+ const low = result.low;
+ EncodedCartesian3.encode(cartesian.x, scratchEncode);
+ high.x = scratchEncode.high;
+ low.x = scratchEncode.low;
+ EncodedCartesian3.encode(cartesian.y, scratchEncode);
+ high.y = scratchEncode.high;
+ low.y = scratchEncode.low;
+ EncodedCartesian3.encode(cartesian.z, scratchEncode);
+ high.z = scratchEncode.high;
+ low.z = scratchEncode.low;
+ return result;
+};
+var encodedP = new EncodedCartesian3();
+EncodedCartesian3.writeElements = function(cartesian, cartesianArray, index) {
+ Check_default.defined("cartesianArray", cartesianArray);
+ Check_default.typeOf.number("index", index);
+ Check_default.typeOf.number.greaterThanOrEquals("index", index, 0);
+ EncodedCartesian3.fromCartesian(cartesian, encodedP);
+ const high = encodedP.high;
+ const low = encodedP.low;
+ cartesianArray[index] = high.x;
+ cartesianArray[index + 1] = high.y;
+ cartesianArray[index + 2] = high.z;
+ cartesianArray[index + 3] = low.x;
+ cartesianArray[index + 4] = low.y;
+ cartesianArray[index + 5] = low.z;
+};
+var EncodedCartesian3_default = EncodedCartesian3;
+
+export {
+ EncodedCartesian3_default
+};
diff --git a/public/assets/cesium/Workers/chunk-O72GZTSE.js b/public/assets/cesium/Workers/chunk-O72GZTSE.js
new file mode 100644
index 0000000000000000000000000000000000000000..cc00b9c25c802820db113f461a7d5d70f6d683ed
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-O72GZTSE.js
@@ -0,0 +1,73 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+
+// packages/engine/Source/Core/CylinderGeometryLibrary.js
+var CylinderGeometryLibrary = {};
+CylinderGeometryLibrary.computePositions = function(length, topRadius, bottomRadius, slices, fill) {
+ const topZ = length * 0.5;
+ const bottomZ = -topZ;
+ const twoSlice = slices + slices;
+ const size = fill ? 2 * twoSlice : twoSlice;
+ const positions = new Float64Array(size * 3);
+ let i;
+ let index = 0;
+ let tbIndex = 0;
+ const bottomOffset = fill ? twoSlice * 3 : 0;
+ const topOffset = fill ? (twoSlice + slices) * 3 : slices * 3;
+ for (i = 0; i < slices; i++) {
+ const angle = i / slices * Math_default.TWO_PI;
+ const x = Math.cos(angle);
+ const y = Math.sin(angle);
+ const bottomX = x * bottomRadius;
+ const bottomY = y * bottomRadius;
+ const topX = x * topRadius;
+ const topY = y * topRadius;
+ positions[tbIndex + bottomOffset] = bottomX;
+ positions[tbIndex + bottomOffset + 1] = bottomY;
+ positions[tbIndex + bottomOffset + 2] = bottomZ;
+ positions[tbIndex + topOffset] = topX;
+ positions[tbIndex + topOffset + 1] = topY;
+ positions[tbIndex + topOffset + 2] = topZ;
+ tbIndex += 3;
+ if (fill) {
+ positions[index++] = bottomX;
+ positions[index++] = bottomY;
+ positions[index++] = bottomZ;
+ positions[index++] = topX;
+ positions[index++] = topY;
+ positions[index++] = topZ;
+ }
+ }
+ return positions;
+};
+var CylinderGeometryLibrary_default = CylinderGeometryLibrary;
+
+export {
+ CylinderGeometryLibrary_default
+};
diff --git a/public/assets/cesium/Workers/chunk-OPP2SKMA.js b/public/assets/cesium/Workers/chunk-OPP2SKMA.js
new file mode 100644
index 0000000000000000000000000000000000000000..b2950594dccb5f8ab0755eb1a224fd43f8c0f1fe
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-OPP2SKMA.js
@@ -0,0 +1,368 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ GeometryOffsetAttribute_default
+} from "./chunk-GBT7MJ6X.js";
+import {
+ IndexDatatype_default
+} from "./chunk-C4WPMOKT.js";
+import {
+ GeometryAttributes_default
+} from "./chunk-X7IQYYHF.js";
+import {
+ GeometryAttribute_default,
+ Geometry_default,
+ PrimitiveType_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ BoundingSphere_default
+} from "./chunk-KHZNBFOH.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian3_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/EllipsoidOutlineGeometry.js
+var defaultRadii = new Cartesian3_default(1, 1, 1);
+var cos = Math.cos;
+var sin = Math.sin;
+function EllipsoidOutlineGeometry(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const radii = defaultValue_default(options.radii, defaultRadii);
+ const innerRadii = defaultValue_default(options.innerRadii, radii);
+ const minimumClock = defaultValue_default(options.minimumClock, 0);
+ const maximumClock = defaultValue_default(options.maximumClock, Math_default.TWO_PI);
+ const minimumCone = defaultValue_default(options.minimumCone, 0);
+ const maximumCone = defaultValue_default(options.maximumCone, Math_default.PI);
+ const stackPartitions = Math.round(defaultValue_default(options.stackPartitions, 10));
+ const slicePartitions = Math.round(defaultValue_default(options.slicePartitions, 8));
+ const subdivisions = Math.round(defaultValue_default(options.subdivisions, 128));
+ if (stackPartitions < 1) {
+ throw new DeveloperError_default("options.stackPartitions cannot be less than 1");
+ }
+ if (slicePartitions < 0) {
+ throw new DeveloperError_default("options.slicePartitions cannot be less than 0");
+ }
+ if (subdivisions < 0) {
+ throw new DeveloperError_default(
+ "options.subdivisions must be greater than or equal to zero."
+ );
+ }
+ if (defined_default(options.offsetAttribute) && options.offsetAttribute === GeometryOffsetAttribute_default.TOP) {
+ throw new DeveloperError_default(
+ "GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry."
+ );
+ }
+ this._radii = Cartesian3_default.clone(radii);
+ this._innerRadii = Cartesian3_default.clone(innerRadii);
+ this._minimumClock = minimumClock;
+ this._maximumClock = maximumClock;
+ this._minimumCone = minimumCone;
+ this._maximumCone = maximumCone;
+ this._stackPartitions = stackPartitions;
+ this._slicePartitions = slicePartitions;
+ this._subdivisions = subdivisions;
+ this._offsetAttribute = options.offsetAttribute;
+ this._workerName = "createEllipsoidOutlineGeometry";
+}
+EllipsoidOutlineGeometry.packedLength = 2 * Cartesian3_default.packedLength + 8;
+EllipsoidOutlineGeometry.pack = function(value, array, startingIndex) {
+ if (!defined_default(value)) {
+ throw new DeveloperError_default("value is required");
+ }
+ if (!defined_default(array)) {
+ throw new DeveloperError_default("array is required");
+ }
+ startingIndex = defaultValue_default(startingIndex, 0);
+ Cartesian3_default.pack(value._radii, array, startingIndex);
+ startingIndex += Cartesian3_default.packedLength;
+ Cartesian3_default.pack(value._innerRadii, array, startingIndex);
+ startingIndex += Cartesian3_default.packedLength;
+ array[startingIndex++] = value._minimumClock;
+ array[startingIndex++] = value._maximumClock;
+ array[startingIndex++] = value._minimumCone;
+ array[startingIndex++] = value._maximumCone;
+ array[startingIndex++] = value._stackPartitions;
+ array[startingIndex++] = value._slicePartitions;
+ array[startingIndex++] = value._subdivisions;
+ array[startingIndex] = defaultValue_default(value._offsetAttribute, -1);
+ return array;
+};
+var scratchRadii = new Cartesian3_default();
+var scratchInnerRadii = new Cartesian3_default();
+var scratchOptions = {
+ radii: scratchRadii,
+ innerRadii: scratchInnerRadii,
+ minimumClock: void 0,
+ maximumClock: void 0,
+ minimumCone: void 0,
+ maximumCone: void 0,
+ stackPartitions: void 0,
+ slicePartitions: void 0,
+ subdivisions: void 0,
+ offsetAttribute: void 0
+};
+EllipsoidOutlineGeometry.unpack = function(array, startingIndex, result) {
+ if (!defined_default(array)) {
+ throw new DeveloperError_default("array is required");
+ }
+ startingIndex = defaultValue_default(startingIndex, 0);
+ const radii = Cartesian3_default.unpack(array, startingIndex, scratchRadii);
+ startingIndex += Cartesian3_default.packedLength;
+ const innerRadii = Cartesian3_default.unpack(array, startingIndex, scratchInnerRadii);
+ startingIndex += Cartesian3_default.packedLength;
+ const minimumClock = array[startingIndex++];
+ const maximumClock = array[startingIndex++];
+ const minimumCone = array[startingIndex++];
+ const maximumCone = array[startingIndex++];
+ const stackPartitions = array[startingIndex++];
+ const slicePartitions = array[startingIndex++];
+ const subdivisions = array[startingIndex++];
+ const offsetAttribute = array[startingIndex];
+ if (!defined_default(result)) {
+ scratchOptions.minimumClock = minimumClock;
+ scratchOptions.maximumClock = maximumClock;
+ scratchOptions.minimumCone = minimumCone;
+ scratchOptions.maximumCone = maximumCone;
+ scratchOptions.stackPartitions = stackPartitions;
+ scratchOptions.slicePartitions = slicePartitions;
+ scratchOptions.subdivisions = subdivisions;
+ scratchOptions.offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
+ return new EllipsoidOutlineGeometry(scratchOptions);
+ }
+ result._radii = Cartesian3_default.clone(radii, result._radii);
+ result._innerRadii = Cartesian3_default.clone(innerRadii, result._innerRadii);
+ result._minimumClock = minimumClock;
+ result._maximumClock = maximumClock;
+ result._minimumCone = minimumCone;
+ result._maximumCone = maximumCone;
+ result._stackPartitions = stackPartitions;
+ result._slicePartitions = slicePartitions;
+ result._subdivisions = subdivisions;
+ result._offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
+ return result;
+};
+EllipsoidOutlineGeometry.createGeometry = function(ellipsoidGeometry) {
+ const radii = ellipsoidGeometry._radii;
+ if (radii.x <= 0 || radii.y <= 0 || radii.z <= 0) {
+ return;
+ }
+ const innerRadii = ellipsoidGeometry._innerRadii;
+ if (innerRadii.x <= 0 || innerRadii.y <= 0 || innerRadii.z <= 0) {
+ return;
+ }
+ const minimumClock = ellipsoidGeometry._minimumClock;
+ const maximumClock = ellipsoidGeometry._maximumClock;
+ const minimumCone = ellipsoidGeometry._minimumCone;
+ const maximumCone = ellipsoidGeometry._maximumCone;
+ const subdivisions = ellipsoidGeometry._subdivisions;
+ const ellipsoid = Ellipsoid_default.fromCartesian3(radii);
+ let slicePartitions = ellipsoidGeometry._slicePartitions + 1;
+ let stackPartitions = ellipsoidGeometry._stackPartitions + 1;
+ slicePartitions = Math.round(
+ slicePartitions * Math.abs(maximumClock - minimumClock) / Math_default.TWO_PI
+ );
+ stackPartitions = Math.round(
+ stackPartitions * Math.abs(maximumCone - minimumCone) / Math_default.PI
+ );
+ if (slicePartitions < 2) {
+ slicePartitions = 2;
+ }
+ if (stackPartitions < 2) {
+ stackPartitions = 2;
+ }
+ let extraIndices = 0;
+ let vertexMultiplier = 1;
+ const hasInnerSurface = innerRadii.x !== radii.x || innerRadii.y !== radii.y || innerRadii.z !== radii.z;
+ let isTopOpen = false;
+ let isBotOpen = false;
+ if (hasInnerSurface) {
+ vertexMultiplier = 2;
+ if (minimumCone > 0) {
+ isTopOpen = true;
+ extraIndices += slicePartitions;
+ }
+ if (maximumCone < Math.PI) {
+ isBotOpen = true;
+ extraIndices += slicePartitions;
+ }
+ }
+ const vertexCount = subdivisions * vertexMultiplier * (stackPartitions + slicePartitions);
+ const positions = new Float64Array(vertexCount * 3);
+ const numIndices = 2 * (vertexCount + extraIndices - (slicePartitions + stackPartitions) * vertexMultiplier);
+ const indices = IndexDatatype_default.createTypedArray(vertexCount, numIndices);
+ let i;
+ let j;
+ let theta;
+ let phi;
+ let index = 0;
+ const sinPhi = new Array(stackPartitions);
+ const cosPhi = new Array(stackPartitions);
+ for (i = 0; i < stackPartitions; i++) {
+ phi = minimumCone + i * (maximumCone - minimumCone) / (stackPartitions - 1);
+ sinPhi[i] = sin(phi);
+ cosPhi[i] = cos(phi);
+ }
+ const sinTheta = new Array(subdivisions);
+ const cosTheta = new Array(subdivisions);
+ for (i = 0; i < subdivisions; i++) {
+ theta = minimumClock + i * (maximumClock - minimumClock) / (subdivisions - 1);
+ sinTheta[i] = sin(theta);
+ cosTheta[i] = cos(theta);
+ }
+ for (i = 0; i < stackPartitions; i++) {
+ for (j = 0; j < subdivisions; j++) {
+ positions[index++] = radii.x * sinPhi[i] * cosTheta[j];
+ positions[index++] = radii.y * sinPhi[i] * sinTheta[j];
+ positions[index++] = radii.z * cosPhi[i];
+ }
+ }
+ if (hasInnerSurface) {
+ for (i = 0; i < stackPartitions; i++) {
+ for (j = 0; j < subdivisions; j++) {
+ positions[index++] = innerRadii.x * sinPhi[i] * cosTheta[j];
+ positions[index++] = innerRadii.y * sinPhi[i] * sinTheta[j];
+ positions[index++] = innerRadii.z * cosPhi[i];
+ }
+ }
+ }
+ sinPhi.length = subdivisions;
+ cosPhi.length = subdivisions;
+ for (i = 0; i < subdivisions; i++) {
+ phi = minimumCone + i * (maximumCone - minimumCone) / (subdivisions - 1);
+ sinPhi[i] = sin(phi);
+ cosPhi[i] = cos(phi);
+ }
+ sinTheta.length = slicePartitions;
+ cosTheta.length = slicePartitions;
+ for (i = 0; i < slicePartitions; i++) {
+ theta = minimumClock + i * (maximumClock - minimumClock) / (slicePartitions - 1);
+ sinTheta[i] = sin(theta);
+ cosTheta[i] = cos(theta);
+ }
+ for (i = 0; i < subdivisions; i++) {
+ for (j = 0; j < slicePartitions; j++) {
+ positions[index++] = radii.x * sinPhi[i] * cosTheta[j];
+ positions[index++] = radii.y * sinPhi[i] * sinTheta[j];
+ positions[index++] = radii.z * cosPhi[i];
+ }
+ }
+ if (hasInnerSurface) {
+ for (i = 0; i < subdivisions; i++) {
+ for (j = 0; j < slicePartitions; j++) {
+ positions[index++] = innerRadii.x * sinPhi[i] * cosTheta[j];
+ positions[index++] = innerRadii.y * sinPhi[i] * sinTheta[j];
+ positions[index++] = innerRadii.z * cosPhi[i];
+ }
+ }
+ }
+ index = 0;
+ for (i = 0; i < stackPartitions * vertexMultiplier; i++) {
+ const topOffset = i * subdivisions;
+ for (j = 0; j < subdivisions - 1; j++) {
+ indices[index++] = topOffset + j;
+ indices[index++] = topOffset + j + 1;
+ }
+ }
+ let offset = stackPartitions * subdivisions * vertexMultiplier;
+ for (i = 0; i < slicePartitions; i++) {
+ for (j = 0; j < subdivisions - 1; j++) {
+ indices[index++] = offset + i + j * slicePartitions;
+ indices[index++] = offset + i + (j + 1) * slicePartitions;
+ }
+ }
+ if (hasInnerSurface) {
+ offset = stackPartitions * subdivisions * vertexMultiplier + slicePartitions * subdivisions;
+ for (i = 0; i < slicePartitions; i++) {
+ for (j = 0; j < subdivisions - 1; j++) {
+ indices[index++] = offset + i + j * slicePartitions;
+ indices[index++] = offset + i + (j + 1) * slicePartitions;
+ }
+ }
+ }
+ if (hasInnerSurface) {
+ let outerOffset = stackPartitions * subdivisions * vertexMultiplier;
+ let innerOffset = outerOffset + subdivisions * slicePartitions;
+ if (isTopOpen) {
+ for (i = 0; i < slicePartitions; i++) {
+ indices[index++] = outerOffset + i;
+ indices[index++] = innerOffset + i;
+ }
+ }
+ if (isBotOpen) {
+ outerOffset += subdivisions * slicePartitions - slicePartitions;
+ innerOffset += subdivisions * slicePartitions - slicePartitions;
+ for (i = 0; i < slicePartitions; i++) {
+ indices[index++] = outerOffset + i;
+ indices[index++] = innerOffset + i;
+ }
+ }
+ }
+ const attributes = new GeometryAttributes_default({
+ position: new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: positions
+ })
+ });
+ if (defined_default(ellipsoidGeometry._offsetAttribute)) {
+ const length = positions.length;
+ const offsetValue = ellipsoidGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
+ const applyOffset = new Uint8Array(length / 3).fill(offsetValue);
+ attributes.applyOffset = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: applyOffset
+ });
+ }
+ return new Geometry_default({
+ attributes,
+ indices,
+ primitiveType: PrimitiveType_default.LINES,
+ boundingSphere: BoundingSphere_default.fromEllipsoid(ellipsoid),
+ offsetAttribute: ellipsoidGeometry._offsetAttribute
+ });
+};
+var EllipsoidOutlineGeometry_default = EllipsoidOutlineGeometry;
+
+export {
+ EllipsoidOutlineGeometry_default
+};
diff --git a/public/assets/cesium/Workers/chunk-P6TRGU3S.js b/public/assets/cesium/Workers/chunk-P6TRGU3S.js
new file mode 100644
index 0000000000000000000000000000000000000000..435f93d74c658d1873568433bae82c024d59f4aa
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-P6TRGU3S.js
@@ -0,0 +1,163 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/DeveloperError.js
+function DeveloperError(message) {
+ this.name = "DeveloperError";
+ this.message = message;
+ let stack;
+ try {
+ throw new Error();
+ } catch (e) {
+ stack = e.stack;
+ }
+ this.stack = stack;
+}
+if (defined_default(Object.create)) {
+ DeveloperError.prototype = Object.create(Error.prototype);
+ DeveloperError.prototype.constructor = DeveloperError;
+}
+DeveloperError.prototype.toString = function() {
+ let str = `${this.name}: ${this.message}`;
+ if (defined_default(this.stack)) {
+ str += `
+${this.stack.toString()}`;
+ }
+ return str;
+};
+DeveloperError.throwInstantiationError = function() {
+ throw new DeveloperError(
+ "This function defines an interface and should not be called directly."
+ );
+};
+var DeveloperError_default = DeveloperError;
+
+// packages/engine/Source/Core/Check.js
+var Check = {};
+Check.typeOf = {};
+function getUndefinedErrorMessage(name) {
+ return `${name} is required, actual value was undefined`;
+}
+function getFailedTypeErrorMessage(actual, expected, name) {
+ return `Expected ${name} to be typeof ${expected}, actual typeof was ${actual}`;
+}
+Check.defined = function(name, test) {
+ if (!defined_default(test)) {
+ throw new DeveloperError_default(getUndefinedErrorMessage(name));
+ }
+};
+Check.typeOf.func = function(name, test) {
+ if (typeof test !== "function") {
+ throw new DeveloperError_default(
+ getFailedTypeErrorMessage(typeof test, "function", name)
+ );
+ }
+};
+Check.typeOf.string = function(name, test) {
+ if (typeof test !== "string") {
+ throw new DeveloperError_default(
+ getFailedTypeErrorMessage(typeof test, "string", name)
+ );
+ }
+};
+Check.typeOf.number = function(name, test) {
+ if (typeof test !== "number") {
+ throw new DeveloperError_default(
+ getFailedTypeErrorMessage(typeof test, "number", name)
+ );
+ }
+};
+Check.typeOf.number.lessThan = function(name, test, limit) {
+ Check.typeOf.number(name, test);
+ if (test >= limit) {
+ throw new DeveloperError_default(
+ `Expected ${name} to be less than ${limit}, actual value was ${test}`
+ );
+ }
+};
+Check.typeOf.number.lessThanOrEquals = function(name, test, limit) {
+ Check.typeOf.number(name, test);
+ if (test > limit) {
+ throw new DeveloperError_default(
+ `Expected ${name} to be less than or equal to ${limit}, actual value was ${test}`
+ );
+ }
+};
+Check.typeOf.number.greaterThan = function(name, test, limit) {
+ Check.typeOf.number(name, test);
+ if (test <= limit) {
+ throw new DeveloperError_default(
+ `Expected ${name} to be greater than ${limit}, actual value was ${test}`
+ );
+ }
+};
+Check.typeOf.number.greaterThanOrEquals = function(name, test, limit) {
+ Check.typeOf.number(name, test);
+ if (test < limit) {
+ throw new DeveloperError_default(
+ `Expected ${name} to be greater than or equal to ${limit}, actual value was ${test}`
+ );
+ }
+};
+Check.typeOf.object = function(name, test) {
+ if (typeof test !== "object") {
+ throw new DeveloperError_default(
+ getFailedTypeErrorMessage(typeof test, "object", name)
+ );
+ }
+};
+Check.typeOf.bool = function(name, test) {
+ if (typeof test !== "boolean") {
+ throw new DeveloperError_default(
+ getFailedTypeErrorMessage(typeof test, "boolean", name)
+ );
+ }
+};
+Check.typeOf.bigint = function(name, test) {
+ if (typeof test !== "bigint") {
+ throw new DeveloperError_default(
+ getFailedTypeErrorMessage(typeof test, "bigint", name)
+ );
+ }
+};
+Check.typeOf.number.equals = function(name1, name2, test1, test2) {
+ Check.typeOf.number(name1, test1);
+ Check.typeOf.number(name2, test2);
+ if (test1 !== test2) {
+ throw new DeveloperError_default(
+ `${name1} must be equal to ${name2}, the actual values are ${test1} and ${test2}`
+ );
+ }
+};
+var Check_default = Check;
+
+export {
+ DeveloperError_default,
+ Check_default
+};
diff --git a/public/assets/cesium/Workers/chunk-QN6TBED4.js b/public/assets/cesium/Workers/chunk-QN6TBED4.js
new file mode 100644
index 0000000000000000000000000000000000000000..bd1e595c1eb335f0e5e570ccd424b73b59f3a938
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-QN6TBED4.js
@@ -0,0 +1,421 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ EllipsoidGeodesic_default
+} from "./chunk-C3EQ27WF.js";
+import {
+ EllipsoidRhumbLine_default
+} from "./chunk-JSQJDZI4.js";
+import {
+ IntersectionTests_default
+} from "./chunk-QQOZO7KO.js";
+import {
+ Plane_default
+} from "./chunk-EDLRS3AW.js";
+import {
+ Matrix4_default
+} from "./chunk-6SQMLVGV.js";
+import {
+ Cartesian3_default,
+ Cartographic_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/PolylinePipeline.js
+var PolylinePipeline = {};
+PolylinePipeline.numberOfPoints = function(p0, p1, minDistance) {
+ const distance = Cartesian3_default.distance(p0, p1);
+ return Math.ceil(distance / minDistance);
+};
+PolylinePipeline.numberOfPointsRhumbLine = function(p0, p1, granularity) {
+ const radiansDistanceSquared = Math.pow(p0.longitude - p1.longitude, 2) + Math.pow(p0.latitude - p1.latitude, 2);
+ return Math.max(
+ 1,
+ Math.ceil(Math.sqrt(radiansDistanceSquared / (granularity * granularity)))
+ );
+};
+var cartoScratch = new Cartographic_default();
+PolylinePipeline.extractHeights = function(positions, ellipsoid) {
+ const length = positions.length;
+ const heights = new Array(length);
+ for (let i = 0; i < length; i++) {
+ const p = positions[i];
+ heights[i] = ellipsoid.cartesianToCartographic(p, cartoScratch).height;
+ }
+ return heights;
+};
+var wrapLongitudeInversMatrix = new Matrix4_default();
+var wrapLongitudeOrigin = new Cartesian3_default();
+var wrapLongitudeXZNormal = new Cartesian3_default();
+var wrapLongitudeXZPlane = new Plane_default(Cartesian3_default.UNIT_X, 0);
+var wrapLongitudeYZNormal = new Cartesian3_default();
+var wrapLongitudeYZPlane = new Plane_default(Cartesian3_default.UNIT_X, 0);
+var wrapLongitudeIntersection = new Cartesian3_default();
+var wrapLongitudeOffset = new Cartesian3_default();
+var subdivideHeightsScratchArray = [];
+function subdivideHeights(numPoints, h0, h1) {
+ const heights = subdivideHeightsScratchArray;
+ heights.length = numPoints;
+ let i;
+ if (h0 === h1) {
+ for (i = 0; i < numPoints; i++) {
+ heights[i] = h0;
+ }
+ return heights;
+ }
+ const dHeight = h1 - h0;
+ const heightPerVertex = dHeight / numPoints;
+ for (i = 0; i < numPoints; i++) {
+ const h = h0 + i * heightPerVertex;
+ heights[i] = h;
+ }
+ return heights;
+}
+var carto1 = new Cartographic_default();
+var carto2 = new Cartographic_default();
+var cartesian = new Cartesian3_default();
+var scaleFirst = new Cartesian3_default();
+var scaleLast = new Cartesian3_default();
+var ellipsoidGeodesic = new EllipsoidGeodesic_default();
+var ellipsoidRhumb = new EllipsoidRhumbLine_default();
+function generateCartesianArc(p0, p1, minDistance, ellipsoid, h0, h1, array, offset) {
+ const first = ellipsoid.scaleToGeodeticSurface(p0, scaleFirst);
+ const last = ellipsoid.scaleToGeodeticSurface(p1, scaleLast);
+ const numPoints = PolylinePipeline.numberOfPoints(p0, p1, minDistance);
+ const start = ellipsoid.cartesianToCartographic(first, carto1);
+ const end = ellipsoid.cartesianToCartographic(last, carto2);
+ const heights = subdivideHeights(numPoints, h0, h1);
+ ellipsoidGeodesic.setEndPoints(start, end);
+ const surfaceDistanceBetweenPoints = ellipsoidGeodesic.surfaceDistance / numPoints;
+ let index = offset;
+ start.height = h0;
+ let cart = ellipsoid.cartographicToCartesian(start, cartesian);
+ Cartesian3_default.pack(cart, array, index);
+ index += 3;
+ for (let i = 1; i < numPoints; i++) {
+ const carto = ellipsoidGeodesic.interpolateUsingSurfaceDistance(
+ i * surfaceDistanceBetweenPoints,
+ carto2
+ );
+ carto.height = heights[i];
+ cart = ellipsoid.cartographicToCartesian(carto, cartesian);
+ Cartesian3_default.pack(cart, array, index);
+ index += 3;
+ }
+ return index;
+}
+function generateCartesianRhumbArc(p0, p1, granularity, ellipsoid, h0, h1, array, offset) {
+ const start = ellipsoid.cartesianToCartographic(p0, carto1);
+ const end = ellipsoid.cartesianToCartographic(p1, carto2);
+ const numPoints = PolylinePipeline.numberOfPointsRhumbLine(
+ start,
+ end,
+ granularity
+ );
+ start.height = 0;
+ end.height = 0;
+ const heights = subdivideHeights(numPoints, h0, h1);
+ if (!ellipsoidRhumb.ellipsoid.equals(ellipsoid)) {
+ ellipsoidRhumb = new EllipsoidRhumbLine_default(void 0, void 0, ellipsoid);
+ }
+ ellipsoidRhumb.setEndPoints(start, end);
+ const surfaceDistanceBetweenPoints = ellipsoidRhumb.surfaceDistance / numPoints;
+ let index = offset;
+ start.height = h0;
+ let cart = ellipsoid.cartographicToCartesian(start, cartesian);
+ Cartesian3_default.pack(cart, array, index);
+ index += 3;
+ for (let i = 1; i < numPoints; i++) {
+ const carto = ellipsoidRhumb.interpolateUsingSurfaceDistance(
+ i * surfaceDistanceBetweenPoints,
+ carto2
+ );
+ carto.height = heights[i];
+ cart = ellipsoid.cartographicToCartesian(carto, cartesian);
+ Cartesian3_default.pack(cart, array, index);
+ index += 3;
+ }
+ return index;
+}
+PolylinePipeline.wrapLongitude = function(positions, modelMatrix) {
+ const cartesians = [];
+ const segments = [];
+ if (defined_default(positions) && positions.length > 0) {
+ modelMatrix = defaultValue_default(modelMatrix, Matrix4_default.IDENTITY);
+ const inverseModelMatrix = Matrix4_default.inverseTransformation(
+ modelMatrix,
+ wrapLongitudeInversMatrix
+ );
+ const origin = Matrix4_default.multiplyByPoint(
+ inverseModelMatrix,
+ Cartesian3_default.ZERO,
+ wrapLongitudeOrigin
+ );
+ const xzNormal = Cartesian3_default.normalize(
+ Matrix4_default.multiplyByPointAsVector(
+ inverseModelMatrix,
+ Cartesian3_default.UNIT_Y,
+ wrapLongitudeXZNormal
+ ),
+ wrapLongitudeXZNormal
+ );
+ const xzPlane = Plane_default.fromPointNormal(
+ origin,
+ xzNormal,
+ wrapLongitudeXZPlane
+ );
+ const yzNormal = Cartesian3_default.normalize(
+ Matrix4_default.multiplyByPointAsVector(
+ inverseModelMatrix,
+ Cartesian3_default.UNIT_X,
+ wrapLongitudeYZNormal
+ ),
+ wrapLongitudeYZNormal
+ );
+ const yzPlane = Plane_default.fromPointNormal(
+ origin,
+ yzNormal,
+ wrapLongitudeYZPlane
+ );
+ let count = 1;
+ cartesians.push(Cartesian3_default.clone(positions[0]));
+ let prev = cartesians[0];
+ const length = positions.length;
+ for (let i = 1; i < length; ++i) {
+ const cur = positions[i];
+ if (Plane_default.getPointDistance(yzPlane, prev) < 0 || Plane_default.getPointDistance(yzPlane, cur) < 0) {
+ const intersection = IntersectionTests_default.lineSegmentPlane(
+ prev,
+ cur,
+ xzPlane,
+ wrapLongitudeIntersection
+ );
+ if (defined_default(intersection)) {
+ const offset = Cartesian3_default.multiplyByScalar(
+ xzNormal,
+ 5e-9,
+ wrapLongitudeOffset
+ );
+ if (Plane_default.getPointDistance(xzPlane, prev) < 0) {
+ Cartesian3_default.negate(offset, offset);
+ }
+ cartesians.push(
+ Cartesian3_default.add(intersection, offset, new Cartesian3_default())
+ );
+ segments.push(count + 1);
+ Cartesian3_default.negate(offset, offset);
+ cartesians.push(
+ Cartesian3_default.add(intersection, offset, new Cartesian3_default())
+ );
+ count = 1;
+ }
+ }
+ cartesians.push(Cartesian3_default.clone(positions[i]));
+ count++;
+ prev = cur;
+ }
+ segments.push(count);
+ }
+ return {
+ positions: cartesians,
+ lengths: segments
+ };
+};
+PolylinePipeline.generateArc = function(options) {
+ if (!defined_default(options)) {
+ options = {};
+ }
+ const positions = options.positions;
+ if (!defined_default(positions)) {
+ throw new DeveloperError_default("options.positions is required.");
+ }
+ const length = positions.length;
+ const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default);
+ let height = defaultValue_default(options.height, 0);
+ const hasHeightArray = Array.isArray(height);
+ if (length < 1) {
+ return [];
+ } else if (length === 1) {
+ const p = ellipsoid.scaleToGeodeticSurface(positions[0], scaleFirst);
+ height = hasHeightArray ? height[0] : height;
+ if (height !== 0) {
+ const n = ellipsoid.geodeticSurfaceNormal(p, cartesian);
+ Cartesian3_default.multiplyByScalar(n, height, n);
+ Cartesian3_default.add(p, n, p);
+ }
+ return [p.x, p.y, p.z];
+ }
+ let minDistance = options.minDistance;
+ if (!defined_default(minDistance)) {
+ const granularity = defaultValue_default(
+ options.granularity,
+ Math_default.RADIANS_PER_DEGREE
+ );
+ minDistance = Math_default.chordLength(granularity, ellipsoid.maximumRadius);
+ }
+ let numPoints = 0;
+ let i;
+ for (i = 0; i < length - 1; i++) {
+ numPoints += PolylinePipeline.numberOfPoints(
+ positions[i],
+ positions[i + 1],
+ minDistance
+ );
+ }
+ const arrayLength = (numPoints + 1) * 3;
+ const newPositions = new Array(arrayLength);
+ let offset = 0;
+ for (i = 0; i < length - 1; i++) {
+ const p0 = positions[i];
+ const p1 = positions[i + 1];
+ const h0 = hasHeightArray ? height[i] : height;
+ const h1 = hasHeightArray ? height[i + 1] : height;
+ offset = generateCartesianArc(
+ p0,
+ p1,
+ minDistance,
+ ellipsoid,
+ h0,
+ h1,
+ newPositions,
+ offset
+ );
+ }
+ subdivideHeightsScratchArray.length = 0;
+ const lastPoint = positions[length - 1];
+ const carto = ellipsoid.cartesianToCartographic(lastPoint, carto1);
+ carto.height = hasHeightArray ? height[length - 1] : height;
+ const cart = ellipsoid.cartographicToCartesian(carto, cartesian);
+ Cartesian3_default.pack(cart, newPositions, arrayLength - 3);
+ return newPositions;
+};
+var scratchCartographic0 = new Cartographic_default();
+var scratchCartographic1 = new Cartographic_default();
+PolylinePipeline.generateRhumbArc = function(options) {
+ if (!defined_default(options)) {
+ options = {};
+ }
+ const positions = options.positions;
+ if (!defined_default(positions)) {
+ throw new DeveloperError_default("options.positions is required.");
+ }
+ const length = positions.length;
+ const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default);
+ let height = defaultValue_default(options.height, 0);
+ const hasHeightArray = Array.isArray(height);
+ if (length < 1) {
+ return [];
+ } else if (length === 1) {
+ const p = ellipsoid.scaleToGeodeticSurface(positions[0], scaleFirst);
+ height = hasHeightArray ? height[0] : height;
+ if (height !== 0) {
+ const n = ellipsoid.geodeticSurfaceNormal(p, cartesian);
+ Cartesian3_default.multiplyByScalar(n, height, n);
+ Cartesian3_default.add(p, n, p);
+ }
+ return [p.x, p.y, p.z];
+ }
+ const granularity = defaultValue_default(
+ options.granularity,
+ Math_default.RADIANS_PER_DEGREE
+ );
+ let numPoints = 0;
+ let i;
+ let c0 = ellipsoid.cartesianToCartographic(
+ positions[0],
+ scratchCartographic0
+ );
+ let c1;
+ for (i = 0; i < length - 1; i++) {
+ c1 = ellipsoid.cartesianToCartographic(
+ positions[i + 1],
+ scratchCartographic1
+ );
+ numPoints += PolylinePipeline.numberOfPointsRhumbLine(c0, c1, granularity);
+ c0 = Cartographic_default.clone(c1, scratchCartographic0);
+ }
+ const arrayLength = (numPoints + 1) * 3;
+ const newPositions = new Array(arrayLength);
+ let offset = 0;
+ for (i = 0; i < length - 1; i++) {
+ const p0 = positions[i];
+ const p1 = positions[i + 1];
+ const h0 = hasHeightArray ? height[i] : height;
+ const h1 = hasHeightArray ? height[i + 1] : height;
+ offset = generateCartesianRhumbArc(
+ p0,
+ p1,
+ granularity,
+ ellipsoid,
+ h0,
+ h1,
+ newPositions,
+ offset
+ );
+ }
+ subdivideHeightsScratchArray.length = 0;
+ const lastPoint = positions[length - 1];
+ const carto = ellipsoid.cartesianToCartographic(lastPoint, carto1);
+ carto.height = hasHeightArray ? height[length - 1] : height;
+ const cart = ellipsoid.cartographicToCartesian(carto, cartesian);
+ Cartesian3_default.pack(cart, newPositions, arrayLength - 3);
+ return newPositions;
+};
+PolylinePipeline.generateCartesianArc = function(options) {
+ const numberArray = PolylinePipeline.generateArc(options);
+ const size = numberArray.length / 3;
+ const newPositions = new Array(size);
+ for (let i = 0; i < size; i++) {
+ newPositions[i] = Cartesian3_default.unpack(numberArray, i * 3);
+ }
+ return newPositions;
+};
+PolylinePipeline.generateCartesianRhumbArc = function(options) {
+ const numberArray = PolylinePipeline.generateRhumbArc(options);
+ const size = numberArray.length / 3;
+ const newPositions = new Array(size);
+ for (let i = 0; i < size; i++) {
+ newPositions[i] = Cartesian3_default.unpack(numberArray, i * 3);
+ }
+ return newPositions;
+};
+var PolylinePipeline_default = PolylinePipeline;
+
+export {
+ PolylinePipeline_default
+};
diff --git a/public/assets/cesium/Workers/chunk-QQOZO7KO.js b/public/assets/cesium/Workers/chunk-QQOZO7KO.js
new file mode 100644
index 0000000000000000000000000000000000000000..bf9b33851d59baaf4c75593b627552a0b6e0aec1
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-QQOZO7KO.js
@@ -0,0 +1,1258 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ Interval_default
+} from "./chunk-KHZNBFOH.js";
+import {
+ Cartesian3_default,
+ Cartographic_default,
+ Matrix3_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default,
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/QuadraticRealPolynomial.js
+var QuadraticRealPolynomial = {};
+QuadraticRealPolynomial.computeDiscriminant = function(a, b, c) {
+ if (typeof a !== "number") {
+ throw new DeveloperError_default("a is a required number.");
+ }
+ if (typeof b !== "number") {
+ throw new DeveloperError_default("b is a required number.");
+ }
+ if (typeof c !== "number") {
+ throw new DeveloperError_default("c is a required number.");
+ }
+ const discriminant = b * b - 4 * a * c;
+ return discriminant;
+};
+function addWithCancellationCheck(left, right, tolerance) {
+ const difference = left + right;
+ if (Math_default.sign(left) !== Math_default.sign(right) && Math.abs(difference / Math.max(Math.abs(left), Math.abs(right))) < tolerance) {
+ return 0;
+ }
+ return difference;
+}
+QuadraticRealPolynomial.computeRealRoots = function(a, b, c) {
+ if (typeof a !== "number") {
+ throw new DeveloperError_default("a is a required number.");
+ }
+ if (typeof b !== "number") {
+ throw new DeveloperError_default("b is a required number.");
+ }
+ if (typeof c !== "number") {
+ throw new DeveloperError_default("c is a required number.");
+ }
+ let ratio;
+ if (a === 0) {
+ if (b === 0) {
+ return [];
+ }
+ return [-c / b];
+ } else if (b === 0) {
+ if (c === 0) {
+ return [0, 0];
+ }
+ const cMagnitude = Math.abs(c);
+ const aMagnitude = Math.abs(a);
+ if (cMagnitude < aMagnitude && cMagnitude / aMagnitude < Math_default.EPSILON14) {
+ return [0, 0];
+ } else if (cMagnitude > aMagnitude && aMagnitude / cMagnitude < Math_default.EPSILON14) {
+ return [];
+ }
+ ratio = -c / a;
+ if (ratio < 0) {
+ return [];
+ }
+ const root = Math.sqrt(ratio);
+ return [-root, root];
+ } else if (c === 0) {
+ ratio = -b / a;
+ if (ratio < 0) {
+ return [ratio, 0];
+ }
+ return [0, ratio];
+ }
+ const b2 = b * b;
+ const four_ac = 4 * a * c;
+ const radicand = addWithCancellationCheck(b2, -four_ac, Math_default.EPSILON14);
+ if (radicand < 0) {
+ return [];
+ }
+ const q = -0.5 * addWithCancellationCheck(
+ b,
+ Math_default.sign(b) * Math.sqrt(radicand),
+ Math_default.EPSILON14
+ );
+ if (b > 0) {
+ return [q / a, c / q];
+ }
+ return [c / q, q / a];
+};
+var QuadraticRealPolynomial_default = QuadraticRealPolynomial;
+
+// packages/engine/Source/Core/CubicRealPolynomial.js
+var CubicRealPolynomial = {};
+CubicRealPolynomial.computeDiscriminant = function(a, b, c, d) {
+ if (typeof a !== "number") {
+ throw new DeveloperError_default("a is a required number.");
+ }
+ if (typeof b !== "number") {
+ throw new DeveloperError_default("b is a required number.");
+ }
+ if (typeof c !== "number") {
+ throw new DeveloperError_default("c is a required number.");
+ }
+ if (typeof d !== "number") {
+ throw new DeveloperError_default("d is a required number.");
+ }
+ const a2 = a * a;
+ const b2 = b * b;
+ const c2 = c * c;
+ const d2 = d * d;
+ const discriminant = 18 * a * b * c * d + b2 * c2 - 27 * a2 * d2 - 4 * (a * c2 * c + b2 * b * d);
+ return discriminant;
+};
+function computeRealRoots(a, b, c, d) {
+ const A = a;
+ const B = b / 3;
+ const C = c / 3;
+ const D = d;
+ const AC = A * C;
+ const BD = B * D;
+ const B2 = B * B;
+ const C2 = C * C;
+ const delta1 = A * C - B2;
+ const delta2 = A * D - B * C;
+ const delta3 = B * D - C2;
+ const discriminant = 4 * delta1 * delta3 - delta2 * delta2;
+ let temp;
+ let temp1;
+ if (discriminant < 0) {
+ let ABar;
+ let CBar;
+ let DBar;
+ if (B2 * BD >= AC * C2) {
+ ABar = A;
+ CBar = delta1;
+ DBar = -2 * B * delta1 + A * delta2;
+ } else {
+ ABar = D;
+ CBar = delta3;
+ DBar = -D * delta2 + 2 * C * delta3;
+ }
+ const s = DBar < 0 ? -1 : 1;
+ const temp0 = -s * Math.abs(ABar) * Math.sqrt(-discriminant);
+ temp1 = -DBar + temp0;
+ const x = temp1 / 2;
+ const p = x < 0 ? -Math.pow(-x, 1 / 3) : Math.pow(x, 1 / 3);
+ const q = temp1 === temp0 ? -p : -CBar / p;
+ temp = CBar <= 0 ? p + q : -DBar / (p * p + q * q + CBar);
+ if (B2 * BD >= AC * C2) {
+ return [(temp - B) / A];
+ }
+ return [-D / (temp + C)];
+ }
+ const CBarA = delta1;
+ const DBarA = -2 * B * delta1 + A * delta2;
+ const CBarD = delta3;
+ const DBarD = -D * delta2 + 2 * C * delta3;
+ const squareRootOfDiscriminant = Math.sqrt(discriminant);
+ const halfSquareRootOf3 = Math.sqrt(3) / 2;
+ let theta = Math.abs(Math.atan2(A * squareRootOfDiscriminant, -DBarA) / 3);
+ temp = 2 * Math.sqrt(-CBarA);
+ let cosine = Math.cos(theta);
+ temp1 = temp * cosine;
+ let temp3 = temp * (-cosine / 2 - halfSquareRootOf3 * Math.sin(theta));
+ const numeratorLarge = temp1 + temp3 > 2 * B ? temp1 - B : temp3 - B;
+ const denominatorLarge = A;
+ const root1 = numeratorLarge / denominatorLarge;
+ theta = Math.abs(Math.atan2(D * squareRootOfDiscriminant, -DBarD) / 3);
+ temp = 2 * Math.sqrt(-CBarD);
+ cosine = Math.cos(theta);
+ temp1 = temp * cosine;
+ temp3 = temp * (-cosine / 2 - halfSquareRootOf3 * Math.sin(theta));
+ const numeratorSmall = -D;
+ const denominatorSmall = temp1 + temp3 < 2 * C ? temp1 + C : temp3 + C;
+ const root3 = numeratorSmall / denominatorSmall;
+ const E = denominatorLarge * denominatorSmall;
+ const F = -numeratorLarge * denominatorSmall - denominatorLarge * numeratorSmall;
+ const G = numeratorLarge * numeratorSmall;
+ const root2 = (C * F - B * G) / (-B * F + C * E);
+ if (root1 <= root2) {
+ if (root1 <= root3) {
+ if (root2 <= root3) {
+ return [root1, root2, root3];
+ }
+ return [root1, root3, root2];
+ }
+ return [root3, root1, root2];
+ }
+ if (root1 <= root3) {
+ return [root2, root1, root3];
+ }
+ if (root2 <= root3) {
+ return [root2, root3, root1];
+ }
+ return [root3, root2, root1];
+}
+CubicRealPolynomial.computeRealRoots = function(a, b, c, d) {
+ if (typeof a !== "number") {
+ throw new DeveloperError_default("a is a required number.");
+ }
+ if (typeof b !== "number") {
+ throw new DeveloperError_default("b is a required number.");
+ }
+ if (typeof c !== "number") {
+ throw new DeveloperError_default("c is a required number.");
+ }
+ if (typeof d !== "number") {
+ throw new DeveloperError_default("d is a required number.");
+ }
+ let roots;
+ let ratio;
+ if (a === 0) {
+ return QuadraticRealPolynomial_default.computeRealRoots(b, c, d);
+ } else if (b === 0) {
+ if (c === 0) {
+ if (d === 0) {
+ return [0, 0, 0];
+ }
+ ratio = -d / a;
+ const root = ratio < 0 ? -Math.pow(-ratio, 1 / 3) : Math.pow(ratio, 1 / 3);
+ return [root, root, root];
+ } else if (d === 0) {
+ roots = QuadraticRealPolynomial_default.computeRealRoots(a, 0, c);
+ if (roots.Length === 0) {
+ return [0];
+ }
+ return [roots[0], 0, roots[1]];
+ }
+ return computeRealRoots(a, 0, c, d);
+ } else if (c === 0) {
+ if (d === 0) {
+ ratio = -b / a;
+ if (ratio < 0) {
+ return [ratio, 0, 0];
+ }
+ return [0, 0, ratio];
+ }
+ return computeRealRoots(a, b, 0, d);
+ } else if (d === 0) {
+ roots = QuadraticRealPolynomial_default.computeRealRoots(a, b, c);
+ if (roots.length === 0) {
+ return [0];
+ } else if (roots[1] <= 0) {
+ return [roots[0], roots[1], 0];
+ } else if (roots[0] >= 0) {
+ return [0, roots[0], roots[1]];
+ }
+ return [roots[0], 0, roots[1]];
+ }
+ return computeRealRoots(a, b, c, d);
+};
+var CubicRealPolynomial_default = CubicRealPolynomial;
+
+// packages/engine/Source/Core/QuarticRealPolynomial.js
+var QuarticRealPolynomial = {};
+QuarticRealPolynomial.computeDiscriminant = function(a, b, c, d, e) {
+ if (typeof a !== "number") {
+ throw new DeveloperError_default("a is a required number.");
+ }
+ if (typeof b !== "number") {
+ throw new DeveloperError_default("b is a required number.");
+ }
+ if (typeof c !== "number") {
+ throw new DeveloperError_default("c is a required number.");
+ }
+ if (typeof d !== "number") {
+ throw new DeveloperError_default("d is a required number.");
+ }
+ if (typeof e !== "number") {
+ throw new DeveloperError_default("e is a required number.");
+ }
+ const a2 = a * a;
+ const a3 = a2 * a;
+ const b2 = b * b;
+ const b3 = b2 * b;
+ const c2 = c * c;
+ const c3 = c2 * c;
+ const d2 = d * d;
+ const d3 = d2 * d;
+ const e2 = e * e;
+ const e3 = e2 * e;
+ const discriminant = b2 * c2 * d2 - 4 * b3 * d3 - 4 * a * c3 * d2 + 18 * a * b * c * d3 - 27 * a2 * d2 * d2 + 256 * a3 * e3 + e * (18 * b3 * c * d - 4 * b2 * c3 + 16 * a * c2 * c2 - 80 * a * b * c2 * d - 6 * a * b2 * d2 + 144 * a2 * c * d2) + e2 * (144 * a * b2 * c - 27 * b2 * b2 - 128 * a2 * c2 - 192 * a2 * b * d);
+ return discriminant;
+};
+function original(a3, a2, a1, a0) {
+ const a3Squared = a3 * a3;
+ const p = a2 - 3 * a3Squared / 8;
+ const q = a1 - a2 * a3 / 2 + a3Squared * a3 / 8;
+ const r = a0 - a1 * a3 / 4 + a2 * a3Squared / 16 - 3 * a3Squared * a3Squared / 256;
+ const cubicRoots = CubicRealPolynomial_default.computeRealRoots(
+ 1,
+ 2 * p,
+ p * p - 4 * r,
+ -q * q
+ );
+ if (cubicRoots.length > 0) {
+ const temp = -a3 / 4;
+ const hSquared = cubicRoots[cubicRoots.length - 1];
+ if (Math.abs(hSquared) < Math_default.EPSILON14) {
+ const roots = QuadraticRealPolynomial_default.computeRealRoots(1, p, r);
+ if (roots.length === 2) {
+ const root0 = roots[0];
+ const root1 = roots[1];
+ let y;
+ if (root0 >= 0 && root1 >= 0) {
+ const y0 = Math.sqrt(root0);
+ const y1 = Math.sqrt(root1);
+ return [temp - y1, temp - y0, temp + y0, temp + y1];
+ } else if (root0 >= 0 && root1 < 0) {
+ y = Math.sqrt(root0);
+ return [temp - y, temp + y];
+ } else if (root0 < 0 && root1 >= 0) {
+ y = Math.sqrt(root1);
+ return [temp - y, temp + y];
+ }
+ }
+ return [];
+ } else if (hSquared > 0) {
+ const h = Math.sqrt(hSquared);
+ const m = (p + hSquared - q / h) / 2;
+ const n = (p + hSquared + q / h) / 2;
+ const roots1 = QuadraticRealPolynomial_default.computeRealRoots(1, h, m);
+ const roots2 = QuadraticRealPolynomial_default.computeRealRoots(1, -h, n);
+ if (roots1.length !== 0) {
+ roots1[0] += temp;
+ roots1[1] += temp;
+ if (roots2.length !== 0) {
+ roots2[0] += temp;
+ roots2[1] += temp;
+ if (roots1[1] <= roots2[0]) {
+ return [roots1[0], roots1[1], roots2[0], roots2[1]];
+ } else if (roots2[1] <= roots1[0]) {
+ return [roots2[0], roots2[1], roots1[0], roots1[1]];
+ } else if (roots1[0] >= roots2[0] && roots1[1] <= roots2[1]) {
+ return [roots2[0], roots1[0], roots1[1], roots2[1]];
+ } else if (roots2[0] >= roots1[0] && roots2[1] <= roots1[1]) {
+ return [roots1[0], roots2[0], roots2[1], roots1[1]];
+ } else if (roots1[0] > roots2[0] && roots1[0] < roots2[1]) {
+ return [roots2[0], roots1[0], roots2[1], roots1[1]];
+ }
+ return [roots1[0], roots2[0], roots1[1], roots2[1]];
+ }
+ return roots1;
+ }
+ if (roots2.length !== 0) {
+ roots2[0] += temp;
+ roots2[1] += temp;
+ return roots2;
+ }
+ return [];
+ }
+ }
+ return [];
+}
+function neumark(a3, a2, a1, a0) {
+ const a1Squared = a1 * a1;
+ const a2Squared = a2 * a2;
+ const a3Squared = a3 * a3;
+ const p = -2 * a2;
+ const q = a1 * a3 + a2Squared - 4 * a0;
+ const r = a3Squared * a0 - a1 * a2 * a3 + a1Squared;
+ const cubicRoots = CubicRealPolynomial_default.computeRealRoots(1, p, q, r);
+ if (cubicRoots.length > 0) {
+ const y = cubicRoots[0];
+ const temp = a2 - y;
+ const tempSquared = temp * temp;
+ const g1 = a3 / 2;
+ const h1 = temp / 2;
+ const m = tempSquared - 4 * a0;
+ const mError = tempSquared + 4 * Math.abs(a0);
+ const n = a3Squared - 4 * y;
+ const nError = a3Squared + 4 * Math.abs(y);
+ let g2;
+ let h2;
+ if (y < 0 || m * nError < n * mError) {
+ const squareRootOfN = Math.sqrt(n);
+ g2 = squareRootOfN / 2;
+ h2 = squareRootOfN === 0 ? 0 : (a3 * h1 - a1) / squareRootOfN;
+ } else {
+ const squareRootOfM = Math.sqrt(m);
+ g2 = squareRootOfM === 0 ? 0 : (a3 * h1 - a1) / squareRootOfM;
+ h2 = squareRootOfM / 2;
+ }
+ let G;
+ let g;
+ if (g1 === 0 && g2 === 0) {
+ G = 0;
+ g = 0;
+ } else if (Math_default.sign(g1) === Math_default.sign(g2)) {
+ G = g1 + g2;
+ g = y / G;
+ } else {
+ g = g1 - g2;
+ G = y / g;
+ }
+ let H;
+ let h;
+ if (h1 === 0 && h2 === 0) {
+ H = 0;
+ h = 0;
+ } else if (Math_default.sign(h1) === Math_default.sign(h2)) {
+ H = h1 + h2;
+ h = a0 / H;
+ } else {
+ h = h1 - h2;
+ H = a0 / h;
+ }
+ const roots1 = QuadraticRealPolynomial_default.computeRealRoots(1, G, H);
+ const roots2 = QuadraticRealPolynomial_default.computeRealRoots(1, g, h);
+ if (roots1.length !== 0) {
+ if (roots2.length !== 0) {
+ if (roots1[1] <= roots2[0]) {
+ return [roots1[0], roots1[1], roots2[0], roots2[1]];
+ } else if (roots2[1] <= roots1[0]) {
+ return [roots2[0], roots2[1], roots1[0], roots1[1]];
+ } else if (roots1[0] >= roots2[0] && roots1[1] <= roots2[1]) {
+ return [roots2[0], roots1[0], roots1[1], roots2[1]];
+ } else if (roots2[0] >= roots1[0] && roots2[1] <= roots1[1]) {
+ return [roots1[0], roots2[0], roots2[1], roots1[1]];
+ } else if (roots1[0] > roots2[0] && roots1[0] < roots2[1]) {
+ return [roots2[0], roots1[0], roots2[1], roots1[1]];
+ }
+ return [roots1[0], roots2[0], roots1[1], roots2[1]];
+ }
+ return roots1;
+ }
+ if (roots2.length !== 0) {
+ return roots2;
+ }
+ }
+ return [];
+}
+QuarticRealPolynomial.computeRealRoots = function(a, b, c, d, e) {
+ if (typeof a !== "number") {
+ throw new DeveloperError_default("a is a required number.");
+ }
+ if (typeof b !== "number") {
+ throw new DeveloperError_default("b is a required number.");
+ }
+ if (typeof c !== "number") {
+ throw new DeveloperError_default("c is a required number.");
+ }
+ if (typeof d !== "number") {
+ throw new DeveloperError_default("d is a required number.");
+ }
+ if (typeof e !== "number") {
+ throw new DeveloperError_default("e is a required number.");
+ }
+ if (Math.abs(a) < Math_default.EPSILON15) {
+ return CubicRealPolynomial_default.computeRealRoots(b, c, d, e);
+ }
+ const a3 = b / a;
+ const a2 = c / a;
+ const a1 = d / a;
+ const a0 = e / a;
+ let k = a3 < 0 ? 1 : 0;
+ k += a2 < 0 ? k + 1 : k;
+ k += a1 < 0 ? k + 1 : k;
+ k += a0 < 0 ? k + 1 : k;
+ switch (k) {
+ case 0:
+ return original(a3, a2, a1, a0);
+ case 1:
+ return neumark(a3, a2, a1, a0);
+ case 2:
+ return neumark(a3, a2, a1, a0);
+ case 3:
+ return original(a3, a2, a1, a0);
+ case 4:
+ return original(a3, a2, a1, a0);
+ case 5:
+ return neumark(a3, a2, a1, a0);
+ case 6:
+ return original(a3, a2, a1, a0);
+ case 7:
+ return original(a3, a2, a1, a0);
+ case 8:
+ return neumark(a3, a2, a1, a0);
+ case 9:
+ return original(a3, a2, a1, a0);
+ case 10:
+ return original(a3, a2, a1, a0);
+ case 11:
+ return neumark(a3, a2, a1, a0);
+ case 12:
+ return original(a3, a2, a1, a0);
+ case 13:
+ return original(a3, a2, a1, a0);
+ case 14:
+ return original(a3, a2, a1, a0);
+ case 15:
+ return original(a3, a2, a1, a0);
+ default:
+ return void 0;
+ }
+};
+var QuarticRealPolynomial_default = QuarticRealPolynomial;
+
+// packages/engine/Source/Core/Ray.js
+function Ray(origin, direction) {
+ direction = Cartesian3_default.clone(defaultValue_default(direction, Cartesian3_default.ZERO));
+ if (!Cartesian3_default.equals(direction, Cartesian3_default.ZERO)) {
+ Cartesian3_default.normalize(direction, direction);
+ }
+ this.origin = Cartesian3_default.clone(defaultValue_default(origin, Cartesian3_default.ZERO));
+ this.direction = direction;
+}
+Ray.clone = function(ray, result) {
+ if (!defined_default(ray)) {
+ return void 0;
+ }
+ if (!defined_default(result)) {
+ return new Ray(ray.origin, ray.direction);
+ }
+ result.origin = Cartesian3_default.clone(ray.origin);
+ result.direction = Cartesian3_default.clone(ray.direction);
+ return result;
+};
+Ray.getPoint = function(ray, t, result) {
+ Check_default.typeOf.object("ray", ray);
+ Check_default.typeOf.number("t", t);
+ if (!defined_default(result)) {
+ result = new Cartesian3_default();
+ }
+ result = Cartesian3_default.multiplyByScalar(ray.direction, t, result);
+ return Cartesian3_default.add(ray.origin, result, result);
+};
+var Ray_default = Ray;
+
+// packages/engine/Source/Core/IntersectionTests.js
+var IntersectionTests = {};
+IntersectionTests.rayPlane = function(ray, plane, result) {
+ if (!defined_default(ray)) {
+ throw new DeveloperError_default("ray is required.");
+ }
+ if (!defined_default(plane)) {
+ throw new DeveloperError_default("plane is required.");
+ }
+ if (!defined_default(result)) {
+ result = new Cartesian3_default();
+ }
+ const origin = ray.origin;
+ const direction = ray.direction;
+ const normal = plane.normal;
+ const denominator = Cartesian3_default.dot(normal, direction);
+ if (Math.abs(denominator) < Math_default.EPSILON15) {
+ return void 0;
+ }
+ const t = (-plane.distance - Cartesian3_default.dot(normal, origin)) / denominator;
+ if (t < 0) {
+ return void 0;
+ }
+ result = Cartesian3_default.multiplyByScalar(direction, t, result);
+ return Cartesian3_default.add(origin, result, result);
+};
+var scratchEdge0 = new Cartesian3_default();
+var scratchEdge1 = new Cartesian3_default();
+var scratchPVec = new Cartesian3_default();
+var scratchTVec = new Cartesian3_default();
+var scratchQVec = new Cartesian3_default();
+IntersectionTests.rayTriangleParametric = function(ray, p0, p1, p2, cullBackFaces) {
+ if (!defined_default(ray)) {
+ throw new DeveloperError_default("ray is required.");
+ }
+ if (!defined_default(p0)) {
+ throw new DeveloperError_default("p0 is required.");
+ }
+ if (!defined_default(p1)) {
+ throw new DeveloperError_default("p1 is required.");
+ }
+ if (!defined_default(p2)) {
+ throw new DeveloperError_default("p2 is required.");
+ }
+ cullBackFaces = defaultValue_default(cullBackFaces, false);
+ const origin = ray.origin;
+ const direction = ray.direction;
+ const edge0 = Cartesian3_default.subtract(p1, p0, scratchEdge0);
+ const edge1 = Cartesian3_default.subtract(p2, p0, scratchEdge1);
+ const p = Cartesian3_default.cross(direction, edge1, scratchPVec);
+ const det = Cartesian3_default.dot(edge0, p);
+ let tvec;
+ let q;
+ let u;
+ let v;
+ let t;
+ if (cullBackFaces) {
+ if (det < Math_default.EPSILON6) {
+ return void 0;
+ }
+ tvec = Cartesian3_default.subtract(origin, p0, scratchTVec);
+ u = Cartesian3_default.dot(tvec, p);
+ if (u < 0 || u > det) {
+ return void 0;
+ }
+ q = Cartesian3_default.cross(tvec, edge0, scratchQVec);
+ v = Cartesian3_default.dot(direction, q);
+ if (v < 0 || u + v > det) {
+ return void 0;
+ }
+ t = Cartesian3_default.dot(edge1, q) / det;
+ } else {
+ if (Math.abs(det) < Math_default.EPSILON6) {
+ return void 0;
+ }
+ const invDet = 1 / det;
+ tvec = Cartesian3_default.subtract(origin, p0, scratchTVec);
+ u = Cartesian3_default.dot(tvec, p) * invDet;
+ if (u < 0 || u > 1) {
+ return void 0;
+ }
+ q = Cartesian3_default.cross(tvec, edge0, scratchQVec);
+ v = Cartesian3_default.dot(direction, q) * invDet;
+ if (v < 0 || u + v > 1) {
+ return void 0;
+ }
+ t = Cartesian3_default.dot(edge1, q) * invDet;
+ }
+ return t;
+};
+IntersectionTests.rayTriangle = function(ray, p0, p1, p2, cullBackFaces, result) {
+ const t = IntersectionTests.rayTriangleParametric(
+ ray,
+ p0,
+ p1,
+ p2,
+ cullBackFaces
+ );
+ if (!defined_default(t) || t < 0) {
+ return void 0;
+ }
+ if (!defined_default(result)) {
+ result = new Cartesian3_default();
+ }
+ Cartesian3_default.multiplyByScalar(ray.direction, t, result);
+ return Cartesian3_default.add(ray.origin, result, result);
+};
+var scratchLineSegmentTriangleRay = new Ray_default();
+IntersectionTests.lineSegmentTriangle = function(v0, v1, p0, p1, p2, cullBackFaces, result) {
+ if (!defined_default(v0)) {
+ throw new DeveloperError_default("v0 is required.");
+ }
+ if (!defined_default(v1)) {
+ throw new DeveloperError_default("v1 is required.");
+ }
+ if (!defined_default(p0)) {
+ throw new DeveloperError_default("p0 is required.");
+ }
+ if (!defined_default(p1)) {
+ throw new DeveloperError_default("p1 is required.");
+ }
+ if (!defined_default(p2)) {
+ throw new DeveloperError_default("p2 is required.");
+ }
+ const ray = scratchLineSegmentTriangleRay;
+ Cartesian3_default.clone(v0, ray.origin);
+ Cartesian3_default.subtract(v1, v0, ray.direction);
+ Cartesian3_default.normalize(ray.direction, ray.direction);
+ const t = IntersectionTests.rayTriangleParametric(
+ ray,
+ p0,
+ p1,
+ p2,
+ cullBackFaces
+ );
+ if (!defined_default(t) || t < 0 || t > Cartesian3_default.distance(v0, v1)) {
+ return void 0;
+ }
+ if (!defined_default(result)) {
+ result = new Cartesian3_default();
+ }
+ Cartesian3_default.multiplyByScalar(ray.direction, t, result);
+ return Cartesian3_default.add(ray.origin, result, result);
+};
+function solveQuadratic(a, b, c, result) {
+ const det = b * b - 4 * a * c;
+ if (det < 0) {
+ return void 0;
+ } else if (det > 0) {
+ const denom = 1 / (2 * a);
+ const disc = Math.sqrt(det);
+ const root0 = (-b + disc) * denom;
+ const root1 = (-b - disc) * denom;
+ if (root0 < root1) {
+ result.root0 = root0;
+ result.root1 = root1;
+ } else {
+ result.root0 = root1;
+ result.root1 = root0;
+ }
+ return result;
+ }
+ const root = -b / (2 * a);
+ if (root === 0) {
+ return void 0;
+ }
+ result.root0 = result.root1 = root;
+ return result;
+}
+var raySphereRoots = {
+ root0: 0,
+ root1: 0
+};
+function raySphere(ray, sphere, result) {
+ if (!defined_default(result)) {
+ result = new Interval_default();
+ }
+ const origin = ray.origin;
+ const direction = ray.direction;
+ const center = sphere.center;
+ const radiusSquared = sphere.radius * sphere.radius;
+ const diff = Cartesian3_default.subtract(origin, center, scratchPVec);
+ const a = Cartesian3_default.dot(direction, direction);
+ const b = 2 * Cartesian3_default.dot(direction, diff);
+ const c = Cartesian3_default.magnitudeSquared(diff) - radiusSquared;
+ const roots = solveQuadratic(a, b, c, raySphereRoots);
+ if (!defined_default(roots)) {
+ return void 0;
+ }
+ result.start = roots.root0;
+ result.stop = roots.root1;
+ return result;
+}
+IntersectionTests.raySphere = function(ray, sphere, result) {
+ if (!defined_default(ray)) {
+ throw new DeveloperError_default("ray is required.");
+ }
+ if (!defined_default(sphere)) {
+ throw new DeveloperError_default("sphere is required.");
+ }
+ result = raySphere(ray, sphere, result);
+ if (!defined_default(result) || result.stop < 0) {
+ return void 0;
+ }
+ result.start = Math.max(result.start, 0);
+ return result;
+};
+var scratchLineSegmentRay = new Ray_default();
+IntersectionTests.lineSegmentSphere = function(p0, p1, sphere, result) {
+ if (!defined_default(p0)) {
+ throw new DeveloperError_default("p0 is required.");
+ }
+ if (!defined_default(p1)) {
+ throw new DeveloperError_default("p1 is required.");
+ }
+ if (!defined_default(sphere)) {
+ throw new DeveloperError_default("sphere is required.");
+ }
+ const ray = scratchLineSegmentRay;
+ Cartesian3_default.clone(p0, ray.origin);
+ const direction = Cartesian3_default.subtract(p1, p0, ray.direction);
+ const maxT = Cartesian3_default.magnitude(direction);
+ Cartesian3_default.normalize(direction, direction);
+ result = raySphere(ray, sphere, result);
+ if (!defined_default(result) || result.stop < 0 || result.start > maxT) {
+ return void 0;
+ }
+ result.start = Math.max(result.start, 0);
+ result.stop = Math.min(result.stop, maxT);
+ return result;
+};
+var scratchQ = new Cartesian3_default();
+var scratchW = new Cartesian3_default();
+IntersectionTests.rayEllipsoid = function(ray, ellipsoid) {
+ if (!defined_default(ray)) {
+ throw new DeveloperError_default("ray is required.");
+ }
+ if (!defined_default(ellipsoid)) {
+ throw new DeveloperError_default("ellipsoid is required.");
+ }
+ const inverseRadii = ellipsoid.oneOverRadii;
+ const q = Cartesian3_default.multiplyComponents(inverseRadii, ray.origin, scratchQ);
+ const w = Cartesian3_default.multiplyComponents(
+ inverseRadii,
+ ray.direction,
+ scratchW
+ );
+ const q2 = Cartesian3_default.magnitudeSquared(q);
+ const qw = Cartesian3_default.dot(q, w);
+ let difference, w2, product, discriminant, temp;
+ if (q2 > 1) {
+ if (qw >= 0) {
+ return void 0;
+ }
+ const qw2 = qw * qw;
+ difference = q2 - 1;
+ w2 = Cartesian3_default.magnitudeSquared(w);
+ product = w2 * difference;
+ if (qw2 < product) {
+ return void 0;
+ } else if (qw2 > product) {
+ discriminant = qw * qw - product;
+ temp = -qw + Math.sqrt(discriminant);
+ const root0 = temp / w2;
+ const root1 = difference / temp;
+ if (root0 < root1) {
+ return new Interval_default(root0, root1);
+ }
+ return {
+ start: root1,
+ stop: root0
+ };
+ }
+ const root = Math.sqrt(difference / w2);
+ return new Interval_default(root, root);
+ } else if (q2 < 1) {
+ difference = q2 - 1;
+ w2 = Cartesian3_default.magnitudeSquared(w);
+ product = w2 * difference;
+ discriminant = qw * qw - product;
+ temp = -qw + Math.sqrt(discriminant);
+ return new Interval_default(0, temp / w2);
+ }
+ if (qw < 0) {
+ w2 = Cartesian3_default.magnitudeSquared(w);
+ return new Interval_default(0, -qw / w2);
+ }
+ return void 0;
+};
+function addWithCancellationCheck2(left, right, tolerance) {
+ const difference = left + right;
+ if (Math_default.sign(left) !== Math_default.sign(right) && Math.abs(difference / Math.max(Math.abs(left), Math.abs(right))) < tolerance) {
+ return 0;
+ }
+ return difference;
+}
+IntersectionTests.quadraticVectorExpression = function(A, b, c, x, w) {
+ const xSquared = x * x;
+ const wSquared = w * w;
+ const l2 = (A[Matrix3_default.COLUMN1ROW1] - A[Matrix3_default.COLUMN2ROW2]) * wSquared;
+ const l1 = w * (x * addWithCancellationCheck2(
+ A[Matrix3_default.COLUMN1ROW0],
+ A[Matrix3_default.COLUMN0ROW1],
+ Math_default.EPSILON15
+ ) + b.y);
+ const l0 = A[Matrix3_default.COLUMN0ROW0] * xSquared + A[Matrix3_default.COLUMN2ROW2] * wSquared + x * b.x + c;
+ const r1 = wSquared * addWithCancellationCheck2(
+ A[Matrix3_default.COLUMN2ROW1],
+ A[Matrix3_default.COLUMN1ROW2],
+ Math_default.EPSILON15
+ );
+ const r0 = w * (x * addWithCancellationCheck2(A[Matrix3_default.COLUMN2ROW0], A[Matrix3_default.COLUMN0ROW2]) + b.z);
+ let cosines;
+ const solutions = [];
+ if (r0 === 0 && r1 === 0) {
+ cosines = QuadraticRealPolynomial_default.computeRealRoots(l2, l1, l0);
+ if (cosines.length === 0) {
+ return solutions;
+ }
+ const cosine0 = cosines[0];
+ const sine0 = Math.sqrt(Math.max(1 - cosine0 * cosine0, 0));
+ solutions.push(new Cartesian3_default(x, w * cosine0, w * -sine0));
+ solutions.push(new Cartesian3_default(x, w * cosine0, w * sine0));
+ if (cosines.length === 2) {
+ const cosine1 = cosines[1];
+ const sine1 = Math.sqrt(Math.max(1 - cosine1 * cosine1, 0));
+ solutions.push(new Cartesian3_default(x, w * cosine1, w * -sine1));
+ solutions.push(new Cartesian3_default(x, w * cosine1, w * sine1));
+ }
+ return solutions;
+ }
+ const r0Squared = r0 * r0;
+ const r1Squared = r1 * r1;
+ const l2Squared = l2 * l2;
+ const r0r1 = r0 * r1;
+ const c4 = l2Squared + r1Squared;
+ const c3 = 2 * (l1 * l2 + r0r1);
+ const c2 = 2 * l0 * l2 + l1 * l1 - r1Squared + r0Squared;
+ const c1 = 2 * (l0 * l1 - r0r1);
+ const c0 = l0 * l0 - r0Squared;
+ if (c4 === 0 && c3 === 0 && c2 === 0 && c1 === 0) {
+ return solutions;
+ }
+ cosines = QuarticRealPolynomial_default.computeRealRoots(c4, c3, c2, c1, c0);
+ const length = cosines.length;
+ if (length === 0) {
+ return solutions;
+ }
+ for (let i = 0; i < length; ++i) {
+ const cosine = cosines[i];
+ const cosineSquared = cosine * cosine;
+ const sineSquared = Math.max(1 - cosineSquared, 0);
+ const sine = Math.sqrt(sineSquared);
+ let left;
+ if (Math_default.sign(l2) === Math_default.sign(l0)) {
+ left = addWithCancellationCheck2(
+ l2 * cosineSquared + l0,
+ l1 * cosine,
+ Math_default.EPSILON12
+ );
+ } else if (Math_default.sign(l0) === Math_default.sign(l1 * cosine)) {
+ left = addWithCancellationCheck2(
+ l2 * cosineSquared,
+ l1 * cosine + l0,
+ Math_default.EPSILON12
+ );
+ } else {
+ left = addWithCancellationCheck2(
+ l2 * cosineSquared + l1 * cosine,
+ l0,
+ Math_default.EPSILON12
+ );
+ }
+ const right = addWithCancellationCheck2(
+ r1 * cosine,
+ r0,
+ Math_default.EPSILON15
+ );
+ const product = left * right;
+ if (product < 0) {
+ solutions.push(new Cartesian3_default(x, w * cosine, w * sine));
+ } else if (product > 0) {
+ solutions.push(new Cartesian3_default(x, w * cosine, w * -sine));
+ } else if (sine !== 0) {
+ solutions.push(new Cartesian3_default(x, w * cosine, w * -sine));
+ solutions.push(new Cartesian3_default(x, w * cosine, w * sine));
+ ++i;
+ } else {
+ solutions.push(new Cartesian3_default(x, w * cosine, w * sine));
+ }
+ }
+ return solutions;
+};
+var firstAxisScratch = new Cartesian3_default();
+var secondAxisScratch = new Cartesian3_default();
+var thirdAxisScratch = new Cartesian3_default();
+var referenceScratch = new Cartesian3_default();
+var bCart = new Cartesian3_default();
+var bScratch = new Matrix3_default();
+var btScratch = new Matrix3_default();
+var diScratch = new Matrix3_default();
+var dScratch = new Matrix3_default();
+var cScratch = new Matrix3_default();
+var tempMatrix = new Matrix3_default();
+var aScratch = new Matrix3_default();
+var sScratch = new Cartesian3_default();
+var closestScratch = new Cartesian3_default();
+var surfPointScratch = new Cartographic_default();
+IntersectionTests.grazingAltitudeLocation = function(ray, ellipsoid) {
+ if (!defined_default(ray)) {
+ throw new DeveloperError_default("ray is required.");
+ }
+ if (!defined_default(ellipsoid)) {
+ throw new DeveloperError_default("ellipsoid is required.");
+ }
+ const position = ray.origin;
+ const direction = ray.direction;
+ if (!Cartesian3_default.equals(position, Cartesian3_default.ZERO)) {
+ const normal = ellipsoid.geodeticSurfaceNormal(position, firstAxisScratch);
+ if (Cartesian3_default.dot(direction, normal) >= 0) {
+ return position;
+ }
+ }
+ const intersects = defined_default(this.rayEllipsoid(ray, ellipsoid));
+ const f = ellipsoid.transformPositionToScaledSpace(
+ direction,
+ firstAxisScratch
+ );
+ const firstAxis = Cartesian3_default.normalize(f, f);
+ const reference = Cartesian3_default.mostOrthogonalAxis(f, referenceScratch);
+ const secondAxis = Cartesian3_default.normalize(
+ Cartesian3_default.cross(reference, firstAxis, secondAxisScratch),
+ secondAxisScratch
+ );
+ const thirdAxis = Cartesian3_default.normalize(
+ Cartesian3_default.cross(firstAxis, secondAxis, thirdAxisScratch),
+ thirdAxisScratch
+ );
+ const B = bScratch;
+ B[0] = firstAxis.x;
+ B[1] = firstAxis.y;
+ B[2] = firstAxis.z;
+ B[3] = secondAxis.x;
+ B[4] = secondAxis.y;
+ B[5] = secondAxis.z;
+ B[6] = thirdAxis.x;
+ B[7] = thirdAxis.y;
+ B[8] = thirdAxis.z;
+ const B_T = Matrix3_default.transpose(B, btScratch);
+ const D_I = Matrix3_default.fromScale(ellipsoid.radii, diScratch);
+ const D = Matrix3_default.fromScale(ellipsoid.oneOverRadii, dScratch);
+ const C = cScratch;
+ C[0] = 0;
+ C[1] = -direction.z;
+ C[2] = direction.y;
+ C[3] = direction.z;
+ C[4] = 0;
+ C[5] = -direction.x;
+ C[6] = -direction.y;
+ C[7] = direction.x;
+ C[8] = 0;
+ const temp = Matrix3_default.multiply(
+ Matrix3_default.multiply(B_T, D, tempMatrix),
+ C,
+ tempMatrix
+ );
+ const A = Matrix3_default.multiply(
+ Matrix3_default.multiply(temp, D_I, aScratch),
+ B,
+ aScratch
+ );
+ const b = Matrix3_default.multiplyByVector(temp, position, bCart);
+ const solutions = IntersectionTests.quadraticVectorExpression(
+ A,
+ Cartesian3_default.negate(b, firstAxisScratch),
+ 0,
+ 0,
+ 1
+ );
+ let s;
+ let altitude;
+ const length = solutions.length;
+ if (length > 0) {
+ let closest = Cartesian3_default.clone(Cartesian3_default.ZERO, closestScratch);
+ let maximumValue = Number.NEGATIVE_INFINITY;
+ for (let i = 0; i < length; ++i) {
+ s = Matrix3_default.multiplyByVector(
+ D_I,
+ Matrix3_default.multiplyByVector(B, solutions[i], sScratch),
+ sScratch
+ );
+ const v = Cartesian3_default.normalize(
+ Cartesian3_default.subtract(s, position, referenceScratch),
+ referenceScratch
+ );
+ const dotProduct = Cartesian3_default.dot(v, direction);
+ if (dotProduct > maximumValue) {
+ maximumValue = dotProduct;
+ closest = Cartesian3_default.clone(s, closest);
+ }
+ }
+ const surfacePoint = ellipsoid.cartesianToCartographic(
+ closest,
+ surfPointScratch
+ );
+ maximumValue = Math_default.clamp(maximumValue, 0, 1);
+ altitude = Cartesian3_default.magnitude(
+ Cartesian3_default.subtract(closest, position, referenceScratch)
+ ) * Math.sqrt(1 - maximumValue * maximumValue);
+ altitude = intersects ? -altitude : altitude;
+ surfacePoint.height = altitude;
+ return ellipsoid.cartographicToCartesian(surfacePoint, new Cartesian3_default());
+ }
+ return void 0;
+};
+var lineSegmentPlaneDifference = new Cartesian3_default();
+IntersectionTests.lineSegmentPlane = function(endPoint0, endPoint1, plane, result) {
+ if (!defined_default(endPoint0)) {
+ throw new DeveloperError_default("endPoint0 is required.");
+ }
+ if (!defined_default(endPoint1)) {
+ throw new DeveloperError_default("endPoint1 is required.");
+ }
+ if (!defined_default(plane)) {
+ throw new DeveloperError_default("plane is required.");
+ }
+ if (!defined_default(result)) {
+ result = new Cartesian3_default();
+ }
+ const difference = Cartesian3_default.subtract(
+ endPoint1,
+ endPoint0,
+ lineSegmentPlaneDifference
+ );
+ const normal = plane.normal;
+ const nDotDiff = Cartesian3_default.dot(normal, difference);
+ if (Math.abs(nDotDiff) < Math_default.EPSILON6) {
+ return void 0;
+ }
+ const nDotP0 = Cartesian3_default.dot(normal, endPoint0);
+ const t = -(plane.distance + nDotP0) / nDotDiff;
+ if (t < 0 || t > 1) {
+ return void 0;
+ }
+ Cartesian3_default.multiplyByScalar(difference, t, result);
+ Cartesian3_default.add(endPoint0, result, result);
+ return result;
+};
+IntersectionTests.trianglePlaneIntersection = function(p0, p1, p2, plane) {
+ if (!defined_default(p0) || !defined_default(p1) || !defined_default(p2) || !defined_default(plane)) {
+ throw new DeveloperError_default("p0, p1, p2, and plane are required.");
+ }
+ const planeNormal = plane.normal;
+ const planeD = plane.distance;
+ const p0Behind = Cartesian3_default.dot(planeNormal, p0) + planeD < 0;
+ const p1Behind = Cartesian3_default.dot(planeNormal, p1) + planeD < 0;
+ const p2Behind = Cartesian3_default.dot(planeNormal, p2) + planeD < 0;
+ let numBehind = 0;
+ numBehind += p0Behind ? 1 : 0;
+ numBehind += p1Behind ? 1 : 0;
+ numBehind += p2Behind ? 1 : 0;
+ let u1, u2;
+ if (numBehind === 1 || numBehind === 2) {
+ u1 = new Cartesian3_default();
+ u2 = new Cartesian3_default();
+ }
+ if (numBehind === 1) {
+ if (p0Behind) {
+ IntersectionTests.lineSegmentPlane(p0, p1, plane, u1);
+ IntersectionTests.lineSegmentPlane(p0, p2, plane, u2);
+ return {
+ positions: [p0, p1, p2, u1, u2],
+ indices: [
+ // Behind
+ 0,
+ 3,
+ 4,
+ // In front
+ 1,
+ 2,
+ 4,
+ 1,
+ 4,
+ 3
+ ]
+ };
+ } else if (p1Behind) {
+ IntersectionTests.lineSegmentPlane(p1, p2, plane, u1);
+ IntersectionTests.lineSegmentPlane(p1, p0, plane, u2);
+ return {
+ positions: [p0, p1, p2, u1, u2],
+ indices: [
+ // Behind
+ 1,
+ 3,
+ 4,
+ // In front
+ 2,
+ 0,
+ 4,
+ 2,
+ 4,
+ 3
+ ]
+ };
+ } else if (p2Behind) {
+ IntersectionTests.lineSegmentPlane(p2, p0, plane, u1);
+ IntersectionTests.lineSegmentPlane(p2, p1, plane, u2);
+ return {
+ positions: [p0, p1, p2, u1, u2],
+ indices: [
+ // Behind
+ 2,
+ 3,
+ 4,
+ // In front
+ 0,
+ 1,
+ 4,
+ 0,
+ 4,
+ 3
+ ]
+ };
+ }
+ } else if (numBehind === 2) {
+ if (!p0Behind) {
+ IntersectionTests.lineSegmentPlane(p1, p0, plane, u1);
+ IntersectionTests.lineSegmentPlane(p2, p0, plane, u2);
+ return {
+ positions: [p0, p1, p2, u1, u2],
+ indices: [
+ // Behind
+ 1,
+ 2,
+ 4,
+ 1,
+ 4,
+ 3,
+ // In front
+ 0,
+ 3,
+ 4
+ ]
+ };
+ } else if (!p1Behind) {
+ IntersectionTests.lineSegmentPlane(p2, p1, plane, u1);
+ IntersectionTests.lineSegmentPlane(p0, p1, plane, u2);
+ return {
+ positions: [p0, p1, p2, u1, u2],
+ indices: [
+ // Behind
+ 2,
+ 0,
+ 4,
+ 2,
+ 4,
+ 3,
+ // In front
+ 1,
+ 3,
+ 4
+ ]
+ };
+ } else if (!p2Behind) {
+ IntersectionTests.lineSegmentPlane(p0, p2, plane, u1);
+ IntersectionTests.lineSegmentPlane(p1, p2, plane, u2);
+ return {
+ positions: [p0, p1, p2, u1, u2],
+ indices: [
+ // Behind
+ 0,
+ 1,
+ 4,
+ 0,
+ 4,
+ 3,
+ // In front
+ 2,
+ 3,
+ 4
+ ]
+ };
+ }
+ }
+ return void 0;
+};
+var IntersectionTests_default = IntersectionTests;
+
+export {
+ Ray_default,
+ IntersectionTests_default
+};
diff --git a/public/assets/cesium/Workers/chunk-RJM36CNY.js b/public/assets/cesium/Workers/chunk-RJM36CNY.js
new file mode 100644
index 0000000000000000000000000000000000000000..ba9d31ba59f1707170607a0506044d7a366d8a31
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-RJM36CNY.js
@@ -0,0 +1,117 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ Cartesian3_default,
+ Cartographic_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/WebMercatorProjection.js
+function WebMercatorProjection(ellipsoid) {
+ this._ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.WGS84);
+ this._semimajorAxis = this._ellipsoid.maximumRadius;
+ this._oneOverSemimajorAxis = 1 / this._semimajorAxis;
+}
+Object.defineProperties(WebMercatorProjection.prototype, {
+ /**
+ * Gets the {@link Ellipsoid}.
+ *
+ * @memberof WebMercatorProjection.prototype
+ *
+ * @type {Ellipsoid}
+ * @readonly
+ */
+ ellipsoid: {
+ get: function() {
+ return this._ellipsoid;
+ }
+ }
+});
+WebMercatorProjection.mercatorAngleToGeodeticLatitude = function(mercatorAngle) {
+ return Math_default.PI_OVER_TWO - 2 * Math.atan(Math.exp(-mercatorAngle));
+};
+WebMercatorProjection.geodeticLatitudeToMercatorAngle = function(latitude) {
+ if (latitude > WebMercatorProjection.MaximumLatitude) {
+ latitude = WebMercatorProjection.MaximumLatitude;
+ } else if (latitude < -WebMercatorProjection.MaximumLatitude) {
+ latitude = -WebMercatorProjection.MaximumLatitude;
+ }
+ const sinLatitude = Math.sin(latitude);
+ return 0.5 * Math.log((1 + sinLatitude) / (1 - sinLatitude));
+};
+WebMercatorProjection.MaximumLatitude = WebMercatorProjection.mercatorAngleToGeodeticLatitude(
+ Math.PI
+);
+WebMercatorProjection.prototype.project = function(cartographic, result) {
+ const semimajorAxis = this._semimajorAxis;
+ const x = cartographic.longitude * semimajorAxis;
+ const y = WebMercatorProjection.geodeticLatitudeToMercatorAngle(
+ cartographic.latitude
+ ) * semimajorAxis;
+ const z = cartographic.height;
+ if (!defined_default(result)) {
+ return new Cartesian3_default(x, y, z);
+ }
+ result.x = x;
+ result.y = y;
+ result.z = z;
+ return result;
+};
+WebMercatorProjection.prototype.unproject = function(cartesian, result) {
+ if (!defined_default(cartesian)) {
+ throw new DeveloperError_default("cartesian is required");
+ }
+ const oneOverEarthSemimajorAxis = this._oneOverSemimajorAxis;
+ const longitude = cartesian.x * oneOverEarthSemimajorAxis;
+ const latitude = WebMercatorProjection.mercatorAngleToGeodeticLatitude(
+ cartesian.y * oneOverEarthSemimajorAxis
+ );
+ const height = cartesian.z;
+ if (!defined_default(result)) {
+ return new Cartographic_default(longitude, latitude, height);
+ }
+ result.longitude = longitude;
+ result.latitude = latitude;
+ result.height = height;
+ return result;
+};
+var WebMercatorProjection_default = WebMercatorProjection;
+
+export {
+ WebMercatorProjection_default
+};
diff --git a/public/assets/cesium/Workers/chunk-RTJKHZWU.js b/public/assets/cesium/Workers/chunk-RTJKHZWU.js
new file mode 100644
index 0000000000000000000000000000000000000000..4972a8b676fef922039cd92b8b1031fb937513c8
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-RTJKHZWU.js
@@ -0,0 +1,196 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ PolylinePipeline_default
+} from "./chunk-QN6TBED4.js";
+import {
+ arrayRemoveDuplicates_default
+} from "./chunk-57H6I3SV.js";
+import {
+ Cartesian3_default,
+ Cartographic_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/WallGeometryLibrary.js
+var WallGeometryLibrary = {};
+function latLonEquals(c0, c1) {
+ return Math_default.equalsEpsilon(c0.latitude, c1.latitude, Math_default.EPSILON10) && Math_default.equalsEpsilon(c0.longitude, c1.longitude, Math_default.EPSILON10);
+}
+var scratchCartographic1 = new Cartographic_default();
+var scratchCartographic2 = new Cartographic_default();
+function removeDuplicates(ellipsoid, positions, topHeights, bottomHeights) {
+ positions = arrayRemoveDuplicates_default(positions, Cartesian3_default.equalsEpsilon);
+ const length = positions.length;
+ if (length < 2) {
+ return;
+ }
+ const hasBottomHeights = defined_default(bottomHeights);
+ const hasTopHeights = defined_default(topHeights);
+ const cleanedPositions = new Array(length);
+ const cleanedTopHeights = new Array(length);
+ const cleanedBottomHeights = new Array(length);
+ const v0 = positions[0];
+ cleanedPositions[0] = v0;
+ const c0 = ellipsoid.cartesianToCartographic(v0, scratchCartographic1);
+ if (hasTopHeights) {
+ c0.height = topHeights[0];
+ }
+ cleanedTopHeights[0] = c0.height;
+ if (hasBottomHeights) {
+ cleanedBottomHeights[0] = bottomHeights[0];
+ } else {
+ cleanedBottomHeights[0] = 0;
+ }
+ const startTopHeight = cleanedTopHeights[0];
+ const startBottomHeight = cleanedBottomHeights[0];
+ let hasAllSameHeights = startTopHeight === startBottomHeight;
+ let index = 1;
+ for (let i = 1; i < length; ++i) {
+ const v1 = positions[i];
+ const c1 = ellipsoid.cartesianToCartographic(v1, scratchCartographic2);
+ if (hasTopHeights) {
+ c1.height = topHeights[i];
+ }
+ hasAllSameHeights = hasAllSameHeights && c1.height === 0;
+ if (!latLonEquals(c0, c1)) {
+ cleanedPositions[index] = v1;
+ cleanedTopHeights[index] = c1.height;
+ if (hasBottomHeights) {
+ cleanedBottomHeights[index] = bottomHeights[i];
+ } else {
+ cleanedBottomHeights[index] = 0;
+ }
+ hasAllSameHeights = hasAllSameHeights && cleanedTopHeights[index] === cleanedBottomHeights[index];
+ Cartographic_default.clone(c1, c0);
+ ++index;
+ } else if (c0.height < c1.height) {
+ cleanedTopHeights[index - 1] = c1.height;
+ }
+ }
+ if (hasAllSameHeights || index < 2) {
+ return;
+ }
+ cleanedPositions.length = index;
+ cleanedTopHeights.length = index;
+ cleanedBottomHeights.length = index;
+ return {
+ positions: cleanedPositions,
+ topHeights: cleanedTopHeights,
+ bottomHeights: cleanedBottomHeights
+ };
+}
+var positionsArrayScratch = new Array(2);
+var heightsArrayScratch = new Array(2);
+var generateArcOptionsScratch = {
+ positions: void 0,
+ height: void 0,
+ granularity: void 0,
+ ellipsoid: void 0
+};
+WallGeometryLibrary.computePositions = function(ellipsoid, wallPositions, maximumHeights, minimumHeights, granularity, duplicateCorners) {
+ const o = removeDuplicates(
+ ellipsoid,
+ wallPositions,
+ maximumHeights,
+ minimumHeights
+ );
+ if (!defined_default(o)) {
+ return;
+ }
+ wallPositions = o.positions;
+ maximumHeights = o.topHeights;
+ minimumHeights = o.bottomHeights;
+ const length = wallPositions.length;
+ const numCorners = length - 2;
+ let topPositions;
+ let bottomPositions;
+ const minDistance = Math_default.chordLength(
+ granularity,
+ ellipsoid.maximumRadius
+ );
+ const generateArcOptions = generateArcOptionsScratch;
+ generateArcOptions.minDistance = minDistance;
+ generateArcOptions.ellipsoid = ellipsoid;
+ if (duplicateCorners) {
+ let count = 0;
+ let i;
+ for (i = 0; i < length - 1; i++) {
+ count += PolylinePipeline_default.numberOfPoints(
+ wallPositions[i],
+ wallPositions[i + 1],
+ minDistance
+ ) + 1;
+ }
+ topPositions = new Float64Array(count * 3);
+ bottomPositions = new Float64Array(count * 3);
+ const generateArcPositions = positionsArrayScratch;
+ const generateArcHeights = heightsArrayScratch;
+ generateArcOptions.positions = generateArcPositions;
+ generateArcOptions.height = generateArcHeights;
+ let offset = 0;
+ for (i = 0; i < length - 1; i++) {
+ generateArcPositions[0] = wallPositions[i];
+ generateArcPositions[1] = wallPositions[i + 1];
+ generateArcHeights[0] = maximumHeights[i];
+ generateArcHeights[1] = maximumHeights[i + 1];
+ const pos = PolylinePipeline_default.generateArc(generateArcOptions);
+ topPositions.set(pos, offset);
+ generateArcHeights[0] = minimumHeights[i];
+ generateArcHeights[1] = minimumHeights[i + 1];
+ bottomPositions.set(
+ PolylinePipeline_default.generateArc(generateArcOptions),
+ offset
+ );
+ offset += pos.length;
+ }
+ } else {
+ generateArcOptions.positions = wallPositions;
+ generateArcOptions.height = maximumHeights;
+ topPositions = new Float64Array(
+ PolylinePipeline_default.generateArc(generateArcOptions)
+ );
+ generateArcOptions.height = minimumHeights;
+ bottomPositions = new Float64Array(
+ PolylinePipeline_default.generateArc(generateArcOptions)
+ );
+ }
+ return {
+ bottomPositions,
+ topPositions,
+ numCorners
+ };
+};
+var WallGeometryLibrary_default = WallGeometryLibrary;
+
+export {
+ WallGeometryLibrary_default
+};
diff --git a/public/assets/cesium/Workers/chunk-TI3TRKIC.js b/public/assets/cesium/Workers/chunk-TI3TRKIC.js
new file mode 100644
index 0000000000000000000000000000000000000000..c1b64781948d3448123067252b0b556e3de301b6
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-TI3TRKIC.js
@@ -0,0 +1,945 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ EllipsoidRhumbLine_default
+} from "./chunk-JSQJDZI4.js";
+import {
+ GeometryAttribute_default,
+ Geometry_default,
+ PrimitiveType_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian2_default,
+ Cartesian3_default,
+ Cartographic_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import {
+ WebGLConstants_default
+} from "./chunk-3HQMMUPU.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/WindingOrder.js
+var WindingOrder = {
+ /**
+ * Vertices are in clockwise order.
+ *
+ * @type {number}
+ * @constant
+ */
+ CLOCKWISE: WebGLConstants_default.CW,
+ /**
+ * Vertices are in counter-clockwise order.
+ *
+ * @type {number}
+ * @constant
+ */
+ COUNTER_CLOCKWISE: WebGLConstants_default.CCW
+};
+WindingOrder.validate = function(windingOrder) {
+ return windingOrder === WindingOrder.CLOCKWISE || windingOrder === WindingOrder.COUNTER_CLOCKWISE;
+};
+var WindingOrder_default = Object.freeze(WindingOrder);
+
+// node_modules/earcut/src/earcut.js
+function earcut(data, holeIndices, dim = 2) {
+ const hasHoles = holeIndices && holeIndices.length;
+ const outerLen = hasHoles ? holeIndices[0] * dim : data.length;
+ let outerNode = linkedList(data, 0, outerLen, dim, true);
+ const triangles = [];
+ if (!outerNode || outerNode.next === outerNode.prev) return triangles;
+ let minX, minY, invSize;
+ if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim);
+ if (data.length > 80 * dim) {
+ minX = Infinity;
+ minY = Infinity;
+ let maxX = -Infinity;
+ let maxY = -Infinity;
+ for (let i = dim; i < outerLen; i += dim) {
+ const x = data[i];
+ const y = data[i + 1];
+ if (x < minX) minX = x;
+ if (y < minY) minY = y;
+ if (x > maxX) maxX = x;
+ if (y > maxY) maxY = y;
+ }
+ invSize = Math.max(maxX - minX, maxY - minY);
+ invSize = invSize !== 0 ? 32767 / invSize : 0;
+ }
+ earcutLinked(outerNode, triangles, dim, minX, minY, invSize, 0);
+ return triangles;
+}
+function linkedList(data, start, end, dim, clockwise) {
+ let last;
+ if (clockwise === signedArea(data, start, end, dim) > 0) {
+ for (let i = start; i < end; i += dim) last = insertNode(i / dim | 0, data[i], data[i + 1], last);
+ } else {
+ for (let i = end - dim; i >= start; i -= dim) last = insertNode(i / dim | 0, data[i], data[i + 1], last);
+ }
+ if (last && equals(last, last.next)) {
+ removeNode(last);
+ last = last.next;
+ }
+ return last;
+}
+function filterPoints(start, end) {
+ if (!start) return start;
+ if (!end) end = start;
+ let p = start, again;
+ do {
+ again = false;
+ if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {
+ removeNode(p);
+ p = end = p.prev;
+ if (p === p.next) break;
+ again = true;
+ } else {
+ p = p.next;
+ }
+ } while (again || p !== end);
+ return end;
+}
+function earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {
+ if (!ear) return;
+ if (!pass && invSize) indexCurve(ear, minX, minY, invSize);
+ let stop = ear;
+ while (ear.prev !== ear.next) {
+ const prev = ear.prev;
+ const next = ear.next;
+ if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {
+ triangles.push(prev.i, ear.i, next.i);
+ removeNode(ear);
+ ear = next.next;
+ stop = next.next;
+ continue;
+ }
+ ear = next;
+ if (ear === stop) {
+ if (!pass) {
+ earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1);
+ } else if (pass === 1) {
+ ear = cureLocalIntersections(filterPoints(ear), triangles);
+ earcutLinked(ear, triangles, dim, minX, minY, invSize, 2);
+ } else if (pass === 2) {
+ splitEarcut(ear, triangles, dim, minX, minY, invSize);
+ }
+ break;
+ }
+ }
+}
+function isEar(ear) {
+ const a = ear.prev, b = ear, c = ear.next;
+ if (area(a, b, c) >= 0) return false;
+ const ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;
+ const x0 = ax < bx ? ax < cx ? ax : cx : bx < cx ? bx : cx, y0 = ay < by ? ay < cy ? ay : cy : by < cy ? by : cy, x1 = ax > bx ? ax > cx ? ax : cx : bx > cx ? bx : cx, y1 = ay > by ? ay > cy ? ay : cy : by > cy ? by : cy;
+ let p = c.next;
+ while (p !== a) {
+ if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;
+ p = p.next;
+ }
+ return true;
+}
+function isEarHashed(ear, minX, minY, invSize) {
+ const a = ear.prev, b = ear, c = ear.next;
+ if (area(a, b, c) >= 0) return false;
+ const ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;
+ const x0 = ax < bx ? ax < cx ? ax : cx : bx < cx ? bx : cx, y0 = ay < by ? ay < cy ? ay : cy : by < cy ? by : cy, x1 = ax > bx ? ax > cx ? ax : cx : bx > cx ? bx : cx, y1 = ay > by ? ay > cy ? ay : cy : by > cy ? by : cy;
+ const minZ = zOrder(x0, y0, minX, minY, invSize), maxZ = zOrder(x1, y1, minX, minY, invSize);
+ let p = ear.prevZ, n = ear.nextZ;
+ while (p && p.z >= minZ && n && n.z <= maxZ) {
+ if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;
+ p = p.prevZ;
+ if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;
+ n = n.nextZ;
+ }
+ while (p && p.z >= minZ) {
+ if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;
+ p = p.prevZ;
+ }
+ while (n && n.z <= maxZ) {
+ if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;
+ n = n.nextZ;
+ }
+ return true;
+}
+function cureLocalIntersections(start, triangles) {
+ let p = start;
+ do {
+ const a = p.prev, b = p.next.next;
+ if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {
+ triangles.push(a.i, p.i, b.i);
+ removeNode(p);
+ removeNode(p.next);
+ p = start = b;
+ }
+ p = p.next;
+ } while (p !== start);
+ return filterPoints(p);
+}
+function splitEarcut(start, triangles, dim, minX, minY, invSize) {
+ let a = start;
+ do {
+ let b = a.next.next;
+ while (b !== a.prev) {
+ if (a.i !== b.i && isValidDiagonal(a, b)) {
+ let c = splitPolygon(a, b);
+ a = filterPoints(a, a.next);
+ c = filterPoints(c, c.next);
+ earcutLinked(a, triangles, dim, minX, minY, invSize, 0);
+ earcutLinked(c, triangles, dim, minX, minY, invSize, 0);
+ return;
+ }
+ b = b.next;
+ }
+ a = a.next;
+ } while (a !== start);
+}
+function eliminateHoles(data, holeIndices, outerNode, dim) {
+ const queue = [];
+ for (let i = 0, len = holeIndices.length; i < len; i++) {
+ const start = holeIndices[i] * dim;
+ const end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;
+ const list = linkedList(data, start, end, dim, false);
+ if (list === list.next) list.steiner = true;
+ queue.push(getLeftmost(list));
+ }
+ queue.sort(compareX);
+ for (let i = 0; i < queue.length; i++) {
+ outerNode = eliminateHole(queue[i], outerNode);
+ }
+ return outerNode;
+}
+function compareX(a, b) {
+ return a.x - b.x;
+}
+function eliminateHole(hole, outerNode) {
+ const bridge = findHoleBridge(hole, outerNode);
+ if (!bridge) {
+ return outerNode;
+ }
+ const bridgeReverse = splitPolygon(bridge, hole);
+ filterPoints(bridgeReverse, bridgeReverse.next);
+ return filterPoints(bridge, bridge.next);
+}
+function findHoleBridge(hole, outerNode) {
+ let p = outerNode;
+ const hx = hole.x;
+ const hy = hole.y;
+ let qx = -Infinity;
+ let m;
+ do {
+ if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {
+ const x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);
+ if (x <= hx && x > qx) {
+ qx = x;
+ m = p.x < p.next.x ? p : p.next;
+ if (x === hx) return m;
+ }
+ }
+ p = p.next;
+ } while (p !== outerNode);
+ if (!m) return null;
+ const stop = m;
+ const mx = m.x;
+ const my = m.y;
+ let tanMin = Infinity;
+ p = m;
+ do {
+ if (hx >= p.x && p.x >= mx && hx !== p.x && pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {
+ const tan = Math.abs(hy - p.y) / (hx - p.x);
+ if (locallyInside(p, hole) && (tan < tanMin || tan === tanMin && (p.x > m.x || p.x === m.x && sectorContainsSector(m, p)))) {
+ m = p;
+ tanMin = tan;
+ }
+ }
+ p = p.next;
+ } while (p !== stop);
+ return m;
+}
+function sectorContainsSector(m, p) {
+ return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0;
+}
+function indexCurve(start, minX, minY, invSize) {
+ let p = start;
+ do {
+ if (p.z === 0) p.z = zOrder(p.x, p.y, minX, minY, invSize);
+ p.prevZ = p.prev;
+ p.nextZ = p.next;
+ p = p.next;
+ } while (p !== start);
+ p.prevZ.nextZ = null;
+ p.prevZ = null;
+ sortLinked(p);
+}
+function sortLinked(list) {
+ let numMerges;
+ let inSize = 1;
+ do {
+ let p = list;
+ let e;
+ list = null;
+ let tail = null;
+ numMerges = 0;
+ while (p) {
+ numMerges++;
+ let q = p;
+ let pSize = 0;
+ for (let i = 0; i < inSize; i++) {
+ pSize++;
+ q = q.nextZ;
+ if (!q) break;
+ }
+ let qSize = inSize;
+ while (pSize > 0 || qSize > 0 && q) {
+ if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {
+ e = p;
+ p = p.nextZ;
+ pSize--;
+ } else {
+ e = q;
+ q = q.nextZ;
+ qSize--;
+ }
+ if (tail) tail.nextZ = e;
+ else list = e;
+ e.prevZ = tail;
+ tail = e;
+ }
+ p = q;
+ }
+ tail.nextZ = null;
+ inSize *= 2;
+ } while (numMerges > 1);
+ return list;
+}
+function zOrder(x, y, minX, minY, invSize) {
+ x = (x - minX) * invSize | 0;
+ y = (y - minY) * invSize | 0;
+ x = (x | x << 8) & 16711935;
+ x = (x | x << 4) & 252645135;
+ x = (x | x << 2) & 858993459;
+ x = (x | x << 1) & 1431655765;
+ y = (y | y << 8) & 16711935;
+ y = (y | y << 4) & 252645135;
+ y = (y | y << 2) & 858993459;
+ y = (y | y << 1) & 1431655765;
+ return x | y << 1;
+}
+function getLeftmost(start) {
+ let p = start, leftmost = start;
+ do {
+ if (p.x < leftmost.x || p.x === leftmost.x && p.y < leftmost.y) leftmost = p;
+ p = p.next;
+ } while (p !== start);
+ return leftmost;
+}
+function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {
+ return (cx - px) * (ay - py) >= (ax - px) * (cy - py) && (ax - px) * (by - py) >= (bx - px) * (ay - py) && (bx - px) * (cy - py) >= (cx - px) * (by - py);
+}
+function isValidDiagonal(a, b) {
+ return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges
+ (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible
+ (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors
+ equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0);
+}
+function area(p, q, r) {
+ return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);
+}
+function equals(p1, p2) {
+ return p1.x === p2.x && p1.y === p2.y;
+}
+function intersects(p1, q1, p2, q2) {
+ const o1 = sign(area(p1, q1, p2));
+ const o2 = sign(area(p1, q1, q2));
+ const o3 = sign(area(p2, q2, p1));
+ const o4 = sign(area(p2, q2, q1));
+ if (o1 !== o2 && o3 !== o4) return true;
+ if (o1 === 0 && onSegment(p1, p2, q1)) return true;
+ if (o2 === 0 && onSegment(p1, q2, q1)) return true;
+ if (o3 === 0 && onSegment(p2, p1, q2)) return true;
+ if (o4 === 0 && onSegment(p2, q1, q2)) return true;
+ return false;
+}
+function onSegment(p, q, r) {
+ return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);
+}
+function sign(num) {
+ return num > 0 ? 1 : num < 0 ? -1 : 0;
+}
+function intersectsPolygon(a, b) {
+ let p = a;
+ do {
+ if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i && intersects(p, p.next, a, b)) return true;
+ p = p.next;
+ } while (p !== a);
+ return false;
+}
+function locallyInside(a, b) {
+ return area(a.prev, a, a.next) < 0 ? area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 : area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;
+}
+function middleInside(a, b) {
+ let p = a;
+ let inside = false;
+ const px = (a.x + b.x) / 2;
+ const py = (a.y + b.y) / 2;
+ do {
+ if (p.y > py !== p.next.y > py && p.next.y !== p.y && px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x)
+ inside = !inside;
+ p = p.next;
+ } while (p !== a);
+ return inside;
+}
+function splitPolygon(a, b) {
+ const a2 = createNode(a.i, a.x, a.y), b2 = createNode(b.i, b.x, b.y), an = a.next, bp = b.prev;
+ a.next = b;
+ b.prev = a;
+ a2.next = an;
+ an.prev = a2;
+ b2.next = a2;
+ a2.prev = b2;
+ bp.next = b2;
+ b2.prev = bp;
+ return b2;
+}
+function insertNode(i, x, y, last) {
+ const p = createNode(i, x, y);
+ if (!last) {
+ p.prev = p;
+ p.next = p;
+ } else {
+ p.next = last.next;
+ p.prev = last;
+ last.next.prev = p;
+ last.next = p;
+ }
+ return p;
+}
+function removeNode(p) {
+ p.next.prev = p.prev;
+ p.prev.next = p.next;
+ if (p.prevZ) p.prevZ.nextZ = p.nextZ;
+ if (p.nextZ) p.nextZ.prevZ = p.prevZ;
+}
+function createNode(i, x, y) {
+ return {
+ i,
+ // vertex index in coordinates array
+ x,
+ y,
+ // vertex coordinates
+ prev: null,
+ // previous and next vertex nodes in a polygon ring
+ next: null,
+ z: 0,
+ // z-order curve value
+ prevZ: null,
+ // previous and next nodes in z-order
+ nextZ: null,
+ steiner: false
+ // indicates whether this is a steiner point
+ };
+}
+function signedArea(data, start, end, dim) {
+ let sum = 0;
+ for (let i = start, j = end - dim; i < end; i += dim) {
+ sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);
+ j = i;
+ }
+ return sum;
+}
+
+// packages/engine/Source/Core/PolygonPipeline.js
+var scaleToGeodeticHeightN = new Cartesian3_default();
+var scaleToGeodeticHeightP = new Cartesian3_default();
+var PolygonPipeline = {};
+PolygonPipeline.computeArea2D = function(positions) {
+ Check_default.defined("positions", positions);
+ Check_default.typeOf.number.greaterThanOrEquals(
+ "positions.length",
+ positions.length,
+ 3
+ );
+ const length = positions.length;
+ let area2 = 0;
+ for (let i0 = length - 1, i1 = 0; i1 < length; i0 = i1++) {
+ const v0 = positions[i0];
+ const v1 = positions[i1];
+ area2 += v0.x * v1.y - v1.x * v0.y;
+ }
+ return area2 * 0.5;
+};
+PolygonPipeline.computeWindingOrder2D = function(positions) {
+ const area2 = PolygonPipeline.computeArea2D(positions);
+ return area2 > 0 ? WindingOrder_default.COUNTER_CLOCKWISE : WindingOrder_default.CLOCKWISE;
+};
+PolygonPipeline.triangulate = function(positions, holes) {
+ Check_default.defined("positions", positions);
+ const flattenedPositions = Cartesian2_default.packArray(positions);
+ return earcut(flattenedPositions, holes, 2);
+};
+var subdivisionV0Scratch = new Cartesian3_default();
+var subdivisionV1Scratch = new Cartesian3_default();
+var subdivisionV2Scratch = new Cartesian3_default();
+var subdivisionS0Scratch = new Cartesian3_default();
+var subdivisionS1Scratch = new Cartesian3_default();
+var subdivisionS2Scratch = new Cartesian3_default();
+var subdivisionMidScratch = new Cartesian3_default();
+var subdivisionT0Scratch = new Cartesian2_default();
+var subdivisionT1Scratch = new Cartesian2_default();
+var subdivisionT2Scratch = new Cartesian2_default();
+var subdivisionTexcoordMidScratch = new Cartesian2_default();
+PolygonPipeline.computeSubdivision = function(ellipsoid, positions, indices, texcoords, granularity) {
+ granularity = defaultValue_default(granularity, Math_default.RADIANS_PER_DEGREE);
+ const hasTexcoords = defined_default(texcoords);
+ Check_default.typeOf.object("ellipsoid", ellipsoid);
+ Check_default.defined("positions", positions);
+ Check_default.defined("indices", indices);
+ Check_default.typeOf.number.greaterThanOrEquals("indices.length", indices.length, 3);
+ Check_default.typeOf.number.equals("indices.length % 3", "0", indices.length % 3, 0);
+ Check_default.typeOf.number.greaterThan("granularity", granularity, 0);
+ const triangles = indices.slice(0);
+ let i;
+ const length = positions.length;
+ const subdividedPositions = new Array(length * 3);
+ const subdividedTexcoords = new Array(length * 2);
+ let q = 0;
+ let p = 0;
+ for (i = 0; i < length; i++) {
+ const item = positions[i];
+ subdividedPositions[q++] = item.x;
+ subdividedPositions[q++] = item.y;
+ subdividedPositions[q++] = item.z;
+ if (hasTexcoords) {
+ const texcoordItem = texcoords[i];
+ subdividedTexcoords[p++] = texcoordItem.x;
+ subdividedTexcoords[p++] = texcoordItem.y;
+ }
+ }
+ const subdividedIndices = [];
+ const edges = {};
+ const radius = ellipsoid.maximumRadius;
+ const minDistance = Math_default.chordLength(granularity, radius);
+ const minDistanceSqrd = minDistance * minDistance;
+ while (triangles.length > 0) {
+ const i2 = triangles.pop();
+ const i1 = triangles.pop();
+ const i0 = triangles.pop();
+ const v0 = Cartesian3_default.fromArray(
+ subdividedPositions,
+ i0 * 3,
+ subdivisionV0Scratch
+ );
+ const v1 = Cartesian3_default.fromArray(
+ subdividedPositions,
+ i1 * 3,
+ subdivisionV1Scratch
+ );
+ const v2 = Cartesian3_default.fromArray(
+ subdividedPositions,
+ i2 * 3,
+ subdivisionV2Scratch
+ );
+ let t0, t1, t2;
+ if (hasTexcoords) {
+ t0 = Cartesian2_default.fromArray(
+ subdividedTexcoords,
+ i0 * 2,
+ subdivisionT0Scratch
+ );
+ t1 = Cartesian2_default.fromArray(
+ subdividedTexcoords,
+ i1 * 2,
+ subdivisionT1Scratch
+ );
+ t2 = Cartesian2_default.fromArray(
+ subdividedTexcoords,
+ i2 * 2,
+ subdivisionT2Scratch
+ );
+ }
+ const s0 = Cartesian3_default.multiplyByScalar(
+ Cartesian3_default.normalize(v0, subdivisionS0Scratch),
+ radius,
+ subdivisionS0Scratch
+ );
+ const s1 = Cartesian3_default.multiplyByScalar(
+ Cartesian3_default.normalize(v1, subdivisionS1Scratch),
+ radius,
+ subdivisionS1Scratch
+ );
+ const s2 = Cartesian3_default.multiplyByScalar(
+ Cartesian3_default.normalize(v2, subdivisionS2Scratch),
+ radius,
+ subdivisionS2Scratch
+ );
+ const g0 = Cartesian3_default.magnitudeSquared(
+ Cartesian3_default.subtract(s0, s1, subdivisionMidScratch)
+ );
+ const g1 = Cartesian3_default.magnitudeSquared(
+ Cartesian3_default.subtract(s1, s2, subdivisionMidScratch)
+ );
+ const g2 = Cartesian3_default.magnitudeSquared(
+ Cartesian3_default.subtract(s2, s0, subdivisionMidScratch)
+ );
+ const max = Math.max(g0, g1, g2);
+ let edge;
+ let mid;
+ let midTexcoord;
+ if (max > minDistanceSqrd) {
+ if (g0 === max) {
+ edge = `${Math.min(i0, i1)} ${Math.max(i0, i1)}`;
+ i = edges[edge];
+ if (!defined_default(i)) {
+ mid = Cartesian3_default.add(v0, v1, subdivisionMidScratch);
+ Cartesian3_default.multiplyByScalar(mid, 0.5, mid);
+ subdividedPositions.push(mid.x, mid.y, mid.z);
+ i = subdividedPositions.length / 3 - 1;
+ edges[edge] = i;
+ if (hasTexcoords) {
+ midTexcoord = Cartesian2_default.add(t0, t1, subdivisionTexcoordMidScratch);
+ Cartesian2_default.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
+ subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
+ }
+ }
+ triangles.push(i0, i, i2);
+ triangles.push(i, i1, i2);
+ } else if (g1 === max) {
+ edge = `${Math.min(i1, i2)} ${Math.max(i1, i2)}`;
+ i = edges[edge];
+ if (!defined_default(i)) {
+ mid = Cartesian3_default.add(v1, v2, subdivisionMidScratch);
+ Cartesian3_default.multiplyByScalar(mid, 0.5, mid);
+ subdividedPositions.push(mid.x, mid.y, mid.z);
+ i = subdividedPositions.length / 3 - 1;
+ edges[edge] = i;
+ if (hasTexcoords) {
+ midTexcoord = Cartesian2_default.add(t1, t2, subdivisionTexcoordMidScratch);
+ Cartesian2_default.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
+ subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
+ }
+ }
+ triangles.push(i1, i, i0);
+ triangles.push(i, i2, i0);
+ } else if (g2 === max) {
+ edge = `${Math.min(i2, i0)} ${Math.max(i2, i0)}`;
+ i = edges[edge];
+ if (!defined_default(i)) {
+ mid = Cartesian3_default.add(v2, v0, subdivisionMidScratch);
+ Cartesian3_default.multiplyByScalar(mid, 0.5, mid);
+ subdividedPositions.push(mid.x, mid.y, mid.z);
+ i = subdividedPositions.length / 3 - 1;
+ edges[edge] = i;
+ if (hasTexcoords) {
+ midTexcoord = Cartesian2_default.add(t2, t0, subdivisionTexcoordMidScratch);
+ Cartesian2_default.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
+ subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
+ }
+ }
+ triangles.push(i2, i, i1);
+ triangles.push(i, i0, i1);
+ }
+ } else {
+ subdividedIndices.push(i0);
+ subdividedIndices.push(i1);
+ subdividedIndices.push(i2);
+ }
+ }
+ const geometryOptions = {
+ attributes: {
+ position: new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: subdividedPositions
+ })
+ },
+ indices: subdividedIndices,
+ primitiveType: PrimitiveType_default.TRIANGLES
+ };
+ if (hasTexcoords) {
+ geometryOptions.attributes.st = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 2,
+ values: subdividedTexcoords
+ });
+ }
+ return new Geometry_default(geometryOptions);
+};
+var subdivisionC0Scratch = new Cartographic_default();
+var subdivisionC1Scratch = new Cartographic_default();
+var subdivisionC2Scratch = new Cartographic_default();
+var subdivisionCartographicScratch = new Cartographic_default();
+PolygonPipeline.computeRhumbLineSubdivision = function(ellipsoid, positions, indices, texcoords, granularity) {
+ granularity = defaultValue_default(granularity, Math_default.RADIANS_PER_DEGREE);
+ const hasTexcoords = defined_default(texcoords);
+ Check_default.typeOf.object("ellipsoid", ellipsoid);
+ Check_default.defined("positions", positions);
+ Check_default.defined("indices", indices);
+ Check_default.typeOf.number.greaterThanOrEquals("indices.length", indices.length, 3);
+ Check_default.typeOf.number.equals("indices.length % 3", "0", indices.length % 3, 0);
+ Check_default.typeOf.number.greaterThan("granularity", granularity, 0);
+ const triangles = indices.slice(0);
+ let i;
+ const length = positions.length;
+ const subdividedPositions = new Array(length * 3);
+ const subdividedTexcoords = new Array(length * 2);
+ let q = 0;
+ let p = 0;
+ for (i = 0; i < length; i++) {
+ const item = positions[i];
+ subdividedPositions[q++] = item.x;
+ subdividedPositions[q++] = item.y;
+ subdividedPositions[q++] = item.z;
+ if (hasTexcoords) {
+ const texcoordItem = texcoords[i];
+ subdividedTexcoords[p++] = texcoordItem.x;
+ subdividedTexcoords[p++] = texcoordItem.y;
+ }
+ }
+ const subdividedIndices = [];
+ const edges = {};
+ const radius = ellipsoid.maximumRadius;
+ const minDistance = Math_default.chordLength(granularity, radius);
+ const rhumb0 = new EllipsoidRhumbLine_default(void 0, void 0, ellipsoid);
+ const rhumb1 = new EllipsoidRhumbLine_default(void 0, void 0, ellipsoid);
+ const rhumb2 = new EllipsoidRhumbLine_default(void 0, void 0, ellipsoid);
+ while (triangles.length > 0) {
+ const i2 = triangles.pop();
+ const i1 = triangles.pop();
+ const i0 = triangles.pop();
+ const v0 = Cartesian3_default.fromArray(
+ subdividedPositions,
+ i0 * 3,
+ subdivisionV0Scratch
+ );
+ const v1 = Cartesian3_default.fromArray(
+ subdividedPositions,
+ i1 * 3,
+ subdivisionV1Scratch
+ );
+ const v2 = Cartesian3_default.fromArray(
+ subdividedPositions,
+ i2 * 3,
+ subdivisionV2Scratch
+ );
+ let t0, t1, t2;
+ if (hasTexcoords) {
+ t0 = Cartesian2_default.fromArray(
+ subdividedTexcoords,
+ i0 * 2,
+ subdivisionT0Scratch
+ );
+ t1 = Cartesian2_default.fromArray(
+ subdividedTexcoords,
+ i1 * 2,
+ subdivisionT1Scratch
+ );
+ t2 = Cartesian2_default.fromArray(
+ subdividedTexcoords,
+ i2 * 2,
+ subdivisionT2Scratch
+ );
+ }
+ const c0 = ellipsoid.cartesianToCartographic(v0, subdivisionC0Scratch);
+ const c1 = ellipsoid.cartesianToCartographic(v1, subdivisionC1Scratch);
+ const c2 = ellipsoid.cartesianToCartographic(v2, subdivisionC2Scratch);
+ rhumb0.setEndPoints(c0, c1);
+ const g0 = rhumb0.surfaceDistance;
+ rhumb1.setEndPoints(c1, c2);
+ const g1 = rhumb1.surfaceDistance;
+ rhumb2.setEndPoints(c2, c0);
+ const g2 = rhumb2.surfaceDistance;
+ const max = Math.max(g0, g1, g2);
+ let edge;
+ let mid;
+ let midHeight;
+ let midCartesian3;
+ let midTexcoord;
+ if (max > minDistance) {
+ if (g0 === max) {
+ edge = `${Math.min(i0, i1)} ${Math.max(i0, i1)}`;
+ i = edges[edge];
+ if (!defined_default(i)) {
+ mid = rhumb0.interpolateUsingFraction(
+ 0.5,
+ subdivisionCartographicScratch
+ );
+ midHeight = (c0.height + c1.height) * 0.5;
+ midCartesian3 = Cartesian3_default.fromRadians(
+ mid.longitude,
+ mid.latitude,
+ midHeight,
+ ellipsoid,
+ subdivisionMidScratch
+ );
+ subdividedPositions.push(
+ midCartesian3.x,
+ midCartesian3.y,
+ midCartesian3.z
+ );
+ i = subdividedPositions.length / 3 - 1;
+ edges[edge] = i;
+ if (hasTexcoords) {
+ midTexcoord = Cartesian2_default.add(t0, t1, subdivisionTexcoordMidScratch);
+ Cartesian2_default.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
+ subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
+ }
+ }
+ triangles.push(i0, i, i2);
+ triangles.push(i, i1, i2);
+ } else if (g1 === max) {
+ edge = `${Math.min(i1, i2)} ${Math.max(i1, i2)}`;
+ i = edges[edge];
+ if (!defined_default(i)) {
+ mid = rhumb1.interpolateUsingFraction(
+ 0.5,
+ subdivisionCartographicScratch
+ );
+ midHeight = (c1.height + c2.height) * 0.5;
+ midCartesian3 = Cartesian3_default.fromRadians(
+ mid.longitude,
+ mid.latitude,
+ midHeight,
+ ellipsoid,
+ subdivisionMidScratch
+ );
+ subdividedPositions.push(
+ midCartesian3.x,
+ midCartesian3.y,
+ midCartesian3.z
+ );
+ i = subdividedPositions.length / 3 - 1;
+ edges[edge] = i;
+ if (hasTexcoords) {
+ midTexcoord = Cartesian2_default.add(t1, t2, subdivisionTexcoordMidScratch);
+ Cartesian2_default.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
+ subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
+ }
+ }
+ triangles.push(i1, i, i0);
+ triangles.push(i, i2, i0);
+ } else if (g2 === max) {
+ edge = `${Math.min(i2, i0)} ${Math.max(i2, i0)}`;
+ i = edges[edge];
+ if (!defined_default(i)) {
+ mid = rhumb2.interpolateUsingFraction(
+ 0.5,
+ subdivisionCartographicScratch
+ );
+ midHeight = (c2.height + c0.height) * 0.5;
+ midCartesian3 = Cartesian3_default.fromRadians(
+ mid.longitude,
+ mid.latitude,
+ midHeight,
+ ellipsoid,
+ subdivisionMidScratch
+ );
+ subdividedPositions.push(
+ midCartesian3.x,
+ midCartesian3.y,
+ midCartesian3.z
+ );
+ i = subdividedPositions.length / 3 - 1;
+ edges[edge] = i;
+ if (hasTexcoords) {
+ midTexcoord = Cartesian2_default.add(t2, t0, subdivisionTexcoordMidScratch);
+ Cartesian2_default.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
+ subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
+ }
+ }
+ triangles.push(i2, i, i1);
+ triangles.push(i, i0, i1);
+ }
+ } else {
+ subdividedIndices.push(i0);
+ subdividedIndices.push(i1);
+ subdividedIndices.push(i2);
+ }
+ }
+ const geometryOptions = {
+ attributes: {
+ position: new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: subdividedPositions
+ })
+ },
+ indices: subdividedIndices,
+ primitiveType: PrimitiveType_default.TRIANGLES
+ };
+ if (hasTexcoords) {
+ geometryOptions.attributes.st = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 2,
+ values: subdividedTexcoords
+ });
+ }
+ return new Geometry_default(geometryOptions);
+};
+PolygonPipeline.scaleToGeodeticHeight = function(positions, height, ellipsoid, scaleToSurface) {
+ ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.default);
+ let n = scaleToGeodeticHeightN;
+ let p = scaleToGeodeticHeightP;
+ height = defaultValue_default(height, 0);
+ scaleToSurface = defaultValue_default(scaleToSurface, true);
+ if (defined_default(positions)) {
+ const length = positions.length;
+ for (let i = 0; i < length; i += 3) {
+ Cartesian3_default.fromArray(positions, i, p);
+ if (scaleToSurface) {
+ p = ellipsoid.scaleToGeodeticSurface(p, p);
+ }
+ if (height !== 0) {
+ n = ellipsoid.geodeticSurfaceNormal(p, n);
+ Cartesian3_default.multiplyByScalar(n, height, n);
+ Cartesian3_default.add(p, n, p);
+ }
+ positions[i] = p.x;
+ positions[i + 1] = p.y;
+ positions[i + 2] = p.z;
+ }
+ }
+ return positions;
+};
+var PolygonPipeline_default = PolygonPipeline;
+
+export {
+ WindingOrder_default,
+ PolygonPipeline_default
+};
diff --git a/public/assets/cesium/Workers/chunk-TK5IIG2F.js b/public/assets/cesium/Workers/chunk-TK5IIG2F.js
new file mode 100644
index 0000000000000000000000000000000000000000..c6c22f353549ed4a401190d7a43359650561b963
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-TK5IIG2F.js
@@ -0,0 +1,122 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ OrientedBoundingBox_default
+} from "./chunk-2PTKXHJB.js";
+import {
+ Cartesian2_default,
+ Cartesian3_default,
+ Matrix3_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Check_default
+} from "./chunk-P6TRGU3S.js";
+
+// packages/engine/Source/Core/CoplanarPolygonGeometryLibrary.js
+var CoplanarPolygonGeometryLibrary = {};
+var scratchIntersectionPoint = new Cartesian3_default();
+var scratchXAxis = new Cartesian3_default();
+var scratchYAxis = new Cartesian3_default();
+var scratchZAxis = new Cartesian3_default();
+var obbScratch = new OrientedBoundingBox_default();
+CoplanarPolygonGeometryLibrary.validOutline = function(positions) {
+ Check_default.defined("positions", positions);
+ const orientedBoundingBox = OrientedBoundingBox_default.fromPoints(
+ positions,
+ obbScratch
+ );
+ const halfAxes = orientedBoundingBox.halfAxes;
+ const xAxis = Matrix3_default.getColumn(halfAxes, 0, scratchXAxis);
+ const yAxis = Matrix3_default.getColumn(halfAxes, 1, scratchYAxis);
+ const zAxis = Matrix3_default.getColumn(halfAxes, 2, scratchZAxis);
+ const xMag = Cartesian3_default.magnitude(xAxis);
+ const yMag = Cartesian3_default.magnitude(yAxis);
+ const zMag = Cartesian3_default.magnitude(zAxis);
+ return !(xMag === 0 && (yMag === 0 || zMag === 0) || yMag === 0 && zMag === 0);
+};
+CoplanarPolygonGeometryLibrary.computeProjectTo2DArguments = function(positions, centerResult, planeAxis1Result, planeAxis2Result) {
+ Check_default.defined("positions", positions);
+ Check_default.defined("centerResult", centerResult);
+ Check_default.defined("planeAxis1Result", planeAxis1Result);
+ Check_default.defined("planeAxis2Result", planeAxis2Result);
+ const orientedBoundingBox = OrientedBoundingBox_default.fromPoints(
+ positions,
+ obbScratch
+ );
+ const halfAxes = orientedBoundingBox.halfAxes;
+ const xAxis = Matrix3_default.getColumn(halfAxes, 0, scratchXAxis);
+ const yAxis = Matrix3_default.getColumn(halfAxes, 1, scratchYAxis);
+ const zAxis = Matrix3_default.getColumn(halfAxes, 2, scratchZAxis);
+ const xMag = Cartesian3_default.magnitude(xAxis);
+ const yMag = Cartesian3_default.magnitude(yAxis);
+ const zMag = Cartesian3_default.magnitude(zAxis);
+ const min = Math.min(xMag, yMag, zMag);
+ if (xMag === 0 && (yMag === 0 || zMag === 0) || yMag === 0 && zMag === 0) {
+ return false;
+ }
+ let planeAxis1;
+ let planeAxis2;
+ if (min === yMag || min === zMag) {
+ planeAxis1 = xAxis;
+ }
+ if (min === xMag) {
+ planeAxis1 = yAxis;
+ } else if (min === zMag) {
+ planeAxis2 = yAxis;
+ }
+ if (min === xMag || min === yMag) {
+ planeAxis2 = zAxis;
+ }
+ Cartesian3_default.normalize(planeAxis1, planeAxis1Result);
+ Cartesian3_default.normalize(planeAxis2, planeAxis2Result);
+ Cartesian3_default.clone(orientedBoundingBox.center, centerResult);
+ return true;
+};
+function projectTo2D(position, center, axis1, axis2, result) {
+ const v = Cartesian3_default.subtract(position, center, scratchIntersectionPoint);
+ const x = Cartesian3_default.dot(axis1, v);
+ const y = Cartesian3_default.dot(axis2, v);
+ return Cartesian2_default.fromElements(x, y, result);
+}
+CoplanarPolygonGeometryLibrary.createProjectPointsTo2DFunction = function(center, axis1, axis2) {
+ return function(positions) {
+ const positionResults = new Array(positions.length);
+ for (let i = 0; i < positions.length; i++) {
+ positionResults[i] = projectTo2D(positions[i], center, axis1, axis2);
+ }
+ return positionResults;
+ };
+};
+CoplanarPolygonGeometryLibrary.createProjectPointTo2DFunction = function(center, axis1, axis2) {
+ return function(position, result) {
+ return projectTo2D(position, center, axis1, axis2, result);
+ };
+};
+var CoplanarPolygonGeometryLibrary_default = CoplanarPolygonGeometryLibrary;
+
+export {
+ CoplanarPolygonGeometryLibrary_default
+};
diff --git a/public/assets/cesium/Workers/chunk-U5HSOKPQ.js b/public/assets/cesium/Workers/chunk-U5HSOKPQ.js
new file mode 100644
index 0000000000000000000000000000000000000000..577ee61e08a7f4035c5831e0b7d28fddb653423c
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-U5HSOKPQ.js
@@ -0,0 +1,39 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+
+// packages/engine/Source/Core/defaultValue.js
+function defaultValue(a, b) {
+ if (a !== void 0 && a !== null) {
+ return a;
+ }
+ return b;
+}
+defaultValue.EMPTY_OBJECT = Object.freeze({});
+var defaultValue_default = defaultValue;
+
+export {
+ defaultValue_default
+};
diff --git a/public/assets/cesium/Workers/chunk-WGDFYAGC.js b/public/assets/cesium/Workers/chunk-WGDFYAGC.js
new file mode 100644
index 0000000000000000000000000000000000000000..6e85ec3951286d2956c66b54a7971e3671ddbcc2
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-WGDFYAGC.js
@@ -0,0 +1,500 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default,
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ __commonJS,
+ __toESM,
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// node_modules/mersenne-twister/src/mersenne-twister.js
+var require_mersenne_twister = __commonJS({
+ "node_modules/mersenne-twister/src/mersenne-twister.js"(exports, module) {
+ var MersenneTwister2 = function(seed) {
+ if (seed == void 0) {
+ seed = (/* @__PURE__ */ new Date()).getTime();
+ }
+ this.N = 624;
+ this.M = 397;
+ this.MATRIX_A = 2567483615;
+ this.UPPER_MASK = 2147483648;
+ this.LOWER_MASK = 2147483647;
+ this.mt = new Array(this.N);
+ this.mti = this.N + 1;
+ if (seed.constructor == Array) {
+ this.init_by_array(seed, seed.length);
+ } else {
+ this.init_seed(seed);
+ }
+ };
+ MersenneTwister2.prototype.init_seed = function(s) {
+ this.mt[0] = s >>> 0;
+ for (this.mti = 1; this.mti < this.N; this.mti++) {
+ var s = this.mt[this.mti - 1] ^ this.mt[this.mti - 1] >>> 30;
+ this.mt[this.mti] = (((s & 4294901760) >>> 16) * 1812433253 << 16) + (s & 65535) * 1812433253 + this.mti;
+ this.mt[this.mti] >>>= 0;
+ }
+ };
+ MersenneTwister2.prototype.init_by_array = function(init_key, key_length) {
+ var i, j, k;
+ this.init_seed(19650218);
+ i = 1;
+ j = 0;
+ k = this.N > key_length ? this.N : key_length;
+ for (; k; k--) {
+ var s = this.mt[i - 1] ^ this.mt[i - 1] >>> 30;
+ this.mt[i] = (this.mt[i] ^ (((s & 4294901760) >>> 16) * 1664525 << 16) + (s & 65535) * 1664525) + init_key[j] + j;
+ this.mt[i] >>>= 0;
+ i++;
+ j++;
+ if (i >= this.N) {
+ this.mt[0] = this.mt[this.N - 1];
+ i = 1;
+ }
+ if (j >= key_length) j = 0;
+ }
+ for (k = this.N - 1; k; k--) {
+ var s = this.mt[i - 1] ^ this.mt[i - 1] >>> 30;
+ this.mt[i] = (this.mt[i] ^ (((s & 4294901760) >>> 16) * 1566083941 << 16) + (s & 65535) * 1566083941) - i;
+ this.mt[i] >>>= 0;
+ i++;
+ if (i >= this.N) {
+ this.mt[0] = this.mt[this.N - 1];
+ i = 1;
+ }
+ }
+ this.mt[0] = 2147483648;
+ };
+ MersenneTwister2.prototype.random_int = function() {
+ var y;
+ var mag01 = new Array(0, this.MATRIX_A);
+ if (this.mti >= this.N) {
+ var kk;
+ if (this.mti == this.N + 1)
+ this.init_seed(5489);
+ for (kk = 0; kk < this.N - this.M; kk++) {
+ y = this.mt[kk] & this.UPPER_MASK | this.mt[kk + 1] & this.LOWER_MASK;
+ this.mt[kk] = this.mt[kk + this.M] ^ y >>> 1 ^ mag01[y & 1];
+ }
+ for (; kk < this.N - 1; kk++) {
+ y = this.mt[kk] & this.UPPER_MASK | this.mt[kk + 1] & this.LOWER_MASK;
+ this.mt[kk] = this.mt[kk + (this.M - this.N)] ^ y >>> 1 ^ mag01[y & 1];
+ }
+ y = this.mt[this.N - 1] & this.UPPER_MASK | this.mt[0] & this.LOWER_MASK;
+ this.mt[this.N - 1] = this.mt[this.M - 1] ^ y >>> 1 ^ mag01[y & 1];
+ this.mti = 0;
+ }
+ y = this.mt[this.mti++];
+ y ^= y >>> 11;
+ y ^= y << 7 & 2636928640;
+ y ^= y << 15 & 4022730752;
+ y ^= y >>> 18;
+ return y >>> 0;
+ };
+ MersenneTwister2.prototype.random_int31 = function() {
+ return this.random_int() >>> 1;
+ };
+ MersenneTwister2.prototype.random_incl = function() {
+ return this.random_int() * (1 / 4294967295);
+ };
+ MersenneTwister2.prototype.random = function() {
+ return this.random_int() * (1 / 4294967296);
+ };
+ MersenneTwister2.prototype.random_excl = function() {
+ return (this.random_int() + 0.5) * (1 / 4294967296);
+ };
+ MersenneTwister2.prototype.random_long = function() {
+ var a = this.random_int() >>> 5, b = this.random_int() >>> 6;
+ return (a * 67108864 + b) * (1 / 9007199254740992);
+ };
+ module.exports = MersenneTwister2;
+ }
+});
+
+// packages/engine/Source/Core/Math.js
+var import_mersenne_twister = __toESM(require_mersenne_twister(), 1);
+var CesiumMath = {};
+CesiumMath.EPSILON1 = 0.1;
+CesiumMath.EPSILON2 = 0.01;
+CesiumMath.EPSILON3 = 1e-3;
+CesiumMath.EPSILON4 = 1e-4;
+CesiumMath.EPSILON5 = 1e-5;
+CesiumMath.EPSILON6 = 1e-6;
+CesiumMath.EPSILON7 = 1e-7;
+CesiumMath.EPSILON8 = 1e-8;
+CesiumMath.EPSILON9 = 1e-9;
+CesiumMath.EPSILON10 = 1e-10;
+CesiumMath.EPSILON11 = 1e-11;
+CesiumMath.EPSILON12 = 1e-12;
+CesiumMath.EPSILON13 = 1e-13;
+CesiumMath.EPSILON14 = 1e-14;
+CesiumMath.EPSILON15 = 1e-15;
+CesiumMath.EPSILON16 = 1e-16;
+CesiumMath.EPSILON17 = 1e-17;
+CesiumMath.EPSILON18 = 1e-18;
+CesiumMath.EPSILON19 = 1e-19;
+CesiumMath.EPSILON20 = 1e-20;
+CesiumMath.EPSILON21 = 1e-21;
+CesiumMath.GRAVITATIONALPARAMETER = 3986004418e5;
+CesiumMath.SOLAR_RADIUS = 6955e5;
+CesiumMath.LUNAR_RADIUS = 1737400;
+CesiumMath.SIXTY_FOUR_KILOBYTES = 64 * 1024;
+CesiumMath.FOUR_GIGABYTES = 4 * 1024 * 1024 * 1024;
+CesiumMath.sign = defaultValue_default(Math.sign, function sign(value) {
+ value = +value;
+ if (value === 0 || value !== value) {
+ return value;
+ }
+ return value > 0 ? 1 : -1;
+});
+CesiumMath.signNotZero = function(value) {
+ return value < 0 ? -1 : 1;
+};
+CesiumMath.toSNorm = function(value, rangeMaximum) {
+ rangeMaximum = defaultValue_default(rangeMaximum, 255);
+ return Math.round(
+ (CesiumMath.clamp(value, -1, 1) * 0.5 + 0.5) * rangeMaximum
+ );
+};
+CesiumMath.fromSNorm = function(value, rangeMaximum) {
+ rangeMaximum = defaultValue_default(rangeMaximum, 255);
+ return CesiumMath.clamp(value, 0, rangeMaximum) / rangeMaximum * 2 - 1;
+};
+CesiumMath.normalize = function(value, rangeMinimum, rangeMaximum) {
+ rangeMaximum = Math.max(rangeMaximum - rangeMinimum, 0);
+ return rangeMaximum === 0 ? 0 : CesiumMath.clamp((value - rangeMinimum) / rangeMaximum, 0, 1);
+};
+CesiumMath.sinh = defaultValue_default(Math.sinh, function sinh(value) {
+ return (Math.exp(value) - Math.exp(-value)) / 2;
+});
+CesiumMath.cosh = defaultValue_default(Math.cosh, function cosh(value) {
+ return (Math.exp(value) + Math.exp(-value)) / 2;
+});
+CesiumMath.lerp = function(p, q, time) {
+ return (1 - time) * p + time * q;
+};
+CesiumMath.PI = Math.PI;
+CesiumMath.ONE_OVER_PI = 1 / Math.PI;
+CesiumMath.PI_OVER_TWO = Math.PI / 2;
+CesiumMath.PI_OVER_THREE = Math.PI / 3;
+CesiumMath.PI_OVER_FOUR = Math.PI / 4;
+CesiumMath.PI_OVER_SIX = Math.PI / 6;
+CesiumMath.THREE_PI_OVER_TWO = 3 * Math.PI / 2;
+CesiumMath.TWO_PI = 2 * Math.PI;
+CesiumMath.ONE_OVER_TWO_PI = 1 / (2 * Math.PI);
+CesiumMath.RADIANS_PER_DEGREE = Math.PI / 180;
+CesiumMath.DEGREES_PER_RADIAN = 180 / Math.PI;
+CesiumMath.RADIANS_PER_ARCSECOND = CesiumMath.RADIANS_PER_DEGREE / 3600;
+CesiumMath.toRadians = function(degrees) {
+ if (!defined_default(degrees)) {
+ throw new DeveloperError_default("degrees is required.");
+ }
+ return degrees * CesiumMath.RADIANS_PER_DEGREE;
+};
+CesiumMath.toDegrees = function(radians) {
+ if (!defined_default(radians)) {
+ throw new DeveloperError_default("radians is required.");
+ }
+ return radians * CesiumMath.DEGREES_PER_RADIAN;
+};
+CesiumMath.convertLongitudeRange = function(angle) {
+ if (!defined_default(angle)) {
+ throw new DeveloperError_default("angle is required.");
+ }
+ const twoPi = CesiumMath.TWO_PI;
+ const simplified = angle - Math.floor(angle / twoPi) * twoPi;
+ if (simplified < -Math.PI) {
+ return simplified + twoPi;
+ }
+ if (simplified >= Math.PI) {
+ return simplified - twoPi;
+ }
+ return simplified;
+};
+CesiumMath.clampToLatitudeRange = function(angle) {
+ if (!defined_default(angle)) {
+ throw new DeveloperError_default("angle is required.");
+ }
+ return CesiumMath.clamp(
+ angle,
+ -1 * CesiumMath.PI_OVER_TWO,
+ CesiumMath.PI_OVER_TWO
+ );
+};
+CesiumMath.negativePiToPi = function(angle) {
+ if (!defined_default(angle)) {
+ throw new DeveloperError_default("angle is required.");
+ }
+ if (angle >= -CesiumMath.PI && angle <= CesiumMath.PI) {
+ return angle;
+ }
+ return CesiumMath.zeroToTwoPi(angle + CesiumMath.PI) - CesiumMath.PI;
+};
+CesiumMath.zeroToTwoPi = function(angle) {
+ if (!defined_default(angle)) {
+ throw new DeveloperError_default("angle is required.");
+ }
+ if (angle >= 0 && angle <= CesiumMath.TWO_PI) {
+ return angle;
+ }
+ const mod = CesiumMath.mod(angle, CesiumMath.TWO_PI);
+ if (Math.abs(mod) < CesiumMath.EPSILON14 && Math.abs(angle) > CesiumMath.EPSILON14) {
+ return CesiumMath.TWO_PI;
+ }
+ return mod;
+};
+CesiumMath.mod = function(m, n) {
+ if (!defined_default(m)) {
+ throw new DeveloperError_default("m is required.");
+ }
+ if (!defined_default(n)) {
+ throw new DeveloperError_default("n is required.");
+ }
+ if (n === 0) {
+ throw new DeveloperError_default("divisor cannot be 0.");
+ }
+ if (CesiumMath.sign(m) === CesiumMath.sign(n) && Math.abs(m) < Math.abs(n)) {
+ return m;
+ }
+ return (m % n + n) % n;
+};
+CesiumMath.equalsEpsilon = function(left, right, relativeEpsilon, absoluteEpsilon) {
+ if (!defined_default(left)) {
+ throw new DeveloperError_default("left is required.");
+ }
+ if (!defined_default(right)) {
+ throw new DeveloperError_default("right is required.");
+ }
+ relativeEpsilon = defaultValue_default(relativeEpsilon, 0);
+ absoluteEpsilon = defaultValue_default(absoluteEpsilon, relativeEpsilon);
+ const absDiff = Math.abs(left - right);
+ return absDiff <= absoluteEpsilon || absDiff <= relativeEpsilon * Math.max(Math.abs(left), Math.abs(right));
+};
+CesiumMath.lessThan = function(left, right, absoluteEpsilon) {
+ if (!defined_default(left)) {
+ throw new DeveloperError_default("first is required.");
+ }
+ if (!defined_default(right)) {
+ throw new DeveloperError_default("second is required.");
+ }
+ if (!defined_default(absoluteEpsilon)) {
+ throw new DeveloperError_default("absoluteEpsilon is required.");
+ }
+ return left - right < -absoluteEpsilon;
+};
+CesiumMath.lessThanOrEquals = function(left, right, absoluteEpsilon) {
+ if (!defined_default(left)) {
+ throw new DeveloperError_default("first is required.");
+ }
+ if (!defined_default(right)) {
+ throw new DeveloperError_default("second is required.");
+ }
+ if (!defined_default(absoluteEpsilon)) {
+ throw new DeveloperError_default("absoluteEpsilon is required.");
+ }
+ return left - right < absoluteEpsilon;
+};
+CesiumMath.greaterThan = function(left, right, absoluteEpsilon) {
+ if (!defined_default(left)) {
+ throw new DeveloperError_default("first is required.");
+ }
+ if (!defined_default(right)) {
+ throw new DeveloperError_default("second is required.");
+ }
+ if (!defined_default(absoluteEpsilon)) {
+ throw new DeveloperError_default("absoluteEpsilon is required.");
+ }
+ return left - right > absoluteEpsilon;
+};
+CesiumMath.greaterThanOrEquals = function(left, right, absoluteEpsilon) {
+ if (!defined_default(left)) {
+ throw new DeveloperError_default("first is required.");
+ }
+ if (!defined_default(right)) {
+ throw new DeveloperError_default("second is required.");
+ }
+ if (!defined_default(absoluteEpsilon)) {
+ throw new DeveloperError_default("absoluteEpsilon is required.");
+ }
+ return left - right > -absoluteEpsilon;
+};
+var factorials = [1];
+CesiumMath.factorial = function(n) {
+ if (typeof n !== "number" || n < 0) {
+ throw new DeveloperError_default(
+ "A number greater than or equal to 0 is required."
+ );
+ }
+ const length = factorials.length;
+ if (n >= length) {
+ let sum = factorials[length - 1];
+ for (let i = length; i <= n; i++) {
+ const next = sum * i;
+ factorials.push(next);
+ sum = next;
+ }
+ }
+ return factorials[n];
+};
+CesiumMath.incrementWrap = function(n, maximumValue, minimumValue) {
+ minimumValue = defaultValue_default(minimumValue, 0);
+ if (!defined_default(n)) {
+ throw new DeveloperError_default("n is required.");
+ }
+ if (maximumValue <= minimumValue) {
+ throw new DeveloperError_default("maximumValue must be greater than minimumValue.");
+ }
+ ++n;
+ if (n > maximumValue) {
+ n = minimumValue;
+ }
+ return n;
+};
+CesiumMath.isPowerOfTwo = function(n) {
+ if (typeof n !== "number" || n < 0 || n > 4294967295) {
+ throw new DeveloperError_default("A number between 0 and (2^32)-1 is required.");
+ }
+ return n !== 0 && (n & n - 1) === 0;
+};
+CesiumMath.nextPowerOfTwo = function(n) {
+ if (typeof n !== "number" || n < 0 || n > 2147483648) {
+ throw new DeveloperError_default("A number between 0 and 2^31 is required.");
+ }
+ --n;
+ n |= n >> 1;
+ n |= n >> 2;
+ n |= n >> 4;
+ n |= n >> 8;
+ n |= n >> 16;
+ ++n;
+ return n;
+};
+CesiumMath.previousPowerOfTwo = function(n) {
+ if (typeof n !== "number" || n < 0 || n > 4294967295) {
+ throw new DeveloperError_default("A number between 0 and (2^32)-1 is required.");
+ }
+ n |= n >> 1;
+ n |= n >> 2;
+ n |= n >> 4;
+ n |= n >> 8;
+ n |= n >> 16;
+ n |= n >> 32;
+ n = (n >>> 0) - (n >>> 1);
+ return n;
+};
+CesiumMath.clamp = function(value, min, max) {
+ Check_default.typeOf.number("value", value);
+ Check_default.typeOf.number("min", min);
+ Check_default.typeOf.number("max", max);
+ return value < min ? min : value > max ? max : value;
+};
+var randomNumberGenerator = new import_mersenne_twister.default();
+CesiumMath.setRandomNumberSeed = function(seed) {
+ if (!defined_default(seed)) {
+ throw new DeveloperError_default("seed is required.");
+ }
+ randomNumberGenerator = new import_mersenne_twister.default(seed);
+};
+CesiumMath.nextRandomNumber = function() {
+ return randomNumberGenerator.random();
+};
+CesiumMath.randomBetween = function(min, max) {
+ return CesiumMath.nextRandomNumber() * (max - min) + min;
+};
+CesiumMath.acosClamped = function(value) {
+ if (!defined_default(value)) {
+ throw new DeveloperError_default("value is required.");
+ }
+ return Math.acos(CesiumMath.clamp(value, -1, 1));
+};
+CesiumMath.asinClamped = function(value) {
+ if (!defined_default(value)) {
+ throw new DeveloperError_default("value is required.");
+ }
+ return Math.asin(CesiumMath.clamp(value, -1, 1));
+};
+CesiumMath.chordLength = function(angle, radius) {
+ if (!defined_default(angle)) {
+ throw new DeveloperError_default("angle is required.");
+ }
+ if (!defined_default(radius)) {
+ throw new DeveloperError_default("radius is required.");
+ }
+ return 2 * radius * Math.sin(angle * 0.5);
+};
+CesiumMath.logBase = function(number, base) {
+ if (!defined_default(number)) {
+ throw new DeveloperError_default("number is required.");
+ }
+ if (!defined_default(base)) {
+ throw new DeveloperError_default("base is required.");
+ }
+ return Math.log(number) / Math.log(base);
+};
+CesiumMath.cbrt = defaultValue_default(Math.cbrt, function cbrt(number) {
+ const result = Math.pow(Math.abs(number), 1 / 3);
+ return number < 0 ? -result : result;
+});
+CesiumMath.log2 = defaultValue_default(Math.log2, function log2(number) {
+ return Math.log(number) * Math.LOG2E;
+});
+CesiumMath.fog = function(distanceToCamera, density) {
+ const scalar = distanceToCamera * density;
+ return 1 - Math.exp(-(scalar * scalar));
+};
+CesiumMath.fastApproximateAtan = function(x) {
+ Check_default.typeOf.number("x", x);
+ return x * (-0.1784 * Math.abs(x) - 0.0663 * x * x + 1.0301);
+};
+CesiumMath.fastApproximateAtan2 = function(x, y) {
+ Check_default.typeOf.number("x", x);
+ Check_default.typeOf.number("y", y);
+ let opposite;
+ let t = Math.abs(x);
+ opposite = Math.abs(y);
+ const adjacent = Math.max(t, opposite);
+ opposite = Math.min(t, opposite);
+ const oppositeOverAdjacent = opposite / adjacent;
+ if (isNaN(oppositeOverAdjacent)) {
+ throw new DeveloperError_default("either x or y must be nonzero");
+ }
+ t = CesiumMath.fastApproximateAtan(oppositeOverAdjacent);
+ t = Math.abs(y) > Math.abs(x) ? CesiumMath.PI_OVER_TWO - t : t;
+ t = x < 0 ? CesiumMath.PI - t : t;
+ t = y < 0 ? -t : t;
+ return t;
+};
+var Math_default = CesiumMath;
+
+export {
+ Math_default
+};
diff --git a/public/assets/cesium/Workers/chunk-X7IQYYHF.js b/public/assets/cesium/Workers/chunk-X7IQYYHF.js
new file mode 100644
index 0000000000000000000000000000000000000000..91c474f459404ec6bf7131646874406488392128
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-X7IQYYHF.js
@@ -0,0 +1,44 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+
+// packages/engine/Source/Core/GeometryAttributes.js
+function GeometryAttributes(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ this.position = options.position;
+ this.normal = options.normal;
+ this.st = options.st;
+ this.bitangent = options.bitangent;
+ this.tangent = options.tangent;
+ this.color = options.color;
+}
+var GeometryAttributes_default = GeometryAttributes;
+
+export {
+ GeometryAttributes_default
+};
diff --git a/public/assets/cesium/Workers/chunk-XIUSRWL6.js b/public/assets/cesium/Workers/chunk-XIUSRWL6.js
new file mode 100644
index 0000000000000000000000000000000000000000..69806316c1064f09d5078c36c940fd8d2ecd944a
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-XIUSRWL6.js
@@ -0,0 +1,262 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ WebGLConstants_default
+} from "./chunk-3HQMMUPU.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/ComponentDatatype.js
+var ComponentDatatype = {
+ /**
+ * 8-bit signed byte corresponding to gl.BYTE and the type
+ * of an element in Int8Array.
+ *
+ * @type {number}
+ * @constant
+ */
+ BYTE: WebGLConstants_default.BYTE,
+ /**
+ * 8-bit unsigned byte corresponding to UNSIGNED_BYTE and the type
+ * of an element in Uint8Array.
+ *
+ * @type {number}
+ * @constant
+ */
+ UNSIGNED_BYTE: WebGLConstants_default.UNSIGNED_BYTE,
+ /**
+ * 16-bit signed short corresponding to SHORT and the type
+ * of an element in Int16Array.
+ *
+ * @type {number}
+ * @constant
+ */
+ SHORT: WebGLConstants_default.SHORT,
+ /**
+ * 16-bit unsigned short corresponding to UNSIGNED_SHORT and the type
+ * of an element in Uint16Array.
+ *
+ * @type {number}
+ * @constant
+ */
+ UNSIGNED_SHORT: WebGLConstants_default.UNSIGNED_SHORT,
+ /**
+ * 32-bit signed int corresponding to INT and the type
+ * of an element in Int32Array.
+ *
+ * @memberOf ComponentDatatype
+ *
+ * @type {number}
+ * @constant
+ */
+ INT: WebGLConstants_default.INT,
+ /**
+ * 32-bit unsigned int corresponding to UNSIGNED_INT and the type
+ * of an element in Uint32Array.
+ *
+ * @memberOf ComponentDatatype
+ *
+ * @type {number}
+ * @constant
+ */
+ UNSIGNED_INT: WebGLConstants_default.UNSIGNED_INT,
+ /**
+ * 32-bit floating-point corresponding to FLOAT and the type
+ * of an element in Float32Array.
+ *
+ * @type {number}
+ * @constant
+ */
+ FLOAT: WebGLConstants_default.FLOAT,
+ /**
+ * 64-bit floating-point corresponding to gl.DOUBLE (in Desktop OpenGL;
+ * this is not supported in WebGL, and is emulated in Cesium via {@link GeometryPipeline.encodeAttribute})
+ * and the type of an element in Float64Array.
+ *
+ * @memberOf ComponentDatatype
+ *
+ * @type {number}
+ * @constant
+ * @default 0x140A
+ */
+ DOUBLE: WebGLConstants_default.DOUBLE
+};
+ComponentDatatype.getSizeInBytes = function(componentDatatype) {
+ if (!defined_default(componentDatatype)) {
+ throw new DeveloperError_default("value is required.");
+ }
+ switch (componentDatatype) {
+ case ComponentDatatype.BYTE:
+ return Int8Array.BYTES_PER_ELEMENT;
+ case ComponentDatatype.UNSIGNED_BYTE:
+ return Uint8Array.BYTES_PER_ELEMENT;
+ case ComponentDatatype.SHORT:
+ return Int16Array.BYTES_PER_ELEMENT;
+ case ComponentDatatype.UNSIGNED_SHORT:
+ return Uint16Array.BYTES_PER_ELEMENT;
+ case ComponentDatatype.INT:
+ return Int32Array.BYTES_PER_ELEMENT;
+ case ComponentDatatype.UNSIGNED_INT:
+ return Uint32Array.BYTES_PER_ELEMENT;
+ case ComponentDatatype.FLOAT:
+ return Float32Array.BYTES_PER_ELEMENT;
+ case ComponentDatatype.DOUBLE:
+ return Float64Array.BYTES_PER_ELEMENT;
+ //>>includeStart('debug', pragmas.debug);
+ default:
+ throw new DeveloperError_default("componentDatatype is not a valid value.");
+ }
+};
+ComponentDatatype.fromTypedArray = function(array) {
+ if (array instanceof Int8Array) {
+ return ComponentDatatype.BYTE;
+ }
+ if (array instanceof Uint8Array) {
+ return ComponentDatatype.UNSIGNED_BYTE;
+ }
+ if (array instanceof Int16Array) {
+ return ComponentDatatype.SHORT;
+ }
+ if (array instanceof Uint16Array) {
+ return ComponentDatatype.UNSIGNED_SHORT;
+ }
+ if (array instanceof Int32Array) {
+ return ComponentDatatype.INT;
+ }
+ if (array instanceof Uint32Array) {
+ return ComponentDatatype.UNSIGNED_INT;
+ }
+ if (array instanceof Float32Array) {
+ return ComponentDatatype.FLOAT;
+ }
+ if (array instanceof Float64Array) {
+ return ComponentDatatype.DOUBLE;
+ }
+ throw new DeveloperError_default(
+ "array must be an Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, or Float64Array."
+ );
+};
+ComponentDatatype.validate = function(componentDatatype) {
+ return defined_default(componentDatatype) && (componentDatatype === ComponentDatatype.BYTE || componentDatatype === ComponentDatatype.UNSIGNED_BYTE || componentDatatype === ComponentDatatype.SHORT || componentDatatype === ComponentDatatype.UNSIGNED_SHORT || componentDatatype === ComponentDatatype.INT || componentDatatype === ComponentDatatype.UNSIGNED_INT || componentDatatype === ComponentDatatype.FLOAT || componentDatatype === ComponentDatatype.DOUBLE);
+};
+ComponentDatatype.createTypedArray = function(componentDatatype, valuesOrLength) {
+ if (!defined_default(componentDatatype)) {
+ throw new DeveloperError_default("componentDatatype is required.");
+ }
+ if (!defined_default(valuesOrLength)) {
+ throw new DeveloperError_default("valuesOrLength is required.");
+ }
+ switch (componentDatatype) {
+ case ComponentDatatype.BYTE:
+ return new Int8Array(valuesOrLength);
+ case ComponentDatatype.UNSIGNED_BYTE:
+ return new Uint8Array(valuesOrLength);
+ case ComponentDatatype.SHORT:
+ return new Int16Array(valuesOrLength);
+ case ComponentDatatype.UNSIGNED_SHORT:
+ return new Uint16Array(valuesOrLength);
+ case ComponentDatatype.INT:
+ return new Int32Array(valuesOrLength);
+ case ComponentDatatype.UNSIGNED_INT:
+ return new Uint32Array(valuesOrLength);
+ case ComponentDatatype.FLOAT:
+ return new Float32Array(valuesOrLength);
+ case ComponentDatatype.DOUBLE:
+ return new Float64Array(valuesOrLength);
+ //>>includeStart('debug', pragmas.debug);
+ default:
+ throw new DeveloperError_default("componentDatatype is not a valid value.");
+ }
+};
+ComponentDatatype.createArrayBufferView = function(componentDatatype, buffer, byteOffset, length) {
+ if (!defined_default(componentDatatype)) {
+ throw new DeveloperError_default("componentDatatype is required.");
+ }
+ if (!defined_default(buffer)) {
+ throw new DeveloperError_default("buffer is required.");
+ }
+ byteOffset = defaultValue_default(byteOffset, 0);
+ length = defaultValue_default(
+ length,
+ (buffer.byteLength - byteOffset) / ComponentDatatype.getSizeInBytes(componentDatatype)
+ );
+ switch (componentDatatype) {
+ case ComponentDatatype.BYTE:
+ return new Int8Array(buffer, byteOffset, length);
+ case ComponentDatatype.UNSIGNED_BYTE:
+ return new Uint8Array(buffer, byteOffset, length);
+ case ComponentDatatype.SHORT:
+ return new Int16Array(buffer, byteOffset, length);
+ case ComponentDatatype.UNSIGNED_SHORT:
+ return new Uint16Array(buffer, byteOffset, length);
+ case ComponentDatatype.INT:
+ return new Int32Array(buffer, byteOffset, length);
+ case ComponentDatatype.UNSIGNED_INT:
+ return new Uint32Array(buffer, byteOffset, length);
+ case ComponentDatatype.FLOAT:
+ return new Float32Array(buffer, byteOffset, length);
+ case ComponentDatatype.DOUBLE:
+ return new Float64Array(buffer, byteOffset, length);
+ //>>includeStart('debug', pragmas.debug);
+ default:
+ throw new DeveloperError_default("componentDatatype is not a valid value.");
+ }
+};
+ComponentDatatype.fromName = function(name) {
+ switch (name) {
+ case "BYTE":
+ return ComponentDatatype.BYTE;
+ case "UNSIGNED_BYTE":
+ return ComponentDatatype.UNSIGNED_BYTE;
+ case "SHORT":
+ return ComponentDatatype.SHORT;
+ case "UNSIGNED_SHORT":
+ return ComponentDatatype.UNSIGNED_SHORT;
+ case "INT":
+ return ComponentDatatype.INT;
+ case "UNSIGNED_INT":
+ return ComponentDatatype.UNSIGNED_INT;
+ case "FLOAT":
+ return ComponentDatatype.FLOAT;
+ case "DOUBLE":
+ return ComponentDatatype.DOUBLE;
+ //>>includeStart('debug', pragmas.debug);
+ default:
+ throw new DeveloperError_default("name is not a valid value.");
+ }
+};
+var ComponentDatatype_default = Object.freeze(ComponentDatatype);
+
+export {
+ ComponentDatatype_default
+};
diff --git a/public/assets/cesium/Workers/chunk-XWOUPGUF.js b/public/assets/cesium/Workers/chunk-XWOUPGUF.js
new file mode 100644
index 0000000000000000000000000000000000000000..40fdad1d7c1cce5a5a91f83016a3e8261a3e9bb9
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-XWOUPGUF.js
@@ -0,0 +1,55 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+
+// packages/engine/Source/Core/ArcType.js
+var ArcType = {
+ /**
+ * Straight line that does not conform to the surface of the ellipsoid.
+ *
+ * @type {number}
+ * @constant
+ */
+ NONE: 0,
+ /**
+ * Follow geodesic path.
+ *
+ * @type {number}
+ * @constant
+ */
+ GEODESIC: 1,
+ /**
+ * Follow rhumb or loxodrome path.
+ *
+ * @type {number}
+ * @constant
+ */
+ RHUMB: 2
+};
+var ArcType_default = Object.freeze(ArcType);
+
+export {
+ ArcType_default
+};
diff --git a/public/assets/cesium/Workers/chunk-YCDZX5LS.js b/public/assets/cesium/Workers/chunk-YCDZX5LS.js
new file mode 100644
index 0000000000000000000000000000000000000000..dedd37d6737cac40731532c315c130e6e4194b37
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-YCDZX5LS.js
@@ -0,0 +1,75 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getProtoOf = Object.getPrototypeOf;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
+}) : x)(function(x) {
+ if (typeof require !== "undefined") return require.apply(this, arguments);
+ throw Error('Dynamic require of "' + x + '" is not supported');
+});
+var __glob = (map) => (path) => {
+ var fn = map[path];
+ if (fn) return fn();
+ throw new Error("Module not found in bundle: " + path);
+};
+var __commonJS = (cb, mod) => function __require2() {
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+ // If the importer is in node compatibility mode or this is not an ESM
+ // file that has been converted to a CommonJS file using a Babel-
+ // compatible transform (i.e. "__esModule" has not been set), then set
+ // "default" to the CommonJS "module.exports" for node compatibility.
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
+ mod
+));
+
+// packages/engine/Source/Core/defined.js
+function defined(value) {
+ return value !== void 0 && value !== null;
+}
+var defined_default = defined;
+
+export {
+ __require,
+ __glob,
+ __commonJS,
+ __toESM,
+ defined_default
+};
diff --git a/public/assets/cesium/Workers/chunk-YK3QIKY7.js b/public/assets/cesium/Workers/chunk-YK3QIKY7.js
new file mode 100644
index 0000000000000000000000000000000000000000..662b26ee29fb2c4c1926861077956d8942a2efa6
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-YK3QIKY7.js
@@ -0,0 +1,287 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ AxisAlignedBoundingBox_default
+} from "./chunk-NDDI2LWR.js";
+import {
+ IntersectionTests_default,
+ Ray_default
+} from "./chunk-QQOZO7KO.js";
+import {
+ Plane_default
+} from "./chunk-EDLRS3AW.js";
+import {
+ Cartesian4_default,
+ Matrix4_default,
+ Transforms_default
+} from "./chunk-6SQMLVGV.js";
+import {
+ Cartesian2_default,
+ Cartesian3_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default,
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/EllipsoidTangentPlane.js
+var scratchCart4 = new Cartesian4_default();
+function EllipsoidTangentPlane(origin, ellipsoid) {
+ Check_default.defined("origin", origin);
+ ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.default);
+ origin = ellipsoid.scaleToGeodeticSurface(origin);
+ if (!defined_default(origin)) {
+ throw new DeveloperError_default(
+ "origin must not be at the center of the ellipsoid."
+ );
+ }
+ const eastNorthUp = Transforms_default.eastNorthUpToFixedFrame(origin, ellipsoid);
+ this._ellipsoid = ellipsoid;
+ this._origin = origin;
+ this._xAxis = Cartesian3_default.fromCartesian4(
+ Matrix4_default.getColumn(eastNorthUp, 0, scratchCart4)
+ );
+ this._yAxis = Cartesian3_default.fromCartesian4(
+ Matrix4_default.getColumn(eastNorthUp, 1, scratchCart4)
+ );
+ const normal = Cartesian3_default.fromCartesian4(
+ Matrix4_default.getColumn(eastNorthUp, 2, scratchCart4)
+ );
+ this._plane = Plane_default.fromPointNormal(origin, normal);
+}
+Object.defineProperties(EllipsoidTangentPlane.prototype, {
+ /**
+ * Gets the ellipsoid.
+ * @memberof EllipsoidTangentPlane.prototype
+ * @type {Ellipsoid}
+ */
+ ellipsoid: {
+ get: function() {
+ return this._ellipsoid;
+ }
+ },
+ /**
+ * Gets the origin.
+ * @memberof EllipsoidTangentPlane.prototype
+ * @type {Cartesian3}
+ */
+ origin: {
+ get: function() {
+ return this._origin;
+ }
+ },
+ /**
+ * Gets the plane which is tangent to the ellipsoid.
+ * @memberof EllipsoidTangentPlane.prototype
+ * @readonly
+ * @type {Plane}
+ */
+ plane: {
+ get: function() {
+ return this._plane;
+ }
+ },
+ /**
+ * Gets the local X-axis (east) of the tangent plane.
+ * @memberof EllipsoidTangentPlane.prototype
+ * @readonly
+ * @type {Cartesian3}
+ */
+ xAxis: {
+ get: function() {
+ return this._xAxis;
+ }
+ },
+ /**
+ * Gets the local Y-axis (north) of the tangent plane.
+ * @memberof EllipsoidTangentPlane.prototype
+ * @readonly
+ * @type {Cartesian3}
+ */
+ yAxis: {
+ get: function() {
+ return this._yAxis;
+ }
+ },
+ /**
+ * Gets the local Z-axis (up) of the tangent plane.
+ * @memberof EllipsoidTangentPlane.prototype
+ * @readonly
+ * @type {Cartesian3}
+ */
+ zAxis: {
+ get: function() {
+ return this._plane.normal;
+ }
+ }
+});
+var tmp = new AxisAlignedBoundingBox_default();
+EllipsoidTangentPlane.fromPoints = function(cartesians, ellipsoid) {
+ Check_default.defined("cartesians", cartesians);
+ const box = AxisAlignedBoundingBox_default.fromPoints(cartesians, tmp);
+ return new EllipsoidTangentPlane(box.center, ellipsoid);
+};
+var scratchProjectPointOntoPlaneRay = new Ray_default();
+var scratchProjectPointOntoPlaneCartesian3 = new Cartesian3_default();
+EllipsoidTangentPlane.prototype.projectPointOntoPlane = function(cartesian, result) {
+ Check_default.defined("cartesian", cartesian);
+ const ray = scratchProjectPointOntoPlaneRay;
+ ray.origin = cartesian;
+ Cartesian3_default.normalize(cartesian, ray.direction);
+ let intersectionPoint = IntersectionTests_default.rayPlane(
+ ray,
+ this._plane,
+ scratchProjectPointOntoPlaneCartesian3
+ );
+ if (!defined_default(intersectionPoint)) {
+ Cartesian3_default.negate(ray.direction, ray.direction);
+ intersectionPoint = IntersectionTests_default.rayPlane(
+ ray,
+ this._plane,
+ scratchProjectPointOntoPlaneCartesian3
+ );
+ }
+ if (defined_default(intersectionPoint)) {
+ const v = Cartesian3_default.subtract(
+ intersectionPoint,
+ this._origin,
+ intersectionPoint
+ );
+ const x = Cartesian3_default.dot(this._xAxis, v);
+ const y = Cartesian3_default.dot(this._yAxis, v);
+ if (!defined_default(result)) {
+ return new Cartesian2_default(x, y);
+ }
+ result.x = x;
+ result.y = y;
+ return result;
+ }
+ return void 0;
+};
+EllipsoidTangentPlane.prototype.projectPointsOntoPlane = function(cartesians, result) {
+ Check_default.defined("cartesians", cartesians);
+ if (!defined_default(result)) {
+ result = [];
+ }
+ let count = 0;
+ const length = cartesians.length;
+ for (let i = 0; i < length; i++) {
+ const p = this.projectPointOntoPlane(cartesians[i], result[count]);
+ if (defined_default(p)) {
+ result[count] = p;
+ count++;
+ }
+ }
+ result.length = count;
+ return result;
+};
+EllipsoidTangentPlane.prototype.projectPointToNearestOnPlane = function(cartesian, result) {
+ Check_default.defined("cartesian", cartesian);
+ if (!defined_default(result)) {
+ result = new Cartesian2_default();
+ }
+ const ray = scratchProjectPointOntoPlaneRay;
+ ray.origin = cartesian;
+ Cartesian3_default.clone(this._plane.normal, ray.direction);
+ let intersectionPoint = IntersectionTests_default.rayPlane(
+ ray,
+ this._plane,
+ scratchProjectPointOntoPlaneCartesian3
+ );
+ if (!defined_default(intersectionPoint)) {
+ Cartesian3_default.negate(ray.direction, ray.direction);
+ intersectionPoint = IntersectionTests_default.rayPlane(
+ ray,
+ this._plane,
+ scratchProjectPointOntoPlaneCartesian3
+ );
+ }
+ const v = Cartesian3_default.subtract(
+ intersectionPoint,
+ this._origin,
+ intersectionPoint
+ );
+ const x = Cartesian3_default.dot(this._xAxis, v);
+ const y = Cartesian3_default.dot(this._yAxis, v);
+ result.x = x;
+ result.y = y;
+ return result;
+};
+EllipsoidTangentPlane.prototype.projectPointsToNearestOnPlane = function(cartesians, result) {
+ Check_default.defined("cartesians", cartesians);
+ if (!defined_default(result)) {
+ result = [];
+ }
+ const length = cartesians.length;
+ result.length = length;
+ for (let i = 0; i < length; i++) {
+ result[i] = this.projectPointToNearestOnPlane(cartesians[i], result[i]);
+ }
+ return result;
+};
+var projectPointsOntoEllipsoidScratch = new Cartesian3_default();
+EllipsoidTangentPlane.prototype.projectPointOntoEllipsoid = function(cartesian, result) {
+ Check_default.defined("cartesian", cartesian);
+ if (!defined_default(result)) {
+ result = new Cartesian3_default();
+ }
+ const ellipsoid = this._ellipsoid;
+ const origin = this._origin;
+ const xAxis = this._xAxis;
+ const yAxis = this._yAxis;
+ const tmp2 = projectPointsOntoEllipsoidScratch;
+ Cartesian3_default.multiplyByScalar(xAxis, cartesian.x, tmp2);
+ result = Cartesian3_default.add(origin, tmp2, result);
+ Cartesian3_default.multiplyByScalar(yAxis, cartesian.y, tmp2);
+ Cartesian3_default.add(result, tmp2, result);
+ ellipsoid.scaleToGeocentricSurface(result, result);
+ return result;
+};
+EllipsoidTangentPlane.prototype.projectPointsOntoEllipsoid = function(cartesians, result) {
+ Check_default.defined("cartesians", cartesians);
+ const length = cartesians.length;
+ if (!defined_default(result)) {
+ result = new Array(length);
+ } else {
+ result.length = length;
+ }
+ for (let i = 0; i < length; ++i) {
+ result[i] = this.projectPointOntoEllipsoid(cartesians[i], result[i]);
+ }
+ return result;
+};
+var EllipsoidTangentPlane_default = EllipsoidTangentPlane;
+
+export {
+ EllipsoidTangentPlane_default
+};
diff --git a/public/assets/cesium/Workers/chunk-YSIJTJ7N.js b/public/assets/cesium/Workers/chunk-YSIJTJ7N.js
new file mode 100644
index 0000000000000000000000000000000000000000..111206f62de97bd6fb3703ba56603707e9b9b727
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-YSIJTJ7N.js
@@ -0,0 +1,59 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ Matrix4_default
+} from "./chunk-6SQMLVGV.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/GeometryInstance.js
+function GeometryInstance(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ if (!defined_default(options.geometry)) {
+ throw new DeveloperError_default("options.geometry is required.");
+ }
+ this.geometry = options.geometry;
+ this.modelMatrix = Matrix4_default.clone(
+ defaultValue_default(options.modelMatrix, Matrix4_default.IDENTITY)
+ );
+ this.id = options.id;
+ this.pickPrimitive = options.pickPrimitive;
+ this.attributes = defaultValue_default(options.attributes, {});
+ this.westHemisphereGeometry = void 0;
+ this.eastHemisphereGeometry = void 0;
+}
+var GeometryInstance_default = GeometryInstance;
+
+export {
+ GeometryInstance_default
+};
diff --git a/public/assets/cesium/Workers/chunk-Z2QP3CXW.js b/public/assets/cesium/Workers/chunk-Z2QP3CXW.js
new file mode 100644
index 0000000000000000000000000000000000000000..4b92d4c01ea88a1bdff37e135c95445e6671bbec
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-Z2QP3CXW.js
@@ -0,0 +1,101 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/formatError.js
+function formatError(object) {
+ let result;
+ const name = object.name;
+ const message = object.message;
+ if (defined_default(name) && defined_default(message)) {
+ result = `${name}: ${message}`;
+ } else {
+ result = object.toString();
+ }
+ const stack = object.stack;
+ if (defined_default(stack)) {
+ result += `
+${stack}`;
+ }
+ return result;
+}
+var formatError_default = formatError;
+
+// packages/engine/Source/Workers/createTaskProcessorWorker.js
+function createTaskProcessorWorker(workerFunction) {
+ async function onMessageHandler({ data }) {
+ const transferableObjects = [];
+ const responseMessage = {
+ id: data.id,
+ result: void 0,
+ error: void 0
+ };
+ self.CESIUM_BASE_URL = data.baseUrl;
+ try {
+ const result = await workerFunction(data.parameters, transferableObjects);
+ responseMessage.result = result;
+ } catch (error) {
+ if (error instanceof Error) {
+ responseMessage.error = {
+ name: error.name,
+ message: error.message,
+ stack: error.stack
+ };
+ } else {
+ responseMessage.error = error;
+ }
+ }
+ if (!data.canTransferArrayBuffer) {
+ transferableObjects.length = 0;
+ }
+ try {
+ postMessage(responseMessage, transferableObjects);
+ } catch (error) {
+ responseMessage.result = void 0;
+ responseMessage.error = `postMessage failed with error: ${formatError_default(
+ error
+ )}
+ with responseMessage: ${JSON.stringify(responseMessage)}`;
+ postMessage(responseMessage);
+ }
+ }
+ function onMessageErrorHandler(event) {
+ postMessage({
+ id: event.data?.id,
+ error: `postMessage failed with error: ${JSON.stringify(event)}`
+ });
+ }
+ self.onmessage = onMessageHandler;
+ self.onmessageerror = onMessageErrorHandler;
+ return self;
+}
+var createTaskProcessorWorker_default = createTaskProcessorWorker;
+
+export {
+ createTaskProcessorWorker_default
+};
diff --git a/public/assets/cesium/Workers/chunk-ZVUUPJEM.js b/public/assets/cesium/Workers/chunk-ZVUUPJEM.js
new file mode 100644
index 0000000000000000000000000000000000000000..51ac879437c4b3333ac1b44ecbf4ee68eda8d0ba
--- /dev/null
+++ b/public/assets/cesium/Workers/chunk-ZVUUPJEM.js
@@ -0,0 +1,1075 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ EllipseGeometryLibrary_default
+} from "./chunk-JISPSEF3.js";
+import {
+ GeometryInstance_default
+} from "./chunk-YSIJTJ7N.js";
+import {
+ GeometryPipeline_default
+} from "./chunk-7ZZ5LMZY.js";
+import {
+ GeometryOffsetAttribute_default
+} from "./chunk-GBT7MJ6X.js";
+import {
+ VertexFormat_default
+} from "./chunk-JBSKHTNX.js";
+import {
+ IndexDatatype_default
+} from "./chunk-C4WPMOKT.js";
+import {
+ GeometryAttributes_default
+} from "./chunk-X7IQYYHF.js";
+import {
+ GeometryAttribute_default,
+ Geometry_default,
+ PrimitiveType_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ BoundingSphere_default,
+ GeographicProjection_default
+} from "./chunk-KHZNBFOH.js";
+import {
+ Quaternion_default,
+ Rectangle_default
+} from "./chunk-6SQMLVGV.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian2_default,
+ Cartesian3_default,
+ Cartographic_default,
+ Ellipsoid_default,
+ Matrix3_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default,
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/EllipseGeometry.js
+var scratchCartesian1 = new Cartesian3_default();
+var scratchCartesian2 = new Cartesian3_default();
+var scratchCartesian3 = new Cartesian3_default();
+var scratchCartesian4 = new Cartesian3_default();
+var texCoordScratch = new Cartesian2_default();
+var textureMatrixScratch = new Matrix3_default();
+var tangentMatrixScratch = new Matrix3_default();
+var quaternionScratch = new Quaternion_default();
+var scratchNormal = new Cartesian3_default();
+var scratchTangent = new Cartesian3_default();
+var scratchBitangent = new Cartesian3_default();
+var scratchCartographic = new Cartographic_default();
+var projectedCenterScratch = new Cartesian3_default();
+var scratchMinTexCoord = new Cartesian2_default();
+var scratchMaxTexCoord = new Cartesian2_default();
+function computeTopBottomAttributes(positions, options, extrude) {
+ const vertexFormat = options.vertexFormat;
+ const center = options.center;
+ const semiMajorAxis = options.semiMajorAxis;
+ const semiMinorAxis = options.semiMinorAxis;
+ const ellipsoid = options.ellipsoid;
+ const stRotation = options.stRotation;
+ const size = extrude ? positions.length / 3 * 2 : positions.length / 3;
+ const shadowVolume = options.shadowVolume;
+ const textureCoordinates = vertexFormat.st ? new Float32Array(size * 2) : void 0;
+ const normals = vertexFormat.normal ? new Float32Array(size * 3) : void 0;
+ const tangents = vertexFormat.tangent ? new Float32Array(size * 3) : void 0;
+ const bitangents = vertexFormat.bitangent ? new Float32Array(size * 3) : void 0;
+ const extrudeNormals = shadowVolume ? new Float32Array(size * 3) : void 0;
+ let textureCoordIndex = 0;
+ let normal = scratchNormal;
+ let tangent = scratchTangent;
+ let bitangent = scratchBitangent;
+ const projection = new GeographicProjection_default(ellipsoid);
+ const projectedCenter = projection.project(
+ ellipsoid.cartesianToCartographic(center, scratchCartographic),
+ projectedCenterScratch
+ );
+ const geodeticNormal = ellipsoid.scaleToGeodeticSurface(
+ center,
+ scratchCartesian1
+ );
+ ellipsoid.geodeticSurfaceNormal(geodeticNormal, geodeticNormal);
+ let textureMatrix = textureMatrixScratch;
+ let tangentMatrix = tangentMatrixScratch;
+ if (stRotation !== 0) {
+ let rotation = Quaternion_default.fromAxisAngle(
+ geodeticNormal,
+ stRotation,
+ quaternionScratch
+ );
+ textureMatrix = Matrix3_default.fromQuaternion(rotation, textureMatrix);
+ rotation = Quaternion_default.fromAxisAngle(
+ geodeticNormal,
+ -stRotation,
+ quaternionScratch
+ );
+ tangentMatrix = Matrix3_default.fromQuaternion(rotation, tangentMatrix);
+ } else {
+ textureMatrix = Matrix3_default.clone(Matrix3_default.IDENTITY, textureMatrix);
+ tangentMatrix = Matrix3_default.clone(Matrix3_default.IDENTITY, tangentMatrix);
+ }
+ const minTexCoord = Cartesian2_default.fromElements(
+ Number.POSITIVE_INFINITY,
+ Number.POSITIVE_INFINITY,
+ scratchMinTexCoord
+ );
+ const maxTexCoord = Cartesian2_default.fromElements(
+ Number.NEGATIVE_INFINITY,
+ Number.NEGATIVE_INFINITY,
+ scratchMaxTexCoord
+ );
+ let length = positions.length;
+ const bottomOffset = extrude ? length : 0;
+ const stOffset = bottomOffset / 3 * 2;
+ for (let i = 0; i < length; i += 3) {
+ const i1 = i + 1;
+ const i2 = i + 2;
+ const position = Cartesian3_default.fromArray(positions, i, scratchCartesian1);
+ if (vertexFormat.st) {
+ const rotatedPoint = Matrix3_default.multiplyByVector(
+ textureMatrix,
+ position,
+ scratchCartesian2
+ );
+ const projectedPoint = projection.project(
+ ellipsoid.cartesianToCartographic(rotatedPoint, scratchCartographic),
+ scratchCartesian3
+ );
+ Cartesian3_default.subtract(projectedPoint, projectedCenter, projectedPoint);
+ texCoordScratch.x = (projectedPoint.x + semiMajorAxis) / (2 * semiMajorAxis);
+ texCoordScratch.y = (projectedPoint.y + semiMinorAxis) / (2 * semiMinorAxis);
+ minTexCoord.x = Math.min(texCoordScratch.x, minTexCoord.x);
+ minTexCoord.y = Math.min(texCoordScratch.y, minTexCoord.y);
+ maxTexCoord.x = Math.max(texCoordScratch.x, maxTexCoord.x);
+ maxTexCoord.y = Math.max(texCoordScratch.y, maxTexCoord.y);
+ if (extrude) {
+ textureCoordinates[textureCoordIndex + stOffset] = texCoordScratch.x;
+ textureCoordinates[textureCoordIndex + 1 + stOffset] = texCoordScratch.y;
+ }
+ textureCoordinates[textureCoordIndex++] = texCoordScratch.x;
+ textureCoordinates[textureCoordIndex++] = texCoordScratch.y;
+ }
+ if (vertexFormat.normal || vertexFormat.tangent || vertexFormat.bitangent || shadowVolume) {
+ normal = ellipsoid.geodeticSurfaceNormal(position, normal);
+ if (shadowVolume) {
+ extrudeNormals[i + bottomOffset] = -normal.x;
+ extrudeNormals[i1 + bottomOffset] = -normal.y;
+ extrudeNormals[i2 + bottomOffset] = -normal.z;
+ }
+ if (vertexFormat.normal || vertexFormat.tangent || vertexFormat.bitangent) {
+ if (vertexFormat.tangent || vertexFormat.bitangent) {
+ tangent = Cartesian3_default.normalize(
+ Cartesian3_default.cross(Cartesian3_default.UNIT_Z, normal, tangent),
+ tangent
+ );
+ Matrix3_default.multiplyByVector(tangentMatrix, tangent, tangent);
+ }
+ if (vertexFormat.normal) {
+ normals[i] = normal.x;
+ normals[i1] = normal.y;
+ normals[i2] = normal.z;
+ if (extrude) {
+ normals[i + bottomOffset] = -normal.x;
+ normals[i1 + bottomOffset] = -normal.y;
+ normals[i2 + bottomOffset] = -normal.z;
+ }
+ }
+ if (vertexFormat.tangent) {
+ tangents[i] = tangent.x;
+ tangents[i1] = tangent.y;
+ tangents[i2] = tangent.z;
+ if (extrude) {
+ tangents[i + bottomOffset] = -tangent.x;
+ tangents[i1 + bottomOffset] = -tangent.y;
+ tangents[i2 + bottomOffset] = -tangent.z;
+ }
+ }
+ if (vertexFormat.bitangent) {
+ bitangent = Cartesian3_default.normalize(
+ Cartesian3_default.cross(normal, tangent, bitangent),
+ bitangent
+ );
+ bitangents[i] = bitangent.x;
+ bitangents[i1] = bitangent.y;
+ bitangents[i2] = bitangent.z;
+ if (extrude) {
+ bitangents[i + bottomOffset] = bitangent.x;
+ bitangents[i1 + bottomOffset] = bitangent.y;
+ bitangents[i2 + bottomOffset] = bitangent.z;
+ }
+ }
+ }
+ }
+ }
+ if (vertexFormat.st) {
+ length = textureCoordinates.length;
+ for (let k = 0; k < length; k += 2) {
+ textureCoordinates[k] = (textureCoordinates[k] - minTexCoord.x) / (maxTexCoord.x - minTexCoord.x);
+ textureCoordinates[k + 1] = (textureCoordinates[k + 1] - minTexCoord.y) / (maxTexCoord.y - minTexCoord.y);
+ }
+ }
+ const attributes = new GeometryAttributes_default();
+ if (vertexFormat.position) {
+ const finalPositions = EllipseGeometryLibrary_default.raisePositionsToHeight(
+ positions,
+ options,
+ extrude
+ );
+ attributes.position = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: finalPositions
+ });
+ }
+ if (vertexFormat.st) {
+ attributes.st = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 2,
+ values: textureCoordinates
+ });
+ }
+ if (vertexFormat.normal) {
+ attributes.normal = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: normals
+ });
+ }
+ if (vertexFormat.tangent) {
+ attributes.tangent = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: tangents
+ });
+ }
+ if (vertexFormat.bitangent) {
+ attributes.bitangent = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: bitangents
+ });
+ }
+ if (shadowVolume) {
+ attributes.extrudeDirection = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: extrudeNormals
+ });
+ }
+ if (extrude && defined_default(options.offsetAttribute)) {
+ let offsetAttribute = new Uint8Array(size);
+ if (options.offsetAttribute === GeometryOffsetAttribute_default.TOP) {
+ offsetAttribute = offsetAttribute.fill(1, 0, size / 2);
+ } else {
+ const offsetValue = options.offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
+ offsetAttribute = offsetAttribute.fill(offsetValue);
+ }
+ attributes.applyOffset = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: offsetAttribute
+ });
+ }
+ return attributes;
+}
+function topIndices(numPts) {
+ const indices = new Array(12 * (numPts * (numPts + 1)) - 6);
+ let indicesIndex = 0;
+ let prevIndex;
+ let numInterior;
+ let positionIndex;
+ let i;
+ let j;
+ prevIndex = 0;
+ positionIndex = 1;
+ for (i = 0; i < 3; i++) {
+ indices[indicesIndex++] = positionIndex++;
+ indices[indicesIndex++] = prevIndex;
+ indices[indicesIndex++] = positionIndex;
+ }
+ for (i = 2; i < numPts + 1; ++i) {
+ positionIndex = i * (i + 1) - 1;
+ prevIndex = (i - 1) * i - 1;
+ indices[indicesIndex++] = positionIndex++;
+ indices[indicesIndex++] = prevIndex;
+ indices[indicesIndex++] = positionIndex;
+ numInterior = 2 * i;
+ for (j = 0; j < numInterior - 1; ++j) {
+ indices[indicesIndex++] = positionIndex;
+ indices[indicesIndex++] = prevIndex++;
+ indices[indicesIndex++] = prevIndex;
+ indices[indicesIndex++] = positionIndex++;
+ indices[indicesIndex++] = prevIndex;
+ indices[indicesIndex++] = positionIndex;
+ }
+ indices[indicesIndex++] = positionIndex++;
+ indices[indicesIndex++] = prevIndex;
+ indices[indicesIndex++] = positionIndex;
+ }
+ numInterior = numPts * 2;
+ ++positionIndex;
+ ++prevIndex;
+ for (i = 0; i < numInterior - 1; ++i) {
+ indices[indicesIndex++] = positionIndex;
+ indices[indicesIndex++] = prevIndex++;
+ indices[indicesIndex++] = prevIndex;
+ indices[indicesIndex++] = positionIndex++;
+ indices[indicesIndex++] = prevIndex;
+ indices[indicesIndex++] = positionIndex;
+ }
+ indices[indicesIndex++] = positionIndex;
+ indices[indicesIndex++] = prevIndex++;
+ indices[indicesIndex++] = prevIndex;
+ indices[indicesIndex++] = positionIndex++;
+ indices[indicesIndex++] = prevIndex++;
+ indices[indicesIndex++] = prevIndex;
+ ++prevIndex;
+ for (i = numPts - 1; i > 1; --i) {
+ indices[indicesIndex++] = prevIndex++;
+ indices[indicesIndex++] = prevIndex;
+ indices[indicesIndex++] = positionIndex;
+ numInterior = 2 * i;
+ for (j = 0; j < numInterior - 1; ++j) {
+ indices[indicesIndex++] = positionIndex;
+ indices[indicesIndex++] = prevIndex++;
+ indices[indicesIndex++] = prevIndex;
+ indices[indicesIndex++] = positionIndex++;
+ indices[indicesIndex++] = prevIndex;
+ indices[indicesIndex++] = positionIndex;
+ }
+ indices[indicesIndex++] = prevIndex++;
+ indices[indicesIndex++] = prevIndex++;
+ indices[indicesIndex++] = positionIndex++;
+ }
+ for (i = 0; i < 3; i++) {
+ indices[indicesIndex++] = prevIndex++;
+ indices[indicesIndex++] = prevIndex;
+ indices[indicesIndex++] = positionIndex;
+ }
+ return indices;
+}
+var boundingSphereCenter = new Cartesian3_default();
+function computeEllipse(options) {
+ const center = options.center;
+ boundingSphereCenter = Cartesian3_default.multiplyByScalar(
+ options.ellipsoid.geodeticSurfaceNormal(center, boundingSphereCenter),
+ options.height,
+ boundingSphereCenter
+ );
+ boundingSphereCenter = Cartesian3_default.add(
+ center,
+ boundingSphereCenter,
+ boundingSphereCenter
+ );
+ const boundingSphere = new BoundingSphere_default(
+ boundingSphereCenter,
+ options.semiMajorAxis
+ );
+ const cep = EllipseGeometryLibrary_default.computeEllipsePositions(
+ options,
+ true,
+ false
+ );
+ const positions = cep.positions;
+ const numPts = cep.numPts;
+ const attributes = computeTopBottomAttributes(positions, options, false);
+ let indices = topIndices(numPts);
+ indices = IndexDatatype_default.createTypedArray(positions.length / 3, indices);
+ return {
+ boundingSphere,
+ attributes,
+ indices
+ };
+}
+function computeWallAttributes(positions, options) {
+ const vertexFormat = options.vertexFormat;
+ const center = options.center;
+ const semiMajorAxis = options.semiMajorAxis;
+ const semiMinorAxis = options.semiMinorAxis;
+ const ellipsoid = options.ellipsoid;
+ const height = options.height;
+ const extrudedHeight = options.extrudedHeight;
+ const stRotation = options.stRotation;
+ const size = positions.length / 3 * 2;
+ const finalPositions = new Float64Array(size * 3);
+ const textureCoordinates = vertexFormat.st ? new Float32Array(size * 2) : void 0;
+ const normals = vertexFormat.normal ? new Float32Array(size * 3) : void 0;
+ const tangents = vertexFormat.tangent ? new Float32Array(size * 3) : void 0;
+ const bitangents = vertexFormat.bitangent ? new Float32Array(size * 3) : void 0;
+ const shadowVolume = options.shadowVolume;
+ const extrudeNormals = shadowVolume ? new Float32Array(size * 3) : void 0;
+ let textureCoordIndex = 0;
+ let normal = scratchNormal;
+ let tangent = scratchTangent;
+ let bitangent = scratchBitangent;
+ const projection = new GeographicProjection_default(ellipsoid);
+ const projectedCenter = projection.project(
+ ellipsoid.cartesianToCartographic(center, scratchCartographic),
+ projectedCenterScratch
+ );
+ const geodeticNormal = ellipsoid.scaleToGeodeticSurface(
+ center,
+ scratchCartesian1
+ );
+ ellipsoid.geodeticSurfaceNormal(geodeticNormal, geodeticNormal);
+ const rotation = Quaternion_default.fromAxisAngle(
+ geodeticNormal,
+ stRotation,
+ quaternionScratch
+ );
+ const textureMatrix = Matrix3_default.fromQuaternion(rotation, textureMatrixScratch);
+ const minTexCoord = Cartesian2_default.fromElements(
+ Number.POSITIVE_INFINITY,
+ Number.POSITIVE_INFINITY,
+ scratchMinTexCoord
+ );
+ const maxTexCoord = Cartesian2_default.fromElements(
+ Number.NEGATIVE_INFINITY,
+ Number.NEGATIVE_INFINITY,
+ scratchMaxTexCoord
+ );
+ let length = positions.length;
+ const stOffset = length / 3 * 2;
+ for (let i = 0; i < length; i += 3) {
+ const i1 = i + 1;
+ const i2 = i + 2;
+ let position = Cartesian3_default.fromArray(positions, i, scratchCartesian1);
+ let extrudedPosition;
+ if (vertexFormat.st) {
+ const rotatedPoint = Matrix3_default.multiplyByVector(
+ textureMatrix,
+ position,
+ scratchCartesian2
+ );
+ const projectedPoint = projection.project(
+ ellipsoid.cartesianToCartographic(rotatedPoint, scratchCartographic),
+ scratchCartesian3
+ );
+ Cartesian3_default.subtract(projectedPoint, projectedCenter, projectedPoint);
+ texCoordScratch.x = (projectedPoint.x + semiMajorAxis) / (2 * semiMajorAxis);
+ texCoordScratch.y = (projectedPoint.y + semiMinorAxis) / (2 * semiMinorAxis);
+ minTexCoord.x = Math.min(texCoordScratch.x, minTexCoord.x);
+ minTexCoord.y = Math.min(texCoordScratch.y, minTexCoord.y);
+ maxTexCoord.x = Math.max(texCoordScratch.x, maxTexCoord.x);
+ maxTexCoord.y = Math.max(texCoordScratch.y, maxTexCoord.y);
+ textureCoordinates[textureCoordIndex + stOffset] = texCoordScratch.x;
+ textureCoordinates[textureCoordIndex + 1 + stOffset] = texCoordScratch.y;
+ textureCoordinates[textureCoordIndex++] = texCoordScratch.x;
+ textureCoordinates[textureCoordIndex++] = texCoordScratch.y;
+ }
+ position = ellipsoid.scaleToGeodeticSurface(position, position);
+ extrudedPosition = Cartesian3_default.clone(position, scratchCartesian2);
+ normal = ellipsoid.geodeticSurfaceNormal(position, normal);
+ if (shadowVolume) {
+ extrudeNormals[i + length] = -normal.x;
+ extrudeNormals[i1 + length] = -normal.y;
+ extrudeNormals[i2 + length] = -normal.z;
+ }
+ let scaledNormal = Cartesian3_default.multiplyByScalar(
+ normal,
+ height,
+ scratchCartesian4
+ );
+ position = Cartesian3_default.add(position, scaledNormal, position);
+ scaledNormal = Cartesian3_default.multiplyByScalar(
+ normal,
+ extrudedHeight,
+ scaledNormal
+ );
+ extrudedPosition = Cartesian3_default.add(
+ extrudedPosition,
+ scaledNormal,
+ extrudedPosition
+ );
+ if (vertexFormat.position) {
+ finalPositions[i + length] = extrudedPosition.x;
+ finalPositions[i1 + length] = extrudedPosition.y;
+ finalPositions[i2 + length] = extrudedPosition.z;
+ finalPositions[i] = position.x;
+ finalPositions[i1] = position.y;
+ finalPositions[i2] = position.z;
+ }
+ if (vertexFormat.normal || vertexFormat.tangent || vertexFormat.bitangent) {
+ bitangent = Cartesian3_default.clone(normal, bitangent);
+ const next = Cartesian3_default.fromArray(
+ positions,
+ (i + 3) % length,
+ scratchCartesian4
+ );
+ Cartesian3_default.subtract(next, position, next);
+ const bottom = Cartesian3_default.subtract(
+ extrudedPosition,
+ position,
+ scratchCartesian3
+ );
+ normal = Cartesian3_default.normalize(
+ Cartesian3_default.cross(bottom, next, normal),
+ normal
+ );
+ if (vertexFormat.normal) {
+ normals[i] = normal.x;
+ normals[i1] = normal.y;
+ normals[i2] = normal.z;
+ normals[i + length] = normal.x;
+ normals[i1 + length] = normal.y;
+ normals[i2 + length] = normal.z;
+ }
+ if (vertexFormat.tangent) {
+ tangent = Cartesian3_default.normalize(
+ Cartesian3_default.cross(bitangent, normal, tangent),
+ tangent
+ );
+ tangents[i] = tangent.x;
+ tangents[i1] = tangent.y;
+ tangents[i2] = tangent.z;
+ tangents[i + length] = tangent.x;
+ tangents[i + 1 + length] = tangent.y;
+ tangents[i + 2 + length] = tangent.z;
+ }
+ if (vertexFormat.bitangent) {
+ bitangents[i] = bitangent.x;
+ bitangents[i1] = bitangent.y;
+ bitangents[i2] = bitangent.z;
+ bitangents[i + length] = bitangent.x;
+ bitangents[i1 + length] = bitangent.y;
+ bitangents[i2 + length] = bitangent.z;
+ }
+ }
+ }
+ if (vertexFormat.st) {
+ length = textureCoordinates.length;
+ for (let k = 0; k < length; k += 2) {
+ textureCoordinates[k] = (textureCoordinates[k] - minTexCoord.x) / (maxTexCoord.x - minTexCoord.x);
+ textureCoordinates[k + 1] = (textureCoordinates[k + 1] - minTexCoord.y) / (maxTexCoord.y - minTexCoord.y);
+ }
+ }
+ const attributes = new GeometryAttributes_default();
+ if (vertexFormat.position) {
+ attributes.position = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: finalPositions
+ });
+ }
+ if (vertexFormat.st) {
+ attributes.st = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 2,
+ values: textureCoordinates
+ });
+ }
+ if (vertexFormat.normal) {
+ attributes.normal = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: normals
+ });
+ }
+ if (vertexFormat.tangent) {
+ attributes.tangent = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: tangents
+ });
+ }
+ if (vertexFormat.bitangent) {
+ attributes.bitangent = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: bitangents
+ });
+ }
+ if (shadowVolume) {
+ attributes.extrudeDirection = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: extrudeNormals
+ });
+ }
+ if (defined_default(options.offsetAttribute)) {
+ let offsetAttribute = new Uint8Array(size);
+ if (options.offsetAttribute === GeometryOffsetAttribute_default.TOP) {
+ offsetAttribute = offsetAttribute.fill(1, 0, size / 2);
+ } else {
+ const offsetValue = options.offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
+ offsetAttribute = offsetAttribute.fill(offsetValue);
+ }
+ attributes.applyOffset = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: offsetAttribute
+ });
+ }
+ return attributes;
+}
+function computeWallIndices(positions) {
+ const length = positions.length / 3;
+ const indices = IndexDatatype_default.createTypedArray(length, length * 6);
+ let index = 0;
+ for (let i = 0; i < length; i++) {
+ const UL = i;
+ const LL = i + length;
+ const UR = (UL + 1) % length;
+ const LR = UR + length;
+ indices[index++] = UL;
+ indices[index++] = LL;
+ indices[index++] = UR;
+ indices[index++] = UR;
+ indices[index++] = LL;
+ indices[index++] = LR;
+ }
+ return indices;
+}
+var topBoundingSphere = new BoundingSphere_default();
+var bottomBoundingSphere = new BoundingSphere_default();
+function computeExtrudedEllipse(options) {
+ const center = options.center;
+ const ellipsoid = options.ellipsoid;
+ const semiMajorAxis = options.semiMajorAxis;
+ let scaledNormal = Cartesian3_default.multiplyByScalar(
+ ellipsoid.geodeticSurfaceNormal(center, scratchCartesian1),
+ options.height,
+ scratchCartesian1
+ );
+ topBoundingSphere.center = Cartesian3_default.add(
+ center,
+ scaledNormal,
+ topBoundingSphere.center
+ );
+ topBoundingSphere.radius = semiMajorAxis;
+ scaledNormal = Cartesian3_default.multiplyByScalar(
+ ellipsoid.geodeticSurfaceNormal(center, scaledNormal),
+ options.extrudedHeight,
+ scaledNormal
+ );
+ bottomBoundingSphere.center = Cartesian3_default.add(
+ center,
+ scaledNormal,
+ bottomBoundingSphere.center
+ );
+ bottomBoundingSphere.radius = semiMajorAxis;
+ const cep = EllipseGeometryLibrary_default.computeEllipsePositions(
+ options,
+ true,
+ true
+ );
+ const positions = cep.positions;
+ const numPts = cep.numPts;
+ const outerPositions = cep.outerPositions;
+ const boundingSphere = BoundingSphere_default.union(
+ topBoundingSphere,
+ bottomBoundingSphere
+ );
+ const topBottomAttributes = computeTopBottomAttributes(
+ positions,
+ options,
+ true
+ );
+ let indices = topIndices(numPts);
+ const length = indices.length;
+ indices.length = length * 2;
+ const posLength = positions.length / 3;
+ for (let i = 0; i < length; i += 3) {
+ indices[i + length] = indices[i + 2] + posLength;
+ indices[i + 1 + length] = indices[i + 1] + posLength;
+ indices[i + 2 + length] = indices[i] + posLength;
+ }
+ const topBottomIndices = IndexDatatype_default.createTypedArray(
+ posLength * 2 / 3,
+ indices
+ );
+ const topBottomGeo = new Geometry_default({
+ attributes: topBottomAttributes,
+ indices: topBottomIndices,
+ primitiveType: PrimitiveType_default.TRIANGLES
+ });
+ const wallAttributes = computeWallAttributes(outerPositions, options);
+ indices = computeWallIndices(outerPositions);
+ const wallIndices = IndexDatatype_default.createTypedArray(
+ outerPositions.length * 2 / 3,
+ indices
+ );
+ const wallGeo = new Geometry_default({
+ attributes: wallAttributes,
+ indices: wallIndices,
+ primitiveType: PrimitiveType_default.TRIANGLES
+ });
+ const geo = GeometryPipeline_default.combineInstances([
+ new GeometryInstance_default({
+ geometry: topBottomGeo
+ }),
+ new GeometryInstance_default({
+ geometry: wallGeo
+ })
+ ]);
+ return {
+ boundingSphere,
+ attributes: geo[0].attributes,
+ indices: geo[0].indices
+ };
+}
+function computeRectangle(center, semiMajorAxis, semiMinorAxis, rotation, granularity, ellipsoid, result) {
+ const cep = EllipseGeometryLibrary_default.computeEllipsePositions(
+ {
+ center,
+ semiMajorAxis,
+ semiMinorAxis,
+ rotation,
+ granularity
+ },
+ false,
+ true
+ );
+ const positionsFlat = cep.outerPositions;
+ const positionsCount = positionsFlat.length / 3;
+ const positions = new Array(positionsCount);
+ for (let i = 0; i < positionsCount; ++i) {
+ positions[i] = Cartesian3_default.fromArray(positionsFlat, i * 3);
+ }
+ const rectangle = Rectangle_default.fromCartesianArray(positions, ellipsoid, result);
+ if (rectangle.width > Math_default.PI) {
+ rectangle.north = rectangle.north > 0 ? Math_default.PI_OVER_TWO - Math_default.EPSILON7 : rectangle.north;
+ rectangle.south = rectangle.south < 0 ? Math_default.EPSILON7 - Math_default.PI_OVER_TWO : rectangle.south;
+ rectangle.east = Math_default.PI;
+ rectangle.west = -Math_default.PI;
+ }
+ return rectangle;
+}
+function EllipseGeometry(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const center = options.center;
+ const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default);
+ const semiMajorAxis = options.semiMajorAxis;
+ const semiMinorAxis = options.semiMinorAxis;
+ const granularity = defaultValue_default(
+ options.granularity,
+ Math_default.RADIANS_PER_DEGREE
+ );
+ const vertexFormat = defaultValue_default(options.vertexFormat, VertexFormat_default.DEFAULT);
+ Check_default.defined("options.center", center);
+ Check_default.typeOf.number("options.semiMajorAxis", semiMajorAxis);
+ Check_default.typeOf.number("options.semiMinorAxis", semiMinorAxis);
+ if (semiMajorAxis < semiMinorAxis) {
+ throw new DeveloperError_default(
+ "semiMajorAxis must be greater than or equal to the semiMinorAxis."
+ );
+ }
+ if (granularity <= 0) {
+ throw new DeveloperError_default("granularity must be greater than zero.");
+ }
+ const height = defaultValue_default(options.height, 0);
+ const extrudedHeight = defaultValue_default(options.extrudedHeight, height);
+ this._center = Cartesian3_default.clone(center);
+ this._semiMajorAxis = semiMajorAxis;
+ this._semiMinorAxis = semiMinorAxis;
+ this._ellipsoid = Ellipsoid_default.clone(ellipsoid);
+ this._rotation = defaultValue_default(options.rotation, 0);
+ this._stRotation = defaultValue_default(options.stRotation, 0);
+ this._height = Math.max(extrudedHeight, height);
+ this._granularity = granularity;
+ this._vertexFormat = VertexFormat_default.clone(vertexFormat);
+ this._extrudedHeight = Math.min(extrudedHeight, height);
+ this._shadowVolume = defaultValue_default(options.shadowVolume, false);
+ this._workerName = "createEllipseGeometry";
+ this._offsetAttribute = options.offsetAttribute;
+ this._rectangle = void 0;
+ this._textureCoordinateRotationPoints = void 0;
+}
+EllipseGeometry.packedLength = Cartesian3_default.packedLength + Ellipsoid_default.packedLength + VertexFormat_default.packedLength + 9;
+EllipseGeometry.pack = function(value, array, startingIndex) {
+ Check_default.defined("value", value);
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ Cartesian3_default.pack(value._center, array, startingIndex);
+ startingIndex += Cartesian3_default.packedLength;
+ Ellipsoid_default.pack(value._ellipsoid, array, startingIndex);
+ startingIndex += Ellipsoid_default.packedLength;
+ VertexFormat_default.pack(value._vertexFormat, array, startingIndex);
+ startingIndex += VertexFormat_default.packedLength;
+ array[startingIndex++] = value._semiMajorAxis;
+ array[startingIndex++] = value._semiMinorAxis;
+ array[startingIndex++] = value._rotation;
+ array[startingIndex++] = value._stRotation;
+ array[startingIndex++] = value._height;
+ array[startingIndex++] = value._granularity;
+ array[startingIndex++] = value._extrudedHeight;
+ array[startingIndex++] = value._shadowVolume ? 1 : 0;
+ array[startingIndex] = defaultValue_default(value._offsetAttribute, -1);
+ return array;
+};
+var scratchCenter = new Cartesian3_default();
+var scratchEllipsoid = new Ellipsoid_default();
+var scratchVertexFormat = new VertexFormat_default();
+var scratchOptions = {
+ center: scratchCenter,
+ ellipsoid: scratchEllipsoid,
+ vertexFormat: scratchVertexFormat,
+ semiMajorAxis: void 0,
+ semiMinorAxis: void 0,
+ rotation: void 0,
+ stRotation: void 0,
+ height: void 0,
+ granularity: void 0,
+ extrudedHeight: void 0,
+ shadowVolume: void 0,
+ offsetAttribute: void 0
+};
+EllipseGeometry.unpack = function(array, startingIndex, result) {
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ const center = Cartesian3_default.unpack(array, startingIndex, scratchCenter);
+ startingIndex += Cartesian3_default.packedLength;
+ const ellipsoid = Ellipsoid_default.unpack(array, startingIndex, scratchEllipsoid);
+ startingIndex += Ellipsoid_default.packedLength;
+ const vertexFormat = VertexFormat_default.unpack(
+ array,
+ startingIndex,
+ scratchVertexFormat
+ );
+ startingIndex += VertexFormat_default.packedLength;
+ const semiMajorAxis = array[startingIndex++];
+ const semiMinorAxis = array[startingIndex++];
+ const rotation = array[startingIndex++];
+ const stRotation = array[startingIndex++];
+ const height = array[startingIndex++];
+ const granularity = array[startingIndex++];
+ const extrudedHeight = array[startingIndex++];
+ const shadowVolume = array[startingIndex++] === 1;
+ const offsetAttribute = array[startingIndex];
+ if (!defined_default(result)) {
+ scratchOptions.height = height;
+ scratchOptions.extrudedHeight = extrudedHeight;
+ scratchOptions.granularity = granularity;
+ scratchOptions.stRotation = stRotation;
+ scratchOptions.rotation = rotation;
+ scratchOptions.semiMajorAxis = semiMajorAxis;
+ scratchOptions.semiMinorAxis = semiMinorAxis;
+ scratchOptions.shadowVolume = shadowVolume;
+ scratchOptions.offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
+ return new EllipseGeometry(scratchOptions);
+ }
+ result._center = Cartesian3_default.clone(center, result._center);
+ result._ellipsoid = Ellipsoid_default.clone(ellipsoid, result._ellipsoid);
+ result._vertexFormat = VertexFormat_default.clone(vertexFormat, result._vertexFormat);
+ result._semiMajorAxis = semiMajorAxis;
+ result._semiMinorAxis = semiMinorAxis;
+ result._rotation = rotation;
+ result._stRotation = stRotation;
+ result._height = height;
+ result._granularity = granularity;
+ result._extrudedHeight = extrudedHeight;
+ result._shadowVolume = shadowVolume;
+ result._offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
+ return result;
+};
+EllipseGeometry.computeRectangle = function(options, result) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const center = options.center;
+ const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default);
+ const semiMajorAxis = options.semiMajorAxis;
+ const semiMinorAxis = options.semiMinorAxis;
+ const granularity = defaultValue_default(
+ options.granularity,
+ Math_default.RADIANS_PER_DEGREE
+ );
+ const rotation = defaultValue_default(options.rotation, 0);
+ Check_default.defined("options.center", center);
+ Check_default.typeOf.number("options.semiMajorAxis", semiMajorAxis);
+ Check_default.typeOf.number("options.semiMinorAxis", semiMinorAxis);
+ if (semiMajorAxis < semiMinorAxis) {
+ throw new DeveloperError_default(
+ "semiMajorAxis must be greater than or equal to the semiMinorAxis."
+ );
+ }
+ if (granularity <= 0) {
+ throw new DeveloperError_default("granularity must be greater than zero.");
+ }
+ return computeRectangle(
+ center,
+ semiMajorAxis,
+ semiMinorAxis,
+ rotation,
+ granularity,
+ ellipsoid,
+ result
+ );
+};
+EllipseGeometry.createGeometry = function(ellipseGeometry) {
+ if (ellipseGeometry._semiMajorAxis <= 0 || ellipseGeometry._semiMinorAxis <= 0) {
+ return;
+ }
+ const height = ellipseGeometry._height;
+ const extrudedHeight = ellipseGeometry._extrudedHeight;
+ const extrude = !Math_default.equalsEpsilon(
+ height,
+ extrudedHeight,
+ 0,
+ Math_default.EPSILON2
+ );
+ ellipseGeometry._center = ellipseGeometry._ellipsoid.scaleToGeodeticSurface(
+ ellipseGeometry._center,
+ ellipseGeometry._center
+ );
+ const options = {
+ center: ellipseGeometry._center,
+ semiMajorAxis: ellipseGeometry._semiMajorAxis,
+ semiMinorAxis: ellipseGeometry._semiMinorAxis,
+ ellipsoid: ellipseGeometry._ellipsoid,
+ rotation: ellipseGeometry._rotation,
+ height,
+ granularity: ellipseGeometry._granularity,
+ vertexFormat: ellipseGeometry._vertexFormat,
+ stRotation: ellipseGeometry._stRotation
+ };
+ let geometry;
+ if (extrude) {
+ options.extrudedHeight = extrudedHeight;
+ options.shadowVolume = ellipseGeometry._shadowVolume;
+ options.offsetAttribute = ellipseGeometry._offsetAttribute;
+ geometry = computeExtrudedEllipse(options);
+ } else {
+ geometry = computeEllipse(options);
+ if (defined_default(ellipseGeometry._offsetAttribute)) {
+ const length = geometry.attributes.position.values.length;
+ const offsetValue = ellipseGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
+ const applyOffset = new Uint8Array(length / 3).fill(offsetValue);
+ geometry.attributes.applyOffset = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: applyOffset
+ });
+ }
+ }
+ return new Geometry_default({
+ attributes: geometry.attributes,
+ indices: geometry.indices,
+ primitiveType: PrimitiveType_default.TRIANGLES,
+ boundingSphere: geometry.boundingSphere,
+ offsetAttribute: ellipseGeometry._offsetAttribute
+ });
+};
+EllipseGeometry.createShadowVolume = function(ellipseGeometry, minHeightFunc, maxHeightFunc) {
+ const granularity = ellipseGeometry._granularity;
+ const ellipsoid = ellipseGeometry._ellipsoid;
+ const minHeight = minHeightFunc(granularity, ellipsoid);
+ const maxHeight = maxHeightFunc(granularity, ellipsoid);
+ return new EllipseGeometry({
+ center: ellipseGeometry._center,
+ semiMajorAxis: ellipseGeometry._semiMajorAxis,
+ semiMinorAxis: ellipseGeometry._semiMinorAxis,
+ ellipsoid,
+ rotation: ellipseGeometry._rotation,
+ stRotation: ellipseGeometry._stRotation,
+ granularity,
+ extrudedHeight: minHeight,
+ height: maxHeight,
+ vertexFormat: VertexFormat_default.POSITION_ONLY,
+ shadowVolume: true
+ });
+};
+function textureCoordinateRotationPoints(ellipseGeometry) {
+ const stRotation = -ellipseGeometry._stRotation;
+ if (stRotation === 0) {
+ return [0, 0, 0, 1, 1, 0];
+ }
+ const cep = EllipseGeometryLibrary_default.computeEllipsePositions(
+ {
+ center: ellipseGeometry._center,
+ semiMajorAxis: ellipseGeometry._semiMajorAxis,
+ semiMinorAxis: ellipseGeometry._semiMinorAxis,
+ rotation: ellipseGeometry._rotation,
+ granularity: ellipseGeometry._granularity
+ },
+ false,
+ true
+ );
+ const positionsFlat = cep.outerPositions;
+ const positionsCount = positionsFlat.length / 3;
+ const positions = new Array(positionsCount);
+ for (let i = 0; i < positionsCount; ++i) {
+ positions[i] = Cartesian3_default.fromArray(positionsFlat, i * 3);
+ }
+ const ellipsoid = ellipseGeometry._ellipsoid;
+ const boundingRectangle = ellipseGeometry.rectangle;
+ return Geometry_default._textureCoordinateRotationPoints(
+ positions,
+ stRotation,
+ ellipsoid,
+ boundingRectangle
+ );
+}
+Object.defineProperties(EllipseGeometry.prototype, {
+ /**
+ * @private
+ */
+ rectangle: {
+ get: function() {
+ if (!defined_default(this._rectangle)) {
+ this._rectangle = computeRectangle(
+ this._center,
+ this._semiMajorAxis,
+ this._semiMinorAxis,
+ this._rotation,
+ this._granularity,
+ this._ellipsoid
+ );
+ }
+ return this._rectangle;
+ }
+ },
+ /**
+ * For remapping texture coordinates when rendering EllipseGeometries as GroundPrimitives.
+ * @private
+ */
+ textureCoordinateRotationPoints: {
+ get: function() {
+ if (!defined_default(this._textureCoordinateRotationPoints)) {
+ this._textureCoordinateRotationPoints = textureCoordinateRotationPoints(
+ this
+ );
+ }
+ return this._textureCoordinateRotationPoints;
+ }
+ }
+});
+var EllipseGeometry_default = EllipseGeometry;
+
+export {
+ EllipseGeometry_default
+};
diff --git a/public/assets/cesium/Workers/combineGeometry.js b/public/assets/cesium/Workers/combineGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..141fc3a9de0ea67e649d085a605bc8faddadefae
--- /dev/null
+++ b/public/assets/cesium/Workers/combineGeometry.js
@@ -0,0 +1,66 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ PrimitivePipeline_default
+} from "./chunk-IBRIWOCM.js";
+import {
+ createTaskProcessorWorker_default
+} from "./chunk-Z2QP3CXW.js";
+import "./chunk-RJM36CNY.js";
+import "./chunk-7ZZ5LMZY.js";
+import "./chunk-LJ2JQHJT.js";
+import "./chunk-NGZJIN5Z.js";
+import "./chunk-QQOZO7KO.js";
+import "./chunk-EDLRS3AW.js";
+import "./chunk-C4WPMOKT.js";
+import "./chunk-X7IQYYHF.js";
+import "./chunk-JXVLNVXC.js";
+import "./chunk-KHZNBFOH.js";
+import "./chunk-6SQMLVGV.js";
+import "./chunk-XIUSRWL6.js";
+import "./chunk-FFLMY4TE.js";
+import "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import "./chunk-U5HSOKPQ.js";
+import "./chunk-P6TRGU3S.js";
+import "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Workers/combineGeometry.js
+function combineGeometry(packedParameters, transferableObjects) {
+ const parameters = PrimitivePipeline_default.unpackCombineGeometryParameters(
+ packedParameters
+ );
+ const results = PrimitivePipeline_default.combineGeometry(parameters);
+ return PrimitivePipeline_default.packCombineGeometryResults(
+ results,
+ transferableObjects
+ );
+}
+var combineGeometry_default = createTaskProcessorWorker_default(combineGeometry);
+export {
+ combineGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createBoxGeometry.js b/public/assets/cesium/Workers/createBoxGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..9a8f8a103428058b798bbaf5f4e64b84e9316a91
--- /dev/null
+++ b/public/assets/cesium/Workers/createBoxGeometry.js
@@ -0,0 +1,56 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ BoxGeometry_default
+} from "./chunk-HJMNR3GC.js";
+import "./chunk-GBT7MJ6X.js";
+import "./chunk-JBSKHTNX.js";
+import "./chunk-X7IQYYHF.js";
+import "./chunk-JXVLNVXC.js";
+import "./chunk-KHZNBFOH.js";
+import "./chunk-6SQMLVGV.js";
+import "./chunk-XIUSRWL6.js";
+import "./chunk-FFLMY4TE.js";
+import "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import "./chunk-U5HSOKPQ.js";
+import "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Workers/createBoxGeometry.js
+function createBoxGeometry(boxGeometry, offset) {
+ if (defined_default(offset)) {
+ boxGeometry = BoxGeometry_default.unpack(boxGeometry, offset);
+ }
+ return BoxGeometry_default.createGeometry(boxGeometry);
+}
+var createBoxGeometry_default = createBoxGeometry;
+export {
+ createBoxGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createBoxOutlineGeometry.js b/public/assets/cesium/Workers/createBoxOutlineGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..cf5e2db25a98fda25a623228ee20dacd44d63bc1
--- /dev/null
+++ b/public/assets/cesium/Workers/createBoxOutlineGeometry.js
@@ -0,0 +1,233 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ GeometryOffsetAttribute_default
+} from "./chunk-GBT7MJ6X.js";
+import {
+ GeometryAttributes_default
+} from "./chunk-X7IQYYHF.js";
+import {
+ GeometryAttribute_default,
+ Geometry_default,
+ PrimitiveType_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ BoundingSphere_default
+} from "./chunk-KHZNBFOH.js";
+import "./chunk-6SQMLVGV.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian3_default
+} from "./chunk-FFLMY4TE.js";
+import "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default,
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/BoxOutlineGeometry.js
+var diffScratch = new Cartesian3_default();
+function BoxOutlineGeometry(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const min = options.minimum;
+ const max = options.maximum;
+ Check_default.typeOf.object("min", min);
+ Check_default.typeOf.object("max", max);
+ if (defined_default(options.offsetAttribute) && options.offsetAttribute === GeometryOffsetAttribute_default.TOP) {
+ throw new DeveloperError_default(
+ "GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry."
+ );
+ }
+ this._min = Cartesian3_default.clone(min);
+ this._max = Cartesian3_default.clone(max);
+ this._offsetAttribute = options.offsetAttribute;
+ this._workerName = "createBoxOutlineGeometry";
+}
+BoxOutlineGeometry.fromDimensions = function(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const dimensions = options.dimensions;
+ Check_default.typeOf.object("dimensions", dimensions);
+ Check_default.typeOf.number.greaterThanOrEquals("dimensions.x", dimensions.x, 0);
+ Check_default.typeOf.number.greaterThanOrEquals("dimensions.y", dimensions.y, 0);
+ Check_default.typeOf.number.greaterThanOrEquals("dimensions.z", dimensions.z, 0);
+ const corner = Cartesian3_default.multiplyByScalar(dimensions, 0.5, new Cartesian3_default());
+ return new BoxOutlineGeometry({
+ minimum: Cartesian3_default.negate(corner, new Cartesian3_default()),
+ maximum: corner,
+ offsetAttribute: options.offsetAttribute
+ });
+};
+BoxOutlineGeometry.fromAxisAlignedBoundingBox = function(boundingBox) {
+ Check_default.typeOf.object("boundindBox", boundingBox);
+ return new BoxOutlineGeometry({
+ minimum: boundingBox.minimum,
+ maximum: boundingBox.maximum
+ });
+};
+BoxOutlineGeometry.packedLength = 2 * Cartesian3_default.packedLength + 1;
+BoxOutlineGeometry.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ Cartesian3_default.pack(value._min, array, startingIndex);
+ Cartesian3_default.pack(value._max, array, startingIndex + Cartesian3_default.packedLength);
+ array[startingIndex + Cartesian3_default.packedLength * 2] = defaultValue_default(
+ value._offsetAttribute,
+ -1
+ );
+ return array;
+};
+var scratchMin = new Cartesian3_default();
+var scratchMax = new Cartesian3_default();
+var scratchOptions = {
+ minimum: scratchMin,
+ maximum: scratchMax,
+ offsetAttribute: void 0
+};
+BoxOutlineGeometry.unpack = function(array, startingIndex, result) {
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ const min = Cartesian3_default.unpack(array, startingIndex, scratchMin);
+ const max = Cartesian3_default.unpack(
+ array,
+ startingIndex + Cartesian3_default.packedLength,
+ scratchMax
+ );
+ const offsetAttribute = array[startingIndex + Cartesian3_default.packedLength * 2];
+ if (!defined_default(result)) {
+ scratchOptions.offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
+ return new BoxOutlineGeometry(scratchOptions);
+ }
+ result._min = Cartesian3_default.clone(min, result._min);
+ result._max = Cartesian3_default.clone(max, result._max);
+ result._offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
+ return result;
+};
+BoxOutlineGeometry.createGeometry = function(boxGeometry) {
+ const min = boxGeometry._min;
+ const max = boxGeometry._max;
+ if (Cartesian3_default.equals(min, max)) {
+ return;
+ }
+ const attributes = new GeometryAttributes_default();
+ const indices = new Uint16Array(12 * 2);
+ const positions = new Float64Array(8 * 3);
+ positions[0] = min.x;
+ positions[1] = min.y;
+ positions[2] = min.z;
+ positions[3] = max.x;
+ positions[4] = min.y;
+ positions[5] = min.z;
+ positions[6] = max.x;
+ positions[7] = max.y;
+ positions[8] = min.z;
+ positions[9] = min.x;
+ positions[10] = max.y;
+ positions[11] = min.z;
+ positions[12] = min.x;
+ positions[13] = min.y;
+ positions[14] = max.z;
+ positions[15] = max.x;
+ positions[16] = min.y;
+ positions[17] = max.z;
+ positions[18] = max.x;
+ positions[19] = max.y;
+ positions[20] = max.z;
+ positions[21] = min.x;
+ positions[22] = max.y;
+ positions[23] = max.z;
+ attributes.position = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: positions
+ });
+ indices[0] = 4;
+ indices[1] = 5;
+ indices[2] = 5;
+ indices[3] = 6;
+ indices[4] = 6;
+ indices[5] = 7;
+ indices[6] = 7;
+ indices[7] = 4;
+ indices[8] = 0;
+ indices[9] = 1;
+ indices[10] = 1;
+ indices[11] = 2;
+ indices[12] = 2;
+ indices[13] = 3;
+ indices[14] = 3;
+ indices[15] = 0;
+ indices[16] = 0;
+ indices[17] = 4;
+ indices[18] = 1;
+ indices[19] = 5;
+ indices[20] = 2;
+ indices[21] = 6;
+ indices[22] = 3;
+ indices[23] = 7;
+ const diff = Cartesian3_default.subtract(max, min, diffScratch);
+ const radius = Cartesian3_default.magnitude(diff) * 0.5;
+ if (defined_default(boxGeometry._offsetAttribute)) {
+ const length = positions.length;
+ const offsetValue = boxGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
+ const applyOffset = new Uint8Array(length / 3).fill(offsetValue);
+ attributes.applyOffset = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: applyOffset
+ });
+ }
+ return new Geometry_default({
+ attributes,
+ indices,
+ primitiveType: PrimitiveType_default.LINES,
+ boundingSphere: new BoundingSphere_default(Cartesian3_default.ZERO, radius),
+ offsetAttribute: boxGeometry._offsetAttribute
+ });
+};
+var BoxOutlineGeometry_default = BoxOutlineGeometry;
+
+// packages/engine/Source/Workers/createBoxOutlineGeometry.js
+function createBoxOutlineGeometry(boxGeometry, offset) {
+ if (defined_default(offset)) {
+ boxGeometry = BoxOutlineGeometry_default.unpack(boxGeometry, offset);
+ }
+ return BoxOutlineGeometry_default.createGeometry(boxGeometry);
+}
+var createBoxOutlineGeometry_default = createBoxOutlineGeometry;
+export {
+ createBoxOutlineGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createCircleGeometry.js b/public/assets/cesium/Workers/createCircleGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..eb7ae5b82d607ca6f59321e4dd3f0fd6f735c2fd
--- /dev/null
+++ b/public/assets/cesium/Workers/createCircleGeometry.js
@@ -0,0 +1,199 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ EllipseGeometry_default
+} from "./chunk-ZVUUPJEM.js";
+import "./chunk-JISPSEF3.js";
+import "./chunk-YSIJTJ7N.js";
+import "./chunk-7ZZ5LMZY.js";
+import "./chunk-LJ2JQHJT.js";
+import "./chunk-NGZJIN5Z.js";
+import "./chunk-GBT7MJ6X.js";
+import {
+ VertexFormat_default
+} from "./chunk-JBSKHTNX.js";
+import "./chunk-QQOZO7KO.js";
+import "./chunk-EDLRS3AW.js";
+import "./chunk-C4WPMOKT.js";
+import "./chunk-X7IQYYHF.js";
+import "./chunk-JXVLNVXC.js";
+import "./chunk-KHZNBFOH.js";
+import "./chunk-6SQMLVGV.js";
+import "./chunk-XIUSRWL6.js";
+import {
+ Cartesian3_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/CircleGeometry.js
+function CircleGeometry(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const radius = options.radius;
+ Check_default.typeOf.number("radius", radius);
+ const ellipseGeometryOptions = {
+ center: options.center,
+ semiMajorAxis: radius,
+ semiMinorAxis: radius,
+ ellipsoid: options.ellipsoid,
+ height: options.height,
+ extrudedHeight: options.extrudedHeight,
+ granularity: options.granularity,
+ vertexFormat: options.vertexFormat,
+ stRotation: options.stRotation,
+ shadowVolume: options.shadowVolume
+ };
+ this._ellipseGeometry = new EllipseGeometry_default(ellipseGeometryOptions);
+ this._workerName = "createCircleGeometry";
+}
+CircleGeometry.packedLength = EllipseGeometry_default.packedLength;
+CircleGeometry.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ return EllipseGeometry_default.pack(value._ellipseGeometry, array, startingIndex);
+};
+var scratchEllipseGeometry = new EllipseGeometry_default({
+ center: new Cartesian3_default(),
+ semiMajorAxis: 1,
+ semiMinorAxis: 1
+});
+var scratchOptions = {
+ center: new Cartesian3_default(),
+ radius: void 0,
+ ellipsoid: Ellipsoid_default.clone(Ellipsoid_default.default),
+ height: void 0,
+ extrudedHeight: void 0,
+ granularity: void 0,
+ vertexFormat: new VertexFormat_default(),
+ stRotation: void 0,
+ semiMajorAxis: void 0,
+ semiMinorAxis: void 0,
+ shadowVolume: void 0
+};
+CircleGeometry.unpack = function(array, startingIndex, result) {
+ const ellipseGeometry = EllipseGeometry_default.unpack(
+ array,
+ startingIndex,
+ scratchEllipseGeometry
+ );
+ scratchOptions.center = Cartesian3_default.clone(
+ ellipseGeometry._center,
+ scratchOptions.center
+ );
+ scratchOptions.ellipsoid = Ellipsoid_default.clone(
+ ellipseGeometry._ellipsoid,
+ scratchOptions.ellipsoid
+ );
+ scratchOptions.ellipsoid = Ellipsoid_default.clone(
+ ellipseGeometry._ellipsoid,
+ scratchEllipseGeometry._ellipsoid
+ );
+ scratchOptions.height = ellipseGeometry._height;
+ scratchOptions.extrudedHeight = ellipseGeometry._extrudedHeight;
+ scratchOptions.granularity = ellipseGeometry._granularity;
+ scratchOptions.vertexFormat = VertexFormat_default.clone(
+ ellipseGeometry._vertexFormat,
+ scratchOptions.vertexFormat
+ );
+ scratchOptions.stRotation = ellipseGeometry._stRotation;
+ scratchOptions.shadowVolume = ellipseGeometry._shadowVolume;
+ if (!defined_default(result)) {
+ scratchOptions.radius = ellipseGeometry._semiMajorAxis;
+ return new CircleGeometry(scratchOptions);
+ }
+ scratchOptions.semiMajorAxis = ellipseGeometry._semiMajorAxis;
+ scratchOptions.semiMinorAxis = ellipseGeometry._semiMinorAxis;
+ result._ellipseGeometry = new EllipseGeometry_default(scratchOptions);
+ return result;
+};
+CircleGeometry.createGeometry = function(circleGeometry) {
+ return EllipseGeometry_default.createGeometry(circleGeometry._ellipseGeometry);
+};
+CircleGeometry.createShadowVolume = function(circleGeometry, minHeightFunc, maxHeightFunc) {
+ const granularity = circleGeometry._ellipseGeometry._granularity;
+ const ellipsoid = circleGeometry._ellipseGeometry._ellipsoid;
+ const minHeight = minHeightFunc(granularity, ellipsoid);
+ const maxHeight = maxHeightFunc(granularity, ellipsoid);
+ return new CircleGeometry({
+ center: circleGeometry._ellipseGeometry._center,
+ radius: circleGeometry._ellipseGeometry._semiMajorAxis,
+ ellipsoid,
+ stRotation: circleGeometry._ellipseGeometry._stRotation,
+ granularity,
+ extrudedHeight: minHeight,
+ height: maxHeight,
+ vertexFormat: VertexFormat_default.POSITION_ONLY,
+ shadowVolume: true
+ });
+};
+Object.defineProperties(CircleGeometry.prototype, {
+ /**
+ * @private
+ */
+ rectangle: {
+ get: function() {
+ return this._ellipseGeometry.rectangle;
+ }
+ },
+ /**
+ * For remapping texture coordinates when rendering CircleGeometries as GroundPrimitives.
+ * @private
+ */
+ textureCoordinateRotationPoints: {
+ get: function() {
+ return this._ellipseGeometry.textureCoordinateRotationPoints;
+ }
+ }
+});
+var CircleGeometry_default = CircleGeometry;
+
+// packages/engine/Source/Workers/createCircleGeometry.js
+function createCircleGeometry(circleGeometry, offset) {
+ if (defined_default(offset)) {
+ circleGeometry = CircleGeometry_default.unpack(circleGeometry, offset);
+ }
+ circleGeometry._ellipseGeometry._center = Cartesian3_default.clone(
+ circleGeometry._ellipseGeometry._center
+ );
+ circleGeometry._ellipseGeometry._ellipsoid = Ellipsoid_default.clone(
+ circleGeometry._ellipseGeometry._ellipsoid
+ );
+ return CircleGeometry_default.createGeometry(circleGeometry);
+}
+var createCircleGeometry_default = createCircleGeometry;
+export {
+ createCircleGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createCircleOutlineGeometry.js b/public/assets/cesium/Workers/createCircleOutlineGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..7eeafd53802dddfadd38637e9036b99b497aa8d6
--- /dev/null
+++ b/public/assets/cesium/Workers/createCircleOutlineGeometry.js
@@ -0,0 +1,145 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ EllipseOutlineGeometry_default
+} from "./chunk-2LOWCAMW.js";
+import "./chunk-JISPSEF3.js";
+import "./chunk-GBT7MJ6X.js";
+import "./chunk-C4WPMOKT.js";
+import "./chunk-X7IQYYHF.js";
+import "./chunk-JXVLNVXC.js";
+import "./chunk-KHZNBFOH.js";
+import "./chunk-6SQMLVGV.js";
+import "./chunk-XIUSRWL6.js";
+import {
+ Cartesian3_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/CircleOutlineGeometry.js
+function CircleOutlineGeometry(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const radius = options.radius;
+ Check_default.typeOf.number("radius", radius);
+ const ellipseGeometryOptions = {
+ center: options.center,
+ semiMajorAxis: radius,
+ semiMinorAxis: radius,
+ ellipsoid: options.ellipsoid,
+ height: options.height,
+ extrudedHeight: options.extrudedHeight,
+ granularity: options.granularity,
+ numberOfVerticalLines: options.numberOfVerticalLines
+ };
+ this._ellipseGeometry = new EllipseOutlineGeometry_default(ellipseGeometryOptions);
+ this._workerName = "createCircleOutlineGeometry";
+}
+CircleOutlineGeometry.packedLength = EllipseOutlineGeometry_default.packedLength;
+CircleOutlineGeometry.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ return EllipseOutlineGeometry_default.pack(
+ value._ellipseGeometry,
+ array,
+ startingIndex
+ );
+};
+var scratchEllipseGeometry = new EllipseOutlineGeometry_default({
+ center: new Cartesian3_default(),
+ semiMajorAxis: 1,
+ semiMinorAxis: 1
+});
+var scratchOptions = {
+ center: new Cartesian3_default(),
+ radius: void 0,
+ ellipsoid: Ellipsoid_default.clone(Ellipsoid_default.UNIT_SPHERE),
+ height: void 0,
+ extrudedHeight: void 0,
+ granularity: void 0,
+ numberOfVerticalLines: void 0,
+ semiMajorAxis: void 0,
+ semiMinorAxis: void 0
+};
+CircleOutlineGeometry.unpack = function(array, startingIndex, result) {
+ const ellipseGeometry = EllipseOutlineGeometry_default.unpack(
+ array,
+ startingIndex,
+ scratchEllipseGeometry
+ );
+ scratchOptions.center = Cartesian3_default.clone(
+ ellipseGeometry._center,
+ scratchOptions.center
+ );
+ scratchOptions.ellipsoid = Ellipsoid_default.clone(
+ ellipseGeometry._ellipsoid,
+ scratchOptions.ellipsoid
+ );
+ scratchOptions.height = ellipseGeometry._height;
+ scratchOptions.extrudedHeight = ellipseGeometry._extrudedHeight;
+ scratchOptions.granularity = ellipseGeometry._granularity;
+ scratchOptions.numberOfVerticalLines = ellipseGeometry._numberOfVerticalLines;
+ if (!defined_default(result)) {
+ scratchOptions.radius = ellipseGeometry._semiMajorAxis;
+ return new CircleOutlineGeometry(scratchOptions);
+ }
+ scratchOptions.semiMajorAxis = ellipseGeometry._semiMajorAxis;
+ scratchOptions.semiMinorAxis = ellipseGeometry._semiMinorAxis;
+ result._ellipseGeometry = new EllipseOutlineGeometry_default(scratchOptions);
+ return result;
+};
+CircleOutlineGeometry.createGeometry = function(circleGeometry) {
+ return EllipseOutlineGeometry_default.createGeometry(circleGeometry._ellipseGeometry);
+};
+var CircleOutlineGeometry_default = CircleOutlineGeometry;
+
+// packages/engine/Source/Workers/createCircleOutlineGeometry.js
+function createCircleOutlineGeometry(circleGeometry, offset) {
+ if (defined_default(offset)) {
+ circleGeometry = CircleOutlineGeometry_default.unpack(circleGeometry, offset);
+ }
+ circleGeometry._ellipseGeometry._center = Cartesian3_default.clone(
+ circleGeometry._ellipseGeometry._center
+ );
+ circleGeometry._ellipseGeometry._ellipsoid = Ellipsoid_default.clone(
+ circleGeometry._ellipseGeometry._ellipsoid
+ );
+ return CircleOutlineGeometry_default.createGeometry(circleGeometry);
+}
+var createCircleOutlineGeometry_default = createCircleOutlineGeometry;
+export {
+ createCircleOutlineGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createCoplanarPolygonGeometry.js b/public/assets/cesium/Workers/createCoplanarPolygonGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..eb3d492ea8470e0915ce47c34d5017e9c40a09b6
--- /dev/null
+++ b/public/assets/cesium/Workers/createCoplanarPolygonGeometry.js
@@ -0,0 +1,505 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ BoundingRectangle_default
+} from "./chunk-44QAAS4P.js";
+import {
+ CoplanarPolygonGeometryLibrary_default
+} from "./chunk-TK5IIG2F.js";
+import "./chunk-2PTKXHJB.js";
+import {
+ PolygonGeometryLibrary_default
+} from "./chunk-IZJ42N4W.js";
+import "./chunk-XWOUPGUF.js";
+import {
+ GeometryInstance_default
+} from "./chunk-YSIJTJ7N.js";
+import {
+ GeometryPipeline_default
+} from "./chunk-7ZZ5LMZY.js";
+import "./chunk-LJ2JQHJT.js";
+import "./chunk-NGZJIN5Z.js";
+import {
+ VertexFormat_default
+} from "./chunk-JBSKHTNX.js";
+import "./chunk-YK3QIKY7.js";
+import "./chunk-NDDI2LWR.js";
+import {
+ PolygonPipeline_default
+} from "./chunk-TI3TRKIC.js";
+import {
+ arrayRemoveDuplicates_default
+} from "./chunk-57H6I3SV.js";
+import "./chunk-JSQJDZI4.js";
+import "./chunk-QQOZO7KO.js";
+import "./chunk-EDLRS3AW.js";
+import {
+ IndexDatatype_default
+} from "./chunk-C4WPMOKT.js";
+import {
+ GeometryAttributes_default
+} from "./chunk-X7IQYYHF.js";
+import {
+ GeometryAttribute_default,
+ Geometry_default,
+ PrimitiveType_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ BoundingSphere_default
+} from "./chunk-KHZNBFOH.js";
+import {
+ Quaternion_default
+} from "./chunk-6SQMLVGV.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian2_default,
+ Cartesian3_default,
+ Ellipsoid_default,
+ Matrix3_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/CoplanarPolygonGeometry.js
+var scratchPosition = new Cartesian3_default();
+var scratchBR = new BoundingRectangle_default();
+var stScratch = new Cartesian2_default();
+var textureCoordinatesOrigin = new Cartesian2_default();
+var scratchNormal = new Cartesian3_default();
+var scratchTangent = new Cartesian3_default();
+var scratchBitangent = new Cartesian3_default();
+var centerScratch = new Cartesian3_default();
+var axis1Scratch = new Cartesian3_default();
+var axis2Scratch = new Cartesian3_default();
+var quaternionScratch = new Quaternion_default();
+var textureMatrixScratch = new Matrix3_default();
+var tangentRotationScratch = new Matrix3_default();
+var surfaceNormalScratch = new Cartesian3_default();
+function createGeometryFromPolygon(polygon, vertexFormat, boundingRectangle, stRotation, hardcodedTextureCoordinates, projectPointTo2D, normal, tangent, bitangent) {
+ const positions = polygon.positions;
+ let indices = PolygonPipeline_default.triangulate(polygon.positions2D, polygon.holes);
+ if (indices.length < 3) {
+ indices = [0, 1, 2];
+ }
+ const newIndices = IndexDatatype_default.createTypedArray(
+ positions.length,
+ indices.length
+ );
+ newIndices.set(indices);
+ let textureMatrix = textureMatrixScratch;
+ if (stRotation !== 0) {
+ let rotation = Quaternion_default.fromAxisAngle(
+ normal,
+ stRotation,
+ quaternionScratch
+ );
+ textureMatrix = Matrix3_default.fromQuaternion(rotation, textureMatrix);
+ if (vertexFormat.tangent || vertexFormat.bitangent) {
+ rotation = Quaternion_default.fromAxisAngle(
+ normal,
+ -stRotation,
+ quaternionScratch
+ );
+ const tangentRotation = Matrix3_default.fromQuaternion(
+ rotation,
+ tangentRotationScratch
+ );
+ tangent = Cartesian3_default.normalize(
+ Matrix3_default.multiplyByVector(tangentRotation, tangent, tangent),
+ tangent
+ );
+ if (vertexFormat.bitangent) {
+ bitangent = Cartesian3_default.normalize(
+ Cartesian3_default.cross(normal, tangent, bitangent),
+ bitangent
+ );
+ }
+ }
+ } else {
+ textureMatrix = Matrix3_default.clone(Matrix3_default.IDENTITY, textureMatrix);
+ }
+ const stOrigin = textureCoordinatesOrigin;
+ if (vertexFormat.st) {
+ stOrigin.x = boundingRectangle.x;
+ stOrigin.y = boundingRectangle.y;
+ }
+ const length = positions.length;
+ const size = length * 3;
+ const flatPositions = new Float64Array(size);
+ const normals = vertexFormat.normal ? new Float32Array(size) : void 0;
+ const tangents = vertexFormat.tangent ? new Float32Array(size) : void 0;
+ const bitangents = vertexFormat.bitangent ? new Float32Array(size) : void 0;
+ const textureCoordinates = vertexFormat.st ? new Float32Array(length * 2) : void 0;
+ let positionIndex = 0;
+ let normalIndex = 0;
+ let bitangentIndex = 0;
+ let tangentIndex = 0;
+ let stIndex = 0;
+ for (let i = 0; i < length; i++) {
+ const position = positions[i];
+ flatPositions[positionIndex++] = position.x;
+ flatPositions[positionIndex++] = position.y;
+ flatPositions[positionIndex++] = position.z;
+ if (vertexFormat.st) {
+ if (defined_default(hardcodedTextureCoordinates) && hardcodedTextureCoordinates.positions.length === length) {
+ textureCoordinates[stIndex++] = hardcodedTextureCoordinates.positions[i].x;
+ textureCoordinates[stIndex++] = hardcodedTextureCoordinates.positions[i].y;
+ } else {
+ const p = Matrix3_default.multiplyByVector(
+ textureMatrix,
+ position,
+ scratchPosition
+ );
+ const st = projectPointTo2D(p, stScratch);
+ Cartesian2_default.subtract(st, stOrigin, st);
+ const stx = Math_default.clamp(st.x / boundingRectangle.width, 0, 1);
+ const sty = Math_default.clamp(st.y / boundingRectangle.height, 0, 1);
+ textureCoordinates[stIndex++] = stx;
+ textureCoordinates[stIndex++] = sty;
+ }
+ }
+ if (vertexFormat.normal) {
+ normals[normalIndex++] = normal.x;
+ normals[normalIndex++] = normal.y;
+ normals[normalIndex++] = normal.z;
+ }
+ if (vertexFormat.tangent) {
+ tangents[tangentIndex++] = tangent.x;
+ tangents[tangentIndex++] = tangent.y;
+ tangents[tangentIndex++] = tangent.z;
+ }
+ if (vertexFormat.bitangent) {
+ bitangents[bitangentIndex++] = bitangent.x;
+ bitangents[bitangentIndex++] = bitangent.y;
+ bitangents[bitangentIndex++] = bitangent.z;
+ }
+ }
+ const attributes = new GeometryAttributes_default();
+ if (vertexFormat.position) {
+ attributes.position = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: flatPositions
+ });
+ }
+ if (vertexFormat.normal) {
+ attributes.normal = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: normals
+ });
+ }
+ if (vertexFormat.tangent) {
+ attributes.tangent = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: tangents
+ });
+ }
+ if (vertexFormat.bitangent) {
+ attributes.bitangent = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: bitangents
+ });
+ }
+ if (vertexFormat.st) {
+ attributes.st = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 2,
+ values: textureCoordinates
+ });
+ }
+ return new Geometry_default({
+ attributes,
+ indices: newIndices,
+ primitiveType: PrimitiveType_default.TRIANGLES
+ });
+}
+function CoplanarPolygonGeometry(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const polygonHierarchy = options.polygonHierarchy;
+ const textureCoordinates = options.textureCoordinates;
+ Check_default.defined("options.polygonHierarchy", polygonHierarchy);
+ const vertexFormat = defaultValue_default(options.vertexFormat, VertexFormat_default.DEFAULT);
+ this._vertexFormat = VertexFormat_default.clone(vertexFormat);
+ this._polygonHierarchy = polygonHierarchy;
+ this._stRotation = defaultValue_default(options.stRotation, 0);
+ this._ellipsoid = Ellipsoid_default.clone(
+ defaultValue_default(options.ellipsoid, Ellipsoid_default.default)
+ );
+ this._workerName = "createCoplanarPolygonGeometry";
+ this._textureCoordinates = textureCoordinates;
+ this.packedLength = PolygonGeometryLibrary_default.computeHierarchyPackedLength(
+ polygonHierarchy,
+ Cartesian3_default
+ ) + VertexFormat_default.packedLength + Ellipsoid_default.packedLength + (defined_default(textureCoordinates) ? PolygonGeometryLibrary_default.computeHierarchyPackedLength(
+ textureCoordinates,
+ Cartesian2_default
+ ) : 1) + 2;
+}
+CoplanarPolygonGeometry.fromPositions = function(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ Check_default.defined("options.positions", options.positions);
+ const newOptions = {
+ polygonHierarchy: {
+ positions: options.positions
+ },
+ vertexFormat: options.vertexFormat,
+ stRotation: options.stRotation,
+ ellipsoid: options.ellipsoid,
+ textureCoordinates: options.textureCoordinates
+ };
+ return new CoplanarPolygonGeometry(newOptions);
+};
+CoplanarPolygonGeometry.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ startingIndex = PolygonGeometryLibrary_default.packPolygonHierarchy(
+ value._polygonHierarchy,
+ array,
+ startingIndex,
+ Cartesian3_default
+ );
+ Ellipsoid_default.pack(value._ellipsoid, array, startingIndex);
+ startingIndex += Ellipsoid_default.packedLength;
+ VertexFormat_default.pack(value._vertexFormat, array, startingIndex);
+ startingIndex += VertexFormat_default.packedLength;
+ array[startingIndex++] = value._stRotation;
+ if (defined_default(value._textureCoordinates)) {
+ startingIndex = PolygonGeometryLibrary_default.packPolygonHierarchy(
+ value._textureCoordinates,
+ array,
+ startingIndex,
+ Cartesian2_default
+ );
+ } else {
+ array[startingIndex++] = -1;
+ }
+ array[startingIndex++] = value.packedLength;
+ return array;
+};
+var scratchEllipsoid = Ellipsoid_default.clone(Ellipsoid_default.UNIT_SPHERE);
+var scratchVertexFormat = new VertexFormat_default();
+var scratchOptions = {
+ polygonHierarchy: {}
+};
+CoplanarPolygonGeometry.unpack = function(array, startingIndex, result) {
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ const polygonHierarchy = PolygonGeometryLibrary_default.unpackPolygonHierarchy(
+ array,
+ startingIndex,
+ Cartesian3_default
+ );
+ startingIndex = polygonHierarchy.startingIndex;
+ delete polygonHierarchy.startingIndex;
+ const ellipsoid = Ellipsoid_default.unpack(array, startingIndex, scratchEllipsoid);
+ startingIndex += Ellipsoid_default.packedLength;
+ const vertexFormat = VertexFormat_default.unpack(
+ array,
+ startingIndex,
+ scratchVertexFormat
+ );
+ startingIndex += VertexFormat_default.packedLength;
+ const stRotation = array[startingIndex++];
+ const textureCoordinates = array[startingIndex] === -1 ? void 0 : PolygonGeometryLibrary_default.unpackPolygonHierarchy(
+ array,
+ startingIndex,
+ Cartesian2_default
+ );
+ if (defined_default(textureCoordinates)) {
+ startingIndex = textureCoordinates.startingIndex;
+ delete textureCoordinates.startingIndex;
+ } else {
+ startingIndex++;
+ }
+ const packedLength = array[startingIndex++];
+ if (!defined_default(result)) {
+ result = new CoplanarPolygonGeometry(scratchOptions);
+ }
+ result._polygonHierarchy = polygonHierarchy;
+ result._ellipsoid = Ellipsoid_default.clone(ellipsoid, result._ellipsoid);
+ result._vertexFormat = VertexFormat_default.clone(vertexFormat, result._vertexFormat);
+ result._stRotation = stRotation;
+ result._textureCoordinates = textureCoordinates;
+ result.packedLength = packedLength;
+ return result;
+};
+CoplanarPolygonGeometry.createGeometry = function(polygonGeometry) {
+ const vertexFormat = polygonGeometry._vertexFormat;
+ const polygonHierarchy = polygonGeometry._polygonHierarchy;
+ const stRotation = polygonGeometry._stRotation;
+ const textureCoordinates = polygonGeometry._textureCoordinates;
+ const hasTextureCoordinates = defined_default(textureCoordinates);
+ let outerPositions = polygonHierarchy.positions;
+ outerPositions = arrayRemoveDuplicates_default(
+ outerPositions,
+ Cartesian3_default.equalsEpsilon,
+ true
+ );
+ if (outerPositions.length < 3) {
+ return;
+ }
+ let normal = scratchNormal;
+ let tangent = scratchTangent;
+ let bitangent = scratchBitangent;
+ let axis1 = axis1Scratch;
+ const axis2 = axis2Scratch;
+ const validGeometry = CoplanarPolygonGeometryLibrary_default.computeProjectTo2DArguments(
+ outerPositions,
+ centerScratch,
+ axis1,
+ axis2
+ );
+ if (!validGeometry) {
+ return void 0;
+ }
+ normal = Cartesian3_default.cross(axis1, axis2, normal);
+ normal = Cartesian3_default.normalize(normal, normal);
+ if (!Cartesian3_default.equalsEpsilon(
+ centerScratch,
+ Cartesian3_default.ZERO,
+ Math_default.EPSILON6
+ )) {
+ const surfaceNormal = polygonGeometry._ellipsoid.geodeticSurfaceNormal(
+ centerScratch,
+ surfaceNormalScratch
+ );
+ if (Cartesian3_default.dot(normal, surfaceNormal) < 0) {
+ normal = Cartesian3_default.negate(normal, normal);
+ axis1 = Cartesian3_default.negate(axis1, axis1);
+ }
+ }
+ const projectPoints = CoplanarPolygonGeometryLibrary_default.createProjectPointsTo2DFunction(
+ centerScratch,
+ axis1,
+ axis2
+ );
+ const projectPoint = CoplanarPolygonGeometryLibrary_default.createProjectPointTo2DFunction(
+ centerScratch,
+ axis1,
+ axis2
+ );
+ if (vertexFormat.tangent) {
+ tangent = Cartesian3_default.clone(axis1, tangent);
+ }
+ if (vertexFormat.bitangent) {
+ bitangent = Cartesian3_default.clone(axis2, bitangent);
+ }
+ const results = PolygonGeometryLibrary_default.polygonsFromHierarchy(
+ polygonHierarchy,
+ hasTextureCoordinates,
+ projectPoints,
+ false
+ );
+ const hierarchy = results.hierarchy;
+ const polygons = results.polygons;
+ const dummyFunction = function(identity) {
+ return identity;
+ };
+ const textureCoordinatePolygons = hasTextureCoordinates ? PolygonGeometryLibrary_default.polygonsFromHierarchy(
+ textureCoordinates,
+ true,
+ dummyFunction,
+ false
+ ).polygons : void 0;
+ if (hierarchy.length === 0) {
+ return;
+ }
+ outerPositions = hierarchy[0].outerRing;
+ const boundingSphere = BoundingSphere_default.fromPoints(outerPositions);
+ const boundingRectangle = PolygonGeometryLibrary_default.computeBoundingRectangle(
+ normal,
+ projectPoint,
+ outerPositions,
+ stRotation,
+ scratchBR
+ );
+ const geometries = [];
+ for (let i = 0; i < polygons.length; i++) {
+ const geometryInstance = new GeometryInstance_default({
+ geometry: createGeometryFromPolygon(
+ polygons[i],
+ vertexFormat,
+ boundingRectangle,
+ stRotation,
+ hasTextureCoordinates ? textureCoordinatePolygons[i] : void 0,
+ projectPoint,
+ normal,
+ tangent,
+ bitangent
+ )
+ });
+ geometries.push(geometryInstance);
+ }
+ const geometry = GeometryPipeline_default.combineInstances(geometries)[0];
+ geometry.attributes.position.values = new Float64Array(
+ geometry.attributes.position.values
+ );
+ geometry.indices = IndexDatatype_default.createTypedArray(
+ geometry.attributes.position.values.length / 3,
+ geometry.indices
+ );
+ const attributes = geometry.attributes;
+ if (!vertexFormat.position) {
+ delete attributes.position;
+ }
+ return new Geometry_default({
+ attributes,
+ indices: geometry.indices,
+ primitiveType: geometry.primitiveType,
+ boundingSphere
+ });
+};
+var CoplanarPolygonGeometry_default = CoplanarPolygonGeometry;
+
+// packages/engine/Source/Workers/createCoplanarPolygonGeometry.js
+function createCoplanarPolygonGeometry(polygonGeometry, offset) {
+ if (defined_default(offset)) {
+ polygonGeometry = CoplanarPolygonGeometry_default.unpack(polygonGeometry, offset);
+ }
+ return CoplanarPolygonGeometry_default.createGeometry(polygonGeometry);
+}
+var createCoplanarPolygonGeometry_default = createCoplanarPolygonGeometry;
+export {
+ createCoplanarPolygonGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js b/public/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..053f862e8b6761ae55f834ba4297b46b87b741f6
--- /dev/null
+++ b/public/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js
@@ -0,0 +1,223 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ CoplanarPolygonGeometryLibrary_default
+} from "./chunk-TK5IIG2F.js";
+import "./chunk-2PTKXHJB.js";
+import {
+ PolygonGeometryLibrary_default
+} from "./chunk-IZJ42N4W.js";
+import "./chunk-XWOUPGUF.js";
+import {
+ GeometryInstance_default
+} from "./chunk-YSIJTJ7N.js";
+import {
+ GeometryPipeline_default
+} from "./chunk-7ZZ5LMZY.js";
+import "./chunk-LJ2JQHJT.js";
+import "./chunk-NGZJIN5Z.js";
+import "./chunk-YK3QIKY7.js";
+import "./chunk-NDDI2LWR.js";
+import "./chunk-TI3TRKIC.js";
+import {
+ arrayRemoveDuplicates_default
+} from "./chunk-57H6I3SV.js";
+import "./chunk-JSQJDZI4.js";
+import "./chunk-QQOZO7KO.js";
+import "./chunk-EDLRS3AW.js";
+import {
+ IndexDatatype_default
+} from "./chunk-C4WPMOKT.js";
+import {
+ GeometryAttributes_default
+} from "./chunk-X7IQYYHF.js";
+import {
+ GeometryAttribute_default,
+ Geometry_default,
+ PrimitiveType_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ BoundingSphere_default
+} from "./chunk-KHZNBFOH.js";
+import "./chunk-6SQMLVGV.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian3_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/CoplanarPolygonOutlineGeometry.js
+function createGeometryFromPositions(positions) {
+ const length = positions.length;
+ const flatPositions = new Float64Array(length * 3);
+ const indices = IndexDatatype_default.createTypedArray(length, length * 2);
+ let positionIndex = 0;
+ let index = 0;
+ for (let i = 0; i < length; i++) {
+ const position = positions[i];
+ flatPositions[positionIndex++] = position.x;
+ flatPositions[positionIndex++] = position.y;
+ flatPositions[positionIndex++] = position.z;
+ indices[index++] = i;
+ indices[index++] = (i + 1) % length;
+ }
+ const attributes = new GeometryAttributes_default({
+ position: new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: flatPositions
+ })
+ });
+ return new Geometry_default({
+ attributes,
+ indices,
+ primitiveType: PrimitiveType_default.LINES
+ });
+}
+function CoplanarPolygonOutlineGeometry(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const polygonHierarchy = options.polygonHierarchy;
+ Check_default.defined("options.polygonHierarchy", polygonHierarchy);
+ this._polygonHierarchy = polygonHierarchy;
+ this._workerName = "createCoplanarPolygonOutlineGeometry";
+ this.packedLength = PolygonGeometryLibrary_default.computeHierarchyPackedLength(
+ polygonHierarchy,
+ Cartesian3_default
+ ) + 1;
+}
+CoplanarPolygonOutlineGeometry.fromPositions = function(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ Check_default.defined("options.positions", options.positions);
+ const newOptions = {
+ polygonHierarchy: {
+ positions: options.positions
+ }
+ };
+ return new CoplanarPolygonOutlineGeometry(newOptions);
+};
+CoplanarPolygonOutlineGeometry.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ startingIndex = PolygonGeometryLibrary_default.packPolygonHierarchy(
+ value._polygonHierarchy,
+ array,
+ startingIndex,
+ Cartesian3_default
+ );
+ array[startingIndex] = value.packedLength;
+ return array;
+};
+var scratchOptions = {
+ polygonHierarchy: {}
+};
+CoplanarPolygonOutlineGeometry.unpack = function(array, startingIndex, result) {
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ const polygonHierarchy = PolygonGeometryLibrary_default.unpackPolygonHierarchy(
+ array,
+ startingIndex,
+ Cartesian3_default
+ );
+ startingIndex = polygonHierarchy.startingIndex;
+ delete polygonHierarchy.startingIndex;
+ const packedLength = array[startingIndex];
+ if (!defined_default(result)) {
+ result = new CoplanarPolygonOutlineGeometry(scratchOptions);
+ }
+ result._polygonHierarchy = polygonHierarchy;
+ result.packedLength = packedLength;
+ return result;
+};
+CoplanarPolygonOutlineGeometry.createGeometry = function(polygonGeometry) {
+ const polygonHierarchy = polygonGeometry._polygonHierarchy;
+ let outerPositions = polygonHierarchy.positions;
+ outerPositions = arrayRemoveDuplicates_default(
+ outerPositions,
+ Cartesian3_default.equalsEpsilon,
+ true
+ );
+ if (outerPositions.length < 3) {
+ return;
+ }
+ const isValid = CoplanarPolygonGeometryLibrary_default.validOutline(outerPositions);
+ if (!isValid) {
+ return void 0;
+ }
+ const polygons = PolygonGeometryLibrary_default.polygonOutlinesFromHierarchy(
+ polygonHierarchy,
+ false
+ );
+ if (polygons.length === 0) {
+ return void 0;
+ }
+ const geometries = [];
+ for (let i = 0; i < polygons.length; i++) {
+ const geometryInstance = new GeometryInstance_default({
+ geometry: createGeometryFromPositions(polygons[i])
+ });
+ geometries.push(geometryInstance);
+ }
+ const geometry = GeometryPipeline_default.combineInstances(geometries)[0];
+ const boundingSphere = BoundingSphere_default.fromPoints(polygonHierarchy.positions);
+ return new Geometry_default({
+ attributes: geometry.attributes,
+ indices: geometry.indices,
+ primitiveType: geometry.primitiveType,
+ boundingSphere
+ });
+};
+var CoplanarPolygonOutlineGeometry_default = CoplanarPolygonOutlineGeometry;
+
+// packages/engine/Source/Workers/createCoplanarPolygonOutlineGeometry.js
+function createCoplanarPolygonOutlineGeometry(polygonGeometry, offset) {
+ if (defined_default(offset)) {
+ polygonGeometry = CoplanarPolygonOutlineGeometry_default.unpack(
+ polygonGeometry,
+ offset
+ );
+ }
+ polygonGeometry._ellipsoid = Ellipsoid_default.clone(polygonGeometry._ellipsoid);
+ return CoplanarPolygonOutlineGeometry_default.createGeometry(polygonGeometry);
+}
+var createCoplanarPolygonOutlineGeometry_default = createCoplanarPolygonOutlineGeometry;
+export {
+ createCoplanarPolygonOutlineGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createCorridorGeometry.js b/public/assets/cesium/Workers/createCorridorGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..b71614949b298fe0ee269ee603e86539ea9b45c9
--- /dev/null
+++ b/public/assets/cesium/Workers/createCorridorGeometry.js
@@ -0,0 +1,1261 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ CorridorGeometryLibrary_default
+} from "./chunk-EJVGYGLF.js";
+import {
+ CornerType_default
+} from "./chunk-3IFRSGEY.js";
+import "./chunk-QN6TBED4.js";
+import "./chunk-C3EQ27WF.js";
+import {
+ GeometryOffsetAttribute_default
+} from "./chunk-GBT7MJ6X.js";
+import {
+ VertexFormat_default
+} from "./chunk-JBSKHTNX.js";
+import "./chunk-YK3QIKY7.js";
+import "./chunk-NDDI2LWR.js";
+import {
+ PolygonPipeline_default
+} from "./chunk-TI3TRKIC.js";
+import {
+ arrayRemoveDuplicates_default
+} from "./chunk-57H6I3SV.js";
+import "./chunk-JSQJDZI4.js";
+import "./chunk-QQOZO7KO.js";
+import "./chunk-EDLRS3AW.js";
+import {
+ IndexDatatype_default
+} from "./chunk-C4WPMOKT.js";
+import {
+ GeometryAttributes_default
+} from "./chunk-X7IQYYHF.js";
+import {
+ GeometryAttribute_default,
+ Geometry_default,
+ PrimitiveType_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ BoundingSphere_default
+} from "./chunk-KHZNBFOH.js";
+import {
+ Rectangle_default
+} from "./chunk-6SQMLVGV.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian3_default,
+ Cartographic_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/CorridorGeometry.js
+var cartesian1 = new Cartesian3_default();
+var cartesian2 = new Cartesian3_default();
+var cartesian3 = new Cartesian3_default();
+var cartesian4 = new Cartesian3_default();
+var cartesian5 = new Cartesian3_default();
+var cartesian6 = new Cartesian3_default();
+var scratch1 = new Cartesian3_default();
+var scratch2 = new Cartesian3_default();
+function scaleToSurface(positions, ellipsoid) {
+ for (let i = 0; i < positions.length; i++) {
+ positions[i] = ellipsoid.scaleToGeodeticSurface(positions[i], positions[i]);
+ }
+ return positions;
+}
+function addNormals(attr, normal, left, front, back, vertexFormat) {
+ const normals = attr.normals;
+ const tangents = attr.tangents;
+ const bitangents = attr.bitangents;
+ const forward = Cartesian3_default.normalize(
+ Cartesian3_default.cross(left, normal, scratch1),
+ scratch1
+ );
+ if (vertexFormat.normal) {
+ CorridorGeometryLibrary_default.addAttribute(normals, normal, front, back);
+ }
+ if (vertexFormat.tangent) {
+ CorridorGeometryLibrary_default.addAttribute(tangents, forward, front, back);
+ }
+ if (vertexFormat.bitangent) {
+ CorridorGeometryLibrary_default.addAttribute(bitangents, left, front, back);
+ }
+}
+function combine(computedPositions, vertexFormat, ellipsoid) {
+ const positions = computedPositions.positions;
+ const corners = computedPositions.corners;
+ const endPositions = computedPositions.endPositions;
+ const computedLefts = computedPositions.lefts;
+ const computedNormals = computedPositions.normals;
+ const attributes = new GeometryAttributes_default();
+ let corner;
+ let leftCount = 0;
+ let rightCount = 0;
+ let i;
+ let indicesLength = 0;
+ let length;
+ for (i = 0; i < positions.length; i += 2) {
+ length = positions[i].length - 3;
+ leftCount += length;
+ indicesLength += length * 2;
+ rightCount += positions[i + 1].length - 3;
+ }
+ leftCount += 3;
+ rightCount += 3;
+ for (i = 0; i < corners.length; i++) {
+ corner = corners[i];
+ const leftSide = corners[i].leftPositions;
+ if (defined_default(leftSide)) {
+ length = leftSide.length;
+ leftCount += length;
+ indicesLength += length;
+ } else {
+ length = corners[i].rightPositions.length;
+ rightCount += length;
+ indicesLength += length;
+ }
+ }
+ const addEndPositions = defined_default(endPositions);
+ let endPositionLength;
+ if (addEndPositions) {
+ endPositionLength = endPositions[0].length - 3;
+ leftCount += endPositionLength;
+ rightCount += endPositionLength;
+ endPositionLength /= 3;
+ indicesLength += endPositionLength * 6;
+ }
+ const size = leftCount + rightCount;
+ const finalPositions = new Float64Array(size);
+ const normals = vertexFormat.normal ? new Float32Array(size) : void 0;
+ const tangents = vertexFormat.tangent ? new Float32Array(size) : void 0;
+ const bitangents = vertexFormat.bitangent ? new Float32Array(size) : void 0;
+ const attr = {
+ normals,
+ tangents,
+ bitangents
+ };
+ let front = 0;
+ let back = size - 1;
+ let UL, LL, UR, LR;
+ let normal = cartesian1;
+ let left = cartesian2;
+ let rightPos, leftPos;
+ const halfLength = endPositionLength / 2;
+ const indices = IndexDatatype_default.createTypedArray(size / 3, indicesLength);
+ let index = 0;
+ if (addEndPositions) {
+ leftPos = cartesian3;
+ rightPos = cartesian4;
+ const firstEndPositions = endPositions[0];
+ normal = Cartesian3_default.fromArray(computedNormals, 0, normal);
+ left = Cartesian3_default.fromArray(computedLefts, 0, left);
+ for (i = 0; i < halfLength; i++) {
+ leftPos = Cartesian3_default.fromArray(
+ firstEndPositions,
+ (halfLength - 1 - i) * 3,
+ leftPos
+ );
+ rightPos = Cartesian3_default.fromArray(
+ firstEndPositions,
+ (halfLength + i) * 3,
+ rightPos
+ );
+ CorridorGeometryLibrary_default.addAttribute(finalPositions, rightPos, front);
+ CorridorGeometryLibrary_default.addAttribute(
+ finalPositions,
+ leftPos,
+ void 0,
+ back
+ );
+ addNormals(attr, normal, left, front, back, vertexFormat);
+ LL = front / 3;
+ LR = LL + 1;
+ UL = (back - 2) / 3;
+ UR = UL - 1;
+ indices[index++] = UL;
+ indices[index++] = LL;
+ indices[index++] = UR;
+ indices[index++] = UR;
+ indices[index++] = LL;
+ indices[index++] = LR;
+ front += 3;
+ back -= 3;
+ }
+ }
+ let posIndex = 0;
+ let compIndex = 0;
+ let rightEdge = positions[posIndex++];
+ let leftEdge = positions[posIndex++];
+ finalPositions.set(rightEdge, front);
+ finalPositions.set(leftEdge, back - leftEdge.length + 1);
+ left = Cartesian3_default.fromArray(computedLefts, compIndex, left);
+ let rightNormal;
+ let leftNormal;
+ length = leftEdge.length - 3;
+ for (i = 0; i < length; i += 3) {
+ rightNormal = ellipsoid.geodeticSurfaceNormal(
+ Cartesian3_default.fromArray(rightEdge, i, scratch1),
+ scratch1
+ );
+ leftNormal = ellipsoid.geodeticSurfaceNormal(
+ Cartesian3_default.fromArray(leftEdge, length - i, scratch2),
+ scratch2
+ );
+ normal = Cartesian3_default.normalize(
+ Cartesian3_default.add(rightNormal, leftNormal, normal),
+ normal
+ );
+ addNormals(attr, normal, left, front, back, vertexFormat);
+ LL = front / 3;
+ LR = LL + 1;
+ UL = (back - 2) / 3;
+ UR = UL - 1;
+ indices[index++] = UL;
+ indices[index++] = LL;
+ indices[index++] = UR;
+ indices[index++] = UR;
+ indices[index++] = LL;
+ indices[index++] = LR;
+ front += 3;
+ back -= 3;
+ }
+ rightNormal = ellipsoid.geodeticSurfaceNormal(
+ Cartesian3_default.fromArray(rightEdge, length, scratch1),
+ scratch1
+ );
+ leftNormal = ellipsoid.geodeticSurfaceNormal(
+ Cartesian3_default.fromArray(leftEdge, length, scratch2),
+ scratch2
+ );
+ normal = Cartesian3_default.normalize(
+ Cartesian3_default.add(rightNormal, leftNormal, normal),
+ normal
+ );
+ compIndex += 3;
+ for (i = 0; i < corners.length; i++) {
+ let j;
+ corner = corners[i];
+ const l = corner.leftPositions;
+ const r = corner.rightPositions;
+ let pivot;
+ let start;
+ let outsidePoint = cartesian6;
+ let previousPoint = cartesian3;
+ let nextPoint = cartesian4;
+ normal = Cartesian3_default.fromArray(computedNormals, compIndex, normal);
+ if (defined_default(l)) {
+ addNormals(attr, normal, left, void 0, back, vertexFormat);
+ back -= 3;
+ pivot = LR;
+ start = UR;
+ for (j = 0; j < l.length / 3; j++) {
+ outsidePoint = Cartesian3_default.fromArray(l, j * 3, outsidePoint);
+ indices[index++] = pivot;
+ indices[index++] = start - j - 1;
+ indices[index++] = start - j;
+ CorridorGeometryLibrary_default.addAttribute(
+ finalPositions,
+ outsidePoint,
+ void 0,
+ back
+ );
+ previousPoint = Cartesian3_default.fromArray(
+ finalPositions,
+ (start - j - 1) * 3,
+ previousPoint
+ );
+ nextPoint = Cartesian3_default.fromArray(finalPositions, pivot * 3, nextPoint);
+ left = Cartesian3_default.normalize(
+ Cartesian3_default.subtract(previousPoint, nextPoint, left),
+ left
+ );
+ addNormals(attr, normal, left, void 0, back, vertexFormat);
+ back -= 3;
+ }
+ outsidePoint = Cartesian3_default.fromArray(
+ finalPositions,
+ pivot * 3,
+ outsidePoint
+ );
+ previousPoint = Cartesian3_default.subtract(
+ Cartesian3_default.fromArray(finalPositions, start * 3, previousPoint),
+ outsidePoint,
+ previousPoint
+ );
+ nextPoint = Cartesian3_default.subtract(
+ Cartesian3_default.fromArray(finalPositions, (start - j) * 3, nextPoint),
+ outsidePoint,
+ nextPoint
+ );
+ left = Cartesian3_default.normalize(
+ Cartesian3_default.add(previousPoint, nextPoint, left),
+ left
+ );
+ addNormals(attr, normal, left, front, void 0, vertexFormat);
+ front += 3;
+ } else {
+ addNormals(attr, normal, left, front, void 0, vertexFormat);
+ front += 3;
+ pivot = UR;
+ start = LR;
+ for (j = 0; j < r.length / 3; j++) {
+ outsidePoint = Cartesian3_default.fromArray(r, j * 3, outsidePoint);
+ indices[index++] = pivot;
+ indices[index++] = start + j;
+ indices[index++] = start + j + 1;
+ CorridorGeometryLibrary_default.addAttribute(
+ finalPositions,
+ outsidePoint,
+ front
+ );
+ previousPoint = Cartesian3_default.fromArray(
+ finalPositions,
+ pivot * 3,
+ previousPoint
+ );
+ nextPoint = Cartesian3_default.fromArray(
+ finalPositions,
+ (start + j) * 3,
+ nextPoint
+ );
+ left = Cartesian3_default.normalize(
+ Cartesian3_default.subtract(previousPoint, nextPoint, left),
+ left
+ );
+ addNormals(attr, normal, left, front, void 0, vertexFormat);
+ front += 3;
+ }
+ outsidePoint = Cartesian3_default.fromArray(
+ finalPositions,
+ pivot * 3,
+ outsidePoint
+ );
+ previousPoint = Cartesian3_default.subtract(
+ Cartesian3_default.fromArray(finalPositions, (start + j) * 3, previousPoint),
+ outsidePoint,
+ previousPoint
+ );
+ nextPoint = Cartesian3_default.subtract(
+ Cartesian3_default.fromArray(finalPositions, start * 3, nextPoint),
+ outsidePoint,
+ nextPoint
+ );
+ left = Cartesian3_default.normalize(
+ Cartesian3_default.negate(Cartesian3_default.add(nextPoint, previousPoint, left), left),
+ left
+ );
+ addNormals(attr, normal, left, void 0, back, vertexFormat);
+ back -= 3;
+ }
+ rightEdge = positions[posIndex++];
+ leftEdge = positions[posIndex++];
+ rightEdge.splice(0, 3);
+ leftEdge.splice(leftEdge.length - 3, 3);
+ finalPositions.set(rightEdge, front);
+ finalPositions.set(leftEdge, back - leftEdge.length + 1);
+ length = leftEdge.length - 3;
+ compIndex += 3;
+ left = Cartesian3_default.fromArray(computedLefts, compIndex, left);
+ for (j = 0; j < leftEdge.length; j += 3) {
+ rightNormal = ellipsoid.geodeticSurfaceNormal(
+ Cartesian3_default.fromArray(rightEdge, j, scratch1),
+ scratch1
+ );
+ leftNormal = ellipsoid.geodeticSurfaceNormal(
+ Cartesian3_default.fromArray(leftEdge, length - j, scratch2),
+ scratch2
+ );
+ normal = Cartesian3_default.normalize(
+ Cartesian3_default.add(rightNormal, leftNormal, normal),
+ normal
+ );
+ addNormals(attr, normal, left, front, back, vertexFormat);
+ LR = front / 3;
+ LL = LR - 1;
+ UR = (back - 2) / 3;
+ UL = UR + 1;
+ indices[index++] = UL;
+ indices[index++] = LL;
+ indices[index++] = UR;
+ indices[index++] = UR;
+ indices[index++] = LL;
+ indices[index++] = LR;
+ front += 3;
+ back -= 3;
+ }
+ front -= 3;
+ back += 3;
+ }
+ normal = Cartesian3_default.fromArray(
+ computedNormals,
+ computedNormals.length - 3,
+ normal
+ );
+ addNormals(attr, normal, left, front, back, vertexFormat);
+ if (addEndPositions) {
+ front += 3;
+ back -= 3;
+ leftPos = cartesian3;
+ rightPos = cartesian4;
+ const lastEndPositions = endPositions[1];
+ for (i = 0; i < halfLength; i++) {
+ leftPos = Cartesian3_default.fromArray(
+ lastEndPositions,
+ (endPositionLength - i - 1) * 3,
+ leftPos
+ );
+ rightPos = Cartesian3_default.fromArray(lastEndPositions, i * 3, rightPos);
+ CorridorGeometryLibrary_default.addAttribute(
+ finalPositions,
+ leftPos,
+ void 0,
+ back
+ );
+ CorridorGeometryLibrary_default.addAttribute(finalPositions, rightPos, front);
+ addNormals(attr, normal, left, front, back, vertexFormat);
+ LR = front / 3;
+ LL = LR - 1;
+ UR = (back - 2) / 3;
+ UL = UR + 1;
+ indices[index++] = UL;
+ indices[index++] = LL;
+ indices[index++] = UR;
+ indices[index++] = UR;
+ indices[index++] = LL;
+ indices[index++] = LR;
+ front += 3;
+ back -= 3;
+ }
+ }
+ attributes.position = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: finalPositions
+ });
+ if (vertexFormat.st) {
+ const st = new Float32Array(size / 3 * 2);
+ let rightSt;
+ let leftSt;
+ let stIndex = 0;
+ if (addEndPositions) {
+ leftCount /= 3;
+ rightCount /= 3;
+ const theta = Math.PI / (endPositionLength + 1);
+ leftSt = 1 / (leftCount - endPositionLength + 1);
+ rightSt = 1 / (rightCount - endPositionLength + 1);
+ let a;
+ const halfEndPos = endPositionLength / 2;
+ for (i = halfEndPos + 1; i < endPositionLength + 1; i++) {
+ a = Math_default.PI_OVER_TWO + theta * i;
+ st[stIndex++] = rightSt * (1 + Math.cos(a));
+ st[stIndex++] = 0.5 * (1 + Math.sin(a));
+ }
+ for (i = 1; i < rightCount - endPositionLength + 1; i++) {
+ st[stIndex++] = i * rightSt;
+ st[stIndex++] = 0;
+ }
+ for (i = endPositionLength; i > halfEndPos; i--) {
+ a = Math_default.PI_OVER_TWO - i * theta;
+ st[stIndex++] = 1 - rightSt * (1 + Math.cos(a));
+ st[stIndex++] = 0.5 * (1 + Math.sin(a));
+ }
+ for (i = halfEndPos; i > 0; i--) {
+ a = Math_default.PI_OVER_TWO - theta * i;
+ st[stIndex++] = 1 - leftSt * (1 + Math.cos(a));
+ st[stIndex++] = 0.5 * (1 + Math.sin(a));
+ }
+ for (i = leftCount - endPositionLength; i > 0; i--) {
+ st[stIndex++] = i * leftSt;
+ st[stIndex++] = 1;
+ }
+ for (i = 1; i < halfEndPos + 1; i++) {
+ a = Math_default.PI_OVER_TWO + theta * i;
+ st[stIndex++] = leftSt * (1 + Math.cos(a));
+ st[stIndex++] = 0.5 * (1 + Math.sin(a));
+ }
+ } else {
+ leftCount /= 3;
+ rightCount /= 3;
+ leftSt = 1 / (leftCount - 1);
+ rightSt = 1 / (rightCount - 1);
+ for (i = 0; i < rightCount; i++) {
+ st[stIndex++] = i * rightSt;
+ st[stIndex++] = 0;
+ }
+ for (i = leftCount; i > 0; i--) {
+ st[stIndex++] = (i - 1) * leftSt;
+ st[stIndex++] = 1;
+ }
+ }
+ attributes.st = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 2,
+ values: st
+ });
+ }
+ if (vertexFormat.normal) {
+ attributes.normal = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: attr.normals
+ });
+ }
+ if (vertexFormat.tangent) {
+ attributes.tangent = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: attr.tangents
+ });
+ }
+ if (vertexFormat.bitangent) {
+ attributes.bitangent = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: attr.bitangents
+ });
+ }
+ return {
+ attributes,
+ indices
+ };
+}
+function extrudedAttributes(attributes, vertexFormat) {
+ if (!vertexFormat.normal && !vertexFormat.tangent && !vertexFormat.bitangent && !vertexFormat.st) {
+ return attributes;
+ }
+ const positions = attributes.position.values;
+ let topNormals;
+ let topBitangents;
+ if (vertexFormat.normal || vertexFormat.bitangent) {
+ topNormals = attributes.normal.values;
+ topBitangents = attributes.bitangent.values;
+ }
+ const size = attributes.position.values.length / 18;
+ const threeSize = size * 3;
+ const twoSize = size * 2;
+ const sixSize = threeSize * 2;
+ let i;
+ if (vertexFormat.normal || vertexFormat.bitangent || vertexFormat.tangent) {
+ const normals = vertexFormat.normal ? new Float32Array(threeSize * 6) : void 0;
+ const tangents = vertexFormat.tangent ? new Float32Array(threeSize * 6) : void 0;
+ const bitangents = vertexFormat.bitangent ? new Float32Array(threeSize * 6) : void 0;
+ let topPosition = cartesian1;
+ let bottomPosition = cartesian2;
+ let previousPosition = cartesian3;
+ let normal = cartesian4;
+ let tangent = cartesian5;
+ let bitangent = cartesian6;
+ let attrIndex = sixSize;
+ for (i = 0; i < threeSize; i += 3) {
+ const attrIndexOffset = attrIndex + sixSize;
+ topPosition = Cartesian3_default.fromArray(positions, i, topPosition);
+ bottomPosition = Cartesian3_default.fromArray(
+ positions,
+ i + threeSize,
+ bottomPosition
+ );
+ previousPosition = Cartesian3_default.fromArray(
+ positions,
+ (i + 3) % threeSize,
+ previousPosition
+ );
+ bottomPosition = Cartesian3_default.subtract(
+ bottomPosition,
+ topPosition,
+ bottomPosition
+ );
+ previousPosition = Cartesian3_default.subtract(
+ previousPosition,
+ topPosition,
+ previousPosition
+ );
+ normal = Cartesian3_default.normalize(
+ Cartesian3_default.cross(bottomPosition, previousPosition, normal),
+ normal
+ );
+ if (vertexFormat.normal) {
+ CorridorGeometryLibrary_default.addAttribute(normals, normal, attrIndexOffset);
+ CorridorGeometryLibrary_default.addAttribute(
+ normals,
+ normal,
+ attrIndexOffset + 3
+ );
+ CorridorGeometryLibrary_default.addAttribute(normals, normal, attrIndex);
+ CorridorGeometryLibrary_default.addAttribute(normals, normal, attrIndex + 3);
+ }
+ if (vertexFormat.tangent || vertexFormat.bitangent) {
+ bitangent = Cartesian3_default.fromArray(topNormals, i, bitangent);
+ if (vertexFormat.bitangent) {
+ CorridorGeometryLibrary_default.addAttribute(
+ bitangents,
+ bitangent,
+ attrIndexOffset
+ );
+ CorridorGeometryLibrary_default.addAttribute(
+ bitangents,
+ bitangent,
+ attrIndexOffset + 3
+ );
+ CorridorGeometryLibrary_default.addAttribute(
+ bitangents,
+ bitangent,
+ attrIndex
+ );
+ CorridorGeometryLibrary_default.addAttribute(
+ bitangents,
+ bitangent,
+ attrIndex + 3
+ );
+ }
+ if (vertexFormat.tangent) {
+ tangent = Cartesian3_default.normalize(
+ Cartesian3_default.cross(bitangent, normal, tangent),
+ tangent
+ );
+ CorridorGeometryLibrary_default.addAttribute(
+ tangents,
+ tangent,
+ attrIndexOffset
+ );
+ CorridorGeometryLibrary_default.addAttribute(
+ tangents,
+ tangent,
+ attrIndexOffset + 3
+ );
+ CorridorGeometryLibrary_default.addAttribute(tangents, tangent, attrIndex);
+ CorridorGeometryLibrary_default.addAttribute(
+ tangents,
+ tangent,
+ attrIndex + 3
+ );
+ }
+ }
+ attrIndex += 6;
+ }
+ if (vertexFormat.normal) {
+ normals.set(topNormals);
+ for (i = 0; i < threeSize; i += 3) {
+ normals[i + threeSize] = -topNormals[i];
+ normals[i + threeSize + 1] = -topNormals[i + 1];
+ normals[i + threeSize + 2] = -topNormals[i + 2];
+ }
+ attributes.normal.values = normals;
+ } else {
+ attributes.normal = void 0;
+ }
+ if (vertexFormat.bitangent) {
+ bitangents.set(topBitangents);
+ bitangents.set(topBitangents, threeSize);
+ attributes.bitangent.values = bitangents;
+ } else {
+ attributes.bitangent = void 0;
+ }
+ if (vertexFormat.tangent) {
+ const topTangents = attributes.tangent.values;
+ tangents.set(topTangents);
+ tangents.set(topTangents, threeSize);
+ attributes.tangent.values = tangents;
+ }
+ }
+ if (vertexFormat.st) {
+ const topSt = attributes.st.values;
+ const st = new Float32Array(twoSize * 6);
+ st.set(topSt);
+ st.set(topSt, twoSize);
+ let index = twoSize * 2;
+ for (let j = 0; j < 2; j++) {
+ st[index++] = topSt[0];
+ st[index++] = topSt[1];
+ for (i = 2; i < twoSize; i += 2) {
+ const s = topSt[i];
+ const t = topSt[i + 1];
+ st[index++] = s;
+ st[index++] = t;
+ st[index++] = s;
+ st[index++] = t;
+ }
+ st[index++] = topSt[0];
+ st[index++] = topSt[1];
+ }
+ attributes.st.values = st;
+ }
+ return attributes;
+}
+function addWallPositions(positions, index, wallPositions) {
+ wallPositions[index++] = positions[0];
+ wallPositions[index++] = positions[1];
+ wallPositions[index++] = positions[2];
+ for (let i = 3; i < positions.length; i += 3) {
+ const x = positions[i];
+ const y = positions[i + 1];
+ const z = positions[i + 2];
+ wallPositions[index++] = x;
+ wallPositions[index++] = y;
+ wallPositions[index++] = z;
+ wallPositions[index++] = x;
+ wallPositions[index++] = y;
+ wallPositions[index++] = z;
+ }
+ wallPositions[index++] = positions[0];
+ wallPositions[index++] = positions[1];
+ wallPositions[index++] = positions[2];
+ return wallPositions;
+}
+function computePositionsExtruded(params, vertexFormat) {
+ const topVertexFormat = new VertexFormat_default({
+ position: vertexFormat.position,
+ normal: vertexFormat.normal || vertexFormat.bitangent || params.shadowVolume,
+ tangent: vertexFormat.tangent,
+ bitangent: vertexFormat.normal || vertexFormat.bitangent,
+ st: vertexFormat.st
+ });
+ const ellipsoid = params.ellipsoid;
+ const computedPositions = CorridorGeometryLibrary_default.computePositions(params);
+ const attr = combine(computedPositions, topVertexFormat, ellipsoid);
+ const height = params.height;
+ const extrudedHeight = params.extrudedHeight;
+ let attributes = attr.attributes;
+ const indices = attr.indices;
+ let positions = attributes.position.values;
+ let length = positions.length;
+ const newPositions = new Float64Array(length * 6);
+ let extrudedPositions = new Float64Array(length);
+ extrudedPositions.set(positions);
+ let wallPositions = new Float64Array(length * 4);
+ positions = PolygonPipeline_default.scaleToGeodeticHeight(
+ positions,
+ height,
+ ellipsoid
+ );
+ wallPositions = addWallPositions(positions, 0, wallPositions);
+ extrudedPositions = PolygonPipeline_default.scaleToGeodeticHeight(
+ extrudedPositions,
+ extrudedHeight,
+ ellipsoid
+ );
+ wallPositions = addWallPositions(
+ extrudedPositions,
+ length * 2,
+ wallPositions
+ );
+ newPositions.set(positions);
+ newPositions.set(extrudedPositions, length);
+ newPositions.set(wallPositions, length * 2);
+ attributes.position.values = newPositions;
+ attributes = extrudedAttributes(attributes, vertexFormat);
+ let i;
+ const size = length / 3;
+ if (params.shadowVolume) {
+ const topNormals = attributes.normal.values;
+ length = topNormals.length;
+ let extrudeNormals = new Float32Array(length * 6);
+ for (i = 0; i < length; i++) {
+ topNormals[i] = -topNormals[i];
+ }
+ extrudeNormals.set(topNormals, length);
+ extrudeNormals = addWallPositions(topNormals, length * 4, extrudeNormals);
+ attributes.extrudeDirection = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: extrudeNormals
+ });
+ if (!vertexFormat.normal) {
+ attributes.normal = void 0;
+ }
+ }
+ if (defined_default(params.offsetAttribute)) {
+ let applyOffset = new Uint8Array(size * 6);
+ if (params.offsetAttribute === GeometryOffsetAttribute_default.TOP) {
+ applyOffset = applyOffset.fill(1, 0, size).fill(1, size * 2, size * 4);
+ } else {
+ const applyOffsetValue = params.offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
+ applyOffset = applyOffset.fill(applyOffsetValue);
+ }
+ attributes.applyOffset = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: applyOffset
+ });
+ }
+ const iLength = indices.length;
+ const twoSize = size + size;
+ const newIndices = IndexDatatype_default.createTypedArray(
+ newPositions.length / 3,
+ iLength * 2 + twoSize * 3
+ );
+ newIndices.set(indices);
+ let index = iLength;
+ for (i = 0; i < iLength; i += 3) {
+ const v0 = indices[i];
+ const v1 = indices[i + 1];
+ const v2 = indices[i + 2];
+ newIndices[index++] = v2 + size;
+ newIndices[index++] = v1 + size;
+ newIndices[index++] = v0 + size;
+ }
+ let UL, LL, UR, LR;
+ for (i = 0; i < twoSize; i += 2) {
+ UL = i + twoSize;
+ LL = UL + twoSize;
+ UR = UL + 1;
+ LR = LL + 1;
+ newIndices[index++] = UL;
+ newIndices[index++] = LL;
+ newIndices[index++] = UR;
+ newIndices[index++] = UR;
+ newIndices[index++] = LL;
+ newIndices[index++] = LR;
+ }
+ return {
+ attributes,
+ indices: newIndices
+ };
+}
+var scratchCartesian1 = new Cartesian3_default();
+var scratchCartesian2 = new Cartesian3_default();
+var scratchCartographic = new Cartographic_default();
+function computeOffsetPoints(position1, position2, ellipsoid, halfWidth, min, max) {
+ const direction = Cartesian3_default.subtract(
+ position2,
+ position1,
+ scratchCartesian1
+ );
+ Cartesian3_default.normalize(direction, direction);
+ const normal = ellipsoid.geodeticSurfaceNormal(position1, scratchCartesian2);
+ const offsetDirection = Cartesian3_default.cross(
+ direction,
+ normal,
+ scratchCartesian1
+ );
+ Cartesian3_default.multiplyByScalar(offsetDirection, halfWidth, offsetDirection);
+ let minLat = min.latitude;
+ let minLon = min.longitude;
+ let maxLat = max.latitude;
+ let maxLon = max.longitude;
+ Cartesian3_default.add(position1, offsetDirection, scratchCartesian2);
+ ellipsoid.cartesianToCartographic(scratchCartesian2, scratchCartographic);
+ let lat = scratchCartographic.latitude;
+ let lon = scratchCartographic.longitude;
+ minLat = Math.min(minLat, lat);
+ minLon = Math.min(minLon, lon);
+ maxLat = Math.max(maxLat, lat);
+ maxLon = Math.max(maxLon, lon);
+ Cartesian3_default.subtract(position1, offsetDirection, scratchCartesian2);
+ ellipsoid.cartesianToCartographic(scratchCartesian2, scratchCartographic);
+ lat = scratchCartographic.latitude;
+ lon = scratchCartographic.longitude;
+ minLat = Math.min(minLat, lat);
+ minLon = Math.min(minLon, lon);
+ maxLat = Math.max(maxLat, lat);
+ maxLon = Math.max(maxLon, lon);
+ min.latitude = minLat;
+ min.longitude = minLon;
+ max.latitude = maxLat;
+ max.longitude = maxLon;
+}
+var scratchCartesianOffset = new Cartesian3_default();
+var scratchCartesianEnds = new Cartesian3_default();
+var scratchCartographicMin = new Cartographic_default();
+var scratchCartographicMax = new Cartographic_default();
+function computeRectangle(positions, ellipsoid, width, cornerType, result) {
+ positions = scaleToSurface(positions, ellipsoid);
+ const cleanPositions = arrayRemoveDuplicates_default(
+ positions,
+ Cartesian3_default.equalsEpsilon
+ );
+ const length = cleanPositions.length;
+ if (length < 2 || width <= 0) {
+ return new Rectangle_default();
+ }
+ const halfWidth = width * 0.5;
+ scratchCartographicMin.latitude = Number.POSITIVE_INFINITY;
+ scratchCartographicMin.longitude = Number.POSITIVE_INFINITY;
+ scratchCartographicMax.latitude = Number.NEGATIVE_INFINITY;
+ scratchCartographicMax.longitude = Number.NEGATIVE_INFINITY;
+ let lat, lon;
+ if (cornerType === CornerType_default.ROUNDED) {
+ const first = cleanPositions[0];
+ Cartesian3_default.subtract(first, cleanPositions[1], scratchCartesianOffset);
+ Cartesian3_default.normalize(scratchCartesianOffset, scratchCartesianOffset);
+ Cartesian3_default.multiplyByScalar(
+ scratchCartesianOffset,
+ halfWidth,
+ scratchCartesianOffset
+ );
+ Cartesian3_default.add(first, scratchCartesianOffset, scratchCartesianEnds);
+ ellipsoid.cartesianToCartographic(
+ scratchCartesianEnds,
+ scratchCartographic
+ );
+ lat = scratchCartographic.latitude;
+ lon = scratchCartographic.longitude;
+ scratchCartographicMin.latitude = Math.min(
+ scratchCartographicMin.latitude,
+ lat
+ );
+ scratchCartographicMin.longitude = Math.min(
+ scratchCartographicMin.longitude,
+ lon
+ );
+ scratchCartographicMax.latitude = Math.max(
+ scratchCartographicMax.latitude,
+ lat
+ );
+ scratchCartographicMax.longitude = Math.max(
+ scratchCartographicMax.longitude,
+ lon
+ );
+ }
+ for (let i = 0; i < length - 1; ++i) {
+ computeOffsetPoints(
+ cleanPositions[i],
+ cleanPositions[i + 1],
+ ellipsoid,
+ halfWidth,
+ scratchCartographicMin,
+ scratchCartographicMax
+ );
+ }
+ const last = cleanPositions[length - 1];
+ Cartesian3_default.subtract(last, cleanPositions[length - 2], scratchCartesianOffset);
+ Cartesian3_default.normalize(scratchCartesianOffset, scratchCartesianOffset);
+ Cartesian3_default.multiplyByScalar(
+ scratchCartesianOffset,
+ halfWidth,
+ scratchCartesianOffset
+ );
+ Cartesian3_default.add(last, scratchCartesianOffset, scratchCartesianEnds);
+ computeOffsetPoints(
+ last,
+ scratchCartesianEnds,
+ ellipsoid,
+ halfWidth,
+ scratchCartographicMin,
+ scratchCartographicMax
+ );
+ if (cornerType === CornerType_default.ROUNDED) {
+ ellipsoid.cartesianToCartographic(
+ scratchCartesianEnds,
+ scratchCartographic
+ );
+ lat = scratchCartographic.latitude;
+ lon = scratchCartographic.longitude;
+ scratchCartographicMin.latitude = Math.min(
+ scratchCartographicMin.latitude,
+ lat
+ );
+ scratchCartographicMin.longitude = Math.min(
+ scratchCartographicMin.longitude,
+ lon
+ );
+ scratchCartographicMax.latitude = Math.max(
+ scratchCartographicMax.latitude,
+ lat
+ );
+ scratchCartographicMax.longitude = Math.max(
+ scratchCartographicMax.longitude,
+ lon
+ );
+ }
+ const rectangle = defined_default(result) ? result : new Rectangle_default();
+ rectangle.north = scratchCartographicMax.latitude;
+ rectangle.south = scratchCartographicMin.latitude;
+ rectangle.east = scratchCartographicMax.longitude;
+ rectangle.west = scratchCartographicMin.longitude;
+ return rectangle;
+}
+function CorridorGeometry(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const positions = options.positions;
+ const width = options.width;
+ Check_default.defined("options.positions", positions);
+ Check_default.defined("options.width", width);
+ const height = defaultValue_default(options.height, 0);
+ const extrudedHeight = defaultValue_default(options.extrudedHeight, height);
+ this._positions = positions;
+ this._ellipsoid = Ellipsoid_default.clone(
+ defaultValue_default(options.ellipsoid, Ellipsoid_default.default)
+ );
+ this._vertexFormat = VertexFormat_default.clone(
+ defaultValue_default(options.vertexFormat, VertexFormat_default.DEFAULT)
+ );
+ this._width = width;
+ this._height = Math.max(height, extrudedHeight);
+ this._extrudedHeight = Math.min(height, extrudedHeight);
+ this._cornerType = defaultValue_default(options.cornerType, CornerType_default.ROUNDED);
+ this._granularity = defaultValue_default(
+ options.granularity,
+ Math_default.RADIANS_PER_DEGREE
+ );
+ this._shadowVolume = defaultValue_default(options.shadowVolume, false);
+ this._workerName = "createCorridorGeometry";
+ this._offsetAttribute = options.offsetAttribute;
+ this._rectangle = void 0;
+ this.packedLength = 1 + positions.length * Cartesian3_default.packedLength + Ellipsoid_default.packedLength + VertexFormat_default.packedLength + 7;
+}
+CorridorGeometry.pack = function(value, array, startingIndex) {
+ Check_default.defined("value", value);
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ const positions = value._positions;
+ const length = positions.length;
+ array[startingIndex++] = length;
+ for (let i = 0; i < length; ++i, startingIndex += Cartesian3_default.packedLength) {
+ Cartesian3_default.pack(positions[i], array, startingIndex);
+ }
+ Ellipsoid_default.pack(value._ellipsoid, array, startingIndex);
+ startingIndex += Ellipsoid_default.packedLength;
+ VertexFormat_default.pack(value._vertexFormat, array, startingIndex);
+ startingIndex += VertexFormat_default.packedLength;
+ array[startingIndex++] = value._width;
+ array[startingIndex++] = value._height;
+ array[startingIndex++] = value._extrudedHeight;
+ array[startingIndex++] = value._cornerType;
+ array[startingIndex++] = value._granularity;
+ array[startingIndex++] = value._shadowVolume ? 1 : 0;
+ array[startingIndex] = defaultValue_default(value._offsetAttribute, -1);
+ return array;
+};
+var scratchEllipsoid = Ellipsoid_default.clone(Ellipsoid_default.UNIT_SPHERE);
+var scratchVertexFormat = new VertexFormat_default();
+var scratchOptions = {
+ positions: void 0,
+ ellipsoid: scratchEllipsoid,
+ vertexFormat: scratchVertexFormat,
+ width: void 0,
+ height: void 0,
+ extrudedHeight: void 0,
+ cornerType: void 0,
+ granularity: void 0,
+ shadowVolume: void 0,
+ offsetAttribute: void 0
+};
+CorridorGeometry.unpack = function(array, startingIndex, result) {
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ const length = array[startingIndex++];
+ const positions = new Array(length);
+ for (let i = 0; i < length; ++i, startingIndex += Cartesian3_default.packedLength) {
+ positions[i] = Cartesian3_default.unpack(array, startingIndex);
+ }
+ const ellipsoid = Ellipsoid_default.unpack(array, startingIndex, scratchEllipsoid);
+ startingIndex += Ellipsoid_default.packedLength;
+ const vertexFormat = VertexFormat_default.unpack(
+ array,
+ startingIndex,
+ scratchVertexFormat
+ );
+ startingIndex += VertexFormat_default.packedLength;
+ const width = array[startingIndex++];
+ const height = array[startingIndex++];
+ const extrudedHeight = array[startingIndex++];
+ const cornerType = array[startingIndex++];
+ const granularity = array[startingIndex++];
+ const shadowVolume = array[startingIndex++] === 1;
+ const offsetAttribute = array[startingIndex];
+ if (!defined_default(result)) {
+ scratchOptions.positions = positions;
+ scratchOptions.width = width;
+ scratchOptions.height = height;
+ scratchOptions.extrudedHeight = extrudedHeight;
+ scratchOptions.cornerType = cornerType;
+ scratchOptions.granularity = granularity;
+ scratchOptions.shadowVolume = shadowVolume;
+ scratchOptions.offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
+ return new CorridorGeometry(scratchOptions);
+ }
+ result._positions = positions;
+ result._ellipsoid = Ellipsoid_default.clone(ellipsoid, result._ellipsoid);
+ result._vertexFormat = VertexFormat_default.clone(vertexFormat, result._vertexFormat);
+ result._width = width;
+ result._height = height;
+ result._extrudedHeight = extrudedHeight;
+ result._cornerType = cornerType;
+ result._granularity = granularity;
+ result._shadowVolume = shadowVolume;
+ result._offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
+ return result;
+};
+CorridorGeometry.computeRectangle = function(options, result) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const positions = options.positions;
+ const width = options.width;
+ Check_default.defined("options.positions", positions);
+ Check_default.defined("options.width", width);
+ const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default);
+ const cornerType = defaultValue_default(options.cornerType, CornerType_default.ROUNDED);
+ return computeRectangle(positions, ellipsoid, width, cornerType, result);
+};
+CorridorGeometry.createGeometry = function(corridorGeometry) {
+ let positions = corridorGeometry._positions;
+ const width = corridorGeometry._width;
+ const ellipsoid = corridorGeometry._ellipsoid;
+ positions = scaleToSurface(positions, ellipsoid);
+ const cleanPositions = arrayRemoveDuplicates_default(
+ positions,
+ Cartesian3_default.equalsEpsilon
+ );
+ if (cleanPositions.length < 2 || width <= 0) {
+ return;
+ }
+ const height = corridorGeometry._height;
+ const extrudedHeight = corridorGeometry._extrudedHeight;
+ const extrude = !Math_default.equalsEpsilon(
+ height,
+ extrudedHeight,
+ 0,
+ Math_default.EPSILON2
+ );
+ const vertexFormat = corridorGeometry._vertexFormat;
+ const params = {
+ ellipsoid,
+ positions: cleanPositions,
+ width,
+ cornerType: corridorGeometry._cornerType,
+ granularity: corridorGeometry._granularity,
+ saveAttributes: true
+ };
+ let attr;
+ if (extrude) {
+ params.height = height;
+ params.extrudedHeight = extrudedHeight;
+ params.shadowVolume = corridorGeometry._shadowVolume;
+ params.offsetAttribute = corridorGeometry._offsetAttribute;
+ attr = computePositionsExtruded(params, vertexFormat);
+ } else {
+ const computedPositions = CorridorGeometryLibrary_default.computePositions(params);
+ attr = combine(computedPositions, vertexFormat, ellipsoid);
+ attr.attributes.position.values = PolygonPipeline_default.scaleToGeodeticHeight(
+ attr.attributes.position.values,
+ height,
+ ellipsoid
+ );
+ if (defined_default(corridorGeometry._offsetAttribute)) {
+ const applyOffsetValue = corridorGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
+ const length = attr.attributes.position.values.length;
+ const applyOffset = new Uint8Array(length / 3).fill(applyOffsetValue);
+ attr.attributes.applyOffset = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: applyOffset
+ });
+ }
+ }
+ const attributes = attr.attributes;
+ const boundingSphere = BoundingSphere_default.fromVertices(
+ attributes.position.values,
+ void 0,
+ 3
+ );
+ if (!vertexFormat.position) {
+ attr.attributes.position.values = void 0;
+ }
+ return new Geometry_default({
+ attributes,
+ indices: attr.indices,
+ primitiveType: PrimitiveType_default.TRIANGLES,
+ boundingSphere,
+ offsetAttribute: corridorGeometry._offsetAttribute
+ });
+};
+CorridorGeometry.createShadowVolume = function(corridorGeometry, minHeightFunc, maxHeightFunc) {
+ const granularity = corridorGeometry._granularity;
+ const ellipsoid = corridorGeometry._ellipsoid;
+ const minHeight = minHeightFunc(granularity, ellipsoid);
+ const maxHeight = maxHeightFunc(granularity, ellipsoid);
+ return new CorridorGeometry({
+ positions: corridorGeometry._positions,
+ width: corridorGeometry._width,
+ cornerType: corridorGeometry._cornerType,
+ ellipsoid,
+ granularity,
+ extrudedHeight: minHeight,
+ height: maxHeight,
+ vertexFormat: VertexFormat_default.POSITION_ONLY,
+ shadowVolume: true
+ });
+};
+Object.defineProperties(CorridorGeometry.prototype, {
+ /**
+ * @private
+ */
+ rectangle: {
+ get: function() {
+ if (!defined_default(this._rectangle)) {
+ this._rectangle = computeRectangle(
+ this._positions,
+ this._ellipsoid,
+ this._width,
+ this._cornerType
+ );
+ }
+ return this._rectangle;
+ }
+ },
+ /**
+ * For remapping texture coordinates when rendering CorridorGeometries as GroundPrimitives.
+ *
+ * Corridors don't support stRotation,
+ * so just return the corners of the original system.
+ * @private
+ */
+ textureCoordinateRotationPoints: {
+ get: function() {
+ return [0, 0, 0, 1, 1, 0];
+ }
+ }
+});
+var CorridorGeometry_default = CorridorGeometry;
+
+// packages/engine/Source/Workers/createCorridorGeometry.js
+function createCorridorGeometry(corridorGeometry, offset) {
+ if (defined_default(offset)) {
+ corridorGeometry = CorridorGeometry_default.unpack(corridorGeometry, offset);
+ }
+ corridorGeometry._ellipsoid = Ellipsoid_default.clone(corridorGeometry._ellipsoid);
+ return CorridorGeometry_default.createGeometry(corridorGeometry);
+}
+var createCorridorGeometry_default = createCorridorGeometry;
+export {
+ createCorridorGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createCorridorOutlineGeometry.js b/public/assets/cesium/Workers/createCorridorOutlineGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..6a99d3fe47bdd6e45b12506ef1b3ee5f84d3f4e3
--- /dev/null
+++ b/public/assets/cesium/Workers/createCorridorOutlineGeometry.js
@@ -0,0 +1,566 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ CorridorGeometryLibrary_default
+} from "./chunk-EJVGYGLF.js";
+import {
+ CornerType_default
+} from "./chunk-3IFRSGEY.js";
+import "./chunk-QN6TBED4.js";
+import "./chunk-C3EQ27WF.js";
+import {
+ GeometryOffsetAttribute_default
+} from "./chunk-GBT7MJ6X.js";
+import "./chunk-YK3QIKY7.js";
+import "./chunk-NDDI2LWR.js";
+import {
+ PolygonPipeline_default
+} from "./chunk-TI3TRKIC.js";
+import {
+ arrayRemoveDuplicates_default
+} from "./chunk-57H6I3SV.js";
+import "./chunk-JSQJDZI4.js";
+import "./chunk-QQOZO7KO.js";
+import "./chunk-EDLRS3AW.js";
+import {
+ IndexDatatype_default
+} from "./chunk-C4WPMOKT.js";
+import {
+ GeometryAttributes_default
+} from "./chunk-X7IQYYHF.js";
+import {
+ GeometryAttribute_default,
+ Geometry_default,
+ PrimitiveType_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ BoundingSphere_default
+} from "./chunk-KHZNBFOH.js";
+import "./chunk-6SQMLVGV.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian3_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/CorridorOutlineGeometry.js
+var cartesian1 = new Cartesian3_default();
+var cartesian2 = new Cartesian3_default();
+var cartesian3 = new Cartesian3_default();
+function scaleToSurface(positions, ellipsoid) {
+ for (let i = 0; i < positions.length; i++) {
+ positions[i] = ellipsoid.scaleToGeodeticSurface(positions[i], positions[i]);
+ }
+ return positions;
+}
+function combine(computedPositions, cornerType) {
+ const wallIndices = [];
+ const positions = computedPositions.positions;
+ const corners = computedPositions.corners;
+ const endPositions = computedPositions.endPositions;
+ const attributes = new GeometryAttributes_default();
+ let corner;
+ let leftCount = 0;
+ let rightCount = 0;
+ let i;
+ let indicesLength = 0;
+ let length;
+ for (i = 0; i < positions.length; i += 2) {
+ length = positions[i].length - 3;
+ leftCount += length;
+ indicesLength += length / 3 * 4;
+ rightCount += positions[i + 1].length - 3;
+ }
+ leftCount += 3;
+ rightCount += 3;
+ for (i = 0; i < corners.length; i++) {
+ corner = corners[i];
+ const leftSide = corners[i].leftPositions;
+ if (defined_default(leftSide)) {
+ length = leftSide.length;
+ leftCount += length;
+ indicesLength += length / 3 * 2;
+ } else {
+ length = corners[i].rightPositions.length;
+ rightCount += length;
+ indicesLength += length / 3 * 2;
+ }
+ }
+ const addEndPositions = defined_default(endPositions);
+ let endPositionLength;
+ if (addEndPositions) {
+ endPositionLength = endPositions[0].length - 3;
+ leftCount += endPositionLength;
+ rightCount += endPositionLength;
+ endPositionLength /= 3;
+ indicesLength += endPositionLength * 4;
+ }
+ const size = leftCount + rightCount;
+ const finalPositions = new Float64Array(size);
+ let front = 0;
+ let back = size - 1;
+ let UL, LL, UR, LR;
+ let rightPos, leftPos;
+ const halfLength = endPositionLength / 2;
+ const indices = IndexDatatype_default.createTypedArray(size / 3, indicesLength + 4);
+ let index = 0;
+ indices[index++] = front / 3;
+ indices[index++] = (back - 2) / 3;
+ if (addEndPositions) {
+ wallIndices.push(front / 3);
+ leftPos = cartesian1;
+ rightPos = cartesian2;
+ const firstEndPositions = endPositions[0];
+ for (i = 0; i < halfLength; i++) {
+ leftPos = Cartesian3_default.fromArray(
+ firstEndPositions,
+ (halfLength - 1 - i) * 3,
+ leftPos
+ );
+ rightPos = Cartesian3_default.fromArray(
+ firstEndPositions,
+ (halfLength + i) * 3,
+ rightPos
+ );
+ CorridorGeometryLibrary_default.addAttribute(finalPositions, rightPos, front);
+ CorridorGeometryLibrary_default.addAttribute(
+ finalPositions,
+ leftPos,
+ void 0,
+ back
+ );
+ LL = front / 3;
+ LR = LL + 1;
+ UL = (back - 2) / 3;
+ UR = UL - 1;
+ indices[index++] = UL;
+ indices[index++] = UR;
+ indices[index++] = LL;
+ indices[index++] = LR;
+ front += 3;
+ back -= 3;
+ }
+ }
+ let posIndex = 0;
+ let rightEdge = positions[posIndex++];
+ let leftEdge = positions[posIndex++];
+ finalPositions.set(rightEdge, front);
+ finalPositions.set(leftEdge, back - leftEdge.length + 1);
+ length = leftEdge.length - 3;
+ wallIndices.push(front / 3, (back - 2) / 3);
+ for (i = 0; i < length; i += 3) {
+ LL = front / 3;
+ LR = LL + 1;
+ UL = (back - 2) / 3;
+ UR = UL - 1;
+ indices[index++] = UL;
+ indices[index++] = UR;
+ indices[index++] = LL;
+ indices[index++] = LR;
+ front += 3;
+ back -= 3;
+ }
+ for (i = 0; i < corners.length; i++) {
+ let j;
+ corner = corners[i];
+ const l = corner.leftPositions;
+ const r = corner.rightPositions;
+ let start;
+ let outsidePoint = cartesian3;
+ if (defined_default(l)) {
+ back -= 3;
+ start = UR;
+ wallIndices.push(LR);
+ for (j = 0; j < l.length / 3; j++) {
+ outsidePoint = Cartesian3_default.fromArray(l, j * 3, outsidePoint);
+ indices[index++] = start - j - 1;
+ indices[index++] = start - j;
+ CorridorGeometryLibrary_default.addAttribute(
+ finalPositions,
+ outsidePoint,
+ void 0,
+ back
+ );
+ back -= 3;
+ }
+ wallIndices.push(start - Math.floor(l.length / 6));
+ if (cornerType === CornerType_default.BEVELED) {
+ wallIndices.push((back - 2) / 3 + 1);
+ }
+ front += 3;
+ } else {
+ front += 3;
+ start = LR;
+ wallIndices.push(UR);
+ for (j = 0; j < r.length / 3; j++) {
+ outsidePoint = Cartesian3_default.fromArray(r, j * 3, outsidePoint);
+ indices[index++] = start + j;
+ indices[index++] = start + j + 1;
+ CorridorGeometryLibrary_default.addAttribute(
+ finalPositions,
+ outsidePoint,
+ front
+ );
+ front += 3;
+ }
+ wallIndices.push(start + Math.floor(r.length / 6));
+ if (cornerType === CornerType_default.BEVELED) {
+ wallIndices.push(front / 3 - 1);
+ }
+ back -= 3;
+ }
+ rightEdge = positions[posIndex++];
+ leftEdge = positions[posIndex++];
+ rightEdge.splice(0, 3);
+ leftEdge.splice(leftEdge.length - 3, 3);
+ finalPositions.set(rightEdge, front);
+ finalPositions.set(leftEdge, back - leftEdge.length + 1);
+ length = leftEdge.length - 3;
+ for (j = 0; j < leftEdge.length; j += 3) {
+ LR = front / 3;
+ LL = LR - 1;
+ UR = (back - 2) / 3;
+ UL = UR + 1;
+ indices[index++] = UL;
+ indices[index++] = UR;
+ indices[index++] = LL;
+ indices[index++] = LR;
+ front += 3;
+ back -= 3;
+ }
+ front -= 3;
+ back += 3;
+ wallIndices.push(front / 3, (back - 2) / 3);
+ }
+ if (addEndPositions) {
+ front += 3;
+ back -= 3;
+ leftPos = cartesian1;
+ rightPos = cartesian2;
+ const lastEndPositions = endPositions[1];
+ for (i = 0; i < halfLength; i++) {
+ leftPos = Cartesian3_default.fromArray(
+ lastEndPositions,
+ (endPositionLength - i - 1) * 3,
+ leftPos
+ );
+ rightPos = Cartesian3_default.fromArray(lastEndPositions, i * 3, rightPos);
+ CorridorGeometryLibrary_default.addAttribute(
+ finalPositions,
+ leftPos,
+ void 0,
+ back
+ );
+ CorridorGeometryLibrary_default.addAttribute(finalPositions, rightPos, front);
+ LR = front / 3;
+ LL = LR - 1;
+ UR = (back - 2) / 3;
+ UL = UR + 1;
+ indices[index++] = UL;
+ indices[index++] = UR;
+ indices[index++] = LL;
+ indices[index++] = LR;
+ front += 3;
+ back -= 3;
+ }
+ wallIndices.push(front / 3);
+ } else {
+ wallIndices.push(front / 3, (back - 2) / 3);
+ }
+ indices[index++] = front / 3;
+ indices[index++] = (back - 2) / 3;
+ attributes.position = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: finalPositions
+ });
+ return {
+ attributes,
+ indices,
+ wallIndices
+ };
+}
+function computePositionsExtruded(params) {
+ const ellipsoid = params.ellipsoid;
+ const computedPositions = CorridorGeometryLibrary_default.computePositions(params);
+ const attr = combine(computedPositions, params.cornerType);
+ const wallIndices = attr.wallIndices;
+ const height = params.height;
+ const extrudedHeight = params.extrudedHeight;
+ const attributes = attr.attributes;
+ const indices = attr.indices;
+ let positions = attributes.position.values;
+ let length = positions.length;
+ let extrudedPositions = new Float64Array(length);
+ extrudedPositions.set(positions);
+ const newPositions = new Float64Array(length * 2);
+ positions = PolygonPipeline_default.scaleToGeodeticHeight(
+ positions,
+ height,
+ ellipsoid
+ );
+ extrudedPositions = PolygonPipeline_default.scaleToGeodeticHeight(
+ extrudedPositions,
+ extrudedHeight,
+ ellipsoid
+ );
+ newPositions.set(positions);
+ newPositions.set(extrudedPositions, length);
+ attributes.position.values = newPositions;
+ length /= 3;
+ if (defined_default(params.offsetAttribute)) {
+ let applyOffset = new Uint8Array(length * 2);
+ if (params.offsetAttribute === GeometryOffsetAttribute_default.TOP) {
+ applyOffset = applyOffset.fill(1, 0, length);
+ } else {
+ const applyOffsetValue = params.offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
+ applyOffset = applyOffset.fill(applyOffsetValue);
+ }
+ attributes.applyOffset = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: applyOffset
+ });
+ }
+ let i;
+ const iLength = indices.length;
+ const newIndices = IndexDatatype_default.createTypedArray(
+ newPositions.length / 3,
+ (iLength + wallIndices.length) * 2
+ );
+ newIndices.set(indices);
+ let index = iLength;
+ for (i = 0; i < iLength; i += 2) {
+ const v0 = indices[i];
+ const v1 = indices[i + 1];
+ newIndices[index++] = v0 + length;
+ newIndices[index++] = v1 + length;
+ }
+ let UL, LL;
+ for (i = 0; i < wallIndices.length; i++) {
+ UL = wallIndices[i];
+ LL = UL + length;
+ newIndices[index++] = UL;
+ newIndices[index++] = LL;
+ }
+ return {
+ attributes,
+ indices: newIndices
+ };
+}
+function CorridorOutlineGeometry(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const positions = options.positions;
+ const width = options.width;
+ Check_default.typeOf.object("options.positions", positions);
+ Check_default.typeOf.number("options.width", width);
+ const height = defaultValue_default(options.height, 0);
+ const extrudedHeight = defaultValue_default(options.extrudedHeight, height);
+ this._positions = positions;
+ this._ellipsoid = Ellipsoid_default.clone(
+ defaultValue_default(options.ellipsoid, Ellipsoid_default.default)
+ );
+ this._width = width;
+ this._height = Math.max(height, extrudedHeight);
+ this._extrudedHeight = Math.min(height, extrudedHeight);
+ this._cornerType = defaultValue_default(options.cornerType, CornerType_default.ROUNDED);
+ this._granularity = defaultValue_default(
+ options.granularity,
+ Math_default.RADIANS_PER_DEGREE
+ );
+ this._offsetAttribute = options.offsetAttribute;
+ this._workerName = "createCorridorOutlineGeometry";
+ this.packedLength = 1 + positions.length * Cartesian3_default.packedLength + Ellipsoid_default.packedLength + 6;
+}
+CorridorOutlineGeometry.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ Check_default.typeOf.object("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ const positions = value._positions;
+ const length = positions.length;
+ array[startingIndex++] = length;
+ for (let i = 0; i < length; ++i, startingIndex += Cartesian3_default.packedLength) {
+ Cartesian3_default.pack(positions[i], array, startingIndex);
+ }
+ Ellipsoid_default.pack(value._ellipsoid, array, startingIndex);
+ startingIndex += Ellipsoid_default.packedLength;
+ array[startingIndex++] = value._width;
+ array[startingIndex++] = value._height;
+ array[startingIndex++] = value._extrudedHeight;
+ array[startingIndex++] = value._cornerType;
+ array[startingIndex++] = value._granularity;
+ array[startingIndex] = defaultValue_default(value._offsetAttribute, -1);
+ return array;
+};
+var scratchEllipsoid = Ellipsoid_default.clone(Ellipsoid_default.UNIT_SPHERE);
+var scratchOptions = {
+ positions: void 0,
+ ellipsoid: scratchEllipsoid,
+ width: void 0,
+ height: void 0,
+ extrudedHeight: void 0,
+ cornerType: void 0,
+ granularity: void 0,
+ offsetAttribute: void 0
+};
+CorridorOutlineGeometry.unpack = function(array, startingIndex, result) {
+ Check_default.typeOf.object("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ const length = array[startingIndex++];
+ const positions = new Array(length);
+ for (let i = 0; i < length; ++i, startingIndex += Cartesian3_default.packedLength) {
+ positions[i] = Cartesian3_default.unpack(array, startingIndex);
+ }
+ const ellipsoid = Ellipsoid_default.unpack(array, startingIndex, scratchEllipsoid);
+ startingIndex += Ellipsoid_default.packedLength;
+ const width = array[startingIndex++];
+ const height = array[startingIndex++];
+ const extrudedHeight = array[startingIndex++];
+ const cornerType = array[startingIndex++];
+ const granularity = array[startingIndex++];
+ const offsetAttribute = array[startingIndex];
+ if (!defined_default(result)) {
+ scratchOptions.positions = positions;
+ scratchOptions.width = width;
+ scratchOptions.height = height;
+ scratchOptions.extrudedHeight = extrudedHeight;
+ scratchOptions.cornerType = cornerType;
+ scratchOptions.granularity = granularity;
+ scratchOptions.offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
+ return new CorridorOutlineGeometry(scratchOptions);
+ }
+ result._positions = positions;
+ result._ellipsoid = Ellipsoid_default.clone(ellipsoid, result._ellipsoid);
+ result._width = width;
+ result._height = height;
+ result._extrudedHeight = extrudedHeight;
+ result._cornerType = cornerType;
+ result._granularity = granularity;
+ result._offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
+ return result;
+};
+CorridorOutlineGeometry.createGeometry = function(corridorOutlineGeometry) {
+ let positions = corridorOutlineGeometry._positions;
+ const width = corridorOutlineGeometry._width;
+ const ellipsoid = corridorOutlineGeometry._ellipsoid;
+ positions = scaleToSurface(positions, ellipsoid);
+ const cleanPositions = arrayRemoveDuplicates_default(
+ positions,
+ Cartesian3_default.equalsEpsilon
+ );
+ if (cleanPositions.length < 2 || width <= 0) {
+ return;
+ }
+ const height = corridorOutlineGeometry._height;
+ const extrudedHeight = corridorOutlineGeometry._extrudedHeight;
+ const extrude = !Math_default.equalsEpsilon(
+ height,
+ extrudedHeight,
+ 0,
+ Math_default.EPSILON2
+ );
+ const params = {
+ ellipsoid,
+ positions: cleanPositions,
+ width,
+ cornerType: corridorOutlineGeometry._cornerType,
+ granularity: corridorOutlineGeometry._granularity,
+ saveAttributes: false
+ };
+ let attr;
+ if (extrude) {
+ params.height = height;
+ params.extrudedHeight = extrudedHeight;
+ params.offsetAttribute = corridorOutlineGeometry._offsetAttribute;
+ attr = computePositionsExtruded(params);
+ } else {
+ const computedPositions = CorridorGeometryLibrary_default.computePositions(params);
+ attr = combine(computedPositions, params.cornerType);
+ attr.attributes.position.values = PolygonPipeline_default.scaleToGeodeticHeight(
+ attr.attributes.position.values,
+ height,
+ ellipsoid
+ );
+ if (defined_default(corridorOutlineGeometry._offsetAttribute)) {
+ const length = attr.attributes.position.values.length;
+ const offsetValue = corridorOutlineGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
+ const applyOffset = new Uint8Array(length / 3).fill(offsetValue);
+ attr.attributes.applyOffset = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: applyOffset
+ });
+ }
+ }
+ const attributes = attr.attributes;
+ const boundingSphere = BoundingSphere_default.fromVertices(
+ attributes.position.values,
+ void 0,
+ 3
+ );
+ return new Geometry_default({
+ attributes,
+ indices: attr.indices,
+ primitiveType: PrimitiveType_default.LINES,
+ boundingSphere,
+ offsetAttribute: corridorOutlineGeometry._offsetAttribute
+ });
+};
+var CorridorOutlineGeometry_default = CorridorOutlineGeometry;
+
+// packages/engine/Source/Workers/createCorridorOutlineGeometry.js
+function createCorridorOutlineGeometry(corridorOutlineGeometry, offset) {
+ if (defined_default(offset)) {
+ corridorOutlineGeometry = CorridorOutlineGeometry_default.unpack(
+ corridorOutlineGeometry,
+ offset
+ );
+ }
+ corridorOutlineGeometry._ellipsoid = Ellipsoid_default.clone(
+ corridorOutlineGeometry._ellipsoid
+ );
+ return CorridorOutlineGeometry_default.createGeometry(corridorOutlineGeometry);
+}
+var createCorridorOutlineGeometry_default = createCorridorOutlineGeometry;
+export {
+ createCorridorOutlineGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createCylinderGeometry.js b/public/assets/cesium/Workers/createCylinderGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..9c0cd24af1a42b9dc69c248105a1112e7fece360
--- /dev/null
+++ b/public/assets/cesium/Workers/createCylinderGeometry.js
@@ -0,0 +1,58 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ CylinderGeometry_default
+} from "./chunk-L5GODJAR.js";
+import "./chunk-O72GZTSE.js";
+import "./chunk-GBT7MJ6X.js";
+import "./chunk-JBSKHTNX.js";
+import "./chunk-C4WPMOKT.js";
+import "./chunk-X7IQYYHF.js";
+import "./chunk-JXVLNVXC.js";
+import "./chunk-KHZNBFOH.js";
+import "./chunk-6SQMLVGV.js";
+import "./chunk-XIUSRWL6.js";
+import "./chunk-FFLMY4TE.js";
+import "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import "./chunk-U5HSOKPQ.js";
+import "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Workers/createCylinderGeometry.js
+function createCylinderGeometry(cylinderGeometry, offset) {
+ if (defined_default(offset)) {
+ cylinderGeometry = CylinderGeometry_default.unpack(cylinderGeometry, offset);
+ }
+ return CylinderGeometry_default.createGeometry(cylinderGeometry);
+}
+var createCylinderGeometry_default = createCylinderGeometry;
+export {
+ createCylinderGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createCylinderOutlineGeometry.js b/public/assets/cesium/Workers/createCylinderOutlineGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..781fa3405b1032b1c4d2cfe38940b7e10f641cf9
--- /dev/null
+++ b/public/assets/cesium/Workers/createCylinderOutlineGeometry.js
@@ -0,0 +1,229 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ CylinderGeometryLibrary_default
+} from "./chunk-O72GZTSE.js";
+import {
+ GeometryOffsetAttribute_default
+} from "./chunk-GBT7MJ6X.js";
+import {
+ IndexDatatype_default
+} from "./chunk-C4WPMOKT.js";
+import {
+ GeometryAttributes_default
+} from "./chunk-X7IQYYHF.js";
+import {
+ GeometryAttribute_default,
+ Geometry_default,
+ PrimitiveType_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ BoundingSphere_default
+} from "./chunk-KHZNBFOH.js";
+import "./chunk-6SQMLVGV.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian2_default,
+ Cartesian3_default
+} from "./chunk-FFLMY4TE.js";
+import "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default,
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/CylinderOutlineGeometry.js
+var radiusScratch = new Cartesian2_default();
+function CylinderOutlineGeometry(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const length = options.length;
+ const topRadius = options.topRadius;
+ const bottomRadius = options.bottomRadius;
+ const slices = defaultValue_default(options.slices, 128);
+ const numberOfVerticalLines = Math.max(
+ defaultValue_default(options.numberOfVerticalLines, 16),
+ 0
+ );
+ Check_default.typeOf.number("options.positions", length);
+ Check_default.typeOf.number("options.topRadius", topRadius);
+ Check_default.typeOf.number("options.bottomRadius", bottomRadius);
+ Check_default.typeOf.number.greaterThanOrEquals("options.slices", slices, 3);
+ if (defined_default(options.offsetAttribute) && options.offsetAttribute === GeometryOffsetAttribute_default.TOP) {
+ throw new DeveloperError_default(
+ "GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry."
+ );
+ }
+ this._length = length;
+ this._topRadius = topRadius;
+ this._bottomRadius = bottomRadius;
+ this._slices = slices;
+ this._numberOfVerticalLines = numberOfVerticalLines;
+ this._offsetAttribute = options.offsetAttribute;
+ this._workerName = "createCylinderOutlineGeometry";
+}
+CylinderOutlineGeometry.packedLength = 6;
+CylinderOutlineGeometry.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ array[startingIndex++] = value._length;
+ array[startingIndex++] = value._topRadius;
+ array[startingIndex++] = value._bottomRadius;
+ array[startingIndex++] = value._slices;
+ array[startingIndex++] = value._numberOfVerticalLines;
+ array[startingIndex] = defaultValue_default(value._offsetAttribute, -1);
+ return array;
+};
+var scratchOptions = {
+ length: void 0,
+ topRadius: void 0,
+ bottomRadius: void 0,
+ slices: void 0,
+ numberOfVerticalLines: void 0,
+ offsetAttribute: void 0
+};
+CylinderOutlineGeometry.unpack = function(array, startingIndex, result) {
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ const length = array[startingIndex++];
+ const topRadius = array[startingIndex++];
+ const bottomRadius = array[startingIndex++];
+ const slices = array[startingIndex++];
+ const numberOfVerticalLines = array[startingIndex++];
+ const offsetAttribute = array[startingIndex];
+ if (!defined_default(result)) {
+ scratchOptions.length = length;
+ scratchOptions.topRadius = topRadius;
+ scratchOptions.bottomRadius = bottomRadius;
+ scratchOptions.slices = slices;
+ scratchOptions.numberOfVerticalLines = numberOfVerticalLines;
+ scratchOptions.offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
+ return new CylinderOutlineGeometry(scratchOptions);
+ }
+ result._length = length;
+ result._topRadius = topRadius;
+ result._bottomRadius = bottomRadius;
+ result._slices = slices;
+ result._numberOfVerticalLines = numberOfVerticalLines;
+ result._offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
+ return result;
+};
+CylinderOutlineGeometry.createGeometry = function(cylinderGeometry) {
+ let length = cylinderGeometry._length;
+ const topRadius = cylinderGeometry._topRadius;
+ const bottomRadius = cylinderGeometry._bottomRadius;
+ const slices = cylinderGeometry._slices;
+ const numberOfVerticalLines = cylinderGeometry._numberOfVerticalLines;
+ if (length <= 0 || topRadius < 0 || bottomRadius < 0 || topRadius === 0 && bottomRadius === 0) {
+ return;
+ }
+ const numVertices = slices * 2;
+ const positions = CylinderGeometryLibrary_default.computePositions(
+ length,
+ topRadius,
+ bottomRadius,
+ slices,
+ false
+ );
+ let numIndices = slices * 2;
+ let numSide;
+ if (numberOfVerticalLines > 0) {
+ const numSideLines = Math.min(numberOfVerticalLines, slices);
+ numSide = Math.round(slices / numSideLines);
+ numIndices += numSideLines;
+ }
+ const indices = IndexDatatype_default.createTypedArray(numVertices, numIndices * 2);
+ let index = 0;
+ let i;
+ for (i = 0; i < slices - 1; i++) {
+ indices[index++] = i;
+ indices[index++] = i + 1;
+ indices[index++] = i + slices;
+ indices[index++] = i + 1 + slices;
+ }
+ indices[index++] = slices - 1;
+ indices[index++] = 0;
+ indices[index++] = slices + slices - 1;
+ indices[index++] = slices;
+ if (numberOfVerticalLines > 0) {
+ for (i = 0; i < slices; i += numSide) {
+ indices[index++] = i;
+ indices[index++] = i + slices;
+ }
+ }
+ const attributes = new GeometryAttributes_default();
+ attributes.position = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: positions
+ });
+ radiusScratch.x = length * 0.5;
+ radiusScratch.y = Math.max(bottomRadius, topRadius);
+ const boundingSphere = new BoundingSphere_default(
+ Cartesian3_default.ZERO,
+ Cartesian2_default.magnitude(radiusScratch)
+ );
+ if (defined_default(cylinderGeometry._offsetAttribute)) {
+ length = positions.length;
+ const offsetValue = cylinderGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
+ const applyOffset = new Uint8Array(length / 3).fill(offsetValue);
+ attributes.applyOffset = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: applyOffset
+ });
+ }
+ return new Geometry_default({
+ attributes,
+ indices,
+ primitiveType: PrimitiveType_default.LINES,
+ boundingSphere,
+ offsetAttribute: cylinderGeometry._offsetAttribute
+ });
+};
+var CylinderOutlineGeometry_default = CylinderOutlineGeometry;
+
+// packages/engine/Source/Workers/createCylinderOutlineGeometry.js
+function createCylinderOutlineGeometry(cylinderGeometry, offset) {
+ if (defined_default(offset)) {
+ cylinderGeometry = CylinderOutlineGeometry_default.unpack(cylinderGeometry, offset);
+ }
+ return CylinderOutlineGeometry_default.createGeometry(cylinderGeometry);
+}
+var createCylinderOutlineGeometry_default = createCylinderOutlineGeometry;
+export {
+ createCylinderOutlineGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createEllipseGeometry.js b/public/assets/cesium/Workers/createEllipseGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..290a3481d983af51c9aabafe1800102242fcd335
--- /dev/null
+++ b/public/assets/cesium/Workers/createEllipseGeometry.js
@@ -0,0 +1,69 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ EllipseGeometry_default
+} from "./chunk-ZVUUPJEM.js";
+import "./chunk-JISPSEF3.js";
+import "./chunk-YSIJTJ7N.js";
+import "./chunk-7ZZ5LMZY.js";
+import "./chunk-LJ2JQHJT.js";
+import "./chunk-NGZJIN5Z.js";
+import "./chunk-GBT7MJ6X.js";
+import "./chunk-JBSKHTNX.js";
+import "./chunk-QQOZO7KO.js";
+import "./chunk-EDLRS3AW.js";
+import "./chunk-C4WPMOKT.js";
+import "./chunk-X7IQYYHF.js";
+import "./chunk-JXVLNVXC.js";
+import "./chunk-KHZNBFOH.js";
+import "./chunk-6SQMLVGV.js";
+import "./chunk-XIUSRWL6.js";
+import {
+ Cartesian3_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import "./chunk-U5HSOKPQ.js";
+import "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Workers/createEllipseGeometry.js
+function createEllipseGeometry(ellipseGeometry, offset) {
+ if (defined_default(offset)) {
+ ellipseGeometry = EllipseGeometry_default.unpack(ellipseGeometry, offset);
+ }
+ ellipseGeometry._center = Cartesian3_default.clone(ellipseGeometry._center);
+ ellipseGeometry._ellipsoid = Ellipsoid_default.clone(ellipseGeometry._ellipsoid);
+ return EllipseGeometry_default.createGeometry(ellipseGeometry);
+}
+var createEllipseGeometry_default = createEllipseGeometry;
+export {
+ createEllipseGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createEllipseOutlineGeometry.js b/public/assets/cesium/Workers/createEllipseOutlineGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..26a955662b893bb62fba175a64a4d14900a09d3c
--- /dev/null
+++ b/public/assets/cesium/Workers/createEllipseOutlineGeometry.js
@@ -0,0 +1,62 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ EllipseOutlineGeometry_default
+} from "./chunk-2LOWCAMW.js";
+import "./chunk-JISPSEF3.js";
+import "./chunk-GBT7MJ6X.js";
+import "./chunk-C4WPMOKT.js";
+import "./chunk-X7IQYYHF.js";
+import "./chunk-JXVLNVXC.js";
+import "./chunk-KHZNBFOH.js";
+import "./chunk-6SQMLVGV.js";
+import "./chunk-XIUSRWL6.js";
+import {
+ Cartesian3_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import "./chunk-U5HSOKPQ.js";
+import "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Workers/createEllipseOutlineGeometry.js
+function createEllipseOutlineGeometry(ellipseGeometry, offset) {
+ if (defined_default(offset)) {
+ ellipseGeometry = EllipseOutlineGeometry_default.unpack(ellipseGeometry, offset);
+ }
+ ellipseGeometry._center = Cartesian3_default.clone(ellipseGeometry._center);
+ ellipseGeometry._ellipsoid = Ellipsoid_default.clone(ellipseGeometry._ellipsoid);
+ return EllipseOutlineGeometry_default.createGeometry(ellipseGeometry);
+}
+var createEllipseOutlineGeometry_default = createEllipseOutlineGeometry;
+export {
+ createEllipseOutlineGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createEllipsoidGeometry.js b/public/assets/cesium/Workers/createEllipsoidGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..05158f39db300f12f6611ed4de92281f718c3637
--- /dev/null
+++ b/public/assets/cesium/Workers/createEllipsoidGeometry.js
@@ -0,0 +1,57 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ EllipsoidGeometry_default
+} from "./chunk-IZGUQO6Q.js";
+import "./chunk-GBT7MJ6X.js";
+import "./chunk-JBSKHTNX.js";
+import "./chunk-C4WPMOKT.js";
+import "./chunk-X7IQYYHF.js";
+import "./chunk-JXVLNVXC.js";
+import "./chunk-KHZNBFOH.js";
+import "./chunk-6SQMLVGV.js";
+import "./chunk-XIUSRWL6.js";
+import "./chunk-FFLMY4TE.js";
+import "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import "./chunk-U5HSOKPQ.js";
+import "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Workers/createEllipsoidGeometry.js
+function createEllipsoidGeometry(ellipsoidGeometry, offset) {
+ if (defined_default(offset)) {
+ ellipsoidGeometry = EllipsoidGeometry_default.unpack(ellipsoidGeometry, offset);
+ }
+ return EllipsoidGeometry_default.createGeometry(ellipsoidGeometry);
+}
+var createEllipsoidGeometry_default = createEllipsoidGeometry;
+export {
+ createEllipsoidGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createEllipsoidOutlineGeometry.js b/public/assets/cesium/Workers/createEllipsoidOutlineGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..7d98040f64e45f8449ce5469b631616a216fbba9
--- /dev/null
+++ b/public/assets/cesium/Workers/createEllipsoidOutlineGeometry.js
@@ -0,0 +1,59 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ EllipsoidOutlineGeometry_default
+} from "./chunk-OPP2SKMA.js";
+import "./chunk-GBT7MJ6X.js";
+import "./chunk-C4WPMOKT.js";
+import "./chunk-X7IQYYHF.js";
+import "./chunk-JXVLNVXC.js";
+import "./chunk-KHZNBFOH.js";
+import "./chunk-6SQMLVGV.js";
+import "./chunk-XIUSRWL6.js";
+import "./chunk-FFLMY4TE.js";
+import "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import "./chunk-U5HSOKPQ.js";
+import "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Workers/createEllipsoidOutlineGeometry.js
+function createEllipsoidOutlineGeometry(ellipsoidGeometry, offset) {
+ if (defined_default(ellipsoidGeometry.buffer, offset)) {
+ ellipsoidGeometry = EllipsoidOutlineGeometry_default.unpack(
+ ellipsoidGeometry,
+ offset
+ );
+ }
+ return EllipsoidOutlineGeometry_default.createGeometry(ellipsoidGeometry);
+}
+var createEllipsoidOutlineGeometry_default = createEllipsoidOutlineGeometry;
+export {
+ createEllipsoidOutlineGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createFrustumGeometry.js b/public/assets/cesium/Workers/createFrustumGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..4a3b884de8fba77e9de9b18603ed05fb4dd2606d
--- /dev/null
+++ b/public/assets/cesium/Workers/createFrustumGeometry.js
@@ -0,0 +1,56 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ FrustumGeometry_default
+} from "./chunk-7YIOHQWH.js";
+import "./chunk-JBSKHTNX.js";
+import "./chunk-EDLRS3AW.js";
+import "./chunk-X7IQYYHF.js";
+import "./chunk-JXVLNVXC.js";
+import "./chunk-KHZNBFOH.js";
+import "./chunk-6SQMLVGV.js";
+import "./chunk-XIUSRWL6.js";
+import "./chunk-FFLMY4TE.js";
+import "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import "./chunk-U5HSOKPQ.js";
+import "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Workers/createFrustumGeometry.js
+function createFrustumGeometry(frustumGeometry, offset) {
+ if (defined_default(offset)) {
+ frustumGeometry = FrustumGeometry_default.unpack(frustumGeometry, offset);
+ }
+ return FrustumGeometry_default.createGeometry(frustumGeometry);
+}
+var createFrustumGeometry_default = createFrustumGeometry;
+export {
+ createFrustumGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createFrustumOutlineGeometry.js b/public/assets/cesium/Workers/createFrustumOutlineGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..bd9a938ad40ba04bdd19982bb2cf2fe808a40c8f
--- /dev/null
+++ b/public/assets/cesium/Workers/createFrustumOutlineGeometry.js
@@ -0,0 +1,234 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ FrustumGeometry_default,
+ OrthographicFrustum_default,
+ PerspectiveFrustum_default
+} from "./chunk-7YIOHQWH.js";
+import "./chunk-JBSKHTNX.js";
+import "./chunk-EDLRS3AW.js";
+import {
+ GeometryAttributes_default
+} from "./chunk-X7IQYYHF.js";
+import {
+ GeometryAttribute_default,
+ Geometry_default,
+ PrimitiveType_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ BoundingSphere_default
+} from "./chunk-KHZNBFOH.js";
+import {
+ Quaternion_default
+} from "./chunk-6SQMLVGV.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian3_default
+} from "./chunk-FFLMY4TE.js";
+import "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/FrustumOutlineGeometry.js
+var PERSPECTIVE = 0;
+var ORTHOGRAPHIC = 1;
+function FrustumOutlineGeometry(options) {
+ Check_default.typeOf.object("options", options);
+ Check_default.typeOf.object("options.frustum", options.frustum);
+ Check_default.typeOf.object("options.origin", options.origin);
+ Check_default.typeOf.object("options.orientation", options.orientation);
+ const frustum = options.frustum;
+ const orientation = options.orientation;
+ const origin = options.origin;
+ const drawNearPlane = defaultValue_default(options._drawNearPlane, true);
+ let frustumType;
+ let frustumPackedLength;
+ if (frustum instanceof PerspectiveFrustum_default) {
+ frustumType = PERSPECTIVE;
+ frustumPackedLength = PerspectiveFrustum_default.packedLength;
+ } else if (frustum instanceof OrthographicFrustum_default) {
+ frustumType = ORTHOGRAPHIC;
+ frustumPackedLength = OrthographicFrustum_default.packedLength;
+ }
+ this._frustumType = frustumType;
+ this._frustum = frustum.clone();
+ this._origin = Cartesian3_default.clone(origin);
+ this._orientation = Quaternion_default.clone(orientation);
+ this._drawNearPlane = drawNearPlane;
+ this._workerName = "createFrustumOutlineGeometry";
+ this.packedLength = 2 + frustumPackedLength + Cartesian3_default.packedLength + Quaternion_default.packedLength;
+}
+FrustumOutlineGeometry.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ const frustumType = value._frustumType;
+ const frustum = value._frustum;
+ array[startingIndex++] = frustumType;
+ if (frustumType === PERSPECTIVE) {
+ PerspectiveFrustum_default.pack(frustum, array, startingIndex);
+ startingIndex += PerspectiveFrustum_default.packedLength;
+ } else {
+ OrthographicFrustum_default.pack(frustum, array, startingIndex);
+ startingIndex += OrthographicFrustum_default.packedLength;
+ }
+ Cartesian3_default.pack(value._origin, array, startingIndex);
+ startingIndex += Cartesian3_default.packedLength;
+ Quaternion_default.pack(value._orientation, array, startingIndex);
+ startingIndex += Quaternion_default.packedLength;
+ array[startingIndex] = value._drawNearPlane ? 1 : 0;
+ return array;
+};
+var scratchPackPerspective = new PerspectiveFrustum_default();
+var scratchPackOrthographic = new OrthographicFrustum_default();
+var scratchPackQuaternion = new Quaternion_default();
+var scratchPackorigin = new Cartesian3_default();
+FrustumOutlineGeometry.unpack = function(array, startingIndex, result) {
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ const frustumType = array[startingIndex++];
+ let frustum;
+ if (frustumType === PERSPECTIVE) {
+ frustum = PerspectiveFrustum_default.unpack(
+ array,
+ startingIndex,
+ scratchPackPerspective
+ );
+ startingIndex += PerspectiveFrustum_default.packedLength;
+ } else {
+ frustum = OrthographicFrustum_default.unpack(
+ array,
+ startingIndex,
+ scratchPackOrthographic
+ );
+ startingIndex += OrthographicFrustum_default.packedLength;
+ }
+ const origin = Cartesian3_default.unpack(array, startingIndex, scratchPackorigin);
+ startingIndex += Cartesian3_default.packedLength;
+ const orientation = Quaternion_default.unpack(
+ array,
+ startingIndex,
+ scratchPackQuaternion
+ );
+ startingIndex += Quaternion_default.packedLength;
+ const drawNearPlane = array[startingIndex] === 1;
+ if (!defined_default(result)) {
+ return new FrustumOutlineGeometry({
+ frustum,
+ origin,
+ orientation,
+ _drawNearPlane: drawNearPlane
+ });
+ }
+ const frustumResult = frustumType === result._frustumType ? result._frustum : void 0;
+ result._frustum = frustum.clone(frustumResult);
+ result._frustumType = frustumType;
+ result._origin = Cartesian3_default.clone(origin, result._origin);
+ result._orientation = Quaternion_default.clone(orientation, result._orientation);
+ result._drawNearPlane = drawNearPlane;
+ return result;
+};
+FrustumOutlineGeometry.createGeometry = function(frustumGeometry) {
+ const frustumType = frustumGeometry._frustumType;
+ const frustum = frustumGeometry._frustum;
+ const origin = frustumGeometry._origin;
+ const orientation = frustumGeometry._orientation;
+ const drawNearPlane = frustumGeometry._drawNearPlane;
+ const positions = new Float64Array(3 * 4 * 2);
+ FrustumGeometry_default._computeNearFarPlanes(
+ origin,
+ orientation,
+ frustumType,
+ frustum,
+ positions
+ );
+ const attributes = new GeometryAttributes_default({
+ position: new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: positions
+ })
+ });
+ let offset;
+ let index;
+ const numberOfPlanes = drawNearPlane ? 2 : 1;
+ const indices = new Uint16Array(8 * (numberOfPlanes + 1));
+ let i = drawNearPlane ? 0 : 1;
+ for (; i < 2; ++i) {
+ offset = drawNearPlane ? i * 8 : 0;
+ index = i * 4;
+ indices[offset] = index;
+ indices[offset + 1] = index + 1;
+ indices[offset + 2] = index + 1;
+ indices[offset + 3] = index + 2;
+ indices[offset + 4] = index + 2;
+ indices[offset + 5] = index + 3;
+ indices[offset + 6] = index + 3;
+ indices[offset + 7] = index;
+ }
+ for (i = 0; i < 2; ++i) {
+ offset = (numberOfPlanes + i) * 8;
+ index = i * 4;
+ indices[offset] = index;
+ indices[offset + 1] = index + 4;
+ indices[offset + 2] = index + 1;
+ indices[offset + 3] = index + 5;
+ indices[offset + 4] = index + 2;
+ indices[offset + 5] = index + 6;
+ indices[offset + 6] = index + 3;
+ indices[offset + 7] = index + 7;
+ }
+ return new Geometry_default({
+ attributes,
+ indices,
+ primitiveType: PrimitiveType_default.LINES,
+ boundingSphere: BoundingSphere_default.fromVertices(positions)
+ });
+};
+var FrustumOutlineGeometry_default = FrustumOutlineGeometry;
+
+// packages/engine/Source/Workers/createFrustumOutlineGeometry.js
+function createFrustumOutlineGeometry(frustumGeometry, offset) {
+ if (defined_default(offset)) {
+ frustumGeometry = FrustumOutlineGeometry_default.unpack(frustumGeometry, offset);
+ }
+ return FrustumOutlineGeometry_default.createGeometry(frustumGeometry);
+}
+var createFrustumOutlineGeometry_default = createFrustumOutlineGeometry;
+export {
+ createFrustumOutlineGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createGeometry.js b/public/assets/cesium/Workers/createGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..9c37e4d3f19663d6e3add9969c48d01e50e4852e
--- /dev/null
+++ b/public/assets/cesium/Workers/createGeometry.js
@@ -0,0 +1,169 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ PrimitivePipeline_default
+} from "./chunk-IBRIWOCM.js";
+import {
+ createTaskProcessorWorker_default
+} from "./chunk-Z2QP3CXW.js";
+import "./chunk-RJM36CNY.js";
+import "./chunk-7ZZ5LMZY.js";
+import "./chunk-LJ2JQHJT.js";
+import "./chunk-NGZJIN5Z.js";
+import "./chunk-QQOZO7KO.js";
+import "./chunk-EDLRS3AW.js";
+import "./chunk-C4WPMOKT.js";
+import "./chunk-X7IQYYHF.js";
+import "./chunk-JXVLNVXC.js";
+import "./chunk-KHZNBFOH.js";
+import "./chunk-6SQMLVGV.js";
+import "./chunk-XIUSRWL6.js";
+import "./chunk-FFLMY4TE.js";
+import "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ __glob,
+ __require,
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// import("./**/*.js") in packages/engine/Source/Workers/createGeometry.js
+var globImport_js = __glob({
+ "./combineGeometry.js": () => import("./combineGeometry.js"),
+ "./createBoxGeometry.js": () => import("./createBoxGeometry.js"),
+ "./createBoxOutlineGeometry.js": () => import("./createBoxOutlineGeometry.js"),
+ "./createCircleGeometry.js": () => import("./createCircleGeometry.js"),
+ "./createCircleOutlineGeometry.js": () => import("./createCircleOutlineGeometry.js"),
+ "./createCoplanarPolygonGeometry.js": () => import("./createCoplanarPolygonGeometry.js"),
+ "./createCoplanarPolygonOutlineGeometry.js": () => import("./createCoplanarPolygonOutlineGeometry.js"),
+ "./createCorridorGeometry.js": () => import("./createCorridorGeometry.js"),
+ "./createCorridorOutlineGeometry.js": () => import("./createCorridorOutlineGeometry.js"),
+ "./createCylinderGeometry.js": () => import("./createCylinderGeometry.js"),
+ "./createCylinderOutlineGeometry.js": () => import("./createCylinderOutlineGeometry.js"),
+ "./createEllipseGeometry.js": () => import("./createEllipseGeometry.js"),
+ "./createEllipseOutlineGeometry.js": () => import("./createEllipseOutlineGeometry.js"),
+ "./createEllipsoidGeometry.js": () => import("./createEllipsoidGeometry.js"),
+ "./createEllipsoidOutlineGeometry.js": () => import("./createEllipsoidOutlineGeometry.js"),
+ "./createFrustumGeometry.js": () => import("./createFrustumGeometry.js"),
+ "./createFrustumOutlineGeometry.js": () => import("./createFrustumOutlineGeometry.js"),
+ "./createGeometry.js": () => import("./createGeometry.js"),
+ "./createGroundPolylineGeometry.js": () => import("./createGroundPolylineGeometry.js"),
+ "./createPlaneGeometry.js": () => import("./createPlaneGeometry.js"),
+ "./createPlaneOutlineGeometry.js": () => import("./createPlaneOutlineGeometry.js"),
+ "./createPolygonGeometry.js": () => import("./createPolygonGeometry.js"),
+ "./createPolygonOutlineGeometry.js": () => import("./createPolygonOutlineGeometry.js"),
+ "./createPolylineGeometry.js": () => import("./createPolylineGeometry.js"),
+ "./createPolylineVolumeGeometry.js": () => import("./createPolylineVolumeGeometry.js"),
+ "./createPolylineVolumeOutlineGeometry.js": () => import("./createPolylineVolumeOutlineGeometry.js"),
+ "./createRectangleGeometry.js": () => import("./createRectangleGeometry.js"),
+ "./createRectangleOutlineGeometry.js": () => import("./createRectangleOutlineGeometry.js"),
+ "./createSimplePolylineGeometry.js": () => import("./createSimplePolylineGeometry.js"),
+ "./createSphereGeometry.js": () => import("./createSphereGeometry.js"),
+ "./createSphereOutlineGeometry.js": () => import("./createSphereOutlineGeometry.js"),
+ "./createTaskProcessorWorker.js": () => import("./createTaskProcessorWorker.js"),
+ "./createVectorTileClampedPolylines.js": () => import("./createVectorTileClampedPolylines.js"),
+ "./createVectorTileGeometries.js": () => import("./createVectorTileGeometries.js"),
+ "./createVectorTilePoints.js": () => import("./createVectorTilePoints.js"),
+ "./createVectorTilePolygons.js": () => import("./createVectorTilePolygons.js"),
+ "./createVectorTilePolylines.js": () => import("./createVectorTilePolylines.js"),
+ "./createVerticesFromGoogleEarthEnterpriseBuffer.js": () => import("./createVerticesFromGoogleEarthEnterpriseBuffer.js"),
+ "./createVerticesFromHeightmap.js": () => import("./createVerticesFromHeightmap.js"),
+ "./createVerticesFromQuantizedTerrainMesh.js": () => import("./createVerticesFromQuantizedTerrainMesh.js"),
+ "./createWallGeometry.js": () => import("./createWallGeometry.js"),
+ "./createWallOutlineGeometry.js": () => import("./createWallOutlineGeometry.js"),
+ "./decodeDraco.js": () => import("./decodeDraco.js"),
+ "./decodeGoogleEarthEnterprisePacket.js": () => import("./decodeGoogleEarthEnterprisePacket.js"),
+ "./decodeI3S.js": () => import("./decodeI3S.js"),
+ "./transcodeKTX2.js": () => import("./transcodeKTX2.js"),
+ "./transferTypedArrayTest.js": () => import("./transferTypedArrayTest.js"),
+ "./upsampleQuantizedTerrainMesh.js": () => import("./upsampleQuantizedTerrainMesh.js")
+});
+
+// packages/engine/Source/Workers/createGeometry.js
+var moduleCache = {};
+async function getModule(moduleName, modulePath) {
+ let module = defaultValue_default(moduleCache[modulePath], moduleCache[moduleName]);
+ if (defined_default(module)) {
+ return module;
+ }
+ if (defined_default(modulePath)) {
+ if (typeof exports === "object") {
+ module = __require(modulePath);
+ } else {
+ const result = await import(modulePath);
+ module = result.default;
+ }
+ moduleCache[modulePath] = module;
+ return module;
+ }
+ if (typeof exports === "object") {
+ module = __require(`Workers/${moduleName}`);
+ } else {
+ const result = defined_default(modulePath) ? await import(modulePath) : await globImport_js(`./${moduleName}.js`);
+ module = result.default;
+ }
+ moduleCache[moduleName] = module;
+ return module;
+}
+async function createGeometry(parameters, transferableObjects) {
+ const subTasks = parameters.subTasks;
+ const length = subTasks.length;
+ const resultsOrPromises = new Array(length);
+ for (let i = 0; i < length; i++) {
+ const task = subTasks[i];
+ const geometry = task.geometry;
+ const moduleName = task.moduleName;
+ const modulePath = task.modulePath;
+ if (defined_default(moduleName) && defined_default(modulePath)) {
+ throw new DeveloperError_default("Must only set moduleName or modulePath");
+ }
+ if (defined_default(moduleName) || defined_default(modulePath)) {
+ resultsOrPromises[i] = getModule(
+ moduleName,
+ modulePath
+ ).then((createFunction) => createFunction(geometry, task.offset));
+ } else {
+ resultsOrPromises[i] = geometry;
+ }
+ }
+ return Promise.all(resultsOrPromises).then(function(results) {
+ return PrimitivePipeline_default.packCreateGeometryResults(
+ results,
+ transferableObjects
+ );
+ });
+}
+var createGeometry_default = createTaskProcessorWorker_default(createGeometry);
+export {
+ createGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createGroundPolylineGeometry.js b/public/assets/cesium/Workers/createGroundPolylineGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..bd71dcec6de360d32cd4ee21567d949729a7e513
--- /dev/null
+++ b/public/assets/cesium/Workers/createGroundPolylineGeometry.js
@@ -0,0 +1,1606 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ WebMercatorProjection_default
+} from "./chunk-RJM36CNY.js";
+import {
+ ArcType_default
+} from "./chunk-XWOUPGUF.js";
+import {
+ EncodedCartesian3_default
+} from "./chunk-NGZJIN5Z.js";
+import {
+ EllipsoidGeodesic_default
+} from "./chunk-C3EQ27WF.js";
+import {
+ arrayRemoveDuplicates_default
+} from "./chunk-57H6I3SV.js";
+import {
+ EllipsoidRhumbLine_default
+} from "./chunk-JSQJDZI4.js";
+import {
+ IntersectionTests_default
+} from "./chunk-QQOZO7KO.js";
+import {
+ Plane_default
+} from "./chunk-EDLRS3AW.js";
+import {
+ GeometryAttribute_default,
+ Geometry_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ BoundingSphere_default,
+ GeographicProjection_default
+} from "./chunk-KHZNBFOH.js";
+import {
+ Quaternion_default,
+ Rectangle_default,
+ Resource_default,
+ buildModuleUrl_default
+} from "./chunk-6SQMLVGV.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian2_default,
+ Cartesian3_default,
+ Cartographic_default,
+ Ellipsoid_default,
+ Matrix3_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default,
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/GeographicTilingScheme.js
+function GeographicTilingScheme(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ this._ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default);
+ this._rectangle = defaultValue_default(options.rectangle, Rectangle_default.MAX_VALUE);
+ this._projection = new GeographicProjection_default(this._ellipsoid);
+ this._numberOfLevelZeroTilesX = defaultValue_default(
+ options.numberOfLevelZeroTilesX,
+ 2
+ );
+ this._numberOfLevelZeroTilesY = defaultValue_default(
+ options.numberOfLevelZeroTilesY,
+ 1
+ );
+}
+Object.defineProperties(GeographicTilingScheme.prototype, {
+ /**
+ * Gets the ellipsoid that is tiled by this tiling scheme.
+ * @memberof GeographicTilingScheme.prototype
+ * @type {Ellipsoid}
+ */
+ ellipsoid: {
+ get: function() {
+ return this._ellipsoid;
+ }
+ },
+ /**
+ * Gets the rectangle, in radians, covered by this tiling scheme.
+ * @memberof GeographicTilingScheme.prototype
+ * @type {Rectangle}
+ */
+ rectangle: {
+ get: function() {
+ return this._rectangle;
+ }
+ },
+ /**
+ * Gets the map projection used by this tiling scheme.
+ * @memberof GeographicTilingScheme.prototype
+ * @type {MapProjection}
+ */
+ projection: {
+ get: function() {
+ return this._projection;
+ }
+ }
+});
+GeographicTilingScheme.prototype.getNumberOfXTilesAtLevel = function(level) {
+ return this._numberOfLevelZeroTilesX << level;
+};
+GeographicTilingScheme.prototype.getNumberOfYTilesAtLevel = function(level) {
+ return this._numberOfLevelZeroTilesY << level;
+};
+GeographicTilingScheme.prototype.rectangleToNativeRectangle = function(rectangle, result) {
+ Check_default.defined("rectangle", rectangle);
+ const west = Math_default.toDegrees(rectangle.west);
+ const south = Math_default.toDegrees(rectangle.south);
+ const east = Math_default.toDegrees(rectangle.east);
+ const north = Math_default.toDegrees(rectangle.north);
+ if (!defined_default(result)) {
+ return new Rectangle_default(west, south, east, north);
+ }
+ result.west = west;
+ result.south = south;
+ result.east = east;
+ result.north = north;
+ return result;
+};
+GeographicTilingScheme.prototype.tileXYToNativeRectangle = function(x, y, level, result) {
+ const rectangleRadians = this.tileXYToRectangle(x, y, level, result);
+ rectangleRadians.west = Math_default.toDegrees(rectangleRadians.west);
+ rectangleRadians.south = Math_default.toDegrees(rectangleRadians.south);
+ rectangleRadians.east = Math_default.toDegrees(rectangleRadians.east);
+ rectangleRadians.north = Math_default.toDegrees(rectangleRadians.north);
+ return rectangleRadians;
+};
+GeographicTilingScheme.prototype.tileXYToRectangle = function(x, y, level, result) {
+ const rectangle = this._rectangle;
+ const xTiles = this.getNumberOfXTilesAtLevel(level);
+ const yTiles = this.getNumberOfYTilesAtLevel(level);
+ const xTileWidth = rectangle.width / xTiles;
+ const west = x * xTileWidth + rectangle.west;
+ const east = (x + 1) * xTileWidth + rectangle.west;
+ const yTileHeight = rectangle.height / yTiles;
+ const north = rectangle.north - y * yTileHeight;
+ const south = rectangle.north - (y + 1) * yTileHeight;
+ if (!defined_default(result)) {
+ result = new Rectangle_default(west, south, east, north);
+ }
+ result.west = west;
+ result.south = south;
+ result.east = east;
+ result.north = north;
+ return result;
+};
+GeographicTilingScheme.prototype.positionToTileXY = function(position, level, result) {
+ const rectangle = this._rectangle;
+ if (!Rectangle_default.contains(rectangle, position)) {
+ return void 0;
+ }
+ const xTiles = this.getNumberOfXTilesAtLevel(level);
+ const yTiles = this.getNumberOfYTilesAtLevel(level);
+ const xTileWidth = rectangle.width / xTiles;
+ const yTileHeight = rectangle.height / yTiles;
+ let longitude = position.longitude;
+ if (rectangle.east < rectangle.west) {
+ longitude += Math_default.TWO_PI;
+ }
+ let xTileCoordinate = (longitude - rectangle.west) / xTileWidth | 0;
+ if (xTileCoordinate >= xTiles) {
+ xTileCoordinate = xTiles - 1;
+ }
+ let yTileCoordinate = (rectangle.north - position.latitude) / yTileHeight | 0;
+ if (yTileCoordinate >= yTiles) {
+ yTileCoordinate = yTiles - 1;
+ }
+ if (!defined_default(result)) {
+ return new Cartesian2_default(xTileCoordinate, yTileCoordinate);
+ }
+ result.x = xTileCoordinate;
+ result.y = yTileCoordinate;
+ return result;
+};
+var GeographicTilingScheme_default = GeographicTilingScheme;
+
+// packages/engine/Source/Core/ApproximateTerrainHeights.js
+var scratchDiagonalCartesianNE = new Cartesian3_default();
+var scratchDiagonalCartesianSW = new Cartesian3_default();
+var scratchDiagonalCartographic = new Cartographic_default();
+var scratchCenterCartesian = new Cartesian3_default();
+var scratchSurfaceCartesian = new Cartesian3_default();
+var scratchBoundingSphere = new BoundingSphere_default();
+var tilingScheme = new GeographicTilingScheme_default();
+var scratchCorners = [
+ new Cartographic_default(),
+ new Cartographic_default(),
+ new Cartographic_default(),
+ new Cartographic_default()
+];
+var scratchTileXY = new Cartesian2_default();
+var ApproximateTerrainHeights = {};
+ApproximateTerrainHeights.initialize = function() {
+ let initPromise = ApproximateTerrainHeights._initPromise;
+ if (defined_default(initPromise)) {
+ return initPromise;
+ }
+ initPromise = Resource_default.fetchJson(
+ buildModuleUrl_default("Assets/approximateTerrainHeights.json")
+ ).then(function(json) {
+ ApproximateTerrainHeights._terrainHeights = json;
+ });
+ ApproximateTerrainHeights._initPromise = initPromise;
+ return initPromise;
+};
+ApproximateTerrainHeights.getMinimumMaximumHeights = function(rectangle, ellipsoid) {
+ Check_default.defined("rectangle", rectangle);
+ if (!defined_default(ApproximateTerrainHeights._terrainHeights)) {
+ throw new DeveloperError_default(
+ "You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function"
+ );
+ }
+ ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.default);
+ const xyLevel = getTileXYLevel(rectangle);
+ let minTerrainHeight = ApproximateTerrainHeights._defaultMinTerrainHeight;
+ let maxTerrainHeight = ApproximateTerrainHeights._defaultMaxTerrainHeight;
+ if (defined_default(xyLevel)) {
+ const key = `${xyLevel.level}-${xyLevel.x}-${xyLevel.y}`;
+ const heights = ApproximateTerrainHeights._terrainHeights[key];
+ if (defined_default(heights)) {
+ minTerrainHeight = heights[0];
+ maxTerrainHeight = heights[1];
+ }
+ ellipsoid.cartographicToCartesian(
+ Rectangle_default.northeast(rectangle, scratchDiagonalCartographic),
+ scratchDiagonalCartesianNE
+ );
+ ellipsoid.cartographicToCartesian(
+ Rectangle_default.southwest(rectangle, scratchDiagonalCartographic),
+ scratchDiagonalCartesianSW
+ );
+ Cartesian3_default.midpoint(
+ scratchDiagonalCartesianSW,
+ scratchDiagonalCartesianNE,
+ scratchCenterCartesian
+ );
+ const surfacePosition = ellipsoid.scaleToGeodeticSurface(
+ scratchCenterCartesian,
+ scratchSurfaceCartesian
+ );
+ if (defined_default(surfacePosition)) {
+ const distance = Cartesian3_default.distance(
+ scratchCenterCartesian,
+ surfacePosition
+ );
+ minTerrainHeight = Math.min(minTerrainHeight, -distance);
+ } else {
+ minTerrainHeight = ApproximateTerrainHeights._defaultMinTerrainHeight;
+ }
+ }
+ minTerrainHeight = Math.max(
+ ApproximateTerrainHeights._defaultMinTerrainHeight,
+ minTerrainHeight
+ );
+ return {
+ minimumTerrainHeight: minTerrainHeight,
+ maximumTerrainHeight: maxTerrainHeight
+ };
+};
+ApproximateTerrainHeights.getBoundingSphere = function(rectangle, ellipsoid) {
+ Check_default.defined("rectangle", rectangle);
+ if (!defined_default(ApproximateTerrainHeights._terrainHeights)) {
+ throw new DeveloperError_default(
+ "You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function"
+ );
+ }
+ ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.default);
+ const xyLevel = getTileXYLevel(rectangle);
+ let maxTerrainHeight = ApproximateTerrainHeights._defaultMaxTerrainHeight;
+ if (defined_default(xyLevel)) {
+ const key = `${xyLevel.level}-${xyLevel.x}-${xyLevel.y}`;
+ const heights = ApproximateTerrainHeights._terrainHeights[key];
+ if (defined_default(heights)) {
+ maxTerrainHeight = heights[1];
+ }
+ }
+ const result = BoundingSphere_default.fromRectangle3D(rectangle, ellipsoid, 0);
+ BoundingSphere_default.fromRectangle3D(
+ rectangle,
+ ellipsoid,
+ maxTerrainHeight,
+ scratchBoundingSphere
+ );
+ return BoundingSphere_default.union(result, scratchBoundingSphere, result);
+};
+function getTileXYLevel(rectangle) {
+ Cartographic_default.fromRadians(
+ rectangle.east,
+ rectangle.north,
+ 0,
+ scratchCorners[0]
+ );
+ Cartographic_default.fromRadians(
+ rectangle.west,
+ rectangle.north,
+ 0,
+ scratchCorners[1]
+ );
+ Cartographic_default.fromRadians(
+ rectangle.east,
+ rectangle.south,
+ 0,
+ scratchCorners[2]
+ );
+ Cartographic_default.fromRadians(
+ rectangle.west,
+ rectangle.south,
+ 0,
+ scratchCorners[3]
+ );
+ let lastLevelX = 0, lastLevelY = 0;
+ let currentX = 0, currentY = 0;
+ const maxLevel = ApproximateTerrainHeights._terrainHeightsMaxLevel;
+ let i;
+ for (i = 0; i <= maxLevel; ++i) {
+ let failed = false;
+ for (let j = 0; j < 4; ++j) {
+ const corner = scratchCorners[j];
+ tilingScheme.positionToTileXY(corner, i, scratchTileXY);
+ if (j === 0) {
+ currentX = scratchTileXY.x;
+ currentY = scratchTileXY.y;
+ } else if (currentX !== scratchTileXY.x || currentY !== scratchTileXY.y) {
+ failed = true;
+ break;
+ }
+ }
+ if (failed) {
+ break;
+ }
+ lastLevelX = currentX;
+ lastLevelY = currentY;
+ }
+ if (i === 0) {
+ return void 0;
+ }
+ return {
+ x: lastLevelX,
+ y: lastLevelY,
+ level: i > maxLevel ? maxLevel : i - 1
+ };
+}
+ApproximateTerrainHeights._terrainHeightsMaxLevel = 6;
+ApproximateTerrainHeights._defaultMaxTerrainHeight = 9e3;
+ApproximateTerrainHeights._defaultMinTerrainHeight = -1e5;
+ApproximateTerrainHeights._terrainHeights = void 0;
+ApproximateTerrainHeights._initPromise = void 0;
+Object.defineProperties(ApproximateTerrainHeights, {
+ /**
+ * Determines if the terrain heights are initialized and ready to use. To initialize the terrain heights,
+ * call {@link ApproximateTerrainHeights#initialize} and wait for the returned promise to resolve.
+ * @type {boolean}
+ * @readonly
+ * @memberof ApproximateTerrainHeights
+ */
+ initialized: {
+ get: function() {
+ return defined_default(ApproximateTerrainHeights._terrainHeights);
+ }
+ }
+});
+var ApproximateTerrainHeights_default = ApproximateTerrainHeights;
+
+// packages/engine/Source/Core/GroundPolylineGeometry.js
+var PROJECTIONS = [GeographicProjection_default, WebMercatorProjection_default];
+var PROJECTION_COUNT = PROJECTIONS.length;
+var MITER_BREAK_SMALL = Math.cos(Math_default.toRadians(30));
+var MITER_BREAK_LARGE = Math.cos(Math_default.toRadians(150));
+var WALL_INITIAL_MIN_HEIGHT = 0;
+var WALL_INITIAL_MAX_HEIGHT = 1e3;
+function GroundPolylineGeometry(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const positions = options.positions;
+ if (!defined_default(positions) || positions.length < 2) {
+ throw new DeveloperError_default("At least two positions are required.");
+ }
+ if (defined_default(options.arcType) && options.arcType !== ArcType_default.GEODESIC && options.arcType !== ArcType_default.RHUMB) {
+ throw new DeveloperError_default(
+ "Valid options for arcType are ArcType.GEODESIC and ArcType.RHUMB."
+ );
+ }
+ this.width = defaultValue_default(options.width, 1);
+ this._positions = positions;
+ this.granularity = defaultValue_default(options.granularity, 9999);
+ this.loop = defaultValue_default(options.loop, false);
+ this.arcType = defaultValue_default(options.arcType, ArcType_default.GEODESIC);
+ this._ellipsoid = Ellipsoid_default.default;
+ this._projectionIndex = 0;
+ this._workerName = "createGroundPolylineGeometry";
+ this._scene3DOnly = false;
+}
+Object.defineProperties(GroundPolylineGeometry.prototype, {
+ /**
+ * The number of elements used to pack the object into an array.
+ * @memberof GroundPolylineGeometry.prototype
+ * @type {number}
+ * @readonly
+ * @private
+ */
+ packedLength: {
+ get: function() {
+ return 1 + this._positions.length * 3 + 1 + 1 + 1 + Ellipsoid_default.packedLength + 1 + 1;
+ }
+ }
+});
+GroundPolylineGeometry.setProjectionAndEllipsoid = function(groundPolylineGeometry, mapProjection) {
+ let projectionIndex = 0;
+ for (let i = 0; i < PROJECTION_COUNT; i++) {
+ if (mapProjection instanceof PROJECTIONS[i]) {
+ projectionIndex = i;
+ break;
+ }
+ }
+ groundPolylineGeometry._projectionIndex = projectionIndex;
+ groundPolylineGeometry._ellipsoid = mapProjection.ellipsoid;
+};
+var cart3Scratch1 = new Cartesian3_default();
+var cart3Scratch2 = new Cartesian3_default();
+var cart3Scratch3 = new Cartesian3_default();
+function computeRightNormal(start, end, maxHeight, ellipsoid, result) {
+ const startBottom = getPosition(ellipsoid, start, 0, cart3Scratch1);
+ const startTop = getPosition(ellipsoid, start, maxHeight, cart3Scratch2);
+ const endBottom = getPosition(ellipsoid, end, 0, cart3Scratch3);
+ const up = direction(startTop, startBottom, cart3Scratch2);
+ const forward = direction(endBottom, startBottom, cart3Scratch3);
+ Cartesian3_default.cross(forward, up, result);
+ return Cartesian3_default.normalize(result, result);
+}
+var interpolatedCartographicScratch = new Cartographic_default();
+var interpolatedBottomScratch = new Cartesian3_default();
+var interpolatedTopScratch = new Cartesian3_default();
+var interpolatedNormalScratch = new Cartesian3_default();
+function interpolateSegment(start, end, minHeight, maxHeight, granularity, arcType, ellipsoid, normalsArray, bottomPositionsArray, topPositionsArray, cartographicsArray) {
+ if (granularity === 0) {
+ return;
+ }
+ let ellipsoidLine;
+ if (arcType === ArcType_default.GEODESIC) {
+ ellipsoidLine = new EllipsoidGeodesic_default(start, end, ellipsoid);
+ } else if (arcType === ArcType_default.RHUMB) {
+ ellipsoidLine = new EllipsoidRhumbLine_default(start, end, ellipsoid);
+ }
+ const surfaceDistance = ellipsoidLine.surfaceDistance;
+ if (surfaceDistance < granularity) {
+ return;
+ }
+ const interpolatedNormal = computeRightNormal(
+ start,
+ end,
+ maxHeight,
+ ellipsoid,
+ interpolatedNormalScratch
+ );
+ const segments = Math.ceil(surfaceDistance / granularity);
+ const interpointDistance = surfaceDistance / segments;
+ let distanceFromStart = interpointDistance;
+ const pointsToAdd = segments - 1;
+ let packIndex = normalsArray.length;
+ for (let i = 0; i < pointsToAdd; i++) {
+ const interpolatedCartographic = ellipsoidLine.interpolateUsingSurfaceDistance(
+ distanceFromStart,
+ interpolatedCartographicScratch
+ );
+ const interpolatedBottom = getPosition(
+ ellipsoid,
+ interpolatedCartographic,
+ minHeight,
+ interpolatedBottomScratch
+ );
+ const interpolatedTop = getPosition(
+ ellipsoid,
+ interpolatedCartographic,
+ maxHeight,
+ interpolatedTopScratch
+ );
+ Cartesian3_default.pack(interpolatedNormal, normalsArray, packIndex);
+ Cartesian3_default.pack(interpolatedBottom, bottomPositionsArray, packIndex);
+ Cartesian3_default.pack(interpolatedTop, topPositionsArray, packIndex);
+ cartographicsArray.push(interpolatedCartographic.latitude);
+ cartographicsArray.push(interpolatedCartographic.longitude);
+ packIndex += 3;
+ distanceFromStart += interpointDistance;
+ }
+}
+var heightlessCartographicScratch = new Cartographic_default();
+function getPosition(ellipsoid, cartographic, height, result) {
+ Cartographic_default.clone(cartographic, heightlessCartographicScratch);
+ heightlessCartographicScratch.height = height;
+ return Cartographic_default.toCartesian(
+ heightlessCartographicScratch,
+ ellipsoid,
+ result
+ );
+}
+GroundPolylineGeometry.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ Check_default.defined("array", array);
+ let index = defaultValue_default(startingIndex, 0);
+ const positions = value._positions;
+ const positionsLength = positions.length;
+ array[index++] = positionsLength;
+ for (let i = 0; i < positionsLength; ++i) {
+ const cartesian = positions[i];
+ Cartesian3_default.pack(cartesian, array, index);
+ index += 3;
+ }
+ array[index++] = value.granularity;
+ array[index++] = value.loop ? 1 : 0;
+ array[index++] = value.arcType;
+ Ellipsoid_default.pack(value._ellipsoid, array, index);
+ index += Ellipsoid_default.packedLength;
+ array[index++] = value._projectionIndex;
+ array[index++] = value._scene3DOnly ? 1 : 0;
+ return array;
+};
+GroundPolylineGeometry.unpack = function(array, startingIndex, result) {
+ Check_default.defined("array", array);
+ let index = defaultValue_default(startingIndex, 0);
+ const positionsLength = array[index++];
+ const positions = new Array(positionsLength);
+ for (let i = 0; i < positionsLength; i++) {
+ positions[i] = Cartesian3_default.unpack(array, index);
+ index += 3;
+ }
+ const granularity = array[index++];
+ const loop = array[index++] === 1;
+ const arcType = array[index++];
+ const ellipsoid = Ellipsoid_default.unpack(array, index);
+ index += Ellipsoid_default.packedLength;
+ const projectionIndex = array[index++];
+ const scene3DOnly = array[index++] === 1;
+ if (!defined_default(result)) {
+ result = new GroundPolylineGeometry({
+ positions
+ });
+ }
+ result._positions = positions;
+ result.granularity = granularity;
+ result.loop = loop;
+ result.arcType = arcType;
+ result._ellipsoid = ellipsoid;
+ result._projectionIndex = projectionIndex;
+ result._scene3DOnly = scene3DOnly;
+ return result;
+};
+function direction(target, origin, result) {
+ Cartesian3_default.subtract(target, origin, result);
+ Cartesian3_default.normalize(result, result);
+ return result;
+}
+function tangentDirection(target, origin, up, result) {
+ result = direction(target, origin, result);
+ result = Cartesian3_default.cross(result, up, result);
+ result = Cartesian3_default.normalize(result, result);
+ result = Cartesian3_default.cross(up, result, result);
+ return result;
+}
+var toPreviousScratch = new Cartesian3_default();
+var toNextScratch = new Cartesian3_default();
+var forwardScratch = new Cartesian3_default();
+var vertexUpScratch = new Cartesian3_default();
+var cosine90 = 0;
+var cosine180 = -1;
+function computeVertexMiterNormal(previousBottom, vertexBottom, vertexTop, nextBottom, result) {
+ const up = direction(vertexTop, vertexBottom, vertexUpScratch);
+ const toPrevious = tangentDirection(
+ previousBottom,
+ vertexBottom,
+ up,
+ toPreviousScratch
+ );
+ const toNext = tangentDirection(nextBottom, vertexBottom, up, toNextScratch);
+ if (Math_default.equalsEpsilon(
+ Cartesian3_default.dot(toPrevious, toNext),
+ cosine180,
+ Math_default.EPSILON5
+ )) {
+ result = Cartesian3_default.cross(up, toPrevious, result);
+ result = Cartesian3_default.normalize(result, result);
+ return result;
+ }
+ result = Cartesian3_default.add(toNext, toPrevious, result);
+ result = Cartesian3_default.normalize(result, result);
+ const forward = Cartesian3_default.cross(up, result, forwardScratch);
+ if (Cartesian3_default.dot(toNext, forward) < cosine90) {
+ result = Cartesian3_default.negate(result, result);
+ }
+ return result;
+}
+var XZ_PLANE = Plane_default.fromPointNormal(Cartesian3_default.ZERO, Cartesian3_default.UNIT_Y);
+var previousBottomScratch = new Cartesian3_default();
+var vertexBottomScratch = new Cartesian3_default();
+var vertexTopScratch = new Cartesian3_default();
+var nextBottomScratch = new Cartesian3_default();
+var vertexNormalScratch = new Cartesian3_default();
+var intersectionScratch = new Cartesian3_default();
+var cartographicScratch0 = new Cartographic_default();
+var cartographicScratch1 = new Cartographic_default();
+var cartographicIntersectionScratch = new Cartographic_default();
+GroundPolylineGeometry.createGeometry = function(groundPolylineGeometry) {
+ const compute2dAttributes = !groundPolylineGeometry._scene3DOnly;
+ let loop = groundPolylineGeometry.loop;
+ const ellipsoid = groundPolylineGeometry._ellipsoid;
+ const granularity = groundPolylineGeometry.granularity;
+ const arcType = groundPolylineGeometry.arcType;
+ const projection = new PROJECTIONS[groundPolylineGeometry._projectionIndex](
+ ellipsoid
+ );
+ const minHeight = WALL_INITIAL_MIN_HEIGHT;
+ const maxHeight = WALL_INITIAL_MAX_HEIGHT;
+ let index;
+ let i;
+ const positions = groundPolylineGeometry._positions;
+ const positionsLength = positions.length;
+ if (positionsLength === 2) {
+ loop = false;
+ }
+ let p0;
+ let p1;
+ let c0;
+ let c1;
+ const rhumbLine = new EllipsoidRhumbLine_default(void 0, void 0, ellipsoid);
+ let intersection;
+ let intersectionCartographic;
+ let intersectionLongitude;
+ const splitPositions = [positions[0]];
+ for (i = 0; i < positionsLength - 1; i++) {
+ p0 = positions[i];
+ p1 = positions[i + 1];
+ intersection = IntersectionTests_default.lineSegmentPlane(
+ p0,
+ p1,
+ XZ_PLANE,
+ intersectionScratch
+ );
+ if (defined_default(intersection) && !Cartesian3_default.equalsEpsilon(intersection, p0, Math_default.EPSILON7) && !Cartesian3_default.equalsEpsilon(intersection, p1, Math_default.EPSILON7)) {
+ if (groundPolylineGeometry.arcType === ArcType_default.GEODESIC) {
+ splitPositions.push(Cartesian3_default.clone(intersection));
+ } else if (groundPolylineGeometry.arcType === ArcType_default.RHUMB) {
+ intersectionLongitude = ellipsoid.cartesianToCartographic(
+ intersection,
+ cartographicScratch0
+ ).longitude;
+ c0 = ellipsoid.cartesianToCartographic(p0, cartographicScratch0);
+ c1 = ellipsoid.cartesianToCartographic(p1, cartographicScratch1);
+ rhumbLine.setEndPoints(c0, c1);
+ intersectionCartographic = rhumbLine.findIntersectionWithLongitude(
+ intersectionLongitude,
+ cartographicIntersectionScratch
+ );
+ intersection = ellipsoid.cartographicToCartesian(
+ intersectionCartographic,
+ intersectionScratch
+ );
+ if (defined_default(intersection) && !Cartesian3_default.equalsEpsilon(intersection, p0, Math_default.EPSILON7) && !Cartesian3_default.equalsEpsilon(intersection, p1, Math_default.EPSILON7)) {
+ splitPositions.push(Cartesian3_default.clone(intersection));
+ }
+ }
+ }
+ splitPositions.push(p1);
+ }
+ if (loop) {
+ p0 = positions[positionsLength - 1];
+ p1 = positions[0];
+ intersection = IntersectionTests_default.lineSegmentPlane(
+ p0,
+ p1,
+ XZ_PLANE,
+ intersectionScratch
+ );
+ if (defined_default(intersection) && !Cartesian3_default.equalsEpsilon(intersection, p0, Math_default.EPSILON7) && !Cartesian3_default.equalsEpsilon(intersection, p1, Math_default.EPSILON7)) {
+ if (groundPolylineGeometry.arcType === ArcType_default.GEODESIC) {
+ splitPositions.push(Cartesian3_default.clone(intersection));
+ } else if (groundPolylineGeometry.arcType === ArcType_default.RHUMB) {
+ intersectionLongitude = ellipsoid.cartesianToCartographic(
+ intersection,
+ cartographicScratch0
+ ).longitude;
+ c0 = ellipsoid.cartesianToCartographic(p0, cartographicScratch0);
+ c1 = ellipsoid.cartesianToCartographic(p1, cartographicScratch1);
+ rhumbLine.setEndPoints(c0, c1);
+ intersectionCartographic = rhumbLine.findIntersectionWithLongitude(
+ intersectionLongitude,
+ cartographicIntersectionScratch
+ );
+ intersection = ellipsoid.cartographicToCartesian(
+ intersectionCartographic,
+ intersectionScratch
+ );
+ if (defined_default(intersection) && !Cartesian3_default.equalsEpsilon(intersection, p0, Math_default.EPSILON7) && !Cartesian3_default.equalsEpsilon(intersection, p1, Math_default.EPSILON7)) {
+ splitPositions.push(Cartesian3_default.clone(intersection));
+ }
+ }
+ }
+ }
+ let cartographicsLength = splitPositions.length;
+ let cartographics = new Array(cartographicsLength);
+ for (i = 0; i < cartographicsLength; i++) {
+ const cartographic = Cartographic_default.fromCartesian(
+ splitPositions[i],
+ ellipsoid
+ );
+ cartographic.height = 0;
+ cartographics[i] = cartographic;
+ }
+ cartographics = arrayRemoveDuplicates_default(
+ cartographics,
+ Cartographic_default.equalsEpsilon
+ );
+ cartographicsLength = cartographics.length;
+ if (cartographicsLength < 2) {
+ return void 0;
+ }
+ const cartographicsArray = [];
+ const normalsArray = [];
+ const bottomPositionsArray = [];
+ const topPositionsArray = [];
+ let previousBottom = previousBottomScratch;
+ let vertexBottom = vertexBottomScratch;
+ let vertexTop = vertexTopScratch;
+ let nextBottom = nextBottomScratch;
+ let vertexNormal = vertexNormalScratch;
+ const startCartographic = cartographics[0];
+ const nextCartographic = cartographics[1];
+ const prestartCartographic = cartographics[cartographicsLength - 1];
+ previousBottom = getPosition(
+ ellipsoid,
+ prestartCartographic,
+ minHeight,
+ previousBottom
+ );
+ nextBottom = getPosition(ellipsoid, nextCartographic, minHeight, nextBottom);
+ vertexBottom = getPosition(
+ ellipsoid,
+ startCartographic,
+ minHeight,
+ vertexBottom
+ );
+ vertexTop = getPosition(ellipsoid, startCartographic, maxHeight, vertexTop);
+ if (loop) {
+ vertexNormal = computeVertexMiterNormal(
+ previousBottom,
+ vertexBottom,
+ vertexTop,
+ nextBottom,
+ vertexNormal
+ );
+ } else {
+ vertexNormal = computeRightNormal(
+ startCartographic,
+ nextCartographic,
+ maxHeight,
+ ellipsoid,
+ vertexNormal
+ );
+ }
+ Cartesian3_default.pack(vertexNormal, normalsArray, 0);
+ Cartesian3_default.pack(vertexBottom, bottomPositionsArray, 0);
+ Cartesian3_default.pack(vertexTop, topPositionsArray, 0);
+ cartographicsArray.push(startCartographic.latitude);
+ cartographicsArray.push(startCartographic.longitude);
+ interpolateSegment(
+ startCartographic,
+ nextCartographic,
+ minHeight,
+ maxHeight,
+ granularity,
+ arcType,
+ ellipsoid,
+ normalsArray,
+ bottomPositionsArray,
+ topPositionsArray,
+ cartographicsArray
+ );
+ for (i = 1; i < cartographicsLength - 1; ++i) {
+ previousBottom = Cartesian3_default.clone(vertexBottom, previousBottom);
+ vertexBottom = Cartesian3_default.clone(nextBottom, vertexBottom);
+ const vertexCartographic = cartographics[i];
+ getPosition(ellipsoid, vertexCartographic, maxHeight, vertexTop);
+ getPosition(ellipsoid, cartographics[i + 1], minHeight, nextBottom);
+ computeVertexMiterNormal(
+ previousBottom,
+ vertexBottom,
+ vertexTop,
+ nextBottom,
+ vertexNormal
+ );
+ index = normalsArray.length;
+ Cartesian3_default.pack(vertexNormal, normalsArray, index);
+ Cartesian3_default.pack(vertexBottom, bottomPositionsArray, index);
+ Cartesian3_default.pack(vertexTop, topPositionsArray, index);
+ cartographicsArray.push(vertexCartographic.latitude);
+ cartographicsArray.push(vertexCartographic.longitude);
+ interpolateSegment(
+ cartographics[i],
+ cartographics[i + 1],
+ minHeight,
+ maxHeight,
+ granularity,
+ arcType,
+ ellipsoid,
+ normalsArray,
+ bottomPositionsArray,
+ topPositionsArray,
+ cartographicsArray
+ );
+ }
+ const endCartographic = cartographics[cartographicsLength - 1];
+ const preEndCartographic = cartographics[cartographicsLength - 2];
+ vertexBottom = getPosition(
+ ellipsoid,
+ endCartographic,
+ minHeight,
+ vertexBottom
+ );
+ vertexTop = getPosition(ellipsoid, endCartographic, maxHeight, vertexTop);
+ if (loop) {
+ const postEndCartographic = cartographics[0];
+ previousBottom = getPosition(
+ ellipsoid,
+ preEndCartographic,
+ minHeight,
+ previousBottom
+ );
+ nextBottom = getPosition(
+ ellipsoid,
+ postEndCartographic,
+ minHeight,
+ nextBottom
+ );
+ vertexNormal = computeVertexMiterNormal(
+ previousBottom,
+ vertexBottom,
+ vertexTop,
+ nextBottom,
+ vertexNormal
+ );
+ } else {
+ vertexNormal = computeRightNormal(
+ preEndCartographic,
+ endCartographic,
+ maxHeight,
+ ellipsoid,
+ vertexNormal
+ );
+ }
+ index = normalsArray.length;
+ Cartesian3_default.pack(vertexNormal, normalsArray, index);
+ Cartesian3_default.pack(vertexBottom, bottomPositionsArray, index);
+ Cartesian3_default.pack(vertexTop, topPositionsArray, index);
+ cartographicsArray.push(endCartographic.latitude);
+ cartographicsArray.push(endCartographic.longitude);
+ if (loop) {
+ interpolateSegment(
+ endCartographic,
+ startCartographic,
+ minHeight,
+ maxHeight,
+ granularity,
+ arcType,
+ ellipsoid,
+ normalsArray,
+ bottomPositionsArray,
+ topPositionsArray,
+ cartographicsArray
+ );
+ index = normalsArray.length;
+ for (i = 0; i < 3; ++i) {
+ normalsArray[index + i] = normalsArray[i];
+ bottomPositionsArray[index + i] = bottomPositionsArray[i];
+ topPositionsArray[index + i] = topPositionsArray[i];
+ }
+ cartographicsArray.push(startCartographic.latitude);
+ cartographicsArray.push(startCartographic.longitude);
+ }
+ return generateGeometryAttributes(
+ loop,
+ projection,
+ bottomPositionsArray,
+ topPositionsArray,
+ normalsArray,
+ cartographicsArray,
+ compute2dAttributes
+ );
+};
+var lineDirectionScratch = new Cartesian3_default();
+var matrix3Scratch = new Matrix3_default();
+var quaternionScratch = new Quaternion_default();
+function breakMiter(endGeometryNormal, startBottom, endBottom, endTop) {
+ const lineDirection = direction(endBottom, startBottom, lineDirectionScratch);
+ const dot = Cartesian3_default.dot(lineDirection, endGeometryNormal);
+ if (dot > MITER_BREAK_SMALL || dot < MITER_BREAK_LARGE) {
+ const vertexUp = direction(endTop, endBottom, vertexUpScratch);
+ const angle = dot < MITER_BREAK_LARGE ? Math_default.PI_OVER_TWO : -Math_default.PI_OVER_TWO;
+ const quaternion = Quaternion_default.fromAxisAngle(
+ vertexUp,
+ angle,
+ quaternionScratch
+ );
+ const rotationMatrix = Matrix3_default.fromQuaternion(quaternion, matrix3Scratch);
+ Matrix3_default.multiplyByVector(
+ rotationMatrix,
+ endGeometryNormal,
+ endGeometryNormal
+ );
+ return true;
+ }
+ return false;
+}
+var endPosCartographicScratch = new Cartographic_default();
+var normalStartpointScratch = new Cartesian3_default();
+var normalEndpointScratch = new Cartesian3_default();
+function projectNormal(projection, cartographic, normal, projectedPosition, result) {
+ const position = Cartographic_default.toCartesian(
+ cartographic,
+ projection._ellipsoid,
+ normalStartpointScratch
+ );
+ let normalEndpoint = Cartesian3_default.add(position, normal, normalEndpointScratch);
+ let flipNormal = false;
+ const ellipsoid = projection._ellipsoid;
+ let normalEndpointCartographic = ellipsoid.cartesianToCartographic(
+ normalEndpoint,
+ endPosCartographicScratch
+ );
+ if (Math.abs(cartographic.longitude - normalEndpointCartographic.longitude) > Math_default.PI_OVER_TWO) {
+ flipNormal = true;
+ normalEndpoint = Cartesian3_default.subtract(
+ position,
+ normal,
+ normalEndpointScratch
+ );
+ normalEndpointCartographic = ellipsoid.cartesianToCartographic(
+ normalEndpoint,
+ endPosCartographicScratch
+ );
+ }
+ normalEndpointCartographic.height = 0;
+ const normalEndpointProjected = projection.project(
+ normalEndpointCartographic,
+ result
+ );
+ result = Cartesian3_default.subtract(
+ normalEndpointProjected,
+ projectedPosition,
+ result
+ );
+ result.z = 0;
+ result = Cartesian3_default.normalize(result, result);
+ if (flipNormal) {
+ Cartesian3_default.negate(result, result);
+ }
+ return result;
+}
+var adjustHeightNormalScratch = new Cartesian3_default();
+var adjustHeightOffsetScratch = new Cartesian3_default();
+function adjustHeights(bottom, top, minHeight, maxHeight, adjustHeightBottom, adjustHeightTop) {
+ const adjustHeightNormal = Cartesian3_default.subtract(
+ top,
+ bottom,
+ adjustHeightNormalScratch
+ );
+ Cartesian3_default.normalize(adjustHeightNormal, adjustHeightNormal);
+ const distanceForBottom = minHeight - WALL_INITIAL_MIN_HEIGHT;
+ let adjustHeightOffset = Cartesian3_default.multiplyByScalar(
+ adjustHeightNormal,
+ distanceForBottom,
+ adjustHeightOffsetScratch
+ );
+ Cartesian3_default.add(bottom, adjustHeightOffset, adjustHeightBottom);
+ const distanceForTop = maxHeight - WALL_INITIAL_MAX_HEIGHT;
+ adjustHeightOffset = Cartesian3_default.multiplyByScalar(
+ adjustHeightNormal,
+ distanceForTop,
+ adjustHeightOffsetScratch
+ );
+ Cartesian3_default.add(top, adjustHeightOffset, adjustHeightTop);
+}
+var nudgeDirectionScratch = new Cartesian3_default();
+function nudgeXZ(start, end) {
+ const startToXZdistance = Plane_default.getPointDistance(XZ_PLANE, start);
+ const endToXZdistance = Plane_default.getPointDistance(XZ_PLANE, end);
+ let offset = nudgeDirectionScratch;
+ if (Math_default.equalsEpsilon(startToXZdistance, 0, Math_default.EPSILON2)) {
+ offset = direction(end, start, offset);
+ Cartesian3_default.multiplyByScalar(offset, Math_default.EPSILON2, offset);
+ Cartesian3_default.add(start, offset, start);
+ } else if (Math_default.equalsEpsilon(endToXZdistance, 0, Math_default.EPSILON2)) {
+ offset = direction(start, end, offset);
+ Cartesian3_default.multiplyByScalar(offset, Math_default.EPSILON2, offset);
+ Cartesian3_default.add(end, offset, end);
+ }
+}
+function nudgeCartographic(start, end) {
+ const absStartLon = Math.abs(start.longitude);
+ const absEndLon = Math.abs(end.longitude);
+ if (Math_default.equalsEpsilon(absStartLon, Math_default.PI, Math_default.EPSILON11)) {
+ const endSign = Math_default.sign(end.longitude);
+ start.longitude = endSign * (absStartLon - Math_default.EPSILON11);
+ return 1;
+ } else if (Math_default.equalsEpsilon(absEndLon, Math_default.PI, Math_default.EPSILON11)) {
+ const startSign = Math_default.sign(start.longitude);
+ end.longitude = startSign * (absEndLon - Math_default.EPSILON11);
+ return 2;
+ }
+ return 0;
+}
+var startCartographicScratch = new Cartographic_default();
+var endCartographicScratch = new Cartographic_default();
+var segmentStartTopScratch = new Cartesian3_default();
+var segmentEndTopScratch = new Cartesian3_default();
+var segmentStartBottomScratch = new Cartesian3_default();
+var segmentEndBottomScratch = new Cartesian3_default();
+var segmentStartNormalScratch = new Cartesian3_default();
+var segmentEndNormalScratch = new Cartesian3_default();
+var getHeightCartographics = [
+ startCartographicScratch,
+ endCartographicScratch
+];
+var getHeightRectangleScratch = new Rectangle_default();
+var adjustHeightStartTopScratch = new Cartesian3_default();
+var adjustHeightEndTopScratch = new Cartesian3_default();
+var adjustHeightStartBottomScratch = new Cartesian3_default();
+var adjustHeightEndBottomScratch = new Cartesian3_default();
+var segmentStart2DScratch = new Cartesian3_default();
+var segmentEnd2DScratch = new Cartesian3_default();
+var segmentStartNormal2DScratch = new Cartesian3_default();
+var segmentEndNormal2DScratch = new Cartesian3_default();
+var offsetScratch = new Cartesian3_default();
+var startUpScratch = new Cartesian3_default();
+var endUpScratch = new Cartesian3_default();
+var rightScratch = new Cartesian3_default();
+var startPlaneNormalScratch = new Cartesian3_default();
+var endPlaneNormalScratch = new Cartesian3_default();
+var encodeScratch = new EncodedCartesian3_default();
+var encodeScratch2D = new EncodedCartesian3_default();
+var forwardOffset2DScratch = new Cartesian3_default();
+var right2DScratch = new Cartesian3_default();
+var normalNudgeScratch = new Cartesian3_default();
+var scratchBoundingSpheres = [new BoundingSphere_default(), new BoundingSphere_default()];
+var REFERENCE_INDICES = [
+ 0,
+ 2,
+ 1,
+ 0,
+ 3,
+ 2,
+ // right
+ 0,
+ 7,
+ 3,
+ 0,
+ 4,
+ 7,
+ // start
+ 0,
+ 5,
+ 4,
+ 0,
+ 1,
+ 5,
+ // bottom
+ 5,
+ 7,
+ 4,
+ 5,
+ 6,
+ 7,
+ // left
+ 5,
+ 2,
+ 6,
+ 5,
+ 1,
+ 2,
+ // end
+ 3,
+ 6,
+ 2,
+ 3,
+ 7,
+ 6
+ // top
+];
+var REFERENCE_INDICES_LENGTH = REFERENCE_INDICES.length;
+function generateGeometryAttributes(loop, projection, bottomPositionsArray, topPositionsArray, normalsArray, cartographicsArray, compute2dAttributes) {
+ let i;
+ let index;
+ const ellipsoid = projection._ellipsoid;
+ const segmentCount = bottomPositionsArray.length / 3 - 1;
+ const vertexCount = segmentCount * 8;
+ const arraySizeVec4 = vertexCount * 4;
+ const indexCount = segmentCount * 36;
+ const indices = vertexCount > 65535 ? new Uint32Array(indexCount) : new Uint16Array(indexCount);
+ const positionsArray = new Float64Array(vertexCount * 3);
+ const startHiAndForwardOffsetX = new Float32Array(arraySizeVec4);
+ const startLoAndForwardOffsetY = new Float32Array(arraySizeVec4);
+ const startNormalAndForwardOffsetZ = new Float32Array(arraySizeVec4);
+ const endNormalAndTextureCoordinateNormalizationX = new Float32Array(
+ arraySizeVec4
+ );
+ const rightNormalAndTextureCoordinateNormalizationY = new Float32Array(
+ arraySizeVec4
+ );
+ let startHiLo2D;
+ let offsetAndRight2D;
+ let startEndNormals2D;
+ let texcoordNormalization2D;
+ if (compute2dAttributes) {
+ startHiLo2D = new Float32Array(arraySizeVec4);
+ offsetAndRight2D = new Float32Array(arraySizeVec4);
+ startEndNormals2D = new Float32Array(arraySizeVec4);
+ texcoordNormalization2D = new Float32Array(vertexCount * 2);
+ }
+ const cartographicsLength = cartographicsArray.length / 2;
+ let length2D = 0;
+ const startCartographic = startCartographicScratch;
+ startCartographic.height = 0;
+ const endCartographic = endCartographicScratch;
+ endCartographic.height = 0;
+ let segmentStartCartesian = segmentStartTopScratch;
+ let segmentEndCartesian = segmentEndTopScratch;
+ if (compute2dAttributes) {
+ index = 0;
+ for (i = 1; i < cartographicsLength; i++) {
+ startCartographic.latitude = cartographicsArray[index];
+ startCartographic.longitude = cartographicsArray[index + 1];
+ endCartographic.latitude = cartographicsArray[index + 2];
+ endCartographic.longitude = cartographicsArray[index + 3];
+ segmentStartCartesian = projection.project(
+ startCartographic,
+ segmentStartCartesian
+ );
+ segmentEndCartesian = projection.project(
+ endCartographic,
+ segmentEndCartesian
+ );
+ length2D += Cartesian3_default.distance(
+ segmentStartCartesian,
+ segmentEndCartesian
+ );
+ index += 2;
+ }
+ }
+ const positionsLength = topPositionsArray.length / 3;
+ segmentEndCartesian = Cartesian3_default.unpack(
+ topPositionsArray,
+ 0,
+ segmentEndCartesian
+ );
+ let length3D = 0;
+ index = 3;
+ for (i = 1; i < positionsLength; i++) {
+ segmentStartCartesian = Cartesian3_default.clone(
+ segmentEndCartesian,
+ segmentStartCartesian
+ );
+ segmentEndCartesian = Cartesian3_default.unpack(
+ topPositionsArray,
+ index,
+ segmentEndCartesian
+ );
+ length3D += Cartesian3_default.distance(segmentStartCartesian, segmentEndCartesian);
+ index += 3;
+ }
+ let j;
+ index = 3;
+ let cartographicsIndex = 0;
+ let vec2sWriteIndex = 0;
+ let vec3sWriteIndex = 0;
+ let vec4sWriteIndex = 0;
+ let miterBroken = false;
+ let endBottom = Cartesian3_default.unpack(
+ bottomPositionsArray,
+ 0,
+ segmentEndBottomScratch
+ );
+ let endTop = Cartesian3_default.unpack(topPositionsArray, 0, segmentEndTopScratch);
+ let endGeometryNormal = Cartesian3_default.unpack(
+ normalsArray,
+ 0,
+ segmentEndNormalScratch
+ );
+ if (loop) {
+ const preEndBottom = Cartesian3_default.unpack(
+ bottomPositionsArray,
+ bottomPositionsArray.length - 6,
+ segmentStartBottomScratch
+ );
+ if (breakMiter(endGeometryNormal, preEndBottom, endBottom, endTop)) {
+ endGeometryNormal = Cartesian3_default.negate(
+ endGeometryNormal,
+ endGeometryNormal
+ );
+ }
+ }
+ let lengthSoFar3D = 0;
+ let lengthSoFar2D = 0;
+ let sumHeights = 0;
+ for (i = 0; i < segmentCount; i++) {
+ const startBottom = Cartesian3_default.clone(endBottom, segmentStartBottomScratch);
+ const startTop = Cartesian3_default.clone(endTop, segmentStartTopScratch);
+ let startGeometryNormal = Cartesian3_default.clone(
+ endGeometryNormal,
+ segmentStartNormalScratch
+ );
+ if (miterBroken) {
+ startGeometryNormal = Cartesian3_default.negate(
+ startGeometryNormal,
+ startGeometryNormal
+ );
+ }
+ endBottom = Cartesian3_default.unpack(
+ bottomPositionsArray,
+ index,
+ segmentEndBottomScratch
+ );
+ endTop = Cartesian3_default.unpack(topPositionsArray, index, segmentEndTopScratch);
+ endGeometryNormal = Cartesian3_default.unpack(
+ normalsArray,
+ index,
+ segmentEndNormalScratch
+ );
+ miterBroken = breakMiter(endGeometryNormal, startBottom, endBottom, endTop);
+ startCartographic.latitude = cartographicsArray[cartographicsIndex];
+ startCartographic.longitude = cartographicsArray[cartographicsIndex + 1];
+ endCartographic.latitude = cartographicsArray[cartographicsIndex + 2];
+ endCartographic.longitude = cartographicsArray[cartographicsIndex + 3];
+ let start2D;
+ let end2D;
+ let startGeometryNormal2D;
+ let endGeometryNormal2D;
+ if (compute2dAttributes) {
+ const nudgeResult = nudgeCartographic(startCartographic, endCartographic);
+ start2D = projection.project(startCartographic, segmentStart2DScratch);
+ end2D = projection.project(endCartographic, segmentEnd2DScratch);
+ const direction2D = direction(end2D, start2D, forwardOffset2DScratch);
+ direction2D.y = Math.abs(direction2D.y);
+ startGeometryNormal2D = segmentStartNormal2DScratch;
+ endGeometryNormal2D = segmentEndNormal2DScratch;
+ if (nudgeResult === 0 || Cartesian3_default.dot(direction2D, Cartesian3_default.UNIT_Y) > MITER_BREAK_SMALL) {
+ startGeometryNormal2D = projectNormal(
+ projection,
+ startCartographic,
+ startGeometryNormal,
+ start2D,
+ segmentStartNormal2DScratch
+ );
+ endGeometryNormal2D = projectNormal(
+ projection,
+ endCartographic,
+ endGeometryNormal,
+ end2D,
+ segmentEndNormal2DScratch
+ );
+ } else if (nudgeResult === 1) {
+ endGeometryNormal2D = projectNormal(
+ projection,
+ endCartographic,
+ endGeometryNormal,
+ end2D,
+ segmentEndNormal2DScratch
+ );
+ startGeometryNormal2D.x = 0;
+ startGeometryNormal2D.y = Math_default.sign(
+ startCartographic.longitude - Math.abs(endCartographic.longitude)
+ );
+ startGeometryNormal2D.z = 0;
+ } else {
+ startGeometryNormal2D = projectNormal(
+ projection,
+ startCartographic,
+ startGeometryNormal,
+ start2D,
+ segmentStartNormal2DScratch
+ );
+ endGeometryNormal2D.x = 0;
+ endGeometryNormal2D.y = Math_default.sign(
+ startCartographic.longitude - endCartographic.longitude
+ );
+ endGeometryNormal2D.z = 0;
+ }
+ }
+ const segmentLength3D = Cartesian3_default.distance(startTop, endTop);
+ const encodedStart = EncodedCartesian3_default.fromCartesian(
+ startBottom,
+ encodeScratch
+ );
+ const forwardOffset = Cartesian3_default.subtract(
+ endBottom,
+ startBottom,
+ offsetScratch
+ );
+ const forward = Cartesian3_default.normalize(forwardOffset, rightScratch);
+ let startUp = Cartesian3_default.subtract(startTop, startBottom, startUpScratch);
+ startUp = Cartesian3_default.normalize(startUp, startUp);
+ let rightNormal = Cartesian3_default.cross(forward, startUp, rightScratch);
+ rightNormal = Cartesian3_default.normalize(rightNormal, rightNormal);
+ let startPlaneNormal = Cartesian3_default.cross(
+ startUp,
+ startGeometryNormal,
+ startPlaneNormalScratch
+ );
+ startPlaneNormal = Cartesian3_default.normalize(startPlaneNormal, startPlaneNormal);
+ let endUp = Cartesian3_default.subtract(endTop, endBottom, endUpScratch);
+ endUp = Cartesian3_default.normalize(endUp, endUp);
+ let endPlaneNormal = Cartesian3_default.cross(
+ endGeometryNormal,
+ endUp,
+ endPlaneNormalScratch
+ );
+ endPlaneNormal = Cartesian3_default.normalize(endPlaneNormal, endPlaneNormal);
+ const texcoordNormalization3DX = segmentLength3D / length3D;
+ const texcoordNormalization3DY = lengthSoFar3D / length3D;
+ let segmentLength2D = 0;
+ let encodedStart2D;
+ let forwardOffset2D;
+ let right2D;
+ let texcoordNormalization2DX = 0;
+ let texcoordNormalization2DY = 0;
+ if (compute2dAttributes) {
+ segmentLength2D = Cartesian3_default.distance(start2D, end2D);
+ encodedStart2D = EncodedCartesian3_default.fromCartesian(
+ start2D,
+ encodeScratch2D
+ );
+ forwardOffset2D = Cartesian3_default.subtract(
+ end2D,
+ start2D,
+ forwardOffset2DScratch
+ );
+ right2D = Cartesian3_default.normalize(forwardOffset2D, right2DScratch);
+ const swap = right2D.x;
+ right2D.x = right2D.y;
+ right2D.y = -swap;
+ texcoordNormalization2DX = segmentLength2D / length2D;
+ texcoordNormalization2DY = lengthSoFar2D / length2D;
+ }
+ for (j = 0; j < 8; j++) {
+ const vec4Index = vec4sWriteIndex + j * 4;
+ const vec2Index = vec2sWriteIndex + j * 2;
+ const wIndex = vec4Index + 3;
+ const rightPlaneSide = j < 4 ? 1 : -1;
+ const topBottomSide = j === 2 || j === 3 || j === 6 || j === 7 ? 1 : -1;
+ Cartesian3_default.pack(encodedStart.high, startHiAndForwardOffsetX, vec4Index);
+ startHiAndForwardOffsetX[wIndex] = forwardOffset.x;
+ Cartesian3_default.pack(encodedStart.low, startLoAndForwardOffsetY, vec4Index);
+ startLoAndForwardOffsetY[wIndex] = forwardOffset.y;
+ Cartesian3_default.pack(
+ startPlaneNormal,
+ startNormalAndForwardOffsetZ,
+ vec4Index
+ );
+ startNormalAndForwardOffsetZ[wIndex] = forwardOffset.z;
+ Cartesian3_default.pack(
+ endPlaneNormal,
+ endNormalAndTextureCoordinateNormalizationX,
+ vec4Index
+ );
+ endNormalAndTextureCoordinateNormalizationX[wIndex] = texcoordNormalization3DX * rightPlaneSide;
+ Cartesian3_default.pack(
+ rightNormal,
+ rightNormalAndTextureCoordinateNormalizationY,
+ vec4Index
+ );
+ let texcoordNormalization = texcoordNormalization3DY * topBottomSide;
+ if (texcoordNormalization === 0 && topBottomSide < 0) {
+ texcoordNormalization = 9;
+ }
+ rightNormalAndTextureCoordinateNormalizationY[wIndex] = texcoordNormalization;
+ if (compute2dAttributes) {
+ startHiLo2D[vec4Index] = encodedStart2D.high.x;
+ startHiLo2D[vec4Index + 1] = encodedStart2D.high.y;
+ startHiLo2D[vec4Index + 2] = encodedStart2D.low.x;
+ startHiLo2D[vec4Index + 3] = encodedStart2D.low.y;
+ startEndNormals2D[vec4Index] = -startGeometryNormal2D.y;
+ startEndNormals2D[vec4Index + 1] = startGeometryNormal2D.x;
+ startEndNormals2D[vec4Index + 2] = endGeometryNormal2D.y;
+ startEndNormals2D[vec4Index + 3] = -endGeometryNormal2D.x;
+ offsetAndRight2D[vec4Index] = forwardOffset2D.x;
+ offsetAndRight2D[vec4Index + 1] = forwardOffset2D.y;
+ offsetAndRight2D[vec4Index + 2] = right2D.x;
+ offsetAndRight2D[vec4Index + 3] = right2D.y;
+ texcoordNormalization2D[vec2Index] = texcoordNormalization2DX * rightPlaneSide;
+ texcoordNormalization = texcoordNormalization2DY * topBottomSide;
+ if (texcoordNormalization === 0 && topBottomSide < 0) {
+ texcoordNormalization = 9;
+ }
+ texcoordNormalization2D[vec2Index + 1] = texcoordNormalization;
+ }
+ }
+ const adjustHeightStartBottom = adjustHeightStartBottomScratch;
+ const adjustHeightEndBottom = adjustHeightEndBottomScratch;
+ const adjustHeightStartTop = adjustHeightStartTopScratch;
+ const adjustHeightEndTop = adjustHeightEndTopScratch;
+ const getHeightsRectangle = Rectangle_default.fromCartographicArray(
+ getHeightCartographics,
+ getHeightRectangleScratch
+ );
+ const minMaxHeights = ApproximateTerrainHeights_default.getMinimumMaximumHeights(
+ getHeightsRectangle,
+ ellipsoid
+ );
+ const minHeight = minMaxHeights.minimumTerrainHeight;
+ const maxHeight = minMaxHeights.maximumTerrainHeight;
+ sumHeights += Math.abs(minHeight);
+ sumHeights += Math.abs(maxHeight);
+ adjustHeights(
+ startBottom,
+ startTop,
+ minHeight,
+ maxHeight,
+ adjustHeightStartBottom,
+ adjustHeightStartTop
+ );
+ adjustHeights(
+ endBottom,
+ endTop,
+ minHeight,
+ maxHeight,
+ adjustHeightEndBottom,
+ adjustHeightEndTop
+ );
+ let normalNudge = Cartesian3_default.multiplyByScalar(
+ rightNormal,
+ Math_default.EPSILON5,
+ normalNudgeScratch
+ );
+ Cartesian3_default.add(
+ adjustHeightStartBottom,
+ normalNudge,
+ adjustHeightStartBottom
+ );
+ Cartesian3_default.add(adjustHeightEndBottom, normalNudge, adjustHeightEndBottom);
+ Cartesian3_default.add(adjustHeightStartTop, normalNudge, adjustHeightStartTop);
+ Cartesian3_default.add(adjustHeightEndTop, normalNudge, adjustHeightEndTop);
+ nudgeXZ(adjustHeightStartBottom, adjustHeightEndBottom);
+ nudgeXZ(adjustHeightStartTop, adjustHeightEndTop);
+ Cartesian3_default.pack(adjustHeightStartBottom, positionsArray, vec3sWriteIndex);
+ Cartesian3_default.pack(adjustHeightEndBottom, positionsArray, vec3sWriteIndex + 3);
+ Cartesian3_default.pack(adjustHeightEndTop, positionsArray, vec3sWriteIndex + 6);
+ Cartesian3_default.pack(adjustHeightStartTop, positionsArray, vec3sWriteIndex + 9);
+ normalNudge = Cartesian3_default.multiplyByScalar(
+ rightNormal,
+ -2 * Math_default.EPSILON5,
+ normalNudgeScratch
+ );
+ Cartesian3_default.add(
+ adjustHeightStartBottom,
+ normalNudge,
+ adjustHeightStartBottom
+ );
+ Cartesian3_default.add(adjustHeightEndBottom, normalNudge, adjustHeightEndBottom);
+ Cartesian3_default.add(adjustHeightStartTop, normalNudge, adjustHeightStartTop);
+ Cartesian3_default.add(adjustHeightEndTop, normalNudge, adjustHeightEndTop);
+ nudgeXZ(adjustHeightStartBottom, adjustHeightEndBottom);
+ nudgeXZ(adjustHeightStartTop, adjustHeightEndTop);
+ Cartesian3_default.pack(
+ adjustHeightStartBottom,
+ positionsArray,
+ vec3sWriteIndex + 12
+ );
+ Cartesian3_default.pack(
+ adjustHeightEndBottom,
+ positionsArray,
+ vec3sWriteIndex + 15
+ );
+ Cartesian3_default.pack(adjustHeightEndTop, positionsArray, vec3sWriteIndex + 18);
+ Cartesian3_default.pack(adjustHeightStartTop, positionsArray, vec3sWriteIndex + 21);
+ cartographicsIndex += 2;
+ index += 3;
+ vec2sWriteIndex += 16;
+ vec3sWriteIndex += 24;
+ vec4sWriteIndex += 32;
+ lengthSoFar3D += segmentLength3D;
+ lengthSoFar2D += segmentLength2D;
+ }
+ index = 0;
+ let indexOffset = 0;
+ for (i = 0; i < segmentCount; i++) {
+ for (j = 0; j < REFERENCE_INDICES_LENGTH; j++) {
+ indices[index + j] = REFERENCE_INDICES[j] + indexOffset;
+ }
+ indexOffset += 8;
+ index += REFERENCE_INDICES_LENGTH;
+ }
+ const boundingSpheres = scratchBoundingSpheres;
+ BoundingSphere_default.fromVertices(
+ bottomPositionsArray,
+ Cartesian3_default.ZERO,
+ 3,
+ boundingSpheres[0]
+ );
+ BoundingSphere_default.fromVertices(
+ topPositionsArray,
+ Cartesian3_default.ZERO,
+ 3,
+ boundingSpheres[1]
+ );
+ const boundingSphere = BoundingSphere_default.fromBoundingSpheres(boundingSpheres);
+ boundingSphere.radius += sumHeights / (segmentCount * 2);
+ const attributes = {
+ position: new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ normalize: false,
+ values: positionsArray
+ }),
+ startHiAndForwardOffsetX: getVec4GeometryAttribute(
+ startHiAndForwardOffsetX
+ ),
+ startLoAndForwardOffsetY: getVec4GeometryAttribute(
+ startLoAndForwardOffsetY
+ ),
+ startNormalAndForwardOffsetZ: getVec4GeometryAttribute(
+ startNormalAndForwardOffsetZ
+ ),
+ endNormalAndTextureCoordinateNormalizationX: getVec4GeometryAttribute(
+ endNormalAndTextureCoordinateNormalizationX
+ ),
+ rightNormalAndTextureCoordinateNormalizationY: getVec4GeometryAttribute(
+ rightNormalAndTextureCoordinateNormalizationY
+ )
+ };
+ if (compute2dAttributes) {
+ attributes.startHiLo2D = getVec4GeometryAttribute(startHiLo2D);
+ attributes.offsetAndRight2D = getVec4GeometryAttribute(offsetAndRight2D);
+ attributes.startEndNormals2D = getVec4GeometryAttribute(startEndNormals2D);
+ attributes.texcoordNormalization2D = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 2,
+ normalize: false,
+ values: texcoordNormalization2D
+ });
+ }
+ return new Geometry_default({
+ attributes,
+ indices,
+ boundingSphere
+ });
+}
+function getVec4GeometryAttribute(typedArray) {
+ return new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 4,
+ normalize: false,
+ values: typedArray
+ });
+}
+GroundPolylineGeometry._projectNormal = projectNormal;
+var GroundPolylineGeometry_default = GroundPolylineGeometry;
+
+// packages/engine/Source/Workers/createGroundPolylineGeometry.js
+function createGroundPolylineGeometry(groundPolylineGeometry, offset) {
+ return ApproximateTerrainHeights_default.initialize().then(function() {
+ if (defined_default(offset)) {
+ groundPolylineGeometry = GroundPolylineGeometry_default.unpack(
+ groundPolylineGeometry,
+ offset
+ );
+ }
+ return GroundPolylineGeometry_default.createGeometry(groundPolylineGeometry);
+ });
+}
+var createGroundPolylineGeometry_default = createGroundPolylineGeometry;
+export {
+ createGroundPolylineGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createPlaneGeometry.js b/public/assets/cesium/Workers/createPlaneGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..8ef92c643c8fc14e40edd8cb2ec06d40682a66e5
--- /dev/null
+++ b/public/assets/cesium/Workers/createPlaneGeometry.js
@@ -0,0 +1,222 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ VertexFormat_default
+} from "./chunk-JBSKHTNX.js";
+import {
+ GeometryAttributes_default
+} from "./chunk-X7IQYYHF.js";
+import {
+ GeometryAttribute_default,
+ Geometry_default,
+ PrimitiveType_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ BoundingSphere_default
+} from "./chunk-KHZNBFOH.js";
+import "./chunk-6SQMLVGV.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian3_default
+} from "./chunk-FFLMY4TE.js";
+import "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/PlaneGeometry.js
+function PlaneGeometry(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const vertexFormat = defaultValue_default(options.vertexFormat, VertexFormat_default.DEFAULT);
+ this._vertexFormat = vertexFormat;
+ this._workerName = "createPlaneGeometry";
+}
+PlaneGeometry.packedLength = VertexFormat_default.packedLength;
+PlaneGeometry.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ VertexFormat_default.pack(value._vertexFormat, array, startingIndex);
+ return array;
+};
+var scratchVertexFormat = new VertexFormat_default();
+var scratchOptions = {
+ vertexFormat: scratchVertexFormat
+};
+PlaneGeometry.unpack = function(array, startingIndex, result) {
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ const vertexFormat = VertexFormat_default.unpack(
+ array,
+ startingIndex,
+ scratchVertexFormat
+ );
+ if (!defined_default(result)) {
+ return new PlaneGeometry(scratchOptions);
+ }
+ result._vertexFormat = VertexFormat_default.clone(vertexFormat, result._vertexFormat);
+ return result;
+};
+var min = new Cartesian3_default(-0.5, -0.5, 0);
+var max = new Cartesian3_default(0.5, 0.5, 0);
+PlaneGeometry.createGeometry = function(planeGeometry) {
+ const vertexFormat = planeGeometry._vertexFormat;
+ const attributes = new GeometryAttributes_default();
+ let indices;
+ let positions;
+ if (vertexFormat.position) {
+ positions = new Float64Array(4 * 3);
+ positions[0] = min.x;
+ positions[1] = min.y;
+ positions[2] = 0;
+ positions[3] = max.x;
+ positions[4] = min.y;
+ positions[5] = 0;
+ positions[6] = max.x;
+ positions[7] = max.y;
+ positions[8] = 0;
+ positions[9] = min.x;
+ positions[10] = max.y;
+ positions[11] = 0;
+ attributes.position = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: positions
+ });
+ if (vertexFormat.normal) {
+ const normals = new Float32Array(4 * 3);
+ normals[0] = 0;
+ normals[1] = 0;
+ normals[2] = 1;
+ normals[3] = 0;
+ normals[4] = 0;
+ normals[5] = 1;
+ normals[6] = 0;
+ normals[7] = 0;
+ normals[8] = 1;
+ normals[9] = 0;
+ normals[10] = 0;
+ normals[11] = 1;
+ attributes.normal = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: normals
+ });
+ }
+ if (vertexFormat.st) {
+ const texCoords = new Float32Array(4 * 2);
+ texCoords[0] = 0;
+ texCoords[1] = 0;
+ texCoords[2] = 1;
+ texCoords[3] = 0;
+ texCoords[4] = 1;
+ texCoords[5] = 1;
+ texCoords[6] = 0;
+ texCoords[7] = 1;
+ attributes.st = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 2,
+ values: texCoords
+ });
+ }
+ if (vertexFormat.tangent) {
+ const tangents = new Float32Array(4 * 3);
+ tangents[0] = 1;
+ tangents[1] = 0;
+ tangents[2] = 0;
+ tangents[3] = 1;
+ tangents[4] = 0;
+ tangents[5] = 0;
+ tangents[6] = 1;
+ tangents[7] = 0;
+ tangents[8] = 0;
+ tangents[9] = 1;
+ tangents[10] = 0;
+ tangents[11] = 0;
+ attributes.tangent = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: tangents
+ });
+ }
+ if (vertexFormat.bitangent) {
+ const bitangents = new Float32Array(4 * 3);
+ bitangents[0] = 0;
+ bitangents[1] = 1;
+ bitangents[2] = 0;
+ bitangents[3] = 0;
+ bitangents[4] = 1;
+ bitangents[5] = 0;
+ bitangents[6] = 0;
+ bitangents[7] = 1;
+ bitangents[8] = 0;
+ bitangents[9] = 0;
+ bitangents[10] = 1;
+ bitangents[11] = 0;
+ attributes.bitangent = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: bitangents
+ });
+ }
+ indices = new Uint16Array(2 * 3);
+ indices[0] = 0;
+ indices[1] = 1;
+ indices[2] = 2;
+ indices[3] = 0;
+ indices[4] = 2;
+ indices[5] = 3;
+ }
+ return new Geometry_default({
+ attributes,
+ indices,
+ primitiveType: PrimitiveType_default.TRIANGLES,
+ boundingSphere: new BoundingSphere_default(Cartesian3_default.ZERO, Math.sqrt(2))
+ });
+};
+var PlaneGeometry_default = PlaneGeometry;
+
+// packages/engine/Source/Workers/createPlaneGeometry.js
+function createPlaneGeometry(planeGeometry, offset) {
+ if (defined_default(offset)) {
+ planeGeometry = PlaneGeometry_default.unpack(planeGeometry, offset);
+ }
+ return PlaneGeometry_default.createGeometry(planeGeometry);
+}
+var createPlaneGeometry_default = createPlaneGeometry;
+export {
+ createPlaneGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createPlaneOutlineGeometry.js b/public/assets/cesium/Workers/createPlaneOutlineGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..118c1aeb734f4ab82ae65af847032dd1fb3424a6
--- /dev/null
+++ b/public/assets/cesium/Workers/createPlaneOutlineGeometry.js
@@ -0,0 +1,122 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ GeometryAttributes_default
+} from "./chunk-X7IQYYHF.js";
+import {
+ GeometryAttribute_default,
+ Geometry_default,
+ PrimitiveType_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ BoundingSphere_default
+} from "./chunk-KHZNBFOH.js";
+import "./chunk-6SQMLVGV.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian3_default
+} from "./chunk-FFLMY4TE.js";
+import "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import "./chunk-U5HSOKPQ.js";
+import {
+ Check_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/PlaneOutlineGeometry.js
+function PlaneOutlineGeometry() {
+ this._workerName = "createPlaneOutlineGeometry";
+}
+PlaneOutlineGeometry.packedLength = 0;
+PlaneOutlineGeometry.pack = function(value, array) {
+ Check_default.defined("value", value);
+ Check_default.defined("array", array);
+ return array;
+};
+PlaneOutlineGeometry.unpack = function(array, startingIndex, result) {
+ Check_default.defined("array", array);
+ if (!defined_default(result)) {
+ return new PlaneOutlineGeometry();
+ }
+ return result;
+};
+var min = new Cartesian3_default(-0.5, -0.5, 0);
+var max = new Cartesian3_default(0.5, 0.5, 0);
+PlaneOutlineGeometry.createGeometry = function() {
+ const attributes = new GeometryAttributes_default();
+ const indices = new Uint16Array(4 * 2);
+ const positions = new Float64Array(4 * 3);
+ positions[0] = min.x;
+ positions[1] = min.y;
+ positions[2] = min.z;
+ positions[3] = max.x;
+ positions[4] = min.y;
+ positions[5] = min.z;
+ positions[6] = max.x;
+ positions[7] = max.y;
+ positions[8] = min.z;
+ positions[9] = min.x;
+ positions[10] = max.y;
+ positions[11] = min.z;
+ attributes.position = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: positions
+ });
+ indices[0] = 0;
+ indices[1] = 1;
+ indices[2] = 1;
+ indices[3] = 2;
+ indices[4] = 2;
+ indices[5] = 3;
+ indices[6] = 3;
+ indices[7] = 0;
+ return new Geometry_default({
+ attributes,
+ indices,
+ primitiveType: PrimitiveType_default.LINES,
+ boundingSphere: new BoundingSphere_default(Cartesian3_default.ZERO, Math.sqrt(2))
+ });
+};
+var PlaneOutlineGeometry_default = PlaneOutlineGeometry;
+
+// packages/engine/Source/Workers/createPlaneOutlineGeometry.js
+function createPlaneOutlineGeometry(planeGeometry, offset) {
+ if (defined_default(offset)) {
+ planeGeometry = PlaneOutlineGeometry_default.unpack(planeGeometry, offset);
+ }
+ return PlaneOutlineGeometry_default.createGeometry(planeGeometry);
+}
+var createPlaneOutlineGeometry_default = createPlaneOutlineGeometry;
+export {
+ createPlaneOutlineGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createPolygonGeometry.js b/public/assets/cesium/Workers/createPolygonGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..c9a853da82e0c5b858133ae0420789a36eee083b
--- /dev/null
+++ b/public/assets/cesium/Workers/createPolygonGeometry.js
@@ -0,0 +1,1409 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ BoundingRectangle_default
+} from "./chunk-44QAAS4P.js";
+import {
+ PolygonGeometryLibrary_default
+} from "./chunk-IZJ42N4W.js";
+import {
+ ArcType_default
+} from "./chunk-XWOUPGUF.js";
+import {
+ GeometryInstance_default
+} from "./chunk-YSIJTJ7N.js";
+import {
+ GeometryPipeline_default
+} from "./chunk-7ZZ5LMZY.js";
+import "./chunk-LJ2JQHJT.js";
+import "./chunk-NGZJIN5Z.js";
+import {
+ GeometryOffsetAttribute_default
+} from "./chunk-GBT7MJ6X.js";
+import {
+ VertexFormat_default
+} from "./chunk-JBSKHTNX.js";
+import {
+ EllipsoidTangentPlane_default
+} from "./chunk-YK3QIKY7.js";
+import "./chunk-NDDI2LWR.js";
+import {
+ PolygonPipeline_default,
+ WindingOrder_default
+} from "./chunk-TI3TRKIC.js";
+import "./chunk-57H6I3SV.js";
+import "./chunk-JSQJDZI4.js";
+import {
+ IntersectionTests_default,
+ Ray_default
+} from "./chunk-QQOZO7KO.js";
+import "./chunk-EDLRS3AW.js";
+import {
+ IndexDatatype_default
+} from "./chunk-C4WPMOKT.js";
+import "./chunk-X7IQYYHF.js";
+import {
+ GeometryAttribute_default,
+ Geometry_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ BoundingSphere_default
+} from "./chunk-KHZNBFOH.js";
+import {
+ Quaternion_default,
+ Rectangle_default
+} from "./chunk-6SQMLVGV.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian2_default,
+ Cartesian3_default,
+ Cartographic_default,
+ Ellipsoid_default,
+ Matrix3_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default,
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/Stereographic.js
+function Stereographic(position, tangentPlane) {
+ this.position = position;
+ if (!defined_default(this.position)) {
+ this.position = new Cartesian2_default();
+ }
+ this.tangentPlane = tangentPlane;
+ if (!defined_default(this.tangentPlane)) {
+ this.tangentPlane = Stereographic.NORTH_POLE_TANGENT_PLANE;
+ }
+}
+Object.defineProperties(Stereographic.prototype, {
+ /**
+ * Gets the ellipsoid.
+ * @memberof Stereographic.prototype
+ * @type {Ellipsoid}
+ */
+ ellipsoid: {
+ get: function() {
+ return this.tangentPlane.ellipsoid;
+ }
+ },
+ /**
+ * Gets the x coordinate
+ * @memberof Stereographic.prototype
+ * @type {number}
+ */
+ x: {
+ get: function() {
+ return this.position.x;
+ }
+ },
+ /**
+ * Gets the y coordinate
+ * @memberof Stereographic.prototype
+ * @type {number}
+ */
+ y: {
+ get: function() {
+ return this.position.y;
+ }
+ },
+ /**
+ * Computes the conformal latitude, or the ellipsoidal latitude projected onto an arbitrary sphere.
+ * @memberof Stereographic.prototype
+ * @type {number}
+ */
+ conformalLatitude: {
+ get: function() {
+ const r = Cartesian2_default.magnitude(this.position);
+ const d = 2 * this.ellipsoid.maximumRadius;
+ const sign = this.tangentPlane.plane.normal.z;
+ return sign * (Math_default.PI_OVER_TWO - 2 * Math.atan2(r, d));
+ }
+ },
+ /**
+ * Computes the longitude
+ * @memberof Stereographic.prototype
+ * @type {number}
+ */
+ longitude: {
+ get: function() {
+ let longitude = Math_default.PI_OVER_TWO + Math.atan2(this.y, this.x);
+ if (longitude > Math.PI) {
+ longitude -= Math_default.TWO_PI;
+ }
+ return longitude;
+ }
+ }
+});
+var scratchCartographic = new Cartographic_default();
+var scratchCartesian = new Cartesian3_default();
+Stereographic.prototype.getLatitude = function(ellipsoid) {
+ if (!defined_default(ellipsoid)) {
+ ellipsoid = Ellipsoid_default.default;
+ }
+ scratchCartographic.latitude = this.conformalLatitude;
+ scratchCartographic.longitude = this.longitude;
+ scratchCartographic.height = 0;
+ const cartesian = this.ellipsoid.cartographicToCartesian(
+ scratchCartographic,
+ scratchCartesian
+ );
+ ellipsoid.cartesianToCartographic(cartesian, scratchCartographic);
+ return scratchCartographic.latitude;
+};
+var scratchProjectPointOntoPlaneRay = new Ray_default();
+var scratchProjectPointOntoPlaneRayDirection = new Cartesian3_default();
+var scratchProjectPointOntoPlaneCartesian3 = new Cartesian3_default();
+Stereographic.fromCartesian = function(cartesian, result) {
+ Check_default.defined("cartesian", cartesian);
+ const sign = Math_default.signNotZero(cartesian.z);
+ let tangentPlane = Stereographic.NORTH_POLE_TANGENT_PLANE;
+ let origin = Stereographic.SOUTH_POLE;
+ if (sign < 0) {
+ tangentPlane = Stereographic.SOUTH_POLE_TANGENT_PLANE;
+ origin = Stereographic.NORTH_POLE;
+ }
+ const ray = scratchProjectPointOntoPlaneRay;
+ ray.origin = tangentPlane.ellipsoid.scaleToGeocentricSurface(
+ cartesian,
+ ray.origin
+ );
+ ray.direction = Cartesian3_default.subtract(
+ ray.origin,
+ origin,
+ scratchProjectPointOntoPlaneRayDirection
+ );
+ Cartesian3_default.normalize(ray.direction, ray.direction);
+ const intersectionPoint = IntersectionTests_default.rayPlane(
+ ray,
+ tangentPlane.plane,
+ scratchProjectPointOntoPlaneCartesian3
+ );
+ const v = Cartesian3_default.subtract(intersectionPoint, origin, intersectionPoint);
+ const x = Cartesian3_default.dot(tangentPlane.xAxis, v);
+ const y = sign * Cartesian3_default.dot(tangentPlane.yAxis, v);
+ if (!defined_default(result)) {
+ return new Stereographic(new Cartesian2_default(x, y), tangentPlane);
+ }
+ result.position = new Cartesian2_default(x, y);
+ result.tangentPlane = tangentPlane;
+ return result;
+};
+Stereographic.fromCartesianArray = function(cartesians, result) {
+ Check_default.defined("cartesians", cartesians);
+ const length = cartesians.length;
+ if (!defined_default(result)) {
+ result = new Array(length);
+ } else {
+ result.length = length;
+ }
+ for (let i = 0; i < length; i++) {
+ result[i] = Stereographic.fromCartesian(cartesians[i], result[i]);
+ }
+ return result;
+};
+Stereographic.clone = function(stereographic, result) {
+ if (!defined_default(stereographic)) {
+ return void 0;
+ }
+ if (!defined_default(result)) {
+ return new Stereographic(
+ stereographic.position,
+ stereographic.tangentPlane
+ );
+ }
+ result.position = stereographic.position;
+ result.tangentPlane = stereographic.tangentPlane;
+ return result;
+};
+Stereographic.HALF_UNIT_SPHERE = Object.freeze(new Ellipsoid_default(0.5, 0.5, 0.5));
+Stereographic.NORTH_POLE = Object.freeze(new Cartesian3_default(0, 0, 0.5));
+Stereographic.SOUTH_POLE = Object.freeze(new Cartesian3_default(0, 0, -0.5));
+Stereographic.NORTH_POLE_TANGENT_PLANE = Object.freeze(
+ new EllipsoidTangentPlane_default(
+ Stereographic.NORTH_POLE,
+ Stereographic.HALF_UNIT_SPHERE
+ )
+);
+Stereographic.SOUTH_POLE_TANGENT_PLANE = Object.freeze(
+ new EllipsoidTangentPlane_default(
+ Stereographic.SOUTH_POLE,
+ Stereographic.HALF_UNIT_SPHERE
+ )
+);
+var Stereographic_default = Stereographic;
+
+// packages/engine/Source/Core/PolygonGeometry.js
+var scratchCarto1 = new Cartographic_default();
+var scratchCarto2 = new Cartographic_default();
+function adjustPosHeightsForNormal(position, p1, p2, ellipsoid) {
+ const carto1 = ellipsoid.cartesianToCartographic(position, scratchCarto1);
+ const height = carto1.height;
+ const p1Carto = ellipsoid.cartesianToCartographic(p1, scratchCarto2);
+ p1Carto.height = height;
+ ellipsoid.cartographicToCartesian(p1Carto, p1);
+ const p2Carto = ellipsoid.cartesianToCartographic(p2, scratchCarto2);
+ p2Carto.height = height - 100;
+ ellipsoid.cartographicToCartesian(p2Carto, p2);
+}
+var scratchBoundingRectangle = new BoundingRectangle_default();
+var scratchPosition = new Cartesian3_default();
+var scratchNormal = new Cartesian3_default();
+var scratchTangent = new Cartesian3_default();
+var scratchBitangent = new Cartesian3_default();
+var p1Scratch = new Cartesian3_default();
+var p2Scratch = new Cartesian3_default();
+var scratchPerPosNormal = new Cartesian3_default();
+var scratchPerPosTangent = new Cartesian3_default();
+var scratchPerPosBitangent = new Cartesian3_default();
+var appendTextureCoordinatesOrigin = new Cartesian2_default();
+var appendTextureCoordinatesCartesian2 = new Cartesian2_default();
+var appendTextureCoordinatesCartesian3 = new Cartesian3_default();
+var appendTextureCoordinatesQuaternion = new Quaternion_default();
+var appendTextureCoordinatesMatrix3 = new Matrix3_default();
+var tangentMatrixScratch = new Matrix3_default();
+function computeAttributes(options) {
+ const vertexFormat = options.vertexFormat;
+ const geometry = options.geometry;
+ const shadowVolume = options.shadowVolume;
+ const flatPositions = geometry.attributes.position.values;
+ const flatTexcoords = defined_default(geometry.attributes.st) ? geometry.attributes.st.values : void 0;
+ let length = flatPositions.length;
+ const wall = options.wall;
+ const top = options.top || wall;
+ const bottom = options.bottom || wall;
+ if (vertexFormat.st || vertexFormat.normal || vertexFormat.tangent || vertexFormat.bitangent || shadowVolume) {
+ const boundingRectangle = options.boundingRectangle;
+ const rotationAxis = options.rotationAxis;
+ const projectTo2d = options.projectTo2d;
+ const ellipsoid = options.ellipsoid;
+ const stRotation = options.stRotation;
+ const perPositionHeight = options.perPositionHeight;
+ const origin = appendTextureCoordinatesOrigin;
+ origin.x = boundingRectangle.x;
+ origin.y = boundingRectangle.y;
+ const textureCoordinates = vertexFormat.st ? new Float32Array(2 * (length / 3)) : void 0;
+ let normals;
+ if (vertexFormat.normal) {
+ if (perPositionHeight && top && !wall) {
+ normals = geometry.attributes.normal.values;
+ } else {
+ normals = new Float32Array(length);
+ }
+ }
+ const tangents = vertexFormat.tangent ? new Float32Array(length) : void 0;
+ const bitangents = vertexFormat.bitangent ? new Float32Array(length) : void 0;
+ const extrudeNormals = shadowVolume ? new Float32Array(length) : void 0;
+ let textureCoordIndex = 0;
+ let attrIndex = 0;
+ let normal = scratchNormal;
+ let tangent = scratchTangent;
+ let bitangent = scratchBitangent;
+ let recomputeNormal = true;
+ let textureMatrix = appendTextureCoordinatesMatrix3;
+ let tangentRotationMatrix = tangentMatrixScratch;
+ if (stRotation !== 0) {
+ let rotation = Quaternion_default.fromAxisAngle(
+ rotationAxis,
+ stRotation,
+ appendTextureCoordinatesQuaternion
+ );
+ textureMatrix = Matrix3_default.fromQuaternion(rotation, textureMatrix);
+ rotation = Quaternion_default.fromAxisAngle(
+ rotationAxis,
+ -stRotation,
+ appendTextureCoordinatesQuaternion
+ );
+ tangentRotationMatrix = Matrix3_default.fromQuaternion(
+ rotation,
+ tangentRotationMatrix
+ );
+ } else {
+ textureMatrix = Matrix3_default.clone(Matrix3_default.IDENTITY, textureMatrix);
+ tangentRotationMatrix = Matrix3_default.clone(
+ Matrix3_default.IDENTITY,
+ tangentRotationMatrix
+ );
+ }
+ let bottomOffset = 0;
+ let bottomOffset2 = 0;
+ if (top && bottom) {
+ bottomOffset = length / 2;
+ bottomOffset2 = length / 3;
+ length /= 2;
+ }
+ for (let i = 0; i < length; i += 3) {
+ const position = Cartesian3_default.fromArray(
+ flatPositions,
+ i,
+ appendTextureCoordinatesCartesian3
+ );
+ if (vertexFormat.st) {
+ if (!defined_default(flatTexcoords)) {
+ let p = Matrix3_default.multiplyByVector(
+ textureMatrix,
+ position,
+ scratchPosition
+ );
+ p = ellipsoid.scaleToGeodeticSurface(p, p);
+ const st = projectTo2d([p], appendTextureCoordinatesCartesian2)[0];
+ Cartesian2_default.subtract(st, origin, st);
+ const stx = Math_default.clamp(st.x / boundingRectangle.width, 0, 1);
+ const sty = Math_default.clamp(st.y / boundingRectangle.height, 0, 1);
+ if (bottom) {
+ textureCoordinates[textureCoordIndex + bottomOffset2] = stx;
+ textureCoordinates[textureCoordIndex + 1 + bottomOffset2] = sty;
+ }
+ if (top) {
+ textureCoordinates[textureCoordIndex] = stx;
+ textureCoordinates[textureCoordIndex + 1] = sty;
+ }
+ textureCoordIndex += 2;
+ }
+ }
+ if (vertexFormat.normal || vertexFormat.tangent || vertexFormat.bitangent || shadowVolume) {
+ const attrIndex1 = attrIndex + 1;
+ const attrIndex2 = attrIndex + 2;
+ if (wall) {
+ if (i + 3 < length) {
+ const p1 = Cartesian3_default.fromArray(flatPositions, i + 3, p1Scratch);
+ if (recomputeNormal) {
+ const p2 = Cartesian3_default.fromArray(
+ flatPositions,
+ i + length,
+ p2Scratch
+ );
+ if (perPositionHeight) {
+ adjustPosHeightsForNormal(position, p1, p2, ellipsoid);
+ }
+ Cartesian3_default.subtract(p1, position, p1);
+ Cartesian3_default.subtract(p2, position, p2);
+ normal = Cartesian3_default.normalize(
+ Cartesian3_default.cross(p2, p1, normal),
+ normal
+ );
+ recomputeNormal = false;
+ }
+ if (Cartesian3_default.equalsEpsilon(p1, position, Math_default.EPSILON10)) {
+ recomputeNormal = true;
+ }
+ }
+ if (vertexFormat.tangent || vertexFormat.bitangent) {
+ bitangent = ellipsoid.geodeticSurfaceNormal(position, bitangent);
+ if (vertexFormat.tangent) {
+ tangent = Cartesian3_default.normalize(
+ Cartesian3_default.cross(bitangent, normal, tangent),
+ tangent
+ );
+ }
+ }
+ } else {
+ normal = ellipsoid.geodeticSurfaceNormal(position, normal);
+ if (vertexFormat.tangent || vertexFormat.bitangent) {
+ if (perPositionHeight) {
+ scratchPerPosNormal = Cartesian3_default.fromArray(
+ normals,
+ attrIndex,
+ scratchPerPosNormal
+ );
+ scratchPerPosTangent = Cartesian3_default.cross(
+ Cartesian3_default.UNIT_Z,
+ scratchPerPosNormal,
+ scratchPerPosTangent
+ );
+ scratchPerPosTangent = Cartesian3_default.normalize(
+ Matrix3_default.multiplyByVector(
+ tangentRotationMatrix,
+ scratchPerPosTangent,
+ scratchPerPosTangent
+ ),
+ scratchPerPosTangent
+ );
+ if (vertexFormat.bitangent) {
+ scratchPerPosBitangent = Cartesian3_default.normalize(
+ Cartesian3_default.cross(
+ scratchPerPosNormal,
+ scratchPerPosTangent,
+ scratchPerPosBitangent
+ ),
+ scratchPerPosBitangent
+ );
+ }
+ }
+ tangent = Cartesian3_default.cross(Cartesian3_default.UNIT_Z, normal, tangent);
+ tangent = Cartesian3_default.normalize(
+ Matrix3_default.multiplyByVector(tangentRotationMatrix, tangent, tangent),
+ tangent
+ );
+ if (vertexFormat.bitangent) {
+ bitangent = Cartesian3_default.normalize(
+ Cartesian3_default.cross(normal, tangent, bitangent),
+ bitangent
+ );
+ }
+ }
+ }
+ if (vertexFormat.normal) {
+ if (options.wall) {
+ normals[attrIndex + bottomOffset] = normal.x;
+ normals[attrIndex1 + bottomOffset] = normal.y;
+ normals[attrIndex2 + bottomOffset] = normal.z;
+ } else if (bottom) {
+ normals[attrIndex + bottomOffset] = -normal.x;
+ normals[attrIndex1 + bottomOffset] = -normal.y;
+ normals[attrIndex2 + bottomOffset] = -normal.z;
+ }
+ if (top && !perPositionHeight || wall) {
+ normals[attrIndex] = normal.x;
+ normals[attrIndex1] = normal.y;
+ normals[attrIndex2] = normal.z;
+ }
+ }
+ if (shadowVolume) {
+ if (wall) {
+ normal = ellipsoid.geodeticSurfaceNormal(position, normal);
+ }
+ extrudeNormals[attrIndex + bottomOffset] = -normal.x;
+ extrudeNormals[attrIndex1 + bottomOffset] = -normal.y;
+ extrudeNormals[attrIndex2 + bottomOffset] = -normal.z;
+ }
+ if (vertexFormat.tangent) {
+ if (options.wall) {
+ tangents[attrIndex + bottomOffset] = tangent.x;
+ tangents[attrIndex1 + bottomOffset] = tangent.y;
+ tangents[attrIndex2 + bottomOffset] = tangent.z;
+ } else if (bottom) {
+ tangents[attrIndex + bottomOffset] = -tangent.x;
+ tangents[attrIndex1 + bottomOffset] = -tangent.y;
+ tangents[attrIndex2 + bottomOffset] = -tangent.z;
+ }
+ if (top) {
+ if (perPositionHeight) {
+ tangents[attrIndex] = scratchPerPosTangent.x;
+ tangents[attrIndex1] = scratchPerPosTangent.y;
+ tangents[attrIndex2] = scratchPerPosTangent.z;
+ } else {
+ tangents[attrIndex] = tangent.x;
+ tangents[attrIndex1] = tangent.y;
+ tangents[attrIndex2] = tangent.z;
+ }
+ }
+ }
+ if (vertexFormat.bitangent) {
+ if (bottom) {
+ bitangents[attrIndex + bottomOffset] = bitangent.x;
+ bitangents[attrIndex1 + bottomOffset] = bitangent.y;
+ bitangents[attrIndex2 + bottomOffset] = bitangent.z;
+ }
+ if (top) {
+ if (perPositionHeight) {
+ bitangents[attrIndex] = scratchPerPosBitangent.x;
+ bitangents[attrIndex1] = scratchPerPosBitangent.y;
+ bitangents[attrIndex2] = scratchPerPosBitangent.z;
+ } else {
+ bitangents[attrIndex] = bitangent.x;
+ bitangents[attrIndex1] = bitangent.y;
+ bitangents[attrIndex2] = bitangent.z;
+ }
+ }
+ }
+ attrIndex += 3;
+ }
+ }
+ if (vertexFormat.st && !defined_default(flatTexcoords)) {
+ geometry.attributes.st = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 2,
+ values: textureCoordinates
+ });
+ }
+ if (vertexFormat.normal) {
+ geometry.attributes.normal = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: normals
+ });
+ }
+ if (vertexFormat.tangent) {
+ geometry.attributes.tangent = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: tangents
+ });
+ }
+ if (vertexFormat.bitangent) {
+ geometry.attributes.bitangent = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: bitangents
+ });
+ }
+ if (shadowVolume) {
+ geometry.attributes.extrudeDirection = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: extrudeNormals
+ });
+ }
+ }
+ if (options.extrude && defined_default(options.offsetAttribute)) {
+ const size = flatPositions.length / 3;
+ let offsetAttribute = new Uint8Array(size);
+ if (options.offsetAttribute === GeometryOffsetAttribute_default.TOP) {
+ if (top && bottom || wall) {
+ offsetAttribute = offsetAttribute.fill(1, 0, size / 2);
+ } else if (top) {
+ offsetAttribute = offsetAttribute.fill(1);
+ }
+ } else {
+ const offsetValue = options.offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
+ offsetAttribute = offsetAttribute.fill(offsetValue);
+ }
+ geometry.attributes.applyOffset = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: offsetAttribute
+ });
+ }
+ return geometry;
+}
+var createGeometryFromPositionsExtrudedPositions = [];
+function createGeometryFromPositionsExtruded(ellipsoid, polygon2, textureCoordinates, granularity, hierarchy, perPositionHeight, closeTop, closeBottom, vertexFormat, arcType) {
+ const geos = {
+ walls: []
+ };
+ let i;
+ if (closeTop || closeBottom) {
+ const topGeo = PolygonGeometryLibrary_default.createGeometryFromPositions(
+ ellipsoid,
+ polygon2,
+ textureCoordinates,
+ granularity,
+ perPositionHeight,
+ vertexFormat,
+ arcType
+ );
+ const edgePoints = topGeo.attributes.position.values;
+ const indices = topGeo.indices;
+ let numPositions;
+ let newIndices;
+ if (closeTop && closeBottom) {
+ const topBottomPositions = edgePoints.concat(edgePoints);
+ numPositions = topBottomPositions.length / 3;
+ newIndices = IndexDatatype_default.createTypedArray(
+ numPositions,
+ indices.length * 2
+ );
+ newIndices.set(indices);
+ const ilength = indices.length;
+ const length = numPositions / 2;
+ for (i = 0; i < ilength; i += 3) {
+ const i0 = newIndices[i] + length;
+ const i1 = newIndices[i + 1] + length;
+ const i2 = newIndices[i + 2] + length;
+ newIndices[i + ilength] = i2;
+ newIndices[i + 1 + ilength] = i1;
+ newIndices[i + 2 + ilength] = i0;
+ }
+ topGeo.attributes.position.values = topBottomPositions;
+ if (perPositionHeight && vertexFormat.normal) {
+ const normals = topGeo.attributes.normal.values;
+ topGeo.attributes.normal.values = new Float32Array(
+ topBottomPositions.length
+ );
+ topGeo.attributes.normal.values.set(normals);
+ }
+ if (vertexFormat.st && defined_default(textureCoordinates)) {
+ const texcoords = topGeo.attributes.st.values;
+ topGeo.attributes.st.values = new Float32Array(numPositions * 2);
+ topGeo.attributes.st.values = texcoords.concat(texcoords);
+ }
+ topGeo.indices = newIndices;
+ } else if (closeBottom) {
+ numPositions = edgePoints.length / 3;
+ newIndices = IndexDatatype_default.createTypedArray(numPositions, indices.length);
+ for (i = 0; i < indices.length; i += 3) {
+ newIndices[i] = indices[i + 2];
+ newIndices[i + 1] = indices[i + 1];
+ newIndices[i + 2] = indices[i];
+ }
+ topGeo.indices = newIndices;
+ }
+ geos.topAndBottom = new GeometryInstance_default({
+ geometry: topGeo
+ });
+ }
+ let outerRing = hierarchy.outerRing;
+ const tangentPlane = EllipsoidTangentPlane_default.fromPoints(outerRing, ellipsoid);
+ let positions2D = tangentPlane.projectPointsOntoPlane(
+ outerRing,
+ createGeometryFromPositionsExtrudedPositions
+ );
+ let windingOrder = PolygonPipeline_default.computeWindingOrder2D(positions2D);
+ if (windingOrder === WindingOrder_default.CLOCKWISE) {
+ outerRing = outerRing.slice().reverse();
+ }
+ let wallGeo = PolygonGeometryLibrary_default.computeWallGeometry(
+ outerRing,
+ textureCoordinates,
+ ellipsoid,
+ granularity,
+ perPositionHeight,
+ arcType
+ );
+ geos.walls.push(
+ new GeometryInstance_default({
+ geometry: wallGeo
+ })
+ );
+ const holes = hierarchy.holes;
+ for (i = 0; i < holes.length; i++) {
+ let hole = holes[i];
+ positions2D = tangentPlane.projectPointsOntoPlane(
+ hole,
+ createGeometryFromPositionsExtrudedPositions
+ );
+ windingOrder = PolygonPipeline_default.computeWindingOrder2D(positions2D);
+ if (windingOrder === WindingOrder_default.COUNTER_CLOCKWISE) {
+ hole = hole.slice().reverse();
+ }
+ wallGeo = PolygonGeometryLibrary_default.computeWallGeometry(
+ hole,
+ textureCoordinates,
+ ellipsoid,
+ granularity,
+ perPositionHeight,
+ arcType
+ );
+ geos.walls.push(
+ new GeometryInstance_default({
+ geometry: wallGeo
+ })
+ );
+ }
+ return geos;
+}
+function PolygonGeometry(options) {
+ Check_default.typeOf.object("options", options);
+ Check_default.typeOf.object("options.polygonHierarchy", options.polygonHierarchy);
+ if (defined_default(options.perPositionHeight) && options.perPositionHeight && defined_default(options.height)) {
+ throw new DeveloperError_default(
+ "Cannot use both options.perPositionHeight and options.height"
+ );
+ }
+ if (defined_default(options.arcType) && options.arcType !== ArcType_default.GEODESIC && options.arcType !== ArcType_default.RHUMB) {
+ throw new DeveloperError_default(
+ "Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB."
+ );
+ }
+ const polygonHierarchy = options.polygonHierarchy;
+ const vertexFormat = defaultValue_default(options.vertexFormat, VertexFormat_default.DEFAULT);
+ const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default);
+ const granularity = defaultValue_default(
+ options.granularity,
+ Math_default.RADIANS_PER_DEGREE
+ );
+ const stRotation = defaultValue_default(options.stRotation, 0);
+ const textureCoordinates = options.textureCoordinates;
+ const perPositionHeight = defaultValue_default(options.perPositionHeight, false);
+ const perPositionHeightExtrude = perPositionHeight && defined_default(options.extrudedHeight);
+ let height = defaultValue_default(options.height, 0);
+ let extrudedHeight = defaultValue_default(options.extrudedHeight, height);
+ if (!perPositionHeightExtrude) {
+ const h = Math.max(height, extrudedHeight);
+ extrudedHeight = Math.min(height, extrudedHeight);
+ height = h;
+ }
+ this._vertexFormat = VertexFormat_default.clone(vertexFormat);
+ this._ellipsoid = Ellipsoid_default.clone(ellipsoid);
+ this._granularity = granularity;
+ this._stRotation = stRotation;
+ this._height = height;
+ this._extrudedHeight = extrudedHeight;
+ this._closeTop = defaultValue_default(options.closeTop, true);
+ this._closeBottom = defaultValue_default(options.closeBottom, true);
+ this._polygonHierarchy = polygonHierarchy;
+ this._perPositionHeight = perPositionHeight;
+ this._perPositionHeightExtrude = perPositionHeightExtrude;
+ this._shadowVolume = defaultValue_default(options.shadowVolume, false);
+ this._workerName = "createPolygonGeometry";
+ this._offsetAttribute = options.offsetAttribute;
+ this._arcType = defaultValue_default(options.arcType, ArcType_default.GEODESIC);
+ this._rectangle = void 0;
+ this._textureCoordinateRotationPoints = void 0;
+ this._textureCoordinates = textureCoordinates;
+ this.packedLength = PolygonGeometryLibrary_default.computeHierarchyPackedLength(
+ polygonHierarchy,
+ Cartesian3_default
+ ) + Ellipsoid_default.packedLength + VertexFormat_default.packedLength + (textureCoordinates ? PolygonGeometryLibrary_default.computeHierarchyPackedLength(
+ textureCoordinates,
+ Cartesian2_default
+ ) : 1) + 12;
+}
+PolygonGeometry.fromPositions = function(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ Check_default.defined("options.positions", options.positions);
+ const newOptions = {
+ polygonHierarchy: {
+ positions: options.positions
+ },
+ height: options.height,
+ extrudedHeight: options.extrudedHeight,
+ vertexFormat: options.vertexFormat,
+ stRotation: options.stRotation,
+ ellipsoid: options.ellipsoid,
+ granularity: options.granularity,
+ perPositionHeight: options.perPositionHeight,
+ closeTop: options.closeTop,
+ closeBottom: options.closeBottom,
+ offsetAttribute: options.offsetAttribute,
+ arcType: options.arcType,
+ textureCoordinates: options.textureCoordinates
+ };
+ return new PolygonGeometry(newOptions);
+};
+PolygonGeometry.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ startingIndex = PolygonGeometryLibrary_default.packPolygonHierarchy(
+ value._polygonHierarchy,
+ array,
+ startingIndex,
+ Cartesian3_default
+ );
+ Ellipsoid_default.pack(value._ellipsoid, array, startingIndex);
+ startingIndex += Ellipsoid_default.packedLength;
+ VertexFormat_default.pack(value._vertexFormat, array, startingIndex);
+ startingIndex += VertexFormat_default.packedLength;
+ array[startingIndex++] = value._height;
+ array[startingIndex++] = value._extrudedHeight;
+ array[startingIndex++] = value._granularity;
+ array[startingIndex++] = value._stRotation;
+ array[startingIndex++] = value._perPositionHeightExtrude ? 1 : 0;
+ array[startingIndex++] = value._perPositionHeight ? 1 : 0;
+ array[startingIndex++] = value._closeTop ? 1 : 0;
+ array[startingIndex++] = value._closeBottom ? 1 : 0;
+ array[startingIndex++] = value._shadowVolume ? 1 : 0;
+ array[startingIndex++] = defaultValue_default(value._offsetAttribute, -1);
+ array[startingIndex++] = value._arcType;
+ if (defined_default(value._textureCoordinates)) {
+ startingIndex = PolygonGeometryLibrary_default.packPolygonHierarchy(
+ value._textureCoordinates,
+ array,
+ startingIndex,
+ Cartesian2_default
+ );
+ } else {
+ array[startingIndex++] = -1;
+ }
+ array[startingIndex++] = value.packedLength;
+ return array;
+};
+var scratchEllipsoid = Ellipsoid_default.clone(Ellipsoid_default.UNIT_SPHERE);
+var scratchVertexFormat = new VertexFormat_default();
+var dummyOptions = {
+ polygonHierarchy: {}
+};
+PolygonGeometry.unpack = function(array, startingIndex, result) {
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ const polygonHierarchy = PolygonGeometryLibrary_default.unpackPolygonHierarchy(
+ array,
+ startingIndex,
+ Cartesian3_default
+ );
+ startingIndex = polygonHierarchy.startingIndex;
+ delete polygonHierarchy.startingIndex;
+ const ellipsoid = Ellipsoid_default.unpack(array, startingIndex, scratchEllipsoid);
+ startingIndex += Ellipsoid_default.packedLength;
+ const vertexFormat = VertexFormat_default.unpack(
+ array,
+ startingIndex,
+ scratchVertexFormat
+ );
+ startingIndex += VertexFormat_default.packedLength;
+ const height = array[startingIndex++];
+ const extrudedHeight = array[startingIndex++];
+ const granularity = array[startingIndex++];
+ const stRotation = array[startingIndex++];
+ const perPositionHeightExtrude = array[startingIndex++] === 1;
+ const perPositionHeight = array[startingIndex++] === 1;
+ const closeTop = array[startingIndex++] === 1;
+ const closeBottom = array[startingIndex++] === 1;
+ const shadowVolume = array[startingIndex++] === 1;
+ const offsetAttribute = array[startingIndex++];
+ const arcType = array[startingIndex++];
+ const textureCoordinates = array[startingIndex] === -1 ? void 0 : PolygonGeometryLibrary_default.unpackPolygonHierarchy(
+ array,
+ startingIndex,
+ Cartesian2_default
+ );
+ if (defined_default(textureCoordinates)) {
+ startingIndex = textureCoordinates.startingIndex;
+ delete textureCoordinates.startingIndex;
+ } else {
+ startingIndex++;
+ }
+ const packedLength = array[startingIndex++];
+ if (!defined_default(result)) {
+ result = new PolygonGeometry(dummyOptions);
+ }
+ result._polygonHierarchy = polygonHierarchy;
+ result._ellipsoid = Ellipsoid_default.clone(ellipsoid, result._ellipsoid);
+ result._vertexFormat = VertexFormat_default.clone(vertexFormat, result._vertexFormat);
+ result._height = height;
+ result._extrudedHeight = extrudedHeight;
+ result._granularity = granularity;
+ result._stRotation = stRotation;
+ result._perPositionHeightExtrude = perPositionHeightExtrude;
+ result._perPositionHeight = perPositionHeight;
+ result._closeTop = closeTop;
+ result._closeBottom = closeBottom;
+ result._shadowVolume = shadowVolume;
+ result._offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
+ result._arcType = arcType;
+ result._textureCoordinates = textureCoordinates;
+ result.packedLength = packedLength;
+ return result;
+};
+var scratchCartesian0 = new Cartesian2_default();
+var scratchCartesian1 = new Cartesian2_default();
+var scratchPolarClosest = new Stereographic_default();
+function expandRectangle(polar, lastPolar, ellipsoid, arcType, polygon2, result) {
+ const longitude = polar.longitude;
+ const lonAdjusted = longitude >= 0 ? longitude : longitude + Math_default.TWO_PI;
+ polygon2.westOverIdl = Math.min(polygon2.westOverIdl, lonAdjusted);
+ polygon2.eastOverIdl = Math.max(polygon2.eastOverIdl, lonAdjusted);
+ result.west = Math.min(result.west, longitude);
+ result.east = Math.max(result.east, longitude);
+ const latitude = polar.getLatitude(ellipsoid);
+ let segmentLatitude = latitude;
+ result.south = Math.min(result.south, latitude);
+ result.north = Math.max(result.north, latitude);
+ if (arcType !== ArcType_default.RHUMB) {
+ const segment = Cartesian2_default.subtract(
+ lastPolar.position,
+ polar.position,
+ scratchCartesian0
+ );
+ const t = Cartesian2_default.dot(lastPolar.position, segment) / Cartesian2_default.dot(segment, segment);
+ if (t > 0 && t < 1) {
+ const projected = Cartesian2_default.add(
+ lastPolar.position,
+ Cartesian2_default.multiplyByScalar(segment, -t, segment),
+ scratchCartesian1
+ );
+ const closestPolar = Stereographic_default.clone(lastPolar, scratchPolarClosest);
+ closestPolar.position = projected;
+ const adjustedLatitude = closestPolar.getLatitude(ellipsoid);
+ result.south = Math.min(result.south, adjustedLatitude);
+ result.north = Math.max(result.north, adjustedLatitude);
+ if (Math.abs(latitude) > Math.abs(adjustedLatitude)) {
+ segmentLatitude = adjustedLatitude;
+ }
+ }
+ }
+ const direction = lastPolar.x * polar.y - polar.x * lastPolar.y;
+ let angle = Math.sign(direction);
+ if (angle !== 0) {
+ angle *= Cartesian2_default.angleBetween(lastPolar.position, polar.position);
+ }
+ if (segmentLatitude >= 0) {
+ polygon2.northAngle += angle;
+ }
+ if (segmentLatitude <= 0) {
+ polygon2.southAngle += angle;
+ }
+}
+var scratchPolar = new Stereographic_default();
+var scratchPolarPrevious = new Stereographic_default();
+var polygon = {
+ northAngle: 0,
+ southAngle: 0,
+ westOverIdl: 0,
+ eastOverIdl: 0
+};
+PolygonGeometry.computeRectangleFromPositions = function(positions, ellipsoid, arcType, result) {
+ Check_default.defined("positions", positions);
+ if (!defined_default(result)) {
+ result = new Rectangle_default();
+ }
+ if (positions.length < 3) {
+ return result;
+ }
+ result.west = Number.POSITIVE_INFINITY;
+ result.east = Number.NEGATIVE_INFINITY;
+ result.south = Number.POSITIVE_INFINITY;
+ result.north = Number.NEGATIVE_INFINITY;
+ polygon.northAngle = 0;
+ polygon.southAngle = 0;
+ polygon.westOverIdl = Number.POSITIVE_INFINITY;
+ polygon.eastOverIdl = Number.NEGATIVE_INFINITY;
+ const positionsLength = positions.length;
+ let lastPolarPosition = Stereographic_default.fromCartesian(
+ positions[0],
+ scratchPolarPrevious
+ );
+ for (let i = 1; i < positionsLength; i++) {
+ const polarPosition = Stereographic_default.fromCartesian(
+ positions[i],
+ scratchPolar
+ );
+ expandRectangle(
+ polarPosition,
+ lastPolarPosition,
+ ellipsoid,
+ arcType,
+ polygon,
+ result
+ );
+ lastPolarPosition = Stereographic_default.clone(polarPosition, lastPolarPosition);
+ }
+ expandRectangle(
+ Stereographic_default.fromCartesian(positions[0], scratchPolar),
+ lastPolarPosition,
+ ellipsoid,
+ arcType,
+ polygon,
+ result
+ );
+ if (result.east - result.west > polygon.eastOverIdl - polygon.westOverIdl) {
+ result.west = polygon.westOverIdl;
+ result.east = polygon.eastOverIdl;
+ if (result.east > Math_default.PI) {
+ result.east = result.east - Math_default.TWO_PI;
+ }
+ if (result.west > Math_default.PI) {
+ result.west = result.west - Math_default.TWO_PI;
+ }
+ }
+ if (Math_default.equalsEpsilon(
+ Math.abs(polygon.northAngle),
+ Math_default.TWO_PI,
+ Math_default.EPSILON10
+ )) {
+ result.north = Math_default.PI_OVER_TWO;
+ result.east = Math_default.PI;
+ result.west = -Math_default.PI;
+ }
+ if (Math_default.equalsEpsilon(
+ Math.abs(polygon.southAngle),
+ Math_default.TWO_PI,
+ Math_default.EPSILON10
+ )) {
+ result.south = -Math_default.PI_OVER_TWO;
+ result.east = Math_default.PI;
+ result.west = -Math_default.PI;
+ }
+ return result;
+};
+var scratchPolarForPlane = new Stereographic_default();
+function getTangentPlane(rectangle, positions, ellipsoid) {
+ if (rectangle.height >= Math_default.PI || rectangle.width >= Math_default.PI) {
+ const polar = Stereographic_default.fromCartesian(
+ positions[0],
+ scratchPolarForPlane
+ );
+ return polar.tangentPlane;
+ }
+ return EllipsoidTangentPlane_default.fromPoints(positions, ellipsoid);
+}
+var scratchCartographicCyllindrical = new Cartographic_default();
+function createProjectTo2d(rectangle, outerPositions, ellipsoid) {
+ return (positions, results) => {
+ if (rectangle.height >= Math_default.PI || rectangle.width >= Math_default.PI) {
+ if (rectangle.south < 0 && rectangle.north > 0) {
+ if (!defined_default(results)) {
+ results = [];
+ }
+ for (let i = 0; i < positions.length; ++i) {
+ const cartographic = ellipsoid.cartesianToCartographic(
+ positions[i],
+ scratchCartographicCyllindrical
+ );
+ results[i] = new Cartesian2_default(
+ cartographic.longitude / Math_default.PI,
+ cartographic.latitude / Math_default.PI_OVER_TWO
+ );
+ }
+ results.length = positions.length;
+ return results;
+ }
+ return Stereographic_default.fromCartesianArray(positions, results);
+ }
+ const tangentPlane = EllipsoidTangentPlane_default.fromPoints(
+ outerPositions,
+ ellipsoid
+ );
+ return tangentPlane.projectPointsOntoPlane(positions, results);
+ };
+}
+function createProjectPositionTo2d(rectangle, outerRing, ellipsoid) {
+ if (rectangle.height >= Math_default.PI || rectangle.width >= Math_default.PI) {
+ return (position, result) => {
+ if (rectangle.south < 0 && rectangle.north > 0) {
+ const cartographic = ellipsoid.cartesianToCartographic(
+ position,
+ scratchCartographicCyllindrical
+ );
+ if (!defined_default(result)) {
+ result = new Cartesian2_default();
+ }
+ result.x = cartographic.longitude / Math_default.PI;
+ result.y = cartographic.latitude / Math_default.PI_OVER_TWO;
+ return result;
+ }
+ return Stereographic_default.fromCartesian(position, result);
+ };
+ }
+ const tangentPlane = EllipsoidTangentPlane_default.fromPoints(outerRing, ellipsoid);
+ return (position, result) => {
+ return tangentPlane.projectPointsOntoPlane(position, result);
+ };
+}
+function createSplitPolygons(rectangle, ellipsoid, arcType, perPositionHeight) {
+ return (polygons, results) => {
+ if (!perPositionHeight && (rectangle.height >= Math_default.PI_OVER_TWO || rectangle.width >= 2 * Math_default.PI_OVER_THREE)) {
+ return PolygonGeometryLibrary_default.splitPolygonsOnEquator(
+ polygons,
+ ellipsoid,
+ arcType,
+ results
+ );
+ }
+ return polygons;
+ };
+}
+function computeBoundingRectangle(outerRing, rectangle, ellipsoid, stRotation) {
+ if (rectangle.height >= Math_default.PI || rectangle.width >= Math_default.PI) {
+ return BoundingRectangle_default.fromRectangle(
+ rectangle,
+ void 0,
+ scratchBoundingRectangle
+ );
+ }
+ const outerPositions = outerRing;
+ const tangentPlane = EllipsoidTangentPlane_default.fromPoints(
+ outerPositions,
+ ellipsoid
+ );
+ return PolygonGeometryLibrary_default.computeBoundingRectangle(
+ tangentPlane.plane.normal,
+ tangentPlane.projectPointOntoPlane.bind(tangentPlane),
+ outerPositions,
+ stRotation,
+ scratchBoundingRectangle
+ );
+}
+PolygonGeometry.createGeometry = function(polygonGeometry) {
+ const vertexFormat = polygonGeometry._vertexFormat;
+ const ellipsoid = polygonGeometry._ellipsoid;
+ const granularity = polygonGeometry._granularity;
+ const stRotation = polygonGeometry._stRotation;
+ const polygonHierarchy = polygonGeometry._polygonHierarchy;
+ const perPositionHeight = polygonGeometry._perPositionHeight;
+ const closeTop = polygonGeometry._closeTop;
+ const closeBottom = polygonGeometry._closeBottom;
+ const arcType = polygonGeometry._arcType;
+ const textureCoordinates = polygonGeometry._textureCoordinates;
+ const hasTextureCoordinates = defined_default(textureCoordinates);
+ const outerPositions = polygonHierarchy.positions;
+ if (outerPositions.length < 3) {
+ return;
+ }
+ const rectangle = polygonGeometry.rectangle;
+ const results = PolygonGeometryLibrary_default.polygonsFromHierarchy(
+ polygonHierarchy,
+ hasTextureCoordinates,
+ createProjectTo2d(rectangle, outerPositions, ellipsoid),
+ !perPositionHeight,
+ ellipsoid,
+ createSplitPolygons(rectangle, ellipsoid, arcType, perPositionHeight)
+ );
+ const hierarchy = results.hierarchy;
+ const polygons = results.polygons;
+ const dummyFunction = function(identity) {
+ return identity;
+ };
+ const textureCoordinatePolygons = hasTextureCoordinates ? PolygonGeometryLibrary_default.polygonsFromHierarchy(
+ textureCoordinates,
+ true,
+ dummyFunction,
+ false,
+ ellipsoid
+ ).polygons : void 0;
+ if (hierarchy.length === 0) {
+ return;
+ }
+ const outerRing = hierarchy[0].outerRing;
+ const boundingRectangle = computeBoundingRectangle(
+ outerRing,
+ rectangle,
+ ellipsoid,
+ stRotation
+ );
+ const geometries = [];
+ const height = polygonGeometry._height;
+ const extrudedHeight = polygonGeometry._extrudedHeight;
+ const extrude = polygonGeometry._perPositionHeightExtrude || !Math_default.equalsEpsilon(height, extrudedHeight, 0, Math_default.EPSILON2);
+ const options = {
+ perPositionHeight,
+ vertexFormat,
+ geometry: void 0,
+ rotationAxis: getTangentPlane(rectangle, outerRing, ellipsoid).plane.normal,
+ projectTo2d: createProjectPositionTo2d(rectangle, outerRing, ellipsoid),
+ boundingRectangle,
+ ellipsoid,
+ stRotation,
+ textureCoordinates: void 0,
+ bottom: false,
+ top: true,
+ wall: false,
+ extrude: false,
+ arcType
+ };
+ let i;
+ if (extrude) {
+ options.extrude = true;
+ options.top = closeTop;
+ options.bottom = closeBottom;
+ options.shadowVolume = polygonGeometry._shadowVolume;
+ options.offsetAttribute = polygonGeometry._offsetAttribute;
+ for (i = 0; i < polygons.length; i++) {
+ const splitGeometry = createGeometryFromPositionsExtruded(
+ ellipsoid,
+ polygons[i],
+ hasTextureCoordinates ? textureCoordinatePolygons[i] : void 0,
+ granularity,
+ hierarchy[i],
+ perPositionHeight,
+ closeTop,
+ closeBottom,
+ vertexFormat,
+ arcType
+ );
+ let topAndBottom;
+ if (closeTop && closeBottom) {
+ topAndBottom = splitGeometry.topAndBottom;
+ options.geometry = PolygonGeometryLibrary_default.scaleToGeodeticHeightExtruded(
+ topAndBottom.geometry,
+ height,
+ extrudedHeight,
+ ellipsoid,
+ perPositionHeight
+ );
+ } else if (closeTop) {
+ topAndBottom = splitGeometry.topAndBottom;
+ topAndBottom.geometry.attributes.position.values = PolygonPipeline_default.scaleToGeodeticHeight(
+ topAndBottom.geometry.attributes.position.values,
+ height,
+ ellipsoid,
+ !perPositionHeight
+ );
+ options.geometry = topAndBottom.geometry;
+ } else if (closeBottom) {
+ topAndBottom = splitGeometry.topAndBottom;
+ topAndBottom.geometry.attributes.position.values = PolygonPipeline_default.scaleToGeodeticHeight(
+ topAndBottom.geometry.attributes.position.values,
+ extrudedHeight,
+ ellipsoid,
+ true
+ );
+ options.geometry = topAndBottom.geometry;
+ }
+ if (closeTop || closeBottom) {
+ options.wall = false;
+ topAndBottom.geometry = computeAttributes(options);
+ geometries.push(topAndBottom);
+ }
+ const walls = splitGeometry.walls;
+ options.wall = true;
+ for (let k = 0; k < walls.length; k++) {
+ const wall = walls[k];
+ options.geometry = PolygonGeometryLibrary_default.scaleToGeodeticHeightExtruded(
+ wall.geometry,
+ height,
+ extrudedHeight,
+ ellipsoid,
+ perPositionHeight
+ );
+ wall.geometry = computeAttributes(options);
+ geometries.push(wall);
+ }
+ }
+ } else {
+ for (i = 0; i < polygons.length; i++) {
+ const geometryInstance = new GeometryInstance_default({
+ geometry: PolygonGeometryLibrary_default.createGeometryFromPositions(
+ ellipsoid,
+ polygons[i],
+ hasTextureCoordinates ? textureCoordinatePolygons[i] : void 0,
+ granularity,
+ perPositionHeight,
+ vertexFormat,
+ arcType
+ )
+ });
+ geometryInstance.geometry.attributes.position.values = PolygonPipeline_default.scaleToGeodeticHeight(
+ geometryInstance.geometry.attributes.position.values,
+ height,
+ ellipsoid,
+ !perPositionHeight
+ );
+ options.geometry = geometryInstance.geometry;
+ geometryInstance.geometry = computeAttributes(options);
+ if (defined_default(polygonGeometry._offsetAttribute)) {
+ const length = geometryInstance.geometry.attributes.position.values.length;
+ const offsetValue = polygonGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
+ const applyOffset = new Uint8Array(length / 3).fill(offsetValue);
+ geometryInstance.geometry.attributes.applyOffset = new GeometryAttribute_default(
+ {
+ componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: applyOffset
+ }
+ );
+ }
+ geometries.push(geometryInstance);
+ }
+ }
+ const geometry = GeometryPipeline_default.combineInstances(geometries)[0];
+ geometry.attributes.position.values = new Float64Array(
+ geometry.attributes.position.values
+ );
+ geometry.indices = IndexDatatype_default.createTypedArray(
+ geometry.attributes.position.values.length / 3,
+ geometry.indices
+ );
+ const attributes = geometry.attributes;
+ const boundingSphere = BoundingSphere_default.fromVertices(
+ attributes.position.values
+ );
+ if (!vertexFormat.position) {
+ delete attributes.position;
+ }
+ return new Geometry_default({
+ attributes,
+ indices: geometry.indices,
+ primitiveType: geometry.primitiveType,
+ boundingSphere,
+ offsetAttribute: polygonGeometry._offsetAttribute
+ });
+};
+PolygonGeometry.createShadowVolume = function(polygonGeometry, minHeightFunc, maxHeightFunc) {
+ const granularity = polygonGeometry._granularity;
+ const ellipsoid = polygonGeometry._ellipsoid;
+ const minHeight = minHeightFunc(granularity, ellipsoid);
+ const maxHeight = maxHeightFunc(granularity, ellipsoid);
+ return new PolygonGeometry({
+ polygonHierarchy: polygonGeometry._polygonHierarchy,
+ ellipsoid,
+ stRotation: polygonGeometry._stRotation,
+ granularity,
+ perPositionHeight: false,
+ extrudedHeight: minHeight,
+ height: maxHeight,
+ vertexFormat: VertexFormat_default.POSITION_ONLY,
+ shadowVolume: true,
+ arcType: polygonGeometry._arcType
+ });
+};
+function textureCoordinateRotationPoints(polygonGeometry) {
+ const stRotation = -polygonGeometry._stRotation;
+ if (stRotation === 0) {
+ return [0, 0, 0, 1, 1, 0];
+ }
+ const ellipsoid = polygonGeometry._ellipsoid;
+ const positions = polygonGeometry._polygonHierarchy.positions;
+ const boundingRectangle = polygonGeometry.rectangle;
+ return Geometry_default._textureCoordinateRotationPoints(
+ positions,
+ stRotation,
+ ellipsoid,
+ boundingRectangle
+ );
+}
+Object.defineProperties(PolygonGeometry.prototype, {
+ /**
+ * @private
+ */
+ rectangle: {
+ get: function() {
+ if (!defined_default(this._rectangle)) {
+ const positions = this._polygonHierarchy.positions;
+ this._rectangle = PolygonGeometry.computeRectangleFromPositions(
+ positions,
+ this._ellipsoid,
+ this._arcType
+ );
+ }
+ return this._rectangle;
+ }
+ },
+ /**
+ * For remapping texture coordinates when rendering PolygonGeometries as GroundPrimitives.
+ * @private
+ */
+ textureCoordinateRotationPoints: {
+ get: function() {
+ if (!defined_default(this._textureCoordinateRotationPoints)) {
+ this._textureCoordinateRotationPoints = textureCoordinateRotationPoints(
+ this
+ );
+ }
+ return this._textureCoordinateRotationPoints;
+ }
+ }
+});
+var PolygonGeometry_default = PolygonGeometry;
+
+// packages/engine/Source/Workers/createPolygonGeometry.js
+function createPolygonGeometry(polygonGeometry, offset) {
+ if (defined_default(offset)) {
+ polygonGeometry = PolygonGeometry_default.unpack(polygonGeometry, offset);
+ }
+ polygonGeometry._ellipsoid = Ellipsoid_default.clone(polygonGeometry._ellipsoid);
+ return PolygonGeometry_default.createGeometry(polygonGeometry);
+}
+var createPolygonGeometry_default = createPolygonGeometry;
+export {
+ createPolygonGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createPolygonOutlineGeometry.js b/public/assets/cesium/Workers/createPolygonOutlineGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..046dacd8ba9067a6d8ba45841274a06189fbb87e
--- /dev/null
+++ b/public/assets/cesium/Workers/createPolygonOutlineGeometry.js
@@ -0,0 +1,541 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ PolygonGeometryLibrary_default
+} from "./chunk-IZJ42N4W.js";
+import {
+ ArcType_default
+} from "./chunk-XWOUPGUF.js";
+import {
+ GeometryInstance_default
+} from "./chunk-YSIJTJ7N.js";
+import {
+ GeometryPipeline_default
+} from "./chunk-7ZZ5LMZY.js";
+import "./chunk-LJ2JQHJT.js";
+import "./chunk-NGZJIN5Z.js";
+import {
+ GeometryOffsetAttribute_default
+} from "./chunk-GBT7MJ6X.js";
+import {
+ EllipsoidTangentPlane_default
+} from "./chunk-YK3QIKY7.js";
+import "./chunk-NDDI2LWR.js";
+import {
+ PolygonPipeline_default,
+ WindingOrder_default
+} from "./chunk-TI3TRKIC.js";
+import "./chunk-57H6I3SV.js";
+import "./chunk-JSQJDZI4.js";
+import "./chunk-QQOZO7KO.js";
+import "./chunk-EDLRS3AW.js";
+import {
+ IndexDatatype_default
+} from "./chunk-C4WPMOKT.js";
+import {
+ GeometryAttributes_default
+} from "./chunk-X7IQYYHF.js";
+import {
+ GeometryAttribute_default,
+ Geometry_default,
+ PrimitiveType_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ BoundingSphere_default
+} from "./chunk-KHZNBFOH.js";
+import "./chunk-6SQMLVGV.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian3_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default,
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/PolygonOutlineGeometry.js
+var createGeometryFromPositionsPositions = [];
+var createGeometryFromPositionsSubdivided = [];
+function createGeometryFromPositions(ellipsoid, positions, minDistance, perPositionHeight, arcType) {
+ const tangentPlane = EllipsoidTangentPlane_default.fromPoints(positions, ellipsoid);
+ const positions2D = tangentPlane.projectPointsOntoPlane(
+ positions,
+ createGeometryFromPositionsPositions
+ );
+ const originalWindingOrder = PolygonPipeline_default.computeWindingOrder2D(
+ positions2D
+ );
+ if (originalWindingOrder === WindingOrder_default.CLOCKWISE) {
+ positions2D.reverse();
+ positions = positions.slice().reverse();
+ }
+ let subdividedPositions;
+ let i;
+ let length = positions.length;
+ let index = 0;
+ if (!perPositionHeight) {
+ let numVertices = 0;
+ if (arcType === ArcType_default.GEODESIC) {
+ for (i = 0; i < length; i++) {
+ numVertices += PolygonGeometryLibrary_default.subdivideLineCount(
+ positions[i],
+ positions[(i + 1) % length],
+ minDistance
+ );
+ }
+ } else if (arcType === ArcType_default.RHUMB) {
+ for (i = 0; i < length; i++) {
+ numVertices += PolygonGeometryLibrary_default.subdivideRhumbLineCount(
+ ellipsoid,
+ positions[i],
+ positions[(i + 1) % length],
+ minDistance
+ );
+ }
+ }
+ subdividedPositions = new Float64Array(numVertices * 3);
+ for (i = 0; i < length; i++) {
+ let tempPositions;
+ if (arcType === ArcType_default.GEODESIC) {
+ tempPositions = PolygonGeometryLibrary_default.subdivideLine(
+ positions[i],
+ positions[(i + 1) % length],
+ minDistance,
+ createGeometryFromPositionsSubdivided
+ );
+ } else if (arcType === ArcType_default.RHUMB) {
+ tempPositions = PolygonGeometryLibrary_default.subdivideRhumbLine(
+ ellipsoid,
+ positions[i],
+ positions[(i + 1) % length],
+ minDistance,
+ createGeometryFromPositionsSubdivided
+ );
+ }
+ const tempPositionsLength = tempPositions.length;
+ for (let j = 0; j < tempPositionsLength; ++j) {
+ subdividedPositions[index++] = tempPositions[j];
+ }
+ }
+ } else {
+ subdividedPositions = new Float64Array(length * 2 * 3);
+ for (i = 0; i < length; i++) {
+ const p0 = positions[i];
+ const p1 = positions[(i + 1) % length];
+ subdividedPositions[index++] = p0.x;
+ subdividedPositions[index++] = p0.y;
+ subdividedPositions[index++] = p0.z;
+ subdividedPositions[index++] = p1.x;
+ subdividedPositions[index++] = p1.y;
+ subdividedPositions[index++] = p1.z;
+ }
+ }
+ length = subdividedPositions.length / 3;
+ const indicesSize = length * 2;
+ const indices = IndexDatatype_default.createTypedArray(length, indicesSize);
+ index = 0;
+ for (i = 0; i < length - 1; i++) {
+ indices[index++] = i;
+ indices[index++] = i + 1;
+ }
+ indices[index++] = length - 1;
+ indices[index++] = 0;
+ return new GeometryInstance_default({
+ geometry: new Geometry_default({
+ attributes: new GeometryAttributes_default({
+ position: new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: subdividedPositions
+ })
+ }),
+ indices,
+ primitiveType: PrimitiveType_default.LINES
+ })
+ });
+}
+function createGeometryFromPositionsExtruded(ellipsoid, positions, minDistance, perPositionHeight, arcType) {
+ const tangentPlane = EllipsoidTangentPlane_default.fromPoints(positions, ellipsoid);
+ const positions2D = tangentPlane.projectPointsOntoPlane(
+ positions,
+ createGeometryFromPositionsPositions
+ );
+ const originalWindingOrder = PolygonPipeline_default.computeWindingOrder2D(
+ positions2D
+ );
+ if (originalWindingOrder === WindingOrder_default.CLOCKWISE) {
+ positions2D.reverse();
+ positions = positions.slice().reverse();
+ }
+ let subdividedPositions;
+ let i;
+ let length = positions.length;
+ const corners = new Array(length);
+ let index = 0;
+ if (!perPositionHeight) {
+ let numVertices = 0;
+ if (arcType === ArcType_default.GEODESIC) {
+ for (i = 0; i < length; i++) {
+ numVertices += PolygonGeometryLibrary_default.subdivideLineCount(
+ positions[i],
+ positions[(i + 1) % length],
+ minDistance
+ );
+ }
+ } else if (arcType === ArcType_default.RHUMB) {
+ for (i = 0; i < length; i++) {
+ numVertices += PolygonGeometryLibrary_default.subdivideRhumbLineCount(
+ ellipsoid,
+ positions[i],
+ positions[(i + 1) % length],
+ minDistance
+ );
+ }
+ }
+ subdividedPositions = new Float64Array(numVertices * 3 * 2);
+ for (i = 0; i < length; ++i) {
+ corners[i] = index / 3;
+ let tempPositions;
+ if (arcType === ArcType_default.GEODESIC) {
+ tempPositions = PolygonGeometryLibrary_default.subdivideLine(
+ positions[i],
+ positions[(i + 1) % length],
+ minDistance,
+ createGeometryFromPositionsSubdivided
+ );
+ } else if (arcType === ArcType_default.RHUMB) {
+ tempPositions = PolygonGeometryLibrary_default.subdivideRhumbLine(
+ ellipsoid,
+ positions[i],
+ positions[(i + 1) % length],
+ minDistance,
+ createGeometryFromPositionsSubdivided
+ );
+ }
+ const tempPositionsLength = tempPositions.length;
+ for (let j = 0; j < tempPositionsLength; ++j) {
+ subdividedPositions[index++] = tempPositions[j];
+ }
+ }
+ } else {
+ subdividedPositions = new Float64Array(length * 2 * 3 * 2);
+ for (i = 0; i < length; ++i) {
+ corners[i] = index / 3;
+ const p0 = positions[i];
+ const p1 = positions[(i + 1) % length];
+ subdividedPositions[index++] = p0.x;
+ subdividedPositions[index++] = p0.y;
+ subdividedPositions[index++] = p0.z;
+ subdividedPositions[index++] = p1.x;
+ subdividedPositions[index++] = p1.y;
+ subdividedPositions[index++] = p1.z;
+ }
+ }
+ length = subdividedPositions.length / (3 * 2);
+ const cornersLength = corners.length;
+ const indicesSize = (length * 2 + cornersLength) * 2;
+ const indices = IndexDatatype_default.createTypedArray(
+ length + cornersLength,
+ indicesSize
+ );
+ index = 0;
+ for (i = 0; i < length; ++i) {
+ indices[index++] = i;
+ indices[index++] = (i + 1) % length;
+ indices[index++] = i + length;
+ indices[index++] = (i + 1) % length + length;
+ }
+ for (i = 0; i < cornersLength; i++) {
+ const corner = corners[i];
+ indices[index++] = corner;
+ indices[index++] = corner + length;
+ }
+ return new GeometryInstance_default({
+ geometry: new Geometry_default({
+ attributes: new GeometryAttributes_default({
+ position: new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: subdividedPositions
+ })
+ }),
+ indices,
+ primitiveType: PrimitiveType_default.LINES
+ })
+ });
+}
+function PolygonOutlineGeometry(options) {
+ Check_default.typeOf.object("options", options);
+ Check_default.typeOf.object("options.polygonHierarchy", options.polygonHierarchy);
+ if (options.perPositionHeight && defined_default(options.height)) {
+ throw new DeveloperError_default(
+ "Cannot use both options.perPositionHeight and options.height"
+ );
+ }
+ if (defined_default(options.arcType) && options.arcType !== ArcType_default.GEODESIC && options.arcType !== ArcType_default.RHUMB) {
+ throw new DeveloperError_default(
+ "Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB."
+ );
+ }
+ const polygonHierarchy = options.polygonHierarchy;
+ const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default);
+ const granularity = defaultValue_default(
+ options.granularity,
+ Math_default.RADIANS_PER_DEGREE
+ );
+ const perPositionHeight = defaultValue_default(options.perPositionHeight, false);
+ const perPositionHeightExtrude = perPositionHeight && defined_default(options.extrudedHeight);
+ const arcType = defaultValue_default(options.arcType, ArcType_default.GEODESIC);
+ let height = defaultValue_default(options.height, 0);
+ let extrudedHeight = defaultValue_default(options.extrudedHeight, height);
+ if (!perPositionHeightExtrude) {
+ const h = Math.max(height, extrudedHeight);
+ extrudedHeight = Math.min(height, extrudedHeight);
+ height = h;
+ }
+ this._ellipsoid = Ellipsoid_default.clone(ellipsoid);
+ this._granularity = granularity;
+ this._height = height;
+ this._extrudedHeight = extrudedHeight;
+ this._arcType = arcType;
+ this._polygonHierarchy = polygonHierarchy;
+ this._perPositionHeight = perPositionHeight;
+ this._perPositionHeightExtrude = perPositionHeightExtrude;
+ this._offsetAttribute = options.offsetAttribute;
+ this._workerName = "createPolygonOutlineGeometry";
+ this.packedLength = PolygonGeometryLibrary_default.computeHierarchyPackedLength(
+ polygonHierarchy,
+ Cartesian3_default
+ ) + Ellipsoid_default.packedLength + 8;
+}
+PolygonOutlineGeometry.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ startingIndex = PolygonGeometryLibrary_default.packPolygonHierarchy(
+ value._polygonHierarchy,
+ array,
+ startingIndex,
+ Cartesian3_default
+ );
+ Ellipsoid_default.pack(value._ellipsoid, array, startingIndex);
+ startingIndex += Ellipsoid_default.packedLength;
+ array[startingIndex++] = value._height;
+ array[startingIndex++] = value._extrudedHeight;
+ array[startingIndex++] = value._granularity;
+ array[startingIndex++] = value._perPositionHeightExtrude ? 1 : 0;
+ array[startingIndex++] = value._perPositionHeight ? 1 : 0;
+ array[startingIndex++] = value._arcType;
+ array[startingIndex++] = defaultValue_default(value._offsetAttribute, -1);
+ array[startingIndex] = value.packedLength;
+ return array;
+};
+var scratchEllipsoid = Ellipsoid_default.clone(Ellipsoid_default.UNIT_SPHERE);
+var dummyOptions = {
+ polygonHierarchy: {}
+};
+PolygonOutlineGeometry.unpack = function(array, startingIndex, result) {
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ const polygonHierarchy = PolygonGeometryLibrary_default.unpackPolygonHierarchy(
+ array,
+ startingIndex,
+ Cartesian3_default
+ );
+ startingIndex = polygonHierarchy.startingIndex;
+ delete polygonHierarchy.startingIndex;
+ const ellipsoid = Ellipsoid_default.unpack(array, startingIndex, scratchEllipsoid);
+ startingIndex += Ellipsoid_default.packedLength;
+ const height = array[startingIndex++];
+ const extrudedHeight = array[startingIndex++];
+ const granularity = array[startingIndex++];
+ const perPositionHeightExtrude = array[startingIndex++] === 1;
+ const perPositionHeight = array[startingIndex++] === 1;
+ const arcType = array[startingIndex++];
+ const offsetAttribute = array[startingIndex++];
+ const packedLength = array[startingIndex];
+ if (!defined_default(result)) {
+ result = new PolygonOutlineGeometry(dummyOptions);
+ }
+ result._polygonHierarchy = polygonHierarchy;
+ result._ellipsoid = Ellipsoid_default.clone(ellipsoid, result._ellipsoid);
+ result._height = height;
+ result._extrudedHeight = extrudedHeight;
+ result._granularity = granularity;
+ result._perPositionHeight = perPositionHeight;
+ result._perPositionHeightExtrude = perPositionHeightExtrude;
+ result._arcType = arcType;
+ result._offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
+ result.packedLength = packedLength;
+ return result;
+};
+PolygonOutlineGeometry.fromPositions = function(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ Check_default.defined("options.positions", options.positions);
+ const newOptions = {
+ polygonHierarchy: {
+ positions: options.positions
+ },
+ height: options.height,
+ extrudedHeight: options.extrudedHeight,
+ ellipsoid: options.ellipsoid,
+ granularity: options.granularity,
+ perPositionHeight: options.perPositionHeight,
+ arcType: options.arcType,
+ offsetAttribute: options.offsetAttribute
+ };
+ return new PolygonOutlineGeometry(newOptions);
+};
+PolygonOutlineGeometry.createGeometry = function(polygonGeometry) {
+ const ellipsoid = polygonGeometry._ellipsoid;
+ const granularity = polygonGeometry._granularity;
+ const polygonHierarchy = polygonGeometry._polygonHierarchy;
+ const perPositionHeight = polygonGeometry._perPositionHeight;
+ const arcType = polygonGeometry._arcType;
+ const polygons = PolygonGeometryLibrary_default.polygonOutlinesFromHierarchy(
+ polygonHierarchy,
+ !perPositionHeight,
+ ellipsoid
+ );
+ if (polygons.length === 0) {
+ return void 0;
+ }
+ let geometryInstance;
+ const geometries = [];
+ const minDistance = Math_default.chordLength(
+ granularity,
+ ellipsoid.maximumRadius
+ );
+ const height = polygonGeometry._height;
+ const extrudedHeight = polygonGeometry._extrudedHeight;
+ const extrude = polygonGeometry._perPositionHeightExtrude || !Math_default.equalsEpsilon(height, extrudedHeight, 0, Math_default.EPSILON2);
+ let offsetValue;
+ let i;
+ if (extrude) {
+ for (i = 0; i < polygons.length; i++) {
+ geometryInstance = createGeometryFromPositionsExtruded(
+ ellipsoid,
+ polygons[i],
+ minDistance,
+ perPositionHeight,
+ arcType
+ );
+ geometryInstance.geometry = PolygonGeometryLibrary_default.scaleToGeodeticHeightExtruded(
+ geometryInstance.geometry,
+ height,
+ extrudedHeight,
+ ellipsoid,
+ perPositionHeight
+ );
+ if (defined_default(polygonGeometry._offsetAttribute)) {
+ const size = geometryInstance.geometry.attributes.position.values.length / 3;
+ let offsetAttribute = new Uint8Array(size);
+ if (polygonGeometry._offsetAttribute === GeometryOffsetAttribute_default.TOP) {
+ offsetAttribute = offsetAttribute.fill(1, 0, size / 2);
+ } else {
+ offsetValue = polygonGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
+ offsetAttribute = offsetAttribute.fill(offsetValue);
+ }
+ geometryInstance.geometry.attributes.applyOffset = new GeometryAttribute_default(
+ {
+ componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: offsetAttribute
+ }
+ );
+ }
+ geometries.push(geometryInstance);
+ }
+ } else {
+ for (i = 0; i < polygons.length; i++) {
+ geometryInstance = createGeometryFromPositions(
+ ellipsoid,
+ polygons[i],
+ minDistance,
+ perPositionHeight,
+ arcType
+ );
+ geometryInstance.geometry.attributes.position.values = PolygonPipeline_default.scaleToGeodeticHeight(
+ geometryInstance.geometry.attributes.position.values,
+ height,
+ ellipsoid,
+ !perPositionHeight
+ );
+ if (defined_default(polygonGeometry._offsetAttribute)) {
+ const length = geometryInstance.geometry.attributes.position.values.length;
+ offsetValue = polygonGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
+ const applyOffset = new Uint8Array(length / 3).fill(offsetValue);
+ geometryInstance.geometry.attributes.applyOffset = new GeometryAttribute_default(
+ {
+ componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: applyOffset
+ }
+ );
+ }
+ geometries.push(geometryInstance);
+ }
+ }
+ const geometry = GeometryPipeline_default.combineInstances(geometries)[0];
+ const boundingSphere = BoundingSphere_default.fromVertices(
+ geometry.attributes.position.values
+ );
+ return new Geometry_default({
+ attributes: geometry.attributes,
+ indices: geometry.indices,
+ primitiveType: geometry.primitiveType,
+ boundingSphere,
+ offsetAttribute: polygonGeometry._offsetAttribute
+ });
+};
+var PolygonOutlineGeometry_default = PolygonOutlineGeometry;
+
+// packages/engine/Source/Workers/createPolygonOutlineGeometry.js
+function createPolygonOutlineGeometry(polygonGeometry, offset) {
+ if (defined_default(offset)) {
+ polygonGeometry = PolygonOutlineGeometry_default.unpack(polygonGeometry, offset);
+ }
+ polygonGeometry._ellipsoid = Ellipsoid_default.clone(polygonGeometry._ellipsoid);
+ return PolygonOutlineGeometry_default.createGeometry(polygonGeometry);
+}
+var createPolygonOutlineGeometry_default = createPolygonOutlineGeometry;
+export {
+ createPolygonOutlineGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createPolylineGeometry.js b/public/assets/cesium/Workers/createPolylineGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..cd27c456c7d018f4040c052383bb2f23fa8d5b42
--- /dev/null
+++ b/public/assets/cesium/Workers/createPolylineGeometry.js
@@ -0,0 +1,494 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ Color_default
+} from "./chunk-HP5XLODI.js";
+import {
+ ArcType_default
+} from "./chunk-XWOUPGUF.js";
+import {
+ PolylinePipeline_default
+} from "./chunk-QN6TBED4.js";
+import "./chunk-C3EQ27WF.js";
+import {
+ VertexFormat_default
+} from "./chunk-JBSKHTNX.js";
+import {
+ arrayRemoveDuplicates_default
+} from "./chunk-57H6I3SV.js";
+import "./chunk-JSQJDZI4.js";
+import "./chunk-QQOZO7KO.js";
+import "./chunk-EDLRS3AW.js";
+import {
+ IndexDatatype_default
+} from "./chunk-C4WPMOKT.js";
+import {
+ GeometryAttributes_default
+} from "./chunk-X7IQYYHF.js";
+import {
+ GeometryAttribute_default,
+ GeometryType_default,
+ Geometry_default,
+ PrimitiveType_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ BoundingSphere_default
+} from "./chunk-KHZNBFOH.js";
+import "./chunk-6SQMLVGV.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian3_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/PolylineGeometry.js
+var scratchInterpolateColorsArray = [];
+function interpolateColors(p0, p1, color0, color1, numPoints) {
+ const colors = scratchInterpolateColorsArray;
+ colors.length = numPoints;
+ let i;
+ const r0 = color0.red;
+ const g0 = color0.green;
+ const b0 = color0.blue;
+ const a0 = color0.alpha;
+ const r1 = color1.red;
+ const g1 = color1.green;
+ const b1 = color1.blue;
+ const a1 = color1.alpha;
+ if (Color_default.equals(color0, color1)) {
+ for (i = 0; i < numPoints; i++) {
+ colors[i] = Color_default.clone(color0);
+ }
+ return colors;
+ }
+ const redPerVertex = (r1 - r0) / numPoints;
+ const greenPerVertex = (g1 - g0) / numPoints;
+ const bluePerVertex = (b1 - b0) / numPoints;
+ const alphaPerVertex = (a1 - a0) / numPoints;
+ for (i = 0; i < numPoints; i++) {
+ colors[i] = new Color_default(
+ r0 + i * redPerVertex,
+ g0 + i * greenPerVertex,
+ b0 + i * bluePerVertex,
+ a0 + i * alphaPerVertex
+ );
+ }
+ return colors;
+}
+function PolylineGeometry(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const positions = options.positions;
+ const colors = options.colors;
+ const width = defaultValue_default(options.width, 1);
+ const colorsPerVertex = defaultValue_default(options.colorsPerVertex, false);
+ if (!defined_default(positions) || positions.length < 2) {
+ throw new DeveloperError_default("At least two positions are required.");
+ }
+ if (typeof width !== "number") {
+ throw new DeveloperError_default("width must be a number");
+ }
+ if (defined_default(colors) && (colorsPerVertex && colors.length < positions.length || !colorsPerVertex && colors.length < positions.length - 1)) {
+ throw new DeveloperError_default("colors has an invalid length.");
+ }
+ this._positions = positions;
+ this._colors = colors;
+ this._width = width;
+ this._colorsPerVertex = colorsPerVertex;
+ this._vertexFormat = VertexFormat_default.clone(
+ defaultValue_default(options.vertexFormat, VertexFormat_default.DEFAULT)
+ );
+ this._arcType = defaultValue_default(options.arcType, ArcType_default.GEODESIC);
+ this._granularity = defaultValue_default(
+ options.granularity,
+ Math_default.RADIANS_PER_DEGREE
+ );
+ this._ellipsoid = Ellipsoid_default.clone(
+ defaultValue_default(options.ellipsoid, Ellipsoid_default.default)
+ );
+ this._workerName = "createPolylineGeometry";
+ let numComponents = 1 + positions.length * Cartesian3_default.packedLength;
+ numComponents += defined_default(colors) ? 1 + colors.length * Color_default.packedLength : 1;
+ this.packedLength = numComponents + Ellipsoid_default.packedLength + VertexFormat_default.packedLength + 4;
+}
+PolylineGeometry.pack = function(value, array, startingIndex) {
+ if (!defined_default(value)) {
+ throw new DeveloperError_default("value is required");
+ }
+ if (!defined_default(array)) {
+ throw new DeveloperError_default("array is required");
+ }
+ startingIndex = defaultValue_default(startingIndex, 0);
+ let i;
+ const positions = value._positions;
+ let length = positions.length;
+ array[startingIndex++] = length;
+ for (i = 0; i < length; ++i, startingIndex += Cartesian3_default.packedLength) {
+ Cartesian3_default.pack(positions[i], array, startingIndex);
+ }
+ const colors = value._colors;
+ length = defined_default(colors) ? colors.length : 0;
+ array[startingIndex++] = length;
+ for (i = 0; i < length; ++i, startingIndex += Color_default.packedLength) {
+ Color_default.pack(colors[i], array, startingIndex);
+ }
+ Ellipsoid_default.pack(value._ellipsoid, array, startingIndex);
+ startingIndex += Ellipsoid_default.packedLength;
+ VertexFormat_default.pack(value._vertexFormat, array, startingIndex);
+ startingIndex += VertexFormat_default.packedLength;
+ array[startingIndex++] = value._width;
+ array[startingIndex++] = value._colorsPerVertex ? 1 : 0;
+ array[startingIndex++] = value._arcType;
+ array[startingIndex] = value._granularity;
+ return array;
+};
+var scratchEllipsoid = Ellipsoid_default.clone(Ellipsoid_default.UNIT_SPHERE);
+var scratchVertexFormat = new VertexFormat_default();
+var scratchOptions = {
+ positions: void 0,
+ colors: void 0,
+ ellipsoid: scratchEllipsoid,
+ vertexFormat: scratchVertexFormat,
+ width: void 0,
+ colorsPerVertex: void 0,
+ arcType: void 0,
+ granularity: void 0
+};
+PolylineGeometry.unpack = function(array, startingIndex, result) {
+ if (!defined_default(array)) {
+ throw new DeveloperError_default("array is required");
+ }
+ startingIndex = defaultValue_default(startingIndex, 0);
+ let i;
+ let length = array[startingIndex++];
+ const positions = new Array(length);
+ for (i = 0; i < length; ++i, startingIndex += Cartesian3_default.packedLength) {
+ positions[i] = Cartesian3_default.unpack(array, startingIndex);
+ }
+ length = array[startingIndex++];
+ const colors = length > 0 ? new Array(length) : void 0;
+ for (i = 0; i < length; ++i, startingIndex += Color_default.packedLength) {
+ colors[i] = Color_default.unpack(array, startingIndex);
+ }
+ const ellipsoid = Ellipsoid_default.unpack(array, startingIndex, scratchEllipsoid);
+ startingIndex += Ellipsoid_default.packedLength;
+ const vertexFormat = VertexFormat_default.unpack(
+ array,
+ startingIndex,
+ scratchVertexFormat
+ );
+ startingIndex += VertexFormat_default.packedLength;
+ const width = array[startingIndex++];
+ const colorsPerVertex = array[startingIndex++] === 1;
+ const arcType = array[startingIndex++];
+ const granularity = array[startingIndex];
+ if (!defined_default(result)) {
+ scratchOptions.positions = positions;
+ scratchOptions.colors = colors;
+ scratchOptions.width = width;
+ scratchOptions.colorsPerVertex = colorsPerVertex;
+ scratchOptions.arcType = arcType;
+ scratchOptions.granularity = granularity;
+ return new PolylineGeometry(scratchOptions);
+ }
+ result._positions = positions;
+ result._colors = colors;
+ result._ellipsoid = Ellipsoid_default.clone(ellipsoid, result._ellipsoid);
+ result._vertexFormat = VertexFormat_default.clone(vertexFormat, result._vertexFormat);
+ result._width = width;
+ result._colorsPerVertex = colorsPerVertex;
+ result._arcType = arcType;
+ result._granularity = granularity;
+ return result;
+};
+var scratchCartesian3 = new Cartesian3_default();
+var scratchPosition = new Cartesian3_default();
+var scratchPrevPosition = new Cartesian3_default();
+var scratchNextPosition = new Cartesian3_default();
+PolylineGeometry.createGeometry = function(polylineGeometry) {
+ const width = polylineGeometry._width;
+ const vertexFormat = polylineGeometry._vertexFormat;
+ let colors = polylineGeometry._colors;
+ const colorsPerVertex = polylineGeometry._colorsPerVertex;
+ const arcType = polylineGeometry._arcType;
+ const granularity = polylineGeometry._granularity;
+ const ellipsoid = polylineGeometry._ellipsoid;
+ let i;
+ let j;
+ let k;
+ const removedIndices = [];
+ let positions = arrayRemoveDuplicates_default(
+ polylineGeometry._positions,
+ Cartesian3_default.equalsEpsilon,
+ false,
+ removedIndices
+ );
+ if (defined_default(colors) && removedIndices.length > 0) {
+ let removedArrayIndex = 0;
+ let nextRemovedIndex = removedIndices[0];
+ colors = colors.filter(function(color, index2) {
+ let remove = false;
+ if (colorsPerVertex) {
+ remove = index2 === nextRemovedIndex || index2 === 0 && nextRemovedIndex === 1;
+ } else {
+ remove = index2 + 1 === nextRemovedIndex;
+ }
+ if (remove) {
+ removedArrayIndex++;
+ nextRemovedIndex = removedIndices[removedArrayIndex];
+ return false;
+ }
+ return true;
+ });
+ }
+ let positionsLength = positions.length;
+ if (positionsLength < 2 || width <= 0) {
+ return void 0;
+ }
+ if (arcType === ArcType_default.GEODESIC || arcType === ArcType_default.RHUMB) {
+ let subdivisionSize;
+ let numberOfPointsFunction;
+ if (arcType === ArcType_default.GEODESIC) {
+ subdivisionSize = Math_default.chordLength(
+ granularity,
+ ellipsoid.maximumRadius
+ );
+ numberOfPointsFunction = PolylinePipeline_default.numberOfPoints;
+ } else {
+ subdivisionSize = granularity;
+ numberOfPointsFunction = PolylinePipeline_default.numberOfPointsRhumbLine;
+ }
+ const heights = PolylinePipeline_default.extractHeights(positions, ellipsoid);
+ if (defined_default(colors)) {
+ let colorLength = 1;
+ for (i = 0; i < positionsLength - 1; ++i) {
+ colorLength += numberOfPointsFunction(
+ positions[i],
+ positions[i + 1],
+ subdivisionSize
+ );
+ }
+ const newColors = new Array(colorLength);
+ let newColorIndex = 0;
+ for (i = 0; i < positionsLength - 1; ++i) {
+ const p0 = positions[i];
+ const p1 = positions[i + 1];
+ const c0 = colors[i];
+ const numColors = numberOfPointsFunction(p0, p1, subdivisionSize);
+ if (colorsPerVertex && i < colorLength) {
+ const c1 = colors[i + 1];
+ const interpolatedColors = interpolateColors(
+ p0,
+ p1,
+ c0,
+ c1,
+ numColors
+ );
+ const interpolatedColorsLength = interpolatedColors.length;
+ for (j = 0; j < interpolatedColorsLength; ++j) {
+ newColors[newColorIndex++] = interpolatedColors[j];
+ }
+ } else {
+ for (j = 0; j < numColors; ++j) {
+ newColors[newColorIndex++] = Color_default.clone(c0);
+ }
+ }
+ }
+ newColors[newColorIndex] = Color_default.clone(colors[colors.length - 1]);
+ colors = newColors;
+ scratchInterpolateColorsArray.length = 0;
+ }
+ if (arcType === ArcType_default.GEODESIC) {
+ positions = PolylinePipeline_default.generateCartesianArc({
+ positions,
+ minDistance: subdivisionSize,
+ ellipsoid,
+ height: heights
+ });
+ } else {
+ positions = PolylinePipeline_default.generateCartesianRhumbArc({
+ positions,
+ granularity: subdivisionSize,
+ ellipsoid,
+ height: heights
+ });
+ }
+ }
+ positionsLength = positions.length;
+ const size = positionsLength * 4 - 4;
+ const finalPositions = new Float64Array(size * 3);
+ const prevPositions = new Float64Array(size * 3);
+ const nextPositions = new Float64Array(size * 3);
+ const expandAndWidth = new Float32Array(size * 2);
+ const st = vertexFormat.st ? new Float32Array(size * 2) : void 0;
+ const finalColors = defined_default(colors) ? new Uint8Array(size * 4) : void 0;
+ let positionIndex = 0;
+ let expandAndWidthIndex = 0;
+ let stIndex = 0;
+ let colorIndex = 0;
+ let position;
+ for (j = 0; j < positionsLength; ++j) {
+ if (j === 0) {
+ position = scratchCartesian3;
+ Cartesian3_default.subtract(positions[0], positions[1], position);
+ Cartesian3_default.add(positions[0], position, position);
+ } else {
+ position = positions[j - 1];
+ }
+ Cartesian3_default.clone(position, scratchPrevPosition);
+ Cartesian3_default.clone(positions[j], scratchPosition);
+ if (j === positionsLength - 1) {
+ position = scratchCartesian3;
+ Cartesian3_default.subtract(
+ positions[positionsLength - 1],
+ positions[positionsLength - 2],
+ position
+ );
+ Cartesian3_default.add(positions[positionsLength - 1], position, position);
+ } else {
+ position = positions[j + 1];
+ }
+ Cartesian3_default.clone(position, scratchNextPosition);
+ let color0, color1;
+ if (defined_default(finalColors)) {
+ if (j !== 0 && !colorsPerVertex) {
+ color0 = colors[j - 1];
+ } else {
+ color0 = colors[j];
+ }
+ if (j !== positionsLength - 1) {
+ color1 = colors[j];
+ }
+ }
+ const startK = j === 0 ? 2 : 0;
+ const endK = j === positionsLength - 1 ? 2 : 4;
+ for (k = startK; k < endK; ++k) {
+ Cartesian3_default.pack(scratchPosition, finalPositions, positionIndex);
+ Cartesian3_default.pack(scratchPrevPosition, prevPositions, positionIndex);
+ Cartesian3_default.pack(scratchNextPosition, nextPositions, positionIndex);
+ positionIndex += 3;
+ const direction = k - 2 < 0 ? -1 : 1;
+ expandAndWidth[expandAndWidthIndex++] = 2 * (k % 2) - 1;
+ expandAndWidth[expandAndWidthIndex++] = direction * width;
+ if (vertexFormat.st) {
+ st[stIndex++] = j / (positionsLength - 1);
+ st[stIndex++] = Math.max(expandAndWidth[expandAndWidthIndex - 2], 0);
+ }
+ if (defined_default(finalColors)) {
+ const color = k < 2 ? color0 : color1;
+ finalColors[colorIndex++] = Color_default.floatToByte(color.red);
+ finalColors[colorIndex++] = Color_default.floatToByte(color.green);
+ finalColors[colorIndex++] = Color_default.floatToByte(color.blue);
+ finalColors[colorIndex++] = Color_default.floatToByte(color.alpha);
+ }
+ }
+ }
+ const attributes = new GeometryAttributes_default();
+ attributes.position = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: finalPositions
+ });
+ attributes.prevPosition = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: prevPositions
+ });
+ attributes.nextPosition = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: nextPositions
+ });
+ attributes.expandAndWidth = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 2,
+ values: expandAndWidth
+ });
+ if (vertexFormat.st) {
+ attributes.st = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 2,
+ values: st
+ });
+ }
+ if (defined_default(finalColors)) {
+ attributes.color = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
+ componentsPerAttribute: 4,
+ values: finalColors,
+ normalize: true
+ });
+ }
+ const indices = IndexDatatype_default.createTypedArray(size, positionsLength * 6 - 6);
+ let index = 0;
+ let indicesIndex = 0;
+ const length = positionsLength - 1;
+ for (j = 0; j < length; ++j) {
+ indices[indicesIndex++] = index;
+ indices[indicesIndex++] = index + 2;
+ indices[indicesIndex++] = index + 1;
+ indices[indicesIndex++] = index + 1;
+ indices[indicesIndex++] = index + 2;
+ indices[indicesIndex++] = index + 3;
+ index += 4;
+ }
+ return new Geometry_default({
+ attributes,
+ indices,
+ primitiveType: PrimitiveType_default.TRIANGLES,
+ boundingSphere: BoundingSphere_default.fromPoints(positions),
+ geometryType: GeometryType_default.POLYLINES
+ });
+};
+var PolylineGeometry_default = PolylineGeometry;
+
+// packages/engine/Source/Workers/createPolylineGeometry.js
+function createPolylineGeometry(polylineGeometry, offset) {
+ if (defined_default(offset)) {
+ polylineGeometry = PolylineGeometry_default.unpack(polylineGeometry, offset);
+ }
+ polylineGeometry._ellipsoid = Ellipsoid_default.clone(polylineGeometry._ellipsoid);
+ return PolylineGeometry_default.createGeometry(polylineGeometry);
+}
+var createPolylineGeometry_default = createPolylineGeometry;
+export {
+ createPolylineGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createPolylineVolumeGeometry.js b/public/assets/cesium/Workers/createPolylineVolumeGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..f6233d20869651b466734a2f2c0baafe55bb4bf1
--- /dev/null
+++ b/public/assets/cesium/Workers/createPolylineVolumeGeometry.js
@@ -0,0 +1,377 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ BoundingRectangle_default
+} from "./chunk-44QAAS4P.js";
+import {
+ GeometryPipeline_default
+} from "./chunk-7ZZ5LMZY.js";
+import "./chunk-LJ2JQHJT.js";
+import "./chunk-NGZJIN5Z.js";
+import {
+ CornerType_default,
+ PolylineVolumeGeometryLibrary_default,
+ oneTimeWarning_default
+} from "./chunk-3IFRSGEY.js";
+import "./chunk-QN6TBED4.js";
+import "./chunk-C3EQ27WF.js";
+import {
+ VertexFormat_default
+} from "./chunk-JBSKHTNX.js";
+import "./chunk-YK3QIKY7.js";
+import "./chunk-NDDI2LWR.js";
+import {
+ PolygonPipeline_default,
+ WindingOrder_default
+} from "./chunk-TI3TRKIC.js";
+import {
+ arrayRemoveDuplicates_default
+} from "./chunk-57H6I3SV.js";
+import "./chunk-JSQJDZI4.js";
+import "./chunk-QQOZO7KO.js";
+import "./chunk-EDLRS3AW.js";
+import {
+ IndexDatatype_default
+} from "./chunk-C4WPMOKT.js";
+import {
+ GeometryAttributes_default
+} from "./chunk-X7IQYYHF.js";
+import {
+ GeometryAttribute_default,
+ Geometry_default,
+ PrimitiveType_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ BoundingSphere_default
+} from "./chunk-KHZNBFOH.js";
+import "./chunk-6SQMLVGV.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian2_default,
+ Cartesian3_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/PolylineVolumeGeometry.js
+function computeAttributes(combinedPositions, shape, boundingRectangle, vertexFormat) {
+ const attributes = new GeometryAttributes_default();
+ if (vertexFormat.position) {
+ attributes.position = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: combinedPositions
+ });
+ }
+ const shapeLength = shape.length;
+ const vertexCount = combinedPositions.length / 3;
+ const length = (vertexCount - shapeLength * 2) / (shapeLength * 2);
+ const firstEndIndices = PolygonPipeline_default.triangulate(shape);
+ const indicesCount = (length - 1) * shapeLength * 6 + firstEndIndices.length * 2;
+ const indices = IndexDatatype_default.createTypedArray(vertexCount, indicesCount);
+ let i, j;
+ let ll, ul, ur, lr;
+ const offset = shapeLength * 2;
+ let index = 0;
+ for (i = 0; i < length - 1; i++) {
+ for (j = 0; j < shapeLength - 1; j++) {
+ ll = j * 2 + i * shapeLength * 2;
+ lr = ll + offset;
+ ul = ll + 1;
+ ur = ul + offset;
+ indices[index++] = ul;
+ indices[index++] = ll;
+ indices[index++] = ur;
+ indices[index++] = ur;
+ indices[index++] = ll;
+ indices[index++] = lr;
+ }
+ ll = shapeLength * 2 - 2 + i * shapeLength * 2;
+ ul = ll + 1;
+ ur = ul + offset;
+ lr = ll + offset;
+ indices[index++] = ul;
+ indices[index++] = ll;
+ indices[index++] = ur;
+ indices[index++] = ur;
+ indices[index++] = ll;
+ indices[index++] = lr;
+ }
+ if (vertexFormat.st || vertexFormat.tangent || vertexFormat.bitangent) {
+ const st = new Float32Array(vertexCount * 2);
+ const lengthSt = 1 / (length - 1);
+ const heightSt = 1 / boundingRectangle.height;
+ const heightOffset = boundingRectangle.height / 2;
+ let s, t;
+ let stindex = 0;
+ for (i = 0; i < length; i++) {
+ s = i * lengthSt;
+ t = heightSt * (shape[0].y + heightOffset);
+ st[stindex++] = s;
+ st[stindex++] = t;
+ for (j = 1; j < shapeLength; j++) {
+ t = heightSt * (shape[j].y + heightOffset);
+ st[stindex++] = s;
+ st[stindex++] = t;
+ st[stindex++] = s;
+ st[stindex++] = t;
+ }
+ t = heightSt * (shape[0].y + heightOffset);
+ st[stindex++] = s;
+ st[stindex++] = t;
+ }
+ for (j = 0; j < shapeLength; j++) {
+ s = 0;
+ t = heightSt * (shape[j].y + heightOffset);
+ st[stindex++] = s;
+ st[stindex++] = t;
+ }
+ for (j = 0; j < shapeLength; j++) {
+ s = (length - 1) * lengthSt;
+ t = heightSt * (shape[j].y + heightOffset);
+ st[stindex++] = s;
+ st[stindex++] = t;
+ }
+ attributes.st = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 2,
+ values: new Float32Array(st)
+ });
+ }
+ const endOffset = vertexCount - shapeLength * 2;
+ for (i = 0; i < firstEndIndices.length; i += 3) {
+ const v0 = firstEndIndices[i] + endOffset;
+ const v1 = firstEndIndices[i + 1] + endOffset;
+ const v2 = firstEndIndices[i + 2] + endOffset;
+ indices[index++] = v0;
+ indices[index++] = v1;
+ indices[index++] = v2;
+ indices[index++] = v2 + shapeLength;
+ indices[index++] = v1 + shapeLength;
+ indices[index++] = v0 + shapeLength;
+ }
+ let geometry = new Geometry_default({
+ attributes,
+ indices,
+ boundingSphere: BoundingSphere_default.fromVertices(combinedPositions),
+ primitiveType: PrimitiveType_default.TRIANGLES
+ });
+ if (vertexFormat.normal) {
+ geometry = GeometryPipeline_default.computeNormal(geometry);
+ }
+ if (vertexFormat.tangent || vertexFormat.bitangent) {
+ try {
+ geometry = GeometryPipeline_default.computeTangentAndBitangent(geometry);
+ } catch (e) {
+ oneTimeWarning_default(
+ "polyline-volume-tangent-bitangent",
+ "Unable to compute tangents and bitangents for polyline volume geometry"
+ );
+ }
+ if (!vertexFormat.tangent) {
+ geometry.attributes.tangent = void 0;
+ }
+ if (!vertexFormat.bitangent) {
+ geometry.attributes.bitangent = void 0;
+ }
+ if (!vertexFormat.st) {
+ geometry.attributes.st = void 0;
+ }
+ }
+ return geometry;
+}
+function PolylineVolumeGeometry(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const positions = options.polylinePositions;
+ const shape = options.shapePositions;
+ if (!defined_default(positions)) {
+ throw new DeveloperError_default("options.polylinePositions is required.");
+ }
+ if (!defined_default(shape)) {
+ throw new DeveloperError_default("options.shapePositions is required.");
+ }
+ this._positions = positions;
+ this._shape = shape;
+ this._ellipsoid = Ellipsoid_default.clone(
+ defaultValue_default(options.ellipsoid, Ellipsoid_default.default)
+ );
+ this._cornerType = defaultValue_default(options.cornerType, CornerType_default.ROUNDED);
+ this._vertexFormat = VertexFormat_default.clone(
+ defaultValue_default(options.vertexFormat, VertexFormat_default.DEFAULT)
+ );
+ this._granularity = defaultValue_default(
+ options.granularity,
+ Math_default.RADIANS_PER_DEGREE
+ );
+ this._workerName = "createPolylineVolumeGeometry";
+ let numComponents = 1 + positions.length * Cartesian3_default.packedLength;
+ numComponents += 1 + shape.length * Cartesian2_default.packedLength;
+ this.packedLength = numComponents + Ellipsoid_default.packedLength + VertexFormat_default.packedLength + 2;
+}
+PolylineVolumeGeometry.pack = function(value, array, startingIndex) {
+ if (!defined_default(value)) {
+ throw new DeveloperError_default("value is required");
+ }
+ if (!defined_default(array)) {
+ throw new DeveloperError_default("array is required");
+ }
+ startingIndex = defaultValue_default(startingIndex, 0);
+ let i;
+ const positions = value._positions;
+ let length = positions.length;
+ array[startingIndex++] = length;
+ for (i = 0; i < length; ++i, startingIndex += Cartesian3_default.packedLength) {
+ Cartesian3_default.pack(positions[i], array, startingIndex);
+ }
+ const shape = value._shape;
+ length = shape.length;
+ array[startingIndex++] = length;
+ for (i = 0; i < length; ++i, startingIndex += Cartesian2_default.packedLength) {
+ Cartesian2_default.pack(shape[i], array, startingIndex);
+ }
+ Ellipsoid_default.pack(value._ellipsoid, array, startingIndex);
+ startingIndex += Ellipsoid_default.packedLength;
+ VertexFormat_default.pack(value._vertexFormat, array, startingIndex);
+ startingIndex += VertexFormat_default.packedLength;
+ array[startingIndex++] = value._cornerType;
+ array[startingIndex] = value._granularity;
+ return array;
+};
+var scratchEllipsoid = Ellipsoid_default.clone(Ellipsoid_default.UNIT_SPHERE);
+var scratchVertexFormat = new VertexFormat_default();
+var scratchOptions = {
+ polylinePositions: void 0,
+ shapePositions: void 0,
+ ellipsoid: scratchEllipsoid,
+ vertexFormat: scratchVertexFormat,
+ cornerType: void 0,
+ granularity: void 0
+};
+PolylineVolumeGeometry.unpack = function(array, startingIndex, result) {
+ if (!defined_default(array)) {
+ throw new DeveloperError_default("array is required");
+ }
+ startingIndex = defaultValue_default(startingIndex, 0);
+ let i;
+ let length = array[startingIndex++];
+ const positions = new Array(length);
+ for (i = 0; i < length; ++i, startingIndex += Cartesian3_default.packedLength) {
+ positions[i] = Cartesian3_default.unpack(array, startingIndex);
+ }
+ length = array[startingIndex++];
+ const shape = new Array(length);
+ for (i = 0; i < length; ++i, startingIndex += Cartesian2_default.packedLength) {
+ shape[i] = Cartesian2_default.unpack(array, startingIndex);
+ }
+ const ellipsoid = Ellipsoid_default.unpack(array, startingIndex, scratchEllipsoid);
+ startingIndex += Ellipsoid_default.packedLength;
+ const vertexFormat = VertexFormat_default.unpack(
+ array,
+ startingIndex,
+ scratchVertexFormat
+ );
+ startingIndex += VertexFormat_default.packedLength;
+ const cornerType = array[startingIndex++];
+ const granularity = array[startingIndex];
+ if (!defined_default(result)) {
+ scratchOptions.polylinePositions = positions;
+ scratchOptions.shapePositions = shape;
+ scratchOptions.cornerType = cornerType;
+ scratchOptions.granularity = granularity;
+ return new PolylineVolumeGeometry(scratchOptions);
+ }
+ result._positions = positions;
+ result._shape = shape;
+ result._ellipsoid = Ellipsoid_default.clone(ellipsoid, result._ellipsoid);
+ result._vertexFormat = VertexFormat_default.clone(vertexFormat, result._vertexFormat);
+ result._cornerType = cornerType;
+ result._granularity = granularity;
+ return result;
+};
+var brScratch = new BoundingRectangle_default();
+PolylineVolumeGeometry.createGeometry = function(polylineVolumeGeometry) {
+ const positions = polylineVolumeGeometry._positions;
+ const cleanPositions = arrayRemoveDuplicates_default(
+ positions,
+ Cartesian3_default.equalsEpsilon
+ );
+ let shape2D = polylineVolumeGeometry._shape;
+ shape2D = PolylineVolumeGeometryLibrary_default.removeDuplicatesFromShape(shape2D);
+ if (cleanPositions.length < 2 || shape2D.length < 3) {
+ return void 0;
+ }
+ if (PolygonPipeline_default.computeWindingOrder2D(shape2D) === WindingOrder_default.CLOCKWISE) {
+ shape2D.reverse();
+ }
+ const boundingRectangle = BoundingRectangle_default.fromPoints(shape2D, brScratch);
+ const computedPositions = PolylineVolumeGeometryLibrary_default.computePositions(
+ cleanPositions,
+ shape2D,
+ boundingRectangle,
+ polylineVolumeGeometry,
+ true
+ );
+ return computeAttributes(
+ computedPositions,
+ shape2D,
+ boundingRectangle,
+ polylineVolumeGeometry._vertexFormat
+ );
+};
+var PolylineVolumeGeometry_default = PolylineVolumeGeometry;
+
+// packages/engine/Source/Workers/createPolylineVolumeGeometry.js
+function createPolylineVolumeGeometry(polylineVolumeGeometry, offset) {
+ if (defined_default(offset)) {
+ polylineVolumeGeometry = PolylineVolumeGeometry_default.unpack(
+ polylineVolumeGeometry,
+ offset
+ );
+ }
+ polylineVolumeGeometry._ellipsoid = Ellipsoid_default.clone(
+ polylineVolumeGeometry._ellipsoid
+ );
+ return PolylineVolumeGeometry_default.createGeometry(polylineVolumeGeometry);
+}
+var createPolylineVolumeGeometry_default = createPolylineVolumeGeometry;
+export {
+ createPolylineVolumeGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js b/public/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..e7861ffe9dd8cea7e22096267b9f7eeb8c50503b
--- /dev/null
+++ b/public/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js
@@ -0,0 +1,275 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ BoundingRectangle_default
+} from "./chunk-44QAAS4P.js";
+import {
+ CornerType_default,
+ PolylineVolumeGeometryLibrary_default
+} from "./chunk-3IFRSGEY.js";
+import "./chunk-QN6TBED4.js";
+import "./chunk-C3EQ27WF.js";
+import "./chunk-YK3QIKY7.js";
+import "./chunk-NDDI2LWR.js";
+import {
+ PolygonPipeline_default,
+ WindingOrder_default
+} from "./chunk-TI3TRKIC.js";
+import {
+ arrayRemoveDuplicates_default
+} from "./chunk-57H6I3SV.js";
+import "./chunk-JSQJDZI4.js";
+import "./chunk-QQOZO7KO.js";
+import "./chunk-EDLRS3AW.js";
+import {
+ IndexDatatype_default
+} from "./chunk-C4WPMOKT.js";
+import {
+ GeometryAttributes_default
+} from "./chunk-X7IQYYHF.js";
+import {
+ GeometryAttribute_default,
+ Geometry_default,
+ PrimitiveType_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ BoundingSphere_default
+} from "./chunk-KHZNBFOH.js";
+import "./chunk-6SQMLVGV.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian2_default,
+ Cartesian3_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/PolylineVolumeOutlineGeometry.js
+function computeAttributes(positions, shape) {
+ const attributes = new GeometryAttributes_default();
+ attributes.position = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: positions
+ });
+ const shapeLength = shape.length;
+ const vertexCount = attributes.position.values.length / 3;
+ const positionLength = positions.length / 3;
+ const shapeCount = positionLength / shapeLength;
+ const indices = IndexDatatype_default.createTypedArray(
+ vertexCount,
+ 2 * shapeLength * (shapeCount + 1)
+ );
+ let i, j;
+ let index = 0;
+ i = 0;
+ let offset = i * shapeLength;
+ for (j = 0; j < shapeLength - 1; j++) {
+ indices[index++] = j + offset;
+ indices[index++] = j + offset + 1;
+ }
+ indices[index++] = shapeLength - 1 + offset;
+ indices[index++] = offset;
+ i = shapeCount - 1;
+ offset = i * shapeLength;
+ for (j = 0; j < shapeLength - 1; j++) {
+ indices[index++] = j + offset;
+ indices[index++] = j + offset + 1;
+ }
+ indices[index++] = shapeLength - 1 + offset;
+ indices[index++] = offset;
+ for (i = 0; i < shapeCount - 1; i++) {
+ const firstOffset = shapeLength * i;
+ const secondOffset = firstOffset + shapeLength;
+ for (j = 0; j < shapeLength; j++) {
+ indices[index++] = j + firstOffset;
+ indices[index++] = j + secondOffset;
+ }
+ }
+ const geometry = new Geometry_default({
+ attributes,
+ indices: IndexDatatype_default.createTypedArray(vertexCount, indices),
+ boundingSphere: BoundingSphere_default.fromVertices(positions),
+ primitiveType: PrimitiveType_default.LINES
+ });
+ return geometry;
+}
+function PolylineVolumeOutlineGeometry(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const positions = options.polylinePositions;
+ const shape = options.shapePositions;
+ if (!defined_default(positions)) {
+ throw new DeveloperError_default("options.polylinePositions is required.");
+ }
+ if (!defined_default(shape)) {
+ throw new DeveloperError_default("options.shapePositions is required.");
+ }
+ this._positions = positions;
+ this._shape = shape;
+ this._ellipsoid = Ellipsoid_default.clone(
+ defaultValue_default(options.ellipsoid, Ellipsoid_default.default)
+ );
+ this._cornerType = defaultValue_default(options.cornerType, CornerType_default.ROUNDED);
+ this._granularity = defaultValue_default(
+ options.granularity,
+ Math_default.RADIANS_PER_DEGREE
+ );
+ this._workerName = "createPolylineVolumeOutlineGeometry";
+ let numComponents = 1 + positions.length * Cartesian3_default.packedLength;
+ numComponents += 1 + shape.length * Cartesian2_default.packedLength;
+ this.packedLength = numComponents + Ellipsoid_default.packedLength + 2;
+}
+PolylineVolumeOutlineGeometry.pack = function(value, array, startingIndex) {
+ if (!defined_default(value)) {
+ throw new DeveloperError_default("value is required");
+ }
+ if (!defined_default(array)) {
+ throw new DeveloperError_default("array is required");
+ }
+ startingIndex = defaultValue_default(startingIndex, 0);
+ let i;
+ const positions = value._positions;
+ let length = positions.length;
+ array[startingIndex++] = length;
+ for (i = 0; i < length; ++i, startingIndex += Cartesian3_default.packedLength) {
+ Cartesian3_default.pack(positions[i], array, startingIndex);
+ }
+ const shape = value._shape;
+ length = shape.length;
+ array[startingIndex++] = length;
+ for (i = 0; i < length; ++i, startingIndex += Cartesian2_default.packedLength) {
+ Cartesian2_default.pack(shape[i], array, startingIndex);
+ }
+ Ellipsoid_default.pack(value._ellipsoid, array, startingIndex);
+ startingIndex += Ellipsoid_default.packedLength;
+ array[startingIndex++] = value._cornerType;
+ array[startingIndex] = value._granularity;
+ return array;
+};
+var scratchEllipsoid = Ellipsoid_default.clone(Ellipsoid_default.UNIT_SPHERE);
+var scratchOptions = {
+ polylinePositions: void 0,
+ shapePositions: void 0,
+ ellipsoid: scratchEllipsoid,
+ height: void 0,
+ cornerType: void 0,
+ granularity: void 0
+};
+PolylineVolumeOutlineGeometry.unpack = function(array, startingIndex, result) {
+ if (!defined_default(array)) {
+ throw new DeveloperError_default("array is required");
+ }
+ startingIndex = defaultValue_default(startingIndex, 0);
+ let i;
+ let length = array[startingIndex++];
+ const positions = new Array(length);
+ for (i = 0; i < length; ++i, startingIndex += Cartesian3_default.packedLength) {
+ positions[i] = Cartesian3_default.unpack(array, startingIndex);
+ }
+ length = array[startingIndex++];
+ const shape = new Array(length);
+ for (i = 0; i < length; ++i, startingIndex += Cartesian2_default.packedLength) {
+ shape[i] = Cartesian2_default.unpack(array, startingIndex);
+ }
+ const ellipsoid = Ellipsoid_default.unpack(array, startingIndex, scratchEllipsoid);
+ startingIndex += Ellipsoid_default.packedLength;
+ const cornerType = array[startingIndex++];
+ const granularity = array[startingIndex];
+ if (!defined_default(result)) {
+ scratchOptions.polylinePositions = positions;
+ scratchOptions.shapePositions = shape;
+ scratchOptions.cornerType = cornerType;
+ scratchOptions.granularity = granularity;
+ return new PolylineVolumeOutlineGeometry(scratchOptions);
+ }
+ result._positions = positions;
+ result._shape = shape;
+ result._ellipsoid = Ellipsoid_default.clone(ellipsoid, result._ellipsoid);
+ result._cornerType = cornerType;
+ result._granularity = granularity;
+ return result;
+};
+var brScratch = new BoundingRectangle_default();
+PolylineVolumeOutlineGeometry.createGeometry = function(polylineVolumeOutlineGeometry) {
+ const positions = polylineVolumeOutlineGeometry._positions;
+ const cleanPositions = arrayRemoveDuplicates_default(
+ positions,
+ Cartesian3_default.equalsEpsilon
+ );
+ let shape2D = polylineVolumeOutlineGeometry._shape;
+ shape2D = PolylineVolumeGeometryLibrary_default.removeDuplicatesFromShape(shape2D);
+ if (cleanPositions.length < 2 || shape2D.length < 3) {
+ return void 0;
+ }
+ if (PolygonPipeline_default.computeWindingOrder2D(shape2D) === WindingOrder_default.CLOCKWISE) {
+ shape2D.reverse();
+ }
+ const boundingRectangle = BoundingRectangle_default.fromPoints(shape2D, brScratch);
+ const computedPositions = PolylineVolumeGeometryLibrary_default.computePositions(
+ cleanPositions,
+ shape2D,
+ boundingRectangle,
+ polylineVolumeOutlineGeometry,
+ false
+ );
+ return computeAttributes(computedPositions, shape2D);
+};
+var PolylineVolumeOutlineGeometry_default = PolylineVolumeOutlineGeometry;
+
+// packages/engine/Source/Workers/createPolylineVolumeOutlineGeometry.js
+function createPolylineVolumeOutlineGeometry(polylineVolumeOutlineGeometry, offset) {
+ if (defined_default(offset)) {
+ polylineVolumeOutlineGeometry = PolylineVolumeOutlineGeometry_default.unpack(
+ polylineVolumeOutlineGeometry,
+ offset
+ );
+ }
+ polylineVolumeOutlineGeometry._ellipsoid = Ellipsoid_default.clone(
+ polylineVolumeOutlineGeometry._ellipsoid
+ );
+ return PolylineVolumeOutlineGeometry_default.createGeometry(
+ polylineVolumeOutlineGeometry
+ );
+}
+var createPolylineVolumeOutlineGeometry_default = createPolylineVolumeOutlineGeometry;
+export {
+ createPolylineVolumeOutlineGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createRectangleGeometry.js b/public/assets/cesium/Workers/createRectangleGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..fe38f989c4734798b3a25e9992cba5f9b1e88289
--- /dev/null
+++ b/public/assets/cesium/Workers/createRectangleGeometry.js
@@ -0,0 +1,1272 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ RectangleGeometryLibrary_default
+} from "./chunk-BVKITG4N.js";
+import {
+ GeometryInstance_default
+} from "./chunk-YSIJTJ7N.js";
+import {
+ GeometryPipeline_default
+} from "./chunk-7ZZ5LMZY.js";
+import "./chunk-LJ2JQHJT.js";
+import "./chunk-NGZJIN5Z.js";
+import {
+ GeometryOffsetAttribute_default
+} from "./chunk-GBT7MJ6X.js";
+import {
+ VertexFormat_default
+} from "./chunk-JBSKHTNX.js";
+import {
+ PolygonPipeline_default
+} from "./chunk-TI3TRKIC.js";
+import "./chunk-JSQJDZI4.js";
+import "./chunk-QQOZO7KO.js";
+import "./chunk-EDLRS3AW.js";
+import {
+ IndexDatatype_default
+} from "./chunk-C4WPMOKT.js";
+import {
+ GeometryAttributes_default
+} from "./chunk-X7IQYYHF.js";
+import {
+ GeometryAttribute_default,
+ Geometry_default,
+ PrimitiveType_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ BoundingSphere_default
+} from "./chunk-KHZNBFOH.js";
+import {
+ Matrix2_default,
+ Quaternion_default,
+ Rectangle_default
+} from "./chunk-6SQMLVGV.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian2_default,
+ Cartesian3_default,
+ Cartographic_default,
+ Ellipsoid_default,
+ Matrix3_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default,
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/RectangleGeometry.js
+var positionScratch = new Cartesian3_default();
+var normalScratch = new Cartesian3_default();
+var tangentScratch = new Cartesian3_default();
+var bitangentScratch = new Cartesian3_default();
+var rectangleScratch = new Rectangle_default();
+var stScratch = new Cartesian2_default();
+var bottomBoundingSphere = new BoundingSphere_default();
+var topBoundingSphere = new BoundingSphere_default();
+function createAttributes(vertexFormat, attributes) {
+ const geo = new Geometry_default({
+ attributes: new GeometryAttributes_default(),
+ primitiveType: PrimitiveType_default.TRIANGLES
+ });
+ geo.attributes.position = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: attributes.positions
+ });
+ if (vertexFormat.normal) {
+ geo.attributes.normal = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: attributes.normals
+ });
+ }
+ if (vertexFormat.tangent) {
+ geo.attributes.tangent = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: attributes.tangents
+ });
+ }
+ if (vertexFormat.bitangent) {
+ geo.attributes.bitangent = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: attributes.bitangents
+ });
+ }
+ return geo;
+}
+function calculateAttributes(positions, vertexFormat, ellipsoid, tangentRotationMatrix) {
+ const length = positions.length;
+ const normals = vertexFormat.normal ? new Float32Array(length) : void 0;
+ const tangents = vertexFormat.tangent ? new Float32Array(length) : void 0;
+ const bitangents = vertexFormat.bitangent ? new Float32Array(length) : void 0;
+ let attrIndex = 0;
+ const bitangent = bitangentScratch;
+ const tangent = tangentScratch;
+ let normal = normalScratch;
+ if (vertexFormat.normal || vertexFormat.tangent || vertexFormat.bitangent) {
+ for (let i = 0; i < length; i += 3) {
+ const p = Cartesian3_default.fromArray(positions, i, positionScratch);
+ const attrIndex1 = attrIndex + 1;
+ const attrIndex2 = attrIndex + 2;
+ normal = ellipsoid.geodeticSurfaceNormal(p, normal);
+ if (vertexFormat.tangent || vertexFormat.bitangent) {
+ Cartesian3_default.cross(Cartesian3_default.UNIT_Z, normal, tangent);
+ Matrix3_default.multiplyByVector(tangentRotationMatrix, tangent, tangent);
+ Cartesian3_default.normalize(tangent, tangent);
+ if (vertexFormat.bitangent) {
+ Cartesian3_default.normalize(
+ Cartesian3_default.cross(normal, tangent, bitangent),
+ bitangent
+ );
+ }
+ }
+ if (vertexFormat.normal) {
+ normals[attrIndex] = normal.x;
+ normals[attrIndex1] = normal.y;
+ normals[attrIndex2] = normal.z;
+ }
+ if (vertexFormat.tangent) {
+ tangents[attrIndex] = tangent.x;
+ tangents[attrIndex1] = tangent.y;
+ tangents[attrIndex2] = tangent.z;
+ }
+ if (vertexFormat.bitangent) {
+ bitangents[attrIndex] = bitangent.x;
+ bitangents[attrIndex1] = bitangent.y;
+ bitangents[attrIndex2] = bitangent.z;
+ }
+ attrIndex += 3;
+ }
+ }
+ return createAttributes(vertexFormat, {
+ positions,
+ normals,
+ tangents,
+ bitangents
+ });
+}
+var v1Scratch = new Cartesian3_default();
+var v2Scratch = new Cartesian3_default();
+function calculateAttributesWall(positions, vertexFormat, ellipsoid) {
+ const length = positions.length;
+ const normals = vertexFormat.normal ? new Float32Array(length) : void 0;
+ const tangents = vertexFormat.tangent ? new Float32Array(length) : void 0;
+ const bitangents = vertexFormat.bitangent ? new Float32Array(length) : void 0;
+ let normalIndex = 0;
+ let tangentIndex = 0;
+ let bitangentIndex = 0;
+ let recomputeNormal = true;
+ let bitangent = bitangentScratch;
+ let tangent = tangentScratch;
+ let normal = normalScratch;
+ if (vertexFormat.normal || vertexFormat.tangent || vertexFormat.bitangent) {
+ for (let i = 0; i < length; i += 6) {
+ const p = Cartesian3_default.fromArray(positions, i, positionScratch);
+ const p1 = Cartesian3_default.fromArray(positions, (i + 6) % length, v1Scratch);
+ if (recomputeNormal) {
+ const p2 = Cartesian3_default.fromArray(positions, (i + 3) % length, v2Scratch);
+ Cartesian3_default.subtract(p1, p, p1);
+ Cartesian3_default.subtract(p2, p, p2);
+ normal = Cartesian3_default.normalize(Cartesian3_default.cross(p2, p1, normal), normal);
+ recomputeNormal = false;
+ }
+ if (Cartesian3_default.equalsEpsilon(p1, p, Math_default.EPSILON10)) {
+ recomputeNormal = true;
+ }
+ if (vertexFormat.tangent || vertexFormat.bitangent) {
+ bitangent = ellipsoid.geodeticSurfaceNormal(p, bitangent);
+ if (vertexFormat.tangent) {
+ tangent = Cartesian3_default.normalize(
+ Cartesian3_default.cross(bitangent, normal, tangent),
+ tangent
+ );
+ }
+ }
+ if (vertexFormat.normal) {
+ normals[normalIndex++] = normal.x;
+ normals[normalIndex++] = normal.y;
+ normals[normalIndex++] = normal.z;
+ normals[normalIndex++] = normal.x;
+ normals[normalIndex++] = normal.y;
+ normals[normalIndex++] = normal.z;
+ }
+ if (vertexFormat.tangent) {
+ tangents[tangentIndex++] = tangent.x;
+ tangents[tangentIndex++] = tangent.y;
+ tangents[tangentIndex++] = tangent.z;
+ tangents[tangentIndex++] = tangent.x;
+ tangents[tangentIndex++] = tangent.y;
+ tangents[tangentIndex++] = tangent.z;
+ }
+ if (vertexFormat.bitangent) {
+ bitangents[bitangentIndex++] = bitangent.x;
+ bitangents[bitangentIndex++] = bitangent.y;
+ bitangents[bitangentIndex++] = bitangent.z;
+ bitangents[bitangentIndex++] = bitangent.x;
+ bitangents[bitangentIndex++] = bitangent.y;
+ bitangents[bitangentIndex++] = bitangent.z;
+ }
+ }
+ }
+ return createAttributes(vertexFormat, {
+ positions,
+ normals,
+ tangents,
+ bitangents
+ });
+}
+function constructRectangle(rectangleGeometry, computedOptions) {
+ const vertexFormat = rectangleGeometry._vertexFormat;
+ const ellipsoid = rectangleGeometry._ellipsoid;
+ const height = computedOptions.height;
+ const width = computedOptions.width;
+ const northCap = computedOptions.northCap;
+ const southCap = computedOptions.southCap;
+ let rowStart = 0;
+ let rowEnd = height;
+ let rowHeight = height;
+ let size = 0;
+ if (northCap) {
+ rowStart = 1;
+ rowHeight -= 1;
+ size += 1;
+ }
+ if (southCap) {
+ rowEnd -= 1;
+ rowHeight -= 1;
+ size += 1;
+ }
+ size += width * rowHeight;
+ const positions = vertexFormat.position ? new Float64Array(size * 3) : void 0;
+ const textureCoordinates = vertexFormat.st ? new Float32Array(size * 2) : void 0;
+ let posIndex = 0;
+ let stIndex = 0;
+ const position = positionScratch;
+ const st = stScratch;
+ let minX = Number.MAX_VALUE;
+ let minY = Number.MAX_VALUE;
+ let maxX = -Number.MAX_VALUE;
+ let maxY = -Number.MAX_VALUE;
+ for (let row = rowStart; row < rowEnd; ++row) {
+ for (let col = 0; col < width; ++col) {
+ RectangleGeometryLibrary_default.computePosition(
+ computedOptions,
+ ellipsoid,
+ vertexFormat.st,
+ row,
+ col,
+ position,
+ st
+ );
+ positions[posIndex++] = position.x;
+ positions[posIndex++] = position.y;
+ positions[posIndex++] = position.z;
+ if (vertexFormat.st) {
+ textureCoordinates[stIndex++] = st.x;
+ textureCoordinates[stIndex++] = st.y;
+ minX = Math.min(minX, st.x);
+ minY = Math.min(minY, st.y);
+ maxX = Math.max(maxX, st.x);
+ maxY = Math.max(maxY, st.y);
+ }
+ }
+ }
+ if (northCap) {
+ RectangleGeometryLibrary_default.computePosition(
+ computedOptions,
+ ellipsoid,
+ vertexFormat.st,
+ 0,
+ 0,
+ position,
+ st
+ );
+ positions[posIndex++] = position.x;
+ positions[posIndex++] = position.y;
+ positions[posIndex++] = position.z;
+ if (vertexFormat.st) {
+ textureCoordinates[stIndex++] = st.x;
+ textureCoordinates[stIndex++] = st.y;
+ minX = st.x;
+ minY = st.y;
+ maxX = st.x;
+ maxY = st.y;
+ }
+ }
+ if (southCap) {
+ RectangleGeometryLibrary_default.computePosition(
+ computedOptions,
+ ellipsoid,
+ vertexFormat.st,
+ height - 1,
+ 0,
+ position,
+ st
+ );
+ positions[posIndex++] = position.x;
+ positions[posIndex++] = position.y;
+ positions[posIndex] = position.z;
+ if (vertexFormat.st) {
+ textureCoordinates[stIndex++] = st.x;
+ textureCoordinates[stIndex] = st.y;
+ minX = Math.min(minX, st.x);
+ minY = Math.min(minY, st.y);
+ maxX = Math.max(maxX, st.x);
+ maxY = Math.max(maxY, st.y);
+ }
+ }
+ if (vertexFormat.st && (minX < 0 || minY < 0 || maxX > 1 || maxY > 1)) {
+ for (let k = 0; k < textureCoordinates.length; k += 2) {
+ textureCoordinates[k] = (textureCoordinates[k] - minX) / (maxX - minX);
+ textureCoordinates[k + 1] = (textureCoordinates[k + 1] - minY) / (maxY - minY);
+ }
+ }
+ const geo = calculateAttributes(
+ positions,
+ vertexFormat,
+ ellipsoid,
+ computedOptions.tangentRotationMatrix
+ );
+ let indicesSize = 6 * (width - 1) * (rowHeight - 1);
+ if (northCap) {
+ indicesSize += 3 * (width - 1);
+ }
+ if (southCap) {
+ indicesSize += 3 * (width - 1);
+ }
+ const indices = IndexDatatype_default.createTypedArray(size, indicesSize);
+ let index = 0;
+ let indicesIndex = 0;
+ let i;
+ for (i = 0; i < rowHeight - 1; ++i) {
+ for (let j = 0; j < width - 1; ++j) {
+ const upperLeft = index;
+ const lowerLeft = upperLeft + width;
+ const lowerRight = lowerLeft + 1;
+ const upperRight = upperLeft + 1;
+ indices[indicesIndex++] = upperLeft;
+ indices[indicesIndex++] = lowerLeft;
+ indices[indicesIndex++] = upperRight;
+ indices[indicesIndex++] = upperRight;
+ indices[indicesIndex++] = lowerLeft;
+ indices[indicesIndex++] = lowerRight;
+ ++index;
+ }
+ ++index;
+ }
+ if (northCap || southCap) {
+ let northIndex = size - 1;
+ const southIndex = size - 1;
+ if (northCap && southCap) {
+ northIndex = size - 2;
+ }
+ let p1;
+ let p2;
+ index = 0;
+ if (northCap) {
+ for (i = 0; i < width - 1; i++) {
+ p1 = index;
+ p2 = p1 + 1;
+ indices[indicesIndex++] = northIndex;
+ indices[indicesIndex++] = p1;
+ indices[indicesIndex++] = p2;
+ ++index;
+ }
+ }
+ if (southCap) {
+ index = (rowHeight - 1) * width;
+ for (i = 0; i < width - 1; i++) {
+ p1 = index;
+ p2 = p1 + 1;
+ indices[indicesIndex++] = p1;
+ indices[indicesIndex++] = southIndex;
+ indices[indicesIndex++] = p2;
+ ++index;
+ }
+ }
+ }
+ geo.indices = indices;
+ if (vertexFormat.st) {
+ geo.attributes.st = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 2,
+ values: textureCoordinates
+ });
+ }
+ return geo;
+}
+function addWallPositions(wallPositions, posIndex, i, topPositions, bottomPositions) {
+ wallPositions[posIndex++] = topPositions[i];
+ wallPositions[posIndex++] = topPositions[i + 1];
+ wallPositions[posIndex++] = topPositions[i + 2];
+ wallPositions[posIndex++] = bottomPositions[i];
+ wallPositions[posIndex++] = bottomPositions[i + 1];
+ wallPositions[posIndex] = bottomPositions[i + 2];
+ return wallPositions;
+}
+function addWallTextureCoordinates(wallTextures, stIndex, i, st) {
+ wallTextures[stIndex++] = st[i];
+ wallTextures[stIndex++] = st[i + 1];
+ wallTextures[stIndex++] = st[i];
+ wallTextures[stIndex] = st[i + 1];
+ return wallTextures;
+}
+var scratchVertexFormat = new VertexFormat_default();
+function constructExtrudedRectangle(rectangleGeometry, computedOptions) {
+ const shadowVolume = rectangleGeometry._shadowVolume;
+ const offsetAttributeValue = rectangleGeometry._offsetAttribute;
+ const vertexFormat = rectangleGeometry._vertexFormat;
+ const minHeight = rectangleGeometry._extrudedHeight;
+ const maxHeight = rectangleGeometry._surfaceHeight;
+ const ellipsoid = rectangleGeometry._ellipsoid;
+ const height = computedOptions.height;
+ const width = computedOptions.width;
+ let i;
+ if (shadowVolume) {
+ const newVertexFormat = VertexFormat_default.clone(
+ vertexFormat,
+ scratchVertexFormat
+ );
+ newVertexFormat.normal = true;
+ rectangleGeometry._vertexFormat = newVertexFormat;
+ }
+ const topBottomGeo = constructRectangle(rectangleGeometry, computedOptions);
+ if (shadowVolume) {
+ rectangleGeometry._vertexFormat = vertexFormat;
+ }
+ let topPositions = PolygonPipeline_default.scaleToGeodeticHeight(
+ topBottomGeo.attributes.position.values,
+ maxHeight,
+ ellipsoid,
+ false
+ );
+ topPositions = new Float64Array(topPositions);
+ let length = topPositions.length;
+ const newLength = length * 2;
+ const positions = new Float64Array(newLength);
+ positions.set(topPositions);
+ const bottomPositions = PolygonPipeline_default.scaleToGeodeticHeight(
+ topBottomGeo.attributes.position.values,
+ minHeight,
+ ellipsoid
+ );
+ positions.set(bottomPositions, length);
+ topBottomGeo.attributes.position.values = positions;
+ const normals = vertexFormat.normal ? new Float32Array(newLength) : void 0;
+ const tangents = vertexFormat.tangent ? new Float32Array(newLength) : void 0;
+ const bitangents = vertexFormat.bitangent ? new Float32Array(newLength) : void 0;
+ const textures = vertexFormat.st ? new Float32Array(newLength / 3 * 2) : void 0;
+ let topSt;
+ let topNormals;
+ if (vertexFormat.normal) {
+ topNormals = topBottomGeo.attributes.normal.values;
+ normals.set(topNormals);
+ for (i = 0; i < length; i++) {
+ topNormals[i] = -topNormals[i];
+ }
+ normals.set(topNormals, length);
+ topBottomGeo.attributes.normal.values = normals;
+ }
+ if (shadowVolume) {
+ topNormals = topBottomGeo.attributes.normal.values;
+ if (!vertexFormat.normal) {
+ topBottomGeo.attributes.normal = void 0;
+ }
+ const extrudeNormals = new Float32Array(newLength);
+ for (i = 0; i < length; i++) {
+ topNormals[i] = -topNormals[i];
+ }
+ extrudeNormals.set(topNormals, length);
+ topBottomGeo.attributes.extrudeDirection = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: extrudeNormals
+ });
+ }
+ let offsetValue;
+ const hasOffsets = defined_default(offsetAttributeValue);
+ if (hasOffsets) {
+ const size = length / 3 * 2;
+ let offsetAttribute = new Uint8Array(size);
+ if (offsetAttributeValue === GeometryOffsetAttribute_default.TOP) {
+ offsetAttribute = offsetAttribute.fill(1, 0, size / 2);
+ } else {
+ offsetValue = offsetAttributeValue === GeometryOffsetAttribute_default.NONE ? 0 : 1;
+ offsetAttribute = offsetAttribute.fill(offsetValue);
+ }
+ topBottomGeo.attributes.applyOffset = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: offsetAttribute
+ });
+ }
+ if (vertexFormat.tangent) {
+ const topTangents = topBottomGeo.attributes.tangent.values;
+ tangents.set(topTangents);
+ for (i = 0; i < length; i++) {
+ topTangents[i] = -topTangents[i];
+ }
+ tangents.set(topTangents, length);
+ topBottomGeo.attributes.tangent.values = tangents;
+ }
+ if (vertexFormat.bitangent) {
+ const topBitangents = topBottomGeo.attributes.bitangent.values;
+ bitangents.set(topBitangents);
+ bitangents.set(topBitangents, length);
+ topBottomGeo.attributes.bitangent.values = bitangents;
+ }
+ if (vertexFormat.st) {
+ topSt = topBottomGeo.attributes.st.values;
+ textures.set(topSt);
+ textures.set(topSt, length / 3 * 2);
+ topBottomGeo.attributes.st.values = textures;
+ }
+ const indices = topBottomGeo.indices;
+ const indicesLength = indices.length;
+ const posLength = length / 3;
+ const newIndices = IndexDatatype_default.createTypedArray(
+ newLength / 3,
+ indicesLength * 2
+ );
+ newIndices.set(indices);
+ for (i = 0; i < indicesLength; i += 3) {
+ newIndices[i + indicesLength] = indices[i + 2] + posLength;
+ newIndices[i + 1 + indicesLength] = indices[i + 1] + posLength;
+ newIndices[i + 2 + indicesLength] = indices[i] + posLength;
+ }
+ topBottomGeo.indices = newIndices;
+ const northCap = computedOptions.northCap;
+ const southCap = computedOptions.southCap;
+ let rowHeight = height;
+ let widthMultiplier = 2;
+ let perimeterPositions = 0;
+ let corners = 4;
+ let dupliateCorners = 4;
+ if (northCap) {
+ widthMultiplier -= 1;
+ rowHeight -= 1;
+ perimeterPositions += 1;
+ corners -= 2;
+ dupliateCorners -= 1;
+ }
+ if (southCap) {
+ widthMultiplier -= 1;
+ rowHeight -= 1;
+ perimeterPositions += 1;
+ corners -= 2;
+ dupliateCorners -= 1;
+ }
+ perimeterPositions += widthMultiplier * width + 2 * rowHeight - corners;
+ const wallCount = (perimeterPositions + dupliateCorners) * 2;
+ let wallPositions = new Float64Array(wallCount * 3);
+ const wallExtrudeNormals = shadowVolume ? new Float32Array(wallCount * 3) : void 0;
+ let wallOffsetAttribute = hasOffsets ? new Uint8Array(wallCount) : void 0;
+ let wallTextures = vertexFormat.st ? new Float32Array(wallCount * 2) : void 0;
+ const computeTopOffsets = offsetAttributeValue === GeometryOffsetAttribute_default.TOP;
+ if (hasOffsets && !computeTopOffsets) {
+ offsetValue = offsetAttributeValue === GeometryOffsetAttribute_default.ALL ? 1 : 0;
+ wallOffsetAttribute = wallOffsetAttribute.fill(offsetValue);
+ }
+ let posIndex = 0;
+ let stIndex = 0;
+ let extrudeNormalIndex = 0;
+ let wallOffsetIndex = 0;
+ const area = width * rowHeight;
+ let threeI;
+ for (i = 0; i < area; i += width) {
+ threeI = i * 3;
+ wallPositions = addWallPositions(
+ wallPositions,
+ posIndex,
+ threeI,
+ topPositions,
+ bottomPositions
+ );
+ posIndex += 6;
+ if (vertexFormat.st) {
+ wallTextures = addWallTextureCoordinates(
+ wallTextures,
+ stIndex,
+ i * 2,
+ topSt
+ );
+ stIndex += 4;
+ }
+ if (shadowVolume) {
+ extrudeNormalIndex += 3;
+ wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI];
+ wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 1];
+ wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 2];
+ }
+ if (computeTopOffsets) {
+ wallOffsetAttribute[wallOffsetIndex++] = 1;
+ wallOffsetIndex += 1;
+ }
+ }
+ if (!southCap) {
+ for (i = area - width; i < area; i++) {
+ threeI = i * 3;
+ wallPositions = addWallPositions(
+ wallPositions,
+ posIndex,
+ threeI,
+ topPositions,
+ bottomPositions
+ );
+ posIndex += 6;
+ if (vertexFormat.st) {
+ wallTextures = addWallTextureCoordinates(
+ wallTextures,
+ stIndex,
+ i * 2,
+ topSt
+ );
+ stIndex += 4;
+ }
+ if (shadowVolume) {
+ extrudeNormalIndex += 3;
+ wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI];
+ wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 1];
+ wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 2];
+ }
+ if (computeTopOffsets) {
+ wallOffsetAttribute[wallOffsetIndex++] = 1;
+ wallOffsetIndex += 1;
+ }
+ }
+ } else {
+ const southIndex = northCap ? area + 1 : area;
+ threeI = southIndex * 3;
+ for (i = 0; i < 2; i++) {
+ wallPositions = addWallPositions(
+ wallPositions,
+ posIndex,
+ threeI,
+ topPositions,
+ bottomPositions
+ );
+ posIndex += 6;
+ if (vertexFormat.st) {
+ wallTextures = addWallTextureCoordinates(
+ wallTextures,
+ stIndex,
+ southIndex * 2,
+ topSt
+ );
+ stIndex += 4;
+ }
+ if (shadowVolume) {
+ extrudeNormalIndex += 3;
+ wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI];
+ wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 1];
+ wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 2];
+ }
+ if (computeTopOffsets) {
+ wallOffsetAttribute[wallOffsetIndex++] = 1;
+ wallOffsetIndex += 1;
+ }
+ }
+ }
+ for (i = area - 1; i > 0; i -= width) {
+ threeI = i * 3;
+ wallPositions = addWallPositions(
+ wallPositions,
+ posIndex,
+ threeI,
+ topPositions,
+ bottomPositions
+ );
+ posIndex += 6;
+ if (vertexFormat.st) {
+ wallTextures = addWallTextureCoordinates(
+ wallTextures,
+ stIndex,
+ i * 2,
+ topSt
+ );
+ stIndex += 4;
+ }
+ if (shadowVolume) {
+ extrudeNormalIndex += 3;
+ wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI];
+ wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 1];
+ wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 2];
+ }
+ if (computeTopOffsets) {
+ wallOffsetAttribute[wallOffsetIndex++] = 1;
+ wallOffsetIndex += 1;
+ }
+ }
+ if (!northCap) {
+ for (i = width - 1; i >= 0; i--) {
+ threeI = i * 3;
+ wallPositions = addWallPositions(
+ wallPositions,
+ posIndex,
+ threeI,
+ topPositions,
+ bottomPositions
+ );
+ posIndex += 6;
+ if (vertexFormat.st) {
+ wallTextures = addWallTextureCoordinates(
+ wallTextures,
+ stIndex,
+ i * 2,
+ topSt
+ );
+ stIndex += 4;
+ }
+ if (shadowVolume) {
+ extrudeNormalIndex += 3;
+ wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI];
+ wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 1];
+ wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 2];
+ }
+ if (computeTopOffsets) {
+ wallOffsetAttribute[wallOffsetIndex++] = 1;
+ wallOffsetIndex += 1;
+ }
+ }
+ } else {
+ const northIndex = area;
+ threeI = northIndex * 3;
+ for (i = 0; i < 2; i++) {
+ wallPositions = addWallPositions(
+ wallPositions,
+ posIndex,
+ threeI,
+ topPositions,
+ bottomPositions
+ );
+ posIndex += 6;
+ if (vertexFormat.st) {
+ wallTextures = addWallTextureCoordinates(
+ wallTextures,
+ stIndex,
+ northIndex * 2,
+ topSt
+ );
+ stIndex += 4;
+ }
+ if (shadowVolume) {
+ extrudeNormalIndex += 3;
+ wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI];
+ wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 1];
+ wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 2];
+ }
+ if (computeTopOffsets) {
+ wallOffsetAttribute[wallOffsetIndex++] = 1;
+ wallOffsetIndex += 1;
+ }
+ }
+ }
+ let geo = calculateAttributesWall(wallPositions, vertexFormat, ellipsoid);
+ if (vertexFormat.st) {
+ geo.attributes.st = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 2,
+ values: wallTextures
+ });
+ }
+ if (shadowVolume) {
+ geo.attributes.extrudeDirection = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.FLOAT,
+ componentsPerAttribute: 3,
+ values: wallExtrudeNormals
+ });
+ }
+ if (hasOffsets) {
+ geo.attributes.applyOffset = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: wallOffsetAttribute
+ });
+ }
+ const wallIndices = IndexDatatype_default.createTypedArray(
+ wallCount,
+ perimeterPositions * 6
+ );
+ let upperLeft;
+ let lowerLeft;
+ let lowerRight;
+ let upperRight;
+ length = wallPositions.length / 3;
+ let index = 0;
+ for (i = 0; i < length - 1; i += 2) {
+ upperLeft = i;
+ upperRight = (upperLeft + 2) % length;
+ const p1 = Cartesian3_default.fromArray(wallPositions, upperLeft * 3, v1Scratch);
+ const p2 = Cartesian3_default.fromArray(wallPositions, upperRight * 3, v2Scratch);
+ if (Cartesian3_default.equalsEpsilon(p1, p2, Math_default.EPSILON10)) {
+ continue;
+ }
+ lowerLeft = (upperLeft + 1) % length;
+ lowerRight = (lowerLeft + 2) % length;
+ wallIndices[index++] = upperLeft;
+ wallIndices[index++] = lowerLeft;
+ wallIndices[index++] = upperRight;
+ wallIndices[index++] = upperRight;
+ wallIndices[index++] = lowerLeft;
+ wallIndices[index++] = lowerRight;
+ }
+ geo.indices = wallIndices;
+ geo = GeometryPipeline_default.combineInstances([
+ new GeometryInstance_default({
+ geometry: topBottomGeo
+ }),
+ new GeometryInstance_default({
+ geometry: geo
+ })
+ ]);
+ return geo[0];
+}
+var scratchRectanglePoints = [
+ new Cartesian3_default(),
+ new Cartesian3_default(),
+ new Cartesian3_default(),
+ new Cartesian3_default()
+];
+var nwScratch = new Cartographic_default();
+var stNwScratch = new Cartographic_default();
+function computeRectangle(rectangle, granularity, rotation, ellipsoid, result) {
+ if (rotation === 0) {
+ return Rectangle_default.clone(rectangle, result);
+ }
+ const computedOptions = RectangleGeometryLibrary_default.computeOptions(
+ rectangle,
+ granularity,
+ rotation,
+ 0,
+ rectangleScratch,
+ nwScratch
+ );
+ const height = computedOptions.height;
+ const width = computedOptions.width;
+ const positions = scratchRectanglePoints;
+ RectangleGeometryLibrary_default.computePosition(
+ computedOptions,
+ ellipsoid,
+ false,
+ 0,
+ 0,
+ positions[0]
+ );
+ RectangleGeometryLibrary_default.computePosition(
+ computedOptions,
+ ellipsoid,
+ false,
+ 0,
+ width - 1,
+ positions[1]
+ );
+ RectangleGeometryLibrary_default.computePosition(
+ computedOptions,
+ ellipsoid,
+ false,
+ height - 1,
+ 0,
+ positions[2]
+ );
+ RectangleGeometryLibrary_default.computePosition(
+ computedOptions,
+ ellipsoid,
+ false,
+ height - 1,
+ width - 1,
+ positions[3]
+ );
+ return Rectangle_default.fromCartesianArray(positions, ellipsoid, result);
+}
+function RectangleGeometry(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const rectangle = options.rectangle;
+ Check_default.typeOf.object("rectangle", rectangle);
+ Rectangle_default.validate(rectangle);
+ if (rectangle.north < rectangle.south) {
+ throw new DeveloperError_default(
+ "options.rectangle.north must be greater than or equal to options.rectangle.south"
+ );
+ }
+ const height = defaultValue_default(options.height, 0);
+ const extrudedHeight = defaultValue_default(options.extrudedHeight, height);
+ this._rectangle = Rectangle_default.clone(rectangle);
+ this._granularity = defaultValue_default(
+ options.granularity,
+ Math_default.RADIANS_PER_DEGREE
+ );
+ this._ellipsoid = Ellipsoid_default.clone(
+ defaultValue_default(options.ellipsoid, Ellipsoid_default.default)
+ );
+ this._surfaceHeight = Math.max(height, extrudedHeight);
+ this._rotation = defaultValue_default(options.rotation, 0);
+ this._stRotation = defaultValue_default(options.stRotation, 0);
+ this._vertexFormat = VertexFormat_default.clone(
+ defaultValue_default(options.vertexFormat, VertexFormat_default.DEFAULT)
+ );
+ this._extrudedHeight = Math.min(height, extrudedHeight);
+ this._shadowVolume = defaultValue_default(options.shadowVolume, false);
+ this._workerName = "createRectangleGeometry";
+ this._offsetAttribute = options.offsetAttribute;
+ this._rotatedRectangle = void 0;
+ this._textureCoordinateRotationPoints = void 0;
+}
+RectangleGeometry.packedLength = Rectangle_default.packedLength + Ellipsoid_default.packedLength + VertexFormat_default.packedLength + 7;
+RectangleGeometry.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ Rectangle_default.pack(value._rectangle, array, startingIndex);
+ startingIndex += Rectangle_default.packedLength;
+ Ellipsoid_default.pack(value._ellipsoid, array, startingIndex);
+ startingIndex += Ellipsoid_default.packedLength;
+ VertexFormat_default.pack(value._vertexFormat, array, startingIndex);
+ startingIndex += VertexFormat_default.packedLength;
+ array[startingIndex++] = value._granularity;
+ array[startingIndex++] = value._surfaceHeight;
+ array[startingIndex++] = value._rotation;
+ array[startingIndex++] = value._stRotation;
+ array[startingIndex++] = value._extrudedHeight;
+ array[startingIndex++] = value._shadowVolume ? 1 : 0;
+ array[startingIndex] = defaultValue_default(value._offsetAttribute, -1);
+ return array;
+};
+var scratchRectangle = new Rectangle_default();
+var scratchEllipsoid = Ellipsoid_default.clone(Ellipsoid_default.UNIT_SPHERE);
+var scratchOptions = {
+ rectangle: scratchRectangle,
+ ellipsoid: scratchEllipsoid,
+ vertexFormat: scratchVertexFormat,
+ granularity: void 0,
+ height: void 0,
+ rotation: void 0,
+ stRotation: void 0,
+ extrudedHeight: void 0,
+ shadowVolume: void 0,
+ offsetAttribute: void 0
+};
+RectangleGeometry.unpack = function(array, startingIndex, result) {
+ Check_default.defined("array", array);
+ startingIndex = defaultValue_default(startingIndex, 0);
+ const rectangle = Rectangle_default.unpack(array, startingIndex, scratchRectangle);
+ startingIndex += Rectangle_default.packedLength;
+ const ellipsoid = Ellipsoid_default.unpack(array, startingIndex, scratchEllipsoid);
+ startingIndex += Ellipsoid_default.packedLength;
+ const vertexFormat = VertexFormat_default.unpack(
+ array,
+ startingIndex,
+ scratchVertexFormat
+ );
+ startingIndex += VertexFormat_default.packedLength;
+ const granularity = array[startingIndex++];
+ const surfaceHeight = array[startingIndex++];
+ const rotation = array[startingIndex++];
+ const stRotation = array[startingIndex++];
+ const extrudedHeight = array[startingIndex++];
+ const shadowVolume = array[startingIndex++] === 1;
+ const offsetAttribute = array[startingIndex];
+ if (!defined_default(result)) {
+ scratchOptions.granularity = granularity;
+ scratchOptions.height = surfaceHeight;
+ scratchOptions.rotation = rotation;
+ scratchOptions.stRotation = stRotation;
+ scratchOptions.extrudedHeight = extrudedHeight;
+ scratchOptions.shadowVolume = shadowVolume;
+ scratchOptions.offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
+ return new RectangleGeometry(scratchOptions);
+ }
+ result._rectangle = Rectangle_default.clone(rectangle, result._rectangle);
+ result._ellipsoid = Ellipsoid_default.clone(ellipsoid, result._ellipsoid);
+ result._vertexFormat = VertexFormat_default.clone(vertexFormat, result._vertexFormat);
+ result._granularity = granularity;
+ result._surfaceHeight = surfaceHeight;
+ result._rotation = rotation;
+ result._stRotation = stRotation;
+ result._extrudedHeight = extrudedHeight;
+ result._shadowVolume = shadowVolume;
+ result._offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
+ return result;
+};
+RectangleGeometry.computeRectangle = function(options, result) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const rectangle = options.rectangle;
+ Check_default.typeOf.object("rectangle", rectangle);
+ Rectangle_default.validate(rectangle);
+ if (rectangle.north < rectangle.south) {
+ throw new DeveloperError_default(
+ "options.rectangle.north must be greater than or equal to options.rectangle.south"
+ );
+ }
+ const granularity = defaultValue_default(
+ options.granularity,
+ Math_default.RADIANS_PER_DEGREE
+ );
+ const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default);
+ const rotation = defaultValue_default(options.rotation, 0);
+ return computeRectangle(rectangle, granularity, rotation, ellipsoid, result);
+};
+var tangentRotationMatrixScratch = new Matrix3_default();
+var quaternionScratch = new Quaternion_default();
+var centerScratch = new Cartographic_default();
+RectangleGeometry.createGeometry = function(rectangleGeometry) {
+ if (Math_default.equalsEpsilon(
+ rectangleGeometry._rectangle.north,
+ rectangleGeometry._rectangle.south,
+ Math_default.EPSILON10
+ ) || Math_default.equalsEpsilon(
+ rectangleGeometry._rectangle.east,
+ rectangleGeometry._rectangle.west,
+ Math_default.EPSILON10
+ )) {
+ return void 0;
+ }
+ let rectangle = rectangleGeometry._rectangle;
+ const ellipsoid = rectangleGeometry._ellipsoid;
+ const rotation = rectangleGeometry._rotation;
+ const stRotation = rectangleGeometry._stRotation;
+ const vertexFormat = rectangleGeometry._vertexFormat;
+ const computedOptions = RectangleGeometryLibrary_default.computeOptions(
+ rectangle,
+ rectangleGeometry._granularity,
+ rotation,
+ stRotation,
+ rectangleScratch,
+ nwScratch,
+ stNwScratch
+ );
+ const tangentRotationMatrix = tangentRotationMatrixScratch;
+ if (stRotation !== 0 || rotation !== 0) {
+ const center = Rectangle_default.center(rectangle, centerScratch);
+ const axis = ellipsoid.geodeticSurfaceNormalCartographic(center, v1Scratch);
+ Quaternion_default.fromAxisAngle(axis, -stRotation, quaternionScratch);
+ Matrix3_default.fromQuaternion(quaternionScratch, tangentRotationMatrix);
+ } else {
+ Matrix3_default.clone(Matrix3_default.IDENTITY, tangentRotationMatrix);
+ }
+ const surfaceHeight = rectangleGeometry._surfaceHeight;
+ const extrudedHeight = rectangleGeometry._extrudedHeight;
+ const extrude = !Math_default.equalsEpsilon(
+ surfaceHeight,
+ extrudedHeight,
+ 0,
+ Math_default.EPSILON2
+ );
+ computedOptions.lonScalar = 1 / rectangleGeometry._rectangle.width;
+ computedOptions.latScalar = 1 / rectangleGeometry._rectangle.height;
+ computedOptions.tangentRotationMatrix = tangentRotationMatrix;
+ let geometry;
+ let boundingSphere;
+ rectangle = rectangleGeometry._rectangle;
+ if (extrude) {
+ geometry = constructExtrudedRectangle(rectangleGeometry, computedOptions);
+ const topBS = BoundingSphere_default.fromRectangle3D(
+ rectangle,
+ ellipsoid,
+ surfaceHeight,
+ topBoundingSphere
+ );
+ const bottomBS = BoundingSphere_default.fromRectangle3D(
+ rectangle,
+ ellipsoid,
+ extrudedHeight,
+ bottomBoundingSphere
+ );
+ boundingSphere = BoundingSphere_default.union(topBS, bottomBS);
+ } else {
+ geometry = constructRectangle(rectangleGeometry, computedOptions);
+ geometry.attributes.position.values = PolygonPipeline_default.scaleToGeodeticHeight(
+ geometry.attributes.position.values,
+ surfaceHeight,
+ ellipsoid,
+ false
+ );
+ if (defined_default(rectangleGeometry._offsetAttribute)) {
+ const length = geometry.attributes.position.values.length;
+ const offsetValue = rectangleGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
+ const applyOffset = new Uint8Array(length / 3).fill(offsetValue);
+ geometry.attributes.applyOffset = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: applyOffset
+ });
+ }
+ boundingSphere = BoundingSphere_default.fromRectangle3D(
+ rectangle,
+ ellipsoid,
+ surfaceHeight
+ );
+ }
+ if (!vertexFormat.position) {
+ delete geometry.attributes.position;
+ }
+ return new Geometry_default({
+ attributes: geometry.attributes,
+ indices: geometry.indices,
+ primitiveType: geometry.primitiveType,
+ boundingSphere,
+ offsetAttribute: rectangleGeometry._offsetAttribute
+ });
+};
+RectangleGeometry.createShadowVolume = function(rectangleGeometry, minHeightFunc, maxHeightFunc) {
+ const granularity = rectangleGeometry._granularity;
+ const ellipsoid = rectangleGeometry._ellipsoid;
+ const minHeight = minHeightFunc(granularity, ellipsoid);
+ const maxHeight = maxHeightFunc(granularity, ellipsoid);
+ return new RectangleGeometry({
+ rectangle: rectangleGeometry._rectangle,
+ rotation: rectangleGeometry._rotation,
+ ellipsoid,
+ stRotation: rectangleGeometry._stRotation,
+ granularity,
+ extrudedHeight: maxHeight,
+ height: minHeight,
+ vertexFormat: VertexFormat_default.POSITION_ONLY,
+ shadowVolume: true
+ });
+};
+var unrotatedTextureRectangleScratch = new Rectangle_default();
+var points2DScratch = [new Cartesian2_default(), new Cartesian2_default(), new Cartesian2_default()];
+var rotation2DScratch = new Matrix2_default();
+var rectangleCenterScratch = new Cartographic_default();
+function textureCoordinateRotationPoints(rectangleGeometry) {
+ if (rectangleGeometry._stRotation === 0) {
+ return [0, 0, 0, 1, 1, 0];
+ }
+ const rectangle = Rectangle_default.clone(
+ rectangleGeometry._rectangle,
+ unrotatedTextureRectangleScratch
+ );
+ const granularity = rectangleGeometry._granularity;
+ const ellipsoid = rectangleGeometry._ellipsoid;
+ const rotation = rectangleGeometry._rotation - rectangleGeometry._stRotation;
+ const unrotatedTextureRectangle = computeRectangle(
+ rectangle,
+ granularity,
+ rotation,
+ ellipsoid,
+ unrotatedTextureRectangleScratch
+ );
+ const points2D = points2DScratch;
+ points2D[0].x = unrotatedTextureRectangle.west;
+ points2D[0].y = unrotatedTextureRectangle.south;
+ points2D[1].x = unrotatedTextureRectangle.west;
+ points2D[1].y = unrotatedTextureRectangle.north;
+ points2D[2].x = unrotatedTextureRectangle.east;
+ points2D[2].y = unrotatedTextureRectangle.south;
+ const boundingRectangle = rectangleGeometry.rectangle;
+ const toDesiredInComputed = Matrix2_default.fromRotation(
+ rectangleGeometry._stRotation,
+ rotation2DScratch
+ );
+ const boundingRectangleCenter = Rectangle_default.center(
+ boundingRectangle,
+ rectangleCenterScratch
+ );
+ for (let i = 0; i < 3; ++i) {
+ const point2D = points2D[i];
+ point2D.x -= boundingRectangleCenter.longitude;
+ point2D.y -= boundingRectangleCenter.latitude;
+ Matrix2_default.multiplyByVector(toDesiredInComputed, point2D, point2D);
+ point2D.x += boundingRectangleCenter.longitude;
+ point2D.y += boundingRectangleCenter.latitude;
+ point2D.x = (point2D.x - boundingRectangle.west) / boundingRectangle.width;
+ point2D.y = (point2D.y - boundingRectangle.south) / boundingRectangle.height;
+ }
+ const minXYCorner = points2D[0];
+ const maxYCorner = points2D[1];
+ const maxXCorner = points2D[2];
+ const result = new Array(6);
+ Cartesian2_default.pack(minXYCorner, result);
+ Cartesian2_default.pack(maxYCorner, result, 2);
+ Cartesian2_default.pack(maxXCorner, result, 4);
+ return result;
+}
+Object.defineProperties(RectangleGeometry.prototype, {
+ /**
+ * @private
+ */
+ rectangle: {
+ get: function() {
+ if (!defined_default(this._rotatedRectangle)) {
+ this._rotatedRectangle = computeRectangle(
+ this._rectangle,
+ this._granularity,
+ this._rotation,
+ this._ellipsoid
+ );
+ }
+ return this._rotatedRectangle;
+ }
+ },
+ /**
+ * For remapping texture coordinates when rendering RectangleGeometries as GroundPrimitives.
+ * This version permits skew in textures by computing offsets directly in cartographic space and
+ * more accurately approximates rendering RectangleGeometries with height as standard Primitives.
+ * @see Geometry#_textureCoordinateRotationPoints
+ * @private
+ */
+ textureCoordinateRotationPoints: {
+ get: function() {
+ if (!defined_default(this._textureCoordinateRotationPoints)) {
+ this._textureCoordinateRotationPoints = textureCoordinateRotationPoints(
+ this
+ );
+ }
+ return this._textureCoordinateRotationPoints;
+ }
+ }
+});
+var RectangleGeometry_default = RectangleGeometry;
+
+// packages/engine/Source/Workers/createRectangleGeometry.js
+function createRectangleGeometry(rectangleGeometry, offset) {
+ if (defined_default(offset)) {
+ rectangleGeometry = RectangleGeometry_default.unpack(rectangleGeometry, offset);
+ }
+ rectangleGeometry._ellipsoid = Ellipsoid_default.clone(rectangleGeometry._ellipsoid);
+ rectangleGeometry._rectangle = Rectangle_default.clone(rectangleGeometry._rectangle);
+ return RectangleGeometry_default.createGeometry(rectangleGeometry);
+}
+var createRectangleGeometry_default = createRectangleGeometry;
+export {
+ createRectangleGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createRectangleOutlineGeometry.js b/public/assets/cesium/Workers/createRectangleOutlineGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..c9bf518b3c4b783e0d5fe11dd7a92baf1dea41e4
--- /dev/null
+++ b/public/assets/cesium/Workers/createRectangleOutlineGeometry.js
@@ -0,0 +1,477 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ RectangleGeometryLibrary_default
+} from "./chunk-BVKITG4N.js";
+import {
+ GeometryOffsetAttribute_default
+} from "./chunk-GBT7MJ6X.js";
+import {
+ PolygonPipeline_default
+} from "./chunk-TI3TRKIC.js";
+import "./chunk-JSQJDZI4.js";
+import {
+ IndexDatatype_default
+} from "./chunk-C4WPMOKT.js";
+import {
+ GeometryAttributes_default
+} from "./chunk-X7IQYYHF.js";
+import {
+ GeometryAttribute_default,
+ Geometry_default,
+ PrimitiveType_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ BoundingSphere_default
+} from "./chunk-KHZNBFOH.js";
+import {
+ Rectangle_default
+} from "./chunk-6SQMLVGV.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian3_default,
+ Cartographic_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/RectangleOutlineGeometry.js
+var bottomBoundingSphere = new BoundingSphere_default();
+var topBoundingSphere = new BoundingSphere_default();
+var positionScratch = new Cartesian3_default();
+var rectangleScratch = new Rectangle_default();
+function constructRectangle(geometry, computedOptions) {
+ const ellipsoid = geometry._ellipsoid;
+ const height = computedOptions.height;
+ const width = computedOptions.width;
+ const northCap = computedOptions.northCap;
+ const southCap = computedOptions.southCap;
+ let rowHeight = height;
+ let widthMultiplier = 2;
+ let size = 0;
+ let corners = 4;
+ if (northCap) {
+ widthMultiplier -= 1;
+ rowHeight -= 1;
+ size += 1;
+ corners -= 2;
+ }
+ if (southCap) {
+ widthMultiplier -= 1;
+ rowHeight -= 1;
+ size += 1;
+ corners -= 2;
+ }
+ size += widthMultiplier * width + 2 * rowHeight - corners;
+ const positions = new Float64Array(size * 3);
+ let posIndex = 0;
+ let row = 0;
+ let col;
+ const position = positionScratch;
+ if (northCap) {
+ RectangleGeometryLibrary_default.computePosition(
+ computedOptions,
+ ellipsoid,
+ false,
+ row,
+ 0,
+ position
+ );
+ positions[posIndex++] = position.x;
+ positions[posIndex++] = position.y;
+ positions[posIndex++] = position.z;
+ } else {
+ for (col = 0; col < width; col++) {
+ RectangleGeometryLibrary_default.computePosition(
+ computedOptions,
+ ellipsoid,
+ false,
+ row,
+ col,
+ position
+ );
+ positions[posIndex++] = position.x;
+ positions[posIndex++] = position.y;
+ positions[posIndex++] = position.z;
+ }
+ }
+ col = width - 1;
+ for (row = 1; row < height; row++) {
+ RectangleGeometryLibrary_default.computePosition(
+ computedOptions,
+ ellipsoid,
+ false,
+ row,
+ col,
+ position
+ );
+ positions[posIndex++] = position.x;
+ positions[posIndex++] = position.y;
+ positions[posIndex++] = position.z;
+ }
+ row = height - 1;
+ if (!southCap) {
+ for (col = width - 2; col >= 0; col--) {
+ RectangleGeometryLibrary_default.computePosition(
+ computedOptions,
+ ellipsoid,
+ false,
+ row,
+ col,
+ position
+ );
+ positions[posIndex++] = position.x;
+ positions[posIndex++] = position.y;
+ positions[posIndex++] = position.z;
+ }
+ }
+ col = 0;
+ for (row = height - 2; row > 0; row--) {
+ RectangleGeometryLibrary_default.computePosition(
+ computedOptions,
+ ellipsoid,
+ false,
+ row,
+ col,
+ position
+ );
+ positions[posIndex++] = position.x;
+ positions[posIndex++] = position.y;
+ positions[posIndex++] = position.z;
+ }
+ const indicesSize = positions.length / 3 * 2;
+ const indices = IndexDatatype_default.createTypedArray(
+ positions.length / 3,
+ indicesSize
+ );
+ let index = 0;
+ for (let i = 0; i < positions.length / 3 - 1; i++) {
+ indices[index++] = i;
+ indices[index++] = i + 1;
+ }
+ indices[index++] = positions.length / 3 - 1;
+ indices[index++] = 0;
+ const geo = new Geometry_default({
+ attributes: new GeometryAttributes_default(),
+ primitiveType: PrimitiveType_default.LINES
+ });
+ geo.attributes.position = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: positions
+ });
+ geo.indices = indices;
+ return geo;
+}
+function constructExtrudedRectangle(rectangleGeometry, computedOptions) {
+ const maxHeight = rectangleGeometry._surfaceHeight;
+ const minHeight = rectangleGeometry._extrudedHeight;
+ const ellipsoid = rectangleGeometry._ellipsoid;
+ const geo = constructRectangle(rectangleGeometry, computedOptions);
+ const height = computedOptions.height;
+ const width = computedOptions.width;
+ const topPositions = PolygonPipeline_default.scaleToGeodeticHeight(
+ geo.attributes.position.values,
+ maxHeight,
+ ellipsoid,
+ false
+ );
+ let length = topPositions.length;
+ const positions = new Float64Array(length * 2);
+ positions.set(topPositions);
+ const bottomPositions = PolygonPipeline_default.scaleToGeodeticHeight(
+ geo.attributes.position.values,
+ minHeight,
+ ellipsoid
+ );
+ positions.set(bottomPositions, length);
+ geo.attributes.position.values = positions;
+ const northCap = computedOptions.northCap;
+ const southCap = computedOptions.southCap;
+ let corners = 4;
+ if (northCap) {
+ corners -= 1;
+ }
+ if (southCap) {
+ corners -= 1;
+ }
+ const indicesSize = (positions.length / 3 + corners) * 2;
+ const indices = IndexDatatype_default.createTypedArray(
+ positions.length / 3,
+ indicesSize
+ );
+ length = positions.length / 6;
+ let index = 0;
+ for (let i = 0; i < length - 1; i++) {
+ indices[index++] = i;
+ indices[index++] = i + 1;
+ indices[index++] = i + length;
+ indices[index++] = i + length + 1;
+ }
+ indices[index++] = length - 1;
+ indices[index++] = 0;
+ indices[index++] = length + length - 1;
+ indices[index++] = length;
+ indices[index++] = 0;
+ indices[index++] = length;
+ let bottomCorner;
+ if (northCap) {
+ bottomCorner = height - 1;
+ } else {
+ const topRightCorner = width - 1;
+ indices[index++] = topRightCorner;
+ indices[index++] = topRightCorner + length;
+ bottomCorner = width + height - 2;
+ }
+ indices[index++] = bottomCorner;
+ indices[index++] = bottomCorner + length;
+ if (!southCap) {
+ const bottomLeftCorner = width + bottomCorner - 1;
+ indices[index++] = bottomLeftCorner;
+ indices[index] = bottomLeftCorner + length;
+ }
+ geo.indices = indices;
+ return geo;
+}
+function RectangleOutlineGeometry(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const rectangle = options.rectangle;
+ const granularity = defaultValue_default(
+ options.granularity,
+ Math_default.RADIANS_PER_DEGREE
+ );
+ const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default);
+ const rotation = defaultValue_default(options.rotation, 0);
+ if (!defined_default(rectangle)) {
+ throw new DeveloperError_default("rectangle is required.");
+ }
+ Rectangle_default.validate(rectangle);
+ if (rectangle.north < rectangle.south) {
+ throw new DeveloperError_default(
+ "options.rectangle.north must be greater than options.rectangle.south"
+ );
+ }
+ const height = defaultValue_default(options.height, 0);
+ const extrudedHeight = defaultValue_default(options.extrudedHeight, height);
+ this._rectangle = Rectangle_default.clone(rectangle);
+ this._granularity = granularity;
+ this._ellipsoid = ellipsoid;
+ this._surfaceHeight = Math.max(height, extrudedHeight);
+ this._rotation = rotation;
+ this._extrudedHeight = Math.min(height, extrudedHeight);
+ this._offsetAttribute = options.offsetAttribute;
+ this._workerName = "createRectangleOutlineGeometry";
+}
+RectangleOutlineGeometry.packedLength = Rectangle_default.packedLength + Ellipsoid_default.packedLength + 5;
+RectangleOutlineGeometry.pack = function(value, array, startingIndex) {
+ if (!defined_default(value)) {
+ throw new DeveloperError_default("value is required");
+ }
+ if (!defined_default(array)) {
+ throw new DeveloperError_default("array is required");
+ }
+ startingIndex = defaultValue_default(startingIndex, 0);
+ Rectangle_default.pack(value._rectangle, array, startingIndex);
+ startingIndex += Rectangle_default.packedLength;
+ Ellipsoid_default.pack(value._ellipsoid, array, startingIndex);
+ startingIndex += Ellipsoid_default.packedLength;
+ array[startingIndex++] = value._granularity;
+ array[startingIndex++] = value._surfaceHeight;
+ array[startingIndex++] = value._rotation;
+ array[startingIndex++] = value._extrudedHeight;
+ array[startingIndex] = defaultValue_default(value._offsetAttribute, -1);
+ return array;
+};
+var scratchRectangle = new Rectangle_default();
+var scratchEllipsoid = Ellipsoid_default.clone(Ellipsoid_default.UNIT_SPHERE);
+var scratchOptions = {
+ rectangle: scratchRectangle,
+ ellipsoid: scratchEllipsoid,
+ granularity: void 0,
+ height: void 0,
+ rotation: void 0,
+ extrudedHeight: void 0,
+ offsetAttribute: void 0
+};
+RectangleOutlineGeometry.unpack = function(array, startingIndex, result) {
+ if (!defined_default(array)) {
+ throw new DeveloperError_default("array is required");
+ }
+ startingIndex = defaultValue_default(startingIndex, 0);
+ const rectangle = Rectangle_default.unpack(array, startingIndex, scratchRectangle);
+ startingIndex += Rectangle_default.packedLength;
+ const ellipsoid = Ellipsoid_default.unpack(array, startingIndex, scratchEllipsoid);
+ startingIndex += Ellipsoid_default.packedLength;
+ const granularity = array[startingIndex++];
+ const height = array[startingIndex++];
+ const rotation = array[startingIndex++];
+ const extrudedHeight = array[startingIndex++];
+ const offsetAttribute = array[startingIndex];
+ if (!defined_default(result)) {
+ scratchOptions.granularity = granularity;
+ scratchOptions.height = height;
+ scratchOptions.rotation = rotation;
+ scratchOptions.extrudedHeight = extrudedHeight;
+ scratchOptions.offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
+ return new RectangleOutlineGeometry(scratchOptions);
+ }
+ result._rectangle = Rectangle_default.clone(rectangle, result._rectangle);
+ result._ellipsoid = Ellipsoid_default.clone(ellipsoid, result._ellipsoid);
+ result._surfaceHeight = height;
+ result._rotation = rotation;
+ result._extrudedHeight = extrudedHeight;
+ result._offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
+ return result;
+};
+var nwScratch = new Cartographic_default();
+RectangleOutlineGeometry.createGeometry = function(rectangleGeometry) {
+ const rectangle = rectangleGeometry._rectangle;
+ const ellipsoid = rectangleGeometry._ellipsoid;
+ const computedOptions = RectangleGeometryLibrary_default.computeOptions(
+ rectangle,
+ rectangleGeometry._granularity,
+ rectangleGeometry._rotation,
+ 0,
+ rectangleScratch,
+ nwScratch
+ );
+ let geometry;
+ let boundingSphere;
+ if (Math_default.equalsEpsilon(
+ rectangle.north,
+ rectangle.south,
+ Math_default.EPSILON10
+ ) || Math_default.equalsEpsilon(
+ rectangle.east,
+ rectangle.west,
+ Math_default.EPSILON10
+ )) {
+ return void 0;
+ }
+ const surfaceHeight = rectangleGeometry._surfaceHeight;
+ const extrudedHeight = rectangleGeometry._extrudedHeight;
+ const extrude = !Math_default.equalsEpsilon(
+ surfaceHeight,
+ extrudedHeight,
+ 0,
+ Math_default.EPSILON2
+ );
+ let offsetValue;
+ if (extrude) {
+ geometry = constructExtrudedRectangle(rectangleGeometry, computedOptions);
+ if (defined_default(rectangleGeometry._offsetAttribute)) {
+ const size = geometry.attributes.position.values.length / 3;
+ let offsetAttribute = new Uint8Array(size);
+ if (rectangleGeometry._offsetAttribute === GeometryOffsetAttribute_default.TOP) {
+ offsetAttribute = offsetAttribute.fill(1, 0, size / 2);
+ } else {
+ offsetValue = rectangleGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
+ offsetAttribute = offsetAttribute.fill(offsetValue);
+ }
+ geometry.attributes.applyOffset = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: offsetAttribute
+ });
+ }
+ const topBS = BoundingSphere_default.fromRectangle3D(
+ rectangle,
+ ellipsoid,
+ surfaceHeight,
+ topBoundingSphere
+ );
+ const bottomBS = BoundingSphere_default.fromRectangle3D(
+ rectangle,
+ ellipsoid,
+ extrudedHeight,
+ bottomBoundingSphere
+ );
+ boundingSphere = BoundingSphere_default.union(topBS, bottomBS);
+ } else {
+ geometry = constructRectangle(rectangleGeometry, computedOptions);
+ geometry.attributes.position.values = PolygonPipeline_default.scaleToGeodeticHeight(
+ geometry.attributes.position.values,
+ surfaceHeight,
+ ellipsoid,
+ false
+ );
+ if (defined_default(rectangleGeometry._offsetAttribute)) {
+ const length = geometry.attributes.position.values.length;
+ offsetValue = rectangleGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
+ const applyOffset = new Uint8Array(length / 3).fill(offsetValue);
+ geometry.attributes.applyOffset = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
+ componentsPerAttribute: 1,
+ values: applyOffset
+ });
+ }
+ boundingSphere = BoundingSphere_default.fromRectangle3D(
+ rectangle,
+ ellipsoid,
+ surfaceHeight
+ );
+ }
+ return new Geometry_default({
+ attributes: geometry.attributes,
+ indices: geometry.indices,
+ primitiveType: PrimitiveType_default.LINES,
+ boundingSphere,
+ offsetAttribute: rectangleGeometry._offsetAttribute
+ });
+};
+var RectangleOutlineGeometry_default = RectangleOutlineGeometry;
+
+// packages/engine/Source/Workers/createRectangleOutlineGeometry.js
+function createRectangleOutlineGeometry(rectangleGeometry, offset) {
+ if (defined_default(offset)) {
+ rectangleGeometry = RectangleOutlineGeometry_default.unpack(
+ rectangleGeometry,
+ offset
+ );
+ }
+ rectangleGeometry._ellipsoid = Ellipsoid_default.clone(rectangleGeometry._ellipsoid);
+ rectangleGeometry._rectangle = Rectangle_default.clone(rectangleGeometry._rectangle);
+ return RectangleOutlineGeometry_default.createGeometry(rectangleGeometry);
+}
+var createRectangleOutlineGeometry_default = createRectangleOutlineGeometry;
+export {
+ createRectangleOutlineGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createSimplePolylineGeometry.js b/public/assets/cesium/Workers/createSimplePolylineGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..9583dc1cf327d1cdf42fa95ca57b252945f7aabc
--- /dev/null
+++ b/public/assets/cesium/Workers/createSimplePolylineGeometry.js
@@ -0,0 +1,398 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ Color_default
+} from "./chunk-HP5XLODI.js";
+import {
+ ArcType_default
+} from "./chunk-XWOUPGUF.js";
+import {
+ PolylinePipeline_default
+} from "./chunk-QN6TBED4.js";
+import "./chunk-C3EQ27WF.js";
+import "./chunk-JSQJDZI4.js";
+import "./chunk-QQOZO7KO.js";
+import "./chunk-EDLRS3AW.js";
+import {
+ IndexDatatype_default
+} from "./chunk-C4WPMOKT.js";
+import {
+ GeometryAttributes_default
+} from "./chunk-X7IQYYHF.js";
+import {
+ GeometryAttribute_default,
+ Geometry_default,
+ PrimitiveType_default
+} from "./chunk-JXVLNVXC.js";
+import {
+ BoundingSphere_default
+} from "./chunk-KHZNBFOH.js";
+import "./chunk-6SQMLVGV.js";
+import {
+ ComponentDatatype_default
+} from "./chunk-XIUSRWL6.js";
+import {
+ Cartesian3_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/SimplePolylineGeometry.js
+function interpolateColors(p0, p1, color0, color1, minDistance, array, offset) {
+ const numPoints = PolylinePipeline_default.numberOfPoints(p0, p1, minDistance);
+ let i;
+ const r0 = color0.red;
+ const g0 = color0.green;
+ const b0 = color0.blue;
+ const a0 = color0.alpha;
+ const r1 = color1.red;
+ const g1 = color1.green;
+ const b1 = color1.blue;
+ const a1 = color1.alpha;
+ if (Color_default.equals(color0, color1)) {
+ for (i = 0; i < numPoints; i++) {
+ array[offset++] = Color_default.floatToByte(r0);
+ array[offset++] = Color_default.floatToByte(g0);
+ array[offset++] = Color_default.floatToByte(b0);
+ array[offset++] = Color_default.floatToByte(a0);
+ }
+ return offset;
+ }
+ const redPerVertex = (r1 - r0) / numPoints;
+ const greenPerVertex = (g1 - g0) / numPoints;
+ const bluePerVertex = (b1 - b0) / numPoints;
+ const alphaPerVertex = (a1 - a0) / numPoints;
+ let index = offset;
+ for (i = 0; i < numPoints; i++) {
+ array[index++] = Color_default.floatToByte(r0 + i * redPerVertex);
+ array[index++] = Color_default.floatToByte(g0 + i * greenPerVertex);
+ array[index++] = Color_default.floatToByte(b0 + i * bluePerVertex);
+ array[index++] = Color_default.floatToByte(a0 + i * alphaPerVertex);
+ }
+ return index;
+}
+function SimplePolylineGeometry(options) {
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
+ const positions = options.positions;
+ const colors = options.colors;
+ const colorsPerVertex = defaultValue_default(options.colorsPerVertex, false);
+ if (!defined_default(positions) || positions.length < 2) {
+ throw new DeveloperError_default("At least two positions are required.");
+ }
+ if (defined_default(colors) && (colorsPerVertex && colors.length < positions.length || !colorsPerVertex && colors.length < positions.length - 1)) {
+ throw new DeveloperError_default("colors has an invalid length.");
+ }
+ this._positions = positions;
+ this._colors = colors;
+ this._colorsPerVertex = colorsPerVertex;
+ this._arcType = defaultValue_default(options.arcType, ArcType_default.GEODESIC);
+ this._granularity = defaultValue_default(
+ options.granularity,
+ Math_default.RADIANS_PER_DEGREE
+ );
+ this._ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default);
+ this._workerName = "createSimplePolylineGeometry";
+ let numComponents = 1 + positions.length * Cartesian3_default.packedLength;
+ numComponents += defined_default(colors) ? 1 + colors.length * Color_default.packedLength : 1;
+ this.packedLength = numComponents + Ellipsoid_default.packedLength + 3;
+}
+SimplePolylineGeometry.pack = function(value, array, startingIndex) {
+ if (!defined_default(value)) {
+ throw new DeveloperError_default("value is required");
+ }
+ if (!defined_default(array)) {
+ throw new DeveloperError_default("array is required");
+ }
+ startingIndex = defaultValue_default(startingIndex, 0);
+ let i;
+ const positions = value._positions;
+ let length = positions.length;
+ array[startingIndex++] = length;
+ for (i = 0; i < length; ++i, startingIndex += Cartesian3_default.packedLength) {
+ Cartesian3_default.pack(positions[i], array, startingIndex);
+ }
+ const colors = value._colors;
+ length = defined_default(colors) ? colors.length : 0;
+ array[startingIndex++] = length;
+ for (i = 0; i < length; ++i, startingIndex += Color_default.packedLength) {
+ Color_default.pack(colors[i], array, startingIndex);
+ }
+ Ellipsoid_default.pack(value._ellipsoid, array, startingIndex);
+ startingIndex += Ellipsoid_default.packedLength;
+ array[startingIndex++] = value._colorsPerVertex ? 1 : 0;
+ array[startingIndex++] = value._arcType;
+ array[startingIndex] = value._granularity;
+ return array;
+};
+SimplePolylineGeometry.unpack = function(array, startingIndex, result) {
+ if (!defined_default(array)) {
+ throw new DeveloperError_default("array is required");
+ }
+ startingIndex = defaultValue_default(startingIndex, 0);
+ let i;
+ let length = array[startingIndex++];
+ const positions = new Array(length);
+ for (i = 0; i < length; ++i, startingIndex += Cartesian3_default.packedLength) {
+ positions[i] = Cartesian3_default.unpack(array, startingIndex);
+ }
+ length = array[startingIndex++];
+ const colors = length > 0 ? new Array(length) : void 0;
+ for (i = 0; i < length; ++i, startingIndex += Color_default.packedLength) {
+ colors[i] = Color_default.unpack(array, startingIndex);
+ }
+ const ellipsoid = Ellipsoid_default.unpack(array, startingIndex);
+ startingIndex += Ellipsoid_default.packedLength;
+ const colorsPerVertex = array[startingIndex++] === 1;
+ const arcType = array[startingIndex++];
+ const granularity = array[startingIndex];
+ if (!defined_default(result)) {
+ return new SimplePolylineGeometry({
+ positions,
+ colors,
+ ellipsoid,
+ colorsPerVertex,
+ arcType,
+ granularity
+ });
+ }
+ result._positions = positions;
+ result._colors = colors;
+ result._ellipsoid = ellipsoid;
+ result._colorsPerVertex = colorsPerVertex;
+ result._arcType = arcType;
+ result._granularity = granularity;
+ return result;
+};
+var scratchArray1 = new Array(2);
+var scratchArray2 = new Array(2);
+var generateArcOptionsScratch = {
+ positions: scratchArray1,
+ height: scratchArray2,
+ ellipsoid: void 0,
+ minDistance: void 0,
+ granularity: void 0
+};
+SimplePolylineGeometry.createGeometry = function(simplePolylineGeometry) {
+ const positions = simplePolylineGeometry._positions;
+ const colors = simplePolylineGeometry._colors;
+ const colorsPerVertex = simplePolylineGeometry._colorsPerVertex;
+ const arcType = simplePolylineGeometry._arcType;
+ const granularity = simplePolylineGeometry._granularity;
+ const ellipsoid = simplePolylineGeometry._ellipsoid;
+ const minDistance = Math_default.chordLength(
+ granularity,
+ ellipsoid.maximumRadius
+ );
+ const perSegmentColors = defined_default(colors) && !colorsPerVertex;
+ let i;
+ const length = positions.length;
+ let positionValues;
+ let numberOfPositions;
+ let colorValues;
+ let color;
+ let offset = 0;
+ if (arcType === ArcType_default.GEODESIC || arcType === ArcType_default.RHUMB) {
+ let subdivisionSize;
+ let numberOfPointsFunction;
+ let generateArcFunction;
+ if (arcType === ArcType_default.GEODESIC) {
+ subdivisionSize = Math_default.chordLength(
+ granularity,
+ ellipsoid.maximumRadius
+ );
+ numberOfPointsFunction = PolylinePipeline_default.numberOfPoints;
+ generateArcFunction = PolylinePipeline_default.generateArc;
+ } else {
+ subdivisionSize = granularity;
+ numberOfPointsFunction = PolylinePipeline_default.numberOfPointsRhumbLine;
+ generateArcFunction = PolylinePipeline_default.generateRhumbArc;
+ }
+ const heights = PolylinePipeline_default.extractHeights(positions, ellipsoid);
+ const generateArcOptions = generateArcOptionsScratch;
+ if (arcType === ArcType_default.GEODESIC) {
+ generateArcOptions.minDistance = minDistance;
+ } else {
+ generateArcOptions.granularity = granularity;
+ }
+ generateArcOptions.ellipsoid = ellipsoid;
+ if (perSegmentColors) {
+ let positionCount = 0;
+ for (i = 0; i < length - 1; i++) {
+ positionCount += numberOfPointsFunction(
+ positions[i],
+ positions[i + 1],
+ subdivisionSize
+ ) + 1;
+ }
+ positionValues = new Float64Array(positionCount * 3);
+ colorValues = new Uint8Array(positionCount * 4);
+ generateArcOptions.positions = scratchArray1;
+ generateArcOptions.height = scratchArray2;
+ let ci = 0;
+ for (i = 0; i < length - 1; ++i) {
+ scratchArray1[0] = positions[i];
+ scratchArray1[1] = positions[i + 1];
+ scratchArray2[0] = heights[i];
+ scratchArray2[1] = heights[i + 1];
+ const pos = generateArcFunction(generateArcOptions);
+ if (defined_default(colors)) {
+ const segLen = pos.length / 3;
+ color = colors[i];
+ for (let k = 0; k < segLen; ++k) {
+ colorValues[ci++] = Color_default.floatToByte(color.red);
+ colorValues[ci++] = Color_default.floatToByte(color.green);
+ colorValues[ci++] = Color_default.floatToByte(color.blue);
+ colorValues[ci++] = Color_default.floatToByte(color.alpha);
+ }
+ }
+ positionValues.set(pos, offset);
+ offset += pos.length;
+ }
+ } else {
+ generateArcOptions.positions = positions;
+ generateArcOptions.height = heights;
+ positionValues = new Float64Array(
+ generateArcFunction(generateArcOptions)
+ );
+ if (defined_default(colors)) {
+ colorValues = new Uint8Array(positionValues.length / 3 * 4);
+ for (i = 0; i < length - 1; ++i) {
+ const p0 = positions[i];
+ const p1 = positions[i + 1];
+ const c0 = colors[i];
+ const c1 = colors[i + 1];
+ offset = interpolateColors(
+ p0,
+ p1,
+ c0,
+ c1,
+ minDistance,
+ colorValues,
+ offset
+ );
+ }
+ const lastColor = colors[length - 1];
+ colorValues[offset++] = Color_default.floatToByte(lastColor.red);
+ colorValues[offset++] = Color_default.floatToByte(lastColor.green);
+ colorValues[offset++] = Color_default.floatToByte(lastColor.blue);
+ colorValues[offset++] = Color_default.floatToByte(lastColor.alpha);
+ }
+ }
+ } else {
+ numberOfPositions = perSegmentColors ? length * 2 - 2 : length;
+ positionValues = new Float64Array(numberOfPositions * 3);
+ colorValues = defined_default(colors) ? new Uint8Array(numberOfPositions * 4) : void 0;
+ let positionIndex = 0;
+ let colorIndex = 0;
+ for (i = 0; i < length; ++i) {
+ const p = positions[i];
+ if (perSegmentColors && i > 0) {
+ Cartesian3_default.pack(p, positionValues, positionIndex);
+ positionIndex += 3;
+ color = colors[i - 1];
+ colorValues[colorIndex++] = Color_default.floatToByte(color.red);
+ colorValues[colorIndex++] = Color_default.floatToByte(color.green);
+ colorValues[colorIndex++] = Color_default.floatToByte(color.blue);
+ colorValues[colorIndex++] = Color_default.floatToByte(color.alpha);
+ }
+ if (perSegmentColors && i === length - 1) {
+ break;
+ }
+ Cartesian3_default.pack(p, positionValues, positionIndex);
+ positionIndex += 3;
+ if (defined_default(colors)) {
+ color = colors[i];
+ colorValues[colorIndex++] = Color_default.floatToByte(color.red);
+ colorValues[colorIndex++] = Color_default.floatToByte(color.green);
+ colorValues[colorIndex++] = Color_default.floatToByte(color.blue);
+ colorValues[colorIndex++] = Color_default.floatToByte(color.alpha);
+ }
+ }
+ }
+ const attributes = new GeometryAttributes_default();
+ attributes.position = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.DOUBLE,
+ componentsPerAttribute: 3,
+ values: positionValues
+ });
+ if (defined_default(colors)) {
+ attributes.color = new GeometryAttribute_default({
+ componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
+ componentsPerAttribute: 4,
+ values: colorValues,
+ normalize: true
+ });
+ }
+ numberOfPositions = positionValues.length / 3;
+ const numberOfIndices = (numberOfPositions - 1) * 2;
+ const indices = IndexDatatype_default.createTypedArray(
+ numberOfPositions,
+ numberOfIndices
+ );
+ let index = 0;
+ for (i = 0; i < numberOfPositions - 1; ++i) {
+ indices[index++] = i;
+ indices[index++] = i + 1;
+ }
+ return new Geometry_default({
+ attributes,
+ indices,
+ primitiveType: PrimitiveType_default.LINES,
+ boundingSphere: BoundingSphere_default.fromPoints(positions)
+ });
+};
+var SimplePolylineGeometry_default = SimplePolylineGeometry;
+
+// packages/engine/Source/Workers/createSimplePolylineGeometry.js
+function createSimplePolylineGeometry(simplePolylineGeometry, offset) {
+ if (defined_default(offset)) {
+ simplePolylineGeometry = SimplePolylineGeometry_default.unpack(
+ simplePolylineGeometry,
+ offset
+ );
+ }
+ simplePolylineGeometry._ellipsoid = Ellipsoid_default.clone(
+ simplePolylineGeometry._ellipsoid
+ );
+ return SimplePolylineGeometry_default.createGeometry(simplePolylineGeometry);
+}
+var createSimplePolylineGeometry_default = createSimplePolylineGeometry;
+export {
+ createSimplePolylineGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createSphereGeometry.js b/public/assets/cesium/Workers/createSphereGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..62aa101eb628cace47f258cf15defe81991d313d
--- /dev/null
+++ b/public/assets/cesium/Workers/createSphereGeometry.js
@@ -0,0 +1,116 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ EllipsoidGeometry_default
+} from "./chunk-IZGUQO6Q.js";
+import "./chunk-GBT7MJ6X.js";
+import {
+ VertexFormat_default
+} from "./chunk-JBSKHTNX.js";
+import "./chunk-C4WPMOKT.js";
+import "./chunk-X7IQYYHF.js";
+import "./chunk-JXVLNVXC.js";
+import "./chunk-KHZNBFOH.js";
+import "./chunk-6SQMLVGV.js";
+import "./chunk-XIUSRWL6.js";
+import {
+ Cartesian3_default
+} from "./chunk-FFLMY4TE.js";
+import "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/SphereGeometry.js
+function SphereGeometry(options) {
+ const radius = defaultValue_default(options.radius, 1);
+ const radii = new Cartesian3_default(radius, radius, radius);
+ const ellipsoidOptions = {
+ radii,
+ stackPartitions: options.stackPartitions,
+ slicePartitions: options.slicePartitions,
+ vertexFormat: options.vertexFormat
+ };
+ this._ellipsoidGeometry = new EllipsoidGeometry_default(ellipsoidOptions);
+ this._workerName = "createSphereGeometry";
+}
+SphereGeometry.packedLength = EllipsoidGeometry_default.packedLength;
+SphereGeometry.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ return EllipsoidGeometry_default.pack(value._ellipsoidGeometry, array, startingIndex);
+};
+var scratchEllipsoidGeometry = new EllipsoidGeometry_default();
+var scratchOptions = {
+ radius: void 0,
+ radii: new Cartesian3_default(),
+ vertexFormat: new VertexFormat_default(),
+ stackPartitions: void 0,
+ slicePartitions: void 0
+};
+SphereGeometry.unpack = function(array, startingIndex, result) {
+ const ellipsoidGeometry = EllipsoidGeometry_default.unpack(
+ array,
+ startingIndex,
+ scratchEllipsoidGeometry
+ );
+ scratchOptions.vertexFormat = VertexFormat_default.clone(
+ ellipsoidGeometry._vertexFormat,
+ scratchOptions.vertexFormat
+ );
+ scratchOptions.stackPartitions = ellipsoidGeometry._stackPartitions;
+ scratchOptions.slicePartitions = ellipsoidGeometry._slicePartitions;
+ if (!defined_default(result)) {
+ scratchOptions.radius = ellipsoidGeometry._radii.x;
+ return new SphereGeometry(scratchOptions);
+ }
+ Cartesian3_default.clone(ellipsoidGeometry._radii, scratchOptions.radii);
+ result._ellipsoidGeometry = new EllipsoidGeometry_default(scratchOptions);
+ return result;
+};
+SphereGeometry.createGeometry = function(sphereGeometry) {
+ return EllipsoidGeometry_default.createGeometry(sphereGeometry._ellipsoidGeometry);
+};
+var SphereGeometry_default = SphereGeometry;
+
+// packages/engine/Source/Workers/createSphereGeometry.js
+function createSphereGeometry(sphereGeometry, offset) {
+ if (defined_default(offset)) {
+ sphereGeometry = SphereGeometry_default.unpack(sphereGeometry, offset);
+ }
+ return SphereGeometry_default.createGeometry(sphereGeometry);
+}
+var createSphereGeometry_default = createSphereGeometry;
+export {
+ createSphereGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createSphereOutlineGeometry.js b/public/assets/cesium/Workers/createSphereOutlineGeometry.js
new file mode 100644
index 0000000000000000000000000000000000000000..0d51a26cf3f4b8a596c62fe2d97f1378f68fda83
--- /dev/null
+++ b/public/assets/cesium/Workers/createSphereOutlineGeometry.js
@@ -0,0 +1,116 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ EllipsoidOutlineGeometry_default
+} from "./chunk-OPP2SKMA.js";
+import "./chunk-GBT7MJ6X.js";
+import "./chunk-C4WPMOKT.js";
+import "./chunk-X7IQYYHF.js";
+import "./chunk-JXVLNVXC.js";
+import "./chunk-KHZNBFOH.js";
+import "./chunk-6SQMLVGV.js";
+import "./chunk-XIUSRWL6.js";
+import {
+ Cartesian3_default
+} from "./chunk-FFLMY4TE.js";
+import "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ Check_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/SphereOutlineGeometry.js
+function SphereOutlineGeometry(options) {
+ const radius = defaultValue_default(options.radius, 1);
+ const radii = new Cartesian3_default(radius, radius, radius);
+ const ellipsoidOptions = {
+ radii,
+ stackPartitions: options.stackPartitions,
+ slicePartitions: options.slicePartitions,
+ subdivisions: options.subdivisions
+ };
+ this._ellipsoidGeometry = new EllipsoidOutlineGeometry_default(ellipsoidOptions);
+ this._workerName = "createSphereOutlineGeometry";
+}
+SphereOutlineGeometry.packedLength = EllipsoidOutlineGeometry_default.packedLength;
+SphereOutlineGeometry.pack = function(value, array, startingIndex) {
+ Check_default.typeOf.object("value", value);
+ return EllipsoidOutlineGeometry_default.pack(
+ value._ellipsoidGeometry,
+ array,
+ startingIndex
+ );
+};
+var scratchEllipsoidGeometry = new EllipsoidOutlineGeometry_default();
+var scratchOptions = {
+ radius: void 0,
+ radii: new Cartesian3_default(),
+ stackPartitions: void 0,
+ slicePartitions: void 0,
+ subdivisions: void 0
+};
+SphereOutlineGeometry.unpack = function(array, startingIndex, result) {
+ const ellipsoidGeometry = EllipsoidOutlineGeometry_default.unpack(
+ array,
+ startingIndex,
+ scratchEllipsoidGeometry
+ );
+ scratchOptions.stackPartitions = ellipsoidGeometry._stackPartitions;
+ scratchOptions.slicePartitions = ellipsoidGeometry._slicePartitions;
+ scratchOptions.subdivisions = ellipsoidGeometry._subdivisions;
+ if (!defined_default(result)) {
+ scratchOptions.radius = ellipsoidGeometry._radii.x;
+ return new SphereOutlineGeometry(scratchOptions);
+ }
+ Cartesian3_default.clone(ellipsoidGeometry._radii, scratchOptions.radii);
+ result._ellipsoidGeometry = new EllipsoidOutlineGeometry_default(scratchOptions);
+ return result;
+};
+SphereOutlineGeometry.createGeometry = function(sphereGeometry) {
+ return EllipsoidOutlineGeometry_default.createGeometry(
+ sphereGeometry._ellipsoidGeometry
+ );
+};
+var SphereOutlineGeometry_default = SphereOutlineGeometry;
+
+// packages/engine/Source/Workers/createSphereOutlineGeometry.js
+function createSphereOutlineGeometry(sphereGeometry, offset) {
+ if (defined_default(offset)) {
+ sphereGeometry = SphereOutlineGeometry_default.unpack(sphereGeometry, offset);
+ }
+ return SphereOutlineGeometry_default.createGeometry(sphereGeometry);
+}
+var createSphereOutlineGeometry_default = createSphereOutlineGeometry;
+export {
+ createSphereOutlineGeometry_default as default
+};
diff --git a/public/assets/cesium/Workers/createTaskProcessorWorker.js b/public/assets/cesium/Workers/createTaskProcessorWorker.js
new file mode 100644
index 0000000000000000000000000000000000000000..700d60f811f9738c2813874198d1100199f9fbf9
--- /dev/null
+++ b/public/assets/cesium/Workers/createTaskProcessorWorker.js
@@ -0,0 +1,32 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ createTaskProcessorWorker_default
+} from "./chunk-Z2QP3CXW.js";
+import "./chunk-YCDZX5LS.js";
+export {
+ createTaskProcessorWorker_default as default
+};
diff --git a/public/assets/cesium/Workers/createVectorTileClampedPolylines.js b/public/assets/cesium/Workers/createVectorTileClampedPolylines.js
new file mode 100644
index 0000000000000000000000000000000000000000..d52520f2ee613b91631007c54d4a69208105e2ee
--- /dev/null
+++ b/public/assets/cesium/Workers/createVectorTileClampedPolylines.js
@@ -0,0 +1,490 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ createTaskProcessorWorker_default
+} from "./chunk-Z2QP3CXW.js";
+import {
+ AttributeCompression_default
+} from "./chunk-LJ2JQHJT.js";
+import {
+ IndexDatatype_default
+} from "./chunk-C4WPMOKT.js";
+import {
+ Rectangle_default,
+ combine_default
+} from "./chunk-6SQMLVGV.js";
+import "./chunk-XIUSRWL6.js";
+import {
+ Cartesian3_default,
+ Cartographic_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import "./chunk-U5HSOKPQ.js";
+import "./chunk-P6TRGU3S.js";
+import "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Workers/createVectorTileClampedPolylines.js
+var MAX_SHORT = 32767;
+var MITER_BREAK = Math.cos(Math_default.toRadians(150));
+var scratchBVCartographic = new Cartographic_default();
+var scratchEncodedPosition = new Cartesian3_default();
+function decodePositions(uBuffer, vBuffer, heightBuffer, rectangle, minimumHeight, maximumHeight, ellipsoid) {
+ const positionsLength = uBuffer.length;
+ const decodedPositions = new Float64Array(positionsLength * 3);
+ for (let i = 0; i < positionsLength; ++i) {
+ const u = uBuffer[i];
+ const v = vBuffer[i];
+ const h = heightBuffer[i];
+ const lon = Math_default.lerp(rectangle.west, rectangle.east, u / MAX_SHORT);
+ const lat = Math_default.lerp(
+ rectangle.south,
+ rectangle.north,
+ v / MAX_SHORT
+ );
+ const alt = Math_default.lerp(minimumHeight, maximumHeight, h / MAX_SHORT);
+ const cartographic = Cartographic_default.fromRadians(
+ lon,
+ lat,
+ alt,
+ scratchBVCartographic
+ );
+ const decodedPosition = ellipsoid.cartographicToCartesian(
+ cartographic,
+ scratchEncodedPosition
+ );
+ Cartesian3_default.pack(decodedPosition, decodedPositions, i * 3);
+ }
+ return decodedPositions;
+}
+function getPositionOffsets(counts) {
+ const countsLength = counts.length;
+ const positionOffsets = new Uint32Array(countsLength + 1);
+ let offset = 0;
+ for (let i = 0; i < countsLength; ++i) {
+ positionOffsets[i] = offset;
+ offset += counts[i];
+ }
+ positionOffsets[countsLength] = offset;
+ return positionOffsets;
+}
+var previousCompressedCartographicScratch = new Cartographic_default();
+var currentCompressedCartographicScratch = new Cartographic_default();
+function removeDuplicates(uBuffer, vBuffer, heightBuffer, counts) {
+ const countsLength = counts.length;
+ const positionsLength = uBuffer.length;
+ const markRemoval = new Uint8Array(positionsLength);
+ const previous = previousCompressedCartographicScratch;
+ const current = currentCompressedCartographicScratch;
+ let offset = 0;
+ for (let i = 0; i < countsLength; i++) {
+ const count = counts[i];
+ let updatedCount = count;
+ for (let j = 1; j < count; j++) {
+ const index = offset + j;
+ const previousIndex = index - 1;
+ current.longitude = uBuffer[index];
+ current.latitude = vBuffer[index];
+ previous.longitude = uBuffer[previousIndex];
+ previous.latitude = vBuffer[previousIndex];
+ if (Cartographic_default.equals(current, previous)) {
+ updatedCount--;
+ markRemoval[previousIndex] = 1;
+ }
+ }
+ counts[i] = updatedCount;
+ offset += count;
+ }
+ let nextAvailableIndex = 0;
+ for (let k = 0; k < positionsLength; k++) {
+ if (markRemoval[k] !== 1) {
+ uBuffer[nextAvailableIndex] = uBuffer[k];
+ vBuffer[nextAvailableIndex] = vBuffer[k];
+ heightBuffer[nextAvailableIndex] = heightBuffer[k];
+ nextAvailableIndex++;
+ }
+ }
+}
+function VertexAttributesAndIndices(volumesCount) {
+ const vertexCount = volumesCount * 8;
+ const vec3Floats = vertexCount * 3;
+ const vec4Floats = vertexCount * 4;
+ this.startEllipsoidNormals = new Float32Array(vec3Floats);
+ this.endEllipsoidNormals = new Float32Array(vec3Floats);
+ this.startPositionAndHeights = new Float32Array(vec4Floats);
+ this.startFaceNormalAndVertexCornerIds = new Float32Array(vec4Floats);
+ this.endPositionAndHeights = new Float32Array(vec4Floats);
+ this.endFaceNormalAndHalfWidths = new Float32Array(vec4Floats);
+ this.vertexBatchIds = new Uint16Array(vertexCount);
+ this.indices = IndexDatatype_default.createTypedArray(vertexCount, 36 * volumesCount);
+ this.vec3Offset = 0;
+ this.vec4Offset = 0;
+ this.batchIdOffset = 0;
+ this.indexOffset = 0;
+ this.volumeStartIndex = 0;
+}
+var towardCurrScratch = new Cartesian3_default();
+var towardNextScratch = new Cartesian3_default();
+function computeMiteredNormal(previousPosition, position, nextPosition, ellipsoidSurfaceNormal, result) {
+ const towardNext = Cartesian3_default.subtract(
+ nextPosition,
+ position,
+ towardNextScratch
+ );
+ let towardCurr = Cartesian3_default.subtract(
+ position,
+ previousPosition,
+ towardCurrScratch
+ );
+ Cartesian3_default.normalize(towardNext, towardNext);
+ Cartesian3_default.normalize(towardCurr, towardCurr);
+ if (Cartesian3_default.dot(towardNext, towardCurr) < MITER_BREAK) {
+ towardCurr = Cartesian3_default.multiplyByScalar(
+ towardCurr,
+ -1,
+ towardCurrScratch
+ );
+ }
+ Cartesian3_default.add(towardNext, towardCurr, result);
+ if (Cartesian3_default.equals(result, Cartesian3_default.ZERO)) {
+ result = Cartesian3_default.subtract(previousPosition, position);
+ }
+ Cartesian3_default.cross(result, ellipsoidSurfaceNormal, result);
+ Cartesian3_default.cross(ellipsoidSurfaceNormal, result, result);
+ Cartesian3_default.normalize(result, result);
+ return result;
+}
+var REFERENCE_INDICES = [
+ 0,
+ 2,
+ 6,
+ 0,
+ 6,
+ 4,
+ // right
+ 0,
+ 1,
+ 3,
+ 0,
+ 3,
+ 2,
+ // start face
+ 0,
+ 4,
+ 5,
+ 0,
+ 5,
+ 1,
+ // bottom
+ 5,
+ 3,
+ 1,
+ 5,
+ 7,
+ 3,
+ // left
+ 7,
+ 5,
+ 4,
+ 7,
+ 4,
+ 6,
+ // end face
+ 7,
+ 6,
+ 2,
+ 7,
+ 2,
+ 3
+ // top
+];
+var REFERENCE_INDICES_LENGTH = REFERENCE_INDICES.length;
+var positionScratch = new Cartesian3_default();
+var scratchStartEllipsoidNormal = new Cartesian3_default();
+var scratchStartFaceNormal = new Cartesian3_default();
+var scratchEndEllipsoidNormal = new Cartesian3_default();
+var scratchEndFaceNormal = new Cartesian3_default();
+VertexAttributesAndIndices.prototype.addVolume = function(preStartRTC, startRTC, endRTC, postEndRTC, startHeight, endHeight, halfWidth, batchId, center, ellipsoid) {
+ let position = Cartesian3_default.add(startRTC, center, positionScratch);
+ const startEllipsoidNormal = ellipsoid.geodeticSurfaceNormal(
+ position,
+ scratchStartEllipsoidNormal
+ );
+ position = Cartesian3_default.add(endRTC, center, positionScratch);
+ const endEllipsoidNormal = ellipsoid.geodeticSurfaceNormal(
+ position,
+ scratchEndEllipsoidNormal
+ );
+ const startFaceNormal = computeMiteredNormal(
+ preStartRTC,
+ startRTC,
+ endRTC,
+ startEllipsoidNormal,
+ scratchStartFaceNormal
+ );
+ const endFaceNormal = computeMiteredNormal(
+ postEndRTC,
+ endRTC,
+ startRTC,
+ endEllipsoidNormal,
+ scratchEndFaceNormal
+ );
+ const startEllipsoidNormals = this.startEllipsoidNormals;
+ const endEllipsoidNormals = this.endEllipsoidNormals;
+ const startPositionAndHeights = this.startPositionAndHeights;
+ const startFaceNormalAndVertexCornerIds = this.startFaceNormalAndVertexCornerIds;
+ const endPositionAndHeights = this.endPositionAndHeights;
+ const endFaceNormalAndHalfWidths = this.endFaceNormalAndHalfWidths;
+ const vertexBatchIds = this.vertexBatchIds;
+ let batchIdOffset = this.batchIdOffset;
+ let vec3Offset = this.vec3Offset;
+ let vec4Offset = this.vec4Offset;
+ let i;
+ for (i = 0; i < 8; i++) {
+ Cartesian3_default.pack(startEllipsoidNormal, startEllipsoidNormals, vec3Offset);
+ Cartesian3_default.pack(endEllipsoidNormal, endEllipsoidNormals, vec3Offset);
+ Cartesian3_default.pack(startRTC, startPositionAndHeights, vec4Offset);
+ startPositionAndHeights[vec4Offset + 3] = startHeight;
+ Cartesian3_default.pack(endRTC, endPositionAndHeights, vec4Offset);
+ endPositionAndHeights[vec4Offset + 3] = endHeight;
+ Cartesian3_default.pack(
+ startFaceNormal,
+ startFaceNormalAndVertexCornerIds,
+ vec4Offset
+ );
+ startFaceNormalAndVertexCornerIds[vec4Offset + 3] = i;
+ Cartesian3_default.pack(endFaceNormal, endFaceNormalAndHalfWidths, vec4Offset);
+ endFaceNormalAndHalfWidths[vec4Offset + 3] = halfWidth;
+ vertexBatchIds[batchIdOffset++] = batchId;
+ vec3Offset += 3;
+ vec4Offset += 4;
+ }
+ this.batchIdOffset = batchIdOffset;
+ this.vec3Offset = vec3Offset;
+ this.vec4Offset = vec4Offset;
+ const indices = this.indices;
+ const volumeStartIndex = this.volumeStartIndex;
+ const indexOffset = this.indexOffset;
+ for (i = 0; i < REFERENCE_INDICES_LENGTH; i++) {
+ indices[indexOffset + i] = REFERENCE_INDICES[i] + volumeStartIndex;
+ }
+ this.volumeStartIndex += 8;
+ this.indexOffset += REFERENCE_INDICES_LENGTH;
+};
+var scratchRectangle = new Rectangle_default();
+var scratchEllipsoid = new Ellipsoid_default();
+var scratchCenter = new Cartesian3_default();
+var scratchPrev = new Cartesian3_default();
+var scratchP0 = new Cartesian3_default();
+var scratchP1 = new Cartesian3_default();
+var scratchNext = new Cartesian3_default();
+function createVectorTileClampedPolylines(parameters, transferableObjects) {
+ const encodedPositions = new Uint16Array(parameters.positions);
+ const widths = new Uint16Array(parameters.widths);
+ const counts = new Uint32Array(parameters.counts);
+ const batchIds = new Uint16Array(parameters.batchIds);
+ const rectangle = scratchRectangle;
+ const ellipsoid = scratchEllipsoid;
+ const center = scratchCenter;
+ const packedBuffer = new Float64Array(parameters.packedBuffer);
+ let offset = 0;
+ const minimumHeight = packedBuffer[offset++];
+ const maximumHeight = packedBuffer[offset++];
+ Rectangle_default.unpack(packedBuffer, offset, rectangle);
+ offset += Rectangle_default.packedLength;
+ Ellipsoid_default.unpack(packedBuffer, offset, ellipsoid);
+ offset += Ellipsoid_default.packedLength;
+ Cartesian3_default.unpack(packedBuffer, offset, center);
+ let i;
+ let positionsLength = encodedPositions.length / 3;
+ const uBuffer = encodedPositions.subarray(0, positionsLength);
+ const vBuffer = encodedPositions.subarray(
+ positionsLength,
+ 2 * positionsLength
+ );
+ const heightBuffer = encodedPositions.subarray(
+ 2 * positionsLength,
+ 3 * positionsLength
+ );
+ AttributeCompression_default.zigZagDeltaDecode(uBuffer, vBuffer, heightBuffer);
+ removeDuplicates(uBuffer, vBuffer, heightBuffer, counts);
+ const countsLength = counts.length;
+ let volumesCount = 0;
+ for (i = 0; i < countsLength; i++) {
+ const polylinePositionCount = counts[i];
+ volumesCount += polylinePositionCount - 1;
+ }
+ const attribsAndIndices = new VertexAttributesAndIndices(volumesCount);
+ const positions = decodePositions(
+ uBuffer,
+ vBuffer,
+ heightBuffer,
+ rectangle,
+ minimumHeight,
+ maximumHeight,
+ ellipsoid,
+ center
+ );
+ positionsLength = uBuffer.length;
+ const positionsRTC = new Float32Array(positionsLength * 3);
+ for (i = 0; i < positionsLength; ++i) {
+ positionsRTC[i * 3] = positions[i * 3] - center.x;
+ positionsRTC[i * 3 + 1] = positions[i * 3 + 1] - center.y;
+ positionsRTC[i * 3 + 2] = positions[i * 3 + 2] - center.z;
+ }
+ let currentPositionIndex = 0;
+ let currentHeightIndex = 0;
+ for (i = 0; i < countsLength; i++) {
+ const polylineVolumeCount = counts[i] - 1;
+ const halfWidth = widths[i] * 0.5;
+ const batchId = batchIds[i];
+ const volumeFirstPositionIndex = currentPositionIndex;
+ for (let j = 0; j < polylineVolumeCount; j++) {
+ const volumeStart = Cartesian3_default.unpack(
+ positionsRTC,
+ currentPositionIndex,
+ scratchP0
+ );
+ const volumeEnd = Cartesian3_default.unpack(
+ positionsRTC,
+ currentPositionIndex + 3,
+ scratchP1
+ );
+ let startHeight = heightBuffer[currentHeightIndex];
+ let endHeight = heightBuffer[currentHeightIndex + 1];
+ startHeight = Math_default.lerp(
+ minimumHeight,
+ maximumHeight,
+ startHeight / MAX_SHORT
+ );
+ endHeight = Math_default.lerp(
+ minimumHeight,
+ maximumHeight,
+ endHeight / MAX_SHORT
+ );
+ currentHeightIndex++;
+ let preStart = scratchPrev;
+ let postEnd = scratchNext;
+ if (j === 0) {
+ const finalPositionIndex = volumeFirstPositionIndex + polylineVolumeCount * 3;
+ const finalPosition = Cartesian3_default.unpack(
+ positionsRTC,
+ finalPositionIndex,
+ scratchPrev
+ );
+ if (Cartesian3_default.equals(finalPosition, volumeStart)) {
+ Cartesian3_default.unpack(positionsRTC, finalPositionIndex - 3, preStart);
+ } else {
+ const offsetPastStart = Cartesian3_default.subtract(
+ volumeStart,
+ volumeEnd,
+ scratchPrev
+ );
+ preStart = Cartesian3_default.add(offsetPastStart, volumeStart, scratchPrev);
+ }
+ } else {
+ Cartesian3_default.unpack(positionsRTC, currentPositionIndex - 3, preStart);
+ }
+ if (j === polylineVolumeCount - 1) {
+ const firstPosition = Cartesian3_default.unpack(
+ positionsRTC,
+ volumeFirstPositionIndex,
+ scratchNext
+ );
+ if (Cartesian3_default.equals(firstPosition, volumeEnd)) {
+ Cartesian3_default.unpack(
+ positionsRTC,
+ volumeFirstPositionIndex + 3,
+ postEnd
+ );
+ } else {
+ const offsetPastEnd = Cartesian3_default.subtract(
+ volumeEnd,
+ volumeStart,
+ scratchNext
+ );
+ postEnd = Cartesian3_default.add(offsetPastEnd, volumeEnd, scratchNext);
+ }
+ } else {
+ Cartesian3_default.unpack(positionsRTC, currentPositionIndex + 6, postEnd);
+ }
+ attribsAndIndices.addVolume(
+ preStart,
+ volumeStart,
+ volumeEnd,
+ postEnd,
+ startHeight,
+ endHeight,
+ halfWidth,
+ batchId,
+ center,
+ ellipsoid
+ );
+ currentPositionIndex += 3;
+ }
+ currentPositionIndex += 3;
+ currentHeightIndex++;
+ }
+ const indices = attribsAndIndices.indices;
+ transferableObjects.push(attribsAndIndices.startEllipsoidNormals.buffer);
+ transferableObjects.push(attribsAndIndices.endEllipsoidNormals.buffer);
+ transferableObjects.push(attribsAndIndices.startPositionAndHeights.buffer);
+ transferableObjects.push(
+ attribsAndIndices.startFaceNormalAndVertexCornerIds.buffer
+ );
+ transferableObjects.push(attribsAndIndices.endPositionAndHeights.buffer);
+ transferableObjects.push(attribsAndIndices.endFaceNormalAndHalfWidths.buffer);
+ transferableObjects.push(attribsAndIndices.vertexBatchIds.buffer);
+ transferableObjects.push(indices.buffer);
+ let results = {
+ indexDatatype: indices.BYTES_PER_ELEMENT === 2 ? IndexDatatype_default.UNSIGNED_SHORT : IndexDatatype_default.UNSIGNED_INT,
+ startEllipsoidNormals: attribsAndIndices.startEllipsoidNormals.buffer,
+ endEllipsoidNormals: attribsAndIndices.endEllipsoidNormals.buffer,
+ startPositionAndHeights: attribsAndIndices.startPositionAndHeights.buffer,
+ startFaceNormalAndVertexCornerIds: attribsAndIndices.startFaceNormalAndVertexCornerIds.buffer,
+ endPositionAndHeights: attribsAndIndices.endPositionAndHeights.buffer,
+ endFaceNormalAndHalfWidths: attribsAndIndices.endFaceNormalAndHalfWidths.buffer,
+ vertexBatchIds: attribsAndIndices.vertexBatchIds.buffer,
+ indices: indices.buffer
+ };
+ if (parameters.keepDecodedPositions) {
+ const positionOffsets = getPositionOffsets(counts);
+ transferableObjects.push(positions.buffer, positionOffsets.buffer);
+ results = combine_default(results, {
+ decodedPositions: positions.buffer,
+ decodedPositionOffsets: positionOffsets.buffer
+ });
+ }
+ return results;
+}
+var createVectorTileClampedPolylines_default = createTaskProcessorWorker_default(createVectorTileClampedPolylines);
+export {
+ createVectorTileClampedPolylines_default as default
+};
diff --git a/public/assets/cesium/Workers/createVectorTileGeometries.js b/public/assets/cesium/Workers/createVectorTileGeometries.js
new file mode 100644
index 0000000000000000000000000000000000000000..adc7b9f4371c3f0813ef0e40c74a7d8bdf9f3161
--- /dev/null
+++ b/public/assets/cesium/Workers/createVectorTileGeometries.js
@@ -0,0 +1,385 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ Color_default
+} from "./chunk-HP5XLODI.js";
+import {
+ CylinderGeometry_default
+} from "./chunk-L5GODJAR.js";
+import "./chunk-O72GZTSE.js";
+import {
+ EllipsoidGeometry_default
+} from "./chunk-IZGUQO6Q.js";
+import {
+ createTaskProcessorWorker_default
+} from "./chunk-Z2QP3CXW.js";
+import {
+ BoxGeometry_default
+} from "./chunk-HJMNR3GC.js";
+import "./chunk-GBT7MJ6X.js";
+import "./chunk-JBSKHTNX.js";
+import {
+ IndexDatatype_default
+} from "./chunk-C4WPMOKT.js";
+import "./chunk-X7IQYYHF.js";
+import "./chunk-JXVLNVXC.js";
+import {
+ BoundingSphere_default
+} from "./chunk-KHZNBFOH.js";
+import {
+ Matrix4_default
+} from "./chunk-6SQMLVGV.js";
+import "./chunk-XIUSRWL6.js";
+import {
+ Cartesian3_default
+} from "./chunk-FFLMY4TE.js";
+import "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import "./chunk-U5HSOKPQ.js";
+import "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Scene/Vector3DTileBatch.js
+function Vector3DTileBatch(options) {
+ this.offset = options.offset;
+ this.count = options.count;
+ this.color = options.color;
+ this.batchIds = options.batchIds;
+}
+var Vector3DTileBatch_default = Vector3DTileBatch;
+
+// packages/engine/Source/Workers/createVectorTileGeometries.js
+var scratchCartesian = new Cartesian3_default();
+var packedBoxLength = Matrix4_default.packedLength + Cartesian3_default.packedLength;
+var packedCylinderLength = Matrix4_default.packedLength + 2;
+var packedEllipsoidLength = Matrix4_default.packedLength + Cartesian3_default.packedLength;
+var packedSphereLength = Cartesian3_default.packedLength + 1;
+var scratchModelMatrixAndBV = {
+ modelMatrix: new Matrix4_default(),
+ boundingVolume: new BoundingSphere_default()
+};
+function boxModelMatrixAndBoundingVolume(boxes, index) {
+ let boxIndex = index * packedBoxLength;
+ const dimensions = Cartesian3_default.unpack(boxes, boxIndex, scratchCartesian);
+ boxIndex += Cartesian3_default.packedLength;
+ const boxModelMatrix = Matrix4_default.unpack(
+ boxes,
+ boxIndex,
+ scratchModelMatrixAndBV.modelMatrix
+ );
+ Matrix4_default.multiplyByScale(boxModelMatrix, dimensions, boxModelMatrix);
+ const boundingVolume = scratchModelMatrixAndBV.boundingVolume;
+ Cartesian3_default.clone(Cartesian3_default.ZERO, boundingVolume.center);
+ boundingVolume.radius = Math.sqrt(3);
+ return scratchModelMatrixAndBV;
+}
+function cylinderModelMatrixAndBoundingVolume(cylinders, index) {
+ let cylinderIndex = index * packedCylinderLength;
+ const cylinderRadius = cylinders[cylinderIndex++];
+ const length = cylinders[cylinderIndex++];
+ const scale = Cartesian3_default.fromElements(
+ cylinderRadius,
+ cylinderRadius,
+ length,
+ scratchCartesian
+ );
+ const cylinderModelMatrix = Matrix4_default.unpack(
+ cylinders,
+ cylinderIndex,
+ scratchModelMatrixAndBV.modelMatrix
+ );
+ Matrix4_default.multiplyByScale(cylinderModelMatrix, scale, cylinderModelMatrix);
+ const boundingVolume = scratchModelMatrixAndBV.boundingVolume;
+ Cartesian3_default.clone(Cartesian3_default.ZERO, boundingVolume.center);
+ boundingVolume.radius = Math.sqrt(2);
+ return scratchModelMatrixAndBV;
+}
+function ellipsoidModelMatrixAndBoundingVolume(ellipsoids, index) {
+ let ellipsoidIndex = index * packedEllipsoidLength;
+ const radii = Cartesian3_default.unpack(ellipsoids, ellipsoidIndex, scratchCartesian);
+ ellipsoidIndex += Cartesian3_default.packedLength;
+ const ellipsoidModelMatrix = Matrix4_default.unpack(
+ ellipsoids,
+ ellipsoidIndex,
+ scratchModelMatrixAndBV.modelMatrix
+ );
+ Matrix4_default.multiplyByScale(ellipsoidModelMatrix, radii, ellipsoidModelMatrix);
+ const boundingVolume = scratchModelMatrixAndBV.boundingVolume;
+ Cartesian3_default.clone(Cartesian3_default.ZERO, boundingVolume.center);
+ boundingVolume.radius = 1;
+ return scratchModelMatrixAndBV;
+}
+function sphereModelMatrixAndBoundingVolume(spheres, index) {
+ let sphereIndex = index * packedSphereLength;
+ const sphereRadius = spheres[sphereIndex++];
+ const sphereTranslation = Cartesian3_default.unpack(
+ spheres,
+ sphereIndex,
+ scratchCartesian
+ );
+ const sphereModelMatrix = Matrix4_default.fromTranslation(
+ sphereTranslation,
+ scratchModelMatrixAndBV.modelMatrix
+ );
+ Matrix4_default.multiplyByUniformScale(
+ sphereModelMatrix,
+ sphereRadius,
+ sphereModelMatrix
+ );
+ const boundingVolume = scratchModelMatrixAndBV.boundingVolume;
+ Cartesian3_default.clone(Cartesian3_default.ZERO, boundingVolume.center);
+ boundingVolume.radius = 1;
+ return scratchModelMatrixAndBV;
+}
+var scratchPosition = new Cartesian3_default();
+function createPrimitive(options, primitive, primitiveBatchIds, geometry, getModelMatrixAndBoundingVolume) {
+ if (!defined_default(primitive)) {
+ return;
+ }
+ const numberOfPrimitives = primitiveBatchIds.length;
+ const geometryPositions = geometry.attributes.position.values;
+ const geometryIndices = geometry.indices;
+ const positions = options.positions;
+ const vertexBatchIds = options.vertexBatchIds;
+ const indices = options.indices;
+ const batchIds = options.batchIds;
+ const batchTableColors = options.batchTableColors;
+ const batchedIndices = options.batchedIndices;
+ const indexOffsets = options.indexOffsets;
+ const indexCounts = options.indexCounts;
+ const boundingVolumes = options.boundingVolumes;
+ const modelMatrix = options.modelMatrix;
+ const center = options.center;
+ let positionOffset = options.positionOffset;
+ let batchIdIndex = options.batchIdIndex;
+ let indexOffset = options.indexOffset;
+ const batchedIndicesOffset = options.batchedIndicesOffset;
+ for (let i = 0; i < numberOfPrimitives; ++i) {
+ const primitiveModelMatrixAndBV = getModelMatrixAndBoundingVolume(
+ primitive,
+ i
+ );
+ const primitiveModelMatrix = primitiveModelMatrixAndBV.modelMatrix;
+ Matrix4_default.multiply(modelMatrix, primitiveModelMatrix, primitiveModelMatrix);
+ const batchId = primitiveBatchIds[i];
+ const positionsLength = geometryPositions.length;
+ for (let j = 0; j < positionsLength; j += 3) {
+ const position = Cartesian3_default.unpack(geometryPositions, j, scratchPosition);
+ Matrix4_default.multiplyByPoint(primitiveModelMatrix, position, position);
+ Cartesian3_default.subtract(position, center, position);
+ Cartesian3_default.pack(position, positions, positionOffset * 3 + j);
+ vertexBatchIds[batchIdIndex++] = batchId;
+ }
+ const indicesLength = geometryIndices.length;
+ for (let k = 0; k < indicesLength; ++k) {
+ indices[indexOffset + k] = geometryIndices[k] + positionOffset;
+ }
+ const offset = i + batchedIndicesOffset;
+ batchedIndices[offset] = new Vector3DTileBatch_default({
+ offset: indexOffset,
+ count: indicesLength,
+ color: Color_default.fromRgba(batchTableColors[batchId]),
+ batchIds: [batchId]
+ });
+ batchIds[offset] = batchId;
+ indexOffsets[offset] = indexOffset;
+ indexCounts[offset] = indicesLength;
+ boundingVolumes[offset] = BoundingSphere_default.transform(
+ primitiveModelMatrixAndBV.boundingVolume,
+ primitiveModelMatrix
+ );
+ positionOffset += positionsLength / 3;
+ indexOffset += indicesLength;
+ }
+ options.positionOffset = positionOffset;
+ options.batchIdIndex = batchIdIndex;
+ options.indexOffset = indexOffset;
+ options.batchedIndicesOffset += numberOfPrimitives;
+}
+var scratchCenter = new Cartesian3_default();
+var scratchMatrix4 = new Matrix4_default();
+function unpackBuffer(buffer) {
+ const packedBuffer = new Float64Array(buffer);
+ let offset = 0;
+ Cartesian3_default.unpack(packedBuffer, offset, scratchCenter);
+ offset += Cartesian3_default.packedLength;
+ Matrix4_default.unpack(packedBuffer, offset, scratchMatrix4);
+}
+function packedBatchedIndicesLength(batchedIndices) {
+ const length = batchedIndices.length;
+ let count = 0;
+ for (let i = 0; i < length; ++i) {
+ count += Color_default.packedLength + 3 + batchedIndices[i].batchIds.length;
+ }
+ return count;
+}
+function packBuffer(indicesBytesPerElement, batchedIndices, boundingVolumes) {
+ const numBVs = boundingVolumes.length;
+ const length = 1 + 1 + numBVs * BoundingSphere_default.packedLength + 1 + packedBatchedIndicesLength(batchedIndices);
+ const packedBuffer = new Float64Array(length);
+ let offset = 0;
+ packedBuffer[offset++] = indicesBytesPerElement;
+ packedBuffer[offset++] = numBVs;
+ for (let i = 0; i < numBVs; ++i) {
+ BoundingSphere_default.pack(boundingVolumes[i], packedBuffer, offset);
+ offset += BoundingSphere_default.packedLength;
+ }
+ const indicesLength = batchedIndices.length;
+ packedBuffer[offset++] = indicesLength;
+ for (let j = 0; j < indicesLength; ++j) {
+ const batchedIndex = batchedIndices[j];
+ Color_default.pack(batchedIndex.color, packedBuffer, offset);
+ offset += Color_default.packedLength;
+ packedBuffer[offset++] = batchedIndex.offset;
+ packedBuffer[offset++] = batchedIndex.count;
+ const batchIds = batchedIndex.batchIds;
+ const batchIdsLength = batchIds.length;
+ packedBuffer[offset++] = batchIdsLength;
+ for (let k = 0; k < batchIdsLength; ++k) {
+ packedBuffer[offset++] = batchIds[k];
+ }
+ }
+ return packedBuffer;
+}
+function createVectorTileGeometries(parameters, transferableObjects) {
+ const boxes = defined_default(parameters.boxes) ? new Float32Array(parameters.boxes) : void 0;
+ const boxBatchIds = defined_default(parameters.boxBatchIds) ? new Uint16Array(parameters.boxBatchIds) : void 0;
+ const cylinders = defined_default(parameters.cylinders) ? new Float32Array(parameters.cylinders) : void 0;
+ const cylinderBatchIds = defined_default(parameters.cylinderBatchIds) ? new Uint16Array(parameters.cylinderBatchIds) : void 0;
+ const ellipsoids = defined_default(parameters.ellipsoids) ? new Float32Array(parameters.ellipsoids) : void 0;
+ const ellipsoidBatchIds = defined_default(parameters.ellipsoidBatchIds) ? new Uint16Array(parameters.ellipsoidBatchIds) : void 0;
+ const spheres = defined_default(parameters.spheres) ? new Float32Array(parameters.spheres) : void 0;
+ const sphereBatchIds = defined_default(parameters.sphereBatchIds) ? new Uint16Array(parameters.sphereBatchIds) : void 0;
+ const numberOfBoxes = defined_default(boxes) ? boxBatchIds.length : 0;
+ const numberOfCylinders = defined_default(cylinders) ? cylinderBatchIds.length : 0;
+ const numberOfEllipsoids = defined_default(ellipsoids) ? ellipsoidBatchIds.length : 0;
+ const numberOfSpheres = defined_default(spheres) ? sphereBatchIds.length : 0;
+ const boxGeometry = BoxGeometry_default.getUnitBox();
+ const cylinderGeometry = CylinderGeometry_default.getUnitCylinder();
+ const ellipsoidGeometry = EllipsoidGeometry_default.getUnitEllipsoid();
+ const boxPositions = boxGeometry.attributes.position.values;
+ const cylinderPositions = cylinderGeometry.attributes.position.values;
+ const ellipsoidPositions = ellipsoidGeometry.attributes.position.values;
+ let numberOfPositions = boxPositions.length * numberOfBoxes;
+ numberOfPositions += cylinderPositions.length * numberOfCylinders;
+ numberOfPositions += ellipsoidPositions.length * (numberOfEllipsoids + numberOfSpheres);
+ const boxIndices = boxGeometry.indices;
+ const cylinderIndices = cylinderGeometry.indices;
+ const ellipsoidIndices = ellipsoidGeometry.indices;
+ let numberOfIndices = boxIndices.length * numberOfBoxes;
+ numberOfIndices += cylinderIndices.length * numberOfCylinders;
+ numberOfIndices += ellipsoidIndices.length * (numberOfEllipsoids + numberOfSpheres);
+ const positions = new Float32Array(numberOfPositions);
+ const vertexBatchIds = new Uint16Array(numberOfPositions / 3);
+ const indices = IndexDatatype_default.createTypedArray(
+ numberOfPositions / 3,
+ numberOfIndices
+ );
+ const numberOfGeometries = numberOfBoxes + numberOfCylinders + numberOfEllipsoids + numberOfSpheres;
+ const batchIds = new Uint16Array(numberOfGeometries);
+ const batchedIndices = new Array(numberOfGeometries);
+ const indexOffsets = new Uint32Array(numberOfGeometries);
+ const indexCounts = new Uint32Array(numberOfGeometries);
+ const boundingVolumes = new Array(numberOfGeometries);
+ unpackBuffer(parameters.packedBuffer);
+ const options = {
+ batchTableColors: new Uint32Array(parameters.batchTableColors),
+ positions,
+ vertexBatchIds,
+ indices,
+ batchIds,
+ batchedIndices,
+ indexOffsets,
+ indexCounts,
+ boundingVolumes,
+ positionOffset: 0,
+ batchIdIndex: 0,
+ indexOffset: 0,
+ batchedIndicesOffset: 0,
+ modelMatrix: scratchMatrix4,
+ center: scratchCenter
+ };
+ createPrimitive(
+ options,
+ boxes,
+ boxBatchIds,
+ boxGeometry,
+ boxModelMatrixAndBoundingVolume
+ );
+ createPrimitive(
+ options,
+ cylinders,
+ cylinderBatchIds,
+ cylinderGeometry,
+ cylinderModelMatrixAndBoundingVolume
+ );
+ createPrimitive(
+ options,
+ ellipsoids,
+ ellipsoidBatchIds,
+ ellipsoidGeometry,
+ ellipsoidModelMatrixAndBoundingVolume
+ );
+ createPrimitive(
+ options,
+ spheres,
+ sphereBatchIds,
+ ellipsoidGeometry,
+ sphereModelMatrixAndBoundingVolume
+ );
+ const packedBuffer = packBuffer(
+ indices.BYTES_PER_ELEMENT,
+ batchedIndices,
+ boundingVolumes
+ );
+ transferableObjects.push(
+ positions.buffer,
+ vertexBatchIds.buffer,
+ indices.buffer
+ );
+ transferableObjects.push(
+ batchIds.buffer,
+ indexOffsets.buffer,
+ indexCounts.buffer
+ );
+ transferableObjects.push(packedBuffer.buffer);
+ return {
+ positions: positions.buffer,
+ vertexBatchIds: vertexBatchIds.buffer,
+ indices: indices.buffer,
+ indexOffsets: indexOffsets.buffer,
+ indexCounts: indexCounts.buffer,
+ batchIds: batchIds.buffer,
+ packedBuffer: packedBuffer.buffer
+ };
+}
+var createVectorTileGeometries_default = createTaskProcessorWorker_default(createVectorTileGeometries);
+export {
+ createVectorTileGeometries_default as default
+};
diff --git a/public/assets/cesium/Workers/createVectorTilePoints.js b/public/assets/cesium/Workers/createVectorTilePoints.js
new file mode 100644
index 0000000000000000000000000000000000000000..0560fb85396295863b7018a039a25c4480938d2a
--- /dev/null
+++ b/public/assets/cesium/Workers/createVectorTilePoints.js
@@ -0,0 +1,112 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ createTaskProcessorWorker_default
+} from "./chunk-Z2QP3CXW.js";
+import {
+ AttributeCompression_default
+} from "./chunk-LJ2JQHJT.js";
+import {
+ Rectangle_default
+} from "./chunk-6SQMLVGV.js";
+import "./chunk-XIUSRWL6.js";
+import {
+ Cartesian3_default,
+ Cartographic_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import "./chunk-U5HSOKPQ.js";
+import "./chunk-P6TRGU3S.js";
+import "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Workers/createVectorTilePoints.js
+var maxShort = 32767;
+var scratchBVCartographic = new Cartographic_default();
+var scratchEncodedPosition = new Cartesian3_default();
+var scratchRectangle = new Rectangle_default();
+var scratchEllipsoid = new Ellipsoid_default();
+var scratchMinMaxHeights = {
+ min: void 0,
+ max: void 0
+};
+function unpackBuffer(packedBuffer) {
+ packedBuffer = new Float64Array(packedBuffer);
+ let offset = 0;
+ scratchMinMaxHeights.min = packedBuffer[offset++];
+ scratchMinMaxHeights.max = packedBuffer[offset++];
+ Rectangle_default.unpack(packedBuffer, offset, scratchRectangle);
+ offset += Rectangle_default.packedLength;
+ Ellipsoid_default.unpack(packedBuffer, offset, scratchEllipsoid);
+}
+function createVectorTilePoints(parameters, transferableObjects) {
+ const positions = new Uint16Array(parameters.positions);
+ unpackBuffer(parameters.packedBuffer);
+ const rectangle = scratchRectangle;
+ const ellipsoid = scratchEllipsoid;
+ const minimumHeight = scratchMinMaxHeights.min;
+ const maximumHeight = scratchMinMaxHeights.max;
+ const positionsLength = positions.length / 3;
+ const uBuffer = positions.subarray(0, positionsLength);
+ const vBuffer = positions.subarray(positionsLength, 2 * positionsLength);
+ const heightBuffer = positions.subarray(
+ 2 * positionsLength,
+ 3 * positionsLength
+ );
+ AttributeCompression_default.zigZagDeltaDecode(uBuffer, vBuffer, heightBuffer);
+ const decoded = new Float64Array(positions.length);
+ for (let i = 0; i < positionsLength; ++i) {
+ const u = uBuffer[i];
+ const v = vBuffer[i];
+ const h = heightBuffer[i];
+ const lon = Math_default.lerp(rectangle.west, rectangle.east, u / maxShort);
+ const lat = Math_default.lerp(rectangle.south, rectangle.north, v / maxShort);
+ const alt = Math_default.lerp(minimumHeight, maximumHeight, h / maxShort);
+ const cartographic = Cartographic_default.fromRadians(
+ lon,
+ lat,
+ alt,
+ scratchBVCartographic
+ );
+ const decodedPosition = ellipsoid.cartographicToCartesian(
+ cartographic,
+ scratchEncodedPosition
+ );
+ Cartesian3_default.pack(decodedPosition, decoded, i * 3);
+ }
+ transferableObjects.push(decoded.buffer);
+ return {
+ positions: decoded.buffer
+ };
+}
+var createVectorTilePoints_default = createTaskProcessorWorker_default(createVectorTilePoints);
+export {
+ createVectorTilePoints_default as default
+};
diff --git a/public/assets/cesium/Workers/createVectorTilePolygons.js b/public/assets/cesium/Workers/createVectorTilePolygons.js
new file mode 100644
index 0000000000000000000000000000000000000000..a9eca25b299e4320a04ec207b53da18c6c56adc6
--- /dev/null
+++ b/public/assets/cesium/Workers/createVectorTilePolygons.js
@@ -0,0 +1,383 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ Color_default
+} from "./chunk-HP5XLODI.js";
+import {
+ createTaskProcessorWorker_default
+} from "./chunk-Z2QP3CXW.js";
+import {
+ OrientedBoundingBox_default
+} from "./chunk-2PTKXHJB.js";
+import {
+ AttributeCompression_default
+} from "./chunk-LJ2JQHJT.js";
+import "./chunk-YK3QIKY7.js";
+import "./chunk-NDDI2LWR.js";
+import "./chunk-QQOZO7KO.js";
+import "./chunk-EDLRS3AW.js";
+import {
+ IndexDatatype_default
+} from "./chunk-C4WPMOKT.js";
+import "./chunk-KHZNBFOH.js";
+import {
+ Rectangle_default
+} from "./chunk-6SQMLVGV.js";
+import "./chunk-XIUSRWL6.js";
+import {
+ Cartesian3_default,
+ Cartographic_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import "./chunk-U5HSOKPQ.js";
+import "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Workers/createVectorTilePolygons.js
+var scratchCenter = new Cartesian3_default();
+var scratchEllipsoid = new Ellipsoid_default();
+var scratchRectangle = new Rectangle_default();
+var scratchScalars = {
+ min: void 0,
+ max: void 0,
+ indexBytesPerElement: void 0
+};
+function unpackBuffer(buffer) {
+ const packedBuffer = new Float64Array(buffer);
+ let offset = 0;
+ scratchScalars.indexBytesPerElement = packedBuffer[offset++];
+ scratchScalars.min = packedBuffer[offset++];
+ scratchScalars.max = packedBuffer[offset++];
+ Cartesian3_default.unpack(packedBuffer, offset, scratchCenter);
+ offset += Cartesian3_default.packedLength;
+ Ellipsoid_default.unpack(packedBuffer, offset, scratchEllipsoid);
+ offset += Ellipsoid_default.packedLength;
+ Rectangle_default.unpack(packedBuffer, offset, scratchRectangle);
+}
+function packedBatchedIndicesLength(batchedIndices) {
+ const length = batchedIndices.length;
+ let count = 0;
+ for (let i = 0; i < length; ++i) {
+ count += Color_default.packedLength + 3 + batchedIndices[i].batchIds.length;
+ }
+ return count;
+}
+function packBuffer(indexDatatype, boundingVolumes, batchedIndices) {
+ const numBVs = boundingVolumes.length;
+ const length = 1 + 1 + numBVs * OrientedBoundingBox_default.packedLength + 1 + packedBatchedIndicesLength(batchedIndices);
+ const packedBuffer = new Float64Array(length);
+ let offset = 0;
+ packedBuffer[offset++] = indexDatatype;
+ packedBuffer[offset++] = numBVs;
+ for (let i = 0; i < numBVs; ++i) {
+ OrientedBoundingBox_default.pack(boundingVolumes[i], packedBuffer, offset);
+ offset += OrientedBoundingBox_default.packedLength;
+ }
+ const indicesLength = batchedIndices.length;
+ packedBuffer[offset++] = indicesLength;
+ for (let j = 0; j < indicesLength; ++j) {
+ const batchedIndex = batchedIndices[j];
+ Color_default.pack(batchedIndex.color, packedBuffer, offset);
+ offset += Color_default.packedLength;
+ packedBuffer[offset++] = batchedIndex.offset;
+ packedBuffer[offset++] = batchedIndex.count;
+ const batchIds = batchedIndex.batchIds;
+ const batchIdsLength = batchIds.length;
+ packedBuffer[offset++] = batchIdsLength;
+ for (let k = 0; k < batchIdsLength; ++k) {
+ packedBuffer[offset++] = batchIds[k];
+ }
+ }
+ return packedBuffer;
+}
+var maxShort = 32767;
+var scratchEncodedPosition = new Cartesian3_default();
+var scratchNormal = new Cartesian3_default();
+var scratchScaledNormal = new Cartesian3_default();
+var scratchMinHeightPosition = new Cartesian3_default();
+var scratchMaxHeightPosition = new Cartesian3_default();
+var scratchBVCartographic = new Cartographic_default();
+var scratchBVRectangle = new Rectangle_default();
+function createVectorTilePolygons(parameters, transferableObjects) {
+ unpackBuffer(parameters.packedBuffer);
+ let indices;
+ const indexBytesPerElement = scratchScalars.indexBytesPerElement;
+ if (indexBytesPerElement === 2) {
+ indices = new Uint16Array(parameters.indices);
+ } else {
+ indices = new Uint32Array(parameters.indices);
+ }
+ const positions = new Uint16Array(parameters.positions);
+ const counts = new Uint32Array(parameters.counts);
+ const indexCounts = new Uint32Array(parameters.indexCounts);
+ const batchIds = new Uint32Array(parameters.batchIds);
+ const batchTableColors = new Uint32Array(parameters.batchTableColors);
+ const boundingVolumes = new Array(counts.length);
+ const center = scratchCenter;
+ const ellipsoid = scratchEllipsoid;
+ let rectangle = scratchRectangle;
+ const minHeight = scratchScalars.min;
+ const maxHeight = scratchScalars.max;
+ let minimumHeights = parameters.minimumHeights;
+ let maximumHeights = parameters.maximumHeights;
+ if (defined_default(minimumHeights) && defined_default(maximumHeights)) {
+ minimumHeights = new Float32Array(minimumHeights);
+ maximumHeights = new Float32Array(maximumHeights);
+ }
+ let i;
+ let j;
+ let rgba;
+ const positionsLength = positions.length / 2;
+ const uBuffer = positions.subarray(0, positionsLength);
+ const vBuffer = positions.subarray(positionsLength, 2 * positionsLength);
+ AttributeCompression_default.zigZagDeltaDecode(uBuffer, vBuffer);
+ const decodedPositions = new Float64Array(positionsLength * 3);
+ for (i = 0; i < positionsLength; ++i) {
+ const u = uBuffer[i];
+ const v = vBuffer[i];
+ const x = Math_default.lerp(rectangle.west, rectangle.east, u / maxShort);
+ const y = Math_default.lerp(rectangle.south, rectangle.north, v / maxShort);
+ const cart = Cartographic_default.fromRadians(x, y, 0, scratchBVCartographic);
+ const decodedPosition = ellipsoid.cartographicToCartesian(
+ cart,
+ scratchEncodedPosition
+ );
+ Cartesian3_default.pack(decodedPosition, decodedPositions, i * 3);
+ }
+ const countsLength = counts.length;
+ const offsets = new Array(countsLength);
+ const indexOffsets = new Array(countsLength);
+ let currentOffset = 0;
+ let currentIndexOffset = 0;
+ for (i = 0; i < countsLength; ++i) {
+ offsets[i] = currentOffset;
+ indexOffsets[i] = currentIndexOffset;
+ currentOffset += counts[i];
+ currentIndexOffset += indexCounts[i];
+ }
+ const batchedPositions = new Float32Array(positionsLength * 3 * 2);
+ const batchedIds = new Uint16Array(positionsLength * 2);
+ const batchedIndexOffsets = new Uint32Array(indexOffsets.length);
+ const batchedIndexCounts = new Uint32Array(indexCounts.length);
+ let batchedIndices = [];
+ const colorToBuffers = {};
+ for (i = 0; i < countsLength; ++i) {
+ rgba = batchTableColors[i];
+ if (!defined_default(colorToBuffers[rgba])) {
+ colorToBuffers[rgba] = {
+ positionLength: counts[i],
+ indexLength: indexCounts[i],
+ offset: 0,
+ indexOffset: 0,
+ batchIds: [i]
+ };
+ } else {
+ colorToBuffers[rgba].positionLength += counts[i];
+ colorToBuffers[rgba].indexLength += indexCounts[i];
+ colorToBuffers[rgba].batchIds.push(i);
+ }
+ }
+ let buffer;
+ let byColorPositionOffset = 0;
+ let byColorIndexOffset = 0;
+ for (rgba in colorToBuffers) {
+ if (colorToBuffers.hasOwnProperty(rgba)) {
+ buffer = colorToBuffers[rgba];
+ buffer.offset = byColorPositionOffset;
+ buffer.indexOffset = byColorIndexOffset;
+ const positionLength = buffer.positionLength * 2;
+ const indexLength = buffer.indexLength * 2 + buffer.positionLength * 6;
+ byColorPositionOffset += positionLength;
+ byColorIndexOffset += indexLength;
+ buffer.indexLength = indexLength;
+ }
+ }
+ const batchedDrawCalls = [];
+ for (rgba in colorToBuffers) {
+ if (colorToBuffers.hasOwnProperty(rgba)) {
+ buffer = colorToBuffers[rgba];
+ batchedDrawCalls.push({
+ color: Color_default.fromRgba(parseInt(rgba)),
+ offset: buffer.indexOffset,
+ count: buffer.indexLength,
+ batchIds: buffer.batchIds
+ });
+ }
+ }
+ for (i = 0; i < countsLength; ++i) {
+ rgba = batchTableColors[i];
+ buffer = colorToBuffers[rgba];
+ const positionOffset = buffer.offset;
+ let positionIndex = positionOffset * 3;
+ let batchIdIndex = positionOffset;
+ const polygonOffset = offsets[i];
+ const polygonCount = counts[i];
+ const batchId = batchIds[i];
+ let polygonMinimumHeight = minHeight;
+ let polygonMaximumHeight = maxHeight;
+ if (defined_default(minimumHeights) && defined_default(maximumHeights)) {
+ polygonMinimumHeight = minimumHeights[i];
+ polygonMaximumHeight = maximumHeights[i];
+ }
+ let minLat = Number.POSITIVE_INFINITY;
+ let maxLat = Number.NEGATIVE_INFINITY;
+ let minLon = Number.POSITIVE_INFINITY;
+ let maxLon = Number.NEGATIVE_INFINITY;
+ for (j = 0; j < polygonCount; ++j) {
+ const position = Cartesian3_default.unpack(
+ decodedPositions,
+ polygonOffset * 3 + j * 3,
+ scratchEncodedPosition
+ );
+ ellipsoid.scaleToGeodeticSurface(position, position);
+ const carto = ellipsoid.cartesianToCartographic(
+ position,
+ scratchBVCartographic
+ );
+ const lat = carto.latitude;
+ const lon = carto.longitude;
+ minLat = Math.min(lat, minLat);
+ maxLat = Math.max(lat, maxLat);
+ minLon = Math.min(lon, minLon);
+ maxLon = Math.max(lon, maxLon);
+ const normal = ellipsoid.geodeticSurfaceNormal(position, scratchNormal);
+ let scaledNormal = Cartesian3_default.multiplyByScalar(
+ normal,
+ polygonMinimumHeight,
+ scratchScaledNormal
+ );
+ const minHeightPosition = Cartesian3_default.add(
+ position,
+ scaledNormal,
+ scratchMinHeightPosition
+ );
+ scaledNormal = Cartesian3_default.multiplyByScalar(
+ normal,
+ polygonMaximumHeight,
+ scaledNormal
+ );
+ const maxHeightPosition = Cartesian3_default.add(
+ position,
+ scaledNormal,
+ scratchMaxHeightPosition
+ );
+ Cartesian3_default.subtract(maxHeightPosition, center, maxHeightPosition);
+ Cartesian3_default.subtract(minHeightPosition, center, minHeightPosition);
+ Cartesian3_default.pack(maxHeightPosition, batchedPositions, positionIndex);
+ Cartesian3_default.pack(minHeightPosition, batchedPositions, positionIndex + 3);
+ batchedIds[batchIdIndex] = batchId;
+ batchedIds[batchIdIndex + 1] = batchId;
+ positionIndex += 6;
+ batchIdIndex += 2;
+ }
+ rectangle = scratchBVRectangle;
+ rectangle.west = minLon;
+ rectangle.east = maxLon;
+ rectangle.south = minLat;
+ rectangle.north = maxLat;
+ boundingVolumes[i] = OrientedBoundingBox_default.fromRectangle(
+ rectangle,
+ minHeight,
+ maxHeight,
+ ellipsoid
+ );
+ let indicesIndex = buffer.indexOffset;
+ const indexOffset = indexOffsets[i];
+ const indexCount = indexCounts[i];
+ batchedIndexOffsets[i] = indicesIndex;
+ for (j = 0; j < indexCount; j += 3) {
+ const i0 = indices[indexOffset + j] - polygonOffset;
+ const i1 = indices[indexOffset + j + 1] - polygonOffset;
+ const i2 = indices[indexOffset + j + 2] - polygonOffset;
+ batchedIndices[indicesIndex++] = i0 * 2 + positionOffset;
+ batchedIndices[indicesIndex++] = i1 * 2 + positionOffset;
+ batchedIndices[indicesIndex++] = i2 * 2 + positionOffset;
+ batchedIndices[indicesIndex++] = i2 * 2 + 1 + positionOffset;
+ batchedIndices[indicesIndex++] = i1 * 2 + 1 + positionOffset;
+ batchedIndices[indicesIndex++] = i0 * 2 + 1 + positionOffset;
+ }
+ for (j = 0; j < polygonCount; ++j) {
+ const v0 = j;
+ const v1 = (j + 1) % polygonCount;
+ batchedIndices[indicesIndex++] = v0 * 2 + 1 + positionOffset;
+ batchedIndices[indicesIndex++] = v1 * 2 + positionOffset;
+ batchedIndices[indicesIndex++] = v0 * 2 + positionOffset;
+ batchedIndices[indicesIndex++] = v0 * 2 + 1 + positionOffset;
+ batchedIndices[indicesIndex++] = v1 * 2 + 1 + positionOffset;
+ batchedIndices[indicesIndex++] = v1 * 2 + positionOffset;
+ }
+ buffer.offset += polygonCount * 2;
+ buffer.indexOffset = indicesIndex;
+ batchedIndexCounts[i] = indicesIndex - batchedIndexOffsets[i];
+ }
+ batchedIndices = IndexDatatype_default.createTypedArray(
+ batchedPositions.length / 3,
+ batchedIndices
+ );
+ const batchedIndicesLength = batchedDrawCalls.length;
+ for (let m = 0; m < batchedIndicesLength; ++m) {
+ const tempIds = batchedDrawCalls[m].batchIds;
+ let count = 0;
+ const tempIdsLength = tempIds.length;
+ for (let n = 0; n < tempIdsLength; ++n) {
+ count += batchedIndexCounts[tempIds[n]];
+ }
+ batchedDrawCalls[m].count = count;
+ }
+ const indexDatatype = batchedIndices.BYTES_PER_ELEMENT === 2 ? IndexDatatype_default.UNSIGNED_SHORT : IndexDatatype_default.UNSIGNED_INT;
+ const packedBuffer = packBuffer(
+ indexDatatype,
+ boundingVolumes,
+ batchedDrawCalls
+ );
+ transferableObjects.push(
+ batchedPositions.buffer,
+ batchedIndices.buffer,
+ batchedIndexOffsets.buffer,
+ batchedIndexCounts.buffer,
+ batchedIds.buffer,
+ packedBuffer.buffer
+ );
+ return {
+ positions: batchedPositions.buffer,
+ indices: batchedIndices.buffer,
+ indexOffsets: batchedIndexOffsets.buffer,
+ indexCounts: batchedIndexCounts.buffer,
+ batchIds: batchedIds.buffer,
+ packedBuffer: packedBuffer.buffer
+ };
+}
+var createVectorTilePolygons_default = createTaskProcessorWorker_default(createVectorTilePolygons);
+export {
+ createVectorTilePolygons_default as default
+};
diff --git a/public/assets/cesium/Workers/createVectorTilePolylines.js b/public/assets/cesium/Workers/createVectorTilePolylines.js
new file mode 100644
index 0000000000000000000000000000000000000000..b671a5a703f6a5f43275abda57a3401962072631
--- /dev/null
+++ b/public/assets/cesium/Workers/createVectorTilePolylines.js
@@ -0,0 +1,260 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ createTaskProcessorWorker_default
+} from "./chunk-Z2QP3CXW.js";
+import {
+ AttributeCompression_default
+} from "./chunk-LJ2JQHJT.js";
+import {
+ IndexDatatype_default
+} from "./chunk-C4WPMOKT.js";
+import {
+ Rectangle_default,
+ combine_default
+} from "./chunk-6SQMLVGV.js";
+import "./chunk-XIUSRWL6.js";
+import {
+ Cartesian3_default,
+ Cartographic_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import "./chunk-U5HSOKPQ.js";
+import "./chunk-P6TRGU3S.js";
+import "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/decodeVectorPolylinePositions.js
+var maxShort = 32767;
+var scratchBVCartographic = new Cartographic_default();
+var scratchEncodedPosition = new Cartesian3_default();
+function decodeVectorPolylinePositions(positions, rectangle, minimumHeight, maximumHeight, ellipsoid) {
+ const positionsLength = positions.length / 3;
+ const uBuffer = positions.subarray(0, positionsLength);
+ const vBuffer = positions.subarray(positionsLength, 2 * positionsLength);
+ const heightBuffer = positions.subarray(
+ 2 * positionsLength,
+ 3 * positionsLength
+ );
+ AttributeCompression_default.zigZagDeltaDecode(uBuffer, vBuffer, heightBuffer);
+ const decoded = new Float64Array(positions.length);
+ for (let i = 0; i < positionsLength; ++i) {
+ const u = uBuffer[i];
+ const v = vBuffer[i];
+ const h = heightBuffer[i];
+ const lon = Math_default.lerp(rectangle.west, rectangle.east, u / maxShort);
+ const lat = Math_default.lerp(rectangle.south, rectangle.north, v / maxShort);
+ const alt = Math_default.lerp(minimumHeight, maximumHeight, h / maxShort);
+ const cartographic = Cartographic_default.fromRadians(
+ lon,
+ lat,
+ alt,
+ scratchBVCartographic
+ );
+ const decodedPosition = ellipsoid.cartographicToCartesian(
+ cartographic,
+ scratchEncodedPosition
+ );
+ Cartesian3_default.pack(decodedPosition, decoded, i * 3);
+ }
+ return decoded;
+}
+var decodeVectorPolylinePositions_default = decodeVectorPolylinePositions;
+
+// packages/engine/Source/Workers/createVectorTilePolylines.js
+var scratchRectangle = new Rectangle_default();
+var scratchEllipsoid = new Ellipsoid_default();
+var scratchCenter = new Cartesian3_default();
+var scratchMinMaxHeights = {
+ min: void 0,
+ max: void 0
+};
+function unpackBuffer(packedBuffer) {
+ packedBuffer = new Float64Array(packedBuffer);
+ let offset = 0;
+ scratchMinMaxHeights.min = packedBuffer[offset++];
+ scratchMinMaxHeights.max = packedBuffer[offset++];
+ Rectangle_default.unpack(packedBuffer, offset, scratchRectangle);
+ offset += Rectangle_default.packedLength;
+ Ellipsoid_default.unpack(packedBuffer, offset, scratchEllipsoid);
+ offset += Ellipsoid_default.packedLength;
+ Cartesian3_default.unpack(packedBuffer, offset, scratchCenter);
+}
+function getPositionOffsets(counts) {
+ const countsLength = counts.length;
+ const positionOffsets = new Uint32Array(countsLength + 1);
+ let offset = 0;
+ for (let i = 0; i < countsLength; ++i) {
+ positionOffsets[i] = offset;
+ offset += counts[i];
+ }
+ positionOffsets[countsLength] = offset;
+ return positionOffsets;
+}
+var scratchP0 = new Cartesian3_default();
+var scratchP1 = new Cartesian3_default();
+var scratchPrev = new Cartesian3_default();
+var scratchCur = new Cartesian3_default();
+var scratchNext = new Cartesian3_default();
+function createVectorTilePolylines(parameters, transferableObjects) {
+ const encodedPositions = new Uint16Array(parameters.positions);
+ const widths = new Uint16Array(parameters.widths);
+ const counts = new Uint32Array(parameters.counts);
+ const batchIds = new Uint16Array(parameters.batchIds);
+ unpackBuffer(parameters.packedBuffer);
+ const rectangle = scratchRectangle;
+ const ellipsoid = scratchEllipsoid;
+ const center = scratchCenter;
+ const minimumHeight = scratchMinMaxHeights.min;
+ const maximumHeight = scratchMinMaxHeights.max;
+ const positions = decodeVectorPolylinePositions_default(
+ encodedPositions,
+ rectangle,
+ minimumHeight,
+ maximumHeight,
+ ellipsoid
+ );
+ const positionsLength = positions.length / 3;
+ const size = positionsLength * 4 - 4;
+ const curPositions = new Float32Array(size * 3);
+ const prevPositions = new Float32Array(size * 3);
+ const nextPositions = new Float32Array(size * 3);
+ const expandAndWidth = new Float32Array(size * 2);
+ const vertexBatchIds = new Uint16Array(size);
+ let positionIndex = 0;
+ let expandAndWidthIndex = 0;
+ let batchIdIndex = 0;
+ let i;
+ let offset = 0;
+ let length = counts.length;
+ for (i = 0; i < length; ++i) {
+ const count = counts[i];
+ const width = widths[i];
+ const batchId = batchIds[i];
+ for (let j = 0; j < count; ++j) {
+ let previous;
+ if (j === 0) {
+ const p0 = Cartesian3_default.unpack(positions, offset * 3, scratchP0);
+ const p1 = Cartesian3_default.unpack(positions, (offset + 1) * 3, scratchP1);
+ previous = Cartesian3_default.subtract(p0, p1, scratchPrev);
+ Cartesian3_default.add(p0, previous, previous);
+ } else {
+ previous = Cartesian3_default.unpack(
+ positions,
+ (offset + j - 1) * 3,
+ scratchPrev
+ );
+ }
+ const current = Cartesian3_default.unpack(
+ positions,
+ (offset + j) * 3,
+ scratchCur
+ );
+ let next;
+ if (j === count - 1) {
+ const p2 = Cartesian3_default.unpack(
+ positions,
+ (offset + count - 1) * 3,
+ scratchP0
+ );
+ const p3 = Cartesian3_default.unpack(
+ positions,
+ (offset + count - 2) * 3,
+ scratchP1
+ );
+ next = Cartesian3_default.subtract(p2, p3, scratchNext);
+ Cartesian3_default.add(p2, next, next);
+ } else {
+ next = Cartesian3_default.unpack(positions, (offset + j + 1) * 3, scratchNext);
+ }
+ Cartesian3_default.subtract(previous, center, previous);
+ Cartesian3_default.subtract(current, center, current);
+ Cartesian3_default.subtract(next, center, next);
+ const startK = j === 0 ? 2 : 0;
+ const endK = j === count - 1 ? 2 : 4;
+ for (let k = startK; k < endK; ++k) {
+ Cartesian3_default.pack(current, curPositions, positionIndex);
+ Cartesian3_default.pack(previous, prevPositions, positionIndex);
+ Cartesian3_default.pack(next, nextPositions, positionIndex);
+ positionIndex += 3;
+ const direction = k - 2 < 0 ? -1 : 1;
+ expandAndWidth[expandAndWidthIndex++] = 2 * (k % 2) - 1;
+ expandAndWidth[expandAndWidthIndex++] = direction * width;
+ vertexBatchIds[batchIdIndex++] = batchId;
+ }
+ }
+ offset += count;
+ }
+ const indices = IndexDatatype_default.createTypedArray(size, positionsLength * 6 - 6);
+ let index = 0;
+ let indicesIndex = 0;
+ length = positionsLength - 1;
+ for (i = 0; i < length; ++i) {
+ indices[indicesIndex++] = index;
+ indices[indicesIndex++] = index + 2;
+ indices[indicesIndex++] = index + 1;
+ indices[indicesIndex++] = index + 1;
+ indices[indicesIndex++] = index + 2;
+ indices[indicesIndex++] = index + 3;
+ index += 4;
+ }
+ transferableObjects.push(
+ curPositions.buffer,
+ prevPositions.buffer,
+ nextPositions.buffer
+ );
+ transferableObjects.push(
+ expandAndWidth.buffer,
+ vertexBatchIds.buffer,
+ indices.buffer
+ );
+ let results = {
+ indexDatatype: indices.BYTES_PER_ELEMENT === 2 ? IndexDatatype_default.UNSIGNED_SHORT : IndexDatatype_default.UNSIGNED_INT,
+ currentPositions: curPositions.buffer,
+ previousPositions: prevPositions.buffer,
+ nextPositions: nextPositions.buffer,
+ expandAndWidth: expandAndWidth.buffer,
+ batchIds: vertexBatchIds.buffer,
+ indices: indices.buffer
+ };
+ if (parameters.keepDecodedPositions) {
+ const positionOffsets = getPositionOffsets(counts);
+ transferableObjects.push(positions.buffer, positionOffsets.buffer);
+ results = combine_default(results, {
+ decodedPositions: positions.buffer,
+ decodedPositionOffsets: positionOffsets.buffer
+ });
+ }
+ return results;
+}
+var createVectorTilePolylines_default = createTaskProcessorWorker_default(createVectorTilePolylines);
+export {
+ createVectorTilePolylines_default as default
+};
diff --git a/public/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js b/public/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js
new file mode 100644
index 0000000000000000000000000000000000000000..bb73669ad128e0e685be6f173cc1a423b4eea130
--- /dev/null
+++ b/public/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js
@@ -0,0 +1,567 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ EllipsoidalOccluder_default,
+ TerrainEncoding_default
+} from "./chunk-56EDBCGT.js";
+import {
+ createTaskProcessorWorker_default
+} from "./chunk-Z2QP3CXW.js";
+import {
+ WebMercatorProjection_default
+} from "./chunk-RJM36CNY.js";
+import {
+ OrientedBoundingBox_default
+} from "./chunk-2PTKXHJB.js";
+import "./chunk-LJ2JQHJT.js";
+import "./chunk-YK3QIKY7.js";
+import {
+ AxisAlignedBoundingBox_default
+} from "./chunk-NDDI2LWR.js";
+import "./chunk-QQOZO7KO.js";
+import "./chunk-EDLRS3AW.js";
+import {
+ BoundingSphere_default
+} from "./chunk-KHZNBFOH.js";
+import {
+ Matrix4_default,
+ Rectangle_default,
+ Transforms_default
+} from "./chunk-6SQMLVGV.js";
+import "./chunk-XIUSRWL6.js";
+import {
+ Cartesian2_default,
+ Cartesian3_default,
+ Cartographic_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import {
+ RuntimeError_default
+} from "./chunk-LLAF3CPH.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js
+var sizeOfUint16 = Uint16Array.BYTES_PER_ELEMENT;
+var sizeOfInt32 = Int32Array.BYTES_PER_ELEMENT;
+var sizeOfUint32 = Uint32Array.BYTES_PER_ELEMENT;
+var sizeOfFloat = Float32Array.BYTES_PER_ELEMENT;
+var sizeOfDouble = Float64Array.BYTES_PER_ELEMENT;
+function indexOfEpsilon(arr, elem, elemType) {
+ elemType = defaultValue_default(elemType, Math_default);
+ const count = arr.length;
+ for (let i = 0; i < count; ++i) {
+ if (elemType.equalsEpsilon(arr[i], elem, Math_default.EPSILON12)) {
+ return i;
+ }
+ }
+ return -1;
+}
+function createVerticesFromGoogleEarthEnterpriseBuffer(parameters, transferableObjects) {
+ parameters.ellipsoid = Ellipsoid_default.clone(parameters.ellipsoid);
+ parameters.rectangle = Rectangle_default.clone(parameters.rectangle);
+ const statistics = processBuffer(
+ parameters.buffer,
+ parameters.relativeToCenter,
+ parameters.ellipsoid,
+ parameters.rectangle,
+ parameters.nativeRectangle,
+ parameters.exaggeration,
+ parameters.exaggerationRelativeHeight,
+ parameters.skirtHeight,
+ parameters.includeWebMercatorT,
+ parameters.negativeAltitudeExponentBias,
+ parameters.negativeElevationThreshold
+ );
+ const vertices = statistics.vertices;
+ transferableObjects.push(vertices.buffer);
+ const indices = statistics.indices;
+ transferableObjects.push(indices.buffer);
+ return {
+ vertices: vertices.buffer,
+ indices: indices.buffer,
+ numberOfAttributes: statistics.encoding.stride,
+ minimumHeight: statistics.minimumHeight,
+ maximumHeight: statistics.maximumHeight,
+ boundingSphere3D: statistics.boundingSphere3D,
+ orientedBoundingBox: statistics.orientedBoundingBox,
+ occludeePointInScaledSpace: statistics.occludeePointInScaledSpace,
+ encoding: statistics.encoding,
+ vertexCountWithoutSkirts: statistics.vertexCountWithoutSkirts,
+ indexCountWithoutSkirts: statistics.indexCountWithoutSkirts,
+ westIndicesSouthToNorth: statistics.westIndicesSouthToNorth,
+ southIndicesEastToWest: statistics.southIndicesEastToWest,
+ eastIndicesNorthToSouth: statistics.eastIndicesNorthToSouth,
+ northIndicesWestToEast: statistics.northIndicesWestToEast
+ };
+}
+var scratchCartographic = new Cartographic_default();
+var scratchCartesian = new Cartesian3_default();
+var minimumScratch = new Cartesian3_default();
+var maximumScratch = new Cartesian3_default();
+var matrix4Scratch = new Matrix4_default();
+function processBuffer(buffer, relativeToCenter, ellipsoid, rectangle, nativeRectangle, exaggeration, exaggerationRelativeHeight, skirtHeight, includeWebMercatorT, negativeAltitudeExponentBias, negativeElevationThreshold) {
+ let geographicWest;
+ let geographicSouth;
+ let geographicEast;
+ let geographicNorth;
+ let rectangleWidth, rectangleHeight;
+ if (!defined_default(rectangle)) {
+ geographicWest = Math_default.toRadians(nativeRectangle.west);
+ geographicSouth = Math_default.toRadians(nativeRectangle.south);
+ geographicEast = Math_default.toRadians(nativeRectangle.east);
+ geographicNorth = Math_default.toRadians(nativeRectangle.north);
+ rectangleWidth = Math_default.toRadians(rectangle.width);
+ rectangleHeight = Math_default.toRadians(rectangle.height);
+ } else {
+ geographicWest = rectangle.west;
+ geographicSouth = rectangle.south;
+ geographicEast = rectangle.east;
+ geographicNorth = rectangle.north;
+ rectangleWidth = rectangle.width;
+ rectangleHeight = rectangle.height;
+ }
+ const quadBorderLatitudes = [geographicSouth, geographicNorth];
+ const quadBorderLongitudes = [geographicWest, geographicEast];
+ const fromENU = Transforms_default.eastNorthUpToFixedFrame(
+ relativeToCenter,
+ ellipsoid
+ );
+ const toENU = Matrix4_default.inverseTransformation(fromENU, matrix4Scratch);
+ let southMercatorY;
+ let oneOverMercatorHeight;
+ if (includeWebMercatorT) {
+ southMercatorY = WebMercatorProjection_default.geodeticLatitudeToMercatorAngle(
+ geographicSouth
+ );
+ oneOverMercatorHeight = 1 / (WebMercatorProjection_default.geodeticLatitudeToMercatorAngle(geographicNorth) - southMercatorY);
+ }
+ const hasExaggeration = exaggeration !== 1;
+ const includeGeodeticSurfaceNormals = hasExaggeration;
+ const dv = new DataView(buffer);
+ let minHeight = Number.POSITIVE_INFINITY;
+ let maxHeight = Number.NEGATIVE_INFINITY;
+ const minimum = minimumScratch;
+ minimum.x = Number.POSITIVE_INFINITY;
+ minimum.y = Number.POSITIVE_INFINITY;
+ minimum.z = Number.POSITIVE_INFINITY;
+ const maximum = maximumScratch;
+ maximum.x = Number.NEGATIVE_INFINITY;
+ maximum.y = Number.NEGATIVE_INFINITY;
+ maximum.z = Number.NEGATIVE_INFINITY;
+ let offset = 0;
+ let size = 0;
+ let indicesSize = 0;
+ let quadSize;
+ let quad;
+ for (quad = 0; quad < 4; ++quad) {
+ let o = offset;
+ quadSize = dv.getUint32(o, true);
+ o += sizeOfUint32;
+ const x = Math_default.toRadians(dv.getFloat64(o, true) * 180);
+ o += sizeOfDouble;
+ if (indexOfEpsilon(quadBorderLongitudes, x) === -1) {
+ quadBorderLongitudes.push(x);
+ }
+ const y = Math_default.toRadians(dv.getFloat64(o, true) * 180);
+ o += sizeOfDouble;
+ if (indexOfEpsilon(quadBorderLatitudes, y) === -1) {
+ quadBorderLatitudes.push(y);
+ }
+ o += 2 * sizeOfDouble;
+ let c = dv.getInt32(o, true);
+ o += sizeOfInt32;
+ size += c;
+ c = dv.getInt32(o, true);
+ indicesSize += c * 3;
+ offset += quadSize + sizeOfUint32;
+ }
+ const quadBorderPoints = [];
+ const quadBorderIndices = [];
+ const positions = new Array(size);
+ const uvs = new Array(size);
+ const heights = new Array(size);
+ const webMercatorTs = includeWebMercatorT ? new Array(size) : [];
+ const geodeticSurfaceNormals = includeGeodeticSurfaceNormals ? new Array(size) : [];
+ const indices = new Array(indicesSize);
+ const westBorder = [];
+ const southBorder = [];
+ const eastBorder = [];
+ const northBorder = [];
+ let pointOffset = 0;
+ let indicesOffset = 0;
+ offset = 0;
+ for (quad = 0; quad < 4; ++quad) {
+ quadSize = dv.getUint32(offset, true);
+ offset += sizeOfUint32;
+ const startQuad = offset;
+ const originX = Math_default.toRadians(dv.getFloat64(offset, true) * 180);
+ offset += sizeOfDouble;
+ const originY = Math_default.toRadians(dv.getFloat64(offset, true) * 180);
+ offset += sizeOfDouble;
+ const stepX = Math_default.toRadians(dv.getFloat64(offset, true) * 180);
+ const halfStepX = stepX * 0.5;
+ offset += sizeOfDouble;
+ const stepY = Math_default.toRadians(dv.getFloat64(offset, true) * 180);
+ const halfStepY = stepY * 0.5;
+ offset += sizeOfDouble;
+ const numPoints = dv.getInt32(offset, true);
+ offset += sizeOfInt32;
+ const numFaces = dv.getInt32(offset, true);
+ offset += sizeOfInt32;
+ offset += sizeOfInt32;
+ const indicesMapping = new Array(numPoints);
+ for (let i = 0; i < numPoints; ++i) {
+ const longitude = originX + dv.getUint8(offset++) * stepX;
+ scratchCartographic.longitude = longitude;
+ const latitude = originY + dv.getUint8(offset++) * stepY;
+ scratchCartographic.latitude = latitude;
+ let height = dv.getFloat32(offset, true);
+ offset += sizeOfFloat;
+ if (height !== 0 && height < negativeElevationThreshold) {
+ height *= -Math.pow(2, negativeAltitudeExponentBias);
+ }
+ height *= 6371010;
+ scratchCartographic.height = height;
+ if (indexOfEpsilon(quadBorderLongitudes, longitude) !== -1 || indexOfEpsilon(quadBorderLatitudes, latitude) !== -1) {
+ const index = indexOfEpsilon(
+ quadBorderPoints,
+ scratchCartographic,
+ Cartographic_default
+ );
+ if (index === -1) {
+ quadBorderPoints.push(Cartographic_default.clone(scratchCartographic));
+ quadBorderIndices.push(pointOffset);
+ } else {
+ indicesMapping[i] = quadBorderIndices[index];
+ continue;
+ }
+ }
+ indicesMapping[i] = pointOffset;
+ if (Math.abs(longitude - geographicWest) < halfStepX) {
+ westBorder.push({
+ index: pointOffset,
+ cartographic: Cartographic_default.clone(scratchCartographic)
+ });
+ } else if (Math.abs(longitude - geographicEast) < halfStepX) {
+ eastBorder.push({
+ index: pointOffset,
+ cartographic: Cartographic_default.clone(scratchCartographic)
+ });
+ } else if (Math.abs(latitude - geographicSouth) < halfStepY) {
+ southBorder.push({
+ index: pointOffset,
+ cartographic: Cartographic_default.clone(scratchCartographic)
+ });
+ } else if (Math.abs(latitude - geographicNorth) < halfStepY) {
+ northBorder.push({
+ index: pointOffset,
+ cartographic: Cartographic_default.clone(scratchCartographic)
+ });
+ }
+ minHeight = Math.min(height, minHeight);
+ maxHeight = Math.max(height, maxHeight);
+ heights[pointOffset] = height;
+ const pos = ellipsoid.cartographicToCartesian(scratchCartographic);
+ positions[pointOffset] = pos;
+ if (includeWebMercatorT) {
+ webMercatorTs[pointOffset] = (WebMercatorProjection_default.geodeticLatitudeToMercatorAngle(latitude) - southMercatorY) * oneOverMercatorHeight;
+ }
+ if (includeGeodeticSurfaceNormals) {
+ const normal = ellipsoid.geodeticSurfaceNormal(pos);
+ geodeticSurfaceNormals[pointOffset] = normal;
+ }
+ Matrix4_default.multiplyByPoint(toENU, pos, scratchCartesian);
+ Cartesian3_default.minimumByComponent(scratchCartesian, minimum, minimum);
+ Cartesian3_default.maximumByComponent(scratchCartesian, maximum, maximum);
+ let u = (longitude - geographicWest) / (geographicEast - geographicWest);
+ u = Math_default.clamp(u, 0, 1);
+ let v = (latitude - geographicSouth) / (geographicNorth - geographicSouth);
+ v = Math_default.clamp(v, 0, 1);
+ uvs[pointOffset] = new Cartesian2_default(u, v);
+ ++pointOffset;
+ }
+ const facesElementCount = numFaces * 3;
+ for (let j = 0; j < facesElementCount; ++j, ++indicesOffset) {
+ indices[indicesOffset] = indicesMapping[dv.getUint16(offset, true)];
+ offset += sizeOfUint16;
+ }
+ if (quadSize !== offset - startQuad) {
+ throw new RuntimeError_default("Invalid terrain tile.");
+ }
+ }
+ positions.length = pointOffset;
+ uvs.length = pointOffset;
+ heights.length = pointOffset;
+ if (includeWebMercatorT) {
+ webMercatorTs.length = pointOffset;
+ }
+ if (includeGeodeticSurfaceNormals) {
+ geodeticSurfaceNormals.length = pointOffset;
+ }
+ const vertexCountWithoutSkirts = pointOffset;
+ const indexCountWithoutSkirts = indicesOffset;
+ const skirtOptions = {
+ hMin: minHeight,
+ lastBorderPoint: void 0,
+ skirtHeight,
+ toENU,
+ ellipsoid,
+ minimum,
+ maximum
+ };
+ westBorder.sort(function(a, b) {
+ return b.cartographic.latitude - a.cartographic.latitude;
+ });
+ southBorder.sort(function(a, b) {
+ return a.cartographic.longitude - b.cartographic.longitude;
+ });
+ eastBorder.sort(function(a, b) {
+ return a.cartographic.latitude - b.cartographic.latitude;
+ });
+ northBorder.sort(function(a, b) {
+ return b.cartographic.longitude - a.cartographic.longitude;
+ });
+ const percentage = 1e-5;
+ addSkirt(
+ positions,
+ heights,
+ uvs,
+ webMercatorTs,
+ geodeticSurfaceNormals,
+ indices,
+ skirtOptions,
+ westBorder,
+ -percentage * rectangleWidth,
+ true,
+ -percentage * rectangleHeight
+ );
+ addSkirt(
+ positions,
+ heights,
+ uvs,
+ webMercatorTs,
+ geodeticSurfaceNormals,
+ indices,
+ skirtOptions,
+ southBorder,
+ -percentage * rectangleHeight,
+ false
+ );
+ addSkirt(
+ positions,
+ heights,
+ uvs,
+ webMercatorTs,
+ geodeticSurfaceNormals,
+ indices,
+ skirtOptions,
+ eastBorder,
+ percentage * rectangleWidth,
+ true,
+ percentage * rectangleHeight
+ );
+ addSkirt(
+ positions,
+ heights,
+ uvs,
+ webMercatorTs,
+ geodeticSurfaceNormals,
+ indices,
+ skirtOptions,
+ northBorder,
+ percentage * rectangleHeight,
+ false
+ );
+ if (westBorder.length > 0 && northBorder.length > 0) {
+ const firstBorderIndex = westBorder[0].index;
+ const firstSkirtIndex = vertexCountWithoutSkirts;
+ const lastBorderIndex = northBorder[northBorder.length - 1].index;
+ const lastSkirtIndex = positions.length - 1;
+ indices.push(
+ lastBorderIndex,
+ lastSkirtIndex,
+ firstSkirtIndex,
+ firstSkirtIndex,
+ firstBorderIndex,
+ lastBorderIndex
+ );
+ }
+ size = positions.length;
+ const boundingSphere3D = BoundingSphere_default.fromPoints(positions);
+ let orientedBoundingBox;
+ if (defined_default(rectangle)) {
+ orientedBoundingBox = OrientedBoundingBox_default.fromRectangle(
+ rectangle,
+ minHeight,
+ maxHeight,
+ ellipsoid
+ );
+ }
+ const occluder = new EllipsoidalOccluder_default(ellipsoid);
+ const occludeePointInScaledSpace = occluder.computeHorizonCullingPointPossiblyUnderEllipsoid(
+ relativeToCenter,
+ positions,
+ minHeight
+ );
+ const aaBox = new AxisAlignedBoundingBox_default(minimum, maximum, relativeToCenter);
+ const encoding = new TerrainEncoding_default(
+ relativeToCenter,
+ aaBox,
+ skirtOptions.hMin,
+ maxHeight,
+ fromENU,
+ false,
+ includeWebMercatorT,
+ includeGeodeticSurfaceNormals,
+ exaggeration,
+ exaggerationRelativeHeight
+ );
+ const vertices = new Float32Array(size * encoding.stride);
+ let bufferIndex = 0;
+ for (let k = 0; k < size; ++k) {
+ bufferIndex = encoding.encode(
+ vertices,
+ bufferIndex,
+ positions[k],
+ uvs[k],
+ heights[k],
+ void 0,
+ webMercatorTs[k],
+ geodeticSurfaceNormals[k]
+ );
+ }
+ const westIndicesSouthToNorth = westBorder.map(function(vertex) {
+ return vertex.index;
+ }).reverse();
+ const southIndicesEastToWest = southBorder.map(function(vertex) {
+ return vertex.index;
+ }).reverse();
+ const eastIndicesNorthToSouth = eastBorder.map(function(vertex) {
+ return vertex.index;
+ }).reverse();
+ const northIndicesWestToEast = northBorder.map(function(vertex) {
+ return vertex.index;
+ }).reverse();
+ southIndicesEastToWest.unshift(
+ eastIndicesNorthToSouth[eastIndicesNorthToSouth.length - 1]
+ );
+ southIndicesEastToWest.push(westIndicesSouthToNorth[0]);
+ northIndicesWestToEast.unshift(
+ westIndicesSouthToNorth[westIndicesSouthToNorth.length - 1]
+ );
+ northIndicesWestToEast.push(eastIndicesNorthToSouth[0]);
+ return {
+ vertices,
+ indices: new Uint16Array(indices),
+ maximumHeight: maxHeight,
+ minimumHeight: minHeight,
+ encoding,
+ boundingSphere3D,
+ orientedBoundingBox,
+ occludeePointInScaledSpace,
+ vertexCountWithoutSkirts,
+ indexCountWithoutSkirts,
+ westIndicesSouthToNorth,
+ southIndicesEastToWest,
+ eastIndicesNorthToSouth,
+ northIndicesWestToEast
+ };
+}
+function addSkirt(positions, heights, uvs, webMercatorTs, geodeticSurfaceNormals, indices, skirtOptions, borderPoints, fudgeFactor, eastOrWest, cornerFudge) {
+ const count = borderPoints.length;
+ for (let j = 0; j < count; ++j) {
+ const borderPoint = borderPoints[j];
+ const borderCartographic = borderPoint.cartographic;
+ const borderIndex = borderPoint.index;
+ const currentIndex = positions.length;
+ const longitude = borderCartographic.longitude;
+ let latitude = borderCartographic.latitude;
+ latitude = Math_default.clamp(
+ latitude,
+ -Math_default.PI_OVER_TWO,
+ Math_default.PI_OVER_TWO
+ );
+ const height = borderCartographic.height - skirtOptions.skirtHeight;
+ skirtOptions.hMin = Math.min(skirtOptions.hMin, height);
+ Cartographic_default.fromRadians(longitude, latitude, height, scratchCartographic);
+ if (eastOrWest) {
+ scratchCartographic.longitude += fudgeFactor;
+ }
+ if (!eastOrWest) {
+ scratchCartographic.latitude += fudgeFactor;
+ } else if (j === count - 1) {
+ scratchCartographic.latitude += cornerFudge;
+ } else if (j === 0) {
+ scratchCartographic.latitude -= cornerFudge;
+ }
+ const pos = skirtOptions.ellipsoid.cartographicToCartesian(
+ scratchCartographic
+ );
+ positions.push(pos);
+ heights.push(height);
+ uvs.push(Cartesian2_default.clone(uvs[borderIndex]));
+ if (webMercatorTs.length > 0) {
+ webMercatorTs.push(webMercatorTs[borderIndex]);
+ }
+ if (geodeticSurfaceNormals.length > 0) {
+ geodeticSurfaceNormals.push(geodeticSurfaceNormals[borderIndex]);
+ }
+ Matrix4_default.multiplyByPoint(skirtOptions.toENU, pos, scratchCartesian);
+ const minimum = skirtOptions.minimum;
+ const maximum = skirtOptions.maximum;
+ Cartesian3_default.minimumByComponent(scratchCartesian, minimum, minimum);
+ Cartesian3_default.maximumByComponent(scratchCartesian, maximum, maximum);
+ const lastBorderPoint = skirtOptions.lastBorderPoint;
+ if (defined_default(lastBorderPoint)) {
+ const lastBorderIndex = lastBorderPoint.index;
+ indices.push(
+ lastBorderIndex,
+ currentIndex - 1,
+ currentIndex,
+ currentIndex,
+ borderIndex,
+ lastBorderIndex
+ );
+ }
+ skirtOptions.lastBorderPoint = borderPoint;
+ }
+}
+var createVerticesFromGoogleEarthEnterpriseBuffer_default = createTaskProcessorWorker_default(
+ createVerticesFromGoogleEarthEnterpriseBuffer
+);
+export {
+ createVerticesFromGoogleEarthEnterpriseBuffer_default as default
+};
diff --git a/public/assets/cesium/Workers/createVerticesFromHeightmap.js b/public/assets/cesium/Workers/createVerticesFromHeightmap.js
new file mode 100644
index 0000000000000000000000000000000000000000..b7211e4f915573c82673eb992e833f89a40ee62f
--- /dev/null
+++ b/public/assets/cesium/Workers/createVerticesFromHeightmap.js
@@ -0,0 +1,2280 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ EllipsoidalOccluder_default,
+ TerrainEncoding_default
+} from "./chunk-56EDBCGT.js";
+import {
+ createTaskProcessorWorker_default
+} from "./chunk-Z2QP3CXW.js";
+import {
+ WebMercatorProjection_default
+} from "./chunk-RJM36CNY.js";
+import {
+ OrientedBoundingBox_default
+} from "./chunk-2PTKXHJB.js";
+import "./chunk-LJ2JQHJT.js";
+import "./chunk-YK3QIKY7.js";
+import {
+ AxisAlignedBoundingBox_default
+} from "./chunk-NDDI2LWR.js";
+import "./chunk-QQOZO7KO.js";
+import "./chunk-EDLRS3AW.js";
+import {
+ BoundingSphere_default
+} from "./chunk-KHZNBFOH.js";
+import {
+ Matrix4_default,
+ Rectangle_default,
+ Transforms_default
+} from "./chunk-6SQMLVGV.js";
+import "./chunk-XIUSRWL6.js";
+import {
+ Cartesian2_default,
+ Cartesian3_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import {
+ RuntimeError_default
+} from "./chunk-LLAF3CPH.js";
+import {
+ defaultValue_default
+} from "./chunk-U5HSOKPQ.js";
+import {
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ __commonJS,
+ __toESM,
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// node_modules/lerc/LercDecode.js
+var require_LercDecode = __commonJS({
+ "node_modules/lerc/LercDecode.js"(exports, module) {
+ /* Copyright 2015-2018 Esri. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @preserve */
+ (function() {
+ var LercDecode = function() {
+ var CntZImage = {};
+ CntZImage.defaultNoDataValue = -34027999387901484e22;
+ CntZImage.decode = function(input, options) {
+ options = options || {};
+ var skipMask = options.encodedMaskData || options.encodedMaskData === null;
+ var parsedData = parse(input, options.inputOffset || 0, skipMask);
+ var noDataValue = options.noDataValue !== null ? options.noDataValue : CntZImage.defaultNoDataValue;
+ var uncompressedData = uncompressPixelValues(
+ parsedData,
+ options.pixelType || Float32Array,
+ options.encodedMaskData,
+ noDataValue,
+ options.returnMask
+ );
+ var result = {
+ width: parsedData.width,
+ height: parsedData.height,
+ pixelData: uncompressedData.resultPixels,
+ minValue: uncompressedData.minValue,
+ maxValue: parsedData.pixels.maxValue,
+ noDataValue
+ };
+ if (uncompressedData.resultMask) {
+ result.maskData = uncompressedData.resultMask;
+ }
+ if (options.returnEncodedMask && parsedData.mask) {
+ result.encodedMaskData = parsedData.mask.bitset ? parsedData.mask.bitset : null;
+ }
+ if (options.returnFileInfo) {
+ result.fileInfo = formatFileInfo(parsedData);
+ if (options.computeUsedBitDepths) {
+ result.fileInfo.bitDepths = computeUsedBitDepths(parsedData);
+ }
+ }
+ return result;
+ };
+ var uncompressPixelValues = function(data, TypedArrayClass, maskBitset, noDataValue, storeDecodedMask) {
+ var blockIdx = 0;
+ var numX = data.pixels.numBlocksX;
+ var numY = data.pixels.numBlocksY;
+ var blockWidth = Math.floor(data.width / numX);
+ var blockHeight = Math.floor(data.height / numY);
+ var scale = 2 * data.maxZError;
+ var minValue = Number.MAX_VALUE, currentValue;
+ maskBitset = maskBitset || (data.mask ? data.mask.bitset : null);
+ var resultPixels, resultMask;
+ resultPixels = new TypedArrayClass(data.width * data.height);
+ if (storeDecodedMask && maskBitset) {
+ resultMask = new Uint8Array(data.width * data.height);
+ }
+ var blockDataBuffer = new Float32Array(blockWidth * blockHeight);
+ var xx, yy;
+ for (var y = 0; y <= numY; y++) {
+ var thisBlockHeight = y !== numY ? blockHeight : data.height % numY;
+ if (thisBlockHeight === 0) {
+ continue;
+ }
+ for (var x = 0; x <= numX; x++) {
+ var thisBlockWidth = x !== numX ? blockWidth : data.width % numX;
+ if (thisBlockWidth === 0) {
+ continue;
+ }
+ var outPtr = y * data.width * blockHeight + x * blockWidth;
+ var outStride = data.width - thisBlockWidth;
+ var block = data.pixels.blocks[blockIdx];
+ var blockData, blockPtr, constValue;
+ if (block.encoding < 2) {
+ if (block.encoding === 0) {
+ blockData = block.rawData;
+ } else {
+ unstuff(block.stuffedData, block.bitsPerPixel, block.numValidPixels, block.offset, scale, blockDataBuffer, data.pixels.maxValue);
+ blockData = blockDataBuffer;
+ }
+ blockPtr = 0;
+ } else if (block.encoding === 2) {
+ constValue = 0;
+ } else {
+ constValue = block.offset;
+ }
+ var maskByte;
+ if (maskBitset) {
+ for (yy = 0; yy < thisBlockHeight; yy++) {
+ if (outPtr & 7) {
+ maskByte = maskBitset[outPtr >> 3];
+ maskByte <<= outPtr & 7;
+ }
+ for (xx = 0; xx < thisBlockWidth; xx++) {
+ if (!(outPtr & 7)) {
+ maskByte = maskBitset[outPtr >> 3];
+ }
+ if (maskByte & 128) {
+ if (resultMask) {
+ resultMask[outPtr] = 1;
+ }
+ currentValue = block.encoding < 2 ? blockData[blockPtr++] : constValue;
+ minValue = minValue > currentValue ? currentValue : minValue;
+ resultPixels[outPtr++] = currentValue;
+ } else {
+ if (resultMask) {
+ resultMask[outPtr] = 0;
+ }
+ resultPixels[outPtr++] = noDataValue;
+ }
+ maskByte <<= 1;
+ }
+ outPtr += outStride;
+ }
+ } else {
+ if (block.encoding < 2) {
+ for (yy = 0; yy < thisBlockHeight; yy++) {
+ for (xx = 0; xx < thisBlockWidth; xx++) {
+ currentValue = blockData[blockPtr++];
+ minValue = minValue > currentValue ? currentValue : minValue;
+ resultPixels[outPtr++] = currentValue;
+ }
+ outPtr += outStride;
+ }
+ } else {
+ minValue = minValue > constValue ? constValue : minValue;
+ for (yy = 0; yy < thisBlockHeight; yy++) {
+ for (xx = 0; xx < thisBlockWidth; xx++) {
+ resultPixels[outPtr++] = constValue;
+ }
+ outPtr += outStride;
+ }
+ }
+ }
+ if (block.encoding === 1 && blockPtr !== block.numValidPixels) {
+ throw "Block and Mask do not match";
+ }
+ blockIdx++;
+ }
+ }
+ return {
+ resultPixels,
+ resultMask,
+ minValue
+ };
+ };
+ var formatFileInfo = function(data) {
+ return {
+ "fileIdentifierString": data.fileIdentifierString,
+ "fileVersion": data.fileVersion,
+ "imageType": data.imageType,
+ "height": data.height,
+ "width": data.width,
+ "maxZError": data.maxZError,
+ "eofOffset": data.eofOffset,
+ "mask": data.mask ? {
+ "numBlocksX": data.mask.numBlocksX,
+ "numBlocksY": data.mask.numBlocksY,
+ "numBytes": data.mask.numBytes,
+ "maxValue": data.mask.maxValue
+ } : null,
+ "pixels": {
+ "numBlocksX": data.pixels.numBlocksX,
+ "numBlocksY": data.pixels.numBlocksY,
+ "numBytes": data.pixels.numBytes,
+ "maxValue": data.pixels.maxValue,
+ "noDataValue": data.noDataValue
+ }
+ };
+ };
+ var computeUsedBitDepths = function(data) {
+ var numBlocks = data.pixels.numBlocksX * data.pixels.numBlocksY;
+ var bitDepths = {};
+ for (var i = 0; i < numBlocks; i++) {
+ var block = data.pixels.blocks[i];
+ if (block.encoding === 0) {
+ bitDepths.float32 = true;
+ } else if (block.encoding === 1) {
+ bitDepths[block.bitsPerPixel] = true;
+ } else {
+ bitDepths[0] = true;
+ }
+ }
+ return Object.keys(bitDepths);
+ };
+ var parse = function(input, fp, skipMask) {
+ var data = {};
+ var fileIdView = new Uint8Array(input, fp, 10);
+ data.fileIdentifierString = String.fromCharCode.apply(null, fileIdView);
+ if (data.fileIdentifierString.trim() !== "CntZImage") {
+ throw "Unexpected file identifier string: " + data.fileIdentifierString;
+ }
+ fp += 10;
+ var view = new DataView(input, fp, 24);
+ data.fileVersion = view.getInt32(0, true);
+ data.imageType = view.getInt32(4, true);
+ data.height = view.getUint32(8, true);
+ data.width = view.getUint32(12, true);
+ data.maxZError = view.getFloat64(16, true);
+ fp += 24;
+ if (!skipMask) {
+ view = new DataView(input, fp, 16);
+ data.mask = {};
+ data.mask.numBlocksY = view.getUint32(0, true);
+ data.mask.numBlocksX = view.getUint32(4, true);
+ data.mask.numBytes = view.getUint32(8, true);
+ data.mask.maxValue = view.getFloat32(12, true);
+ fp += 16;
+ if (data.mask.numBytes > 0) {
+ var bitset = new Uint8Array(Math.ceil(data.width * data.height / 8));
+ view = new DataView(input, fp, data.mask.numBytes);
+ var cnt = view.getInt16(0, true);
+ var ip = 2, op = 0;
+ do {
+ if (cnt > 0) {
+ while (cnt--) {
+ bitset[op++] = view.getUint8(ip++);
+ }
+ } else {
+ var val = view.getUint8(ip++);
+ cnt = -cnt;
+ while (cnt--) {
+ bitset[op++] = val;
+ }
+ }
+ cnt = view.getInt16(ip, true);
+ ip += 2;
+ } while (ip < data.mask.numBytes);
+ if (cnt !== -32768 || op < bitset.length) {
+ throw "Unexpected end of mask RLE encoding";
+ }
+ data.mask.bitset = bitset;
+ fp += data.mask.numBytes;
+ } else if ((data.mask.numBytes | data.mask.numBlocksY | data.mask.maxValue) === 0) {
+ data.mask.bitset = new Uint8Array(Math.ceil(data.width * data.height / 8));
+ }
+ }
+ view = new DataView(input, fp, 16);
+ data.pixels = {};
+ data.pixels.numBlocksY = view.getUint32(0, true);
+ data.pixels.numBlocksX = view.getUint32(4, true);
+ data.pixels.numBytes = view.getUint32(8, true);
+ data.pixels.maxValue = view.getFloat32(12, true);
+ fp += 16;
+ var numBlocksX = data.pixels.numBlocksX;
+ var numBlocksY = data.pixels.numBlocksY;
+ var actualNumBlocksX = numBlocksX + (data.width % numBlocksX > 0 ? 1 : 0);
+ var actualNumBlocksY = numBlocksY + (data.height % numBlocksY > 0 ? 1 : 0);
+ data.pixels.blocks = new Array(actualNumBlocksX * actualNumBlocksY);
+ var blockI = 0;
+ for (var blockY = 0; blockY < actualNumBlocksY; blockY++) {
+ for (var blockX = 0; blockX < actualNumBlocksX; blockX++) {
+ var size = 0;
+ var bytesLeft = input.byteLength - fp;
+ view = new DataView(input, fp, Math.min(10, bytesLeft));
+ var block = {};
+ data.pixels.blocks[blockI++] = block;
+ var headerByte = view.getUint8(0);
+ size++;
+ block.encoding = headerByte & 63;
+ if (block.encoding > 3) {
+ throw "Invalid block encoding (" + block.encoding + ")";
+ }
+ if (block.encoding === 2) {
+ fp++;
+ continue;
+ }
+ if (headerByte !== 0 && headerByte !== 2) {
+ headerByte >>= 6;
+ block.offsetType = headerByte;
+ if (headerByte === 2) {
+ block.offset = view.getInt8(1);
+ size++;
+ } else if (headerByte === 1) {
+ block.offset = view.getInt16(1, true);
+ size += 2;
+ } else if (headerByte === 0) {
+ block.offset = view.getFloat32(1, true);
+ size += 4;
+ } else {
+ throw "Invalid block offset type";
+ }
+ if (block.encoding === 1) {
+ headerByte = view.getUint8(size);
+ size++;
+ block.bitsPerPixel = headerByte & 63;
+ headerByte >>= 6;
+ block.numValidPixelsType = headerByte;
+ if (headerByte === 2) {
+ block.numValidPixels = view.getUint8(size);
+ size++;
+ } else if (headerByte === 1) {
+ block.numValidPixels = view.getUint16(size, true);
+ size += 2;
+ } else if (headerByte === 0) {
+ block.numValidPixels = view.getUint32(size, true);
+ size += 4;
+ } else {
+ throw "Invalid valid pixel count type";
+ }
+ }
+ }
+ fp += size;
+ if (block.encoding === 3) {
+ continue;
+ }
+ var arrayBuf, store8;
+ if (block.encoding === 0) {
+ var numPixels = (data.pixels.numBytes - 1) / 4;
+ if (numPixels !== Math.floor(numPixels)) {
+ throw "uncompressed block has invalid length";
+ }
+ arrayBuf = new ArrayBuffer(numPixels * 4);
+ store8 = new Uint8Array(arrayBuf);
+ store8.set(new Uint8Array(input, fp, numPixels * 4));
+ var rawData = new Float32Array(arrayBuf);
+ block.rawData = rawData;
+ fp += numPixels * 4;
+ } else if (block.encoding === 1) {
+ var dataBytes = Math.ceil(block.numValidPixels * block.bitsPerPixel / 8);
+ var dataWords = Math.ceil(dataBytes / 4);
+ arrayBuf = new ArrayBuffer(dataWords * 4);
+ store8 = new Uint8Array(arrayBuf);
+ store8.set(new Uint8Array(input, fp, dataBytes));
+ block.stuffedData = new Uint32Array(arrayBuf);
+ fp += dataBytes;
+ }
+ }
+ }
+ data.eofOffset = fp;
+ return data;
+ };
+ var unstuff = function(src, bitsPerPixel, numPixels, offset, scale, dest, maxValue) {
+ var bitMask = (1 << bitsPerPixel) - 1;
+ var i = 0, o;
+ var bitsLeft = 0;
+ var n, buffer;
+ var nmax = Math.ceil((maxValue - offset) / scale);
+ var numInvalidTailBytes = src.length * 4 - Math.ceil(bitsPerPixel * numPixels / 8);
+ src[src.length - 1] <<= 8 * numInvalidTailBytes;
+ for (o = 0; o < numPixels; o++) {
+ if (bitsLeft === 0) {
+ buffer = src[i++];
+ bitsLeft = 32;
+ }
+ if (bitsLeft >= bitsPerPixel) {
+ n = buffer >>> bitsLeft - bitsPerPixel & bitMask;
+ bitsLeft -= bitsPerPixel;
+ } else {
+ var missingBits = bitsPerPixel - bitsLeft;
+ n = (buffer & bitMask) << missingBits & bitMask;
+ buffer = src[i++];
+ bitsLeft = 32 - missingBits;
+ n += buffer >>> bitsLeft;
+ }
+ dest[o] = n < nmax ? offset + n * scale : maxValue;
+ }
+ return dest;
+ };
+ return CntZImage;
+ }();
+ var Lerc2Decode = function() {
+ "use strict";
+ var BitStuffer = {
+ //methods ending with 2 are for the new byte order used by Lerc2.3 and above.
+ //originalUnstuff is used to unpack Huffman code table. code is duplicated to unstuffx for performance reasons.
+ unstuff: function(src, dest, bitsPerPixel, numPixels, lutArr, offset, scale, maxValue) {
+ var bitMask = (1 << bitsPerPixel) - 1;
+ var i = 0, o;
+ var bitsLeft = 0;
+ var n, buffer, missingBits, nmax;
+ var numInvalidTailBytes = src.length * 4 - Math.ceil(bitsPerPixel * numPixels / 8);
+ src[src.length - 1] <<= 8 * numInvalidTailBytes;
+ if (lutArr) {
+ for (o = 0; o < numPixels; o++) {
+ if (bitsLeft === 0) {
+ buffer = src[i++];
+ bitsLeft = 32;
+ }
+ if (bitsLeft >= bitsPerPixel) {
+ n = buffer >>> bitsLeft - bitsPerPixel & bitMask;
+ bitsLeft -= bitsPerPixel;
+ } else {
+ missingBits = bitsPerPixel - bitsLeft;
+ n = (buffer & bitMask) << missingBits & bitMask;
+ buffer = src[i++];
+ bitsLeft = 32 - missingBits;
+ n += buffer >>> bitsLeft;
+ }
+ dest[o] = lutArr[n];
+ }
+ } else {
+ nmax = Math.ceil((maxValue - offset) / scale);
+ for (o = 0; o < numPixels; o++) {
+ if (bitsLeft === 0) {
+ buffer = src[i++];
+ bitsLeft = 32;
+ }
+ if (bitsLeft >= bitsPerPixel) {
+ n = buffer >>> bitsLeft - bitsPerPixel & bitMask;
+ bitsLeft -= bitsPerPixel;
+ } else {
+ missingBits = bitsPerPixel - bitsLeft;
+ n = (buffer & bitMask) << missingBits & bitMask;
+ buffer = src[i++];
+ bitsLeft = 32 - missingBits;
+ n += buffer >>> bitsLeft;
+ }
+ dest[o] = n < nmax ? offset + n * scale : maxValue;
+ }
+ }
+ },
+ unstuffLUT: function(src, bitsPerPixel, numPixels, offset, scale, maxValue) {
+ var bitMask = (1 << bitsPerPixel) - 1;
+ var i = 0, o = 0, missingBits = 0, bitsLeft = 0, n = 0;
+ var buffer;
+ var dest = [];
+ var numInvalidTailBytes = src.length * 4 - Math.ceil(bitsPerPixel * numPixels / 8);
+ src[src.length - 1] <<= 8 * numInvalidTailBytes;
+ var nmax = Math.ceil((maxValue - offset) / scale);
+ for (o = 0; o < numPixels; o++) {
+ if (bitsLeft === 0) {
+ buffer = src[i++];
+ bitsLeft = 32;
+ }
+ if (bitsLeft >= bitsPerPixel) {
+ n = buffer >>> bitsLeft - bitsPerPixel & bitMask;
+ bitsLeft -= bitsPerPixel;
+ } else {
+ missingBits = bitsPerPixel - bitsLeft;
+ n = (buffer & bitMask) << missingBits & bitMask;
+ buffer = src[i++];
+ bitsLeft = 32 - missingBits;
+ n += buffer >>> bitsLeft;
+ }
+ dest[o] = n < nmax ? offset + n * scale : maxValue;
+ }
+ dest.unshift(offset);
+ return dest;
+ },
+ unstuff2: function(src, dest, bitsPerPixel, numPixels, lutArr, offset, scale, maxValue) {
+ var bitMask = (1 << bitsPerPixel) - 1;
+ var i = 0, o;
+ var bitsLeft = 0, bitPos = 0;
+ var n, buffer, missingBits;
+ if (lutArr) {
+ for (o = 0; o < numPixels; o++) {
+ if (bitsLeft === 0) {
+ buffer = src[i++];
+ bitsLeft = 32;
+ bitPos = 0;
+ }
+ if (bitsLeft >= bitsPerPixel) {
+ n = buffer >>> bitPos & bitMask;
+ bitsLeft -= bitsPerPixel;
+ bitPos += bitsPerPixel;
+ } else {
+ missingBits = bitsPerPixel - bitsLeft;
+ n = buffer >>> bitPos & bitMask;
+ buffer = src[i++];
+ bitsLeft = 32 - missingBits;
+ n |= (buffer & (1 << missingBits) - 1) << bitsPerPixel - missingBits;
+ bitPos = missingBits;
+ }
+ dest[o] = lutArr[n];
+ }
+ } else {
+ var nmax = Math.ceil((maxValue - offset) / scale);
+ for (o = 0; o < numPixels; o++) {
+ if (bitsLeft === 0) {
+ buffer = src[i++];
+ bitsLeft = 32;
+ bitPos = 0;
+ }
+ if (bitsLeft >= bitsPerPixel) {
+ n = buffer >>> bitPos & bitMask;
+ bitsLeft -= bitsPerPixel;
+ bitPos += bitsPerPixel;
+ } else {
+ missingBits = bitsPerPixel - bitsLeft;
+ n = buffer >>> bitPos & bitMask;
+ buffer = src[i++];
+ bitsLeft = 32 - missingBits;
+ n |= (buffer & (1 << missingBits) - 1) << bitsPerPixel - missingBits;
+ bitPos = missingBits;
+ }
+ dest[o] = n < nmax ? offset + n * scale : maxValue;
+ }
+ }
+ return dest;
+ },
+ unstuffLUT2: function(src, bitsPerPixel, numPixels, offset, scale, maxValue) {
+ var bitMask = (1 << bitsPerPixel) - 1;
+ var i = 0, o = 0, missingBits = 0, bitsLeft = 0, n = 0, bitPos = 0;
+ var buffer;
+ var dest = [];
+ var nmax = Math.ceil((maxValue - offset) / scale);
+ for (o = 0; o < numPixels; o++) {
+ if (bitsLeft === 0) {
+ buffer = src[i++];
+ bitsLeft = 32;
+ bitPos = 0;
+ }
+ if (bitsLeft >= bitsPerPixel) {
+ n = buffer >>> bitPos & bitMask;
+ bitsLeft -= bitsPerPixel;
+ bitPos += bitsPerPixel;
+ } else {
+ missingBits = bitsPerPixel - bitsLeft;
+ n = buffer >>> bitPos & bitMask;
+ buffer = src[i++];
+ bitsLeft = 32 - missingBits;
+ n |= (buffer & (1 << missingBits) - 1) << bitsPerPixel - missingBits;
+ bitPos = missingBits;
+ }
+ dest[o] = n < nmax ? offset + n * scale : maxValue;
+ }
+ dest.unshift(offset);
+ return dest;
+ },
+ originalUnstuff: function(src, dest, bitsPerPixel, numPixels) {
+ var bitMask = (1 << bitsPerPixel) - 1;
+ var i = 0, o;
+ var bitsLeft = 0;
+ var n, buffer, missingBits;
+ var numInvalidTailBytes = src.length * 4 - Math.ceil(bitsPerPixel * numPixels / 8);
+ src[src.length - 1] <<= 8 * numInvalidTailBytes;
+ for (o = 0; o < numPixels; o++) {
+ if (bitsLeft === 0) {
+ buffer = src[i++];
+ bitsLeft = 32;
+ }
+ if (bitsLeft >= bitsPerPixel) {
+ n = buffer >>> bitsLeft - bitsPerPixel & bitMask;
+ bitsLeft -= bitsPerPixel;
+ } else {
+ missingBits = bitsPerPixel - bitsLeft;
+ n = (buffer & bitMask) << missingBits & bitMask;
+ buffer = src[i++];
+ bitsLeft = 32 - missingBits;
+ n += buffer >>> bitsLeft;
+ }
+ dest[o] = n;
+ }
+ return dest;
+ },
+ originalUnstuff2: function(src, dest, bitsPerPixel, numPixels) {
+ var bitMask = (1 << bitsPerPixel) - 1;
+ var i = 0, o;
+ var bitsLeft = 0, bitPos = 0;
+ var n, buffer, missingBits;
+ for (o = 0; o < numPixels; o++) {
+ if (bitsLeft === 0) {
+ buffer = src[i++];
+ bitsLeft = 32;
+ bitPos = 0;
+ }
+ if (bitsLeft >= bitsPerPixel) {
+ n = buffer >>> bitPos & bitMask;
+ bitsLeft -= bitsPerPixel;
+ bitPos += bitsPerPixel;
+ } else {
+ missingBits = bitsPerPixel - bitsLeft;
+ n = buffer >>> bitPos & bitMask;
+ buffer = src[i++];
+ bitsLeft = 32 - missingBits;
+ n |= (buffer & (1 << missingBits) - 1) << bitsPerPixel - missingBits;
+ bitPos = missingBits;
+ }
+ dest[o] = n;
+ }
+ return dest;
+ }
+ };
+ var Lerc2Helpers = {
+ HUFFMAN_LUT_BITS_MAX: 12,
+ //use 2^12 lut, treat it like constant
+ computeChecksumFletcher32: function(input) {
+ var sum1 = 65535, sum2 = 65535;
+ var len = input.length;
+ var words = Math.floor(len / 2);
+ var i = 0;
+ while (words) {
+ var tlen = words >= 359 ? 359 : words;
+ words -= tlen;
+ do {
+ sum1 += input[i++] << 8;
+ sum2 += sum1 += input[i++];
+ } while (--tlen);
+ sum1 = (sum1 & 65535) + (sum1 >>> 16);
+ sum2 = (sum2 & 65535) + (sum2 >>> 16);
+ }
+ if (len & 1) {
+ sum2 += sum1 += input[i] << 8;
+ }
+ sum1 = (sum1 & 65535) + (sum1 >>> 16);
+ sum2 = (sum2 & 65535) + (sum2 >>> 16);
+ return (sum2 << 16 | sum1) >>> 0;
+ },
+ readHeaderInfo: function(input, data) {
+ var ptr = data.ptr;
+ var fileIdView = new Uint8Array(input, ptr, 6);
+ var headerInfo = {};
+ headerInfo.fileIdentifierString = String.fromCharCode.apply(null, fileIdView);
+ if (headerInfo.fileIdentifierString.lastIndexOf("Lerc2", 0) !== 0) {
+ throw "Unexpected file identifier string (expect Lerc2 ): " + headerInfo.fileIdentifierString;
+ }
+ ptr += 6;
+ var view = new DataView(input, ptr, 8);
+ var fileVersion = view.getInt32(0, true);
+ headerInfo.fileVersion = fileVersion;
+ ptr += 4;
+ if (fileVersion >= 3) {
+ headerInfo.checksum = view.getUint32(4, true);
+ ptr += 4;
+ }
+ view = new DataView(input, ptr, 12);
+ headerInfo.height = view.getUint32(0, true);
+ headerInfo.width = view.getUint32(4, true);
+ ptr += 8;
+ if (fileVersion >= 4) {
+ headerInfo.numDims = view.getUint32(8, true);
+ ptr += 4;
+ } else {
+ headerInfo.numDims = 1;
+ }
+ view = new DataView(input, ptr, 40);
+ headerInfo.numValidPixel = view.getUint32(0, true);
+ headerInfo.microBlockSize = view.getInt32(4, true);
+ headerInfo.blobSize = view.getInt32(8, true);
+ headerInfo.imageType = view.getInt32(12, true);
+ headerInfo.maxZError = view.getFloat64(16, true);
+ headerInfo.zMin = view.getFloat64(24, true);
+ headerInfo.zMax = view.getFloat64(32, true);
+ ptr += 40;
+ data.headerInfo = headerInfo;
+ data.ptr = ptr;
+ var checksum, keyLength;
+ if (fileVersion >= 3) {
+ keyLength = fileVersion >= 4 ? 52 : 48;
+ checksum = this.computeChecksumFletcher32(new Uint8Array(input, ptr - keyLength, headerInfo.blobSize - 14));
+ if (checksum !== headerInfo.checksum) {
+ throw "Checksum failed.";
+ }
+ }
+ return true;
+ },
+ checkMinMaxRanges: function(input, data) {
+ var headerInfo = data.headerInfo;
+ var OutPixelTypeArray = this.getDataTypeArray(headerInfo.imageType);
+ var rangeBytes = headerInfo.numDims * this.getDataTypeSize(headerInfo.imageType);
+ var minValues = this.readSubArray(input, data.ptr, OutPixelTypeArray, rangeBytes);
+ var maxValues = this.readSubArray(input, data.ptr + rangeBytes, OutPixelTypeArray, rangeBytes);
+ data.ptr += 2 * rangeBytes;
+ var i, equal = true;
+ for (i = 0; i < headerInfo.numDims; i++) {
+ if (minValues[i] !== maxValues[i]) {
+ equal = false;
+ break;
+ }
+ }
+ headerInfo.minValues = minValues;
+ headerInfo.maxValues = maxValues;
+ return equal;
+ },
+ readSubArray: function(input, ptr, OutPixelTypeArray, numBytes) {
+ var rawData;
+ if (OutPixelTypeArray === Uint8Array) {
+ rawData = new Uint8Array(input, ptr, numBytes);
+ } else {
+ var arrayBuf = new ArrayBuffer(numBytes);
+ var store8 = new Uint8Array(arrayBuf);
+ store8.set(new Uint8Array(input, ptr, numBytes));
+ rawData = new OutPixelTypeArray(arrayBuf);
+ }
+ return rawData;
+ },
+ readMask: function(input, data) {
+ var ptr = data.ptr;
+ var headerInfo = data.headerInfo;
+ var numPixels = headerInfo.width * headerInfo.height;
+ var numValidPixel = headerInfo.numValidPixel;
+ var view = new DataView(input, ptr, 4);
+ var mask = {};
+ mask.numBytes = view.getUint32(0, true);
+ ptr += 4;
+ if ((0 === numValidPixel || numPixels === numValidPixel) && 0 !== mask.numBytes) {
+ throw "invalid mask";
+ }
+ var bitset, resultMask;
+ if (numValidPixel === 0) {
+ bitset = new Uint8Array(Math.ceil(numPixels / 8));
+ mask.bitset = bitset;
+ resultMask = new Uint8Array(numPixels);
+ data.pixels.resultMask = resultMask;
+ ptr += mask.numBytes;
+ } else if (mask.numBytes > 0) {
+ bitset = new Uint8Array(Math.ceil(numPixels / 8));
+ view = new DataView(input, ptr, mask.numBytes);
+ var cnt = view.getInt16(0, true);
+ var ip = 2, op = 0, val = 0;
+ do {
+ if (cnt > 0) {
+ while (cnt--) {
+ bitset[op++] = view.getUint8(ip++);
+ }
+ } else {
+ val = view.getUint8(ip++);
+ cnt = -cnt;
+ while (cnt--) {
+ bitset[op++] = val;
+ }
+ }
+ cnt = view.getInt16(ip, true);
+ ip += 2;
+ } while (ip < mask.numBytes);
+ if (cnt !== -32768 || op < bitset.length) {
+ throw "Unexpected end of mask RLE encoding";
+ }
+ resultMask = new Uint8Array(numPixels);
+ var mb = 0, k = 0;
+ for (k = 0; k < numPixels; k++) {
+ if (k & 7) {
+ mb = bitset[k >> 3];
+ mb <<= k & 7;
+ } else {
+ mb = bitset[k >> 3];
+ }
+ if (mb & 128) {
+ resultMask[k] = 1;
+ }
+ }
+ data.pixels.resultMask = resultMask;
+ mask.bitset = bitset;
+ ptr += mask.numBytes;
+ }
+ data.ptr = ptr;
+ data.mask = mask;
+ return true;
+ },
+ readDataOneSweep: function(input, data, OutPixelTypeArray) {
+ var ptr = data.ptr;
+ var headerInfo = data.headerInfo;
+ var numDims = headerInfo.numDims;
+ var numPixels = headerInfo.width * headerInfo.height;
+ var imageType = headerInfo.imageType;
+ var numBytes = headerInfo.numValidPixel * Lerc2Helpers.getDataTypeSize(imageType) * numDims;
+ var rawData;
+ var mask = data.pixels.resultMask;
+ if (OutPixelTypeArray === Uint8Array) {
+ rawData = new Uint8Array(input, ptr, numBytes);
+ } else {
+ var arrayBuf = new ArrayBuffer(numBytes);
+ var store8 = new Uint8Array(arrayBuf);
+ store8.set(new Uint8Array(input, ptr, numBytes));
+ rawData = new OutPixelTypeArray(arrayBuf);
+ }
+ if (rawData.length === numPixels * numDims) {
+ data.pixels.resultPixels = rawData;
+ } else {
+ data.pixels.resultPixels = new OutPixelTypeArray(numPixels * numDims);
+ var z = 0, k = 0, i = 0, nStart = 0;
+ if (numDims > 1) {
+ for (i = 0; i < numDims; i++) {
+ nStart = i * numPixels;
+ for (k = 0; k < numPixels; k++) {
+ if (mask[k]) {
+ data.pixels.resultPixels[nStart + k] = rawData[z++];
+ }
+ }
+ }
+ } else {
+ for (k = 0; k < numPixels; k++) {
+ if (mask[k]) {
+ data.pixels.resultPixels[k] = rawData[z++];
+ }
+ }
+ }
+ }
+ ptr += numBytes;
+ data.ptr = ptr;
+ return true;
+ },
+ readHuffmanTree: function(input, data) {
+ var BITS_MAX = this.HUFFMAN_LUT_BITS_MAX;
+ var view = new DataView(input, data.ptr, 16);
+ data.ptr += 16;
+ var version = view.getInt32(0, true);
+ if (version < 2) {
+ throw "unsupported Huffman version";
+ }
+ var size = view.getInt32(4, true);
+ var i0 = view.getInt32(8, true);
+ var i1 = view.getInt32(12, true);
+ if (i0 >= i1) {
+ return false;
+ }
+ var blockDataBuffer = new Uint32Array(i1 - i0);
+ Lerc2Helpers.decodeBits(input, data, blockDataBuffer);
+ var codeTable = [];
+ var i, j, k, len;
+ for (i = i0; i < i1; i++) {
+ j = i - (i < size ? 0 : size);
+ codeTable[j] = { first: blockDataBuffer[i - i0], second: null };
+ }
+ var dataBytes = input.byteLength - data.ptr;
+ var dataWords = Math.ceil(dataBytes / 4);
+ var arrayBuf = new ArrayBuffer(dataWords * 4);
+ var store8 = new Uint8Array(arrayBuf);
+ store8.set(new Uint8Array(input, data.ptr, dataBytes));
+ var stuffedData = new Uint32Array(arrayBuf);
+ var bitPos = 0, word, srcPtr = 0;
+ word = stuffedData[0];
+ for (i = i0; i < i1; i++) {
+ j = i - (i < size ? 0 : size);
+ len = codeTable[j].first;
+ if (len > 0) {
+ codeTable[j].second = word << bitPos >>> 32 - len;
+ if (32 - bitPos >= len) {
+ bitPos += len;
+ if (bitPos === 32) {
+ bitPos = 0;
+ srcPtr++;
+ word = stuffedData[srcPtr];
+ }
+ } else {
+ bitPos += len - 32;
+ srcPtr++;
+ word = stuffedData[srcPtr];
+ codeTable[j].second |= word >>> 32 - bitPos;
+ }
+ }
+ }
+ var numBitsLUT = 0, numBitsLUTQick = 0;
+ var tree = new TreeNode();
+ for (i = 0; i < codeTable.length; i++) {
+ if (codeTable[i] !== void 0) {
+ numBitsLUT = Math.max(numBitsLUT, codeTable[i].first);
+ }
+ }
+ if (numBitsLUT >= BITS_MAX) {
+ numBitsLUTQick = BITS_MAX;
+ } else {
+ numBitsLUTQick = numBitsLUT;
+ }
+ if (numBitsLUT >= 30) {
+ console.log("WARning, large NUM LUT BITS IS " + numBitsLUT);
+ }
+ var decodeLut = [], entry, code, numEntries, jj, currentBit, node;
+ for (i = i0; i < i1; i++) {
+ j = i - (i < size ? 0 : size);
+ len = codeTable[j].first;
+ if (len > 0) {
+ entry = [len, j];
+ if (len <= numBitsLUTQick) {
+ code = codeTable[j].second << numBitsLUTQick - len;
+ numEntries = 1 << numBitsLUTQick - len;
+ for (k = 0; k < numEntries; k++) {
+ decodeLut[code | k] = entry;
+ }
+ } else {
+ code = codeTable[j].second;
+ node = tree;
+ for (jj = len - 1; jj >= 0; jj--) {
+ currentBit = code >>> jj & 1;
+ if (currentBit) {
+ if (!node.right) {
+ node.right = new TreeNode();
+ }
+ node = node.right;
+ } else {
+ if (!node.left) {
+ node.left = new TreeNode();
+ }
+ node = node.left;
+ }
+ if (jj === 0 && !node.val) {
+ node.val = entry[1];
+ }
+ }
+ }
+ }
+ }
+ return {
+ decodeLut,
+ numBitsLUTQick,
+ numBitsLUT,
+ tree,
+ stuffedData,
+ srcPtr,
+ bitPos
+ };
+ },
+ readHuffman: function(input, data, OutPixelTypeArray) {
+ var headerInfo = data.headerInfo;
+ var numDims = headerInfo.numDims;
+ var height = data.headerInfo.height;
+ var width = data.headerInfo.width;
+ var numPixels = width * height;
+ var huffmanInfo = this.readHuffmanTree(input, data);
+ var decodeLut = huffmanInfo.decodeLut;
+ var tree = huffmanInfo.tree;
+ var stuffedData = huffmanInfo.stuffedData;
+ var srcPtr = huffmanInfo.srcPtr;
+ var bitPos = huffmanInfo.bitPos;
+ var numBitsLUTQick = huffmanInfo.numBitsLUTQick;
+ var numBitsLUT = huffmanInfo.numBitsLUT;
+ var offset = data.headerInfo.imageType === 0 ? 128 : 0;
+ var node, val, delta, mask = data.pixels.resultMask, valTmp, valTmpQuick, currentBit;
+ var i, j, k, ii;
+ var prevVal = 0;
+ if (bitPos > 0) {
+ srcPtr++;
+ bitPos = 0;
+ }
+ var word = stuffedData[srcPtr];
+ var deltaEncode = data.encodeMode === 1;
+ var resultPixelsAllDim = new OutPixelTypeArray(numPixels * numDims);
+ var resultPixels = resultPixelsAllDim;
+ var iDim;
+ for (iDim = 0; iDim < headerInfo.numDims; iDim++) {
+ if (numDims > 1) {
+ resultPixels = new OutPixelTypeArray(resultPixelsAllDim.buffer, numPixels * iDim, numPixels);
+ prevVal = 0;
+ }
+ if (data.headerInfo.numValidPixel === width * height) {
+ for (k = 0, i = 0; i < height; i++) {
+ for (j = 0; j < width; j++, k++) {
+ val = 0;
+ valTmp = word << bitPos >>> 32 - numBitsLUTQick;
+ valTmpQuick = valTmp;
+ if (32 - bitPos < numBitsLUTQick) {
+ valTmp |= stuffedData[srcPtr + 1] >>> 64 - bitPos - numBitsLUTQick;
+ valTmpQuick = valTmp;
+ }
+ if (decodeLut[valTmpQuick]) {
+ val = decodeLut[valTmpQuick][1];
+ bitPos += decodeLut[valTmpQuick][0];
+ } else {
+ valTmp = word << bitPos >>> 32 - numBitsLUT;
+ valTmpQuick = valTmp;
+ if (32 - bitPos < numBitsLUT) {
+ valTmp |= stuffedData[srcPtr + 1] >>> 64 - bitPos - numBitsLUT;
+ valTmpQuick = valTmp;
+ }
+ node = tree;
+ for (ii = 0; ii < numBitsLUT; ii++) {
+ currentBit = valTmp >>> numBitsLUT - ii - 1 & 1;
+ node = currentBit ? node.right : node.left;
+ if (!(node.left || node.right)) {
+ val = node.val;
+ bitPos = bitPos + ii + 1;
+ break;
+ }
+ }
+ }
+ if (bitPos >= 32) {
+ bitPos -= 32;
+ srcPtr++;
+ word = stuffedData[srcPtr];
+ }
+ delta = val - offset;
+ if (deltaEncode) {
+ if (j > 0) {
+ delta += prevVal;
+ } else if (i > 0) {
+ delta += resultPixels[k - width];
+ } else {
+ delta += prevVal;
+ }
+ delta &= 255;
+ resultPixels[k] = delta;
+ prevVal = delta;
+ } else {
+ resultPixels[k] = delta;
+ }
+ }
+ }
+ } else {
+ for (k = 0, i = 0; i < height; i++) {
+ for (j = 0; j < width; j++, k++) {
+ if (mask[k]) {
+ val = 0;
+ valTmp = word << bitPos >>> 32 - numBitsLUTQick;
+ valTmpQuick = valTmp;
+ if (32 - bitPos < numBitsLUTQick) {
+ valTmp |= stuffedData[srcPtr + 1] >>> 64 - bitPos - numBitsLUTQick;
+ valTmpQuick = valTmp;
+ }
+ if (decodeLut[valTmpQuick]) {
+ val = decodeLut[valTmpQuick][1];
+ bitPos += decodeLut[valTmpQuick][0];
+ } else {
+ valTmp = word << bitPos >>> 32 - numBitsLUT;
+ valTmpQuick = valTmp;
+ if (32 - bitPos < numBitsLUT) {
+ valTmp |= stuffedData[srcPtr + 1] >>> 64 - bitPos - numBitsLUT;
+ valTmpQuick = valTmp;
+ }
+ node = tree;
+ for (ii = 0; ii < numBitsLUT; ii++) {
+ currentBit = valTmp >>> numBitsLUT - ii - 1 & 1;
+ node = currentBit ? node.right : node.left;
+ if (!(node.left || node.right)) {
+ val = node.val;
+ bitPos = bitPos + ii + 1;
+ break;
+ }
+ }
+ }
+ if (bitPos >= 32) {
+ bitPos -= 32;
+ srcPtr++;
+ word = stuffedData[srcPtr];
+ }
+ delta = val - offset;
+ if (deltaEncode) {
+ if (j > 0 && mask[k - 1]) {
+ delta += prevVal;
+ } else if (i > 0 && mask[k - width]) {
+ delta += resultPixels[k - width];
+ } else {
+ delta += prevVal;
+ }
+ delta &= 255;
+ resultPixels[k] = delta;
+ prevVal = delta;
+ } else {
+ resultPixels[k] = delta;
+ }
+ }
+ }
+ }
+ }
+ data.ptr = data.ptr + (srcPtr + 1) * 4 + (bitPos > 0 ? 4 : 0);
+ }
+ data.pixels.resultPixels = resultPixelsAllDim;
+ },
+ decodeBits: function(input, data, blockDataBuffer, offset, iDim) {
+ {
+ var headerInfo = data.headerInfo;
+ var fileVersion = headerInfo.fileVersion;
+ var blockPtr = 0;
+ var view = new DataView(input, data.ptr, 5);
+ var headerByte = view.getUint8(0);
+ blockPtr++;
+ var bits67 = headerByte >> 6;
+ var n = bits67 === 0 ? 4 : 3 - bits67;
+ var doLut = (headerByte & 32) > 0 ? true : false;
+ var numBits = headerByte & 31;
+ var numElements = 0;
+ if (n === 1) {
+ numElements = view.getUint8(blockPtr);
+ blockPtr++;
+ } else if (n === 2) {
+ numElements = view.getUint16(blockPtr, true);
+ blockPtr += 2;
+ } else if (n === 4) {
+ numElements = view.getUint32(blockPtr, true);
+ blockPtr += 4;
+ } else {
+ throw "Invalid valid pixel count type";
+ }
+ var scale = 2 * headerInfo.maxZError;
+ var stuffedData, arrayBuf, store8, dataBytes, dataWords;
+ var lutArr, lutData, lutBytes, lutBitsPerElement, bitsPerPixel;
+ var zMax = headerInfo.numDims > 1 ? headerInfo.maxValues[iDim] : headerInfo.zMax;
+ if (doLut) {
+ data.counter.lut++;
+ lutBytes = view.getUint8(blockPtr);
+ lutBitsPerElement = numBits;
+ blockPtr++;
+ dataBytes = Math.ceil((lutBytes - 1) * numBits / 8);
+ dataWords = Math.ceil(dataBytes / 4);
+ arrayBuf = new ArrayBuffer(dataWords * 4);
+ store8 = new Uint8Array(arrayBuf);
+ data.ptr += blockPtr;
+ store8.set(new Uint8Array(input, data.ptr, dataBytes));
+ lutData = new Uint32Array(arrayBuf);
+ data.ptr += dataBytes;
+ bitsPerPixel = 0;
+ while (lutBytes - 1 >>> bitsPerPixel) {
+ bitsPerPixel++;
+ }
+ dataBytes = Math.ceil(numElements * bitsPerPixel / 8);
+ dataWords = Math.ceil(dataBytes / 4);
+ arrayBuf = new ArrayBuffer(dataWords * 4);
+ store8 = new Uint8Array(arrayBuf);
+ store8.set(new Uint8Array(input, data.ptr, dataBytes));
+ stuffedData = new Uint32Array(arrayBuf);
+ data.ptr += dataBytes;
+ if (fileVersion >= 3) {
+ lutArr = BitStuffer.unstuffLUT2(lutData, numBits, lutBytes - 1, offset, scale, zMax);
+ } else {
+ lutArr = BitStuffer.unstuffLUT(lutData, numBits, lutBytes - 1, offset, scale, zMax);
+ }
+ if (fileVersion >= 3) {
+ BitStuffer.unstuff2(stuffedData, blockDataBuffer, bitsPerPixel, numElements, lutArr);
+ } else {
+ BitStuffer.unstuff(stuffedData, blockDataBuffer, bitsPerPixel, numElements, lutArr);
+ }
+ } else {
+ data.counter.bitstuffer++;
+ bitsPerPixel = numBits;
+ data.ptr += blockPtr;
+ if (bitsPerPixel > 0) {
+ dataBytes = Math.ceil(numElements * bitsPerPixel / 8);
+ dataWords = Math.ceil(dataBytes / 4);
+ arrayBuf = new ArrayBuffer(dataWords * 4);
+ store8 = new Uint8Array(arrayBuf);
+ store8.set(new Uint8Array(input, data.ptr, dataBytes));
+ stuffedData = new Uint32Array(arrayBuf);
+ data.ptr += dataBytes;
+ if (fileVersion >= 3) {
+ if (offset == null) {
+ BitStuffer.originalUnstuff2(stuffedData, blockDataBuffer, bitsPerPixel, numElements);
+ } else {
+ BitStuffer.unstuff2(stuffedData, blockDataBuffer, bitsPerPixel, numElements, false, offset, scale, zMax);
+ }
+ } else {
+ if (offset == null) {
+ BitStuffer.originalUnstuff(stuffedData, blockDataBuffer, bitsPerPixel, numElements);
+ } else {
+ BitStuffer.unstuff(stuffedData, blockDataBuffer, bitsPerPixel, numElements, false, offset, scale, zMax);
+ }
+ }
+ }
+ }
+ }
+ },
+ readTiles: function(input, data, OutPixelTypeArray) {
+ var headerInfo = data.headerInfo;
+ var width = headerInfo.width;
+ var height = headerInfo.height;
+ var microBlockSize = headerInfo.microBlockSize;
+ var imageType = headerInfo.imageType;
+ var dataTypeSize = Lerc2Helpers.getDataTypeSize(imageType);
+ var numBlocksX = Math.ceil(width / microBlockSize);
+ var numBlocksY = Math.ceil(height / microBlockSize);
+ data.pixels.numBlocksY = numBlocksY;
+ data.pixels.numBlocksX = numBlocksX;
+ data.pixels.ptr = 0;
+ var row = 0, col = 0, blockY = 0, blockX = 0, thisBlockHeight = 0, thisBlockWidth = 0, bytesLeft = 0, headerByte = 0, bits67 = 0, testCode = 0, outPtr = 0, outStride = 0, numBytes = 0, bytesleft = 0, z = 0, blockPtr = 0;
+ var view, block, arrayBuf, store8, rawData;
+ var blockEncoding;
+ var blockDataBuffer = new OutPixelTypeArray(microBlockSize * microBlockSize);
+ var lastBlockHeight = height % microBlockSize || microBlockSize;
+ var lastBlockWidth = width % microBlockSize || microBlockSize;
+ var offsetType, offset;
+ var numDims = headerInfo.numDims, iDim;
+ var mask = data.pixels.resultMask;
+ var resultPixels = data.pixels.resultPixels;
+ for (blockY = 0; blockY < numBlocksY; blockY++) {
+ thisBlockHeight = blockY !== numBlocksY - 1 ? microBlockSize : lastBlockHeight;
+ for (blockX = 0; blockX < numBlocksX; blockX++) {
+ thisBlockWidth = blockX !== numBlocksX - 1 ? microBlockSize : lastBlockWidth;
+ outPtr = blockY * width * microBlockSize + blockX * microBlockSize;
+ outStride = width - thisBlockWidth;
+ for (iDim = 0; iDim < numDims; iDim++) {
+ if (numDims > 1) {
+ resultPixels = new OutPixelTypeArray(data.pixels.resultPixels.buffer, width * height * iDim * dataTypeSize, width * height);
+ }
+ bytesLeft = input.byteLength - data.ptr;
+ view = new DataView(input, data.ptr, Math.min(10, bytesLeft));
+ block = {};
+ blockPtr = 0;
+ headerByte = view.getUint8(0);
+ blockPtr++;
+ bits67 = headerByte >> 6 & 255;
+ testCode = headerByte >> 2 & 15;
+ if (testCode !== (blockX * microBlockSize >> 3 & 15)) {
+ throw "integrity issue";
+ }
+ blockEncoding = headerByte & 3;
+ if (blockEncoding > 3) {
+ data.ptr += blockPtr;
+ throw "Invalid block encoding (" + blockEncoding + ")";
+ } else if (blockEncoding === 2) {
+ data.counter.constant++;
+ data.ptr += blockPtr;
+ continue;
+ } else if (blockEncoding === 0) {
+ data.counter.uncompressed++;
+ data.ptr += blockPtr;
+ numBytes = thisBlockHeight * thisBlockWidth * dataTypeSize;
+ bytesleft = input.byteLength - data.ptr;
+ numBytes = numBytes < bytesleft ? numBytes : bytesleft;
+ arrayBuf = new ArrayBuffer(numBytes % dataTypeSize === 0 ? numBytes : numBytes + dataTypeSize - numBytes % dataTypeSize);
+ store8 = new Uint8Array(arrayBuf);
+ store8.set(new Uint8Array(input, data.ptr, numBytes));
+ rawData = new OutPixelTypeArray(arrayBuf);
+ z = 0;
+ if (mask) {
+ for (row = 0; row < thisBlockHeight; row++) {
+ for (col = 0; col < thisBlockWidth; col++) {
+ if (mask[outPtr]) {
+ resultPixels[outPtr] = rawData[z++];
+ }
+ outPtr++;
+ }
+ outPtr += outStride;
+ }
+ } else {
+ for (row = 0; row < thisBlockHeight; row++) {
+ for (col = 0; col < thisBlockWidth; col++) {
+ resultPixels[outPtr++] = rawData[z++];
+ }
+ outPtr += outStride;
+ }
+ }
+ data.ptr += z * dataTypeSize;
+ } else {
+ offsetType = Lerc2Helpers.getDataTypeUsed(imageType, bits67);
+ offset = Lerc2Helpers.getOnePixel(block, blockPtr, offsetType, view);
+ blockPtr += Lerc2Helpers.getDataTypeSize(offsetType);
+ if (blockEncoding === 3) {
+ data.ptr += blockPtr;
+ data.counter.constantoffset++;
+ if (mask) {
+ for (row = 0; row < thisBlockHeight; row++) {
+ for (col = 0; col < thisBlockWidth; col++) {
+ if (mask[outPtr]) {
+ resultPixels[outPtr] = offset;
+ }
+ outPtr++;
+ }
+ outPtr += outStride;
+ }
+ } else {
+ for (row = 0; row < thisBlockHeight; row++) {
+ for (col = 0; col < thisBlockWidth; col++) {
+ resultPixels[outPtr++] = offset;
+ }
+ outPtr += outStride;
+ }
+ }
+ } else {
+ data.ptr += blockPtr;
+ Lerc2Helpers.decodeBits(input, data, blockDataBuffer, offset, iDim);
+ blockPtr = 0;
+ if (mask) {
+ for (row = 0; row < thisBlockHeight; row++) {
+ for (col = 0; col < thisBlockWidth; col++) {
+ if (mask[outPtr]) {
+ resultPixels[outPtr] = blockDataBuffer[blockPtr++];
+ }
+ outPtr++;
+ }
+ outPtr += outStride;
+ }
+ } else {
+ for (row = 0; row < thisBlockHeight; row++) {
+ for (col = 0; col < thisBlockWidth; col++) {
+ resultPixels[outPtr++] = blockDataBuffer[blockPtr++];
+ }
+ outPtr += outStride;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ /*****************
+ * private methods (helper methods)
+ *****************/
+ formatFileInfo: function(data) {
+ return {
+ "fileIdentifierString": data.headerInfo.fileIdentifierString,
+ "fileVersion": data.headerInfo.fileVersion,
+ "imageType": data.headerInfo.imageType,
+ "height": data.headerInfo.height,
+ "width": data.headerInfo.width,
+ "numValidPixel": data.headerInfo.numValidPixel,
+ "microBlockSize": data.headerInfo.microBlockSize,
+ "blobSize": data.headerInfo.blobSize,
+ "maxZError": data.headerInfo.maxZError,
+ "pixelType": Lerc2Helpers.getPixelType(data.headerInfo.imageType),
+ "eofOffset": data.eofOffset,
+ "mask": data.mask ? {
+ "numBytes": data.mask.numBytes
+ } : null,
+ "pixels": {
+ "numBlocksX": data.pixels.numBlocksX,
+ "numBlocksY": data.pixels.numBlocksY,
+ //"numBytes": data.pixels.numBytes,
+ "maxValue": data.headerInfo.zMax,
+ "minValue": data.headerInfo.zMin,
+ "noDataValue": data.noDataValue
+ }
+ };
+ },
+ constructConstantSurface: function(data) {
+ var val = data.headerInfo.zMax;
+ var numDims = data.headerInfo.numDims;
+ var numPixels = data.headerInfo.height * data.headerInfo.width;
+ var numPixelAllDims = numPixels * numDims;
+ var i = 0, k = 0, nStart = 0;
+ var mask = data.pixels.resultMask;
+ if (mask) {
+ if (numDims > 1) {
+ for (i = 0; i < numDims; i++) {
+ nStart = i * numPixels;
+ for (k = 0; k < numPixels; k++) {
+ if (mask[k]) {
+ data.pixels.resultPixels[nStart + k] = val;
+ }
+ }
+ }
+ } else {
+ for (k = 0; k < numPixels; k++) {
+ if (mask[k]) {
+ data.pixels.resultPixels[k] = val;
+ }
+ }
+ }
+ } else {
+ if (data.pixels.resultPixels.fill) {
+ data.pixels.resultPixels.fill(val);
+ } else {
+ for (k = 0; k < numPixelAllDims; k++) {
+ data.pixels.resultPixels[k] = val;
+ }
+ }
+ }
+ return;
+ },
+ getDataTypeArray: function(t) {
+ var tp;
+ switch (t) {
+ case 0:
+ tp = Int8Array;
+ break;
+ case 1:
+ tp = Uint8Array;
+ break;
+ case 2:
+ tp = Int16Array;
+ break;
+ case 3:
+ tp = Uint16Array;
+ break;
+ case 4:
+ tp = Int32Array;
+ break;
+ case 5:
+ tp = Uint32Array;
+ break;
+ case 6:
+ tp = Float32Array;
+ break;
+ case 7:
+ tp = Float64Array;
+ break;
+ default:
+ tp = Float32Array;
+ }
+ return tp;
+ },
+ getPixelType: function(t) {
+ var tp;
+ switch (t) {
+ case 0:
+ tp = "S8";
+ break;
+ case 1:
+ tp = "U8";
+ break;
+ case 2:
+ tp = "S16";
+ break;
+ case 3:
+ tp = "U16";
+ break;
+ case 4:
+ tp = "S32";
+ break;
+ case 5:
+ tp = "U32";
+ break;
+ case 6:
+ tp = "F32";
+ break;
+ case 7:
+ tp = "F64";
+ break;
+ default:
+ tp = "F32";
+ }
+ return tp;
+ },
+ isValidPixelValue: function(t, val) {
+ if (val == null) {
+ return false;
+ }
+ var isValid;
+ switch (t) {
+ case 0:
+ isValid = val >= -128 && val <= 127;
+ break;
+ case 1:
+ isValid = val >= 0 && val <= 255;
+ break;
+ case 2:
+ isValid = val >= -32768 && val <= 32767;
+ break;
+ case 3:
+ isValid = val >= 0 && val <= 65536;
+ break;
+ case 4:
+ isValid = val >= -2147483648 && val <= 2147483647;
+ break;
+ case 5:
+ isValid = val >= 0 && val <= 4294967296;
+ break;
+ case 6:
+ isValid = val >= -34027999387901484e22 && val <= 34027999387901484e22;
+ break;
+ case 7:
+ isValid = val >= 5e-324 && val <= 17976931348623157e292;
+ break;
+ default:
+ isValid = false;
+ }
+ return isValid;
+ },
+ getDataTypeSize: function(t) {
+ var s = 0;
+ switch (t) {
+ case 0:
+ //ubyte
+ case 1:
+ s = 1;
+ break;
+ case 2:
+ //short
+ case 3:
+ s = 2;
+ break;
+ case 4:
+ case 5:
+ case 6:
+ s = 4;
+ break;
+ case 7:
+ s = 8;
+ break;
+ default:
+ s = t;
+ }
+ return s;
+ },
+ getDataTypeUsed: function(dt, tc) {
+ var t = dt;
+ switch (dt) {
+ case 2:
+ //short
+ case 4:
+ t = dt - tc;
+ break;
+ case 3:
+ //ushort
+ case 5:
+ t = dt - 2 * tc;
+ break;
+ case 6:
+ if (0 === tc) {
+ t = dt;
+ } else if (1 === tc) {
+ t = 2;
+ } else {
+ t = 1;
+ }
+ break;
+ case 7:
+ if (0 === tc) {
+ t = dt;
+ } else {
+ t = dt - 2 * tc + 1;
+ }
+ break;
+ default:
+ t = dt;
+ break;
+ }
+ return t;
+ },
+ getOnePixel: function(block, blockPtr, offsetType, view) {
+ var temp = 0;
+ switch (offsetType) {
+ case 0:
+ temp = view.getInt8(blockPtr);
+ break;
+ case 1:
+ temp = view.getUint8(blockPtr);
+ break;
+ case 2:
+ temp = view.getInt16(blockPtr, true);
+ break;
+ case 3:
+ temp = view.getUint16(blockPtr, true);
+ break;
+ case 4:
+ temp = view.getInt32(blockPtr, true);
+ break;
+ case 5:
+ temp = view.getUInt32(blockPtr, true);
+ break;
+ case 6:
+ temp = view.getFloat32(blockPtr, true);
+ break;
+ case 7:
+ temp = view.getFloat64(blockPtr, true);
+ break;
+ default:
+ throw "the decoder does not understand this pixel type";
+ }
+ return temp;
+ }
+ };
+ var TreeNode = function(val, left, right) {
+ this.val = val;
+ this.left = left;
+ this.right = right;
+ };
+ var Lerc2Decode2 = {
+ /*
+ * ********removed options compared to LERC1. We can bring some of them back if needed.
+ * removed pixel type. LERC2 is typed and doesn't require user to give pixel type
+ * changed encodedMaskData to maskData. LERC2 's js version make it faster to use maskData directly.
+ * removed returnMask. mask is used by LERC2 internally and is cost free. In case of user input mask, it's returned as well and has neglible cost.
+ * removed nodatavalue. Because LERC2 pixels are typed, nodatavalue will sacrify a useful value for many types (8bit, 16bit) etc,
+ * user has to be knowledgable enough about raster and their data to avoid usability issues. so nodata value is simply removed now.
+ * We can add it back later if their's a clear requirement.
+ * removed encodedMask. This option was not implemented in LercDecode. It can be done after decoding (less efficient)
+ * removed computeUsedBitDepths.
+ *
+ *
+ * response changes compared to LERC1
+ * 1. encodedMaskData is not available
+ * 2. noDataValue is optional (returns only if user's noDataValue is with in the valid data type range)
+ * 3. maskData is always available
+ */
+ /*****************
+ * public properties
+ ******************/
+ //HUFFMAN_LUT_BITS_MAX: 12, //use 2^12 lut, not configurable
+ /*****************
+ * public methods
+ *****************/
+ /**
+ * Decode a LERC2 byte stream and return an object containing the pixel data and optional metadata.
+ *
+ * @param {ArrayBuffer} input The LERC input byte stream
+ * @param {object} [options] options Decoding options
+ * @param {number} [options.inputOffset] The number of bytes to skip in the input byte stream. A valid LERC file is expected at that position
+ * @param {boolean} [options.returnFileInfo] If true, the return value will have a fileInfo property that contains metadata obtained from the LERC headers and the decoding process
+ */
+ decode: function(input, options) {
+ options = options || {};
+ var noDataValue = options.noDataValue;
+ var i = 0, data = {};
+ data.ptr = options.inputOffset || 0;
+ data.pixels = {};
+ if (!Lerc2Helpers.readHeaderInfo(input, data)) {
+ return;
+ }
+ var headerInfo = data.headerInfo;
+ var fileVersion = headerInfo.fileVersion;
+ var OutPixelTypeArray = Lerc2Helpers.getDataTypeArray(headerInfo.imageType);
+ Lerc2Helpers.readMask(input, data);
+ if (headerInfo.numValidPixel !== headerInfo.width * headerInfo.height && !data.pixels.resultMask) {
+ data.pixels.resultMask = options.maskData;
+ }
+ var numPixels = headerInfo.width * headerInfo.height;
+ data.pixels.resultPixels = new OutPixelTypeArray(numPixels * headerInfo.numDims);
+ data.counter = {
+ onesweep: 0,
+ uncompressed: 0,
+ lut: 0,
+ bitstuffer: 0,
+ constant: 0,
+ constantoffset: 0
+ };
+ if (headerInfo.numValidPixel !== 0) {
+ if (headerInfo.zMax === headerInfo.zMin) {
+ Lerc2Helpers.constructConstantSurface(data);
+ } else if (fileVersion >= 4 && Lerc2Helpers.checkMinMaxRanges(input, data)) {
+ Lerc2Helpers.constructConstantSurface(data);
+ } else {
+ var view = new DataView(input, data.ptr, 2);
+ var bReadDataOneSweep = view.getUint8(0);
+ data.ptr++;
+ if (bReadDataOneSweep) {
+ Lerc2Helpers.readDataOneSweep(input, data, OutPixelTypeArray);
+ } else {
+ if (fileVersion > 1 && headerInfo.imageType <= 1 && Math.abs(headerInfo.maxZError - 0.5) < 1e-5) {
+ var flagHuffman = view.getUint8(1);
+ data.ptr++;
+ data.encodeMode = flagHuffman;
+ if (flagHuffman > 2 || fileVersion < 4 && flagHuffman > 1) {
+ throw "Invalid Huffman flag " + flagHuffman;
+ }
+ if (flagHuffman) {
+ Lerc2Helpers.readHuffman(input, data, OutPixelTypeArray);
+ } else {
+ Lerc2Helpers.readTiles(input, data, OutPixelTypeArray);
+ }
+ } else {
+ Lerc2Helpers.readTiles(input, data, OutPixelTypeArray);
+ }
+ }
+ }
+ }
+ data.eofOffset = data.ptr;
+ var diff;
+ if (options.inputOffset) {
+ diff = data.headerInfo.blobSize + options.inputOffset - data.ptr;
+ if (Math.abs(diff) >= 1) {
+ data.eofOffset = options.inputOffset + data.headerInfo.blobSize;
+ }
+ } else {
+ diff = data.headerInfo.blobSize - data.ptr;
+ if (Math.abs(diff) >= 1) {
+ data.eofOffset = data.headerInfo.blobSize;
+ }
+ }
+ var result = {
+ width: headerInfo.width,
+ height: headerInfo.height,
+ pixelData: data.pixels.resultPixels,
+ minValue: headerInfo.zMin,
+ maxValue: headerInfo.zMax,
+ validPixelCount: headerInfo.numValidPixel,
+ dimCount: headerInfo.numDims,
+ dimStats: {
+ minValues: headerInfo.minValues,
+ maxValues: headerInfo.maxValues
+ },
+ maskData: data.pixels.resultMask
+ //noDataValue: noDataValue
+ };
+ if (data.pixels.resultMask && Lerc2Helpers.isValidPixelValue(headerInfo.imageType, noDataValue)) {
+ var mask = data.pixels.resultMask;
+ for (i = 0; i < numPixels; i++) {
+ if (!mask[i]) {
+ result.pixelData[i] = noDataValue;
+ }
+ }
+ result.noDataValue = noDataValue;
+ }
+ data.noDataValue = noDataValue;
+ if (options.returnFileInfo) {
+ result.fileInfo = Lerc2Helpers.formatFileInfo(data);
+ }
+ return result;
+ },
+ getBandCount: function(input) {
+ var count = 0;
+ var i = 0;
+ var temp = {};
+ temp.ptr = 0;
+ temp.pixels = {};
+ while (i < input.byteLength - 58) {
+ Lerc2Helpers.readHeaderInfo(input, temp);
+ i += temp.headerInfo.blobSize;
+ count++;
+ temp.ptr = i;
+ }
+ return count;
+ }
+ };
+ return Lerc2Decode2;
+ }();
+ var isPlatformLittleEndian = function() {
+ var a = new ArrayBuffer(4);
+ var b = new Uint8Array(a);
+ var c = new Uint32Array(a);
+ c[0] = 1;
+ return b[0] === 1;
+ }();
+ var Lerc2 = {
+ /************wrapper**********************************************/
+ /**
+ * A wrapper for decoding both LERC1 and LERC2 byte streams capable of handling multiband pixel blocks for various pixel types.
+ *
+ * @alias module:Lerc
+ * @param {ArrayBuffer} input The LERC input byte stream
+ * @param {object} [options] The decoding options below are optional.
+ * @param {number} [options.inputOffset] The number of bytes to skip in the input byte stream. A valid Lerc file is expected at that position.
+ * @param {string} [options.pixelType] (LERC1 only) Default value is F32. Valid pixel types for input are U8/S8/S16/U16/S32/U32/F32.
+ * @param {number} [options.noDataValue] (LERC1 only). It is recommended to use the returned mask instead of setting this value.
+ * @returns {{width, height, pixels, pixelType, mask, statistics}}
+ * @property {number} width Width of decoded image.
+ * @property {number} height Height of decoded image.
+ * @property {array} pixels [band1, band2, …] Each band is a typed array of width*height.
+ * @property {string} pixelType The type of pixels represented in the output.
+ * @property {mask} mask Typed array with a size of width*height, or null if all pixels are valid.
+ * @property {array} statistics [statistics_band1, statistics_band2, …] Each element is a statistics object representing min and max values
+ **/
+ decode: function(encodedData, options) {
+ if (!isPlatformLittleEndian) {
+ throw "Big endian system is not supported.";
+ }
+ options = options || {};
+ var inputOffset = options.inputOffset || 0;
+ var fileIdView = new Uint8Array(encodedData, inputOffset, 10);
+ var fileIdentifierString = String.fromCharCode.apply(null, fileIdView);
+ var lerc, majorVersion;
+ if (fileIdentifierString.trim() === "CntZImage") {
+ lerc = LercDecode;
+ majorVersion = 1;
+ } else if (fileIdentifierString.substring(0, 5) === "Lerc2") {
+ lerc = Lerc2Decode;
+ majorVersion = 2;
+ } else {
+ throw "Unexpected file identifier string: " + fileIdentifierString;
+ }
+ var iPlane = 0, eof = encodedData.byteLength - 10, encodedMaskData, bandMasks = [], bandMask, maskData;
+ var decodedPixelBlock = {
+ width: 0,
+ height: 0,
+ pixels: [],
+ pixelType: options.pixelType,
+ mask: null,
+ statistics: []
+ };
+ while (inputOffset < eof) {
+ var result = lerc.decode(encodedData, {
+ inputOffset,
+ //for both lerc1 and lerc2
+ encodedMaskData,
+ //lerc1 only
+ maskData,
+ //lerc2 only
+ returnMask: iPlane === 0 ? true : false,
+ //lerc1 only
+ returnEncodedMask: iPlane === 0 ? true : false,
+ //lerc1 only
+ returnFileInfo: true,
+ //for both lerc1 and lerc2
+ pixelType: options.pixelType || null,
+ //lerc1 only
+ noDataValue: options.noDataValue || null
+ //lerc1 only
+ });
+ inputOffset = result.fileInfo.eofOffset;
+ if (iPlane === 0) {
+ encodedMaskData = result.encodedMaskData;
+ maskData = result.maskData;
+ decodedPixelBlock.width = result.width;
+ decodedPixelBlock.height = result.height;
+ decodedPixelBlock.dimCount = result.dimCount || 1;
+ decodedPixelBlock.pixelType = result.pixelType || result.fileInfo.pixelType;
+ decodedPixelBlock.mask = result.maskData;
+ }
+ if (majorVersion > 1 && result.fileInfo.mask && result.fileInfo.mask.numBytes > 0) {
+ bandMasks.push(result.maskData);
+ }
+ iPlane++;
+ decodedPixelBlock.pixels.push(result.pixelData);
+ decodedPixelBlock.statistics.push({
+ minValue: result.minValue,
+ maxValue: result.maxValue,
+ noDataValue: result.noDataValue,
+ dimStats: result.dimStats
+ });
+ }
+ var i, j, numPixels;
+ if (majorVersion > 1 && bandMasks.length > 1) {
+ numPixels = decodedPixelBlock.width * decodedPixelBlock.height;
+ decodedPixelBlock.bandMasks = bandMasks;
+ maskData = new Uint8Array(numPixels);
+ maskData.set(bandMasks[0]);
+ for (i = 1; i < bandMasks.length; i++) {
+ bandMask = bandMasks[i];
+ for (j = 0; j < numPixels; j++) {
+ maskData[j] = maskData[j] & bandMask[j];
+ }
+ }
+ decodedPixelBlock.maskData = maskData;
+ }
+ return decodedPixelBlock;
+ }
+ };
+ if (typeof define === "function" && define.amd) {
+ define([], function() {
+ return Lerc2;
+ });
+ } else if (typeof module !== "undefined" && module.exports) {
+ module.exports = Lerc2;
+ } else {
+ this.Lerc = Lerc2;
+ }
+ })();
+ }
+});
+
+// packages/engine/Source/Core/HeightmapEncoding.js
+var HeightmapEncoding = {
+ /**
+ * No encoding
+ *
+ * @type {number}
+ * @constant
+ */
+ NONE: 0,
+ /**
+ * LERC encoding
+ *
+ * @type {number}
+ * @constant
+ *
+ * @see {@link https://github.com/Esri/lerc|The LERC specification}
+ */
+ LERC: 1
+};
+var HeightmapEncoding_default = Object.freeze(HeightmapEncoding);
+
+// packages/engine/Source/Core/HeightmapTessellator.js
+var HeightmapTessellator = {};
+HeightmapTessellator.DEFAULT_STRUCTURE = Object.freeze({
+ heightScale: 1,
+ heightOffset: 0,
+ elementsPerHeight: 1,
+ stride: 1,
+ elementMultiplier: 256,
+ isBigEndian: false
+});
+var cartesian3Scratch = new Cartesian3_default();
+var matrix4Scratch = new Matrix4_default();
+var minimumScratch = new Cartesian3_default();
+var maximumScratch = new Cartesian3_default();
+HeightmapTessellator.computeVertices = function(options) {
+ if (!defined_default(options) || !defined_default(options.heightmap)) {
+ throw new DeveloperError_default("options.heightmap is required.");
+ }
+ if (!defined_default(options.width) || !defined_default(options.height)) {
+ throw new DeveloperError_default("options.width and options.height are required.");
+ }
+ if (!defined_default(options.nativeRectangle)) {
+ throw new DeveloperError_default("options.nativeRectangle is required.");
+ }
+ if (!defined_default(options.skirtHeight)) {
+ throw new DeveloperError_default("options.skirtHeight is required.");
+ }
+ const cos = Math.cos;
+ const sin = Math.sin;
+ const sqrt = Math.sqrt;
+ const atan = Math.atan;
+ const exp = Math.exp;
+ const piOverTwo = Math_default.PI_OVER_TWO;
+ const toRadians = Math_default.toRadians;
+ const heightmap = options.heightmap;
+ const width = options.width;
+ const height = options.height;
+ const skirtHeight = options.skirtHeight;
+ const hasSkirts = skirtHeight > 0;
+ const isGeographic = defaultValue_default(options.isGeographic, true);
+ const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default);
+ const oneOverGlobeSemimajorAxis = 1 / ellipsoid.maximumRadius;
+ const nativeRectangle = Rectangle_default.clone(options.nativeRectangle);
+ const rectangle = Rectangle_default.clone(options.rectangle);
+ let geographicWest;
+ let geographicSouth;
+ let geographicEast;
+ let geographicNorth;
+ if (!defined_default(rectangle)) {
+ if (isGeographic) {
+ geographicWest = toRadians(nativeRectangle.west);
+ geographicSouth = toRadians(nativeRectangle.south);
+ geographicEast = toRadians(nativeRectangle.east);
+ geographicNorth = toRadians(nativeRectangle.north);
+ } else {
+ geographicWest = nativeRectangle.west * oneOverGlobeSemimajorAxis;
+ geographicSouth = piOverTwo - 2 * atan(exp(-nativeRectangle.south * oneOverGlobeSemimajorAxis));
+ geographicEast = nativeRectangle.east * oneOverGlobeSemimajorAxis;
+ geographicNorth = piOverTwo - 2 * atan(exp(-nativeRectangle.north * oneOverGlobeSemimajorAxis));
+ }
+ } else {
+ geographicWest = rectangle.west;
+ geographicSouth = rectangle.south;
+ geographicEast = rectangle.east;
+ geographicNorth = rectangle.north;
+ }
+ let relativeToCenter = options.relativeToCenter;
+ const hasRelativeToCenter = defined_default(relativeToCenter);
+ relativeToCenter = hasRelativeToCenter ? relativeToCenter : Cartesian3_default.ZERO;
+ const includeWebMercatorT = defaultValue_default(options.includeWebMercatorT, false);
+ const exaggeration = defaultValue_default(options.exaggeration, 1);
+ const exaggerationRelativeHeight = defaultValue_default(
+ options.exaggerationRelativeHeight,
+ 0
+ );
+ const hasExaggeration = exaggeration !== 1;
+ const includeGeodeticSurfaceNormals = hasExaggeration;
+ const structure = defaultValue_default(
+ options.structure,
+ HeightmapTessellator.DEFAULT_STRUCTURE
+ );
+ const heightScale = defaultValue_default(
+ structure.heightScale,
+ HeightmapTessellator.DEFAULT_STRUCTURE.heightScale
+ );
+ const heightOffset = defaultValue_default(
+ structure.heightOffset,
+ HeightmapTessellator.DEFAULT_STRUCTURE.heightOffset
+ );
+ const elementsPerHeight = defaultValue_default(
+ structure.elementsPerHeight,
+ HeightmapTessellator.DEFAULT_STRUCTURE.elementsPerHeight
+ );
+ const stride = defaultValue_default(
+ structure.stride,
+ HeightmapTessellator.DEFAULT_STRUCTURE.stride
+ );
+ const elementMultiplier = defaultValue_default(
+ structure.elementMultiplier,
+ HeightmapTessellator.DEFAULT_STRUCTURE.elementMultiplier
+ );
+ const isBigEndian = defaultValue_default(
+ structure.isBigEndian,
+ HeightmapTessellator.DEFAULT_STRUCTURE.isBigEndian
+ );
+ let rectangleWidth = Rectangle_default.computeWidth(nativeRectangle);
+ let rectangleHeight = Rectangle_default.computeHeight(nativeRectangle);
+ const granularityX = rectangleWidth / (width - 1);
+ const granularityY = rectangleHeight / (height - 1);
+ if (!isGeographic) {
+ rectangleWidth *= oneOverGlobeSemimajorAxis;
+ rectangleHeight *= oneOverGlobeSemimajorAxis;
+ }
+ const radiiSquared = ellipsoid.radiiSquared;
+ const radiiSquaredX = radiiSquared.x;
+ const radiiSquaredY = radiiSquared.y;
+ const radiiSquaredZ = radiiSquared.z;
+ let minimumHeight = 65536;
+ let maximumHeight = -65536;
+ const fromENU = Transforms_default.eastNorthUpToFixedFrame(
+ relativeToCenter,
+ ellipsoid
+ );
+ const toENU = Matrix4_default.inverseTransformation(fromENU, matrix4Scratch);
+ let southMercatorY;
+ let oneOverMercatorHeight;
+ if (includeWebMercatorT) {
+ southMercatorY = WebMercatorProjection_default.geodeticLatitudeToMercatorAngle(
+ geographicSouth
+ );
+ oneOverMercatorHeight = 1 / (WebMercatorProjection_default.geodeticLatitudeToMercatorAngle(geographicNorth) - southMercatorY);
+ }
+ const minimum = minimumScratch;
+ minimum.x = Number.POSITIVE_INFINITY;
+ minimum.y = Number.POSITIVE_INFINITY;
+ minimum.z = Number.POSITIVE_INFINITY;
+ const maximum = maximumScratch;
+ maximum.x = Number.NEGATIVE_INFINITY;
+ maximum.y = Number.NEGATIVE_INFINITY;
+ maximum.z = Number.NEGATIVE_INFINITY;
+ let hMin = Number.POSITIVE_INFINITY;
+ const gridVertexCount = width * height;
+ const edgeVertexCount = skirtHeight > 0 ? width * 2 + height * 2 : 0;
+ const vertexCount = gridVertexCount + edgeVertexCount;
+ const positions = new Array(vertexCount);
+ const heights = new Array(vertexCount);
+ const uvs = new Array(vertexCount);
+ const webMercatorTs = includeWebMercatorT ? new Array(vertexCount) : [];
+ const geodeticSurfaceNormals = includeGeodeticSurfaceNormals ? new Array(vertexCount) : [];
+ let startRow = 0;
+ let endRow = height;
+ let startCol = 0;
+ let endCol = width;
+ if (hasSkirts) {
+ --startRow;
+ ++endRow;
+ --startCol;
+ ++endCol;
+ }
+ const skirtOffsetPercentage = 1e-5;
+ for (let rowIndex = startRow; rowIndex < endRow; ++rowIndex) {
+ let row = rowIndex;
+ if (row < 0) {
+ row = 0;
+ }
+ if (row >= height) {
+ row = height - 1;
+ }
+ let latitude = nativeRectangle.north - granularityY * row;
+ if (!isGeographic) {
+ latitude = piOverTwo - 2 * atan(exp(-latitude * oneOverGlobeSemimajorAxis));
+ } else {
+ latitude = toRadians(latitude);
+ }
+ let v = (latitude - geographicSouth) / (geographicNorth - geographicSouth);
+ v = Math_default.clamp(v, 0, 1);
+ const isNorthEdge = rowIndex === startRow;
+ const isSouthEdge = rowIndex === endRow - 1;
+ if (skirtHeight > 0) {
+ if (isNorthEdge) {
+ latitude += skirtOffsetPercentage * rectangleHeight;
+ } else if (isSouthEdge) {
+ latitude -= skirtOffsetPercentage * rectangleHeight;
+ }
+ }
+ const cosLatitude = cos(latitude);
+ const nZ = sin(latitude);
+ const kZ = radiiSquaredZ * nZ;
+ let webMercatorT;
+ if (includeWebMercatorT) {
+ webMercatorT = (WebMercatorProjection_default.geodeticLatitudeToMercatorAngle(latitude) - southMercatorY) * oneOverMercatorHeight;
+ }
+ for (let colIndex = startCol; colIndex < endCol; ++colIndex) {
+ let col = colIndex;
+ if (col < 0) {
+ col = 0;
+ }
+ if (col >= width) {
+ col = width - 1;
+ }
+ const terrainOffset = row * (width * stride) + col * stride;
+ let heightSample;
+ if (elementsPerHeight === 1) {
+ heightSample = heightmap[terrainOffset];
+ } else {
+ heightSample = 0;
+ let elementOffset;
+ if (isBigEndian) {
+ for (elementOffset = 0; elementOffset < elementsPerHeight; ++elementOffset) {
+ heightSample = heightSample * elementMultiplier + heightmap[terrainOffset + elementOffset];
+ }
+ } else {
+ for (elementOffset = elementsPerHeight - 1; elementOffset >= 0; --elementOffset) {
+ heightSample = heightSample * elementMultiplier + heightmap[terrainOffset + elementOffset];
+ }
+ }
+ }
+ heightSample = heightSample * heightScale + heightOffset;
+ maximumHeight = Math.max(maximumHeight, heightSample);
+ minimumHeight = Math.min(minimumHeight, heightSample);
+ let longitude = nativeRectangle.west + granularityX * col;
+ if (!isGeographic) {
+ longitude = longitude * oneOverGlobeSemimajorAxis;
+ } else {
+ longitude = toRadians(longitude);
+ }
+ let u = (longitude - geographicWest) / (geographicEast - geographicWest);
+ u = Math_default.clamp(u, 0, 1);
+ let index = row * width + col;
+ if (skirtHeight > 0) {
+ const isWestEdge = colIndex === startCol;
+ const isEastEdge = colIndex === endCol - 1;
+ const isEdge = isNorthEdge || isSouthEdge || isWestEdge || isEastEdge;
+ const isCorner = (isNorthEdge || isSouthEdge) && (isWestEdge || isEastEdge);
+ if (isCorner) {
+ continue;
+ } else if (isEdge) {
+ heightSample -= skirtHeight;
+ if (isWestEdge) {
+ index = gridVertexCount + (height - row - 1);
+ longitude -= skirtOffsetPercentage * rectangleWidth;
+ } else if (isSouthEdge) {
+ index = gridVertexCount + height + (width - col - 1);
+ } else if (isEastEdge) {
+ index = gridVertexCount + height + width + row;
+ longitude += skirtOffsetPercentage * rectangleWidth;
+ } else if (isNorthEdge) {
+ index = gridVertexCount + height + width + height + col;
+ }
+ }
+ }
+ const nX = cosLatitude * cos(longitude);
+ const nY = cosLatitude * sin(longitude);
+ const kX = radiiSquaredX * nX;
+ const kY = radiiSquaredY * nY;
+ const gamma = sqrt(kX * nX + kY * nY + kZ * nZ);
+ const oneOverGamma = 1 / gamma;
+ const rSurfaceX = kX * oneOverGamma;
+ const rSurfaceY = kY * oneOverGamma;
+ const rSurfaceZ = kZ * oneOverGamma;
+ const position = new Cartesian3_default();
+ position.x = rSurfaceX + nX * heightSample;
+ position.y = rSurfaceY + nY * heightSample;
+ position.z = rSurfaceZ + nZ * heightSample;
+ Matrix4_default.multiplyByPoint(toENU, position, cartesian3Scratch);
+ Cartesian3_default.minimumByComponent(cartesian3Scratch, minimum, minimum);
+ Cartesian3_default.maximumByComponent(cartesian3Scratch, maximum, maximum);
+ hMin = Math.min(hMin, heightSample);
+ positions[index] = position;
+ uvs[index] = new Cartesian2_default(u, v);
+ heights[index] = heightSample;
+ if (includeWebMercatorT) {
+ webMercatorTs[index] = webMercatorT;
+ }
+ if (includeGeodeticSurfaceNormals) {
+ geodeticSurfaceNormals[index] = ellipsoid.geodeticSurfaceNormal(
+ position
+ );
+ }
+ }
+ }
+ const boundingSphere3D = BoundingSphere_default.fromPoints(positions);
+ let orientedBoundingBox;
+ if (defined_default(rectangle)) {
+ orientedBoundingBox = OrientedBoundingBox_default.fromRectangle(
+ rectangle,
+ minimumHeight,
+ maximumHeight,
+ ellipsoid
+ );
+ }
+ let occludeePointInScaledSpace;
+ if (hasRelativeToCenter) {
+ const occluder = new EllipsoidalOccluder_default(ellipsoid);
+ occludeePointInScaledSpace = occluder.computeHorizonCullingPointPossiblyUnderEllipsoid(
+ relativeToCenter,
+ positions,
+ minimumHeight
+ );
+ }
+ const aaBox = new AxisAlignedBoundingBox_default(minimum, maximum, relativeToCenter);
+ const encoding = new TerrainEncoding_default(
+ relativeToCenter,
+ aaBox,
+ hMin,
+ maximumHeight,
+ fromENU,
+ false,
+ includeWebMercatorT,
+ includeGeodeticSurfaceNormals,
+ exaggeration,
+ exaggerationRelativeHeight
+ );
+ const vertices = new Float32Array(vertexCount * encoding.stride);
+ let bufferIndex = 0;
+ for (let j = 0; j < vertexCount; ++j) {
+ bufferIndex = encoding.encode(
+ vertices,
+ bufferIndex,
+ positions[j],
+ uvs[j],
+ heights[j],
+ void 0,
+ webMercatorTs[j],
+ geodeticSurfaceNormals[j]
+ );
+ }
+ return {
+ vertices,
+ maximumHeight,
+ minimumHeight,
+ encoding,
+ boundingSphere3D,
+ orientedBoundingBox,
+ occludeePointInScaledSpace
+ };
+};
+var HeightmapTessellator_default = HeightmapTessellator;
+
+// packages/engine/Source/Workers/createVerticesFromHeightmap.js
+var import_lerc = __toESM(require_LercDecode(), 1);
+function createVerticesFromHeightmap(parameters, transferableObjects) {
+ if (parameters.encoding === HeightmapEncoding_default.LERC) {
+ let result;
+ try {
+ result = import_lerc.default.decode(parameters.heightmap);
+ } catch (error) {
+ throw new RuntimeError_default(error);
+ }
+ const lercStatistics = result.statistics[0];
+ if (lercStatistics.minValue === Number.MAX_VALUE) {
+ throw new RuntimeError_default("Invalid tile data");
+ }
+ parameters.heightmap = result.pixels[0];
+ parameters.width = result.width;
+ parameters.height = result.height;
+ }
+ parameters.ellipsoid = Ellipsoid_default.clone(parameters.ellipsoid);
+ parameters.rectangle = Rectangle_default.clone(parameters.rectangle);
+ const statistics = HeightmapTessellator_default.computeVertices(parameters);
+ const vertices = statistics.vertices;
+ transferableObjects.push(vertices.buffer);
+ return {
+ vertices: vertices.buffer,
+ numberOfAttributes: statistics.encoding.stride,
+ minimumHeight: statistics.minimumHeight,
+ maximumHeight: statistics.maximumHeight,
+ gridWidth: parameters.width,
+ gridHeight: parameters.height,
+ boundingSphere3D: statistics.boundingSphere3D,
+ orientedBoundingBox: statistics.orientedBoundingBox,
+ occludeePointInScaledSpace: statistics.occludeePointInScaledSpace,
+ encoding: statistics.encoding,
+ westIndicesSouthToNorth: statistics.westIndicesSouthToNorth,
+ southIndicesEastToWest: statistics.southIndicesEastToWest,
+ eastIndicesNorthToSouth: statistics.eastIndicesNorthToSouth,
+ northIndicesWestToEast: statistics.northIndicesWestToEast
+ };
+}
+var createVerticesFromHeightmap_default = createTaskProcessorWorker_default(createVerticesFromHeightmap);
+export {
+ createVerticesFromHeightmap_default as default
+};
diff --git a/public/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js b/public/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js
new file mode 100644
index 0000000000000000000000000000000000000000..c4556d23a3e7a2b464f9e4ac902dc04a156c23a9
--- /dev/null
+++ b/public/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js
@@ -0,0 +1,743 @@
+/**
+ * @license
+ * Cesium - https://github.com/CesiumGS/cesium
+ * Version 1.121.2
+ *
+ * Copyright 2011-2022 Cesium Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Columbus View (Pat. Pend.)
+ *
+ * Portions licensed separately.
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
+ */
+
+import {
+ EllipsoidalOccluder_default,
+ TerrainEncoding_default
+} from "./chunk-56EDBCGT.js";
+import {
+ createTaskProcessorWorker_default
+} from "./chunk-Z2QP3CXW.js";
+import {
+ WebMercatorProjection_default
+} from "./chunk-RJM36CNY.js";
+import "./chunk-LJ2JQHJT.js";
+import {
+ AxisAlignedBoundingBox_default
+} from "./chunk-NDDI2LWR.js";
+import {
+ IndexDatatype_default
+} from "./chunk-C4WPMOKT.js";
+import "./chunk-KHZNBFOH.js";
+import {
+ Matrix4_default,
+ Rectangle_default,
+ Transforms_default
+} from "./chunk-6SQMLVGV.js";
+import "./chunk-XIUSRWL6.js";
+import {
+ Cartesian2_default,
+ Cartesian3_default,
+ Cartographic_default,
+ Ellipsoid_default
+} from "./chunk-FFLMY4TE.js";
+import {
+ Math_default
+} from "./chunk-WGDFYAGC.js";
+import "./chunk-3HQMMUPU.js";
+import "./chunk-LLAF3CPH.js";
+import "./chunk-U5HSOKPQ.js";
+import {
+ DeveloperError_default
+} from "./chunk-P6TRGU3S.js";
+import {
+ defined_default
+} from "./chunk-YCDZX5LS.js";
+
+// packages/engine/Source/Core/TerrainProvider.js
+function TerrainProvider() {
+ DeveloperError_default.throwInstantiationError();
+}
+Object.defineProperties(TerrainProvider.prototype, {
+ /**
+ * Gets an event that is raised when the terrain provider encounters an asynchronous error. By subscribing
+ * to the event, you will be notified of the error and can potentially recover from it. Event listeners
+ * are passed an instance of {@link TileProviderError}.
+ * @memberof TerrainProvider.prototype
+ * @type {Eventreturn features.map(f => this.getProviderFeature(f));
+ * @param coordinate - in mercator
+ * @param resolution - meters per pixel for the given location
+ * @param headers - headers optional request headers to be sent with the server request
+ */
+ // eslint-disable-next-line no-unused-vars,class-methods-use-this
+ getFeaturesByCoordinate(e, s, r) {
+ return Promise.resolve([]);
+ }
+ /**
+ * Returns the object required to configure this feature provider.
+ */
+ toJSON() {
+ const e = super.toJSON(), s = js.getDefaultOptions();
+ delete e.name, this.showGeometry !== s.showGeometry && (e.showGeometry = this.showGeometry), this.style && (e.style = this.style.toJSON());
+ const r = this.vectorProperties.getVcsMeta({
+ ...Gt.getDefaultOptions(),
+ ...s.vectorProperties
+ });
+ return Object.keys(r).length > 0 && (e.vectorProperties = r), e;
+ }
+ destroy() {
+ this.style = void 0, this.vectorProperties.destroy(), super.destroy();
+ }
+}
+class ll extends js {
+ /**
+ * @param layerName
+ * @param options
+ */
+ constructor(e, s) {
+ super(e, s);
+ h(this, "tileProvider");
+ this.mapTypes = ["CesiumMap"], this.tileProvider = s.tileProvider;
+ }
+ static get className() {
+ return "TileProviderFeatureProvider";
+ }
+ async getFeaturesByCoordinate(e, s, r) {
+ const n = await this.tileProvider.getFeaturesByCoordinate(e, s, r), a = (o) => this.style ? !!this.style.cesiumStyle.show.evaluate(o) : !0;
+ return n.filter((o) => this.vectorProperties.getAllowPicking(o) && a(o));
+ }
+ destroy() {
+ this.tileProvider.destroy(), super.destroy();
+ }
+}
+Ll.registerClass(ll.className, ll);
+var it;
+(function(i) {
+ i.GEOGRAPHIC = "geographic", i.MERCATOR = "mercator";
+})(it || (it = {}));
+function bd(i) {
+ const t = {};
+ return i.numberOfLevelZeroTilesX && i.numberOfLevelZeroTilesX > 1 && (t.numberOfLevelZeroTilesX = i.numberOfLevelZeroTilesX), i.numberOfLevelZeroTilesY && i.numberOfLevelZeroTilesY > 1 && (t.numberOfLevelZeroTilesY = i.numberOfLevelZeroTilesY), i.tilingSchema === it.MERCATOR ? new _l(t) : new Qc(t);
+}
+function fw(i, t, e, s = 0) {
+ if (!i.isValid())
+ return s;
+ const r = i.getCoordinatesInProjection(de);
+ r[1] < -85 && (r[1] = -85), r[3] > 85 && (r[3] = 85);
+ const a = [
+ gl(r),
+ Ac(r),
+ Dc(r),
+ ka(r)
+ ].map((l) => ee.fromDegrees(l[0], l[1]));
+ let o = s;
+ for (; o < e; ) {
+ const l = a.map((d) => t.positionToTileXY(d, o)), c = [];
+ if (c.push(Math.abs(l[0].x - l[1].x)), c.push(Math.abs(l[0].y - l[3].y)), c[0] > 1 || c[1] > 1) {
+ o -= 1;
+ break;
+ }
+ o += 1;
+ }
+ return o;
+}
+class Dt extends st {
+ /**
+ * @param options
+ */
+ constructor(e) {
+ super({ url: "", ...e });
+ h(this, "extent");
+ /**
+ * The {@link TilingScheme} of this layer
+ * Changes require calling layer.redraw() to take effect.
+ */
+ h(this, "tilingSchema");
+ /**
+ * The maximum level to load.
+ * Changes require calling layer.redraw() to take effect.
+ */
+ h(this, "maxLevel");
+ h(this, "_minLevel");
+ /**
+ * The minimum level to load.
+ * Changes require calling layer.redraw() to take effect.
+ */
+ h(this, "minLevel");
+ /**
+ * defines the visible level in the rendered map, maps to Openlayers `minZoom` and Cesium `minimiumTerrainLevel`.
+ * Changes requires calling layer.redraw() to take effect.
+ */
+ h(this, "minRenderingLevel");
+ /**
+ * defines the visible level in the rendered map, maps to Openlayers `minZoom` and Cesium `minimiumTerrainLevel`.
+ * Changes requires calling layer.redraw() to take effect.
+ */
+ h(this, "maxRenderingLevel");
+ h(this, "_opacity");
+ h(this, "_splitDirection", we.NONE);
+ /**
+ * can be used to forward options to the cesium ImageryLayer
+ * @see https://cesium.com/learn/cesiumjs/ref-doc/ImageryLayer.html#.ConstructorOptions
+ * Changes requires calling layer.redraw() to take effect.
+ */
+ h(this, "imageryLayerOptions");
+ /**
+ * raised if the split direction changes, is passed the split direction as its only argument
+ */
+ h(this, "splitDirectionChanged", new L());
+ const s = Dt.getDefaultOptions();
+ this.extent = e.extent ? new be(e.extent) : new be(), this.tilingSchema = $a(e.tilingSchema, it, s.tilingSchema), this.maxLevel = ne(e.maxLevel, s.maxLevel), this._minLevel = ne(e.minLevel, s.minLevel);
+ const r = bd(e);
+ this.minLevel = fw(this.extent, r, this.maxLevel, this._minLevel), this.minRenderingLevel = ne(e.minRenderingLevel, s.minRenderingLevel), this.maxRenderingLevel = ne(e.maxRenderingLevel, s.maxRenderingLevel), this._opacity = ma(e.opacity, s.opacity, 0, 1), e.splitDirection && (this._splitDirection = e.splitDirection === "left" ? we.LEFT : we.RIGHT), this.imageryLayerOptions = structuredClone(e.imageryLayerOptions);
+ }
+ static get className() {
+ return "RasterLayer";
+ }
+ static getDefaultOptions() {
+ return {
+ ...st.getDefaultOptions(),
+ minLevel: 0,
+ maxLevel: 18,
+ minRenderingLevel: void 0,
+ maxRenderingLevel: void 0,
+ tilingSchema: it.GEOGRAPHIC,
+ opacity: 1,
+ splitDirection: void 0,
+ imageryLayerOptions: void 0
+ };
+ }
+ /**
+ * The split directions of this layer
+ */
+ get splitDirection() {
+ return this._splitDirection;
+ }
+ set splitDirection(e) {
+ e !== this._splitDirection && (this._splitDirection = e, this.getImplementations().forEach((s) => {
+ s.updateSplitDirection(e);
+ }), this.splitDirectionChanged.raiseEvent(this._splitDirection));
+ }
+ /**
+ * The opacity between 0 (fully transparent) and 1 (fully opaque)
+ */
+ get opacity() {
+ return this._opacity;
+ }
+ set opacity(e) {
+ const s = ma(e, this._opacity, 0, 1);
+ this._opacity !== s && (this._opacity = s, this.getImplementations().forEach((r) => {
+ r.updateOpacity(s);
+ }));
+ }
+ getImplementationOptions() {
+ var s;
+ const e = {
+ ...super.getImplementationOptions(),
+ minLevel: this.minLevel,
+ maxLevel: this.maxLevel,
+ minRenderingLevel: this.minRenderingLevel,
+ maxRenderingLevel: this.maxRenderingLevel,
+ tilingSchema: this.tilingSchema,
+ opacity: this.opacity,
+ splitDirection: this._splitDirection,
+ imageryLayerOptions: this.imageryLayerOptions
+ };
+ return (s = this.extent) != null && s.isValid() && (e.extent = this.extent), e;
+ }
+ toJSON() {
+ var r;
+ const e = super.toJSON(), s = Dt.getDefaultOptions();
+ return (r = this.extent) != null && r.equals(new be()) && delete e.extent, this._minLevel !== s.minLevel && (e.minLevel = this._minLevel), this.maxLevel !== s.maxLevel && (e.maxLevel = this.maxLevel), this.minRenderingLevel !== s.minRenderingLevel && (e.minRenderingLevel = this.minRenderingLevel), this.maxRenderingLevel !== s.maxRenderingLevel && (e.maxRenderingLevel = this.maxRenderingLevel), this.tilingSchema !== s.tilingSchema && (e.tilingSchema = this.tilingSchema), this.opacity !== s.opacity && (e.opacity = this.opacity), this._splitDirection !== we.NONE && (e.splitDirection = this._splitDirection === we.RIGHT ? "right" : "left"), this.imageryLayerOptions !== s.imageryLayerOptions && (e.imageryLayerOptions = structuredClone(this.imageryLayerOptions)), e;
+ }
+ destroy() {
+ this.splitDirectionChanged.destroy(), super.destroy();
+ }
+}
+ke.registerClass(Dt.className, Dt);
+function Pd(i, t) {
+ return i === "geographic" ? t === "1.3.0" ? "CRS:84" : "EPSG:4326" : "EPSG:3857";
+}
+function Ld(i) {
+ const t = i.tilingSchema === "geographic" ? de : W, e = t.proj.getExtent(), s = zo(e), r = i.tilingSchema === it.GEOGRAPHIC ? s / (i.tileSize[0] * 2) : s / i.tileSize[0], n = i.maxLevel + 1, a = [];
+ for (let c = 0; c < n; ++c)
+ a.push(r / 2 ** c);
+ const o = {
+ origin: ka(e),
+ resolutions: a,
+ tileSize: i.tileSize,
+ minZoom: i.minLevel
+ };
+ i.extent && i.extent.isValid() && (o.extent = i.extent.getCoordinatesInProjection(t));
+ const l = {
+ url: i.url,
+ tileGrid: new Fc(o),
+ params: i.parameters,
+ projection: Pd(i.tilingSchema, i.version)
+ };
+ return fi.contains(i.url) ? l.crossOrigin = "use-credentials" : gi(i.url) || (l.crossOrigin = "anonymous"), i.headers && (l.tileLoadFunction = Xa(i.headers)), new df(l);
+}
+function gw(i) {
+ const t = {
+ url: i.url,
+ params: i.parameters,
+ projection: Pd(i.tilingSchema, i.version)
+ };
+ return fi.contains(i.url) ? t.crossOrigin = "use-credentials" : gi(i.url) || (t.crossOrigin = "anonymous"), i.headers && (t.imageLoadFunction = function(s, r) {
+ const n = s.getImage(), a = qt(r, i.headers);
+ Vl(r, a).then((o) => {
+ n.src = o, n.onload = () => {
+ URL.revokeObjectURL(o);
+ };
+ }).catch(() => {
+ he("ImageWMSSource").error(`Could not load image: ${r}`);
+ });
+ }), new ff(t);
+}
+const mw = {
+ GML: Vo,
+ GML2: Ho,
+ GML3: Vo
+}, pw = [
+ "application/geojson",
+ "application/json",
+ "application/vnd.geo+json",
+ "application/geo+json"
+];
+function yw(i, t = {}) {
+ if (i === "text/xml") {
+ const e = t.gmlFormat ? new mw[t.gmlFormat]() : new Ho();
+ return new Bo({ ...t, gmlFormat: e });
+ }
+ return pw.includes(i) ? new zc(t) : i === "application/vnd.ogc.gml" ? new Ho(t) : i === "application/vnd.ogc.gml/3.1.1" || i === "text/xml; subtype=gml/3.1.1" ? new Vo(t) : null;
+}
+class ys extends js {
+ constructor(e, s) {
+ super(e, s);
+ h(this, "extent", null);
+ h(this, "_wmsSourceOptions");
+ /**
+ * The WmsLayer Source used to generate getFeatureInfo urls
+ */
+ h(this, "_wmsSource");
+ /**
+ * The response type of the get feature info response, e.g. text/xml
+ */
+ h(this, "featureInfoResponseType");
+ h(this, "_formatOptions");
+ /**
+ * The feature response format determined by the response type. Use formatOptions to configure the underlying ol.format.Feature
+ */
+ h(this, "featureFormat");
+ /**
+ * The feature response projection, if not present in the response format.
+ */
+ h(this, "projection");
+ const r = ys.getDefaultOptions();
+ s.extent && (s.extent instanceof be ? this.extent = s.extent : this.extent = new be(s.extent)), this._wmsSourceOptions = {
+ url: s.url,
+ tilingSchema: s.tilingSchema || r.tilingSchema,
+ maxLevel: ne(s.maxLevel, r.maxLevel),
+ minLevel: ne(s.minLevel, r.minLevel),
+ tileSize: s.tileSize || r.tileSize,
+ parameters: s.parameters,
+ version: s.version || r.version
+ }, this._wmsSource = Ld(this._wmsSourceOptions), this.featureInfoResponseType = s.responseType || r.responseType, this._formatOptions = s.formatOptions || r.formatOptions, this.featureFormat = yw(this.featureInfoResponseType, s.formatOptions), this.projection = s.projection ? new z(s.projection) : void 0;
+ }
+ static get className() {
+ return "WMSFeatureProvider";
+ }
+ static getDefaultOptions() {
+ return {
+ ...js.getDefaultOptions(),
+ responseType: "text/xml",
+ style: void 0,
+ formatOptions: void 0,
+ projection: void 0,
+ url: "",
+ tilingSchema: it.GEOGRAPHIC,
+ version: "1.1.1",
+ maxLevel: 0,
+ minLevel: 0,
+ tileSize: [256, 256],
+ parameters: {},
+ extent: void 0
+ };
+ }
+ get wmsSource() {
+ if (!this._wmsSource)
+ throw new Error("Accessing destroyed WMSFeatureProvider");
+ return this._wmsSource;
+ }
+ set wmsSource(e) {
+ this._wmsSource = e;
+ }
+ featureResponseCallback(e, s) {
+ let r;
+ try {
+ r = this.featureFormat.readFeatures(e, {
+ dataProjection: this.projection ? this.projection.proj : void 0,
+ featureProjection: W.proj
+ });
+ } catch {
+ return this.getLogger().warning("Features could not be read, please verify the featureInfoResponseType with the capabilities from the server"), [];
+ }
+ return Array.isArray(r) ? (r.forEach((n) => {
+ n.getGeometry() || n.setGeometry(new Ve(s));
+ }), r) : [];
+ }
+ async getFeaturesByCoordinate(e, s, r) {
+ const n = this.wmsSource.getProjection();
+ let a = e;
+ n && (a = $e(W.proj, n)(e.slice(), void 0, void 0));
+ const l = this.wmsSource.getFeatureInfoUrl(a, s / 111194.87428468118, n, { INFO_FORMAT: this.featureInfoResponseType });
+ if (l) {
+ const c = qt(l, r);
+ let d;
+ try {
+ d = await (await vn(l, c)).text();
+ } catch {
+ return this.getLogger().error(`Failed fetching WMS FeatureInfo ${l}`), [];
+ }
+ return this.featureResponseCallback(d, e).map((u) => this.getProviderFeature(u));
+ }
+ return [];
+ }
+ toJSON() {
+ var r, n;
+ const e = super.toJSON(), s = ys.getDefaultOptions();
+ return this.featureInfoResponseType !== s.responseType && (e.responseType = this.featureInfoResponseType), this._formatOptions !== s.formatOptions && (e.formatOptions = { ...this._formatOptions }), this.projection && (e.projection = this.projection.toJSON()), e.url = this._wmsSourceOptions.url, e.parameters = { ...this._wmsSourceOptions.parameters }, this._wmsSourceOptions.tilingSchema !== s.tilingSchema && (e.tilingSchema = this._wmsSourceOptions.tilingSchema), this._wmsSourceOptions.maxLevel !== s.maxLevel && (e.maxLevel = this._wmsSourceOptions.maxLevel), this._wmsSourceOptions.minLevel !== s.minLevel && (e.minLevel = this._wmsSourceOptions.minLevel), this._wmsSourceOptions.version !== s.version && (e.version = this._wmsSourceOptions.version), (this._wmsSourceOptions.tileSize[0] !== ((r = s == null ? void 0 : s.tileSize) == null ? void 0 : r[0]) || this._wmsSourceOptions.tileSize[1] !== ((n = s == null ? void 0 : s.tileSize) == null ? void 0 : n[1])) && (e.tileSize = this._wmsSourceOptions.tileSize.slice()), this.extent && (e.extent = this.extent.toJSON()), e;
+ }
+ destroy() {
+ this._wmsSource = void 0, this.featureFormat = null, this.projection = void 0, this._formatOptions = void 0, super.destroy();
+ }
+}
+Ll.registerClass(ys.className, ys);
+class ae {
+ /**
+ * @param [defaultActive=EventType.NONE] - A bitmask representing the default to listen to
+ * @param [defaultModificationKey=ModificationKeyType.NONE] - A bitmask representing the default keys to listen to
+ * @param [defaultPointerKey=PointerKeyType.LEFT] - A bitmask representing the pointer key to listen to
+ */
+ constructor(t = P.NONE, e = F.NONE, s = Ne.LEFT) {
+ /**
+ * A unique identifier for this interaction
+ */
+ h(this, "id");
+ h(this, "_defaultActive");
+ /**
+ * The current active bitmask for {@link EventType}
+ */
+ h(this, "active");
+ h(this, "_defaultModificationKey");
+ /**
+ * The current active {@link ModificationKeyType}
+ */
+ h(this, "modificationKey");
+ h(this, "_defaultPointerKey");
+ /**
+ * The currently active {@link PointerKeyType}
+ */
+ h(this, "pointerKey");
+ this.id = Xe(), this._defaultActive = t, this.active = this._defaultActive, this._defaultModificationKey = e, this.modificationKey = this._defaultModificationKey, this._defaultPointerKey = s, this.pointerKey = this._defaultPointerKey;
+ }
+ /**
+ * Main function, called when an event is raised for this interaction
+ */
+ // eslint-disable-next-line class-methods-use-this
+ pipe(t) {
+ return Promise.resolve(t);
+ }
+ /**
+ * Called when the modifier keys have changed.
+ */
+ // eslint-disable-next-line class-methods-use-this,no-unused-vars
+ modifierChanged(t) {
+ }
+ /**
+ * Sets the interaction active.
+ * Use boolean (true|false) to toggle default behavior.
+ * Pass it a bitmask of {@link EventType}
+ * to change the active state.
+ * Call without arguments to reset the default active, modification key and pointer Key behavior
+ */
+ setActive(t) {
+ typeof t > "u" ? (this.active = this._defaultActive, this.modificationKey = this._defaultModificationKey, this.pointerKey = this._defaultPointerKey) : typeof t == "boolean" ? this.active = t ? this._defaultActive : P.NONE : this.active = t;
+ }
+ /**
+ * Sets the modification key to listen to or the default modification key if none is provided.
+ */
+ setModification(t) {
+ t ? this.modificationKey = t : this.modificationKey = this._defaultModificationKey;
+ }
+ /**
+ * Sets the pointer key for this interaction or the default pointer if none is provided.
+ */
+ setPointer(t) {
+ t ? this.pointerKey = t : this.pointerKey = this._defaultPointerKey;
+ }
+ /**
+ * destroys the implementation, removing any created resources
+ */
+ // eslint-disable-next-line class-methods-use-this
+ destroy() {
+ }
+}
+class ql extends ae {
+ constructor() {
+ super(P.ALL, F.ALL, Ne.ALL);
+ h(this, "_scratchCartographic", new ee());
+ h(this, "_scratchCartesian", new _());
+ this.setActive();
+ }
+ async pipe(e) {
+ return e.map.className === "CesiumMap" ? this._cesiumHandler(e) : e.map.className === "ObliqueMap" ? ql.obliqueHandler(e) : e;
+ }
+ _cesiumHandler(e) {
+ const r = e.map.getScene();
+ if (!r || (e.ray = r.camera.getPickRay(e.windowPosition), !e.ray))
+ return Promise.resolve(e);
+ const n = r.globe.pick(e.ray, r, this._scratchCartesian);
+ return n ? (this._scratchCartographic = ee.fromCartesian(n, r.globe.ellipsoid, this._scratchCartographic), e.position = z.wgs84ToMercator([
+ b.toDegrees(this._scratchCartographic.longitude),
+ b.toDegrees(this._scratchCartographic.latitude),
+ this._scratchCartographic.height
+ ], !0)) : e.position = [0, 0, 0], e.positionOrPixel = e.position, Promise.resolve(e);
+ }
+ static obliqueHandler(e) {
+ const r = e.map.currentImage;
+ if (r) {
+ const n = e.type & (P.MOVE ^ P.DRAGEVENTS), a = e.position.slice(0, 2);
+ if (Number.isFinite(a[0]) && Number.isFinite(a[1]))
+ return Wr(r, a, {
+ dontUseTerrain: !!n,
+ dataProjection: W
+ }).then((o) => (e.obliqueParameters = { pixel: a, estimate: o.estimate }, e.position = o.coords, e));
+ }
+ return e.stopPropagation = !0, Promise.resolve(e);
+ }
+}
+class Cs extends ae {
+ constructor(e) {
+ super(P.ALL, F.ALL, Ne.ALL);
+ /**
+ * The interactions to handle one after the other
+ */
+ h(this, "chain");
+ this.chain = e || [], this.setActive();
+ }
+ /**
+ * Add an interaction to the chain. Optionally passing an index where to add the interaction to.
+ */
+ addInteraction(e, s) {
+ s != null ? this.chain.splice(s, 0, e) : this.chain.push(e);
+ }
+ /**
+ * Removes an interaction from the chain, returning the index from which it was removed
+ */
+ removeInteraction(e) {
+ const s = this.chain.findIndex((r) => r.id === e.id);
+ return s > -1 && this.chain.splice(s, 1), s;
+ }
+ async pipe(e) {
+ let s = e;
+ const r = this.chain.slice(), n = r.length;
+ for (let a = 0; a < n; a++) {
+ const o = r[a];
+ if (o.active & e.type && o.modificationKey & e.key && o.pointerKey & e.pointer && (s = await o.pipe(s), s.stopPropagation))
+ break;
+ }
+ return s;
+ }
+ modifierChanged(e) {
+ this.chain.filter((s) => s.active !== P.NONE).forEach((s) => {
+ s.modifierChanged(e);
+ });
+ }
+ /**
+ * You cannot set the modification of an interaction chain, only of its containing interactions
+ */
+ setModification() {
+ super.setModification();
+ }
+ /**
+ * You cannot set the pointer of an interaction chain, only of its containing interactions
+ */
+ setPointer() {
+ super.setPointer();
+ }
+ destroy() {
+ this.chain.forEach((e) => {
+ e.destroy();
+ }), this.chain = [], super.destroy();
+ }
+}
+class _w extends ae {
+ constructor() {
+ super(P.ALL ^ P.MOVE, F.ALL, Ne.ALL);
+ /**
+ * event type for which to pick the position of the scene. this will create a second render.
+ */
+ h(this, "pickPosition", P.CLICK);
+ /**
+ * whether to pick translucent depth or not, defaults to true
+ */
+ h(this, "pickTranslucent", !0);
+ /**
+ * Pulls the picked position towards the camera position by this number
+ */
+ h(this, "pullPickedPosition", 0);
+ /**
+ * The number of pixels to take into account for picking features
+ */
+ h(this, "hitTolerance", 10);
+ h(this, "_draggingFeature", null);
+ this.setActive();
+ }
+ async pipe(e) {
+ return e.type & P.DRAG && !(this.pickPosition & P.DRAG) ? (this._draggingFeature && (e.feature = this._draggingFeature), e) : (e.type & P.DRAGEND && (this._draggingFeature = null), e.map.className === "OpenlayersMap" ? await this._openlayersHandler(e) : e.map.className === "ObliqueMap" ? await this._obliqueHandler(e) : e.map.className === "CesiumMap" && await this._cesiumHandler(e), e.type & P.DRAGSTART && e.feature && (this._draggingFeature = e.feature), e.type & P.DRAG && this._draggingFeature && (e.feature = this._draggingFeature), e);
+ }
+ setActive(e) {
+ typeof e > "u" && (this.pickPosition = P.CLICK, this.pullPickedPosition = 0), super.setActive(e);
+ }
+ _openlayersHandler(e) {
+ let s = null, r = null;
+ return e.map.olMap.forEachFeatureAtPixel([e.windowPosition.x, e.windowPosition.y], (n, a) => (n && (n.get("olcs_allowPicking") == null || n.get("olcs_allowPicking") === !0) && (s = n, r = a), !0), { hitTolerance: this.hitTolerance }), s && r && (e.feature = s, e.feature.get("features") && (e.feature[J] = r[J]), e.exactPosition = !0), Promise.resolve(e);
+ }
+ _obliqueHandler(e) {
+ let s = null, r = null;
+ return e.map.olMap.forEachFeatureAtPixel([e.windowPosition.x, e.windowPosition.y], (n, a) => (n && (s = n[$r] || n), r = a, !0), { hitTolerance: this.hitTolerance }), s && r && (e.feature = s, e.feature.get("features") && (e.feature[J] = r[J]), e.exactPosition = !0), Promise.resolve(e);
+ }
+ _cesiumHandler(e) {
+ const r = e.map.getScene();
+ if (!r)
+ return Promise.resolve(e);
+ const n = r.pick(e.windowPosition, this.hitTolerance, this.hitTolerance);
+ let a = new ee(), o = new _(), l = new _();
+ const { pickTranslucentDepth: c } = r, d = () => o ? (this.pullPickedPosition && e.ray && (l = _.multiplyByScalar(e.ray.direction, this.pullPickedPosition, l), o = _.subtract(o, l, o)), a = ee.fromCartesian(o, r.globe.ellipsoid, a), e.position = z.wgs84ToMercator([
+ b.toDegrees(a.longitude),
+ b.toDegrees(a.latitude),
+ a.height
+ ], !0), e.positionOrPixel = e.position, r.pickTranslucentDepth = c, Promise.resolve(e)) : (o = new _(), Promise.resolve(e));
+ if (n) {
+ if (n.primitive && n.primitive.olFeature)
+ e.feature = n.primitive.olFeature;
+ else if (n.primitive && n.primitive[J] && (n instanceof Xi || n instanceof Zi)) {
+ e.feature = n;
+ const u = Object.getOwnPropertySymbols(n.primitive), f = u.length;
+ for (let g = 0; g < f; g++)
+ e.feature[u[g]] = n.primitive[u[g]];
+ } else n.id && n.id.olFeature ? e.feature = n.id.olFeature : n.id && n.id[J] && n.id instanceof Ji && (e.feature = n.id);
+ if (!(e.type & this.pickPosition))
+ return Promise.resolve(e);
+ if (r.pickPositionSupported)
+ return n.primitive && this.pickTranslucent && (r.pickTranslucentDepth = !0, e.exactPosition = !0), o = r.pickPosition(e.windowPosition, o), d();
+ }
+ return Promise.resolve(e);
+ }
+}
+class vw extends ae {
+ constructor() {
+ super(P.CLICK, F.ALL, Ne.ALL), this.setActive();
+ }
+ // eslint-disable-next-line class-methods-use-this
+ async pipe(t) {
+ if (!t.feature) {
+ const e = [...t.map.layerCollection].filter((s) => s.featureProvider && s.active && s.isSupported(t.map) && s.featureProvider.isSupported(t.map)).reverse();
+ if (e.length > 0) {
+ const s = t.map.getCurrentResolution(t.position), r = (await Promise.all(e.map((n) => {
+ var a, o;
+ return (o = (a = n.featureProvider) == null ? void 0 : a.getFeaturesByCoordinate) == null ? void 0 : o.call(a, t.position, s, n.headers);
+ }))).flat();
+ r.length > 0 && (t.feature = r[0]);
+ }
+ }
+ return t;
+ }
+}
+function Sw() {
+ return he("EventHandler");
+}
+class ww {
+ constructor() {
+ h(this, "_positionInteraction");
+ h(this, "_featureInteraction");
+ h(this, "_featureProviderInteraction");
+ h(this, "_interactionChain");
+ h(this, "clickDuration");
+ h(this, "dragDuration");
+ h(this, "_lastDown");
+ h(this, "_lastClick");
+ h(this, "_lastKeyEventModifiers");
+ h(this, "_lastDispatchedModifier");
+ h(this, "_dragging");
+ h(this, "_running");
+ h(this, "_eventQueue");
+ h(this, "_exclusiveInteraction");
+ h(this, "_multiples");
+ h(this, "exclusiveRemoved");
+ h(this, "exclusiveAdded");
+ h(this, "_boundKeyListener");
+ h(this, "_modifierChanged");
+ this._positionInteraction = new ql(), this._featureInteraction = new _w(), this._featureProviderInteraction = new vw(), this._interactionChain = new Cs([
+ this._positionInteraction,
+ this._featureInteraction,
+ this._featureProviderInteraction
+ ]), this.clickDuration = 400, this.dragDuration = 100, this._lastDown = null, this._lastClick = {
+ time: null,
+ windowPosition: new H()
+ }, this._lastKeyEventModifiers = /* @__PURE__ */ new Map(), this._lastKeyEventModifiers.set(F.SHIFT, !1), this._lastKeyEventModifiers.set(F.ALT, !1), this._lastKeyEventModifiers.set(F.CTRL, !1), this._lastDispatchedModifier = F.NONE, this._dragging = null, this._running = !1, this._eventQueue = [], this._exclusiveInteraction = null, this._multiples = !1, this.exclusiveRemoved = new L(), this.exclusiveAdded = new L(), this._boundKeyListener = this._keyListener.bind(this), window.addEventListener("keydown", this._boundKeyListener), window.addEventListener("keyup", this._boundKeyListener), this._modifierChanged = new L();
+ }
+ get positionInteraction() {
+ return this._positionInteraction;
+ }
+ get featureInteraction() {
+ return this._featureInteraction;
+ }
+ get featureProviderInteraction() {
+ return this._featureProviderInteraction;
+ }
+ /**
+ * A copy of all the EventHandler interactions
+ */
+ get interactions() {
+ return this._interactionChain.chain.slice();
+ }
+ /**
+ * An event called, when the modifier changes. Order of precedence, if more then one key is pressed: SHIFT, ALT, CTRL
+ */
+ get modifierChanged() {
+ return this._modifierChanged;
+ }
+ /**
+ * if an exclusive Interaction is set, this will return the id of the exclusive Interaction
+ * This can be used to add another Interaction to the same Id
+ */
+ get exclusiveInteractionId() {
+ var t;
+ return (t = this._exclusiveInteraction) == null ? void 0 : t.id;
+ }
+ /**
+ * Add a dynamic interaction to the interaction chain. This is the default methodology for
+ * user map interactions, such as drawing or measuring. If another exclusive interaction is added,
+ * this interaction is removed and a provided callback is called. Use the id parameter to add multiple interactions
+ * from the same source (if you don't wish to provide an {@link InteractionChain})
+ * @param interaction
+ * @param removed - the callback for when the interaction is forcefully removed.
+ * @param index - the position at which to push the interaction. If no index is provided, the interaction is pushed at the end and therefore is executed last.
+ * @param id - an id to allow for multiple interactions to belong to the same exclusive registerer
+ * @returns function to remove the interaction with. returns number of removed interactions (0|1)
+ */
+ addExclusiveInteraction(t, e, s, r) {
+ return S(t, ae), S(e, Function), S(s, ie(Number)), S(r, ie(String)), this._exclusiveInteraction && this._exclusiveInteraction.id !== r && this.removeExclusive(), this._interactionChain.addInteraction(t, s), this._exclusiveInteraction ? (this._exclusiveInteraction.interactions.push(t), this._exclusiveInteraction.cb.push(e)) : this._exclusiveInteraction = {
+ id: r || Xe(),
+ cb: [e],
+ interactions: [t]
+ }, this.exclusiveAdded.raiseEvent(), this._exclusiveUnListen.bind(this, t, this._exclusiveInteraction.id);
+ }
+ /**
+ * Removes any exclusive listeners. Typically only called from the framework to ensure the pubsub listeners are consistent
+ */
+ removeExclusive() {
+ this._exclusiveInteraction && (this._exclusiveInteraction.interactions.filter((t) => t).forEach((t) => {
+ this._interactionChain.removeInteraction(t);
+ }), this._exclusiveInteraction.cb.filter((t) => t).forEach((t) => {
+ t();
+ }), this._exclusiveInteraction = null, this.exclusiveRemoved.raiseEvent());
+ }
+ /**
+ * Removes an exclusive interaction by its id
+ */
+ _exclusiveUnListen(t, e) {
+ if (!this._exclusiveInteraction || this._exclusiveInteraction && this._exclusiveInteraction.id !== e)
+ return 0;
+ const s = this._interactionChain.removeInteraction(t), r = this._exclusiveInteraction.interactions.findIndex((n) => n && n.id === t.id);
+ return r > -1 && (this._exclusiveInteraction.interactions.splice(r, 1, void 0), this._exclusiveInteraction.cb.splice(r, 1, void 0)), this._exclusiveInteraction.interactions.every((n) => n === void 0) && (this._exclusiveInteraction = null), s > -1 && this.exclusiveRemoved.raiseEvent(), s !== -1 ? 1 : 0;
+ }
+ /**
+ * Adds an interaction permanently to the interaction chain. Only add non-interferring
+ * interactions in such a fashion (for instance for displaying the cursor position)
+ * @param interaction
+ * @param [index=3] - at what position this interaction should be added. By default, it is added after the featureProviderInteraction
+ * @returns function to remove the interaction with. returns number of removed interactions (0|1)
+ */
+ addPersistentInteraction(t, e = 3) {
+ return S(t, ae), S(e, Number), this._interactionChain.addInteraction(t, e), () => this._interactionChain.removeInteraction(t) !== -1 ? 1 : 0;
+ }
+ /**
+ * Handles an event triggered by
+ */
+ handleMapEvent(t) {
+ t.pointerEvent === at.MOVE ? this._mouseMove(t) : t.pointerEvent === at.DOWN ? this._mouseDown(t) : t.pointerEvent === at.UP && this._mouseUp(t);
+ }
+ _mouseDown(t) {
+ if (this._lastDown) {
+ this._multiples = !0;
+ return;
+ }
+ t.windowPosition.x === 0 && t.windowPosition.y === 0 || (this._lastDown = t, this._lastDown.time = Date.now());
+ }
+ _mouseUp(t) {
+ if (t.multipleTouch) {
+ this._multiples = !0, this._lastDown = null;
+ return;
+ }
+ if (this._multiples) {
+ this._lastDown = null, this._multiples = !1;
+ return;
+ }
+ const e = {
+ ...t,
+ chainEnded: new L()
+ };
+ this._dragging ? (e.type = P.DRAGEND, e.key = this._dragging.key, e.pointer = this._dragging.pointer, this._startChain(e)) : this._lastDown && (this._lastClick.time && Date.now() - this._lastClick.time < this.clickDuration && H.distanceSquared(this._lastClick.windowPosition, e.windowPosition) < 12 ? (this._lastClick.time = null, e.type = P.DBLCLICK) : (this._lastClick.time = Date.now(), H.clone(e.windowPosition, this._lastClick.windowPosition), e.type = P.CLICK), this._startChain(e)), this._dragging = null, this._lastDown = null;
+ }
+ _mouseMove(t) {
+ let e = {
+ ...t,
+ chainEnded: new L()
+ };
+ this._lastDown ? this._dragging ? (e.type = P.DRAG, e.key = this._dragging.key, e.pointer = this._dragging.pointer, this._startChain(e, !0)) : !this._dragging && Date.now() - this._lastDown.time > this.dragDuration && (e = {
+ type: P.DRAGSTART,
+ ...this._lastDown,
+ chainEnded: new L()
+ }, this._dragging = e, this._startChain(e, !0)) : (e.type = P.MOVE, this._startChain(e, !0));
+ }
+ _keyListener(t) {
+ if ((t.key === "Shift" || t.key === "Alt") && (t.preventDefault(), t.stopPropagation()), this._lastKeyEventModifiers.get(F.SHIFT) !== t.shiftKey || this._lastKeyEventModifiers.get(F.ALT) !== t.altKey || this._lastKeyEventModifiers.get(F.CTRL) !== t.ctrlKey) {
+ this._lastKeyEventModifiers.set(F.SHIFT, t.shiftKey), this._lastKeyEventModifiers.set(F.ALT, t.altKey), this._lastKeyEventModifiers.set(F.CTRL, t.ctrlKey);
+ const e = [...this._lastKeyEventModifiers.keys()].find((s) => this._lastKeyEventModifiers.get(s)) || F.NONE;
+ e !== this._lastDispatchedModifier && (this._interactionChain.modifierChanged(e), this._lastDispatchedModifier = e, this._modifierChanged.raiseEvent(e));
+ }
+ }
+ /**
+ * @param event
+ * @param discardOnRunning if true the event will discarded if an eventHandler is already Running
+ */
+ _startChain(t, e) {
+ this._running && e || (this._running ? this._eventQueue.push(t) : (this._running = !0, this._interactionChain.pipe(t).catch((s) => {
+ Sw().error(s.message);
+ }).finally(() => {
+ var r, n;
+ (r = t.chainEnded) == null || r.raiseEvent(), (n = t.chainEnded) == null || n.destroy(), this._running = !1;
+ const s = this._eventQueue.shift();
+ s && this._startChain(s);
+ })));
+ }
+ /**
+ * Destroys the event handler and its interaction chain.
+ */
+ destroy() {
+ this.removeExclusive(), this.exclusiveAdded.destroy(), this.exclusiveRemoved.destroy(), this._interactionChain.destroy(), this._positionInteraction.destroy(), this._featureInteraction.destroy(), this._eventQueue = [], window.removeEventListener("keydown", this._boundKeyListener), window.removeEventListener("keyup", this._boundKeyListener);
+ }
+}
+const Gi = Symbol("cesiumTilesetLastUpdated"), kn = Symbol("updateFeatureOverride");
+function Id(i) {
+ if (!i)
+ return zs();
+ const { rectangle: t } = i.root.boundingVolume;
+ if (t) {
+ const o = Et.southwest(t), l = Et.northeast(t), c = z.wgs84ToMercator([
+ b.toDegrees(o.longitude),
+ b.toDegrees(o.latitude)
+ ]), d = z.wgs84ToMercator([
+ b.toDegrees(l.longitude),
+ b.toDegrees(l.latitude)
+ ]);
+ return [c[0], c[1], d[0], d[1]];
+ }
+ const { center: e, radius: s } = i.boundingSphere, r = ee.fromCartesian(e), n = z.wgs84ToMercator([
+ b.toDegrees(r.longitude),
+ b.toDegrees(r.latitude),
+ r.height
+ ]);
+ return $u(n, s).getExtent();
+}
+class ns extends es {
+ constructor(e, s) {
+ super(e, s);
+ h(this, "cesium3DTileset");
+ h(this, "tilesetOptions");
+ h(this, "splitDirection");
+ h(this, "style");
+ h(this, "featureVisibility");
+ h(this, "globalHider");
+ h(this, "tilesetProperties");
+ h(this, "modelMatrix");
+ h(this, "offset");
+ h(this, "_initializedPromise", null);
+ h(this, "_originalOrigin", null);
+ h(this, "_styleLastUpdated", Date.now());
+ h(this, "_onStyleChangeRemover", null);
+ h(this, "_customShader");
+ this.cesium3DTileset = null, this.tilesetOptions = s.tilesetOptions, this.splitDirection = s.splitDirection, this.style = s.style, this.featureVisibility = s.featureVisibility, this.globalHider = s.globalHider, this.tilesetProperties = s.tilesetProperties, this.modelMatrix = s.modelMatrix, this.offset = s.offset, this._customShader = s.customShader;
+ }
+ static get className() {
+ return "CesiumTilesetCesiumImpl";
+ }
+ get customShader() {
+ return this._customShader;
+ }
+ async initialize() {
+ if (!this._initializedPromise) {
+ this._initializedPromise = na.fromUrl(Ii(this.url, this.headers), {
+ ...this.tilesetOptions,
+ show: !1
+ // show is handled by activate
+ });
+ try {
+ this.cesium3DTileset = await this._initializedPromise;
+ } catch (e) {
+ if (this.url && !/\.json$/.test(this.url))
+ this.url = `${this.url.replace(/\/$/, "")}/tileset.json`, this._initializedPromise = na.fromUrl(Ii(this.url, this.headers), {
+ ...this.tilesetOptions,
+ show: !1
+ // show is handled by activate
+ }), this.cesium3DTileset = await this._initializedPromise;
+ else
+ throw e;
+ }
+ if (this.cesium3DTileset.customShader = this._customShader, this.isDestroyed) {
+ this.cesium3DTileset.destroy();
+ return;
+ }
+ this.tilesetProperties && this.tilesetProperties.forEach(({ key: e, value: s }) => {
+ this.cesium3DTileset[e] = s;
+ }), this.cesium3DTileset[J] = this.name, this.cesium3DTileset.tileVisible.addEventListener(this.applyStyle.bind(this)), this.cesium3DTileset.tileUnload.addEventListener((e) => {
+ delete e[Gi], delete e.content[Gi], delete e.content[kn];
+ }), this._originalOrigin = _.clone(this.cesium3DTileset.boundingSphere.center), this.modelMatrix ? this.cesium3DTileset.modelMatrix = this.modelMatrix : this.offset && this._calculateOffset(), this.map.addPrimitiveCollection(this.cesium3DTileset), await super.initialize(), this.splitDirection && (this.cesium3DTileset.splitDirection = this.splitDirection), this.updateStyle(this.style);
+ }
+ await this._initializedPromise;
+ }
+ _calculateOffset() {
+ if (this.cesium3DTileset && !this.modelMatrix && this._originalOrigin)
+ if (!this.offset)
+ this.cesium3DTileset.modelMatrix = G.IDENTITY;
+ else {
+ const e = ee.fromCartesian(this._originalOrigin);
+ e.longitude += b.toRadians(this.offset[0]), e.latitude += b.toRadians(this.offset[1]), e.height += this.offset[2];
+ const s = ee.toCartesian(e), r = _.subtract(s, this._originalOrigin, s);
+ this.cesium3DTileset.modelMatrix = G.fromTranslation(r);
+ }
+ }
+ updateModelMatrix(e) {
+ this.modelMatrix = e, this.cesium3DTileset && (this.modelMatrix ? this.cesium3DTileset.modelMatrix = this.modelMatrix : this.offset ? this._calculateOffset() : this.cesium3DTileset.modelMatrix = G.IDENTITY);
+ }
+ updateOffset(e) {
+ this.offset = e, this._calculateOffset();
+ }
+ updateCustomShader(e) {
+ this._customShader = e, this.cesium3DTileset && (this.cesium3DTileset.customShader = this._customShader);
+ }
+ async activate() {
+ await super.activate(), this.active && this.cesium3DTileset && (this.cesium3DTileset.show = !0);
+ }
+ deactivate() {
+ super.deactivate(), this.cesium3DTileset && (this.cesium3DTileset.show = !1);
+ }
+ updateStyle(e, s) {
+ this.style = e, this.initialized && this.cesium3DTileset && (this.cesium3DTileset.style = this.style.cesiumStyle, this._onStyleChangeRemover && this._onStyleChangeRemover(), this._onStyleChangeRemover = this.style.styleChanged.addEventListener(() => {
+ var r;
+ (r = this.cesium3DTileset) == null || r.makeStyleDirty(), this._styleLastUpdated = Date.now();
+ }), this._styleLastUpdated = Date.now(), this.cesium3DTileset.colorBlendMode !== this.style.colorBlendMode && (this.style.colorBlendMode !== jn.HIGHLIGHT ? this.cesium3DTileset.extras && // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,no-underscore-dangle
+ this.cesium3DTileset.extras._3DTILESDIFFUSE && (this.cesium3DTileset.colorBlendMode = this.style.colorBlendMode) : this.cesium3DTileset.colorBlendMode = this.style.colorBlendMode));
+ }
+ updateSplitDirection(e) {
+ this.splitDirection = e, this.cesium3DTileset && (this.cesium3DTileset.splitDirection = e);
+ }
+ applyStyle(e) {
+ if (e.contentReady)
+ if (e.content instanceof ug)
+ for (let s = 0; s < e.content.innerContents.length; s++)
+ this.styleContent(e.content.innerContents[s]);
+ else
+ this.styleContent(e.content);
+ }
+ styleContent(e) {
+ var s, r, n, a, o;
+ if (!e[Gi] || e[Gi] < this.featureVisibility.lastUpdated || e[Gi] < (((s = this.globalHider) == null ? void 0 : s.lastUpdated) ?? 0) || e[Gi] < this._styleLastUpdated) {
+ delete e[kn];
+ const l = e.featuresLength, c = {
+ hideLocal: [],
+ hideGlobal: [],
+ highlight: []
+ };
+ for (let d = 0; d < l; d++) {
+ const u = e.getFeature(d);
+ if (u) {
+ let f = u.getProperty("id");
+ f || (f = `${e.url}${d}`);
+ let g = !0;
+ this.featureVisibility.highlightedObjects[f] && !this.featureVisibility.hasHighlightFeature(f, u) && (this.featureVisibility.addHighlightFeature(f, u), c.highlight.push([f, u]), g = !1), this.featureVisibility.hiddenObjects[f] && !this.featureVisibility.hasHiddenFeature(f, u) && (this.featureVisibility.addHiddenFeature(f, u), c.hideLocal.push([f, u])), (r = this.globalHider) != null && r.hiddenObjects[f] && !((n = this.globalHider) != null && n.hasFeature(f, u)) && ((a = this.globalHider) == null || a.addFeature(f, u), c.hideGlobal.push([f, u])), g && this._styleLastUpdated > (e[Gi] ?? 0) && u[Mi] && Al(u);
+ }
+ }
+ (c.hideLocal.length > 0 || c.hideGlobal.length > 0 || c.highlight.length > 0) && (e[kn] = () => {
+ c.hideGlobal.forEach(([d, u]) => {
+ var f;
+ (f = this.globalHider) != null && f.hasFeature(d, u) && Vr(u);
+ }), c.hideLocal.forEach(([d, u]) => {
+ this.featureVisibility.hasHiddenFeature(d, u) && Vr(u);
+ }), c.highlight.forEach(([d, u]) => {
+ this.featureVisibility.hasHighlightFeature(d, u) && jr(u);
+ });
+ }), e[Gi] = Date.now();
+ } else
+ (o = e[kn]) == null || o.call(e);
+ }
+ destroy() {
+ if (this.cesium3DTileset) {
+ if (this.map.initialized) {
+ const e = this.cesium3DTileset;
+ this.map.removePrimitiveCollection(e);
+ } else
+ this.cesium3DTileset.destroy();
+ this.cesium3DTileset = null;
+ }
+ this._onStyleChangeRemover && this._onStyleChangeRemover(), super.destroy();
+ }
+}
+class U1 {
+ constructor(t, e) {
+ h(this, "entities");
+ h(this, "splitDirection");
+ h(this, "_splitDirectionProperty");
+ h(this, "_featureItems", /* @__PURE__ */ new Map());
+ h(this, "_convertingFeatures", /* @__PURE__ */ new Map());
+ this.entities = t.entities, this.splitDirection = e, this._splitDirectionProperty = new eu(e);
+ }
+ _addConvertedItems(t, e, s) {
+ const r = s.map((n) => {
+ let a, o;
+ return n.type === "billboard" ? a = this.entities.add({
+ billboard: {
+ ...n.item,
+ splitDirection: this._splitDirectionProperty
+ },
+ position: n.item.position
+ }) : n.type === "label" && (a = this.entities.add({
+ label: n.item,
+ position: n.item.position
+ })), a && (o = () => {
+ this.entities.remove(a);
+ }), a && e && yd(t, a), o;
+ }).filter((n) => n != null);
+ this._featureItems.set(t, r);
+ }
+ async addFeature(t, e, s, r) {
+ var o, l;
+ (o = this._convertingFeatures.get(t)) == null || o();
+ let n = !1;
+ this._convertingFeatures.set(t, () => {
+ n = !0;
+ });
+ const a = await pd(t, e, s, r);
+ (l = this._featureItems.get(t)) == null || l.forEach((c) => c()), n ? a.forEach((c) => {
+ c.type === "primitive" && c.item.destroy();
+ }) : this._addConvertedItems(t, s.getAllowPicking(t), a);
+ }
+ removeFeature(t) {
+ var e, s;
+ (e = this._convertingFeatures.get(t)) == null || e(), this._convertingFeatures.delete(t), (s = this._featureItems.get(t)) == null || s.forEach((r) => r()), this._featureItems.delete(t);
+ }
+ // eslint-disable-next-line class-methods-use-this,no-unused-vars
+ updateSplitDirection(t) {
+ this.splitDirection = t, this._splitDirectionProperty.setValue(this.splitDirection);
+ }
+ clear() {
+ this.entities.removeAll(), this._featureItems.clear(), this._convertingFeatures.forEach((t) => {
+ t();
+ }), this._convertingFeatures.clear();
+ }
+ destroy() {
+ this.clear();
+ }
+}
+function Cw(i, t) {
+ return i.values.forEach((e) => {
+ t.add(e);
+ }), i.collectionChanged.addEventListener((e, s, r) => {
+ s.forEach((n) => {
+ t.add(n);
+ }), r.forEach((n) => {
+ t.remove(n);
+ });
+ });
+}
+class Mw extends es {
+ constructor(e, s) {
+ super(e, s);
+ h(this, "dataSource");
+ h(this, "entities");
+ h(this, "clock");
+ // eslint-disable-next-line class-methods-use-this
+ h(this, "_collectionListener", () => {
+ });
+ this.dataSource = new Jc(this.name), this.dataSource[J] = this.name, this.entities = s.entities, this.clock = s.clock;
+ }
+ static get className() {
+ return "DataSourceCesiumImpl";
+ }
+ async initialize() {
+ this.initialized || (this._collectionListener = Cw(this.entities, this.dataSource.entities), await this.map.addDataSource(this.dataSource)), await super.initialize();
+ }
+ async activate() {
+ await super.activate(), this.active && (this.dataSource.show = !0), this.clock && this.map.setDataSourceDisplayClock(this.clock);
+ }
+ deactivate() {
+ super.deactivate(), this.dataSource.show = !1, this.clock && this.map.unsetDataSourceDisplayClock(this.clock);
+ }
+ flyToEntity(e) {
+ if (this.active) {
+ const s = this.dataSource.entities.getById(e);
+ if (!s) {
+ this.getLogger().warning("could not find entity on this layer");
+ return;
+ }
+ const r = this.map.getDataSourceDisplay(), n = this.map.getScene(), { camera: a } = n, o = new Kc(), l = this.map.getViewpointSync(), { heading: c, pitch: d } = l, u = new dg(b.toRadians(c), b.toRadians(d < -45 ? d : -45), void 0);
+ let f, g = 0;
+ const m = () => {
+ const y = r.getBoundingSphere(s, !0, o);
+ if (y !== oh.PENDING) {
+ if (y === oh.FAILED) {
+ g += 1, g > 3 && f();
+ return;
+ }
+ a.flyToBoundingSphere(o, {
+ duration: 1,
+ offset: u
+ }), f();
+ }
+ }, p = r.defaultDataSource;
+ if (p.isLoading) {
+ const y = p.loadingEvent.addEventListener(() => {
+ f = n.postRender.addEventListener(m), y();
+ });
+ } else
+ f = n.postRender.addEventListener(m);
+ }
+ }
+ destroy() {
+ this.map.initialized && !this.isDestroyed && this.map.removeDataSource(this.dataSource), this._collectionListener(), this.dataSource.entities.removeAll(), this.clock && this.map.unsetDataSourceDisplayClock(this.clock), super.destroy();
+ }
+}
+class er extends es {
+ constructor(e, s) {
+ super(e, s);
+ h(this, "cesiumLayer", null);
+ h(this, "splitDirection");
+ h(this, "minLevel");
+ h(this, "maxLevel");
+ h(this, "minRenderingLevel");
+ h(this, "maxRenderingLevel");
+ h(this, "extent");
+ h(this, "opacity");
+ h(this, "tilingSchema");
+ h(this, "imageryLayerOptions");
+ this.splitDirection = s.splitDirection, this.minLevel = s.minLevel, this.maxLevel = s.maxLevel, this.minRenderingLevel = s.minRenderingLevel, this.maxRenderingLevel = s.maxRenderingLevel, this.extent = s.extent, this.opacity = s.opacity, this.tilingSchema = s.tilingSchema, this.imageryLayerOptions = s.imageryLayerOptions;
+ }
+ static get className() {
+ return "RasterLayerCesiumImpl";
+ }
+ async initialize() {
+ if (!this.initialized) {
+ if (this.cesiumLayer = await this.getCesiumLayer(), this.isDestroyed)
+ return this.cesiumLayer.destroy(), Promise.resolve();
+ this.cesiumLayer[J] = this.name, this.cesiumLayer.show = !1, this.map.addImageryLayer(this.cesiumLayer);
+ }
+ return super.initialize();
+ }
+ updateSplitDirection(e) {
+ this.splitDirection = e, this.initialized && this.cesiumLayer && (this.cesiumLayer.splitDirection = e);
+ }
+ getCesiumLayerOptions() {
+ return {
+ ...this.imageryLayerOptions,
+ alpha: this.opacity,
+ splitDirection: this.splitDirection,
+ minimumTerrainLevel: this.minRenderingLevel,
+ maximumTerrainLevel: this.maxRenderingLevel
+ };
+ }
+ // eslint-disable-next-line class-methods-use-this
+ getCesiumLayer() {
+ throw new Error("implementation error");
+ }
+ async activate() {
+ await super.activate(), this.active && this.cesiumLayer && (this.cesiumLayer.show = !0);
+ }
+ deactivate() {
+ super.deactivate(), this.cesiumLayer && (this.cesiumLayer.show = !1);
+ }
+ updateOpacity(e) {
+ this.opacity = e, this.initialized && this.cesiumLayer && (this.cesiumLayer.alpha = e);
+ }
+ destroy() {
+ this.cesiumLayer && this.map.removeImageryLayer(this.cesiumLayer), this.cesiumLayer = null, super.destroy();
+ }
+}
+class xw extends er {
+ static get className() {
+ return "OpenStreetMapCesiumImpl";
+ }
+ getCesiumLayer() {
+ const t = this.getCesiumLayerOptions();
+ return Promise.resolve(new vs(new fg({ maximumLevel: this.maxLevel }), t));
+ }
+}
+class Ew extends er {
+ constructor(e, s) {
+ super(e, s);
+ h(this, "credit");
+ this.credit = s.credit;
+ }
+ static get className() {
+ return "SingleImageCesiumImpl";
+ }
+ async getCesiumLayer() {
+ var a;
+ const e = {
+ credit: this.credit
+ }, s = (a = this.extent) == null ? void 0 : a.getCoordinatesInProjection(de);
+ s && (e.rectangle = Et.fromDegrees(s[0], s[1], s[2], s[3]));
+ const r = await gg.fromUrl(Ii(this.url, this.headers), e), n = this.getCesiumLayerOptions();
+ return n.rectangle = e.rectangle, new vs(r, n);
+ }
+}
+class Ow extends es {
+ constructor(e, s) {
+ super(e, s);
+ h(this, "requestVertexNormals");
+ h(this, "requestWaterMask");
+ h(this, "terrainProvider");
+ this.requestVertexNormals = s.requestVertexNormals, this.requestWaterMask = s.requestWaterMask;
+ }
+ static get className() {
+ return "TerrainCesiumImpl";
+ }
+ async initialize() {
+ return this.initialized || (this.terrainProvider = await Ur(this.url, {
+ requestVertexNormals: this.requestVertexNormals,
+ requestWaterMask: this.requestWaterMask
+ }, this.headers), this.terrainProvider[J] = this.name), super.initialize();
+ }
+ async activate() {
+ await super.activate(), this.active && this.terrainProvider && this.map.setTerrainProvider(this.terrainProvider);
+ }
+ deactivate() {
+ super.deactivate(), this.terrainProvider && this.map.unsetTerrainProvider(this.terrainProvider);
+ }
+ destroy() {
+ this.terrainProvider && this.map.unsetTerrainProvider(this.terrainProvider), this.terrainProvider = void 0, super.destroy();
+ }
+}
+class bw extends er {
+ constructor(e, s) {
+ super(e, s);
+ h(this, "format");
+ this.format = s.format;
+ }
+ static get className() {
+ return "TmsCesiumImpl";
+ }
+ async getCesiumLayer() {
+ const e = {
+ fileExtension: this.format,
+ maximumLevel: this.maxLevel,
+ minimumLevel: this.minLevel,
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
+ // @ts-ignore
+ show: !1
+ };
+ if (this.extent && this.extent.isValid()) {
+ const n = this.extent.getCoordinatesInProjection(de);
+ e.rectangle = Et.fromDegrees(n[0], n[1], n[2], n[3]);
+ }
+ this.tilingSchema === it.GEOGRAPHIC && (e.tilingScheme = new Qc());
+ const s = await mg.fromUrl(Ii(this.url, this.headers), e), r = this.getCesiumLayerOptions();
+ return new vs(s, r);
+ }
+}
+const xa = new Array(25);
+for (let i = 0; i < xa.length; i++)
+ xa[i] = 200375083427892e-7 * 2 / 256 / 2 ** (i + 1);
+function Ul(i) {
+ const t = Et.southwest(i), e = Et.northeast(i), s = [
+ b.toDegrees(t.longitude),
+ b.toDegrees(t.latitude)
+ ], r = [
+ b.toDegrees(e.longitude),
+ b.toDegrees(e.latitude)
+ ], n = fa(s), a = fa(r);
+ return [...n, ...a];
+}
+class ut extends Ut {
+ constructor(e) {
+ var n;
+ super(e);
+ /**
+ * Cesium Webmercator TilingScheme
+ */
+ h(this, "tilingScheme", new _l());
+ /**
+ * sorted baseLevels, maximumLevel first example: [18,17,16]
+ */
+ h(this, "baseLevels");
+ h(this, "_tileCacheSize");
+ /**
+ * cache of tiles for each baseLevel
+ */
+ h(this, "cache", /* @__PURE__ */ new Map());
+ /**
+ * Caches the loaded rTrees for quick Access to all features.
+ */
+ h(this, "rtreeCache", /* @__PURE__ */ new Map());
+ h(this, "trackFeaturesToTiles");
+ h(this, "allowTileAggregation");
+ /**
+ * set of currently loaded featureIds with the corresponding tileIds
+ */
+ h(this, "featureIdToTileIds", /* @__PURE__ */ new Map());
+ h(this, "tileLoadedEvent", new L());
+ h(this, "_locale", "en");
+ h(this, "_idProperty");
+ const s = ut.getDefaultOptions();
+ this._tileCacheSize = ne(e.tileCacheSize, s.tileCacheSize);
+ const r = Array.isArray(e.baseLevels) ? e.baseLevels.slice() : ((n = s.baseLevels) == null ? void 0 : n.slice()) || [];
+ r.sort((a, o) => o - a), this.baseLevels = [...new Set(r)], this.baseLevels.forEach((a) => {
+ this.cache.set(a, new gf(this.tileCacheSize));
+ }), this.trackFeaturesToTiles = ce(e.trackFeaturesToTiles, s.trackFeaturesToTiles), this.allowTileAggregation = ce(e.allowTileAggregation, s.allowTileAggregation), this._idProperty = e.idProperty || s.idProperty;
+ }
+ static get className() {
+ return "TileProvider";
+ }
+ static getDefaultOptions() {
+ return {
+ tileCacheSize: 50,
+ baseLevels: [15],
+ trackFeaturesToTiles: !0,
+ allowTileAggregation: !0,
+ idProperty: void 0
+ };
+ }
+ /**
+ * use setTileCacheSize to change
+ */
+ get tileCacheSize() {
+ return this._tileCacheSize;
+ }
+ get idProperty() {
+ return this._idProperty;
+ }
+ get locale() {
+ return this._locale;
+ }
+ /**
+ * sets the locale and reloads the layer the if the URL is a locale aware Object.
+ */
+ set locale(e) {
+ S(e, String), this._locale !== e && (this._locale = e);
+ }
+ async setTileCacheSize(e) {
+ const s = [];
+ this._tileCacheSize = e, this.cache.forEach((r, n) => {
+ for (r.setSize(this._tileCacheSize); r.canExpireCache(); )
+ s.push(this._removeLastTileFromCache(n));
+ }), await Promise.all(s);
+ }
+ /**
+ * tracks Features if the features have ids.
+ */
+ _trackFeatures(e, s) {
+ this.trackFeaturesToTiles && e.forEach((r) => {
+ const n = r.getId();
+ n && (this.featureIdToTileIds.has(String(n)) || this.featureIdToTileIds.set(String(n), /* @__PURE__ */ new Set()), this.featureIdToTileIds.get(String(n)).add(s));
+ });
+ }
+ /**
+ * untracks Features
+ */
+ _unTrackFeatures(e, s) {
+ this.trackFeaturesToTiles && e.forEach((r) => {
+ const n = r.getId();
+ if (n && this.featureIdToTileIds.has(String(n))) {
+ const a = this.featureIdToTileIds.get(String(n));
+ a.delete(s), a.size === 0 && this.featureIdToTileIds.delete(String(n));
+ }
+ });
+ }
+ async _addTilePromiseToCache(e, s, r) {
+ const n = e.then((a) => {
+ a.forEach((l) => {
+ const c = this.idProperty ? l.get(this.idProperty) : null;
+ c != null && l.setId(String(c)), l.getId() || l.setId(Xe());
+ });
+ const o = new al(a.length);
+ return o.load(a.map((l) => {
+ const c = l.getGeometry();
+ if (c) {
+ const d = c.getExtent();
+ return {
+ minX: d[0],
+ minY: d[1],
+ maxX: d[2],
+ maxY: d[3],
+ value: l
+ };
+ }
+ return null;
+ }).filter((l) => l)), this.tileLoadedEvent.raiseEvent({ tileId: r, rtree: o }), this._trackFeatures(a, r), this.rtreeCache.set(r, o), o;
+ }).catch(() => {
+ this.getLogger().warning(`Could not load Tile ${r}`);
+ const a = new al();
+ return this.rtreeCache.set(r, a), a;
+ });
+ this.cache.get(s).set(r, n), this.cache.get(s).canExpireCache() && await Promise.all([
+ n,
+ this._removeLastTileFromCache(s)
+ ]), await n;
+ }
+ _removeLastTileFromCache(e) {
+ var n;
+ const s = this.cache.get(e).peekLastKey(), r = (n = this.cache.get(e)) == null ? void 0 : n.pop();
+ if (r)
+ return r.then((a) => {
+ a && (this.rtreeCache.delete(s), setTimeout(() => {
+ this._unTrackFeatures(a.all().map((o) => o.value), s), a.clear();
+ }, 0));
+ });
+ }
+ /**
+ * returns the closest baseLevel for the given resolution
+ * @param latitude in radians
+ */
+ getBaseLevelForResolution(e, s) {
+ const r = e / Math.cos(s);
+ let n = 0;
+ for (let o = 0; o < xa.length && (n = o, !(r >= xa[o])); o++)
+ ;
+ const a = this.getBaseLevel(n);
+ return a === void 0 ? this.baseLevels[this.baseLevels.length - 1] : a;
+ }
+ /**
+ * returns the nearest parent BaseLevel or undefined if no parent baseLevel is found
+ */
+ getBaseLevel(e) {
+ return this.baseLevels.find((s) => e >= s);
+ }
+ // eslint-disable-next-line class-methods-use-this
+ getCacheKey(e, s, r) {
+ return `${r}/${e}/${s}`;
+ }
+ async _getRtreeForBaseTile(e, s, r) {
+ const n = this.tilingScheme.positionToTileXY(s, e), a = this.getCacheKey(n.x, n.y, e);
+ if (this.cache.has(e)) {
+ if (!this.cache.get(e).containsKey(a)) {
+ const o = this.loader(n.x, n.y, e, r);
+ this._addTilePromiseToCache(o, e, a);
+ }
+ return this.cache.get(e).get(a);
+ }
+ return null;
+ }
+ /**
+ * returns the features intersecting this coordinate. Depending on the resolution a buffer around the coordinate is requested.
+ * The Buffer has the size of the resolution.
+ * @param coordinate in mercator
+ * @param resolution in m per pixel
+ * @param headers optional request headers to be sent with the server request
+ */
+ async getFeaturesByCoordinate(e, s, r) {
+ const n = mf(e);
+ Gc(n, s, n);
+ const a = bl(e), o = ee.fromDegrees(a[0], a[1]), l = this.getBaseLevelForResolution(s, o.latitude), c = await this._getRtreeForBaseTile(l, o, r);
+ return c ? c.search({
+ minX: n[0],
+ minY: n[1],
+ maxX: n[2],
+ maxY: n[3]
+ }).map((u) => u.value) : [];
+ }
+ /**
+ * returns features for the requested Tile.
+ * @param x
+ * @param y
+ * @param level - if the level is not a base level, will use the closest match
+ * @param headers optional request headers to be sent with the server request
+ */
+ async getFeaturesForTile(e, s, r, n) {
+ const a = this.tilingScheme.tileXYToRectangle(e, s, r), o = Et.center(a), l = this.getBaseLevel(r);
+ if (l != null) {
+ const c = await this._getRtreeForBaseTile(l, o, n);
+ if (c) {
+ if (r === l)
+ return c.all().map((d) => d.value);
+ {
+ const d = Ul(a);
+ return c.search({
+ minX: d[0],
+ minY: d[1],
+ maxX: d[2],
+ maxY: d[3]
+ }).map((f) => f.value);
+ }
+ }
+ } else if (this.allowTileAggregation && this.baseLevels[this.baseLevels.length - 1] - r <= 2) {
+ const c = r + 1, d = e * 2, u = s * 2;
+ return [
+ ...await this.getFeaturesForTile(d, u, c, n),
+ ...await this.getFeaturesForTile(d + 1, u, c, n),
+ ...await this.getFeaturesForTile(d + 1, u + 1, c, n),
+ ...await this.getFeaturesForTile(d, u + 1, c, n)
+ ];
+ }
+ return [];
+ }
+ /**
+ * Retrieves all features which intersect the given extent. Will load all intersecting tiles.
+ * @param extent
+ * @param level - Optional level to request. Will use highest level if omitted. If the provided level is not a base level, will use the closest match.
+ * @param headers Optional request headers to be sent with the server request
+ */
+ async getFeaturesForExtent(e, s, r) {
+ let n = s ?? this.baseLevels[0];
+ n = this.getBaseLevel(n);
+ const [a, o, l, c] = e.getCoordinatesInProjection(de), d = this.tilingScheme.positionToTileXY(ee.fromDegrees(a, c), n), u = this.tilingScheme.positionToTileXY(ee.fromDegrees(l, o), n), f = [];
+ for (let { x: p } = d; p <= u.x; p++)
+ for (let { y } = d; y <= u.y; y++)
+ f.push([p, y]);
+ const g = await Promise.all(f.map(([p, y]) => this.getFeaturesForTile(p, y, n, r))), m = e.getCoordinatesInProjection(W);
+ return g.flat().filter((p) => {
+ const y = p.getGeometry();
+ return y && y.intersectsExtent(m);
+ });
+ }
+ /**
+ * calls the given Function for Each feature currently in the cache
+ * @param callback
+ */
+ forEachFeature(e) {
+ this.rtreeCache.forEach((s) => {
+ s.all().map((r) => r.value).forEach(e);
+ });
+ }
+ /**
+ * Public API to load features from a source (for example a rest API, or WfsLayer)
+ *
+ * Can be used to write custom TileProvider to provide an interface to a "feature Source"
+ * Can also be used to manipulate the features, for example setting an ID Prefix or filter the features.
+ *
+ * @example to request Geojson from a rest API:
+ * const rectangle = this.tilingScheme.tileXYToRectangle(x, y, z);
+ * const southwest = Rectangle.southwest(rectangle);
+ * const northeast = Rectangle.northeast(rectangle);
+ * const minx = CesiumMath.toDegrees(southwest.longitude);
+ * const miny = CesiumMath.toDegrees(southwest.latitude);
+ * const maxx = CesiumMath.toDegrees(northeast.longitude);
+ * const maxy = CesiumMath.toDegrees(northeast.latitude);
+ * const url = `http://myFeatureSource/layer/getFeatures?minx=${minx}&miny=${miny}&maxx=${maxx}&maxy=${maxy}`
+ *
+ * return fetch.get(url)
+ * .then(response => response.json())
+ * .then((data) => {
+ * const { features } = parseGeoJSON(data.data, { dynamicStyle: true });
+ * return features;
+ * });
+ */
+ // eslint-disable-next-line class-methods-use-this,no-unused-vars
+ loader(e, s, r, n) {
+ return Promise.resolve([]);
+ }
+ toJSON() {
+ var r;
+ const e = super.toJSON(), s = ut.getDefaultOptions();
+ return s.tileCacheSize !== this.tileCacheSize && (e.tileCacheSize = this.tileCacheSize), this.baseLevels.length === ((r = s.baseLevels) == null ? void 0 : r.length) && this.baseLevels.every((n) => {
+ var a;
+ return (a = s.baseLevels) == null ? void 0 : a.includes(n);
+ }) || (e.baseLevels = this.baseLevels.slice()), s.trackFeaturesToTiles !== this.trackFeaturesToTiles && (e.trackFeaturesToTiles = this.trackFeaturesToTiles), s.allowTileAggregation !== this.allowTileAggregation && (e.allowTileAggregation = this.allowTileAggregation), this.idProperty && (e.idProperty = this.idProperty), e;
+ }
+ /**
+ * clears the cache and removes all entries
+ */
+ async clearCache() {
+ const e = [];
+ this.cache.forEach((s) => {
+ s.forEach((r) => {
+ e.push(r);
+ }), s.clear();
+ }), await Promise.all(e), this.rtreeCache.forEach((s) => {
+ s.clear();
+ }), this.rtreeCache.clear(), this.featureIdToTileIds.clear();
+ }
+ destroy() {
+ super.destroy(), this.clearCache(), this.cache.clear(), this.isDestroyed = !0, this.tileLoadedEvent.destroy();
+ }
+}
+Js.registerClass(ut.className, ut);
+class Pw extends pf {
+ /**
+ * @param {CanvasRenderingContext2D} context Context.
+ * @param {number} pixelRatio Pixel ratio.
+ * @param {import("ol/extent").Extent} extent Extent.
+ * @param {import("ol/transform").Transform} transform Transform.
+ * @param {number} viewRotation View rotation.
+ * @param {number=} squaredTolerance Optional squared tolerance for simplification.
+ * @param {import("ol/proj").TransformFunction=} userTransform Transform from user to view projection.
+ * @param {number} [scaleY=1] Scale value for Scaling Circles, Images, Text in Y direction.
+ */
+ constructor(t, e, s, r, n, a, o, l = 1) {
+ super(t, e, s, r, n, a, o), this.scaleY = l, this.scaledImageScale_ = [0, 0], this.scaledTextScale_ = [0, 0];
+ }
+ /**
+ * @private
+ * @type {import("ol/size").Size}
+ */
+ get imageScale_() {
+ return this.scaledImageScale_;
+ }
+ /**
+ * @private
+ * @param {import("ol/size").Size} value
+ */
+ set imageScale_(t) {
+ const e = t || [1, 1];
+ this.scaledImageScale_ = [e[0], e[1] * this.scaleY];
+ }
+ /**
+ * @private
+ * @type {import("ol/size").Size}
+ */
+ get textScale_() {
+ return this.scaledTextScale_;
+ }
+ /**
+ * @private
+ * @param {import("ol/size").Size} value
+ */
+ set textScale_(t) {
+ const e = t || [1, 1];
+ this.scaledTextScale_ = [e[0], e[1] * this.scaleY];
+ }
+ /**
+ * @param {Array